PageSourceSearch

https://community.bandwidth.com/_next/static/chunks/70a691bb-ba52bdb0692d6650.js

js bandwidth.com collected 2026-09-24 08:49:51 UTC 69,591 bytes, 2 lines download raw bytes

1!function(){try{var t="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="cd055319-2ee9-4e17-a2f5-a7ac6f0750c6",t._sentryDebugIdIdentifier="sentry-dbid-cd055319-2ee9-4e17-a2f5-a7ac6f0750c6")}catch(t){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[61413],{452339:(t,e,n)=>{n.d(e,{L3:()=>tk,Nh:()=>A,_n:()=>T,aQ:()=>S,dV:()=>P,gK:()=>eA,i5:()=>U,o1:()=>C,wg:()=>E});var r,i,o,a,s,u,p,c,h,l=n(334378),f=n(537811);(r=s||(s={})).afterCreate="afterCreate",r.afterAttach="afterAttach",r.afterCreationFinalization="afterCreationFinalization",r.beforeDetach="beforeDetach",r.beforeDestroy="beforeDestroy";var d=function(t,e){return(d=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function y(t,e){function n(){this.constructor=t}d(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function b(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function g(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function w(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(m(arguments[e]));return t}function _(t){return to(t,1),ta(t).type}function S(t,e){return to(t,1),tj(e,2),ta(t).onSnapshot(e)}function I(t,e){to(t,1),tO(e,function(t){return"object"==typeof t},"object or array",2),ta(t).applyPatches(tm(e))}function A(t,e){return to(t,1),ta(t).applySnapshot(e)}function P(t,e){void 0===e&&(e=!0),to(t,1);var n=ta(t);return e?n.snapshot:tI(n.type.getSnapshot(n,!1))}function C(t,e){to(t,1),tD(e,2);var n,r,i=(n=ta(t),void 0===r&&(r=!0),tc(n,tM(e),r));return i?i.value:void 0}function T(t){return to(t,1),ta(t).observableIsAlive}function E(t){return t}var V=function(){function t(t,e,n,r){this.type=t,this.environment=r,this._state=c.INITIALIZING,this.environment=r,this.baseSetParent(e,n)}return Object.defineProperty(t.prototype,"subpath",{get:function(){return this._subpath},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"subpathUponDeath",{get:function(){return this._subpathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pathUponDeath",{get:function(){return this._pathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.type.getValue(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(t){var e=this.isAlive;this._state=t;var n=this.isAlive;this.aliveAtom&&e!==n&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),t.prototype.fireInternalHook=function(t){this._hookSubscribers&&this._hookSubscribers.emit(t,this,t)},t.prototype.registerHook=function(t,e){return this._hookSubscribers||(this._hookSubscribers=new tC),this._hookSubscribers.register(t,e)},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),t.prototype.baseSetParent=function(t,e){this._parent=t,this._subpath=e,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()},Object.defineProperty(t.prototype,"path",{get:function(){return this.getEscapedPath(!0)}
1,enumerable:!1,configurable:!0}),t.prototype.getEscapedPath=function(t){return(t&&(this.pathAtom||(this.pathAtom=(0,l.MN)("path")),this.pathAtom.reportObserved()),this.parent)?(void 0===this._escapedSubpath&&(this._escapedSubpath=this._subpath?tz(this._subpath):""),this.parent.getEscapedPath(t)+"/"+this._escapedSubpath):""},Object.defineProperty(t.prototype,"isRoot",{get:function(){return null===this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAlive",{get:function(){return this.state!==c.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDetaching",{get:function(){return this.state===c.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=(0,l.MN)("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),t.prototype.baseFinalizeCreation=function(t){0;if(this.state===c.CREATED){if(this.parent){if(this.parent.state!==c.FINALIZED)return;this.fireHook(s.afterAttach)}this.state=c.FINALIZED,t&&t()}},t.prototype.baseFinalizeDeath=function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=c.DEAD},t.prototype.baseAboutToDie=function(){this.fireHook(s.beforeDestroy)},t}(),N=function(t){function e(e,n,r,i,o){var a=t.call(this,e,n,r,i)||this;try{a.storedValue=e.createNewInstance(o)}catch(t){throw a.state=c.DEAD,t}return a.state=c.CREATED,a.finalizeCreation(),a}return y(e,t),Object.defineProperty(e.prototype,"root",{get:function(){if(!this.parent)throw ty("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),e.prototype.setParent=function(t,e){var n=this.parent!==t,r=this.subpath!==e;if(n||r){0;this.environment=void 0,this.baseSetParent(this.parent,e)}},Object.defineProperty(e.prototype,"snapshot",{get:function(){return tI(this.getSnapshot())},enumerable:!1,configurable:!0}),e.prototype.getSnapshot=function(){return this.type.getSnapshot(this)},e.prototype.toString=function(){var t=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return this.type.name+"@"+t+(this.isAlive?"":" [dead]")},e.prototype.die=function(){this.isAlive&&this.state!==c.DETACHING&&(this.aboutToDie(),this.finalizeDeath())},e.prototype.finalizeCreation=function(){this.baseFinalizeCreation()},e.prototype.aboutToDie=function(){this.baseAboutToDie()},e.prototype.finalizeDeath=function(){this.baseFinalizeDeath()},e.prototype.fireHook=function(t){this.fireInternalHook(t)},b([l.XI],e.prototype,"die",null),e}(V),O=1,j={onError:function(t){throw t}},D=function(t){function e(e,n,r,i,o){var a=t.call(this,e,n,r,i)||this;if(a.nodeId=++O,a.isProtectionEnabled=!0,a._autoUnbox=!0,a._isRunningAction=!1,a._hasSnapshotReaction=!1,a._observableInstanceState=0,a._cachedInitialSnapshotCreated=!1,a.unbox=a.unbox.bind(a),a._initialSnapshot=tI(o),a.identifierAttribute=e.identifierAttribute,n||(a.identifierCache=new te),a._childNodes=e.initializeChildNodes(a,a._initialSnapshot),a.identifier=null,a.unnormalizedIdentifier=null,a.identifierAttribute&&a._initialSnapshot){var s=a._initialSnapshot[a.identifierAttribute];if(void 0===s){var u=a._childNodes[a.identifierAttribute];u&&(s=u.value)}if("string"!=typeof s&&"number"!=typeof s)throw ty("Instance identifier '"+a.identifierAttribute+"' for type '"+a.type.name+"' must be a string or a number");a.identifier=""+s,a.unnormalizedIdentifier=s}return n?n.root.identifierCache.addNodeToCache(a):a.identifierCache.addNodeToCache(a),a}return y(e,t),e.prototype.applyPatches=function(t){this.createObservableInstanceIfNeeded(),this._applyPatches(t)},e.prototype.applySnapshot=function(t){this.createObservableInstanceIfNeeded(),this._applySnapshot(t)},e.prototype.createObservableInstanceIfNeeded=function(){if(0===this._observableInstanceState){0;this.createObservableInstance()}},e.prototype.createObservableInstance=function(){0;this._observableInstanceState=1;for(var t,e,n,r,i=[],o=this.parent;o&&0===o._observableInstanceState;)i.unshift(o),o=o.parent;try{for(var a=g(i),u=a.next();!u.done;u=a.next())u.value.createObservableInstanceIfNeeded()}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}var p=this.type;try{this.storedValue=p.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,p.finalizeNewInstance(this,this.storedValue)}catch(t){throw this.state=c.DEAD,t}finally{this._isRunningAction=!1}this._observableInstanceState=2,t=this,e="snapshot",(0,l.go)(t,e).trackAndCompute(),this.isRoot&&this._addSnapsh
1otReaction(),this._childNodes=tf,this.state=c.CREATED,this.fireHook(s.afterCreate),this.finalizeCreation()},Object.defineProperty(e.prototype,"root",{get:function(){var t=this.parent;return t?t.root:this},enumerable:!1,configurable:!0}),e.prototype.clearParent=function(){if(this.parent){this.fireHook(s.beforeDetach);var t=this.state;this.state=c.DETACHING;var e=this.root,n=e.environment,r=e.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=n,this.identifierCache=r}finally{this.state=t}}},e.prototype.setParent=function(t,e){var n=t!==this.parent,r=e!==this.subpath;if(n||r){0;n?(this.environment=void 0,t.root.identifierCache.mergeCache(this),this.baseSetParent(t,e),this.fireHook(s.afterAttach)):r&&this.baseSetParent(this.parent,e)}},e.prototype.fireHook=function(t){var e=this;this.fireInternalHook(t);var n=this.storedValue&&"object"==typeof this.storedValue&&this.storedValue[t];"function"==typeof n&&(l._t?(0,l._t)(function(){n.apply(e.storedValue)}):n.apply(this.storedValue))},Object.defineProperty(e.prototype,"snapshot",{get:function(){return tI(this.getSnapshot())},enumerable:!1,configurable:!0}),e.prototype.getSnapshot=function(){return this.isAlive?2===this._observableInstanceState?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath},e.prototype._getActualSnapshot=function(){return this.type.getSnapshot(this)},e.prototype._getCachedInitialSnapshot=function(){if(!this._cachedInitialSnapshotCreated){var t=this.type,e=this._childNodes,n=this._initialSnapshot;this._cachedInitialSnapshot=t.processInitialSnapshot(e,n),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot},e.prototype.isRunningAction=function(){return!!this._isRunningAction||!this.isRoot&&this.parent.isRunningAction()},e.prototype.assertAlive=function(t){if(!this.isAlive){var e=this._getAssertAliveError(t);tN(e)}},e.prototype._getAssertAliveError=function(t){var e,n=this.getEscapedPath(!1)||this.pathUponDeath||"",r=t.subpath&&tz(t.subpath)||"",i=t.actionContext||p;i&&"action"!==i.type&&i.parentActionEvent&&(i=i.parentActionEvent);var o="";return i&&null!=i.name&&(o=(i&&i.context&&(to(e=i.context,1),ta(e).path)||n)+"."+i.name+"()"),"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '"+this.type.name+"', Path upon death: '"+n+"', Subpath: '"+r+"', Action: '"+o+"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree."},e.prototype.getChildNode=function(t){this.assertAlive({subpath:t}),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildNode(this,t):this._childNodes[t]}finally{this._autoUnbox=!0}},e.prototype.getChildren=function(){this.assertAlive(tf),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildren(this):th(this._childNodes)}finally{this._autoUnbox=!0}},e.prototype.getChildType=function(t){return this.type.getChildType(t)},Object.defineProperty(e.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),e.prototype.assertWritable=function(t){if(this.assertAlive(t),!this.isRunningAction()&&this.isProtected)throw ty("Cannot modify '"+this+"', the object is protected and can only be modified by using an action.")},e.prototype.removeChild=function(t){this.type.removeChild(this,t)},e.prototype.unbox=function(t){return t?(this.assertAlive({subpath:t.subpath||t.subpathUponDeath}),this._autoUnbox?t.value:t):t},e.prototype.toString=function(){var t=(this.isAlive?this.path:this.pathUponDeath)||"<root>",e=this.identifier?"(id: "+this.identifier+")":"";return this.type.name+"@"+t+e+(this.isAlive?"":" [dead]")},e.prototype.finalizeCreation=function(){var t=this;this.baseFinalizeCreation(function(){var e,n;try{for(var r=g(t.getChildren()),i=r.next();!i.done;i=r.next())i.value.finalizeCreation()}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}t.fireInternalHook(s.afterCreationFinalization)})},e.prototype.detach=function(){if(!this.isAlive)throw ty("Error while detaching, node is not alive.");this.clearParent()},e.prototype.preboot=function(){var t=this;this._applyPatches=X(this.storedValue,"@APPLY_PATCHES",function(e){e.forEach(function(e){var n=tM(e.path);
1tc(t,n.slice(0,-1)).applyPatchLocally(n[n.length-1],e)})}),this._applySnapshot=X(this.storedValue,"@APPLY_SNAPSHOT",function(e){if(e!==t.snapshot)return t.type.applySnapshot(t,e)}),tA(this.storedValue,"$treenode",this),tA(this.storedValue,"toJSON",tu)},e.prototype.die=function(){this.isAlive&&this.state!==c.DETACHING&&(this.aboutToDie(),this.finalizeDeath())},e.prototype.aboutToDie=function(){0!==this._observableInstanceState&&(this.getChildren().forEach(function(t){t.aboutToDie()}),this.baseAboutToDie(),this._internalEventsEmit("dispose"),this._internalEventsClear("dispose"))},e.prototype.finalizeDeath=function(){this.getChildren().forEach(function(t){t.finalizeDeath()}),this.root.identifierCache.notifyDied(this);var t=this.snapshot;this._snapshotUponDeath=t,this._internalEventsClearAll(),this.baseFinalizeDeath()},e.prototype.onSnapshot=function(t){return this._addSnapshotReaction(),this._internalEventsRegister("snapshot",t)},e.prototype.emitSnapshot=function(t){this._internalEventsEmit("snapshot",t)},e.prototype.onPatch=function(t){return this._internalEventsRegister("patch",t)},e.prototype.emitPatch=function(t,e){if(this._internalEventsHasSubscribers("patch")){var n=m(function(t){if(!("oldValue"in t))throw ty("Patches without `oldValue` field cannot be inversed");return[function(t){switch(t.op){case"add":return{op:"add",path:t.path,value:t.value};case"remove":return{op:"remove",path:t.path};case"replace":return{op:"replace",path:t.path,value:t.value}}}(t),function(t){switch(t.op){case"add":return{op:"remove",path:t.path};case"remove":return{op:"add",path:t.path,value:t.oldValue};case"replace":return{op:"replace",path:t.path,value:t.oldValue}}}(t)]}(function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var i=e[r];for(var o in i)t[o]=i[o]}return t}({},t,{path:e.path.substr(this.path.length)+"/"+t.path})),2),r=n[0],i=n[1];this._internalEventsEmit("patch",r,i)}this.parent&&this.parent.emitPatch(t,e)},e.prototype.hasDisposer=function(t){return this._internalEventsHas("dispose",t)},e.prototype.addDisposer=function(t){if(!this.hasDisposer(t))return void this._internalEventsRegister("dispose",t,!0);throw ty("cannot add a disposer when it is already registered for execution")},e.prototype.removeDisposer=function(t){if(!this._internalEventsHas("dispose",t))throw ty("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister("dispose",t)},e.prototype.removeMiddleware=function(t){if(this.middlewares){var e=this.middlewares.indexOf(t);e>=0&&this.middlewares.splice(e,1)}},e.prototype.addMiddleWare=function(t,e){var n=this;void 0===e&&(e=!0);var r={handler:t,includeHooks:e};return this.middlewares?this.middlewares.push(r):this.middlewares=[r],function(){n.removeMiddleware(r)}},e.prototype.applyPatchLocally=function(t,e){this.assertWritable({subpath:t}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,t,e)},e.prototype._addSnapshotReaction=function(){var t=this;if(!this._hasSnapshotReaction){var e=(0,l.mJ)(function(){return t.snapshot},function(e){return t.emitSnapshot(e)},j);this.addDisposer(e),this._hasSnapshotReaction=!0}},e.prototype._internalEventsHasSubscribers=function(t){return!!this._internalEvents&&this._internalEvents.hasSubscribers(t)},e.prototype._internalEventsRegister=function(t,e,n){return void 0===n&&(n=!1),this._internalEvents||(this._internalEvents=new tC),this._internalEvents.register(t,e,n)},e.prototype._internalEventsHas=function(t,e){return!!this._internalEvents&&this._internalEvents.has(t,e)},e.prototype._internalEventsUnregister=function(t,e){this._internalEvents&&this._internalEvents.unregister(t,e)},e.prototype._internalEventsEmit=function(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this._internalEvents&&(e=this._internalEvents).emit.apply(e,w([t],n))},e.prototype._internalEventsClear=function(t){this._internalEvents&&this._internalEvents.clear(t)},e.prototype._internalEventsClearAll=function(){this._internalEvents&&this._internalEvents.clearAll()},b([l.XI],e.prototype,"createObservableInstance",null),b([l.EW],e.prototype,"snapshot",null),b([l.XI],e.prototype,"detach",null),b([l.XI],e.prototype,"die",null),e}(V);(i=u||(u={}))[i.String=1]="String",i[i.Number=2]="Number",i[i.Boolean=4]="Boolean",i[i.Date=8]="Date",i[i.Literal=16]="Literal",i[i.Array=32]="Array",i[i.Map=64]="Map",i[i.Object=128]="Object",i[i.Frozen=256]="Frozen",i[i.Optional=512]="Optional",i[i.Reference=1024]="Reference",i[i.Identifier=2048]="Identifier",i[i.Late=4096]="Late",i[i.Refinement=8192]="Refinement",i[i.Union=16384]="Union",i[i.Null=32768]="Null",i[i.Undef
1ined=65536]="Undefined",i[i.Integer=131072]="Integer",i[i.Custom=262144]="Custom",i[i.SnapshotProcessor=524288]="SnapshotProcessor";var x="cannotDetermine",k=function(){function t(t){this.isType=!0,this.name=t}return t.prototype.create=function(t,e){return Q(this,t),this.instantiate(null,"",e,t).value},t.prototype.getSnapshot=function(t,e){throw ty("unimplemented method")},t.prototype.isAssignableFrom=function(t){return t===this},t.prototype.validate=function(t,e){if(ts(t)){var n=_(t);return this.isAssignableFrom(n)?tl:K(e,t)}return this.isValidSnapshot(t,e)},t.prototype.is=function(t){return 0===this.validate(t,[{path:"",type:this}]).length},Object.defineProperty(t.prototype,"Type",{get:function(){throw ty("Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"TypeWithoutSTN",{get:function(){throw ty("Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"SnapshotType",{get:function(){throw ty("Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CreationType",{get:function(){throw ty("Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`")},enumerable:!1,configurable:!0}),b([l.XI],t.prototype,"create",null),t}(),z=function(t){function e(e){return t.call(this,e)||this}return y(e,t),e.prototype.create=function(e,n){return void 0===e&&(e=this.getDefaultSnapshot()),t.prototype.create.call(this,e,n)},e.prototype.getValue=function(t){return t.createObservableInstanceIfNeeded(),t.storedValue},e.prototype.tryToReconcileNode=function(t,e){return!t.isDetaching&&(!!(t.snapshot===e||ti(e)&&ta(e)===t)||!(!(t.type===this&&t_(e))||ti(e))&&(!t.identifierAttribute||t.identifier===""+e[t.identifierAttribute])&&(t.applySnapshot(e),!0))},e.prototype.reconcile=function(t,e,n,r){if(this.tryToReconcileNode(t,e))return t.setParent(n,r),t;if(t.die(),ti(e)&&this.isAssignableFrom(_(e))){var i=ta(e);return i.setParent(n,r),i}return this.instantiate(n,r,void 0,e)},e.prototype.getSubTypes=function(){return null},b([l.XI],e.prototype,"create",null),e}(k),R=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return y(e,t),e.prototype.createNewInstance=function(t){return t},e.prototype.getValue=function(t){return t.storedValue},e.prototype.getSnapshot=function(t){return t.storedValue},e.prototype.reconcile=function(t,e,n,r){if(!t.isDetaching&&t.type===this&&t.storedValue===e)return t;var i=this.instantiate(n,r,void 0,e);return t.die(),i},e.prototype.getSubTypes=function(){return null},e}(k);function H(t){return"object"==typeof t&&t&&!0===t.isType}function M(t,e){tO(t,H,"mobx-state-tree type",e)}function F(t,e){this.hooks=t,this.call=e,this.flowsPending=0,this.running=!0,t&&t.onStart(e)}function L(t){return{$MST_UNSERIALIZABLE:!0,type:t}}function U(t,e,n){var r,i,o,a;(void 0===n&&(n=!1),to(t,1),0)&&(to(t,1),ta(t).isRoot||tN("Warning: Attaching onAction listeners to non root nodes is dangerous: No events will be emitted for actions initiated higher up in the tree."),ta(t).isProtected||tN("Warning: Attaching onAction listeners to non protected nodes is dangerous: No events will be emitted for direct modifications without action."));return r=t,i=function(r,i){if("action"!==r.type||r.id!==r.rootId)return i(r);var o=ta(r.context),a={name:r.name,path:function(t,e){if(t.root!==e.root)throw ty("Cannot calculate relative path: objects '"+t+"' and '"+e+"' are not part of the same object tree");for(var n=tM(t.path),r=tM(e.path),i=0;i<n.length&&n[i]===r[i];i++);return n.slice(i).map(tp).join("/")+tH(r.slice(i))}(ta(t),o),args:r.args.map(function(t,e){if(r.name,t instanceof Date)return{$MST_DATE:t.getTime()};if(tS(t))return t;if(ti(t))return L("[MSTNode: "+_(t).name+"]");if("function"==typeof t)return L("[function]");if("object"==typeof t&&!tw(t)&&!tg(t))return L("[object "+(t&&t.constructor&&t.constructor.name||"Complex Object")+"]");try{return JSON.stringify(t),t}catch(t){return L(""+t)}})};if(!n)return e(a),i(r);var s=i(r);return e(a),s},void 0===o&&(o=!0),a=ta(r),function(){return!1}()&&!a.isProtectionEnabled&&tN("It is recommended to protect the state tree before attaching action middleware, as otherwise it cannot be guaranteed that all changes are passed through middleware. See `protect`"),a.addMiddleWare(i,o)}F.prototype.finish=function(t){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,t))},F.prototype.incFlowsPending=function(){this.flowsPending++},F.prototype.decFlowsPending=function(){this.flowsPending--},Object.defineProperty(F.prototype,"hasFlowsPending",{get:function(){return this.flowsPending>0}
1,enumerable:!1,configurable:!0});var W=1;function $(t,e){var n=ta(t.context);"action"===t.type&&n.assertAlive({actionContext:t});var r=n._isRunningAction;n._isRunningAction=!0;var i=p;p=t;try{var o=n,a=t,u=e,c=new B(o,u);if(c.isEmpty)return(0,l.XI)(u).apply(null,a.args);var h=null;return function t(e){var n=c.getNextMiddleware(),r=n&&n.handler;if(!r)return(0,l.XI)(u).apply(null,e.args);if(!n.includeHooks&&s[e.name])return t(e);var i=!1,o=!1;if(r(e,function(e,n){i=!0,h=t(e),n&&(h=n(h))},function(t){o=!0,h=t}),function(){return!1}())if(i||o){if(i&&o){var a=ta(e.tree);throw ty("The next() and abort() callback within the middleware "+r.name+' for the action: "'+e.name+'" on the node: '+a.type.name+" were invoked.")}}else{var a=ta(e.tree);throw ty("Neither the next() nor the abort() callback within the middleware "+r.name+' for the action: "'+e.name+'" on the node: '+a.type.name+" was invoked.")}return h}(a)}finally{p=i,n._isRunningAction=r}}function Z(t){if(t)return"action"===t.type?t:t.parentActionEvent}function X(t,e,n){var r=function(){var r=W++,i=p,o=Z(i);return $({type:"action",name:e,id:r,args:tT(arguments),context:t,tree:(to(t,1),ta(t).root.storedValue),rootId:i?i.rootId:r,parentId:i?i.id:0,allParentIds:i?w(i.allParentIds,[i.id]):[],parentEvent:i,parentActionEvent:o},n)};return r._isMSTAction=!0,r}var B=function(){function t(t,e){this.arrayIndex=0,this.inArrayIndex=0,this.middlewares=[],e.$mst_middleware&&this.middlewares.push(e.$mst_middleware);for(var n=t;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.parent}return Object.defineProperty(t.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),t.prototype.getNextMiddleware=function(){var t=this.middlewares[this.arrayIndex];if(t){var e=t[this.inArrayIndex++];return e||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}},t}();function G(t){return"function"==typeof t?"<function"+(t.name?" "+t.name:"")+">":ti(t)?"<"+t+">":"`"+function(t){try{return JSON.stringify(t)}catch(t){return"<Unserializable: "+t+">"}}(t)+"`"}function Y(t){var e,n=t.value,r=t.context[t.context.length-1].type,i=t.context.map(function(t){return t.path}).filter(function(t){return t.length>0}).join("/"),o=i.length>0?'at path "/'+i+'" ':"",a=ti(n)?"value of type "+ta(n).type.name+":":tS(n)?"value":"snapshot",s=r&&ti(n)&&r.is(ta(n).snapshot);return""+o+a+" "+G(n)+" is not assignable "+(r?"to type: `"+r.name+"`":"")+(t.message?" ("+t.message+")":"")+(r?H(e=r)&&(e.flags&(u.String|u.Number|u.Integer|u.Boolean|u.Date))>0||tS(n)?".":", expected an instance of `"+r.name+"` or a snapshot like `"+r.describe()+"` instead."+(s?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function J(t,e,n){return t.concat([{path:e,type:n}])}function K(t,e,n){return[{context:t,value:e,message:n}]}function q(t){return t.reduce(function(t,e){return t.concat(e)},[])}function Q(t,e){((function(){return!1})()||void 0!==f&&f.env&&"true"===f.env.ENABLE_TYPE_CHECK)&&function(t,e){var n=t.validate(e,[{path:"",type:t}]);if(n.length>0)throw ty(function(t,e,n){if(0!==n.length){var r;return"Error while converting "+((r=G(e)).length<280?r:r.substring(0,272)+"......"+r.substring(r.length-8))+" to `"+t.name+"`:\n\n    "+n.map(Y).join("\n    ")}}(t,e,n))}(t,e)}var tt=0,te=function(){function t(){this.cacheId=tt++,this.cache=l.sH.map(),this.lastCacheModificationPerId=l.sH.map()}return t.prototype.updateLastCacheModificationPerId=function(t){var e=this.lastCacheModificationPerId.get(t);this.lastCacheModificationPerId.set(t,void 0===e?1:e+1)},t.prototype.getLastCacheModificationPerId=function(t){var e=this.lastCacheModificationPerId.get(t)||0;return this.cacheId+"-"+e},t.prototype.addNodeToCache=function(t,e){if(void 0===e&&(e=!0),t.identifierAttribute){var n=t.identifier;this.cache.has(n)||this.cache.set(n,l.sH.array([],td));var r=this.cache.get(n);if(-1!==r.indexOf(t))throw ty("Already registered");r.push(t),e&&this.updateLastCacheModificationPerId(n)}},t.prototype.mergeCache=function(t){var e=this;(0,l.zu)(t.identifierCache.cache).forEach(function(t){return t.forEach(function(t){e.addNodeToCache(t)})})},t.prototype.notifyDied=function(t){if(t.identifierAttribute){var e=t.i
1dentifier,n=this.cache.get(e);n&&(n.remove(t),n.length||this.cache.delete(e),this.updateLastCacheModificationPerId(t.identifier))}},t.prototype.splitCache=function(e){var n=this,r=new t,i=e.path;return(0,l.jO)(this.cache).forEach(function(t){for(var e=m(t,2),o=e[0],a=e[1],s=!1,u=a.length-1;u>=0;u--)0===a[u].path.indexOf(i)&&(r.addNodeToCache(a[u],!1),a.splice(u,1),s=!0);s&&n.updateLastCacheModificationPerId(o)}),r},t.prototype.has=function(t,e){var n=this.cache.get(e);return!!n&&n.some(function(e){return t.isAssignableFrom(e.type)})},t.prototype.resolve=function(t,e){var n=this.cache.get(e);if(!n)return null;var r=n.filter(function(e){return t.isAssignableFrom(e.type)});switch(r.length){case 0:return null;case 1:return r[0];default:throw ty("Cannot resolve a reference to type '"+t.name+"' with id: '"+e+"' unambigously, there are multiple candidates: "+r.map(function(t){return t.path}).join(", "))}},t}();function tn(t,e,n,r,i){var o=ts(i);if(o){if(o.parent)throw ty("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+(e?e.path:"")+"/"+n+"', but it lives already at '"+o.path+"'");return e&&o.setParent(e,n),o}return new D(t,e,n,r,i)}function tr(t,e,n,r,i){return new N(t,e,n,r,i)}function ti(t){return!!(t&&t.$treenode)}function to(t,e){tO(t,ti,"mobx-state-tree node",e)}function ta(t){if(!ti(t))throw ty("Value "+t+" is no MST Node");return t.$treenode}function ts(t){return t&&t.$treenode||null}function tu(){return ta(this).snapshot}(o=c||(c={}))[o.INITIALIZING=0]="INITIALIZING",o[o.CREATED=1]="CREATED",o[o.FINALIZED=2]="FINALIZED",o[o.DETACHING=3]="DETACHING",o[o.DEAD=4]="DEAD";var tp=function(t){return".."};function tc(t,e,n){void 0===n&&(n=!0);for(var r=t,i=0;i<e.length;i++){var o=e[i];if(".."===o){if(r=r.parent)continue}else if("."===o)continue;else if(r){if(r instanceof N)try{var a=r.value;ti(a)&&(r=ta(a))}catch(t){if(!n)return;throw t}if(r instanceof D&&r.getChildType(o)&&(r=r.getChildNode(o)))continue}if(!n)return;throw ty("Could not resolve '"+o+"' in path '"+(tH(e.slice(0,i))||"/")+"' while resolving '"+tH(e)+"'")}return r}function th(t){if(!t)return tl;var e=Object.keys(t);if(!e.length)return tl;var n=Array(e.length);return e.forEach(function(e,r){n[r]=t[e]}),n}var tl=Object.freeze([]),tf=Object.freeze({}),td="string"==typeof l.BQ?{deep:!1}:{deep:!1,proxy:!1};function ty(t){return void 0===t&&(t="Illegal state"),Error("[mobx-state-tree] "+t)}function tv(t){return t}Object.freeze(td);var tb=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function tg(t){return Array.isArray(t)||(0,l.Fq)(t)}function tm(t){return t?tg(t)?t:[t]:tl}function tw(t){if(null===t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function t_(t){return null!==t&&"object"==typeof t&&!(t instanceof Date)&&!(t instanceof RegExp)}function tS(t,e){return void 0===e&&(e=!0),null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t||!!e&&t instanceof Date}function tI(t){return t}function tA(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}var tP=function(){function t(){this.handlers=[]}return Object.defineProperty(t.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),t.prototype.register=function(t,e){var n=this;return void 0===e&&(e=!1),e?this.handlers.unshift(t):this.handlers.push(t),function(){n.unregister(t)}},t.prototype.has=function(t){return this.handlers.indexOf(t)>=0},t.prototype.unregister=function(t){var e=this.handlers.indexOf(t);e>=0&&this.handlers.splice(e,1)},t.prototype.clear=function(){this.handlers.length=0},t.prototype.emit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.handlers.slice().forEach(function(e){return e.apply(void 0,w(t))})},t}(),tC=function(){function t(){}return t.prototype.hasSubscribers=function(t){var e=this.eventHandlers&&this.eventHandlers[t];return!!e&&e.hasSubscribers},t.prototype.register=function(t,e,n){void 0===n&&(n=!1),this.eventHandlers||(this.eventHandlers={});var r=this.eventHandlers[t];return r||(r=this.eventHandlers[t]=new tP),r.register(e,n)},t.prototype.has=function(t,e){var n=this.eventHandlers&&this.eventHandlers[t];return!!n&&n.has(e)},t.prototype.unregister=function(t,e){var n=this.eventHandlers&&this.eventHandlers[t];n&&n.unregister(e)},t.prototype.clear=function(t){this.eventHandlers&&delete this.eventHandlers[t]},t.prototype.clearAll=function(){this.eventHandlers=void 0},t.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this.eventHandlers&&this.eventHandlers[t];r&&r.emit.apply(r,w(e))},t}();function tT(t){for(var e=Array(t.length),n=0;n<t.length;n++)e[n]=t[n];return e}function tE(t,e){return 0===t.indexOf(e)}var tV=function(t,e){};function tN(t){console.warn(Error("[mobx-state-tree] "+t))}function tO(t,e,n,r){}function tj(t,e){tO(t,function(t){return"function"==typeof t},"function",e)}function tD(t,e,n){void 0===n&&(n=!0),tO(t,function(t){return"string"==typeof t},"string",e),n||tO(t,function(t){return""!==t},"not empty string",e)}function tx(t){"function"==typeof queueMicrotask?queueMicrotask(t):"function"==typeof setImmediate?setImmediate(t):setTimeout(t,1)}function tk(t){var e,n,r;return e=t.name,n=t,r=function(){var t=W++,i=p;
1if(!i)throw ty("a mst flow must always have a parent context");var o=Z(i);if(!o)throw ty("a mst flow must always have a parent action context");var a={name:e,id:t,tree:i.tree,context:i.context,parentId:i.id,allParentIds:w(i.allParentIds,[i.id]),rootId:i.rootId,parentEvent:i,parentActionEvent:o},s=arguments;function u(t,e,n){t.$mst_middleware=r.$mst_middleware,$(v(v({},a),{type:e,args:[n]}),t)}return new Promise(function(t,e){var i,o=function(){i=n.apply(null,arguments),p(void 0)};function p(t){var n;try{u(function(t){n=i.next(t)},"flow_resume",t)}catch(t){tx(function(){u(function(n){e(t)},"flow_throw",t)});return}h(n)}function c(t){var n;try{u(function(t){n=i.throw(t)},"flow_resume_error",t)}catch(t){tx(function(){u(function(n){e(t)},"flow_throw",t)});return}h(n)}function h(e){if(e.done)return void tx(function(){u(function(e){t(e)},"flow_return",e.value)});if(!e.value||"function"!=typeof e.value.then)throw ty("Only promises can be yielded to `async`, got: "+e);return e.value.then(p,c)}o.$mst_middleware=r.$mst_middleware,$(v(v({},a),{type:"flow_spawn",args:tT(s)}),o)})}}function tz(t){return!0==("number"==typeof t)?""+t:-1===t.indexOf("/")&&-1===t.indexOf("~")?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function tR(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function tH(t){if(0===t.length)return"";var e=function(t){return t.map(tz).join("/")};return"."===t[0]||".."===t[0]?e(t):"/"+e(t)}function tM(t){var e=t.split("/").map(tR);if(!(""===t||"."===t||".."===t||tE(t,"/")||tE(t,"./")||tE(t,"../")))throw ty("a json path must be either rooted, empty or relative, but got '"+t+"'");return""===e[0]&&e.shift(),e}tV.ids={};var tF=function(t){function e(e,n,r){var i=t.call(this,r||e.name)||this;return i._subtype=e,i._processors=n,i}return y(e,t),Object.defineProperty(e.prototype,"flags",{get:function(){return this._subtype.flags|u.SnapshotProcessor},enumerable:!1,configurable:!0}),e.prototype.describe=function(){return"snapshotProcessor("+this._subtype.describe()+")"},e.prototype.preProcessSnapshot=function(t){return this._processors.preProcessor?this._processors.preProcessor.call(null,t):t},e.prototype.postProcessSnapshot=function(t){return this._processors.postProcessor?this._processors.postProcessor.call(null,t):t},e.prototype._fixNode=function(t){var e=this;!function(t,e){for(var n,r,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];try{for(var a=g(i),s=a.next();!s.done;s=a.next()){var u=s.value;t[u]=e[u].bind(e)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}(t.type,this,"isAssignableFrom","create");var n=t.getSnapshot;t.getSnapshot=function(){return e.postProcessSnapshot(n.call(t))}},e.prototype.instantiate=function(t,e,n,r){var i=ti(r)?r:this.preProcessSnapshot(r),o=this._subtype.instantiate(t,e,n,i);return this._fixNode(o),o},e.prototype.reconcile=function(t,e,n,r){var i=this._subtype.reconcile(t,ti(e)?e:this.preProcessSnapshot(e),n,r);return i!==t&&this._fixNode(i),i},e.prototype.getSnapshot=function(t,e){void 0===e&&(e=!0);var n=this._subtype.getSnapshot(t);return e?this.postProcessSnapshot(n):n},e.prototype.isValidSnapshot=function(t,e){var n=this.preProcessSnapshot(t);return this._subtype.validate(n,e)},e.prototype.getSubTypes=function(){return this._subtype},e.prototype.is=function(t){var e=H(t)?this._subtype:ti(t)?P(t,!1):this.preProcessSnapshot(t);return 0===this._subtype.validate(e,[{path:"",type:this._subtype}]).length},e}(k),tL="Map.put can only be used to store complex values that have an identifier type attribute";(a=h||(h={}))[a.UNKNOWN=0]="UNKNOWN",a[a.YES=1]="YES",a[a.NO=2]="NO";var tU=function(t){function e(e){return t.call(this,e,l.sH.ref.enhancer)||this}return y(e,t),e.prototype.get=function(e){return t.prototype.get.call(this,""+e)},e.prototype.has=function(e){return t.prototype.has.call(this,""+e)},e.prototype.delete=function(e){return t.prototype.delete.call(this,""+e)},e.prototype.set=function(e,n){return t.prototype.set.call(this,""+e,n)},e.prototype.put=function(t){if(!t)throw ty("Map.put cannot be used to set empty values");if(ti(t)){var e=ta(t);
1if(null===e.identifier)throw ty(tL);return this.set(e.identifier,t),t}if(t_(t)){var n=ta(this),r=n.type;if(r.identifierMode!==h.YES)throw ty(tL);var i=t[r.mapIdentifierAttribute];if(!eS(i)){var o=this.put(r.getChildType().create(t,n.environment));return this.put(P(o))}var a=""+i;return this.set(a,t),this.get(a)}throw ty("Map.put can only be used to store complex values")},e}(l.Es),tW=function(t){function e(e,n,r){void 0===r&&(r=[]);var i=t.call(this,e)||this;return i._subType=n,i.identifierMode=h.UNKNOWN,i.mapIdentifierAttribute=void 0,i.flags=u.Map,i.hookInitializers=[],i._determineIdentifierMode(),i.hookInitializers=r,i}return y(e,t),e.prototype.hooks=function(t){var n=this.hookInitializers.length>0?this.hookInitializers.concat(t):[t];return new e(this.name,this._subType,n)},e.prototype.instantiate=function(t,e,n,r){return this._determineIdentifierMode(),tn(this,t,e,n,r)},e.prototype._determineIdentifierMode=function(){if(this.identifierMode===h.UNKNOWN){var t=[];if(function t(e,n){var r,i,o=e.getSubTypes();if(o===x)return!1;if(o){var a=tm(o);try{for(var s=g(a),u=s.next();!u.done;u=s.next()){var p=u.value;if(!t(p,n))return!1}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}return e instanceof tq&&n.push(e),!0}(this._subType,t)){var e=void 0;t.forEach(function(t){if(t.identifierAttribute){if(e&&e!==t.identifierAttribute)throw ty("The objects in a map should all have the same identifier attribute, expected '"+e+"', but child of type '"+t.name+"' declared attribute '"+t.identifierAttribute+"' as identifier");e=t.identifierAttribute}}),e?(this.identifierMode=h.YES,this.mapIdentifierAttribute=e):this.identifierMode=h.NO}}},e.prototype.initializeChildNodes=function(t,e){void 0===e&&(e={});var n=t.type._subType,r={};return Object.keys(e).forEach(function(i){r[i]=n.instantiate(t,i,void 0,e[i])}),r},e.prototype.createNewInstance=function(t){return new tU(t)},e.prototype.finalizeNewInstance=function(t,e){(0,l.pA)(e,t.unbox),t.type.hookInitializers.forEach(function(t){var n=t(e);Object.keys(n).forEach(function(t){var r=n[t],i=X(e,t,r);tA(e,t,i)})}),(0,l.Zc)(e,this.willChange),(0,l.lB)(e,this.didChange)},e.prototype.describe=function(){return"Map<string, "+this._subType.describe()+">"},e.prototype.getChildren=function(t){return(0,l.zu)(t.storedValue)},e.prototype.getChildNode=function(t,e){var n=t.storedValue.get(""+e);if(!n)throw ty("Not a child "+e);return n},e.prototype.willChange=function(t){var e=ta(t.object),n=t.name;e.assertWritable({subpath:n});var r=e.type,i=r._subType;switch(t.type){case"update":var o=t.newValue;if(o===t.object.get(n))return null;Q(i,o),t.newValue=i.reconcile(e.getChildNode(n),t.newValue,e,n),r.processIdentifier(n,t.newValue);break;case"add":Q(i,t.newValue),t.newValue=i.instantiate(e,n,void 0,t.newValue),r.processIdentifier(n,t.newValue)}return t},e.prototype.processIdentifier=function(t,e){if(this.identifierMode===h.YES&&e instanceof D){var n=e.identifier;if(n!==t)throw ty("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '"+n+"', but expected: '"+t+"'")}},e.prototype.getSnapshot=function(t){var e={};
1return t.getChildren().forEach(function(t){e[t.subpath]=t.snapshot}),e},e.prototype.processInitialSnapshot=function(t){var e={};return Object.keys(t).forEach(function(n){e[n]=t[n].getSnapshot()}),e},e.prototype.didChange=function(t){var e=ta(t.object);switch(t.type){case"update":return void e.emitPatch({op:"replace",path:tz(t.name),value:t.newValue.snapshot,oldValue:t.oldValue?t.oldValue.snapshot:void 0},e);case"add":return void e.emitPatch({op:"add",path:tz(t.name),value:t.newValue.snapshot,oldValue:void 0},e);case"delete":var n=t.oldValue.snapshot;return t.oldValue.die(),void e.emitPatch({op:"remove",path:tz(t.name),oldValue:n},e)}},e.prototype.applyPatchLocally=function(t,e,n){var r=t.storedValue;switch(n.op){case"add":case"replace":r.set(e,n.value);break;case"remove":r.delete(e)}},e.prototype.applySnapshot=function(t,e){Q(this,e);var n=t.storedValue,r={};if(Array.from(n.keys()).forEach(function(t){r[t]=!1}),e)for(var i in e)n.set(i,e[i]),r[""+i]=!0;Object.keys(r).forEach(function(t){!1===r[t]&&n.delete(t)})},e.prototype.getChildType=function(){return this._subType},e.prototype.isValidSnapshot=function(t,e){var n=this;return tw(t)?q(Object.keys(t).map(function(r){return n._subType.validate(t[r],J(e,r,n._subType))})):K(e,t,"Value is not a plain object")},e.prototype.getDefaultSnapshot=function(){return tf},e.prototype.removeChild=function(t,e){t.storedValue.delete(e)},b([l.XI],e.prototype,"applySnapshot",null),e}(z),t$=function(t){function e(e,n,r){void 0===r&&(r=[]);var i=t.call(this,e)||this;return i._subType=n,i.flags=u.Array,i.hookInitializers=[],i.hookInitializers=r,i}return y(e,t),e.prototype.hooks=function(t){var n=this.hookInitializers.length>0?this.hookInitializers.concat(t):[t];return new e(this.name,this._subType,n)},e.prototype.instantiate=function(t,e,n,r){return tn(this,t,e,n,r)},e.prototype.initializeChildNodes=function(t,e){void 0===e&&(e=[]);var n=t.type._subType,r={};return e.forEach(function(e,i){var o=""+i;r[o]=n.instantiate(t,o,void 0,e)}),r},e.prototype.createNewInstance=function(t){return l.sH.array(th(t),td)},e.prototype.finalizeNewInstance=function(t,e){(0,l.Mr)(e).dehancer=t.unbox,t.type.hookInitializers.forEach(function(t){var n=t(e);Object.keys(n).forEach(function(t){var r=n[t],i=X(e,t,r);tA(e,t,i)})}),(0,l.Zc)(e,this.willChange),(0,l.lB)(e,this.didChange)},e.prototype.describe=function(){return this._subType.describe()+"[]"},e.prototype.getChildren=function(t){return t.storedValue.slice()},e.prototype.getChildNode=function(t,e){var n=Number(e);if(n<t.storedValue.length)return t.storedValue[n];throw ty("Not a child: "+e)},e.prototype.willChange=function(t){var e=ta(t.object);e.assertWritable({subpath:""+t.index});var n=e.type._subType,r=e.getChildren();switch(t.type){case"update":if(t.newValue===t.object[t.index])return null;var i=tZ(e,n,[r[t.index]],[t.newValue],[t.index]);if(!i)return null;t.newValue=i[0];break;case"splice":var o=t.index,a=t.removedCount,s=t.added,u=tZ(e,n,r.slice(o,o+a),s,s.map(function(t,e){return o+e}));if(!u)return null;t.added=u;for(var p=o+a;p<r.length;p++)r[p].setParent(e,""+(p+s.length-a))}return t},e.prototype.getSnapshot=function(t){return t.getChildren().map(function(t){return t.snapshot})},e.prototype.processInitialSnapshot=function(t){var e=[];return Object.keys(t).forEach(function(n){e.push(t[n].getSnapshot())}),e},e.prototype.didChange=function(t){var e=ta(t.object);switch(t.type){case"update":return void e.emitPatch({op:"replace",path:""+t.index,value:t.newValue.snapshot,oldValue:t.oldValue?t.oldValue.snapshot:void 0},e);case"splice":for(var n=t.removedCount-1;n>=0;n--)e.emitPatch({op:"remove",path:""+(t.index+n),oldValue:t.removed[n].snapshot},e);for(var n=0;n<t.addedCount;n++)e.emitPatch({op:"add",path:""+(t.index+n),value:e.getChildNode(""+(t.index+n)).snapshot,oldValue:void 0},e);return}},e.prototype.applyPatchLocally=function(t,e,n){var r=t.storedValue,i="-"===e?r.length:Number(e);switch(n.op){case"replace":r[i]=n.value;break;case"add":r.splice(i,0,n.value);break;case"remove":r.splice(i,1)}},e.prototype.applySnapshot=function(t,e){Q(this,e),t.storedValue.replace(e)},e.prototype.getChildType=function(){return this._subType}
1,e.prototype.isValidSnapshot=function(t,e){var n=this;return tg(t)?q(t.map(function(t,r){return n._subType.validate(t,J(e,""+r,n._subType))})):K(e,t,"Value is not an array")},e.prototype.getDefaultSnapshot=function(){return tl},e.prototype.removeChild=function(t,e){t.storedValue.splice(Number(e),1)},b([l.XI],e.prototype,"applySnapshot",null),e}(z);function tZ(t,e,n,r,i){for(var o=!0,a=0;;a++){var s,u=a<=r.length-1,p=n[a],c=u?r[a]:void 0,h=""+i[a];if(((s=c)instanceof N||s instanceof D)&&(c=c.storedValue),p||u)if(u)if(p)if(tB(p,c))n[a]=tX(e,t,h,c,p);else{for(var l=void 0,f=a;f<n.length;f++)if(tB(n[f],c)){l=n.splice(f,1)[0];break}o=!1;var d=tX(e,t,h,c,l);n.splice(a,0,d)}else{if(ti(c)&&ta(c).parent===t)throw ty("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+t.path+"/"+h+"', but it lives already at '"+ta(c).path+"'");o=!1;var d=tX(e,t,h,c);n.splice(a,0,d)}else o=!1,n.splice(a,1),p instanceof D&&p.createObservableInstanceIfNeeded(),p.die(),a--;else break}return o?null:n}function tX(t,e,n,r,i){Q(t,r);var o=function(){if(ti(r)){var o=ta(r);if(o.assertAlive(tf),null!==o.parent&&o.parent===e)return o.setParent(e,n),o}return i?t.reconcile(i,r,e,n):t.instantiate(e,n,void 0,r)}();return i&&i!==o&&(i instanceof D&&i.createObservableInstanceIfNeeded(),i.die()),o}function tB(t,e){if(!t.isAlive)return!1;if(ti(e)){var n=ta(e);return n.isAlive&&n===t}return t.snapshot===e||t instanceof D&&null!==t.identifier&&t.identifierAttribute&&tw(e)&&t.identifier===""+e[t.identifierAttribute]&&t.type.is(e)}var tG="preProcessSnapshot",tY="postProcessSnapshot";function tJ(){return ta(this).toString()}var tK={name:"AnonymousModel",properties:{},initializers:tl},tq=function(t){function e(e){var n,r=t.call(this,e.name||tK.name)||this;return r.flags=u.Object,r.named=function(t){return r.cloneAndEnhance({name:t})},r.props=function(t){return r.cloneAndEnhance({properties:t})},r.preProcessSnapshot=function(t){var e=r.preProcessor;return e?r.cloneAndEnhance({preProcessor:function(n){return e(t(n))}}):r.cloneAndEnhance({preProcessor:t})},r.postProcessSnapshot=function(t){var e=r.postProcessor;return e?r.cloneAndEnhance({postProcessor:function(n){return t(e(n))}}):r.cloneAndEnhance({postProcessor:t})},Object.assign(r,tK,e),r.properties=Object.keys(n=r.properties).reduce(function(t,e){if(e in s)throw ty("Hook '"+e+"' was defined as property. Hooks should be defined as part of the actions");var n,r,i,o=Object.getOwnPropertyDescriptor(t,e);if("get"in o)throw ty("Getters are not supported as properties. Please use views instead");var a=o.value;if(null==a)throw ty("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(tS(a))return Object.assign({},t,((n={})[e]=er(function(t){switch(typeof t){case"string":return t0;case"number":return t1;case"boolean":return t3;case"object":if(t instanceof Date)return t6}throw ty("Cannot determine primitive type from value "+t)}(a),a),n));if(a instanceof tW)return Object.assign({},t,((r={})[e]=er(a,{}),r));if(a instanceof t$)return Object.assign({},t,((i={})[e]=er(a,[]),i));if(H(a))return t;else if(1)if(1)throw ty("Invalid type definition for property '"+e+"', cannot infer a type from a value like '"+a+"' ("+typeof a+")");else throw ty("Invalid type definition for property '"+e+"', it looks like you passed an object. Try passing another model type or a types.frozen.");else throw ty("Invalid type definition for property '"+e+"', it looks like you passed a function. Did you forget to invoke it, or did you intend to declare a view / action?")},n),tI(r.properties),r.propertyNames=Object.keys(r.properties),r.identifierAttribute=r._getIdentifierAttribute(),r}return y(e,t),e.prototype._getIdentifierAttribute=function(){var t=void 0;return this.forAllProps(function(e,n){if(n.flags&u.Identifier){if(t)throw ty("Cannot define property '"+e+"' as object identifier, property '"+t+"' is already defined as identifier property");t=e}}),t},e.prototype.cloneAndEnhance=function(t){return new e({name:t.name||this.name,properties:Object.assign({}
1,this.properties,t.properties),initializers:this.initializers.concat(t.initializers||[]),preProcessor:t.preProcessor||this.preProcessor,postProcessor:t.postProcessor||this.postProcessor})},e.prototype.actions=function(t){var e=this;return this.cloneAndEnhance({initializers:[function(n){return e.instantiateActions(n,t(n)),n}]})},e.prototype.instantiateActions=function(t,e){if(!tw(e))throw ty("actions initializer should return a plain object containing actions");Object.keys(e).forEach(function(n){if(n===tG)throw ty("Cannot define action '"+tG+"', it should be defined using 'type.preProcessSnapshot(fn)' instead");if(n===tY)throw ty("Cannot define action '"+tY+"', it should be defined using 'type.postProcessSnapshot(fn)' instead");var r=e[n],i=t[n];if(n in s&&i){var o=r;r=function(){i.apply(null,arguments),o.apply(null,arguments)}}var a=r.$mst_middleware,u=r.bind(e);u.$mst_middleware=a;var p=X(t,n,u);e[n]=p,tA(t,n,p)})},e.prototype.volatile=function(t){var e=this;if("function"!=typeof t)throw ty("You passed an "+typeof t+" to volatile state as an argument, when function is expected");return this.cloneAndEnhance({initializers:[function(n){return e.instantiateVolatileState(n,t(n)),n}]})},e.prototype.instantiateVolatileState=function(t,e){if(!tw(e))throw ty("volatile state initializer should return a plain object c
1ontaining state");(0,l.hZ)(t,e)},e.prototype.extend=function(t){var e=this;return this.cloneAndEnhance({initializers:[function(n){var r=t(n),i=r.actions,o=r.views,a=r.state,s=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}(r,["actions","views","state"]);for(var u in s)throw ty("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '"+u+"'");return a&&e.instantiateVolatileState(n,a),o&&e.instantiateViews(n,o),i&&e.instantiateActions(n,i),n}]})},e.prototype.views=function(t){var e=this;return this.cloneAndEnhance({initializers:[function(n){return e.instantiateViews(n,t(n)),n}]})},e.prototype.instantiateViews=function(t,e){if(!tw(e))throw ty("views initializer should return a plain object c
1ontaining views");Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);if("get"in r)if((0,l.H8)(t,n)){var i=(0,l.Mr)(t,n);i.derivation=r.get,i.scope=t,r.set&&(i.setter=(0,l.XI)(i.name+"-setter",r.set))}else(0,l.EW)(t,n,r,!0);else if("function"==typeof r.value)tA(t,n,r.value);else throw ty("A view member should either be a function or getter based property")})},e.prototype.instantiate=function(t,e,n,r){return tn(this,t,e,n,ti(r)?r:this.applySnapshotPreProcessor(r))},e.prototype.initializeChildNodes=function(t,e){void 0===e&&(e={});var n=t.type,r={};return n.forAllProps(function(n,i){r[n]=i.instantiate(t,n,void 0,e[n])}),r},e.prototype.createNewInstance=function(t){return l.sH.object(t,tf,td)},e.prototype.finalizeNewInstance=function(t,e){tA(e,"toString",tJ),this.forAllProps(function(n){(0,l.pA)(e,n,t.unbox)}),this.initializers.reduce(function(t,e){return e(t)},e),(0,l.Zc)(e,this.willChange),(0,l.lB)(e,this.didChange)},e.prototype.willChange=function(t){var e=ta(t.object),n=t.name;e.assertWritable({subpath:n});var r=e.type.properties[n];return r&&(Q(r,t.newValue),t.newValue=r.reconcile(e.getChildNode(n),t.newValue,e,n)),t},e.prototype.didChange=function(t){var e=ta(t.object);if(e.type.properties[t.name]){var n=t.oldValue?t.oldValue.snapshot:void 0;e.emitPatch({op:"replace",path:tz(t.name),value:t.newValue.snapshot,oldValue:n},e)}},e.prototype.getChildren=function(t){var e=this,n=[];return this.forAllProps(function(r){n.push(e.getChildNode(t,r))}),n},e.prototype.getChildNode=function(t,e){if(!(e in this.properties))throw ty("Not a value property: "+e);var n=(0,l.Mr)(t.storedValue,e).value;if(!n)throw ty("Node not available for property "+e);return n},e.prototype.getSnapshot=function(t,e){var n=this;void 0===e&&(e=!0);var r={};return(this.forAllProps(function(e,i){(0,l.go)(t.storedValue,e).reportObserved(),r[e]=n.getChildNode(t,e).snapshot}),e)?this.applySnapshotPostProcessor(r):r},e.prototype.processInitialSnapshot=function(t){var e={};return Object.keys(t).forEach(function(n){e[n]=t[n].getSnapshot()}),this.applySnapshotPostProcessor(e)},e.prototype.applyPatchLocally=function(t,e,n){if("replace"!==n.op&&"add"!==n.op)throw ty("object does not support operation "+n.op);t.storedValue[e]=n.value},e.prototype.applySnapshot=function(t,e){var n=this.applySnapshotPreProcessor(e);Q(this,n),this.forAllProps(function(e){t.storedValue[e]=n[e]})},e.prototype.applySnapshotPreProcessor=function(t){var e=this.preProcessor;return e?e.call(null,t):t},e.prototype.applySnapshotPostProcessor=function(t){var e=this.postProcessor;return e?e.call(null,t):t},e.prototype.getChildType=function(t){return tD(t,1),this.properties[t]},e.prototype.isValidSnapshot=function(t,e){var n=this,r=this.applySnapshotPreProcessor(t);return tw(r)?q(this.propertyNames.map(function(t){return n.properties[t].validate(r[t],J(e,t,n.properties[t]))})):K(e,r,"Value is not a plain object")},e.prototype.forAllProps=function(t){var e=this;this.propertyNames.forEach(function(n){return t(n,e.properties[n])})},e.prototype.describe=function(){var t=this;return"{ "+this.propertyNames.map(function(e){return e+": "+t.properties[e].describe()}).join("; ")+" }"},e.prototype.getDefaultSnapshot=function(){return tf},e.prototype.removeChild=function(t,e){t.storedValue[e]=void 0},b([l.XI],e.prototype,"applySnapshot",null),e}(z),tQ=function(t){function e(e,n,r,i){void 0===i&&(i=tv);var o=t.call(this,e)||this;return o.flags=n,o.checker=r,o.initializer=i,o.flags=n,o}return y(e,t),e.prototype.describe=function(){return this.name},e.prototype.instantiate=function(t,e,n,r){return tr(this,t,e,n,r)},e.prototype.createNewInstance=function(t){return this.initializer(t)},e.prototype.isValidSnapshot=function(t,e){return tS(t)&&this.checker(t)?tl:K(e,t,"Value is not a "+("Date"===this.name?"Date or a unix milliseconds timestamp":this.name))},e}(R),t0=new tQ("string",u.String,function(t){return"string"==typeof t}),t1=new tQ("number",u.Number,function(t){return"number"==typeof t}),t2=new tQ("integer",u.Integer,function(t){return tb(t)}),t3=new tQ("boolean",u.Boolean,function(t){return"boolean"==typeof t}),t4=new tQ("null",u.Null,function(t){return null===t}),t5=new tQ("undefined",u.Undefined,function(t){return void 0===t}),t6=new tQ("Date",u.Date,function(t){return"number"==typeof t||t instanceof Date},function(t){return t instanceof Date?t:new Date(t)});t6.getSnapshot=function(t){return t.storedValue.getTime()};var t8=function(t){function e(e){var n=t.call(this,JSON.stringify(e))||this;return n.flags=u.Literal,n.value=e,n}return y(e,t),e.prototype.instantiate=function(t,e,n,r){return tr(this,t,e,n,r)},e.prototype.describe=function(){return JSON.stringify(this.value)}
1,e.prototype.isValidSnapshot=function(t,e){return tS(t)&&t===this.value?tl:K(e,t,"Value is not a literal "+JSON.stringify(this.value))},e}(R);function t7(t){return tO(t,tS,"primitive",1),new t8(t)}var t9=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o._subtype=n,o._predicate=r,o._message=i,o}return y(e,t),Object.defineProperty(e.prototype,"flags",{get:function(){return this._subtype.flags|u.Refinement},enumerable:!1,configurable:!0}),e.prototype.describe=function(){return this.name},e.prototype.instantiate=function(t,e,n,r){return this._subtype.instantiate(t,e,n,r)},e.prototype.isAssignableFrom=function(t){return this._subtype.isAssignableFrom(t)},e.prototype.isValidSnapshot=function(t,e){var n=this._subtype.validate(t,e);if(n.length>0)return n;var r=ti(t)?ta(t).snapshot:t;return this._predicate(r)?tl:K(e,t,this._message(t))},e.prototype.reconcile=function(t,e,n,r){return this._subtype.reconcile(t,e,n,r)},e.prototype.getSubTypes=function(){return this._subtype},e}(k),et=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i._types=n,i._eager=!0,i._dispatcher=(r=v({eager:!0,dispatcher:void 0},r)).dispatcher,r.eager||(i._eager=!1),i}return y(e,t),Object.defineProperty(e.prototype,"flags",{get:function(){var t=u.Union;return this._types.forEach(function(e){t|=e.flags}),t},enumerable:!1,configurable:!0}),e.prototype.isAssignableFrom=function(t){return this._types.some(function(e){return e.isAssignableFrom(t)})},e.prototype.describe=function(){return"("+this._types.map(function(t){return t.describe()}).join(" | ")+")"},e.prototype.instantiate=function(t,e,n,r){var i=this.determineType(r,void 0);if(!i)throw ty("No matching type for union "+this.describe());return i.instantiate(t,e,n,r)},e.prototype.reconcile=function(t,e,n,r){var i=this.determineType(e,t.type);if(!i)throw ty("No matching type for union "+this.describe());return i.reconcile(t,e,n,r)},e.prototype.determineType=function(t,e){return this._dispatcher?this._dispatcher(t):e?e.is(t)?e:this._types.filter(function(t){return t!==e}).find(function(e){return e.is(t)}):this._types.find(function(e){return e.is(t)})},e.prototype.isValidSnapshot=function(t,e){if(this._dispatcher)return this._dispatcher(t).validate(t,e);for(var n=[],r=0,i=0;i<this._types.length;i++){var o=this._types[i].validate(t,e);if(0===o.length)if(this._eager)return tl;else r++;else n.push(o)}return 1===r?tl:K(e,t,"No type is applicable for the union").concat(q(n))},e.prototype.getSubTypes=function(){return this._types},e}(k);function ee(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=H(t)?void 0:t,i=H(t)?w([t],e):e;return new et("("+i.map(function(t){return t.name}).join(" | ")+")",i,r)}var en=function(t){function e(e,n,r){var i=t.call(this,e.name)||this;return i._subtype=e,i._defaultValue=n,i.optionalValues=r,i}return y(e,t),Object.defineProperty(e.prototype,"flags",{get:function(){return this._subtype.flags|u.Optional},enumerable:!1,configurable:!0}),e.prototype.describe=function(){return this._subtype.describe()+"?"},e.prototype.instantiate=function(t,e,n,r){if(this.optionalValues.indexOf(r)>=0){var i=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(t,e,n,i)}return this._subtype.instantiate(t,e,n,r)},e.prototype.reconcile=function(t,e,n,r){return this._subtype.reconcile(t,0>this.optionalValues.indexOf(e)&&this._subtype.is(e)?e:this.getDefaultInstanceOrSnapshot(),n,r)},e.prototype.getDefaultInstanceOrSnapshot=function(){var t="function"==typeof this._defaultValue?this._defaultValue():this._defaultValue;return"function"==typeof this._defaultValue&&Q(this,t),t},e.prototype.isValidSnapshot=function(t,e){return this.optionalValues.indexOf(t)>=0?tl:this._subtype.validate(t,e)},e.prototype.isAssignableFrom=function(t){return this._subtype.isAssignableFrom(t)},e.prototype.getSubTypes=function(){return this._subtype},e}(k);function er(t,e,n){if("function"!=typeof e&&ti(e))throw ty("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead");return M(t,1),new en(t,e,n||ei)}var ei=[void 0],eo=er(t5,void 0),ea=er(t4,null);function es(t){return M(t,1),ee(t,eo)}var eu=function(t){function e(e,n){var r=t.call(this,e)||this;return r._definition=n,r}return y(e,t),Object.defineProperty(e.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|u.Late}
1,enumerable:!1,configurable:!0}),e.prototype.getSubType=function(t){if(!this._subType){var e=void 0;try{e=this._definition()}catch(t){if(t instanceof ReferenceError)e=void 0;else throw t}if(t&&void 0===e)throw ty("Late type seems to be used too early, the definition (still) returns undefined");e&&(this._subType=e)}return this._subType},e.prototype.instantiate=function(t,e,n,r){return this.getSubType(!0).instantiate(t,e,n,r)},e.prototype.reconcile=function(t,e,n,r){return this.getSubType(!0).reconcile(t,e,n,r)},e.prototype.describe=function(){var t=this.getSubType(!1);return t?t.name:"<uknown late type>"},e.prototype.isValidSnapshot=function(t,e){var n=this.getSubType(!1);return n?n.validate(t,e):tl},e.prototype.isAssignableFrom=function(t){var e=this.getSubType(!1);return!!e&&e.isAssignableFrom(t)},e.prototype.getSubTypes=function(){return this.getSubType(!1)||x},e}(k),ep=function(t){function e(e){var n=t.call(this,e?"frozen("+e.name+")":"frozen")||this;return n.subType=e,n.flags=u.Frozen,n}return y(e,t),e.prototype.describe=function(){return"<any immutable value>"},e.prototype.instantiate=function(t,e,n,r){return tr(this,t,e,n,function t(t){return t}(r))},e.prototype.isValidSnapshot=function(t,e){return"function"==typeof t?K(e,t,"Value is not serializable and cannot be frozen"):this.subType?this.subType.validate(t,e):tl},e}(R),ec=new ep,eh=function(){function t(t,e){if(this.targetType=e,eS(t))this.identifier=t;else if(ti(t)){var n=ta(t);if(!n.identifierAttribute)throw ty("Can only store references with a defined identifier attribute.");var r=n.unnormalizedIdentifier;if(null==r)throw ty("Can only store references to tree nodes with a defined identifier.");this.identifier=r}else throw ty("Can only store references to tree nodes or identifiers, got: '"+t+"'")}return t.prototype.updateResolvedReference=function(t){var e=""+this.identifier,n=t.root,r=n.identifierCache.getLastCacheModificationPerId(e);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==r){var i=this.targetType,o=n.identifierCache.resolve(i,e);if(!o)throw new el("[mobx-state-tree] Failed to resolve reference '"+this.identifier+"' to type '"+this.targetType.name+"' (from node: "+t.path+")");this.resolvedReference={node:o,lastCacheModification:r}}},Object.defineProperty(t.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),t}(),el=function(t){function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return y(e,t),e}(Error),ef=function(t){function e(e,n){var r=t.call(this,"reference("+e.name+")")||this;return r.targetType=e,r.onInvalidated=n,r.flags=u.Reference,r}return y(e,t),e.prototype.describe=function(){return this.name},e.prototype.isAssignableFrom=function(t){return this.targetType.isAssignableFrom(t)},e.prototype.isValidSnapshot=function(t,e){return eS(t)?tl:K(e,t,"Value is not a valid identifier, which is a string or a number")},e.prototype.fireInvalidated=function(t,e,n,r){var i=e.parent;if(i&&i.isAlive){var o=i.storedValue;o&&this.onInvalidated({cause:t,parent:o,invalidTarget:r?r.storedValue:void 0,invalidId:n,replaceRef:function(t){I(e.root.storedValue,{op:"replace",value:t,path:e.path})},removeRef:function(){var t;H(t=i.type)&&(t.flags&u.Object)>0?this.replaceRef(void 0):I(e.root.storedValue,{op:"remove",path:e.path})}})}},e.prototype.addTargetNodeWatcher=function(t,e){var n=this,r=this.getValue(t);if(r){var i=ta(r),o=function(r,o){var a=function(t){switch(t){case s.beforeDestroy:return"destroy";case s.beforeDetach:return"detach";default:return}}(o);a&&n.fireInvalidated(a,t,e,i)},a=i.registerHook(s.beforeDetach,o),u=i.registerHook(s.beforeDestroy,o);return function(){a(),u()}}},e.prototype.watchTargetNodeForInvalidations=function(t,e,n){var r,i=this;if(this.onInvalidated){t.registerHook(s.beforeDestroy,function(){r&&r()});var o=function(o){r&&r();var a=t.parent,s=a&&a.storedValue;a&&a.isAlive&&s&&((n?!!n.get(e,s):t.root.identifierCache.has(i.targetType,""+e))?r=i.addTargetNodeWatcher(t,e):o||i.fireInvalidated("invalidSnapsh
1otReference",t,e,null))};t.state===c.FINALIZED?o(!0):(t.isRoot||t.root.registerHook(s.afterCreationFinalization,function(){t.parent&&t.parent.createObservableInstanceIfNeeded()}),t.registerHook(s.afterAttach,function(){o(!1)}))}},e}(R),ed=function(t){function e(e,n){return t.call(this,e,n)||this}return y(e,t),e.prototype.getValue=function(t){if(t.isAlive)return t.storedValue.resolvedValue},e.prototype.getSnapshot=function(t){return t.storedValue.identifier},e.prototype.instantiate=function(t,e,n,r){var i=ti(r)?(to(r,1),ta(r).identifier):r,o=new eh(r,this.targetType),a=tr(this,t,e,n,o);return o.node=a,this.watchTargetNodeForInvalidations(a,i,void 0),a},e.prototype.reconcile=function(t,e,n,r){if(!t.isDetaching&&t.type===this){var i=ti(e),o=t.storedValue;if(!i&&o.identifier===e||i&&o.resolvedValue===e)return t.setParent(n,r),t}var a=this.instantiate(n,r,void 0,e);return t.die(),a},e}(ef),ey=function(t){function e(e,n,r){var i=t.call(this,e,r)||this;return i.options=n,i}return y(e,t),e.prototype.getValue=function(t){if(t.isAlive)return this.options.get(t.storedValue,t.parent?t.parent.storedValue:null)},e.prototype.getSnapshot=function(t){return t.storedValue},e.prototype.instantiate=function(t,e,n,r){var i=ti(r)?this.options.set(r,t?t.storedValue:null):r,o=tr(this,t,e,n,i);return this.watchTargetNodeForInvalidations(o,i,this.options),o},e.prototype.reconcile=function(t,e,n,r){var i=ti(e)?this.options.set(e,t?t.storedValue:null):e;if(!t.isDetaching&&t.type===this&&t.storedValue===i)return t.setParent(n,r),t;var o=this.instantiate(n,r,void 0,i);return t.die(),o},e}(ef);function ev(t,e){M(t,1);var n=e||void 0,r=e?e.onInvalidated:void 0;return n&&(n.get||n.set)?new ey(t,{get:n.get,set:n.set},r):new ed(t,r)}var eb=function(t){function e(e,n){var r=t.call(this,e)||this;return r.validType=n,r.flags=u.Identifier,r}return y(e,t),e.prototype.instantiate=function(t,e,n,r){if(!t||!(t.type instanceof tq))throw ty("Identifier types can only be instantiated as direct child of a model type");return tr(this,t,e,n,r)},e.prototype.reconcile=function(t,e,n,r){if(t.storedValue!==e)throw ty("Tried to change identifier from '"+t.storedValue+"' to '"+e+"'. Changing identifiers is not allowed.");return t.setParent(n,r),t},e.prototype.isValidSnapshot=function(t,e){return typeof t!==this.validType?K(e,t,"Value is not a valid "+this.describe()+", expected a "+this.validType):tl},e}(R),eg=function(t){function e(){var e=t.call(this,"identifier","string")||this;return e.flags=u.Identifier,e}return y(e,t),e.prototype.describe=function(){return"identifier"},e}(eb),em=function(t){function e(){return t.call(this,"identifierNumber","number")||this}return y(e,t),e.prototype.getSnapshot=function(t){return t.storedValue},e.prototype.describe=function(){return"identifierNumber"},e}(eb),ew=new eg,e_=new em;function eS(t){return"string"==typeof t||"number"==typeof t}var eI=function(t){function e(e){var n=t.call(this,e.name)||this;return n.options=e,n.flags=u.Custom,n}return y(e,t),e.prototype.describe=function(){return this.name},e.prototype.isValidSnapshot=function(t,e){if(this.options.isTargetType(t))return tl;var n=this.options.getValidationMessage(t);return n?K(e,t,"Invalid value for type '"+this.name+"': "+n):tl},e.prototype.getSnapshot=function(t){return this.options.toSnapshot(t.storedValue)},e.prototype.instantiate=function(t,e,n,r){var i=this.options.isTargetType(r)?r:this.options.fromSnapshot(r,t&&t.root.environment);return tr(this,t,e,n,i)},e.prototype.reconcile=function(t,e,n,r){var i=!this.options.isTargetType(e);if(!t.isDetaching&&t.type===this&&(i?e===t.snapshot:e===t.storedValue))return t.setParent(n,r),t;var o=i?this.options.fromSnapshot(e,n.root.environment):e,a=this.instantiate(n,r,void 0,o);return t.die(),a},e}(R),eA={enumeration:function(t,e){var n=ee.apply(void 0,w(("string"==typeof t?e:t).map(function(t){return t7(""+t)})));return"string"==typeof t&&(n.name=t),n},model:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new tq({name:"string"==typeof t[0]?t.shift():"AnonymousModel",properties:t.shift()||{}})},compose:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="string"==typeof t[0],r=n?t[0]:"AnonymousModel";return n&&t.shift(),t.reduce(function(t,e){return t.cloneAndEnhance({name:t.name+"_"+e.name,properties:e.properties,initializer
1s:e.initializers,preProcessor:function(n){return e.applySnapshotPreProcessor(t.applySnapshotPreProcessor(n))},postProcessor:function(n){return e.applySnapshotPostProcessor(t.applySnapshotPostProcessor(n))}})}).named(r)},custom:function(t){return new eI(t)},reference:ev,safeReference:function(t,e){var n=ev(t,v(v({},e),{onInvalidated:function(t){e&&e.onInvalidated&&e.onInvalidated(t),t.removeRef()}}));return e&&!1===e.acceptsUndefined?n:es(n)},union:ee,optional:er,literal:t7,maybe:es,maybeNull:function(t){return M(t,1),ee(t,ea)},refinement:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="string"==typeof t[0]?t.shift():H(t[0])?t[0].name:null,r=t[0],i=t[1],o=t[2]?t[2]:function(t){return"Value does not respect the refinement predicate"};return M(r,[1,2]),tD(n,1),tj(i,[2,3]),tj(o,[3,4]),new t9(n,r,i,o)},string:t0,boolean:t3,number:t1,integer:t2,Date:t6,map:function(t){return new tW("map<string, "+t.name+">",t)},array:function(t){return M(t,1),new t$(t.name+"[]",t)},frozen:function(t){return 0==arguments.length?ec:H(t)?new ep(t):er(ec,t)},identifier:ew,identifierNumber:e_,late:function(t,e){var n="string"==typeof t?t:"late("+t.toString()+")",r="string"==typeof t?e:t;return new eu(n,r)},undefined:t5,null:t4,snapshotProcessor:function(t,e,n){return M(t,1),new tF(t,e,n)}}}}]);
2//# 

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.