@ohif/extension-measurement-tracking 3.9.0-beta.76 → 3.9.0-beta.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see ohif-extension-measurement-tracking.umd.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@ohif/ui"),require("@ohif/extension-default"),require("@ohif/extension-cornerstone-dicom-sr"),require("@ohif/core"),require("@cornerstonejs/tools"),require("@cornerstonejs/core")):"function"==typeof define&&define.amd?define(["@ohif/ui","@ohif/extension-default","@ohif/extension-cornerstone-dicom-sr","@ohif/core","@cornerstonejs/tools","@cornerstonejs/core"],t):"object"==typeof exports?exports["ohif-extension-measurement-tracking"]=t(require("@ohif/ui"),require("@ohif/extension-default"),require("@ohif/extension-cornerstone-dicom-sr"),require("@ohif/core"),require("@cornerstonejs/tools"),require("@cornerstonejs/core")):e["ohif-extension-measurement-tracking"]=t(e["@ohif/ui"],e["@ohif/extension-default"],e["@ohif/extension-cornerstone-dicom-sr"],e["@ohif/core"],e["@cornerstonejs/tools"],e["@cornerstonejs/core"])}(globalThis,((e,t,n,r,i,a)=>(()=>{var o,s,l,u,c={419:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ft,I:()=>Ut});var r,i,a=n(1),o=n(827),s=n.n(o),l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)};function u(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function c(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function f(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(r||(r={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(i||(i={}));var p,h=r.Start,v=r.Stop,g=r.Raise,y=r.Send,m=r.Cancel,b=r.NullEvent,S=r.Assign,w=(r.After,r.DoneState,r.Log),k=r.Init,E=r.Invoke,x=(r.ErrorExecution,r.ErrorPlatform),I=r.ErrorCustom,_=r.Update,T=r.Choose,C=r.Pure,N={},R="xstate.guard",D=!0;function O(e,t,n){void 0===n&&(n=".");var r=L(e,n),i=L(t,n);return G(i)?!!G(r)&&i===r:G(r)?r in i:Object.keys(r).every((function(e){return e in i&&O(r[e],i[e])}))}function P(e){try{return G(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function M(e,t){try{return Q(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function L(e,t){return function(e){return"object"==typeof e&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}(e)?e.value:Q(e)?A(e):"string"!=typeof e?e:A(M(e,t))}function A(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function U(e,t){for(var n={},r=Object.keys(e),i=0;i<r.length;i++){var a=r[i];n[a]=t(e[a],a,e,i)}return n}function j(e,t,n){var r,i,a={};try{for(var o=c(Object.keys(e)),s=o.next();!s.done;s=o.next()){var l=s.value,u=e[l];n(u)&&(a[l]=t(u,l,e))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return a}var z=function(e){return function(t){var n,r,i=t;try{for(var a=c(e),o=a.next();!o.done;o=a.next()){i=i[o.value]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}};function F(e){return e?G(e)?[[e]]:V(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?F(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function V(e){var t;return(t=[]).concat.apply(t,f([],d(e),!1))}function B(e){return Q(e)?e:[e]}function H(e){return void 0===e?[]:B(e)}function W(e,t,n){var r,i;if(Z(e))return e(t,n.data);var a={};try{for(var o=c(Object.keys(e)),s=o.next();!s.done;s=o.next()){var l=s.value,u=e[l];Z(u)?a[l]=u(t,n.data):a[l]=u}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return a}function $(e){return e instanceof Promise||!(null===e||!Z(e)&&"object"!=typeof e||!Z(e.then))}function q(e,t){return U(e.states,(function(e,n){if(e){var r=(G(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:q(e,r)}}}))}function Y(e,t,n,r){D||K(!!e,"Attempting to update undefined context");var i=e?n.reduce((function(e,n){var i,a,o=n.assignment,s={state:r,action:n,_event:t},l={};if(Z(o))l=o(e,t.data,s);else try{for(var u=c(Object.keys(o)),d=u.next();!d.done;d=u.next()){var f=d.value,p=o[f];l[f]=Z(p)?p(e,t.data,s):p}}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}return Object.assign({},e,l)}),e):e;return i}var K=function(){};function Q(e){return Array.isArray(e)}function Z(e){return"function"==typeof e}function G(e){return"string"==typeof e}function J(e,t){if(e)return G(e)?{type:R,name:e,predicate:t?t[e]:void 0}:Z(e)?{type:R,name:e.name,predicate:e}:e}D||(K=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var X=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();(p={})[X]=function(){return this},p[Symbol.observable]=function(){return this};function ee(e){return!!e&&"__xstatenode"in e}function te(e,t){return G(e)||"number"==typeof e?l({type:e},t):e}function ne(e,t){if(!G(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=te(e);return l({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function re(e,t){return B(t).map((function(t){return void 0===t||"string"==typeof t||ee(t)?{target:t,event:e}:l(l({},t),{event:e})}))}function ie(e,t,n,r,i){var a=e.options.guards,o={state:i,cond:t,_event:r};if(t.type===R)return((null==a?void 0:a[t.name])||t.predicate)(n,r.data,o);var s=null==a?void 0:a[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,r.data,o)}function ae(e){return"string"==typeof e?{type:e}:e}function oe(e,t,n){var r=function(){},i="object"==typeof e,a=i?e:null;return{next:((i?e.next:e)||r).bind(a),error:((i?e.error:t)||r).bind(a),complete:((i?e.complete:n)||r).bind(a)}}function se(e,t){return"".concat(e,":invocation[").concat(t,"]")}function le(e){return(e.type===g||e.type===y&&e.to===i.Internal)&&"number"!=typeof e.delay}var ue=ne({type:k});function ce(e,t){return t&&t[e]||void 0}function de(e,t){var n;if(G(e)||"number"==typeof e)n=Z(r=ce(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(Z(e))n={type:e.name||e.toString(),exec:e};else{var r;if(Z(r=ce(e.type,t)))n=l(l({},e),{exec:r});else if(r){var i=r.type||e.type;n=l(l(l({},r),e),{type:i})}else n=e}return n}var fe=function(e,t){return e?(Q(e)?e:[e]).map((function(e){return de(e,t)})):[]};function pe(e){var t=de(e);return l(l({id:G(e)?e:t.id},t),{type:t.type})}function he(e,t){return{to:t?t.to:void 0,type:y,event:Z(e)?e:te(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:Z(e)?e.name:P(e)}}function ve(e,t){var n="".concat(r.DoneState,".").concat(e),i={type:n,data:t,toString:function(){return n}};return i}function ge(e,t){var n="".concat(r.DoneInvoke,".").concat(e),i={type:n,data:t,toString:function(){return n}};return i}function ye(e,t){var n="".concat(r.ErrorPlatform,".").concat(e),i={type:n,data:t,toString:function(){return n}};return i}function me(e,t,n,a,o,s,u){void 0===u&&(u=!1);var p=u?[]:function(e){var t,n,r=[];try{for(var i=c(e),a=i.next();!a.done;a=i.next())for(var o=a.value,s=0;s<o.actions.length;)o.actions[s].type!==S?s++:(r.push(o.actions[s]),o.actions.splice(s,1))}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(o),h=p.length?Y(n,a,p,t):n,m=u?[n]:void 0,b=[];function k(o,c){var p;switch(c.type){case g:var k=function(e,t,n,r){var i,a={_event:n},o=ne(Z(e.event)?e.event(t,n.data,a):e.event);if(G(e.delay)){var s=r&&r[e.delay];i=Z(s)?s(t,n.data,a):s}else i=Z(e.delay)?e.delay(t,n.data,a):e.delay;return l(l({},e),{type:g,_event:o,delay:i})}(c,h,a,e.options.delays);return s&&"number"==typeof k.delay&&s(k,h,a),k;case y:var E=function(e,t,n,r){var i,a={_event:n},o=ne(Z(e.event)?e.event(t,n.data,a):e.event);if(G(e.delay)){var s=r&&r[e.delay];i=Z(s)?s(t,n.data,a):s}else i=Z(e.delay)?e.delay(t,n.data,a):e.delay;var u=Z(e.to)?e.to(t,n.data,a):e.to;return l(l({},e),{to:u,_event:o,event:o.data,delay:i})}(c,h,a,e.options.delays);if(!D){var x=c.delay;K(!G(x)||"number"==typeof E.delay,"No delay reference for delay expression '".concat(x,"' was found on machine '").concat(e.id,"'"))}return s&&E.to!==i.Internal&&("entry"===o?b.push(E):s(E,h,a)),E;case w:var I=function(e,t,n){return l(l({},e),{value:G(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(c,h,a);return null==s||s(I,h,a),I;case T:if(!(O=null===(p=c.conds.find((function(n){var r=J(n.cond,e.options.guards);return!r||ie(e,r,h,a,s?void 0:t)})))||void 0===p?void 0:p.actions))return[];var _=d(me(e,t,h,a,[{type:o,actions:fe(H(O),e.options.actions)}],s,u),2),N=_[0],R=_[1];return h=R,null==m||m.push(h),N;case C:var O;if(!(O=c.get(h,a.data)))return[];var P=d(me(e,t,h,a,[{type:o,actions:fe(H(O),e.options.actions)}],s,u),2),M=P[0],L=P[1];return h=L,null==m||m.push(h),M;case v:I=function(e,t,n){var i=Z(e.activity)?e.activity(t,n.data):e.activity,a="string"==typeof i?{id:i}:i;return{type:r.Stop,activity:a}}(c,h,a);return null==s||s(I,n,a),I;case S:h=Y(h,a,[c],s?void 0:t),null==m||m.push(h);break;default:var A=de(c,e.options.actions),U=A.exec;if(s)s(A,h,a);else if(U&&m){var j=m.length-1,z=l(l({},A),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];U.apply(void 0,f([m[j]],d(t),!1))}});A=z}return A}}var E=V(o.map((function(e){var t,n,r=[];try{for(var i=c(e.actions),o=i.next();!o.done;o=i.next()){var l=o.value,u=k(e.type,l);u&&(r=r.concat(u))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return b.forEach((function(e){s(e,h,a)})),b.length=0,r})));return[E,h]}var be=[],Se=function(e,t){be.push(e);var n=t(e);return be.pop(),n};function we(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[X]=function(){return this},t}function ke(e,t,n){var r=we(t);if(r.deferred=!0,ee(e)){var i=r.state=Se(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return i}}return r}var Ee=function(e){return"atomic"===e.type||"final"===e.type};function xe(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function Ie(e){return xe(e).filter((function(e){return"history"!==e.type}))}function _e(e){var t=[e];return Ee(e)?t:t.concat(V(Ie(e).map(_e)))}function Te(e,t){var n,r,i,a,o,s,l,u,d=Ne(new Set(e)),f=new Set(t);try{for(var p=c(f),h=p.next();!h.done;h=p.next())for(var v=(x=h.value).parent;v&&!f.has(v);)f.add(v),v=v.parent}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var g=Ne(f);try{for(var y=c(f),m=y.next();!m.done;m=y.next()){if("compound"!==(x=m.value).type||g.get(x)&&g.get(x).length){if("parallel"===x.type)try{for(var b=(o=void 0,c(Ie(x))),S=b.next();!S.done;S=b.next()){var w=S.value;f.has(w)||(f.add(w),d.get(w)?d.get(w).forEach((function(e){return f.add(e)})):w.initialStateNodes.forEach((function(e){return f.add(e)})))}}catch(e){o={error:e}}finally{try{S&&!S.done&&(s=b.return)&&s.call(b)}finally{if(o)throw o.error}}}else d.get(x)?d.get(x).forEach((function(e){return f.add(e)})):x.initialStateNodes.forEach((function(e){return f.add(e)}))}}catch(e){i={error:e}}finally{try{m&&!m.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}try{for(var k=c(f),E=k.next();!E.done;E=k.next()){var x;for(v=(x=E.value).parent;v&&!f.has(v);)f.add(v),v=v.parent}}catch(e){l={error:e}}finally{try{E&&!E.done&&(u=k.return)&&u.call(k)}finally{if(l)throw l.error}}return f}function Ce(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(Ee(r))return r.key}var i={};return n.forEach((function(e){i[e.key]=Ce(e,t)})),i}function Ne(e){var t,n,r=new Map;try{for(var i=c(e),a=i.next();!a.done;a=i.next()){var o=a.value;r.has(o)||r.set(o,[]),o.parent&&(r.has(o.parent)||r.set(o.parent,[]),r.get(o.parent).push(o))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function Re(e,t){return Ce(e,Ne(Te([e],t)))}function De(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function Oe(e,t){return"compound"===t.type?Ie(t).some((function(t){return"final"===t.type&&De(e,t)})):"parallel"===t.type&&Ie(t).every((function(t){return Oe(e,t)}))}function Pe(e){return new Set(V(e.map((function(e){return e.tags}))))}function Me(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(G(e)||G(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return Me(e[n],t[n])}))}function Le(e){return"object"==typeof e&&null!==e&&("value"in e&&"_event"in e)}var Ae=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=N,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||N,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return f([],d(new Set(V(f([],d(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:ue,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=ue;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),G(e))return[e];var r=Object.keys(e);return r.concat.apply(r,f([],d(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=u(e,["configuration","transitions","tags","machine"]);return l(l({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return O(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;D&&K(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),Ue={deferEvents:!1},je=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=l(l({},Ue),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),ze=new Map,Fe=0,Ve=function(){return"x:".concat(Fe++)},Be=function(e,t){return ze.set(e,t),e},He=function(e){return ze.get(e)},We=function(e){ze.delete(e)};function $e(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:void(D||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function qe(e){if($e()){var t=function(){var e=$e();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function Ye(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,i=[],a=!1,o=function(e){var t;return l(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[X]=function(){return this},t),e)}({id:t.id,send:function(t){i.push(t),function(){if(!a){for(a=!0;i.length>0;){var t=i.shift();n=e.transition(n,t,s),r.forEach((function(e){return e.next(n)}))}a=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,i){var a=oe(e,t,i);return r.add(a),a.next(n),{unsubscribe:function(){r.delete(a)}}}}),s={parent:t.parent,self:o,id:t.id||"anonymous",observers:r};return n=e.start?e.start(s):n,o}var Ke,Qe={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Ke||(Ke={}));var Ze=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var a=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Ke.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(Q(e))return a.batch(e),a.state;var n=ne(te(e,t));if(a.status===Ke.Stopped)return D||K(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(a.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),a.state;if(a.status!==Ke.Running&&!a.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(a.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return a.scheduler.schedule((function(){a.forward(n);var e=a._nextState(n);a.update(e,n)})),a._state},this.sendTo=function(e,t,n){var r,o=a.parent&&(t===i.Parent||a.parent.id===t),s=o?a.parent:G(t)?t===i.Internal?a:a.children.get(t)||He(t):(r=t)&&"function"==typeof r.send?t:void 0;if(s)if("machine"in s){if(a.status!==Ke.Stopped||a.parent!==s||a.state.done){var u=l(l({},e),{name:e.name===I?"".concat(ye(a.id)):e.name,origin:a.sessionId});!n&&a.machine.config.predictableActionArguments?a._outgoingQueue.push([s,u]):s.send(u)}}else!n&&a.machine.config.predictableActionArguments?a._outgoingQueue.push([s,e.data]):s.send(e.data);else{if(!o)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(a.id,"'."));D||K(!1,"Service '".concat(a.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,i){void 0===i&&(i=a.machine.options.actions);var o=e.exec||ce(e.type,i),s=Z(o)?o:o?o.exec:e.exec;if(s)try{return s(t,n.data,a.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:a.state,_event:n})}catch(e){throw a.parent&&a.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case g:var l=e;a.defer(l);break;case y:var u=e;if("number"==typeof u.delay)return void a.defer(u);u.to?a.sendTo(u._event,u.to,n===ue):a.send(u._event);break;case m:a.cancel(e.sendId);break;case h:if(a.status!==Ke.Running)return;var c=e.activity;if(!a.machine.config.predictableActionArguments&&!a.state.activities[c.id||c.type])break;if(c.type===r.Invoke){var d=ae(c.src),f=a.machine.options.services?a.machine.options.services[d.type]:void 0,p=c.id,b=c.data;D||K(!("forward"in c),"`forward` property is deprecated (found in invocation of '".concat(c.src,"' in in machine '").concat(a.machine.id,"'). ")+"Please use `autoForward` instead.");var S="autoForward"in c?c.autoForward:!!c.forward;if(!f)return void(D||K(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(a.machine.id,"'.")));var k=b?W(b,t,n):void 0;if("string"==typeof f)return;var E=Z(f)?f(t,n.data,{data:k,src:d,meta:c.meta}):f;if(!E)return;var x=void 0;ee(E)&&(E=k?E.withContext(k):E,x={autoForward:S}),a.spawn(E,p,x)}else a.spawnActivity(c);break;case v:a.stopChild(e.activity.id);break;case w:var I=e,_=I.label,T=I.value;_?a.logger(_,T):a.logger(T);break;default:D||K(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=l(l({},e.defaultOptions),n),s=o.clock,u=o.logger,c=o.parent,d=o.id,f=void 0!==d?d:t.id;this.id=f,this.logger=u,this.clock=s,this.parent=c,this.options=o,this.scheduler=new je({deferEvents:this.options.deferEvents}),this.sessionId=Ve()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Se(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return D||K(this.status!==Ke.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var i=c(e.actions),a=i.next();!a.done;a=i.next()){var o=a.value;this.exec(o,e,t)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,i,a,o,s,l,u,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==ue||!this.options.execute)for(var f=void 0;f=this._outgoingQueue.shift();)f[0].send(f[1]);else this.execute(this.state);if(this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var p=c(this.eventListeners),h=p.next();!h.done;h=p.next()){(0,h.value)(e.event)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var v=c(this.listeners),g=v.next();!g.done;g=v.next()){(0,g.value)(e,e.event)}}catch(e){i={error:e}}finally{try{g&&!g.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}try{for(var y=c(this.contextListeners),m=y.next();!m.done;m=y.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(s=y.return)&&s.call(y)}finally{if(o)throw o.error}}if(this.state.done){var b=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),S=b&&b.doneData?W(b.doneData,e.context,t):void 0;this._doneEvent=ge(this.id,S);try{for(var w=c(this.doneListeners),k=w.next();!k.done;k=w.next()){(0,k.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{k&&!k.done&&(u=w.return)&&u.call(w)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),We(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Ke.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,i=oe(e,t,n);this.listeners.add(i.next),this.status!==Ke.NotStarted&&i.next(this.state);var a=function(){r.doneListeners.delete(a),r.stopListeners.delete(a),i.complete()};return this.status===Ke.Stopped?i.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){r.listeners.delete(i.next),r.doneListeners.delete(a),r.stopListeners.delete(a)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===Ke.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===Ke.Running)return this;this.machine._init(),Be(this.sessionId,this),this.initialized=!0,this.status=Ke.Running;var n=void 0===e?this.initialState:Se(this,(function(){return Le(e)?t.machine.resolveState(e):t.machine.resolveState(Ae.from(e,t.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,ue)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){Z(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,i,a,o,s,l,u;try{for(var d=c(this.listeners),f=d.next();!f.done;f=d.next()){var p=f.value;this.listeners.delete(p)}}catch(t){e={error:t}}finally{try{f&&!f.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var h=c(this.stopListeners),v=h.next();!v.done;v=h.next()){(p=v.value)(),this.stopListeners.delete(p)}}catch(e){n={error:e}}finally{try{v&&!v.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var g=c(this.contextListeners),y=g.next();!y.done;y=g.next()){p=y.value;this.contextListeners.delete(p)}}catch(e){i={error:e}}finally{try{y&&!y.done&&(a=g.return)&&a.call(g)}finally{if(i)throw i.error}}try{for(var m=c(this.doneListeners),b=m.next();!b.done;b=m.next()){p=b.value;this.doneListeners.delete(p)}}catch(e){o={error:e}}finally{try{b&&!b.done&&(s=m.return)&&s.call(m)}finally{if(o)throw o.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Ke.Stopped,this._initialState=void 0;try{for(var S=c(Object.keys(this.delayedEventsMap)),w=S.next();!w.done;w=S.next()){var k=w.value;this.clock.clearTimeout(this.delayedEventsMap[k])}}catch(e){l={error:e}}finally{try{w&&!w.done&&(u=S.return)&&u.call(S)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new je({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=ne({type:"xstate.stop"}),r=Se(e,(function(){var t=V(f([],d(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return fe(t.onExit,e.machine.options.actions)}))),r=d(me(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),i=r[0],a=r[1],o=new Ae({value:e.state.value,context:a,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:i.filter((function(e){return!le(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return o.changed=!0,o}));e.update(r,n),e._stopChildren(),We(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===Ke.NotStarted&&this.options.deferEvents)D||K(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==Ke.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var r,i,a=t.state,o=!1,s=[],u=function(e){var r=ne(e);t.forward(r),a=Se(t,(function(){return t.machine.transition(a,r,void 0,n||void 0)})),s.push.apply(s,f([],d(t.machine.config.predictableActionArguments?a.actions:a.actions.map((function(e){return function(e,t){var n=e.exec;return l(l({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,a)}))),!1)),o=o||!!a.changed};try{for(var p=c(e),h=p.next();!h.done;h=p.next()){u(h.value)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(r)throw r.error}}a.changed=o,a.actions=s,t.update(a,ne(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=ne(e);if(0===r.name.indexOf(x)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(x)})))throw r.data.data;return Se(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var r=c(this.forwardTo),i=r.next();!i.done;i=r.next()){var a=i.value,o=this.children.get(a);if(!o)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));o.send(e)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),Z(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==Ke.Running)return ke(e,t);if($(e))return this.spawnPromise(Promise.resolve(e),t);if(Z(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(i=e)&&"id"in i)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&Z(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(ee(e))return this.spawnMachine(e,l(l({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,i},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var i=new e(t,l(l({},this.options),{parent:this,id:n.id||t.id})),a=l(l({},Qe),n);a.sync&&i.onTransition((function(e){r.send(_,{state:e,id:i.id})}));var o=i;return this.children.set(i.id,o),a.autoForward&&this.forwardTo.add(i.id),i.onDone((function(e){r.removeChild(i.id),r.send(ne(e,{origin:i.id}))})).start(),o},e.prototype.spawnBehavior=function(e,t){var n=Ye(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,i=this,a=!1;e.then((function(e){a||(r=e,i.removeChild(t),i.send(ne(ge(t,e),{origin:t})))}),(function(e){if(!a){i.removeChild(t);var n=ye(t,e);try{i.send(ne(n,{origin:t}))}catch(r){!function(e,t,n){if(!D){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var i=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(i))}}}(e,r,t),i.devTools&&i.devTools.send(n,i.state),i.machine.strict&&i.stop()}}}));var o=((n={id:t,send:function(){},subscribe:function(t,n,r){var i=oe(t,n,r),a=!1;return e.then((function(e){a||(i.next(e),a||i.complete())}),(function(e){a||i.error(e)})),{unsubscribe:function(){return a=!0}}},stop:function(){a=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[X]=function(){return this},n);return this.children.set(t,o),o},e.prototype.spawnCallback=function(e,t){var n,r,i,a=this,o=!1,s=new Set,l=new Set;try{i=e((function(e){r=e,l.forEach((function(t){return t(e)})),o||a.send(ne(e,{origin:t}))}),(function(e){s.add(e)}))}catch(e){this.send(ye(t,e))}if($(i))return this.spawnPromise(i,t);var u=((n={id:t,send:function(e){return s.forEach((function(t){return t(e)}))},subscribe:function(e){var t=oe(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){o=!0,Z(i)&&i()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[X]=function(){return this},n);return this.children.set(t,u),u},e.prototype.spawnObservable=function(e,t){var n,r,i=this,a=e.subscribe((function(e){r=e,i.send(ne(e,{origin:t}))}),(function(e){i.removeChild(t),i.send(ne(ye(t,e),{origin:t}))}),(function(){i.removeChild(t),i.send(ne(ge(t),{origin:t}))})),o=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[X]=function(){return this},n);return this.children.set(t,o),o},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else D||K(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[X]=function(){return this},n))},e.prototype.attachDev=function(){var e=$e();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(l(l({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:l({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}qe(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[X]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Ke.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=Ge,e}();function Ge(e,t){return new Ze(e,t)}function Je(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function Xe(e){return l(l({type:E},e),{toJSON:function(){e.onDone,e.onError;var t=u(e,["onDone","onError"]);return l(l({},t),{type:E,src:Je(e.src)})}})}var et="",tt="*",nt={},rt=function(e){return"#"===e[0]},it=function(){function e(t,n,r,i){void 0===r&&(r="context"in t?t.context:void 0);var a,o=this;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==i?void 0:i.parent,this.key=this.config.key||(null==i?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||f([this.machine.key],d(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(a=this.config.schema)&&void 0!==a?a:{},this.description=this.config.description,D||K(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?U(this.config.states,(function(t,n){var r,i=new e(t,{},void 0,{parent:o,key:n});return Object.assign(o.idMap,l(((r={})[i.id]=i,r),i.idMap)),i})):nt;var s=0;!function e(t){var n,r;t.order=s++;try{for(var i=c(xe(t)),a=i.next();!a.done;a=i.next()){e(a.value)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===et})):et in this.config.on),this.strict=!!this.config.strict,this.onEntry=H(this.config.entry||this.config.onEntry).map((function(e){return de(e)})),this.onExit=H(this.config.exit||this.config.onExit).map((function(e){return de(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=H(this.config.invoke).map((function(e,t){var n,r;if(ee(e)){var i=se(o.id,t);return o.machine.options.services=l(((n={})[i]=e,n),o.machine.options.services),Xe({src:i,id:i})}if(G(e.src)){i=e.id||se(o.id,t);return Xe(l(l({},e),{id:i,src:e.src}))}if(ee(e.src)||Z(e.src)){i=e.id||se(o.id,t);return o.machine.options.services=l(((r={})[i]=e.src,r),o.machine.options.services),Xe(l(l({id:i},e),{src:i}))}var a=e.src;return Xe(l(l({id:se(o.id,t)},e),{src:a}))})),this.activities=H(this.config.activities).concat(this.invoke).map((function(e){return pe(e)})),this.transition=this.transition.bind(this),this.tags=H(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||_e(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,i=r.actions,a=r.activities,o=r.guards,s=r.services,u=r.delays;return new e(this.config,{actions:l(l({},i),t.actions),activities:l(l({},a),t.activities),guards:l(l({},o),t.guards),services:l(l({},s),t.services),delays:l(l({},u),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return Z(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:U(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===et,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===tt}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var i=function(e,t){var n=t?"#".concat(t):"";return"".concat(r.After,"(").concat(e,")").concat(n)}(Z(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(he(i,{delay:t})),e.onExit.push({type:m,sendId:i}),i};return(Q(t)?t.map((function(e,t){var r=n(e.delay,t);return l(l({},e),{event:r})})):V(Object.keys(t).map((function(e,r){var i=t[e],a=G(i)?{target:i}:i,o=isNaN(+e)?e:+e,s=n(o,r);return H(a).map((function(e){return l(l({},e),{event:s,delay:o})}))})))).map((function(t){var n=t.delay;return l(l({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof Ae?e.value:L(e,this.delimiter);if(G(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((t={})[r]=i,t)):[this,this.states[r]]}var a=Object.keys(r),o=[this];return o.push.apply(o,f([],d(V(a.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),o},e.prototype.handles=function(e){var t=P(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof Ae?e:Ae.create(e),n=Array.from(Te([],this.getStateNodes(t.value)));return new Ae(l(l({},t),{value:this.resolve(t.value),configuration:n,done:Oe(n,this),tags:Pe(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),i=this.getStateNode(r[0])._transition(e[r[0]],t,n);return i&&i.transitions.length?i:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,i,a={};try{for(var o=c(Object.keys(e)),s=o.next();!s.done;s=o.next()){var l=s.value,u=e[l];if(u){var d=this.getStateNode(l)._transition(u,t,n);d&&(a[l]=d)}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}var f=Object.keys(a).map((function(e){return a[e]})),p=V(f.map((function(e){return e.transitions})));if(!f.some((function(e){return e.transitions.length>0})))return this.next(t,n);var h=V(Object.keys(a).map((function(e){return a[e].configuration})));return{transitions:p,exitSet:V(f.map((function(e){return e.exitSet}))),configuration:h,source:t,actions:V(Object.keys(a).map((function(e){return a[e].actions})))}},e.prototype._transition=function(e,t,n){return G(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,ne(t))},e.prototype.next=function(e,t){var n,r,i,a=this,o=t.name,s=[],l=[];try{for(var u=c(this.getCandidates(o)),p=u.next();!p.done;p=u.next()){var h=p.value,v=h.cond,g=h.in,y=e.context,m=!g||(G(g)&&rt(g)?e.matches(L(this.getStateNodeById(g).path,this.delimiter)):O(L(g,this.delimiter),z(this.path.slice(0,-2))(e.value))),b=!1;try{b=!v||ie(this.machine,v,y,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(o,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(b&&m){void 0!==h.target&&(l=h.target),s.push.apply(s,f([],d(h.actions),!1)),i=h;break}}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}if(i){if(!l.length)return{transitions:[i],exitSet:[],configuration:e.value?[this]:[],source:e,actions:s};var S=V(l.map((function(t){return a.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[i],exitSet:!!i.internal?[]:V(l.map((function(e){return a.getPotentiallyReenteringNodes(e)}))),configuration:S,source:e,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,i,a,o,s){var l,u,p,h,v=this,y=o?Te([],this.getStateNodes(o.value)):[],m=new Set;try{for(var b=c(Array.from(e).sort((function(e,t){return e.order-t.order}))),S=b.next();!S.done;S=b.next()){(!De(y,E=S.value)||De(n.exitSet,E)||E.parent&&m.has(E.parent))&&m.add(E)}}catch(e){l={error:e}}finally{try{S&&!S.done&&(u=b.return)&&u.call(b)}finally{if(l)throw l.error}}try{for(var w=c(y),k=w.next();!k.done;k=w.next()){var E;De(e,E=k.value)&&!De(n.exitSet,E.parent)||n.exitSet.push(E)}}catch(e){p={error:e}}finally{try{k&&!k.done&&(h=w.return)&&h.call(w)}finally{if(p)throw p.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var x=Array.from(m).sort((function(e,t){return e.order-t.order})),I=new Set(n.exitSet),_=V(x.map((function(e){var t=[];if("final"!==e.type)return t;var r=e.parent;if(!r.parent)return t;t.push(ve(e.id,e.doneData),ve(r.id,e.doneData?W(e.doneData,i,a):void 0));var o=r.parent;return"parallel"===o.type&&Ie(o).every((function(e){return Oe(n.configuration,e)}))&&t.push(ve(o.id)),t}))),T=x.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=pe(e);return{type:r.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:fe(s?f(f([],d(t),!1),d(n),!1):f(f([],d(n),!1),d(t),!1),v.machine.options.actions)}})).concat({type:"state_done",actions:_.map((function(e){return function(e,t){return{type:g,event:"function"==typeof e?e:te(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),C=Array.from(I).map((function(e){return{type:"exit",actions:fe(f(f([],d(e.onExit),!1),d(e.activities.map((function(e){return function(e){var t=Z(e)?e:pe(e);return{type:r.Stop,activity:t,exec:void 0}}(e)}))),!1),v.machine.options.actions)}})).concat({type:"transition",actions:fe(n.actions,this.machine.options.actions)}).concat(T);if(t){var N=fe(V(f([],d(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!le(e)}));return C.concat({type:"stop",actions:N})}return C},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var i,a,o=ne(t);if(e instanceof Ae)i=void 0===n?e:this.resolveState(Ae.from(e,n));else{var s=G(e)?this.resolve(A(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;i=this.resolveState(Ae.from(s,l))}if(!D&&o.name===tt)throw new Error("An event cannot have the wildcard type ('".concat(tt,"')"));if(this.strict&&!this.events.includes(o.name)&&(a=o.name,!/^(done|error)\./.test(a)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var u=this._transition(i.value,i,o)||{transitions:[],configuration:[],exitSet:[],source:i,actions:[]},c=Te([],this.getStateNodes(i.value)),p=u.configuration.length?Te(c,u.configuration):c;return u.configuration=f([],d(p),!1),this.resolveTransition(u,i,i.context,r,o)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var i,a=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(i=e.actions).unshift.apply(i,f([],d(a),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,i){var a,o,s,u,f=this;void 0===i&&(i=ue);var p=e.configuration,g=!t||e.transitions.length>0,y=g?e.configuration:t?t.configuration:[],m=Oe(y,this),S=g?Re(this.machine,p):void 0,w=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,k=this.getActions(new Set(y),m,e,n,i,t,r),x=t?l({},t.activities):{};try{for(var I=c(k),T=I.next();!T.done;T=I.next()){var C=T.value;try{for(var N=(s=void 0,c(C.actions)),R=N.next();!R.done;R=N.next()){var D=R.value;D.type===h?x[D.activity.id||D.activity.type]=D:D.type===v&&(x[D.activity.id||D.activity.type]=!1)}}catch(e){s={error:e}}finally{try{R&&!R.done&&(u=N.return)&&u.call(N)}finally{if(s)throw s.error}}}}catch(e){a={error:e}}finally{try{T&&!T.done&&(o=I.return)&&o.call(I)}finally{if(a)throw a.error}}var O,P,M=d(me(this,t,n,i,k,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),L=M[0],A=M[1],U=d(function(e,t){var n,r,i=d([[],[]],2),a=i[0],o=i[1];try{for(var s=c(e),l=s.next();!l.done;l=s.next()){var u=l.value;t(u)?a.push(u):o.push(u)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[a,o]}(L,le),2),j=U[0],z=U[1],F=L.filter((function(e){var t;return e.type===h&&(null===(t=e.activity)||void 0===t?void 0:t.type)===E})),V=F.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var i,a=ae(e.src),o=null===(i=null==t?void 0:t.options.services)||void 0===i?void 0:i[a.type],s=e.data?W(e.data,n,r):void 0,l=o?ke(o,e.id,s):we(e.id);return l.meta=e,l}(t.activity,f.machine,A,i),e}),t?l({},t.children):{}),B=new Ae({value:S||t.value,context:A,_event:i,_sessionid:t?t._sessionid:null,historyValue:S?w?(O=w,P=S,{current:P,states:q(O,P)}):void 0:t?t.historyValue:void 0,history:!S||e.source?t:void 0,actions:S?z:[],activities:S?x:t?t.activities:{},events:[],configuration:y,transitions:e.transitions,children:V,done:m,tags:Pe(y),machine:this}),H=n!==A;B.changed=i.name===_||H;var $=B.history;$&&delete $.history;var Y=!m&&(this._transient||p.some((function(e){return e._transient})));if(!(g||Y&&i.name!==et))return B;var K=B;if(!m)for(Y&&(K=this.resolveRaisedTransition(K,{type:b},i,r));j.length;){var Q=j.shift();K=this.resolveRaisedTransition(K,Q._event,i,r)}var Z=K.changed||($?!!K.actions.length||H||typeof $.value!=typeof K.value||!Me(K.value,$.value):void 0);return K.changed=Z,K.history=$,K},e.prototype.getStateNode=function(e){if(rt(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=rt(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&rt(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=M(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||nt;switch(this.type){case"parallel":return U(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):nt}));case"compound":if(G(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?U(e,(function(e,t){return e?n.getStateNode(t).resolve(e):nt})):this.initialStateValue||{};default:return e||nt}},e.prototype.getResolvedPath=function(e){if(rt(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return M(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=j(this.states,(function(e){return e.initialStateValue||nt}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=Ee(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=G(t.target)&&rt(t.target)?A(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return Ee(this)?[this]:"compound"!==this.type||this.initial?V(F(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(D||K(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this])},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=d(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var i=this.getStateNode(n);if("history"===i.type)return i.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:j(this.states,(function(t,n){if(!e)return t.historyValue();var r=G(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?V(F(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var i,a,o=(i=n.path,a="states",function(e){var t,n,r=e;try{for(var o=c(i),s=o.next();!s.done;s=o.next()){var l=s.value;r=r[a][l]}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r})(e).current;return G(o)?[n.getStateNode(o)]:V(F(o).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=V(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var i=this.states,a=new Set(this.ownEvents);if(i)try{for(var o=c(Object.keys(i)),s=o.next();!s.done;s=o.next()){var l=i[s.value];if(l.states)try{for(var u=(n=void 0,c(l.events)),d=u.next();!d.done;d=u.next()){var f=d.value;a.add("".concat(f))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!G(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return H(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return G(e)&&e[0]===t.delimiter})),i=this.machine.options.guards,a=this.resolveTarget(n),o=l(l({},e),{actions:fe(H(e.actions)),cond:J(e.cond,i),target:a,source:this,internal:r,eventType:e.event,toJSON:function(){return l(l({},o),{target:o.target?o.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return o},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var i=this.config.on,a=tt,o=i[a],s=void 0===o?[]:o,l=u(i,["*"]);n=V(Object.keys(l).map((function(e){D||e!==et||K(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var t=re(e,l[e]);return D||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(G(e.target)||ee(e.target))})),i=t===et?"the transient event":"event '".concat(t,"'");K(!r,"One or more transitions for ".concat(i," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(re(tt,s)))}else n=[];var p=this.config.always?re("",this.config.always):[],h=this.config.onDone?re(String(ve(this.id)),this.config.onDone):[];D||K(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var v=V(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,f([],d(re(String(ge(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,f([],d(re(String(ye(e.id)),e.onError)),!1)),t}))),g=this.after,y=V(f(f(f(f([],d(h),!1),d(v),!1),d(n),!1),d(p),!1).map((function(e){return H(e).map((function(e){return r.formatTransition(e)}))})));try{for(var m=c(g),b=m.next();!b.done;b=m.next()){var S=b.value;y.push(S)}}catch(t){e={error:t}}finally{try{b&&!b.done&&(t=m.return)&&t.call(m)}finally{if(e)throw e.error}}return y},e}();var at=function(e){return{type:S,assignment:e}},ot=n(901);const st=a.useLayoutEffect;function lt(e){var t=a.useRef();return t.current||(t.current={v:e()}),t.current.v}var ut=function(){return ut=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ut.apply(this,arguments)},ct=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function dt(e,t){var n=lt((function(){return"function"==typeof e?e():e})),r=t.context,i=t.guards,a=t.actions,o=t.activities,s=t.services,l=t.delays,u=(t.state,ct(t,["context","guards","actions","activities","services","delays","state"])),c=lt((function(){var e={context:r,guards:i,actions:a,activities:o,services:s,delays:l};return Ge(n.withConfig(e,(function(){return ut(ut({},n.context),r)})),u)}));return st((function(){Object.assign(c.machine.options.actions,a),Object.assign(c.machine.options.guards,i),Object.assign(c.machine.options.activities,o),Object.assign(c.machine.options.services,s),Object.assign(c.machine.options.delays,l)}),[a,i,o,s,l]),c}var ft=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};function pt(e){return e}function ht(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=ft(t,1)[0],i=void 0===r?{}:r,o=dt(e,i),s=(0,a.useCallback)((function(){return o.status===Ke.NotStarted?i.state?Ae.create(i.state):o.machine.initialState:o.getSnapshot()}),[o]),l=(0,a.useCallback)((function(e,t){return function(e,t,n){if(e.status===Ke.NotStarted)return!0;var r=void 0===n.changed&&(Object.keys(n.children).length>0||"boolean"==typeof t.changed);return!(n.changed||r)}(o,e,t)}),[o]),u=(0,a.useCallback)((function(e){return o.subscribe(e).unsubscribe}),[o]),c=(0,ot.useSyncExternalStoreWithSelector)(u,s,s,pt,l);return(0,a.useEffect)((function(){var e=i.state;return o.start(e?Ae.create(e):void 0),function(){o.stop(),o.status=Ke.NotStarted}}),[]),[c,o.send,o]}var vt=n(369);const gt={NO_NEVER:-1,CANCEL:0,CREATE_REPORT:1,ADD_SERIES:2,SET_STUDY_AND_SERIES:3,NO_NOT_FOR_SERIES:4,HYDRATE_REPORT:5},yt={id:"measurementTracking",initial:"idle",context:{activeViewportId:null,trackedStudy:"",trackedSeries:[],ignoredSeries:[],prevTrackedStudy:"",prevTrackedSeries:[],prevIgnoredSeries:[],ignoredSRSeriesForHydration:[],isDirty:!1},states:{off:{type:"final"},labellingOnly:{on:{TRACK_SERIES:[{target:"promptLabelAnnotation",actions:["setPreviousState"]},{target:"off"}]}},idle:{entry:"clearContext",on:{TRACK_SERIES:[{target:"promptLabelAnnotation",cond:"isLabelOnMeasure",actions:["setPreviousState"]},{target:"promptBeginTracking",actions:["setPreviousState"]}],SET_TRACKED_SERIES:[{target:"tracking",actions:["setTrackedStudyAndMultipleSeries","setIsDirtyToClean"]}],PROMPT_HYDRATE_SR:{target:"promptHydrateStructuredReport",cond:"hasNotIgnoredSRSeriesForHydration"},RESTORE_PROMPT_HYDRATE_SR:"promptHydrateStructuredReport",HYDRATE_SR:"hydrateStructuredReport",UPDATE_ACTIVE_VIEWPORT_ID:{actions:at({activeViewportId:(e,t)=>t.activeViewportId})}}},promptBeginTracking:{invoke:{src:"promptBeginTracking",onDone:[{target:"tracking",actions:["setTrackedStudyAndSeries","setIsDirty"],cond:"shouldSetStudyAndSeries"},{target:"labellingOnly",cond:"isLabelOnMeasureAndShouldKillMachine"},{target:"off",cond:"shouldKillMachine"},{target:"idle"}],onError:{target:"idle"}}},tracking:{on:{TRACK_SERIES:[{target:"promptLabelAnnotation",cond:"isLabelOnMeasure",actions:["setPreviousState"]},{target:"promptTrackNewStudy",cond:"isNewStudy"},{target:"promptTrackNewSeries",cond:"isNewSeries"}],UNTRACK_SERIES:[{target:"tracking",actions:["removeTrackedSeries","setIsDirty"],cond:"hasRemainingTrackedSeries"},{target:"idle"}],SET_TRACKED_SERIES:[{target:"tracking",actions:["setTrackedStudyAndMultipleSeries"]}],SAVE_REPORT:"promptSaveReport",SET_DIRTY:[{target:"tracking",actions:["setIsDirty"],cond:"shouldSetDirty"},{target:"tracking"}]}},promptTrackNewSeries:{invoke:{src:"promptTrackNewSeries",onDone:[{target:"tracking",actions:["addTrackedSeries","setIsDirty"],cond:"shouldAddSeries"},{target:"tracking",actions:["discardPreviouslyTrackedMeasurements","setTrackedStudyAndSeries","setIsDirty"],cond:"shouldSetStudyAndSeries"},{target:"promptSaveReport",cond:"shouldPromptSaveReport"},{target:"tracking"}],onError:{target:"idle"}}},promptTrackNewStudy:{invoke:{src:"promptTrackNewStudy",onDone:[{target:"tracking",actions:["discardPreviouslyTrackedMeasurements","setTrackedStudyAndSeries","setIsDirty"],cond:"shouldSetStudyAndSeries"},{target:"tracking",actions:["ignoreSeries"],cond:"shouldAddIgnoredSeries"},{target:"promptSaveReport",cond:"shouldPromptSaveReport"},{target:"tracking"}],onError:{target:"idle"}}},promptSaveReport:{invoke:{src:"promptSaveReport",onDone:[{target:"idle",actions:["clearAllMeasurements","showStructuredReportDisplaySetInActiveViewport"],cond:"shouldSaveAndContinueWithSameReport"},{target:"tracking",actions:["discardPreviouslyTrackedMeasurements","setTrackedStudyAndSeries"],cond:"shouldSaveAndStartNewReport"},{target:"tracking"}],onError:{target:"idle"}}},promptHydrateStructuredReport:{invoke:{src:"promptHydrateStructuredReport",onDone:[{target:"tracking",actions:["setTrackedStudyAndMultipleSeries","jumpToSameImageInActiveViewport","setIsDirtyToClean"],cond:"shouldHydrateStructuredReport"},{target:"idle",actions:["ignoreHydrationForSRSeries"],cond:"shouldIgnoreHydrationForSR"}],onError:{target:"idle"}}},hydrateStructuredReport:{invoke:{src:"hydrateStructuredReport",onDone:[{target:"tracking",actions:["setTrackedStudyAndMultipleSeries","jumpToSameImageInActiveViewport","setIsDirtyToClean"]}],onError:{target:"idle"}}},promptLabelAnnotation:{invoke:{src:"promptLabelAnnotation",onDone:[{target:"labellingOnly",cond:"wasLabellingOnly"},{target:"promptBeginTracking",cond:"wasIdle"},{target:"promptTrackNewStudy",cond:"wasTrackingAndIsNewStudy"},{target:"promptTrackNewSeries",cond:"wasTrackingAndIsNewSeries"},{target:"tracking",cond:"wasTracking"},{target:"off"}]}}},strict:!0},mt={services:{promptBeginTracking:(e,t)=>{},promptTrackNewStudy:(e,t)=>{},promptTrackNewSeries:(e,t)=>{}},actions:{discardPreviouslyTrackedMeasurements:(e,t)=>{console.log("discardPreviouslyTrackedMeasurements: not implemented")},clearAllMeasurements:(e,t)=>{console.log("clearAllMeasurements: not implemented")},jumpToFirstMeasurementInActiveViewport:(e,t)=>{console.warn("jumpToFirstMeasurementInActiveViewport: not implemented")},showStructuredReportDisplaySetInActiveViewport:(e,t)=>{console.warn("showStructuredReportDisplaySetInActiveViewport: not implemented")},clearContext:at({trackedStudy:"",trackedSeries:[],ignoredSeries:[],prevTrackedStudy:"",prevTrackedSeries:[],prevIgnoredSeries:[]}),setTrackedStudyAndSeries:at(((e,t)=>({prevTrackedStudy:e.trackedStudy,prevTrackedSeries:e.trackedSeries.slice(),prevIgnoredSeries:e.ignoredSeries.slice(),trackedStudy:t.data.StudyInstanceUID,trackedSeries:[t.data.SeriesInstanceUID],ignoredSeries:[]}))),setTrackedStudyAndMultipleSeries:at(((e,t)=>{const n=t.StudyInstanceUID||t.data.StudyInstanceUID,r=t.SeriesInstanceUIDs||t.data.SeriesInstanceUIDs;return{prevTrackedStudy:e.trackedStudy,prevTrackedSeries:e.trackedSeries.slice(),prevIgnoredSeries:e.ignoredSeries.slice(),trackedStudy:n,trackedSeries:[...e.trackedSeries,...r],ignoredSeries:[]}})),setIsDirtyToClean:at(((e,t)=>({isDirty:!1}))),setIsDirty:at(((e,t)=>({isDirty:!0}))),ignoreSeries:at(((e,t)=>({prevIgnoredSeries:[...e.ignoredSeries],ignoredSeries:[...e.ignoredSeries,t.data.SeriesInstanceUID]}))),ignoreHydrationForSRSeries:at(((e,t)=>({ignoredSRSeriesForHydration:[...e.ignoredSRSeriesForHydration,t.data.srSeriesInstanceUID]}))),addTrackedSeries:at(((e,t)=>({prevTrackedSeries:[...e.trackedSeries],trackedSeries:[...e.trackedSeries,t.data.SeriesInstanceUID]}))),removeTrackedSeries:at(((e,t)=>({prevTrackedSeries:e.trackedSeries.slice().filter((e=>e!==t.SeriesInstanceUID)),trackedSeries:e.trackedSeries.slice().filter((e=>e!==t.SeriesInstanceUID))}))),setPreviousState:at(((e,t,n)=>({prevState:n.state.value})))},guards:{shouldSetDirty:(e,t)=>void 0===t.SeriesInstanceUID||e.trackedSeries.includes(t.SeriesInstanceUID),wasLabellingOnly:(e,t,n)=>"labellingOnly"===e.prevState,wasIdle:(e,t,n)=>"idle"===e.prevState,wasTracking:(e,t,n)=>"tracking"===e.prevState,wasTrackingAndIsNewStudy:(e,t,n)=>"tracking"===e.prevState&&!e.ignoredSeries.includes(t.data.SeriesInstanceUID)&&e.trackedStudy!==t.data.StudyInstanceUID,wasTrackingAndIsNewSeries:(e,t,n)=>"tracking"===e.prevState&&!e.ignoredSeries.includes(t.data.SeriesInstanceUID)&&!e.trackedSeries.includes(t.data.SeriesInstanceUID),shouldKillMachine:(e,t)=>t.data&&t.data.userResponse===gt.NO_NEVER,shouldAddSeries:(e,t)=>t.data&&t.data.userResponse===gt.ADD_SERIES,shouldSetStudyAndSeries:(e,t)=>t.data&&t.data.userResponse===gt.SET_STUDY_AND_SERIES,shouldAddIgnoredSeries:(e,t)=>t.data&&t.data.userResponse===gt.NO_NOT_FOR_SERIES,shouldPromptSaveReport:(e,t)=>t.data&&t.data.userResponse===gt.CREATE_REPORT,shouldIgnoreHydrationForSR:(e,t)=>t.data&&t.data.userResponse===gt.CANCEL,shouldSaveAndContinueWithSameReport:(e,t)=>t.data&&t.data.userResponse===gt.CREATE_REPORT&&!0===t.data.isBackupSave,shouldSaveAndStartNewReport:(e,t)=>t.data&&t.data.userResponse===gt.CREATE_REPORT&&!1===t.data.isBackupSave,shouldHydrateStructuredReport:(e,t)=>t.data&&t.data.userResponse===gt.HYDRATE_REPORT,hasRemainingTrackedSeries:(e,t)=>e.trackedSeries.length>1||!e.trackedSeries.includes(t.SeriesInstanceUID),hasNotIgnoredSRSeriesForHydration:(e,t)=>!e.ignoredSRSeriesForHydration.includes(t.SeriesInstanceUID),isNewStudy:(e,t)=>!e.ignoredSeries.includes(t.SeriesInstanceUID)&&e.trackedStudy!==t.StudyInstanceUID,isNewSeries:(e,t)=>!e.ignoredSeries.includes(t.SeriesInstanceUID)&&!e.trackedSeries.includes(t.SeriesInstanceUID)}};var bt=n(795);const St={NO_NEVER:-1,CANCEL:0,CREATE_REPORT:1,ADD_SERIES:2,SET_STUDY_AND_SERIES:3};const wt=function({servicesManager:e,extensionManager:t},n,r){const{uiViewportDialogService:i}=e.services,a=t._appConfig,{viewportId:o,StudyInstanceUID:s,SeriesInstanceUID:l}=r.data||r;return new Promise((async function(e,t){let n=a?.disableConfirmationPrompts?St.SET_STUDY_AND_SERIES:await function(e,t){return new Promise((function(n,r){const i=bt.Z.t("MeasurementTable:Track measurements for this series?"),a=[{id:"prompt-begin-tracking-cancel",type:vt.ButtonEnums.type.secondary,text:bt.Z.t("Common:No"),value:St.CANCEL},{id:"prompt-begin-tracking-no-do-not-ask-again",type:vt.ButtonEnums.type.secondary,text:bt.Z.t("MeasurementTable:No, do not ask again"),value:St.NO_NEVER},{id:"prompt-begin-tracking-yes",type:vt.ButtonEnums.type.primary,text:bt.Z.t("Common:Yes"),value:St.SET_STUDY_AND_SERIES}],o=t=>{e.hide(),n(t)};e.show({viewportId:t,id:"measurement-tracking-prompt-begin-tracking",type:"info",message:i,actions:a,onSubmit:o,onOutsideClick:()=>{e.hide(),n(St.CANCEL)},onKeyPress:e=>{if("Enter"===e.key){const e=a.find((e=>"prompt-begin-tracking-yes"===e.id));o(e.value)}}})}))}(i,o);e({userResponse:n,StudyInstanceUID:s,SeriesInstanceUID:l,viewportId:o})}))},kt={NO_NEVER:-1,CANCEL:0,CREATE_REPORT:1,ADD_SERIES:2,SET_STUDY_AND_SERIES:3,NO_NOT_FOR_SERIES:4};const Et=function({servicesManager:e,extensionManager:t},n,r){const{UIViewportDialogService:i}=e.services,{viewportId:a,StudyInstanceUID:o,SeriesInstanceUID:s}=r.data||r;return new Promise((async function(e,t){let r=await function(e,t){return new Promise((function(n,r){const i="Do you want to add this measurement to the existing report?",a=[{type:vt.ButtonEnums.type.secondary,text:"Cancel",value:kt.CANCEL},{type:vt.ButtonEnums.type.primary,text:"Create new report",value:kt.CREATE_REPORT},{type:vt.ButtonEnums.type.primary,text:"Add to existing report",value:kt.ADD_SERIES}],o=t=>{e.hide(),n(t)};e.show({viewportId:t,type:"info",message:i,actions:a,onSubmit:o,onOutsideClick:()=>{e.hide(),n(kt.CANCEL)}})}))}(i,a);r===kt.CREATE_REPORT&&(r=n.isDirty?await function(e,t){return new Promise((function(n,r){const i="You have existing tracked measurements. What would you like to do with your existing tracked measurements?",a=[{type:"cancel",text:"Cancel",value:kt.CANCEL},{type:"secondary",text:"Save",value:kt.CREATE_REPORT},{type:"primary",text:"Discard",value:kt.SET_STUDY_AND_SERIES}],o=t=>{e.hide(),n(t)};e.show({viewportId:t,type:"warning",message:i,actions:a,onSubmit:o,onOutsideClick:()=>{e.hide(),n(kt.CANCEL)}})}))}(i,a):kt.SET_STUDY_AND_SERIES),e({userResponse:r,StudyInstanceUID:o,SeriesInstanceUID:s,viewportId:a,isBackupSave:!1})}))},xt={NO_NEVER:-1,CANCEL:0,CREATE_REPORT:1,ADD_SERIES:2,SET_STUDY_AND_SERIES:3,NO_NOT_FOR_SERIES:4};const It=function({servicesManager:e,extensionManager:t},n,r){const{uiViewportDialogService:i}=e.services,{viewportId:a,StudyInstanceUID:o,SeriesInstanceUID:s}=r.data||r;return new Promise((async function(e,t){let r=await function(e,t){return new Promise((function(n,r){const i=bt.Z.t("MeasurementTable:Track measurements for this series?"),a=[{type:"cancel",text:bt.Z.t("MeasurementTable:No"),value:xt.CANCEL},{type:"secondary",text:bt.Z.t("MeasurementTable:No, do not ask again"),value:xt.NO_NOT_FOR_SERIES},{type:"primary",text:bt.Z.t("MeasurementTable:Yes"),value:xt.SET_STUDY_AND_SERIES}],o=t=>{e.hide(),n(t)};e.show({viewportId:t,type:"info",message:i,actions:a,onSubmit:o,onOutsideClick:()=>{e.hide(),n(xt.CANCEL)},onKeyPress:e=>{if("Enter"===e.key){const e=a.find((e=>e.value===xt.SET_STUDY_AND_SERIES));o(e.value)}}})}))}(i,a);r===xt.SET_STUDY_AND_SERIES&&(r=n.isDirty?await function(e,t){return new Promise((function(n,r){const i="Measurements cannot span across multiple studies. Do you want to save your tracked measurements?",a=[{type:"cancel",text:"Cancel",value:xt.CANCEL},{type:"secondary",text:"No, discard previously tracked series & measurements",value:xt.SET_STUDY_AND_SERIES},{type:"primary",text:"Yes",value:xt.CREATE_REPORT}],o=t=>{e.hide(),n(t)};e.show({viewportId:t,type:"warning",message:i,actions:a,onSubmit:o,onOutsideClick:()=>{e.hide(),n(xt.CANCEL)}})}))}(i,a):xt.SET_STUDY_AND_SERIES),e({userResponse:r,StudyInstanceUID:o,SeriesInstanceUID:s,viewportId:a,isBackupSave:!1})}))};var _t=n(140);const Tt=4700;const Ct={NO_NEVER:-1,CANCEL:0,CREATE_REPORT:1,ADD_SERIES:2,SET_STUDY_AND_SERIES:3,NO_NOT_FOR_SERIES:4};const Nt=async function({servicesManager:e,commandsManager:t,extensionManager:n},r,i){const{uiDialogService:a,measurementService:o,displaySetService:s}=e.services,l=void 0===i.viewportId?i.data.viewportId:i.viewportId,u=void 0===i.isBackupSave?i.data.isBackupSave:i.isBackupSave,c=i?.data?.StudyInstanceUID,d=i?.data?.SeriesInstanceUID,{trackedStudy:f,trackedSeries:p}=r;let h;try{const r=await(0,_t.createReportDialogPrompt)(a,{extensionManager:n});if(r.action===Ct.CREATE_REPORT){const i=n.getDataSources()[0],a=o.getMeasurements().filter((e=>f===e.referenceStudyUID&&p.includes(e.referenceSeriesUID))).filter((e=>null!=e.referencedImageId)),l=void 0===r.value||""===r.value?"Research Derived Series":r.value,u=function(e){const t=e.getActiveDisplaySets().filter((e=>"SR"===e.Modality)).map((e=>e.SeriesNumber));return Math.max(...t,Tt)+1}(s),c=async()=>t.runCommand("storeMeasurements",{measurementData:a,dataSource:i,additionalFindingTypes:["ArrowAnnotate"],options:{SeriesDescription:l,SeriesNumber:u}},"CORNERSTONE_STRUCTURED_REPORT");h=await(0,_t.createReportAsync)({servicesManager:e,getReport:c})}else r.action;return{userResponse:r.action,createdDisplaySetInstanceUIDs:h,StudyInstanceUID:c,SeriesInstanceUID:d,viewportId:l,isBackupSave:u}}catch(e){return null}};var Rt=n(148);const Dt={NO_NEVER:-1,CANCEL:0,CREATE_REPORT:1,ADD_SERIES:2,SET_STUDY_AND_SERIES:3,NO_NOT_FOR_SERIES:4,HYDRATE_REPORT:5};const Ot=function({servicesManager:e,extensionManager:t,appConfig:n},r,i){const{uiViewportDialogService:a,displaySetService:o}=e.services,{viewportId:s,displaySetInstanceUID:l}=i,u=o.getDisplaySetByUID(l);return new Promise((async function(r,o){const c=n?.disableConfirmationPrompts?Dt.HYDRATE_REPORT:await function(e,t){return new Promise((function(n,r){const i="Do you want to continue tracking measurements for this study?",a=[{id:"no-hydrate",type:vt.ButtonEnums.type.secondary,text:"No",value:Dt.CANCEL},{id:"yes-hydrate",type:vt.ButtonEnums.type.primary,text:"Yes",value:Dt.HYDRATE_REPORT}],o=t=>{e.hide(),n(t)};e.show({viewportId:t,type:"info",message:i,actions:a,onSubmit:o,onOutsideClick:()=>{e.hide(),n(Dt.CANCEL)},onKeyPress:e=>{if("Enter"===e.key){const e=a.find((e=>e.value===Dt.HYDRATE_REPORT));o(e.value)}}})}))}(a,s);let d,f;if(c===Dt.HYDRATE_REPORT){console.warn("!! HYDRATING STRUCTURED REPORT");const r=(0,Rt.hydrateStructuredReport)({servicesManager:e,extensionManager:t,appConfig:n},l);d=r.StudyInstanceUID,f=r.SeriesInstanceUIDs}r({userResponse:c,displaySetInstanceUID:i.displaySetInstanceUID,srSeriesInstanceUID:u.SeriesInstanceUID,viewportId:s,StudyInstanceUID:d,SeriesInstanceUIDs:f})}))};const Pt=function({servicesManager:e,extensionManager:t,appConfig:n},r,i){const{displaySetService:a}=e.services,{viewportId:o,displaySetInstanceUID:s}=i,l=a.getDisplaySetByUID(s);return new Promise(((r,a)=>{const u=(0,Rt.hydrateStructuredReport)({servicesManager:e,extensionManager:t,appConfig:n},s),c=u.StudyInstanceUID,d=u.SeriesInstanceUIDs;r({displaySetInstanceUID:i.displaySetInstanceUID,srSeriesInstanceUID:l.SeriesInstanceUID,viewportId:o,StudyInstanceUID:c,SeriesInstanceUIDs:d})}))};var Mt=n(181);const Lt=function({servicesManager:e,extensionManager:t},n,r){const{measurementService:i,customizationService:a}=e.services,{viewportId:o,StudyInstanceUID:s,SeriesInstanceUID:l,measurementId:u}=r,c=t.getModuleEntry("@ohif/extension-cornerstone.utilityModule.common"),{showLabelAnnotationPopup:d}=c.exports;return new Promise((async function(t){const n=a.get("measurementLabels"),r=i.getMeasurement(u),c=await d(r,e.services.uiDialogService,n);i.update(u,{...c},!0),t({StudyInstanceUID:s,SeriesInstanceUID:l,viewportId:o})}))},At=a.createContext();At.displayName="TrackedMeasurementsContext";const Ut=()=>(0,a.useContext)(At),jt="@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr";function zt({servicesManager:e,commandsManager:t,extensionManager:n},{children:r}){const[i]=(0,Mt.M)(),[o,s]=(0,vt.useViewportGrid)(),{activeViewportId:l,viewports:u}=o,{measurementService:c,displaySetService:d,customizationService:f,cornerstoneViewportService:p}=e.services,h=Object.assign({},mt);h.actions=Object.assign({},h.actions,{jumpToFirstMeasurementInActiveViewport:(e,t)=>{const{trackedStudy:n,trackedSeries:r,activeViewportId:i}=e,a=c.getMeasurements().filter((e=>n===e.referenceStudyUID&&r.includes(e.referenceSeriesUID)));console.log("jumping to measurement reset viewport",i,a[0]);const o=a[0].displaySetInstanceUID,l=d.getDisplaySetByUID(o).images,u=l[0].imageId.startsWith("volumeId"),f=a[0].data;let p=0;!u&&f&&(p=l.findIndex((e=>{const t=Object.keys(f)[0].substring(8);return e.imageId===t})),-1===p&&(console.warn("Could not find image index for tracked measurement, using 0"),p=0)),s.setDisplaySetsForViewport({viewportId:i,displaySetInstanceUIDs:[o],viewportOptions:{initialImageOptions:{index:p}}})},jumpToSameImageInActiveViewport:(e,t)=>{const{trackedStudy:n,trackedSeries:r,activeViewportId:i}=e,a=c.getMeasurements().filter((e=>n===e.referenceStudyUID&&r.includes(e.referenceSeriesUID)))[0].displaySetInstanceUID,o=p.getCornerstoneViewport(i).getCurrentImageIdIndex();s.setDisplaySetsForViewport({viewportId:i,displaySetInstanceUIDs:[a],viewportOptions:{initialImageOptions:{index:o}}})},showStructuredReportDisplaySetInActiveViewport:(e,t)=>{if(t.data.createdDisplaySetInstanceUIDs.length>0){const e=t.data.createdDisplaySetInstanceUIDs[0];s.setDisplaySetsForViewport({viewportId:t.data.viewportId,displaySetInstanceUIDs:[e]})}},discardPreviouslyTrackedMeasurements:(e,t)=>{const n=c.getMeasurements().filter((t=>e.prevTrackedSeries.includes(t.referenceSeriesUID))).map((e=>e.id));for(let e=0;e<n.length;e++)c.remove(n[e])},clearAllMeasurements:(e,t)=>{const n=c.getMeasurements().map((e=>e.uid));for(let e=0;e<n.length;e++)c.remove(n[e])}}),h.services=Object.assign({},h.services,{promptBeginTracking:wt.bind(null,{servicesManager:e,extensionManager:n,appConfig:i}),promptTrackNewSeries:Et.bind(null,{servicesManager:e,extensionManager:n,appConfig:i}),promptTrackNewStudy:It.bind(null,{servicesManager:e,extensionManager:n,appConfig:i}),promptSaveReport:Nt.bind(null,{servicesManager:e,commandsManager:t,extensionManager:n,appConfig:i}),promptHydrateStructuredReport:Ot.bind(null,{servicesManager:e,extensionManager:n,appConfig:i}),hydrateStructuredReport:Pt.bind(null,{servicesManager:e,extensionManager:n,appConfig:i}),promptLabelAnnotation:Lt.bind(null,{servicesManager:e,extensionManager:n})}),h.guards=Object.assign({},h.guards,{isLabelOnMeasure:(e,t,n)=>{const r=f.get("measurementLabels");return r?.labelOnMeasure},isLabelOnMeasureAndShouldKillMachine:(e,t,n)=>{const r=f.get("measurementLabels");return t.data&&t.data.userResponse===gt.NO_NEVER&&r?.labelOnMeasure}});const v=(g=yt,y=h,void 0===m&&(m=g.context),new it(g,y,m));var g,y,m;const[b,S]=ht(v);return(0,a.useEffect)((()=>{S("UPDATE_ACTIVE_VIEWPORT_ID",{activeViewportId:l})}),[l,S]),(0,a.useEffect)((()=>{(async()=>{if(u.size>0){const t=u.get(l);if(!t||!t?.displaySetInstanceUIDs?.length)return;const{displaySetService:n}=e.services,r=n.getDisplaySetByUID(t.displaySetInstanceUIDs[0]);if(!r)return;r.SOPClassHandlerId===jt&&!r.isLoaded&&r.load&&await r.load(),r.SOPClassHandlerId===jt&&!0===r.isRehydratable&&(console.log("sending event...",b),S("PROMPT_HYDRATE_SR",{displaySetInstanceUID:r.displaySetInstanceUID,SeriesInstanceUID:r.SeriesInstanceUID,viewportId:l}))}})()}),[b,l,S,e.services,u]),a.createElement(At.Provider,{value:[b,S]},r)}zt.propTypes={children:s().oneOf([s().func,s().node]),servicesManager:s().object.isRequired,commandsManager:s().object.isRequired,extensionManager:s().object.isRequired,appConfig:s().object};const Ft=function({servicesManager:e,extensionManager:t,commandsManager:n}){const r=zt.bind(null,{servicesManager:e,extensionManager:t,commandsManager:n});return[{name:"TrackedMeasurementsContext",context:At,provider:r}]}},868:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(1),i=n(827),a=n.n(i),o=n(369),s=n(867),l=n(419),u=n(464),c=n(485);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(null,arguments)}function f(e){const{displaySets:t,viewportId:n,servicesManager:i,extensionManager:a}=e,{measurementService:f,cornerstoneViewportService:h,viewportGridService:v,viewportActionCornersService:g}=i.services,y=t[0],{t:m}=(0,c.$G)("Common"),[b]=(0,o.useViewportGrid)(),{activeViewportId:S}=b,[w,k]=(0,l.I)(),[E,x]=(0,r.useState)(!1),[I,_]=(0,r.useState)(null),[T,C]=(0,r.useState)(null),{trackedSeries:N}=w.context,{SeriesInstanceUID:R}=y,D=(0,r.useCallback)((()=>{const e=h.getCornerstoneViewport(n);if(e instanceof u.BaseVolumeViewport){const t=e?.getCurrentImageId();if(!t)return void(E&&x(!1))}N.includes(R)!==E&&x(!E)}),[E,w,n,R]),O=(0,r.useCallback)((e=>{e.detail.element!==T&&(e.detail.element?.addEventListener(u.Enums.Events.VOLUME_VIEWPORT_NEW_VOLUME,D),C(e.detail.element))}),[D,T]),P=(0,r.useCallback)((()=>{T?.removeEventListener(u.Enums.Events.VOLUME_VIEWPORT_NEW_VOLUME,D)}),[D,T]);(0,r.useEffect)(D,[D]),(0,r.useEffect)((()=>{const{unsubscribe:e}=h.subscribe(h.EVENTS.VIEWPORT_DATA_CHANGED,(e=>{e.viewportId===n&&D()}));return()=>{e()}}),[D,n]),(0,r.useEffect)((()=>E?(s.annotation.config.style.setViewportToolStyles(n,{global:{lineDash:""}}),void h.getRenderingEngine().renderViewport(n)):(s.annotation.config.style.setViewportToolStyles(n,{global:{lineDash:"4,4"}}),h.getRenderingEngine().renderViewport(n),()=>{s.annotation.config.style.setViewportToolStyles(n,{})})),[E]),(0,r.useEffect)((()=>{const e=f.EVENTS.MEASUREMENT_ADDED,t=f.EVENTS.RAW_MEASUREMENT_ADDED,r=[];return[e,t].forEach((e=>{r.push(f.subscribe(e,(({source:e,measurement:t})=>{const{activeViewportId:r}=v.getState();if(n===r){const{referenceStudyUID:e,referenceSeriesUID:r,uid:i}=t;k("SET_DIRTY",{SeriesInstanceUID:r}),k("TRACK_SERIES",{viewportId:n,StudyInstanceUID:e,SeriesInstanceUID:r,measurementId:i})}})).unsubscribe)})),()=>{r.forEach((e=>{e()}))}}),[f,k,n,v]);const M=(0,r.useCallback)((e=>{const t=function(e,t,n,r){const{measurementService:i,viewportGridService:a}=t.services,o=i.getMeasurements(),{activeViewportId:s,viewports:l}=a.getState(),{displaySetInstanceUIDs:u}=l.get(s),{trackedSeries:c}=r.context,d=o.filter((e=>c.includes(e.referenceSeriesUID)&&u.includes(e.displaySetInstanceUID)));if(!d.length)return;const f=d.length,p=d.map((e=>e.uid));let h=p.findIndex((e=>e===n));-1===h?h=0:(h+=e,h<0?h=f-1:h===f&&(h=0));return p[h]}(e,i,I,w);t&&(_(t),f.jumpToMeasurement(n,t))}),[f,i,I,w,n]);(0,r.useEffect)((()=>{const e=function(e,t){if(!e)return null;return r.createElement("div",{className:"relative"},r.createElement(o.Tooltip,{position:"bottom-left",content:r.createElement("div",{className:"flex py-2"},r.createElement("div",{className:"flex pt-1"},r.createElement(o.Icon,{name:"info-link",className:"text-primary-main w-4"})),r.createElement("div",{className:"ml-4 flex"},r.createElement("span",{className:"text-common-light text-base"},e?r.createElement(r.Fragment,null,t("Series is tracked and can be viewed in the measurement panel")):r.createElement(r.Fragment,null,t("Measurements for untracked series will not be shown in the measurements panel")))))},r.createElement(o.Icon,{name:"viewport-status-tracked",className:"text-aqua-pale"})))}(E,m),t=p(E,M,n===S);g.setComponents([{viewportId:n,id:"viewportStatusComponent",component:e,indexPriority:-100,location:g.LOCATIONS.topLeft},{viewportId:n,id:"viewportActionArrowsComponent",component:t,indexPriority:0,location:g.LOCATIONS.topRight}])}),[S,E,M,g,n]);return r.createElement(r.Fragment,null,r.createElement("div",{className:"relative flex h-full w-full flex-row overflow-hidden"},(()=>{const{component:t}=a.getModuleEntry("@ohif/extension-cornerstone.viewportModule.cornerstone");return r.createElement(t,d({},e,{onElementEnabled:t=>{e.onElementEnabled?.(t),O(t)},onElementDisabled:P}))})()))}f.propTypes={displaySets:a().arrayOf(a().object.isRequired).isRequired,viewportId:a().string.isRequired,dataSource:a().object,children:a().node};const p=(e,t,n)=>e?r.createElement(o.ViewportActionArrows,{onArrowsClick:e=>t(e),className:n?"visible":"invisible group-hover:visible"}):null;const h=f},181:(e,t,n)=>{"use strict";n.d(t,{M:()=>l});var r=n(1),i=n(827),a=n.n(i);const o=(0,r.createContext)(null),{Provider:s}=o,l=()=>(0,r.useContext)(o);function u({children:e,value:t}){const[n,i]=(0,r.useState)(t);return r.createElement(s,{value:[n]},e)}u.propTypes={children:a().any,value:a().any}},795:(e,t,n)=>{"use strict";n.d(t,{Z:()=>B});var r=n(133),i=n(765);function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){(0,i.Z)(e,t,n[t])}))}return e}var o=n(688),s=n(755);function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){if(t&&("object"==(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}var p=n(767);var h=n(274);function v(e){return function(e){if(Array.isArray(e))return(0,p.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,h.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var g=n(976),y={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var n;console&&console[e]&&(n=console)[e].apply(n,v(t))}},m=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.Z)(this,e),this.init(t,n)}return(0,s.Z)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||y,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,a({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),b=function(){function e(){(0,o.Z)(this,e),this.observers={}}return(0,s.Z)(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)}));this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function S(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function w(e){return null==e?"":""+e}function k(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var a="string"!=typeof t?[].concat(t):t.split(".");a.length>1;){if(i())return{};var o=r(a.shift());!e[o]&&n&&(e[o]=new n),e=e[o]}return i()?{}:{obj:e,k:r(a.shift())}}function E(e,t,n){var r=k(e,t,Object);r.obj[r.k]=n}function x(e,t){var n=k(e,t),r=n.obj,i=n.k;if(r)return r[i]}function I(e,t,n){var r=x(e,n);return void 0!==r?r:x(t,n)}function _(e,t,n){for(var r in t)r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):_(e[r],t[r],n):e[r]=t[r];return e}function T(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var C={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function N(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return C[e]})):e}var R=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,o.Z)(this,t),n=u(this,c(t).call(this)),b.call(l(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return f(t,e),(0,s.Z)(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=[e,t];return n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split(".")),x(this.data,a)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(r=t,t=(o=e.split("."))[1]),this.addNamespaces(t),E(this.data,o,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var l=x(this.data,s)||{};r?_(l,n,i):l=a({},l,n),E(this.data,s,l),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?a({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(b),D={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var a=this;return e.forEach((function(e){a.processors[e]&&(t=a.processors[e].process(t,n,r,i))})),t}},O=function(e){function t(e){var n,r,i,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.Z)(this,t),n=u(this,c(t).call(this)),b.call(l(n)),r=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i=e,a=l(n),r.forEach((function(e){i[e]&&(a[e]=i[e])})),n.options=s,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=m.create("translator"),n}return f(t,e),(0,s.Z)(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=t.nsSeparator||this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var n=this;if("object"!==(0,r.Z)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),s=o.key,l=o.namespaces,u=l[l.length-1],c=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(d){var f=t.nsSeparator||this.options.nsSeparator;return u+f+s}return s}var p=this.resolve(e,t),h=p&&p.res,v=p&&p.usedKey||s,g=p&&p.exactUsedKey||s,y=Object.prototype.toString.apply(h),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&h&&("string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(y)<0&&("string"!=typeof m||"[object Array]"!==y)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,h,t):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(i){var S="[object Array]"===y,w=S?[]:{},k=S?g:v;for(var E in h)if(Object.prototype.hasOwnProperty.call(h,E)){var x="".concat(k).concat(i).concat(E);w[E]=this.translate(x,a({},t,{joinArrays:!1,ns:l})),w[E]===x&&(w[E]=h[E])}h=w}}else if(b&&"string"==typeof m&&"[object Array]"===y)(h=h.join(m))&&(h=this.extendTranslation(h,e,t));else{var I=!1,_=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(I=!0,void 0!==t.count){var T=this.pluralResolver.getSuffix(c,t.count);h=t["defaultValue".concat(T)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(_=!0,h=s);var C=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(_||I||C){this.logger.log(C?"updateKey":"missingKey",c,u,s,C?t.defaultValue:h);var N=[],R=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&R&&R[0])for(var D=0;D<R.length;D++)N.push(R[D]);else"all"===this.options.saveMissingTo?N=this.languageUtils.toResolveHierarchy(t.lng||this.language):N.push(t.lng||this.language);var O=function(e,r){n.options.missingKeyHandler?n.options.missingKeyHandler(e,u,r,C?t.defaultValue:h,C,t):n.backendConnector&&n.backendConnector.saveMissing&&n.backendConnector.saveMissing(e,u,r,C?t.defaultValue:h,C,t),n.emit("missingKey",e,u,r,h)};if(this.options.saveMissing){var P=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&P?N.forEach((function(e){n.pluralResolver.getPluralFormsOfKey(e,s).forEach((function(t){return O([e],t)}))})):O(N,s)}}h=this.extendTranslation(h,e,t,p),_&&h===s&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(s)),_&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,n,r){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(a({},n,{interpolation:a({},this.options.interpolation,n.interpolation)}));var o=n.replace&&"string"!=typeof n.replace?n.replace:n;this.options.interpolation.defaultVariables&&(o=a({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o,n.lng||this.language,n),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){return i.translate.apply(i,arguments)}),n)),n.interpolation&&this.interpolator.reset()}var s=n.postProcess||this.options.postProcess,l="string"==typeof s?[s]:s;return null!=e&&l&&l.length&&!1!==n.applyPostProcessor&&(e=D.handle(l,e,t,this.options&&this.options.postProcessPassResolved?a({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,i,a,o=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!o.isValidLookup(t)){var l=o.extractFromKey(e,s),u=l.key;n=u;var c=l.namespaces;o.options.fallbackNS&&(c=c.concat(o.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,f=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,p=s.lngs?s.lngs:o.languageUtils.toResolveHierarchy(s.lng||o.language,s.fallbackLng);c.forEach((function(e){o.isValidLookup(t)||(a=e,o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(a)&&o.logger.warn('key "'.concat(n,'" for namespace "').concat(a,"\" won't get resolved as namespace was not yet loaded"),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"),p.forEach((function(n){if(!o.isValidLookup(t)){i=n;var a,l,c=u,p=[c];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(p,u,n,e,s);else d&&(a=o.pluralResolver.getSuffix(n,s.count)),d&&f&&p.push(c+a),f&&p.push(c+="".concat(o.options.contextSeparator).concat(s.context)),d&&p.push(c+=a);for(;l=p.pop();)o.isValidLookup(t)||(r=l,t=o.getResource(n,e,l,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:a}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}]),t}(b);function P(e){return e.charAt(0).toUpperCase()+e.slice(1)}var M=function(){function e(t){(0,o.Z)(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=m.create("languageUtils")}return(0,s.Z)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=P(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=P(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=P(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],a=function(e){e&&(n.isWhitelisted(e)?i.push(e):n.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):"string"==typeof e&&a(this.formatLanguageCode(e)),r.forEach((function(e){i.indexOf(e)<0&&a(n.formatLanguageCode(e))})),i}}]),e}(),L=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],A={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};var U=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.Z)(this,e),this.languageUtils=t,this.options=r,this.logger=m.create("pluralResolver"),this.rules=(n={},L.forEach((function(e){e.lngs.forEach((function(t){n[t]={numbers:e.nr,plurals:A[e.fc]}}))})),n)}return(0,s.Z)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=this,r=[],i=this.getRule(e);return i?(i.numbers.forEach((function(i){var a=n.getSuffix(e,i);r.push("".concat(t).concat(a))})),r):r}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var i=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),a=r.numbers[i];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===a?a="plural":1===a&&(a=""));var o=function(){return n.options.prepend&&a.toString()?n.options.prepend+a.toString():a.toString()};return"v1"===this.options.compatibilityJSON?1===a?"":"number"==typeof a?"_plural_".concat(a.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?o():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),j=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o.Z)(this,e),this.logger=m.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,s.Z)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:N,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?T(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?T(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?T(t.nestingPrefix):t.nestingPrefixEscaped||T("$t("),this.nestingSuffix=t.nestingSuffix?T(t.nestingSuffix):t.nestingSuffixEscaped||T(")"),this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,a,o,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(e.indexOf(s.formatSeparator)<0)return I(t,l,e);var r=e.split(s.formatSeparator),i=r.shift().trim(),a=r.join(s.formatSeparator).trim();return s.format(I(t,l,i),a,n)};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler;for(o=0;i=this.regexpUnescape.exec(e);){if(void 0===(a=c(i[1].trim())))if("function"==typeof d){var f=d(e,i,r);a="string"==typeof f?f:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),a="";else"string"==typeof a||this.useRawValueToEscape||(a=w(a));if(e=e.replace(i[0],u(a)),this.regexpUnescape.lastIndex=0,++o>=this.maxReplaces)break}for(o=0;i=this.regexp.exec(e);){if(void 0===(a=c(i[1].trim())))if("function"==typeof d){var p=d(e,i,r);a="string"==typeof p?p:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),a="";else"string"==typeof a||this.useRawValueToEscape||(a=w(a));if(a=this.escapeValue?u(this.escape(a)):u(a),e=e.replace(i[0],a),this.regexp.lastIndex=0,++o>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var n,r,i=a({},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});function o(e,t){if(e.indexOf(",")<0)return e;var n=e.split(",");e=n.shift();var r=n.join(",");r=(r=this.interpolate(r,i)).replace(/'/g,'"');try{i=JSON.parse(r),t&&(i=a({},t,i))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return delete i.defaultValue,e}for(i.applyPostProcessor=!1,delete i.defaultValue;n=this.nestingRegexp.exec(e);){if((r=t(o.call(this,n[1].trim(),i),i))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=w(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();var z=function(e){function t(e,n,r){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,o.Z)(this,t),i=u(this,c(t).call(this)),b.call(l(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=a,i.logger=m.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,a.backend,a),i}return f(t,e),(0,s.Z)(t,[{key:"queueLoad",value:function(e,t,n,r){var i=this,a=[],o=[],s=[],l=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?o.indexOf(s)<0&&o.push(s):(i.state[s]=1,r=!1,o.indexOf(s)<0&&o.push(s),a.indexOf(s)<0&&a.push(s),l.indexOf(t)<0&&l.push(t)))})),r||s.push(e)})),(a.length||o.length)&&this.queue.push({pending:o,loaded:{},errors:[],callback:r}),{toLoad:a,pending:o,toLoadLanguages:s,toLoadNamespaces:l}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=(0,g.Z)(r,2),a=i[0],o=i[1];t&&this.emit("failedLoading",a,o,t),n&&this.store.addResourceBundle(a,o,n),this.state[e]=t?-1:2;var s={};this.queue.forEach((function(n){var r,i,l,u,c,d;r=n.loaded,i=o,u=k(r,[a],Object),c=u.obj,d=u.k,c[d]=c[d]||[],l&&(c[d]=c[d].concat(i)),l||c[d].push(i),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){s[e]||(s[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){s[e].indexOf(t)<0&&s[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,o=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,l){s&&l&&i<5?setTimeout((function(){r.read.call(r,e,t,n,i+1,2*a,o)}),a):o(s,l)})):o(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var a=this.queueLoad(e,t,r,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=(0,g.Z)(r,2),a=i[0],o=i[1];this.read(a,o,"read",null,null,(function(r,i){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(a," failed"),r),!r&&i&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(a),i),t.loaded(e,r,i)}))}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" for namespace "').concat(t,'" as the namespace was not yet loaded'),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,a({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(b);function F(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function V(){}const B=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if((0,o.Z)(this,t),e=u(this,c(t).call(this)),b.call(l(e)),e.options=F(n),e.services={},e.logger=m,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),u(e,l(e));setTimeout((function(){e.init(n,r)}),0)}return e}return f(t,e),(0,s.Z)(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function i(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),this.options=a({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,r.Z)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,r.Z)(e[2])||"object"===(0,r.Z)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}},this.options,F(t)),this.format=this.options.interpolation.format,n||(n=V),!this.options.isClone){this.modules.logger?m.init(i(this.modules.logger),this.options):m.init(null,this.options);var o=new M(this.options);this.store=new R(this.options.resources,this.options);var s=this.services;s.logger=m,s.resourceStore=this.store,s.languageUtils=o,s.pluralResolver=new U(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),s.interpolator=new j(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new z(i(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(s.languageDetector=i(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=i(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new O(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var l=S(),u=function(){e.changeLanguage(e.options.lng,(function(t,r){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(r),n(t,r)}))};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}},{key:"loadResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return t();var n=[],r=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(e){n.indexOf(e)<0&&n.push(e)}))};if(this.language)r(this.language);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return r(e)}));this.options.preload&&this.options.preload.forEach((function(e){return r(e)})),this.services.backendConnector.load(n,this.options.ns,t)}else t(null)}},{key:"reloadResources",value:function(e,t,n){var r=S();return e||(e=this.languages),t||(t=this.options.ns),n||(n=V),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&D.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this,r=S();this.emit("languageChanging",e);var i=function(e){e&&(n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.translator.language||n.translator.changeLanguage(e),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(e)),n.loadResources((function(i){!function(e,i){n.translator.changeLanguage(i),i&&(n.emit("languageChanged",i),n.logger.log("languageChanged",i)),r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(i,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,i=function e(t,i){var o;if("object"!==(0,r.Z)(i)){for(var s=arguments.length,l=new Array(s>2?s-2:0),u=2;u<s;u++)l[u-2]=arguments[u];o=n.options.overloadTranslationOptionHandler([t,i].concat(l))}else o=a({},i);return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,n.t(t,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this;if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!!this.hasResourceBundle(n,e)||(!this.services.backendConnector.backend||!(!a(n,e)||r&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=S();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=S();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter((function(e){return r.indexOf(e)<0}));return i.length?(this.options.preload=r.concat(i),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:V,i=a({},this.options,n,{isClone:!0}),o=new t(i);return["store","services","language"].forEach((function(t){o[t]=e[t]})),o.translator=new O(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))})),o.init(i,r),o.translator.options=o.options,o}}]),t}(b))},324:(e,t,n)=>{var r=NaN,i="[object Symbol]",a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,f=c||d||Function("return this")(),p=Object.prototype.toString,h=Math.max,v=Math.min,g=function(){return f.Date.now()};function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&p.call(e)==i}(e))return r;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):o.test(e)?r:+e}e.exports=function(e,t,n){var r,i,a,o,s,l,u=0,c=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,a=i;return r=i=void 0,u=t,o=e.apply(a,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-u>=a}function S(){var e=g();if(b(e))return w(e);s=setTimeout(S,function(e){var n=t-(e-l);return d?v(n,a-(e-u)):n}(e))}function w(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function k(){var e=g(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(S,t),c?p(e):o}(l);if(d)return s=setTimeout(S,t),p(l)}return void 0===s&&(s=setTimeout(S,t)),o}return t=m(t)||0,y(n)&&(c=!!n.leading,a=(d="maxWait"in n)?h(m(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),k.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},k.flush=function(){return void 0===s?o:w(g())},k}},337:(e,t,n)=>{"use strict";var r=n(287);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},827:(e,t,n)=>{e.exports=n(337)()},287:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},262:(e,t,n)=>{"use strict";var r=n(1),i=n(681);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,s={};function l(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(s[e]=t,e=0;e<t.length;e++)o.add(t[e])}var c=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},h={};function v(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new v(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function m(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(h,e)||!d.call(p,e)&&(f.test(e)?h[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,m);g[t]=new v(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,m);g[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,m);g[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var S=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),k=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),O=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var P=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function L(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=M&&e[M]||e["@@iterator"])?e:null}var A,U=Object.assign;function j(e){if(void 0===A)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);A=t&&t[1]||""}return"\n"+A+e}var z=!1;function F(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var l="\n"+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=o&&0<=s);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?j(e):""}function V(e){switch(e.tag){case 5:return j(e.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return e=F(e.type,!1);case 11:return e=F(e.type.render,!1);case 1:return e=F(e.type,!0);default:return""}}function B(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case E:return"Fragment";case k:return"Portal";case I:return"Profiler";case x:return"StrictMode";case N:return"Suspense";case R:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case _:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case D:return null!==(t=e.displayName||null)?t:B(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return B(e(t))}catch(e){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B(t);case 8:return t===x?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function $(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=$(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Y(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function K(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return U({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Z(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function G(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function J(e,t){G(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function X(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&K(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return U({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function ae(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,ce,de=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","ms","Moz","O"];function ve(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ve(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(pe).forEach((function(e){he.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ye=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function me(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Se=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var ke=null,Ee=null,xe=null;function Ie(e){if(e=bi(e)){if("function"!=typeof ke)throw Error(a(280));var t=e.stateNode;t&&(t=wi(t),ke(e.stateNode,e.type,t))}}function _e(e){Ee?xe?xe.push(e):xe=[e]:Ee=e}function Te(){if(Ee){var e=Ee,t=xe;if(xe=Ee=null,Ie(e),t)for(e=0;e<t.length;e++)Ie(t[e])}}function Ce(e,t){return e(t)}function Ne(){}var Re=!1;function De(e,t,n){if(Re)return e(t,n);Re=!0;try{return Ce(e,t,n)}finally{Re=!1,(null!==Ee||null!==xe)&&(Ne(),Te())}}function Oe(e,t){var n=e.stateNode;if(null===n)return null;var r=wi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Pe=!1;if(c)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){Pe=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(ce){Pe=!1}function Le(e,t,n,r,i,a,o,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var Ae=!1,Ue=null,je=!1,ze=null,Fe={onError:function(e){Ae=!0,Ue=e}};function Ve(e,t,n,r,i,a,o,s,l){Ae=!1,Ue=null,Le.apply(Fe,arguments)}function Be(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function He(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function We(e){if(Be(e)!==e)throw Error(a(188))}function $e(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Be(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return We(i),e;if(o===r)return We(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?qe(e):null}function qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=qe(e);if(null!==t)return t;e=e.sibling}return null}var Ye=i.unstable_scheduleCallback,Ke=i.unstable_cancelCallback,Qe=i.unstable_shouldYield,Ze=i.unstable_requestPaint,Ge=i.unstable_now,Je=i.unstable_getCurrentPriorityLevel,Xe=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,at=null;var ot=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ut=64,ct=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ft(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=dt(s):0!==(a&=o)&&(r=dt(a))}else 0!==(o=n&~i)?r=dt(o):0!==a&&(r=dt(a));if(0===r)return 0;if(0!==t&&t!==r&&!(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&4194240&a))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-ot(t)),r|=e[n],t&=~i;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ht(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function vt(){var e=ut;return!(4194240&(ut<<=1))&&(ut=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var bt=0;function St(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var wt,kt,Et,xt,It,_t=!1,Tt=[],Ct=null,Nt=null,Rt=null,Dt=new Map,Ot=new Map,Pt=[],Mt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Lt(e,t){switch(e){case"focusin":case"focusout":Ct=null;break;case"dragenter":case"dragleave":Nt=null;break;case"mouseover":case"mouseout":Rt=null;break;case"pointerover":case"pointerout":Dt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ot.delete(t.pointerId)}}function At(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&(null!==(t=bi(t))&&kt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Ut(e){var t=mi(e.target);if(null!==t){var n=Be(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=He(n)))return e.blockedOn=t,void It(e.priority,(function(){Et(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function jt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&kt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Se=r,n.target.dispatchEvent(r),Se=null,t.shift()}return!0}function zt(e,t,n){jt(e)&&n.delete(t)}function Ft(){_t=!1,null!==Ct&&jt(Ct)&&(Ct=null),null!==Nt&&jt(Nt)&&(Nt=null),null!==Rt&&jt(Rt)&&(Rt=null),Dt.forEach(zt),Ot.forEach(zt)}function Vt(e,t){e.blockedOn===t&&(e.blockedOn=null,_t||(_t=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ft)))}function Bt(e){function t(t){return Vt(t,e)}if(0<Tt.length){Vt(Tt[0],e);for(var n=1;n<Tt.length;n++){var r=Tt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Ct&&Vt(Ct,e),null!==Nt&&Vt(Nt,e),null!==Rt&&Vt(Rt,e),Dt.forEach(t),Ot.forEach(t),n=0;n<Pt.length;n++)(r=Pt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Pt.length&&null===(n=Pt[0]).blockedOn;)Ut(n),null===n.blockedOn&&Pt.shift()}var Ht=S.ReactCurrentBatchConfig,Wt=!0;function $t(e,t,n,r){var i=bt,a=Ht.transition;Ht.transition=null;try{bt=1,Yt(e,t,n,r)}finally{bt=i,Ht.transition=a}}function qt(e,t,n,r){var i=bt,a=Ht.transition;Ht.transition=null;try{bt=4,Yt(e,t,n,r)}finally{bt=i,Ht.transition=a}}function Yt(e,t,n,r){if(Wt){var i=Qt(e,t,n,r);if(null===i)Wr(e,t,r,Kt,n),Lt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Ct=At(Ct,e,t,n,r,i),!0;case"dragenter":return Nt=At(Nt,e,t,n,r,i),!0;case"mouseover":return Rt=At(Rt,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Dt.set(a,At(Dt.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Ot.set(a,At(Ot.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Lt(e,r),4&t&&-1<Mt.indexOf(e)){for(;null!==i;){var a=bi(i);if(null!==a&&wt(a),null===(a=Qt(e,t,n,r))&&Wr(e,t,r,Kt,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Wr(e,t,r,null,n)}}var Kt=null;function Qt(e,t,n,r){if(Kt=null,null!==(e=mi(e=we(r))))if(null===(t=Be(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=He(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Kt=e,null}function Zt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Je()){case Xe:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Gt=null,Jt=null,Xt=null;function en(){if(Xt)return Xt;var e,t,n=Jt,r=n.length,i="value"in Gt?Gt.value:Gt.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return Xt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function an(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return U(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on,sn,ln,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=an(un),dn=U({},un,{view:0,detail:0}),fn=an(dn),pn=U({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:In,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(on=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=on=0,ln=e),on)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),hn=an(pn),vn=an(U({},pn,{dataTransfer:0})),gn=an(U({},dn,{relatedTarget:0})),yn=an(U({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),mn=U({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=an(mn),Sn=an(U({},un,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},En={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=En[e])&&!!t[e]}function In(){return xn}var _n=U({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?kn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:In,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Tn=an(_n),Cn=an(U({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=an(U({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:In})),Rn=an(U({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),Dn=U({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),On=an(Dn),Pn=[9,13,27,32],Mn=c&&"CompositionEvent"in window,Ln=null;c&&"documentMode"in document&&(Ln=document.documentMode);var An=c&&"TextEvent"in window&&!Ln,Un=c&&(!Mn||Ln&&8<Ln&&11>=Ln),jn=String.fromCharCode(32),zn=!1;function Fn(e,t){switch(e){case"keyup":return-1!==Pn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function $n(e,t,n,r){_e(r),0<(t=qr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Yn=null;function Kn(e){jr(e,0)}function Qn(e){if(Y(Si(e)))return e}function Zn(e,t){if("change"===e)return t}var Gn=!1;if(c){var Jn;if(c){var Xn="oninput"in document;if(!Xn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Xn="function"==typeof er.oninput}Jn=Xn}else Jn=!1;Gn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){qn&&(qn.detachEvent("onpropertychange",nr),Yn=qn=null)}function nr(e){if("value"===e.propertyName&&Qn(Yn)){var t=[];$n(t,Yn,e,we(e)),De(Kn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Yn=n,(qn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Qn(Yn)}function ar(e,t){if("click"===e)return Qn(t)}function or(e,t){if("input"===e||"change"===e)return Qn(t)}var sr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function lr(e,t){if(sr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!sr(e[i],t[i]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fr(){for(var e=window,t=K();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=K((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function hr(e){var t=fr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=cr(n,a);var o=cr(n,r);i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var vr=c&&"documentMode"in document&&11>=document.documentMode,gr=null,yr=null,mr=null,br=!1;function Sr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==gr||gr!==K(r)||("selectionStart"in(r=gr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},mr&&lr(mr,r)||(mr=r,0<(r=qr(yr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},Er={},xr={};function Ir(e){if(Er[e])return Er[e];if(!kr[e])return e;var t,n=kr[e];for(t in n)if(n.hasOwnProperty(t)&&t in xr)return Er[e]=n[t];return e}c&&(xr=document.createElement("div").style,"AnimationEvent"in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),"TransitionEvent"in window||delete kr.transitionend.transition);var _r=Ir("animationend"),Tr=Ir("animationiteration"),Cr=Ir("animationstart"),Nr=Ir("transitionend"),Rr=new Map,Dr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Or(e,t){Rr.set(e,t),l(t,[e])}for(var Pr=0;Pr<Dr.length;Pr++){var Mr=Dr[Pr];Or(Mr.toLowerCase(),"on"+(Mr[0].toUpperCase()+Mr.slice(1)))}Or(_r,"onAnimationEnd"),Or(Tr,"onAnimationIteration"),Or(Cr,"onAnimationStart"),Or("dblclick","onDoubleClick"),Or("focusin","onFocus"),Or("focusout","onBlur"),Or(Nr,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ar=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lr));function Ur(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,l,u){if(Ve.apply(this,arguments),Ae){if(!Ae)throw Error(a(198));var c=Ue;Ae=!1,Ue=null,je||(je=!0,ze=c)}}(r,t,void 0,e),e.currentTarget=null}function jr(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break e;Ur(i,s,u),a=l}else for(o=0;o<r.length;o++){if(l=(s=r[o]).instance,u=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break e;Ur(i,s,u),a=l}}}if(je)throw e=ze,je=!1,ze=null,e}function zr(e,t){var n=t[vi];void 0===n&&(n=t[vi]=new Set);var r=e+"__bubble";n.has(r)||(Hr(t,e,2,!1),n.add(r))}function Fr(e,t,n){var r=0;t&&(r|=4),Hr(n,e,r,t)}var Vr="_reactListening"+Math.random().toString(36).slice(2);function Br(e){if(!e[Vr]){e[Vr]=!0,o.forEach((function(t){"selectionchange"!==t&&(Ar.has(t)||Fr(t,!1,e),Fr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Vr]||(t[Vr]=!0,Fr("selectionchange",!1,t))}}function Hr(e,t,n,r){switch(Zt(t)){case 1:var i=$t;break;case 4:i=qt;break;default:i=Yt}n=i.bind(null,t,n,e),i=void 0,!Pe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Wr(e,t,n,r,i){var a=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var l=o.tag;if((3===l||4===l)&&((l=o.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;o=o.return}for(;null!==s;){if(null===(o=mi(s)))return;if(5===(l=o.tag)||6===l){r=a=o;continue e}s=s.parentNode}}r=r.return}De((function(){var r=a,i=we(n),o=[];e:{var s=Rr.get(e);if(void 0!==s){var l=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Tn;break;case"focusin":u="focus",l=gn;break;case"focusout":u="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=hn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Nn;break;case _r:case Tr:case Cr:l=yn;break;case Nr:l=Rn;break;case"scroll":l=fn;break;case"wheel":l=On;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Cn}var c=!!(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var v=(p=h).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==f&&(null!=(v=Oe(h,f))&&c.push($r(h,v,p)))),d)break;h=h.return}0<c.length&&(s=new l(s,u,null,n,i),o.push({event:s,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Se||!(u=n.relatedTarget||n.fromElement)||!mi(u)&&!u[hi])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?mi(u):null)&&(u!==(d=Be(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=hn,v="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Cn,v="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:Si(l),p=null==u?s:Si(u),(s=new c(v,h+"leave",l,n,i)).target=d,s.relatedTarget=p,v=null,mi(i)===r&&((c=new c(f,h+"enter",u,n,i)).target=p,c.relatedTarget=d,v=c),d=v,l&&u)e:{for(f=u,h=0,p=c=l;p;p=Yr(p))h++;for(p=0,v=f;v;v=Yr(v))p++;for(;0<h-p;)c=Yr(c),h--;for(;0<p-h;)f=Yr(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=Yr(c),f=Yr(f)}c=null}else c=null;null!==l&&Kr(o,s,l,c,!1),null!==u&&null!==d&&Kr(o,d,u,c,!0)}if("select"===(l=(s=r?Si(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Zn;else if(Wn(s))if(Gn)g=or;else{g=ir;var y=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ar);switch(g&&(g=g(e,r))?$n(o,g,n,i):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&ee(s,"number",s.value)),y=r?Si(r):window,e){case"focusin":(Wn(y)||"true"===y.contentEditable)&&(gr=y,yr=r,mr=null);break;case"focusout":mr=yr=gr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,Sr(o,n,i);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":Sr(o,n,i)}var m;if(Mn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Bn?Fn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Un&&"ko"!==n.locale&&(Bn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Bn&&(m=en()):(Jt="value"in(Gt=i)?Gt.value:Gt.textContent,Bn=!0)),0<(y=qr(r,b)).length&&(b=new Sn(b,e,null,n,i),o.push({event:b,listeners:y}),m?b.data=m:null!==(m=Vn(n))&&(b.data=m))),(m=An?function(e,t){switch(e){case"compositionend":return Vn(t);case"keypress":return 32!==t.which?null:(zn=!0,jn);case"textInput":return(e=t.data)===jn&&zn?null:e;default:return null}}(e,n):function(e,t){if(Bn)return"compositionend"===e||!Mn&&Fn(e,t)?(e=en(),Xt=Jt=Gt=null,Bn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Un&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=qr(r,"onBeforeInput")).length&&(i=new Sn("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=m))}jr(o,t)}))}function $r(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=Oe(e,n))&&r.unshift($r(e,a,i)),null!=(a=Oe(e,t))&&r.push($r(e,a,i))),e=e.return}return r}function Yr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Kr(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,i?null!=(l=Oe(n,a))&&o.unshift($r(n,l,s)):i||null!=(l=Oe(n,a))&&o.push($r(n,l,s))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Qr=/\r\n?/g,Zr=/\u0000|\uFFFD/g;function Gr(e){return("string"==typeof e?e:""+e).replace(Qr,"\n").replace(Zr,"")}function Jr(e,t,n){if(t=Gr(t),Gr(e)!==t&&n)throw Error(a(425))}function Xr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"==typeof setTimeout?setTimeout:void 0,ii="function"==typeof clearTimeout?clearTimeout:void 0,ai="function"==typeof Promise?Promise:void 0,oi="function"==typeof queueMicrotask?queueMicrotask:void 0!==ai?function(e){return ai.resolve(null).then(e).catch(si)}:ri;function si(e){setTimeout((function(){throw e}))}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Bt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Bt(t)}function ui(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ci(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var di=Math.random().toString(36).slice(2),fi="__reactFiber$"+di,pi="__reactProps$"+di,hi="__reactContainer$"+di,vi="__reactEvents$"+di,gi="__reactListeners$"+di,yi="__reactHandles$"+di;function mi(e){var t=e[fi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[hi]||n[fi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ci(e);null!==e;){if(n=e[fi])return n;e=ci(e)}return t}n=(e=n).parentNode}return null}function bi(e){return!(e=e[fi]||e[hi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Si(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function wi(e){return e[pi]||null}var ki=[],Ei=-1;function xi(e){return{current:e}}function Ii(e){0>Ei||(e.current=ki[Ei],ki[Ei]=null,Ei--)}function _i(e,t){Ei++,ki[Ei]=e.current,e.current=t}var Ti={},Ci=xi(Ti),Ni=xi(!1),Ri=Ti;function Di(e,t){var n=e.type.contextTypes;if(!n)return Ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Oi(e){return null!=(e=e.childContextTypes)}function Pi(){Ii(Ni),Ii(Ci)}function Mi(e,t,n){if(Ci.current!==Ti)throw Error(a(168));_i(Ci,t),_i(Ni,n)}function Li(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,H(e)||"Unknown",i));return U({},n,r)}function Ai(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ti,Ri=Ci.current,_i(Ci,e),_i(Ni,Ni.current),!0}function Ui(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Li(e,t,Ri),r.__reactInternalMemoizedMergedChildContext=e,Ii(Ni),Ii(Ci),_i(Ci,e)):Ii(Ni),_i(Ni,n)}var ji=null,zi=!1,Fi=!1;function Vi(e){null===ji?ji=[e]:ji.push(e)}function Bi(){if(!Fi&&null!==ji){Fi=!0;var e=0,t=bt;try{var n=ji;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}ji=null,zi=!1}catch(t){throw null!==ji&&(ji=ji.slice(e+1)),Ye(Xe,Bi),t}finally{bt=t,Fi=!1}}return null}var Hi=[],Wi=0,$i=null,qi=0,Yi=[],Ki=0,Qi=null,Zi=1,Gi="";function Ji(e,t){Hi[Wi++]=qi,Hi[Wi++]=$i,$i=e,qi=t}function Xi(e,t,n){Yi[Ki++]=Zi,Yi[Ki++]=Gi,Yi[Ki++]=Qi,Qi=e;var r=Zi;e=Gi;var i=32-ot(r)-1;r&=~(1<<i),n+=1;var a=32-ot(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Zi=1<<32-ot(t)+i|n<<i|r,Gi=a+e}else Zi=1<<a|n<<i|r,Gi=e}function ea(e){null!==e.return&&(Ji(e,1),Xi(e,1,0))}function ta(e){for(;e===$i;)$i=Hi[--Wi],Hi[Wi]=null,qi=Hi[--Wi],Hi[Wi]=null;for(;e===Qi;)Qi=Yi[--Ki],Yi[Ki]=null,Gi=Yi[--Ki],Yi[Ki]=null,Zi=Yi[--Ki],Yi[Ki]=null}var na=null,ra=null,ia=!1,aa=null;function oa(e,t){var n=Du(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function sa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,na=e,ra=ui(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,na=e,ra=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Qi?{id:Zi,overflow:Gi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Du(18,null,null,0)).stateNode=t,n.return=e,e.child=n,na=e,ra=null,!0);default:return!1}}function la(e){return!(!(1&e.mode)||128&e.flags)}function ua(e){if(ia){var t=ra;if(t){var n=t;if(!sa(e,t)){if(la(e))throw Error(a(418));t=ui(n.nextSibling);var r=na;t&&sa(e,t)?oa(r,n):(e.flags=-4097&e.flags|2,ia=!1,na=e)}}else{if(la(e))throw Error(a(418));e.flags=-4097&e.flags|2,ia=!1,na=e}}}function ca(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;na=e}function da(e){if(e!==na)return!1;if(!ia)return ca(e),ia=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ra)){if(la(e))throw fa(),Error(a(418));for(;t;)oa(e,t),t=ui(t.nextSibling)}if(ca(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ra=ui(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ra=null}}else ra=na?ui(e.stateNode.nextSibling):null;return!0}function fa(){for(var e=ra;e;)e=ui(e.nextSibling)}function pa(){ra=na=null,ia=!1}function ha(e){null===aa?aa=[e]:aa.push(e)}var va=S.ReactCurrentBatchConfig;function ga(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function ya(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ma(e){return(0,e._init)(e._payload)}function ba(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Pu(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Uu(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){var a=n.type;return a===E?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===O&&ma(a)===t.type)?((r=i(t,n.props)).ref=ga(e,t,n),r.return=e,r):((r=Mu(n.type,n.key,n.props,null,e.mode,r)).ref=ga(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=ju(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=Lu(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Uu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Mu(t.type,t.key,t.props,null,e.mode,n)).ref=ga(e,null,t),n.return=e,n;case k:return(t=ju(t,e.mode,n)).return=e,t;case O:return f(e,(0,t._init)(t._payload),n)}if(te(t)||L(t))return(t=Lu(t,e.mode,n,null)).return=e,t;ya(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===i?u(e,t,n,r):null;case k:return n.key===i?c(e,t,n,r):null;case O:return p(e,t,(i=n._init)(n._payload),r)}if(te(n)||L(n))return null!==i?null:d(e,t,n,r,null);ya(e,n)}return null}function h(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case w:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case k:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case O:return h(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||L(r))return d(t,e=e.get(n)||null,r,i,null);ya(t,r)}return null}function v(i,a,s,l){for(var u=null,c=null,d=a,v=a=0,g=null;null!==d&&v<s.length;v++){d.index>v?(g=d,d=null):g=d.sibling;var y=p(i,d,s[v],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(i,d),a=o(y,a,v),null===c?u=y:c.sibling=y,c=y,d=g}if(v===s.length)return n(i,d),ia&&Ji(i,v),u;if(null===d){for(;v<s.length;v++)null!==(d=f(i,s[v],l))&&(a=o(d,a,v),null===c?u=d:c.sibling=d,c=d);return ia&&Ji(i,v),u}for(d=r(i,d);v<s.length;v++)null!==(g=h(d,i,v,s[v],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?v:g.key),a=o(g,a,v),null===c?u=g:c.sibling=g,c=g);return e&&d.forEach((function(e){return t(i,e)})),ia&&Ji(i,v),u}function g(i,s,l,u){var c=L(l);if("function"!=typeof c)throw Error(a(150));if(null==(l=c.call(l)))throw Error(a(151));for(var d=c=null,v=s,g=s=0,y=null,m=l.next();null!==v&&!m.done;g++,m=l.next()){v.index>g?(y=v,v=null):y=v.sibling;var b=p(i,v,m.value,u);if(null===b){null===v&&(v=y);break}e&&v&&null===b.alternate&&t(i,v),s=o(b,s,g),null===d?c=b:d.sibling=b,d=b,v=y}if(m.done)return n(i,v),ia&&Ji(i,g),c;if(null===v){for(;!m.done;g++,m=l.next())null!==(m=f(i,m.value,u))&&(s=o(m,s,g),null===d?c=m:d.sibling=m,d=m);return ia&&Ji(i,g),c}for(v=r(i,v);!m.done;g++,m=l.next())null!==(m=h(v,i,g,m.value,u))&&(e&&null!==m.alternate&&v.delete(null===m.key?g:m.key),s=o(m,s,g),null===d?c=m:d.sibling=m,d=m);return e&&v.forEach((function(e){return t(i,e)})),ia&&Ji(i,g),c}return function e(r,a,o,l){if("object"==typeof o&&null!==o&&o.type===E&&null===o.key&&(o=o.props.children),"object"==typeof o&&null!==o){switch(o.$$typeof){case w:e:{for(var u=o.key,c=a;null!==c;){if(c.key===u){if((u=o.type)===E){if(7===c.tag){n(r,c.sibling),(a=i(c,o.props.children)).return=r,r=a;break e}}else if(c.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===O&&ma(u)===c.type){n(r,c.sibling),(a=i(c,o.props)).ref=ga(r,c,o),a.return=r,r=a;break e}n(r,c);break}t(r,c),c=c.sibling}o.type===E?((a=Lu(o.props.children,r.mode,l,o.key)).return=r,r=a):((l=Mu(o.type,o.key,o.props,null,r.mode,l)).ref=ga(r,a,o),l.return=r,r=l)}return s(r);case k:e:{for(c=o.key;null!==a;){if(a.key===c){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=ju(o,r.mode,l)).return=r,r=a}return s(r);case O:return e(r,a,(c=o._init)(o._payload),l)}if(te(o))return v(r,a,o,l);if(L(o))return g(r,a,o,l);ya(r,o)}return"string"==typeof o&&""!==o||"number"==typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=Uu(o,r.mode,l)).return=r,r=a),s(r)):n(r,a)}}var Sa=ba(!0),wa=ba(!1),ka=xi(null),Ea=null,xa=null,Ia=null;function _a(){Ia=xa=Ea=null}function Ta(e){var t=ka.current;Ii(ka),e._currentValue=t}function Ca(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Na(e,t){Ea=e,Ia=xa=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(bs=!0),e.firstContext=null)}function Ra(e){var t=e._currentValue;if(Ia!==e)if(e={context:e,memoizedValue:t,next:null},null===xa){if(null===Ea)throw Error(a(308));xa=e,Ea.dependencies={lanes:0,firstContext:e}}else xa=xa.next=e;return t}var Da=null;function Oa(e){null===Da?Da=[e]:Da.push(e)}function Pa(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Oa(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ma(e,r)}function Ma(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var La=!1;function Aa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ua(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ja(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Cl){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ma(e,n)}return null===(i=r.interleaved)?(t.next=t,Oa(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ma(e,n)}function Fa(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,mt(e,n)}}function Va(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ba(e,t,n,r){var i=e.updateQueue;La=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,u=l.next;l.next=null,null===o?a=u:o.next=u,o=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==o&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==a){var d=i.baseState;for(o=0,c=u=l=null,s=a;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,v=s;switch(f=t,p=n,v.tag){case 1:if("function"==typeof(h=v.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=v.payload)?h.call(p,d,f):h))break e;d=U({},d,f);break e;case 2:La=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,o|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===c&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);Al|=o,e.lanes=o,e.memoizedState=d}}function Ha(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var Wa={},$a=xi(Wa),qa=xi(Wa),Ya=xi(Wa);function Ka(e){if(e===Wa)throw Error(a(174));return e}function Qa(e,t){switch(_i(Ya,t),_i(qa,e),_i($a,Wa),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ii($a),_i($a,t)}function Za(){Ii($a),Ii(qa),Ii(Ya)}function Ga(e){Ka(Ya.current);var t=Ka($a.current),n=le(t,e.type);t!==n&&(_i(qa,e),_i($a,n))}function Ja(e){qa.current===e&&(Ii($a),Ii(qa))}var Xa=xi(0);function eo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var to=[];function no(){for(var e=0;e<to.length;e++)to[e]._workInProgressVersionPrimary=null;to.length=0}var ro=S.ReactCurrentDispatcher,io=S.ReactCurrentBatchConfig,ao=0,oo=null,so=null,lo=null,uo=!1,co=!1,fo=0,po=0;function ho(){throw Error(a(321))}function vo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function go(e,t,n,r,i,o){if(ao=o,oo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ro.current=null===e||null===e.memoizedState?Xo:es,e=n(r,i),co){o=0;do{if(co=!1,fo=0,25<=o)throw Error(a(301));o+=1,lo=so=null,t.updateQueue=null,ro.current=ts,e=n(r,i)}while(co)}if(ro.current=Jo,t=null!==so&&null!==so.next,ao=0,lo=so=oo=null,uo=!1,t)throw Error(a(300));return e}function yo(){var e=0!==fo;return fo=0,e}function mo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===lo?oo.memoizedState=lo=e:lo=lo.next=e,lo}function bo(){if(null===so){var e=oo.alternate;e=null!==e?e.memoizedState:null}else e=so.next;var t=null===lo?oo.memoizedState:lo.next;if(null!==t)lo=t,so=e;else{if(null===e)throw Error(a(310));e={memoizedState:(so=e).memoizedState,baseState:so.baseState,baseQueue:so.baseQueue,queue:so.queue,next:null},null===lo?oo.memoizedState=lo=e:lo=lo.next=e}return lo}function So(e,t){return"function"==typeof t?t(e):t}function wo(e){var t=bo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=so,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var l=s=null,u=null,c=o;do{var d=c.lane;if((ao&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=f,s=r):u=u.next=f,oo.lanes|=d,Al|=d}c=c.next}while(null!==c&&c!==o);null===u?s=r:u.next=l,sr(r,t.memoizedState)||(bs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,oo.lanes|=o,Al|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ko(e){var t=bo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);sr(o,t.memoizedState)||(bs=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Eo(){}function xo(e,t){var n=oo,r=bo(),i=t(),o=!sr(r.memoizedState,i);if(o&&(r.memoizedState=i,bs=!0),r=r.queue,Ao(To.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==lo&&1&lo.memoizedState.tag){if(n.flags|=2048,Do(9,_o.bind(null,n,r,i,t),void 0,null),null===Nl)throw Error(a(349));30&ao||Io(n,t,i)}return i}function Io(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=oo.updateQueue)?(t={lastEffect:null,stores:null},oo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function _o(e,t,n,r){t.value=n,t.getSnapshot=r,Co(t)&&No(e)}function To(e,t,n){return n((function(){Co(t)&&No(e)}))}function Co(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(e){return!0}}function No(e){var t=Ma(e,1);null!==t&&nu(t,e,1,-1)}function Ro(e){var t=mo();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:So,lastRenderedState:e},t.queue=e,e=e.dispatch=Ko.bind(null,oo,e),[t.memoizedState,e]}function Do(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=oo.updateQueue)?(t={lastEffect:null,stores:null},oo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Oo(){return bo().memoizedState}function Po(e,t,n,r){var i=mo();oo.flags|=e,i.memoizedState=Do(1|t,n,void 0,void 0===r?null:r)}function Mo(e,t,n,r){var i=bo();r=void 0===r?null:r;var a=void 0;if(null!==so){var o=so.memoizedState;if(a=o.destroy,null!==r&&vo(r,o.deps))return void(i.memoizedState=Do(t,n,a,r))}oo.flags|=e,i.memoizedState=Do(1|t,n,a,r)}function Lo(e,t){return Po(8390656,8,e,t)}function Ao(e,t){return Mo(2048,8,e,t)}function Uo(e,t){return Mo(4,2,e,t)}function jo(e,t){return Mo(4,4,e,t)}function zo(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Fo(e,t,n){return n=null!=n?n.concat([e]):null,Mo(4,4,zo.bind(null,t,e),n)}function Vo(){}function Bo(e,t){var n=bo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&vo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ho(e,t){var n=bo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&vo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Wo(e,t,n){return 21&ao?(sr(n,t)||(n=vt(),oo.lanes|=n,Al|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,bs=!0),e.memoizedState=n)}function $o(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=io.transition;io.transition={};try{e(!1),t()}finally{bt=n,io.transition=r}}function qo(){return bo().memoizedState}function Yo(e,t,n){var r=tu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Qo(e))Zo(t,n);else if(null!==(n=Pa(e,t,n,r))){nu(n,e,r,eu()),Go(n,t,r)}}function Ko(e,t,n){var r=tu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qo(e))Zo(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,o)){var l=t.interleaved;return null===l?(i.next=i,Oa(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Pa(e,t,i,r))&&(nu(n,e,r,i=eu()),Go(n,t,r))}}function Qo(e){var t=e.alternate;return e===oo||null!==t&&t===oo}function Zo(e,t){co=uo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Go(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,mt(e,n)}}var Jo={readContext:Ra,useCallback:ho,useContext:ho,useEffect:ho,useImperativeHandle:ho,useInsertionEffect:ho,useLayoutEffect:ho,useMemo:ho,useReducer:ho,useRef:ho,useState:ho,useDebugValue:ho,useDeferredValue:ho,useTransition:ho,useMutableSource:ho,useSyncExternalStore:ho,useId:ho,unstable_isNewReconciler:!1},Xo={readContext:Ra,useCallback:function(e,t){return mo().memoizedState=[e,void 0===t?null:t],e},useContext:Ra,useEffect:Lo,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Po(4194308,4,zo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Po(4194308,4,e,t)},useInsertionEffect:function(e,t){return Po(4,2,e,t)},useMemo:function(e,t){var n=mo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=mo();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Yo.bind(null,oo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},mo().memoizedState=e},useState:Ro,useDebugValue:Vo,useDeferredValue:function(e){return mo().memoizedState=e},useTransition:function(){var e=Ro(!1),t=e[0];return e=$o.bind(null,e[1]),mo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=oo,i=mo();if(ia){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Nl)throw Error(a(349));30&ao||Io(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Lo(To.bind(null,r,o,e),[e]),r.flags|=2048,Do(9,_o.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=mo(),t=Nl.identifierPrefix;if(ia){var n=Gi;t=":"+t+"R"+(n=(Zi&~(1<<32-ot(Zi)-1)).toString(32)+n),0<(n=fo++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=po++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Ra,useCallback:Bo,useContext:Ra,useEffect:Ao,useImperativeHandle:Fo,useInsertionEffect:Uo,useLayoutEffect:jo,useMemo:Ho,useReducer:wo,useRef:Oo,useState:function(){return wo(So)},useDebugValue:Vo,useDeferredValue:function(e){return Wo(bo(),so.memoizedState,e)},useTransition:function(){return[wo(So)[0],bo().memoizedState]},useMutableSource:Eo,useSyncExternalStore:xo,useId:qo,unstable_isNewReconciler:!1},ts={readContext:Ra,useCallback:Bo,useContext:Ra,useEffect:Ao,useImperativeHandle:Fo,useInsertionEffect:Uo,useLayoutEffect:jo,useMemo:Ho,useReducer:ko,useRef:Oo,useState:function(){return ko(So)},useDebugValue:Vo,useDeferredValue:function(e){var t=bo();return null===so?t.memoizedState=e:Wo(t,so.memoizedState,e)},useTransition:function(){return[ko(So)[0],bo().memoizedState]},useMutableSource:Eo,useSyncExternalStore:xo,useId:qo,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=U({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:U({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var is={isMounted:function(e){return!!(e=e._reactInternals)&&Be(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),a=ja(r,i);a.payload=t,null!=n&&(a.callback=n),null!==(t=za(e,a,i))&&(nu(t,e,i,r),Fa(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),a=ja(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=za(e,a,i))&&(nu(t,e,i,r),Fa(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=eu(),r=tu(e),i=ja(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=za(e,i,r))&&(nu(t,e,r,n),Fa(t,e,r))}};function as(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,a))}function os(e,t,n){var r=!1,i=Ti,a=t.contextType;return"object"==typeof a&&null!==a?a=Ra(a):(i=Oi(t)?Ri:Ci.current,a=(r=null!=(r=t.contextTypes))?Di(e,i):Ti),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function ss(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&is.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Aa(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=Ra(a):(a=Oi(t)?Ri:Ci.current,i.context=Di(e,a)),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(rs(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&is.enqueueReplaceState(i,i.state,null),Ba(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function us(e,t){try{var n="",r=t;do{n+=V(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function cs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var fs="function"==typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=ja(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wl||(Wl=!0,$l=r),ds(0,t)},n}function hs(e,t,n){(n=ja(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ds(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!=typeof r&&(null===ql?ql=new Set([this]):ql.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function vs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fs;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Iu.bind(null,e,t,n),t.then(e,e))}function gs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=ja(-1,1)).tag=2,za(n,t,1))),n.lanes|=1),e)}var ms=S.ReactCurrentOwner,bs=!1;function Ss(e,t,n,r){t.child=null===e?wa(t,null,n,r):Sa(t,e.child,n,r)}function ws(e,t,n,r,i){n=n.render;var a=t.ref;return Na(t,i),r=go(e,t,n,r,a,i),n=yo(),null===e||bs?(ia&&n&&ea(t),t.flags|=1,Ss(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ws(e,t,i))}function ks(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Ou(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Mu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Es(e,t,a,r,i))}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(o,r)&&e.ref===t.ref)return Ws(e,t,i)}return t.flags|=1,(e=Pu(a,r)).ref=t.ref,e.return=t,t.child=e}function Es(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(lr(a,r)&&e.ref===t.ref){if(bs=!1,t.pendingProps=r=a,!(e.lanes&i))return t.lanes=e.lanes,Ws(e,t,i);131072&e.flags&&(bs=!0)}}return _s(e,t,n,r,i)}function xs(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,_i(Pl,Ol),Ol|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,_i(Pl,Ol),Ol|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},_i(Pl,Ol),Ol|=n;else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,_i(Pl,Ol),Ol|=r;return Ss(e,t,i,n),t.child}function Is(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function _s(e,t,n,r,i){var a=Oi(n)?Ri:Ci.current;return a=Di(t,a),Na(t,i),n=go(e,t,n,r,a,i),r=yo(),null===e||bs?(ia&&r&&ea(t),t.flags|=1,Ss(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ws(e,t,i))}function Ts(e,t,n,r,i){if(Oi(n)){var a=!0;Ai(t)}else a=!1;if(Na(t,i),null===t.stateNode)Hs(e,t),os(t,n,r),ls(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,u=n.contextType;"object"==typeof u&&null!==u?u=Ra(u):u=Di(t,u=Oi(n)?Ri:Ci.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof o.getSnapshotBeforeUpdate;d||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||l!==u)&&ss(t,o,r,u),La=!1;var f=t.memoizedState;o.state=f,Ba(t,r,o,i),l=t.memoizedState,s!==r||f!==l||Ni.current||La?("function"==typeof c&&(rs(t,n,c,r),l=t.memoizedState),(s=La||as(t,n,s,r,f,l,u))?(d||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=s):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Ua(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ns(t.type,s),o.props=u,d=t.pendingProps,f=o.context,"object"==typeof(l=n.contextType)&&null!==l?l=Ra(l):l=Di(t,l=Oi(n)?Ri:Ci.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==d||f!==l)&&ss(t,o,r,l),La=!1,f=t.memoizedState,o.state=f,Ba(t,r,o,i);var h=t.memoizedState;s!==d||f!==h||Ni.current||La?("function"==typeof p&&(rs(t,n,p,r),h=t.memoizedState),(u=La||as(t,n,u,r,f,h,l)||!1)?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,h,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=l,r=u):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Cs(e,t,n,r,a,i)}function Cs(e,t,n,r,i,a){Is(e,t);var o=!!(128&t.flags);if(!r&&!o)return i&&Ui(t,n,!1),Ws(e,t,a);r=t.stateNode,ms.current=t;var s=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=Sa(t,e.child,null,a),t.child=Sa(t,null,s,a)):Ss(e,t,s,a),t.memoizedState=r.state,i&&Ui(t,n,!0),t.child}function Ns(e){var t=e.stateNode;t.pendingContext?Mi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Mi(0,t.context,!1),Qa(e,t.containerInfo)}function Rs(e,t,n,r,i){return pa(),ha(i),t.flags|=256,Ss(e,t,n,r),t.child}var Ds,Os,Ps,Ms,Ls={dehydrated:null,treeContext:null,retryLane:0};function As(e){return{baseLanes:e,cachePool:null,transitions:null}}function Us(e,t,n){var r,i=t.pendingProps,o=Xa.current,s=!1,l=!!(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&!!(2&o)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),_i(Xa,1&o),null===e)return ua(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},1&i||null===s?s=Au(l,i,0,null):(s.childLanes=0,s.pendingProps=l),e=Lu(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=As(n),t.memoizedState=Ls,e):js(t,l));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,s){if(n)return 256&t.flags?(t.flags&=-257,zs(e,t,s,r=cs(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Au({mode:"visible",children:r.children},i,0,null),(o=Lu(o,i,s,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,1&t.mode&&Sa(t,e.child,null,s),t.child.memoizedState=As(s),t.memoizedState=Ls,o);if(!(1&t.mode))return zs(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,zs(e,t,s,r=cs(o=Error(a(419)),r,void 0))}if(l=!!(s&e.childLanes),bs||l){if(null!==(r=Nl)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=i&(r.suspendedLanes|s)?0:i)&&i!==o.retryLane&&(o.retryLane=i,Ma(e,i),nu(r,e,i,-1))}return vu(),zs(e,t,s,r=cs(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Tu.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ra=ui(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(Yi[Ki++]=Zi,Yi[Ki++]=Gi,Yi[Ki++]=Qi,Zi=e.id,Gi=e.overflow,Qi=t),t=js(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,o,n);if(s){s=i.fallback,l=t.mode,r=(o=e.child).sibling;var u={mode:"hidden",children:i.children};return 1&l||t.child===o?(i=Pu(o,u)).subtreeFlags=14680064&o.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null),null!==r?s=Pu(r,s):(s=Lu(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?As(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ls,i}return e=(s=e.child).sibling,i=Pu(s,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function js(e,t){return(t=Au({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function zs(e,t,n,r){return null!==r&&ha(r),Sa(t,e.child,null,n),(e=js(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ca(e.return,t,n)}function Vs(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Bs(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Ss(e,t,r.children,n),2&(r=Xa.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fs(e,n,t);else if(19===e.tag)Fs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(_i(Xa,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===eo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Vs(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===eo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Vs(t,!0,n,null,a);break;case"together":Vs(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Hs(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ws(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Al|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Pu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Pu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function $s(e,t){if(!ia)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ys(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qs(t),null;case 1:case 17:return Oi(t.type)&&Pi(),qs(t),null;case 3:return r=t.stateNode,Za(),Ii(Ni),Ii(Ci),no(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(da(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==aa&&(ou(aa),aa=null))),Os(e,t),qs(t),null;case 5:Ja(t);var i=Ka(Ya.current);if(n=t.type,null!==e&&null!=t.stateNode)Ps(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return qs(t),null}if(e=Ka($a.current),da(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[fi]=t,r[pi]=o,e=!!(1&t.mode),n){case"dialog":zr("cancel",r),zr("close",r);break;case"iframe":case"object":case"embed":zr("load",r);break;case"video":case"audio":for(i=0;i<Lr.length;i++)zr(Lr[i],r);break;case"source":zr("error",r);break;case"img":case"image":case"link":zr("error",r),zr("load",r);break;case"details":zr("toggle",r);break;case"input":Z(r,o),zr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},zr("invalid",r);break;case"textarea":ie(r,o),zr("invalid",r)}for(var l in me(n,o),i=null,o)if(o.hasOwnProperty(l)){var u=o[l];"children"===l?"string"==typeof u?r.textContent!==u&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,u,e),i=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,u,e),i=["children",""+u]):s.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&zr("scroll",r)}switch(n){case"input":q(r),X(r,o,!0);break;case"textarea":q(r),oe(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=Xr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[fi]=t,e[pi]=r,Ds(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":zr("cancel",e),zr("close",e),i=r;break;case"iframe":case"object":case"embed":zr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Lr.length;i++)zr(Lr[i],e);i=r;break;case"source":zr("error",e),i=r;break;case"img":case"image":case"link":zr("error",e),zr("load",e),i=r;break;case"details":zr("toggle",e),i=r;break;case"input":Z(e,r),i=Q(e,r),zr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=U({},r,{value:void 0}),zr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),zr("invalid",e)}for(o in me(n,i),u=i)if(u.hasOwnProperty(o)){var c=u[o];"style"===o?ge(e,c):"dangerouslySetInnerHTML"===o?null!=(c=c?c.__html:void 0)&&de(e,c):"children"===o?"string"==typeof c?("textarea"!==n||""!==c)&&fe(e,c):"number"==typeof c&&fe(e,""+c):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(s.hasOwnProperty(o)?null!=c&&"onScroll"===o&&zr("scroll",e):null!=c&&b(e,o,c,l))}switch(n){case"input":q(e),X(e,r,!1);break;case"textarea":q(e),oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+W(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?ne(e,!!r.multiple,o,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Xr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return qs(t),null;case 6:if(e&&null!=t.stateNode)Ms(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(n=Ka(Ya.current),Ka($a.current),da(t)){if(r=t.stateNode,n=t.memoizedProps,r[fi]=t,(o=r.nodeValue!==n)&&null!==(e=na))switch(e.tag){case 3:Jr(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[fi]=t,t.stateNode=r}return qs(t),null;case 13:if(Ii(Xa),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ia&&null!==ra&&1&t.mode&&!(128&t.flags))fa(),pa(),t.flags|=98560,o=!1;else if(o=da(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(a(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(a(317));o[fi]=t}else pa(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;qs(t),o=!1}else null!==aa&&(ou(aa),aa=null),o=!0;if(!o)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&Xa.current?0===Ml&&(Ml=3):vu())),null!==t.updateQueue&&(t.flags|=4),qs(t),null);case 4:return Za(),Os(e,t),null===e&&Br(t.stateNode.containerInfo),qs(t),null;case 10:return Ta(t.type._context),qs(t),null;case 19:if(Ii(Xa),null===(o=t.memoizedState))return qs(t),null;if(r=!!(128&t.flags),null===(l=o.rendering))if(r)$s(o,!1);else{if(0!==Ml||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=eo(e))){for(t.flags|=128,$s(o,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(l=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return _i(Xa,1&Xa.current|2),t.child}e=e.sibling}null!==o.tail&&Ge()>Bl&&(t.flags|=128,r=!0,$s(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=eo(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),$s(o,!0),null===o.tail&&"hidden"===o.tailMode&&!l.alternate&&!ia)return qs(t),null}else 2*Ge()-o.renderingStartTime>Bl&&1073741824!==n&&(t.flags|=128,r=!0,$s(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=o.last)?n.sibling=l:t.child=l,o.last=l)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ge(),t.sibling=null,n=Xa.current,_i(Xa,r?1&n|2:1&n),t):(qs(t),null);case 22:case 23:return du(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Ol)&&(qs(t),6&t.subtreeFlags&&(t.flags|=8192)):qs(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Ks(e,t){switch(ta(t),t.tag){case 1:return Oi(t.type)&&Pi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Za(),Ii(Ni),Ii(Ci),no(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Ja(t),null;case 13:if(Ii(Xa),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));pa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ii(Xa),null;case 4:return Za(),null;case 10:return Ta(t.type._context),null;case 22:case 23:return du(),null;default:return null}}Ds=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Os=function(){},Ps=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ka($a.current);var a,o=null;switch(n){case"input":i=Q(e,i),r=Q(e,r),o=[];break;case"select":i=U({},i,{value:void 0}),r=U({},r,{value:void 0}),o=[];break;case"textarea":i=re(e,i),r=re(e,r),o=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Xr)}for(c in me(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var l=i[c];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(o||(o=[]),o.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(o=o||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(o=o||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(s.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&zr("scroll",e),o||l===u||(o=[])):(o=o||[]).push(c,u))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}},Ms=function(e,t,n,r){n!==r&&(t.flags|=4)};var Qs=!1,Zs=!1,Gs="function"==typeof WeakSet?WeakSet:Set,Js=null;function Xs(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){xu(e,t,n)}else n.current=null}function el(e,t,n){try{n()}catch(n){xu(e,t,n)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&el(t,n,a)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function al(e){var t=e.alternate;null!==t&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[fi],delete t[pi],delete t[vi],delete t[gi],delete t[yi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ol(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ol(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Xr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var cl=null,dl=!1;function fl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Zs||Xs(n,t);case 6:var r=cl,i=dl;cl=null,fl(e,t,n),dl=i,null!==(cl=r)&&(dl?(e=cl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cl.removeChild(n.stateNode));break;case 18:null!==cl&&(dl?(e=cl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Bt(e)):li(cl,n.stateNode));break;case 4:r=cl,i=dl,cl=n.stateNode.containerInfo,dl=!0,fl(e,t,n),cl=r,dl=i;break;case 0:case 11:case 14:case 15:if(!Zs&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(2&a||4&a)&&el(n,t,o),i=i.next}while(i!==r)}fl(e,t,n);break;case 1:if(!Zs&&(Xs(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){xu(n,t,e)}fl(e,t,n);break;case 21:fl(e,t,n);break;case 22:1&n.mode?(Zs=(r=Zs)||null!==n.memoizedState,fl(e,t,n),Zs=r):fl(e,t,n);break;default:fl(e,t,n)}}function hl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Gs),t.forEach((function(t){var r=Cu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function vl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:cl=l.stateNode,dl=!1;break e;case 3:case 4:cl=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===cl)throw Error(a(160));pl(o,s,i),cl=null,dl=!1;var u=i.alternate;null!==u&&(u.return=null),i.return=null}catch(e){xu(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vl(t,e),yl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(t){xu(e,e.return,t)}try{nl(5,e,e.return)}catch(t){xu(e,e.return,t)}}break;case 1:vl(t,e),yl(e),512&r&&null!==n&&Xs(n,n.return);break;case 5:if(vl(t,e),yl(e),512&r&&null!==n&&Xs(n,n.return),32&e.flags){var i=e.stateNode;try{fe(i,"")}catch(t){xu(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,s=null!==n?n.memoizedProps:o,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===o.type&&null!=o.name&&G(i,o),be(l,s);var c=be(l,o);for(s=0;s<u.length;s+=2){var d=u[s],f=u[s+1];"style"===d?ge(i,f):"dangerouslySetInnerHTML"===d?de(i,f):"children"===d?fe(i,f):b(i,d,f,c)}switch(l){case"input":J(i,o);break;case"textarea":ae(i,o);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;null!=h?ne(i,!!o.multiple,h,!1):p!==!!o.multiple&&(null!=o.defaultValue?ne(i,!!o.multiple,o.defaultValue,!0):ne(i,!!o.multiple,o.multiple?[]:"",!1))}i[pi]=o}catch(t){xu(e,e.return,t)}}break;case 6:if(vl(t,e),yl(e),4&r){if(null===e.stateNode)throw Error(a(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(t){xu(e,e.return,t)}}break;case 3:if(vl(t,e),yl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Bt(t.containerInfo)}catch(t){xu(e,e.return,t)}break;case 4:default:vl(t,e),yl(e);break;case 13:vl(t,e),yl(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(Vl=Ge())),4&r&&hl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Zs=(c=Zs)||d,vl(t,e),Zs=c):vl(t,e),yl(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&1&e.mode)for(Js=e,d=e.child;null!==d;){for(f=Js=d;null!==Js;){switch(h=(p=Js).child,p.tag){case 0:case 11:case 14:case 15:nl(4,p,p.return);break;case 1:Xs(p,p.return);var v=p.stateNode;if("function"==typeof v.componentWillUnmount){r=p,n=p.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(e){xu(r,n,e)}}break;case 5:Xs(p,p.return);break;case 22:if(null!==p.memoizedState){wl(f);continue}}null!==h?(h.return=p,Js=h):wl(f)}d=d.sibling}e:for(d=null,f=e;;){if(5===f.tag){if(null===d){d=f;try{i=f.stateNode,c?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(l=f.stateNode,s=null!=(u=f.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,l.style.display=ve("display",s))}catch(t){xu(e,e.return,t)}}}else if(6===f.tag){if(null===d)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(t){xu(e,e.return,t)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:vl(t,e),yl(e),4&r&&hl(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ol(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(fe(i,""),r.flags&=-33),ul(e,sl(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;ll(e,sl(e),o);break;default:throw Error(a(161))}}catch(t){xu(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ml(e,t,n){Js=e,bl(e,t,n)}function bl(e,t,n){for(var r=!!(1&e.mode);null!==Js;){var i=Js,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||Qs;if(!o){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Zs;s=Qs;var u=Zs;if(Qs=o,(Zs=l)&&!u)for(Js=i;null!==Js;)l=(o=Js).child,22===o.tag&&null!==o.memoizedState?kl(i):null!==l?(l.return=o,Js=l):kl(i);for(;null!==a;)Js=a,bl(a,t,n),a=a.sibling;Js=i,Qs=s,Zs=u}Sl(e)}else 8772&i.subtreeFlags&&null!==a?(a.return=i,Js=a):Sl(e)}}function Sl(e){for(;null!==Js;){var t=Js;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Zs||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Zs)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Ha(t,o,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ha(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&Bt(f)}}}break;default:throw Error(a(163))}Zs||512&t.flags&&il(t)}catch(e){xu(t,t.return,e)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function wl(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function kl(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(e){xu(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){xu(t,i,e)}}var a=t.return;try{il(t)}catch(e){xu(t,a,e)}break;case 5:var o=t.return;try{il(t)}catch(e){xu(t,o,e)}}}catch(e){xu(t,t.return,e)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var El,xl=Math.ceil,Il=S.ReactCurrentDispatcher,_l=S.ReactCurrentOwner,Tl=S.ReactCurrentBatchConfig,Cl=0,Nl=null,Rl=null,Dl=0,Ol=0,Pl=xi(0),Ml=0,Ll=null,Al=0,Ul=0,jl=0,zl=null,Fl=null,Vl=0,Bl=1/0,Hl=null,Wl=!1,$l=null,ql=null,Yl=!1,Kl=null,Ql=0,Zl=0,Gl=null,Jl=-1,Xl=0;function eu(){return 6&Cl?Ge():-1!==Jl?Jl:Jl=Ge()}function tu(e){return 1&e.mode?2&Cl&&0!==Dl?Dl&-Dl:null!==va.transition?(0===Xl&&(Xl=vt()),Xl):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Zt(e.type):1}function nu(e,t,n,r){if(50<Zl)throw Zl=0,Gl=null,Error(a(185));yt(e,n,r),2&Cl&&e===Nl||(e===Nl&&(!(2&Cl)&&(Ul|=n),4===Ml&&su(e,Dl)),ru(e,r),1===n&&0===Cl&&!(1&t.mode)&&(Bl=Ge()+500,zi&&Bi()))}function ru(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-ot(a),s=1<<o,l=i[o];-1===l?s&n&&!(s&r)||(i[o]=pt(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=ft(e,e===Nl?Dl:0);if(0===r)null!==n&&Ke(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ke(n),1===t)0===e.tag?function(e){zi=!0,Vi(e)}(lu.bind(null,e)):Vi(lu.bind(null,e)),oi((function(){!(6&Cl)&&Bi()})),n=null;else{switch(St(r)){case 1:n=Xe;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Nu(n,iu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function iu(e,t){if(Jl=-1,Xl=0,6&Cl)throw Error(a(327));var n=e.callbackNode;if(ku()&&e.callbackNode!==n)return null;var r=ft(e,e===Nl?Dl:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=gu(e,r);else{t=r;var i=Cl;Cl|=2;var o=hu();for(Nl===e&&Dl===t||(Hl=null,Bl=Ge()+500,fu(e,t));;)try{mu();break}catch(t){pu(e,t)}_a(),Il.current=o,Cl=i,null!==Rl?t=0:(Nl=null,Dl=0,t=Ml)}if(0!==t){if(2===t&&(0!==(i=ht(e))&&(r=i,t=au(e,i))),1===t)throw n=Ll,fu(e,0),su(e,r),ru(e,Ge()),n;if(6===t)su(e,r);else{if(i=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!sr(a(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)||(t=gu(e,r),2===t&&(o=ht(e),0!==o&&(r=o,t=au(e,o))),1!==t)))throw n=Ll,fu(e,0),su(e,r),ru(e,Ge()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:wu(e,Fl,Hl);break;case 3:if(su(e,r),(130023424&r)===r&&10<(t=Vl+500-Ge())){if(0!==ft(e,0))break;if(((i=e.suspendedLanes)&r)!==r){eu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(wu.bind(null,e,Fl,Hl),t);break}wu(e,Fl,Hl);break;case 4:if(su(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-ot(r);o=1<<s,(s=t[s])>i&&(i=s),r&=~o}if(r=i,10<(r=(120>(r=Ge()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xl(r/1960))-r)){e.timeoutHandle=ri(wu.bind(null,e,Fl,Hl),r);break}wu(e,Fl,Hl);break;default:throw Error(a(329))}}}return ru(e,Ge()),e.callbackNode===n?iu.bind(null,e):null}function au(e,t){var n=zl;return e.current.memoizedState.isDehydrated&&(fu(e,t).flags|=256),2!==(e=gu(e,t))&&(t=Fl,Fl=n,null!==t&&ou(t)),e}function ou(e){null===Fl?Fl=e:Fl.push.apply(Fl,e)}function su(e,t){for(t&=~jl,t&=~Ul,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function lu(e){if(6&Cl)throw Error(a(327));ku();var t=ft(e,0);if(!(1&t))return ru(e,Ge()),null;var n=gu(e,t);if(0!==e.tag&&2===n){var r=ht(e);0!==r&&(t=r,n=au(e,r))}if(1===n)throw n=Ll,fu(e,0),su(e,t),ru(e,Ge()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wu(e,Fl,Hl),ru(e,Ge()),null}function uu(e,t){var n=Cl;Cl|=1;try{return e(t)}finally{0===(Cl=n)&&(Bl=Ge()+500,zi&&Bi())}}function cu(e){null!==Kl&&0===Kl.tag&&!(6&Cl)&&ku();var t=Cl;Cl|=1;var n=Tl.transition,r=bt;try{if(Tl.transition=null,bt=1,e)return e()}finally{bt=r,Tl.transition=n,!(6&(Cl=t))&&Bi()}}function du(){Ol=Pl.current,Ii(Pl)}function fu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Rl)for(n=Rl.return;null!==n;){var r=n;switch(ta(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Pi();break;case 3:Za(),Ii(Ni),Ii(Ci),no();break;case 5:Ja(r);break;case 4:Za();break;case 13:case 19:Ii(Xa);break;case 10:Ta(r.type._context);break;case 22:case 23:du()}n=n.return}if(Nl=e,Rl=e=Pu(e.current,null),Dl=Ol=t,Ml=0,Ll=null,jl=Ul=Al=0,Fl=zl=null,null!==Da){for(t=0;t<Da.length;t++)if(null!==(r=(n=Da[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}Da=null}return e}function pu(e,t){for(;;){var n=Rl;try{if(_a(),ro.current=Jo,uo){for(var r=oo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}uo=!1}if(ao=0,lo=so=oo=null,co=!1,fo=0,_l.current=null,null===n||null===n.return){Ml=1,Ll=t,Rl=null;break}e:{var o=e,s=n.return,l=n,u=t;if(t=Dl,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,d=l,f=d.tag;if(!(1&d.mode||0!==f&&11!==f&&15!==f)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=gs(s);if(null!==h){h.flags&=-257,ys(h,s,l,0,t),1&h.mode&&vs(o,c,t),u=c;var v=(t=h).updateQueue;if(null===v){var g=new Set;g.add(u),t.updateQueue=g}else v.add(u);break e}if(!(1&t)){vs(o,c,t),vu();break e}u=Error(a(426))}else if(ia&&1&l.mode){var y=gs(s);if(null!==y){!(65536&y.flags)&&(y.flags|=256),ys(y,s,l,0,t),ha(us(u,l));break e}}o=u=us(u,l),4!==Ml&&(Ml=2),null===zl?zl=[o]:zl.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Va(o,ps(0,u,t));break e;case 1:l=u;var m=o.type,b=o.stateNode;if(!(128&o.flags||"function"!=typeof m.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==ql&&ql.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t,Va(o,hs(o,l,t));break e}}o=o.return}while(null!==o)}Su(n)}catch(e){t=e,Rl===n&&null!==n&&(Rl=n=n.return);continue}break}}function hu(){var e=Il.current;return Il.current=Jo,null===e?Jo:e}function vu(){0!==Ml&&3!==Ml&&2!==Ml||(Ml=4),null===Nl||!(268435455&Al)&&!(268435455&Ul)||su(Nl,Dl)}function gu(e,t){var n=Cl;Cl|=2;var r=hu();for(Nl===e&&Dl===t||(Hl=null,fu(e,t));;)try{yu();break}catch(t){pu(e,t)}if(_a(),Cl=n,Il.current=r,null!==Rl)throw Error(a(261));return Nl=null,Dl=0,Ml}function yu(){for(;null!==Rl;)bu(Rl)}function mu(){for(;null!==Rl&&!Qe();)bu(Rl)}function bu(e){var t=El(e.alternate,e,Ol);e.memoizedProps=e.pendingProps,null===t?Su(e):Rl=t,_l.current=null}function Su(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Ks(n,t)))return n.flags&=32767,void(Rl=n);if(null===e)return Ml=6,void(Rl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ys(n,t,Ol)))return void(Rl=n);if(null!==(t=t.sibling))return void(Rl=t);Rl=t=e}while(null!==t);0===Ml&&(Ml=5)}function wu(e,t,n){var r=bt,i=Tl.transition;try{Tl.transition=null,bt=1,function(e,t,n,r){do{ku()}while(null!==Kl);if(6&Cl)throw Error(a(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ot(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,o),e===Nl&&(Rl=Nl=null,Dl=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Yl||(Yl=!0,Nu(tt,(function(){return ku(),null}))),o=!!(15990&n.flags),!!(15990&n.subtreeFlags)||o){o=Tl.transition,Tl.transition=null;var s=bt;bt=1;var l=Cl;Cl|=4,_l.current=null,function(e,t){if(ei=Wt,pr(e=fr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var s=0,l=-1,u=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==n||0!==i&&3!==f.nodeType||(l=s+i),f!==o||0!==r&&3!==f.nodeType||(u=s+r),3===f.nodeType&&(s+=f.nodeValue.length),null!==(h=f.firstChild);)p=f,f=h;for(;;){if(f===e)break t;if(p===n&&++c===i&&(l=s),p===o&&++d===r&&(u=s),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Wt=!1,Js=t;null!==Js;)if(e=(t=Js).child,1028&t.subtreeFlags&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var v=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==v){var g=v.memoizedProps,y=v.memoizedState,m=t.stateNode,b=m.getSnapshotBeforeUpdate(t.elementType===t.type?g:ns(t.type,g),y);m.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var S=t.stateNode.containerInfo;1===S.nodeType?S.textContent="":9===S.nodeType&&S.documentElement&&S.removeChild(S.documentElement);break;default:throw Error(a(163))}}catch(e){xu(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}v=tl,tl=!1}(e,n),gl(n,e),hr(ti),Wt=!!ei,ti=ei=null,e.current=n,ml(n,e,i),Ze(),Cl=l,bt=s,Tl.transition=o}else e.current=n;if(Yl&&(Yl=!1,Kl=e,Ql=i),o=e.pendingLanes,0===o&&(ql=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(it,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),ru(e,Ge()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Wl)throw Wl=!1,e=$l,$l=null,e;!!(1&Ql)&&0!==e.tag&&ku(),o=e.pendingLanes,1&o?e===Gl?Zl++:(Zl=0,Gl=e):Zl=0,Bi()}(e,t,n,r)}finally{Tl.transition=i,bt=r}return null}function ku(){if(null!==Kl){var e=St(Ql),t=Tl.transition,n=bt;try{if(Tl.transition=null,bt=16>e?16:e,null===Kl)var r=!1;else{if(e=Kl,Kl=null,Ql=0,6&Cl)throw Error(a(331));var i=Cl;for(Cl|=4,Js=e.current;null!==Js;){var o=Js,s=o.child;if(16&Js.flags){var l=o.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Js=c;null!==Js;){var d=Js;switch(d.tag){case 0:case 11:case 15:nl(8,d,o)}var f=d.child;if(null!==f)f.return=d,Js=f;else for(;null!==Js;){var p=(d=Js).sibling,h=d.return;if(al(d),d===c){Js=null;break}if(null!==p){p.return=h,Js=p;break}Js=h}}}var v=o.alternate;if(null!==v){var g=v.child;if(null!==g){v.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(null!==g)}}Js=o}}if(2064&o.subtreeFlags&&null!==s)s.return=o,Js=s;else e:for(;null!==Js;){if(2048&(o=Js).flags)switch(o.tag){case 0:case 11:case 15:nl(9,o,o.return)}var m=o.sibling;if(null!==m){m.return=o.return,Js=m;break e}Js=o.return}}var b=e.current;for(Js=b;null!==Js;){var S=(s=Js).child;if(2064&s.subtreeFlags&&null!==S)S.return=s,Js=S;else e:for(s=b;null!==Js;){if(2048&(l=Js).flags)try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(e){xu(l,l.return,e)}if(l===s){Js=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Js=w;break e}Js=l.return}}if(Cl=i,Bi(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{bt=n,Tl.transition=t}}return!1}function Eu(e,t,n){e=za(e,t=ps(0,t=us(n,t),1),1),t=eu(),null!==e&&(yt(e,1,t),ru(e,t))}function xu(e,t,n){if(3===e.tag)Eu(e,e,n);else for(;null!==t;){if(3===t.tag){Eu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ql||!ql.has(r))){t=za(t,e=hs(t,e=us(n,e),1),1),e=eu(),null!==t&&(yt(t,1,e),ru(t,e));break}}t=t.return}}function Iu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=eu(),e.pingedLanes|=e.suspendedLanes&n,Nl===e&&(Dl&n)===n&&(4===Ml||3===Ml&&(130023424&Dl)===Dl&&500>Ge()-Vl?fu(e,0):jl|=n),ru(e,t)}function _u(e,t){0===t&&(1&e.mode?(t=ct,!(130023424&(ct<<=1))&&(ct=4194304)):t=1);var n=eu();null!==(e=Ma(e,t))&&(yt(e,t,n),ru(e,n))}function Tu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),_u(e,n)}function Cu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),_u(e,n)}function Nu(e,t){return Ye(e,t)}function Ru(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Du(e,t,n,r){return new Ru(e,t,n,r)}function Ou(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Pu(e,t){var n=e.alternate;return null===n?((n=Du(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Mu(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)Ou(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case E:return Lu(n.children,i,o,t);case x:s=8,i|=8;break;case I:return(e=Du(12,n,t,2|i)).elementType=I,e.lanes=o,e;case N:return(e=Du(13,n,t,i)).elementType=N,e.lanes=o,e;case R:return(e=Du(19,n,t,i)).elementType=R,e.lanes=o,e;case P:return Au(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case _:s=10;break e;case T:s=9;break e;case C:s=11;break e;case D:s=14;break e;case O:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Du(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Lu(e,t,n,r){return(e=Du(7,e,r,t)).lanes=n,e}function Au(e,t,n,r){return(e=Du(22,e,r,t)).elementType=P,e.lanes=n,e.stateNode={isHidden:!1},e}function Uu(e,t,n){return(e=Du(6,e,null,t)).lanes=n,e}function ju(e,t,n){return(t=Du(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fu(e,t,n,r,i,a,o,s,l){return e=new zu(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Du(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Aa(a),e}function Vu(e){if(!e)return Ti;e:{if(Be(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Oi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Oi(n))return Li(e,n,t)}return t}function Bu(e,t,n,r,i,a,o,s,l){return(e=Fu(n,r,!0,e,0,a,0,s,l)).context=Vu(null),n=e.current,(a=ja(r=eu(),i=tu(n))).callback=null!=t?t:null,za(n,a,i),e.current.lanes=i,yt(e,i,r),ru(e,r),e}function Hu(e,t,n,r){var i=t.current,a=eu(),o=tu(i);return n=Vu(n),null===t.context?t.context=n:t.pendingContext=n,(t=ja(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=za(i,t,o))&&(nu(e,i,o,a),Fa(e,i,o)),o}function Wu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function $u(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function qu(e,t){$u(e,t),(e=e.alternate)&&$u(e,t)}El=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ni.current)bs=!0;else{if(!(e.lanes&n||128&t.flags))return bs=!1,function(e,t,n){switch(t.tag){case 3:Ns(t),pa();break;case 5:Ga(t);break;case 1:Oi(t.type)&&Ai(t);break;case 4:Qa(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;_i(ka,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(_i(Xa,1&Xa.current),t.flags|=128,null):n&t.child.childLanes?Us(e,t,n):(_i(Xa,1&Xa.current),null!==(e=Ws(e,t,n))?e.sibling:null);_i(Xa,1&Xa.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return Bs(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),_i(Xa,Xa.current),r)break;return null;case 22:case 23:return t.lanes=0,xs(e,t,n)}return Ws(e,t,n)}(e,t,n);bs=!!(131072&e.flags)}else bs=!1,ia&&1048576&t.flags&&Xi(t,qi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var i=Di(t,Ci.current);Na(t,n),i=go(null,t,r,e,i,n);var o=yo();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oi(r)?(o=!0,Ai(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Aa(t),i.updater=is,t.stateNode=i,i._reactInternals=t,ls(t,r,e,n),t=Cs(null,t,r,!0,o,n)):(t.tag=0,ia&&o&&ea(t),Ss(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Ou(e)?1:0;if(null!=e){if((e=e.$$typeof)===C)return 11;if(e===D)return 14}return 2}(r),e=ns(r,e),i){case 0:t=_s(null,t,r,e,n);break e;case 1:t=Ts(null,t,r,e,n);break e;case 11:t=ws(null,t,r,e,n);break e;case 14:t=ks(null,t,r,ns(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,_s(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ts(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 3:e:{if(Ns(t),null===e)throw Error(a(387));r=t.pendingProps,i=(o=t.memoizedState).element,Ua(e,t),Ba(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Rs(e,t,r,n,i=us(Error(a(423)),t));break e}if(r!==i){t=Rs(e,t,r,n,i=us(Error(a(424)),t));break e}for(ra=ui(t.stateNode.containerInfo.firstChild),na=t,ia=!0,aa=null,n=wa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(pa(),r===i){t=Ws(e,t,n);break e}Ss(e,t,r,n)}t=t.child}return t;case 5:return Ga(t),null===e&&ua(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,ni(r,i)?s=null:null!==o&&ni(r,o)&&(t.flags|=32),Is(e,t),Ss(e,t,s,n),t.child;case 6:return null===e&&ua(t),null;case 13:return Us(e,t,n);case 4:return Qa(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Sa(t,null,r,n):Ss(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,ws(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 7:return Ss(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ss(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,_i(ka,r._currentValue),r._currentValue=s,null!==o)if(sr(o.value,s)){if(o.children===i.children&&!Ni.current){t=Ws(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var l=o.dependencies;if(null!==l){s=o.child;for(var u=l.firstContext;null!==u;){if(u.context===r){if(1===o.tag){(u=ja(-1,n&-n)).tag=2;var c=o.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}o.lanes|=n,null!==(u=o.alternate)&&(u.lanes|=n),Ca(o.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===o.tag)s=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(s=o.return))throw Error(a(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Ca(s,n,t),s=o.sibling}else s=o.child;if(null!==s)s.return=o;else for(s=o;null!==s;){if(s===t){s=null;break}if(null!==(o=s.sibling)){o.return=s.return,s=o;break}s=s.return}o=s}Ss(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Na(t,n),r=r(i=Ra(i)),t.flags|=1,Ss(e,t,r,n),t.child;case 14:return i=ns(r=t.type,t.pendingProps),ks(e,t,r,i=ns(r.type,i),n);case 15:return Es(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ns(r,i),Hs(e,t),t.tag=1,Oi(r)?(e=!0,Ai(t)):e=!1,Na(t,n),os(t,r,i),ls(t,r,i,n),Cs(null,t,r,!0,e,n);case 19:return Bs(e,t,n);case 22:return xs(e,t,n)}throw Error(a(156,t.tag))};var Yu="function"==typeof reportError?reportError:function(e){console.error(e)};function Ku(e){this._internalRoot=e}function Qu(e){this._internalRoot=e}function Zu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Gu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Ju(){}function Xu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if("function"==typeof i){var s=i;i=function(){var e=Wu(o);s.call(e)}}Hu(t,o,e,i)}else o=function(e,t,n,r,i){if(i){if("function"==typeof r){var a=r;r=function(){var e=Wu(o);a.call(e)}}var o=Bu(t,r,e,0,null,!1,0,"",Ju);return e._reactRootContainer=o,e[hi]=o.current,Br(8===e.nodeType?e.parentNode:e),cu(),o}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Wu(l);s.call(e)}}var l=Fu(e,0,!1,null,0,!1,0,"",Ju);return e._reactRootContainer=l,e[hi]=l.current,Br(8===e.nodeType?e.parentNode:e),cu((function(){Hu(t,l,n,r)})),l}(n,t,e,i,r);return Wu(o)}Qu.prototype.render=Ku.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Hu(e,t,null,null)},Qu.prototype.unmount=Ku.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cu((function(){Hu(null,e,null,null)})),t[hi]=null}},Qu.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pt.length&&0!==t&&t<Pt[n].priority;n++);Pt.splice(n,0,e),0===n&&Ut(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(mt(t,1|n),ru(t,Ge()),!(6&Cl)&&(Bl=Ge()+500,Bi()))}break;case 13:cu((function(){var t=Ma(e,1);if(null!==t){var n=eu();nu(t,e,1,n)}})),qu(e,1)}},kt=function(e){if(13===e.tag){var t=Ma(e,134217728);if(null!==t)nu(t,e,134217728,eu());qu(e,134217728)}},Et=function(e){if(13===e.tag){var t=tu(e),n=Ma(e,t);if(null!==n)nu(n,e,t,eu());qu(e,t)}},xt=function(){return bt},It=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},ke=function(e,t,n){switch(t){case"input":if(J(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=wi(r);if(!i)throw Error(a(90));Y(r),J(r,i)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ce=uu,Ne=cu;var ec={usingClientEntryPoint:!1,Events:[bi,Si,wi,_e,Te,uu]},tc={findFiberByHostInstance:mi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nc={bundleType:tc.bundleType,version:tc.version,rendererPackageName:tc.rendererPackageName,rendererConfig:tc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=$e(e))?null:e.stateNode},findFiberByHostInstance:tc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var rc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rc.isDisabled&&rc.supportsFiber)try{it=rc.inject(nc),at=rc}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ec,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Zu(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:k,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Zu(e))throw Error(a(299));var n=!1,r="",i=Yu;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Fu(e,1,!1,null,0,n,0,r,i),e[hi]=t.current,Br(8===e.nodeType?e.parentNode:e),new Ku(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=null===(e=$e(t))?null:e.stateNode},t.flushSync=function(e){return cu(e)},t.hydrate=function(e,t,n){if(!Gu(t))throw Error(a(200));return Xu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Zu(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",s=Yu;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Bu(t,null,e,1,null!=n?n:null,i,0,o,s),e[hi]=t.current,Br(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Qu(t)},t.render=function(e,t,n){if(!Gu(t))throw Error(a(200));return Xu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Gu(e))throw Error(a(40));return!!e._reactRootContainer&&(cu((function(){Xu(null,null,e,!1,(function(){e._reactRootContainer=null,e[hi]=null}))})),!0)},t.unstable_batchedUpdates=uu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Gu(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return Xu(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},347:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(262)},977:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}function m(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=y.prototype;var S=b.prototype=new m;S.constructor=b,v(S,y.prototype),S.isPureReactComponent=!0;var w=Array.isArray,k=Object.prototype.hasOwnProperty,E={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function I(e,t,r){var i,a={},o=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)k.call(t,i)&&!x.hasOwnProperty(i)&&(a[i]=t[i]);var l=arguments.length-2;if(1===l)a.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];a.children=u}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===a[i]&&(a[i]=l[i]);return{$$typeof:n,type:e,key:o,ref:s,props:a,_owner:E.current}}function _(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var T=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function N(e,t,i,a,o){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return o=o(l=e),e=""===a?"."+C(l,0):a,w(o)?(i="",null!=e&&(i=e.replace(T,"$&/")+"/"),N(o,t,i,"",(function(e){return e}))):null!=o&&(_(o)&&(o=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,i+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(T,"$&/")+"/")+e)),t.push(o)),1;if(l=0,a=""===a?".":a+":",w(e))for(var u=0;u<e.length;u++){var c=a+C(s=e[u],u);l+=N(s,t,i,c,o)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof c)for(e=c.call(e),u=0;!(s=e.next()).done;)l+=N(s=s.value,t,i,c=a+C(s,u++),o);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function R(e,t,n){if(null==e)return e;var r=[],i=0;return N(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function D(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O={current:null},P={transition:null},M={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:P,ReactCurrentOwner:E};function L(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:R,forEach:function(e,t,n){R(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return R(e,(function(){t++})),t},toArray:function(e){return R(e,(function(e){return e}))||[]},only:function(e){if(!_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=i,t.Profiler=o,t.PureComponent=b,t.StrictMode=a,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,t.act=L,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=v({},e.props),a=e.key,o=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,s=E.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)k.call(t,u)&&!x.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}return{$$typeof:n,type:e.type,key:a,ref:o,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=I,t.createFactory=function(e){var t=I.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=_,t.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:D}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=P.transition;P.transition={};try{e()}finally{P.transition=t}},t.unstable_act=L,t.useCallback=function(e,t){return O.current.useCallback(e,t)},t.useContext=function(e){return O.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return O.current.useDeferredValue(e)},t.useEffect=function(e,t){return O.current.useEffect(e,t)},t.useId=function(){return O.current.useId()},t.useImperativeHandle=function(e,t,n){return O.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return O.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return O.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return O.current.useMemo(e,t)},t.useReducer=function(e,t,n){return O.current.useReducer(e,t,n)},t.useRef=function(e){return O.current.useRef(e)},t.useState=function(e){return O.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return O.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return O.current.useTransition()},t.version="18.3.1"},1:(e,t,n)=>{"use strict";e.exports=n(977)},654:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>a(l,n))u<i&&0>a(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<i&&0>a(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],d=1,f=null,p=3,h=!1,v=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,m="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function S(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function w(e){if(g=!1,S(e),!v)if(null!==r(u))v=!0,P(k);else{var t=r(c);null!==t&&M(w,t.startTime-e)}}function k(e,n){v=!1,g&&(g=!1,m(_),_=-1),h=!0;var a=p;try{for(S(n),f=r(u);null!==f&&(!(f.expirationTime>n)||e&&!N());){var o=f.callback;if("function"==typeof o){f.callback=null,p=f.priorityLevel;var s=o(f.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?f.callback=s:f===r(u)&&i(u),S(n)}else i(u);f=r(u)}if(null!==f)var l=!0;else{var d=r(c);null!==d&&M(w,d.startTime-n),l=!1}return l}finally{f=null,p=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,x=!1,I=null,_=-1,T=5,C=-1;function N(){return!(t.unstable_now()-C<T)}function R(){if(null!==I){var e=t.unstable_now();C=e;var n=!0;try{n=I(!0,e)}finally{n?E():(x=!1,I=null)}}else x=!1}if("function"==typeof b)E=function(){b(R)};else if("undefined"!=typeof MessageChannel){var D=new MessageChannel,O=D.port2;D.port1.onmessage=R,E=function(){O.postMessage(null)}}else E=function(){y(R,0)};function P(e){I=e,x||(x=!0,E())}function M(e,n){_=y((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){v||h||(v=!0,P(k))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?o+a:o:a=o,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(e.sortIndex=a,n(c,e),null===r(u)&&e===r(c)&&(g?(m(_),_=-1):g=!0,M(w,a-o))):(e.sortIndex=s,n(u,e),v||h||(v=!0,P(k))),e},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},681:(e,t,n)=>{"use strict";e.exports=n(654)},145:(e,t,n)=>{"use strict";var r=n(1);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useState,o=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return s((function(){i.value=n,i.getSnapshot=t,u(i)&&c({inst:i})}),[e,n,t]),o((function(){return u(i)&&c({inst:i}),e((function(){u(i)&&c({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},594:(e,t,n)=>{"use strict";var r=n(1),i=n(11);var a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=i.useSyncExternalStore,s=r.useRef,l=r.useEffect,u=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=u((function(){function e(e){if(!l){if(l=!0,o=e,e=r(e),void 0!==i&&f.hasValue){var t=f.value;if(i(t,e))return s=t}return s=e}if(t=s,a(o,e))return t;var n=r(e);return void 0!==i&&i(t,n)?t:(o=e,s=n)}var o,s,l=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,i]);var p=o(e,d[0],d[1]);return l((function(){f.hasValue=!0,f.value=p}),[p]),c(p),p}},11:(e,t,n)=>{"use strict";e.exports=n(145)},901:(e,t,n)=>{"use strict";e.exports=n(594)},165:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},464:e=>{"use strict";e.exports=a},867:e=>{"use strict";e.exports=i},762:e=>{"use strict";e.exports=r},148:e=>{"use strict";e.exports=n},140:e=>{"use strict";e.exports=t},369:t=>{"use strict";t.exports=e},767:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:()=>r})},688:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:()=>r})},755:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(351);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,r.Z)(i.key),i)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},765:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(351);function i(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},976:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(274);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},351:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(133);function i(e){var t=function(e,t){if("object"!=(0,r.Z)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=(0,r.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.Z)(t)?t:t+""}},133:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:()=>r})},274:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(767);function i(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},485:(e,t,n)=>{"use strict";n.d(t,{$G:()=>I});var r=n(765);var i=n(1),a=n(133);n(165);Object.create(null);function o(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"==typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var s={};function l(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&s[t[0]]||("string"==typeof t[0]&&(s[t[0]]=new Date),o.apply(void 0,t))}var u=function(e,t){return function(){if(e.isInitialized)t();else{e.on("initialized",(function n(){setTimeout((function(){e.off("initialized",n)}),0),t()}))}}};function c(e,t,n){e.loadNamespaces(t,u(e,n))}function d(e,t,n,r){"string"==typeof n&&(n=[n]),n.forEach((function(t){e.options.ns.indexOf(t)<0&&e.options.ns.push(t)})),e.loadLanguages(t,u(e,r))}var f=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,p={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},h=function(e){return p[e]};var v,g={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(f,h)}};var y=n(688),m=n(755);var b=(0,i.createContext)(),S=function(){function e(){(0,y.Z)(this,e),this.usedNamespaces={}}return(0,m.Z)(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();var w=n(976);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x=function(e,t){var n=(0,i.useRef)();return(0,i.useEffect)((function(){n.current=t?n.current:e}),[e,t]),n.current};function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,r=(0,i.useContext)(b)||{},o=r.i18n,s=r.defaultNS,u=n||o||v;if(u&&!u.reportNamespaces&&(u.reportNamespaces=new S),!u){l("You will need to pass in an i18next instance by using initReactI18next");var f=function(e,t){return"string"==typeof t?t:t&&"object"===(0,a.Z)(t)&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e},p=[f,{},!1];return p.t=f,p.i18n={},p.ready=!1,p}u.options.react&&void 0!==u.options.react.wait&&l("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var h=E(E(E({},g),u.options.react),t),y=h.useSuspense,m=h.keyPrefix,k=e||s||u.options&&u.options.defaultNS;k="string"==typeof k?[k]:k||["translation"],u.reportNamespaces.addUsedNamespaces&&u.reportNamespaces.addUsedNamespaces(k);var I=(u.isInitialized||u.initializedStoreOnce)&&k.every((function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{lng:n.lng,precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],i=!!t.options&&t.options.fallbackLng,a=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var o=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)||!t.hasResourceBundle(r,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!o(r,e)||i&&!o(a,e)))}(e,t,n):(l("i18n.languages were undefined or empty",t.languages),!0)}(e,u,h)}));function _(){return u.getFixedT(t.lng||null,"fallback"===h.nsMode?k:k[0],m)}var T=(0,i.useState)(_),C=(0,w.Z)(T,2),N=C[0],R=C[1],D=k.join();t.lng&&(D="".concat(t.lng).concat(D));var O=x(D),P=(0,i.useRef)(!0);(0,i.useEffect)((function(){var e=h.bindI18n,n=h.bindI18nStore;function r(){P.current&&R(_)}return P.current=!0,I||y||(t.lng?d(u,t.lng,k,(function(){P.current&&R(_)})):c(u,k,(function(){P.current&&R(_)}))),I&&O&&O!==D&&P.current&&R(_),e&&u&&u.on(e,r),n&&u&&u.store.on(n,r),function(){P.current=!1,e&&u&&e.split(" ").forEach((function(e){return u.off(e,r)})),n&&u&&n.split(" ").forEach((function(e){return u.store.off(e,r)}))}}),[u,D]);var M=(0,i.useRef)(!0);(0,i.useEffect)((function(){P.current&&!M.current&&R(_),M.current=!1}),[u,m]);var L=[N,u,I];if(L.t=N,L.i18n=u,L.ready=I,I)return L;if(!I&&!y)return L;throw new Promise((function(e){t.lng?d(u,t.lng,k,(function(){return e()})):c(u,k,(function(){return e()}))}))}}},d={};function f(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return c[e](n,n.exports,f),n.exports}f.m=c,o=[],f.O=(e,t,n,r)=>{if(!t){var i=1/0;for(u=0;u<o.length;u++){for(var[t,n,r]=o[u],a=!0,s=0;s<t.length;s++)(!1&r||i>=r)&&Object.keys(f.O).every((e=>f.O[e](t[s])))?t.splice(s--,1):(a=!1,r<i&&(i=r));if(a){o.splice(u--,1);var l=n();void 0!==l&&(e=l)}}return e}r=r||0;for(var u=o.length;u>0&&o[u-1][2]>r;u--)o[u]=o[u-1];o[u]=[t,n,r]},f.F={},f.E=e=>{Object.keys(f.F).map((t=>{f.F[t](e)}))},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},l=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var n=Object.create(null);f.r(n);var r={};s=s||[null,l({}),l([]),l(l)];for(var i=2&t&&e;"object"==typeof i&&!~s.indexOf(i);i=l(i))Object.getOwnPropertyNames(i).forEach((t=>r[t]=()=>e[t]));return r.default=()=>e,f.d(n,r),n},f.d=(e,t)=>{for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u={143:0},f.F.j=e=>{if(!f.o(u,e)||void 0===u[e]){u[e]=null;var t=document.createElement("link");f.nc&&t.setAttribute("nonce",f.nc),t.rel="prefetch",t.as="script",t.href=f.p+f.u(e),document.head.appendChild(t)}},f.O.j=e=>0===u[e],f.O(0,[143],(()=>{f.E(143)}),5);var p={};return(()=>{"use strict";f.r(p),f.d(p,{default:()=>fe});var e,t=f(419),n=f(1),r=f.t(n,2),i=f(827),a=f.n(i),o=f(347),s=f.t(o,2);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(e||(e={}));function u(e,t){if(!1===e||null==e)throw new Error(t)}function c(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var d;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(d||(d={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function h(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function v(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function g(e,t){let n=v(e);return t?n.map(((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)):n.map((e=>e.pathnameBase))}function y(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=c(e):(i=l({},e),u(!i.pathname||!i.pathname.includes("?"),h("?","pathname","search",i)),u(!i.pathname||!i.pathname.includes("#"),h("#","pathname","hash",i)),u(!i.search||!i.search.includes("#"),h("#","search","hash",i)));let a,o=""===e||""===i.pathname,s=o?"/":i.pathname;if(null==s)a=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let d=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"==typeof e?c(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:b(r),hash:S(i)}}(i,a),f=s&&"/"!==s&&s.endsWith("/"),p=(o||"."===s)&&n.endsWith("/");return d.pathname.endsWith("/")||!f&&!p||(d.pathname+="/"),d}const m=e=>e.join("/").replace(/\/\/+/g,"/"),b=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",S=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const w=["post","put","patch","delete"],k=(new Set(w),["get",...w]);new Set(k),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E.apply(this,arguments)}const x=n.createContext(null);const I=n.createContext(null);const _=n.createContext(null);const T=n.createContext({outlet:null,matches:[],isDataRoute:!1});function C(){return null!=n.useContext(_)}function N(){return C()||u(!1),n.useContext(_).location}function R(e){n.useContext(I).static||n.useLayoutEffect(e)}function D(){let{isDataRoute:e}=n.useContext(T);return e?function(){let{router:e}=M(O.UseNavigateStable),t=L(P.UseNavigateStable),r=n.useRef(!1);R((()=>{r.current=!0}));let i=n.useCallback((function(n,i){void 0===i&&(i={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,E({fromRouteId:t},i)))}),[e,t]);return i}():function(){C()||u(!1);let e=n.useContext(x),{basename:t,future:r,navigator:i}=n.useContext(I),{matches:a}=n.useContext(T),{pathname:o}=N(),s=JSON.stringify(g(a,r.v7_relativeSplatPath)),l=n.useRef(!1);return R((()=>{l.current=!0})),n.useCallback((function(n,r){if(void 0===r&&(r={}),!l.current)return;if("number"==typeof n)return void i.go(n);let a=y(n,JSON.parse(s),o,"path"===r.relative);null==e&&"/"!==t&&(a.pathname="/"===a.pathname?t:m([t,a.pathname])),(r.replace?i.replace:i.push)(a,r.state,r)}),[t,i,s,o,e])}()}n.Component;var O=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(O||{}),P=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(P||{});function M(e){let t=n.useContext(x);return t||u(!1),t}function L(e){let t=function(e){let t=n.useContext(T);return t||u(!1),t}(),r=t.matches[t.matches.length-1];return r.route.id||u(!1),r.route.id}r.startTransition;new Promise((()=>{}));n.Component;new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(e){}new Map;r.startTransition,s.flushSync,r.useId;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;var A,U;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(A||(A={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(U||(U={}));var j=f(485),z=f(762),F=f(369);const{formatDate:V,createStudyBrowserTabs:B}=z.utils;function H({servicesManager:e,getImageSrc:r,getStudiesForPatientByMRN:i,requestDisplaySetCreationForStudy:a,dataSource:o}){const{displaySetService:s,uiDialogService:l,hangingProtocolService:u,uiNotificationService:c,measurementService:d,studyPrefetcherService:f}=e.services,p=D(),{t:h}=(0,j.$G)("Common"),{StudyInstanceUIDs:v}=(0,F.useImageViewer)(),[{activeViewportId:g,viewports:y,isHangingProtocolLayout:m},b]=(0,F.useViewportGrid)(),[S,w]=(0,t.I)(),[k,E]=(0,n.useState)("primary"),[x,I]=(0,n.useState)([...v]),[_,T]=(0,n.useState)([]),[C,N]=(0,n.useState)(!1),[R,O]=(0,n.useState)([]),[P,M]=(0,n.useState)({}),[L,A]=(0,n.useState)({}),[U,z]=(0,n.useState)(null),H=y.get(g)?.displaySetInstanceUIDs,{trackedSeries:W}=S.context;(0,n.useEffect)((()=>{v.forEach((e=>async function(e){const t=await o.query.studies.search({studyInstanceUid:e});if(!t?.length)throw p("/notfoundstudy","_self"),new Error("Invalid study URL");let n=t;try{n=await i(t)}catch(e){console.warn(e)}const r=n.map((e=>({AccessionNumber:e.accession,StudyDate:e.date,StudyDescription:e.description,NumInstances:e.instances,ModalitiesInStudy:e.modalities,PatientID:e.mrn,PatientName:e.patientName,StudyInstanceUID:e.studyInstanceUid,StudyTime:e.time}))).map((e=>({studyInstanceUid:e.StudyInstanceUID,date:V(e.StudyDate)||h("NoStudyDate"),description:e.StudyDescription,modalities:e.ModalitiesInStudy,numInstances:e.NumInstances})));T((e=>{const t=[...e];for(const n of r)e.find((e=>e.studyInstanceUid===n.studyInstanceUid))||t.push(n);return t}))}(e)))}),[v,i]),(0,n.useEffect)((()=>{if(!C)return void(g&&window.setTimeout((()=>N(!0)),250));const e=s.activeDisplaySets;e.length&&e.forEach((async e=>{const t={},n=s.getDisplaySetByUID(e.displaySetInstanceUID),i=$(n,o.getImageIdsForDisplaySet(n));i&&!n?.unsupported&&(t[e.displaySetInstanceUID]=await r(i),A((e=>({...e,...t}))))}))}),[s,o,r,g,C]),(0,n.useEffect)((()=>{const e=s.activeDisplaySets;if(!e.length)return;const t=q(e,P,L,W,y,b,o,s,l,c);O(t)}),[s.activeDisplaySets,P,W,y,o,L]),(0,n.useEffect)((()=>{const{unsubscribe:e}=f.subscribe(f.EVENTS.DISPLAYSET_LOAD_PROGRESS,(e=>{const{displaySetInstanceUID:t,loadingProgress:n}=e;M((e=>({...e,[t]:n})))}));return()=>e()}),[f]),(0,n.useEffect)((()=>{const e=s.subscribe(s.EVENTS.DISPLAY_SETS_ADDED,(e=>{if(!C)return;const{displaySetsAdded:t,options:n}=e;t.forEach((async e=>{const t=e.displaySetInstanceUID,i={},a=s.getDisplaySetByUID(t);if(a?.unsupported)return;n.madeInClient&&z(t);const l=$(a,o.getImageIdsForDisplaySet(a));l&&(i[t]=await r(l),A((e=>({...e,...i}))))}))}));return()=>{e.unsubscribe()}}),[s,o,r,L,W,y]),(0,n.useEffect)((()=>{const e=s.subscribe(s.EVENTS.DISPLAY_SETS_CHANGED,(e=>{const t=q(e,P,L,W,y,b,o,s,l,c);O(t)})),t=s.subscribe(s.EVENTS.DISPLAY_SET_SERIES_METADATA_INVALIDATED,(()=>{const e=q(s.getActiveDisplaySets(),P,L,W,y,b,o,s,l,c);O(e)}));return()=>{e.unsubscribe(),t.unsubscribe()}}),[P,L,W,y,o,s]);const Y=B(v,_,R);(0,n.useEffect)((()=>{if(U){const e=U,t=document.getElementById(`thumbnail-${e}`);t&&"function"==typeof t.scrollIntoView&&(t.scrollIntoView({behavior:"smooth"}),z(null))}}),[U,x,k]),(0,n.useEffect)((()=>{if(!U)return;const e=function(e,t){for(let n=0;n<t.length;n++){const{studies:r}=t[n];for(let i=0;i<r.length;i++){const{displaySets:a}=r[i];for(let o=0;o<a.length;o++){if(a[o].displaySetInstanceUID===e)return{tabName:t[n].name,StudyInstanceUID:r[i].studyInstanceUid}}}}}(U,Y);if(!e)return void console.warn("jumpToThumbnail: displaySet thumbnail not found.");const{tabName:t,StudyInstanceUID:n}=e;E(t);if(!x.includes(n)){const e=[...x,n];I(e)}}),[x,U,Y]);const K=e=>{l.create({id:"untrack-series",centralize:!0,isDraggable:!1,showOverlay:!0,content:F.Dialog,contentProps:{title:"Untrack Series",body:()=>n.createElement("div",{className:"bg-primary-dark p-4 text-white"},n.createElement("p",null,"Are you sure you want to untrack this series?"),n.createElement("p",{className:"mt-2"},"This action cannot be undone and will delete all your existing measurements.")),actions:[{id:"cancel",text:"Cancel",type:F.ButtonEnums.type.secondary},{id:"yes",text:"Yes",type:F.ButtonEnums.type.primary,classes:["untrack-yes-button"]}],onClose:()=>l.dismiss({id:"untrack-series"}),onSubmit:async({action:t})=>{switch(t.id){case"yes":(()=>{const t=s.getDisplaySetByUID(e);w("UNTRACK_SERIES",{SeriesInstanceUID:t.SeriesInstanceUID}),d.getMeasurements().forEach((e=>{e.referenceSeriesUID===t.SeriesInstanceUID&&d.remove(e.uid)}))})(),l.dismiss({id:"untrack-series"});break;case"cancel":l.dismiss({id:"untrack-series"})}}}})};return n.createElement(F.StudyBrowser,{tabs:Y,servicesManager:e,activeTabName:k,expandedStudyInstanceUIDs:x,onClickStudy:function(e){const t=x.includes(e),n=t?[...x.filter((t=>t!==e))]:[...x,e];if(I(n),!t){a(s,e,!0)}},onClickTab:e=>{E(e)},onClickUntrack:e=>{K(e)},onClickThumbnail:()=>{},onDoubleClickThumbnail:e=>{let t=[];const n=g;try{t=u.getViewportsRequireUpdate(n,e,m)}catch(e){console.warn(e),c.show({title:"Thumbnail Double Click",message:"The selected display sets could not be added to the viewport due to a mismatch in the Hanging Protocol rules.",type:"info",duration:3e3})}b.setDisplaySetsForViewports(t)},activeDisplaySetInstanceUIDs:H})}H.propTypes={servicesManager:a().object.isRequired,dataSource:a().shape({getImageIdsForDisplaySet:a().func.isRequired}).isRequired,getImageSrc:a().func.isRequired,getStudiesForPatientByMRN:a().func.isRequired,requestDisplaySetCreationForStudy:a().func.isRequired};const W=H;function $(e,t){let n;if(e.isDynamicVolume){const t=e.dynamicVolumeInfo.timePoints,r=t[Math.floor(t.length/2)];n=r[Math.floor(r.length/2)]}else n=t[Math.floor(t.length/2)];return n}function q(e,t,r,i,a,o,s,l,u,c){const d=[],f=[];return e.filter((e=>!e.excludeFromThumbnailBrowser)).forEach((e=>{const a=r[e.displaySetInstanceUID],p=function(e){if(Y.includes(e.Modality)||e?.unsupported)return"thumbnailNoImage";return"thumbnailTracked"}(e),h=(o.getNumViewportPanes(),"thumbnailTracked"===p?d:f),{displaySetInstanceUID:v}=e,g=t?.[v],y={displaySetInstanceUID:v,description:e.SeriesDescription,seriesNumber:e.SeriesNumber,modality:e.Modality,seriesDate:V(e.SeriesDate),numInstances:e.numImageFrames,loadingProgress:g,countIcon:e.countIcon,messages:e.messages,StudyInstanceUID:e.StudyInstanceUID,componentType:p,imageSrc:a,dragData:{type:"displayset",displaySetInstanceUID:v},isTracked:i.includes(e.SeriesInstanceUID),isHydratedForDerivedDisplaySet:e.isHydrated};"thumbnailNoImage"===p&&(s.reject&&s.reject.series?(y.canReject=!e?.unsupported,y.onReject=()=>{u.create({id:"ds-reject-sr",centralize:!0,isDraggable:!1,showOverlay:!0,content:F.Dialog,contentProps:{title:"Delete Report",body:()=>n.createElement("div",{className:"bg-primary-dark p-4 text-white"},n.createElement("p",null,"Are you sure you want to delete this report?"),n.createElement("p",{className:"mt-2"},"This action cannot be undone.")),actions:[{id:"cancel",text:"Cancel",type:F.ButtonEnums.type.secondary},{id:"yes",text:"Yes",type:F.ButtonEnums.type.primary,classes:["reject-yes-button"]}],onClose:()=>u.dismiss({id:"ds-reject-sr"}),onShow:()=>{document.querySelector(".reject-yes-button").focus()},onSubmit:async({action:t})=>{switch(t.id){case"yes":try{await s.reject.series(e.StudyInstanceUID,e.SeriesInstanceUID),l.deleteDisplaySet(v),u.dismiss({id:"ds-reject-sr"}),c.show({title:"Delete Report",message:"Report deleted successfully",type:"success"})}catch(e){u.dismiss({id:"ds-reject-sr"}),c.show({title:"Delete Report",message:"Failed to delete report",type:"error"})}break;case"cancel":u.dismiss({id:"ds-reject-sr"})}}}})}):y.canReject=!1),h.push(y)})),[...d,...f]}const Y=["SR","SEG","SM","RTSTRUCT","RTPLAN","RTDOSE","DOC","OT","PMAP"];const K=function(e,t){return new Promise(((n,r)=>{const i=document.createElement("canvas");e.utilities.loadImageToCanvas({canvas:i,imageId:t,thumbnail:!0}).then((e=>{n(i.toDataURL())})).catch(r)}))};const Q=function(e,t,n,r){t.activeDisplaySets.some((e=>e.StudyInstanceUID===n))||e.retrieve.series.metadata({StudyInstanceUID:n,madeInClient:r})};function Z({commandsManager:e,extensionManager:t,servicesManager:r}){const i=t.getActiveDataSource()[0],a=function(e){const t=e.getModuleEntry("@ohif/extension-default.utilityModule.common"),{getStudiesForPatientByMRN:n}=t.exports;return n}(t),o=a.bind(null,i),s=(0,n.useCallback)(function(e){const t=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.common");try{const{cornerstone:e}=t.exports.getCornerstoneLibraries();return K.bind(null,e)}catch(e){throw new Error("Required command not found")}}(t),[]),l=Q.bind(null,i);return n.createElement(W,{servicesManager:r,dataSource:i,getImageSrc:s,getStudiesForPatientByMRN:o,requestDisplaySetCreationForStudy:l})}Z.propTypes={commandsManager:a().object.isRequired,extensionManager:a().object.isRequired,servicesManager:a().object.isRequired};const G=Z;var J=f(181),X=f(324),ee=f.n(X);const{downloadCSVReport:te}=z.utils,{formatDate:ne}=z.utils,re={key:void 0,date:"",modality:"",description:""};function ie({servicesManager:e,extensionManager:r}){const[i]=(0,F.useViewportGrid)(),{t:a}=(0,j.$G)("MeasurementTable"),[o,s]=(0,n.useState)(Date.now().toString()),l=function(e,t){const[r,i]=(0,n.useState)(e);return(0,n.useEffect)((()=>{const n=setTimeout((()=>{i(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),r}(o,200),{measurementService:u,uiDialogService:c,displaySetService:d,customizationService:f}=e.services,[p,h]=(0,t.I)(),{trackedStudy:v,trackedSeries:g}=p.context,[y,m]=(0,n.useState)(re),[b,S]=(0,n.useState)([]),w=(0,n.useRef)(null),[k]=(0,J.M)();(0,n.useEffect)((()=>{const e=u.getMeasurements().filter((e=>v===e.referenceStudyUID&&g.includes(e.referenceSeriesUID))).map((e=>function(e,t,n){const{referenceStudyUID:r,referenceSeriesUID:i,SOPInstanceUID:a}=e,o=(z.DicomMetadataStore.getInstance(r,i,a),n.getDisplaySetsForSeries(i));if(!o[0]||!o[0].images)throw new Error('The tracked measurements panel should only be tracking "stack" displaySets.');const{displayText:s,uid:l,label:u,type:c,selected:d,findingSites:f,finding:p,referencedImageId:h}=e,v=f?.[0],g=u||p?.text||v?.text||"(empty)";let y=s||[];if(f){const e=[];f.forEach((t=>{t?.text!==g&&e.push(t.text)})),y=[...e,...y]}p&&p?.text!==g&&(y=[p.text,...y]);return{uid:l,label:g,baseLabel:u,measurementType:c,displayText:y,baseDisplayText:s,isActive:d,finding:p,findingSites:f,referencedImageId:h}}(e,u.VALUE_TYPES,d)));S(e)}),[u,v,g,l]);const E=async()=>{if(p.matches("tracking")){const e=v,t=z.DicomMetadataStore.getStudy(e),n=t.series[0].instances[0],{StudyDate:r,StudyDescription:i}=n,a=new Set;t.series.forEach((e=>{g.includes(e.SeriesInstanceUID)&&a.add(e.instances[0].Modality)}));const o=Array.from(a).join("/");y.key!==e&&m({key:e,date:r,modality:o,description:i})}else""!==v&&void 0!==v||m(re)};(0,n.useEffect)((()=>{E()}),[y.key,p,v,E]),(0,n.useEffect)((()=>{const e=u.EVENTS.MEASUREMENT_ADDED,t=u.EVENTS.RAW_MEASUREMENT_ADDED,n=u.EVENTS.MEASUREMENT_UPDATED,r=u.EVENTS.MEASUREMENT_REMOVED,i=u.EVENTS.MEASUREMENTS_CLEARED,a=[];return[e,t,n,r,i].forEach((t=>{a.push(u.subscribe(t,(()=>{s(Date.now().toString()),t===e&&ee()((()=>{w.current.scrollTop=w.current.scrollHeight}),300)()})).unsubscribe)})),()=>{a.forEach((e=>{e()}))}}),[u,h]);const x=({uid:e,isActive:t})=>{u.jumpToMeasurement(i.activeViewportId,e),_({uid:e,isActive:t})},I=({uid:e,isActive:t})=>{x({uid:e,isActive:t});const n=f.get("measurementLabels"),i=u.getMeasurement(e),a=r.getModuleEntry("@ohif/extension-cornerstone.utilityModule.common"),{showLabelAnnotationPopup:o}=a.exports;o(i,c,n).then((t=>{u.update(e,{...t},!0)}))},_=({uid:e,isActive:t})=>{if(!t){const t=[...b],n=t.find((t=>t.uid===e));t.forEach((t=>t.isActive=t.uid===e)),n.isActive=!0,S(t)}},T=b.filter((e=>e.measurementType!==u.VALUE_TYPES.POINT&&e.referencedImageId)),C=b.filter((e=>e.measurementType===u.VALUE_TYPES.POINT&&e.referencedImageId)),N=b.filter((e=>null==e.referencedImageId)),R=0===C.length&&0===T.length&&0===N.length;return n.createElement(n.Fragment,null,n.createElement("div",{className:"invisible-scrollbar overflow-y-auto overflow-x-hidden",ref:w,"data-cy":"trackedMeasurements-panel"},y.key&&n.createElement(F.StudySummary,{date:ne(y.date),modality:y.modality,description:y.description}),n.createElement(F.MeasurementTable,{title:"Measurements",data:T,servicesManager:e,onClick:x,onEdit:I}),0!==C.length&&n.createElement(F.MeasurementTable,{title:"Additional Findings",data:C,servicesManager:e,onClick:x,onEdit:I}),0!==N.length&&n.createElement(F.MeasurementTable,{title:"Non-tracked",data:N,servicesManager:e,onClick:x,onEdit:I})),!k?.disableEditing&&n.createElement("div",{className:"flex justify-center p-4"},n.createElement(F.ActionButtons,{t:a,actions:[{label:"Download CSV",onClick:async function(){const e=u.getMeasurements().filter((e=>v===e.referenceStudyUID&&g.includes(e.referenceSeriesUID)));te(e,u)}},{label:"Create Report",onClick:()=>{h("SAVE_REPORT",{viewportId:i.activeViewportId,isBackupSave:!0})}}],disabled:R})))}ie.propTypes={servicesManager:a().shape({services:a().shape({measurementService:a().shape({getMeasurements:a().func.isRequired,VALUE_TYPES:a().object.isRequired}).isRequired}).isRequired}).isRequired};const ae=ie;var oe=f(795);const se=function({commandsManager:e,extensionManager:t,servicesManager:n}){return[{name:"seriesList",iconName:"tab-studies",iconLabel:"Studies",label:oe.Z.t("SidePanel:Studies"),component:G.bind(null,{commandsManager:e,extensionManager:t,servicesManager:n})},{name:"trackedMeasurements",iconName:"tab-linear",iconLabel:"Measure",label:oe.Z.t("SidePanel:Measurements"),component:ae.bind(null,{commandsManager:e,extensionManager:t,servicesManager:n})}]};function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(null,arguments)}const ue=n.lazy((()=>Promise.resolve().then(f.bind(f,868)))),ce=e=>n.createElement(n.Suspense,{fallback:n.createElement("div",null,"Loading...")},n.createElement(ue,e));const de=function({servicesManager:e,commandsManager:t,extensionManager:r}){return[{name:"cornerstone-tracked",component:i=>n.createElement(ce,le({servicesManager:e,commandsManager:t,extensionManager:r},i))}]},fe={id:JSON.parse('{"u2":"@ohif/extension-measurement-tracking"}').u2,getContextModule:t.Z,getPanelModule:se,getViewportModule:de}})(),p=f.O(p)})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@ohif/ui"),require("@ohif/extension-default"),require("@ohif/extension-cornerstone-dicom-sr"),require("@ohif/core"),require("@cornerstonejs/tools"),require("@cornerstonejs/core")):"function"==typeof define&&define.amd?define(["@ohif/ui","@ohif/extension-default","@ohif/extension-cornerstone-dicom-sr","@ohif/core","@cornerstonejs/tools","@cornerstonejs/core"],t):"object"==typeof exports?exports["ohif-extension-measurement-tracking"]=t(require("@ohif/ui"),require("@ohif/extension-default"),require("@ohif/extension-cornerstone-dicom-sr"),require("@ohif/core"),require("@cornerstonejs/tools"),require("@cornerstonejs/core")):e["ohif-extension-measurement-tracking"]=t(e["@ohif/ui"],e["@ohif/extension-default"],e["@ohif/extension-cornerstone-dicom-sr"],e["@ohif/core"],e["@cornerstonejs/tools"],e["@cornerstonejs/core"])}(globalThis,((e,t,n,r,i,a)=>(()=>{var o,s,l,u,c={419:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ft,I:()=>Ut});var r,i,a=n(1),o=n(827),s=n.n(o),l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)};function u(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function c(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function f(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(r||(r={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(i||(i={}));var p,h=r.Start,v=r.Stop,g=r.Raise,y=r.Send,m=r.Cancel,b=r.NullEvent,S=r.Assign,w=(r.After,r.DoneState,r.Log),k=r.Init,E=r.Invoke,x=(r.ErrorExecution,r.ErrorPlatform),I=r.ErrorCustom,_=r.Update,T=r.Choose,C=r.Pure,N={},R="xstate.guard",D=!0;function O(e,t,n){void 0===n&&(n=".");var r=L(e,n),i=L(t,n);return G(i)?!!G(r)&&i===r:G(r)?r in i:Object.keys(r).every((function(e){return e in i&&O(r[e],i[e])}))}function P(e){try{return G(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function M(e,t){try{return Q(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function L(e,t){return function(e){return"object"==typeof e&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}(e)?e.value:Q(e)?A(e):"string"!=typeof e?e:A(M(e,t))}function A(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function U(e,t){for(var n={},r=Object.keys(e),i=0;i<r.length;i++){var a=r[i];n[a]=t(e[a],a,e,i)}return n}function j(e,t,n){var r,i,a={};try{for(var o=c(Object.keys(e)),s=o.next();!s.done;s=o.next()){var l=s.value,u=e[l];n(u)&&(a[l]=t(u,l,e))}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return a}var z=function(e){return function(t){var n,r,i=t;try{for(var a=c(e),o=a.next();!o.done;o=a.next()){i=i[o.value]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}};function F(e){return e?G(e)?[[e]]:V(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?F(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function V(e){var t;return(t=[]).concat.apply(t,f([],d(e),!1))}function B(e){return Q(e)?e:[e]}function H(e){return void 0===e?[]:B(e)}function W(e,t,n){var r,i;if(Z(e))return e(t,n.data);var a={};try{for(var o=c(Object.keys(e)),s=o.next();!s.done;s=o.next()){var l=s.value,u=e[l];Z(u)?a[l]=u(t,n.data):a[l]=u}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return a}function $(e){return e instanceof Promise||!(null===e||!Z(e)&&"object"!=typeof e||!Z(e.then))}function q(e,t){return U(e.states,(function(e,n){if(e){var r=(G(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:q(e,r)}}}))}function Y(e,t,n,r){D||K(!!e,"Attempting to update undefined context");var i=e?n.reduce((function(e,n){var i,a,o=n.assignment,s={state:r,action:n,_event:t},l={};if(Z(o))l=o(e,t.data,s);else try{for(var u=c(Object.keys(o)),d=u.next();!d.done;d=u.next()){var f=d.value,p=o[f];l[f]=Z(p)?p(e,t.data,s):p}}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}return Object.assign({},e,l)}),e):e;return i}var K=function(){};function Q(e){return Array.isArray(e)}function Z(e){return"function"==typeof e}function G(e){return"string"==typeof e}function J(e,t){if(e)return G(e)?{type:R,name:e,predicate:t?t[e]:void 0}:Z(e)?{type:R,name:e.name,predicate:e}:e}D||(K=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var X=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();(p={})[X]=function(){return this},p[Symbol.observable]=function(){return this};function ee(e){return!!e&&"__xstatenode"in e}function te(e,t){return G(e)||"number"==typeof e?l({type:e},t):e}function ne(e,t){if(!G(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=te(e);return l({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function re(e,t){return B(t).map((function(t){return void 0===t||"string"==typeof t||ee(t)?{target:t,event:e}:l(l({},t),{event:e})}))}function ie(e,t,n,r,i){var a=e.options.guards,o={state:i,cond:t,_event:r};if(t.type===R)return((null==a?void 0:a[t.name])||t.predicate)(n,r.data,o);var s=null==a?void 0:a[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,r.data,o)}function ae(e){return"string"==typeof e?{type:e}:e}function oe(e,t,n){var r=function(){},i="object"==typeof e,a=i?e:null;return{next:((i?e.next:e)||r).bind(a),error:((i?e.error:t)||r).bind(a),complete:((i?e.complete:n)||r).bind(a)}}function se(e,t){return"".concat(e,":invocation[").concat(t,"]")}function le(e){return(e.type===g||e.type===y&&e.to===i.Internal)&&"number"!=typeof e.delay}var ue=ne({type:k});function ce(e,t){return t&&t[e]||void 0}function de(e,t){var n;if(G(e)||"number"==typeof e)n=Z(r=ce(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(Z(e))n={type:e.name||e.toString(),exec:e};else{var r;if(Z(r=ce(e.type,t)))n=l(l({},e),{exec:r});else if(r){var i=r.type||e.type;n=l(l(l({},r),e),{type:i})}else n=e}return n}var fe=function(e,t){return e?(Q(e)?e:[e]).map((function(e){return de(e,t)})):[]};function pe(e){var t=de(e);return l(l({id:G(e)?e:t.id},t),{type:t.type})}function he(e,t){return{to:t?t.to:void 0,type:y,event:Z(e)?e:te(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:Z(e)?e.name:P(e)}}function ve(e,t){var n="".concat(r.DoneState,".").concat(e),i={type:n,data:t,toString:function(){return n}};return i}function ge(e,t){var n="".concat(r.DoneInvoke,".").concat(e),i={type:n,data:t,toString:function(){return n}};return i}function ye(e,t){var n="".concat(r.ErrorPlatform,".").concat(e),i={type:n,data:t,toString:function(){return n}};return i}function me(e,t,n,a,o,s,u){void 0===u&&(u=!1);var p=u?[]:function(e){var t,n,r=[];try{for(var i=c(e),a=i.next();!a.done;a=i.next())for(var o=a.value,s=0;s<o.actions.length;)o.actions[s].type!==S?s++:(r.push(o.actions[s]),o.actions.splice(s,1))}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(o),h=p.length?Y(n,a,p,t):n,m=u?[n]:void 0,b=[];function k(o,c){var p;switch(c.type){case g:var k=function(e,t,n,r){var i,a={_event:n},o=ne(Z(e.event)?e.event(t,n.data,a):e.event);if(G(e.delay)){var s=r&&r[e.delay];i=Z(s)?s(t,n.data,a):s}else i=Z(e.delay)?e.delay(t,n.data,a):e.delay;return l(l({},e),{type:g,_event:o,delay:i})}(c,h,a,e.options.delays);return s&&"number"==typeof k.delay&&s(k,h,a),k;case y:var E=function(e,t,n,r){var i,a={_event:n},o=ne(Z(e.event)?e.event(t,n.data,a):e.event);if(G(e.delay)){var s=r&&r[e.delay];i=Z(s)?s(t,n.data,a):s}else i=Z(e.delay)?e.delay(t,n.data,a):e.delay;var u=Z(e.to)?e.to(t,n.data,a):e.to;return l(l({},e),{to:u,_event:o,event:o.data,delay:i})}(c,h,a,e.options.delays);if(!D){var x=c.delay;K(!G(x)||"number"==typeof E.delay,"No delay reference for delay expression '".concat(x,"' was found on machine '").concat(e.id,"'"))}return s&&E.to!==i.Internal&&("entry"===o?b.push(E):s(E,h,a)),E;case w:var I=function(e,t,n){return l(l({},e),{value:G(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(c,h,a);return null==s||s(I,h,a),I;case T:if(!(O=null===(p=c.conds.find((function(n){var r=J(n.cond,e.options.guards);return!r||ie(e,r,h,a,s?void 0:t)})))||void 0===p?void 0:p.actions))return[];var _=d(me(e,t,h,a,[{type:o,actions:fe(H(O),e.options.actions)}],s,u),2),N=_[0],R=_[1];return h=R,null==m||m.push(h),N;case C:var O;if(!(O=c.get(h,a.data)))return[];var P=d(me(e,t,h,a,[{type:o,actions:fe(H(O),e.options.actions)}],s,u),2),M=P[0],L=P[1];return h=L,null==m||m.push(h),M;case v:I=function(e,t,n){var i=Z(e.activity)?e.activity(t,n.data):e.activity,a="string"==typeof i?{id:i}:i;return{type:r.Stop,activity:a}}(c,h,a);return null==s||s(I,n,a),I;case S:h=Y(h,a,[c],s?void 0:t),null==m||m.push(h);break;default:var A=de(c,e.options.actions),U=A.exec;if(s)s(A,h,a);else if(U&&m){var j=m.length-1,z=l(l({},A),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];U.apply(void 0,f([m[j]],d(t),!1))}});A=z}return A}}var E=V(o.map((function(e){var t,n,r=[];try{for(var i=c(e.actions),o=i.next();!o.done;o=i.next()){var l=o.value,u=k(e.type,l);u&&(r=r.concat(u))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return b.forEach((function(e){s(e,h,a)})),b.length=0,r})));return[E,h]}var be=[],Se=function(e,t){be.push(e);var n=t(e);return be.pop(),n};function we(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[X]=function(){return this},t}function ke(e,t,n){var r=we(t);if(r.deferred=!0,ee(e)){var i=r.state=Se(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return i}}return r}var Ee=function(e){return"atomic"===e.type||"final"===e.type};function xe(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function Ie(e){return xe(e).filter((function(e){return"history"!==e.type}))}function _e(e){var t=[e];return Ee(e)?t:t.concat(V(Ie(e).map(_e)))}function Te(e,t){var n,r,i,a,o,s,l,u,d=Ne(new Set(e)),f=new Set(t);try{for(var p=c(f),h=p.next();!h.done;h=p.next())for(var v=(x=h.value).parent;v&&!f.has(v);)f.add(v),v=v.parent}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var g=Ne(f);try{for(var y=c(f),m=y.next();!m.done;m=y.next()){if("compound"!==(x=m.value).type||g.get(x)&&g.get(x).length){if("parallel"===x.type)try{for(var b=(o=void 0,c(Ie(x))),S=b.next();!S.done;S=b.next()){var w=S.value;f.has(w)||(f.add(w),d.get(w)?d.get(w).forEach((function(e){return f.add(e)})):w.initialStateNodes.forEach((function(e){return f.add(e)})))}}catch(e){o={error:e}}finally{try{S&&!S.done&&(s=b.return)&&s.call(b)}finally{if(o)throw o.error}}}else d.get(x)?d.get(x).forEach((function(e){return f.add(e)})):x.initialStateNodes.forEach((function(e){return f.add(e)}))}}catch(e){i={error:e}}finally{try{m&&!m.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}try{for(var k=c(f),E=k.next();!E.done;E=k.next()){var x;for(v=(x=E.value).parent;v&&!f.has(v);)f.add(v),v=v.parent}}catch(e){l={error:e}}finally{try{E&&!E.done&&(u=k.return)&&u.call(k)}finally{if(l)throw l.error}}return f}function Ce(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(Ee(r))return r.key}var i={};return n.forEach((function(e){i[e.key]=Ce(e,t)})),i}function Ne(e){var t,n,r=new Map;try{for(var i=c(e),a=i.next();!a.done;a=i.next()){var o=a.value;r.has(o)||r.set(o,[]),o.parent&&(r.has(o.parent)||r.set(o.parent,[]),r.get(o.parent).push(o))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function Re(e,t){return Ce(e,Ne(Te([e],t)))}function De(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function Oe(e,t){return"compound"===t.type?Ie(t).some((function(t){return"final"===t.type&&De(e,t)})):"parallel"===t.type&&Ie(t).every((function(t){return Oe(e,t)}))}function Pe(e){return new Set(V(e.map((function(e){return e.tags}))))}function Me(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(G(e)||G(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return Me(e[n],t[n])}))}function Le(e){return"object"==typeof e&&null!==e&&("value"in e&&"_event"in e)}var Ae=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=N,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||N,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return f([],d(new Set(V(f([],d(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:ue,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=ue;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),G(e))return[e];var r=Object.keys(e);return r.concat.apply(r,f([],d(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=u(e,["configuration","transitions","tags","machine"]);return l(l({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return O(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;D&&K(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),Ue={deferEvents:!1},je=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=l(l({},Ue),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),ze=new Map,Fe=0,Ve=function(){return"x:".concat(Fe++)},Be=function(e,t){return ze.set(e,t),e},He=function(e){return ze.get(e)},We=function(e){ze.delete(e)};function $e(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:void(D||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function qe(e){if($e()){var t=function(){var e=$e();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function Ye(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,i=[],a=!1,o=function(e){var t;return l(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[X]=function(){return this},t),e)}({id:t.id,send:function(t){i.push(t),function(){if(!a){for(a=!0;i.length>0;){var t=i.shift();n=e.transition(n,t,s),r.forEach((function(e){return e.next(n)}))}a=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,i){var a=oe(e,t,i);return r.add(a),a.next(n),{unsubscribe:function(){r.delete(a)}}}}),s={parent:t.parent,self:o,id:t.id||"anonymous",observers:r};return n=e.start?e.start(s):n,o}var Ke,Qe={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Ke||(Ke={}));var Ze=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var a=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Ke.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(Q(e))return a.batch(e),a.state;var n=ne(te(e,t));if(a.status===Ke.Stopped)return D||K(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(a.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),a.state;if(a.status!==Ke.Running&&!a.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(a.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return a.scheduler.schedule((function(){a.forward(n);var e=a._nextState(n);a.update(e,n)})),a._state},this.sendTo=function(e,t,n){var r,o=a.parent&&(t===i.Parent||a.parent.id===t),s=o?a.parent:G(t)?t===i.Internal?a:a.children.get(t)||He(t):(r=t)&&"function"==typeof r.send?t:void 0;if(s)if("machine"in s){if(a.status!==Ke.Stopped||a.parent!==s||a.state.done){var u=l(l({},e),{name:e.name===I?"".concat(ye(a.id)):e.name,origin:a.sessionId});!n&&a.machine.config.predictableActionArguments?a._outgoingQueue.push([s,u]):s.send(u)}}else!n&&a.machine.config.predictableActionArguments?a._outgoingQueue.push([s,e.data]):s.send(e.data);else{if(!o)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(a.id,"'."));D||K(!1,"Service '".concat(a.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,i){void 0===i&&(i=a.machine.options.actions);var o=e.exec||ce(e.type,i),s=Z(o)?o:o?o.exec:e.exec;if(s)try{return s(t,n.data,a.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:a.state,_event:n})}catch(e){throw a.parent&&a.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case g:var l=e;a.defer(l);break;case y:var u=e;if("number"==typeof u.delay)return void a.defer(u);u.to?a.sendTo(u._event,u.to,n===ue):a.send(u._event);break;case m:a.cancel(e.sendId);break;case h:if(a.status!==Ke.Running)return;var c=e.activity;if(!a.machine.config.predictableActionArguments&&!a.state.activities[c.id||c.type])break;if(c.type===r.Invoke){var d=ae(c.src),f=a.machine.options.services?a.machine.options.services[d.type]:void 0,p=c.id,b=c.data;D||K(!("forward"in c),"`forward` property is deprecated (found in invocation of '".concat(c.src,"' in in machine '").concat(a.machine.id,"'). ")+"Please use `autoForward` instead.");var S="autoForward"in c?c.autoForward:!!c.forward;if(!f)return void(D||K(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(a.machine.id,"'.")));var k=b?W(b,t,n):void 0;if("string"==typeof f)return;var E=Z(f)?f(t,n.data,{data:k,src:d,meta:c.meta}):f;if(!E)return;var x=void 0;ee(E)&&(E=k?E.withContext(k):E,x={autoForward:S}),a.spawn(E,p,x)}else a.spawnActivity(c);break;case v:a.stopChild(e.activity.id);break;case w:var I=e,_=I.label,T=I.value;_?a.logger(_,T):a.logger(T);break;default:D||K(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=l(l({},e.defaultOptions),n),s=o.clock,u=o.logger,c=o.parent,d=o.id,f=void 0!==d?d:t.id;this.id=f,this.logger=u,this.clock=s,this.parent=c,this.options=o,this.scheduler=new je({deferEvents:this.options.deferEvents}),this.sessionId=Ve()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Se(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return D||K(this.status!==Ke.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var i=c(e.actions),a=i.next();!a.done;a=i.next()){var o=a.value;this.exec(o,e,t)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,i,a,o,s,l,u,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==ue||!this.options.execute)for(var f=void 0;f=this._outgoingQueue.shift();)f[0].send(f[1]);else this.execute(this.state);if(this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var p=c(this.eventListeners),h=p.next();!h.done;h=p.next()){(0,h.value)(e.event)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var v=c(this.listeners),g=v.next();!g.done;g=v.next()){(0,g.value)(e,e.event)}}catch(e){i={error:e}}finally{try{g&&!g.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}try{for(var y=c(this.contextListeners),m=y.next();!m.done;m=y.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(s=y.return)&&s.call(y)}finally{if(o)throw o.error}}if(this.state.done){var b=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),S=b&&b.doneData?W(b.doneData,e.context,t):void 0;this._doneEvent=ge(this.id,S);try{for(var w=c(this.doneListeners),k=w.next();!k.done;k=w.next()){(0,k.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{k&&!k.done&&(u=w.return)&&u.call(w)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),We(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===Ke.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,i=oe(e,t,n);this.listeners.add(i.next),this.status!==Ke.NotStarted&&i.next(this.state);var a=function(){r.doneListeners.delete(a),r.stopListeners.delete(a),i.complete()};return this.status===Ke.Stopped?i.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){r.listeners.delete(i.next),r.doneListeners.delete(a),r.stopListeners.delete(a)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===Ke.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===Ke.Running)return this;this.machine._init(),Be(this.sessionId,this),this.initialized=!0,this.status=Ke.Running;var n=void 0===e?this.initialState:Se(this,(function(){return Le(e)?t.machine.resolveState(e):t.machine.resolveState(Ae.from(e,t.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,ue)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){Z(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,i,a,o,s,l,u;try{for(var d=c(this.listeners),f=d.next();!f.done;f=d.next()){var p=f.value;this.listeners.delete(p)}}catch(t){e={error:t}}finally{try{f&&!f.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var h=c(this.stopListeners),v=h.next();!v.done;v=h.next()){(p=v.value)(),this.stopListeners.delete(p)}}catch(e){n={error:e}}finally{try{v&&!v.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var g=c(this.contextListeners),y=g.next();!y.done;y=g.next()){p=y.value;this.contextListeners.delete(p)}}catch(e){i={error:e}}finally{try{y&&!y.done&&(a=g.return)&&a.call(g)}finally{if(i)throw i.error}}try{for(var m=c(this.doneListeners),b=m.next();!b.done;b=m.next()){p=b.value;this.doneListeners.delete(p)}}catch(e){o={error:e}}finally{try{b&&!b.done&&(s=m.return)&&s.call(m)}finally{if(o)throw o.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Ke.Stopped,this._initialState=void 0;try{for(var S=c(Object.keys(this.delayedEventsMap)),w=S.next();!w.done;w=S.next()){var k=w.value;this.clock.clearTimeout(this.delayedEventsMap[k])}}catch(e){l={error:e}}finally{try{w&&!w.done&&(u=S.return)&&u.call(S)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new je({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=ne({type:"xstate.stop"}),r=Se(e,(function(){var t=V(f([],d(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return fe(t.onExit,e.machine.options.actions)}))),r=d(me(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),i=r[0],a=r[1],o=new Ae({value:e.state.value,context:a,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:i.filter((function(e){return!le(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return o.changed=!0,o}));e.update(r,n),e._stopChildren(),We(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===Ke.NotStarted&&this.options.deferEvents)D||K(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==Ke.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var r,i,a=t.state,o=!1,s=[],u=function(e){var r=ne(e);t.forward(r),a=Se(t,(function(){return t.machine.transition(a,r,void 0,n||void 0)})),s.push.apply(s,f([],d(t.machine.config.predictableActionArguments?a.actions:a.actions.map((function(e){return function(e,t){var n=e.exec;return l(l({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,a)}))),!1)),o=o||!!a.changed};try{for(var p=c(e),h=p.next();!h.done;h=p.next()){u(h.value)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(r)throw r.error}}a.changed=o,a.actions=s,t.update(a,ne(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=ne(e);if(0===r.name.indexOf(x)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(x)})))throw r.data.data;return Se(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var r=c(this.forwardTo),i=r.next();!i.done;i=r.next()){var a=i.value,o=this.children.get(a);if(!o)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));o.send(e)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),Z(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==Ke.Running)return ke(e,t);if($(e))return this.spawnPromise(Promise.resolve(e),t);if(Z(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(i=e)&&"id"in i)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&Z(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(ee(e))return this.spawnMachine(e,l(l({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,i},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var i=new e(t,l(l({},this.options),{parent:this,id:n.id||t.id})),a=l(l({},Qe),n);a.sync&&i.onTransition((function(e){r.send(_,{state:e,id:i.id})}));var o=i;return this.children.set(i.id,o),a.autoForward&&this.forwardTo.add(i.id),i.onDone((function(e){r.removeChild(i.id),r.send(ne(e,{origin:i.id}))})).start(),o},e.prototype.spawnBehavior=function(e,t){var n=Ye(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,i=this,a=!1;e.then((function(e){a||(r=e,i.removeChild(t),i.send(ne(ge(t,e),{origin:t})))}),(function(e){if(!a){i.removeChild(t);var n=ye(t,e);try{i.send(ne(n,{origin:t}))}catch(r){!function(e,t,n){if(!D){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var i=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(i))}}}(e,r,t),i.devTools&&i.devTools.send(n,i.state),i.machine.strict&&i.stop()}}}));var o=((n={id:t,send:function(){},subscribe:function(t,n,r){var i=oe(t,n,r),a=!1;return e.then((function(e){a||(i.next(e),a||i.complete())}),(function(e){a||i.error(e)})),{unsubscribe:function(){return a=!0}}},stop:function(){a=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[X]=function(){return this},n);return this.children.set(t,o),o},e.prototype.spawnCallback=function(e,t){var n,r,i,a=this,o=!1,s=new Set,l=new Set;try{i=e((function(e){r=e,l.forEach((function(t){return t(e)})),o||a.send(ne(e,{origin:t}))}),(function(e){s.add(e)}))}catch(e){this.send(ye(t,e))}if($(i))return this.spawnPromise(i,t);var u=((n={id:t,send:function(e){return s.forEach((function(t){return t(e)}))},subscribe:function(e){var t=oe(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){o=!0,Z(i)&&i()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[X]=function(){return this},n);return this.children.set(t,u),u},e.prototype.spawnObservable=function(e,t){var n,r,i=this,a=e.subscribe((function(e){r=e,i.send(ne(e,{origin:t}))}),(function(e){i.removeChild(t),i.send(ne(ye(t,e),{origin:t}))}),(function(){i.removeChild(t),i.send(ne(ge(t),{origin:t}))})),o=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[X]=function(){return this},n);return this.children.set(t,o),o},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else D||K(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[X]=function(){return this},n))},e.prototype.attachDev=function(){var e=$e();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(l(l({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:l({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}qe(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[X]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Ke.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=Ge,e}();function Ge(e,t){return new Ze(e,t)}function Je(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function Xe(e){return l(l({type:E},e),{toJSON:function(){e.onDone,e.onError;var t=u(e,["onDone","onError"]);return l(l({},t),{type:E,src:Je(e.src)})}})}var et="",tt="*",nt={},rt=function(e){return"#"===e[0]},it=function(){function e(t,n,r,i){void 0===r&&(r="context"in t?t.context:void 0);var a,o=this;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==i?void 0:i.parent,this.key=this.config.key||(null==i?void 0:i.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||f([this.machine.key],d(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(a=this.config.schema)&&void 0!==a?a:{},this.description=this.config.description,D||K(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?U(this.config.states,(function(t,n){var r,i=new e(t,{},void 0,{parent:o,key:n});return Object.assign(o.idMap,l(((r={})[i.id]=i,r),i.idMap)),i})):nt;var s=0;!function e(t){var n,r;t.order=s++;try{for(var i=c(xe(t)),a=i.next();!a.done;a=i.next()){e(a.value)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===et})):et in this.config.on),this.strict=!!this.config.strict,this.onEntry=H(this.config.entry||this.config.onEntry).map((function(e){return de(e)})),this.onExit=H(this.config.exit||this.config.onExit).map((function(e){return de(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=H(this.config.invoke).map((function(e,t){var n,r;if(ee(e)){var i=se(o.id,t);return o.machine.options.services=l(((n={})[i]=e,n),o.machine.options.services),Xe({src:i,id:i})}if(G(e.src)){i=e.id||se(o.id,t);return Xe(l(l({},e),{id:i,src:e.src}))}if(ee(e.src)||Z(e.src)){i=e.id||se(o.id,t);return o.machine.options.services=l(((r={})[i]=e.src,r),o.machine.options.services),Xe(l(l({id:i},e),{src:i}))}var a=e.src;return Xe(l(l({id:se(o.id,t)},e),{src:a}))})),this.activities=H(this.config.activities).concat(this.invoke).map((function(e){return pe(e)})),this.transition=this.transition.bind(this),this.tags=H(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||_e(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,i=r.actions,a=r.activities,o=r.guards,s=r.services,u=r.delays;return new e(this.config,{actions:l(l({},i),t.actions),activities:l(l({},a),t.activities),guards:l(l({},o),t.guards),services:l(l({},s),t.services),delays:l(l({},u),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return Z(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:U(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===et,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===tt}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var i=function(e,t){var n=t?"#".concat(t):"";return"".concat(r.After,"(").concat(e,")").concat(n)}(Z(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(he(i,{delay:t})),e.onExit.push({type:m,sendId:i}),i};return(Q(t)?t.map((function(e,t){var r=n(e.delay,t);return l(l({},e),{event:r})})):V(Object.keys(t).map((function(e,r){var i=t[e],a=G(i)?{target:i}:i,o=isNaN(+e)?e:+e,s=n(o,r);return H(a).map((function(e){return l(l({},e),{event:s,delay:o})}))})))).map((function(t){var n=t.delay;return l(l({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof Ae?e.value:L(e,this.delimiter);if(G(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((t={})[r]=i,t)):[this,this.states[r]]}var a=Object.keys(r),o=[this];return o.push.apply(o,f([],d(V(a.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),o},e.prototype.handles=function(e){var t=P(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof Ae?e:Ae.create(e),n=Array.from(Te([],this.getStateNodes(t.value)));return new Ae(l(l({},t),{value:this.resolve(t.value),configuration:n,done:Oe(n,this),tags:Pe(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),i=this.getStateNode(r[0])._transition(e[r[0]],t,n);return i&&i.transitions.length?i:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,i,a={};try{for(var o=c(Object.keys(e)),s=o.next();!s.done;s=o.next()){var l=s.value,u=e[l];if(u){var d=this.getStateNode(l)._transition(u,t,n);d&&(a[l]=d)}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}var f=Object.keys(a).map((function(e){return a[e]})),p=V(f.map((function(e){return e.transitions})));if(!f.some((function(e){return e.transitions.length>0})))return this.next(t,n);var h=V(Object.keys(a).map((function(e){return a[e].configuration})));return{transitions:p,exitSet:V(f.map((function(e){return e.exitSet}))),configuration:h,source:t,actions:V(Object.keys(a).map((function(e){return a[e].actions})))}},e.prototype._transition=function(e,t,n){return G(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,ne(t))},e.prototype.next=function(e,t){var n,r,i,a=this,o=t.name,s=[],l=[];try{for(var u=c(this.getCandidates(o)),p=u.next();!p.done;p=u.next()){var h=p.value,v=h.cond,g=h.in,y=e.context,m=!g||(G(g)&&rt(g)?e.matches(L(this.getStateNodeById(g).path,this.delimiter)):O(L(g,this.delimiter),z(this.path.slice(0,-2))(e.value))),b=!1;try{b=!v||ie(this.machine,v,y,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(o,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(b&&m){void 0!==h.target&&(l=h.target),s.push.apply(s,f([],d(h.actions),!1)),i=h;break}}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}if(i){if(!l.length)return{transitions:[i],exitSet:[],configuration:e.value?[this]:[],source:e,actions:s};var S=V(l.map((function(t){return a.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[i],exitSet:!!i.internal?[]:V(l.map((function(e){return a.getPotentiallyReenteringNodes(e)}))),configuration:S,source:e,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,i,a,o,s){var l,u,p,h,v=this,y=o?Te([],this.getStateNodes(o.value)):[],m=new Set;try{for(var b=c(Array.from(e).sort((function(e,t){return e.order-t.order}))),S=b.next();!S.done;S=b.next()){(!De(y,E=S.value)||De(n.exitSet,E)||E.parent&&m.has(E.parent))&&m.add(E)}}catch(e){l={error:e}}finally{try{S&&!S.done&&(u=b.return)&&u.call(b)}finally{if(l)throw l.error}}try{for(var w=c(y),k=w.next();!k.done;k=w.next()){var E;De(e,E=k.value)&&!De(n.exitSet,E.parent)||n.exitSet.push(E)}}catch(e){p={error:e}}finally{try{k&&!k.done&&(h=w.return)&&h.call(w)}finally{if(p)throw p.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var x=Array.from(m).sort((function(e,t){return e.order-t.order})),I=new Set(n.exitSet),_=V(x.map((function(e){var t=[];if("final"!==e.type)return t;var r=e.parent;if(!r.parent)return t;t.push(ve(e.id,e.doneData),ve(r.id,e.doneData?W(e.doneData,i,a):void 0));var o=r.parent;return"parallel"===o.type&&Ie(o).every((function(e){return Oe(n.configuration,e)}))&&t.push(ve(o.id)),t}))),T=x.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=pe(e);return{type:r.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:fe(s?f(f([],d(t),!1),d(n),!1):f(f([],d(n),!1),d(t),!1),v.machine.options.actions)}})).concat({type:"state_done",actions:_.map((function(e){return function(e,t){return{type:g,event:"function"==typeof e?e:te(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),C=Array.from(I).map((function(e){return{type:"exit",actions:fe(f(f([],d(e.onExit),!1),d(e.activities.map((function(e){return function(e){var t=Z(e)?e:pe(e);return{type:r.Stop,activity:t,exec:void 0}}(e)}))),!1),v.machine.options.actions)}})).concat({type:"transition",actions:fe(n.actions,this.machine.options.actions)}).concat(T);if(t){var N=fe(V(f([],d(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!le(e)}));return C.concat({type:"stop",actions:N})}return C},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var i,a,o=ne(t);if(e instanceof Ae)i=void 0===n?e:this.resolveState(Ae.from(e,n));else{var s=G(e)?this.resolve(A(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;i=this.resolveState(Ae.from(s,l))}if(!D&&o.name===tt)throw new Error("An event cannot have the wildcard type ('".concat(tt,"')"));if(this.strict&&!this.events.includes(o.name)&&(a=o.name,!/^(done|error)\./.test(a)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var u=this._transition(i.value,i,o)||{transitions:[],configuration:[],exitSet:[],source:i,actions:[]},c=Te([],this.getStateNodes(i.value)),p=u.configuration.length?Te(c,u.configuration):c;return u.configuration=f([],d(p),!1),this.resolveTransition(u,i,i.context,r,o)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var i,a=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(i=e.actions).unshift.apply(i,f([],d(a),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,i){var a,o,s,u,f=this;void 0===i&&(i=ue);var p=e.configuration,g=!t||e.transitions.length>0,y=g?e.configuration:t?t.configuration:[],m=Oe(y,this),S=g?Re(this.machine,p):void 0,w=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,k=this.getActions(new Set(y),m,e,n,i,t,r),x=t?l({},t.activities):{};try{for(var I=c(k),T=I.next();!T.done;T=I.next()){var C=T.value;try{for(var N=(s=void 0,c(C.actions)),R=N.next();!R.done;R=N.next()){var D=R.value;D.type===h?x[D.activity.id||D.activity.type]=D:D.type===v&&(x[D.activity.id||D.activity.type]=!1)}}catch(e){s={error:e}}finally{try{R&&!R.done&&(u=N.return)&&u.call(N)}finally{if(s)throw s.error}}}}catch(e){a={error:e}}finally{try{T&&!T.done&&(o=I.return)&&o.call(I)}finally{if(a)throw a.error}}var O,P,M=d(me(this,t,n,i,k,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),L=M[0],A=M[1],U=d(function(e,t){var n,r,i=d([[],[]],2),a=i[0],o=i[1];try{for(var s=c(e),l=s.next();!l.done;l=s.next()){var u=l.value;t(u)?a.push(u):o.push(u)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[a,o]}(L,le),2),j=U[0],z=U[1],F=L.filter((function(e){var t;return e.type===h&&(null===(t=e.activity)||void 0===t?void 0:t.type)===E})),V=F.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var i,a=ae(e.src),o=null===(i=null==t?void 0:t.options.services)||void 0===i?void 0:i[a.type],s=e.data?W(e.data,n,r):void 0,l=o?ke(o,e.id,s):we(e.id);return l.meta=e,l}(t.activity,f.machine,A,i),e}),t?l({},t.children):{}),B=new Ae({value:S||t.value,context:A,_event:i,_sessionid:t?t._sessionid:null,historyValue:S?w?(O=w,P=S,{current:P,states:q(O,P)}):void 0:t?t.historyValue:void 0,history:!S||e.source?t:void 0,actions:S?z:[],activities:S?x:t?t.activities:{},events:[],configuration:y,transitions:e.transitions,children:V,done:m,tags:Pe(y),machine:this}),H=n!==A;B.changed=i.name===_||H;var $=B.history;$&&delete $.history;var Y=!m&&(this._transient||p.some((function(e){return e._transient})));if(!(g||Y&&i.name!==et))return B;var K=B;if(!m)for(Y&&(K=this.resolveRaisedTransition(K,{type:b},i,r));j.length;){var Q=j.shift();K=this.resolveRaisedTransition(K,Q._event,i,r)}var Z=K.changed||($?!!K.actions.length||H||typeof $.value!=typeof K.value||!Me(K.value,$.value):void 0);return K.changed=Z,K.history=$,K},e.prototype.getStateNode=function(e){if(rt(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=rt(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&rt(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=M(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||nt;switch(this.type){case"parallel":return U(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):nt}));case"compound":if(G(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?U(e,(function(e,t){return e?n.getStateNode(t).resolve(e):nt})):this.initialStateValue||{};default:return e||nt}},e.prototype.getResolvedPath=function(e){if(rt(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return M(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=j(this.states,(function(e){return e.initialStateValue||nt}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=Ee(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=G(t.target)&&rt(t.target)?A(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return Ee(this)?[this]:"compound"!==this.type||this.initial?V(F(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(D||K(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this])},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=d(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var i=this.getStateNode(n);if("history"===i.type)return i.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:j(this.states,(function(t,n){if(!e)return t.historyValue();var r=G(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?V(F(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var i,a,o=(i=n.path,a="states",function(e){var t,n,r=e;try{for(var o=c(i),s=o.next();!s.done;s=o.next()){var l=s.value;r=r[a][l]}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r})(e).current;return G(o)?[n.getStateNode(o)]:V(F(o).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=V(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var i=this.states,a=new Set(this.ownEvents);if(i)try{for(var o=c(Object.keys(i)),s=o.next();!s.done;s=o.next()){var l=i[s.value];if(l.states)try{for(var u=(n=void 0,c(l.events)),d=u.next();!d.done;d=u.next()){var f=d.value;a.add("".concat(f))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!G(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return H(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return G(e)&&e[0]===t.delimiter})),i=this.machine.options.guards,a=this.resolveTarget(n),o=l(l({},e),{actions:fe(H(e.actions)),cond:J(e.cond,i),target:a,source:this,internal:r,eventType:e.event,toJSON:function(){return l(l({},o),{target:o.target?o.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return o},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var i=this.config.on,a=tt,o=i[a],s=void 0===o?[]:o,l=u(i,["*"]);n=V(Object.keys(l).map((function(e){D||e!==et||K(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var t=re(e,l[e]);return D||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(G(e.target)||ee(e.target))})),i=t===et?"the transient event":"event '".concat(t,"'");K(!r,"One or more transitions for ".concat(i," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(re(tt,s)))}else n=[];var p=this.config.always?re("",this.config.always):[],h=this.config.onDone?re(String(ve(this.id)),this.config.onDone):[];D||K(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var v=V(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,f([],d(re(String(ge(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,f([],d(re(String(ye(e.id)),e.onError)),!1)),t}))),g=this.after,y=V(f(f(f(f([],d(h),!1),d(v),!1),d(n),!1),d(p),!1).map((function(e){return H(e).map((function(e){return r.formatTransition(e)}))})));try{for(var m=c(g),b=m.next();!b.done;b=m.next()){var S=b.value;y.push(S)}}catch(t){e={error:t}}finally{try{b&&!b.done&&(t=m.return)&&t.call(m)}finally{if(e)throw e.error}}return y},e}();var at=function(e){return{type:S,assignment:e}},ot=n(901);const st=a.useLayoutEffect;function lt(e){var t=a.useRef();return t.current||(t.current={v:e()}),t.current.v}var ut=function(){return ut=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ut.apply(this,arguments)},ct=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function dt(e,t){var n=lt((function(){return"function"==typeof e?e():e})),r=t.context,i=t.guards,a=t.actions,o=t.activities,s=t.services,l=t.delays,u=(t.state,ct(t,["context","guards","actions","activities","services","delays","state"])),c=lt((function(){var e={context:r,guards:i,actions:a,activities:o,services:s,delays:l};return Ge(n.withConfig(e,(function(){return ut(ut({},n.context),r)})),u)}));return st((function(){Object.assign(c.machine.options.actions,a),Object.assign(c.machine.options.guards,i),Object.assign(c.machine.options.activities,o),Object.assign(c.machine.options.services,s),Object.assign(c.machine.options.delays,l)}),[a,i,o,s,l]),c}var ft=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o};function pt(e){return e}function ht(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=ft(t,1)[0],i=void 0===r?{}:r,o=dt(e,i),s=(0,a.useCallback)((function(){return o.status===Ke.NotStarted?i.state?Ae.create(i.state):o.machine.initialState:o.getSnapshot()}),[o]),l=(0,a.useCallback)((function(e,t){return function(e,t,n){if(e.status===Ke.NotStarted)return!0;var r=void 0===n.changed&&(Object.keys(n.children).length>0||"boolean"==typeof t.changed);return!(n.changed||r)}(o,e,t)}),[o]),u=(0,a.useCallback)((function(e){return o.subscribe(e).unsubscribe}),[o]),c=(0,ot.useSyncExternalStoreWithSelector)(u,s,s,pt,l);return(0,a.useEffect)((function(){var e=i.state;return o.start(e?Ae.create(e):void 0),function(){o.stop(),o.status=Ke.NotStarted}}),[]),[c,o.send,o]}var vt=n(369);const gt={NO_NEVER:-1,CANCEL:0,CREATE_REPORT:1,ADD_SERIES:2,SET_STUDY_AND_SERIES:3,NO_NOT_FOR_SERIES:4,HYDRATE_REPORT:5},yt={id:"measurementTracking",initial:"idle",context:{activeViewportId:null,trackedStudy:"",trackedSeries:[],ignoredSeries:[],prevTrackedStudy:"",prevTrackedSeries:[],prevIgnoredSeries:[],ignoredSRSeriesForHydration:[],isDirty:!1},states:{off:{type:"final"},labellingOnly:{on:{TRACK_SERIES:[{target:"promptLabelAnnotation",actions:["setPreviousState"]},{target:"off"}]}},idle:{entry:"clearContext",on:{TRACK_SERIES:[{target:"promptLabelAnnotation",cond:"isLabelOnMeasure",actions:["setPreviousState"]},{target:"promptBeginTracking",actions:["setPreviousState"]}],SET_TRACKED_SERIES:[{target:"tracking",actions:["setTrackedStudyAndMultipleSeries","setIsDirtyToClean"]}],PROMPT_HYDRATE_SR:{target:"promptHydrateStructuredReport",cond:"hasNotIgnoredSRSeriesForHydration"},RESTORE_PROMPT_HYDRATE_SR:"promptHydrateStructuredReport",HYDRATE_SR:"hydrateStructuredReport",UPDATE_ACTIVE_VIEWPORT_ID:{actions:at({activeViewportId:(e,t)=>t.activeViewportId})}}},promptBeginTracking:{invoke:{src:"promptBeginTracking",onDone:[{target:"tracking",actions:["setTrackedStudyAndSeries","setIsDirty"],cond:"shouldSetStudyAndSeries"},{target:"labellingOnly",cond:"isLabelOnMeasureAndShouldKillMachine"},{target:"off",cond:"shouldKillMachine"},{target:"idle"}],onError:{target:"idle"}}},tracking:{on:{TRACK_SERIES:[{target:"promptLabelAnnotation",cond:"isLabelOnMeasure",actions:["setPreviousState"]},{target:"promptTrackNewStudy",cond:"isNewStudy"},{target:"promptTrackNewSeries",cond:"isNewSeries"}],UNTRACK_SERIES:[{target:"tracking",actions:["removeTrackedSeries","setIsDirty"],cond:"hasRemainingTrackedSeries"},{target:"idle"}],SET_TRACKED_SERIES:[{target:"tracking",actions:["setTrackedStudyAndMultipleSeries"]}],SAVE_REPORT:"promptSaveReport",SET_DIRTY:[{target:"tracking",actions:["setIsDirty"],cond:"shouldSetDirty"},{target:"tracking"}]}},promptTrackNewSeries:{invoke:{src:"promptTrackNewSeries",onDone:[{target:"tracking",actions:["addTrackedSeries","setIsDirty"],cond:"shouldAddSeries"},{target:"tracking",actions:["discardPreviouslyTrackedMeasurements","setTrackedStudyAndSeries","setIsDirty"],cond:"shouldSetStudyAndSeries"},{target:"promptSaveReport",cond:"shouldPromptSaveReport"},{target:"tracking"}],onError:{target:"idle"}}},promptTrackNewStudy:{invoke:{src:"promptTrackNewStudy",onDone:[{target:"tracking",actions:["discardPreviouslyTrackedMeasurements","setTrackedStudyAndSeries","setIsDirty"],cond:"shouldSetStudyAndSeries"},{target:"tracking",actions:["ignoreSeries"],cond:"shouldAddIgnoredSeries"},{target:"promptSaveReport",cond:"shouldPromptSaveReport"},{target:"tracking"}],onError:{target:"idle"}}},promptSaveReport:{invoke:{src:"promptSaveReport",onDone:[{target:"idle",actions:["clearAllMeasurements","showStructuredReportDisplaySetInActiveViewport"],cond:"shouldSaveAndContinueWithSameReport"},{target:"tracking",actions:["discardPreviouslyTrackedMeasurements","setTrackedStudyAndSeries"],cond:"shouldSaveAndStartNewReport"},{target:"tracking"}],onError:{target:"idle"}}},promptHydrateStructuredReport:{invoke:{src:"promptHydrateStructuredReport",onDone:[{target:"tracking",actions:["setTrackedStudyAndMultipleSeries","jumpToSameImageInActiveViewport","setIsDirtyToClean"],cond:"shouldHydrateStructuredReport"},{target:"idle",actions:["ignoreHydrationForSRSeries"],cond:"shouldIgnoreHydrationForSR"}],onError:{target:"idle"}}},hydrateStructuredReport:{invoke:{src:"hydrateStructuredReport",onDone:[{target:"tracking",actions:["setTrackedStudyAndMultipleSeries","jumpToSameImageInActiveViewport","setIsDirtyToClean"]}],onError:{target:"idle"}}},promptLabelAnnotation:{invoke:{src:"promptLabelAnnotation",onDone:[{target:"labellingOnly",cond:"wasLabellingOnly"},{target:"promptBeginTracking",cond:"wasIdle"},{target:"promptTrackNewStudy",cond:"wasTrackingAndIsNewStudy"},{target:"promptTrackNewSeries",cond:"wasTrackingAndIsNewSeries"},{target:"tracking",cond:"wasTracking"},{target:"off"}]}}},strict:!0},mt={services:{promptBeginTracking:(e,t)=>{},promptTrackNewStudy:(e,t)=>{},promptTrackNewSeries:(e,t)=>{}},actions:{discardPreviouslyTrackedMeasurements:(e,t)=>{console.log("discardPreviouslyTrackedMeasurements: not implemented")},clearAllMeasurements:(e,t)=>{console.log("clearAllMeasurements: not implemented")},jumpToFirstMeasurementInActiveViewport:(e,t)=>{console.warn("jumpToFirstMeasurementInActiveViewport: not implemented")},showStructuredReportDisplaySetInActiveViewport:(e,t)=>{console.warn("showStructuredReportDisplaySetInActiveViewport: not implemented")},clearContext:at({trackedStudy:"",trackedSeries:[],ignoredSeries:[],prevTrackedStudy:"",prevTrackedSeries:[],prevIgnoredSeries:[]}),setTrackedStudyAndSeries:at(((e,t)=>({prevTrackedStudy:e.trackedStudy,prevTrackedSeries:e.trackedSeries.slice(),prevIgnoredSeries:e.ignoredSeries.slice(),trackedStudy:t.data.StudyInstanceUID,trackedSeries:[t.data.SeriesInstanceUID],ignoredSeries:[]}))),setTrackedStudyAndMultipleSeries:at(((e,t)=>{const n=t.StudyInstanceUID||t.data.StudyInstanceUID,r=t.SeriesInstanceUIDs||t.data.SeriesInstanceUIDs;return{prevTrackedStudy:e.trackedStudy,prevTrackedSeries:e.trackedSeries.slice(),prevIgnoredSeries:e.ignoredSeries.slice(),trackedStudy:n,trackedSeries:[...e.trackedSeries,...r],ignoredSeries:[]}})),setIsDirtyToClean:at(((e,t)=>({isDirty:!1}))),setIsDirty:at(((e,t)=>({isDirty:!0}))),ignoreSeries:at(((e,t)=>({prevIgnoredSeries:[...e.ignoredSeries],ignoredSeries:[...e.ignoredSeries,t.data.SeriesInstanceUID]}))),ignoreHydrationForSRSeries:at(((e,t)=>({ignoredSRSeriesForHydration:[...e.ignoredSRSeriesForHydration,t.data.srSeriesInstanceUID]}))),addTrackedSeries:at(((e,t)=>({prevTrackedSeries:[...e.trackedSeries],trackedSeries:[...e.trackedSeries,t.data.SeriesInstanceUID]}))),removeTrackedSeries:at(((e,t)=>({prevTrackedSeries:e.trackedSeries.slice().filter((e=>e!==t.SeriesInstanceUID)),trackedSeries:e.trackedSeries.slice().filter((e=>e!==t.SeriesInstanceUID))}))),setPreviousState:at(((e,t,n)=>({prevState:n.state.value})))},guards:{shouldSetDirty:(e,t)=>void 0===t.SeriesInstanceUID||e.trackedSeries.includes(t.SeriesInstanceUID),wasLabellingOnly:(e,t,n)=>"labellingOnly"===e.prevState,wasIdle:(e,t,n)=>"idle"===e.prevState,wasTracking:(e,t,n)=>"tracking"===e.prevState,wasTrackingAndIsNewStudy:(e,t,n)=>"tracking"===e.prevState&&!e.ignoredSeries.includes(t.data.SeriesInstanceUID)&&e.trackedStudy!==t.data.StudyInstanceUID,wasTrackingAndIsNewSeries:(e,t,n)=>"tracking"===e.prevState&&!e.ignoredSeries.includes(t.data.SeriesInstanceUID)&&!e.trackedSeries.includes(t.data.SeriesInstanceUID),shouldKillMachine:(e,t)=>t.data&&t.data.userResponse===gt.NO_NEVER,shouldAddSeries:(e,t)=>t.data&&t.data.userResponse===gt.ADD_SERIES,shouldSetStudyAndSeries:(e,t)=>t.data&&t.data.userResponse===gt.SET_STUDY_AND_SERIES,shouldAddIgnoredSeries:(e,t)=>t.data&&t.data.userResponse===gt.NO_NOT_FOR_SERIES,shouldPromptSaveReport:(e,t)=>t.data&&t.data.userResponse===gt.CREATE_REPORT,shouldIgnoreHydrationForSR:(e,t)=>t.data&&t.data.userResponse===gt.CANCEL,shouldSaveAndContinueWithSameReport:(e,t)=>t.data&&t.data.userResponse===gt.CREATE_REPORT&&!0===t.data.isBackupSave,shouldSaveAndStartNewReport:(e,t)=>t.data&&t.data.userResponse===gt.CREATE_REPORT&&!1===t.data.isBackupSave,shouldHydrateStructuredReport:(e,t)=>t.data&&t.data.userResponse===gt.HYDRATE_REPORT,hasRemainingTrackedSeries:(e,t)=>e.trackedSeries.length>1||!e.trackedSeries.includes(t.SeriesInstanceUID),hasNotIgnoredSRSeriesForHydration:(e,t)=>!e.ignoredSRSeriesForHydration.includes(t.SeriesInstanceUID),isNewStudy:(e,t)=>!e.ignoredSeries.includes(t.SeriesInstanceUID)&&e.trackedStudy!==t.StudyInstanceUID,isNewSeries:(e,t)=>!e.ignoredSeries.includes(t.SeriesInstanceUID)&&!e.trackedSeries.includes(t.SeriesInstanceUID)}};var bt=n(795);const St={NO_NEVER:-1,CANCEL:0,CREATE_REPORT:1,ADD_SERIES:2,SET_STUDY_AND_SERIES:3};const wt=function({servicesManager:e,extensionManager:t},n,r){const{uiViewportDialogService:i}=e.services,a=t._appConfig,{viewportId:o,StudyInstanceUID:s,SeriesInstanceUID:l}=r.data||r;return new Promise((async function(e,t){let n=a?.disableConfirmationPrompts?St.SET_STUDY_AND_SERIES:await function(e,t){return new Promise((function(n,r){const i=bt.Z.t("MeasurementTable:Track measurements for this series?"),a=[{id:"prompt-begin-tracking-cancel",type:vt.ButtonEnums.type.secondary,text:bt.Z.t("Common:No"),value:St.CANCEL},{id:"prompt-begin-tracking-no-do-not-ask-again",type:vt.ButtonEnums.type.secondary,text:bt.Z.t("MeasurementTable:No, do not ask again"),value:St.NO_NEVER},{id:"prompt-begin-tracking-yes",type:vt.ButtonEnums.type.primary,text:bt.Z.t("Common:Yes"),value:St.SET_STUDY_AND_SERIES}],o=t=>{e.hide(),n(t)};e.show({viewportId:t,id:"measurement-tracking-prompt-begin-tracking",type:"info",message:i,actions:a,onSubmit:o,onOutsideClick:()=>{e.hide(),n(St.CANCEL)},onKeyPress:e=>{if("Enter"===e.key){const e=a.find((e=>"prompt-begin-tracking-yes"===e.id));o(e.value)}}})}))}(i,o);e({userResponse:n,StudyInstanceUID:s,SeriesInstanceUID:l,viewportId:o})}))},kt={NO_NEVER:-1,CANCEL:0,CREATE_REPORT:1,ADD_SERIES:2,SET_STUDY_AND_SERIES:3,NO_NOT_FOR_SERIES:4};const Et=function({servicesManager:e,extensionManager:t},n,r){const{UIViewportDialogService:i}=e.services,{viewportId:a,StudyInstanceUID:o,SeriesInstanceUID:s}=r.data||r;return new Promise((async function(e,t){let r=await function(e,t){return new Promise((function(n,r){const i="Do you want to add this measurement to the existing report?",a=[{type:vt.ButtonEnums.type.secondary,text:"Cancel",value:kt.CANCEL},{type:vt.ButtonEnums.type.primary,text:"Create new report",value:kt.CREATE_REPORT},{type:vt.ButtonEnums.type.primary,text:"Add to existing report",value:kt.ADD_SERIES}],o=t=>{e.hide(),n(t)};e.show({viewportId:t,type:"info",message:i,actions:a,onSubmit:o,onOutsideClick:()=>{e.hide(),n(kt.CANCEL)}})}))}(i,a);r===kt.CREATE_REPORT&&(r=n.isDirty?await function(e,t){return new Promise((function(n,r){const i="You have existing tracked measurements. What would you like to do with your existing tracked measurements?",a=[{type:"cancel",text:"Cancel",value:kt.CANCEL},{type:"secondary",text:"Save",value:kt.CREATE_REPORT},{type:"primary",text:"Discard",value:kt.SET_STUDY_AND_SERIES}],o=t=>{e.hide(),n(t)};e.show({viewportId:t,type:"warning",message:i,actions:a,onSubmit:o,onOutsideClick:()=>{e.hide(),n(kt.CANCEL)}})}))}(i,a):kt.SET_STUDY_AND_SERIES),e({userResponse:r,StudyInstanceUID:o,SeriesInstanceUID:s,viewportId:a,isBackupSave:!1})}))},xt={NO_NEVER:-1,CANCEL:0,CREATE_REPORT:1,ADD_SERIES:2,SET_STUDY_AND_SERIES:3,NO_NOT_FOR_SERIES:4};const It=function({servicesManager:e,extensionManager:t},n,r){const{uiViewportDialogService:i}=e.services,{viewportId:a,StudyInstanceUID:o,SeriesInstanceUID:s}=r.data||r;return new Promise((async function(e,t){let r=await function(e,t){return new Promise((function(n,r){const i=bt.Z.t("MeasurementTable:Track measurements for this series?"),a=[{type:"cancel",text:bt.Z.t("MeasurementTable:No"),value:xt.CANCEL},{type:"secondary",text:bt.Z.t("MeasurementTable:No, do not ask again"),value:xt.NO_NOT_FOR_SERIES},{type:"primary",text:bt.Z.t("MeasurementTable:Yes"),value:xt.SET_STUDY_AND_SERIES}],o=t=>{e.hide(),n(t)};e.show({viewportId:t,type:"info",message:i,actions:a,onSubmit:o,onOutsideClick:()=>{e.hide(),n(xt.CANCEL)},onKeyPress:e=>{if("Enter"===e.key){const e=a.find((e=>e.value===xt.SET_STUDY_AND_SERIES));o(e.value)}}})}))}(i,a);r===xt.SET_STUDY_AND_SERIES&&(r=n.isDirty?await function(e,t){return new Promise((function(n,r){const i="Measurements cannot span across multiple studies. Do you want to save your tracked measurements?",a=[{type:"cancel",text:"Cancel",value:xt.CANCEL},{type:"secondary",text:"No, discard previously tracked series & measurements",value:xt.SET_STUDY_AND_SERIES},{type:"primary",text:"Yes",value:xt.CREATE_REPORT}],o=t=>{e.hide(),n(t)};e.show({viewportId:t,type:"warning",message:i,actions:a,onSubmit:o,onOutsideClick:()=>{e.hide(),n(xt.CANCEL)}})}))}(i,a):xt.SET_STUDY_AND_SERIES),e({userResponse:r,StudyInstanceUID:o,SeriesInstanceUID:s,viewportId:a,isBackupSave:!1})}))};var _t=n(140);const Tt=4700;const Ct={NO_NEVER:-1,CANCEL:0,CREATE_REPORT:1,ADD_SERIES:2,SET_STUDY_AND_SERIES:3,NO_NOT_FOR_SERIES:4};const Nt=async function({servicesManager:e,commandsManager:t,extensionManager:n},r,i){const{uiDialogService:a,measurementService:o,displaySetService:s}=e.services,l=void 0===i.viewportId?i.data.viewportId:i.viewportId,u=void 0===i.isBackupSave?i.data.isBackupSave:i.isBackupSave,c=i?.data?.StudyInstanceUID,d=i?.data?.SeriesInstanceUID,{trackedStudy:f,trackedSeries:p}=r;let h;try{const r=await(0,_t.createReportDialogPrompt)(a,{extensionManager:n});if(r.action===Ct.CREATE_REPORT){const i=n.getDataSources()[0],a=o.getMeasurements().filter((e=>f===e.referenceStudyUID&&p.includes(e.referenceSeriesUID))).filter((e=>null!=e.referencedImageId)),l=void 0===r.value||""===r.value?"Research Derived Series":r.value,u=function(e){const t=e.getActiveDisplaySets().filter((e=>"SR"===e.Modality)).map((e=>e.SeriesNumber));return Math.max(...t,Tt)+1}(s),c=async()=>t.runCommand("storeMeasurements",{measurementData:a,dataSource:i,additionalFindingTypes:["ArrowAnnotate"],options:{SeriesDescription:l,SeriesNumber:u}},"CORNERSTONE_STRUCTURED_REPORT");h=await(0,_t.createReportAsync)({servicesManager:e,getReport:c})}else r.action;return{userResponse:r.action,createdDisplaySetInstanceUIDs:h,StudyInstanceUID:c,SeriesInstanceUID:d,viewportId:l,isBackupSave:u}}catch(e){return null}};var Rt=n(148);const Dt={NO_NEVER:-1,CANCEL:0,CREATE_REPORT:1,ADD_SERIES:2,SET_STUDY_AND_SERIES:3,NO_NOT_FOR_SERIES:4,HYDRATE_REPORT:5};const Ot=function({servicesManager:e,extensionManager:t,appConfig:n},r,i){const{uiViewportDialogService:a,displaySetService:o}=e.services,{viewportId:s,displaySetInstanceUID:l}=i,u=o.getDisplaySetByUID(l);return new Promise((async function(r,o){const c=n?.disableConfirmationPrompts?Dt.HYDRATE_REPORT:await function(e,t){return new Promise((function(n,r){const i="Do you want to continue tracking measurements for this study?",a=[{id:"no-hydrate",type:vt.ButtonEnums.type.secondary,text:"No",value:Dt.CANCEL},{id:"yes-hydrate",type:vt.ButtonEnums.type.primary,text:"Yes",value:Dt.HYDRATE_REPORT}],o=t=>{e.hide(),n(t)};e.show({viewportId:t,type:"info",message:i,actions:a,onSubmit:o,onOutsideClick:()=>{e.hide(),n(Dt.CANCEL)},onKeyPress:e=>{if("Enter"===e.key){const e=a.find((e=>e.value===Dt.HYDRATE_REPORT));o(e.value)}}})}))}(a,s);let d,f;if(c===Dt.HYDRATE_REPORT){console.warn("!! HYDRATING STRUCTURED REPORT");const r=(0,Rt.hydrateStructuredReport)({servicesManager:e,extensionManager:t,appConfig:n},l);d=r.StudyInstanceUID,f=r.SeriesInstanceUIDs}r({userResponse:c,displaySetInstanceUID:i.displaySetInstanceUID,srSeriesInstanceUID:u.SeriesInstanceUID,viewportId:s,StudyInstanceUID:d,SeriesInstanceUIDs:f})}))};const Pt=function({servicesManager:e,extensionManager:t,appConfig:n},r,i){const{displaySetService:a}=e.services,{viewportId:o,displaySetInstanceUID:s}=i,l=a.getDisplaySetByUID(s);return new Promise(((r,a)=>{const u=(0,Rt.hydrateStructuredReport)({servicesManager:e,extensionManager:t,appConfig:n},s),c=u.StudyInstanceUID,d=u.SeriesInstanceUIDs;r({displaySetInstanceUID:i.displaySetInstanceUID,srSeriesInstanceUID:l.SeriesInstanceUID,viewportId:o,StudyInstanceUID:c,SeriesInstanceUIDs:d})}))};var Mt=n(181);const Lt=function({servicesManager:e,extensionManager:t},n,r){const{measurementService:i,customizationService:a}=e.services,{viewportId:o,StudyInstanceUID:s,SeriesInstanceUID:l,measurementId:u}=r,c=t.getModuleEntry("@ohif/extension-cornerstone.utilityModule.common"),{showLabelAnnotationPopup:d}=c.exports;return new Promise((async function(t){const n=a.get("measurementLabels"),r=i.getMeasurement(u),c=await d(r,e.services.uiDialogService,n);i.update(u,{...c},!0),t({StudyInstanceUID:s,SeriesInstanceUID:l,viewportId:o})}))},At=a.createContext();At.displayName="TrackedMeasurementsContext";const Ut=()=>(0,a.useContext)(At),jt="@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr";function zt({servicesManager:e,commandsManager:t,extensionManager:n},{children:r}){const[i]=(0,Mt.M)(),[o,s]=(0,vt.useViewportGrid)(),{activeViewportId:l,viewports:u}=o,{measurementService:c,displaySetService:d,customizationService:f,cornerstoneViewportService:p}=e.services,h=Object.assign({},mt);h.actions=Object.assign({},h.actions,{jumpToFirstMeasurementInActiveViewport:(e,t)=>{const{trackedStudy:n,trackedSeries:r,activeViewportId:i}=e,a=c.getMeasurements().filter((e=>n===e.referenceStudyUID&&r.includes(e.referenceSeriesUID)));console.log("jumping to measurement reset viewport",i,a[0]);const o=a[0].displaySetInstanceUID,l=d.getDisplaySetByUID(o).images,u=l[0].imageId.startsWith("volumeId"),f=a[0].data;let p=0;!u&&f&&(p=l.findIndex((e=>{const t=Object.keys(f)[0].substring(8);return e.imageId===t})),-1===p&&(console.warn("Could not find image index for tracked measurement, using 0"),p=0)),s.setDisplaySetsForViewport({viewportId:i,displaySetInstanceUIDs:[o],viewportOptions:{initialImageOptions:{index:p}}})},jumpToSameImageInActiveViewport:(e,t)=>{const{trackedStudy:n,trackedSeries:r,activeViewportId:i}=e,a=c.getMeasurements().filter((e=>n===e.referenceStudyUID&&r.includes(e.referenceSeriesUID)))[0].displaySetInstanceUID,o=p.getCornerstoneViewport(i).getCurrentImageIdIndex();s.setDisplaySetsForViewport({viewportId:i,displaySetInstanceUIDs:[a],viewportOptions:{initialImageOptions:{index:o}}})},showStructuredReportDisplaySetInActiveViewport:(e,t)=>{if(t.data.createdDisplaySetInstanceUIDs.length>0){const e=t.data.createdDisplaySetInstanceUIDs[0];s.setDisplaySetsForViewport({viewportId:t.data.viewportId,displaySetInstanceUIDs:[e]})}},discardPreviouslyTrackedMeasurements:(e,t)=>{const n=c.getMeasurements().filter((t=>e.prevTrackedSeries.includes(t.referenceSeriesUID))).map((e=>e.id));for(let e=0;e<n.length;e++)c.remove(n[e])},clearAllMeasurements:(e,t)=>{const n=c.getMeasurements().map((e=>e.uid));for(let e=0;e<n.length;e++)c.remove(n[e])}}),h.services=Object.assign({},h.services,{promptBeginTracking:wt.bind(null,{servicesManager:e,extensionManager:n,appConfig:i}),promptTrackNewSeries:Et.bind(null,{servicesManager:e,extensionManager:n,appConfig:i}),promptTrackNewStudy:It.bind(null,{servicesManager:e,extensionManager:n,appConfig:i}),promptSaveReport:Nt.bind(null,{servicesManager:e,commandsManager:t,extensionManager:n,appConfig:i}),promptHydrateStructuredReport:Ot.bind(null,{servicesManager:e,extensionManager:n,appConfig:i}),hydrateStructuredReport:Pt.bind(null,{servicesManager:e,extensionManager:n,appConfig:i}),promptLabelAnnotation:Lt.bind(null,{servicesManager:e,extensionManager:n})}),h.guards=Object.assign({},h.guards,{isLabelOnMeasure:(e,t,n)=>{const r=f.get("measurementLabels");return r?.labelOnMeasure},isLabelOnMeasureAndShouldKillMachine:(e,t,n)=>{const r=f.get("measurementLabels");return t.data&&t.data.userResponse===gt.NO_NEVER&&r?.labelOnMeasure}});const v=(g=yt,y=h,void 0===m&&(m=g.context),new it(g,y,m));var g,y,m;const[b,S]=ht(v);return(0,a.useEffect)((()=>{S("UPDATE_ACTIVE_VIEWPORT_ID",{activeViewportId:l})}),[l,S]),(0,a.useEffect)((()=>{(async()=>{if(u.size>0){const t=u.get(l);if(!t||!t?.displaySetInstanceUIDs?.length)return;const{displaySetService:n}=e.services,r=n.getDisplaySetByUID(t.displaySetInstanceUIDs[0]);if(!r)return;r.SOPClassHandlerId===jt&&!r.isLoaded&&r.load&&await r.load(),r.SOPClassHandlerId===jt&&!0===r.isRehydratable&&(console.log("sending event...",b),S("PROMPT_HYDRATE_SR",{displaySetInstanceUID:r.displaySetInstanceUID,SeriesInstanceUID:r.SeriesInstanceUID,viewportId:l}))}})()}),[b,l,S,e.services,u]),a.createElement(At.Provider,{value:[b,S]},r)}zt.propTypes={children:s().oneOf([s().func,s().node]),servicesManager:s().object.isRequired,commandsManager:s().object.isRequired,extensionManager:s().object.isRequired,appConfig:s().object};const Ft=function({servicesManager:e,extensionManager:t,commandsManager:n}){const r=zt.bind(null,{servicesManager:e,extensionManager:t,commandsManager:n});return[{name:"TrackedMeasurementsContext",context:At,provider:r}]}},868:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(1),i=n(827),a=n.n(i),o=n(369),s=n(867),l=n(419),u=n(464),c=n(485);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(null,arguments)}function f(e){const{displaySets:t,viewportId:n,servicesManager:i,extensionManager:a}=e,{measurementService:f,cornerstoneViewportService:h,viewportGridService:v,viewportActionCornersService:g}=i.services,y=t[0],{t:m}=(0,c.$G)("Common"),[b]=(0,o.useViewportGrid)(),{activeViewportId:S}=b,[w,k]=(0,l.I)(),[E,x]=(0,r.useState)(!1),[I,_]=(0,r.useState)(null),[T,C]=(0,r.useState)(null),{trackedSeries:N}=w.context,{SeriesInstanceUID:R}=y,D=(0,r.useCallback)((()=>{const e=h.getCornerstoneViewport(n);if(e instanceof u.BaseVolumeViewport){const t=e?.getCurrentImageId();if(!t)return void(E&&x(!1))}N.includes(R)!==E&&x(!E)}),[E,w,n,R]),O=(0,r.useCallback)((e=>{e.detail.element!==T&&(e.detail.element?.addEventListener(u.Enums.Events.VOLUME_VIEWPORT_NEW_VOLUME,D),C(e.detail.element))}),[D,T]),P=(0,r.useCallback)((()=>{T?.removeEventListener(u.Enums.Events.VOLUME_VIEWPORT_NEW_VOLUME,D)}),[D,T]);(0,r.useEffect)(D,[D]),(0,r.useEffect)((()=>{const{unsubscribe:e}=h.subscribe(h.EVENTS.VIEWPORT_DATA_CHANGED,(e=>{e.viewportId===n&&D()}));return()=>{e()}}),[D,n]),(0,r.useEffect)((()=>E?(s.annotation.config.style.setViewportToolStyles(n,{global:{lineDash:""}}),void h.getRenderingEngine().renderViewport(n)):(s.annotation.config.style.setViewportToolStyles(n,{global:{lineDash:"4,4"}}),h.getRenderingEngine().renderViewport(n),()=>{s.annotation.config.style.setViewportToolStyles(n,{})})),[E]),(0,r.useEffect)((()=>{const e=f.EVENTS.MEASUREMENT_ADDED,t=f.EVENTS.RAW_MEASUREMENT_ADDED,r=[];return[e,t].forEach((e=>{r.push(f.subscribe(e,(({source:e,measurement:t})=>{const{activeViewportId:r}=v.getState();if(n===r){const{referenceStudyUID:e,referenceSeriesUID:r,uid:i}=t;k("SET_DIRTY",{SeriesInstanceUID:r}),k("TRACK_SERIES",{viewportId:n,StudyInstanceUID:e,SeriesInstanceUID:r,measurementId:i})}})).unsubscribe)})),()=>{r.forEach((e=>{e()}))}}),[f,k,n,v]);const M=(0,r.useCallback)((e=>{const t=function(e,t,n,r){const{measurementService:i,viewportGridService:a}=t.services,o=i.getMeasurements(),{activeViewportId:s,viewports:l}=a.getState(),{displaySetInstanceUIDs:u}=l.get(s),{trackedSeries:c}=r.context,d=o.filter((e=>c.includes(e.referenceSeriesUID)&&u.includes(e.displaySetInstanceUID)));if(!d.length)return;const f=d.length,p=d.map((e=>e.uid));let h=p.findIndex((e=>e===n));-1===h?h=0:(h+=e,h<0?h=f-1:h===f&&(h=0));return p[h]}(e,i,I,w);t&&(_(t),f.jumpToMeasurement(n,t))}),[f,i,I,w,n]);(0,r.useEffect)((()=>{const e=function(e,t){if(!e)return null;return r.createElement("div",{className:"relative"},r.createElement(o.Tooltip,{position:"bottom-left",content:r.createElement("div",{className:"flex py-2"},r.createElement("div",{className:"flex pt-1"},r.createElement(o.Icon,{name:"info-link",className:"text-primary-main w-4"})),r.createElement("div",{className:"ml-4 flex"},r.createElement("span",{className:"text-common-light text-base"},e?r.createElement(r.Fragment,null,t("Series is tracked and can be viewed in the measurement panel")):r.createElement(r.Fragment,null,t("Measurements for untracked series will not be shown in the measurements panel")))))},r.createElement(o.Icon,{name:"viewport-status-tracked",className:"text-aqua-pale"})))}(E,m),t=p(E,M,n===S);g.setComponents([{viewportId:n,id:"viewportStatusComponent",component:e,indexPriority:-100,location:g.LOCATIONS.topLeft},{viewportId:n,id:"viewportActionArrowsComponent",component:t,indexPriority:0,location:g.LOCATIONS.topRight}])}),[S,E,M,g,n]);return r.createElement(r.Fragment,null,r.createElement("div",{className:"relative flex h-full w-full flex-row overflow-hidden"},(()=>{const{component:t}=a.getModuleEntry("@ohif/extension-cornerstone.viewportModule.cornerstone");return r.createElement(t,d({},e,{onElementEnabled:t=>{e.onElementEnabled?.(t),O(t)},onElementDisabled:P}))})()))}f.propTypes={displaySets:a().arrayOf(a().object.isRequired).isRequired,viewportId:a().string.isRequired,dataSource:a().object,children:a().node};const p=(e,t,n)=>e?r.createElement(o.ViewportActionArrows,{onArrowsClick:e=>t(e),className:n?"visible":"invisible group-hover:visible"}):null;const h=f},181:(e,t,n)=>{"use strict";n.d(t,{M:()=>l});var r=n(1),i=n(827),a=n.n(i);const o=(0,r.createContext)(null),{Provider:s}=o,l=()=>(0,r.useContext)(o);function u({children:e,value:t}){const[n,i]=(0,r.useState)(t);return r.createElement(s,{value:[n]},e)}u.propTypes={children:a().any,value:a().any}},795:(e,t,n)=>{"use strict";n.d(t,{Z:()=>B});var r=n(133),i=n(765);function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){(0,i.Z)(e,t,n[t])}))}return e}var o=n(688),s=n(755);function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){if(t&&("object"==(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}var p=n(767);var h=n(274);function v(e){return function(e){if(Array.isArray(e))return(0,p.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,h.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var g=n(976),y={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var n;console&&console[e]&&(n=console)[e].apply(n,v(t))}},m=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.Z)(this,e),this.init(t,n)}return(0,s.Z)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||y,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,a({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),b=function(){function e(){(0,o.Z)(this,e),this.observers={}}return(0,s.Z)(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)}));this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function S(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function w(e){return null==e?"":""+e}function k(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var a="string"!=typeof t?[].concat(t):t.split(".");a.length>1;){if(i())return{};var o=r(a.shift());!e[o]&&n&&(e[o]=new n),e=e[o]}return i()?{}:{obj:e,k:r(a.shift())}}function E(e,t,n){var r=k(e,t,Object);r.obj[r.k]=n}function x(e,t){var n=k(e,t),r=n.obj,i=n.k;if(r)return r[i]}function I(e,t,n){var r=x(e,n);return void 0!==r?r:x(t,n)}function _(e,t,n){for(var r in t)r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):_(e[r],t[r],n):e[r]=t[r];return e}function T(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var C={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function N(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return C[e]})):e}var R=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,o.Z)(this,t),n=u(this,c(t).call(this)),b.call(l(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return f(t,e),(0,s.Z)(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=[e,t];return n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split(".")),x(this.data,a)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(r=t,t=(o=e.split("."))[1]),this.addNamespaces(t),E(this.data,o,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var l=x(this.data,s)||{};r?_(l,n,i):l=a({},l,n),E(this.data,s,l),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?a({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(b),D={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var a=this;return e.forEach((function(e){a.processors[e]&&(t=a.processors[e].process(t,n,r,i))})),t}},O=function(e){function t(e){var n,r,i,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.Z)(this,t),n=u(this,c(t).call(this)),b.call(l(n)),r=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i=e,a=l(n),r.forEach((function(e){i[e]&&(a[e]=i[e])})),n.options=s,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=m.create("translator"),n}return f(t,e),(0,s.Z)(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=t.nsSeparator||this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var n=this;if("object"!==(0,r.Z)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),s=o.key,l=o.namespaces,u=l[l.length-1],c=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(d){var f=t.nsSeparator||this.options.nsSeparator;return u+f+s}return s}var p=this.resolve(e,t),h=p&&p.res,v=p&&p.usedKey||s,g=p&&p.exactUsedKey||s,y=Object.prototype.toString.apply(h),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&h&&("string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(y)<0&&("string"!=typeof m||"[object Array]"!==y)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,h,t):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(i){var S="[object Array]"===y,w=S?[]:{},k=S?g:v;for(var E in h)if(Object.prototype.hasOwnProperty.call(h,E)){var x="".concat(k).concat(i).concat(E);w[E]=this.translate(x,a({},t,{joinArrays:!1,ns:l})),w[E]===x&&(w[E]=h[E])}h=w}}else if(b&&"string"==typeof m&&"[object Array]"===y)(h=h.join(m))&&(h=this.extendTranslation(h,e,t));else{var I=!1,_=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(I=!0,void 0!==t.count){var T=this.pluralResolver.getSuffix(c,t.count);h=t["defaultValue".concat(T)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(_=!0,h=s);var C=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(_||I||C){this.logger.log(C?"updateKey":"missingKey",c,u,s,C?t.defaultValue:h);var N=[],R=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&R&&R[0])for(var D=0;D<R.length;D++)N.push(R[D]);else"all"===this.options.saveMissingTo?N=this.languageUtils.toResolveHierarchy(t.lng||this.language):N.push(t.lng||this.language);var O=function(e,r){n.options.missingKeyHandler?n.options.missingKeyHandler(e,u,r,C?t.defaultValue:h,C,t):n.backendConnector&&n.backendConnector.saveMissing&&n.backendConnector.saveMissing(e,u,r,C?t.defaultValue:h,C,t),n.emit("missingKey",e,u,r,h)};if(this.options.saveMissing){var P=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&P?N.forEach((function(e){n.pluralResolver.getPluralFormsOfKey(e,s).forEach((function(t){return O([e],t)}))})):O(N,s)}}h=this.extendTranslation(h,e,t,p),_&&h===s&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(s)),_&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,n,r){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(a({},n,{interpolation:a({},this.options.interpolation,n.interpolation)}));var o=n.replace&&"string"!=typeof n.replace?n.replace:n;this.options.interpolation.defaultVariables&&(o=a({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o,n.lng||this.language,n),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){return i.translate.apply(i,arguments)}),n)),n.interpolation&&this.interpolator.reset()}var s=n.postProcess||this.options.postProcess,l="string"==typeof s?[s]:s;return null!=e&&l&&l.length&&!1!==n.applyPostProcessor&&(e=D.handle(l,e,t,this.options&&this.options.postProcessPassResolved?a({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,i,a,o=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!o.isValidLookup(t)){var l=o.extractFromKey(e,s),u=l.key;n=u;var c=l.namespaces;o.options.fallbackNS&&(c=c.concat(o.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,f=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,p=s.lngs?s.lngs:o.languageUtils.toResolveHierarchy(s.lng||o.language,s.fallbackLng);c.forEach((function(e){o.isValidLookup(t)||(a=e,o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(a)&&o.logger.warn('key "'.concat(n,'" for namespace "').concat(a,"\" won't get resolved as namespace was not yet loaded"),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"),p.forEach((function(n){if(!o.isValidLookup(t)){i=n;var a,l,c=u,p=[c];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(p,u,n,e,s);else d&&(a=o.pluralResolver.getSuffix(n,s.count)),d&&f&&p.push(c+a),f&&p.push(c+="".concat(o.options.contextSeparator).concat(s.context)),d&&p.push(c+=a);for(;l=p.pop();)o.isValidLookup(t)||(r=l,t=o.getResource(n,e,l,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:a}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}]),t}(b);function P(e){return e.charAt(0).toUpperCase()+e.slice(1)}var M=function(){function e(t){(0,o.Z)(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=m.create("languageUtils")}return(0,s.Z)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=P(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=P(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=P(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],a=function(e){e&&(n.isWhitelisted(e)?i.push(e):n.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):"string"==typeof e&&a(this.formatLanguageCode(e)),r.forEach((function(e){i.indexOf(e)<0&&a(n.formatLanguageCode(e))})),i}}]),e}(),L=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],A={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};var U=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.Z)(this,e),this.languageUtils=t,this.options=r,this.logger=m.create("pluralResolver"),this.rules=(n={},L.forEach((function(e){e.lngs.forEach((function(t){n[t]={numbers:e.nr,plurals:A[e.fc]}}))})),n)}return(0,s.Z)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=this,r=[],i=this.getRule(e);return i?(i.numbers.forEach((function(i){var a=n.getSuffix(e,i);r.push("".concat(t).concat(a))})),r):r}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var i=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),a=r.numbers[i];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===a?a="plural":1===a&&(a=""));var o=function(){return n.options.prepend&&a.toString()?n.options.prepend+a.toString():a.toString()};return"v1"===this.options.compatibilityJSON?1===a?"":"number"==typeof a?"_plural_".concat(a.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?o():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),j=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o.Z)(this,e),this.logger=m.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,s.Z)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:N,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?T(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?T(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?T(t.nestingPrefix):t.nestingPrefixEscaped||T("$t("),this.nestingSuffix=t.nestingSuffix?T(t.nestingSuffix):t.nestingSuffixEscaped||T(")"),this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,a,o,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(e.indexOf(s.formatSeparator)<0)return I(t,l,e);var r=e.split(s.formatSeparator),i=r.shift().trim(),a=r.join(s.formatSeparator).trim();return s.format(I(t,l,i),a,n)};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler;for(o=0;i=this.regexpUnescape.exec(e);){if(void 0===(a=c(i[1].trim())))if("function"==typeof d){var f=d(e,i,r);a="string"==typeof f?f:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),a="";else"string"==typeof a||this.useRawValueToEscape||(a=w(a));if(e=e.replace(i[0],u(a)),this.regexpUnescape.lastIndex=0,++o>=this.maxReplaces)break}for(o=0;i=this.regexp.exec(e);){if(void 0===(a=c(i[1].trim())))if("function"==typeof d){var p=d(e,i,r);a="string"==typeof p?p:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),a="";else"string"==typeof a||this.useRawValueToEscape||(a=w(a));if(a=this.escapeValue?u(this.escape(a)):u(a),e=e.replace(i[0],a),this.regexp.lastIndex=0,++o>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var n,r,i=a({},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});function o(e,t){if(e.indexOf(",")<0)return e;var n=e.split(",");e=n.shift();var r=n.join(",");r=(r=this.interpolate(r,i)).replace(/'/g,'"');try{i=JSON.parse(r),t&&(i=a({},t,i))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return delete i.defaultValue,e}for(i.applyPostProcessor=!1,delete i.defaultValue;n=this.nestingRegexp.exec(e);){if((r=t(o.call(this,n[1].trim(),i),i))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=w(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();var z=function(e){function t(e,n,r){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,o.Z)(this,t),i=u(this,c(t).call(this)),b.call(l(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=a,i.logger=m.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,a.backend,a),i}return f(t,e),(0,s.Z)(t,[{key:"queueLoad",value:function(e,t,n,r){var i=this,a=[],o=[],s=[],l=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?o.indexOf(s)<0&&o.push(s):(i.state[s]=1,r=!1,o.indexOf(s)<0&&o.push(s),a.indexOf(s)<0&&a.push(s),l.indexOf(t)<0&&l.push(t)))})),r||s.push(e)})),(a.length||o.length)&&this.queue.push({pending:o,loaded:{},errors:[],callback:r}),{toLoad:a,pending:o,toLoadLanguages:s,toLoadNamespaces:l}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=(0,g.Z)(r,2),a=i[0],o=i[1];t&&this.emit("failedLoading",a,o,t),n&&this.store.addResourceBundle(a,o,n),this.state[e]=t?-1:2;var s={};this.queue.forEach((function(n){var r,i,l,u,c,d;r=n.loaded,i=o,u=k(r,[a],Object),c=u.obj,d=u.k,c[d]=c[d]||[],l&&(c[d]=c[d].concat(i)),l||c[d].push(i),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){s[e]||(s[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){s[e].indexOf(t)<0&&s[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,o=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,l){s&&l&&i<5?setTimeout((function(){r.read.call(r,e,t,n,i+1,2*a,o)}),a):o(s,l)})):o(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var a=this.queueLoad(e,t,r,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=(0,g.Z)(r,2),a=i[0],o=i[1];this.read(a,o,"read",null,null,(function(r,i){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(a," failed"),r),!r&&i&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(a),i),t.loaded(e,r,i)}))}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" for namespace "').concat(t,'" as the namespace was not yet loaded'),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,a({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(b);function F(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function V(){}const B=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if((0,o.Z)(this,t),e=u(this,c(t).call(this)),b.call(l(e)),e.options=F(n),e.services={},e.logger=m,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),u(e,l(e));setTimeout((function(){e.init(n,r)}),0)}return e}return f(t,e),(0,s.Z)(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function i(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),this.options=a({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,r.Z)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,r.Z)(e[2])||"object"===(0,r.Z)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}},this.options,F(t)),this.format=this.options.interpolation.format,n||(n=V),!this.options.isClone){this.modules.logger?m.init(i(this.modules.logger),this.options):m.init(null,this.options);var o=new M(this.options);this.store=new R(this.options.resources,this.options);var s=this.services;s.logger=m,s.resourceStore=this.store,s.languageUtils=o,s.pluralResolver=new U(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),s.interpolator=new j(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new z(i(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(s.languageDetector=i(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=i(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new O(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var l=S(),u=function(){e.changeLanguage(e.options.lng,(function(t,r){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(r),n(t,r)}))};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}},{key:"loadResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return t();var n=[],r=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(e){n.indexOf(e)<0&&n.push(e)}))};if(this.language)r(this.language);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return r(e)}));this.options.preload&&this.options.preload.forEach((function(e){return r(e)})),this.services.backendConnector.load(n,this.options.ns,t)}else t(null)}},{key:"reloadResources",value:function(e,t,n){var r=S();return e||(e=this.languages),t||(t=this.options.ns),n||(n=V),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&D.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this,r=S();this.emit("languageChanging",e);var i=function(e){e&&(n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.translator.language||n.translator.changeLanguage(e),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(e)),n.loadResources((function(i){!function(e,i){n.translator.changeLanguage(i),i&&(n.emit("languageChanged",i),n.logger.log("languageChanged",i)),r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(i,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,i=function e(t,i){var o;if("object"!==(0,r.Z)(i)){for(var s=arguments.length,l=new Array(s>2?s-2:0),u=2;u<s;u++)l[u-2]=arguments[u];o=n.options.overloadTranslationOptionHandler([t,i].concat(l))}else o=a({},i);return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,n.t(t,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this;if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.languages[0],r=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!!this.hasResourceBundle(n,e)||(!this.services.backendConnector.backend||!(!a(n,e)||r&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=S();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=S();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter((function(e){return r.indexOf(e)<0}));return i.length?(this.options.preload=r.concat(i),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:V,i=a({},this.options,n,{isClone:!0}),o=new t(i);return["store","services","language"].forEach((function(t){o[t]=e[t]})),o.translator=new O(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))})),o.init(i,r),o.translator.options=o.options,o}}]),t}(b))},324:(e,t,n)=>{var r=NaN,i="[object Symbol]",a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,f=c||d||Function("return this")(),p=Object.prototype.toString,h=Math.max,v=Math.min,g=function(){return f.Date.now()};function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&p.call(e)==i}(e))return r;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):o.test(e)?r:+e}e.exports=function(e,t,n){var r,i,a,o,s,l,u=0,c=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,a=i;return r=i=void 0,u=t,o=e.apply(a,n)}function b(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-u>=a}function S(){var e=g();if(b(e))return w(e);s=setTimeout(S,function(e){var n=t-(e-l);return d?v(n,a-(e-u)):n}(e))}function w(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function k(){var e=g(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(S,t),c?p(e):o}(l);if(d)return s=setTimeout(S,t),p(l)}return void 0===s&&(s=setTimeout(S,t)),o}return t=m(t)||0,y(n)&&(c=!!n.leading,a=(d="maxWait"in n)?h(m(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),k.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},k.flush=function(){return void 0===s?o:w(g())},k}},337:(e,t,n)=>{"use strict";var r=n(287);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},827:(e,t,n)=>{e.exports=n(337)()},287:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},262:(e,t,n)=>{"use strict";var r=n(1),i=n(681);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,s={};function l(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(s[e]=t,e=0;e<t.length;e++)o.add(t[e])}var c=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},h={};function v(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new v(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function m(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(h,e)||!d.call(p,e)&&(f.test(e)?h[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,m);g[t]=new v(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,m);g[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,m);g[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var S=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),k=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),O=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var P=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function L(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=M&&e[M]||e["@@iterator"])?e:null}var A,U=Object.assign;function j(e){if(void 0===A)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);A=t&&t[1]||""}return"\n"+A+e}var z=!1;function F(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var l="\n"+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=o&&0<=s);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?j(e):""}function V(e){switch(e.tag){case 5:return j(e.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return e=F(e.type,!1);case 11:return e=F(e.type.render,!1);case 1:return e=F(e.type,!0);default:return""}}function B(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case E:return"Fragment";case k:return"Portal";case I:return"Profiler";case x:return"StrictMode";case N:return"Suspense";case R:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case _:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case D:return null!==(t=e.displayName||null)?t:B(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return B(e(t))}catch(e){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B(t);case 8:return t===x?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function $(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=$(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Y(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function K(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return U({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Z(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function G(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function J(e,t){G(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function X(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&K(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return U({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function ae(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,ce,de=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","ms","Moz","O"];function ve(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ve(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(pe).forEach((function(e){he.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ye=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function me(e,t){if(t){if(ye[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Se=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var ke=null,Ee=null,xe=null;function Ie(e){if(e=bi(e)){if("function"!=typeof ke)throw Error(a(280));var t=e.stateNode;t&&(t=wi(t),ke(e.stateNode,e.type,t))}}function _e(e){Ee?xe?xe.push(e):xe=[e]:Ee=e}function Te(){if(Ee){var e=Ee,t=xe;if(xe=Ee=null,Ie(e),t)for(e=0;e<t.length;e++)Ie(t[e])}}function Ce(e,t){return e(t)}function Ne(){}var Re=!1;function De(e,t,n){if(Re)return e(t,n);Re=!0;try{return Ce(e,t,n)}finally{Re=!1,(null!==Ee||null!==xe)&&(Ne(),Te())}}function Oe(e,t){var n=e.stateNode;if(null===n)return null;var r=wi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Pe=!1;if(c)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){Pe=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(ce){Pe=!1}function Le(e,t,n,r,i,a,o,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var Ae=!1,Ue=null,je=!1,ze=null,Fe={onError:function(e){Ae=!0,Ue=e}};function Ve(e,t,n,r,i,a,o,s,l){Ae=!1,Ue=null,Le.apply(Fe,arguments)}function Be(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function He(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function We(e){if(Be(e)!==e)throw Error(a(188))}function $e(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Be(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return We(i),e;if(o===r)return We(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?qe(e):null}function qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=qe(e);if(null!==t)return t;e=e.sibling}return null}var Ye=i.unstable_scheduleCallback,Ke=i.unstable_cancelCallback,Qe=i.unstable_shouldYield,Ze=i.unstable_requestPaint,Ge=i.unstable_now,Je=i.unstable_getCurrentPriorityLevel,Xe=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,at=null;var ot=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ut=64,ct=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ft(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=dt(s):0!==(a&=o)&&(r=dt(a))}else 0!==(o=n&~i)?r=dt(o):0!==a&&(r=dt(a));if(0===r)return 0;if(0!==t&&t!==r&&!(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&4194240&a))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-ot(t)),r|=e[n],t&=~i;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ht(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function vt(){var e=ut;return!(4194240&(ut<<=1))&&(ut=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var bt=0;function St(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var wt,kt,Et,xt,It,_t=!1,Tt=[],Ct=null,Nt=null,Rt=null,Dt=new Map,Ot=new Map,Pt=[],Mt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Lt(e,t){switch(e){case"focusin":case"focusout":Ct=null;break;case"dragenter":case"dragleave":Nt=null;break;case"mouseover":case"mouseout":Rt=null;break;case"pointerover":case"pointerout":Dt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ot.delete(t.pointerId)}}function At(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&(null!==(t=bi(t))&&kt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Ut(e){var t=mi(e.target);if(null!==t){var n=Be(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=He(n)))return e.blockedOn=t,void It(e.priority,(function(){Et(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function jt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&kt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Se=r,n.target.dispatchEvent(r),Se=null,t.shift()}return!0}function zt(e,t,n){jt(e)&&n.delete(t)}function Ft(){_t=!1,null!==Ct&&jt(Ct)&&(Ct=null),null!==Nt&&jt(Nt)&&(Nt=null),null!==Rt&&jt(Rt)&&(Rt=null),Dt.forEach(zt),Ot.forEach(zt)}function Vt(e,t){e.blockedOn===t&&(e.blockedOn=null,_t||(_t=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ft)))}function Bt(e){function t(t){return Vt(t,e)}if(0<Tt.length){Vt(Tt[0],e);for(var n=1;n<Tt.length;n++){var r=Tt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Ct&&Vt(Ct,e),null!==Nt&&Vt(Nt,e),null!==Rt&&Vt(Rt,e),Dt.forEach(t),Ot.forEach(t),n=0;n<Pt.length;n++)(r=Pt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Pt.length&&null===(n=Pt[0]).blockedOn;)Ut(n),null===n.blockedOn&&Pt.shift()}var Ht=S.ReactCurrentBatchConfig,Wt=!0;function $t(e,t,n,r){var i=bt,a=Ht.transition;Ht.transition=null;try{bt=1,Yt(e,t,n,r)}finally{bt=i,Ht.transition=a}}function qt(e,t,n,r){var i=bt,a=Ht.transition;Ht.transition=null;try{bt=4,Yt(e,t,n,r)}finally{bt=i,Ht.transition=a}}function Yt(e,t,n,r){if(Wt){var i=Qt(e,t,n,r);if(null===i)Wr(e,t,r,Kt,n),Lt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Ct=At(Ct,e,t,n,r,i),!0;case"dragenter":return Nt=At(Nt,e,t,n,r,i),!0;case"mouseover":return Rt=At(Rt,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Dt.set(a,At(Dt.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Ot.set(a,At(Ot.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Lt(e,r),4&t&&-1<Mt.indexOf(e)){for(;null!==i;){var a=bi(i);if(null!==a&&wt(a),null===(a=Qt(e,t,n,r))&&Wr(e,t,r,Kt,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Wr(e,t,r,null,n)}}var Kt=null;function Qt(e,t,n,r){if(Kt=null,null!==(e=mi(e=we(r))))if(null===(t=Be(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=He(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Kt=e,null}function Zt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Je()){case Xe:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Gt=null,Jt=null,Xt=null;function en(){if(Xt)return Xt;var e,t,n=Jt,r=n.length,i="value"in Gt?Gt.value:Gt.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return Xt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function an(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return U(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on,sn,ln,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=an(un),dn=U({},un,{view:0,detail:0}),fn=an(dn),pn=U({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:In,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(on=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=on=0,ln=e),on)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),hn=an(pn),vn=an(U({},pn,{dataTransfer:0})),gn=an(U({},dn,{relatedTarget:0})),yn=an(U({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),mn=U({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=an(mn),Sn=an(U({},un,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},En={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=En[e])&&!!t[e]}function In(){return xn}var _n=U({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?kn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:In,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Tn=an(_n),Cn=an(U({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=an(U({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:In})),Rn=an(U({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),Dn=U({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),On=an(Dn),Pn=[9,13,27,32],Mn=c&&"CompositionEvent"in window,Ln=null;c&&"documentMode"in document&&(Ln=document.documentMode);var An=c&&"TextEvent"in window&&!Ln,Un=c&&(!Mn||Ln&&8<Ln&&11>=Ln),jn=String.fromCharCode(32),zn=!1;function Fn(e,t){switch(e){case"keyup":return-1!==Pn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Bn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function $n(e,t,n,r){_e(r),0<(t=qr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Yn=null;function Kn(e){jr(e,0)}function Qn(e){if(Y(Si(e)))return e}function Zn(e,t){if("change"===e)return t}var Gn=!1;if(c){var Jn;if(c){var Xn="oninput"in document;if(!Xn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Xn="function"==typeof er.oninput}Jn=Xn}else Jn=!1;Gn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){qn&&(qn.detachEvent("onpropertychange",nr),Yn=qn=null)}function nr(e){if("value"===e.propertyName&&Qn(Yn)){var t=[];$n(t,Yn,e,we(e)),De(Kn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Yn=n,(qn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Qn(Yn)}function ar(e,t){if("click"===e)return Qn(t)}function or(e,t){if("input"===e||"change"===e)return Qn(t)}var sr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function lr(e,t){if(sr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!sr(e[i],t[i]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fr(){for(var e=window,t=K();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=K((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function hr(e){var t=fr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=cr(n,a);var o=cr(n,r);i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var vr=c&&"documentMode"in document&&11>=document.documentMode,gr=null,yr=null,mr=null,br=!1;function Sr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==gr||gr!==K(r)||("selectionStart"in(r=gr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},mr&&lr(mr,r)||(mr=r,0<(r=qr(yr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},Er={},xr={};function Ir(e){if(Er[e])return Er[e];if(!kr[e])return e;var t,n=kr[e];for(t in n)if(n.hasOwnProperty(t)&&t in xr)return Er[e]=n[t];return e}c&&(xr=document.createElement("div").style,"AnimationEvent"in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),"TransitionEvent"in window||delete kr.transitionend.transition);var _r=Ir("animationend"),Tr=Ir("animationiteration"),Cr=Ir("animationstart"),Nr=Ir("transitionend"),Rr=new Map,Dr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Or(e,t){Rr.set(e,t),l(t,[e])}for(var Pr=0;Pr<Dr.length;Pr++){var Mr=Dr[Pr];Or(Mr.toLowerCase(),"on"+(Mr[0].toUpperCase()+Mr.slice(1)))}Or(_r,"onAnimationEnd"),Or(Tr,"onAnimationIteration"),Or(Cr,"onAnimationStart"),Or("dblclick","onDoubleClick"),Or("focusin","onFocus"),Or("focusout","onBlur"),Or(Nr,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ar=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lr));function Ur(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,l,u){if(Ve.apply(this,arguments),Ae){if(!Ae)throw Error(a(198));var c=Ue;Ae=!1,Ue=null,je||(je=!0,ze=c)}}(r,t,void 0,e),e.currentTarget=null}function jr(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break e;Ur(i,s,u),a=l}else for(o=0;o<r.length;o++){if(l=(s=r[o]).instance,u=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break e;Ur(i,s,u),a=l}}}if(je)throw e=ze,je=!1,ze=null,e}function zr(e,t){var n=t[vi];void 0===n&&(n=t[vi]=new Set);var r=e+"__bubble";n.has(r)||(Hr(t,e,2,!1),n.add(r))}function Fr(e,t,n){var r=0;t&&(r|=4),Hr(n,e,r,t)}var Vr="_reactListening"+Math.random().toString(36).slice(2);function Br(e){if(!e[Vr]){e[Vr]=!0,o.forEach((function(t){"selectionchange"!==t&&(Ar.has(t)||Fr(t,!1,e),Fr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Vr]||(t[Vr]=!0,Fr("selectionchange",!1,t))}}function Hr(e,t,n,r){switch(Zt(t)){case 1:var i=$t;break;case 4:i=qt;break;default:i=Yt}n=i.bind(null,t,n,e),i=void 0,!Pe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Wr(e,t,n,r,i){var a=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var l=o.tag;if((3===l||4===l)&&((l=o.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;o=o.return}for(;null!==s;){if(null===(o=mi(s)))return;if(5===(l=o.tag)||6===l){r=a=o;continue e}s=s.parentNode}}r=r.return}De((function(){var r=a,i=we(n),o=[];e:{var s=Rr.get(e);if(void 0!==s){var l=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Tn;break;case"focusin":u="focus",l=gn;break;case"focusout":u="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=hn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=vn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Nn;break;case _r:case Tr:case Cr:l=yn;break;case Nr:l=Rn;break;case"scroll":l=fn;break;case"wheel":l=On;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Cn}var c=!!(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var v=(p=h).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==f&&(null!=(v=Oe(h,f))&&c.push($r(h,v,p)))),d)break;h=h.return}0<c.length&&(s=new l(s,u,null,n,i),o.push({event:s,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Se||!(u=n.relatedTarget||n.fromElement)||!mi(u)&&!u[hi])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?mi(u):null)&&(u!==(d=Be(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=hn,v="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Cn,v="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:Si(l),p=null==u?s:Si(u),(s=new c(v,h+"leave",l,n,i)).target=d,s.relatedTarget=p,v=null,mi(i)===r&&((c=new c(f,h+"enter",u,n,i)).target=p,c.relatedTarget=d,v=c),d=v,l&&u)e:{for(f=u,h=0,p=c=l;p;p=Yr(p))h++;for(p=0,v=f;v;v=Yr(v))p++;for(;0<h-p;)c=Yr(c),h--;for(;0<p-h;)f=Yr(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=Yr(c),f=Yr(f)}c=null}else c=null;null!==l&&Kr(o,s,l,c,!1),null!==u&&null!==d&&Kr(o,d,u,c,!0)}if("select"===(l=(s=r?Si(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Zn;else if(Wn(s))if(Gn)g=or;else{g=ir;var y=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ar);switch(g&&(g=g(e,r))?$n(o,g,n,i):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&ee(s,"number",s.value)),y=r?Si(r):window,e){case"focusin":(Wn(y)||"true"===y.contentEditable)&&(gr=y,yr=r,mr=null);break;case"focusout":mr=yr=gr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,Sr(o,n,i);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":Sr(o,n,i)}var m;if(Mn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Bn?Fn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Un&&"ko"!==n.locale&&(Bn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Bn&&(m=en()):(Jt="value"in(Gt=i)?Gt.value:Gt.textContent,Bn=!0)),0<(y=qr(r,b)).length&&(b=new Sn(b,e,null,n,i),o.push({event:b,listeners:y}),m?b.data=m:null!==(m=Vn(n))&&(b.data=m))),(m=An?function(e,t){switch(e){case"compositionend":return Vn(t);case"keypress":return 32!==t.which?null:(zn=!0,jn);case"textInput":return(e=t.data)===jn&&zn?null:e;default:return null}}(e,n):function(e,t){if(Bn)return"compositionend"===e||!Mn&&Fn(e,t)?(e=en(),Xt=Jt=Gt=null,Bn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Un&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=qr(r,"onBeforeInput")).length&&(i=new Sn("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=m))}jr(o,t)}))}function $r(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=Oe(e,n))&&r.unshift($r(e,a,i)),null!=(a=Oe(e,t))&&r.push($r(e,a,i))),e=e.return}return r}function Yr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Kr(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,i?null!=(l=Oe(n,a))&&o.unshift($r(n,l,s)):i||null!=(l=Oe(n,a))&&o.push($r(n,l,s))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Qr=/\r\n?/g,Zr=/\u0000|\uFFFD/g;function Gr(e){return("string"==typeof e?e:""+e).replace(Qr,"\n").replace(Zr,"")}function Jr(e,t,n){if(t=Gr(t),Gr(e)!==t&&n)throw Error(a(425))}function Xr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"==typeof setTimeout?setTimeout:void 0,ii="function"==typeof clearTimeout?clearTimeout:void 0,ai="function"==typeof Promise?Promise:void 0,oi="function"==typeof queueMicrotask?queueMicrotask:void 0!==ai?function(e){return ai.resolve(null).then(e).catch(si)}:ri;function si(e){setTimeout((function(){throw e}))}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Bt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Bt(t)}function ui(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ci(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var di=Math.random().toString(36).slice(2),fi="__reactFiber$"+di,pi="__reactProps$"+di,hi="__reactContainer$"+di,vi="__reactEvents$"+di,gi="__reactListeners$"+di,yi="__reactHandles$"+di;function mi(e){var t=e[fi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[hi]||n[fi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ci(e);null!==e;){if(n=e[fi])return n;e=ci(e)}return t}n=(e=n).parentNode}return null}function bi(e){return!(e=e[fi]||e[hi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Si(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function wi(e){return e[pi]||null}var ki=[],Ei=-1;function xi(e){return{current:e}}function Ii(e){0>Ei||(e.current=ki[Ei],ki[Ei]=null,Ei--)}function _i(e,t){Ei++,ki[Ei]=e.current,e.current=t}var Ti={},Ci=xi(Ti),Ni=xi(!1),Ri=Ti;function Di(e,t){var n=e.type.contextTypes;if(!n)return Ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Oi(e){return null!=(e=e.childContextTypes)}function Pi(){Ii(Ni),Ii(Ci)}function Mi(e,t,n){if(Ci.current!==Ti)throw Error(a(168));_i(Ci,t),_i(Ni,n)}function Li(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,H(e)||"Unknown",i));return U({},n,r)}function Ai(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ti,Ri=Ci.current,_i(Ci,e),_i(Ni,Ni.current),!0}function Ui(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Li(e,t,Ri),r.__reactInternalMemoizedMergedChildContext=e,Ii(Ni),Ii(Ci),_i(Ci,e)):Ii(Ni),_i(Ni,n)}var ji=null,zi=!1,Fi=!1;function Vi(e){null===ji?ji=[e]:ji.push(e)}function Bi(){if(!Fi&&null!==ji){Fi=!0;var e=0,t=bt;try{var n=ji;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}ji=null,zi=!1}catch(t){throw null!==ji&&(ji=ji.slice(e+1)),Ye(Xe,Bi),t}finally{bt=t,Fi=!1}}return null}var Hi=[],Wi=0,$i=null,qi=0,Yi=[],Ki=0,Qi=null,Zi=1,Gi="";function Ji(e,t){Hi[Wi++]=qi,Hi[Wi++]=$i,$i=e,qi=t}function Xi(e,t,n){Yi[Ki++]=Zi,Yi[Ki++]=Gi,Yi[Ki++]=Qi,Qi=e;var r=Zi;e=Gi;var i=32-ot(r)-1;r&=~(1<<i),n+=1;var a=32-ot(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Zi=1<<32-ot(t)+i|n<<i|r,Gi=a+e}else Zi=1<<a|n<<i|r,Gi=e}function ea(e){null!==e.return&&(Ji(e,1),Xi(e,1,0))}function ta(e){for(;e===$i;)$i=Hi[--Wi],Hi[Wi]=null,qi=Hi[--Wi],Hi[Wi]=null;for(;e===Qi;)Qi=Yi[--Ki],Yi[Ki]=null,Gi=Yi[--Ki],Yi[Ki]=null,Zi=Yi[--Ki],Yi[Ki]=null}var na=null,ra=null,ia=!1,aa=null;function oa(e,t){var n=Du(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function sa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,na=e,ra=ui(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,na=e,ra=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Qi?{id:Zi,overflow:Gi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Du(18,null,null,0)).stateNode=t,n.return=e,e.child=n,na=e,ra=null,!0);default:return!1}}function la(e){return!(!(1&e.mode)||128&e.flags)}function ua(e){if(ia){var t=ra;if(t){var n=t;if(!sa(e,t)){if(la(e))throw Error(a(418));t=ui(n.nextSibling);var r=na;t&&sa(e,t)?oa(r,n):(e.flags=-4097&e.flags|2,ia=!1,na=e)}}else{if(la(e))throw Error(a(418));e.flags=-4097&e.flags|2,ia=!1,na=e}}}function ca(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;na=e}function da(e){if(e!==na)return!1;if(!ia)return ca(e),ia=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ra)){if(la(e))throw fa(),Error(a(418));for(;t;)oa(e,t),t=ui(t.nextSibling)}if(ca(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ra=ui(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ra=null}}else ra=na?ui(e.stateNode.nextSibling):null;return!0}function fa(){for(var e=ra;e;)e=ui(e.nextSibling)}function pa(){ra=na=null,ia=!1}function ha(e){null===aa?aa=[e]:aa.push(e)}var va=S.ReactCurrentBatchConfig;function ga(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function ya(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ma(e){return(0,e._init)(e._payload)}function ba(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Pu(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Uu(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){var a=n.type;return a===E?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===O&&ma(a)===t.type)?((r=i(t,n.props)).ref=ga(e,t,n),r.return=e,r):((r=Mu(n.type,n.key,n.props,null,e.mode,r)).ref=ga(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=ju(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=Lu(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Uu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Mu(t.type,t.key,t.props,null,e.mode,n)).ref=ga(e,null,t),n.return=e,n;case k:return(t=ju(t,e.mode,n)).return=e,t;case O:return f(e,(0,t._init)(t._payload),n)}if(te(t)||L(t))return(t=Lu(t,e.mode,n,null)).return=e,t;ya(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===i?u(e,t,n,r):null;case k:return n.key===i?c(e,t,n,r):null;case O:return p(e,t,(i=n._init)(n._payload),r)}if(te(n)||L(n))return null!==i?null:d(e,t,n,r,null);ya(e,n)}return null}function h(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case w:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case k:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case O:return h(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||L(r))return d(t,e=e.get(n)||null,r,i,null);ya(t,r)}return null}function v(i,a,s,l){for(var u=null,c=null,d=a,v=a=0,g=null;null!==d&&v<s.length;v++){d.index>v?(g=d,d=null):g=d.sibling;var y=p(i,d,s[v],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(i,d),a=o(y,a,v),null===c?u=y:c.sibling=y,c=y,d=g}if(v===s.length)return n(i,d),ia&&Ji(i,v),u;if(null===d){for(;v<s.length;v++)null!==(d=f(i,s[v],l))&&(a=o(d,a,v),null===c?u=d:c.sibling=d,c=d);return ia&&Ji(i,v),u}for(d=r(i,d);v<s.length;v++)null!==(g=h(d,i,v,s[v],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?v:g.key),a=o(g,a,v),null===c?u=g:c.sibling=g,c=g);return e&&d.forEach((function(e){return t(i,e)})),ia&&Ji(i,v),u}function g(i,s,l,u){var c=L(l);if("function"!=typeof c)throw Error(a(150));if(null==(l=c.call(l)))throw Error(a(151));for(var d=c=null,v=s,g=s=0,y=null,m=l.next();null!==v&&!m.done;g++,m=l.next()){v.index>g?(y=v,v=null):y=v.sibling;var b=p(i,v,m.value,u);if(null===b){null===v&&(v=y);break}e&&v&&null===b.alternate&&t(i,v),s=o(b,s,g),null===d?c=b:d.sibling=b,d=b,v=y}if(m.done)return n(i,v),ia&&Ji(i,g),c;if(null===v){for(;!m.done;g++,m=l.next())null!==(m=f(i,m.value,u))&&(s=o(m,s,g),null===d?c=m:d.sibling=m,d=m);return ia&&Ji(i,g),c}for(v=r(i,v);!m.done;g++,m=l.next())null!==(m=h(v,i,g,m.value,u))&&(e&&null!==m.alternate&&v.delete(null===m.key?g:m.key),s=o(m,s,g),null===d?c=m:d.sibling=m,d=m);return e&&v.forEach((function(e){return t(i,e)})),ia&&Ji(i,g),c}return function e(r,a,o,l){if("object"==typeof o&&null!==o&&o.type===E&&null===o.key&&(o=o.props.children),"object"==typeof o&&null!==o){switch(o.$$typeof){case w:e:{for(var u=o.key,c=a;null!==c;){if(c.key===u){if((u=o.type)===E){if(7===c.tag){n(r,c.sibling),(a=i(c,o.props.children)).return=r,r=a;break e}}else if(c.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===O&&ma(u)===c.type){n(r,c.sibling),(a=i(c,o.props)).ref=ga(r,c,o),a.return=r,r=a;break e}n(r,c);break}t(r,c),c=c.sibling}o.type===E?((a=Lu(o.props.children,r.mode,l,o.key)).return=r,r=a):((l=Mu(o.type,o.key,o.props,null,r.mode,l)).ref=ga(r,a,o),l.return=r,r=l)}return s(r);case k:e:{for(c=o.key;null!==a;){if(a.key===c){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=ju(o,r.mode,l)).return=r,r=a}return s(r);case O:return e(r,a,(c=o._init)(o._payload),l)}if(te(o))return v(r,a,o,l);if(L(o))return g(r,a,o,l);ya(r,o)}return"string"==typeof o&&""!==o||"number"==typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=Uu(o,r.mode,l)).return=r,r=a),s(r)):n(r,a)}}var Sa=ba(!0),wa=ba(!1),ka=xi(null),Ea=null,xa=null,Ia=null;function _a(){Ia=xa=Ea=null}function Ta(e){var t=ka.current;Ii(ka),e._currentValue=t}function Ca(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Na(e,t){Ea=e,Ia=xa=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(!!(e.lanes&t)&&(bs=!0),e.firstContext=null)}function Ra(e){var t=e._currentValue;if(Ia!==e)if(e={context:e,memoizedValue:t,next:null},null===xa){if(null===Ea)throw Error(a(308));xa=e,Ea.dependencies={lanes:0,firstContext:e}}else xa=xa.next=e;return t}var Da=null;function Oa(e){null===Da?Da=[e]:Da.push(e)}function Pa(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Oa(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ma(e,r)}function Ma(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var La=!1;function Aa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ua(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ja(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Cl){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ma(e,n)}return null===(i=r.interleaved)?(t.next=t,Oa(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ma(e,n)}function Fa(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,mt(e,n)}}function Va(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ba(e,t,n,r){var i=e.updateQueue;La=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,u=l.next;l.next=null,null===o?a=u:o.next=u,o=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==o&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==a){var d=i.baseState;for(o=0,c=u=l=null,s=a;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,v=s;switch(f=t,p=n,v.tag){case 1:if("function"==typeof(h=v.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=v.payload)?h.call(p,d,f):h))break e;d=U({},d,f);break e;case 2:La=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,o|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===c&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);Al|=o,e.lanes=o,e.memoizedState=d}}function Ha(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var Wa={},$a=xi(Wa),qa=xi(Wa),Ya=xi(Wa);function Ka(e){if(e===Wa)throw Error(a(174));return e}function Qa(e,t){switch(_i(Ya,t),_i(qa,e),_i($a,Wa),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ii($a),_i($a,t)}function Za(){Ii($a),Ii(qa),Ii(Ya)}function Ga(e){Ka(Ya.current);var t=Ka($a.current),n=le(t,e.type);t!==n&&(_i(qa,e),_i($a,n))}function Ja(e){qa.current===e&&(Ii($a),Ii(qa))}var Xa=xi(0);function eo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var to=[];function no(){for(var e=0;e<to.length;e++)to[e]._workInProgressVersionPrimary=null;to.length=0}var ro=S.ReactCurrentDispatcher,io=S.ReactCurrentBatchConfig,ao=0,oo=null,so=null,lo=null,uo=!1,co=!1,fo=0,po=0;function ho(){throw Error(a(321))}function vo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function go(e,t,n,r,i,o){if(ao=o,oo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ro.current=null===e||null===e.memoizedState?Xo:es,e=n(r,i),co){o=0;do{if(co=!1,fo=0,25<=o)throw Error(a(301));o+=1,lo=so=null,t.updateQueue=null,ro.current=ts,e=n(r,i)}while(co)}if(ro.current=Jo,t=null!==so&&null!==so.next,ao=0,lo=so=oo=null,uo=!1,t)throw Error(a(300));return e}function yo(){var e=0!==fo;return fo=0,e}function mo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===lo?oo.memoizedState=lo=e:lo=lo.next=e,lo}function bo(){if(null===so){var e=oo.alternate;e=null!==e?e.memoizedState:null}else e=so.next;var t=null===lo?oo.memoizedState:lo.next;if(null!==t)lo=t,so=e;else{if(null===e)throw Error(a(310));e={memoizedState:(so=e).memoizedState,baseState:so.baseState,baseQueue:so.baseQueue,queue:so.queue,next:null},null===lo?oo.memoizedState=lo=e:lo=lo.next=e}return lo}function So(e,t){return"function"==typeof t?t(e):t}function wo(e){var t=bo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=so,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var l=s=null,u=null,c=o;do{var d=c.lane;if((ao&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=f,s=r):u=u.next=f,oo.lanes|=d,Al|=d}c=c.next}while(null!==c&&c!==o);null===u?s=r:u.next=l,sr(r,t.memoizedState)||(bs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,oo.lanes|=o,Al|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ko(e){var t=bo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);sr(o,t.memoizedState)||(bs=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Eo(){}function xo(e,t){var n=oo,r=bo(),i=t(),o=!sr(r.memoizedState,i);if(o&&(r.memoizedState=i,bs=!0),r=r.queue,Ao(To.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==lo&&1&lo.memoizedState.tag){if(n.flags|=2048,Do(9,_o.bind(null,n,r,i,t),void 0,null),null===Nl)throw Error(a(349));30&ao||Io(n,t,i)}return i}function Io(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=oo.updateQueue)?(t={lastEffect:null,stores:null},oo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function _o(e,t,n,r){t.value=n,t.getSnapshot=r,Co(t)&&No(e)}function To(e,t,n){return n((function(){Co(t)&&No(e)}))}function Co(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(e){return!0}}function No(e){var t=Ma(e,1);null!==t&&nu(t,e,1,-1)}function Ro(e){var t=mo();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:So,lastRenderedState:e},t.queue=e,e=e.dispatch=Ko.bind(null,oo,e),[t.memoizedState,e]}function Do(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=oo.updateQueue)?(t={lastEffect:null,stores:null},oo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Oo(){return bo().memoizedState}function Po(e,t,n,r){var i=mo();oo.flags|=e,i.memoizedState=Do(1|t,n,void 0,void 0===r?null:r)}function Mo(e,t,n,r){var i=bo();r=void 0===r?null:r;var a=void 0;if(null!==so){var o=so.memoizedState;if(a=o.destroy,null!==r&&vo(r,o.deps))return void(i.memoizedState=Do(t,n,a,r))}oo.flags|=e,i.memoizedState=Do(1|t,n,a,r)}function Lo(e,t){return Po(8390656,8,e,t)}function Ao(e,t){return Mo(2048,8,e,t)}function Uo(e,t){return Mo(4,2,e,t)}function jo(e,t){return Mo(4,4,e,t)}function zo(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Fo(e,t,n){return n=null!=n?n.concat([e]):null,Mo(4,4,zo.bind(null,t,e),n)}function Vo(){}function Bo(e,t){var n=bo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&vo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ho(e,t){var n=bo();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&vo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Wo(e,t,n){return 21&ao?(sr(n,t)||(n=vt(),oo.lanes|=n,Al|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,bs=!0),e.memoizedState=n)}function $o(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=io.transition;io.transition={};try{e(!1),t()}finally{bt=n,io.transition=r}}function qo(){return bo().memoizedState}function Yo(e,t,n){var r=tu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Qo(e))Zo(t,n);else if(null!==(n=Pa(e,t,n,r))){nu(n,e,r,eu()),Go(n,t,r)}}function Ko(e,t,n){var r=tu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qo(e))Zo(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,o)){var l=t.interleaved;return null===l?(i.next=i,Oa(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Pa(e,t,i,r))&&(nu(n,e,r,i=eu()),Go(n,t,r))}}function Qo(e){var t=e.alternate;return e===oo||null!==t&&t===oo}function Zo(e,t){co=uo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Go(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,mt(e,n)}}var Jo={readContext:Ra,useCallback:ho,useContext:ho,useEffect:ho,useImperativeHandle:ho,useInsertionEffect:ho,useLayoutEffect:ho,useMemo:ho,useReducer:ho,useRef:ho,useState:ho,useDebugValue:ho,useDeferredValue:ho,useTransition:ho,useMutableSource:ho,useSyncExternalStore:ho,useId:ho,unstable_isNewReconciler:!1},Xo={readContext:Ra,useCallback:function(e,t){return mo().memoizedState=[e,void 0===t?null:t],e},useContext:Ra,useEffect:Lo,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Po(4194308,4,zo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Po(4194308,4,e,t)},useInsertionEffect:function(e,t){return Po(4,2,e,t)},useMemo:function(e,t){var n=mo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=mo();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Yo.bind(null,oo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},mo().memoizedState=e},useState:Ro,useDebugValue:Vo,useDeferredValue:function(e){return mo().memoizedState=e},useTransition:function(){var e=Ro(!1),t=e[0];return e=$o.bind(null,e[1]),mo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=oo,i=mo();if(ia){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Nl)throw Error(a(349));30&ao||Io(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Lo(To.bind(null,r,o,e),[e]),r.flags|=2048,Do(9,_o.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=mo(),t=Nl.identifierPrefix;if(ia){var n=Gi;t=":"+t+"R"+(n=(Zi&~(1<<32-ot(Zi)-1)).toString(32)+n),0<(n=fo++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=po++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Ra,useCallback:Bo,useContext:Ra,useEffect:Ao,useImperativeHandle:Fo,useInsertionEffect:Uo,useLayoutEffect:jo,useMemo:Ho,useReducer:wo,useRef:Oo,useState:function(){return wo(So)},useDebugValue:Vo,useDeferredValue:function(e){return Wo(bo(),so.memoizedState,e)},useTransition:function(){return[wo(So)[0],bo().memoizedState]},useMutableSource:Eo,useSyncExternalStore:xo,useId:qo,unstable_isNewReconciler:!1},ts={readContext:Ra,useCallback:Bo,useContext:Ra,useEffect:Ao,useImperativeHandle:Fo,useInsertionEffect:Uo,useLayoutEffect:jo,useMemo:Ho,useReducer:ko,useRef:Oo,useState:function(){return ko(So)},useDebugValue:Vo,useDeferredValue:function(e){var t=bo();return null===so?t.memoizedState=e:Wo(t,so.memoizedState,e)},useTransition:function(){return[ko(So)[0],bo().memoizedState]},useMutableSource:Eo,useSyncExternalStore:xo,useId:qo,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=U({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:U({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var is={isMounted:function(e){return!!(e=e._reactInternals)&&Be(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),a=ja(r,i);a.payload=t,null!=n&&(a.callback=n),null!==(t=za(e,a,i))&&(nu(t,e,i,r),Fa(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),a=ja(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=za(e,a,i))&&(nu(t,e,i,r),Fa(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=eu(),r=tu(e),i=ja(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=za(e,i,r))&&(nu(t,e,r,n),Fa(t,e,r))}};function as(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,a))}function os(e,t,n){var r=!1,i=Ti,a=t.contextType;return"object"==typeof a&&null!==a?a=Ra(a):(i=Oi(t)?Ri:Ci.current,a=(r=null!=(r=t.contextTypes))?Di(e,i):Ti),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function ss(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&is.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Aa(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=Ra(a):(a=Oi(t)?Ri:Ci.current,i.context=Di(e,a)),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(rs(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&is.enqueueReplaceState(i,i.state,null),Ba(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function us(e,t){try{var n="",r=t;do{n+=V(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function cs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var fs="function"==typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=ja(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wl||(Wl=!0,$l=r),ds(0,t)},n}function hs(e,t,n){(n=ja(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ds(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!=typeof r&&(null===ql?ql=new Set([this]):ql.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function vs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fs;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Iu.bind(null,e,t,n),t.then(e,e))}function gs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=ja(-1,1)).tag=2,za(n,t,1))),n.lanes|=1),e)}var ms=S.ReactCurrentOwner,bs=!1;function Ss(e,t,n,r){t.child=null===e?wa(t,null,n,r):Sa(t,e.child,n,r)}function ws(e,t,n,r,i){n=n.render;var a=t.ref;return Na(t,i),r=go(e,t,n,r,a,i),n=yo(),null===e||bs?(ia&&n&&ea(t),t.flags|=1,Ss(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ws(e,t,i))}function ks(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Ou(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Mu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Es(e,t,a,r,i))}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(o,r)&&e.ref===t.ref)return Ws(e,t,i)}return t.flags|=1,(e=Pu(a,r)).ref=t.ref,e.return=t,t.child=e}function Es(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(lr(a,r)&&e.ref===t.ref){if(bs=!1,t.pendingProps=r=a,!(e.lanes&i))return t.lanes=e.lanes,Ws(e,t,i);131072&e.flags&&(bs=!0)}}return _s(e,t,n,r,i)}function xs(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,_i(Pl,Ol),Ol|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,_i(Pl,Ol),Ol|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},_i(Pl,Ol),Ol|=n;else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,_i(Pl,Ol),Ol|=r;return Ss(e,t,i,n),t.child}function Is(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function _s(e,t,n,r,i){var a=Oi(n)?Ri:Ci.current;return a=Di(t,a),Na(t,i),n=go(e,t,n,r,a,i),r=yo(),null===e||bs?(ia&&r&&ea(t),t.flags|=1,Ss(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ws(e,t,i))}function Ts(e,t,n,r,i){if(Oi(n)){var a=!0;Ai(t)}else a=!1;if(Na(t,i),null===t.stateNode)Hs(e,t),os(t,n,r),ls(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,u=n.contextType;"object"==typeof u&&null!==u?u=Ra(u):u=Di(t,u=Oi(n)?Ri:Ci.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof o.getSnapshotBeforeUpdate;d||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||l!==u)&&ss(t,o,r,u),La=!1;var f=t.memoizedState;o.state=f,Ba(t,r,o,i),l=t.memoizedState,s!==r||f!==l||Ni.current||La?("function"==typeof c&&(rs(t,n,c,r),l=t.memoizedState),(s=La||as(t,n,s,r,f,l,u))?(d||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=s):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Ua(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:ns(t.type,s),o.props=u,d=t.pendingProps,f=o.context,"object"==typeof(l=n.contextType)&&null!==l?l=Ra(l):l=Di(t,l=Oi(n)?Ri:Ci.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==d||f!==l)&&ss(t,o,r,l),La=!1,f=t.memoizedState,o.state=f,Ba(t,r,o,i);var h=t.memoizedState;s!==d||f!==h||Ni.current||La?("function"==typeof p&&(rs(t,n,p,r),h=t.memoizedState),(u=La||as(t,n,u,r,f,h,l)||!1)?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,h,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=l,r=u):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Cs(e,t,n,r,a,i)}function Cs(e,t,n,r,i,a){Is(e,t);var o=!!(128&t.flags);if(!r&&!o)return i&&Ui(t,n,!1),Ws(e,t,a);r=t.stateNode,ms.current=t;var s=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=Sa(t,e.child,null,a),t.child=Sa(t,null,s,a)):Ss(e,t,s,a),t.memoizedState=r.state,i&&Ui(t,n,!0),t.child}function Ns(e){var t=e.stateNode;t.pendingContext?Mi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Mi(0,t.context,!1),Qa(e,t.containerInfo)}function Rs(e,t,n,r,i){return pa(),ha(i),t.flags|=256,Ss(e,t,n,r),t.child}var Ds,Os,Ps,Ms,Ls={dehydrated:null,treeContext:null,retryLane:0};function As(e){return{baseLanes:e,cachePool:null,transitions:null}}function Us(e,t,n){var r,i=t.pendingProps,o=Xa.current,s=!1,l=!!(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&!!(2&o)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),_i(Xa,1&o),null===e)return ua(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},1&i||null===s?s=Au(l,i,0,null):(s.childLanes=0,s.pendingProps=l),e=Lu(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=As(n),t.memoizedState=Ls,e):js(t,l));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,s){if(n)return 256&t.flags?(t.flags&=-257,zs(e,t,s,r=cs(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Au({mode:"visible",children:r.children},i,0,null),(o=Lu(o,i,s,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,1&t.mode&&Sa(t,e.child,null,s),t.child.memoizedState=As(s),t.memoizedState=Ls,o);if(!(1&t.mode))return zs(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,zs(e,t,s,r=cs(o=Error(a(419)),r,void 0))}if(l=!!(s&e.childLanes),bs||l){if(null!==(r=Nl)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=i&(r.suspendedLanes|s)?0:i)&&i!==o.retryLane&&(o.retryLane=i,Ma(e,i),nu(r,e,i,-1))}return vu(),zs(e,t,s,r=cs(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Tu.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ra=ui(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(Yi[Ki++]=Zi,Yi[Ki++]=Gi,Yi[Ki++]=Qi,Zi=e.id,Gi=e.overflow,Qi=t),t=js(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,o,n);if(s){s=i.fallback,l=t.mode,r=(o=e.child).sibling;var u={mode:"hidden",children:i.children};return 1&l||t.child===o?(i=Pu(o,u)).subtreeFlags=14680064&o.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null),null!==r?s=Pu(r,s):(s=Lu(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?As(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ls,i}return e=(s=e.child).sibling,i=Pu(s,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function js(e,t){return(t=Au({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function zs(e,t,n,r){return null!==r&&ha(r),Sa(t,e.child,null,n),(e=js(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ca(e.return,t,n)}function Vs(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Bs(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Ss(e,t,r.children,n),2&(r=Xa.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fs(e,n,t);else if(19===e.tag)Fs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(_i(Xa,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===eo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Vs(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===eo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Vs(t,!0,n,null,a);break;case"together":Vs(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Hs(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ws(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Al|=t.lanes,!(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Pu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Pu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function $s(e,t){if(!ia)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ys(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qs(t),null;case 1:case 17:return Oi(t.type)&&Pi(),qs(t),null;case 3:return r=t.stateNode,Za(),Ii(Ni),Ii(Ci),no(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(da(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==aa&&(ou(aa),aa=null))),Os(e,t),qs(t),null;case 5:Ja(t);var i=Ka(Ya.current);if(n=t.type,null!==e&&null!=t.stateNode)Ps(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return qs(t),null}if(e=Ka($a.current),da(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[fi]=t,r[pi]=o,e=!!(1&t.mode),n){case"dialog":zr("cancel",r),zr("close",r);break;case"iframe":case"object":case"embed":zr("load",r);break;case"video":case"audio":for(i=0;i<Lr.length;i++)zr(Lr[i],r);break;case"source":zr("error",r);break;case"img":case"image":case"link":zr("error",r),zr("load",r);break;case"details":zr("toggle",r);break;case"input":Z(r,o),zr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},zr("invalid",r);break;case"textarea":ie(r,o),zr("invalid",r)}for(var l in me(n,o),i=null,o)if(o.hasOwnProperty(l)){var u=o[l];"children"===l?"string"==typeof u?r.textContent!==u&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,u,e),i=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(!0!==o.suppressHydrationWarning&&Jr(r.textContent,u,e),i=["children",""+u]):s.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&zr("scroll",r)}switch(n){case"input":q(r),X(r,o,!0);break;case"textarea":q(r),oe(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=Xr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[fi]=t,e[pi]=r,Ds(e,t,!1,!1),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":zr("cancel",e),zr("close",e),i=r;break;case"iframe":case"object":case"embed":zr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Lr.length;i++)zr(Lr[i],e);i=r;break;case"source":zr("error",e),i=r;break;case"img":case"image":case"link":zr("error",e),zr("load",e),i=r;break;case"details":zr("toggle",e),i=r;break;case"input":Z(e,r),i=Q(e,r),zr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=U({},r,{value:void 0}),zr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),zr("invalid",e)}for(o in me(n,i),u=i)if(u.hasOwnProperty(o)){var c=u[o];"style"===o?ge(e,c):"dangerouslySetInnerHTML"===o?null!=(c=c?c.__html:void 0)&&de(e,c):"children"===o?"string"==typeof c?("textarea"!==n||""!==c)&&fe(e,c):"number"==typeof c&&fe(e,""+c):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(s.hasOwnProperty(o)?null!=c&&"onScroll"===o&&zr("scroll",e):null!=c&&b(e,o,c,l))}switch(n){case"input":q(e),X(e,r,!1);break;case"textarea":q(e),oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+W(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?ne(e,!!r.multiple,o,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Xr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return qs(t),null;case 6:if(e&&null!=t.stateNode)Ms(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(n=Ka(Ya.current),Ka($a.current),da(t)){if(r=t.stateNode,n=t.memoizedProps,r[fi]=t,(o=r.nodeValue!==n)&&null!==(e=na))switch(e.tag){case 3:Jr(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[fi]=t,t.stateNode=r}return qs(t),null;case 13:if(Ii(Xa),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ia&&null!==ra&&1&t.mode&&!(128&t.flags))fa(),pa(),t.flags|=98560,o=!1;else if(o=da(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(a(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(a(317));o[fi]=t}else pa(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;qs(t),o=!1}else null!==aa&&(ou(aa),aa=null),o=!0;if(!o)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&Xa.current?0===Ml&&(Ml=3):vu())),null!==t.updateQueue&&(t.flags|=4),qs(t),null);case 4:return Za(),Os(e,t),null===e&&Br(t.stateNode.containerInfo),qs(t),null;case 10:return Ta(t.type._context),qs(t),null;case 19:if(Ii(Xa),null===(o=t.memoizedState))return qs(t),null;if(r=!!(128&t.flags),null===(l=o.rendering))if(r)$s(o,!1);else{if(0!==Ml||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=eo(e))){for(t.flags|=128,$s(o,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(l=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return _i(Xa,1&Xa.current|2),t.child}e=e.sibling}null!==o.tail&&Ge()>Bl&&(t.flags|=128,r=!0,$s(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=eo(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),$s(o,!0),null===o.tail&&"hidden"===o.tailMode&&!l.alternate&&!ia)return qs(t),null}else 2*Ge()-o.renderingStartTime>Bl&&1073741824!==n&&(t.flags|=128,r=!0,$s(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=o.last)?n.sibling=l:t.child=l,o.last=l)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ge(),t.sibling=null,n=Xa.current,_i(Xa,r?1&n|2:1&n),t):(qs(t),null);case 22:case 23:return du(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Ol)&&(qs(t),6&t.subtreeFlags&&(t.flags|=8192)):qs(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Ks(e,t){switch(ta(t),t.tag){case 1:return Oi(t.type)&&Pi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Za(),Ii(Ni),Ii(Ci),no(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Ja(t),null;case 13:if(Ii(Xa),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));pa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ii(Xa),null;case 4:return Za(),null;case 10:return Ta(t.type._context),null;case 22:case 23:return du(),null;default:return null}}Ds=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Os=function(){},Ps=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ka($a.current);var a,o=null;switch(n){case"input":i=Q(e,i),r=Q(e,r),o=[];break;case"select":i=U({},i,{value:void 0}),r=U({},r,{value:void 0}),o=[];break;case"textarea":i=re(e,i),r=re(e,r),o=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Xr)}for(c in me(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var l=i[c];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(o||(o=[]),o.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(o=o||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(o=o||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(s.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&zr("scroll",e),o||l===u||(o=[])):(o=o||[]).push(c,u))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}},Ms=function(e,t,n,r){n!==r&&(t.flags|=4)};var Qs=!1,Zs=!1,Gs="function"==typeof WeakSet?WeakSet:Set,Js=null;function Xs(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){xu(e,t,n)}else n.current=null}function el(e,t,n){try{n()}catch(n){xu(e,t,n)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&el(t,n,a)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function al(e){var t=e.alternate;null!==t&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[fi],delete t[pi],delete t[vi],delete t[gi],delete t[yi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ol(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ol(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Xr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var cl=null,dl=!1;function fl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Zs||Xs(n,t);case 6:var r=cl,i=dl;cl=null,fl(e,t,n),dl=i,null!==(cl=r)&&(dl?(e=cl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cl.removeChild(n.stateNode));break;case 18:null!==cl&&(dl?(e=cl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Bt(e)):li(cl,n.stateNode));break;case 4:r=cl,i=dl,cl=n.stateNode.containerInfo,dl=!0,fl(e,t,n),cl=r,dl=i;break;case 0:case 11:case 14:case 15:if(!Zs&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(2&a||4&a)&&el(n,t,o),i=i.next}while(i!==r)}fl(e,t,n);break;case 1:if(!Zs&&(Xs(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){xu(n,t,e)}fl(e,t,n);break;case 21:fl(e,t,n);break;case 22:1&n.mode?(Zs=(r=Zs)||null!==n.memoizedState,fl(e,t,n),Zs=r):fl(e,t,n);break;default:fl(e,t,n)}}function hl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Gs),t.forEach((function(t){var r=Cu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function vl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:cl=l.stateNode,dl=!1;break e;case 3:case 4:cl=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===cl)throw Error(a(160));pl(o,s,i),cl=null,dl=!1;var u=i.alternate;null!==u&&(u.return=null),i.return=null}catch(e){xu(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vl(t,e),yl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(t){xu(e,e.return,t)}try{nl(5,e,e.return)}catch(t){xu(e,e.return,t)}}break;case 1:vl(t,e),yl(e),512&r&&null!==n&&Xs(n,n.return);break;case 5:if(vl(t,e),yl(e),512&r&&null!==n&&Xs(n,n.return),32&e.flags){var i=e.stateNode;try{fe(i,"")}catch(t){xu(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,s=null!==n?n.memoizedProps:o,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===o.type&&null!=o.name&&G(i,o),be(l,s);var c=be(l,o);for(s=0;s<u.length;s+=2){var d=u[s],f=u[s+1];"style"===d?ge(i,f):"dangerouslySetInnerHTML"===d?de(i,f):"children"===d?fe(i,f):b(i,d,f,c)}switch(l){case"input":J(i,o);break;case"textarea":ae(i,o);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;null!=h?ne(i,!!o.multiple,h,!1):p!==!!o.multiple&&(null!=o.defaultValue?ne(i,!!o.multiple,o.defaultValue,!0):ne(i,!!o.multiple,o.multiple?[]:"",!1))}i[pi]=o}catch(t){xu(e,e.return,t)}}break;case 6:if(vl(t,e),yl(e),4&r){if(null===e.stateNode)throw Error(a(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(t){xu(e,e.return,t)}}break;case 3:if(vl(t,e),yl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Bt(t.containerInfo)}catch(t){xu(e,e.return,t)}break;case 4:default:vl(t,e),yl(e);break;case 13:vl(t,e),yl(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(Vl=Ge())),4&r&&hl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Zs=(c=Zs)||d,vl(t,e),Zs=c):vl(t,e),yl(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!d&&1&e.mode)for(Js=e,d=e.child;null!==d;){for(f=Js=d;null!==Js;){switch(h=(p=Js).child,p.tag){case 0:case 11:case 14:case 15:nl(4,p,p.return);break;case 1:Xs(p,p.return);var v=p.stateNode;if("function"==typeof v.componentWillUnmount){r=p,n=p.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(e){xu(r,n,e)}}break;case 5:Xs(p,p.return);break;case 22:if(null!==p.memoizedState){wl(f);continue}}null!==h?(h.return=p,Js=h):wl(f)}d=d.sibling}e:for(d=null,f=e;;){if(5===f.tag){if(null===d){d=f;try{i=f.stateNode,c?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(l=f.stateNode,s=null!=(u=f.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,l.style.display=ve("display",s))}catch(t){xu(e,e.return,t)}}}else if(6===f.tag){if(null===d)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(t){xu(e,e.return,t)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:vl(t,e),yl(e),4&r&&hl(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ol(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(fe(i,""),r.flags&=-33),ul(e,sl(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;ll(e,sl(e),o);break;default:throw Error(a(161))}}catch(t){xu(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ml(e,t,n){Js=e,bl(e,t,n)}function bl(e,t,n){for(var r=!!(1&e.mode);null!==Js;){var i=Js,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||Qs;if(!o){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Zs;s=Qs;var u=Zs;if(Qs=o,(Zs=l)&&!u)for(Js=i;null!==Js;)l=(o=Js).child,22===o.tag&&null!==o.memoizedState?kl(i):null!==l?(l.return=o,Js=l):kl(i);for(;null!==a;)Js=a,bl(a,t,n),a=a.sibling;Js=i,Qs=s,Zs=u}Sl(e)}else 8772&i.subtreeFlags&&null!==a?(a.return=i,Js=a):Sl(e)}}function Sl(e){for(;null!==Js;){var t=Js;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Zs||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Zs)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Ha(t,o,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ha(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&Bt(f)}}}break;default:throw Error(a(163))}Zs||512&t.flags&&il(t)}catch(e){xu(t,t.return,e)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function wl(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function kl(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(e){xu(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){xu(t,i,e)}}var a=t.return;try{il(t)}catch(e){xu(t,a,e)}break;case 5:var o=t.return;try{il(t)}catch(e){xu(t,o,e)}}}catch(e){xu(t,t.return,e)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var El,xl=Math.ceil,Il=S.ReactCurrentDispatcher,_l=S.ReactCurrentOwner,Tl=S.ReactCurrentBatchConfig,Cl=0,Nl=null,Rl=null,Dl=0,Ol=0,Pl=xi(0),Ml=0,Ll=null,Al=0,Ul=0,jl=0,zl=null,Fl=null,Vl=0,Bl=1/0,Hl=null,Wl=!1,$l=null,ql=null,Yl=!1,Kl=null,Ql=0,Zl=0,Gl=null,Jl=-1,Xl=0;function eu(){return 6&Cl?Ge():-1!==Jl?Jl:Jl=Ge()}function tu(e){return 1&e.mode?2&Cl&&0!==Dl?Dl&-Dl:null!==va.transition?(0===Xl&&(Xl=vt()),Xl):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Zt(e.type):1}function nu(e,t,n,r){if(50<Zl)throw Zl=0,Gl=null,Error(a(185));yt(e,n,r),2&Cl&&e===Nl||(e===Nl&&(!(2&Cl)&&(Ul|=n),4===Ml&&su(e,Dl)),ru(e,r),1===n&&0===Cl&&!(1&t.mode)&&(Bl=Ge()+500,zi&&Bi()))}function ru(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-ot(a),s=1<<o,l=i[o];-1===l?s&n&&!(s&r)||(i[o]=pt(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=ft(e,e===Nl?Dl:0);if(0===r)null!==n&&Ke(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ke(n),1===t)0===e.tag?function(e){zi=!0,Vi(e)}(lu.bind(null,e)):Vi(lu.bind(null,e)),oi((function(){!(6&Cl)&&Bi()})),n=null;else{switch(St(r)){case 1:n=Xe;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Nu(n,iu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function iu(e,t){if(Jl=-1,Xl=0,6&Cl)throw Error(a(327));var n=e.callbackNode;if(ku()&&e.callbackNode!==n)return null;var r=ft(e,e===Nl?Dl:0);if(0===r)return null;if(30&r||r&e.expiredLanes||t)t=gu(e,r);else{t=r;var i=Cl;Cl|=2;var o=hu();for(Nl===e&&Dl===t||(Hl=null,Bl=Ge()+500,fu(e,t));;)try{mu();break}catch(t){pu(e,t)}_a(),Il.current=o,Cl=i,null!==Rl?t=0:(Nl=null,Dl=0,t=Ml)}if(0!==t){if(2===t&&(0!==(i=ht(e))&&(r=i,t=au(e,i))),1===t)throw n=Ll,fu(e,0),su(e,r),ru(e,Ge()),n;if(6===t)su(e,r);else{if(i=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!sr(a(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)||(t=gu(e,r),2===t&&(o=ht(e),0!==o&&(r=o,t=au(e,o))),1!==t)))throw n=Ll,fu(e,0),su(e,r),ru(e,Ge()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:wu(e,Fl,Hl);break;case 3:if(su(e,r),(130023424&r)===r&&10<(t=Vl+500-Ge())){if(0!==ft(e,0))break;if(((i=e.suspendedLanes)&r)!==r){eu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(wu.bind(null,e,Fl,Hl),t);break}wu(e,Fl,Hl);break;case 4:if(su(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-ot(r);o=1<<s,(s=t[s])>i&&(i=s),r&=~o}if(r=i,10<(r=(120>(r=Ge()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xl(r/1960))-r)){e.timeoutHandle=ri(wu.bind(null,e,Fl,Hl),r);break}wu(e,Fl,Hl);break;default:throw Error(a(329))}}}return ru(e,Ge()),e.callbackNode===n?iu.bind(null,e):null}function au(e,t){var n=zl;return e.current.memoizedState.isDehydrated&&(fu(e,t).flags|=256),2!==(e=gu(e,t))&&(t=Fl,Fl=n,null!==t&&ou(t)),e}function ou(e){null===Fl?Fl=e:Fl.push.apply(Fl,e)}function su(e,t){for(t&=~jl,t&=~Ul,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function lu(e){if(6&Cl)throw Error(a(327));ku();var t=ft(e,0);if(!(1&t))return ru(e,Ge()),null;var n=gu(e,t);if(0!==e.tag&&2===n){var r=ht(e);0!==r&&(t=r,n=au(e,r))}if(1===n)throw n=Ll,fu(e,0),su(e,t),ru(e,Ge()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wu(e,Fl,Hl),ru(e,Ge()),null}function uu(e,t){var n=Cl;Cl|=1;try{return e(t)}finally{0===(Cl=n)&&(Bl=Ge()+500,zi&&Bi())}}function cu(e){null!==Kl&&0===Kl.tag&&!(6&Cl)&&ku();var t=Cl;Cl|=1;var n=Tl.transition,r=bt;try{if(Tl.transition=null,bt=1,e)return e()}finally{bt=r,Tl.transition=n,!(6&(Cl=t))&&Bi()}}function du(){Ol=Pl.current,Ii(Pl)}function fu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Rl)for(n=Rl.return;null!==n;){var r=n;switch(ta(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Pi();break;case 3:Za(),Ii(Ni),Ii(Ci),no();break;case 5:Ja(r);break;case 4:Za();break;case 13:case 19:Ii(Xa);break;case 10:Ta(r.type._context);break;case 22:case 23:du()}n=n.return}if(Nl=e,Rl=e=Pu(e.current,null),Dl=Ol=t,Ml=0,Ll=null,jl=Ul=Al=0,Fl=zl=null,null!==Da){for(t=0;t<Da.length;t++)if(null!==(r=(n=Da[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}Da=null}return e}function pu(e,t){for(;;){var n=Rl;try{if(_a(),ro.current=Jo,uo){for(var r=oo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}uo=!1}if(ao=0,lo=so=oo=null,co=!1,fo=0,_l.current=null,null===n||null===n.return){Ml=1,Ll=t,Rl=null;break}e:{var o=e,s=n.return,l=n,u=t;if(t=Dl,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,d=l,f=d.tag;if(!(1&d.mode||0!==f&&11!==f&&15!==f)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=gs(s);if(null!==h){h.flags&=-257,ys(h,s,l,0,t),1&h.mode&&vs(o,c,t),u=c;var v=(t=h).updateQueue;if(null===v){var g=new Set;g.add(u),t.updateQueue=g}else v.add(u);break e}if(!(1&t)){vs(o,c,t),vu();break e}u=Error(a(426))}else if(ia&&1&l.mode){var y=gs(s);if(null!==y){!(65536&y.flags)&&(y.flags|=256),ys(y,s,l,0,t),ha(us(u,l));break e}}o=u=us(u,l),4!==Ml&&(Ml=2),null===zl?zl=[o]:zl.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Va(o,ps(0,u,t));break e;case 1:l=u;var m=o.type,b=o.stateNode;if(!(128&o.flags||"function"!=typeof m.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==ql&&ql.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t,Va(o,hs(o,l,t));break e}}o=o.return}while(null!==o)}Su(n)}catch(e){t=e,Rl===n&&null!==n&&(Rl=n=n.return);continue}break}}function hu(){var e=Il.current;return Il.current=Jo,null===e?Jo:e}function vu(){0!==Ml&&3!==Ml&&2!==Ml||(Ml=4),null===Nl||!(268435455&Al)&&!(268435455&Ul)||su(Nl,Dl)}function gu(e,t){var n=Cl;Cl|=2;var r=hu();for(Nl===e&&Dl===t||(Hl=null,fu(e,t));;)try{yu();break}catch(t){pu(e,t)}if(_a(),Cl=n,Il.current=r,null!==Rl)throw Error(a(261));return Nl=null,Dl=0,Ml}function yu(){for(;null!==Rl;)bu(Rl)}function mu(){for(;null!==Rl&&!Qe();)bu(Rl)}function bu(e){var t=El(e.alternate,e,Ol);e.memoizedProps=e.pendingProps,null===t?Su(e):Rl=t,_l.current=null}function Su(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Ks(n,t)))return n.flags&=32767,void(Rl=n);if(null===e)return Ml=6,void(Rl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ys(n,t,Ol)))return void(Rl=n);if(null!==(t=t.sibling))return void(Rl=t);Rl=t=e}while(null!==t);0===Ml&&(Ml=5)}function wu(e,t,n){var r=bt,i=Tl.transition;try{Tl.transition=null,bt=1,function(e,t,n,r){do{ku()}while(null!==Kl);if(6&Cl)throw Error(a(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ot(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,o),e===Nl&&(Rl=Nl=null,Dl=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Yl||(Yl=!0,Nu(tt,(function(){return ku(),null}))),o=!!(15990&n.flags),!!(15990&n.subtreeFlags)||o){o=Tl.transition,Tl.transition=null;var s=bt;bt=1;var l=Cl;Cl|=4,_l.current=null,function(e,t){if(ei=Wt,pr(e=fr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var s=0,l=-1,u=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==n||0!==i&&3!==f.nodeType||(l=s+i),f!==o||0!==r&&3!==f.nodeType||(u=s+r),3===f.nodeType&&(s+=f.nodeValue.length),null!==(h=f.firstChild);)p=f,f=h;for(;;){if(f===e)break t;if(p===n&&++c===i&&(l=s),p===o&&++d===r&&(u=s),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Wt=!1,Js=t;null!==Js;)if(e=(t=Js).child,1028&t.subtreeFlags&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var v=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==v){var g=v.memoizedProps,y=v.memoizedState,m=t.stateNode,b=m.getSnapshotBeforeUpdate(t.elementType===t.type?g:ns(t.type,g),y);m.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var S=t.stateNode.containerInfo;1===S.nodeType?S.textContent="":9===S.nodeType&&S.documentElement&&S.removeChild(S.documentElement);break;default:throw Error(a(163))}}catch(e){xu(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}v=tl,tl=!1}(e,n),gl(n,e),hr(ti),Wt=!!ei,ti=ei=null,e.current=n,ml(n,e,i),Ze(),Cl=l,bt=s,Tl.transition=o}else e.current=n;if(Yl&&(Yl=!1,Kl=e,Ql=i),o=e.pendingLanes,0===o&&(ql=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(it,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),ru(e,Ge()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Wl)throw Wl=!1,e=$l,$l=null,e;!!(1&Ql)&&0!==e.tag&&ku(),o=e.pendingLanes,1&o?e===Gl?Zl++:(Zl=0,Gl=e):Zl=0,Bi()}(e,t,n,r)}finally{Tl.transition=i,bt=r}return null}function ku(){if(null!==Kl){var e=St(Ql),t=Tl.transition,n=bt;try{if(Tl.transition=null,bt=16>e?16:e,null===Kl)var r=!1;else{if(e=Kl,Kl=null,Ql=0,6&Cl)throw Error(a(331));var i=Cl;for(Cl|=4,Js=e.current;null!==Js;){var o=Js,s=o.child;if(16&Js.flags){var l=o.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Js=c;null!==Js;){var d=Js;switch(d.tag){case 0:case 11:case 15:nl(8,d,o)}var f=d.child;if(null!==f)f.return=d,Js=f;else for(;null!==Js;){var p=(d=Js).sibling,h=d.return;if(al(d),d===c){Js=null;break}if(null!==p){p.return=h,Js=p;break}Js=h}}}var v=o.alternate;if(null!==v){var g=v.child;if(null!==g){v.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(null!==g)}}Js=o}}if(2064&o.subtreeFlags&&null!==s)s.return=o,Js=s;else e:for(;null!==Js;){if(2048&(o=Js).flags)switch(o.tag){case 0:case 11:case 15:nl(9,o,o.return)}var m=o.sibling;if(null!==m){m.return=o.return,Js=m;break e}Js=o.return}}var b=e.current;for(Js=b;null!==Js;){var S=(s=Js).child;if(2064&s.subtreeFlags&&null!==S)S.return=s,Js=S;else e:for(s=b;null!==Js;){if(2048&(l=Js).flags)try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(e){xu(l,l.return,e)}if(l===s){Js=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Js=w;break e}Js=l.return}}if(Cl=i,Bi(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{bt=n,Tl.transition=t}}return!1}function Eu(e,t,n){e=za(e,t=ps(0,t=us(n,t),1),1),t=eu(),null!==e&&(yt(e,1,t),ru(e,t))}function xu(e,t,n){if(3===e.tag)Eu(e,e,n);else for(;null!==t;){if(3===t.tag){Eu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ql||!ql.has(r))){t=za(t,e=hs(t,e=us(n,e),1),1),e=eu(),null!==t&&(yt(t,1,e),ru(t,e));break}}t=t.return}}function Iu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=eu(),e.pingedLanes|=e.suspendedLanes&n,Nl===e&&(Dl&n)===n&&(4===Ml||3===Ml&&(130023424&Dl)===Dl&&500>Ge()-Vl?fu(e,0):jl|=n),ru(e,t)}function _u(e,t){0===t&&(1&e.mode?(t=ct,!(130023424&(ct<<=1))&&(ct=4194304)):t=1);var n=eu();null!==(e=Ma(e,t))&&(yt(e,t,n),ru(e,n))}function Tu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),_u(e,n)}function Cu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),_u(e,n)}function Nu(e,t){return Ye(e,t)}function Ru(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Du(e,t,n,r){return new Ru(e,t,n,r)}function Ou(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Pu(e,t){var n=e.alternate;return null===n?((n=Du(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Mu(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)Ou(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case E:return Lu(n.children,i,o,t);case x:s=8,i|=8;break;case I:return(e=Du(12,n,t,2|i)).elementType=I,e.lanes=o,e;case N:return(e=Du(13,n,t,i)).elementType=N,e.lanes=o,e;case R:return(e=Du(19,n,t,i)).elementType=R,e.lanes=o,e;case P:return Au(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case _:s=10;break e;case T:s=9;break e;case C:s=11;break e;case D:s=14;break e;case O:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Du(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Lu(e,t,n,r){return(e=Du(7,e,r,t)).lanes=n,e}function Au(e,t,n,r){return(e=Du(22,e,r,t)).elementType=P,e.lanes=n,e.stateNode={isHidden:!1},e}function Uu(e,t,n){return(e=Du(6,e,null,t)).lanes=n,e}function ju(e,t,n){return(t=Du(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fu(e,t,n,r,i,a,o,s,l){return e=new zu(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Du(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Aa(a),e}function Vu(e){if(!e)return Ti;e:{if(Be(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Oi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Oi(n))return Li(e,n,t)}return t}function Bu(e,t,n,r,i,a,o,s,l){return(e=Fu(n,r,!0,e,0,a,0,s,l)).context=Vu(null),n=e.current,(a=ja(r=eu(),i=tu(n))).callback=null!=t?t:null,za(n,a,i),e.current.lanes=i,yt(e,i,r),ru(e,r),e}function Hu(e,t,n,r){var i=t.current,a=eu(),o=tu(i);return n=Vu(n),null===t.context?t.context=n:t.pendingContext=n,(t=ja(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=za(i,t,o))&&(nu(e,i,o,a),Fa(e,i,o)),o}function Wu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function $u(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function qu(e,t){$u(e,t),(e=e.alternate)&&$u(e,t)}El=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ni.current)bs=!0;else{if(!(e.lanes&n||128&t.flags))return bs=!1,function(e,t,n){switch(t.tag){case 3:Ns(t),pa();break;case 5:Ga(t);break;case 1:Oi(t.type)&&Ai(t);break;case 4:Qa(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;_i(ka,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(_i(Xa,1&Xa.current),t.flags|=128,null):n&t.child.childLanes?Us(e,t,n):(_i(Xa,1&Xa.current),null!==(e=Ws(e,t,n))?e.sibling:null);_i(Xa,1&Xa.current);break;case 19:if(r=!!(n&t.childLanes),128&e.flags){if(r)return Bs(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),_i(Xa,Xa.current),r)break;return null;case 22:case 23:return t.lanes=0,xs(e,t,n)}return Ws(e,t,n)}(e,t,n);bs=!!(131072&e.flags)}else bs=!1,ia&&1048576&t.flags&&Xi(t,qi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var i=Di(t,Ci.current);Na(t,n),i=go(null,t,r,e,i,n);var o=yo();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oi(r)?(o=!0,Ai(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Aa(t),i.updater=is,t.stateNode=i,i._reactInternals=t,ls(t,r,e,n),t=Cs(null,t,r,!0,o,n)):(t.tag=0,ia&&o&&ea(t),Ss(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Ou(e)?1:0;if(null!=e){if((e=e.$$typeof)===C)return 11;if(e===D)return 14}return 2}(r),e=ns(r,e),i){case 0:t=_s(null,t,r,e,n);break e;case 1:t=Ts(null,t,r,e,n);break e;case 11:t=ws(null,t,r,e,n);break e;case 14:t=ks(null,t,r,ns(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,_s(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ts(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 3:e:{if(Ns(t),null===e)throw Error(a(387));r=t.pendingProps,i=(o=t.memoizedState).element,Ua(e,t),Ba(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Rs(e,t,r,n,i=us(Error(a(423)),t));break e}if(r!==i){t=Rs(e,t,r,n,i=us(Error(a(424)),t));break e}for(ra=ui(t.stateNode.containerInfo.firstChild),na=t,ia=!0,aa=null,n=wa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(pa(),r===i){t=Ws(e,t,n);break e}Ss(e,t,r,n)}t=t.child}return t;case 5:return Ga(t),null===e&&ua(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,ni(r,i)?s=null:null!==o&&ni(r,o)&&(t.flags|=32),Is(e,t),Ss(e,t,s,n),t.child;case 6:return null===e&&ua(t),null;case 13:return Us(e,t,n);case 4:return Qa(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Sa(t,null,r,n):Ss(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,ws(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 7:return Ss(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ss(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,_i(ka,r._currentValue),r._currentValue=s,null!==o)if(sr(o.value,s)){if(o.children===i.children&&!Ni.current){t=Ws(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var l=o.dependencies;if(null!==l){s=o.child;for(var u=l.firstContext;null!==u;){if(u.context===r){if(1===o.tag){(u=ja(-1,n&-n)).tag=2;var c=o.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}o.lanes|=n,null!==(u=o.alternate)&&(u.lanes|=n),Ca(o.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===o.tag)s=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(s=o.return))throw Error(a(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Ca(s,n,t),s=o.sibling}else s=o.child;if(null!==s)s.return=o;else for(s=o;null!==s;){if(s===t){s=null;break}if(null!==(o=s.sibling)){o.return=s.return,s=o;break}s=s.return}o=s}Ss(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Na(t,n),r=r(i=Ra(i)),t.flags|=1,Ss(e,t,r,n),t.child;case 14:return i=ns(r=t.type,t.pendingProps),ks(e,t,r,i=ns(r.type,i),n);case 15:return Es(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ns(r,i),Hs(e,t),t.tag=1,Oi(r)?(e=!0,Ai(t)):e=!1,Na(t,n),os(t,r,i),ls(t,r,i,n),Cs(null,t,r,!0,e,n);case 19:return Bs(e,t,n);case 22:return xs(e,t,n)}throw Error(a(156,t.tag))};var Yu="function"==typeof reportError?reportError:function(e){console.error(e)};function Ku(e){this._internalRoot=e}function Qu(e){this._internalRoot=e}function Zu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Gu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Ju(){}function Xu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if("function"==typeof i){var s=i;i=function(){var e=Wu(o);s.call(e)}}Hu(t,o,e,i)}else o=function(e,t,n,r,i){if(i){if("function"==typeof r){var a=r;r=function(){var e=Wu(o);a.call(e)}}var o=Bu(t,r,e,0,null,!1,0,"",Ju);return e._reactRootContainer=o,e[hi]=o.current,Br(8===e.nodeType?e.parentNode:e),cu(),o}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Wu(l);s.call(e)}}var l=Fu(e,0,!1,null,0,!1,0,"",Ju);return e._reactRootContainer=l,e[hi]=l.current,Br(8===e.nodeType?e.parentNode:e),cu((function(){Hu(t,l,n,r)})),l}(n,t,e,i,r);return Wu(o)}Qu.prototype.render=Ku.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Hu(e,t,null,null)},Qu.prototype.unmount=Ku.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cu((function(){Hu(null,e,null,null)})),t[hi]=null}},Qu.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pt.length&&0!==t&&t<Pt[n].priority;n++);Pt.splice(n,0,e),0===n&&Ut(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(mt(t,1|n),ru(t,Ge()),!(6&Cl)&&(Bl=Ge()+500,Bi()))}break;case 13:cu((function(){var t=Ma(e,1);if(null!==t){var n=eu();nu(t,e,1,n)}})),qu(e,1)}},kt=function(e){if(13===e.tag){var t=Ma(e,134217728);if(null!==t)nu(t,e,134217728,eu());qu(e,134217728)}},Et=function(e){if(13===e.tag){var t=tu(e),n=Ma(e,t);if(null!==n)nu(n,e,t,eu());qu(e,t)}},xt=function(){return bt},It=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},ke=function(e,t,n){switch(t){case"input":if(J(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=wi(r);if(!i)throw Error(a(90));Y(r),J(r,i)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ce=uu,Ne=cu;var ec={usingClientEntryPoint:!1,Events:[bi,Si,wi,_e,Te,uu]},tc={findFiberByHostInstance:mi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nc={bundleType:tc.bundleType,version:tc.version,rendererPackageName:tc.rendererPackageName,rendererConfig:tc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=$e(e))?null:e.stateNode},findFiberByHostInstance:tc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var rc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rc.isDisabled&&rc.supportsFiber)try{it=rc.inject(nc),at=rc}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ec,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Zu(t))throw Error(a(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:k,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Zu(e))throw Error(a(299));var n=!1,r="",i=Yu;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Fu(e,1,!1,null,0,n,0,r,i),e[hi]=t.current,Br(8===e.nodeType?e.parentNode:e),new Ku(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=null===(e=$e(t))?null:e.stateNode},t.flushSync=function(e){return cu(e)},t.hydrate=function(e,t,n){if(!Gu(t))throw Error(a(200));return Xu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Zu(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",s=Yu;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Bu(t,null,e,1,null!=n?n:null,i,0,o,s),e[hi]=t.current,Br(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Qu(t)},t.render=function(e,t,n){if(!Gu(t))throw Error(a(200));return Xu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Gu(e))throw Error(a(40));return!!e._reactRootContainer&&(cu((function(){Xu(null,null,e,!1,(function(){e._reactRootContainer=null,e[hi]=null}))})),!0)},t.unstable_batchedUpdates=uu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Gu(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return Xu(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},347:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(262)},977:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}function m(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||h}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=y.prototype;var S=b.prototype=new m;S.constructor=b,v(S,y.prototype),S.isPureReactComponent=!0;var w=Array.isArray,k=Object.prototype.hasOwnProperty,E={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function I(e,t,r){var i,a={},o=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)k.call(t,i)&&!x.hasOwnProperty(i)&&(a[i]=t[i]);var l=arguments.length-2;if(1===l)a.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];a.children=u}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===a[i]&&(a[i]=l[i]);return{$$typeof:n,type:e,key:o,ref:s,props:a,_owner:E.current}}function _(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var T=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function N(e,t,i,a,o){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return o=o(l=e),e=""===a?"."+C(l,0):a,w(o)?(i="",null!=e&&(i=e.replace(T,"$&/")+"/"),N(o,t,i,"",(function(e){return e}))):null!=o&&(_(o)&&(o=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,i+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(T,"$&/")+"/")+e)),t.push(o)),1;if(l=0,a=""===a?".":a+":",w(e))for(var u=0;u<e.length;u++){var c=a+C(s=e[u],u);l+=N(s,t,i,c,o)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof c)for(e=c.call(e),u=0;!(s=e.next()).done;)l+=N(s=s.value,t,i,c=a+C(s,u++),o);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function R(e,t,n){if(null==e)return e;var r=[],i=0;return N(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function D(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O={current:null},P={transition:null},M={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:P,ReactCurrentOwner:E};function L(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:R,forEach:function(e,t,n){R(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return R(e,(function(){t++})),t},toArray:function(e){return R(e,(function(e){return e}))||[]},only:function(e){if(!_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=i,t.Profiler=o,t.PureComponent=b,t.StrictMode=a,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,t.act=L,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=v({},e.props),a=e.key,o=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,s=E.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)k.call(t,u)&&!x.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}return{$$typeof:n,type:e.type,key:a,ref:o,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=I,t.createFactory=function(e){var t=I.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=_,t.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:D}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=P.transition;P.transition={};try{e()}finally{P.transition=t}},t.unstable_act=L,t.useCallback=function(e,t){return O.current.useCallback(e,t)},t.useContext=function(e){return O.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return O.current.useDeferredValue(e)},t.useEffect=function(e,t){return O.current.useEffect(e,t)},t.useId=function(){return O.current.useId()},t.useImperativeHandle=function(e,t,n){return O.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return O.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return O.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return O.current.useMemo(e,t)},t.useReducer=function(e,t,n){return O.current.useReducer(e,t,n)},t.useRef=function(e){return O.current.useRef(e)},t.useState=function(e){return O.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return O.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return O.current.useTransition()},t.version="18.3.1"},1:(e,t,n)=>{"use strict";e.exports=n(977)},654:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>a(l,n))u<i&&0>a(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<i&&0>a(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],d=1,f=null,p=3,h=!1,v=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,m="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function S(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function w(e){if(g=!1,S(e),!v)if(null!==r(u))v=!0,P(k);else{var t=r(c);null!==t&&M(w,t.startTime-e)}}function k(e,n){v=!1,g&&(g=!1,m(_),_=-1),h=!0;var a=p;try{for(S(n),f=r(u);null!==f&&(!(f.expirationTime>n)||e&&!N());){var o=f.callback;if("function"==typeof o){f.callback=null,p=f.priorityLevel;var s=o(f.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?f.callback=s:f===r(u)&&i(u),S(n)}else i(u);f=r(u)}if(null!==f)var l=!0;else{var d=r(c);null!==d&&M(w,d.startTime-n),l=!1}return l}finally{f=null,p=a,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,x=!1,I=null,_=-1,T=5,C=-1;function N(){return!(t.unstable_now()-C<T)}function R(){if(null!==I){var e=t.unstable_now();C=e;var n=!0;try{n=I(!0,e)}finally{n?E():(x=!1,I=null)}}else x=!1}if("function"==typeof b)E=function(){b(R)};else if("undefined"!=typeof MessageChannel){var D=new MessageChannel,O=D.port2;D.port1.onmessage=R,E=function(){O.postMessage(null)}}else E=function(){y(R,0)};function P(e){I=e,x||(x=!0,E())}function M(e,n){_=y((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){v||h||(v=!0,P(k))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?o+a:o:a=o,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(e.sortIndex=a,n(c,e),null===r(u)&&e===r(c)&&(g?(m(_),_=-1):g=!0,M(w,a-o))):(e.sortIndex=s,n(u,e),v||h||(v=!0,P(k))),e},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},681:(e,t,n)=>{"use strict";e.exports=n(654)},145:(e,t,n)=>{"use strict";var r=n(1);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useState,o=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return s((function(){i.value=n,i.getSnapshot=t,u(i)&&c({inst:i})}),[e,n,t]),o((function(){return u(i)&&c({inst:i}),e((function(){u(i)&&c({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},594:(e,t,n)=>{"use strict";var r=n(1),i=n(11);var a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=i.useSyncExternalStore,s=r.useRef,l=r.useEffect,u=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=u((function(){function e(e){if(!l){if(l=!0,o=e,e=r(e),void 0!==i&&f.hasValue){var t=f.value;if(i(t,e))return s=t}return s=e}if(t=s,a(o,e))return t;var n=r(e);return void 0!==i&&i(t,n)?t:(o=e,s=n)}var o,s,l=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,i]);var p=o(e,d[0],d[1]);return l((function(){f.hasValue=!0,f.value=p}),[p]),c(p),p}},11:(e,t,n)=>{"use strict";e.exports=n(145)},901:(e,t,n)=>{"use strict";e.exports=n(594)},165:e=>{e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},464:e=>{"use strict";e.exports=a},867:e=>{"use strict";e.exports=i},762:e=>{"use strict";e.exports=r},148:e=>{"use strict";e.exports=n},140:e=>{"use strict";e.exports=t},369:t=>{"use strict";t.exports=e},767:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:()=>r})},688:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:()=>r})},755:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(351);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,r.Z)(i.key),i)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},765:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(351);function i(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},976:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(274);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},351:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(133);function i(e){var t=function(e,t){if("object"!=(0,r.Z)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=(0,r.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.Z)(t)?t:t+""}},133:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:()=>r})},274:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(767);function i(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},485:(e,t,n)=>{"use strict";n.d(t,{$G:()=>I});var r=n(765);var i=n(1),a=n(133);n(165);Object.create(null);function o(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"==typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var s={};function l(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&s[t[0]]||("string"==typeof t[0]&&(s[t[0]]=new Date),o.apply(void 0,t))}var u=function(e,t){return function(){if(e.isInitialized)t();else{e.on("initialized",(function n(){setTimeout((function(){e.off("initialized",n)}),0),t()}))}}};function c(e,t,n){e.loadNamespaces(t,u(e,n))}function d(e,t,n,r){"string"==typeof n&&(n=[n]),n.forEach((function(t){e.options.ns.indexOf(t)<0&&e.options.ns.push(t)})),e.loadLanguages(t,u(e,r))}var f=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,p={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},h=function(e){return p[e]};var v,g={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(f,h)}};var y=n(688),m=n(755);var b=(0,i.createContext)(),S=function(){function e(){(0,y.Z)(this,e),this.usedNamespaces={}}return(0,m.Z)(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();var w=n(976);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x=function(e,t){var n=(0,i.useRef)();return(0,i.useEffect)((function(){n.current=t?n.current:e}),[e,t]),n.current};function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,r=(0,i.useContext)(b)||{},o=r.i18n,s=r.defaultNS,u=n||o||v;if(u&&!u.reportNamespaces&&(u.reportNamespaces=new S),!u){l("You will need to pass in an i18next instance by using initReactI18next");var f=function(e,t){return"string"==typeof t?t:t&&"object"===(0,a.Z)(t)&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e},p=[f,{},!1];return p.t=f,p.i18n={},p.ready=!1,p}u.options.react&&void 0!==u.options.react.wait&&l("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var h=E(E(E({},g),u.options.react),t),y=h.useSuspense,m=h.keyPrefix,k=e||s||u.options&&u.options.defaultNS;k="string"==typeof k?[k]:k||["translation"],u.reportNamespaces.addUsedNamespaces&&u.reportNamespaces.addUsedNamespaces(k);var I=(u.isInitialized||u.initializedStoreOnce)&&k.every((function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{lng:n.lng,precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],i=!!t.options&&t.options.fallbackLng,a=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var o=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)||!t.hasResourceBundle(r,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!o(r,e)||i&&!o(a,e)))}(e,t,n):(l("i18n.languages were undefined or empty",t.languages),!0)}(e,u,h)}));function _(){return u.getFixedT(t.lng||null,"fallback"===h.nsMode?k:k[0],m)}var T=(0,i.useState)(_),C=(0,w.Z)(T,2),N=C[0],R=C[1],D=k.join();t.lng&&(D="".concat(t.lng).concat(D));var O=x(D),P=(0,i.useRef)(!0);(0,i.useEffect)((function(){var e=h.bindI18n,n=h.bindI18nStore;function r(){P.current&&R(_)}return P.current=!0,I||y||(t.lng?d(u,t.lng,k,(function(){P.current&&R(_)})):c(u,k,(function(){P.current&&R(_)}))),I&&O&&O!==D&&P.current&&R(_),e&&u&&u.on(e,r),n&&u&&u.store.on(n,r),function(){P.current=!1,e&&u&&e.split(" ").forEach((function(e){return u.off(e,r)})),n&&u&&n.split(" ").forEach((function(e){return u.store.off(e,r)}))}}),[u,D]);var M=(0,i.useRef)(!0);(0,i.useEffect)((function(){P.current&&!M.current&&R(_),M.current=!1}),[u,m]);var L=[N,u,I];if(L.t=N,L.i18n=u,L.ready=I,I)return L;if(!I&&!y)return L;throw new Promise((function(e){t.lng?d(u,t.lng,k,(function(){return e()})):c(u,k,(function(){return e()}))}))}}},d={};function f(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return c[e](n,n.exports,f),n.exports}f.m=c,o=[],f.O=(e,t,n,r)=>{if(!t){var i=1/0;for(u=0;u<o.length;u++){for(var[t,n,r]=o[u],a=!0,s=0;s<t.length;s++)(!1&r||i>=r)&&Object.keys(f.O).every((e=>f.O[e](t[s])))?t.splice(s--,1):(a=!1,r<i&&(i=r));if(a){o.splice(u--,1);var l=n();void 0!==l&&(e=l)}}return e}r=r||0;for(var u=o.length;u>0&&o[u-1][2]>r;u--)o[u]=o[u-1];o[u]=[t,n,r]},f.F={},f.E=e=>{Object.keys(f.F).map((t=>{f.F[t](e)}))},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},l=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var n=Object.create(null);f.r(n);var r={};s=s||[null,l({}),l([]),l(l)];for(var i=2&t&&e;"object"==typeof i&&!~s.indexOf(i);i=l(i))Object.getOwnPropertyNames(i).forEach((t=>r[t]=()=>e[t]));return r.default=()=>e,f.d(n,r),n},f.d=(e,t)=>{for(var n in t)f.o(t,n)&&!f.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u={143:0},f.F.j=e=>{if(!f.o(u,e)||void 0===u[e]){u[e]=null;var t=document.createElement("link");f.nc&&t.setAttribute("nonce",f.nc),t.rel="prefetch",t.as="script",t.href=f.p+f.u(e),document.head.appendChild(t)}},f.O.j=e=>0===u[e],f.O(0,[143],(()=>{f.E(143)}),5);var p={};return(()=>{"use strict";f.r(p),f.d(p,{default:()=>fe});var e,t=f(419),n=f(1),r=f.t(n,2),i=f(827),a=f.n(i),o=f(347),s=f.t(o,2);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(e||(e={}));function u(e,t){if(!1===e||null==e)throw new Error(t)}function c(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var d;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(d||(d={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function h(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function v(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function g(e,t){let n=v(e);return t?n.map(((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)):n.map((e=>e.pathnameBase))}function y(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=c(e):(i=l({},e),u(!i.pathname||!i.pathname.includes("?"),h("?","pathname","search",i)),u(!i.pathname||!i.pathname.includes("#"),h("#","pathname","hash",i)),u(!i.search||!i.search.includes("#"),h("#","search","hash",i)));let a,o=""===e||""===i.pathname,s=o?"/":i.pathname;if(null==s)a=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let d=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"==typeof e?c(e):e,a=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:a,search:b(r),hash:S(i)}}(i,a),f=s&&"/"!==s&&s.endsWith("/"),p=(o||"."===s)&&n.endsWith("/");return d.pathname.endsWith("/")||!f&&!p||(d.pathname+="/"),d}const m=e=>e.join("/").replace(/\/\/+/g,"/"),b=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",S=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const w=["post","put","patch","delete"],k=(new Set(w),["get",...w]);new Set(k),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred");function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E.apply(this,arguments)}const x=n.createContext(null);const I=n.createContext(null);const _=n.createContext(null);const T=n.createContext({outlet:null,matches:[],isDataRoute:!1});function C(){return null!=n.useContext(_)}function N(){return C()||u(!1),n.useContext(_).location}function R(e){n.useContext(I).static||n.useLayoutEffect(e)}function D(){let{isDataRoute:e}=n.useContext(T);return e?function(){let{router:e}=M(O.UseNavigateStable),t=L(P.UseNavigateStable),r=n.useRef(!1);R((()=>{r.current=!0}));let i=n.useCallback((function(n,i){void 0===i&&(i={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,E({fromRouteId:t},i)))}),[e,t]);return i}():function(){C()||u(!1);let e=n.useContext(x),{basename:t,future:r,navigator:i}=n.useContext(I),{matches:a}=n.useContext(T),{pathname:o}=N(),s=JSON.stringify(g(a,r.v7_relativeSplatPath)),l=n.useRef(!1);return R((()=>{l.current=!0})),n.useCallback((function(n,r){if(void 0===r&&(r={}),!l.current)return;if("number"==typeof n)return void i.go(n);let a=y(n,JSON.parse(s),o,"path"===r.relative);null==e&&"/"!==t&&(a.pathname="/"===a.pathname?t:m([t,a.pathname])),(r.replace?i.replace:i.push)(a,r.state,r)}),[t,i,s,o,e])}()}n.Component;var O=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(O||{}),P=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(P||{});function M(e){let t=n.useContext(x);return t||u(!1),t}function L(e){let t=function(e){let t=n.useContext(T);return t||u(!1),t}(),r=t.matches[t.matches.length-1];return r.route.id||u(!1),r.route.id}r.startTransition;new Promise((()=>{}));n.Component;new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(e){}new Map;r.startTransition,s.flushSync,r.useId;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;var A,U;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(A||(A={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(U||(U={}));var j=f(485),z=f(762),F=f(369);const{formatDate:V,createStudyBrowserTabs:B}=z.utils;function H({servicesManager:e,getImageSrc:r,getStudiesForPatientByMRN:i,requestDisplaySetCreationForStudy:a,dataSource:o}){const{displaySetService:s,uiDialogService:l,hangingProtocolService:u,uiNotificationService:c,measurementService:d,studyPrefetcherService:f}=e.services,p=D(),{t:h}=(0,j.$G)("Common"),{StudyInstanceUIDs:v}=(0,F.useImageViewer)(),[{activeViewportId:g,viewports:y,isHangingProtocolLayout:m},b]=(0,F.useViewportGrid)(),[S,w]=(0,t.I)(),[k,E]=(0,n.useState)("primary"),[x,I]=(0,n.useState)([...v]),[_,T]=(0,n.useState)([]),[C,N]=(0,n.useState)(!1),[R,O]=(0,n.useState)([]),[P,M]=(0,n.useState)({}),[L,A]=(0,n.useState)({}),[U,z]=(0,n.useState)(null),H=y.get(g)?.displaySetInstanceUIDs,{trackedSeries:W}=S.context;(0,n.useEffect)((()=>{v.forEach((e=>async function(e){const t=await o.query.studies.search({studyInstanceUid:e});if(!t?.length)throw p("/notfoundstudy","_self"),new Error("Invalid study URL");let n=t;try{n=await i(t)}catch(e){console.warn(e)}const r=n.map((e=>({AccessionNumber:e.accession,StudyDate:e.date,StudyDescription:e.description,NumInstances:e.instances,ModalitiesInStudy:e.modalities,PatientID:e.mrn,PatientName:e.patientName,StudyInstanceUID:e.studyInstanceUid,StudyTime:e.time}))).map((e=>({studyInstanceUid:e.StudyInstanceUID,date:V(e.StudyDate)||h("NoStudyDate"),description:e.StudyDescription,modalities:e.ModalitiesInStudy,numInstances:e.NumInstances})));T((e=>{const t=[...e];for(const n of r)e.find((e=>e.studyInstanceUid===n.studyInstanceUid))||t.push(n);return t}))}(e)))}),[v,i]),(0,n.useEffect)((()=>{if(!C)return void(g&&window.setTimeout((()=>N(!0)),250));const e=s.activeDisplaySets;e.length&&e.forEach((async e=>{const t={},n=s.getDisplaySetByUID(e.displaySetInstanceUID),i=$(n,o.getImageIdsForDisplaySet(n));i&&!n?.unsupported&&(t[e.displaySetInstanceUID]=await r(i),A((e=>({...e,...t}))))}))}),[s,o,r,g,C]),(0,n.useEffect)((()=>{const e=s.activeDisplaySets;if(!e.length)return;const t=q(e,P,L,W,y,b,o,s,l,c);O(t)}),[s.activeDisplaySets,P,W,y,o,L]),(0,n.useEffect)((()=>{const{unsubscribe:e}=f.subscribe(f.EVENTS.DISPLAYSET_LOAD_PROGRESS,(e=>{const{displaySetInstanceUID:t,loadingProgress:n}=e;M((e=>({...e,[t]:n})))}));return()=>e()}),[f]),(0,n.useEffect)((()=>{const e=s.subscribe(s.EVENTS.DISPLAY_SETS_ADDED,(e=>{if(!C)return;const{displaySetsAdded:t,options:n}=e;t.forEach((async e=>{const t=e.displaySetInstanceUID,i={},a=s.getDisplaySetByUID(t);if(a?.unsupported)return;n.madeInClient&&z(t);const l=$(a,o.getImageIdsForDisplaySet(a));l&&(i[t]=await r(l),A((e=>({...e,...i}))))}))}));return()=>{e.unsubscribe()}}),[s,o,r,L,W,y]),(0,n.useEffect)((()=>{const e=s.subscribe(s.EVENTS.DISPLAY_SETS_CHANGED,(e=>{const t=q(e,P,L,W,y,b,o,s,l,c);O(t)})),t=s.subscribe(s.EVENTS.DISPLAY_SET_SERIES_METADATA_INVALIDATED,(()=>{const e=q(s.getActiveDisplaySets(),P,L,W,y,b,o,s,l,c);O(e)}));return()=>{e.unsubscribe(),t.unsubscribe()}}),[P,L,W,y,o,s]);const Y=B(v,_,R);(0,n.useEffect)((()=>{if(U){const e=U,t=document.getElementById(`thumbnail-${e}`);t&&"function"==typeof t.scrollIntoView&&(t.scrollIntoView({behavior:"smooth"}),z(null))}}),[U,x,k]),(0,n.useEffect)((()=>{if(!U)return;const e=function(e,t){for(let n=0;n<t.length;n++){const{studies:r}=t[n];for(let i=0;i<r.length;i++){const{displaySets:a}=r[i];for(let o=0;o<a.length;o++){if(a[o].displaySetInstanceUID===e)return{tabName:t[n].name,StudyInstanceUID:r[i].studyInstanceUid}}}}}(U,Y);if(!e)return void console.warn("jumpToThumbnail: displaySet thumbnail not found.");const{tabName:t,StudyInstanceUID:n}=e;E(t);if(!x.includes(n)){const e=[...x,n];I(e)}}),[x,U,Y]);const K=e=>{l.create({id:"untrack-series",centralize:!0,isDraggable:!1,showOverlay:!0,content:F.Dialog,contentProps:{title:"Untrack Series",body:()=>n.createElement("div",{className:"bg-primary-dark p-4 text-white"},n.createElement("p",null,"Are you sure you want to untrack this series?"),n.createElement("p",{className:"mt-2"},"This action cannot be undone and will delete all your existing measurements.")),actions:[{id:"cancel",text:"Cancel",type:F.ButtonEnums.type.secondary},{id:"yes",text:"Yes",type:F.ButtonEnums.type.primary,classes:["untrack-yes-button"]}],onClose:()=>l.dismiss({id:"untrack-series"}),onSubmit:async({action:t})=>{switch(t.id){case"yes":(()=>{const t=s.getDisplaySetByUID(e);w("UNTRACK_SERIES",{SeriesInstanceUID:t.SeriesInstanceUID}),d.getMeasurements().forEach((e=>{e.referenceSeriesUID===t.SeriesInstanceUID&&d.remove(e.uid)}))})(),l.dismiss({id:"untrack-series"});break;case"cancel":l.dismiss({id:"untrack-series"})}}}})};return n.createElement(F.StudyBrowser,{tabs:Y,servicesManager:e,activeTabName:k,expandedStudyInstanceUIDs:x,onClickStudy:function(e){const t=x.includes(e),n=t?[...x.filter((t=>t!==e))]:[...x,e];if(I(n),!t){a(s,e,!0)}},onClickTab:e=>{E(e)},onClickUntrack:e=>{K(e)},onClickThumbnail:()=>{},onDoubleClickThumbnail:e=>{let t=[];const n=g;try{t=u.getViewportsRequireUpdate(n,e,m)}catch(e){console.warn(e),c.show({title:"Thumbnail Double Click",message:"The selected display sets could not be added to the viewport due to a mismatch in the Hanging Protocol rules.",type:"info",duration:3e3})}b.setDisplaySetsForViewports(t)},activeDisplaySetInstanceUIDs:H})}H.propTypes={servicesManager:a().object.isRequired,dataSource:a().shape({getImageIdsForDisplaySet:a().func.isRequired}).isRequired,getImageSrc:a().func.isRequired,getStudiesForPatientByMRN:a().func.isRequired,requestDisplaySetCreationForStudy:a().func.isRequired};const W=H;function $(e,t){let n;if(e.isDynamicVolume){const t=e.dynamicVolumeInfo.timePoints,r=t[Math.floor(t.length/2)];n=r[Math.floor(r.length/2)]}else n=t[Math.floor(t.length/2)];return n}function q(e,t,r,i,a,o,s,l,u,c){const d=[],f=[];return e.filter((e=>!e.excludeFromThumbnailBrowser)).forEach((e=>{const a=r[e.displaySetInstanceUID],p=function(e){if(Y.includes(e.Modality)||e?.unsupported)return"thumbnailNoImage";return"thumbnailTracked"}(e),h=(o.getNumViewportPanes(),"thumbnailTracked"===p?d:f),{displaySetInstanceUID:v}=e,g=t?.[v],y={displaySetInstanceUID:v,description:e.SeriesDescription,seriesNumber:e.SeriesNumber,modality:e.Modality,seriesDate:V(e.SeriesDate),numInstances:e.numImageFrames,loadingProgress:g,countIcon:e.countIcon,messages:e.messages,StudyInstanceUID:e.StudyInstanceUID,componentType:p,imageSrc:a,dragData:{type:"displayset",displaySetInstanceUID:v},isTracked:i.includes(e.SeriesInstanceUID),isHydratedForDerivedDisplaySet:e.isHydrated};"thumbnailNoImage"===p&&(s.reject&&s.reject.series?(y.canReject=!e?.unsupported,y.onReject=()=>{u.create({id:"ds-reject-sr",centralize:!0,isDraggable:!1,showOverlay:!0,content:F.Dialog,contentProps:{title:"Delete Report",body:()=>n.createElement("div",{className:"bg-primary-dark p-4 text-white"},n.createElement("p",null,"Are you sure you want to delete this report?"),n.createElement("p",{className:"mt-2"},"This action cannot be undone.")),actions:[{id:"cancel",text:"Cancel",type:F.ButtonEnums.type.secondary},{id:"yes",text:"Yes",type:F.ButtonEnums.type.primary,classes:["reject-yes-button"]}],onClose:()=>u.dismiss({id:"ds-reject-sr"}),onShow:()=>{document.querySelector(".reject-yes-button").focus()},onSubmit:async({action:t})=>{switch(t.id){case"yes":try{await s.reject.series(e.StudyInstanceUID,e.SeriesInstanceUID),l.deleteDisplaySet(v),u.dismiss({id:"ds-reject-sr"}),c.show({title:"Delete Report",message:"Report deleted successfully",type:"success"})}catch(e){u.dismiss({id:"ds-reject-sr"}),c.show({title:"Delete Report",message:"Failed to delete report",type:"error"})}break;case"cancel":u.dismiss({id:"ds-reject-sr"})}}}})}):y.canReject=!1),h.push(y)})),[...d,...f]}const Y=["SR","SEG","SM","RTSTRUCT","RTPLAN","RTDOSE","DOC","OT","PMAP"];const K=function(e,t){return new Promise(((n,r)=>{const i=document.createElement("canvas");e.utilities.loadImageToCanvas({canvas:i,imageId:t,thumbnail:!0}).then((e=>{n(i.toDataURL())})).catch(r)}))};const Q=function(e,t,n,r){t.activeDisplaySets.some((e=>e.StudyInstanceUID===n))||e.retrieve.series.metadata({StudyInstanceUID:n,madeInClient:r})};function Z({commandsManager:e,extensionManager:t,servicesManager:r}){const i=t.getActiveDataSource()[0],a=function(e){const t=e.getModuleEntry("@ohif/extension-default.utilityModule.common"),{getStudiesForPatientByMRN:n}=t.exports;return n}(t),o=a.bind(null,i),s=(0,n.useCallback)(function(e){const t=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.common");try{const{cornerstone:e}=t.exports.getCornerstoneLibraries();return K.bind(null,e)}catch(e){throw new Error("Required command not found")}}(t),[]),l=Q.bind(null,i);return n.createElement(W,{servicesManager:r,dataSource:i,getImageSrc:s,getStudiesForPatientByMRN:o,requestDisplaySetCreationForStudy:l})}Z.propTypes={commandsManager:a().object.isRequired,extensionManager:a().object.isRequired,servicesManager:a().object.isRequired};const G=Z;var J=f(181),X=f(324),ee=f.n(X);const{downloadCSVReport:te}=z.utils,{formatDate:ne}=z.utils,re={key:void 0,date:"",modality:"",description:""};function ie({servicesManager:e,extensionManager:r}){const[i]=(0,F.useViewportGrid)(),{t:a}=(0,j.$G)("MeasurementTable"),[o,s]=(0,n.useState)(Date.now().toString()),l=function(e,t){const[r,i]=(0,n.useState)(e);return(0,n.useEffect)((()=>{const n=setTimeout((()=>{i(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),r}(o,200),{measurementService:u,uiDialogService:c,displaySetService:d,customizationService:f}=e.services,[p,h]=(0,t.I)(),{trackedStudy:v,trackedSeries:g}=p.context,[y,m]=(0,n.useState)(re),[b,S]=(0,n.useState)([]),w=(0,n.useRef)(null),[k]=(0,J.M)();(0,n.useEffect)((()=>{const e=u.getMeasurements().filter((e=>v===e.referenceStudyUID&&g.includes(e.referenceSeriesUID))).map((e=>function(e,t,n){const{referenceStudyUID:r,referenceSeriesUID:i,SOPInstanceUID:a}=e,o=(z.DicomMetadataStore.getInstance(r,i,a),n.getDisplaySetsForSeries(i));if(!o[0]?.instances)throw new Error('The tracked measurements panel should only be tracking "stack" displaySets.');const{displayText:s,uid:l,label:u,type:c,selected:d,findingSites:f,finding:p,referencedImageId:h}=e,v=f?.[0],g=u||p?.text||v?.text||"(empty)";let y=s||[];if(f){const e=[];f.forEach((t=>{t?.text!==g&&e.push(t.text)})),y=[...e,...y]}p&&p?.text!==g&&(y=[p.text,...y]);return{uid:l,label:g,baseLabel:u,measurementType:c,displayText:y,baseDisplayText:s,isActive:d,finding:p,findingSites:f,referencedImageId:h}}(e,u.VALUE_TYPES,d)));S(e)}),[u,v,g,l]);const E=async()=>{if(p.matches("tracking")){const e=v,t=z.DicomMetadataStore.getStudy(e),n=t.series[0].instances[0],{StudyDate:r,StudyDescription:i}=n,a=new Set;t.series.forEach((e=>{g.includes(e.SeriesInstanceUID)&&a.add(e.instances[0].Modality)}));const o=Array.from(a).join("/");y.key!==e&&m({key:e,date:r,modality:o,description:i})}else""!==v&&void 0!==v||m(re)};(0,n.useEffect)((()=>{E()}),[y.key,p,v,E]),(0,n.useEffect)((()=>{const e=u.EVENTS.MEASUREMENT_ADDED,t=u.EVENTS.RAW_MEASUREMENT_ADDED,n=u.EVENTS.MEASUREMENT_UPDATED,r=u.EVENTS.MEASUREMENT_REMOVED,i=u.EVENTS.MEASUREMENTS_CLEARED,a=[];return[e,t,n,r,i].forEach((t=>{a.push(u.subscribe(t,(()=>{s(Date.now().toString()),t===e&&ee()((()=>{w.current.scrollTop=w.current.scrollHeight}),300)()})).unsubscribe)})),()=>{a.forEach((e=>{e()}))}}),[u,h]);const x=({uid:e,isActive:t})=>{u.jumpToMeasurement(i.activeViewportId,e),_({uid:e,isActive:t})},I=({uid:e,isActive:t})=>{x({uid:e,isActive:t});const n=f.get("measurementLabels"),i=u.getMeasurement(e),a=r.getModuleEntry("@ohif/extension-cornerstone.utilityModule.common"),{showLabelAnnotationPopup:o}=a.exports;o(i,c,n).then((t=>{u.update(e,{...t},!0)}))},_=({uid:e,isActive:t})=>{if(!t){const t=[...b],n=t.find((t=>t.uid===e));t.forEach((t=>t.isActive=t.uid===e)),n.isActive=!0,S(t)}},T=b.filter((e=>e.measurementType!==u.VALUE_TYPES.POINT&&e.referencedImageId)),C=b.filter((e=>e.measurementType===u.VALUE_TYPES.POINT&&e.referencedImageId)),N=b.filter((e=>null==e.referencedImageId)),R=0===C.length&&0===T.length&&0===N.length;return n.createElement(n.Fragment,null,n.createElement("div",{className:"invisible-scrollbar overflow-y-auto overflow-x-hidden",ref:w,"data-cy":"trackedMeasurements-panel"},y.key&&n.createElement(F.StudySummary,{date:ne(y.date),modality:y.modality,description:y.description}),n.createElement(F.MeasurementTable,{title:"Measurements",data:T,servicesManager:e,onClick:x,onEdit:I}),0!==C.length&&n.createElement(F.MeasurementTable,{title:"Additional Findings",data:C,servicesManager:e,onClick:x,onEdit:I}),0!==N.length&&n.createElement(F.MeasurementTable,{title:"Non-tracked",data:N,servicesManager:e,onClick:x,onEdit:I})),!k?.disableEditing&&n.createElement("div",{className:"flex justify-center p-4"},n.createElement(F.ActionButtons,{t:a,actions:[{label:"Download CSV",onClick:async function(){const e=u.getMeasurements().filter((e=>v===e.referenceStudyUID&&g.includes(e.referenceSeriesUID)));te(e,u)}},{label:"Create Report",onClick:()=>{h("SAVE_REPORT",{viewportId:i.activeViewportId,isBackupSave:!0})}}],disabled:R})))}ie.propTypes={servicesManager:a().shape({services:a().shape({measurementService:a().shape({getMeasurements:a().func.isRequired,VALUE_TYPES:a().object.isRequired}).isRequired}).isRequired}).isRequired};const ae=ie;var oe=f(795);const se=function({commandsManager:e,extensionManager:t,servicesManager:n}){return[{name:"seriesList",iconName:"tab-studies",iconLabel:"Studies",label:oe.Z.t("SidePanel:Studies"),component:G.bind(null,{commandsManager:e,extensionManager:t,servicesManager:n})},{name:"trackedMeasurements",iconName:"tab-linear",iconLabel:"Measure",label:oe.Z.t("SidePanel:Measurements"),component:ae.bind(null,{commandsManager:e,extensionManager:t,servicesManager:n})}]};function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(null,arguments)}const ue=n.lazy((()=>Promise.resolve().then(f.bind(f,868)))),ce=e=>n.createElement(n.Suspense,{fallback:n.createElement("div",null,"Loading...")},n.createElement(ue,e));const de=function({servicesManager:e,commandsManager:t,extensionManager:r}){return[{name:"cornerstone-tracked",component:i=>n.createElement(ce,le({servicesManager:e,commandsManager:t,extensionManager:r},i))}]},fe={id:JSON.parse('{"u2":"@ohif/extension-measurement-tracking"}').u2,getContextModule:t.Z,getPanelModule:se,getViewportModule:de}})(),p=f.O(p)})()));