-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
17 lines (15 loc) · 104 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){"use strict";(function(e,r){n.d(t,"a",function(){return Ve}),n.d(t,"f",function(){return ee}),n.d(t,"d",function(){return ie}),n.d(t,"c",function(){return et}),n.d(t,"b",function(){return Ze}),n.d(t,"e",function(){return it}),n.d(t,"g",function(){return pt});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};function o(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=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};function s(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function l(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e}var c="An invariant failed, however the error is obfuscated because this is an production build.",u=[];Object.freeze(u);var h={};function p(){return"undefined"!=typeof window?window:e}function d(){return++Ae.mobxGuid}function f(e){throw v(!1,e),"X"}function v(e,t){if(!e)throw new Error("[mobx] "+(t||c))}Object.freeze(h);function m(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var b=function(){};function y(e){return null!==e&&"object"==typeof e}function g(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function w(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function _(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function x(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return y(e)&&!0===e[n]}}function O(e){return void 0!==p().Map&&e instanceof p().Map}function k(e){return e instanceof Set}function S(e){for(var t=[];;){var n=e.next();if(n.done)break;t.push(n.value)}return t}function T(){return"function"==typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function j(e){return null===e?null:"object"==typeof e?""+e:e}function N(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function E(e,t){_(e,N(),t)}function A(e){return e[N()]=C,e}function z(){return"function"==typeof Symbol&&Symbol.toStringTag||"@@toStringTag"}function C(){return this}var D=function(){function e(e){void 0===e&&(e="Atom@"+d()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=de.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.onBecomeObserved=function(){},e.prototype.reportObserved=function(){return Ie(this)},e.prototype.reportChanged=function(){Pe(),function(e){if(e.lowestObserverState===de.STALE)return;e.lowestObserverState=de.STALE;var t=e.observers,n=t.length;for(;n--;){var r=t[n];r.dependenciesState===de.UP_TO_DATE&&(r.isTracing!==ve.NONE&&Re(r,e),r.onBecomeStale()),r.dependenciesState=de.STALE}}(this),Me()},e.prototype.toString=function(){return this.name},e}(),P=x("Atom",D);function M(e,t,n){void 0===t&&(t=b),void 0===n&&(n=b);var r,i=new D(e);return rt("onBecomeObserved",i,t,r),function(e,t,n){rt("onBecomeUnobserved",e,t,n)}(i,n),i}function I(e,t){return e===t}var R={identity:I,structural:function(e,t){return Qt(e,t)},default:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}(e,t)||I(e,t)}},V={},L={};function B(e){if(!0!==e.__mobxDidRunLazyInitializers){var t=e.__mobxDecorators;if(t)for(var n in w(e,"__mobxDidRunLazyInitializers",!0),t){var r=t[n];r.propertyCreator(e,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function U(e,t){return function(){var n,r,i=function(r,i,o,s){if(!0===s)return t(r,i,o,r,n),null;if(!Object.prototype.hasOwnProperty.call(r,"__mobxDecorators")){var l=r.__mobxDecorators;w(r,"__mobxDecorators",a({},l))}return r.__mobxDecorators[i]={prop:i,propertyCreator:t,descriptor:o,decoratorTarget:r,decoratorArguments:n},function(e,t){var n=t?V:L;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return B(this),this[e]},set:function(t){B(this),this[e]=t}})}(i,e)};return(2===(r=arguments).length||3===r.length)&&"string"==typeof r[1]||4===r.length&&!0===r[3]?(n=u,i.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),i)}}function H(e,t,n){return lt(e)?e:Array.isArray(e)?ee.array(e,{name:n}):g(e)?ee.object(e,void 0,{name:n}):O(e)?ee.map(e,{name:n}):k(e)?ee.set(e,{name:n}):e}function $(e){return e}function G(e){var t=U(!0,function(t,n,r,i,o){Gt(t,n,r?r.initializer?r.initializer.call(t):r.value:void 0,e)}),n=(void 0!==r&&r.env,t);return n.enhancer=e,n}var W={deep:!0,name:void 0,defaultDecorator:void 0},K={deep:!1,name:void 0,defaultDecorator:void 0};function F(e){return null==e?W:"string"==typeof e?{name:e,deep:!0}:e}function J(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?$:H}Object.freeze(W),Object.freeze(K);var X=G(H),q=G(function(e,t,n){return null==e?e:Xt(e)||Pt(e)||Vt(e)||Ut(e)?e:Array.isArray(e)?ee.array(e,{name:n,deep:!1}):g(e)?ee.object(e,void 0,{name:n,deep:!1}):O(e)?ee.map(e,{name:n,deep:!1}):k(e)?ee.set(e,{name:n,deep:!1}):f(!1)}),Y=G($),Z=G(function(e,t,n){return Qt(e,t)?t:e});var Q={box:function(e,t){arguments.length>2&&te("box");var n=F(t);return new ue(e,J(n),n.name,!0,n.equals)},shallowBox:function(e,t){return arguments.length>2&&te("shallowBox"),ee.box(e,{name:t,deep:!1})},array:function(e,t){arguments.length>2&&te("array");var n=F(t);return new Nt(e,J(n),n.name)},shallowArray:function(e,t){return arguments.length>2&&te("shallowArray"),ee.array(e,{name:t,deep:!1})},map:function(e,t){arguments.length>2&&te("map");var n=F(t);return new It(e,J(n),n.name)},shallowMap:function(e,t){return arguments.length>2&&te("shallowMap"),ee.map(e,{name:t,deep:!1})},set:function(e,t){arguments.length>2&&te("set");var n=F(t);return new Bt(e,J(n),n.name)},object:function(e,t,n){return"string"==typeof arguments[1]&&te("object"),ot({},e,t,F(n))},shallowObject:function(e,t){return"string"==typeof arguments[1]&&te("shallowObject"),ee.object(e,{},{name:t,deep:!1})},ref:Y,shallow:q,deep:X,struct:Z},ee=function(e,t,n){if("string"==typeof arguments[1])return X.apply(null,arguments);if(lt(e))return e;var r=g(e)?ee.object(e,t,n):Array.isArray(e)?ee.array(e,t):O(e)?ee.map(e,t):k(e)?ee.set(e,t):e;if(r!==e)return r;f(!1)};function te(e){f("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(Q).forEach(function(e){return ee[e]=Q[e]});var ne=U(!1,function(e,t,n,r,i){var o=n.get,s=n.set,l=i[0]||{};!function(e,t,n){var r=$t(e);n.name=r.name+"."+t,n.context=e,r.values[t]=new pe(n),Object.defineProperty(e,t,function(e){return Kt[e]||(Kt[e]={configurable:!1,enumerable:!1,get:function(){return Ft(this).read(this,e)},set:function(t){Ft(this).write(this,e,t)}})}(t))}(e,t,a({get:o,set:s},l))}),re=ne({equals:R.structural}),ie=function(e,t,n){if("string"==typeof t)return ne.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return ne.apply(null,arguments);var r="object"==typeof t?t:{};return r.get=e,r.set="function"==typeof t?t:r.set,r.name=r.name||e.name||"",new pe(r)};function oe(e,t){var n=function(){return ae(e,t,this,arguments)};return n.isMobxAction=!0,n}function ae(e,t,n,r){var i=function(e,t,n,r){var i=We()&&!!e,o=0;if(i){o=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var l=0;l<a;l++)s[l]=r[l];Fe({type:"action",name:e,object:n,arguments:s})}var c=ke();Pe();var u=le(!0);return{prevDerivation:c,prevAllowStateChanges:u,notifySpy:i,startTime:o}}(e,0,n,r),o=!0;try{var a=t.apply(n,r);return o=!1,a}finally{o?(Ae.suppressReactionErrors=o,se(i),Ae.suppressReactionErrors=!1):se(i)}}function se(e){ce(e.prevAllowStateChanges),Me(),Se(e.prevDerivation),e.notifySpy&&Xe({time:Date.now()-e.startTime})}function le(e){var t=Ae.allowStateChanges;return Ae.allowStateChanges=e,t}function ce(e){Ae.allowStateChanges=e}ie.struct=re;var ue=function(e){function t(t,n,r,i,o){void 0===r&&(r="ObservableValue@"+d()),void 0===i&&(i=!0),void 0===o&&(o=R.default);var a=e.call(this,r)||this;return a.enhancer=n,a.name=r,a.equals=o,a.hasUnreportedChange=!1,a.value=n(t,void 0,r),i&&We()&&Ke({type:"create",name:a.name,newValue:""+a.value}),a}return o(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){var t=this.value;if((e=this.prepareNewValue(e))!==Ae.UNCHANGED){var n=We();n&&Fe({type:"update",name:this.name,newValue:e,oldValue:t}),this.setNewValue(e),n&&Xe()}},t.prototype.prepareNewValue=function(e){if(we(this),ft(this)){var t=mt(this,{object:this,type:"update",newValue:e});if(!t)return Ae.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?Ae.UNCHANGED:e},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),bt(this)&>(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return vt(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),yt(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return j(this.get())},t}(D);ue.prototype[T()]=ue.prototype.valueOf;var he=x("ObservableValue",ue),pe=function(){function e(e){this.dependenciesState=de.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=de.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+d(),this.value=new be(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=ve.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+d(),e.set&&(this.setter=oe(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?R.structural:R.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState!==de.UP_TO_DATE)return;e.lowestObserverState=de.POSSIBLY_STALE;var t=e.observers,n=t.length;for(;n--;){var r=t[n];r.dependenciesState===de.UP_TO_DATE&&(r.dependenciesState=de.POSSIBLY_STALE,r.isTracing!==ve.NONE&&Re(r,e),r.onBecomeStale())}}(this)},e.prototype.onBecomeUnobserved=function(){},e.prototype.onBecomeObserved=function(){},e.prototype.get=function(){this.isComputing&&f("Cycle detected in computation "+this.name+": "+this.derivation),0!==Ae.inBatch||0!==this.observers.length||this.keepAlive?(Ie(this),ge(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState===de.STALE)return;e.lowestObserverState=de.STALE;var t=e.observers,n=t.length;for(;n--;){var r=t[n];r.dependenciesState===de.POSSIBLY_STALE?r.dependenciesState=de.STALE:r.dependenciesState===de.UP_TO_DATE&&(e.lowestObserverState=de.UP_TO_DATE)}}(this)):ge(this)&&(this.warnAboutUntrackedRead(),Pe(),this.value=this.computeValue(!1),Me());var e=this.value;if(ye(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(ye(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){v(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else v(!1,!1)},e.prototype.trackAndCompute=function(){We()&&Ke({object:this.scope,type:"compute",name:this.name});var e=this.value,t=this.dependenciesState===de.NOT_TRACKING,n=this.computeValue(!0),r=t||ye(e)||ye(n)||!this.equals(e,n);return r&&(this.value=n),r},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Ae.computationDepth++,e)t=_e(this,this.derivation,this.scope);else if(!0===Ae.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new be(e)}return Ae.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||(xe(this),this.value=void 0)},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return et(function(){var o=n.get();if(!r||t){var a=ke();e({type:"update",object:n,newValue:o,oldValue:i}),Se(a)}r=!1,i=o})},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return j(this.get())},e}();pe.prototype[T()]=pe.prototype.valueOf;var de,fe,ve,me=x("ComputedValue",pe);(fe=de||(de={}))[fe.NOT_TRACKING=-1]="NOT_TRACKING",fe[fe.UP_TO_DATE=0]="UP_TO_DATE",fe[fe.POSSIBLY_STALE=1]="POSSIBLY_STALE",fe[fe.STALE=2]="STALE",function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(ve||(ve={}));var be=function(){return function(e){this.cause=e}}();function ye(e){return e instanceof be}function ge(e){switch(e.dependenciesState){case de.UP_TO_DATE:return!1;case de.NOT_TRACKING:case de.STALE:return!0;case de.POSSIBLY_STALE:for(var t=ke(),n=e.observing,r=n.length,i=0;i<r;i++){var o=n[i];if(me(o)){if(Ae.disableErrorBoundaries)o.get();else try{o.get()}catch(e){return Se(t),!0}if(e.dependenciesState===de.STALE)return Se(t),!0}}return Te(e),Se(t),!1}}function we(e){var t=e.observers.length>0;Ae.computationDepth>0&&t&&f(!1),Ae.allowStateChanges||!t&&"strict"!==Ae.enforceActions||f(!1)}function _e(e,t,n){Te(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Ae.runId;var r,i=Ae.trackingDerivation;if(Ae.trackingDerivation=e,!0===Ae.disableErrorBoundaries)r=t.call(n);else try{r=t.call(n)}catch(e){r=new be(e)}return Ae.trackingDerivation=i,function(e){for(var t=e.observing,n=e.observing=e.newObserving,r=de.UP_TO_DATE,i=0,o=e.unboundDepsCount,a=0;a<o;a++){var s=n[a];0===s.diffValue&&(s.diffValue=1,i!==a&&(n[i]=s),i++),s.dependenciesState>r&&(r=s.dependenciesState)}n.length=i,e.newObserving=null,o=t.length;for(;o--;){var s=t[o];0===s.diffValue&&Ce(s,e),s.diffValue=0}for(;i--;){var s=n[i];1===s.diffValue&&(s.diffValue=0,ze(s,e))}r!==de.UP_TO_DATE&&(e.dependenciesState=r,e.onBecomeStale())}(e),r}function xe(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)Ce(t[n],e);e.dependenciesState=de.NOT_TRACKING}function Oe(e){var t=ke(),n=e();return Se(t),n}function ke(){var e=Ae.trackingDerivation;return Ae.trackingDerivation=null,e}function Se(e){Ae.trackingDerivation=e}function Te(e){if(e.dependenciesState!==de.UP_TO_DATE){e.dependenciesState=de.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=de.UP_TO_DATE}}var je=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),Ne=!0,Ee=!1,Ae=function(){var e=p();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Ne=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new je).version&&(Ne=!1),Ne?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new je):(setTimeout(function(){Ee||f("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new je)}();function ze(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Ce(e,t){if(1===e.observers.length)e.observers.length=0,De(e);else{var n=e.observers,r=e.observersIndexes,i=n.pop();if(i!==t){var o=r[t.__mapid]||0;o?r[i.__mapid]=o:delete r[i.__mapid],n[o]=i}delete r[t.__mapid]}}function De(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Ae.pendingUnobservations.push(e))}function Pe(){Ae.inBatch++}function Me(){if(0==--Ae.inBatch){Ue();for(var e=Ae.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.length&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof pe&&n.suspend())}Ae.pendingUnobservations=[]}}function Ie(e){var t=Ae.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.length&&Ae.inBatch>0&&De(e),!1)}function Re(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===ve.BREAK){var n=[];!function e(t,n,r){if(n.length>=1e3)return void n.push("(and many more)");n.push(""+new Array(r).join("\t")+t.name);t.dependencies&&t.dependencies.forEach(function(t){return e(t,n,r+1)})}((r=e,at(qt(r,i))),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof pe?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}var r,i}var Ve=function(){function e(e,t,n){void 0===e&&(e="Reaction@"+d()),this.name=e,this.onInvalidate=t,this.errorHandler=n,this.observing=[],this.newObserving=[],this.dependenciesState=de.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+d(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ve.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ae.pendingReactions.push(this),Ue())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(Pe(),this._isScheduled=!1,ge(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&We()&&Ke({name:this.name,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation(e)}}Me()}},e.prototype.track=function(e){Pe();var t,n=We();n&&(t=Date.now(),Fe({name:this.name,type:"reaction"})),this._isRunning=!0;var r=_e(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&xe(this),ye(r)&&this.reportExceptionInDerivation(r.cause),n&&Xe({time:Date.now()-t}),Me()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(Ae.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Ae.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),We()&&Ke({type:"error",name:this.name,message:n,error:""+e}),Ae.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Pe(),xe(this),Me()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(e){void 0===e&&(e=!1),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;"boolean"==typeof e[e.length-1]&&(n=e.pop());var r=function(e){switch(e.length){case 0:return Ae.trackingDerivation;case 1:return qt(e[0]);case 2:return qt(e[0],e[1])}}(e);if(!r)return f(!1);r.isTracing===ve.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled");r.isTracing=n?ve.BREAK:ve.LOG}(this,e)},e}();var Le=100,Be=function(e){return e()};function Ue(){Ae.inBatch>0||Ae.isRunningReactions||Be(He)}function He(){Ae.isRunningReactions=!0;for(var e=Ae.pendingReactions,t=0;e.length>0;){++t===Le&&(console.error("Reaction doesn't converge to a stable state after "+Le+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}Ae.isRunningReactions=!1}var $e=x("Reaction",Ve);function Ge(e){var t=Be;Be=function(n){return e(function(){return t(n)})}}function We(){return!!Ae.spyListeners.length}function Ke(e){if(Ae.spyListeners.length)for(var t=Ae.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function Fe(e){Ke(a({},e,{spyReportStart:!0}))}var Je={spyReportEnd:!0};function Xe(e){Ke(e?a({},e,{spyReportEnd:!0}):Je)}function qe(){f(!1)}function Ye(e){return function(t,n,r){if(r){if(r.value)return{value:oe(e,r.value),enumerable:!1,configurable:!0,writable:!0};var i=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return oe(e,i.call(this))}}}return function(e){return function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){w(this,n,Ze(e,t))}})}}(e).apply(this,arguments)}}var Ze=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?oe(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?oe(e,t):1===arguments.length&&"string"==typeof e?Ye(e):!0!==r?Ye(t).apply(null,arguments):void(e[t]=oe(e.name||t,n.value))};function Qe(e,t,n){w(e,t,oe(t,n.bind(e)))}function et(e,t){void 0===t&&(t=h);var n,r=t&&t.name||e.name||"Autorun@"+d();if(!t.scheduler&&!t.delay)n=new Ve(r,function(){this.track(a)},t.onError);else{var i=nt(t),o=!1;n=new Ve(r,function(){o||(o=!0,i(function(){o=!1,n.isDisposed||n.track(a)}))},t.onError)}function a(){e(n)}return n.schedule(),n.getDisposer()}Ze.bound=function(e,t,n,r){return!0===r?(Qe(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Qe(this,t,n.value||n.initializer.call(this)),this[t]},set:qe}:{enumerable:!1,configurable:!0,set:function(e){Qe(this,t,e)},get:function(){}}};var tt=function(e){return e()};function nt(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:tt}function rt(e,t,n,r){var i="string"==typeof n?qt(t,n):qt(t),o="string"==typeof n?r:n,a=i[e];return"function"!=typeof a?f(!1):(i[e]=function(){a.call(this),o.call(this)},function(){i[e]=a})}function it(e){var t=e.enforceActions,n=e.computedRequiresReaction,r=e.disableErrorBoundaries,i=e.arrayBuffer,o=e.reactionScheduler;if(!0===e.isolateGlobalState&&((Ae.pendingReactions.length||Ae.inBatch||Ae.isRunningReactions)&&f("isolateGlobalState should be called before MobX is running any reactions"),Ee=!0,Ne&&(0==--p().__mobxInstanceCount&&(p().__mobxGlobals=void 0),Ae=new je)),void 0!==t){var a=void 0;switch(t){case!0:case"observed":a=!0;break;case!1:case"never":a=!1;break;case"strict":case"always":a="strict";break;default:f("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}Ae.enforceActions=a,Ae.allowStateChanges=!0!==a&&"strict"!==a}void 0!==n&&(Ae.computedRequiresReaction=!!n),void 0!==r&&(!0===r&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors if this is on."),Ae.disableErrorBoundaries=!!r),"number"==typeof i&&Ct(i),o&&Ge(o)}function ot(e,t,n,r){var i=(r=F(r)).defaultDecorator||(!1===r.deep?Y:X);B(e),$t(e,r.name,i.enhancer),Pe();try{for(var o in t){var a=Object.getOwnPropertyDescriptor(t,o);0;var s=(n&&o in n?n[o]:a.get?ne:i)(e,o,a,!0);s&&Object.defineProperty(e,o,s)}}finally{Me()}return e}function at(e){var t,n,r={name:e.name};return e.observing&&e.observing.length>0&&(r.dependencies=(t=e.observing,n=[],t.forEach(function(e){-1===n.indexOf(e)&&n.push(e)}),n).map(at)),r}function st(e,t){if(null==e)return!1;if(void 0!==t){if(Xt(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return Xt(e)||!!e.$mobx||P(e)||$e(e)||me(e)}function lt(e){return 1!==arguments.length&&f(!1),st(e)}function ct(e){return Xt(e)?e.$mobx.getKeys():Vt(e)?e._keys.slice():Ut(e)?S(e.keys()):Pt(e)?e.map(function(e,t){return t}):f(!1)}var ut={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function ht(e,t,n,r){return r.detectCycles&&e.set(t,n),n}function pt(e,t){var n;return"boolean"==typeof t&&(t={detectCycles:t}),t||(t=ut),t.detectCycles=void 0===t.detectCycles?!0===t.recurseEverything:!0===t.detectCycles,t.detectCycles&&(n=new Map),function e(t,n,r){if(!n.recurseEverything&&!lt(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(he(t))return e(t.get(),n,r);if(lt(t)&&ct(t),!0===n.detectCycles&&null!==t&&r.has(t))return r.get(t);if(Pt(t)||Array.isArray(t)){var i=ht(r,t,[],n),o=t.map(function(t){return e(t,n,r)});i.length=o.length;for(var a=0,s=o.length;a<s;a++)i[a]=o[a];return i}if(Ut(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===n.exportMapsAsObjects){var l=ht(r,t,new Set,n);return t.forEach(function(t){l.add(e(t,n,r))}),l}var c=ht(r,t,[],n);return t.forEach(function(t){c.push(e(t,n,r))}),c}if(Vt(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===n.exportMapsAsObjects){var u=ht(r,t,new Map,n);return t.forEach(function(t,i){u.set(i,e(t,n,r))}),u}var h=ht(r,t,{},n);return t.forEach(function(t,i){h[i]=e(t,n,r)}),h}var p=ht(r,t,{},n);for(var d in t)p[d]=e(t[d],n,r);return p}(e,t,n)}function dt(e,t){void 0===t&&(t=void 0),Pe();try{return e.apply(t)}finally{Me()}}function ft(e){return void 0!==e.interceptors&&e.interceptors.length>0}function vt(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),m(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function mt(e,t){var n=ke();try{var r=e.interceptors;if(r)for(var i=0,o=r.length;i<o&&(v(!(t=r[i](t))||t.type,"Intercept handlers should return nothing or a change object"),t);i++);return t}finally{Se(n)}}function bt(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function yt(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),m(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function gt(e,t){var n=ke(),r=e.changeListeners;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);Se(n)}}var wt,_t,xt,Ot,kt=(wt=!1,_t={},Object.defineProperty(_t,"0",{set:function(){wt=!0}}),Object.create(_t)[0]=1,!1===wt),St=0,Tt=function(){return function(){}}();xt=Tt,Ot=Array.prototype,void 0!==Object.setPrototypeOf?Object.setPrototypeOf(xt.prototype,Ot):void 0!==xt.prototype.__proto__?xt.prototype.__proto__=Ot:xt.prototype=Ot,Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(e){Object.defineProperty(Tt.prototype,e,{configurable:!0,writable:!0,value:Array.prototype[e]})});var jt=function(){function e(e,t,n,r){this.array=n,this.owned=r,this.values=[],this.lastKnownLength=0,this.atom=new D(e||"ObservableArray@"+d()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return vt(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),yt(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>St&&Ct(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var r=this;we(this.atom);var i=this.values.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=u),ft(this)){var o=mt(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!o)return u;t=o.removedCount,n=o.added}var a=(n=0===n.length?n:n.map(function(e){return r.enhancer(e,void 0)})).length-t;this.updateArrayLength(i,a);var s=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,s),this.dehanceValues(s)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,l([e,t],n));var i=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),i},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&We(),i=bt(this),o=i||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&Fe(a({},o,{name:this.atom.name})),this.atom.reportChanged(),i&>(this,o),r&&Xe()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&We(),i=bt(this),o=i||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&Fe(a({},o,{name:this.atom.name})),this.atom.reportChanged(),i&>(this,o),r&&Xe()},e}(),Nt=function(e){function t(t,n,r,i){void 0===r&&(r="ObservableArray@"+d()),void 0===i&&(i=!1);var o=e.call(this)||this,a=new jt(r,n,o,i);if(_(o,"$mobx",a),t&&t.length){var s=le(!0);o.spliceWithArray(0,0,t),ce(s)}return kt&&Object.defineProperty(a.array,"0",Et),o}return o(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),e.map(function(e){return Pt(e)?e.peek():e}))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},t.prototype.find=function(e,t,n){void 0===n&&(n=0),arguments.length;var r=this.findIndex.apply(this,arguments);return-1===r?void 0:this.get(r)},t.prototype.findIndex=function(e,t,n){void 0===n&&(n=0),arguments.length;for(var r=this.peek(),i=r.length,o=n;o<i;o++)if(e.call(t,r[o],o,this))return o;return-1},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.spliceWithArray=function(e,t,n){return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.dehanceValues(this.$mobx.values).indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.move=function(e,t){function n(e){if(e<0)throw new Error("[mobx.array] Index out of bounds: "+e+" is negative");var t=this.$mobx.values.length;if(e>=t)throw new Error("[mobx.array] Index out of bounds: "+e+" is not smaller than "+t)}if(n.call(this,e),n.call(this,t),e!==t){var r,i=this.$mobx.values;r=e<t?l(i.slice(0,e),i.slice(e+1,t+1),[i[e]],i.slice(t+1)):l(i.slice(0,t),[i[e]],i.slice(t,e),i.slice(e+1)),this.replace(r)}},t.prototype.get=function(e){var t=this.$mobx;if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},t.prototype.set=function(e,t){var n=this.$mobx,r=n.values;if(e<r.length){we(n.atom);var i=r[e];if(ft(n)){var o=mt(n,{type:"update",object:this,index:e,newValue:t});if(!o)return;t=o.newValue}(t=n.enhancer(t,i))!==i&&(r[e]=t,n.notifyArrayChildUpdate(e,t,i))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}},t}(Tt);E(Nt.prototype,function(){this.$mobx.atom.reportObserved();var e=this,t=0;return A({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})}),Object.defineProperty(Nt.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),w(Nt.prototype,z(),"Array"),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(e){var t=Array.prototype[e];v("function"==typeof t,"Base function not defined on Array prototype: '"+e+"'"),w(Nt.prototype,e,function(){return t.apply(this.peek(),arguments)})}),function(e,t){for(var n=0;n<t.length;n++)w(e,t[n],e[t[n]])}(Nt.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var Et=At(0);function At(e){return{enumerable:!1,configurable:!1,get:function(){return this.get(e)},set:function(t){this.set(e,t)}}}function zt(e){Object.defineProperty(Nt.prototype,""+e,At(e))}function Ct(e){for(var t=St;t<e;t++)zt(t);St=e}Ct(1e3);var Dt=x("ObservableArrayAdministration",jt);function Pt(e){return y(e)&&Dt(e.$mobx)}var Mt={},It=function(){function e(e,t,n){if(void 0===t&&(t=H),void 0===n&&(n="ObservableMap@"+d()),this.enhancer=t,this.name=n,this.$mobx=Mt,this._keys=new Nt(void 0,$,this.name+".keys()",!0),"function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){return this._hasMap.has(e)?this._hasMap.get(e).get():this._updateHasMapEntry(e,!1).get()},e.prototype.set=function(e,t){var n=this._has(e);if(ft(this)){var r=mt(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(ft(this)&&!(i=mt(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=We(),r=bt(this),i=r||n?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return n&&Fe(a({},i,{name:this.name,key:e})),dt(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)}),r&>(this,i),n&&Xe(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap.get(e);return n?n.setNewValue(t):(n=new ue(t,$,this.name+"."+Rt(e)+"?",!1),this._hasMap.set(e,n)),n},e.prototype._updateValue=function(e,t){var n=this._data.get(e);if((t=n.prepareNewValue(t))!==Ae.UNCHANGED){var r=We(),i=bt(this),o=i||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&Fe(a({},o,{name:this.name,key:e})),n.setNewValue(t),i&>(this,o),r&&Xe()}},e.prototype._addValue=function(e,t){var n=this;dt(function(){var r=new ue(t,n.enhancer,n.name+"."+Rt(e),!1);n._data.set(e,r),t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)});var r=We(),i=bt(this),o=i||r?{type:"add",object:this,name:e,newValue:t}:null;r&&Fe(a({},o,{name:this.name,key:e})),i&>(this,o),r&&Xe()},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keys[N()]()},e.prototype.values=function(){var e=this,t=0;return A({next:function(){return t<e._keys.length?{value:e.get(e._keys[t++]),done:!1}:{value:void 0,done:!0}}})},e.prototype.entries=function(){var e=this,t=0;return A({next:function(){if(t<e._keys.length){var n=e._keys[t++];return{value:[n,e.get(n)],done:!1}}return{done:!0}}})},e.prototype.forEach=function(e,t){var n=this;this._keys.forEach(function(r){return e.call(t,n.get(r),r,n)})},e.prototype.merge=function(e){var t=this;return Vt(e)&&(e=e.toJS()),dt(function(){g(e)?Object.keys(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=s(e,2),r=n[0],i=n[1];return t.set(r,i)}):O(e)?e.constructor!==Map?f("Cannot initialize from classes that inherit from Map: "+e.constructor.name):e.forEach(function(e,n){return t.set(n,e)}):null!=e&&f("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;dt(function(){Oe(function(){e._keys.slice().forEach(function(t){return e.delete(t)})})})},e.prototype.replace=function(e){var t=this;return dt(function(){var n,r=g(n=e)?Object.keys(n):Array.isArray(n)?n.map(function(e){return s(e,1)[0]}):O(n)||Vt(n)?S(n.keys()):f("Cannot get keys from '"+n+"'");t._keys.filter(function(e){return-1===r.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e=this,t={};return this._keys.forEach(function(n){return t["symbol"==typeof n?n:Rt(n)]=e.get(n)}),t},e.prototype.toJS=function(){var e=this,t=new Map;return this._keys.forEach(function(n){return t.set(n,e.get(n))}),t},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this._keys.map(function(t){return Rt(t)+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return yt(this,e)},e.prototype.intercept=function(e){return vt(this,e)},e}();function Rt(e){return e&&e.toString?e.toString():new String(e).toString()}E(It.prototype,function(){return this.entries()}),_(It.prototype,z(),"Map");var Vt=x("ObservableMap",It),Lt={},Bt=function(){function e(e,t,n){if(void 0===t&&(t=H),void 0===n&&(n="ObservableSet@"+d()),this.name=n,this.$mobx=Lt,this._data=new Set,this._atom=M(this.name),"function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,r){return t(e,r,n)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;dt(function(){Oe(function(){e._data.forEach(function(t){e.delete(t)})})})},e.prototype.forEach=function(e,t){var n=this;this._data.forEach(function(r){e.call(t,r,r,n)})},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if((we(this._atom),ft(this))&&!(i=mt(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){dt(function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()});var n=We(),r=bt(this),i=r||n?{type:"add",object:this,newValue:e}:null;0,r&>(this,i)}return this},e.prototype.delete=function(e){var t=this;if(ft(this)&&!(i=mt(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var n=We(),r=bt(this),i=r||n?{type:"delete",object:this,oldValue:e}:null;return dt(function(){t._atom.reportChanged(),t._data.delete(e)}),r&>(this,i),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=S(this.keys()),n=S(this.values());return A({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e,t=this,n=0;return void 0!==this._data.values?e=S(this._data.values()):(e=[],this._data.forEach(function(t){return e.push(t)})),A({next:function(){return n<e.length?{value:t.dehanceValue(e[n++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return Ut(e)&&(e=e.toJS()),dt(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):k(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&f("Cannot initialize set from "+e)}),this},e.prototype.observe=function(e,t){return yt(this,e)},e.prototype.intercept=function(e){return vt(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+S(this.keys()).join(", ")+" ]"},e}();E(Bt.prototype,function(){return this.values()}),_(Bt.prototype,z(),"Set");var Ut=x("ObservableSet",Bt),Ht=function(){function e(e,t,n){this.target=e,this.name=t,this.defaultEnhancer=n,this.values={}}return e.prototype.read=function(e,t){if(this.target===e||(this.illegalAccess(e,t),this.values[t]))return this.values[t].get()},e.prototype.write=function(e,t,n){var r=this.target;r!==e&&this.illegalAccess(e,t);var i=this.values[t];if(i instanceof pe)i.set(n);else{if(ft(this)){if(!(l=mt(this,{type:"update",object:r,name:t,newValue:n})))return;n=l.newValue}if((n=i.prepareNewValue(n))!==Ae.UNCHANGED){var o=bt(this),s=We(),l=o||s?{type:"update",object:r,oldValue:i.value,name:t,newValue:n}:null;s&&Fe(a({},l,{name:this.name,key:t})),i.setNewValue(n),o&>(this,l),s&&Xe()}}},e.prototype.remove=function(e){if(this.values[e]){var t=this.target;if(ft(this))if(!(o=mt(this,{object:t,name:e,type:"remove"})))return;try{Pe();var n=bt(this),r=We(),i=this.values[e].get();this.keys&&this.keys.remove(e),delete this.values[e],delete this.target[e];var o=n||r?{type:"remove",object:t,oldValue:i,name:e}:null;r&&Fe(a({},o,{name:this.name,key:e})),n&>(this,o),r&&Xe()}finally{Me()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return yt(this,e)},e.prototype.intercept=function(e){return vt(this,e)},e.prototype.getKeys=function(){var e=this;return void 0===this.keys&&(this.keys=new Nt(Object.keys(this.values).filter(function(t){return e.values[t]instanceof ue}),$,"keys("+this.name+")",!0)),this.keys.slice()},e}();function $t(e,t,n){void 0===t&&(t=""),void 0===n&&(n=H);var r=e.$mobx;return r||(g(e)||(t=(e.constructor.name||"ObservableObject")+"@"+d()),t||(t="ObservableObject@"+d()),_(e,"$mobx",r=new Ht(e,t,n)),r)}function Gt(e,t,n,r){var i=$t(e);if(ft(i)){var o=mt(i,{object:e,name:t,type:"add",newValue:n});if(!o)return;n=o.newValue}n=(i.values[t]=new ue(n,r,i.name+"."+t,!1)).value,Object.defineProperty(e,t,function(e){return Wt[e]||(Wt[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.read(this,e)},set:function(t){this.$mobx.write(this,e,t)}})}(t)),i.keys&&i.keys.push(t),function(e,t,n,r){var i=bt(e),o=We(),s=i||o?{type:"add",object:t,name:n,newValue:r}:null;o&&Fe(a({},s,{name:e.name,key:n}));i&>(e,s);o&&Xe()}(i,e,t,n)}var Wt=Object.create(null),Kt=Object.create(null);function Ft(e){var t=e.$mobx;return t||(B(e),e.$mobx)}var Jt=x("ObservableObjectAdministration",Ht);function Xt(e){return!!y(e)&&(B(e),Jt(e.$mobx))}function qt(e,t){if("object"==typeof e&&null!==e){if(Pt(e))return void 0!==t&&f(!1),e.$mobx.atom;if(Ut(e))return e.$mobx;if(Vt(e)){var n=e;return void 0===t?qt(n._keys):((r=n._data.get(t)||n._hasMap.get(t))||f(!1),r)}var r;if(B(e),t&&!e.$mobx&&e[t],Xt(e))return t?((r=e.$mobx.values[t])||f(!1),r):f(!1);if(P(e)||me(e)||$e(e))return e}else if("function"==typeof e&&$e(e.$mobx))return e.$mobx;return f(!1)}function Yt(e,t){return e||f("Expecting some object"),void 0!==t?Yt(qt(e,t)):P(e)||me(e)||$e(e)?e:Vt(e)||Ut(e)?e:(B(e),e.$mobx?e.$mobx:void f(!1))}var Zt=Object.prototype.toString;function Qt(e,t){return en(e,t)}function en(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&function(e,t,n,r){e=tn(e),t=tn(t);var i=Zt.call(e);if(i!==Zt.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];var l=(n=n||[]).length;for(;l--;)if(n[l]===e)return r[l]===t;if(n.push(e),r.push(t),o){if((l=e.length)!==t.length)return!1;for(;l--;)if(!en(e[l],t[l],n,r))return!1}else{var c=Object.keys(e),u=void 0;if(l=c.length,Object.keys(t).length!==l)return!1;for(;l--;)if(u=c[l],!nn(t,u)||!en(e[u],t[u],n,r))return!1}return n.pop(),r.pop(),!0}(e,t,n,r)}function tn(e){return Pt(e)?e.peek():O(e)||Vt(e)?S(e.entries()):k(e)||Ut(e)?S(e.entries()):e}function nn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return Ae.spyListeners.push(e),m(function(){Ae.spyListeners=Ae.spyListeners.filter(function(t){return t!==e})})},extras:{getDebugName:function(e,t){return(void 0!==t?qt(e,t):Xt(e)||Vt(e)||Ut(e)?Yt(e):qt(e)).name}},$mobx:"$mobx"})}).call(this,n(3),n(4))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8),i=(e,t,n,r)=>{const i=0===t&&n||1===t&&!n?e.inline:e.block;return"center"===i?1:"nearest"===i?0:"start"===i?0===t?r?5:4:2:"end"===i?0===t?r?4:5:3:n?0===t?0:2:0===t?4:0};function o(e,t,n,r,i,o,a,s){return o<e&&a>t||o>e&&a<t?0:o<=e&&s<=n||a>=t&&s>=n?o-e-r:a>t&&s<n||o<e&&s>n?a-t+i:0}const a=e=>"visible"!==e&&"clip"!==e,s=e=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const t=getComputedStyle(e);return a(t.overflowY)||a(t.overflowX)}return!1},l=e=>{const t=e.parentNode;return t&&(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?t.host:t)};let c;t.elementScrollIntoView=((e,t)=>{if(!e.ownerDocument.documentElement.contains(e))return;const n=document.scrollingElement||document.documentElement,a=[];for(let t=l(e);null!==t;t=l(t)){if(t===n){a.push(t);break}t===document.body&&s(t)&&!s(document.documentElement)||s(t)&&a.push(t)}const c=window.visualViewport?window.visualViewport.width:innerWidth,u=window.visualViewport?window.visualViewport.height:innerHeight,h=window.scrollX||window.pageXOffset,p=window.scrollY||window.pageYOffset,{height:d,width:f,top:v,right:m,bottom:b,left:y}=e.getBoundingClientRect(),g=getComputedStyle(e),w=g.writingMode||g.webkitWritingMode||g.getPropertyValue("-ms-writing-mode")||"horizontal-tb",_=["horizontal-tb","lr","lr-tb","rl"].some(e=>e===w),x=["vertical-rl","tb-rl"].some(e=>e===w),O=i(t,0,_,x),k=i(t,1,_,x);let S=(()=>{switch(k){case 2:case 0:return v;case 3:return b;default:return v+d/2}})(),T=(()=>{switch(O){case 1:return y+f/2;case 5:return m;default:return y}})();const j=[];for(const e of a){const{height:i,width:a,top:s,right:l,bottom:v,left:m}=e.getBoundingClientRect(),b=getComputedStyle(e),y=parseInt(b.borderLeftWidth,10),g=parseInt(b.borderTopWidth,10),w=parseInt(b.borderRightWidth,10),_=parseInt(b.borderBottomWidth,10);let x=0,N=0;const E="offsetWidth"in e?e.offsetWidth-e.clientWidth-y-w:0,A="offsetHeight"in e?e.offsetHeight-e.clientHeight-g-_:0;if(n===e){switch(k){case 2:x=S;break;case 3:x=S-u;break;case 1:x=S-u/2;break;case 0:x=o(p,p+u,u,g,_,p+S,p+S+d,d)}switch(O){case 4:N=T;break;case 5:N=T-c;break;case 1:N=T-c/2;break;case 0:N=o(h,h+c,c,y,w,h+T,h+T+f,f)}x=Math.max(0,x+p),N=Math.max(0,N+h)}else{switch(k){case 2:x=S-s-g;break;case 3:x=S-v+_+A;break;case 1:x=S-(s+i/2)+A/2;break;case 0:x=o(s,v,i,g,_+A,S,S+d,d)}switch(O){case 4:N=T-m-y;break;case 5:N=T-l+w+E;break;case 1:N=T-(m+a/2)+E/2;break;case 0:N=o(m,l,a,y,w+E,T,T+f,f)}const{scrollLeft:t,scrollTop:n}=e;x=Math.max(0,Math.min(n+x,e.scrollHeight-i+A)),N=Math.max(0,Math.min(t+N,e.scrollWidth-a+E)),S+=n-x,T+=t-N}j.push(()=>r.elementScroll(e,Object.assign({},t,{top:x,left:N})))}j.forEach(e=>e())});t.polyfill=(e=>{const n=(()=>(void 0===c&&(c=document.documentElement.scrollIntoView),c))();Element.prototype.scrollIntoView=function(r){if("boolean"==typeof r)return n.call(this,r);if(Object(r)!==r)throw new TypeError("Failed to execute 'scrollIntoView' on 'Element': parameter 1 ('options') is not an object.");return t.elementScrollIntoView(this,Object.assign({},r,e))}})},function(e,t,n){e.exports=n(10)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,c=[],u=!1,h=-1;function p(){u&&l&&(u=!1,l.length?c=l.concat(c):h=-1,c.length&&d())}function d(){if(!u){var e=s(p);u=!0;for(var t=c.length;t;){for(l=c,c=[];++h<t;)l&&l[h].run();h=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function v(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new f(e,t)),1!==c.length||u||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){var r={"./en-US.json":6,"./zh-CN.json":7};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=5},function(e){e.exports={"language-name":"English",app:{name:"Lrc Maker",fullname:"Lrc Maker",edit:"Edit",synchronize:"Synchronize",preferences:"Preferences","editor-tip":"Click here to edit lyric lines","synchronizer-tip":"Click here to synchronize lyric","preferences-tip":"language and other preferences"},lrc:{album:"Album",title:"Title",artist:"Artist","load-audio":"Load Audio","load-text":"Load Text","select-all":"Select All & Copy"},preferences:{language:"Language",version:"App Version","update-time":"App Update Time",hash:"Git Hash","github-repo":"View me on Github",help:"Tips & About","time-tag-decimals":"Decimals of Time Tag","left-space":"Left space","right-space":"Right space","built-in-audio":"Use Browser Built-in Audio Player","space-button-on-screen":"On-screen Space Key","dark-mode":"Dark Mode","clear-cache":"Clear App Cache"}}},function(e){e.exports={"language-name":"简体中文",app:{name:"歌词滚动姬",fullname:"灯里的歌词滚动姬",edit:"编辑",synchronize:"打轴",preferences:"设置","editor-tip":"点击这里编辑歌词文本","synchronizer-tip":"点击这里打轴","preferences-tip":"语言及其他设置"},lrc:{album:"所属专辑",title:"歌曲名",artist:"艺人名","load-audio":"加载音频","load-text":"加载文本","select-all":"全选复制"},preferences:{language:"语言",version:"App 版本","update-time":"App 更新时间",hash:"Git Hash","github-repo":"开源地址",help:"关于 & 帮助","time-tag-decimals":"时间标签小数点","left-space":"左侧空格","right-space":"右侧空格","built-in-audio":"使用浏览器内建音频播放器","space-button-on-screen":"启用虚拟空格键","dark-mode":"夜间模式","clear-cache":"重置app缓存"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9);let i;t.getOriginalFunc=(()=>(void 0===i&&(i=Element.prototype.scroll||Element.prototype.scrollTo||function(e,t){this.scrollLeft=e,this.scrollTop=t}),i)),t.elementScroll=((e,n)=>{const i=t.getOriginalFunc().bind(e);if(void 0===n.left&&void 0===n.top)return;const o=e.scrollLeft,a=e.scrollTop,{left:s=o,top:l=a}=n;if("smooth"!==n.behavior)return i(s,l);const c=()=>{window.removeEventListener("wheel",h),window.removeEventListener("touchmove",h)},u={timeStamp:r.now(),duration:n.duration,startX:o,startY:a,targetX:s,targetY:l,rafId:0,method:i,timingFunc:n.timingFunc,callback:c},h=()=>{cancelAnimationFrame(u.rafId),c()};window.addEventListener("wheel",h,{passive:!0,once:!0}),window.addEventListener("touchmove",h,{passive:!0,once:!0}),r.step(u)}),t.polyfill=(e=>{const n=t.getOriginalFunc();Element.prototype.scroll=function(){const[r=0,i=0]=arguments;if("number"==typeof r&&"number"==typeof i)return n.call(this,r,i);if(Object(r)!==r)throw new TypeError("Failed to execute 'scroll' on 'Element': parameter 1 ('options') is not an object.");return t.elementScroll(this,Object.assign({},r,e))}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.now=(()=>(performance||Date).now()),t.step=(e=>{const n=(t.now()-e.timeStamp)/(e.duration||500);if(n>1)return e.method(e.targetX,e.targetY),void e.callback();const r=(e.timingFunc||(e=>.5*(1-Math.cos(Math.PI*e))))(n),i=e.startX+(e.targetX-e.startX)*r,o=e.startY+(e.targetY-e.startY)*r;e.method(i,o),e.rafId=requestAnimationFrame(()=>{t.step(e)})})},function(e,t,n){"use strict";n.r(t);var r=n(0),i=function(){},o={},a=[],s=[];function l(e,t){var n,r,l,c,u=s;for(c=arguments.length;c-- >2;)a.push(arguments[c]);for(t&&null!=t.children&&(a.length||a.push(t.children),delete t.children);a.length;)if((r=a.pop())&&void 0!==r.pop)for(c=r.length;c--;)a.push(r[c]);else"boolean"==typeof r&&(r=null),(l="function"!=typeof e)&&(null==r?r="":"number"==typeof r?r=String(r):"string"!=typeof r&&(l=!1)),l&&n?u[u.length-1]+=r:u===s?u=[r]:u.push(r),n=l;var h=new i;return h.nodeName=e,h.children=u,h.attributes=null==t?void 0:t,h.key=null==t?void 0:t.key,void 0!==o.vnode&&o.vnode(h),h}function c(e,t){for(var n in t)e[n]=t[n];return e}function u(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}var h="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;var p=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,d=[];function f(e){!e._dirty&&(e._dirty=!0)&&1==d.push(e)&&(o.debounceRendering||h)(v)}function v(){for(var e;e=d.pop();)e._dirty&&P(e)}function m(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function b(e){var t=c({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function y(e){var t=e.parentNode;t&&t.removeChild(e)}function g(e,t,n,r,i){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)u(n,null),u(r,e);else if("class"!==t||i)if("style"===t){if(r&&"string"!=typeof r&&"string"!=typeof n||(e.style.cssText=r||""),r&&"object"==typeof r){if("string"!=typeof n)for(var o in n)o in r||(e.style[o]="");for(var o in r)e.style[o]="number"==typeof r[o]&&!1===p.test(o)?r[o]+"px":r[o]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,w,a):e.removeEventListener(t,w,a),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!i&&t in e){try{e[t]=null==r?"":r}catch(e){}null!=r&&!1!==r||"spellcheck"==t||e.removeAttribute(t)}else{var s=i&&t!==(t=t.replace(/^xlink:?/,""));null==r||!1===r?s?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof r&&(s?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function w(e){return this._listeners[e.type](o.event&&o.event(e)||e)}var _=[],x=0,O=!1,k=!1;function S(){for(var e;e=_.shift();)o.afterMount&&o.afterMount(e),e.componentDidMount&&e.componentDidMount()}function T(e,t,n,r,i,o){x++||(O=null!=i&&void 0!==i.ownerSVGElement,k=null!=e&&!("__preactattr_"in e));var a=j(e,t,n,r,o);return i&&a.parentNode!==i&&i.appendChild(a),--x||(k=!1,o||S()),a}function j(e,t,n,r,i){var o=e,a=O;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||i)?e.nodeValue!=t&&(e.nodeValue=t):(o=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(o,e),N(e,!0))),o.__preactattr_=!0,o;var s,l,c=t.nodeName;if("function"==typeof c)return function(e,t,n,r){var i=e&&e._component,o=i,a=e,s=i&&e._componentConstructor===t.nodeName,l=s,c=b(t);for(;i&&!l&&(i=i._parentComponent);)l=i.constructor===t.nodeName;i&&l&&(!r||i._component)?(D(i,c,3,n,r),e=i.base):(o&&!s&&(M(o),e=a=null),i=z(t.nodeName,c,n),e&&!i.nextBase&&(i.nextBase=e,a=null),D(i,c,1,n,r),e=i.base,a&&e!==a&&(a._component=null,N(a,!1)));return e}(e,t,n,r);if(O="svg"===c||"foreignObject"!==c&&O,c=String(c),(!e||!m(e,c))&&(s=c,(l=O?document.createElementNS("http://www.w3.org/2000/svg",s):document.createElement(s)).normalizedNodeName=s,o=l,e)){for(;e.firstChild;)o.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(o,e),N(e,!0)}var u=o.firstChild,h=o.__preactattr_,p=t.children;if(null==h){h=o.__preactattr_={};for(var d=o.attributes,f=d.length;f--;)h[d[f].name]=d[f].value}return!k&&p&&1===p.length&&"string"==typeof p[0]&&null!=u&&void 0!==u.splitText&&null==u.nextSibling?u.nodeValue!=p[0]&&(u.nodeValue=p[0]):(p&&p.length||null!=u)&&function(e,t,n,r,i){var o,a,s,l,c,u=e.childNodes,h=[],p={},d=0,f=0,v=u.length,b=0,g=t?t.length:0;if(0!==v)for(var w=0;w<v;w++){var _=u[w],x=_.__preactattr_,O=g&&x?_._component?_._component.__key:x.key:null;null!=O?(d++,p[O]=_):(x||(void 0!==_.splitText?!i||_.nodeValue.trim():i))&&(h[b++]=_)}if(0!==g)for(var w=0;w<g;w++){l=t[w],c=null;var O=l.key;if(null!=O)d&&void 0!==p[O]&&(c=p[O],p[O]=void 0,d--);else if(f<b)for(o=f;o<b;o++)if(void 0!==h[o]&&(k=a=h[o],T=i,"string"==typeof(S=l)||"number"==typeof S?void 0!==k.splitText:"string"==typeof S.nodeName?!k._componentConstructor&&m(k,S.nodeName):T||k._componentConstructor===S.nodeName)){c=a,h[o]=void 0,o===b-1&&b--,o===f&&f++;break}c=j(c,l,n,r),s=u[w],c&&c!==e&&c!==s&&(null==s?e.appendChild(c):c===s.nextSibling?y(s):e.insertBefore(c,s))}var k,S,T;if(d)for(var w in p)void 0!==p[w]&&N(p[w],!1);for(;f<=b;)void 0!==(c=h[b--])&&N(c,!1)}(o,p,n,r,k||null!=h.dangerouslySetInnerHTML),function(e,t,n){var r;for(r in n)t&&null!=t[r]||null==n[r]||g(e,r,n[r],n[r]=void 0,O);for(r in t)"children"===r||"innerHTML"===r||r in n&&t[r]===("value"===r||"checked"===r?e[r]:n[r])||g(e,r,n[r],n[r]=t[r],O)}(o,t.attributes,h),O=a,o}function N(e,t){var n=e._component;n?M(n):(null!=e.__preactattr_&&u(e.__preactattr_.ref,null),!1!==t&&null!=e.__preactattr_||y(e),E(e))}function E(e){for(e=e.lastChild;e;){var t=e.previousSibling;N(e,!0),e=t}}var A=[];function z(e,t,n){var r,i=A.length;for(e.prototype&&e.prototype.render?(r=new e(t,n),I.call(r,t,n)):((r=new I(t,n)).constructor=e,r.render=C);i--;)if(A[i].constructor===e)return r.nextBase=A[i].nextBase,A.splice(i,1),r;return r}function C(e,t,n){return this.constructor(e,n)}function D(e,t,n,r,i){e._disable||(e._disable=!0,e.__ref=t.ref,e.__key=t.key,delete t.ref,delete t.key,void 0===e.constructor.getDerivedStateFromProps&&(!e.base||i?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r)),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===o.syncComponentUpdates&&e.base?f(e):P(e,1,i)),u(e.__ref,e))}function P(e,t,n,r){if(!e._disable){var i,a,s,l=e.props,u=e.state,h=e.context,p=e.prevProps||l,d=e.prevState||u,f=e.prevContext||h,v=e.base,m=e.nextBase,y=v||m,g=e._component,w=!1,O=f;if(e.constructor.getDerivedStateFromProps&&(u=c(c({},u),e.constructor.getDerivedStateFromProps(l,u)),e.state=u),v&&(e.props=p,e.state=d,e.context=f,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(l,u,h)?w=!0:e.componentWillUpdate&&e.componentWillUpdate(l,u,h),e.props=l,e.state=u,e.context=h),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!w){i=e.render(l,u,h),e.getChildContext&&(h=c(c({},h),e.getChildContext())),v&&e.getSnapshotBeforeUpdate&&(O=e.getSnapshotBeforeUpdate(p,d));var k,j,E=i&&i.nodeName;if("function"==typeof E){var A=b(i);(a=g)&&a.constructor===E&&A.key==a.__key?D(a,A,1,h,!1):(k=a,e._component=a=z(E,A,h),a.nextBase=a.nextBase||m,a._parentComponent=e,D(a,A,0,h,!1),P(a,1,n,!0)),j=a.base}else s=y,(k=g)&&(s=e._component=null),(y||1===t)&&(s&&(s._component=null),j=T(s,i,h,n||!v,y&&y.parentNode,!0));if(y&&j!==y&&a!==g){var C=y.parentNode;C&&j!==C&&(C.replaceChild(j,y),k||(y._component=null,N(y,!1)))}if(k&&M(k),e.base=j,j&&!r){for(var I=e,R=e;R=R._parentComponent;)(I=R).base=j;j._component=I,j._componentConstructor=I.constructor}}for(!v||n?_.push(e):w||(e.componentDidUpdate&&e.componentDidUpdate(p,d,O),o.afterUpdate&&o.afterUpdate(e));e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);x||r||S()}}function M(e){o.beforeUnmount&&o.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?M(n):t&&(null!=t.__preactattr_&&u(t.__preactattr_.ref,null),e.nextBase=t,y(t),A.push(e),E(t)),u(e.__ref,null)}function I(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{},this._renderCallbacks=[]}function R(e,t,n){return T(n,e,{},!1,t,!1)}function V(){return{}}c(I.prototype,{setState:function(e,t){this.prevState||(this.prevState=this.state),this.state=c(c({},this.state),"function"==typeof e?e(this.state,this.props):e),t&&this._renderCallbacks.push(t),f(this)},forceUpdate:function(e){e&&this._renderCallbacks.push(e),P(this,2)},render:function(){}});var L={h:l,createElement:l,cloneElement:function(e,t){return l(e.nodeName,c(c({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)},createRef:V,Component:I,render:R,rerender:v,options:o};const B=(e,t,n)=>{const r=e[t];e[t]=function(){if(n.apply(this,arguments),r)return r.apply(this,arguments)}},U=Symbol("mobxReaction"),H=e=>{const t=e;B(t.prototype,"componentWillMount",function(){const e=this.constructor.displayName||this.constructor.name;this[U]=new r.a(`${e}.render()`,()=>this.setState({}))}),B(t.prototype,"componentWillUnmount",function(){this[U].dispose(),this[U]=null});const n=t.prototype.render;t.prototype.render=function(e,t,r){let i;return this[U].track(()=>{i=n.call(this,e,t,r)}),i}};let $;var G,W,K,F,J,X,q,Y,Z,Q,ee,te,ne,re,ie;function oe(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function ae(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}$=(e=>e.keys().reduce((t,n)=>(t[n.slice(2,-5)]=e(n),t),{}))(n(5));const se=new(G=r.b.bound,W=r.b.bound,K=r.b.bound,F=r.b.bound,J=r.b.bound,X=r.b.bound,q=r.b.bound,Z=ae((Y=class e{get i18n(){return $[this.lang]||$["en-US"]}get fixed_decimal(){return Math.pow(10,this.fixed)}static get storageName(){return"lrc-maker-preferences"}constructor(){oe(this,"fixed",Z,this),oe(this,"spaceStart",Q,this),oe(this,"spaceEnd",ee,this),oe(this,"builtInAudio",te,this),oe(this,"screenButton",ne,this),oe(this,"darkMode",re,this),oe(this,"lang",ie,this),this.themeColor="#f58ea8";try{this.lang=(e=>e in $?e:"en-US")(navigator.language);const t=JSON.parse(localStorage.getItem(e.storageName));for(let[e,n]of Object.entries(t))e in this&&(this[e]=n)}catch(e){}}save(){try{localStorage.setItem(e.storageName,JSON.stringify(Object(r.g)(this,!1)))}catch(e){}}set_spaceStart(e){this.spaceStart=e,this.save()}set_spaceEnd(e){this.spaceEnd=e,this.save()}toggle_audio_player(){this.builtInAudio=!this.builtInAudio,this.save()}toggle_screen_button(){this.screenButton=!this.screenButton,this.save()}toggle_dark_mode(){this.darkMode=!this.darkMode,this.save()}add_fixed(){this.fixed<3&&(this.fixed+=1,this.save())}minus_fixed(){this.fixed>0&&(this.fixed-=1,this.save())}set language(e){this.lang=e,this.save()}get language(){return this.lang}}).prototype,"fixed",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 3}}),Q=ae(Y.prototype,"spaceStart",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ee=ae(Y.prototype,"spaceEnd",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return-1}}),te=ae(Y.prototype,"builtInAudio",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ne=ae(Y.prototype,"screenButton",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),re=ae(Y.prototype,"darkMode",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ie=ae(Y.prototype,"lang",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"en-US"}}),ae(Y.prototype,"i18n",[r.d],Object.getOwnPropertyDescriptor(Y.prototype,"i18n"),Y.prototype),ae(Y.prototype,"fixed_decimal",[r.d],Object.getOwnPropertyDescriptor(Y.prototype,"fixed_decimal"),Y.prototype),ae(Y.prototype,"set_spaceStart",[G],Object.getOwnPropertyDescriptor(Y.prototype,"set_spaceStart"),Y.prototype),ae(Y.prototype,"set_spaceEnd",[W],Object.getOwnPropertyDescriptor(Y.prototype,"set_spaceEnd"),Y.prototype),ae(Y.prototype,"toggle_audio_player",[K],Object.getOwnPropertyDescriptor(Y.prototype,"toggle_audio_player"),Y.prototype),ae(Y.prototype,"toggle_screen_button",[F],Object.getOwnPropertyDescriptor(Y.prototype,"toggle_screen_button"),Y.prototype),ae(Y.prototype,"toggle_dark_mode",[J],Object.getOwnPropertyDescriptor(Y.prototype,"toggle_dark_mode"),Y.prototype),ae(Y.prototype,"add_fixed",[X],Object.getOwnPropertyDescriptor(Y.prototype,"add_fixed"),Y.prototype),ae(Y.prototype,"minus_fixed",[q],Object.getOwnPropertyDescriptor(Y.prototype,"minus_fixed"),Y.prototype),ae(Y.prototype,"language",[r.d],Object.getOwnPropertyDescriptor(Y.prototype,"language"),Y.prototype),Y);var le,ce,ue;let he=(ue=class{constructor(){var e,t,n,i;e=this,t="path",i=this,(n=ce)&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0}),"undefined"!=typeof window&&(this.path=location.hash,addEventListener("hashchange",Object(r.b)(()=>this.path=location.hash)))}static get editor(){return{name:se.i18n.app.edit,path:"#/",title:se.i18n.app["editor-tip"]}}static get synchronizer(){return{name:se.i18n.app.synchronize,path:"#/synchronizer/",title:se.i18n.app["synchronizer-tip"]}}static get preferences(){return{name:se.i18n.app.preferences,path:"#/preferences/",title:se.i18n.app["preferences-tip"]}}},pe=(le=ue).prototype,de="path",fe=[r.f],ve={configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}},be={},Object.keys(ve).forEach(function(e){be[e]=ve[e]}),be.enumerable=!!be.enumerable,be.configurable=!!be.configurable,("value"in be||be.initializer)&&(be.writable=!0),be=fe.slice().reverse().reduce(function(e,t){return t(pe,de,e)||e},be),me&&void 0!==be.initializer&&(be.value=be.initializer?be.initializer.call(me):void 0,be.initializer=void 0),void 0===be.initializer&&(Object.defineProperty(pe,de,be),be=null),ce=be,le);var pe,de,fe,ve,me,be;const ye=new he;var ge,we,_e,xe,Oe;function ke(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Se(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}const Te=new(ge=r.b.bound,_e=Se((we=class{constructor(){ke(this,"audioSrc",_e,this),ke(this,"_currentTime",xe,this),ke(this,"lock",Oe,this)}set src(e){"string"==typeof e?(URL.revokeObjectURL(this.audioSrc),this.audioSrc=e):setTimeout(Object(r.b)(()=>{URL.revokeObjectURL(this.audioSrc),this.audioSrc=URL.createObjectURL(e)}),0)}get src(){return this.audioSrc}get currentTime_fixed(){return~~(this.currentTime*se.fixed_decimal)/se.fixed_decimal}set currentTime(e){this._currentTime=e}get currentTime(){return this._currentTime}toggle_lock(){this.lock=!this.lock}}).prototype,"audioSrc",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),xe=Se(we.prototype,"_currentTime",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Oe=Se(we.prototype,"lock",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Se(we.prototype,"src",[r.d],Object.getOwnPropertyDescriptor(we.prototype,"src"),we.prototype),Se(we.prototype,"currentTime_fixed",[r.d],Object.getOwnPropertyDescriptor(we.prototype,"currentTime_fixed"),we.prototype),Se(we.prototype,"currentTime",[r.d],Object.getOwnPropertyDescriptor(we.prototype,"currentTime"),we.prototype),Se(we.prototype,"toggle_lock",[ge],Object.getOwnPropertyDescriptor(we.prototype,"toggle_lock"),we.prototype),we),je=new Map,Ne=(e,t,n=!0)=>{if(void 0===e)return"";const r=(e=>{if(je.has(e))return je.get(e);{const t=new Intl.NumberFormat("en",{minimumIntegerDigits:2,minimumFractionDigits:e,maximumFractionDigits:e});return je.set(e,t),t}})(t),i=Math.floor(e/60).toString().padStart(2,"0"),o=r.format(e%60);return n?`[${i}:${o}]`:`${i}:${o}`},Ee=(e,t,n)=>{let r=e;return t>=0&&(r=" ".repeat(t)+r.trimStart()),n>=0&&(r=r.trimEnd()+" ".repeat(n)),r};var Ae,ze,Ce,De,Pe,Me,Ie;function Re(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Ve(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}let Le=(Ae=r.b.bound,ze=r.b.bound,De=Ve((Ce=class e{get selectedIndex(){return this._selectedIndex}set selectedIndex(e){(isNaN(e)||e<0)&&(e=0),e>this.lyric.length-1&&(e=this.lyric.length-1),this._selectedIndex=e}get highlightIndex(){return this._highlightIndex}set highlightIndex(e){this._highlightIndex=e}static get storageName(){return"lrc-maker-lyric"}constructor(){Re(this,"info",De,this),Re(this,"lyric",Pe,this),Re(this,"_selectedIndex",Me,this),Re(this,"_highlightIndex",Ie,this),this.save=(()=>{try{localStorage.setItem(e.storageName,this.value)}catch(e){}});try{this.value=localStorage.getItem(e.storageName)}catch(e){}}set value(e){const{lyric:t,info:n}=((e,t={})=>{const{trimStart:n=!1,trimEnd:r=!1}=t,i=e.split(/\r\n|\n|\r/),o=/\[\s*(\d{1,3}):(\d{1,2}(?:[:.]\d{1,3})?)\s*]/g,a=/\[\s*(\w{1,6})\s*:(.*?)]/,s=new Map,l=[];for(const e of i){if("["!==e[0]){l.push({text:e});continue}o.lastIndex=0;const t=o.exec(e);if(null!==t){const n=Number.parseInt(t[1],10),r=Number.parseFloat(t[2].replace(":",".")),i=e.slice(o.lastIndex);l.push({time:60*n+r,text:i});continue}const n=a.exec(e);if(null===n)l.push({text:e});else{const e=n[2].trim();if(""===e)continue;s.set(n[1],e)}}return(n||r)&&l.forEach(e=>{n&&(e.text=e.text.trimStart()),r&&(e.text=e.text.trimEnd())}),{info:s,lyric:l}})(e,{trimStart:-1!==se.spaceStart,trimEnd:-1!==se.spaceEnd});this.lyric.replace(t),this.info.replace(n),this.selectedIndex+=0}info_set(e,t){this.info.set(e,t)}info_delete(e){this.info.delete(e)}get value(){return((e,t)=>{const{spaceStart:n,spaceEnd:r,fixed:i,endOfLine:o="\r\n"}=t,a=Array.from(e.info.entries()).map(([e,t])=>`[${e}: ${t}]`),s=e.lyric.map(e=>{if(void 0===e.time)return e.text;const t=Ee(e.text,n,r);return`${Ne(e.time,i)}${t}`});return a.concat(s).join(o)})(this,se)}}).prototype,"info",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return new Map}}),Pe=Ve(Ce.prototype,"lyric",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Me=Ve(Ce.prototype,"_selectedIndex",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Ie=Ve(Ce.prototype,"_highlightIndex",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return-1/0}}),Ve(Ce.prototype,"selectedIndex",[r.d],Object.getOwnPropertyDescriptor(Ce.prototype,"selectedIndex"),Ce.prototype),Ve(Ce.prototype,"highlightIndex",[r.d],Object.getOwnPropertyDescriptor(Ce.prototype,"highlightIndex"),Ce.prototype),Ve(Ce.prototype,"info_set",[Ae],Object.getOwnPropertyDescriptor(Ce.prototype,"info_set"),Ce.prototype),Ve(Ce.prototype,"info_delete",[ze],Object.getOwnPropertyDescriptor(Ce.prototype,"info_delete"),Ce.prototype),Ve(Ce.prototype,"value",[r.d],Object.getOwnPropertyDescriptor(Ce.prototype,"value"),Ce.prototype),Ce);const Be={currentTime:1/0,currentIndex:1/0,nextTime:-1/0,nextIndex:-1/0},Ue=new Le;Object(r.c)(()=>{const e=Te.currentTime,t=Ue.lyric;e>=Be.currentTime&&e<Be.nextTime||(Object.assign(Be,t.reduce((t,n,r)=>(n.time&&(n.time<t.nextTime&&n.time>e&&(t.nextTime=n.time,t.nextIndex=r),n.time>t.currentTime&&n.time<=e&&(t.currentTime=n.time,t.currentIndex=r)),t),{currentTime:-1/0,currentIndex:-1/0,nextTime:1/0,nextIndex:1/0})),Ue.highlightIndex=Be.currentIndex)});const He=()=>L.h("svg",{fill:"#5a5a5a",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M8 5v14l11-7z"}),L.h("path",{d:"M0 0h24v24H0z",fill:"none"})),$e=()=>L.h("svg",{fill:"#5a5a5a",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}),L.h("path",{d:"M0 0h24v24H0z",fill:"none"})),Ge=()=>L.h("svg",{fill:"#5a5a5a",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"}),L.h("path",{d:"M0 0h24v24H0z",fill:"none"})),We=()=>L.h("svg",{fill:"#5a5a5a",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"}),L.h("path",{d:"M0 0h24v24H0z",fill:"none"})),Ke=()=>L.h("svg",{fill:"#5a5a5a",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-1.3 8.9l.2-2.2h2.4v.7h-1.7l-.1.9s.1 0 .1-.1.1 0 .1-.1.1 0 .2 0h.2c.2 0 .4 0 .5.1s.3.2.4.3.2.3.3.5.1.4.1.6c0 .2 0 .4-.1.5s-.1.3-.3.5-.3.2-.4.3-.4.1-.6.1c-.2 0-.4 0-.5-.1s-.3-.1-.5-.2-.2-.2-.3-.4-.1-.3-.1-.5h.8c0 .2.1.3.2.4s.2.1.4.1c.1 0 .2 0 .3-.1l.2-.2s.1-.2.1-.3v-.6l-.1-.2-.2-.2s-.2-.1-.3-.1h-.2s-.1 0-.2.1-.1 0-.1.1-.1.1-.1.1h-.7z"})),Fe=()=>L.h("svg",{fill:"#5a5a5a",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8zm6.7.9l.2-2.2h2.4v.7h-1.7l-.1.9s.1 0 .1-.1.1 0 .1-.1.1 0 .2 0h.2c.2 0 .4 0 .5.1s.3.2.4.3.2.3.3.5.1.4.1.6c0 .2 0 .4-.1.5s-.1.3-.3.5-.3.2-.5.3-.4.1-.6.1c-.2 0-.4 0-.5-.1s-.3-.1-.5-.2-.2-.2-.3-.4-.1-.3-.1-.5h.8c0 .2.1.3.2.4s.2.1.4.1c.1 0 .2 0 .3-.1l.2-.2s.1-.2.1-.3v-.6l-.1-.2-.2-.2s-.2-.1-.3-.1h-.2s-.1 0-.2.1-.1 0-.1.1-.1.1-.1.1h-.6z"})),Je=()=>L.h("svg",{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M0 0h24v24H0z",fill:"none"}),L.h("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.488.488 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"})),Xe=()=>L.h("svg",{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),L.h("path",{d:"M0 0h24v24H0z",fill:"none"})),qe=()=>L.h("svg",{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M0 0h24v24H0z",fill:"none"}),L.h("path",{d:"M15 6H3v2h12V6zm0 4H3v2h12v-2zM3 16h8v-2H3v2zM17 6v8.18c-.31-.11-.65-.18-1-.18-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3V8h3V6h-5z"})),Ye=()=>L.h("svg",{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),L.h("path",{d:"M0 0h24v24H0z",fill:"none"})),Ze=()=>L.h("svg",{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M0 0h24v24H0z",fill:"none"}),L.h("path",{d:"M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z"})),Qe=()=>L.h("svg",{height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M0 0h24v24H0z",fill:"none"}),L.h("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"})),et=()=>L.h("svg",{fill:"#000000",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M0 0h24v24H0z",fill:"none"}),L.h("path",{d:"M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z"}),L.h("path",{d:"M19.00,15.50l0,-2.99l-1.49,0l0,2.99l-2.99,0l0,1.49l2.99,0l0,2.99l1.49,0l0,-2.99l2.99,0l0,-1.49l-2.99,0Z"})),tt=()=>L.h("svg",{fill:"#000000",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M0 0h24v24H0z",fill:"none"}),L.h("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z"})),nt=()=>L.h("svg",{fill:"#000000",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},L.h("path",{d:"M0 0h24v24H0z",fill:"none"}),L.h("path",{d:"M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z"}));var rt,it,ot,at;function st(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}let lt=(rt=r.b.bound,H((at=st((ot=class extends I{constructor(...e){var t,n,r,i;super(...e),t=this,n="href",i=this,(r=at)&&Object.defineProperty(t,n,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(i):void 0}),this.lrcString=""}handleClick(){let e=Ue.value;this.lrcString!=e&&(this.lrcString=e,URL.revokeObjectURL(this.href),this.href=URL.createObjectURL(new Blob([e],{type:"text/plain;charset=UTF-8"})))}render(){return L.h("a",{className:"download iconbutton",download:(Ue.info.get("ti")||new Date)+".lrc",href:this.href,onClick:this.handleClick},L.h(Ye,null))}}).prototype,"href",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),st(ot.prototype,"handleClick",[rt],Object.getOwnPropertyDescriptor(ot.prototype,"handleClick"),ot.prototype),it=ot))||it);var ct;let ut=H(ct=class extends I{constructor(e){super(e),this.textareaRef={},this.updateInfo=(e=>{let t=e.target.value,n=e.target.name;0===t.length?Ue.info_delete(n,t):Ue.info_set(n,t)}),this.parseText=(e=>{Ue.value=e.target.value}),this.uploadAudio=(e=>{let t=e.target.files[0];t&&(Te.src=t)}),this.uploadText=(e=>{let t=e.target.files[0];if(t){const e=new FileReader;e.onload=(e=>{let t=e.target.result;Ue.value=t}),e.readAsText(t)}}),this.selectAll=(()=>{this.textarea.select(),document.execCommand("copy")})}get textarea(){return this.textareaRef.current}componentWillUnmount(){Ue.info_set("tool","歌词滚动姬 (lrc-maker.github.io)")}render(){return L.h("div",{className:"editor"},L.h("section",{className:"editor-tool-bar"},L.h("label",{className:"editor-button"},L.h(et,null),L.h("span",{className:"option"},se.i18n.lrc["load-audio"]),L.h("input",{type:"file",accept:"audio/*",onChange:this.uploadAudio})),L.h("label",{className:"editor-button"},L.h(tt,null),L.h("span",{className:"option"},se.i18n.lrc["load-text"]),L.h("input",{type:"file",accept:"text/*, .txt, .lrc",onChange:this.uploadText})),L.h("span",{onClick:this.selectAll,className:"editor-button"},L.h(nt,null),L.h("span",{className:"option"},se.i18n.lrc["select-all"]))),L.h("section",{className:"lrc-info-section"},L.h("section",{className:"lrc-info-input-section"},L.h("span",null,se.i18n.lrc.title),L.h("input",{placeholder:"ti",name:"ti",onBlur:this.updateInfo,value:Ue.info.get("ti")})),L.h("section",{className:"lrc-info-input-section"},L.h("span",null,se.i18n.lrc.artist),L.h("input",{placeholder:"ar",name:"ar",onBlur:this.updateInfo,value:Ue.info.get("ar")})),L.h("section",{className:"lrc-info-input-section"},L.h("span",null,se.i18n.lrc.album),L.h("input",{placeholder:"al",name:"al",onBlur:this.updateInfo,value:Ue.info.get("al")}))),L.h("section",{className:"lrc-textarea-section"},L.h("textarea",{className:"app-textarea",placeholder:"text",onBlur:this.parseText,value:Ue.value,ref:this.textareaRef})),L.h("div",{className:"extra_button_group"},L.h(lt,null)))}})||ct;var ht,pt;let dt=H((function(e,t,n,r,i){var o={};Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null)}((pt=class extends I{constructor(...e){super(...e),this.clearCache=(()=>{localStorage.clear()}),this.onSpaceStartChange=(e=>{const t=e.target;t.validity.valid?se.set_spaceStart(Number.parseInt(t.value,10)):t.value=se.spaceStart}),this.onSpaceEndChange=(e=>{const t=e.target;t.validity.valid?se.set_spaceEnd(Number.parseInt(t.value,10)):t.value=se.spaceEnd})}handleLanguageSelect(e){const t=e.target;se.language=t.value}get updateTime(){const e=new Date("2019-05-18T08:08:19+08:00");return new Intl.DateTimeFormat(se.lang,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short",hour12:!1}).format(e)}render(){return L.h("div",{className:"preferences"},L.h("section",null,L.h("div",{className:"section-group"},L.h("div",null,se.i18n.preferences.language),L.h("div",{className:"lang-select"},L.h("select",{onChange:this.handleLanguageSelect},Object.entries($).map(([e,t])=>L.h("option",{key:e,value:e,selected:se.language===e},t["language-name"])))))),L.h("section",null,L.h("div",{className:"section-group"},L.h("div",null,se.i18n.preferences.version),L.h("div",{className:"select-all"},"3.4.2"))),L.h("section",null,L.h("div",{className:"section-group"},L.h("div",null,se.i18n.preferences["update-time"]),L.h("div",null,this.updateTime))),L.h("section",null,L.h("div",{className:"section-group"},L.h("div",null,se.i18n.preferences.hash),L.h("div",{className:"select-all"},"0cfd8c3"))),L.h("section",null,L.h("div",{className:"section-group"},L.h("div",null,se.i18n.preferences["github-repo"]),L.h("a",{href:"https://github.com/magic-akari/lrc-maker",target:"_blank"},"Github"))),L.h("section",null,L.h("div",{className:"section-group"},L.h("div",null,se.i18n.preferences.help),L.h("a",{href:"https://github.com/magic-akari/lrc-maker/wiki",target:"_blank"},"Github Wiki"))),L.h("section",null,L.h("div",{className:"section-group"},L.h("div",null,se.i18n.preferences["time-tag-decimals"]),L.h("div",{class:"stepper"},L.h("button",{class:"addOnLeft",onClick:se.minus_fixed},"-"),L.h("input",{type:"text",value:se.fixed}),L.h("button",{class:"addOnRight",onClick:se.add_fixed},"+")))),L.h("section",null,L.h("label",{className:"section-group"},L.h("label",{htmlFor:"space-start"},se.i18n.preferences["left-space"]),L.h("input",{name:"spaceStart",id:"space-start",required:!0,min:"-1",type:"number",step:"1",value:se.spaceStart,onChange:this.onSpaceStartChange}))),L.h("section",null,L.h("label",{className:"section-group"},L.h("label",{htmlFor:"space-end"},se.i18n.preferences["right-space"]),L.h("input",{name:"spaceEnd",id:"space-end",required:!0,min:"-1",type:"number",step:"1",value:se.spaceEnd,onChange:this.onSpaceEndChange}))),L.h("section",null,L.h("label",{className:"section-group"},L.h("div",null,se.i18n.preferences["built-in-audio"]),L.h("label",{class:"label-switch"},L.h("input",{type:"checkbox",checked:se.builtInAudio,onChange:se.toggle_audio_player}),L.h("div",{class:"checkbox"})))),L.h("section",null,L.h("label",{className:"section-group"},L.h("div",null,se.i18n.preferences["space-button-on-screen"]),L.h("label",{class:"label-switch"},L.h("input",{type:"checkbox",checked:se.screenButton,onChange:se.toggle_screen_button}),L.h("div",{class:"checkbox"})))),L.h("section",null,L.h("label",{className:"section-group"},L.h("div",null,se.i18n.preferences["dark-mode"]),L.h("label",{class:"label-switch"},L.h("input",{type:"checkbox",checked:se.darkMode,onChange:se.toggle_dark_mode}),L.h("div",{class:"checkbox"})))),L.h("section",null,L.h("div",{className:"section-group"},L.h("button",{onClick:this.clearCache},se.i18n.preferences["clear-cache"]))))}}).prototype,"updateTime",[r.d],Object.getOwnPropertyDescriptor(pt.prototype,"updateTime"),pt.prototype),ht=pt))||ht;var ft,vt=n(1);let mt=H(ft=class extends I{render(){let e=["locknodebutton","iconbutton"];return Te.lock&&e.push("locked"),L.h("button",{tabIndex:"-1",className:e.join(" "),onClick:Te.toggle_lock},Te.lock?L.h(Qe,null):L.h(Ze,null))}})||ft;var bt,yt,gt,wt;function _t(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}let xt=H(bt=class extends I{render(){return L.h("span",{className:"current-time-tag"},Ne(Te.currentTime_fixed,se.fixed)+"➤")}})||bt;const Ot=(e,t,n)=>(document.addEventListener(e,t,n),()=>document.removeEventListener(e,t,n));let kt=(yt=r.b.bound,H((_t((wt=class extends I{get trackNode(){const e=Te.lock?Ue.highlightIndex:Ue.selectedIndex;return this.base.children[e]}constructor(e){super(e)}componentDidMount(){const e="scrollBehavior"in document.documentElement.style?(e,t)=>e.scrollIntoView(t):vt.elementScrollIntoView;this.disposers=[Object(r.c)(()=>{this.trackNode&&e(this.trackNode,{behavior:"smooth",block:"center",inline:"nearest"})}),Ot("keydown",e=>{if(["Backspace","Delete"].includes(e.code)||["Backspace","Delete","Del"].includes(e.key))return e.preventDefault(),void this.deleteTimestamp();!0!==e.metaKey&&!0!==e.ctrlKey&&("Space"===e.code||" "===e.key||"Spacebar"===e.key?(e.preventDefault(),St()):["ArrowUp","KeyW","KeyJ"].includes(e.code)||["ArrowUp","Up","W","w","J","j"].includes(e.key)?(e.preventDefault(),this.changeSelect(-1)):["ArrowDown","KeyS","KeyK"].includes(e.code)||["ArrowDown","Down","S","s","K","k"].includes(e.key)?(e.preventDefault(),this.changeSelect(1)):"Home"===e.code||"Home"===e.key?(e.preventDefault(),this.changeSelect(-1e3)):"End"===e.code||"End"===e.key?(e.preventDefault(),this.changeSelect(1e3)):"PageUp"===e.code||"PageUp"===e.key?(e.preventDefault(),this.changeSelect(-10)):"PageDown"!==e.code&&"PageDown"!==e.key||(e.preventDefault(),this.changeSelect(10)))},{capture:!0})]}componentWillUnmount(){this.disposers.forEach(e=>e())}deleteTimestamp(){let e=Ue.selectedIndex;Ue.lyric[e].time=void 0}changeSelect(e){Ue.selectedIndex+=e}selectLine(e){let{key:t}=e.target.dataset;if(!t)return!0;Ue.selectedIndex=Number(t)}render(){return L.h("ul",{className:"lyric-list",onClick:this.selectLine},Ue.lyric.map((e,t)=>{const n=["lyric-line"];t===Ue.highlightIndex&&n.push("highlight"),t===Ue.selectedIndex&&n.push("select");let r=Math.max(t-1,0),i=Ue.lyric[r].time;i&&i>e.time&&n.push("error");const o=e.time,a=void 0===o?null:L.h("span",{className:"lyric-time"},Ne(o,se.fixed));return L.h("li",{className:n.join(" "),"data-key":t,key:t},t==Ue.selectedIndex?L.h(xt,null):null,L.h("p",{className:"lyric"},a,L.h("span",{class:"lyric-text"},Ee(e.text,se.spaceStart,se.spaceEnd))))}))}}).prototype,"trackNode",[r.d],Object.getOwnPropertyDescriptor(wt.prototype,"trackNode"),wt.prototype),_t(wt.prototype,"deleteTimestamp",[r.b],Object.getOwnPropertyDescriptor(wt.prototype,"deleteTimestamp"),wt.prototype),_t(wt.prototype,"changeSelect",[r.b],Object.getOwnPropertyDescriptor(wt.prototype,"changeSelect"),wt.prototype),_t(wt.prototype,"selectLine",[yt],Object.getOwnPropertyDescriptor(wt.prototype,"selectLine"),wt.prototype),gt=wt))||gt);const St=Object(r.b)(()=>{if(Ue.lyric.length>0){let e=Ue.selectedIndex;Ue.lyric[e].time=Te.currentTime,Ue.selectedIndex+=1}}),Tt=()=>L.h("div",{className:"synchronizer"},L.h(kt,null),L.h("div",{className:"extra_button_group"},L.h(mt,null),L.h(lt,null)));var jt;let Nt=H(jt=class extends I{match(){switch(ye.path){case"":case he.editor.path:return L.h(ut,null);case he.synchronizer.path:return L.h(Tt,null);case he.preferences.path:return L.h(dt,null)}return(()=>L.h("div",{className:"not_found"},L.h("header",null,"404"),L.h("p",null,"您要找的页面因为存在感太低而消失。"),L.h("p",null,"The page you were looking for has gone."),L.h("p",null,"アッカリ~ン")))()}render(){return L.h("div",{className:"app-content"},this.match())}})||jt;var Et,At,zt,Ct,Dt,Pt,Mt,It,Rt,Vt,Lt,Bt,Ut,Ht;function $t(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Gt(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}const Wt=({min:e,max:t,step:n,value:r,onInput:i,className:o})=>{const a=(r-e)/(t-e||1);return L.h("div",{className:`slider ${o}-slider`},L.h("progress",{min:0,max:1,value:a}),L.h("input",{type:"range",tabIndex:-1,className:o,min:e,max:t,step:n,value:r,onInput:i,onChange:i}))};let Kt=(Et=r.b.bound,H((Ct=Gt((zt=class e extends I{constructor(...e){super(...e),$t(this,"duration",Ct,this),$t(this,"_currentTime",Dt,this),$t(this,"paused",Pt,this),$t(this,"volume",Mt,this),$t(this,"_playbackRate",It,this),$t(this,"muted",Rt,this),this.audioRef={},this.handler=0,$t(this,"onLoadedMetadata",Vt,this),$t(this,"onPlay",Lt,this),$t(this,"onPause",Bt,this),$t(this,"onVolumeChange",Ut,this),this.onTimeUpdate=(()=>{this.paused&&this.syncTime()}),$t(this,"onRateChange",Ht,this),this.replay5s=(()=>{this.audio.currentTime-=5}),this.forward5s=(()=>{this.audio.currentTime+=5}),this.play=(()=>{this.audio.play()}),this.pause=(()=>{this.audio.pause()}),this.togglePlayPause=(()=>{this.paused?this.play():this.pause()}),this.handleTimeSelect=(e=>{this.audio.currentTime=e.target.value}),this.handlePlaybackRateChange=(e=>{this.audio.playbackRate=Math.exp(e.target.value)}),this.handlePlaybackRateReset=(()=>{this.audio.playbackRate=1}),this.handleVolumeChange=(e=>{const t=e.target.value;this.audio.muted=0===t,this.audio.volume=t}),this.toggleMuted=(()=>{this.audio.muted=!this.audio.muted})}get audio(){return this.audioRef.current}componentDidMount(){this.audio.volume=parseFloat(sessionStorage.getItem("lrc-maker-volume"))||1,this.playbackRate=parseFloat(sessionStorage.getItem("lrc-maker-playbackRate"))||1,this.audio.muted="true"==sessionStorage.getItem("lrc-maker-muted"),window.addEventListener("beforeunload",()=>{sessionStorage.setItem("lrc-maker-volume",this.volume),sessionStorage.setItem("lrc-maker-playbackRate",this._playbackRate),sessionStorage.setItem("lrc-maker-muted",this.muted)})}set currentTime(e){this.audio.currentTime=e}get currentTime(){return this._currentTime}set playbackRate(e){this.audio.playbackRate=e}get playbackRate(){return this._playbackRate}set playbackRate_exp(e){this.playbackRate=Math.exp(e)}get playbackRate_exp(){return Math.log(this.playbackRate)}get currentTime_int(){return~~this.currentTime}syncTime(){this._currentTime=this.audio.currentTime,this.props.onTimeUpdate({target:this}),this.paused||(this.handler=requestAnimationFrame(this.syncTime))}static timeToTag(e){let t=~~(e/60),n=~~(e%60);return`${t=(""+t).padStart(2,"0")}:${n=(""+n).padStart(2,"0")}`}get timeTag(){return L.h("span",null,e.timeToTag(this.currentTime_int),0===this.duration?null:" / "+e.timeToTag(this.duration))}get timelineSection(){return this.props.controls?null:L.h("section",{className:"time-line-section"+(this.paused?"":" playing")},L.h("button",{tabIndex:"-1",className:"replay5s",onClick:this.replay5s,disabled:this.currentTime_int<=0},L.h(Ke,null)),L.h("button",{tabIndex:"-1",disabled:!this.duration,onClick:this.togglePlayPause},this.paused?L.h(He,null):L.h($e,null)),L.h("button",{tabIndex:"-1",className:"forward5s",onClick:this.forward5s,disabled:this.currentTime_int>=this.duration},L.h(Fe,null)),this.timeTag,L.h(Wt,{min:0,max:this.duration,step:"1",value:this.currentTime_int,onInput:this.handleTimeSelect,className:"time-line"}))}get audioextraSection(){return this.props.controls?null:L.h("section",{className:"audio-extra-section"},L.h("button",{tabIndex:"-1",onClick:this.handlePlaybackRateReset},"X ",this.playbackRate.toFixed(2)),L.h(Wt,{className:"playbackrate",min:-1,max:1,step:"any",value:this.playbackRate_exp,onInput:this.handlePlaybackRateChang}),L.h("button",{tabIndex:"-1",onClick:this.toggleMuted},this.muted||0===this.volume?L.h(We,null):L.h(Ge,null)),L.h(Wt,{min:0,max:1,step:"any",value:this.muted?0:this.volume,onInput:this.handleVolumeChange,className:"volume-slider"}))}render(){return L.h("div",{className:this.props.className},L.h("audio",{hidden:!this.props.controls,controls:this.props.controls,src:this.props.src,ref:this.audioRef,onLoadedMetadata:this.onLoadedMetadata,onPlay:this.onPlay,onPause:this.onPause,onEnded:this.onPause,onTimeUpdate:this.onTimeUpdate,onVolumeChange:this.onVolumeChange,onRateChange:this.onRateChange}),this.timelineSection,this.audioextraSection)}}).prototype,"duration",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Dt=Gt(zt.prototype,"_currentTime",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Pt=Gt(zt.prototype,"paused",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Mt=Gt(zt.prototype,"volume",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),It=Gt(zt.prototype,"_playbackRate",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Rt=Gt(zt.prototype,"muted",[r.f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gt(zt.prototype,"playbackRate_exp",[r.d],Object.getOwnPropertyDescriptor(zt.prototype,"playbackRate_exp"),zt.prototype),Gt(zt.prototype,"currentTime_int",[r.d],Object.getOwnPropertyDescriptor(zt.prototype,"currentTime_int"),zt.prototype),Gt(zt.prototype,"syncTime",[Et],Object.getOwnPropertyDescriptor(zt.prototype,"syncTime"),zt.prototype),Gt(zt.prototype,"timeTag",[r.d],Object.getOwnPropertyDescriptor(zt.prototype,"timeTag"),zt.prototype),Vt=Gt(zt.prototype,"onLoadedMetadata",[r.b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{this.duration=e.target.duration,this.paused=e.target.paused}}}),Lt=Gt(zt.prototype,"onPlay",[r.b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{this.paused=e.target.paused,this.syncTime()}}}),Bt=Gt(zt.prototype,"onPause",[r.b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{this.paused=e.target.paused,cancelAnimationFrame(this.handler)}}}),Ut=Gt(zt.prototype,"onVolumeChange",[r.b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{this.volume=e.target.volume,this.muted=e.target.muted}}}),Ht=Gt(zt.prototype,"onRateChange",[r.b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return e=>{this._playbackRate=e.target.playbackRate}}}),At=zt))||At);var Ft;let Jt=H(Ft=class extends I{render(){return se.screenButton&&ye.path===he.synchronizer.path?L.h("button",{onClick:St,className:"space_button"},"space"):null}})||Ft;var Xt;let qt=H(Xt=class extends I{componentDidMount(){document.addEventListener("visibilitychange",()=>{document.hidden&&(this.audio.pause(),Ue.save())},!1),window.addEventListener("beforeunload",()=>{Ue.save()}),document.addEventListener("keydown",e=>{if(!["text","textarea"].includes(e.target.type))if(!0===e.metaKey||!0===e.ctrlKey){if(["ArrowUp","KeyJ"].includes(e.code)||["ArrowUp","Up","J","j"].includes(e.key)){e.preventDefault();const t=this.audio.playbackRate,n=Math.exp(Math.min(Math.log(t)+.2,1));this.audio.playbackRate=n}else if(["ArrowDown","KeyK"].includes(e.code)||["ArrowDown","Down","K","k"].includes(e.key)){e.preventDefault();const t=this.audio.playbackRate,n=Math.exp(Math.max(Math.log(t)-.2,-1));this.audio.playbackRate=n}else if("Enter"===e.code||"Enter"===e.key)e.preventDefault(),this.audio.paused?this.audio.play():this.audio.pause();else if(!0===e.shiftKey&&("KeyP"===e.code||"P"===e.key||"p"===e.key)){e.preventDefault();let t=prompt("Input the audio source url.",Te.src);t&&(Te.src=t)}}else["ArrowLeft","KeyA"].includes(e.code)||["ArrowLeft","Left","A","a"].includes(e.key)?(e.preventDefault(),this.audio.currentTime-=5):["ArrowRight","KeyD"].includes(e.code)||["ArrowRight","Right","D","d"].includes(e.key)?(e.preventDefault(),this.audio.currentTime+=5):"KeyR"!==e.code&&"R"!==e.key&&"r"!==e.key||(e.preventDefault(),this.audio.playbackRate=1)},{capture:!0});let e=location.search.slice(1).split("&").reduce((e,t)=>{let[n,r]=t.split("=");return Object.assign(e,{[n]:decodeURIComponent(r)})},{});void 0!==e.audioSrc&&(Te.src=e.audioSrc)}render(){return L.h("footer",{className:"app-footer"},L.h(Jt,null),L.h(Kt,{className:"app-audio",controls:se.builtInAudio,ref:e=>{this.audio=e},src:Te.src,onTimeUpdate:e=>{Te.currentTime=e.target.currentTime}}))}})||Xt;var Yt;let Zt=H(Yt=class extends I{render(){return L.h("header",{className:"app-header"},L.h("div",{className:"wrapper"},L.h("span",{className:"app-title"},se.i18n.app.name),L.h("nav",{className:"app-nav"},L.h("a",{href:he.editor.path,className:(()=>ye.path===he.editor.path?"active":ye.path===he.synchronizer.path&&0===Ue.lyric.length?"showtip":void 0)(),title:he.editor.title},L.h(Xe,null),L.h("span",{className:"option"},he.editor.name)),L.h("a",{href:he.synchronizer.path,className:ye.path===he.synchronizer.path?"active":"",title:he.synchronizer.title},L.h(qe,null),L.h("span",{className:"option"},he.synchronizer.name)),L.h("a",{href:he.preferences.path,className:ye.path===he.preferences.path?"active":"",title:he.preferences.title},L.h(Je,null),L.h("span",{className:"option"},he.preferences.name)))))}})||Yt;const Qt=()=>L.h("div",{className:"loading-page"},L.h("p",null,"Loading",L.h("span",{className:"dot"},"...")),L.h("div",{className:"loading"}));var en;Object(r.e)({enforceActions:"always"}),Object(r.c)(()=>document.title=se.i18n.app.fullname),Object(r.c)(()=>{se.darkMode?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}),(en=String.prototype).trimStart||(en.trimStart=en.trimLeft||function(){return this.replace(/^\s+/,"")}),en.trimEnd||(en.trimEnd=en.trimRight||function(){return this.replace(/\s+$/,"")}),R(l(({loading:e})=>L.h("main",{className:"app"},L.h(Zt,null),e?L.h(Qt,null):L.h(Nt,null),L.h(qt,null)),{loading:!1}),document.body,document.body.firstElementChild),document.body.addEventListener("dragover",e=>(e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy",!1),!1),document.body.addEventListener("drop",Object(r.b)(e=>{e.stopPropagation(),e.preventDefault();let t=e.dataTransfer.files[0];if(t)if(/^audio\//.test(t.type))Te.src=t;else if(/^text\//.test(t.type)||/(?:\.lrc|\.txt)$/i.test(t.name)){let e=new FileReader;e.onload=(e=>{Ue.value=e.target.result,location.hash=he.editor.path}),e.readAsText(t)}return!1}),!1)}]);
//# sourceMappingURL=app.js.map