1var Gitment=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}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get: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=5)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.LS_ACCESS_TOKEN_KEY="gitment-comments-token",t.LS_USER_KEY="gitment-user-info",t.NOT_INITIALIZED_ERROR=new Error("Comments Not Initialized")},function(e,t,n){"use strict";(function(n){var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=(r=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(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.extras={allowStateChanges:function(e,t){var n,r=D(e);try{n=t()}finally{N(r)}return n},deepEqual:Wt,getAtom:pt,getDebugName:mt,getDependencyTree:function(e,t){return w(pt(e,t))},getAdministration:ft,getGlobalState:function(){return re},getObserverTree:function(e,t){return _(pt(e,t))},isComputingDerivation:W,isSpyEnabled:be,onReactionError:function(e){return re.globalReactionErrorHandlers.push(e),function(){var t=re.globalReactionErrorHandlers.indexOf(e);t>=0&&re.globalReactionErrorHandlers.splice(t,1)}},resetGlobalState:function(){re.resetId++;var e=new ne;for(var t in e)-1===te.indexOf(t)&&(re[t]=e[t]);re.allowStateChanges=!re.strictMode},shareGlobalState:function(){var e=At(),t=re;if(e.__mobservableTrackingStack||e.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(e.__mobxGlobal&&e.__mobxGlobal.version!==t.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");e.__mobxGlobal?re=e.__mobxGlobal:e.__mobxGlobal=t},spyReport:ye,spyReportEnd:xe,spyReportStart:we,setReactionScheduler:function(e){var t=fe;fe=function(n){return e(function(){return t(n)})}}},"object"===("undefined"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__?"undefined":i(__MOBX_DEVTOOLS_GLOBAL_HOOK__))&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx(e.exports),e.exports.default=e.exports;var a=vt(function(e,t,n,r,i){var o=r&&1===r.length?r[0]:n.name||t||"<unnamed action>";Ut(e,t,u(o,n))},function(e){return this[e]},function(){It(!1,Ot("m001"))},!1,!0),s=vt(function(e,t,n){h(e,t,n)},function(e){return this[e]},function(){It(!1,Ot("m001"))},!1,!1),u=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?P(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?P(e,t):1===arguments.length&&"string"==typeof e?c(e):c(t).apply(null,arguments)};function c(e){return function(t,n,r){return r&&"function"==typeof r.value?(r.value=P(e,r.value),r.enumerable=!1,r.configurable=!0,r):a(e).apply(this,arguments)}}function l(e){return"function"==typeof e&&!0===e.isMobxAction}function h(e,t,n){var r=function(){return M(t,n,e,arguments)};r.isMobxAction=!0,Ut(e,t,r)}function d(e,t,n){var r,i,o;"string"==typeof e?(r=e,i=t,o=n):(r=e.name||"Autorun@"+Et(),i=e,o=t),It("function"==typeof i,Ot("m004")),It(!1===l(i),Ot("m005")),o&&(i=i.bind(o));var a=new he(r,function(){this.track(s)});function s(){i(a)}return a.schedule(),a.getDisposer()}function p(e){return vt(function(t,n,r,i,o){It(void 0!==o,Ot("m009")),It("function"==typeof o.get,Ot("m010")),rt(et(t,""),n,o.get,o.set,e,!1)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){this.$mobx.values[e].set(t)},!1,!1)}t.action=u,u.bound=function(e,t,n){if("function"==typeof e){var r=P("<not yet bound action>",e);return r.autoBind=!0,r}return s.apply(null,arguments)},t.runInAction=function(e,t,n){var r="string"==typeof e?e:e.name||"<unnamed action>",i="function"==typeof e?e:t,o="function"==typeof e?t:n;return It("function"==typeof i,Ot("m002")),It(0===i.length,Ot("m003")),It("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),M(r,i,o,void 0)},t.isAction=l,t.autorun=d,t.when=function(e,t,n,r){var i,o,a,s;return"string"==typeof e?(i=e,o=t,a=n,s=r):(i="When@"+Et(),o=e,a=t,s=n),d(i,function(e){if(o.call(s)){e.dispose();var t=Q();a.call(s),Z(t)}})},t.autorunAsync=function(e,t,n,r){var i,o,a,s;"string"==typeof e?(i=e,o=t,a=n,s=r):(i=e.name||"AutorunAsync@"+Et(),o=e,a=t,s=n),It(!1===l(o),Ot("m006")),void 0===a&&(a=1),s&&(o=o.bind(s));var u=!1,c=new he(i,function(){u||(u=!0,setTimeout(function(){u=!1,c.isDisposed||c.track(h)},a))});function h(){o(c)}return c.schedule(),c.getDisposer()},t.reaction=function(e,t,n){var r;arguments.length>3&&Tt(Ot("m007")),Ie(e)&&Tt(Ot("m008")),(r="object"===(void 0===n?"undefined":i(n))?n:{}).name=r.name||e.name||t.name||"Reaction@"+Et(),r.fireImmediately=!0===n||!0===r.fireImmediately,r.delay=r.delay||0,r.compareStructural=r.compareStructural||r.struct||!1,t=u(r.name,r.context?t.bind(r.context):t),r.context&&(e=e.bind(r.context));var o,a=!0,s=!1,c=new he(r.name,function(){a||r.delay<1?l():s||(s=!0,setTimeout(function(){s=!1,l()},r.delay))});function l(){if(!c.isDisposed){var n=!1;c.track(function(){var t=e(c);n=zt(r.compareStructural,o,t),o=t}),a&&r.fireImmediately&&t(o,c),a||!0!==n||t(o,c),a&&(a=!1)}}return c.schedule(),c.getDisposer()};var f=p(!1),m=p(!0),v=function(e,t,n){if("string"==typeof t)return f.apply(null,arguments);It("function"==typeof e,Ot("m011")),It(arguments.length<3,Ot("m012"));var r="object"===(void 0===t?"undefined":i(t))?t:{};return r.setter="function"==typeof t?t:r.setter,new B(e,r.context,r.compareStructural||r.struct||!1,r.name||e.name||"",r.setter)};function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return y(e,Ce,t)}function b(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return y(e,Re,t)}function y(e,t,n){It(arguments.length>=2,Ot("m014")),It("object"===(void 0===e?"undefined":i(e)),Ot("m015")),It(!Qe(e),Ot("m016")),n.forEac
1h(function(e){It("object"===(void 0===e?"undefined":i(e)),Ot("m017")),It(!x(e),Ot("m018"))});for(var r=et(e),o={},a=n.length-1;a>=0;a--){var s=n[a];for(var u in s)if(!0!==o[u]&&Bt(s,u)){if(o[u]=!0,e===s&&!Kt(e,u))continue;tt(r,u,Object.getOwnPropertyDescriptor(s,u),t)}}return e}function w(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=Pt(e.observing).map(w)),t}function _(e){var t,n={name:e.name};return(t=e).observers&&t.observers.length>0&&(n.observers=ie(e).map(_)),n}function x(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(Je(e)||Qe(e))throw new Error(Ot("m019"));if(ct(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return ct(e)||!!e.$mobx||$(e)||ge(e)||H(e)}t.computed=v,v.struct=m,t.createTransformer=function(e,t){It("function"==typeof e&&e.length<2,"createTransformer expects a function that accepts one argument");var n={},r=re.resetId,a=function(r){function i(t,n){var i=r.call(this,function(){return e(n)},void 0,!1,"Transformer-"+e.name+"-"+t,void 0)||this;return i.sourceIdentifier=t,i.sourceObject=n,i}return o(i,r),i.prototype.onBecomeUnobserved=function(){var e=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},i}(B);return function(e){r!==re.resetId&&(n={},r=re.resetId);var t=function(e){if(null===e||"object"!==(void 0===e?"undefined":i(e)))throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=Et(),Ut(e,"$transformId",t)),t}(e),o=n[t];return o?o.get():(o=n[t]=new a(t,e)).get()}},t.expr=function(e,t){return W()||console.warn(Ot("m013")),v(e,{context:t}).get()},t.extendObservable=g,t.extendShallowObservable=b,t.intercept=function(e,t,n){return"function"==typeof n?function(e,t,n){return ft(e,t).intercept(n)}(e,t,n):function(e,t){return ft(e).intercept(t)}(e,t)},t.isComputed=function(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(!1===ct(e))return!1;var n=pt(e,t);return H(n)}return H(e)},t.isObservable=x;var S=C(Ce),O=C(je),k=C(Re),A=C(Pe),E=C(Me);var T=function(){function e(){}return e.prototype.box=function(e,t){return arguments.length>2&&L("box"),new ht(e,Ce,t)},e.prototype.shallowBox=function(e,t){return arguments.length>2&&L("shallowBox"),new ht(e,Re,t)},e.prototype.array=function(e,t){return arguments.length>2&&L("array"),new Ue(e,Ce,t)},e.prototype.shallowArray=function(e,t){return arguments.length>2&&L("shallowArray"),new Ue(e,Re,t)},e.prototype.map=function(e,t){return arguments.length>2&&L("map"),new Xe(e,Ce,t)},e.prototype.shallowMap=function(e,t){return arguments.length>2&&L("shallowMap"),new Xe(e,Re,t)},e.prototype.object=function(e,t){arguments.length>2&&L("object");var n={};return et(n,t),g(n,e),n},e.prototype.shallowObject=function(e,t){arguments.length>2&&L("shallowObject");var n={};return et(n,t),b(n,e),n},e.prototype.ref=function(){return arguments.length<2?Le(Re,arguments[0]):k.apply(null,arguments)},e.prototype.shallow=function(){return arguments.length<2?Le(je,arguments[0]):O.apply(null,arguments)},e.prototype.deep=function(){return arguments.length<2?Le(Ce,arguments[0]):S.apply(null,arguments)},e.prototype.struct=function(){return arguments.length<2?Le(Pe,arguments[0]):A.apply(null,arguments)},e}();t.IObservableFactories=T;var I=function(e){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return S.apply(null,arguments);if(It(arguments.length<=1,Ot("m021")),It(!Ie(e),Ot("m020")),x(e))return e;var t=Ce(e,void 0,void 0);return t!==e?t:I.box(e)};function L(e){Tt("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}function C(e){return It(!!e,":("),vt(function(t,n,r,i,o){Gt(t,n),It(!o||!o.get,Ot("m022")),nt(et(t,void 0),n,r,e)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){st(this,e,t)},!0,!1)}function j(e,t){return void 0===t&&(t=void 0),M("",e)}function R(e){return console.log(e),e}function P(e,t){It("function"==typeof t,Ot("m026")),It("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var n=function(){return M(e,t,this,arguments)};return n.originalFn=t,n.isMobxAction=!0,n}function M(e,t,n,r){var i=function(e,t,n,r){var i=be()&&!!e,o=0;if(i){o=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var u=0;u<a;u++)s[u]=r[u];we({type:"action",name:e,fn:t,object:n,arguments:s})}var c=Q();ue();var l=D(!0);return{prevDerivation:c,prevAllowStateChanges:l,notifySpy:i,startTime:o}}(e,t,n,r);try{return t.apply(n,r)}finally{!function(e){N(e.prevAllowStateChanges),ce(),Z(e.prevDerivation),e.notifySpy&&xe({time:Date.now()-e.startTime})}(i)}}function D(e){var t=re.allowStateChanges;return re.allowStateChanges=e,t}function N(e){re.allowStateChanges=e}t.observable=I,Object.keys(T.prototype).forEach(function(e){return I[e]=T.prototype[e]}),I.deep.struct=I.struct,I.ref.struct=function(){return arguments.length<2?Le(Me,arguments[0]):E.apply(null,arguments)},t.observe=function(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return ft(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return ft(e).observe(t,n)}
1(e,t,n)},t.toJS=function e(t,n,r){function o(e){return n&&r.push([t,e]),e}if(void 0===n&&(n=!0),void 0===r&&(r=[]),x(t)){if(n&&null===r&&(r=[]),n&&null!==t&&"object"===(void 0===t?"undefined":i(t)))for(var a=0,s=r.length;a<s;a++)if(r[a][0]===t)return r[a][1];if(Je(t)){var u=o([]),c=t.map(function(t){return e(t,n,r)});for(u.length=c.length,a=0,s=c.length;a<s;a++)u[a]=c[a];return u}if(ct(t)){for(var l in u=o({}),t)u[l]=e(t[l],n,r);return u}if(Qe(t)){var h=o({});return t.forEach(function(t,i){return h[i]=e(t,n,r)}),h}if(dt(t))return e(t.get(),n,r)}return t},t.transaction=function(e,t){return void 0===t&&(t=void 0),Ct(Ot("m023")),j.apply(void 0,arguments)},t.whyRun=function(e,t){switch(arguments.length){case 0:if(!(e=re.trackingDerivation))return R(Ot("m024"));break;case 2:e=pt(e,t)}return e=pt(e),H(e)?R(e.whyRun()):ge(e)?R(e.whyRun()):Tt(Ot("m025"))},t.useStrict=function(e){It(null===re.trackingDerivation,Ot("m028")),re.strictMode=e,re.allowStateChanges=!e},t.isStrictModeEnabled=function(){return re.strictMode};var V=function(){function e(e){void 0===e&&(e="Atom@"+Et()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=U.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){le(this)},e.prototype.reportChanged=function(){ue(),function(e){if(e.lowestObserverState===U.STALE)return;e.lowestObserverState=U.STALE;var t=e.observers,n=t.length;for(;n--;){var r=t[n];r.dependenciesState===U.UP_TO_DATE&&r.onBecomeStale(),r.dependenciesState=U.STALE}}(this),ce()},e.prototype.toString=function(){return this.name},e}();t.BaseAtom=V;var z=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+Et()),void 0===n&&(n=Rt),void 0===r&&(r=Rt);var i=e.call(this,t)||this;return i.name=t,i.onBecomeObservedHandler=n,i.onBecomeUnobservedHandler=r,i.isPendingUnobservation=!1,i.isBeingTracked=!1,i}return o(t,e),t.prototype.reportObserved=function(){return ue(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),ce(),!!re.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(V);t.Atom=z;var $=qt("Atom",V),B=function(){function e(e,t,n,r,i){this.derivation=e,this.scope=t,this.compareStructural=n,this.dependenciesState=U.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=U.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+Et(),this.value=void 0,this.isComputing=!1,this.isRunningSetter=!1,this.name=r||"ComputedValue@"+Et(),i&&(this.setter=P(r+"-setter",i))}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState!==U.UP_TO_DATE)return;e.lowestObserverState=U.POSSIBLY_STALE;var t=e.observers,n=t.length;for(;n--;){var r=t[n];r.dependenciesState===U.UP_TO_DATE&&(r.dependenciesState=U.POSSIBLY_STALE,r.onBecomeStale())}}(this)},e.prototype.onBecomeUnobserved=function(){It(this.dependenciesState!==U.NOT_TRACKING,Ot("m029")),F(this),this.value=void 0},e.prototype.get=function(){It(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),0===re.inBatch?(ue(),Y(this)&&(this.value=this.computeValue(!1)),ce()):(le(this),Y(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState===U.STALE)return;e.lowestObserverState=U.STALE;var t=e.observers,n=t.length;for(;n--;){var r=t[n];r.dependenciesState===U.POSSIBLY_STALE?r.dependenciesState=U.STALE:r.dependenciesState===U.UP_TO_DATE&&(e.lowestObserverState=U.UP_TO_DATE)}}(this));var e=this.value;if(G(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(G(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){It(!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 It(!1,"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")}
1,e.prototype.trackAndCompute=function(){be()&&ye({object:this.scope,type:"compute",fn:this.derivation});var e=this.value,t=this.value=this.computeValue(!0);return G(t)||zt(this.compareStructural,t,e)},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,re.computationDepth++,e)t=J(this,this.derivation,this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new K(e)}return re.computationDepth--,this.isComputing=!1,t},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return d(function(){var o=n.get();if(!r||t){var a=Q();e({type:"update",object:n,newValue:o,oldValue:i}),Z(a)}r=!1,i=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return Zt(this.get())},e.prototype.whyRun=function(){var e=Boolean(re.trackingDerivation),t=Pt(this.isComputing?this.newObserving:this.observing).map(function(e){return e.name}),n=Pt(ie(this).map(function(e){return e.name}));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(e?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===U.NOT_TRACKING?Ot("m032"):" * This computation will re-run if any of the following observables changes:\n "+Mt(t)+"\n "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n\t"+Ot("m038")+"\n\n * If the outcome of this computation changes, the following observers will be re-run:\n "+Mt(n)+"\n")},e}();B.prototype[Qt()]=B.prototype.valueOf;var U,H=qt("ComputedValue",B);!function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(U||(U={})),t.IDerivationState=U;var K=function(){return function(e){this.cause=e}}();function G(e){return e instanceof K}function Y(e){switch(e.dependenciesState){case U.UP_TO_DATE:return!1;case U.NOT_TRACKING:case U.STALE:return!0;case U.POSSIBLY_STALE:for(var t=Q(),n=e.observing,r=n.length,i=0;i<r;i++){var o=n[i];if(H(o)){try{o.get()}catch(e){return Z(t),!0}if(e.dependenciesState===U.STALE)return Z(t),!0}}return ee(e),Z(t),!1}}function W(){return null!==re.trackingDerivation}function q(e){var t=e.observers.length>0;re.computationDepth>0&&t&&Tt(Ot("m031")+e.name),!re.allowStateChanges&&t&&Tt(Ot(re.strictMode?"m030a":"m030b")+e.name)}function J(e,t,n){ee(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++re.runId;var r,i=re.trackingDerivation;re.trackingDerivation=e;try{r=t.call(n)}catch(e){r=new K(e)}return re.trackingDerivation=i,function(e){var t=e.observing,n=e.observing=e.newObserving;e.newObserving=null;for(var r=0,i=e.unboundDepsCount,o=0;o<i;o++){var a=n[o];0===a.diffValue&&(a.diffValue=1,r!==o&&(n[r]=a),r++)}n.length=r,i=t.length;for(;i--;){var a=t[i];0===a.diffValue&&ae(a,e),a.diffValue=0}for(;r--;){var a=n[r];1===a.diffValue&&(a.diffValue=0,oe(a,e))}}(e),r}function F(e){for(var t=e.observing,n=t.length;n--;)ae(t[n],e);e.dependenciesState=U.NOT_TRACKING,t.length=0}function X(e){var t=Q(),n=e();return Z(t),n}function Q(){var e=re.trackingDerivation;return re.trackingDerivation=null,e}function Z(e){re.trackingDerivation=e}function ee(e){if(e.dependenciesState!==U.UP_TO_DATE){e.dependenciesState=U.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=U.UP_TO_DATE}}t.untracked=X;var te=["mobxGuid","resetId","spyListeners","strictMode","runId"],ne=function(){return function(){this.version=5,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.strictMode=!1,this.resetId=0,this.spyListeners=[],this.globalReactionErrorHandlers=[]}}(),re=new ne;function ie(e){return e.observers}function oe(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 ae(e,t){if(1===e.observers.length)e.observers.length=0,se(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 se(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,re.pendingUnobservations.push(e))}function ue(){re.inBatch++}
1function ce(){if(0==--re.inBatch){me();for(var e=re.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.length&&n.onBecomeUnobserved()}re.pendingUnobservations=[]}}function le(e){var t=re.trackingDerivation;null!==t?t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e):0===e.observers.length&&se(e)}var he=function(){function e(e,t){void 0===e&&(e="Reaction@"+Et()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=U.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+Et(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,re.pendingReactions.push(this),me())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(ue(),this._isScheduled=!1,Y(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&be()&&ye({object:this,type:"scheduled-reaction"})),ce())},e.prototype.track=function(e){ue();var t,n=be();n&&(t=Date.now(),we({object:this,type:"reaction",fn:e})),this._isRunning=!0;var r=J(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&F(this),G(r)&&this.reportExceptionInDerivation(r.cause),n&&xe({time:Date.now()-t}),ce()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this,r=Ot("m037");console.error(n||r,e),be()&&ye({type:"error",message:n,error:e,object:this}),re.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(ue(),F(this),ce()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e.onError=de,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=Pt(this._isRunning?this.newObserving:this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+Mt(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\t"+Ot("m038")+"\n"},e}();function de(e){It(this&&this.$mobx&&ge(this.$mobx),"Invalid `this`"),It(!this.$mobx.errorHandler,"Only one onErrorHandler can be registered"),this.$mobx.errorHandler=e}t.Reaction=he;var pe=100,fe=function(e){return e()};function me(){re.inBatch>0||re.isRunningReactions||fe(ve)}function ve(){re.isRunningReactions=!0;for(var e=re.pendingReactions,t=0;e.length>0;){++t===pe&&(console.error("Reaction doesn't converge to a stable state after "+pe+" 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()}re.isRunningReactions=!1}var ge=qt("Reaction",he);function be(){return!!re.spyListeners.length}function ye(e){if(re.spyListeners.length)for(var t=re.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function we(e){ye(Vt({},e,{spyReportStart:!0}))}var _e={spyReportEnd:!0};function xe(e){ye(e?Vt({},e,_e):_e)}function Se(e){return e.interceptors&&e.interceptors.length>0}function Oe(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),jt(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function ke(e,t){var n=Q();try{var r=e.interceptors;if(r)for(var i=0,o=r.length;i<o&&(It(!(t=r[i](t))||t.type,"Intercept handlers should return nothing or a change object"),t);i++);return t}finally{Z(n)}}function Ae(e){return e.changeListeners&&e.changeListeners.length>0}function Ee(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),jt(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Te(e,t){var n=Q(),r=e.changeListeners;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);Z(n)}}function Ie(e){return"object"===(void 0===e?"undefined":i(e))&&null!==e&&!0===e.isMobxModifierDescriptor}function Le(e,t){return It(!Ie(t),"Modifiers cannot be nested"),{isMobxModifierDescriptor:!0,initialValue:t,enhancer:e}}function Ce(e,t,n){return Ie(e)&&Tt("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),x(e)?e:Array.isArray(e)?I.array(e,n):Nt(e)?I.object(e,n):Xt(e)?I.map(e,n):e}function je(e,t,n){return Ie(e)&&Tt("You tried to assign a modifier wrapped value to a collection, please define modifiers when creating the collection, not when modifying it"),void 0===e||null===e?e:ct(e)||Je(e)||Qe(e)?e:Array.isArray(e)?I.shallowArray(e,n):Nt(e)?I.shallowObject(e,n):Xt(e)?I.shallowMap(e,n):Tt("The shallow modifier / decorator can only used in combination with arrays, objects and maps")}function Re(e){return e}function Pe(e,t,n){if(Wt(e,t))return t;if(x(e))return e;if(Array.isArray(e))return new Ue(e,Pe,n);if(Xt(e))return new Xe(e,Pe,n);if(Nt(e)){var r={};return et(r,n),y(r,Pe,[e]),r}return e}function Me(e,t,n){return Wt(e,t)?t:e}t.spy=function(e){return re.spyListeners.push(e),jt(function(){var t=re.spyListeners.indexOf(e);-1!==t&&re.spyListeners.splice(t,1)})},t.asReference=function(e){return Ct("asReference is deprecated, use observable.ref instead"),I.ref(e)},t.asStructure=function(e){return Ct("asStructure is deprecated. Use observable.struct, computed.struct or reaction options instead."),I.struct(e)},t.asFlat=function(e){return Ct("asFlat is deprecated, use observable.shallow instead"),I.shallow(e)},t.asMap=function(e){return Ct("asMap is deprecated, use observable.map or observable.shallowMap instead"),I.map(e||{})},t.isModifierDescriptor=Ie;var De,Ne,Ve=(De=!1,Ne={},Object.defineProperty(Ne,"0",{set:function(){De=!0}}),Object.create(Ne)[0]=1,!1===De),ze=0,$e=function(){return function(){}}();$e.prototype=[];var Be=function(){function e(e,t,n,r){this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new V(e||"ObservableArray@"+Et()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.intercept=function(e){return Oe(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}),Ee(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)}
1,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>ze&&We(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var r=this;q(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:void 0===t||null===t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=[]),Se(this)){var o=ke(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!o)return kt;t=o.removedCount,n=o.added}var a=(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),s},e.prototype.spliceItemsIntoValues=function(e,t,n){if(n.length<1e4)return(r=this.values).splice.apply(r,[e,t].concat(n));var r,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&&be(),i=Ae(this),o=i||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&we(o),this.atom.reportChanged(),i&&Te(this,o),r&&xe()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&be(),i=Ae(this),o=i||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&we(o),this.atom.reportChanged(),i&&Te(this,o),r&&xe()},e}(),Ue=function(e){function t(t,n,r,i){void 0===r&&(r="ObservableArray@"+Et()),void 0===i&&(i=!1);var o=e.call(this)||this,a=new Be(r,n,o,i);return Ht(o,"$mobx",a),t&&t.length?(a.updateArrayLength(0,t.length),a.values=t.map(function(e){return n(e,void 0,r+"[..]")}),a.notifyArraySplice(0,a.values.slice(),kt)):a.values=[],Ve&&Object.defineProperty(a.array,"0",He),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 Je(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.values},t.prototype.find=function(e,t,n){void 0===n&&(n=0),this.$mobx.atom.reportObserved();for(var r=this.$mobx.values,i=r.length,o=n;o<i;o++)if(e.call(t,r[o],o,this))return r[o]},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(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){this.$mobx.atom.reportObserved();var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=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?i.slice(0,e).concat(i.slice(e+1,t+1),[i[e]],i.slice(t+1)):i.slice(0,t).concat([i[e]],i.slice(t,e),i.slice(e+1)),this.replace(r)}},t.prototype.toString=function(){return this.$mobx.atom.reportObserved(),Array.prototype.toString.apply(this.$mobx.values,arguments)}
1,t.prototype.toLocaleString=function(){return this.$mobx.atom.reportObserved(),Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},t}($e);xt(Ue.prototype,function(){return _t(this.slice())}),function(e,t){for(var n=0;n<t.length;n++)Ut(e,t[n],e[t[n]])}(Ue.prototype,["constructor","intercept","observe","clear","concat","replace","toJS","toJSON","peek","find","splice","spliceWithArray","push","pop","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]),Object.defineProperty(Ue.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];It("function"==typeof t,"Base function not defined on Array prototype: '"+e+"'"),Ut(Ue.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var He={configurable:!0,enumerable:!1,set:Ge(0),get:Ye(0)};function Ke(e){var t=Ge(e),n=Ye(e);Object.defineProperty(Ue.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function Ge(e){return function(t){var n=this.$mobx,r=n.values;if(e<r.length){q(n.atom);var i=r[e];if(Se(n)){var o=ke(n,{type:"update",object:n.array,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])}}}function Ye(e){return function(){var t=this.$mobx;if(t){if(e<t.values.length)return t.atom.reportObserved(),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")}}}function We(e){for(var t=ze;t<e;t++)Ke(t);ze=e}We(1e3);var qe=qt("ObservableArrayAdministration",Be);function Je(e){return Dt(e)&&qe(e.$mobx)}t.isObservableArray=Je;var Fe={},Xe=function(){function e(e,t,n){void 0===t&&(t=Ce),void 0===n&&(n="ObservableMap@"+Et()),this.enhancer=t,this.name=n,this.$mobx=Fe,this._data={},this._hasMap={},this._keys=new Ue(void 0,Re,this.name+".keys()",!0),this.interceptors=null,this.changeListeners=null,this.merge(e)}return e.prototype._has=function(e){return void 0!==this._data[e]},e.prototype.has=function(e){return!!this.isValidKey(e)&&(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(Se(this)){var r=ke(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((this.assertValidKey(e),e=""+e,Se(this))&&!(i=ke(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=be(),r=Ae(this),i=r||n?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return n&&we(i),j(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1),t._data[e].setNewValue(void 0),t._data[e]=void 0}),r&&Te(this,i),n&&xe(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new ht(t,Re,this.name+"."+e+"?",!1),n},e.prototype._updateValue=function(e,t){var n=this._data[e];
1if((t=n.prepareNewValue(t))!==lt){var r=be(),i=Ae(this),o=i||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&we(o),n.setNewValue(t),i&&Te(this,o),r&&xe()}},e.prototype._addValue=function(e,t){var n=this;j(function(){var r=n._data[e]=new ht(t,n.enhancer,n.name+"."+e,!1);t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)});var r=be(),i=Ae(this),o=i||r?{type:"add",object:this,name:e,newValue:t}:null;r&&we(o),i&&Te(this,o),r&&xe()},e.prototype.get=function(e){if(e=""+e,this.has(e))return this._data[e].get()},e.prototype.keys=function(){return _t(this._keys.slice())},e.prototype.values=function(){return _t(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return _t(this._keys.map(function(t){return[t,e.get(t)]}))},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 Qe(e)&&(e=e.toJS()),j(function(){Nt(e)?Object.keys(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)}):Xt(e)?e.forEach(function(e,n){return t.set(n,e)}):null!==e&&void 0!==e&&Tt("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;j(function(){X(function(){e.keys().forEach(e.delete,e)})})},e.prototype.replace=function(e){var t=this;return j(function(){t.clear(),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var e=this,t={};return this.keys().forEach(function(n){return t[n]=e.get(n)}),t},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null!==e&&void 0!==e&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"', only strings, numbers and booleans are accepted as key in observable maps.")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return It(!0!==t,Ot("m033")),Ee(this,e)},e.prototype.intercept=function(e){return Oe(this,e)},e}();t.ObservableMap=Xe,xt(Xe.prototype,function(){return this.entries()}),t.map=function(e){return Ct("`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead"),I.map(e)};var Qe=qt("ObservableMap",Xe);t.isObservableMap=Qe;var Ze=function(){function e(e,t){this.target=e,this.name=t,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return It(!0!==t,"`observe` doesn't support the fire immediately property for observable objects."),Ee(this,e)},e.prototype.intercept=function(e){return Oe(this,e)},e}();function et(e,t){if(ct(e))return e.$mobx;It(Object.isExtensible(e),Ot("m035")),Nt(e)||(t=(e.constructor.name||"ObservableObject")+"@"+Et()),t||(t="ObservableObject@"+Et());var n=new Ze(e,t);return Ht(e,"$mobx",n),n}function tt(e,t,n,r){if(e.values[t])return It("value"in n,"The property "+t+" in "+e.name+" is already observable, cannot redefine it as computed property"),void(e.target[t]=n.value);if("value"in n)if(Ie(n.value)){var i=n.value;nt(e,t,i.initialValue,i.enhancer)}else l(n.value)&&!0===n.value.autoBind?h(e.target,t,n.value.originalFn):H(n.value)?function(e,t,n){var r=e.name+"."+t;n.name=r,n.scope||(n.scope=e.target);e.values[t]=n,Object.defineProperty(e.target,t,at(t))}(e,t,n.value):nt(e,t,n.value,r);else rt(e,t,n.get,n.set,!1,!0)}function nt(e,t,n,r){if(Gt(e.target,t),Se(e)){var i=ke(e,{object:e.target,name:t,type:"add",newValue:n});if(!i)return;n=i.newValue}n=(e.values[t]=new ht(n,r,e.name+"."+t,!1)).value,Object.defineProperty(e.target,t,function(e){return it[e]||(it[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){st(this,e,t)}})}(t)),function(e,t,n,r){var i=Ae(e),o=be(),a=i||o?{type:"add",object:t,name:n,newValue:r}:null;o&&we(a);i&&Te(e,a);o&&xe()}(e,e.target,t,n)}function rt(e,t,n,r,i,o){o&&Gt(e.target,t),e.values[t]=new B(n,e.target,i,e.name+"."+t,r),o&&Object.defineProperty(e.target,t,at(t))}var it={},ot={};function at(e){return ot[e]||(ot[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:function(t){return this.$mobx.values[e].set(t)}})}function st(e,t,n){var r=e.$mobx,i=r.values[t];if(Se(r)){if(!(s=ke(r,{type:"update",object:e,name:t,newValue:n})))return;n=s.newValue}if((n=i.prepareNewValue(n))!==lt){var o=Ae(r),a=be(),s=o||a?{type:"update",object:e,oldValue:i.value,
1name:t,newValue:n}:null;a&&we(s),i.setNewValue(n),o&&Te(r,s),a&&xe()}}var ut=qt("ObservableObjectAdministration",Ze);function ct(e){return!!Dt(e)&&(bt(e),ut(e.$mobx))}t.isObservableObject=ct;var lt={},ht=function(e){function t(t,n,r,i){void 0===r&&(r="ObservableValue@"+Et()),void 0===i&&(i=!0);var o=e.call(this,r)||this;return o.enhancer=n,o.hasUnreportedChange=!1,o.value=n(t,void 0,r),i&&be()&&ye({type:"create",object:o,newValue:o.value}),o}return o(t,e),t.prototype.set=function(e){var t=this.value;if((e=this.prepareNewValue(e))!==lt){var n=be();n&&we({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),n&&xe()}},t.prototype.prepareNewValue=function(e){if(q(this),Se(this)){var t=ke(this,{object:this,type:"update",newValue:e});if(!t)return lt;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.value!==e?e:lt},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),Ae(this)&&Te(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.value},t.prototype.intercept=function(e){return Oe(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),Ee(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return Zt(this.get())},t}(V);ht.prototype[Qt()]=ht.prototype.valueOf;var dt=qt("ObservableValue",ht);function pt(e,t){if("object"===(void 0===e?"undefined":i(e))&&null!==e){if(Je(e))return It(void 0===t,Ot("m036")),e.$mobx.atom;if(Qe(e)){var n=e;if(void 0===t)return pt(n._keys);var r=n._data[t]||n._hasMap[t];return It(!!r,"the entry '"+t+"' does not exist in the observable map '"+mt(e)+"'"),r}if(bt(e),ct(e)){if(!t)return Tt("please specify a property");var o=e.$mobx.values[t];return It(!!o,"no observable property '"+t+"' found on the observable object '"+mt(e)+"'"),o}if($(e)||H(e)||ge(e))return e}else if("function"==typeof e&&ge(e.$mobx))return e.$mobx;return Tt("Cannot obtain atom from "+e)}function ft(e,t){return It(e,"Expecting some object"),void 0!==t?ft(pt(e,t)):$(e)||H(e)||ge(e)?e:Qe(e)?e:(bt(e),e.$mobx?e.$mobx:void It(!1,"Cannot obtain administration from "+e))}function mt(e,t){return(void 0!==t?pt(e,t):ct(e)||Qe(e)?ft(e):pt(e)).name}function vt(e,t,n,r,i){function o(o,a,s,u,c){if(void 0===c&&(c=0),It(i||yt(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){Bt(o,"__mobxLazyInitializers")||Ut(o,"__mobxLazyInitializers",o.__mobxLazyInitializers&&o.__mobxLazyInitializers.slice()||[]);var l=s.value,h=s.initializer;return o.__mobxLazyInitializers.push(function(t){e(t,a,h?h.call(t):l,u,s)}),{enumerable:r,configurable:!0,get:function(){return!0!==this.__mobxDidRunLazyInitializers&&bt(this),t.call(this,a)},set:function(e){!0!==this.__mobxDidRunLazyInitializers&&bt(this),n.call(this,a,e)}}}var d={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&!0===this.__mobxInitializedProps[a]||gt(this,a,void 0,e,u,s),t.call(this,a)},set:function(t){this.__mobxInitializedProps&&!0===this.__mobxInitializedProps[a]?n.call(this,a,t):gt(this,a,t,e,u,s)}};return(arguments.length<3||5===arguments.length&&c<3)&&Object.defineProperty(o,a,d),d}return i?function(){if(yt(arguments))return o.apply(null,arguments);var e=arguments,t=arguments.length;return function(n,r,i){return o(n,r,i,e,t)}}:o}function gt(e,t,n,r,i,o){Bt(e,"__mobxInitializedProps")||Ut(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,i,o)}function bt(e){!0!==e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers&&(Ut(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function yt(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}t.isBoxedObservable=dt;var wt="__$$iterating";function _t(e){It(!0!==e[wt],"Illegal state: cannot recycle array as iterator"),Ht(e,wt,!0);var t=-1;return Ht(e,"next",function(){return{done:++t>=this.length,value:t<this.length?this[t]:void 0}}),e}function xt(e,t){Ht(e,"function"==typeof Symbol&&Symbol.iterator||"@@iterator",t)}var St={m001:"It is not allowed to assign new values to @action fields",m002:"`runInAction` expects a function",m003:"`runInAction` expects a function without arguments",m004:"autorun expects a function",m005:"Warning: attempted to pass an action to autorun. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.",m006:"Warning: attempted to pass an action to autorunAsync. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action.",m007:"reaction only accepts 2 or 3 arguments. If migrating from MobX 2, please provide an options object",m008:"wrapping reaction expression in `asReference` is no longer supported, use options object instead",m009:"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.",m010:"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'",m011:"First argument to `computed` should be an expression. If using computed as decorator, don't pass it arguments",m012:"computed takes one or tw
1o arguments if used as function",m013:"[mobx.expr] 'expr' should only be used inside other reactive functions.",m014:"extendObservable expected 2 or more arguments",m015:"extendObservable expects an object as first argument",m016:"extendObservable should not be used on maps, use map.merge instead",m017:"all arguments of extendObservable should be objects",m018:"extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540",m019:"[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.",m020:"modifiers can only be used for individual object properties",m021:"observable expects zero or one arguments",m022:"@observable can not be used on getters, use @computed instead",m023:"Using `transaction` is deprecated, use `runInAction` or `(@)action` instead.",m024:"whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested its value.",m025:"whyRun can only be used on reactions and computed values",m026:"`action` can only be invoked on functions",m028:"It is not allowed to set `useStrict` when a derivation is running",m029:"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row",m030a:"Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: ",m030b:"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, the render function of a React component? Tried to modify: ",m031:"Computed values are not allowed to not cause side effects by changing observables that are already being observed. Tried to modify: ",m032:"* This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).",m033:"`observe` doesn't support the fire immediately property for observable maps.",m034:"`mobx.map` is deprecated, use `new ObservableMap` or `mobx.observable.map` instead",m035:"Cannot make the designated object observable; it is not extensible",m036:"It is not possible to get index atoms from arrays",m037:'Hi there! I\'m sorry you have just run into an exception.\nIf your debugger ends up here, know that some reaction (like the render() of an observer component, autorun or reaction)\nthrew an exception and that mobx caught it, to avoid that it brings the rest of your application down.\nThe original cause of the exception (the code that caused this reaction to run (again)), is still in the stack.\n\nHowever, more interesting is the actual stack trace of the error itself.\nHopefully the error is an instanceof Error, because in that case you can inspect the original stack of the error from where it was thrown.\nSee `error.stack` property, or press the very subtle "(...)" link you see near the console.error message that probably brought you here.\nThat stack is more interesting than the stack of this console.error itself.\n\nIf the exception you see is an exception you created yourself, make sure to use `throw new Error("Oops")` instead of `throw "Oops"`,\nbecause the javascript environment will only preserve the original stack trace in the first form.\n\nYou can also make sure the debugger pauses the next time this very same exception is thrown by enabling "Pause on caught exception".\n(Note that it might pause on many other, unrelated exception as well).\n\nIf that all doesn\'t help you out, feel free to open an issue https://github.com/mobxjs/mobx/issues!\n',m038:"Missing items in this list?\n 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"};function Ot(e){return St[e]}var kt=[];function At(){return n}function Et(){return++re.mobxGuid}function Tt(e,t){throw It(!1,e,t),"X"}function It(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}Object.freeze(kt);var Lt=[];function Ct(e){return-1===Lt.indexOf(e)&&(Lt.push(e),console.error("[mobx] Deprecated: "+e),!0)}function jt(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Rt=function(){};function Pt(e){var t=[];return e.forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),t}function Mt(e,t,n){return void 0===t&&(t=100),void 0===n&&(n=" - "),e?e.slice(0,t).join(n)+(e.length>t?" (... and "+(e.length-t)+"more)":""):""}function Dt(e){return null!==e&&"object"===(void 0===e?"undefined":i(e))}function Nt(e){if(null===e||"object"!==(void 0===e?"undefined":i(e)))return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function Vt(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var i in r)Bt(r,i)&&(e[i]=r[i])}return e}function zt(e,t,n){return"number"==typeof t&&isNaN(t)?"number"!=typeof n||!isNaN(n):e?!Wt(t,n):t!==n}var $t=Object.prototype.hasOwnProperty;function Bt(e,t){return $t.call(e,t)}function Ut(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ht(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,
1configurable:!0,value:n})}function Kt(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||!1!==n.configurable&&!1!==n.writable}function Gt(e,t){It(Kt(e,t),"Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function Yt(e){var t=[];for(var n in e)t.push(n);return t}function Wt(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;if("object"!==(void 0===e?"undefined":i(e)))return e===t;var n=Jt(e),r=Ft(e);if(n!==Jt(t))return!1;if(r!==Ft(t))return!1;if(n){if(e.length!==t.length)return!1;for(var o=e.length-1;o>=0;o--)if(!Wt(e[o],t[o]))return!1;return!0}if(r){if(e.size!==t.size)return!1;var a=!0;return e.forEach(function(e,n){a=a&&Wt(t.get(n),e)}),a}if("object"===(void 0===e?"undefined":i(e))&&"object"===(void 0===t?"undefined":i(t))){if(null===e||null===t)return!1;if(Ft(e)&&Ft(t))return e.size===t.size&&Wt(I.shallowMap(e).entries(),I.shallowMap(t).entries());if(Yt(e).length!==Yt(t).length)return!1;for(var s in e){if(!(s in t))return!1;if(!Wt(e[s],t[s]))return!1}return!0}return!1}function qt(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return Dt(e)&&!0===e[n]}}function Jt(e){return Array.isArray(e)||Je(e)}function Ft(e){return Xt(e)||Qe(e)}function Xt(e){return void 0!==At().Map&&e instanceof At().Map}function Qt(){return"function"==typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function Zt(e){return null===e?null:"object"===(void 0===e?"undefined":i(e))?""+e:e}t.isArrayLike=Jt}).call(t,n(4))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=n(6),o=n(0);t.default={render:function(e,t){var n=document.createElement("div");return n.lang="en-US",n.className="gitment-container gitment-root-container",n.appendChild(t.renderHeader(e,t)),n.appendChild(t.renderComments(e,t)),n.appendChild(t.renderEditor(e,t)),n.appendChild(t.renderFooter(e,t)),n},renderHeader:function(e,t){var n=e.meta,r=e.user,o=e.reactions,a=document.createElement("div");a.lang="en-US",a.className="gitment-container gitment-header-container";var s=document.createElement("span"),u=o.find(function(e){return"heart"===e.content&&e.user.login===r.login});s.className="gitment-header-like-btn",s.innerHTML="\n "+i.heart+"\n "+(u?"Unlike":"Like")+"\n "+(n.reactions&&n.reactions.heart?" ⢠<strong>"+n.reactions.heart+"</strong> Liked":"")+"\n ",u?(s.classList.add("liked"),s.onclick=function(){return t.unlike()}):(s.classList.remove("liked"),s.onclick=function(){return t.like()}),a.appendChild(s);var c=document.createElement("span");c.innerHTML="\n "+(n.comments?" ⢠<strong>"+n.comments+"</strong> Comments":"")+"\n ",a.appendChild(c);var l=document.createElement("a");return l.className="gitment-header-issue-link",l.href=n.html_url,l.target="_blank",l.innerText="Issue Page",a.appendChild(l),a},renderComments:function(e,t){var n=e.meta,r=e.comments,a=e.commentReactions,s=e.currentPage,u=e.user,c=e.error,l=document.createElement("div");if(l.lang="en-US",l.className="gitment-container gitment-comments-container",c){var h=document.createElement("div");if(h.className="gitment-comments-error",c===o.NOT_INITIALIZED_ERROR&&u.login&&u.login.toLowerCase()===t.owner.toLowerCase()){var d=document.createElement("div"),p=document.createElement("button");p.className="gitment-comments-init-btn",p.onclick=function(){p.setAttribute("disabled",!0),t.init().catch(function(e){p.removeAttribute("disabled"),alert(e)})},p.innerText="Initialize Comments",d.appendChild(p),h.appendChild(d)}else h.innerText=c;return l.appendChild(h),l}if(void 0===r){var f=document.createElement("div");return f.innerText="Loading comments...",f.className="gitment-comments-loading",l.appendChild(f),l}if(!r.length){var m=document.createElement("div");return m.className="gitment-comments-empty",m.innerText="No Comment Yet",l.appendChild(m),l}var v=document.createElement("ul");if(v.className="gitment-comments-list",r.forEach(function(e){var n=new Date(e.created_at),r=new Date(e.updated_at),o=document.createElement("li");o.className="gitment-comment",o.innerHTML='\n <a class="gitment-comment-avatar" href="'+e.user.html_url+'" target="_blank">\n <img class="gitment-comment-avatar-img" src="'+e.user.avatar_url+'"/>\n </a>\n <div class="gitment-comment-main">\n <div class="gitment-comment-header">\n <a class="gitment-comment-name" href="'+e.user.html_url+'" target="_blank">\n '+e.user.login+'\n </a>
1\n commented on\n <span title="'+n+'">'+n.toDateString()+"</span>\n "+(n.toString()!==r.toString()?' ⢠<span title="comment was edited at '+r+'">edited</span>':"")+'\n <div class="gitment-comment-like-btn">'+i.heart+" "+(e.reactions.heart||"")+'</div>\n </div>\n <div class="gitment-comment-body gitment-markdown">'+e.body_html+"</div>\n </div>\n ";var s=o.querySelector(".gitment-comment-like-btn");a[e.id]&&a[e.id].find(function(e){return"heart"===e.content&&e.user.login===u.login})?(s.classList.add("liked"),s.onclick=function(){return t.unlikeAComment(e.id)}):(s.classList.remove("liked"),s.onclick=function(){return t.likeAComment(e.id)});var c=document.createElement("img"),l=o.querySelector(".gitment-comment-body");c.className="gitment-hidden",c.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",c.onload=function(){l.clientHeight>t.maxCommentHeight&&(l.classList.add("gitment-comment-body-folded"),l.style.maxHeight=t.maxCommentHeight+"px",l.title="Click to Expand",l.onclick=function(){l.classList.remove("gitment-comment-body-folded"),l.style.maxHeight="",l.title="",l.onclick=null})},o.appendChild(c),v.appendChild(o)}),l.appendChild(v),n){var g=Math.ceil(n.comments/t.perPage);if(g>1){var b=document.createElement("ul");if(b.className="gitment-comments-pagination",s>1){var y=document.createElement("li");y.className="gitment-comments-page-item",y.innerText="Previous",y.onclick=function(){return t.goto(s-1)},b.appendChild(y)}for(var w=function(e){var n=document.createElement("li");n.className="gitment-comments-page-item",n.innerText=e,n.onclick=function(){return t.goto(e)},s===e&&n.classList.add("gitment-selected"),b.appendChild(n)},_=1;_<=g;_++)w(_);if(s<g){var x=document.createElement("li");x.className="gitment-comments-page-item",x.innerText="Next",x.onclick=function(){return t.goto(s+1)},b.appendChild(x)}l.appendChild(b)}}return l},renderEditor:function(e,t){var n=e.user,o=e.error,a=document.createElement("div");a.lang="en-US",a.className="gitment-container gitment-editor-container";var s=n.login&&!o?"":"disabled",u=n.login?"":"Login to Comment";a.innerHTML="\n "+(n.login?'<a class="gitment-editor-avatar" href="'+n.html_url+'" target="_blank">\n <img class="gitment-editor-avatar-img" src="'+n.avatar_url+'"/>\n </a>':n.isLoggingIn?'<div class="gitment-editor-avatar">'+i.spinner+"</div>":'<a class="gitment-editor-avatar" href="'+t.loginLink+'" title="login with GitHub">\n '+i.github+"\n </a>")+'\n </a>\n <div class="gitment-editor-main">\n <div class="gitment-editor-header">\n <nav class="gitment-editor-tabs">\n <button class="gitment-editor-tab gitment-selected">Write</button>\n <button class="gitment-editor-tab">Preview</button>\n </nav>\n <div class="gitment-editor-login">\n '+(n.login?'<a class="gitment-editor-logout-link">Logout</a>':n.isLoggingIn?"Logging in...":'<a class="gitment-editor-login-link" href="'+t.loginLink+'">Login</a> with GitHub')+'\n </div>\n </div>\n <div class="gitment-editor-body">\n <div class="gitment-editor-write-field">\n <textarea placeholder="Leave a comment" title="'+u+'" '+s+'></textarea>\n </div>\n <div class="gitment-editor-preview-field gitment-hidden">\n <div class="gitment-editor-preview gitment-markdown"></div>\n </div>\n </div>\n </div>\n <div class="gitment-editor-footer">\n <a class="gitment-editor-footer-tip" href="https://guides.github.com/features/mastering-markdown/" target="_blank">\n Styling with Markdown is supported\n </a>\n <button class="gitment-editor-submit" title="'+u+'" '+s+">Comment</button>\n </div>\n ",n.login&&(a.querySelector(".gitment-editor-logout-link").onclick=function(){return t.logout()});var c=a.querySelector(".gitment-editor-write-field"),l=a.querySelector(".gitment-editor-preview-field"),h=c.querySelector("textarea");h.oninput=function(){h.style.height="auto";var e=window.getComputedStyle(h,null),t=parseInt(e.height,10),n=h.clientHeight,r=h.scrollHeight;n<r&&(h.style.height=t+r-n+"px")};var d=a.querySelectorAll(".gitment-editor-tab"),p=r(d,2),f=p[0],m=p[1];
1f.onclick=function(){f.classList.add("gitment-selected"),m.classList.remove("gitment-selected"),c.classList.remove("gitment-hidden"),l.classList.add("gitment-hidden"),h.focus()},m.onclick=function(){m.classList.add("gitment-selected"),f.classList.remove("gitment-selected"),l.classList.remove("gitment-hidden"),c.classList.add("gitment-hidden");var e=l.querySelector(".gitment-editor-preview"),n=h.value.trim();n?(e.innerText="Loading preview...",t.markdown(n).then(function(t){return e.innerHTML=t})):e.innerText="Nothing to preview"};var v=a.querySelector(".gitment-editor-submit");return v.onclick=function(){v.innerText="Submitting...",v.setAttribute("disabled",!0),t.post(h.value.trim()).then(function(e){h.value="",h.style.height="auto",v.removeAttribute("disabled"),v.innerText="Comment"}).catch(function(e){alert(e),v.removeAttribute("disabled"),v.innerText="Comment"})},a},renderFooter:function(){var e=document.createElement("div");return e.lang="en-US",e.className="gitment-container gitment-footer-container",e.innerHTML='\n Powered by\n <a class="gitment-footer-project-link" href="https://github.com/imsun/gitment" target="_blank">\n Gitment\n </a>\n ',e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.http=t.Query=t.isString=void 0;var r=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.getTargetContainer=function(e){var t=void 0;t=e instanceof Element?e:o(e)?document.getElementById(e):document.createElement("div");return t};var i=n(0),o=t.isString=function(e){return"[object String]"===toString.call(e)};var a=t.Query={parse:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.search;if(!e)return{};var t={};return("?"===e[0]?e.substring(1):e).split("&").forEach(function(e){var n=e.split("="),i=r(n,2),o=i[0],a=i[1];o&&(t[o]=a)}),t},stringify:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"?",n=Object.keys(e).map(function(t){return t+"="+encodeURIComponent(e[t]||"")}).join("&");return n?t+n:""}};function s(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"https://api.github.com",o=new XMLHttpRequest,s=localStorage.getItem(i.LS_ACCESS_TOKEN_KEY),u=""+r+t,c=null;"GET"!==e&&"DELETE"!==e||(u+=a.stringify(n));var l=new Promise(function(e,t){o.addEventListener("load",function(){var n=o.getResponseHeader("content-type"),r=o.responseText;if(/json/.test(n)){var i=o.responseText?JSON.parse(r):{};i.message?t(new Error(i.message)):e(i)}else e(r)}),o.addEventListener("error",function(e){return t(e)})});return o.open(e,u,!0),o.setRequestHeader("Accept","application/vnd.github.squirrel-girl-preview, application/vnd.github.html+json"),s&&o.setRequestHeader("Authorization","token "+s),"GET"!==e&&"DELETE"!==e&&(c=JSON.stringify(n),o.setRequestHeader("Content-Type","application/json")),o.send(c),l}}t.http={get:s("GET"),post:s("POST"),delete:s("DELETE"),put:s("PUT")}},function(e,t,n){"use strict";var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":i(window))&&(r=window)}e.exports=r},function(e,t,n){"use strict";var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(1),a=n(0),s=n(3),u=n(2),c=(r=u)&&r.__esModule?r:{default:r};var l=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultTheme=c.default,this.useTheme(c.default),Object.assign(this,{id:window.location.href,title:window.document.title,link:window.location.href,desc:"",labels:[],theme:c.default,oauth:{},perPage:20,maxCommentHeight:250},n),this.useTheme(this.theme);var r={};try{var i=localStorage.getItem(a.LS_USER_KEY);this.accessToken&&i&&Object.assign(r,JSON.parse(i),{fromCache:!0})}catch(e){localStorage.removeItem(a.LS_USER_KEY)}this.state=(0,o.observable)({user:r,error:null,meta:{},comments:void 0,reactions:[],commentReactions:{},currentPage:1});var u=s.Query.parse();if(u.code){var l=this.oauth,h=l.client_id,d=l.client_secret,p=u.code;delete u.code;var f=s.Query.stringify(u),m=""+window.location.origin+window.location.pathname+f+window.location.hash;history.replaceState({},"",m),Object.assign(this,{id:m,link:m},n),this.state.user.isLoggingIn=!0,s.http.post("https://gh-oauth.imsun.net",{c
1ode:p,client_id:h,client_secret:d},"").then(function(e){t.accessToken=e.access_token,t.update()}).catch(function(e){t.state.user.isLoggingIn=!1,alert(e)})}else this.update()}return i(e,[{key:"accessToken",get:function(){return localStorage.getItem(a.LS_ACCESS_TOKEN_KEY)},set:function(e){localStorage.setItem(a.LS_ACCESS_TOKEN_KEY,e)}},{key:"loginLink",get:function(){var e=this.oauth.redirect_uri||window.location.href,t=Object.assign({scope:"public_repo",redirect_uri:e},this.oauth);return"https://github.com/login/oauth/authorize"+s.Query.stringify(t)}}]),i(e,[{key:"init",value:function(){var e=this;return this.createIssue().then(function(){return e.loadComments()}).then(function(t){return e.state.error=null,t})}},{key:"useTheme",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.theme=t,Object.keys(this.theme).forEach(function(t){return function(e,t){e[t]=function(n){var r=(0,s.getTargetContainer)(n),i=e.theme[t]||e.defaultTheme[t];return(0,o.autorun)(function(){var t=i(e.state,e);r.firstChild?r.replaceChild(t,r.firstChild):r.appendChild(t)}),r}}(e,t)})}},{key:"update",value:function(){var e=this;return Promise.all([this.loadMeta(),this.loadUserInfo()]).then(function(){return Promise.all([e.loadComments().then(function(){return e.loadCommentReactions()}),e.loadReactions()])}).catch(function(t){return e.state.error=t})}},{key:"markdown",value:function(e){return s.http.post("/markdown",{text:e,mode:"gfm"})}},{key:"createIssue",value:function(){var e=this,t=this.id,n=this.owner,r=this.repo,i=this.title,o=this.link,a=this.desc,u=this.labels;return s.http.post("/repos/"+n+"/"+r+"/issues",{title:i,labels:u.concat(["gitment",t]),body:o+"\n\n"+a}).then(function(t){return e.state.meta=t,t})}},{key:"getIssue",value:function(){return this.state.meta.id?Promise.resolve(this.state.meta):this.loadMeta()}},{key:"post",value:function(e){var t=this;return this.getIssue().then(function(t){return s.http.post(t.comments_url,{body:e},"")}).then(function(e){t.state.meta.comments++;var n=Math.ceil(t.state.meta.comments/t.perPage);return t.state.currentPage===n&&t.state.comments.push(e),e})}},{key:"loadMeta",value:function(){var e=this,t=this.id,n=this.owner,r=this.repo;return s.http.get("/repos/"+n+"/"+r+"/issues",{creator:n,labels:t}).then(function(t){return t.length?(e.state.meta=t[0],t[0]):Promise.reject(a.NOT_INITIALIZED_ERROR)})}},{key:"loadComments",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.state.currentPage;return this.getIssue().then(function(n){return s.http.get(n.comments_url,{page:t,per_page:e.perPage},"")}).then(function(t){return e.state.comments=t,t})}},{key:"loadUserInfo",value:function(){var e=this;return this.accessToken?s.http.get("/user").then(function(t){return e.state.user=t,localStorage.setItem(a.LS_USER_KEY,JSON.stringify(t)),t}):(this.logout(),Promise.resolve({}))}},{key:"loadReactions",value:function(){var e=this;return this.accessToken?this.getIssue().then(function(e){return e.reactions.total_count?s.http.get(e.reactions.url,{},""):[]}).then(function(t){return e.state.reactions=t,t}):(this.state.reactions=[],Promise.resolve([]))}},{key:"loadCommentReactions",value:function(){var e=this;if(!this.accessToken)return this.state.commentReactions={},Promise.resolve([]);var t=this.state.comments,n={};return Promise.all(t.map(function(t){if(!t.reactions.total_count)return[];var n=e.owner,r=e.repo;return s.http.get("/repos/"+n+"/"+r+"/issues/comments/"+t.id+"/reactions",{})})).then(function(r){return t.forEach(function(e,t){n[e.id]=r[t]}),e.state.commentReactions=n,n})}},{key:"login",value:function(){window.location.href=this.loginLink}},{key:"logout",value:function(){localStorage.removeItem(a.LS_ACCESS_TOKEN_KEY),localStorage.removeItem(a.LS_USER_KEY),this.state.user={}}},{key:"goto",value:function(e){return this.state.currentPage=e,this.state.comments=void 0,this.loadComments(e)}},{key:"like",value:function(){var e=this;if(!this.accessToken)return alert("Login to Like"),Promise.reject();var t=this.owner,n=this.repo;return s.http.post("/repos/"+t+"/"+n+"/issues/"+this.state.meta.number+"/reactions",{content:"heart"}).then(function(t){e.state.reactions.push(t),e.state.meta.reactions.heart++})}},{key:"unlike",value:function(){var e=this;if(!this.accessToken)return Promise.reject();var t=this.state,n=t.user,r=t.reactions,i=r.findIndex(function(e){return e.user.login===n.login});return s.http.delete("/reactions/"+r[i].id).then(function(){r.splice(i,1),e.state.meta.reactions.heart--})}},{key:"likeAComment",value:function(e){var t=this;if(!this.accessToken)return alert("Login to Like"),Promise.reject();var n=this.owner,r=this.repo,i=this.state.comments.find(function(t){return t.id===e});return s.http.post("/repos/"+n+"/"+r+"/issues/comments/"+e+"/reactions",{content:"heart"}).then(function(n){t.state.commentReactions[e].push(n),i.reactions.heart++})}},{key:"unlikeAComment",value:function(e){if(!this.accessToken)return Promise.reject();var t=this.state.commentReactions[e],n=this.state.comments.find(function(t){return t.id===e}),r=this.state.user,i=t.findIndex(function(e){return e.user.login===r.login});return s.http.delete("/reactions/"+t[i].id).then(function(){t.splice(i,1),n.reactions.heart--})}}]),e}();e.exports=l},function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});t.close='<svg class="gitment-close-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><path d="M37.304 11.282l1.414 1.414-26.022 26.02-1.414-1.413z"/><path d="M12.696 11.282l26.022 26.02-1.414 1.415-26.022-26.02z"/></svg>',t.github='<svg class="gitment-github-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><path d="M25 10c-8.3 0-15 6.7-15 15 0 6.6 4.3 12.2 10.3 14.2.8.1 1-.3 1-.7v-2.6c-4.2.9-5.1-2-5.1-2-.7-1.7-1.7-2.2-1.7-2.2-1.4-.9.1-.9.1-.9 1.5.1 2.3 1.5 2.3 1.5 1.3 2.3 3.5 1.6 4.4 1.2.1-1 .5-1.6 1-2-3.3-.4-6.8-1.7-6.8-7.4 0-1.6.6-3 1.5-4-.2-.4-.7-1.9.1-4 0 0 1.3-.4 4.1 1.5 1.2-.3 2.5-.5 3.8-.5 1.3 0 2.6.2 3.8.5 2.9-1.9 4.1-1.5 4.1-1.5.8 2.1.3 3.6.1 4 1 1 1.5 2.4 1.5 4 0 5.8-3.5 7-6.8 7.4.5.5 1 1.4 1 2.8v4.1c0 .4.3.9 1 .7 6-2 10.2-7.6 10.2-14.2C40 16.7 33.3 10 25 10z"/></svg>',t.heart='<svg class="gitment-heart-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><path d="M25 39.7l-.6-.5C11.5 28.7 8 25 8 19c0-5 4-9 9-9 4.1 0 6.4 2.3 8 4.1 1.6-1.8 3.9-4.1 8-4.1 5 0 9 4 9 9 0 6-3.5 9.7-16.4 20.2l-.6.5zM17 12c-3.9 0-7 3.1-7 7 0 5.1 3.2 8.5 15 18.1 11.8-9.6 15-13 15-18.1 0-3.9-3.1-7-7-7-3.5 0-5.4 2.1-6.9 3.8L25 17.1l-1.1-1.3C22.4 14.1 20.5 12 17 12z"/></svg>',t.spinner='<svg class="gitment-spinner-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><path d="M25 18c-.6 0-1-.4-1-1V9c0-.6.4-1 1-1s1 .4 1 1v8c0 .6-.4 1-1 1z"/><path opacity=".3" d="M25 42c-.6 0-1-.4-1-1v-8c0-.6.4-1 1-1s1 .4 1 1v8c0 .6-.4 1-1 1z"/><path opacity=".3" d="M29 19c-.2 0-.3 0-.5-.1-.4-.3-.6-.8-.3-1.3l4-6.9c.3-.4.8-.6 1.3-.3.4.3.6.8.3 1.3l-4 6.9c-.2.2-.5.4-.8.4z"/><path opacity=".3" d="M17 39.8c-.2 0-.3 0-.5-.1-.4-.3-.6-.8-.3-1.3l4-6.9c.3-.4.8-.6 1.3-.3.4.3.6.8.3 1.3l-4 6.9c-.2.2-.5.4-.8.4z"/><path opacity=".93" d="M21 19c-.3 0-.6-.2-.8-.5l-4-6.9c-.3-.4-.1-1 .3-1.3.4-.3 1-.1 1.3.3l4 6.9c.3.4.1 1-.3 1.3-.2.2-.3.2-.5.2z"/><path opacity=".3" d="M33 39.8c-.3 0-.6-.2-.8-.5l-4-6.9c-.3-.4-.1-1 .3-1.3.4-.3 1-.1 1.3.3l4 6.9c.3.4.1 1-.3 1.3-.2.1-.3.2-.5.2z"/><path opacity=".65" d="M17 26H9c-.6 0-1-.4-1-1s.4-1 1-1h8c.6 0 1 .4 1 1s-.4 1-1 1z"/><path opacity=".3" d="M41 26h-8c-.6 0-1-.4-1-1s.4-1 1-1h8c.6 0 1 .4 1 1s-.4 1-1 1z"/><path opacity=".86" d="M18.1 21.9c-.2 0-.3 0-.5-.1l-6.9-4c-.4-.3-.6-.8-.3-1.3.3-.4.8-.6 1.3-.3l6.9 4c.4.3.6.8.3 1.3-.2.3-.5.4-.8.4z"/><path opacity=".3" d="M38.9 33.9c-.2 0-.3 0-.5-.1l-6.9-4c-.4-.3-.6-.8-.3-1.3.3-.4.8-.6 1.3-.3l6.9 4c.4.3.6.8.3 1.3-.2.3-.5.4-.8.4z"/><path opacity=".44" d="M11.1 33.9c-.3 0-.6-.2-.8-.5-.3-.4-.1-1 .3-1.3l6.9-4c.4-.3 1-.1 1.3.3.3.4.1 1-.3 1.3l-6.9 4c-.1.2-.3.2-.5.2z"/><path opacity=".3" d="M31.9 21.9c-.3 0-.6-.2-.8-.5-.3-.4-.1-1 .3-1.3l6.9-4c.4-.3 1-.1 1.3.3.3.4.1 1-.3 1.3l-6.9 4c-.2.2-.3.2-.5.2z"/></svg>'}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.