-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.04d8945855f68351d8cc.bundle.js
1 lines (1 loc) · 881 KB
/
main.04d8945855f68351d8cc.bundle.js
1
webpackJsonp([1],{"+VeI":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("JEJ4"),o=n("pHuv"),s=n("F1yO"),a=n("PKQO"),u=n("xfHL");n("VzZx"),e.RepoManager=function(){function t(){this.repos_={},this.useRestClient_=!1}return t.getInstance=function(){return r||(r=new t),r},t.prototype.interrupt=function(){for(var t in this.repos_)for(var e in this.repos_[t])this.repos_[t][e].interrupt()},t.prototype.resume=function(){for(var t in this.repos_)for(var e in this.repos_[t])this.repos_[t][e].resume()},t.prototype.databaseFromApp=function(t,e){var n=e||t.options.databaseURL;void 0===n&&s.fatal("Can't determine Firebase Database URL. Be sure to include databaseURL option when calling firebase.initializeApp().");var r=a.parseRepoInfo(n),i=r.repoInfo;return u.validateUrl("Invalid Firebase Database URL",1,r),r.path.isEmpty()||s.fatal("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(i,t).database},t.prototype.deleteRepo=function(t){var e=i.safeGet(this.repos_,t.app.name);e&&i.safeGet(e,t.repoInfo_.toURLString())===t||s.fatal("Database "+t.app.name+"("+t.repoInfo_+") has already been deleted."),t.interrupt(),delete e[t.repoInfo_.toURLString()]},t.prototype.createRepo=function(t,e){var n=i.safeGet(this.repos_,e.name);n||(this.repos_[e.name]=n={});var r=i.safeGet(n,t.toURLString());return r&&s.fatal("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),r=new o.Repo(t,this.useRestClient_,e),n[t.toURLString()]=r,r},t.prototype.forceRestClient=function(t){this.useRestClient_=t},t}()},"/0OS":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4"),i=n("ertD"),o=n("JEJ4");e.ChildChangeAccumulator=function(){function t(){this.changeMap_={}}return t.prototype.trackChildChange=function(t){var e=t.type,n=t.childName;o.assert(e==i.Change.CHILD_ADDED||e==i.Change.CHILD_CHANGED||e==i.Change.CHILD_REMOVED,"Only child changes supported for tracking"),o.assert(".priority"!==n,"Only non-priority child changes can be tracked.");var s=r.safeGet(this.changeMap_,n);if(s){var a=s.type;if(e==i.Change.CHILD_ADDED&&a==i.Change.CHILD_REMOVED)this.changeMap_[n]=i.Change.childChangedChange(n,t.snapshotNode,s.snapshotNode);else if(e==i.Change.CHILD_REMOVED&&a==i.Change.CHILD_ADDED)delete this.changeMap_[n];else if(e==i.Change.CHILD_REMOVED&&a==i.Change.CHILD_CHANGED)this.changeMap_[n]=i.Change.childRemovedChange(n,s.oldSnap);else if(e==i.Change.CHILD_CHANGED&&a==i.Change.CHILD_ADDED)this.changeMap_[n]=i.Change.childAddedChange(n,t.snapshotNode);else{if(e!=i.Change.CHILD_CHANGED||a!=i.Change.CHILD_CHANGED)throw o.assertionError("Illegal combination of changes: "+t+" occurred after "+s);this.changeMap_[n]=i.Change.childChangedChange(n,t.snapshotNode,s.oldSnap)}}else this.changeMap_[n]=t},t.prototype.getChanges=function(){return r.getValues(this.changeMap_)},t}()},"/68J":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("gOHv"),i=n("kCHx"),o=n("fvGz"),s=n("JEJ4");e.Merge=function(){function t(t,e,n){this.source=t,this.path=e,this.children=n,this.type=r.OperationType.MERGE}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){var n=this.children.subtree(new o.Path(e));return n.isEmpty()?null:n.value?new i.Overwrite(this.source,o.Path.Empty,n.value):new t(this.source,o.Path.Empty,n)}return s.assert(this.path.getFront()===e,"Can't get a merge for a child not on the path of the operation"),new t(this.source,this.path.popFront(),this.children)},t.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},t}()},"/HC2":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4"),i=n("JEJ4");e.StatsCollection=function(){function t(){this.counters_={}}return t.prototype.incrementCounter=function(t,e){void 0===e&&(e=1),i.contains(this.counters_,t)||(this.counters_[t]=0),this.counters_[t]+=e},t.prototype.get=function(){return r.deepCopy(this.counters_)},t}()},"/byE":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONSTANTS={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"}},"/fob":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i,o=n("6Xbx"),s=n("GboV"),a=n("F1yO"),u=n("p+VM"),c=n("04zk");e.setNodeFromJSON=function(t){r=t},e.setMaxNode=function(t){i=t};var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e.prototype.compare=function(t,e){var n=t.node.getPriority(),r=e.node.getPriority(),i=n.compareTo(r);return 0===i?a.nameCompare(t.name,e.name):i},e.prototype.isDefinedOn=function(t){return!t.getPriority().isEmpty()},e.prototype.indexedValueChanged=function(t,e){return!t.getPriority().equals(e.getPriority())},e.prototype.minPost=function(){return u.NamedNode.MIN},e.prototype.maxPost=function(){return new u.NamedNode(a.MAX_NAME,new c.LeafNode("[PRIORITY-POST]",i))},e.prototype.makePost=function(t,e){var n=r(t);return new u.NamedNode(e,new c.LeafNode("[PRIORITY-POST]",n))},e.prototype.toString=function(){return".priority"},e}(s.Index);e.PriorityIndex=l,e.PRIORITY_INDEX=new l},"/ygB":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.contains=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.safeGet=function(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]},e.forEach=function(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])},e.extend=function(t,n){return e.forEach(n,function(e,n){t[e]=n}),t},e.clone=function(t){return e.extend({},t)},e.isNonNullObject=function(t){return"object"==typeof t&&null!==t},e.isEmpty=function(t){for(var e in t)return!1;return!0},e.getCount=function(t){var e=0;for(var n in t)e++;return e},e.map=function(t,e,n){var r={};for(var i in t)r[i]=e.call(n,t[i],i,t);return r},e.findKey=function(t,e,n){for(var r in t)if(e.call(n,t[r],r,t))return r},e.findValue=function(t,n,r){var i=e.findKey(t,n,r);return i&&t[i]},e.getAnyKey=function(t){for(var e in t)return e},e.getValues=function(t){var e=[],n=0;for(var r in t)e[n++]=t[r];return e},e.every=function(t,e){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&!e(n,t[n]))return!1;return!0}},0:function(t,e,n){t.exports=n("cDNt")},"04zk":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("JEJ4"),o=n("F1yO"),s=n("3FiG");e.LeafNode=function(){function t(e,n){void 0===n&&(n=t.__childrenNodeConstructor.EMPTY_NODE),this.value_=e,this.priorityNode_=n,this.lazyHash_=null,i.assert(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),s.validatePriorityNode(this.priorityNode_)}return Object.defineProperty(t,"__childrenNodeConstructor",{get:function(){return r},set:function(t){r=t},enumerable:!0,configurable:!0}),t.prototype.isLeafNode=function(){return!0},t.prototype.getPriority=function(){return this.priorityNode_},t.prototype.updatePriority=function(e){return new t(this.value_,e)},t.prototype.getImmediateChild=function(e){return".priority"===e?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.getChild=function(e){return e.isEmpty()?this:".priority"===e.getFront()?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.hasChild=function(){return!1},t.prototype.getPredecessorChildName=function(t,e){return null},t.prototype.updateImmediateChild=function(e,n){return".priority"===e?this.updatePriority(n):n.isEmpty()&&".priority"!==e?this:t.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,n).updatePriority(this.priorityNode_)},t.prototype.updateChild=function(e,n){var r=e.getFront();return null===r?n:n.isEmpty()&&".priority"!==r?this:(i.assert(".priority"!==r||1===e.getLength(),".priority must be the last token in a path"),this.updateImmediateChild(r,t.__childrenNodeConstructor.EMPTY_NODE.updateChild(e.popFront(),n)))},t.prototype.isEmpty=function(){return!1},t.prototype.numChildren=function(){return 0},t.prototype.forEachChild=function(t,e){return!1},t.prototype.val=function(t){return t&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.priorityNode_.isEmpty()||(t+="priority:"+s.priorityHashText(this.priorityNode_.val())+":");var e=typeof this.value_;t+=e+":",t+="number"===e?o.doubleToIEEE754String(this.value_):this.value_,this.lazyHash_=o.sha1(t)}return this.lazyHash_},t.prototype.getValue=function(){return this.value_},t.prototype.compareTo=function(e){return e===t.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof t.__childrenNodeConstructor?-1:(i.assert(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))},t.prototype.compareToLeafNode_=function(e){var n=typeof e.value_,r=typeof this.value_,o=t.VALUE_TYPE_ORDER.indexOf(n),s=t.VALUE_TYPE_ORDER.indexOf(r);return i.assert(o>=0,"Unknown leaf type: "+n),i.assert(s>=0,"Unknown leaf type: "+r),o===s?"object"===r?0:this.value_<e.value_?-1:this.value_===e.value_?0:1:s-o},t.prototype.withIndex=function(){return this},t.prototype.isIndexed=function(){return!0},t.prototype.equals=function(t){return t===this||!!t.isLeafNode()&&this.value_===t.value_&&this.priorityNode_.equals(t.priorityNode_)},t.VALUE_TYPE_ORDER=["object","boolean","number","string"],t}()},"0dLi":function(t,e){String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return this.substr(!e||e<0?0:+e,t.length)===t})},"0hmO":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("6Xbx"),i=n("JEJ4"),o=n("YY8E"),s=n("JEJ4"),a=function(t){function e(){var e=t.call(this,["online"])||this;return e.online_=!0,"undefined"==typeof window||"undefined"==typeof window.addEventListener||s.isMobileCordova()||(window.addEventListener("online",function(){e.online_||(e.online_=!0,e.trigger("online",!0))},!1),window.addEventListener("offline",function(){e.online_&&(e.online_=!1,e.trigger("online",!1))},!1)),e}return r.__extends(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return i.assert("online"===t,"Unknown event type: "+t),[this.online_]},e.prototype.currentlyOnline=function(){return this.online_},e}(o.EventEmitter);e.OnlineMonitor=a},"0nO6":function(t,e,n){"use strict";n.d(e,"b",function(){return l}),n.d(e,"n",function(){return _}),n.d(e,"a",function(){return b}),n.d(e,"c",function(){return w}),n.d(e,"o",function(){return O}),n.d(e,"p",function(){return H}),n.d(e,"q",function(){return G}),n.d(e,"r",function(){return tt}),n.d(e,"s",function(){return at}),n.d(e,"h",function(){return ft}),n.d(e,"j",function(){return ct}),n.d(e,"e",function(){return ht}),n.d(e,"k",function(){return lt}),n.d(e,"t",function(){return vt}),n.d(e,"v",function(){return dt}),n.d(e,"f",function(){return yt}),n.d(e,"d",function(){return Z}),n.d(e,"g",function(){return Q}),n.d(e,"i",function(){return Y}),n.d(e,"m",function(){return p}),n.d(e,"w",function(){return d}),n.d(e,"l",function(){return mt}),n.d(e,"u",function(){return bt}),n.d(e,"x",function(){return _t}),n.d(e,"z",function(){return gt}),n.d(e,"y",function(){return S}),n.d(e,"A",function(){return I});var r=n("6Xbx"),i=n("LMZF"),o=n("Jsyr"),s=n("CASk"),a=n("dmC+"),u=n("RyBE"),c=function(){function t(){}return Object.defineProperty(t.prototype,"value",{get:function(){return this.control?this.control.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.control?this.control.valid:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"invalid",{get:function(){return this.control?this.control.invalid:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pending",{get:function(){return this.control?this.control.pending:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.control?this.control.disabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return this.control?this.control.enabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return this.control?this.control.errors:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pristine",{get:function(){return this.control?this.control.pristine:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return this.control?this.control.dirty:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"touched",{get:function(){return this.control?this.control.touched:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.control?this.control.status:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"untouched",{get:function(){return this.control?this.control.untouched:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"statusChanges",{get:function(){return this.control?this.control.statusChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valueChanges",{get:function(){return this.control?this.control.valueChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.reset=function(t){void 0===t&&(t=void 0),this.control&&this.control.reset(t)},t.prototype.hasError=function(t,e){return!!this.control&&this.control.hasError(t,e)},t.prototype.getError=function(t,e){return this.control?this.control.getError(t,e):null},t}(),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),Object.defineProperty(e.prototype,"formDirective",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),e}(c);function h(t){return null==t||0===t.length}var p=new i.o("NgValidators"),f=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,d=function(){function t(){}return t.min=function(t){return function(e){if(h(e.value)||h(t))return null;var n=parseFloat(e.value);return!isNaN(n)&&n<t?{min:{min:t,actual:e.value}}:null}},t.max=function(t){return function(e){if(h(e.value)||h(t))return null;var n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}},t.required=function(t){return h(t.value)?{required:!0}:null},t.requiredTrue=function(t){return!0===t.value?null:{required:!0}},t.email=function(t){return f.test(t.value)?null:{email:!0}},t.minLength=function(t){return function(e){if(h(e.value))return null;var n=e.value?e.value.length:0;return n<t?{minlength:{requiredLength:t,actualLength:n}}:null}},t.maxLength=function(t){return function(e){var n=e.value?e.value.length:0;return n>t?{maxlength:{requiredLength:t,actualLength:n}}:null}},t.pattern=function(e){return e?("string"==typeof e?(r="","^"!==e.charAt(0)&&(r+="^"),r+=e,"$"!==e.charAt(e.length-1)&&(r+="$"),n=new RegExp(r)):(r=e.toString(),n=e),function(t){if(h(t.value))return null;var e=t.value;return n.test(e)?null:{pattern:{requiredPattern:r,actualValue:e}}}):t.nullValidator;var n,r},t.nullValidator=function(t){return null},t.compose=function(t){if(!t)return null;var e=t.filter(v);return 0==e.length?null:function(t){return g(function(t,n){return e.map(function(e){return e(t)})}(t))}},t.composeAsync=function(t){if(!t)return null;var e=t.filter(v);return 0==e.length?null:function(t){var n=function(t,n){return e.map(function(e){return e(t)})}(t).map(y);return a.a.call(Object(o.a)(n),g)}},t}();function v(t){return null!=t}function y(t){var e=Object(i._9)(t)?Object(s.a)(t):t;if(!Object(i._8)(e))throw new Error("Expected validator to return Promise or Observable.");return e}function g(t){var e=t.reduce(function(t,e){return null!=e?Object(r.__assign)({},t,e):t},{});return 0===Object.keys(e).length?null:e}var _=new i.o("NgValueAccessor"),m=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t}(),b=new i.o("CompositionEventMode"),w=function(){function t(t,e,n){var r;this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=function(t){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=(r=Object(u.r)()?Object(u.r)().getUserAgent():"",!/android (\d+)/.test(r.toLowerCase())))}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._handleInput=function(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)},t.prototype._compositionStart=function(){this._composing=!0},t.prototype._compositionEnd=function(t){this._composing=!1,this._compositionMode&&this.onChange(t)},t}();function E(t){return t.validate?function(e){return t.validate(e)}:t}function C(t){return t.validate?function(e){return t.validate(e)}:t}var S=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)},t.prototype.registerOnChange=function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t}();function T(){throw new Error("unimplemented")}var O=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._parent=null,e.name=null,e.valueAccessor=null,e._rawValidators=[],e._rawAsyncValidators=[],e}return Object(r.__extends)(e,t),Object.defineProperty(e.prototype,"validator",{get:function(){return T()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return T()},enumerable:!0,configurable:!0}),e}(c),I=function(){function t(){this._accessors=[]}return t.prototype.add=function(t,e){this._accessors.push([t,e])},t.prototype.remove=function(t){for(var e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)},t.prototype.select=function(t){var e=this;this._accessors.forEach(function(n){e._isSameGroup(n,t)&&n[1]!==t&&n[1].fireUncheck(t.value)})},t.prototype._isSameGroup=function(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name},t}(),N=function(){function t(t,e,n,r){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return t.prototype.ngOnInit=function(){this._control=this._injector.get(O),this._checkName(),this._registry.add(this._control,this)},t.prototype.ngOnDestroy=function(){this._registry.remove(this)},t.prototype.writeValue=function(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)},t.prototype.registerOnChange=function(t){var e=this;this._fn=t,this.onChange=function(){t(e.value),e._registry.select(e)}},t.prototype.fireUncheck=function(t){this.writeValue(t)},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._checkName=function(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)},t.prototype._throwNameError=function(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type="radio" formControlName="food" name="food">\n ')},t}();function x(t,e){return e.path.concat([t])}function A(t,e){t||D(e,"Cannot find control with"),e.valueAccessor||D(e,"No value accessor for form control with"),t.validator=d.compose([t.validator,e.validator]),t.asyncValidator=d.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(function(n){t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&P(t,e)})}(t,e),function(t,e){t.registerOnChange(function(t,n){e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(function(){t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&P(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(function(t){e.valueAccessor.setDisabledState(t)}),e._rawValidators.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(function(){return t.updateValueAndValidity()})}),e._rawAsyncValidators.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(function(){return t.updateValueAndValidity()})})}function P(t,e){e.viewToModelUpdate(t._pendingValue),t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),t._pendingChange=!1}function R(t,e){null==t&&D(e,"Cannot find control with"),t.validator=d.compose([t.validator,e.validator]),t.asyncValidator=d.composeAsync([t.asyncValidator,e.asyncValidator])}function k(t){return D(t,"There is no FormControl instance attached to form control element with")}function D(t,e){var n;throw n=t.path.length>1?"path: '"+t.path.join(" -> ")+"'":t.path[0]?"name: '"+t.path+"'":"unspecified name attribute",new Error(e+" "+n)}function j(t){return null!=t?d.compose(t.map(E)):null}function M(t){return null!=t?d.composeAsync(t.map(C)):null}function L(t,e){if(!t.hasOwnProperty("model"))return!1;var n=t.model;return!!n.isFirstChange()||!Object(i._10)(e,n.currentValue)}var F=[m,function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))},t.prototype.registerOnChange=function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t}(),S,function(){function t(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=i._10}return Object.defineProperty(t.prototype,"compareWith",{set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){this.value=t;var e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=function(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),(t+": "+e).slice(0,50))}(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){e.value=e._getOptionValue(n),t(e.value)}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._registerOption=function(){return(this._idCounter++).toString()},t.prototype._getOptionId=function(t){for(var e=0,n=Array.from(this._optionMap.keys());e<n.length;e++){var r=n[e];if(this._compareWith(this._optionMap.get(r),t))return r}return null},t.prototype._getOptionValue=function(t){var e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t},t}(),function(){function t(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=i._10}return Object.defineProperty(t.prototype,"compareWith",{set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){var e,n=this;if(this.value=t,Array.isArray(t)){var r=t.map(function(t){return n._getOptionId(t)});e=function(t,e){t._setSelected(r.indexOf(e.toString())>-1)}}else e=function(t,e){t._setSelected(!1)};this._optionMap.forEach(e)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){var r=[];if(n.hasOwnProperty("selectedOptions"))for(var i=n.selectedOptions,o=0;o<i.length;o++){var s=i.item(o),a=e._getOptionValue(s.value);r.push(a)}else for(i=n.options,o=0;o<i.length;o++)(s=i.item(o)).selected&&(a=e._getOptionValue(s.value),r.push(a));e.value=r,t(r)}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._registerOption=function(t){var e=(this._idCounter++).toString();return this._optionMap.set(e,t),e},t.prototype._getOptionId=function(t){for(var e=0,n=Array.from(this._optionMap.keys());e<n.length;e++){var r=n[e];if(this._compareWith(this._optionMap.get(r)._value,t))return r}return null},t.prototype._getOptionValue=function(t){var e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e)._value:t},t}(),N];function V(t,e){t._syncPendingControls(),e.forEach(function(t){var e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function U(t,e){if(!e)return null;var n=void 0,r=void 0,i=void 0;return e.forEach(function(e){var o;e.constructor===w?n=e:(o=e,F.some(function(t){return o.constructor===t})?(r&&D(t,"More than one built-in value accessor matches form control with"),r=e):(i&&D(t,"More than one custom value accessor matches form control with"),i=e))}),i||r||n||(D(t,"No valid value accessor for form control with"),null)}function B(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var W=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormGroup(this)},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormGroup(this)},Object.defineProperty(e.prototype,"control",{get:function(){return this.formDirective.getFormGroup(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return x(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return j(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return M(this._asyncValidators)},enumerable:!0,configurable:!0}),e.prototype._checkParentType=function(){},e}(l),q=function(){function t(t){this._cd=t}return Object.defineProperty(t.prototype,"ngClassUntouched",{get:function(){return!!this._cd.control&&this._cd.control.untouched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassTouched",{get:function(){return!!this._cd.control&&this._cd.control.touched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassPristine",{get:function(){return!!this._cd.control&&this._cd.control.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassDirty",{get:function(){return!!this._cd.control&&this._cd.control.dirty},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassValid",{get:function(){return!!this._cd.control&&this._cd.control.valid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassInvalid",{get:function(){return!!this._cd.control&&this._cd.control.invalid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassPending",{get:function(){return!!this._cd.control&&this._cd.control.pending},enumerable:!0,configurable:!0}),t}(),H=function(t){function e(e){return t.call(this,e)||this}return Object(r.__extends)(e,t),e}(q),G=function(t){function e(e){return t.call(this,e)||this}return Object(r.__extends)(e,t),e}(q);function z(t){var e=J(t)?t.validators:t;return Array.isArray(e)?j(e):e||null}function K(t,e){var n=J(e)?e.asyncValidators:t;return Array.isArray(n)?M(n):n||null}function J(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}var X=function(){function t(t,e){this.validator=t,this.asyncValidator=e,this._onCollectionChange=function(){},this.pristine=!0,this.touched=!1,this._onDisabledChange=[]}return Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return"VALID"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"invalid",{get:function(){return"INVALID"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pending",{get:function(){return"PENDING"==this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return"DISABLED"===this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return"DISABLED"!==this.status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return!this.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"untouched",{get:function(){return!this.touched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"updateOn",{get:function(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"},enumerable:!0,configurable:!0}),t.prototype.setValidators=function(t){this.validator=z(t)},t.prototype.setAsyncValidators=function(t){this.asyncValidator=K(t)},t.prototype.clearValidators=function(){this.validator=null},t.prototype.clearAsyncValidators=function(){this.asyncValidator=null},t.prototype.markAsTouched=function(t){void 0===t&&(t={}),this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)},t.prototype.markAsUntouched=function(t){void 0===t&&(t={}),this.touched=!1,this._pendingTouched=!1,this._forEachChild(function(t){t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)},t.prototype.markAsDirty=function(t){void 0===t&&(t={}),this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)},t.prototype.markAsPristine=function(t){void 0===t&&(t={}),this.pristine=!0,this._pendingDirty=!1,this._forEachChild(function(t){t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)},t.prototype.markAsPending=function(t){void 0===t&&(t={}),this.status="PENDING",this._parent&&!t.onlySelf&&this._parent.markAsPending(t)},t.prototype.disable=function(t){void 0===t&&(t={}),this.status="DISABLED",this.errors=null,this._forEachChild(function(t){t.disable({onlySelf:!0})}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(!!t.onlySelf),this._onDisabledChange.forEach(function(t){return t(!0)})},t.prototype.enable=function(t){void 0===t&&(t={}),this.status="VALID",this._forEachChild(function(t){t.enable({onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(!!t.onlySelf),this._onDisabledChange.forEach(function(t){return t(!1)})},t.prototype._updateAncestors=function(t){this._parent&&!t&&(this._parent.updateValueAndValidity(),this._parent._updatePristine(),this._parent._updateTouched())},t.prototype.setParent=function(t){this._parent=t},t.prototype.updateValueAndValidity=function(t){void 0===t&&(t={}),this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)},t.prototype._updateTreeValidity=function(t){void 0===t&&(t={emitEvent:!0}),this._forEachChild(function(e){return e._updateTreeValidity(t)}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})},t.prototype._setInitialStatus=function(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"},t.prototype._runValidator=function(){return this.validator?this.validator(this):null},t.prototype._runAsyncValidator=function(t){var e=this;if(this.asyncValidator){this.status="PENDING";var n=y(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(function(n){return e.setErrors(n,{emitEvent:t})})}},t.prototype._cancelExistingSubscription=function(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()},t.prototype.setErrors=function(t,e){void 0===e&&(e={}),this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)},t.prototype.get=function(t){return function(t,e,n){return null==e?null:(e instanceof Array||(e=e.split(".")),e instanceof Array&&0===e.length?null:e.reduce(function(t,e){return t instanceof Y?t.controls[e]||null:t instanceof Z&&t.at(e)||null},t))}(this,t)},t.prototype.getError=function(t,e){var n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null},t.prototype.hasError=function(t,e){return!!this.getError(t,e)},Object.defineProperty(t.prototype,"root",{get:function(){for(var t=this;t._parent;)t=t._parent;return t},enumerable:!0,configurable:!0}),t.prototype._updateControlsErrors=function(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)},t.prototype._initObservables=function(){this.valueChanges=new i.m,this.statusChanges=new i.m},t.prototype._calculateStatus=function(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"},t.prototype._anyControlsHaveStatus=function(t){return this._anyControls(function(e){return e.status===t})},t.prototype._anyControlsDirty=function(){return this._anyControls(function(t){return t.dirty})},t.prototype._anyControlsTouched=function(){return this._anyControls(function(t){return t.touched})},t.prototype._updatePristine=function(t){void 0===t&&(t={}),this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)},t.prototype._updateTouched=function(t){void 0===t&&(t={}),this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)},t.prototype._isBoxedValue=function(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t},t.prototype._registerOnCollectionChange=function(t){this._onCollectionChange=t},t.prototype._setUpdateStrategy=function(t){J(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)},t}(),Q=function(t){function e(e,n,r){void 0===e&&(e=null);var i=t.call(this,z(n),K(r,n))||this;return i._onChange=[],i._applyFormState(e),i._setUpdateStrategy(n),i.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),i._initObservables(),i}return Object(r.__extends)(e,t),e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(function(t){return t(n.value,!1!==e.emitViewToModelChange)}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){void 0===e&&(e={}),this.setValue(t,e)},e.prototype.reset=function(t,e){void 0===t&&(t=null),void 0===e&&(e={}),this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1},e.prototype._updateValue=function(){},e.prototype._anyControls=function(t){return!1},e.prototype._allControlsDisabled=function(){return this.disabled},e.prototype.registerOnChange=function(t){this._onChange.push(t)},e.prototype._clearChangeFns=function(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=function(){}},e.prototype.registerOnDisabledChange=function(t){this._onDisabledChange.push(t)},e.prototype._forEachChild=function(t){},e.prototype._syncPendingControls=function(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))},e.prototype._applyFormState=function(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t},e}(X),Y=function(t){function e(e,n,r){var i=t.call(this,z(n),K(r,n))||this;return i.controls=e,i._initObservables(),i._setUpdateStrategy(n),i._setUpControls(),i.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),i}return Object(r.__extends)(e,t),e.prototype.registerControl=function(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)},e.prototype.addControl=function(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.removeControl=function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.setControl=function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.contains=function(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled},e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this._checkAllValuesPresent(t),Object.keys(t).forEach(function(r){n._throwIfControlMissing(r),n.controls[r].setValue(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){var n=this;void 0===e&&(e={}),Object.keys(t).forEach(function(r){n.controls[r]&&n.controls[r].patchValue(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.reset=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this._forEachChild(function(n,r){n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)},e.prototype.getRawValue=function(){return this._reduceChildren({},function(t,e,n){return t[n]=e instanceof Q?e.value:e.getRawValue(),t})},e.prototype._syncPendingControls=function(){var t=this._reduceChildren(!1,function(t,e){return!!e._syncPendingControls()||t});return t&&this.updateValueAndValidity({onlySelf:!0}),t},e.prototype._throwIfControlMissing=function(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error("Cannot find form control with name: "+t+".")},e.prototype._forEachChild=function(t){var e=this;Object.keys(this.controls).forEach(function(n){return t(e.controls[n],n)})},e.prototype._setUpControls=function(){var t=this;this._forEachChild(function(e){e.setParent(t),e._registerOnCollectionChange(t._onCollectionChange)})},e.prototype._updateValue=function(){this.value=this._reduceValue()},e.prototype._anyControls=function(t){var e=this,n=!1;return this._forEachChild(function(r,i){n=n||e.contains(i)&&t(r)}),n},e.prototype._reduceValue=function(){var t=this;return this._reduceChildren({},function(e,n,r){return(n.enabled||t.disabled)&&(e[r]=n.value),e})},e.prototype._reduceChildren=function(t,e){var n=t;return this._forEachChild(function(t,r){n=e(n,t,r)}),n},e.prototype._allControlsDisabled=function(){for(var t=0,e=Object.keys(this.controls);t<e.length;t++)if(this.controls[e[t]].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled},e.prototype._checkAllValuesPresent=function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control with name: '"+n+"'.")})},e}(X),Z=function(t){function e(e,n,r){var i=t.call(this,z(n),K(r,n))||this;return i.controls=e,i._initObservables(),i._setUpdateStrategy(n),i._setUpControls(),i.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),i}return Object(r.__extends)(e,t),e.prototype.at=function(t){return this.controls[t]},e.prototype.push=function(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.insert=function(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.removeAt=function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.setControl=function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()},Object.defineProperty(e.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this._checkAllValuesPresent(t),t.forEach(function(t,r){n._throwIfControlMissing(r),n.at(r).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){var n=this;void 0===e&&(e={}),t.forEach(function(t,r){n.at(r)&&n.at(r).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.reset=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this._forEachChild(function(n,r){n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)},e.prototype.getRawValue=function(){return this.controls.map(function(t){return t instanceof Q?t.value:t.getRawValue()})},e.prototype._syncPendingControls=function(){var t=this.controls.reduce(function(t,e){return!!e._syncPendingControls()||t},!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t},e.prototype._throwIfControlMissing=function(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)},e.prototype._forEachChild=function(t){this.controls.forEach(function(e,n){t(e,n)})},e.prototype._updateValue=function(){var t=this;this.value=this.controls.filter(function(e){return e.enabled||t.disabled}).map(function(t){return t.value})},e.prototype._anyControls=function(t){return this.controls.some(function(e){return e.enabled&&t(e)})},e.prototype._setUpControls=function(){var t=this;this._forEachChild(function(e){return t._registerControl(e)})},e.prototype._checkAllValuesPresent=function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control at index: "+n+".")})},e.prototype._allControlsDisabled=function(){for(var t=0,e=this.controls;t<e.length;t++)if(e[t].enabled)return!1;return this.controls.length>0||this.disabled},e.prototype._registerControl=function(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)},e}(X),$=Promise.resolve(null),tt=function(t){function e(e,n){var r=t.call(this)||this;return r.submitted=!1,r._directives=[],r.ngSubmit=new i.m,r.form=new Y({},j(e),M(n)),r}return Object(r.__extends)(e,t),e.prototype.ngAfterViewInit=function(){this._setUpdateStrategy()},Object.defineProperty(e.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),e.prototype.addControl=function(t){var e=this;$.then(function(){var n=e._findContainer(t.path);t.control=n.registerControl(t.name,t.control),A(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),e._directives.push(t)})},e.prototype.getControl=function(t){return this.form.get(t.path)},e.prototype.removeControl=function(t){var e=this;$.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name),B(e._directives,t)})},e.prototype.addFormGroup=function(t){var e=this;$.then(function(){var n=e._findContainer(t.path),r=new Y({});R(r,t),n.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})},e.prototype.removeFormGroup=function(t){var e=this;$.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name)})},e.prototype.getFormGroup=function(t){return this.form.get(t.path)},e.prototype.updateModel=function(t,e){var n=this;$.then(function(){n.form.get(t.path).setValue(e)})},e.prototype.setValue=function(t){this.control.setValue(t)},e.prototype.onSubmit=function(t){return this.submitted=!0,V(this.form,this._directives),this.ngSubmit.emit(t),!1},e.prototype.onReset=function(){this.resetForm()},e.prototype.resetForm=function(t){void 0===t&&(t=void 0),this.form.reset(t),this.submitted=!1},e.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)},e.prototype._findContainer=function(t){return t.pop(),t.length?this.form.get(t):this.form},e}(l),et='\n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });',nt='\n <div [formGroup]="myGroup">\n <div formGroupName="person">\n <input formControlName="firstName">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',rt='\n <form>\n <div ngModelGroup="person">\n <input [(ngModel)]="person.name" name="firstName">\n </div>\n </form>',it=function(){function t(){}return t.modelParentException=function(){throw new Error('\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup\'s partner directive "formControlName" instead. Example:\n\n '+et+'\n\n Or, if you\'d like to avoid registering this form control, indicate that it\'s standalone in ngModelOptions:\n\n Example:\n\n \n <div [formGroup]="myGroup">\n <input formControlName="firstName">\n <input [(ngModel)]="showMoreControls" [ngModelOptions]="{standalone: true}">\n </div>\n ')},t.formGroupNameException=function(){throw new Error("\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n "+nt+"\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n "+rt)},t.missingNameException=function(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: <input [(ngModel)]="person.firstName" name="first">\n Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">')},t.modelGroupParentException=function(){throw new Error("\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n "+nt+"\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n "+rt)},t}(),ot=function(t){function e(e,n,r){var i=t.call(this)||this;return i._parent=e,i._validators=n,i._asyncValidators=r,i}return Object(r.__extends)(e,t),e.prototype._checkParentType=function(){this._parent instanceof e||this._parent instanceof tt||it.modelGroupParentException()},e}(W),st=Promise.resolve(null),at=function(t){function e(e,n,r,o){var s=t.call(this)||this;return s.control=new Q,s._registered=!1,s.update=new i.m,s._parent=e,s._rawValidators=n||[],s._rawAsyncValidators=r||[],s.valueAccessor=U(s,o),s}return Object(r.__extends)(e,t),e.prototype.ngOnChanges=function(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),L(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},Object.defineProperty(e.prototype,"path",{get:function(){return this._parent?x(this.name,this._parent):[this.name]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return j(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return M(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),e.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},e.prototype._setUpControl=function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0},e.prototype._setUpdateStrategy=function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)},e.prototype._isStandalone=function(){return!this._parent||!(!this.options||!this.options.standalone)},e.prototype._setUpStandalone=function(){A(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})},e.prototype._checkForErrors=function(){this._isStandalone()||this._checkParentType(),this._checkName()},e.prototype._checkParentType=function(){!(this._parent instanceof ot)&&this._parent instanceof W?it.formGroupNameException():this._parent instanceof ot||this._parent instanceof tt||it.modelParentException()},e.prototype._checkName=function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||it.missingNameException()},e.prototype._updateValue=function(t){var e=this;st.then(function(){e.control.setValue(t,{emitViewToModelChange:!1})})},e.prototype._updateDisabled=function(t){var e=this,n=t.isDisabled.currentValue,r=""===n||n&&"false"!==n;st.then(function(){r&&!e.control.disabled?e.control.disable():!r&&e.control.disabled&&e.control.enable()})},e}(O),ut=function(){function t(){}return t.controlParentException=function(){throw new Error("formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+et)},t.ngModelGroupException=function(){throw new Error('formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a "form" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n '+nt+"\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n "+rt)},t.missingFormException=function(){throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n "+et)},t.groupParentException=function(){throw new Error("formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+nt)},t.arrayParentException=function(){throw new Error('formArrayName must be used with a parent formGroup directive. You\'ll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n \n <div [formGroup]="myGroup">\n <div formArrayName="cities">\n <div *ngFor="let city of cityArray.controls; index as i">\n <input [formControlName]="i">\n </div>\n </div>\n </div>\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl(\'SF\')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });')},t.disabledAttrWarning=function(){console.warn("\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n ")},t}(),ct=function(t){function e(e,n){var r=t.call(this)||this;return r._validators=e,r._asyncValidators=n,r.submitted=!1,r.directives=[],r.form=null,r.ngSubmit=new i.m,r}return Object(r.__extends)(e,t),e.prototype.ngOnChanges=function(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())},Object.defineProperty(e.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.addControl=function(t){var e=this.form.get(t.path);return A(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e},e.prototype.getControl=function(t){return this.form.get(t.path)},e.prototype.removeControl=function(t){B(this.directives,t)},e.prototype.addFormGroup=function(t){var e=this.form.get(t.path);R(e,t),e.updateValueAndValidity({emitEvent:!1})},e.prototype.removeFormGroup=function(t){},e.prototype.getFormGroup=function(t){return this.form.get(t.path)},e.prototype.addFormArray=function(t){var e=this.form.get(t.path);R(e,t),e.updateValueAndValidity({emitEvent:!1})},e.prototype.removeFormArray=function(t){},e.prototype.getFormArray=function(t){return this.form.get(t.path)},e.prototype.updateModel=function(t,e){this.form.get(t.path).setValue(e)},e.prototype.onSubmit=function(t){return this.submitted=!0,V(this.form,this.directives),this.ngSubmit.emit(t),!1},e.prototype.onReset=function(){this.resetForm()},e.prototype.resetForm=function(t){void 0===t&&(t=void 0),this.form.reset(t),this.submitted=!1},e.prototype._updateDomValue=function(){var t=this;this.directives.forEach(function(e){var n=t.form.get(e.path);e.control!==n&&(function(t,e){e.valueAccessor.registerOnChange(function(){return k(e)}),e.valueAccessor.registerOnTouched(function(){return k(e)}),e._rawValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),e._rawAsyncValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),t&&t._clearChangeFns()}(e.control,e),n&&A(n,e),e.control=n)}),this.form._updateTreeValidity({emitEvent:!1})},e.prototype._updateRegistrations=function(){var t=this;this.form._registerOnCollectionChange(function(){return t._updateDomValue()}),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){}),this._oldForm=this.form},e.prototype._updateValidators=function(){var t=j(this._validators);this.form.validator=d.compose([this.form.validator,t]);var e=M(this._asyncValidators);this.form.asyncValidator=d.composeAsync([this.form.asyncValidator,e])},e.prototype._checkFormPresent=function(){this.form||ut.missingFormException()},e}(l),lt=function(t){function e(e,n,r){var i=t.call(this)||this;return i._parent=e,i._validators=n,i._asyncValidators=r,i}return Object(r.__extends)(e,t),e.prototype._checkParentType=function(){pt(this._parent)&&ut.groupParentException()},e}(W),ht=function(t){function e(e,n,r){var i=t.call(this)||this;return i._parent=e,i._validators=n,i._asyncValidators=r,i}return Object(r.__extends)(e,t),e.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormArray(this)},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormArray(this)},Object.defineProperty(e.prototype,"control",{get:function(){return this.formDirective.getFormArray(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return x(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return j(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return M(this._asyncValidators)},enumerable:!0,configurable:!0}),e.prototype._checkParentType=function(){pt(this._parent)&&ut.arrayParentException()},e}(l);function pt(t){return!(t instanceof lt||t instanceof ct||t instanceof ht)}var ft=function(t){function e(e,n,r,o){var s=t.call(this)||this;return s._added=!1,s.update=new i.m,s._parent=e,s._rawValidators=n||[],s._rawAsyncValidators=r||[],s.valueAccessor=U(s,o),s}return Object(r.__extends)(e,t),Object.defineProperty(e.prototype,"isDisabled",{set:function(t){ut.disabledAttrWarning()},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(t){this._added||this._setUpControl(),L(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},e.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},Object.defineProperty(e.prototype,"path",{get:function(){return x(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return j(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return M(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),e.prototype._checkParentType=function(){!(this._parent instanceof lt)&&this._parent instanceof W?ut.ngModelGroupException():this._parent instanceof lt||this._parent instanceof ct||this._parent instanceof ht||ut.controlParentException()},e.prototype._setUpControl=function(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0},e}(O),dt=function(){function t(){}return Object.defineProperty(t.prototype,"required",{get:function(){return this._required},set:function(t){this._required=null!=t&&!1!==t&&""+t!="false",this._onChange&&this._onChange()},enumerable:!0,configurable:!0}),t.prototype.validate=function(t){return this.required?d.required(t):null},t.prototype.registerOnValidatorChange=function(t){this._onChange=t},t}(),vt=function(){function t(){}return t.prototype.ngOnChanges=function(t){"pattern"in t&&(this._createValidator(),this._onChange&&this._onChange())},t.prototype.validate=function(t){return this._validator(t)},t.prototype.registerOnValidatorChange=function(t){this._onChange=t},t.prototype._createValidator=function(){this._validator=d.pattern(this.pattern)},t}(),yt=function(){function t(){}return t.prototype.group=function(t,e){void 0===e&&(e=null);var n=this._reduceControls(t);return new Y(n,null!=e?e.validator:null,null!=e?e.asyncValidator:null)},t.prototype.control=function(t,e,n){return new Q(t,e,n)},t.prototype.array=function(t,e,n){var r=this,i=t.map(function(t){return r._createControl(t)});return new Z(i,e,n)},t.prototype._reduceControls=function(t){var e=this,n={};return Object.keys(t).forEach(function(r){n[r]=e._createControl(t[r])}),n},t.prototype._createControl=function(t){return t instanceof Q||t instanceof Y||t instanceof Z?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)},t}(),gt=function(){},_t=function(){},mt=function(){},bt=function(){}},"0npo":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("W4Cj"),i=n("KH1l"),o=n("R3TC"),s=n("y8hQ"),a=n("bN85"),u=n("9kU/"),c=n("JEJ4"),l=n("gOHv"),h=n("ertD"),p=n("/fob");e.View=function(){function t(t,e){this.query_=t,this.eventRegistrations_=[];var n=this.query_.getQueryParams(),c=new r.IndexedFilter(n.getIndex()),l=n.getNodeFilter();this.processor_=new i.ViewProcessor(l);var h=e.getServerCache(),p=e.getEventCache(),f=c.updateFullNode(o.ChildrenNode.EMPTY_NODE,h.getNode(),null),d=l.updateFullNode(o.ChildrenNode.EMPTY_NODE,p.getNode(),null),v=new s.CacheNode(f,h.isFullyInitialized(),c.filtersNodes()),y=new s.CacheNode(d,p.isFullyInitialized(),l.filtersNodes());this.viewCache_=new a.ViewCache(y,v),this.eventGenerator_=new u.EventGenerator(this.query_)}return t.prototype.getQuery=function(){return this.query_},t.prototype.getServerCache=function(){return this.viewCache_.getServerCache().getNode()},t.prototype.getCompleteServerCache=function(t){var e=this.viewCache_.getCompleteServerSnap();return e&&(this.query_.getQueryParams().loadsAllData()||!t.isEmpty()&&!e.getImmediateChild(t.getFront()).isEmpty())?e.getChild(t):null},t.prototype.isEmpty=function(){return 0===this.eventRegistrations_.length},t.prototype.addEventRegistration=function(t){this.eventRegistrations_.push(t)},t.prototype.removeEventRegistration=function(t,e){var n=[];if(e){c.assert(null==t,"A cancel should cancel all event registrations.");var r=this.query_.path;this.eventRegistrations_.forEach(function(t){var i=t.createCancelEvent(e=e,r);i&&n.push(i)})}if(t){for(var i=[],o=0;o<this.eventRegistrations_.length;++o){var s=this.eventRegistrations_[o];if(s.matches(t)){if(t.hasAnyCallback()){i=i.concat(this.eventRegistrations_.slice(o+1));break}}else i.push(s)}this.eventRegistrations_=i}else this.eventRegistrations_=[];return n},t.prototype.applyOperation=function(t,e,n){t.type===l.OperationType.MERGE&&null!==t.source.queryId&&(c.assert(this.viewCache_.getCompleteServerSnap(),"We should always have a full cache before handling merges"),c.assert(this.viewCache_.getCompleteEventSnap(),"Missing event cache, even though we have a server cache"));var r=this.viewCache_,i=this.processor_.applyOperation(r,t,e,n);return this.processor_.assertIndexed(i.viewCache),c.assert(i.viewCache.getServerCache().isFullyInitialized()||!r.getServerCache().isFullyInitialized(),"Once a server snap is complete, it should never go back"),this.viewCache_=i.viewCache,this.generateEventsForChanges_(i.changes,i.viewCache.getEventCache().getNode(),null)},t.prototype.getInitialEvents=function(t){var e=this.viewCache_.getEventCache(),n=[];return e.getNode().isLeafNode()||e.getNode().forEachChild(p.PRIORITY_INDEX,function(t,e){n.push(h.Change.childAddedChange(t,e))}),e.isFullyInitialized()&&n.push(h.Change.valueChange(e.getNode())),this.generateEventsForChanges_(n,e.getNode(),t)},t.prototype.generateEventsForChanges_=function(t,e,n){return this.eventGenerator_.generateEventsForChanges(t,e,n?[n]:this.eventRegistrations_)},t}()},"1JLS":function(t,e){Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){var o=e[i];if(t.call(r,o,i,e))return o;i++}}}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){if(t.call(r,e[i],i,e))return i;i++}return-1}})},"1WNV":function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,c=[],l=!1,h=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&f())}function f(){if(!l){var t=a(p);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||a(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},"1j/l":function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=Array.isArray||function(t){return t&&"number"==typeof t.length}},"1zSO":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4");e.DOMStorageWrapper=function(){function t(t){this.domStorage_=t,this.prefix_="firebase:"}return t.prototype.set=function(t,e){null==e?this.domStorage_.removeItem(this.prefixedName_(t)):this.domStorage_.setItem(this.prefixedName_(t),r.stringify(e))},t.prototype.get=function(t){var e=this.domStorage_.getItem(this.prefixedName_(t));return null==e?null:r.jsonEval(e)},t.prototype.remove=function(t){this.domStorage_.removeItem(this.prefixedName_(t))},t.prototype.prefixedName_=function(t){return this.prefix_+t},t.prototype.toString=function(){return this.domStorage_.toString()},t}()},"24Q+":function(t,e,n){"use strict";e.a=function(t,e){return arguments.length>=2?Object(r.a)(t,e)(this):Object(r.a)(t)(this)};var r=n("tK9/")},"2BLv":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("isNy"),i=n("isNy"),o=Math.log(2),s=function(){function t(t){this.count=parseInt(Math.log(t+1)/o,10),this.current_=this.count-1;var e=parseInt(Array(this.count+1).join("1"),2);this.bits_=t+1&e}return t.prototype.nextBitIsOne=function(){var t=!(this.bits_&1<<this.current_);return this.current_--,t},t}();e.buildChildSet=function(t,e,n,o){t.sort(e);var a=function(e,i){var o,s,u=i-e;if(0==u)return null;if(1==u)return o=t[e],s=n?n(o):o,new r.LLRBNode(s,o.node,r.LLRBNode.BLACK,null,null);var c=parseInt(u/2,10)+e,l=a(e,c),h=a(c+1,i);return o=t[c],s=n?n(o):o,new r.LLRBNode(s,o.node,r.LLRBNode.BLACK,l,h)},u=function(e){for(var i=null,o=null,s=t.length,u=function(e,i){var o=s-e,u=s;s-=e;var l=a(o+1,u),h=t[o],p=n?n(h):h;c(new r.LLRBNode(p,h.node,i,null,l))},c=function(t){i?(i.left=t,i=t):(o=t,i=t)},l=0;l<e.count;++l){var h=e.nextBitIsOne(),p=Math.pow(2,e.count-(l+1));h?u(p,r.LLRBNode.BLACK):(u(p,r.LLRBNode.BLACK),u(p,r.LLRBNode.RED))}return o}(new s(t.length));return new i.SortedMap(o||e,u)}},"2kLc":function(t,e,n){"use strict";e.a=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n=Number.POSITIVE_INFINITY,a=null,u=t[t.length-1];return Object(o.a)(u)?(a=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof u&&(n=t.pop()),null===a&&1===t.length&&t[0]instanceof r.a?t[0]:Object(s.a)(n)(new i.a(t,a))};var r=n("AP4T"),i=n("Oryw"),o=n("3iOE"),s=n("bywS")},"2kNe":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("dVae"),i=n("fvGz"),o=n("JEJ4"),s=n("p+VM"),a=n("/fob"),u=n("JEJ4");e.CompoundWrite=function(){function t(t){this.writeTree_=t}return t.prototype.addWrite=function(e,n){if(e.isEmpty())return new t(new r.ImmutableTree(n));var o=this.writeTree_.findRootMostValueAndPath(e);if(null!=o){var s=o.path,a=o.value,u=i.Path.relativePath(s,e);return a=a.updateChild(u,n),new t(this.writeTree_.set(s,a))}var c=new r.ImmutableTree(n);return new t(this.writeTree_.setTree(e,c))},t.prototype.addWrites=function(t,e){var n=this;return o.forEach(e,function(e,r){n=n.addWrite(t.child(e),r)}),n},t.prototype.removeWrite=function(e){return e.isEmpty()?t.Empty:new t(this.writeTree_.setTree(e,r.ImmutableTree.Empty))},t.prototype.hasCompleteWrite=function(t){return null!=this.getCompleteNode(t)},t.prototype.getCompleteNode=function(t){var e=this.writeTree_.findRootMostValueAndPath(t);return null!=e?this.writeTree_.get(e.path).getChild(i.Path.relativePath(e.path,t)):null},t.prototype.getCompleteChildren=function(){var t=[],e=this.writeTree_.value;return null!=e?e.isLeafNode()||e.forEachChild(a.PRIORITY_INDEX,function(e,n){t.push(new s.NamedNode(e,n))}):this.writeTree_.children.inorderTraversal(function(e,n){null!=n.value&&t.push(new s.NamedNode(e,n.value))}),t},t.prototype.childCompoundWrite=function(e){if(e.isEmpty())return this;var n=this.getCompleteNode(e);return new t(null!=n?new r.ImmutableTree(n):this.writeTree_.subtree(e))},t.prototype.isEmpty=function(){return this.writeTree_.isEmpty()},t.prototype.apply=function(e){return t.applySubtreeWrite_(i.Path.Empty,this.writeTree_,e)},t.Empty=new t(new r.ImmutableTree(null)),t.applySubtreeWrite_=function(e,n,r){if(null!=n.value)return r.updateChild(e,n.value);var i=null;return n.children.inorderTraversal(function(n,o){".priority"===n?(u.assert(null!==o.value,"Priority writes must always be leaf nodes"),i=o.value):r=t.applySubtreeWrite_(e.child(n),o,r)}),r.getChild(e).isEmpty()||null===i||(r=r.updateChild(e.child(".priority"),i)),r},t}()},"2kvl":function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("6Xbx"),i=function(t){function e(){var e=t.call(this,"argument out of range");this.name=e.name="ArgumentOutOfRangeError",this.stack=e.stack,this.message=e.message}return Object(r.__extends)(e,t),e}(Error)},"2mdx":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("EqqR");e.stringToByteArray=function(t){for(var e=[],n=0,i=0;i<t.length;i++){var o=t.charCodeAt(i);if(o>=55296&&o<=56319){var s=o-55296;r.assert(++i<t.length,"Surrogate pair missing trail surrogate."),o=65536+(s<<10)+(t.charCodeAt(i)-56320)}o<128?e[n++]=o:o<2048?(e[n++]=o>>6|192,e[n++]=63&o|128):o<65536?(e[n++]=o>>12|224,e[n++]=o>>6&63|128,e[n++]=63&o|128):(e[n++]=o>>18|240,e[n++]=o>>12&63|128,e[n++]=o>>6&63|128,e[n++]=63&o|128)}return e},e.stringLength=function(t){for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);r<128?e++:r<2048?e+=2:r>=55296&&r<=56319?(e+=4,n++):e+=3}return e}},"32XG":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Hash=function(){this.blockSize=-1}},"3FiG":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("JEJ4"),o=n("F1yO"),s=n("JEJ4");e.setMaxNode=function(t){r=t},e.priorityHashText=function(t){return"number"==typeof t?"number:"+o.doubleToIEEE754String(t):"string:"+t},e.validatePriorityNode=function(t){if(t.isLeafNode()){var e=t.val();i.assert("string"==typeof e||"number"==typeof e||"object"==typeof e&&s.contains(e,".sv"),"Priority must be a string or number.")}else i.assert(t===r||t.isEmpty(),"priority of unexpected type.");i.assert(t===r||t.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")}},"3iOE":function(t,e,n){"use strict";e.a=function(t){return t&&"function"==typeof t.schedule}},"43Go":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("R3TC"),i=n("04zk"),o=n("p+VM"),s=n("JEJ4"),a=n("JEJ4"),u=n("2BLv"),c=n("zFzr"),l=n("b5Wm"),h=n("/fob"),p=!0;function f(t,e){if(void 0===e&&(e=null),null===t)return r.ChildrenNode.EMPTY_NODE;if("object"==typeof t&&".priority"in t&&(e=t[".priority"]),a.assert(null===e||"string"==typeof e||"number"==typeof e||"object"==typeof e&&".sv"in e,"Invalid priority type found: "+typeof e),"object"==typeof t&&".value"in t&&null!==t[".value"]&&(t=t[".value"]),"object"!=typeof t||".sv"in t)return new i.LeafNode(t,f(e));if(t instanceof Array||!p){var n=r.ChildrenNode.EMPTY_NODE,d=t;return s.forEach(d,function(t,e){if(s.contains(d,t)&&"."!==t.substring(0,1)){var r=f(e);!r.isLeafNode()&&r.isEmpty()||(n=n.updateImmediateChild(t,r))}}),n.updatePriority(f(e))}var v=[],y=!1,g=t;if(s.forEach(g,function(t,e){if("string"!=typeof t||"."!==t.substring(0,1)){var n=f(g[t]);n.isEmpty()||(y=y||!n.getPriority().isEmpty(),v.push(new o.NamedNode(t,n)))}}),0==v.length)return r.ChildrenNode.EMPTY_NODE;var _=u.buildChildSet(v,c.NAME_ONLY_COMPARATOR,function(t){return t.name},c.NAME_COMPARATOR);if(y){var m=u.buildChildSet(v,h.PRIORITY_INDEX.getCompare());return new r.ChildrenNode(_,f(e),new l.IndexMap({".priority":m},{".priority":h.PRIORITY_INDEX}))}return new r.ChildrenNode(_,f(e),l.IndexMap.Default)}e.nodeFromJSON=f,h.setNodeFromJSON(f)},"5pXs":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("6Xbx"),i=n("oyal"),o=n("EAgh"),s=n("F1yO"),a=n("sZ8A"),u=n("rB9K"),c=n("pHuv"),l=n("fvGz"),h=n("miEe"),p=n("xfHL"),f=n("JEJ4"),d=n("JEJ4"),v=n("uCc5"),y=function(t){function e(e,n){if(!(e instanceof c.Repo))throw new Error("new Reference() no longer supported - use app.database().");return t.call(this,e,n,h.QueryParams.DEFAULT,!1)||this}return r.__extends(e,t),e.prototype.getKey=function(){return f.validateArgCount("Reference.key",0,0,arguments.length),this.path.isEmpty()?null:this.path.getBack()},e.prototype.child=function(t){return f.validateArgCount("Reference.child",1,1,arguments.length),"number"==typeof t?t=String(t):t instanceof l.Path||(null===this.path.getFront()?p.validateRootPathString("Reference.child",1,t,!1):p.validatePathString("Reference.child",1,t,!1)),new e(this.repo,this.path.child(t))},e.prototype.getParent=function(){f.validateArgCount("Reference.parent",0,0,arguments.length);var t=this.path.parent();return null===t?null:new e(this.repo,t)},e.prototype.getRoot=function(){f.validateArgCount("Reference.root",0,0,arguments.length);for(var t=this;null!==t.getParent();)t=t.getParent();return t},e.prototype.databaseProp=function(){return this.repo.database},e.prototype.set=function(t,e){f.validateArgCount("Reference.set",1,2,arguments.length),p.validateWritablePath("Reference.set",this.path),p.validateFirebaseDataArg("Reference.set",1,t,this.path,!1),f.validateCallback("Reference.set",2,e,!0);var n=new d.Deferred;return this.repo.setWithPriority(this.path,t,null,n.wrapCallback(e)),n.promise},e.prototype.update=function(t,e){if(f.validateArgCount("Reference.update",1,2,arguments.length),p.validateWritablePath("Reference.update",this.path),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,s.warn("Passing an Array to Firebase.update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}p.validateFirebaseMergeDataArg("Reference.update",1,t,this.path,!1),f.validateCallback("Reference.update",2,e,!0);var i=new d.Deferred;return this.repo.update(this.path,t,i.wrapCallback(e)),i.promise},e.prototype.setWithPriority=function(t,e,n){if(f.validateArgCount("Reference.setWithPriority",2,3,arguments.length),p.validateWritablePath("Reference.setWithPriority",this.path),p.validateFirebaseDataArg("Reference.setWithPriority",1,t,this.path,!1),p.validatePriority("Reference.setWithPriority",2,e,!1),f.validateCallback("Reference.setWithPriority",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.setWithPriority failed: "+this.getKey()+" is a read-only object.";var r=new d.Deferred;return this.repo.setWithPriority(this.path,t,e,r.wrapCallback(n)),r.promise},e.prototype.remove=function(t){return f.validateArgCount("Reference.remove",0,1,arguments.length),p.validateWritablePath("Reference.remove",this.path),f.validateCallback("Reference.remove",1,t,!0),this.set(null,t)},e.prototype.transaction=function(t,e,n){if(f.validateArgCount("Reference.transaction",1,3,arguments.length),p.validateWritablePath("Reference.transaction",this.path),f.validateCallback("Reference.transaction",1,t,!1),f.validateCallback("Reference.transaction",2,e,!0),p.validateBoolean("Reference.transaction",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.transaction failed: "+this.getKey()+" is a read-only object.";void 0===n&&(n=!0);var r=new d.Deferred;return"function"==typeof e&&r.promise.catch(function(){}),this.repo.startTransaction(this.path,t,function(t,n,i){t?r.reject(t):r.resolve(new o.TransactionResult(n,i)),"function"==typeof e&&e(t,n,i)},n),r.promise},e.prototype.setPriority=function(t,e){f.validateArgCount("Reference.setPriority",1,2,arguments.length),p.validateWritablePath("Reference.setPriority",this.path),p.validatePriority("Reference.setPriority",1,t,!1),f.validateCallback("Reference.setPriority",2,e,!0);var n=new d.Deferred;return this.repo.setWithPriority(this.path.child(".priority"),t,null,n.wrapCallback(e)),n.promise},e.prototype.push=function(t,e){f.validateArgCount("Reference.push",0,2,arguments.length),p.validateWritablePath("Reference.push",this.path),p.validateFirebaseDataArg("Reference.push",1,t,this.path,!0),f.validateCallback("Reference.push",2,e,!0);var n,r=this.repo.serverTime(),i=a.nextPushId(r),o=this.child(i),s=this.child(i);return n=null!=t?o.set(t,e).then(function(){return s}):Promise.resolve(s),o.then=n.then.bind(n),o.catch=n.then.bind(n,void 0),"function"==typeof e&&n.catch(function(){}),o},e.prototype.onDisconnect=function(){return p.validateWritablePath("Reference.onDisconnect",this.path),new i.OnDisconnect(this.repo,this.path)},Object.defineProperty(e.prototype,"database",{get:function(){return this.databaseProp()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this.getKey()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this.getParent()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this.getRoot()},enumerable:!0,configurable:!0}),e}(u.Query);e.Reference=y,u.Query.__referenceConstructor=y,v.SyncPoint.__referenceConstructor=y},"6S6c":function(t,e,n){"use strict";e.a=function(t,e){return Object(r.a)(t,e)(this)};var r=n("LaOa")},"6Xbx":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.__extends=function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n.d(e,"__assign",function(){return i}),e.__rest=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n},e.__decorate=function(t,e,n,r){var i,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},e.__param=function(t,e){return function(n,r){e(n,r,t)}},e.__metadata=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},e.__awaiter=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(s,a)}u((r=r.apply(t,e||[])).next())})},e.__generator=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=r[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},e.__exportStar=function(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])},e.__values=o,e.__read=s,e.__spread=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t},e.__await=a,e.__asyncGenerator=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||u(t,e)})})}function u(t,e){try{(n=i[t](e)).value instanceof a?Promise.resolve(n.value.v).then(c,l):h(o[0][2],n)}catch(t){h(o[0][3],t)}var n}function c(t){u("next",t)}function l(t){u("throw",t)}function h(t,e){t(e),o.shift(),o.length&&u(o[0][0],o[0][1])}},e.__asyncDelegator=function(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){t[r]&&(e[r]=function(e){return(n=!n)?{value:a(t[r](e)),done:"return"===r}:i?i(e):e})}},e.__asyncValues=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];return e?e.call(t):"function"==typeof o?o(t):t[Symbol.iterator]()},e.__makeTemplateObject=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},e.__importStar=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e},e.__importDefault=function(t){return t&&t.__esModule?t:{default:t}};var r=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])},i=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};function o(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.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 s}function a(t){return this instanceof a?(this.v=t,this):new a(t)}},"6oqh":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("6Xbx"),i=n("JEJ4"),o=n("F1yO"),s=n("JEJ4"),a=n("JEJ4"),u=n("JEJ4"),c=function(t){function e(e,n,r){var i=t.call(this)||this;return i.repoInfo_=e,i.onDataUpdate_=n,i.authTokenProvider_=r,i.log_=o.logWrapper("p:rest:"),i.listens_={},i}return r.__extends(e,t),e.prototype.reportStats=function(t){throw new Error("Method not implemented.")},e.getListenId_=function(t,e){return void 0!==e?"tag$"+e:(i.assert(t.getQueryParams().isDefault(),"should have a tag if it's not a default query."),t.path.toString())},e.prototype.listen=function(t,n,r,i){var o=this,s=t.path.toString();this.log_("Listen called for "+s+" "+t.queryIdentifier());var u=e.getListenId_(t,r),c={};this.listens_[u]=c;var l=t.getQueryParams().toRestQueryStringParameters();this.restRequest_(s+".json",l,function(t,e){var n=e;404===t&&(n=null,t=null),null===t&&o.onDataUpdate_(s,n,!1,r),a.safeGet(o.listens_,u)===c&&i(t?401==t?"permission_denied":"rest_error:"+t:"ok",null)})},e.prototype.unlisten=function(t,n){var r=e.getListenId_(t,n);delete this.listens_[r]},e.prototype.refreshAuthToken=function(t){},e.prototype.restRequest_=function(t,e,n){var r=this;void 0===e&&(e={}),e.format="export",this.authTokenProvider_.getToken(!1).then(function(i){var a=i&&i.accessToken;a&&(e.auth=a);var c=(r.repoInfo_.secure?"https://":"http://")+r.repoInfo_.host+t+"?"+u.querystring(e);r.log_("Sending REST request for "+c);var l=new XMLHttpRequest;l.onreadystatechange=function(){if(n&&4===l.readyState){r.log_("REST Response for "+c+" received. status:",l.status,"response:",l.responseText);var t=null;if(l.status>=200&&l.status<300){try{t=s.jsonEval(l.responseText)}catch(t){o.warn("Failed to parse JSON response for "+c+": "+l.responseText)}n(null,t)}else 401!==l.status&&404!==l.status&&o.warn("Got unsuccessful REST response for "+c+" Status: "+l.status),n(l.status);n=null}},l.open("GET",c,!0),l.send()})},e}(n("zzcx").ServerActions);e.ReadonlyRestClient=c},"7qHF":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("mZoP"),i=n("xhf5"),o=n("+VeI"),s=n("j0qB");e.DataConnection=i.PersistentConnection,i.PersistentConnection.prototype.simpleListen=function(t,e){this.sendRequest("q",{p:t},e)},i.PersistentConnection.prototype.echo=function(t,e){this.sendRequest("echo",{d:t},e)},e.RealTimeConnection=s.Connection,e.hijackHash=function(t){var e=i.PersistentConnection.prototype.put;return i.PersistentConnection.prototype.put=function(n,r,i,o){void 0!==o&&(o=t()),e.call(this,n,r,i,o)},function(){i.PersistentConnection.prototype.put=e}},e.ConnectionTarget=r.RepoInfo,e.queryIdentifier=function(t){return t.queryIdentifier()},e.listens=function(t){return t.repo.persistentConnection_.listens_},e.forceRestClient=function(t){o.RepoManager.getInstance().forceRestClient(t)}},"8JPw":function(t,e,n){"use strict";e.a=function(t,e){return Object(r.a)(t,e,1)};var r=n("wP3s")},"8Ut3":function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("6Xbx"),i=function(t){function e(e,n){t.call(this),this.value=e,this.scheduler=n,this._isScalar=!0,n&&(this._isScalar=!1)}return Object(r.__extends)(e,t),e.create=function(t,n){return new e(t,n)},e.dispatch=function(t){var e=t.value,n=t.subscriber;t.done?n.complete():(n.next(e),n.closed||(t.done=!0,this.schedule(t)))},e.prototype._subscribe=function(t){var n=this.value,r=this.scheduler;if(r)return r.schedule(e.dispatch,0,{done:!1,value:n,subscriber:t});t.next(n),t.closed||t.complete()},e}(n("AP4T").a)},"8UuO":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("6Xbx"),i=n("F1yO"),o=n("PKQO"),s=n("fvGz"),a=n("5pXs"),u=n("pHuv"),c=n("+VeI"),l=n("JEJ4"),h=n("xfHL");e.Database=function(){function t(t){this.repo_=t,t instanceof u.Repo||i.fatal("Don't call new Database() directly - please use firebase.database()."),this.root_=new a.Reference(t,s.Path.Empty),this.INTERNAL=new p(this)}return Object.defineProperty(t.prototype,"app",{get:function(){return this.repo_.app},enumerable:!0,configurable:!0}),t.prototype.ref=function(t){return this.checkDeleted_("ref"),l.validateArgCount("database.ref",0,1,arguments.length),t instanceof a.Reference?this.refFromURL(t.toString()):void 0!==t?this.root_.child(t):this.root_},t.prototype.refFromURL=function(t){var e="database.refFromURL";this.checkDeleted_(e),l.validateArgCount(e,1,1,arguments.length);var n=o.parseRepoInfo(t);h.validateUrl(e,1,n);var r=n.repoInfo;return r.host!==this.repo_.repoInfo_.host&&i.fatal(e+": Host name does not match the current database: (found "+r.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},t.prototype.checkDeleted_=function(t){null===this.repo_&&i.fatal("Cannot call "+t+" on a deleted database.")},t.prototype.goOffline=function(){l.validateArgCount("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},t.prototype.goOnline=function(){l.validateArgCount("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},t.ServerValue={TIMESTAMP:{".sv":"timestamp"}},t}();var p=function(){function t(t){this.database=t}return t.prototype.delete=function(){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(t){return this.database.checkDeleted_("delete"),c.RepoManager.getInstance().deleteRepo(this.database.repo_),this.database.repo_=null,this.database.root_=null,this.database.INTERNAL=null,this.database=null,[2]})})},t}();e.DatabaseInternals=p},"8ofh":function(t,e,n){"use strict";e.a=function(t){return r=t,o};var r,i=n("NePw");function o(){try{return r.apply(this,arguments)}catch(t){return i.a.e=t,i.a}}},"9ard":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r=n("XtH8"),i=n("JEJ4"),o=n("F1yO"),s=n("cm6g"),a=n("UcKF"),u=n("JEJ4"),c=n("Rgd9"),l=n("JEJ4"),h=n("JEJ4"),p=null;"undefined"!=typeof MozWebSocket?p=MozWebSocket:"undefined"!=typeof WebSocket&&(p=WebSocket),e.setWebSocketImpl=function(t){p=t},e.WebSocketConnection=function(){function e(t,n,r,i){this.connId=t,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=o.logWrapper(this.connId),this.stats_=s.StatsManager.getCollection(n),this.connURL=e.connectionURL_(n,r,i)}return e.connectionURL_=function(t,e,n){var r={};return r[a.VERSION_PARAM]=a.PROTOCOL_VERSION,!h.isNodeSdk()&&"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf(a.FORGE_DOMAIN)&&(r[a.REFERER_PARAM]=a.FORGE_REF),e&&(r[a.TRANSPORT_SESSION_PARAM]=e),n&&(r[a.LAST_SESSION_PARAM]=n),t.connectionURL(a.WEBSOCKET,r)},e.prototype.open=function(e,n){var i=this;this.onDisconnect=n,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,c.PersistentStorage.set("previous_websocket_failure",!0);try{if(h.isNodeSdk()){var o={headers:{"User-Agent":"Firebase/"+a.PROTOCOL_VERSION+"/"+r.default.SDK_VERSION+"/"+t.platform+"/"+(u.CONSTANTS.NODE_ADMIN?"AdminNode":"Node")}},s=t.env,l=0==this.connURL.indexOf("wss://")?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;l&&(o.proxy={origin:l}),this.mySock=new p(this.connURL,[],o)}else this.mySock=new p(this.connURL)}catch(t){this.log_("Error instantiating WebSocket.");var f=t.message||t.data;return f&&this.log_(f),void this.onClosed_()}this.mySock.onopen=function(){i.log_("Websocket connected."),i.everConnected_=!0},this.mySock.onclose=function(){i.log_("Websocket connection was disconnected."),i.mySock=null,i.onClosed_()},this.mySock.onmessage=function(t){i.handleIncomingFrame(t)},this.mySock.onerror=function(t){i.log_("WebSocket error. Closing connection.");var e=t.message||t.data;e&&i.log_(e),i.onClosed_()}},e.prototype.start=function(){},e.forceDisallow=function(){e.forceDisallow_=!0},e.isAvailable=function(){var t=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var n=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);n&&n.length>1&&parseFloat(n[1])<4.4&&(t=!0)}return!t&&null!==p&&!e.forceDisallow_},e.previouslyFailed=function(){return c.PersistentStorage.isInMemoryStorage||!0===c.PersistentStorage.get("previous_websocket_failure")},e.prototype.markConnectionHealthy=function(){c.PersistentStorage.remove("previous_websocket_failure")},e.prototype.appendFrame_=function(t){if(this.frames.push(t),this.frames.length==this.totalFrames){var e=this.frames.join("");this.frames=null;var n=l.jsonEval(e);this.onMessage(n)}},e.prototype.handleNewFrameCount_=function(t){this.totalFrames=t,this.frames=[]},e.prototype.extractFrameCount_=function(t){if(i.assert(null===this.frames,"We already have a frame buffer"),t.length<=6){var e=Number(t);if(!isNaN(e))return this.handleNewFrameCount_(e),null}return this.handleNewFrameCount_(1),t},e.prototype.handleIncomingFrame=function(t){if(null!==this.mySock){var e=t.data;if(this.bytesReceived+=e.length,this.stats_.incrementCounter("bytes_received",e.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(e);else{var n=this.extractFrameCount_(e);null!==n&&this.appendFrame_(n)}}},e.prototype.send=function(t){this.resetKeepAlive();var e=l.stringify(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);var n=o.splitStringBySize(e,16384);n.length>1&&this.sendString_(String(n.length));for(var r=0;r<n.length;r++)this.sendString_(n[r])},e.prototype.shutdown_=function(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)},e.prototype.onClosed_=function(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))},e.prototype.close=function(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())},e.prototype.resetKeepAlive=function(){var t=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(function(){t.mySock&&t.sendString_("0"),t.resetKeepAlive()},Math.floor(45e3))},e.prototype.sendString_=function(t){try{this.mySock.send(t)}catch(t){this.log_("Exception thrown from WebSocket.send():",t.message||t.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}},e.responsesRequiredToBeHealthy=2,e.healthyTimeout=3e4,e}()}).call(e,n("1WNV"))},"9kU/":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("p+VM"),i=n("ertD"),o=n("JEJ4");e.EventGenerator=function(){function t(t){this.query_=t,this.index_=this.query_.getQueryParams().getIndex()}return t.prototype.generateEventsForChanges=function(t,e,n){var r=this,o=[],s=[];return t.forEach(function(t){t.type===i.Change.CHILD_CHANGED&&r.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)&&s.push(i.Change.childMovedChange(t.childName,t.snapshotNode))}),this.generateEventsForType_(o,i.Change.CHILD_REMOVED,t,n,e),this.generateEventsForType_(o,i.Change.CHILD_ADDED,t,n,e),this.generateEventsForType_(o,i.Change.CHILD_MOVED,s,n,e),this.generateEventsForType_(o,i.Change.CHILD_CHANGED,t,n,e),this.generateEventsForType_(o,i.Change.VALUE,t,n,e),o},t.prototype.generateEventsForType_=function(t,e,n,r,i){var o=this,s=n.filter(function(t){return t.type===e});s.sort(this.compareChanges_.bind(this)),s.forEach(function(e){var n=o.materializeSingleChange_(e,i);r.forEach(function(r){r.respondsTo(e.type)&&t.push(r.createEvent(n,o.query_))})})},t.prototype.materializeSingleChange_=function(t,e){return"value"===t.type||"child_removed"===t.type?t:(t.prevName=e.getPredecessorChildName(t.childName,t.snapshotNode,this.index_),t)},t.prototype.compareChanges_=function(t,e){if(null==t.childName||null==e.childName)throw o.assertionError("Should only compare child_ events.");var n=new r.NamedNode(t.childName,t.snapshotNode),i=new r.NamedNode(e.childName,e.snapshotNode);return this.index_.compare(n,i)},t}()},"9yf9":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=[],i=function(t){return t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT",t}({}),o=i.INFO,s=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!(e<t.logLevel)){var o=(new Date).toISOString();switch(e){case i.DEBUG:case i.VERBOSE:console.log.apply(console,["["+o+"] "+t.name+":"].concat(n));break;case i.INFO:console.info.apply(console,["["+o+"] "+t.name+":"].concat(n));break;case i.WARN:console.warn.apply(console,["["+o+"] "+t.name+":"].concat(n));break;case i.ERROR:console.error.apply(console,["["+o+"] "+t.name+":"].concat(n));break;default:throw new Error("Attempted to log a message with an invalid logType (value: "+e+")")}}},a=function(){function t(t){this.name=t,this._logLevel=o,this._logHandler=s,r.push(this)}return Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in i))throw new TypeError("Invalid value assigned to `logLevel`");this._logLevel=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"logHandler",{get:function(){return this._logHandler},set:function(t){if("function"!=typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t},enumerable:!0,configurable:!0}),t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,i.DEBUG].concat(t))},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,i.VERBOSE].concat(t))},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,i.INFO].concat(t))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,i.WARN].concat(t))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._logHandler.apply(this,[this,i.ERROR].concat(t))},t}();e.setLogLevel=function(t){r.forEach(function(e){e.logLevel=t})},n.d(e,"Logger",function(){return a}),n.d(e,"LogLevel",function(){return i})},A4jy:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4");e.DataEvent=function(){function t(t,e,n,r){this.eventType=t,this.eventRegistration=e,this.snapshot=n,this.prevName=r}return t.prototype.getPath=function(){var t=this.snapshot.getRef();return"value"===this.eventType?t.path:t.getParent().path},t.prototype.getEventType=function(){return this.eventType},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.getPath().toString()+":"+this.eventType+":"+r.stringify(this.snapshot.exportVal())},t}(),e.CancelEvent=function(){function t(t,e,n){this.eventRegistration=t,this.error=e,this.path=n}return t.prototype.getPath=function(){return this.path},t.prototype.getEventType=function(){return"cancel"},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.path.toString()+":cancel"},t}()},AP4T:function(t,e,n){"use strict";var r=n("xIGM"),i=n("E9/g"),o=n("V7AE"),s=n("grVA"),a=n("mz3w"),u=n("ExCY");n.d(e,"a",function(){return c});var c=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,a=function(t,e,n){if(t){if(t instanceof i.a)return t;if(t[o.a])return t[o.a]()}return t||e||n?new i.a(t,e,n):new i.a(s.a)}(t,e,n);if(r?r.call(a,this.source):a.add(this.source||!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.syncErrorThrown=!0,t.syncErrorValue=e,t.error(e)}},t.prototype.forEach=function(t,e){var n=this;if(e||(r.a.Rx&&r.a.Rx.config&&r.a.Rx.config.Promise?e=r.a.Rx.config.Promise:r.a.Promise&&(e=r.a.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,r){var i;i=n.subscribe(function(e){if(i)try{t(e)}catch(t){r(t),i.unsubscribe()}else t(e)},r,e)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[a.a]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return 0===t.length?this:Object(u.b)(t)(this)},t.prototype.toPromise=function(t){var e=this;if(t||(r.a.Rx&&r.a.Rx.config&&r.a.Rx.config.Promise?t=r.a.Rx.config.Promise:r.a.Promise&&(t=r.a.Promise)),!t)throw new Error("no Promise impl found");return new t(function(t,n){var r;e.subscribe(function(t){return r=t},function(t){return n(t)},function(){return t(r)})})},t.create=function(e){return new t(e)},t}()},ASsP:function(t,e,n){"use strict";e.a=function(){return Object(r.a)()(this)};var r=n("Bk5J")},B1iP:function(t,e,n){"use strict";e.a=function(t){return"function"==typeof t}},B2QA:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4"),i=n("JEJ4"),o=n("fvGz"),s=n("2kNe"),a=n("/fob"),u=n("R3TC");e.WriteTree=function(){function t(){this.visibleWrites_=s.CompoundWrite.Empty,this.allWrites_=[],this.lastWriteId_=-1}return t.prototype.childWrites=function(t){return new c(t,this)},t.prototype.addOverwrite=function(t,e,n,r){i.assert(n>this.lastWriteId_,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.allWrites_.push({path:t,snap:e,writeId:n,visible:r}),r&&(this.visibleWrites_=this.visibleWrites_.addWrite(t,e)),this.lastWriteId_=n},t.prototype.addMerge=function(t,e,n){i.assert(n>this.lastWriteId_,"Stacking an older merge on top of newer ones"),this.allWrites_.push({path:t,children:e,writeId:n,visible:!0}),this.visibleWrites_=this.visibleWrites_.addWrites(t,e),this.lastWriteId_=n},t.prototype.getWrite=function(t){for(var e=0;e<this.allWrites_.length;e++){var n=this.allWrites_[e];if(n.writeId===t)return n}return null},t.prototype.removeWrite=function(t){var e=this,n=this.allWrites_.findIndex(function(e){return e.writeId===t});i.assert(n>=0,"removeWrite called with nonexistent writeId.");var o=this.allWrites_[n];this.allWrites_.splice(n,1);for(var s=o.visible,a=!1,u=this.allWrites_.length-1;s&&u>=0;){var c=this.allWrites_[u];c.visible&&(u>=n&&this.recordContainsPath_(c,o.path)?s=!1:o.path.contains(c.path)&&(a=!0)),u--}return!!s&&(a?(this.resetTree_(),!0):(o.snap?this.visibleWrites_=this.visibleWrites_.removeWrite(o.path):r.forEach(o.children,function(t){e.visibleWrites_=e.visibleWrites_.removeWrite(o.path.child(t))}),!0))},t.prototype.getCompleteWriteData=function(t){return this.visibleWrites_.getCompleteNode(t)},t.prototype.calcCompleteEventCache=function(e,n,r,i){if(r||i){var s=this.visibleWrites_.childCompoundWrite(e);return!i&&s.isEmpty()?n:i||null!=n||s.hasCompleteWrite(o.Path.Empty)?t.layerTree_(this.allWrites_,function(t){return(t.visible||i)&&(!r||!~r.indexOf(t.writeId))&&(t.path.contains(e)||e.contains(t.path))},e).apply(n||u.ChildrenNode.EMPTY_NODE):null}var a=this.visibleWrites_.getCompleteNode(e);if(null!=a)return a;var c=this.visibleWrites_.childCompoundWrite(e);return c.isEmpty()?n:null!=n||c.hasCompleteWrite(o.Path.Empty)?c.apply(n||u.ChildrenNode.EMPTY_NODE):null},t.prototype.calcCompleteEventChildren=function(t,e){var n=u.ChildrenNode.EMPTY_NODE,r=this.visibleWrites_.getCompleteNode(t);if(r)return r.isLeafNode()||r.forEachChild(a.PRIORITY_INDEX,function(t,e){n=n.updateImmediateChild(t,e)}),n;if(e){var i=this.visibleWrites_.childCompoundWrite(t);return e.forEachChild(a.PRIORITY_INDEX,function(t,e){var r=i.childCompoundWrite(new o.Path(t)).apply(e);n=n.updateImmediateChild(t,r)}),i.getCompleteChildren().forEach(function(t){n=n.updateImmediateChild(t.name,t.node)}),n}return this.visibleWrites_.childCompoundWrite(t).getCompleteChildren().forEach(function(t){n=n.updateImmediateChild(t.name,t.node)}),n},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n,r){i.assert(n||r,"Either existingEventSnap or existingServerSnap must exist");var o=t.child(e);if(this.visibleWrites_.hasCompleteWrite(o))return null;var s=this.visibleWrites_.childCompoundWrite(o);return s.isEmpty()?r.getChild(e):s.apply(r.getChild(e))},t.prototype.calcCompleteChild=function(t,e,n){var r=t.child(e),i=this.visibleWrites_.getCompleteNode(r);return null!=i?i:n.isCompleteForChild(e)?this.visibleWrites_.childCompoundWrite(r).apply(n.getNode().getImmediateChild(e)):null},t.prototype.shadowingWrite=function(t){return this.visibleWrites_.getCompleteNode(t)},t.prototype.calcIndexedSlice=function(t,e,n,r,i,s){var a,u=this.visibleWrites_.childCompoundWrite(t),c=u.getCompleteNode(o.Path.Empty);if(null!=c)a=c;else{if(null==e)return[];a=u.apply(e)}if((a=a.withIndex(s)).isEmpty()||a.isLeafNode())return[];for(var l=[],h=s.getCompare(),p=i?a.getReverseIteratorFrom(n,s):a.getIteratorFrom(n,s),f=p.getNext();f&&l.length<r;)0!==h(f,n)&&l.push(f),f=p.getNext();return l},t.prototype.recordContainsPath_=function(t,e){return t.snap?t.path.contains(e):!!r.findKey(t.children,function(n,r){return t.path.child(r).contains(e)})},t.prototype.resetTree_=function(){this.visibleWrites_=t.layerTree_(this.allWrites_,t.DefaultFilter_,o.Path.Empty),this.lastWriteId_=this.allWrites_.length>0?this.allWrites_[this.allWrites_.length-1].writeId:-1},t.DefaultFilter_=function(t){return t.visible},t.layerTree_=function(t,e,n){for(var a=s.CompoundWrite.Empty,u=0;u<t.length;++u){var c=t[u];if(e(c)){var l=c.path,h=void 0;if(c.snap)n.contains(l)?(h=o.Path.relativePath(n,l),a=a.addWrite(h,c.snap)):l.contains(n)&&(h=o.Path.relativePath(l,n),a=a.addWrite(o.Path.Empty,c.snap.getChild(h)));else{if(!c.children)throw i.assertionError("WriteRecord should have .snap or .children");if(n.contains(l))h=o.Path.relativePath(n,l),a=a.addWrites(h,c.children);else if(l.contains(n))if((h=o.Path.relativePath(l,n)).isEmpty())a=a.addWrites(o.Path.Empty,c.children);else{var p=r.safeGet(c.children,h.getFront());if(p){var f=p.getChild(h.popFront());a=a.addWrite(o.Path.Empty,f)}}}}}return a},t}();var c=function(){function t(t,e){this.treePath_=t,this.writeTree_=e}return t.prototype.calcCompleteEventCache=function(t,e,n){return this.writeTree_.calcCompleteEventCache(this.treePath_,t,e,n)},t.prototype.calcCompleteEventChildren=function(t){return this.writeTree_.calcCompleteEventChildren(this.treePath_,t)},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n){return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_,t,e,n)},t.prototype.shadowingWrite=function(t){return this.writeTree_.shadowingWrite(this.treePath_.child(t))},t.prototype.calcIndexedSlice=function(t,e,n,r,i){return this.writeTree_.calcIndexedSlice(this.treePath_,t,e,n,r,i)},t.prototype.calcCompleteChild=function(t,e){return this.writeTree_.calcCompleteChild(this.treePath_,t,e)},t.prototype.child=function(e){return new t(this.treePath_.child(e),this.writeTree_)},t}();e.WriteTreeRef=c},Bk5J:function(t,e,n){"use strict";e.a=function(){return Object(r.a)(1)};var r=n("bywS")},CASk:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=n("KRwF").a.create},CIVu:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("6Xbx"),i=n("YY8E"),o=n("JEJ4"),s=function(t){function e(){var e,n,r=t.call(this,["visible"])||this;return"undefined"!=typeof document&&"undefined"!=typeof document.addEventListener&&("undefined"!=typeof document.hidden?(n="visibilitychange",e="hidden"):"undefined"!=typeof document.mozHidden?(n="mozvisibilitychange",e="mozHidden"):"undefined"!=typeof document.msHidden?(n="msvisibilitychange",e="msHidden"):"undefined"!=typeof document.webkitHidden&&(n="webkitvisibilitychange",e="webkitHidden")),r.visible_=!0,n&&document.addEventListener(n,function(){var t=!document[e];t!==r.visible_&&(r.visible_=t,r.trigger("visible",t))},!1),r}return r.__extends(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return o.assert("visible"===t,"Unknown event type: "+t),[this.visible_]},e}(i.EventEmitter);e.VisibilityMonitor=s},COMn:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Error.captureStackTrace;e.patchCapture=function(t){var e=r;return r=t,e};var i=function(){return function(t,e){if(this.code=t,this.message=e,r)r(this,o.prototype.create);else{var n=Error.apply(this,arguments);this.name="FirebaseError",Object.defineProperty(this,"stack",{get:function(){return n.stack}})}}}();e.FirebaseError=i,i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i.prototype.name="FirebaseError";var o=function(){function t(t,e,n){this.service=t,this.serviceName=e,this.errors=n,this.pattern=/\{\$([^}]+)}/g}return t.prototype.create=function(t,e){void 0===e&&(e={});var n,r=this.errors[t],o=this.service+"/"+t;n=void 0===r?"Error":r.replace(this.pattern,function(t,n){var r=e[n];return void 0!==r?r.toString():"<"+n+"?>"});var s=new i(o,n=this.serviceName+": "+n+" ("+o+").");for(var a in e)e.hasOwnProperty(a)&&"_"!==a.slice(-1)&&(s[a]=e[a]);return s},t}();e.ErrorFactory=o},"D0q/":function(t,e,n){"use strict";e.a=function(t,e){return function(n){return n.lift(new o(t,e,n))}};var r=n("6Xbx"),i=n("E9/g"),o=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.thisArg,this.source))},t}(),s=function(t){function e(e,n,r,i){t.call(this,e),this.predicate=n,this.thisArg=r,this.source=i,this.index=0,this.thisArg=r||this}return Object(r.__extends)(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(i.a)},D62v:function(t,e,n){"use strict";e.a=function(t){return Object(r.a)(t)(this)};var r=n("wORZ")},Dvgu:function(t,e,n){t.exports=n("tYwN")},"E9/g":function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n("6Xbx"),i=n("B1iP"),o=n("qLnt"),s=n("grVA"),a=n("V7AE"),u=function(t){function e(n,r,i){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=s.a;break;case 1:if(!n){this.destination=s.a;break}if("object"==typeof n){n instanceof e?(this.syncErrorThrowable=n.syncErrorThrowable,this.destination=n,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new c(this,n));break}default:this.syncErrorThrowable=!0,this.destination=new c(this,n,r,i)}}return Object(r.__extends)(e,t),e.prototype[a.a]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(o.a),c=function(t){function e(e,n,r,o){var a;t.call(this),this._parentSubscriber=e;var u=this;Object(i.a)(n)?a=n:n&&(a=n.next,r=n.error,o=n.complete,n!==s.a&&(u=Object.create(n),Object(i.a)(u.unsubscribe)&&this.add(u.unsubscribe.bind(u)),u.unsubscribe=this.unsubscribe.bind(this))),this._context=u,this._next=a,this._error=r,this._complete=o}return Object(r.__extends)(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){throw this.unsubscribe(),t}},e.prototype.__tryOrSetError=function(t,e,n){try{e.call(this._context,n)}catch(e){return t.syncErrorValue=e,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(u)},EAgh:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4");e.TransactionResult=function(){function t(t,e){this.committed=t,this.snapshot=e}return t.prototype.toJSON=function(){return r.validateArgCount("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},t}()},"Ecq+":function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("6Xbx"),i=function(t){function e(e){t.call(this),this.scheduler=e}return Object(r.__extends)(e,t),e.create=function(t){return new e(t)},e.dispatch=function(t){t.subscriber.complete()},e.prototype._subscribe=function(t){var n=this.scheduler;if(n)return n.schedule(e.dispatch,0,{subscriber:t});t.complete()},e}(n("AP4T").a)},EqqR:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("/byE");e.assert=function(t,n){if(!t)throw e.assertionError(n)},e.assertionError=function(t){return new Error("Firebase Database ("+r.CONSTANTS.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)}},ExCY:function(t,e,n){"use strict";e.a=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return i(t)},e.b=i;var r=n("PR+T");function i(t){return t?1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}:r.a}},F1yO:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("JEJ4"),o=n("JEJ4"),s=n("JEJ4"),a=n("JEJ4"),u=n("JEJ4"),c=n("JEJ4"),l=n("Rgd9"),h=n("JEJ4"),p=n("9yf9"),f=new p.Logger("@firebase/database");e.LUIDGenerator=(r=1,function(){return r++}),e.sha1=function(t){var e=u.stringToByteArray(t),n=new a.Sha1;n.update(e);var r=n.digest();return s.base64.encodeByteArray(r)};var d=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n="",r=0;r<t.length;r++)Array.isArray(t[r])||t[r]&&"object"==typeof t[r]&&"number"==typeof t[r].length?n+=d.apply(null,t[r]):n+="object"==typeof t[r]?c.stringify(t[r]):t[r],n+=" ";return n};e.logger=null;var v=!0;e.enableLogging=function(t,n){i.assert(!n||!0===t||!1===t,"Can't turn on custom loggers persistently."),!0===t?(f.logLevel=p.LogLevel.VERBOSE,e.logger=f.log.bind(f),n&&l.SessionStorage.set("logging_enabled",!0)):"function"==typeof t?e.logger=t:(e.logger=null,l.SessionStorage.remove("logging_enabled"))},e.log=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!0===v&&(v=!1,null===e.logger&&!0===l.SessionStorage.get("logging_enabled")&&e.enableLogging(!0)),e.logger){var r=d.apply(null,t);e.logger(r)}},e.logWrapper=function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];e.log.apply(void 0,[t].concat(n))}},e.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE INTERNAL ERROR: "+d.apply(void 0,t);f.error(n)},e.fatal=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE FATAL ERROR: "+d.apply(void 0,t);throw f.error(n),new Error(n)},e.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE WARNING: "+d.apply(void 0,t);f.warn(n)},e.warnIfPageIsSecure=function(){"undefined"!=typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&e.warn("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().")},e.warnAboutUnsupportedMethod=function(t){e.warn(t+" is unsupported and will likely change soon. Please do not use.")},e.isInvalidJSONNumber=function(t){return"number"==typeof t&&(t!=t||t==Number.POSITIVE_INFINITY||t==Number.NEGATIVE_INFINITY)},e.executeWhenDOMReady=function(t){if(h.isNodeSdk()||"complete"===document.readyState)t();else{var e=!1,n=function(){document.body?e||(e=!0,t()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&n()}),window.attachEvent("onload",n))}},e.MIN_NAME="[MIN_NAME]",e.MAX_NAME="[MAX_NAME]",e.nameCompare=function(t,n){if(t===n)return 0;if(t===e.MIN_NAME||n===e.MAX_NAME)return-1;if(n===e.MIN_NAME||t===e.MAX_NAME)return 1;var r=e.tryParseInt(t),i=e.tryParseInt(n);return null!==r?null!==i?r-i==0?t.length-n.length:r-i:-1:null!==i?1:t<n?-1:1},e.stringCompare=function(t,e){return t===e?0:t<e?-1:1},e.requireKey=function(t,e){if(e&&t in e)return e[t];throw new Error("Missing required key ("+t+") in object: "+c.stringify(e))},e.ObjectToUniqueKey=function(t){if("object"!=typeof t||null===t)return c.stringify(t);var n=[];for(var r in t)n.push(r);n.sort();for(var i="{",o=0;o<n.length;o++)0!==o&&(i+=","),i+=c.stringify(n[o]),i+=":",i+=e.ObjectToUniqueKey(t[n[o]]);return i+"}"},e.splitStringBySize=function(t,e){var n=t.length;if(n<=e)return[t];for(var r=[],i=0;i<n;i+=e)r.push(t.substring(i,i+e>n?n:i+e));return r},e.each=function(t,e){if(Array.isArray(t))for(var n=0;n<t.length;++n)e(n,t[n]);else o.forEach(t,function(t,n){return e(n,t)})},e.bindCallback=function(t,e){return e?t.bind(e):t},e.doubleToIEEE754String=function(t){var n,r,o,s,a,u,c;for(i.assert(!e.isInvalidJSONNumber(t),"Invalid JSON number"),0===t?(r=0,o=0,n=1/t==-1/0?1:0):(n=t<0,(t=Math.abs(t))>=Math.pow(2,-1022)?(r=(s=Math.min(Math.floor(Math.log(t)/Math.LN2),1023))+1023,o=Math.round(t*Math.pow(2,52-s)-Math.pow(2,52))):(r=0,o=Math.round(t/Math.pow(2,-1074)))),u=[],a=52;a;a-=1)u.push(o%2?1:0),o=Math.floor(o/2);for(a=11;a;a-=1)u.push(r%2?1:0),r=Math.floor(r/2);u.push(n?1:0),u.reverse(),c=u.join("");var l="";for(a=0;a<64;a+=8){var h=parseInt(c.substr(a,8),2).toString(16);1===h.length&&(h="0"+h),l+=h}return l.toLowerCase()},e.isChromeExtensionContentScript=function(){return!("object"!=typeof window||!window.chrome||!window.chrome.extension||/^chrome/.test(window.location.href))},e.isWindowsStoreApp=function(){return"object"==typeof Windows&&"object"==typeof Windows.UI},e.errorForServerCode=function(t,e){var n="Unknown Error";"too_big"===t?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"==t?n="Client doesn't have permission to access the desired data.":"unavailable"==t&&(n="The service is unavailable");var r=new Error(t+" at "+e.path.toString()+": "+n);return r.code=t.toUpperCase(),r},e.INTEGER_REGEXP_=new RegExp("^-?\\d{1,10}$"),e.tryParseInt=function(t){if(e.INTEGER_REGEXP_.test(t)){var n=Number(t);if(n>=-2147483648&&n<=2147483647)return n}return null},e.exceptionGuard=function(t){try{t()}catch(t){setTimeout(function(){throw e.warn("Exception was thrown by user callback.",t.stack||""),t},Math.floor(0))}},e.callUserCallback=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"function"==typeof t&&e.exceptionGuard(function(){t.apply(void 0,n)})},e.beingCrawled=function(){return("object"==typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},e.exportPropGetter=function(t,e,n){Object.defineProperty(t,e,{get:n})},e.setTimeoutNonBlocking=function(t,e){var n=setTimeout(t,e);return"object"==typeof n&&n.unref&&n.unref(),n}},FGYS:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("qYrH"),i=n("9ard"),o=n("F1yO");e.TransportManager=function(){function t(t){this.initTransports_(t)}return Object.defineProperty(t,"ALL_TRANSPORTS",{get:function(){return[r.BrowserPollConnection,i.WebSocketConnection]},enumerable:!0,configurable:!0}),t.prototype.initTransports_=function(e){var n=i.WebSocketConnection&&i.WebSocketConnection.isAvailable(),r=n&&!i.WebSocketConnection.previouslyFailed();if(e.webSocketOnly&&(n||o.warn("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),r=!0),r)this.transports_=[i.WebSocketConnection];else{var s=this.transports_=[];o.each(t.ALL_TRANSPORTS,function(t,e){e&&e.isAvailable()&&s.push(e)})}},t.prototype.initialTransport=function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")},t.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},t}()},FOvx:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("fvGz"),i=n("gOHv");e.ListenComplete=function(){function t(t,e){this.source=t,this.path=e,this.type=i.OperationType.LISTEN_COMPLETE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,r.Path.Empty):new t(this.source,this.path.popFront())},t}()},Fwmd:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4");e.MemoryStorage=function(){function t(){this.cache_={},this.isInMemoryStorage=!0}return t.prototype.set=function(t,e){null==e?delete this.cache_[t]:this.cache_[t]=e},t.prototype.get=function(t){return r.contains(this.cache_,t)?this.cache_[t]:null},t.prototype.remove=function(t){delete this.cache_[t]},t}()},G0Qy:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("6Xbx"),i=n("JEJ4"),o=n("F1yO"),s=n("GboV"),a=n("R3TC"),u=n("p+VM"),c=n("43Go"),l=function(t){function e(e){var n=t.call(this)||this;return n.indexPath_=e,i.assert(!e.isEmpty()&&".priority"!==e.getFront(),"Can't create PathIndex with empty path or .priority key"),n}return r.__extends(e,t),e.prototype.extractChild=function(t){return t.getChild(this.indexPath_)},e.prototype.isDefinedOn=function(t){return!t.getChild(this.indexPath_).isEmpty()},e.prototype.compare=function(t,e){var n=this.extractChild(t.node),r=this.extractChild(e.node),i=n.compareTo(r);return 0===i?o.nameCompare(t.name,e.name):i},e.prototype.makePost=function(t,e){var n=c.nodeFromJSON(t),r=a.ChildrenNode.EMPTY_NODE.updateChild(this.indexPath_,n);return new u.NamedNode(e,r)},e.prototype.maxPost=function(){var t=a.ChildrenNode.EMPTY_NODE.updateChild(this.indexPath_,a.MAX_NODE);return new u.NamedNode(o.MAX_NAME,t)},e.prototype.toString=function(){return this.indexPath_.slice().join("/")},e}(s.Index);e.PathIndex=l},GEki:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("y8hQ"),i=function(){function t(){}return t.prototype.getCompleteChild=function(t){return null},t.prototype.getChildAfterChild=function(t,e,n){return null},t}();e.NoCompleteChildSource_=i,e.NO_COMPLETE_CHILD_SOURCE=new i,e.WriteTreeCompleteChildSource=function(){function t(t,e,n){void 0===n&&(n=null),this.writes_=t,this.viewCache_=e,this.optCompleteServerCache_=n}return t.prototype.getCompleteChild=function(t){var e=this.viewCache_.getEventCache();if(e.isCompleteForChild(t))return e.getNode().getImmediateChild(t);var n=null!=this.optCompleteServerCache_?new r.CacheNode(this.optCompleteServerCache_,!0,!1):this.viewCache_.getServerCache();return this.writes_.calcCompleteChild(t,n)},t.prototype.getChildAfterChild=function(t,e,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:this.viewCache_.getCompleteServerSnap(),i=this.writes_.calcIndexedSlice(r,e,1,n,t);return 0===i.length?null:i[0]},t}()},GZB0:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=n("Oryw").a.of},GboV:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("p+VM"),i=n("F1yO");e.Index=function(){function t(){}return t.prototype.getCompare=function(){return this.compare.bind(this)},t.prototype.indexedValueChanged=function(t,e){var n=new r.NamedNode(i.MIN_NAME,t),o=new r.NamedNode(i.MIN_NAME,e);return 0!==this.compare(n,o)},t.prototype.minPost=function(){return r.NamedNode.MIN},t}()},GnQ5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4"),i=n("xfHL"),o=n("fvGz"),s=n("/fob");e.DataSnapshot=function(){function t(t,e,n){this.node_=t,this.ref_=e,this.index_=n}return t.prototype.val=function(){return r.validateArgCount("DataSnapshot.val",0,0,arguments.length),this.node_.val()},t.prototype.exportVal=function(){return r.validateArgCount("DataSnapshot.exportVal",0,0,arguments.length),this.node_.val(!0)},t.prototype.toJSON=function(){return r.validateArgCount("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},t.prototype.exists=function(){return r.validateArgCount("DataSnapshot.exists",0,0,arguments.length),!this.node_.isEmpty()},t.prototype.child=function(e){r.validateArgCount("DataSnapshot.child",0,1,arguments.length),e=String(e),i.validatePathString("DataSnapshot.child",1,e,!1);var n=new o.Path(e),a=this.ref_.child(n);return new t(this.node_.getChild(n),a,s.PRIORITY_INDEX)},t.prototype.hasChild=function(t){r.validateArgCount("DataSnapshot.hasChild",1,1,arguments.length),i.validatePathString("DataSnapshot.hasChild",1,t,!1);var e=new o.Path(t);return!this.node_.getChild(e).isEmpty()},t.prototype.getPriority=function(){return r.validateArgCount("DataSnapshot.getPriority",0,0,arguments.length),this.node_.getPriority().val()},t.prototype.forEach=function(e){var n=this;return r.validateArgCount("DataSnapshot.forEach",1,1,arguments.length),r.validateCallback("DataSnapshot.forEach",1,e,!1),!this.node_.isLeafNode()&&!!this.node_.forEachChild(this.index_,function(r,i){return e(new t(i,n.ref_.child(r),s.PRIORITY_INDEX))})},t.prototype.hasChildren=function(){return r.validateArgCount("DataSnapshot.hasChildren",0,0,arguments.length),!this.node_.isLeafNode()&&!this.node_.isEmpty()},Object.defineProperty(t.prototype,"key",{get:function(){return this.ref_.getKey()},enumerable:!0,configurable:!0}),t.prototype.numChildren=function(){return r.validateArgCount("DataSnapshot.numChildren",0,0,arguments.length),this.node_.numChildren()},t.prototype.getRef=function(){return r.validateArgCount("DataSnapshot.ref",0,0,arguments.length),this.ref_},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),t}()},Htcq:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4"),i=n("F1yO"),o=n("rbSf"),s=n("R3TC"),a=n("JEJ4"),u=n("dVae"),c=n("FOvx"),l=n("/68J"),h=n("gOHv"),p=n("kCHx"),f=n("fvGz"),d=n("uCc5"),v=n("B2QA");e.SyncTree=function(){function t(t){this.listenProvider_=t,this.syncPointTree_=u.ImmutableTree.Empty,this.pendingWriteTree_=new v.WriteTree,this.tagToQueryMap_={},this.queryToTagMap_={}}return t.prototype.applyUserOverwrite=function(t,e,n,r){return this.pendingWriteTree_.addOverwrite(t,e,n,r),r?this.applyOperationToSyncPoints_(new p.Overwrite(h.OperationSource.User,t,e)):[]},t.prototype.applyUserMerge=function(t,e,n){this.pendingWriteTree_.addMerge(t,e,n);var r=u.ImmutableTree.fromObject(e);return this.applyOperationToSyncPoints_(new l.Merge(h.OperationSource.User,t,r))},t.prototype.ackUserWrite=function(t,e){void 0===e&&(e=!1);var n=this.pendingWriteTree_.getWrite(t);if(this.pendingWriteTree_.removeWrite(t)){var r=u.ImmutableTree.Empty;return null!=n.snap?r=r.set(f.Path.Empty,!0):a.forEach(n.children,function(t,e){r=r.set(new f.Path(t),e)}),this.applyOperationToSyncPoints_(new o.AckUserWrite(n.path,r,e))}return[]},t.prototype.applyServerOverwrite=function(t,e){return this.applyOperationToSyncPoints_(new p.Overwrite(h.OperationSource.Server,t,e))},t.prototype.applyServerMerge=function(t,e){var n=u.ImmutableTree.fromObject(e);return this.applyOperationToSyncPoints_(new l.Merge(h.OperationSource.Server,t,n))},t.prototype.applyListenComplete=function(t){return this.applyOperationToSyncPoints_(new c.ListenComplete(h.OperationSource.Server,t))},t.prototype.applyTaggedQueryOverwrite=function(e,n,r){var i=this.queryKeyForTag_(r);if(null!=i){var o=t.parseQueryKey_(i),s=o.path,a=o.queryId,u=f.Path.relativePath(s,e),c=new p.Overwrite(h.OperationSource.forServerTaggedQuery(a),u,n);return this.applyTaggedOperation_(s,c)}return[]},t.prototype.applyTaggedQueryMerge=function(e,n,r){var i=this.queryKeyForTag_(r);if(i){var o=t.parseQueryKey_(i),s=o.path,a=o.queryId,c=f.Path.relativePath(s,e),p=u.ImmutableTree.fromObject(n),d=new l.Merge(h.OperationSource.forServerTaggedQuery(a),c,p);return this.applyTaggedOperation_(s,d)}return[]},t.prototype.applyTaggedListenComplete=function(e,n){var r=this.queryKeyForTag_(n);if(r){var i=t.parseQueryKey_(r),o=i.path,s=i.queryId,a=f.Path.relativePath(o,e),u=new c.ListenComplete(h.OperationSource.forServerTaggedQuery(s),a);return this.applyTaggedOperation_(o,u)}return[]},t.prototype.addEventRegistration=function(e,n){var i=e.path,o=null,a=!1;this.syncPointTree_.foreachOnPath(i,function(t,e){var n=f.Path.relativePath(t,i);o=o||e.getCompleteServerCache(n),a=a||e.hasCompleteView()});var u,c=this.syncPointTree_.get(i);c?(a=a||c.hasCompleteView(),o=o||c.getCompleteServerCache(f.Path.Empty)):(c=new d.SyncPoint,this.syncPointTree_=this.syncPointTree_.set(i,c)),null!=o?u=!0:(u=!1,o=s.ChildrenNode.EMPTY_NODE,this.syncPointTree_.subtree(i).foreachChild(function(t,e){var n=e.getCompleteServerCache(f.Path.Empty);n&&(o=o.updateImmediateChild(t,n))}));var l=c.viewExistsForQuery(e);if(!l&&!e.getQueryParams().loadsAllData()){var h=t.makeQueryKey_(e);r.assert(!(h in this.queryToTagMap_),"View does not exist, but we have a tag");var p=t.getNextQueryTag_();this.queryToTagMap_[h]=p,this.tagToQueryMap_["_"+p]=h}var v=this.pendingWriteTree_.childWrites(i),y=c.addEventRegistration(e,n,v,o,u);if(!l&&!a){var g=c.viewForQuery(e);y=y.concat(this.setupListener_(e,g))}return y},t.prototype.removeEventRegistration=function(e,n,r){var i=this,o=e.path,s=this.syncPointTree_.get(o),a=[];if(s&&("default"===e.queryIdentifier()||s.viewExistsForQuery(e))){var u=s.removeEventRegistration(e,n,r);s.isEmpty()&&(this.syncPointTree_=this.syncPointTree_.remove(o));var c=u.removed;a=u.events;var l=-1!==c.findIndex(function(t){return t.getQueryParams().loadsAllData()}),h=this.syncPointTree_.findOnPath(o,function(t,e){return e.hasCompleteView()});if(l&&!h){var p=this.syncPointTree_.subtree(o);if(!p.isEmpty())for(var f=this.collectDistinctViewsForSubTree_(p),d=0;d<f.length;++d){var v=f[d],y=v.getQuery(),g=this.createListenerForView_(v);this.listenProvider_.startListening(t.queryForListening_(y),this.tagForQuery_(y),g.hashFn,g.onComplete)}}!h&&c.length>0&&!r&&(l?this.listenProvider_.stopListening(t.queryForListening_(e),null):c.forEach(function(e){var n=i.queryToTagMap_[t.makeQueryKey_(e)];i.listenProvider_.stopListening(t.queryForListening_(e),n)})),this.removeTags_(c)}return a},t.prototype.calcCompleteEventCache=function(t,e){var n=this.pendingWriteTree_,r=this.syncPointTree_.findOnPath(t,function(e,n){var r=f.Path.relativePath(e,t),i=n.getCompleteServerCache(r);if(i)return i});return n.calcCompleteEventCache(t,r,e,!0)},t.prototype.collectDistinctViewsForSubTree_=function(t){return t.fold(function(t,e,n){if(e&&e.hasCompleteView())return[e.getCompleteView()];var r=[];return e&&(r=e.getQueryViews()),a.forEach(n,function(t,e){r=r.concat(e)}),r})},t.prototype.removeTags_=function(e){for(var n=0;n<e.length;++n){var r=e[n];if(!r.getQueryParams().loadsAllData()){var i=t.makeQueryKey_(r),o=this.queryToTagMap_[i];delete this.queryToTagMap_[i],delete this.tagToQueryMap_["_"+o]}}},t.queryForListening_=function(t){return t.getQueryParams().loadsAllData()&&!t.getQueryParams().isDefault()?t.getRef():t},t.prototype.setupListener_=function(e,n){var i=e.path,o=this.tagForQuery_(e),s=this.createListenerForView_(n),u=this.listenProvider_.startListening(t.queryForListening_(e),o,s.hashFn,s.onComplete),c=this.syncPointTree_.subtree(i);if(o)r.assert(!c.value.hasCompleteView(),"If we're adding a query, it shouldn't be shadowed");else for(var l=c.fold(function(t,e,n){if(!t.isEmpty()&&e&&e.hasCompleteView())return[e.getCompleteView().getQuery()];var r=[];return e&&(r=r.concat(e.getQueryViews().map(function(t){return t.getQuery()}))),a.forEach(n,function(t,e){r=r.concat(e)}),r}),h=0;h<l.length;++h){var p=l[h];this.listenProvider_.stopListening(t.queryForListening_(p),this.tagForQuery_(p))}return u},t.prototype.createListenerForView_=function(t){var e=this,n=t.getQuery(),r=this.tagForQuery_(n);return{hashFn:function(){return(t.getServerCache()||s.ChildrenNode.EMPTY_NODE).hash()},onComplete:function(t){if("ok"===t)return r?e.applyTaggedListenComplete(n.path,r):e.applyListenComplete(n.path);var o=i.errorForServerCode(t,n);return e.removeEventRegistration(n,null,o)}}},t.makeQueryKey_=function(t){return t.path.toString()+"$"+t.queryIdentifier()},t.parseQueryKey_=function(t){var e=t.indexOf("$");return r.assert(-1!==e&&e<t.length-1,"Bad queryKey."),{queryId:t.substr(e+1),path:new f.Path(t.substr(0,e))}},t.prototype.queryKeyForTag_=function(t){return this.tagToQueryMap_["_"+t]},t.prototype.tagForQuery_=function(e){var n=t.makeQueryKey_(e);return a.safeGet(this.queryToTagMap_,n)},t.getNextQueryTag_=function(){return t.nextQueryTag_++},t.prototype.applyTaggedOperation_=function(t,e){var n=this.syncPointTree_.get(t);r.assert(n,"Missing sync point for query tag that we're tracking");var i=this.pendingWriteTree_.childWrites(t);return n.applyOperation(e,i,null)},t.prototype.applyOperationToSyncPoints_=function(t){return this.applyOperationHelper_(t,this.syncPointTree_,null,this.pendingWriteTree_.childWrites(f.Path.Empty))},t.prototype.applyOperationHelper_=function(t,e,n,r){if(t.path.isEmpty())return this.applyOperationDescendantsHelper_(t,e,n,r);var i=e.get(f.Path.Empty);null==n&&null!=i&&(n=i.getCompleteServerCache(f.Path.Empty));var o=[],s=t.path.getFront(),a=t.operationForChild(s),u=e.children.get(s);if(u&&a){var c=n?n.getImmediateChild(s):null,l=r.child(s);o=o.concat(this.applyOperationHelper_(a,u,c,l))}return i&&(o=o.concat(i.applyOperation(t,r,n))),o},t.prototype.applyOperationDescendantsHelper_=function(t,e,n,r){var i=this,o=e.get(f.Path.Empty);null==n&&null!=o&&(n=o.getCompleteServerCache(f.Path.Empty));var s=[];return e.children.inorderTraversal(function(e,o){var a=n?n.getImmediateChild(e):null,u=r.child(e),c=t.operationForChild(e);c&&(s=s.concat(i.applyOperationDescendantsHelper_(c,o,a,u)))}),o&&(s=s.concat(o.applyOperation(t,r,n))),s},t.nextQueryTag_=1,t}()},Hyt9:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Deferred=function(){function t(){var t=this;this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})}return t.prototype.wrapCallback=function(t){var e=this;return function(n,r){n?e.reject(n):e.resolve(r),"function"==typeof t&&(e.promise.catch(function(){}),1===t.length?t(n):t(n,r))}},t}()},JCUt:function(t,e,n){"use strict";function r(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:return new Date(e.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return e}for(var n in e)e.hasOwnProperty(n)&&(t[n]=r(t[n],e[n]));return t}Object.defineProperty(e,"__esModule",{value:!0}),e.deepCopy=function(t){return r(void 0,t)},e.deepExtend=r,e.patchProperty=function(t,e,n){t[e]=n}},JEJ4:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("EqqR");e.assert=r.assert,e.assertionError=r.assertionError;var i=n("e9+7");e.base64=i.base64,e.base64Decode=i.base64Decode,e.base64Encode=i.base64Encode;var o=n("/byE");e.CONSTANTS=o.CONSTANTS;var s=n("JCUt");e.deepCopy=s.deepCopy,e.deepExtend=s.deepExtend,e.patchProperty=s.patchProperty;var a=n("Hyt9");e.Deferred=a.Deferred;var u=n("U4XL");e.getUA=u.getUA,e.isMobileCordova=u.isMobileCordova,e.isNodeSdk=u.isNodeSdk,e.isReactNative=u.isReactNative;var c=n("COMn");e.ErrorFactory=c.ErrorFactory,e.FirebaseError=c.FirebaseError,e.patchCapture=c.patchCapture;var l=n("WH8D");e.jsonEval=l.jsonEval,e.stringify=l.stringify;var h=n("NYZW");e.decode=h.decode,e.isAdmin=h.isAdmin,e.issuedAtTime=h.issuedAtTime,e.isValidFormat=h.isValidFormat,e.isValidTimestamp=h.isValidTimestamp;var p=n("/ygB");e.clone=p.clone,e.contains=p.contains,e.every=p.every,e.extend=p.extend,e.findKey=p.findKey,e.findValue=p.findValue,e.forEach=p.forEach,e.getAnyKey=p.getAnyKey,e.getCount=p.getCount,e.getValues=p.getValues,e.isEmpty=p.isEmpty,e.isNonNullObject=p.isNonNullObject,e.map=p.map,e.safeGet=p.safeGet;var f=n("NeHU");e.querystring=f.querystring,e.querystringDecode=f.querystringDecode;var d=n("uzI5");e.Sha1=d.Sha1;var v=n("Xp63");e.async=v.async,e.createSubscribe=v.createSubscribe;var y=n("Tmcl");e.errorPrefix=y.errorPrefix,e.validateArgCount=y.validateArgCount,e.validateCallback=y.validateCallback,e.validateContextObject=y.validateContextObject,e.validateNamespace=y.validateNamespace;var g=n("2mdx");e.stringLength=g.stringLength,e.stringToByteArray=g.stringToByteArray},Jsyr:function(t,e,n){"use strict";var r=n("6Xbx"),i=n("AP4T"),o=n("Ecq+"),s=n("1j/l"),a=n("qgI0"),u=n("lI6h"),c=function(t){function e(e,n){t.call(this),this.sources=e,this.resultSelector=n}return Object(r.__extends)(e,t),e.create=function(){for(var t=[],n=0;n<arguments.length;n++)t[n-0]=arguments[n];if(null===t||0===arguments.length)return new o.a;var r=null;return"function"==typeof t[t.length-1]&&(r=t.pop()),1===t.length&&Object(s.a)(t[0])&&(t=t[0]),0===t.length?new o.a:new e(t,r)},e.prototype._subscribe=function(t){return new l(t,this.sources,this.resultSelector)},e}(i.a),l=function(t){function e(e,n,r){t.call(this,e),this.sources=n,this.resultSelector=r,this.completed=0,this.haveValues=0;var i=n.length;this.total=i,this.values=new Array(i);for(var o=0;o<i;o++){var s=n[o],u=Object(a.a)(this,s,null,o);u&&(u.outerIndex=o,this.add(u))}}return Object(r.__extends)(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values[n]=e,i._hasValue||(i._hasValue=!0,this.haveValues++)},e.prototype.notifyComplete=function(t){var e=this.destination,n=this.haveValues,r=this.resultSelector,i=this.values,o=i.length;if(t._hasValue){if(this.completed++,this.completed===o){if(n===o){var s=r?r.apply(this,i):i;e.next(s)}e.complete()}}else e.complete()},e}(u.a);n.d(e,"a",function(){return h});var h=c.create},JyCd:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("mxkr"),i=n("TO51"),o=function(){function t(){this.onEditing=new i.b,this.onIngredientAdded=new i.b,this.ingredients=[new r.a("Apples",5),new r.a("Onions",10)]}return t.prototype.getIngredient=function(){return this.ingredients.slice()},t.prototype.getIngre=function(t){return this.ingredients[t]},t.prototype.AddIngredient=function(t){this.ingredients.push(t),this.onIngredientAdded.next(this.ingredients.slice())},t.prototype.AddIngredients=function(t){var e;(e=this.ingredients).push.apply(e,t),this.onIngredientAdded.next(this.ingredients.slice())},t.prototype.onAddIng=function(t){this.AddIngredients(t)},t.prototype.UpdateIngredient=function(t,e){this.ingredients[t]=e,this.onIngredientAdded.next(this.ingredients.slice())},t.prototype.deleteIngredient=function(t){this.ingredients.splice(t,1),this.onIngredientAdded.next(this.ingredients.slice())},t}()},KH1l:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("gOHv"),i=n("JEJ4"),o=n("/0OS"),s=n("ertD"),a=n("R3TC"),u=n("stu6"),c=n("dVae"),l=n("fvGz"),h=n("GEki"),p=function(t,e){this.viewCache=t,this.changes=e};e.ProcessorResult=p,e.ViewProcessor=function(){function t(t){this.filter_=t}return t.prototype.assertIndexed=function(t){i.assert(t.getEventCache().getNode().isIndexed(this.filter_.getIndex()),"Event snap not indexed"),i.assert(t.getServerCache().getNode().isIndexed(this.filter_.getIndex()),"Server snap not indexed")},t.prototype.applyOperation=function(e,n,s,a){var u,c,l=new o.ChildChangeAccumulator;if(n.type===r.OperationType.OVERWRITE){var h=n;h.source.fromUser?u=this.applyUserOverwrite_(e,h.path,h.snap,s,a,l):(i.assert(h.source.fromServer,"Unknown source."),c=h.source.tagged||e.getServerCache().isFiltered()&&!h.path.isEmpty(),u=this.applyServerOverwrite_(e,h.path,h.snap,s,a,c,l))}else if(n.type===r.OperationType.MERGE){var f=n;f.source.fromUser?u=this.applyUserMerge_(e,f.path,f.children,s,a,l):(i.assert(f.source.fromServer,"Unknown source."),c=f.source.tagged||e.getServerCache().isFiltered(),u=this.applyServerMerge_(e,f.path,f.children,s,a,c,l))}else if(n.type===r.OperationType.ACK_USER_WRITE){var d=n;u=d.revert?this.revertUserWrite_(e,d.path,s,a,l):this.ackUserWrite_(e,d.path,d.affectedTree,s,a,l)}else{if(n.type!==r.OperationType.LISTEN_COMPLETE)throw i.assertionError("Unknown operation type: "+n.type);u=this.listenComplete_(e,n.path,s,l)}var v=l.getChanges();return t.maybeAddValueEvent_(e,u,v),new p(u,v)},t.maybeAddValueEvent_=function(t,e,n){var r=e.getEventCache();if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=t.getCompleteEventSnap();(n.length>0||!t.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(s.Change.valueChange(e.getCompleteEventSnap()))}},t.prototype.generateEventCacheAfterServerEvent_=function(t,e,n,r,o){var s=t.getEventCache();if(null!=n.shadowingWrite(e))return t;var u=void 0,c=void 0;if(e.isEmpty())if(i.assert(t.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),t.getServerCache().isFiltered()){var l=t.getCompleteServerSnap(),h=n.calcCompleteEventChildren(l instanceof a.ChildrenNode?l:a.ChildrenNode.EMPTY_NODE);u=this.filter_.updateFullNode(t.getEventCache().getNode(),h,o)}else{var p=n.calcCompleteEventCache(t.getCompleteServerSnap());u=this.filter_.updateFullNode(t.getEventCache().getNode(),p,o)}else{var f=e.getFront();if(".priority"==f){i.assert(1==e.getLength(),"Can't have a priority with additional path components");var d=s.getNode();c=t.getServerCache().getNode();var v=n.calcEventCacheAfterServerOverwrite(e,d,c);u=null!=v?this.filter_.updatePriority(d,v):s.getNode()}else{var y=e.popFront(),g=void 0;if(s.isCompleteForChild(f)){c=t.getServerCache().getNode();var _=n.calcEventCacheAfterServerOverwrite(e,s.getNode(),c);g=null!=_?s.getNode().getImmediateChild(f).updateChild(y,_):s.getNode().getImmediateChild(f)}else g=n.calcCompleteChild(f,t.getServerCache());u=null!=g?this.filter_.updateChild(s.getNode(),f,g,y,r,o):s.getNode()}}return t.updateEventSnap(u,s.isFullyInitialized()||e.isEmpty(),this.filter_.filtersNodes())},t.prototype.applyServerOverwrite_=function(t,e,n,r,i,o,s){var a,u=t.getServerCache(),c=o?this.filter_:this.filter_.getIndexedFilter();if(e.isEmpty())a=c.updateFullNode(u.getNode(),n,null);else if(c.filtersNodes()&&!u.isFiltered()){var l=u.getNode().updateChild(e,n);a=c.updateFullNode(u.getNode(),l,null)}else{var p=e.getFront();if(!u.isCompleteForPath(e)&&e.getLength()>1)return t;var f=e.popFront(),d=u.getNode().getImmediateChild(p).updateChild(f,n);a=".priority"==p?c.updatePriority(u.getNode(),d):c.updateChild(u.getNode(),p,d,f,h.NO_COMPLETE_CHILD_SOURCE,null)}var v=t.updateServerSnap(a,u.isFullyInitialized()||e.isEmpty(),c.filtersNodes()),y=new h.WriteTreeCompleteChildSource(r,v,i);return this.generateEventCacheAfterServerEvent_(v,e,r,y,s)},t.prototype.applyUserOverwrite_=function(t,e,n,r,i,o){var s,u,c=t.getEventCache(),l=new h.WriteTreeCompleteChildSource(r,t,i);if(e.isEmpty())u=this.filter_.updateFullNode(t.getEventCache().getNode(),n,o),s=t.updateEventSnap(u,!0,this.filter_.filtersNodes());else{var p=e.getFront();if(".priority"===p)u=this.filter_.updatePriority(t.getEventCache().getNode(),n),s=t.updateEventSnap(u,c.isFullyInitialized(),c.isFiltered());else{var f=e.popFront(),d=c.getNode().getImmediateChild(p),v=void 0;if(f.isEmpty())v=n;else{var y=l.getCompleteChild(p);v=null!=y?".priority"===f.getBack()&&y.getChild(f.parent()).isEmpty()?y:y.updateChild(f,n):a.ChildrenNode.EMPTY_NODE}if(d.equals(v))s=t;else{var g=this.filter_.updateChild(c.getNode(),p,v,f,l,o);s=t.updateEventSnap(g,c.isFullyInitialized(),this.filter_.filtersNodes())}}}return s},t.cacheHasChild_=function(t,e){return t.getEventCache().isCompleteForChild(e)},t.prototype.applyUserMerge_=function(e,n,r,i,o,s){var a=this,u=e;return r.foreach(function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())&&(u=a.applyUserOverwrite_(u,l,c,i,o,s))}),r.foreach(function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())||(u=a.applyUserOverwrite_(u,l,c,i,o,s))}),u},t.prototype.applyMerge_=function(t,e){return e.foreach(function(e,n){t=t.updateChild(e,n)}),t},t.prototype.applyServerMerge_=function(t,e,n,r,i,o,s){var a=this;if(t.getServerCache().getNode().isEmpty()&&!t.getServerCache().isFullyInitialized())return t;var u,h=t;u=e.isEmpty()?n:c.ImmutableTree.Empty.setTree(e,n);var p=t.getServerCache().getNode();return u.children.inorderTraversal(function(e,n){if(p.hasChild(e)){var u=t.getServerCache().getNode().getImmediateChild(e),c=a.applyMerge_(u,n);h=a.applyServerOverwrite_(h,new l.Path(e),c,r,i,o,s)}}),u.children.inorderTraversal(function(e,n){var u=!t.getServerCache().isCompleteForChild(e)&&null==n.value;if(!p.hasChild(e)&&!u){var c=t.getServerCache().getNode().getImmediateChild(e),f=a.applyMerge_(c,n);h=a.applyServerOverwrite_(h,new l.Path(e),f,r,i,o,s)}}),h},t.prototype.ackUserWrite_=function(t,e,n,r,i,o){if(null!=r.shadowingWrite(e))return t;var s=t.getServerCache().isFiltered(),a=t.getServerCache();if(null!=n.value){if(e.isEmpty()&&a.isFullyInitialized()||a.isCompleteForPath(e))return this.applyServerOverwrite_(t,e,a.getNode().getChild(e),r,i,s,o);if(e.isEmpty()){var h=c.ImmutableTree.Empty;return a.getNode().forEachChild(u.KEY_INDEX,function(t,e){h=h.set(new l.Path(t),e)}),this.applyServerMerge_(t,e,h,r,i,s,o)}return t}var p=c.ImmutableTree.Empty;return n.foreach(function(t,n){var r=e.child(t);a.isCompleteForPath(r)&&(p=p.set(t,a.getNode().getChild(r)))}),this.applyServerMerge_(t,e,p,r,i,s,o)},t.prototype.listenComplete_=function(t,e,n,r){var i=t.getServerCache(),o=t.updateServerSnap(i.getNode(),i.isFullyInitialized()||e.isEmpty(),i.isFiltered());return this.generateEventCacheAfterServerEvent_(o,e,n,h.NO_COMPLETE_CHILD_SOURCE,r)},t.prototype.revertUserWrite_=function(t,e,n,r,o){var s;if(null!=n.shadowingWrite(e))return t;var u=new h.WriteTreeCompleteChildSource(n,t,r),c=t.getEventCache().getNode(),p=void 0;if(e.isEmpty()||".priority"===e.getFront()){var f=void 0;if(t.getServerCache().isFullyInitialized())f=n.calcCompleteEventCache(t.getCompleteServerSnap());else{var d=t.getServerCache().getNode();i.assert(d instanceof a.ChildrenNode,"serverChildren would be complete if leaf node"),f=n.calcCompleteEventChildren(d)}p=this.filter_.updateFullNode(c,f=f,o)}else{var v=e.getFront(),y=n.calcCompleteChild(v,t.getServerCache());null==y&&t.getServerCache().isCompleteForChild(v)&&(y=c.getImmediateChild(v)),(p=null!=y?this.filter_.updateChild(c,v,y,e.popFront(),u,o):t.getEventCache().getNode().hasChild(v)?this.filter_.updateChild(c,v,a.ChildrenNode.EMPTY_NODE,e.popFront(),u,o):c).isEmpty()&&t.getServerCache().isFullyInitialized()&&(s=n.calcCompleteEventCache(t.getCompleteServerSnap())).isLeafNode()&&(p=this.filter_.updateFullNode(p,s,o))}return s=t.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(l.Path.Empty),t.updateEventSnap(p,s,this.filter_.filtersNodes())},t}()},KRwF:function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n("6Xbx"),i=n("xIGM"),o=function(t){function e(e,n){t.call(this),this.promise=e,this.scheduler=n}return Object(r.__extends)(e,t),e.create=function(t,n){return new e(t,n)},e.prototype._subscribe=function(t){var e=this,n=this.promise,r=this.scheduler;if(null==r)this._isScalar?t.closed||(t.next(this.value),t.complete()):n.then(function(n){e.value=n,e._isScalar=!0,t.closed||(t.next(n),t.complete())},function(e){t.closed||t.error(e)}).then(null,function(t){i.a.setTimeout(function(){throw t})});else if(this._isScalar){if(!t.closed)return r.schedule(s,0,{value:this.value,subscriber:t})}else n.then(function(n){e.value=n,e._isScalar=!0,t.closed||t.add(r.schedule(s,0,{value:n,subscriber:t}))},function(e){t.closed||t.add(r.schedule(a,0,{err:e,subscriber:t}))}).then(null,function(t){i.a.setTimeout(function(){throw t})})},e}(n("AP4T").a);function s(t){var e=t.subscriber;e.closed||(e.next(t.value),e.complete())}function a(t){var e=t.subscriber;e.closed||e.error(t.err)}},LHF8:function(t,e,n){"use strict";e.a=function(t,e){return function(n){var o;if(o="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new i(o,e));var s=Object.create(n,r.a);return s.source=n,s.subjectFactory=o,s}};var r=n("z0HA"),i=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}()},LMZF:function(t,e,n){"use strict";(function(t){n.d(e,"g",function(){return Yt}),n.d(e,"Q",function(){return Ht}),n.d(e,"T",function(){return Gt}),n.d(e,"P",function(){return Kt}),n.d(e,"w",function(){return zt}),n.d(e,"c",function(){return rt}),n.d(e,"A",function(){return st}),n.d(e,"z",function(){return at}),n.d(e,"b",function(){return ut}),n.d(e,"d",function(){return et}),n.d(e,"e",function(){return nt}),n.d(e,"S",function(){return ge}),n.d(e,"K",function(){return Mt}),n.d(e,"V",function(){return Ft}),n.d(e,"s",function(){return Ue}),n.d(e,"f",function(){return He}),n.d(e,"m",function(){return Nt}),n.d(e,"l",function(){return Z}),n.d(e,"E",function(){return ze}),n.d(e,"F",function(){return Ge}),n.d(e,"a",function(){return h}),n.d(e,"N",function(){return p}),n.d(e,"L",function(){return f}),n.d(e,"R",function(){return I}),n.d(e,"p",function(){return R}),n.d(e,"o",function(){return u}),n.d(e,"n",function(){return v}),n.d(e,"y",function(){return y}),n.d(e,"G",function(){return _}),n.d(e,"x",function(){return xt}),n.d(e,"B",function(){return ee}),n.d(e,"C",function(){return $t}),n.d(e,"D",function(){return te}),n.d(e,"i",function(){return ht}),n.d(e,"j",function(){return mt}),n.d(e,"k",function(){return ne}),n.d(e,"t",function(){return Ct}),n.d(e,"v",function(){return Et}),n.d(e,"u",function(){return re}),n.d(e,"H",function(){return ae}),n.d(e,"I",function(){return oe}),n.d(e,"J",function(){return ce}),n.d(e,"M",function(){return le}),n.d(e,"h",function(){return he}),n.d(e,"q",function(){return De}),n.d(e,"r",function(){return je}),n.d(e,"O",function(){return be}),n.d(e,"U",function(){return Ve}),n.d(e,"_7",function(){return Ee}),n.d(e,"X",function(){return ct}),n.d(e,"W",function(){return bt}),n.d(e,"_4",function(){return w}),n.d(e,"_10",function(){return T}),n.d(e,"_20",function(){return O}),n.d(e,"_8",function(){return tt}),n.d(e,"_9",function(){return $}),n.d(e,"Y",function(){return Vn}),n.d(e,"Z",function(){return ir}),n.d(e,"_0",function(){return oo}),n.d(e,"_1",function(){return ln}),n.d(e,"_2",function(){return Ir}),n.d(e,"_3",function(){return Un}),n.d(e,"_6",function(){return Ln}),n.d(e,"_11",function(){return Xn}),n.d(e,"_12",function(){return Jn}),n.d(e,"_14",function(){return vr}),n.d(e,"_17",function(){return Nr}),n.d(e,"_16",function(){return Xr}),n.d(e,"_19",function(){return qr}),n.d(e,"_21",function(){return Qr}),n.d(e,"_22",function(){return $r}),n.d(e,"_13",function(){return Be}),n.d(e,"_15",function(){return We}),n.d(e,"_18",function(){return qe}),n.d(e,"_5",function(){return it});var r=n("6Xbx"),i=n("AP4T"),o=n("2kLc"),s=n("URbD"),a=n("TO51"),u=function(){function t(t){this._desc=t,this.ngMetadataName="InjectionToken"}return t.prototype.toString=function(){return"InjectionToken "+this._desc},t}(),c="__paramaters__";function l(t,e,n){var r=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(t){var r=t.apply(void 0,e);for(var i in r)this[i]=r[i]}}}(e);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this instanceof i)return r.apply(this,t),this;var n,o=new((n=i).bind.apply(n,[void 0].concat(t)));return s.annotation=o,s;function s(t,e,n){for(var r=t.hasOwnProperty(c)?t[c]:Object.defineProperty(t,c,{value:[]})[c];r.length<=n;)r.push(null);return(r[n]=r[n]||[]).push(o),t}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=t,i.annotationCls=i,i}var h=new u("AnalyzeForEntryComponents"),p=function(){var t={Emulated:0,Native:1,None:2};return t[t.Emulated]="Emulated",t[t.Native]="Native",t[t.None]="None",t}(),f=function(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")},d=new f("5.2.2"),v=l("Inject",function(t){return{token:t}}),y=l("Optional"),g=l("Self"),_=l("SkipSelf"),m="undefined"!=typeof window&&window,b="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,w=m||"undefined"!=typeof t&&t||b,E=null;function C(){if(!E){var t=w.Symbol;if(t&&t.iterator)E=t.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),n=0;n<e.length;++n){var r=e[n];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&(E=r)}}return E}function S(t){Zone.current.scheduleMicroTask("scheduleMicrotask",t)}function T(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}function O(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(O).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;var e=t.toString();if(null==e)return""+e;var n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function I(t){return t.__forward_ref__=I,t.toString=function(){return O(this())},t}function N(t){return"function"==typeof t&&t.hasOwnProperty("__forward_ref__")&&t.__forward_ref__===I?t():t}var x="__source",A=new Object,P=function(){function t(){}return t.prototype.get=function(t,e){if(void 0===e&&(e=A),e===A)throw new Error("NullInjectorError: No provider for "+O(t)+"!");return e},t}(),R=function(){function t(){}return t.create=function(t,e){return Array.isArray(t)?new W(t,e):new W(t.providers,t.parent,t.name||null)},t.THROW_IF_NOT_FOUND=A,t.NULL=new P,t}(),k=function(t){return t},D=[],j=k,M=function(){return Array.prototype.slice.call(arguments)},L={},F=function(t){for(var e in t)if(t[e]===L)return e;throw Error("!prop")}({provide:String,useValue:L}),V=R.NULL,U=/\n/gm,B="\u0275",W=function(){function t(t,e,n){void 0===e&&(e=V),void 0===n&&(n=null),this.parent=e,this.source=n;var r=this._records=new Map;r.set(R,{token:R,fn:k,deps:D,value:this,useNew:!1}),function t(e,n){if(n)if((n=N(n))instanceof Array)for(var r=0;r<n.length;r++)t(e,n[r]);else{if("function"==typeof n)throw G("Function/Class not supported",n);if(!n||"object"!=typeof n||!n.provide)throw G("Unexpected provider",n);var i=N(n.provide),o=function(t){var e=function(t){var e=D,n=t.deps;if(n&&n.length){e=[];for(var r=0;r<n.length;r++){var i=6;if((u=N(n[r]))instanceof Array)for(var o=0,s=u;o<s.length;o++){var a=s[o];a instanceof y||a==y?i|=1:a instanceof _||a==_?i&=-3:a instanceof g||a==g?i&=-5:u=a instanceof v?a.token:N(a)}e.push({token:u,options:i})}}else if(t.useExisting){var u;e=[{token:u=N(t.useExisting),options:6}]}else if(!(n||F in t))throw G("'deps' required",t);return e}(t),n=k,r=D,i=!1,o=N(t.provide);if(F in t)r=t.useValue;else if(t.useFactory)n=t.useFactory;else if(t.useExisting);else if(t.useClass)i=!0,n=N(t.useClass);else{if("function"!=typeof o)throw G("StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable",t);i=!0,n=o}return{deps:e,fn:n,useNew:i,value:r}}(n);if(!0===n.multi){var s=e.get(i);if(s){if(s.fn!==M)throw q(i)}else e.set(i,s={token:n.provide,deps:[],useNew:!1,fn:M,value:D});s.deps.push({token:i=n,options:6})}var a=e.get(i);if(a&&a.fn==M)throw q(i);e.set(i,o)}}(r,t)}return t.prototype.get=function(t,e){var n=this._records.get(t);try{return function t(e,n,r,i,o){try{return function(e,n,r,i,o){var s,a;if(n){if((s=n.value)==j)throw Error(B+"Circular dependency");if(s===D){n.value=j;var u=n.useNew,c=n.fn,l=n.deps,h=D;if(l.length){h=[];for(var p=0;p<l.length;p++){var f=l[p],d=f.options,v=2&d?r.get(f.token):void 0;h.push(t(f.token,v,r,v||4&d?i:V,1&d?null:R.THROW_IF_NOT_FOUND))}}n.value=s=u?new((a=c).bind.apply(a,[void 0].concat(h))):c.apply(void 0,h)}}else s=i.get(e,o);return s}(e,n,r,i,o)}catch(t){throw t instanceof Error||(t=new Error(t)),(t.ngTempTokenPath=t.ngTempTokenPath||[]).unshift(e),n&&n.value==j&&(n.value=D),t}}(t,n,this._records,this.parent,e)}catch(e){var r=e.ngTempTokenPath;throw t[x]&&r.unshift(t[x]),e.message=H("\n"+e.message,r,this.source),e.ngTokenPath=r,e.ngTempTokenPath=null,e}},t.prototype.toString=function(){var t=[];return this._records.forEach(function(e,n){return t.push(O(n))}),"StaticInjector["+t.join(", ")+"]"},t}();function q(t){return G("Cannot mix multi providers and regular providers",t)}function H(t,e,n){void 0===n&&(n=null),t=t&&"\n"===t.charAt(0)&&t.charAt(1)==B?t.substr(2):t;var r=O(e);if(e instanceof Array)r=e.map(O).join(" -> ");else if("object"==typeof e){var i=[];for(var o in e)if(e.hasOwnProperty(o)){var s=e[o];i.push(o+":"+("string"==typeof s?JSON.stringify(s):O(s)))}r="{"+i.join(", ")+"}"}return"StaticInjectorError"+(n?"("+n+")":"")+"["+r+"]: "+t.replace(U,"\n ")}function G(t,e){return new Error(H(t,e))}var z="ngDebugContext",K="ngOriginalError",J="ngErrorLogger";function X(t){return t[z]}function Q(t){return t[K]}function Y(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];t.error.apply(t,e)}var Z=function(){function t(){this._console=console}return t.prototype.handleError=function(t){var e=this._findOriginalError(t),n=this._findContext(t),r=function(t){return t[J]||Y}(t);r(this._console,"ERROR",t),e&&r(this._console,"ORIGINAL ERROR",e),n&&r(this._console,"ERROR CONTEXT",n)},t.prototype._findContext=function(t){return t?X(t)?X(t):this._findContext(Q(t)):null},t.prototype._findOriginalError=function(t){for(var e=Q(t);e&&Q(e);)e=Q(e);return e},t}();function $(t){return!!t&&"function"==typeof t.then}function tt(t){return!!t&&"function"==typeof t.subscribe}Function;var et=new u("Application Initializer"),nt=function(){function t(t){var e=this;this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise(function(t,n){e.resolve=t,e.reject=n})}return t.prototype.runInitializers=function(){var t=this;if(!this.initialized){var e=[],n=function(){t.done=!0,t.resolve()};if(this.appInits)for(var r=0;r<this.appInits.length;r++){var i=this.appInits[r]();$(i)&&e.push(i)}Promise.all(e).then(function(){n()}).catch(function(e){t.reject(e)}),0===e.length&&n(),this.initialized=!0}},t}(),rt=new u("AppId");function it(){return""+ot()+ot()+ot()}function ot(){return String.fromCharCode(97+Math.floor(25*Math.random()))}var st=new u("Platform Initializer"),at=new u("Platform ID"),ut=new u("appBootstrapListener"),ct=function(){function t(){}return t.prototype.log=function(t){console.log(t)},t.prototype.warn=function(t){console.warn(t)},t.ctorParameters=function(){return[]},t}();function lt(){throw new Error("Runtime compiler is not loaded")}var ht=function(){function t(){}return t.prototype.compileModuleSync=function(t){throw lt()},t.prototype.compileModuleAsync=function(t){throw lt()},t.prototype.compileModuleAndAllComponentsSync=function(t){throw lt()},t.prototype.compileModuleAndAllComponentsAsync=function(t){throw lt()},t.prototype.clearCache=function(){},t.prototype.clearCacheFor=function(t){},t}(),pt=function(){},ft=function(){};function dt(t){var e=Error("No component factory found for "+O(t)+". Did you add it to @NgModule.entryComponents?");return e[gt]=t,e}var vt,yt,gt="ngComponent",_t=function(){function t(){}return t.prototype.resolveComponentFactory=function(t){throw dt(t)},t}(),mt=function(){function t(){}return t.NULL=new _t,t}(),bt=function(){function t(t,e,n){this._parent=e,this._ngModule=n,this._factories=new Map;for(var r=0;r<t.length;r++){var i=t[r];this._factories.set(i.componentType,i)}}return t.prototype.resolveComponentFactory=function(t){var e=this._factories.get(t);if(!e&&this._parent&&(e=this._parent.resolveComponentFactory(t)),!e)throw dt(t);return new wt(e,this._ngModule)},t}(),wt=function(t){function e(e,n){var r=t.call(this)||this;return r.factory=e,r.ngModule=n,r.selector=e.selector,r.componentType=e.componentType,r.ngContentSelectors=e.ngContentSelectors,r.inputs=e.inputs,r.outputs=e.outputs,r}return Object(r.__extends)(e,t),e.prototype.create=function(t,e,n,r){return this.factory.create(t,e,n,r||this.ngModule)},e}(ft),Et=function(){},Ct=function(){},St=function(){var t=w.wtf;return!(!t||!(vt=t.trace)||(yt=vt.events,0))}();function Tt(t,e){return null}var Ot=St?function(t,e){return void 0===e&&(e=null),yt.createScope(t,e)}:function(t,e){return Tt},It=St?function(t,e){return vt.leaveScope(t,e),e}:function(t,e){return e},Nt=function(t){function e(e){void 0===e&&(e=!1);var n=t.call(this)||this;return n.__isAsync=e,n}return Object(r.__extends)(e,t),e.prototype.emit=function(e){t.prototype.next.call(this,e)},e.prototype.subscribe=function(e,n,r){var i,o=function(t){return null},s=function(){return null};return e&&"object"==typeof e?(i=this.__isAsync?function(t){setTimeout(function(){return e.next(t)})}:function(t){e.next(t)},e.error&&(o=this.__isAsync?function(t){setTimeout(function(){return e.error(t)})}:function(t){e.error(t)}),e.complete&&(s=this.__isAsync?function(){setTimeout(function(){return e.complete()})}:function(){e.complete()})):(i=this.__isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)},n&&(o=this.__isAsync?function(t){setTimeout(function(){return n(t)})}:function(t){n(t)}),r&&(s=this.__isAsync?function(){setTimeout(function(){return r()})}:function(){r()})),t.prototype.subscribe.call(this,i,o,s)},e}(a.b),xt=function(){function t(t){var e,n=t.enableLongStackTrace,r=void 0!==n&&n;if(this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Nt(!1),this.onMicrotaskEmpty=new Nt(!1),this.onStable=new Nt(!1),this.onError=new Nt(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),r&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),(e=this)._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:function(t,n,r,i,o,s){try{return kt(e),t.invokeTask(r,i,o,s)}finally{Dt(e)}},onInvoke:function(t,n,r,i,o,s,a){try{return kt(e),t.invoke(r,i,o,s,a)}finally{Dt(e)}},onHasTask:function(t,n,r,i){t.hasTask(r,i),n===r&&("microTask"==i.change?(e.hasPendingMicrotasks=i.microTask,Rt(e)):"macroTask"==i.change&&(e.hasPendingMacrotasks=i.macroTask))},onHandleError:function(t,n,r,i){return t.handleError(r,i),e.runOutsideAngular(function(){return e.onError.emit(i)}),!1}})}return t.isInAngularZone=function(){return!0===Zone.current.get("isAngularZone")},t.assertInAngularZone=function(){if(!t.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")},t.assertNotInAngularZone=function(){if(t.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")},t.prototype.run=function(t,e,n){return this._inner.run(t,e,n)},t.prototype.runTask=function(t,e,n,r){var i=this._inner,o=i.scheduleEventTask("NgZoneEvent: "+r,t,Pt,At,At);try{return i.runTask(o,e,n)}finally{i.cancelTask(o)}},t.prototype.runGuarded=function(t,e,n){return this._inner.runGuarded(t,e,n)},t.prototype.runOutsideAngular=function(t){return this._outer.run(t)},t}();function At(){}var Pt={};function Rt(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(function(){return t.onStable.emit(null)})}finally{t.isStable=!0}}}function kt(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Dt(t){t._nesting--,Rt(t)}var jt=function(){function t(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Nt,this.onMicrotaskEmpty=new Nt,this.onStable=new Nt,this.onError=new Nt}return t.prototype.run=function(t){return t()},t.prototype.runGuarded=function(t){return t()},t.prototype.runOutsideAngular=function(t){return t()},t.prototype.runTask=function(t){return t()},t}(),Mt=function(){function t(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this._watchAngularEvents()}return t.prototype._watchAngularEvents=function(){var t=this;this._ngZone.onUnstable.subscribe({next:function(){t._didWork=!0,t._isZoneStable=!1}}),this._ngZone.runOutsideAngular(function(){t._ngZone.onStable.subscribe({next:function(){xt.assertNotInAngularZone(),S(function(){t._isZoneStable=!0,t._runCallbacksIfReady()})}})})},t.prototype.increasePendingRequestCount=function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount},t.prototype.decreasePendingRequestCount=function(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount},t.prototype.isStable=function(){return this._isZoneStable&&0==this._pendingCount&&!this._ngZone.hasPendingMacrotasks},t.prototype._runCallbacksIfReady=function(){var t=this;this.isStable()?S(function(){for(;0!==t._callbacks.length;)t._callbacks.pop()(t._didWork);t._didWork=!1}):this._didWork=!0},t.prototype.whenStable=function(t){this._callbacks.push(t),this._runCallbacksIfReady()},t.prototype.getPendingRequestCount=function(){return this._pendingCount},t.prototype.findProviders=function(t,e,n){return[]},t}(),Lt=function(){function t(){this._applications=new Map,Ut.addToWindow(this)}return t.prototype.registerApplication=function(t,e){this._applications.set(t,e)},t.prototype.unregisterApplication=function(t){this._applications.delete(t)},t.prototype.unregisterAllApplications=function(){this._applications.clear()},t.prototype.getTestability=function(t){return this._applications.get(t)||null},t.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},t.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},t.prototype.findTestabilityInTree=function(t,e){return void 0===e&&(e=!0),Ut.findTestabilityInTree(this,t,e)},t.ctorParameters=function(){return[]},t}();function Ft(t){Ut=t}var Vt,Ut=new(function(){function t(){}return t.prototype.addToWindow=function(t){},t.prototype.findTestabilityInTree=function(t,e,n){return null},t}()),Bt=!0,Wt=!1,qt=new u("AllowMultipleToken");function Ht(){if(Wt)throw new Error("Cannot enable prod mode after platform setup.");Bt=!1}function Gt(){return Wt=!0,Bt}var zt=function(t,e){this.name=t,this.token=e};function Kt(t,e,n){void 0===n&&(n=[]);var r="Platform: "+e,i=new u(r);return function(e){void 0===e&&(e=[]);var o=Jt();if(!o||o.injector.get(qt,!1))if(t)t(n.concat(e).concat({provide:i,useValue:!0}));else{var s=n.concat(e).concat({provide:i,useValue:!0});!function(t){if(Vt&&!Vt.destroyed&&!Vt.injector.get(qt,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Vt=t.get(Xt);var e=t.get(st,null);e&&e.forEach(function(t){return t()})}(R.create({providers:s,name:r}))}return function(t){var e=Jt();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(i)}}function Jt(){return Vt&&!Vt.destroyed?Vt:null}var Xt=function(){function t(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return t.prototype.bootstrapModuleFactory=function(t,e){var n,r=this,i="noop"===(n=e?e.ngZone:void 0)?new jt:("zone.js"===n?void 0:n)||new xt({enableLongStackTrace:Gt()}),o=[{provide:xt,useValue:i}];return i.run(function(){var e=R.create({providers:o,parent:r.injector,name:t.moduleType.name}),n=t.create(e),s=n.injector.get(Z,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy(function(){return Zt(r._modules,n)}),i.runOutsideAngular(function(){return i.onError.subscribe({next:function(t){s.handleError(t)}})}),function(t,e,i){try{var o=((s=n.injector.get(nt)).runInitializers(),s.donePromise.then(function(){return r._moduleDoBootstrap(n),n}));return $(o)?o.catch(function(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}):o}catch(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}var s}(s,i)})},t.prototype.bootstrapModule=function(t,e){var n=this;void 0===e&&(e=[]);var r=this.injector.get(pt),i=Qt({},e);return r.createCompiler([i]).compileModuleAsync(t).then(function(t){return n.bootstrapModuleFactory(t,i)})},t.prototype._moduleDoBootstrap=function(t){var e=t.injector.get(Yt);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(function(t){return e.bootstrap(t)});else{if(!t.instance.ngDoBootstrap)throw new Error("The module "+O(t.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');t.instance.ngDoBootstrap(e)}this._modules.push(t)},t.prototype.onDestroy=function(t){this._destroyListeners.push(t)},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(t){return t.destroy()}),this._destroyListeners.forEach(function(t){return t()}),this._destroyed=!0},Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),t}();function Qt(t,e){return Array.isArray(e)?e.reduce(Qt,t):Object(r.__assign)({},t,e)}var Yt=function(){function t(t,e,n,r,a,u){var c=this;this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=r,this._componentFactoryResolver=a,this._initStatus=u,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Gt(),this._zone.onMicrotaskEmpty.subscribe({next:function(){c._zone.run(function(){c.tick()})}});var l=new i.a(function(t){c._stable=c._zone.isStable&&!c._zone.hasPendingMacrotasks&&!c._zone.hasPendingMicrotasks,c._zone.runOutsideAngular(function(){t.next(c._stable),t.complete()})}),h=new i.a(function(t){var e;c._zone.runOutsideAngular(function(){e=c._zone.onStable.subscribe(function(){xt.assertNotInAngularZone(),S(function(){c._stable||c._zone.hasPendingMacrotasks||c._zone.hasPendingMicrotasks||(c._stable=!0,t.next(!0))})})});var n=c._zone.onUnstable.subscribe(function(){xt.assertInAngularZone(),c._stable&&(c._stable=!1,c._zone.runOutsideAngular(function(){t.next(!1)}))});return function(){e.unsubscribe(),n.unsubscribe()}});this.isStable=Object(o.a)(l,s.a.call(h))}return t.prototype.bootstrap=function(t,e){var n,r=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=t instanceof ft?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);var i=n instanceof wt?null:this._injector.get(Et),o=n.create(R.NULL,[],e||n.selector,i);o.onDestroy(function(){r._unloadComponent(o)});var s=o.injector.get(Mt,null);return s&&o.injector.get(Lt).registerApplication(o.location.nativeElement,s),this._loadComponent(o),Gt()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),o},t.prototype.tick=function(){var e=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var n=t._tickScope();try{this._runningTick=!0,this._views.forEach(function(t){return t.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(t){return t.checkNoChanges()})}catch(t){this._zone.runOutsideAngular(function(){return e._exceptionHandler.handleError(t)})}finally{this._runningTick=!1,It(n)}},t.prototype.attachView=function(t){var e=t;this._views.push(e),e.attachToAppRef(this)},t.prototype.detachView=function(t){var e=t;Zt(this._views,e),e.detachFromAppRef()},t.prototype._loadComponent=function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(ut,[]).concat(this._bootstrapListeners).forEach(function(e){return e(t)})},t.prototype._unloadComponent=function(t){this.detachView(t.hostView),Zt(this.components,t)},t.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(t){return t.destroy()})},Object.defineProperty(t.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),t._tickScope=Ot("ApplicationRef#tick()"),t}();function Zt(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var $t=function(){},te=function(){var t={Important:1,DashCase:2};return t[t.Important]="Important",t[t.DashCase]="DashCase",t}(),ee=function(){},ne=function(t){this.nativeElement=t},re=function(){},ie=function(){function t(){this.dirty=!0,this._results=[],this.changes=new Nt}return t.prototype.map=function(t){return this._results.map(t)},t.prototype.filter=function(t){return this._results.filter(t)},t.prototype.find=function(t){return this._results.find(t)},t.prototype.reduce=function(t,e){return this._results.reduce(t,e)},t.prototype.forEach=function(t){this._results.forEach(t)},t.prototype.some=function(t){return this._results.some(t)},t.prototype.toArray=function(){return this._results.slice()},t.prototype[C()]=function(){return this._results[C()]()},t.prototype.toString=function(){return this._results.toString()},t.prototype.reset=function(t){this._results=function t(e){return e.reduce(function(e,n){var r=Array.isArray(n)?t(n):n;return e.concat(r)},[])}(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},t.prototype.notifyOnChanges=function(){this.changes.emit(this)},t.prototype.setDirty=function(){this.dirty=!0},t.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},t}(),oe=function(){},se={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},ae=function(){function t(t,e){this._compiler=t,this._config=e||se}return t.prototype.load=function(t){return this._compiler instanceof ht?this.loadFactory(t):this.loadAndCompile(t)},t.prototype.loadAndCompile=function(t){var e=this,r=t.split("#"),i=r[0],o=r[1];return void 0===o&&(o="default"),n("YuZA")(i).then(function(t){return t[o]}).then(function(t){return ue(t,i,o)}).then(function(t){return e._compiler.compileModuleAsync(t)})},t.prototype.loadFactory=function(t){var e=t.split("#"),r=e[0],i=e[1],o="NgFactory";return void 0===i&&(i="default",o=""),n("YuZA")(this._config.factoryPathPrefix+r+this._config.factoryPathSuffix).then(function(t){return t[i+o]}).then(function(t){return ue(t,r,i)})},t}();function ue(t,e,n){if(!t)throw new Error("Cannot find '"+n+"' in '"+e+"'");return t}var ce=function(){},le=function(){},he=function(){},pe=function(){function t(t,e,n){this._debugContext=n,this.nativeNode=t,e&&e instanceof fe?e.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(t.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),t}(),fe=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.properties={},i.attributes={},i.classes={},i.styles={},i.childNodes=[],i.nativeElement=e,i}return Object(r.__extends)(e,t),e.prototype.addChild=function(t){t&&(this.childNodes.push(t),t.parent=this)},e.prototype.removeChild=function(t){var e=this.childNodes.indexOf(t);-1!==e&&(t.parent=null,this.childNodes.splice(e,1))},e.prototype.insertChildrenAfter=function(t,e){var n,r=this,i=this.childNodes.indexOf(t);-1!==i&&((n=this.childNodes).splice.apply(n,[i+1,0].concat(e)),e.forEach(function(t){t.parent&&t.parent.removeChild(t),t.parent=r}))},e.prototype.insertBefore=function(t,e){var n=this.childNodes.indexOf(t);-1===n?this.addChild(e):(e.parent&&e.parent.removeChild(e),e.parent=this,this.childNodes.splice(n,0,e))},e.prototype.query=function(t){return this.queryAll(t)[0]||null},e.prototype.queryAll=function(t){var e=[];return de(this,t,e),e},e.prototype.queryAllNodes=function(t){var e=[];return ve(this,t,e),e},Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes.filter(function(t){return t instanceof e})},enumerable:!0,configurable:!0}),e.prototype.triggerEventHandler=function(t,e){this.listeners.forEach(function(n){n.name==t&&n.callback(e)})},e}(pe);function de(t,e,n){t.childNodes.forEach(function(t){t instanceof fe&&(e(t)&&n.push(t),de(t,e,n))})}function ve(t,e,n){t instanceof fe&&t.childNodes.forEach(function(t){e(t)&&n.push(t),t instanceof fe&&ve(t,e,n)})}var ye=new Map;function ge(t){return ye.get(t)||null}function _e(t){ye.set(t.nativeNode,t)}function me(t,e){var n=Ee(t),r=Ee(e);return n&&r?function(t,e,n){for(var r=t[C()](),i=e[C()]();;){var o=r.next(),s=i.next();if(o.done&&s.done)return!0;if(o.done||s.done)return!1;if(!n(o.value,s.value))return!1}}(t,e,me):!(n||!t||"object"!=typeof t&&"function"!=typeof t||r||!e||"object"!=typeof e&&"function"!=typeof e)||T(t,e)}var be=function(){function t(t){this.wrapped=t}return t.wrap=function(e){return new t(e)},t.unwrap=function(e){return t.isWrapped(e)?e.wrapped:e},t.isWrapped=function(e){return e instanceof t},t}(),we=function(){function t(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}return t.prototype.isFirstChange=function(){return this.firstChange},t}();function Ee(t){return!!Ce(t)&&(Array.isArray(t)||!(t instanceof Map)&&C()in t)}function Ce(t){return null!==t&&("function"==typeof t||"object"==typeof t)}var Se=function(){function t(){}return t.prototype.supports=function(t){return Ee(t)},t.prototype.create=function(t){return new Oe(t)},t}(),Te=function(t,e){return e},Oe=function(){function t(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||Te}return t.prototype.forEachItem=function(t){var e;for(e=this._itHead;null!==e;e=e._next)t(e)},t.prototype.forEachOperation=function(t){for(var e=this._itHead,n=this._removalsHead,r=0,i=null;e||n;){var o=!n||e&&e.currentIndex<Ae(n,r,i)?e:n,s=Ae(o,r,i),a=o.currentIndex;if(o===n)r--,n=n._nextRemoved;else if(e=e._next,null==o.previousIndex)r++;else{i||(i=[]);var u=s-r,c=a-r;if(u!=c){for(var l=0;l<u;l++){var h=l<i.length?i[l]:i[l]=0,p=h+l;c<=p&&p<u&&(i[l]=h+1)}i[o.previousIndex]=c-u}}s!==a&&t(o,s,a)}},t.prototype.forEachPreviousItem=function(t){var e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)},t.prototype.forEachAddedItem=function(t){var e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)},t.prototype.forEachMovedItem=function(t){var e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)},t.prototype.forEachRemovedItem=function(t){var e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)},t.prototype.forEachIdentityChange=function(t){var e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)},t.prototype.diff=function(t){if(null==t&&(t=[]),!Ee(t))throw new Error("Error trying to diff '"+O(t)+"'. Only arrays and iterables are allowed");return this.check(t)?this:null},t.prototype.onDestroy=function(){},t.prototype.check=function(t){var e=this;this._reset();var n,r,i,o=this._itHead,s=!1;if(Array.isArray(t)){this.length=t.length;for(var a=0;a<this.length;a++)i=this._trackByFn(a,r=t[a]),null!==o&&T(o.trackById,i)?(s&&(o=this._verifyReinsertion(o,r,i,a)),T(o.item,r)||this._addIdentityChange(o,r)):(o=this._mismatch(o,r,i,a),s=!0),o=o._next}else n=0,function(t,e){if(Array.isArray(t))for(var n=0;n<t.length;n++)e(t[n]);else for(var r=t[C()](),i=void 0;!(i=r.next()).done;)e(i.value)}(t,function(t){i=e._trackByFn(n,t),null!==o&&T(o.trackById,i)?(s&&(o=e._verifyReinsertion(o,t,i,n)),T(o.item,t)||e._addIdentityChange(o,t)):(o=e._mismatch(o,t,i,n),s=!0),o=o._next,n++}),this.length=n;return this._truncate(o),this.collection=t,this.isDirty},Object.defineProperty(t.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead},enumerable:!0,configurable:!0}),t.prototype._reset=function(){if(this.isDirty){var t=void 0,e=void 0;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=e)t.previousIndex=t.currentIndex,e=t._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}},t.prototype._mismatch=function(t,e,n,r){var i;return null===t?i=this._itTail:(i=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(T(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,i,r)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(T(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,i,r)):t=this._addAfter(new Ie(e,n),i,r),t},t.prototype._verifyReinsertion=function(t,e,n,r){var i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==i?t=this._reinsertAfter(i,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t},t.prototype._truncate=function(t){for(;null!==t;){var e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)},t.prototype._reinsertAfter=function(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);var r=t._prevRemoved,i=t._nextRemoved;return null===r?this._removalsHead=i:r._nextRemoved=i,null===i?this._removalsTail=r:i._prevRemoved=r,this._insertAfter(t,e,n),this._addToMoves(t,n),t},t.prototype._moveAfter=function(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t},t.prototype._addAfter=function(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t},t.prototype._insertAfter=function(t,e,n){var r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new xe),this._linkedRecords.put(t),t.currentIndex=n,t},t.prototype._remove=function(t){return this._addToRemovals(this._unlink(t))},t.prototype._unlink=function(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);var e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t},t.prototype._addToMoves=function(t,e){return t.previousIndex===e?t:(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t,t)},t.prototype._addToRemovals=function(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new xe),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t},t.prototype._addIdentityChange=function(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t},t}(),Ie=function(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null},Ne=function(){function t(){this._head=null,this._tail=null}return t.prototype.add=function(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)},t.prototype.get=function(t,e){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&T(n.trackById,t))return n;return null},t.prototype.remove=function(t){var e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head},t}(),xe=function(){function t(){this.map=new Map}return t.prototype.put=function(t){var e=t.trackById,n=this.map.get(e);n||(n=new Ne,this.map.set(e,n)),n.add(t)},t.prototype.get=function(t,e){var n=this.map.get(t);return n?n.get(t,e):null},t.prototype.remove=function(t){var e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this.map.size},enumerable:!0,configurable:!0}),t.prototype.clear=function(){this.map.clear()},t}();function Ae(t,e,n){var r=t.previousIndex;if(null===r)return r;var i=0;return n&&r<n.length&&(i=n[r]),r+e+i}var Pe=function(){function t(){}return t.prototype.supports=function(t){return t instanceof Map||Ce(t)},t.prototype.create=function(){return new Re},t}(),Re=function(){function t(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return Object.defineProperty(t.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead},enumerable:!0,configurable:!0}),t.prototype.forEachItem=function(t){var e;for(e=this._mapHead;null!==e;e=e._next)t(e)},t.prototype.forEachPreviousItem=function(t){var e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)},t.prototype.forEachChangedItem=function(t){var e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)},t.prototype.forEachAddedItem=function(t){var e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)},t.prototype.forEachRemovedItem=function(t){var e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)},t.prototype.diff=function(t){if(t){if(!(t instanceof Map||Ce(t)))throw new Error("Error trying to diff '"+O(t)+"'. Only maps and objects are allowed")}else t=new Map;return this.check(t)?this:null},t.prototype.onDestroy=function(){},t.prototype.check=function(t){var e=this;this._reset();var n=this._mapHead;if(this._appendAfter=null,this._forEach(t,function(t,r){if(n&&n.key===r)e._maybeAddToChanges(n,t),e._appendAfter=n,n=n._next;else{var i=e._getOrCreateRecordForKey(r,t);n=e._insertBeforeOrAppend(n,i)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(var r=n;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty},t.prototype._insertBeforeOrAppend=function(t,e){if(t){var n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null},t.prototype._getOrCreateRecordForKey=function(t,e){if(this._records.has(t)){var n=this._records.get(t);this._maybeAddToChanges(n,e);var r=n._prev,i=n._next;return r&&(r._next=i),i&&(i._prev=r),n._next=null,n._prev=null,n}var o=new ke(t);return this._records.set(t,o),o.currentValue=e,this._addToAdditions(o),o},t.prototype._reset=function(){if(this.isDirty){var t=void 0;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}},t.prototype._maybeAddToChanges=function(t,e){T(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))},t.prototype._addToAdditions=function(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)},t.prototype._addToChanges=function(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)},t.prototype._forEach=function(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(function(n){return e(t[n],n)})},t}(),ke=function(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null},De=function(){function t(t){this.factories=t}return t.create=function(e,n){if(null!=n){var r=n.factories.slice();return new t(e=e.concat(r))}return new t(e)},t.extend=function(e){return{provide:t,useFactory:function(n){if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new _,new y]]}},t.prototype.find=function(t){var e,n=this.factories.find(function(e){return e.supports(t)});if(null!=n)return n;throw new Error("Cannot find a differ supporting object '"+t+"' of type '"+((e=t).name||typeof e)+"'")},t}(),je=function(){function t(t){this.factories=t}return t.create=function(e,n){if(n){var r=n.factories.slice();e=e.concat(r)}return new t(e)},t.extend=function(e){return{provide:t,useFactory:function(n){if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new _,new y]]}},t.prototype.find=function(t){var e=this.factories.find(function(e){return e.supports(t)});if(e)return e;throw new Error("Cannot find a differ supporting object '"+t+"'")},t}(),Me=[new Pe],Le=new De([new Se]),Fe=new je(Me),Ve=Kt(null,"core",[{provide:at,useValue:"unknown"},{provide:Xt,deps:[R]},{provide:Lt,deps:[]},{provide:ct,deps:[]}]),Ue=new u("LocaleId");function Be(){return Le}function We(){return Fe}function qe(t){return t||"en-US"}var He=function(t){},Ge=function(){var t={NONE:0,HTML:1,STYLE:2,SCRIPT:3,URL:4,RESOURCE_URL:5};return t[t.NONE]="NONE",t[t.HTML]="HTML",t[t.STYLE]="STYLE",t[t.SCRIPT]="SCRIPT",t[t.URL]="URL",t[t.RESOURCE_URL]="RESOURCE_URL",t}(),ze=function(){};function Ke(t,e,n){var r=t.state,i=1792&r;return i===e?(t.state=-1793&r|n,t.initIndex=-1,!0):i===n}function Je(t,e,n){return(1792&t.state)===e&&t.initIndex<=n&&(t.initIndex=n+1,!0)}function Xe(t,e){return t.nodes[e]}function Qe(t,e){return t.nodes[e]}function Ye(t,e){return t.nodes[e]}function Ze(t,e){return t.nodes[e]}function $e(t,e){return t.nodes[e]}var tn={setCurrentNode:void 0,createRootView:void 0,createEmbeddedView:void 0,createComponentView:void 0,createNgModuleRef:void 0,overrideProvider:void 0,overrideComponentView:void 0,clearOverrides:void 0,checkAndUpdateView:void 0,checkNoChangesView:void 0,destroyView:void 0,resolveDep:void 0,createDebugContext:void 0,handleEvent:void 0,updateDirectives:void 0,updateRenderer:void 0,dirtyParentQueries:void 0};function en(t,e,n,r){var i="ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '"+e+"'. Current value: '"+n+"'.";return r&&(i+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),function(t,e){var n=new Error(t);return nn(n,e),n}(i,t)}function nn(t,e){t[z]=e,t[J]=e.logError.bind(e)}function rn(t){return new Error("ViewDestroyedError: Attempt to use a destroyed view: "+t)}var on=function(){},sn=new Map;function an(t){var e=sn.get(t);return e||(e=O(t)+"_"+sn.size,sn.set(t,e)),e}var un="$$undefined",cn="$$empty";function ln(t){return{id:un,styles:t.styles,encapsulation:t.encapsulation,data:t.data}}var hn=0;function pn(t,e,n,r){return!(!(2&t.state)&&T(t.oldValues[e.bindingIndex+n],r))}function fn(t,e,n,r){return!!pn(t,e,n,r)&&(t.oldValues[e.bindingIndex+n]=r,!0)}function dn(t,e,n,r){var i=t.oldValues[e.bindingIndex+n];if(1&t.state||!me(i,r)){var o=e.bindings[e.bindingIndex].name;throw en(tn.createDebugContext(t,e.nodeIndex),o+": "+i,o+": "+r,0!=(1&t.state))}}function vn(t){for(var e=t;e;)2&e.def.flags&&(e.state|=8),e=e.viewContainerParent||e.parent}function yn(t,e){for(var n=t;n&&n!==e;)n.state|=64,n=n.viewContainerParent||n.parent}function gn(t,e,n,r){try{return vn(33554432&t.def.nodes[e].flags?Qe(t,e).componentView:t),tn.handleEvent(t,e,n,r)}catch(e){t.root.errorHandler.handleError(e)}}function _n(t){return t.parent?Qe(t.parent,t.parentNodeDef.nodeIndex):null}function mn(t){return t.parent?t.parentNodeDef.parent:null}function bn(t,e){switch(201347067&e.flags){case 1:return Qe(t,e.nodeIndex).renderElement;case 2:return Xe(t,e.nodeIndex).renderText}}function wn(t){return!!t.parent&&!!(32768&t.parentNodeDef.flags)}function En(t){return!(!t.parent||32768&t.parentNodeDef.flags)}function Cn(t){return 1<<t%32}function Sn(t){var e={},n=0,r={};return t&&t.forEach(function(t){var i=t[0],o=t[1];"number"==typeof i?(e[i]=o,n|=Cn(i)):r[i]=o}),{matchedQueries:e,references:r,matchedQueryIds:n}}function Tn(t,e){return t.map(function(t){var n,r;return Array.isArray(t)?(r=t[0],n=t[1]):(r=0,n=t),n&&("function"==typeof n||"object"==typeof n)&&e&&Object.defineProperty(n,x,{value:e,configurable:!0}),{flags:r,token:n,tokenKey:an(n)}})}function On(t,e,n){var r=n.renderParent;return r?0==(1&r.flags)||0==(33554432&r.flags)||r.element.componentRendererType&&r.element.componentRendererType.encapsulation===p.Native?Qe(t,n.renderParent.nodeIndex).renderElement:void 0:e}var In=new WeakMap;function Nn(t){var e=In.get(t);return e||((e=t(function(){return on})).factory=t,In.set(t,e)),e}function xn(t,e,n,r,i){3===e&&(n=t.renderer.parentNode(bn(t,t.def.lastRenderRootNode))),An(t,e,0,t.def.nodes.length-1,n,r,i)}function An(t,e,n,r,i,o,s){for(var a=n;a<=r;a++){var u=t.def.nodes[a];11&u.flags&&Rn(t,u,e,i,o,s),a+=u.childCount}}function Pn(t,e,n,r,i,o){for(var s=t;s&&!wn(s);)s=s.parent;for(var a=s.parent,u=mn(s),c=u.nodeIndex+u.childCount,l=u.nodeIndex+1;l<=c;l++){var h=a.def.nodes[l];h.ngContentIndex===e&&Rn(a,h,n,r,i,o),l+=h.childCount}if(!a.parent){var p=t.root.projectableNodes[e];if(p)for(l=0;l<p.length;l++)kn(t,p[l],n,r,i,o)}}function Rn(t,e,n,r,i,o){if(8&e.flags)Pn(t,e.ngContent.index,n,r,i,o);else{var s=bn(t,e);if(3===n&&33554432&e.flags&&48&e.bindingFlags?(16&e.bindingFlags&&kn(t,s,n,r,i,o),32&e.bindingFlags&&kn(Qe(t,e.nodeIndex).componentView,s,n,r,i,o)):kn(t,s,n,r,i,o),16777216&e.flags)for(var a=Qe(t,e.nodeIndex).viewContainer._embeddedViews,u=0;u<a.length;u++)xn(a[u],n,r,i,o);1&e.flags&&!e.element.name&&An(t,n,e.nodeIndex+1,e.nodeIndex+e.childCount,r,i,o)}}function kn(t,e,n,r,i,o){var s=t.renderer;switch(n){case 1:s.appendChild(r,e);break;case 2:s.insertBefore(r,e,i);break;case 3:s.removeChild(r,e);break;case 0:o.push(e)}}var Dn=/^:([^:]+):(.+)$/;function jn(t){if(":"===t[0]){var e=t.match(Dn);return[e[1],e[2]]}return["",t]}function Mn(t){for(var e=0,n=0;n<t.length;n++)e|=t[n].flags;return e}function Ln(t,e,n,r,i,o,s,a,u,c,l,h,p,f,d,v,y,g,_,m){switch(t){case 1:return e+Fn(n)+r;case 2:return e+Fn(n)+r+Fn(i)+o;case 3:return e+Fn(n)+r+Fn(i)+o+Fn(s)+a;case 4:return e+Fn(n)+r+Fn(i)+o+Fn(s)+a+Fn(u)+c;case 5:return e+Fn(n)+r+Fn(i)+o+Fn(s)+a+Fn(u)+c+Fn(l)+h;case 6:return e+Fn(n)+r+Fn(i)+o+Fn(s)+a+Fn(u)+c+Fn(l)+h+Fn(p)+f;case 7:return e+Fn(n)+r+Fn(i)+o+Fn(s)+a+Fn(u)+c+Fn(l)+h+Fn(p)+f+Fn(d)+v;case 8:return e+Fn(n)+r+Fn(i)+o+Fn(s)+a+Fn(u)+c+Fn(l)+h+Fn(p)+f+Fn(d)+v+Fn(y)+g;case 9:return e+Fn(n)+r+Fn(i)+o+Fn(s)+a+Fn(u)+c+Fn(l)+h+Fn(p)+f+Fn(d)+v+Fn(y)+g+Fn(_)+m;default:throw new Error("Does not support more than 9 expressions")}}function Fn(t){return null!=t?t.toString():""}function Vn(t,e,n,r,i,o){t|=1;var s=Sn(e);return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:t,checkIndex:-1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:s.matchedQueries,matchedQueryIds:s.matchedQueryIds,references:s.references,ngContentIndex:n,childCount:r,bindings:[],bindingFlags:0,outputs:[],element:{ns:null,name:null,attrs:null,template:o?Nn(o):null,componentProvider:null,componentView:null,componentRendererType:null,publicProviders:null,allProviders:null,handleEvent:i||on},provider:null,text:null,query:null,ngContent:null}}function Un(t,e,n,r,i,o,s,a,u,c,l,h){void 0===s&&(s=[]),c||(c=on);var f=Sn(n),d=f.matchedQueries,v=f.references,y=f.matchedQueryIds,g=null,_=null;o&&(g=(P=jn(o))[0],_=P[1]),a=a||[];for(var m=new Array(a.length),b=0;b<a.length;b++){var w=a[b],E=w[0],C=w[2],S=jn(w[1]),T=S[0],O=S[1],I=void 0,N=void 0;switch(15&E){case 4:N=C;break;case 1:case 8:I=C}m[b]={flags:E,ns:T,name:O,nonMinifiedName:O,securityContext:I,suffix:N}}u=u||[];var x=new Array(u.length);for(b=0;b<u.length;b++){var A=u[b];x[b]={type:0,target:A[0],eventName:A[1],propName:null}}var P,R=(s=s||[]).map(function(t){var e=t[1],n=jn(t[0]);return[n[0],n[1],e]});return h=function(t){if(t&&t.id===un){var e=null!=t.encapsulation&&t.encapsulation!==p.None||t.styles.length||Object.keys(t.data).length;t.id=e?"c"+hn++:cn}return t&&t.id===cn&&(t=null),t||null}(h),l&&(e|=33554432),{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:e|=1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:d,matchedQueryIds:y,references:v,ngContentIndex:r,childCount:i,bindings:m,bindingFlags:Mn(m),outputs:x,element:{ns:g,name:_,attrs:R,template:null,componentProvider:null,componentView:l||null,componentRendererType:h,publicProviders:null,allProviders:null,handleEvent:c||on},provider:null,text:null,query:null,ngContent:null}}function Bn(t,e,n){var r,i=n.element,o=t.root.selectorOrNode,s=t.renderer;if(t.parent||!o){r=i.name?s.createElement(i.name,i.ns):s.createComment("");var a=On(t,e,n);a&&s.appendChild(a,r)}else r=s.selectRootElement(o);if(i.attrs)for(var u=0;u<i.attrs.length;u++){var c=i.attrs[u];s.setAttribute(r,c[1],c[2],c[0])}return r}function Wn(t,e,n,r){for(var i=0;i<n.outputs.length;i++){var o=n.outputs[i],s=qn(t,n.nodeIndex,(h=o.eventName,(l=o.target)?l+":"+h:h)),a=o.target,u=t;"component"===o.target&&(a=null,u=e);var c=u.renderer.listen(a||r,o.eventName,s);t.disposables[n.outputIndex+i]=c}var l,h}function qn(t,e,n){return function(r){return gn(t,e,n,r)}}function Hn(t,e,n,r){if(!fn(t,e,n,r))return!1;var i=e.bindings[n],o=Qe(t,e.nodeIndex),s=o.renderElement,a=i.name;switch(15&i.flags){case 1:!function(t,e,n,r,i,o){var s=e.securityContext,a=s?t.root.sanitizer.sanitize(s,o):o;a=null!=a?a.toString():null;var u=t.renderer;null!=o?u.setAttribute(n,i,a,r):u.removeAttribute(n,i,r)}(t,i,s,i.ns,a,r);break;case 2:!function(t,e,n,r){var i=t.renderer;r?i.addClass(e,n):i.removeClass(e,n)}(t,s,a,r);break;case 4:!function(t,e,n,r,i){var o=t.root.sanitizer.sanitize(Ge.STYLE,i);if(null!=o){o=o.toString();var s=e.suffix;null!=s&&(o+=s)}else o=null;var a=t.renderer;null!=o?a.setStyle(n,r,o):a.removeStyle(n,r)}(t,i,s,a,r);break;case 8:!function(t,e,n,r,i){var o=e.securityContext,s=o?t.root.sanitizer.sanitize(o,i):i;t.renderer.setProperty(n,r,s)}(33554432&e.flags&&32&i.flags?o.componentView:t,i,s,a,r)}return!0}var Gn=new Object,zn=an(R),Kn=an(Et);function Jn(t,e,n,r){return n=N(n),{index:-1,deps:Tn(r,O(e)),flags:t,token:e,value:n}}function Xn(t){for(var e={},n=0;n<t.length;n++){var r=t[n];r.index=n,e[an(r.token)]=r}return{factory:null,providersByKey:e,providers:t}}function Qn(t,e,n){if(void 0===n&&(n=R.THROW_IF_NOT_FOUND),8&e.flags)return e.token;if(2&e.flags&&(n=null),1&e.flags)return t._parent.get(e.token,n);var r=e.tokenKey;switch(r){case zn:case Kn:return t}var i=t._def.providersByKey[r];if(i){var o=t._providers[i.index];return void 0===o&&(o=t._providers[i.index]=Yn(t,i)),o===Gn?void 0:o}return t._parent.get(e.token,n)}function Yn(t,e){var n;switch(201347067&e.flags){case 512:n=function(t,e,n){var r=n.length;switch(r){case 0:return new e;case 1:return new e(Qn(t,n[0]));case 2:return new e(Qn(t,n[0]),Qn(t,n[1]));case 3:return new e(Qn(t,n[0]),Qn(t,n[1]),Qn(t,n[2]));default:for(var i=new Array(r),o=0;o<r;o++)i[o]=Qn(t,n[o]);return new(e.bind.apply(e,[void 0].concat(i)))}}(t,e.value,e.deps);break;case 1024:n=function(t,e,n){var r=n.length;switch(r){case 0:return e();case 1:return e(Qn(t,n[0]));case 2:return e(Qn(t,n[0]),Qn(t,n[1]));case 3:return e(Qn(t,n[0]),Qn(t,n[1]),Qn(t,n[2]));default:for(var i=Array(r),o=0;o<r;o++)i[o]=Qn(t,n[o]);return e.apply(void 0,i)}}(t,e.value,e.deps);break;case 2048:n=Qn(t,e.deps[0]);break;case 256:n=e.value}return void 0===n?Gn:n}function Zn(t,e){var n=t.viewContainer._embeddedViews;if((null==e||e>=n.length)&&(e=n.length-1),e<0)return null;var r=n[e];return r.viewContainerParent=null,nr(n,e),tn.dirtyParentQueries(r),tr(r),r}function $n(t,e,n){var r=e?bn(e,e.def.lastRenderRootNode):t.renderElement;xn(n,2,n.renderer.parentNode(r),n.renderer.nextSibling(r),void 0)}function tr(t){xn(t,3,null,null,void 0)}function er(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function nr(t,e){e>=t.length-1?t.pop():t.splice(e,1)}var rr=new Object;function ir(t,e,n,r,i,o){return new or(t,e,n,r,i,o)}var or=function(t){function e(e,n,r,i,o,s){var a=t.call(this)||this;return a.selector=e,a.componentType=n,a._inputs=i,a._outputs=o,a.ngContentSelectors=s,a.viewDefFactory=r,a}return Object(r.__extends)(e,t),Object.defineProperty(e.prototype,"inputs",{get:function(){var t=[],e=this._inputs;for(var n in e)t.push({propName:n,templateName:e[n]});return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outputs",{get:function(){var t=[];for(var e in this._outputs)t.push({propName:e,templateName:this._outputs[e]});return t},enumerable:!0,configurable:!0}),e.prototype.create=function(t,e,n,r){if(!r)throw new Error("ngModule should be provided");var i=Nn(this.viewDefFactory),o=i.nodes[0].element.componentProvider.nodeIndex,s=tn.createRootView(t,e||[],n,i,r,rr),a=Ye(s,o).instance;return n&&s.renderer.setAttribute(Qe(s,0).renderElement,"ng-version",d.full),new sr(s,new lr(s),a)},e}(ft),sr=function(t){function e(e,n,r){var i=t.call(this)||this;return i._view=e,i._viewRef=n,i._component=r,i._elDef=i._view.def.nodes[0],i.hostView=n,i.changeDetectorRef=n,i.instance=r,i}return Object(r.__extends)(e,t),Object.defineProperty(e.prototype,"location",{get:function(){return new ne(Qe(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new dr(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._viewRef.destroy()},e.prototype.onDestroy=function(t){this._viewRef.onDestroy(t)},e}(function(){});function ar(t,e,n){return new ur(t,e,n)}var ur=function(){function t(t,e,n){this._view=t,this._elDef=e,this._data=n,this._embeddedViews=[]}return Object.defineProperty(t.prototype,"element",{get:function(){return new ne(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new dr(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentInjector",{get:function(){for(var t=this._view,e=this._elDef.parent;!e&&t;)e=mn(t),t=t.parent;return t?new dr(t,e):new dr(this._view,null)},enumerable:!0,configurable:!0}),t.prototype.clear=function(){for(var t=this._embeddedViews.length-1;t>=0;t--){var e=Zn(this._data,t);tn.destroyView(e)}},t.prototype.get=function(t){var e=this._embeddedViews[t];if(e){var n=new lr(e);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(t.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(t,e,n){var r=t.createEmbeddedView(e||{});return this.insert(r,n),r},t.prototype.createComponent=function(t,e,n,r,i){var o=n||this.parentInjector;i||t instanceof wt||(i=o.get(Et));var s=t.create(o,r,void 0,i);return this.insert(s.hostView,e),s},t.prototype.insert=function(t,e){if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n,r,i,o,s=t;return i=s._view,o=(n=this._data).viewContainer._embeddedViews,null!==(r=e)&&void 0!==r||(r=o.length),i.viewContainerParent=this._view,er(o,r,i),function(t,e){var n=_n(e);if(n&&n!==t&&!(16&e.state)){e.state|=16;var r=n.template._projectedViews;r||(r=n.template._projectedViews=[]),r.push(e),function(t,n){if(!(4&n.flags)){e.parent.def.nodeFlags|=4,n.flags|=4;for(var r=n.parent;r;)r.childFlags|=4,r=r.parent}}(0,e.parentNodeDef)}}(n,i),tn.dirtyParentQueries(i),$n(n,r>0?o[r-1]:null,i),s.attachToViewContainerRef(this),t},t.prototype.move=function(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n,r,i,o,s,a=this._embeddedViews.indexOf(t._view);return i=e,s=(o=(n=this._data).viewContainer._embeddedViews)[r=a],nr(o,r),null==i&&(i=o.length),er(o,i,s),tn.dirtyParentQueries(s),tr(s),$n(n,i>0?o[i-1]:null,s),t},t.prototype.indexOf=function(t){return this._embeddedViews.indexOf(t._view)},t.prototype.remove=function(t){var e=Zn(this._data,t);e&&tn.destroyView(e)},t.prototype.detach=function(t){var e=Zn(this._data,t);return e?new lr(e):null},t}();function cr(t){return new lr(t)}var lr=function(){function t(t){this._view=t,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(t.prototype,"rootNodes",{get:function(){return xn(this._view,0,void 0,void 0,t=[]),t;var t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),t.prototype.markForCheck=function(){vn(this._view)},t.prototype.detach=function(){this._view.state&=-5},t.prototype.detectChanges=function(){var t=this._view.root.rendererFactory;t.begin&&t.begin();try{tn.checkAndUpdateView(this._view)}finally{t.end&&t.end()}},t.prototype.checkNoChanges=function(){tn.checkNoChangesView(this._view)},t.prototype.reattach=function(){this._view.state|=4},t.prototype.onDestroy=function(t){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(t)},t.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),tn.destroyView(this._view)},t.prototype.detachFromAppRef=function(){this._appRef=null,tr(this._view),tn.dirtyParentQueries(this._view)},t.prototype.attachToAppRef=function(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t},t.prototype.attachToViewContainerRef=function(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t},t}();function hr(t,e){return new pr(t,e)}var pr=function(t){function e(e,n){var r=t.call(this)||this;return r._parentView=e,r._def=n,r}return Object(r.__extends)(e,t),e.prototype.createEmbeddedView=function(t){return new lr(tn.createEmbeddedView(this._parentView,this._def,this._def.element.template,t))},Object.defineProperty(e.prototype,"elementRef",{get:function(){return new ne(Qe(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),e}(ce);function fr(t,e){return new dr(t,e)}var dr=function(){function t(t,e){this.view=t,this.elDef=e}return t.prototype.get=function(t,e){return void 0===e&&(e=R.THROW_IF_NOT_FOUND),tn.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:t,tokenKey:an(t)},e)},t}();function vr(t,e){var n=t.def.nodes[e];if(1&n.flags){var r=Qe(t,n.nodeIndex);return n.element.template?r.template:r.renderElement}if(2&n.flags)return Xe(t,n.nodeIndex).renderText;if(20240&n.flags)return Ye(t,n.nodeIndex).instance;throw new Error("Illegal state: read nodeValue for node index "+e)}function yr(t){return new gr(t.renderer)}var gr=function(){function t(t){this.delegate=t}return t.prototype.selectRootElement=function(t){return this.delegate.selectRootElement(t)},t.prototype.createElement=function(t,e){var n=jn(e),r=this.delegate.createElement(n[1],n[0]);return t&&this.delegate.appendChild(t,r),r},t.prototype.createViewRoot=function(t){return t},t.prototype.createTemplateAnchor=function(t){var e=this.delegate.createComment("");return t&&this.delegate.appendChild(t,e),e},t.prototype.createText=function(t,e){var n=this.delegate.createText(e);return t&&this.delegate.appendChild(t,n),n},t.prototype.projectNodes=function(t,e){for(var n=0;n<e.length;n++)this.delegate.appendChild(t,e[n])},t.prototype.attachViewAfter=function(t,e){for(var n=this.delegate.parentNode(t),r=this.delegate.nextSibling(t),i=0;i<e.length;i++)this.delegate.insertBefore(n,e[i],r)},t.prototype.detachView=function(t){for(var e=0;e<t.length;e++){var n=t[e],r=this.delegate.parentNode(n);this.delegate.removeChild(r,n)}},t.prototype.destroyView=function(t,e){for(var n=0;n<e.length;n++)this.delegate.destroyNode(e[n])},t.prototype.listen=function(t,e,n){return this.delegate.listen(t,e,n)},t.prototype.listenGlobal=function(t,e,n){return this.delegate.listen(t,e,n)},t.prototype.setElementProperty=function(t,e,n){this.delegate.setProperty(t,e,n)},t.prototype.setElementAttribute=function(t,e,n){var r=jn(e),i=r[0],o=r[1];null!=n?this.delegate.setAttribute(t,o,n,i):this.delegate.removeAttribute(t,o,i)},t.prototype.setBindingDebugInfo=function(t,e,n){},t.prototype.setElementClass=function(t,e,n){n?this.delegate.addClass(t,e):this.delegate.removeClass(t,e)},t.prototype.setElementStyle=function(t,e,n){null!=n?this.delegate.setStyle(t,e,n):this.delegate.removeStyle(t,e)},t.prototype.invokeElementMethod=function(t,e,n){t[e].apply(t,n)},t.prototype.setText=function(t,e){this.delegate.setValue(t,e)},t.prototype.animate=function(){throw new Error("Renderer.animate is no longer supported!")},t}();function _r(t,e,n,r){return new mr(t,e,n,r)}var mr=function(){function t(t,e,n,r){this._moduleType=t,this._parent=e,this._bootstrapComponents=n,this._def=r,this._destroyListeners=[],this._destroyed=!1,this.injector=this,function(t){for(var e=t._def,n=t._providers=new Array(e.providers.length),r=0;r<e.providers.length;r++){var i=e.providers[r];4096&i.flags||(n[r]=Yn(t,i))}}(this)}return t.prototype.get=function(t,e){return void 0===e&&(e=R.THROW_IF_NOT_FOUND),Qn(this,{token:t,tokenKey:an(t),flags:0},e)},Object.defineProperty(t.prototype,"instance",{get:function(){return this.get(this._moduleType)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentFactoryResolver",{get:function(){return this.get(mt)},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){if(this._destroyed)throw new Error("The ng module "+O(this.instance.constructor)+" has already been destroyed.");this._destroyed=!0,function(t,e){for(var n=t._def,r=0;r<n.providers.length;r++)if(131072&n.providers[r].flags){var i=t._providers[r];i&&i!==Gn&&i.ngOnDestroy()}}(this),this._destroyListeners.forEach(function(t){return t()})},t.prototype.onDestroy=function(t){this._destroyListeners.push(t)},t}(),br=an(function(){}),wr=an(ee),Er=an(ne),Cr=an(le),Sr=an(ce),Tr=an(he),Or=an(R);function Ir(t,e,n,r,i,o,s,a){var u=[];if(s)for(var c in s){var l=s[c];u[l[0]]={flags:8,name:c,nonMinifiedName:l[1],ns:null,securityContext:null,suffix:null}}var h=[];if(a)for(var p in a)h.push({type:1,propName:p,target:null,eventName:a[p]});return xr(t,e|=16384,n,r,i,i,o,u,h)}function Nr(t,e,n,r,i){return xr(-1,t,e,0,n,r,i)}function xr(t,e,n,r,i,o,s,a,u){var c=Sn(n),l=c.matchedQueries,h=c.references,p=c.matchedQueryIds;u||(u=[]),a||(a=[]),o=N(o);var f=Tn(s,O(i));return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:e,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:l,matchedQueryIds:p,references:h,ngContentIndex:-1,childCount:r,bindings:a,bindingFlags:Mn(a),outputs:u,element:null,provider:{token:i,value:o,deps:f},text:null,query:null,ngContent:null}}function Ar(t,e){return Dr(t,e)}function Pr(t,e){for(var n=t;n.parent&&!wn(n);)n=n.parent;return jr(n.parent,mn(n),!0,e.provider.value,e.provider.deps)}function Rr(t,e){var n=jr(t,e.parent,(32768&e.flags)>0,e.provider.value,e.provider.deps);if(e.outputs.length)for(var r=0;r<e.outputs.length;r++){var i=e.outputs[r],o=n[i.propName].subscribe(kr(t,e.parent.nodeIndex,i.eventName));t.disposables[e.outputIndex+r]=o.unsubscribe.bind(o)}return n}function kr(t,e,n){return function(r){return gn(t,e,n,r)}}function Dr(t,e){var n=(8192&e.flags)>0,r=e.provider;switch(201347067&e.flags){case 512:return jr(t,e.parent,n,r.value,r.deps);case 1024:return function(t,e,n,r,i){var o=i.length;switch(o){case 0:return r();case 1:return r(Lr(t,e,n,i[0]));case 2:return r(Lr(t,e,n,i[0]),Lr(t,e,n,i[1]));case 3:return r(Lr(t,e,n,i[0]),Lr(t,e,n,i[1]),Lr(t,e,n,i[2]));default:for(var s=Array(o),a=0;a<o;a++)s[a]=Lr(t,e,n,i[a]);return r.apply(void 0,s)}}(t,e.parent,n,r.value,r.deps);case 2048:return Lr(t,e.parent,n,r.deps[0]);case 256:return r.value}}function jr(t,e,n,r,i){var o=i.length;switch(o){case 0:return new r;case 1:return new r(Lr(t,e,n,i[0]));case 2:return new r(Lr(t,e,n,i[0]),Lr(t,e,n,i[1]));case 3:return new r(Lr(t,e,n,i[0]),Lr(t,e,n,i[1]),Lr(t,e,n,i[2]));default:for(var s=new Array(o),a=0;a<o;a++)s[a]=Lr(t,e,n,i[a]);return new(r.bind.apply(r,[void 0].concat(s)))}}var Mr={};function Lr(t,e,n,r,i){if(void 0===i&&(i=R.THROW_IF_NOT_FOUND),8&r.flags)return r.token;var o=t;2&r.flags&&(i=null);var s=r.tokenKey;for(s===Tr&&(n=!(!e||!e.element.componentView)),e&&1&r.flags&&(n=!1,e=e.parent);t;){if(e)switch(s){case br:return yr(Fr(t,e,n));case wr:return Fr(t,e,n).renderer;case Er:return new ne(Qe(t,e.nodeIndex).renderElement);case Cr:return Qe(t,e.nodeIndex).viewContainer;case Sr:if(e.element.template)return Qe(t,e.nodeIndex).template;break;case Tr:return cr(Fr(t,e,n));case Or:return fr(t,e);default:var a=(n?e.element.allProviders:e.element.publicProviders)[s];if(a){var u=Ye(t,a.nodeIndex);return u||(u={instance:Dr(t,a)},t.nodes[a.nodeIndex]=u),u.instance}}n=wn(t),e=mn(t),t=t.parent}var c=o.root.injector.get(r.token,Mr);return c!==Mr||i===Mr?c:o.root.ngModule.injector.get(r.token,i)}function Fr(t,e,n){var r;if(n)r=Qe(t,e.nodeIndex).componentView;else for(r=t;r.parent&&!wn(r);)r=r.parent;return r}function Vr(t,e,n,r,i,o){if(32768&n.flags){var s=Qe(t,n.parent.nodeIndex).componentView;2&s.def.flags&&(s.state|=8)}if(e.instance[n.bindings[r].name]=i,524288&n.flags){o=o||{};var a=be.unwrap(t.oldValues[n.bindingIndex+r]);o[n.bindings[r].nonMinifiedName]=new we(a,i,0!=(2&t.state))}return t.oldValues[n.bindingIndex+r]=i,o}function Ur(t,e){if(t.def.nodeFlags&e)for(var n=t.def.nodes,r=0,i=0;i<n.length;i++){var o=n[i],s=o.parent;for(!s&&o.flags&e&&Wr(t,i,o.flags&e,r++),0==(o.childFlags&e)&&(i+=o.childCount);s&&1&s.flags&&i===s.nodeIndex+s.childCount;)s.directChildFlags&e&&(r=Br(t,s,e,r)),s=s.parent}}function Br(t,e,n,r){for(var i=e.nodeIndex+1;i<=e.nodeIndex+e.childCount;i++){var o=t.def.nodes[i];o.flags&n&&Wr(t,i,o.flags&n,r++),i+=o.childCount}return r}function Wr(t,e,n,r){var i=Ye(t,e);if(i){var o=i.instance;o&&(tn.setCurrentNode(t,e),1048576&n&&Je(t,512,r)&&o.ngAfterContentInit(),2097152&n&&o.ngAfterContentChecked(),4194304&n&&Je(t,768,r)&&o.ngAfterViewInit(),8388608&n&&o.ngAfterViewChecked(),131072&n&&o.ngOnDestroy())}}function qr(t,e,n){var r=[];for(var i in n)r.push({propName:i,bindingType:n[i]});return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:-1,flags:t,childFlags:0,directChildFlags:0,childMatchedQueries:0,ngContentIndex:-1,matchedQueries:{},matchedQueryIds:0,references:{},childCount:0,bindings:[],bindingFlags:0,outputs:[],element:null,provider:null,text:null,query:{id:e,filterId:Cn(e),bindings:r},ngContent:null}}function Hr(t){for(var e=t.def.nodeMatchedQueries;t.parent&&En(t);){var n=t.parentNodeDef;t=t.parent;for(var r=n.nodeIndex+n.childCount,i=0;i<=r;i++)67108864&(o=t.def.nodes[i]).flags&&536870912&o.flags&&(o.query.filterId&e)===o.query.filterId&&$e(t,i).setDirty(),!(1&o.flags&&i+o.childCount<n.nodeIndex)&&67108864&o.childFlags&&536870912&o.childFlags||(i+=o.childCount)}if(134217728&t.def.nodeFlags)for(i=0;i<t.def.nodes.length;i++){var o;134217728&(o=t.def.nodes[i]).flags&&536870912&o.flags&&$e(t,i).setDirty(),i+=o.childCount}}function Gr(t,e){var n=$e(t,e.nodeIndex);if(n.dirty){var r,i=void 0;if(67108864&e.flags){var o=e.parent.parent;i=zr(t,o.nodeIndex,o.nodeIndex+o.childCount,e.query,[]),r=Ye(t,e.parent.nodeIndex).instance}else 134217728&e.flags&&(i=zr(t,0,t.def.nodes.length-1,e.query,[]),r=t.component);n.reset(i);for(var s=e.query.bindings,a=!1,u=0;u<s.length;u++){var c=s[u],l=void 0;switch(c.bindingType){case 0:l=n.first;break;case 1:l=n,a=!0}r[c.propName]=l}a&&n.notifyOnChanges()}}function zr(t,e,n,r,i){for(var o=e;o<=n;o++){var s=t.def.nodes[o],a=s.matchedQueries[r.id];if(null!=a&&i.push(Kr(t,s,a)),1&s.flags&&s.element.template&&(s.element.template.nodeMatchedQueries&r.filterId)===r.filterId){var u=Qe(t,o);if((s.childMatchedQueries&r.filterId)===r.filterId&&(zr(t,o+1,o+s.childCount,r,i),o+=s.childCount),16777216&s.flags)for(var c=u.viewContainer._embeddedViews,l=0;l<c.length;l++){var h=c[l],p=_n(h);p&&p===u&&zr(h,0,h.def.nodes.length-1,r,i)}var f=u.template._projectedViews;if(f)for(l=0;l<f.length;l++){var d=f[l];zr(d,0,d.def.nodes.length-1,r,i)}}(s.childMatchedQueries&r.filterId)!==r.filterId&&(o+=s.childCount)}return i}function Kr(t,e,n){if(null!=n)switch(n){case 1:return Qe(t,e.nodeIndex).renderElement;case 0:return new ne(Qe(t,e.nodeIndex).renderElement);case 2:return Qe(t,e.nodeIndex).template;case 3:return Qe(t,e.nodeIndex).viewContainer;case 4:return Ye(t,e.nodeIndex).instance}}function Jr(t,e,n){var r=On(t,e,n);r&&Pn(t,n.ngContent.index,1,r,null,void 0)}function Xr(t,e){return function(t,e,n){for(var r=new Array(n.length),i=0;i<n.length;i++){var o=n[i];r[i]={flags:8,name:o,ns:null,nonMinifiedName:o,securityContext:null,suffix:null}}return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:32,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:-1,childCount:0,bindings:r,bindingFlags:Mn(r),outputs:[],element:null,provider:null,text:null,query:null,ngContent:null}}(0,t,new Array(e))}function Qr(t,e,n){for(var r=new Array(n.length-1),i=1;i<n.length;i++)r[i-1]={flags:8,name:null,ns:null,nonMinifiedName:null,securityContext:null,suffix:n[i]};return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:t,flags:2,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:e,childCount:0,bindings:r,bindingFlags:8,outputs:[],element:null,provider:null,text:{prefix:n[0]},query:null,ngContent:null}}function Yr(t,e,n){var r,i=t.renderer;r=i.createText(n.text.prefix);var o=On(t,e,n);return o&&i.appendChild(o,r),{renderText:r}}function Zr(t,e){return(null!=t?t.toString():"")+e.suffix}function $r(t,e,n,r){for(var i=0,o=0,s=0,a=0,u=0,c=null,l=null,h=!1,p=!1,f=null,d=0;d<e.length;d++){var v=e[d];if(v.nodeIndex=d,v.parent=c,v.bindingIndex=i,v.outputIndex=o,v.renderParent=l,s|=v.flags,u|=v.matchedQueryIds,v.element){var y=v.element;y.publicProviders=c?c.element.publicProviders:Object.create(null),y.allProviders=y.publicProviders,h=!1,p=!1,v.element.template&&(u|=v.element.template.nodeMatchedQueries)}if(ei(c,v,e.length),i+=v.bindings.length,o+=v.outputs.length,!l&&3&v.flags&&(f=v),20224&v.flags){h||(h=!0,c.element.publicProviders=Object.create(c.element.publicProviders),c.element.allProviders=c.element.publicProviders);var g=0!=(32768&v.flags);0==(8192&v.flags)||g?c.element.publicProviders[an(v.provider.token)]=v:(p||(p=!0,c.element.allProviders=Object.create(c.element.publicProviders)),c.element.allProviders[an(v.provider.token)]=v),g&&(c.element.componentProvider=v)}if(c?(c.childFlags|=v.flags,c.directChildFlags|=v.flags,c.childMatchedQueries|=v.matchedQueryIds,v.element&&v.element.template&&(c.childMatchedQueries|=v.element.template.nodeMatchedQueries)):a|=v.flags,v.childCount>0)c=v,ti(v)||(l=v);else for(;c&&d===c.nodeIndex+c.childCount;){var _=c.parent;_&&(_.childFlags|=c.childFlags,_.childMatchedQueries|=c.childMatchedQueries),l=(c=_)&&ti(c)?c.renderParent:c}}return{factory:null,nodeFlags:s,rootNodeFlags:a,nodeMatchedQueries:u,flags:t,nodes:e,updateDirectives:n||on,updateRenderer:r||on,handleEvent:function(t,n,r,i){return e[n].element.handleEvent(t,r,i)},bindingCount:i,outputCount:o,lastRenderRootNode:f}}function ti(t){return 0!=(1&t.flags)&&null===t.element.name}function ei(t,e,n){var r=e.element&&e.element.template;if(r){if(!r.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(r.lastRenderRootNode&&16777216&r.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+e.nodeIndex+"!")}if(20224&e.flags&&0==(1&(t?t.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+e.nodeIndex+"!");if(e.query){if(67108864&e.flags&&(!t||0==(16384&t.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+e.nodeIndex+"!");if(134217728&e.flags&&t)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+e.nodeIndex+"!")}if(e.childCount){var i=t?t.nodeIndex+t.childCount:n-1;if(e.nodeIndex<=i&&e.nodeIndex+e.childCount>i)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+e.nodeIndex+"!")}}function ni(t,e,n,r){var i=oi(t.root,t.renderer,t,e,n);return si(i,t.component,r),ai(i),i}function ri(t,e,n){var r=oi(t,t.renderer,null,null,e);return si(r,n,n),ai(r),r}function ii(t,e,n,r){var i,o=e.element.componentRendererType;return i=o?t.root.rendererFactory.createRenderer(r,o):t.root.renderer,oi(t.root,i,t,e.element.componentProvider,n)}function oi(t,e,n,r,i){var o=new Array(i.nodes.length),s=i.outputCount?new Array(i.outputCount):null;return{def:i,parent:n,viewContainerParent:null,parentNodeDef:r,context:null,component:null,nodes:o,state:13,root:t,renderer:e,oldValues:new Array(i.bindingCount),disposables:s,initIndex:-1}}function si(t,e,n){t.component=e,t.context=n}function ai(t){var e;wn(t)&&(e=Qe(t.parent,t.parentNodeDef.parent.nodeIndex).renderElement);for(var n=t.def,r=t.nodes,i=0;i<n.nodes.length;i++){var o=n.nodes[i];tn.setCurrentNode(t,i);var s=void 0;switch(201347067&o.flags){case 1:var a=Bn(t,e,o),u=void 0;if(33554432&o.flags){var c=Nn(o.element.componentView);u=tn.createComponentView(t,o,c,a)}Wn(t,u,o,a),s={renderElement:a,componentView:u,viewContainer:null,template:o.element.template?hr(t,o):void 0},16777216&o.flags&&(s.viewContainer=ar(t,o,s));break;case 2:s=Yr(t,e,o);break;case 512:case 1024:case 2048:case 256:(s=r[i])||4096&o.flags||(s={instance:Ar(t,o)});break;case 16:s={instance:Pr(t,o)};break;case 16384:(s=r[i])||(s={instance:Rr(t,o)}),32768&o.flags&&si(Qe(t,o.parent.nodeIndex).componentView,s.instance,s.instance);break;case 32:case 64:case 128:s={value:void 0};break;case 67108864:case 134217728:s=new ie;break;case 8:Jr(t,e,o),s=void 0}r[i]=s}yi(t,vi.CreateViewNodes),bi(t,201326592,268435456,0)}function ui(t){hi(t),tn.updateDirectives(t,1),gi(t,vi.CheckNoChanges),tn.updateRenderer(t,1),yi(t,vi.CheckNoChanges),t.state&=-97}function ci(t){1&t.state?(t.state&=-2,t.state|=2):t.state&=-3,Ke(t,0,256),hi(t),tn.updateDirectives(t,0),gi(t,vi.CheckAndUpdate),bi(t,67108864,536870912,0);var e=Ke(t,256,512);Ur(t,2097152|(e?1048576:0)),tn.updateRenderer(t,0),yi(t,vi.CheckAndUpdate),bi(t,134217728,536870912,0),Ur(t,8388608|((e=Ke(t,512,768))?4194304:0)),2&t.def.flags&&(t.state&=-9),t.state&=-97,Ke(t,768,1024)}function li(t,e,n,r,i,o,s,a,u,c,l,h,p){return 0===n?function(t,e,n,r,i,o,s,a,u,c,l,h){switch(201347067&e.flags){case 1:return function(t,e,n,r,i,o,s,a,u,c,l,h){var p=e.bindings.length,f=!1;return p>0&&Hn(t,e,0,n)&&(f=!0),p>1&&Hn(t,e,1,r)&&(f=!0),p>2&&Hn(t,e,2,i)&&(f=!0),p>3&&Hn(t,e,3,o)&&(f=!0),p>4&&Hn(t,e,4,s)&&(f=!0),p>5&&Hn(t,e,5,a)&&(f=!0),p>6&&Hn(t,e,6,u)&&(f=!0),p>7&&Hn(t,e,7,c)&&(f=!0),p>8&&Hn(t,e,8,l)&&(f=!0),p>9&&Hn(t,e,9,h)&&(f=!0),f}(t,e,n,r,i,o,s,a,u,c,l,h);case 2:return function(t,e,n,r,i,o,s,a,u,c,l,h){var p=!1,f=e.bindings,d=f.length;if(d>0&&fn(t,e,0,n)&&(p=!0),d>1&&fn(t,e,1,r)&&(p=!0),d>2&&fn(t,e,2,i)&&(p=!0),d>3&&fn(t,e,3,o)&&(p=!0),d>4&&fn(t,e,4,s)&&(p=!0),d>5&&fn(t,e,5,a)&&(p=!0),d>6&&fn(t,e,6,u)&&(p=!0),d>7&&fn(t,e,7,c)&&(p=!0),d>8&&fn(t,e,8,l)&&(p=!0),d>9&&fn(t,e,9,h)&&(p=!0),p){var v=e.text.prefix;d>0&&(v+=Zr(n,f[0])),d>1&&(v+=Zr(r,f[1])),d>2&&(v+=Zr(i,f[2])),d>3&&(v+=Zr(o,f[3])),d>4&&(v+=Zr(s,f[4])),d>5&&(v+=Zr(a,f[5])),d>6&&(v+=Zr(u,f[6])),d>7&&(v+=Zr(c,f[7])),d>8&&(v+=Zr(l,f[8])),d>9&&(v+=Zr(h,f[9]));var y=Xe(t,e.nodeIndex).renderText;t.renderer.setValue(y,v)}return p}(t,e,n,r,i,o,s,a,u,c,l,h);case 16384:return function(t,e,n,r,i,o,s,a,u,c,l,h){var p=Ye(t,e.nodeIndex),f=p.instance,d=!1,v=void 0,y=e.bindings.length;return y>0&&pn(t,e,0,n)&&(d=!0,v=Vr(t,p,e,0,n,v)),y>1&&pn(t,e,1,r)&&(d=!0,v=Vr(t,p,e,1,r,v)),y>2&&pn(t,e,2,i)&&(d=!0,v=Vr(t,p,e,2,i,v)),y>3&&pn(t,e,3,o)&&(d=!0,v=Vr(t,p,e,3,o,v)),y>4&&pn(t,e,4,s)&&(d=!0,v=Vr(t,p,e,4,s,v)),y>5&&pn(t,e,5,a)&&(d=!0,v=Vr(t,p,e,5,a,v)),y>6&&pn(t,e,6,u)&&(d=!0,v=Vr(t,p,e,6,u,v)),y>7&&pn(t,e,7,c)&&(d=!0,v=Vr(t,p,e,7,c,v)),y>8&&pn(t,e,8,l)&&(d=!0,v=Vr(t,p,e,8,l,v)),y>9&&pn(t,e,9,h)&&(d=!0,v=Vr(t,p,e,9,h,v)),v&&f.ngOnChanges(v),65536&e.flags&&Je(t,256,e.nodeIndex)&&f.ngOnInit(),262144&e.flags&&f.ngDoCheck(),d}(t,e,n,r,i,o,s,a,u,c,l,h);case 32:case 64:case 128:return function(t,e,n,r,i,o,s,a,u,c,l,h){var p=e.bindings,f=!1,d=p.length;if(d>0&&fn(t,e,0,n)&&(f=!0),d>1&&fn(t,e,1,r)&&(f=!0),d>2&&fn(t,e,2,i)&&(f=!0),d>3&&fn(t,e,3,o)&&(f=!0),d>4&&fn(t,e,4,s)&&(f=!0),d>5&&fn(t,e,5,a)&&(f=!0),d>6&&fn(t,e,6,u)&&(f=!0),d>7&&fn(t,e,7,c)&&(f=!0),d>8&&fn(t,e,8,l)&&(f=!0),d>9&&fn(t,e,9,h)&&(f=!0),f){var v=Ze(t,e.nodeIndex),y=void 0;switch(201347067&e.flags){case 32:y=new Array(p.length),d>0&&(y[0]=n),d>1&&(y[1]=r),d>2&&(y[2]=i),d>3&&(y[3]=o),d>4&&(y[4]=s),d>5&&(y[5]=a),d>6&&(y[6]=u),d>7&&(y[7]=c),d>8&&(y[8]=l),d>9&&(y[9]=h);break;case 64:y={},d>0&&(y[p[0].name]=n),d>1&&(y[p[1].name]=r),d>2&&(y[p[2].name]=i),d>3&&(y[p[3].name]=o),d>4&&(y[p[4].name]=s),d>5&&(y[p[5].name]=a),d>6&&(y[p[6].name]=u),d>7&&(y[p[7].name]=c),d>8&&(y[p[8].name]=l),d>9&&(y[p[9].name]=h);break;case 128:var g=n;switch(d){case 1:y=g.transform(n);break;case 2:y=g.transform(r);break;case 3:y=g.transform(r,i);break;case 4:y=g.transform(r,i,o);break;case 5:y=g.transform(r,i,o,s);break;case 6:y=g.transform(r,i,o,s,a);break;case 7:y=g.transform(r,i,o,s,a,u);break;case 8:y=g.transform(r,i,o,s,a,u,c);break;case 9:y=g.transform(r,i,o,s,a,u,c,l);break;case 10:y=g.transform(r,i,o,s,a,u,c,l,h)}}v.value=y}return f}(t,e,n,r,i,o,s,a,u,c,l,h);default:throw"unreachable"}}(t,e,r,i,o,s,a,u,c,l,h,p):function(t,e,n){switch(201347067&e.flags){case 1:return function(t,e,n){for(var r=!1,i=0;i<n.length;i++)Hn(t,e,i,n[i])&&(r=!0);return r}(t,e,n);case 2:return function(t,e,n){for(var r=e.bindings,i=!1,o=0;o<n.length;o++)fn(t,e,o,n[o])&&(i=!0);if(i){var s="";for(o=0;o<n.length;o++)s+=Zr(n[o],r[o]);s=e.text.prefix+s;var a=Xe(t,e.nodeIndex).renderText;t.renderer.setValue(a,s)}return i}(t,e,n);case 16384:return function(t,e,n){for(var r=Ye(t,e.nodeIndex),i=r.instance,o=!1,s=void 0,a=0;a<n.length;a++)pn(t,e,a,n[a])&&(o=!0,s=Vr(t,r,e,a,n[a],s));return s&&i.ngOnChanges(s),65536&e.flags&&Je(t,256,e.nodeIndex)&&i.ngOnInit(),262144&e.flags&&i.ngDoCheck(),o}(t,e,n);case 32:case 64:case 128:return function(t,e,n){for(var r=e.bindings,i=!1,o=0;o<n.length;o++)fn(t,e,o,n[o])&&(i=!0);if(i){var s=Ze(t,e.nodeIndex),a=void 0;switch(201347067&e.flags){case 32:a=n;break;case 64:for(a={},o=0;o<n.length;o++)a[r[o].name]=n[o];break;case 128:var u=n[0],c=n.slice(1);a=u.transform.apply(u,c)}s.value=a}return i}(t,e,n);default:throw"unreachable"}}(t,e,r)}function hi(t){var e=t.def;if(4&e.nodeFlags)for(var n=0;n<e.nodes.length;n++){var r=e.nodes[n];if(4&r.flags){var i=Qe(t,n).template._projectedViews;if(i)for(var o=0;o<i.length;o++){var s=i[o];s.state|=32,yn(s,t)}}else 0==(4&r.childFlags)&&(n+=r.childCount)}}function pi(t,e,n,r,i,o,s,a,u,c,l,h,p){return 0===n?function(t,e,n,r,i,o,s,a,u,c,l,h){var p=e.bindings.length;p>0&&dn(t,e,0,n),p>1&&dn(t,e,1,r),p>2&&dn(t,e,2,i),p>3&&dn(t,e,3,o),p>4&&dn(t,e,4,s),p>5&&dn(t,e,5,a),p>6&&dn(t,e,6,u),p>7&&dn(t,e,7,c),p>8&&dn(t,e,8,l),p>9&&dn(t,e,9,h)}(t,e,r,i,o,s,a,u,c,l,h,p):function(t,e,n){for(var r=0;r<n.length;r++)dn(t,e,r,n[r])}(t,e,r),!1}function fi(t,e){if($e(t,e.nodeIndex).dirty)throw en(tn.createDebugContext(t,e.nodeIndex),"Query "+e.query.id+" not dirty","Query "+e.query.id+" dirty",0!=(1&t.state))}function di(t){if(!(128&t.state)){if(gi(t,vi.Destroy),yi(t,vi.Destroy),Ur(t,131072),t.disposables)for(var e=0;e<t.disposables.length;e++)t.disposables[e]();!function(t){if(16&t.state){var e=_n(t);if(e){var n=e.template._projectedViews;n&&(nr(n,n.indexOf(t)),tn.dirtyParentQueries(t))}}}(t),t.renderer.destroyNode&&function(t){for(var e=t.def.nodes.length,n=0;n<e;n++){var r=t.def.nodes[n];1&r.flags?t.renderer.destroyNode(Qe(t,n).renderElement):2&r.flags?t.renderer.destroyNode(Xe(t,n).renderText):(67108864&r.flags||134217728&r.flags)&&$e(t,n).destroy()}}(t),wn(t)&&t.renderer.destroy(),t.state|=128}}var vi=function(){var t={CreateViewNodes:0,CheckNoChanges:1,CheckNoChangesProjectedViews:2,CheckAndUpdate:3,CheckAndUpdateProjectedViews:4,Destroy:5};return t[t.CreateViewNodes]="CreateViewNodes",t[t.CheckNoChanges]="CheckNoChanges",t[t.CheckNoChangesProjectedViews]="CheckNoChangesProjectedViews",t[t.CheckAndUpdate]="CheckAndUpdate",t[t.CheckAndUpdateProjectedViews]="CheckAndUpdateProjectedViews",t[t.Destroy]="Destroy",t}();function yi(t,e){var n=t.def;if(33554432&n.nodeFlags)for(var r=0;r<n.nodes.length;r++){var i=n.nodes[r];33554432&i.flags?_i(Qe(t,r).componentView,e):0==(33554432&i.childFlags)&&(r+=i.childCount)}}function gi(t,e){var n=t.def;if(16777216&n.nodeFlags)for(var r=0;r<n.nodes.length;r++){var i=n.nodes[r];if(16777216&i.flags)for(var o=Qe(t,r).viewContainer._embeddedViews,s=0;s<o.length;s++)_i(o[s],e);else 0==(16777216&i.childFlags)&&(r+=i.childCount)}}function _i(t,e){var n=t.state;switch(e){case vi.CheckNoChanges:0==(128&n)&&(12==(12&n)?ui(t):64&n&&mi(t,vi.CheckNoChangesProjectedViews));break;case vi.CheckNoChangesProjectedViews:0==(128&n)&&(32&n?ui(t):64&n&&mi(t,e));break;case vi.CheckAndUpdate:0==(128&n)&&(12==(12&n)?ci(t):64&n&&mi(t,vi.CheckAndUpdateProjectedViews));break;case vi.CheckAndUpdateProjectedViews:0==(128&n)&&(32&n?ci(t):64&n&&mi(t,e));break;case vi.Destroy:di(t);break;case vi.CreateViewNodes:ai(t)}}function mi(t,e){gi(t,e),yi(t,e)}function bi(t,e,n,r){if(t.def.nodeFlags&e&&t.def.nodeFlags&n)for(var i=t.def.nodes.length,o=0;o<i;o++){var s=t.def.nodes[o];if(s.flags&e&&s.flags&n)switch(tn.setCurrentNode(t,s.nodeIndex),r){case 0:Gr(t,s);break;case 1:fi(t,s)}s.childFlags&e&&s.childFlags&n||(o+=s.childCount)}}var wi=!1;function Ei(t,e,n,r,i,o){return ri(Si(t,i,i.injector.get($t),e,n),r,o)}function Ci(t,e,n,r,i,o){var s=i.injector.get($t),a=Si(t,i,new ro(s),e,n),u=ki(r);return eo(Wi.create,ri,null,[a,u,o])}function Si(t,e,n,r,i){var o=e.injector.get(ze),s=e.injector.get(Z);return{ngModule:e,injector:t,projectableNodes:r,selectorOrNode:i,sanitizer:o,rendererFactory:n,renderer:n.createRenderer(null,null),errorHandler:s}}function Ti(t,e,n,r){var i=ki(n);return eo(Wi.create,ni,null,[t,e,i,r])}function Oi(t,e,n,r){return n=xi.get(e.element.componentProvider.provider.token)||ki(n),eo(Wi.create,ii,null,[t,e,n,r])}function Ii(t,e,n,r){return _r(t,e,n,function(t){var e=function(t){var e=!1,n=!1;return 0===Ni.size?{hasOverrides:e,hasDeprecatedOverrides:n}:(t.providers.forEach(function(t){var r=Ni.get(t.token);3840&t.flags&&r&&(e=!0,n=n||r.deprecatedBehavior)}),{hasOverrides:e,hasDeprecatedOverrides:n})}(t),n=e.hasDeprecatedOverrides;return e.hasOverrides?(function(t){for(var e=0;e<t.providers.length;e++){var r=t.providers[e];n&&(r.flags|=4096);var i=Ni.get(r.token);i&&(r.flags=-3841&r.flags|i.flags,r.deps=Tn(i.deps),r.value=i.value)}}(t=t.factory(function(){return on})),t):t}(r))}var Ni=new Map,xi=new Map;function Ai(t){Ni.set(t.token,t)}function Pi(t,e){var n=Nn(Nn(e.viewDefFactory).nodes[0].element.componentView);xi.set(t,n)}function Ri(){Ni.clear(),xi.clear()}function ki(t){if(0===Ni.size)return t;var e=function(t){for(var e=[],n=null,r=0;r<t.nodes.length;r++){var i=t.nodes[r];1&i.flags&&(n=i),n&&3840&i.flags&&Ni.has(i.provider.token)&&(e.push(n.nodeIndex),n=null)}return e}(t);if(0===e.length)return t;t=t.factory(function(){return on});for(var n=0;n<e.length;n++)r(t,e[n]);return t;function r(t,e){for(var n=e+1;n<t.nodes.length;n++){var r=t.nodes[n];if(1&r.flags)return;if(3840&r.flags){var i=r.provider,o=Ni.get(i.token);o&&(r.flags=-3841&r.flags|o.flags,i.deps=Tn(o.deps),i.value=o.value)}}}}function Di(t,e,n,r,i,o,s,a,u,c,l,h,p){var f=t.def.nodes[e];return li(t,f,n,r,i,o,s,a,u,c,l,h,p),224&f.flags?Ze(t,e).value:void 0}function ji(t,e,n,r,i,o,s,a,u,c,l,h,p){var f=t.def.nodes[e];return pi(t,f,n,r,i,o,s,a,u,c,l,h,p),224&f.flags?Ze(t,e).value:void 0}function Mi(t){return eo(Wi.detectChanges,ci,null,[t])}function Li(t){return eo(Wi.checkNoChanges,ui,null,[t])}function Fi(t){return eo(Wi.destroy,di,null,[t])}var Vi,Ui,Bi,Wi=function(){var t={create:0,detectChanges:1,checkNoChanges:2,destroy:3,handleEvent:4};return t[t.create]="create",t[t.detectChanges]="detectChanges",t[t.checkNoChanges]="checkNoChanges",t[t.destroy]="destroy",t[t.handleEvent]="handleEvent",t}();function qi(t,e){Ui=t,Bi=e}function Hi(t,e,n,r){return qi(t,e),eo(Wi.handleEvent,t.def.handleEvent,null,[t,e,n,r])}function Gi(t,e){if(128&t.state)throw rn(Wi[Vi]);return qi(t,Yi(t,0)),t.def.updateDirectives(function(t,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=t.def.nodes[n];return 0===e?Ki(t,s,r,i):Ji(t,s,r,i),16384&s.flags&&qi(t,Yi(t,n)),224&s.flags?Ze(t,s.nodeIndex).value:void 0},t)}function zi(t,e){if(128&t.state)throw rn(Wi[Vi]);return qi(t,Zi(t,0)),t.def.updateRenderer(function(t,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=t.def.nodes[n];return 0===e?Ki(t,s,r,i):Ji(t,s,r,i),3&s.flags&&qi(t,Zi(t,n)),224&s.flags?Ze(t,s.nodeIndex).value:void 0},t)}function Ki(t,e,n,r){if(li.apply(void 0,[t,e,n].concat(r))){var i=1===n?r[0]:r;if(16384&e.flags){for(var o={},s=0;s<e.bindings.length;s++){var a=e.bindings[s],u=i[s];8&a.flags&&(o[(p=a.nonMinifiedName,"ng-reflect-"+(p=p.replace(/[$@]/g,"_").replace(Xi,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"-"+t[1].toLowerCase()})))]=Qi(u))}var c=e.parent,l=Qe(t,c.nodeIndex).renderElement;if(c.element.name)for(var h in o)null!=(u=o[h])?t.renderer.setAttribute(l,h,u):t.renderer.removeAttribute(l,h);else t.renderer.setValue(l,"bindings="+JSON.stringify(o,null,2))}}var p}function Ji(t,e,n,r){pi.apply(void 0,[t,e,n].concat(r))}var Xi=/([A-Z])/g;function Qi(t){try{return null!=t?t.toString().slice(0,30):t}catch(t){return"[ERROR] Exception while trying to serialize the value"}}function Yi(t,e){for(var n=e;n<t.def.nodes.length;n++){var r=t.def.nodes[n];if(16384&r.flags&&r.bindings&&r.bindings.length)return n}return null}function Zi(t,e){for(var n=e;n<t.def.nodes.length;n++){var r=t.def.nodes[n];if(3&r.flags&&r.bindings&&r.bindings.length)return n}return null}var $i=function(){function t(t,e){this.view=t,this.nodeIndex=e,null==e&&(this.nodeIndex=e=0),this.nodeDef=t.def.nodes[e];for(var n=this.nodeDef,r=t;n&&0==(1&n.flags);)n=n.parent;if(!n)for(;!n&&r;)n=mn(r),r=r.parent;this.elDef=n,this.elView=r}return Object.defineProperty(t.prototype,"elOrCompView",{get:function(){return Qe(this.elView,this.elDef.nodeIndex).componentView||this.view},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return fr(this.elView,this.elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){return this.elOrCompView.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this.elOrCompView.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){var t=[];if(this.elDef)for(var e=this.elDef.nodeIndex+1;e<=this.elDef.nodeIndex+this.elDef.childCount;e++){var n=this.elView.def.nodes[e];20224&n.flags&&t.push(n.provider.token),e+=n.childCount}return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){var t={};if(this.elDef){to(this.elView,this.elDef,t);for(var e=this.elDef.nodeIndex+1;e<=this.elDef.nodeIndex+this.elDef.childCount;e++){var n=this.elView.def.nodes[e];20224&n.flags&&to(this.elView,n,t),e+=n.childCount}}return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentRenderElement",{get:function(){var t=function(t){for(;t&&!wn(t);)t=t.parent;return t.parent?Qe(t.parent,mn(t).nodeIndex):null}(this.elOrCompView);return t?t.renderElement:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderNode",{get:function(){return 2&this.nodeDef.flags?bn(this.view,this.nodeDef):bn(this.elView,this.elDef)},enumerable:!0,configurable:!0}),t.prototype.logError=function(t){for(var e,n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];2&this.nodeDef.flags?(e=this.view.def,n=this.nodeDef.nodeIndex):(e=this.elView.def,n=this.elDef.nodeIndex);var o=function(t,e){for(var n=-1,r=0;r<=e;r++)3&t.nodes[r].flags&&n++;return n}(e,n),s=-1;e.factory(function(){return++s===o?(e=t.error).bind.apply(e,[t].concat(r)):on;var e}),s<o&&(t.error("Illegal state: the ViewDefinitionFactory did not call the logger!"),t.error.apply(t,r))},t}();function to(t,e,n){for(var r in e.references)n[r]=Kr(t,e,e.references[r])}function eo(t,e,n,r){var i=Vi,o=Ui,s=Bi;try{Vi=t;var a=e.apply(n,r);return Ui=o,Bi=s,Vi=i,a}catch(t){if(X(t)||!Ui)throw t;throw function(t,e){return t instanceof Error||(t=new Error(t.toString())),nn(t,e),t}(t,no())}}function no(){return Ui?new $i(Ui,Bi):null}var ro=function(){function t(t){this.delegate=t}return t.prototype.createRenderer=function(t,e){return new io(this.delegate.createRenderer(t,e))},t.prototype.begin=function(){this.delegate.begin&&this.delegate.begin()},t.prototype.end=function(){this.delegate.end&&this.delegate.end()},t.prototype.whenRenderingDone=function(){return this.delegate.whenRenderingDone?this.delegate.whenRenderingDone():Promise.resolve(null)},t}(),io=function(){function t(t){this.delegate=t,this.data=this.delegate.data}return t.prototype.destroyNode=function(t){!function(t){ye.delete(t.nativeNode)}(ge(t)),this.delegate.destroyNode&&this.delegate.destroyNode(t)},t.prototype.destroy=function(){this.delegate.destroy()},t.prototype.createElement=function(t,e){var n=this.delegate.createElement(t,e),r=no();if(r){var i=new fe(n,null,r);i.name=t,_e(i)}return n},t.prototype.createComment=function(t){var e=this.delegate.createComment(t),n=no();return n&&_e(new pe(e,null,n)),e},t.prototype.createText=function(t){var e=this.delegate.createText(t),n=no();return n&&_e(new pe(e,null,n)),e},t.prototype.appendChild=function(t,e){var n=ge(t),r=ge(e);n&&r&&n instanceof fe&&n.addChild(r),this.delegate.appendChild(t,e)},t.prototype.insertBefore=function(t,e,n){var r=ge(t),i=ge(e),o=ge(n);r&&i&&r instanceof fe&&r.insertBefore(o,i),this.delegate.insertBefore(t,e,n)},t.prototype.removeChild=function(t,e){var n=ge(t),r=ge(e);n&&r&&n instanceof fe&&n.removeChild(r),this.delegate.removeChild(t,e)},t.prototype.selectRootElement=function(t){var e=this.delegate.selectRootElement(t),n=no();return n&&_e(new fe(e,null,n)),e},t.prototype.setAttribute=function(t,e,n,r){var i=ge(t);i&&i instanceof fe&&(i.attributes[r?r+":"+e:e]=n),this.delegate.setAttribute(t,e,n,r)},t.prototype.removeAttribute=function(t,e,n){var r=ge(t);r&&r instanceof fe&&(r.attributes[n?n+":"+e:e]=null),this.delegate.removeAttribute(t,e,n)},t.prototype.addClass=function(t,e){var n=ge(t);n&&n instanceof fe&&(n.classes[e]=!0),this.delegate.addClass(t,e)},t.prototype.removeClass=function(t,e){var n=ge(t);n&&n instanceof fe&&(n.classes[e]=!1),this.delegate.removeClass(t,e)},t.prototype.setStyle=function(t,e,n,r){var i=ge(t);i&&i instanceof fe&&(i.styles[e]=n),this.delegate.setStyle(t,e,n,r)},t.prototype.removeStyle=function(t,e,n){var r=ge(t);r&&r instanceof fe&&(r.styles[e]=null),this.delegate.removeStyle(t,e,n)},t.prototype.setProperty=function(t,e,n){var r=ge(t);r&&r instanceof fe&&(r.properties[e]=n),this.delegate.setProperty(t,e,n)},t.prototype.listen=function(t,e,n){if("string"!=typeof t){var r=ge(t);r&&r.listeners.push(new function(t,e){this.name=t,this.callback=e}(e,n))}return this.delegate.listen(t,e,n)},t.prototype.parentNode=function(t){return this.delegate.parentNode(t)},t.prototype.nextSibling=function(t){return this.delegate.nextSibling(t)},t.prototype.setValue=function(t,e){return this.delegate.setValue(t,e)},t}();function oo(t,e,n){return new ao(t,e,n)}var so,ao=function(t){function e(e,n,r){var i=t.call(this)||this;return i.moduleType=e,i._bootstrapComponents=n,i._ngModuleDefFactory=r,i}return Object(r.__extends)(e,t),e.prototype.create=function(t){!function(){if(!wi){wi=!0;var t=Gt()?{setCurrentNode:qi,createRootView:Ci,createEmbeddedView:Ti,createComponentView:Oi,createNgModuleRef:Ii,overrideProvider:Ai,overrideComponentView:Pi,clearOverrides:Ri,checkAndUpdateView:Mi,checkNoChangesView:Li,destroyView:Fi,createDebugContext:function(t,e){return new $i(t,e)},handleEvent:Hi,updateDirectives:Gi,updateRenderer:zi}:{setCurrentNode:function(){},createRootView:Ei,createEmbeddedView:ni,createComponentView:ii,createNgModuleRef:_r,overrideProvider:on,overrideComponentView:on,clearOverrides:on,checkAndUpdateView:ci,checkNoChangesView:ui,destroyView:di,createDebugContext:function(t,e){return new $i(t,e)},handleEvent:function(t,e,n,r){return t.def.handleEvent(t,e,n,r)},updateDirectives:function(t,e){return t.def.updateDirectives(0===e?Di:ji,t)},updateRenderer:function(t,e){return t.def.updateRenderer(0===e?Di:ji,t)}};tn.setCurrentNode=t.setCurrentNode,tn.createRootView=t.createRootView,tn.createEmbeddedView=t.createEmbeddedView,tn.createComponentView=t.createComponentView,tn.createNgModuleRef=t.createNgModuleRef,tn.overrideProvider=t.overrideProvider,tn.overrideComponentView=t.overrideComponentView,tn.clearOverrides=t.clearOverrides,tn.checkAndUpdateView=t.checkAndUpdateView,tn.checkNoChangesView=t.checkNoChangesView,tn.destroyView=t.destroyView,tn.resolveDep=Lr,tn.createDebugContext=t.createDebugContext,tn.handleEvent=t.handleEvent,tn.updateDirectives=t.updateDirectives,tn.updateRenderer=t.updateRenderer,tn.dirtyParentQueries=Hr}}();var e=Nn(this._ngModuleDefFactory);return tn.createNgModuleRef(this.moduleType,t||R.NULL,this._bootstrapComponents,e)},e}(Ct);"undefined"==typeof ngDevMode&&("undefined"!=typeof window&&(window.ngDevMode=!0),"undefined"!=typeof self&&(self.ngDevMode=!0),"undefined"!=typeof t&&(t.ngDevMode=!0)),so=function(t,e,n){return{parent:so,id:null,node:null,data:[],ngStaticData:[],cleanup:null,renderer:null,child:null,tail:null,next:null,bindingStartIndex:null,creationMode:!0,viewHookStartIndex:null}}()}).call(e,n("fRUx"))},LaOa:function(t,e,n){"use strict";e.a=function(t,e){return function(n){return n.lift(new o(t,e))}};var r=n("6Xbx"),i=n("E9/g"),o=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.thisArg))},t}(),s=function(t){function e(e,n,r){t.call(this,e),this.predicate=n,this.thisArg=r,this.count=0}return Object(r.__extends)(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(i.a)},NGRF:function(t,e,n){"use strict";e.a=function(t){return null!=t&&"object"==typeof t}},NYZW:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("e9+7"),i=n("WH8D");e.decode=function(t){var e={},n={},o={},s="";try{var a=t.split(".");e=i.jsonEval(r.base64Decode(a[0])||""),n=i.jsonEval(r.base64Decode(a[1])||""),s=a[2],o=n.d||{},delete n.d}catch(t){}return{header:e,claims:n,data:o,signature:s}},e.isValidTimestamp=function(t){var n,r,i=e.decode(t).claims,o=Math.floor((new Date).getTime()/1e3);return"object"==typeof i&&(i.hasOwnProperty("nbf")?n=i.nbf:i.hasOwnProperty("iat")&&(n=i.iat),r=i.hasOwnProperty("exp")?i.exp:n+86400),o&&n&&r&&o>=n&&o<=r},e.issuedAtTime=function(t){var n=e.decode(t).claims;return"object"==typeof n&&n.hasOwnProperty("iat")?n.iat:null},e.isValidFormat=function(t){var n=e.decode(t),r=n.claims;return!!n.signature&&!!r&&"object"==typeof r&&r.hasOwnProperty("iat")},e.isAdmin=function(t){var n=e.decode(t).claims;return"object"==typeof n&&!0===n.admin}},NeHU:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("/ygB");e.querystring=function(t){var e=[];return r.forEach(t,function(t,n){Array.isArray(n)?n.forEach(function(n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}),e.length?"&"+e.join("&"):""},e.querystringDecode=function(t){var e={};return t.replace(/^\?/,"").split("&").forEach(function(t){if(t){var n=t.split("=");e[n[0]]=n[1]}}),e}},NePw:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r={e:{}}},Nq7v:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("6Xbx"),i=n("GboV"),o=n("p+VM"),s=n("F1yO"),a=n("43Go"),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.compare=function(t,e){var n=t.node.compareTo(e.node);return 0===n?s.nameCompare(t.name,e.name):n},e.prototype.isDefinedOn=function(t){return!0},e.prototype.indexedValueChanged=function(t,e){return!t.equals(e)},e.prototype.minPost=function(){return o.NamedNode.MIN},e.prototype.maxPost=function(){return o.NamedNode.MAX},e.prototype.makePost=function(t,e){var n=a.nodeFromJSON(t);return new o.NamedNode(e,n)},e.prototype.toString=function(){return".value"},e}(i.Index);e.ValueIndex=u,e.VALUE_INDEX=new u},"O/TX":function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(){function t(t){this._el=t,this.isOpen=!1}return Object.defineProperty(t.prototype,"opened",{get:function(){return this.isOpen},enumerable:!0,configurable:!0}),t.prototype.open=function(){this.isOpen=!0,this._el.nativeElement.querySelector(".dropdown-menu").classList.add("show")},t.prototype.close=function(t){this._el.nativeElement.contains(t)||(this.isOpen=!1,this._el.nativeElement.querySelector(".dropdown-menu").classList.remove("show"))},t}()},Oryw:function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n("6Xbx"),i=n("AP4T"),o=n("8Ut3"),s=n("Ecq+"),a=n("3iOE"),u=function(t){function e(e,n){t.call(this),this.array=e,this.scheduler=n,n||1!==e.length||(this._isScalar=!0,this.value=e[0])}return Object(r.__extends)(e,t),e.create=function(t,n){return new e(t,n)},e.of=function(){for(var t=[],n=0;n<arguments.length;n++)t[n-0]=arguments[n];var r=t[t.length-1];Object(a.a)(r)?t.pop():r=null;var i=t.length;return i>1?new e(t,r):1===i?new o.a(t[0],r):new s.a(r)},e.dispatch=function(t){var e=t.array,n=t.index,r=t.subscriber;n>=t.count?r.complete():(r.next(e[n]),r.closed||(t.index=n+1,this.schedule(t)))},e.prototype._subscribe=function(t){var n=this.array,r=n.length,i=this.scheduler;if(i)return i.schedule(e.dispatch,0,{array:n,index:0,count:r,subscriber:t});for(var o=0;o<r&&!t.closed;o++)t.next(n[o]);t.complete()},e}(i.a)},OzfH:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("6Xbx"),o=n("JEJ4"),s={AVAILABLE_IN_WINDOW:"only-available-in-window",AVAILABLE_IN_SW:"only-available-in-sw",SHOULD_BE_INHERITED:"should-be-overriden",BAD_SENDER_ID:"bad-sender-id",INCORRECT_GCM_SENDER_ID:"incorrect-gcm-sender-id",PERMISSION_DEFAULT:"permission-default",PERMISSION_BLOCKED:"permission-blocked",UNSUPPORTED_BROWSER:"unsupported-browser",NOTIFICATIONS_BLOCKED:"notifications-blocked",FAILED_DEFAULT_REGISTRATION:"failed-serviceworker-registration",SW_REGISTRATION_EXPECTED:"sw-registration-expected",GET_SUBSCRIPTION_FAILED:"get-subscription-failed",INVALID_SAVED_TOKEN:"invalid-saved-token",SW_REG_REDUNDANT:"sw-reg-redundant",TOKEN_SUBSCRIBE_FAILED:"token-subscribe-failed",TOKEN_SUBSCRIBE_NO_TOKEN:"token-subscribe-no-token",TOKEN_SUBSCRIBE_NO_PUSH_SET:"token-subscribe-no-push-set",TOKEN_UNSUBSCRIBE_FAILED:"token-unsubscribe-failed",TOKEN_UPDATE_FAILED:"token-update-failed",TOKEN_UPDATE_NO_TOKEN:"token-update-no-token",USE_SW_BEFORE_GET_TOKEN:"use-sw-before-get-token",INVALID_DELETE_TOKEN:"invalid-delete-token",DELETE_TOKEN_NOT_FOUND:"delete-token-not-found",DELETE_SCOPE_NOT_FOUND:"delete-scope-not-found",BG_HANDLER_FUNCTION_EXPECTED:"bg-handler-function-expected",NO_WINDOW_CLIENT_TO_MSG:"no-window-client-to-msg",UNABLE_TO_RESUBSCRIBE:"unable-to-resubscribe",NO_FCM_TOKEN_FOR_RESUBSCRIBE:"no-fcm-token-for-resubscribe",FAILED_TO_DELETE_TOKEN:"failed-to-delete-token",NO_SW_IN_REG:"no-sw-in-reg",BAD_SCOPE:"bad-scope",BAD_VAPID_KEY:"bad-vapid-key",BAD_SUBSCRIPTION:"bad-subscription",BAD_TOKEN:"bad-token",BAD_PUSH_SET:"bad-push-set",FAILED_DELETE_VAPID_KEY:"failed-delete-vapid-key",INVALID_PUBLIC_VAPID_KEY:"invalid-public-vapid-key",USE_PUBLIC_KEY_BEFORE_GET_TOKEN:"use-public-key-before-get-token",PUBLIC_KEY_DECRYPTION_FAILED:"public-vapid-key-decryption-failed"},a={codes:s,map:((r={})[s.AVAILABLE_IN_WINDOW]="This method is available in a Window context.",r[s.AVAILABLE_IN_SW]="This method is available in a service worker context.",r[s.SHOULD_BE_INHERITED]="This method should be overriden by extended classes.",r[s.BAD_SENDER_ID]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",r[s.PERMISSION_DEFAULT]="The required permissions were not granted and dismissed instead.",r[s.PERMISSION_BLOCKED]="The required permissions were not granted and blocked instead.",r[s.UNSUPPORTED_BROWSER]="This browser doesn't support the API's required to use the firebase SDK.",r[s.NOTIFICATIONS_BLOCKED]="Notifications have been blocked.",r[s.FAILED_DEFAULT_REGISTRATION]="We are unable to register the default service worker. {$browserErrorMessage}",r[s.SW_REGISTRATION_EXPECTED]="A service worker registration was the expected input.",r[s.GET_SUBSCRIPTION_FAILED]="There was an error when trying to get any existing Push Subscriptions.",r[s.INVALID_SAVED_TOKEN]="Unable to access details of the saved token.",r[s.SW_REG_REDUNDANT]="The service worker being used for push was made redundant.",r[s.TOKEN_SUBSCRIBE_FAILED]="A problem occured while subscribing the user to FCM: {$message}",r[s.TOKEN_SUBSCRIBE_NO_TOKEN]="FCM returned no token when subscribing the user to push.",r[s.TOKEN_SUBSCRIBE_NO_PUSH_SET]="FCM returned an invalid response when getting an FCM token.",r[s.TOKEN_UNSUBSCRIBE_FAILED]="A problem occured while unsubscribing the user from FCM: {$message}",r[s.TOKEN_UPDATE_FAILED]="A problem occured while updating the user from FCM: {$message}",r[s.TOKEN_UPDATE_NO_TOKEN]="FCM returned no token when updating the user to push.",r[s.USE_SW_BEFORE_GET_TOKEN]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",r[s.INVALID_DELETE_TOKEN]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",r[s.DELETE_TOKEN_NOT_FOUND]="The deletion attempt for token could not be performed as the token was not found.",r[s.DELETE_SCOPE_NOT_FOUND]="The deletion attempt for service worker scope could not be performed as the scope was not found.",r[s.BG_HANDLER_FUNCTION_EXPECTED]="The input to setBackgroundMessageHandler() must be a function.",r[s.NO_WINDOW_CLIENT_TO_MSG]="An attempt was made to message a non-existant window client.",r[s.UNABLE_TO_RESUBSCRIBE]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}",r[s.NO_FCM_TOKEN_FOR_RESUBSCRIBE]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",r[s.FAILED_TO_DELETE_TOKEN]="Unable to delete the currently saved token.",r[s.NO_SW_IN_REG]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",r[s.INCORRECT_GCM_SENDER_ID]="Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.",r[s.BAD_SCOPE]="The service worker scope must be a string with at least one character.",r[s.BAD_VAPID_KEY]="The public VAPID key is not a Uint8Array with 65 bytes.",r[s.BAD_SUBSCRIPTION]="The subscription must be a valid PushSubscription.",r[s.BAD_TOKEN]="The FCM Token used for storage / lookup was not a valid token string.",r[s.BAD_PUSH_SET]="The FCM push set used for storage / lookup was not not a valid push set string.",r[s.FAILED_DELETE_VAPID_KEY]="The VAPID key could not be deleted.",r[s.INVALID_PUBLIC_VAPID_KEY]="The public VAPID key must be a string.",r[s.PUBLIC_KEY_DECRYPTION_FAILED]="The public VAPID key did not equal 65 bytes when decrypted.",r)},u=function(){function t(t,e){this.errorFactory_=new o.ErrorFactory("messaging","Messaging",a.map),this.DB_NAME_=t,this.dbVersion_=e,this.openDbPromise_=null,this.TRANSACTION_READ_WRITE="readwrite"}return t.prototype.openDatabase=function(){var t=this;return this.openDbPromise_?this.openDbPromise_:(this.openDbPromise_=new Promise(function(e,n){var r=indexedDB.open(t.DB_NAME_,t.dbVersion_);r.onerror=function(t){n(t.target.error)},r.onsuccess=function(t){e(t.target.result)},r.onupgradeneeded=function(e){try{var r=e.target.result;t.onDBUpgrade(r,e)}catch(t){r.close(),n(t)}}}),this.openDbPromise_)},t.prototype.closeDatabase=function(){var t=this;return Promise.resolve().then(function(){if(t.openDbPromise_)return t.openDbPromise_.then(function(e){e.close(),t.openDbPromise_=null})})},t.prototype.onDBUpgrade=function(t,e){throw this.errorFactory_.create(a.codes.SHOULD_BE_INHERITED)},t}(),c=function(t){return function(t){var e=new Uint8Array(t);return window.btoa(String.fromCharCode.apply(null,e))}(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},l=new Uint8Array([4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110]),h={DEFAULT_PUBLIC_VAPID_KEY:l,SUBSCRIPTION_DETAILS:{userVisibleOnly:!0,applicationServerKey:l},ENDPOINT:"https://fcm.googleapis.com"},p=function(){function t(){this.errorFactory_=new o.ErrorFactory("messaging","Messaging",a.map)}return t.prototype.getToken=function(t,e,n){var r=this,i=c(e.getKey("p256dh")),o=c(e.getKey("auth")),s="authorized_entity="+t+"&endpoint="+e.endpoint+"&encryption_key="+i+"&encryption_auth="+o;n!==h.DEFAULT_PUBLIC_VAPID_KEY&&(s+="&application_pub_key="+c(n));var u=new Headers;return u.append("Content-Type","application/x-www-form-urlencoded"),fetch(h.ENDPOINT+"/fcm/connect/subscribe",{method:"POST",headers:u,body:s}).then(function(t){return t.json()}).catch(function(){throw r.errorFactory_.create(a.codes.TOKEN_SUBSCRIBE_FAILED)}).then(function(t){var e=t;if(e.error)throw r.errorFactory_.create(a.codes.TOKEN_SUBSCRIBE_FAILED,{message:e.error.message});if(!e.token)throw r.errorFactory_.create(a.codes.TOKEN_SUBSCRIBE_NO_TOKEN);if(!e.pushSet)throw r.errorFactory_.create(a.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);return{token:e.token,pushSet:e.pushSet}})},t.prototype.updateToken=function(t,e,n,r,i){var o=this,s=c(r.getKey("p256dh")),u=c(r.getKey("auth")),l="push_set="+n+"&token="+e+"&authorized_entity="+t+"&endpoint="+r.endpoint+"&encryption_key="+s+"&encryption_auth="+u;i!==h.DEFAULT_PUBLIC_VAPID_KEY&&(l+="&application_pub_key="+c(i));var p,f=new Headers;return f.append("Content-Type","application/x-www-form-urlencoded"),fetch(h.ENDPOINT+"/fcm/connect/subscribe",{method:"POST",headers:f,body:l}).then(function(t){return p=t,t.json()}).catch(function(){throw o.errorFactory_.create(a.codes.TOKEN_UPDATE_FAILED)}).then(function(t){if(!p.ok)throw o.errorFactory_.create(a.codes.TOKEN_UPDATE_FAILED,{message:t.error.message});if(!t.token)throw o.errorFactory_.create(a.codes.TOKEN_UPDATE_NO_TOKEN);return t.token})},t.prototype.deleteToken=function(t,e,n){var r=this,i="authorized_entity="+t+"&token="+e+"&pushSet="+n,o=new Headers;return o.append("Content-Type","application/x-www-form-urlencoded"),fetch(h.ENDPOINT+"/fcm/connect/unsubscribe",{method:"POST",headers:o,body:i}).then(function(t){if(!t.ok)return t.json().then(function(t){if(t.error)throw r.errorFactory_.create(a.codes.TOKEN_UNSUBSCRIBE_FAILED,{message:t.error.message})},function(t){throw r.errorFactory_.create(a.codes.TOKEN_UNSUBSCRIBE_FAILED)})})},t}(),f="fcm_token_details_db",d=2,v=function(t){function e(){return t.call(this,f,d)||this}return i.__extends(e,t),e.prototype.onDBUpgrade=function(t,e){if(e.oldVersion<1){var n=t.createObjectStore("fcm_token_object_Store",{keyPath:"swScope"});n.createIndex("fcmSenderId","fcmSenderId",{unique:!1}),n.createIndex("fcmToken","fcmToken",{unique:!0})}var r;e.oldVersion<2&&((r=indexedDB.open("undefined")).onerror=function(t){},r.onsuccess=function(t){!function(t){if(t.objectStoreNames.contains("fcm_token_object_Store")){var e=t.transaction("fcm_token_object_Store").objectStore("fcm_token_object_Store"),n=new p,r=e.openCursor();r.onerror=function(t){console.warn("Unable to cleanup old IDB.",t)},r.onsuccess=function(){var e=r.result;if(e){var i=e.value;n.deleteToken(i.fcmSenderId,i.fcmToken,i.fcmPushSet),e.continue()}else t.close(),indexedDB.deleteDatabase("undefined")}}}(r.result)})},e.prototype.validateInputs_=function(t){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(e){return!t.fcmToken||"string"==typeof t.fcmToken&&0!==t.fcmToken.length?!t.swScope||"string"==typeof t.swScope&&0!==t.swScope.length?!t.vapidKey||t.vapidKey instanceof Uint8Array&&65===t.vapidKey.length?!t.subscription||t.subscription instanceof PushSubscription?!t.fcmSenderId||"string"==typeof t.fcmSenderId&&0!==t.fcmSenderId.length?!t.fcmPushSet||"string"==typeof t.fcmPushSet&&0!==t.fcmPushSet.length?[2]:[2,Promise.reject(this.errorFactory_.create(a.codes.BAD_PUSH_SET))]:[2,Promise.reject(this.errorFactory_.create(a.codes.BAD_SENDER_ID))]:[2,Promise.reject(this.errorFactory_.create(a.codes.BAD_SUBSCRIPTION))]:[2,Promise.reject(this.errorFactory_.create(a.codes.BAD_VAPID_KEY))]:[2,Promise.reject(this.errorFactory_.create(a.codes.BAD_SCOPE))]:[2,Promise.reject(this.errorFactory_.create(a.codes.BAD_TOKEN))]})})},e.prototype.getTokenDetailsFromToken=function(t){var e=this;return t?this.validateInputs_({fcmToken:t}).then(function(){return e.openDatabase()}).then(function(e){return new Promise(function(n,r){var i=e.transaction(["fcm_token_object_Store"]).objectStore("fcm_token_object_Store").index("fcmToken").get(t);i.onerror=function(t){r(t.target.error)},i.onsuccess=function(t){n(t.target.result?t.target.result:null)}})}):Promise.reject(this.errorFactory_.create(a.codes.BAD_TOKEN))},e.prototype.getTokenDetailsFromSWScope=function(t){var e=this;return t?this.validateInputs_({swScope:t}).then(function(){return e.openDatabase()}).then(function(e){return new Promise(function(n,r){var i=e.transaction(["fcm_token_object_Store"]).objectStore("fcm_token_object_Store").get(t);i.onerror=function(t){r(t.target.error)},i.onsuccess=function(t){n(t.target.result?t.target.result:null)}})}):Promise.reject(this.errorFactory_.create(a.codes.BAD_SCOPE))},e.prototype.saveTokenDetails=function(t){var e=this,n=t.swScope,r=t.vapidKey,i=t.subscription,o=t.fcmSenderId,s=t.fcmToken,u=t.fcmPushSet;return n?r?i?o?s?u?this.validateInputs_({swScope:n,vapidKey:r,subscription:i,fcmSenderId:o,fcmToken:s,fcmPushSet:u}).then(function(){return e.openDatabase()}).then(function(t){var a={swScope:n,vapidKey:c(r),endpoint:i.endpoint,auth:c(i.getKey("auth")),p256dh:c(i.getKey("p256dh")),fcmSenderId:o,fcmToken:s,fcmPushSet:u,createTime:Date.now()};return new Promise(function(n,r){var i=t.transaction(["fcm_token_object_Store"],e.TRANSACTION_READ_WRITE).objectStore("fcm_token_object_Store").put(a);i.onerror=function(t){r(t.target.error)},i.onsuccess=function(t){n()}})}):Promise.reject(this.errorFactory_.create(a.codes.BAD_PUSH_SET)):Promise.reject(this.errorFactory_.create(a.codes.BAD_TOKEN)):Promise.reject(this.errorFactory_.create(a.codes.BAD_SENDER_ID)):Promise.reject(this.errorFactory_.create(a.codes.BAD_SUBSCRIPTION)):Promise.reject(this.errorFactory_.create(a.codes.BAD_VAPID_KEY)):Promise.reject(this.errorFactory_.create(a.codes.BAD_SCOPE))},e.prototype.deleteToken=function(t){var e=this;return"string"!=typeof t||0===t.length?Promise.reject(this.errorFactory_.create(a.codes.INVALID_DELETE_TOKEN)):this.getTokenDetailsFromToken(t).then(function(t){if(!t)throw e.errorFactory_.create(a.codes.DELETE_TOKEN_NOT_FOUND);return e.openDatabase().then(function(n){return new Promise(function(r,i){var o=n.transaction(["fcm_token_object_Store"],e.TRANSACTION_READ_WRITE).objectStore("fcm_token_object_Store").delete(t.swScope);o.onerror=function(t){i(t.target.error)},o.onsuccess=function(n){0!==n.target.result?r(t):i(e.errorFactory_.create(a.codes.FAILED_TO_DELETE_TOKEN))}})})})},e}(u),y="fcm_vapid_details_db",g=1,_=function(t){function e(){return t.call(this,y,g)||this}return i.__extends(e,t),e.prototype.onDBUpgrade=function(t){t.createObjectStore("fcm_vapid_object_Store",{keyPath:"swScope"})},e.prototype.getVapidFromSWScope=function(t){return"string"!=typeof t||0===t.length?Promise.reject(this.errorFactory_.create(a.codes.BAD_SCOPE)):this.openDatabase().then(function(e){return new Promise(function(n,r){var i=e.transaction(["fcm_vapid_object_Store"]).objectStore("fcm_vapid_object_Store").get(t);i.onerror=function(){r(i.error)},i.onsuccess=function(){var t=i.result,e=null;t&&(e=t.vapidKey),n(e)}})})},e.prototype.saveVapidDetails=function(t,e){var n=this;if("string"!=typeof t||0===t.length)return Promise.reject(this.errorFactory_.create(a.codes.BAD_SCOPE));if(null===e||65!==e.length)return Promise.reject(this.errorFactory_.create(a.codes.BAD_VAPID_KEY));var r={swScope:t,vapidKey:e};return this.openDatabase().then(function(t){return new Promise(function(e,i){var o=t.transaction(["fcm_vapid_object_Store"],n.TRANSACTION_READ_WRITE).objectStore("fcm_vapid_object_Store").put(r);o.onerror=function(){i(o.error)},o.onsuccess=function(){e()}})})},e.prototype.deleteVapidDetails=function(t){var e=this;return this.getVapidFromSWScope(t).then(function(n){if(!n)throw e.errorFactory_.create(a.codes.DELETE_SCOPE_NOT_FOUND);return e.openDatabase().then(function(r){return new Promise(function(i,o){var s=r.transaction(["fcm_vapid_object_Store"],e.TRANSACTION_READ_WRITE).objectStore("fcm_vapid_object_Store").delete(t);s.onerror=function(){o(s.error)},s.onsuccess=function(){0!==s.result?i(n):o(e.errorFactory_.create(a.codes.FAILED_DELETE_VAPID_KEY))}})})})},e}(u),m="messagingSenderId",b=function(){function t(t){var e=this;if(this.errorFactory_=new o.ErrorFactory("messaging","Messaging",a.map),!t.options[m]||"string"!=typeof t.options[m])throw this.errorFactory_.create(a.codes.BAD_SENDER_ID);this.messagingSenderId_=t.options[m],this.tokenDetailsModel_=new v,this.vapidDetailsModel_=new _,this.iidModel_=new p,this.app=t,this.INTERNAL={},this.INTERNAL.delete=function(){return e.delete()}}return t.prototype.getToken=function(){return i.__awaiter(this,void 0,void 0,function(){var t,e,n,r,o;return i.__generator(this,function(i){switch(i.label){case 0:return"granted"!==(t=this.getNotificationPermission_())?"denied"===t?[2,Promise.reject(this.errorFactory_.create(a.codes.NOTIFICATIONS_BLOCKED))]:[2,Promise.resolve(null)]:[4,this.getSWRegistration_()];case 1:return e=i.sent(),[4,this.getPublicVapidKey_()];case 2:return n=i.sent(),[4,this.getPushSubscription(e,n)];case 3:return r=i.sent(),[4,this.tokenDetailsModel_.getTokenDetailsFromSWScope(e.scope)];case 4:return(o=i.sent())?[2,this.manageExistingToken(e,r,n,o)]:[2,this.getNewToken(e,r,n)]}})})},t.prototype.manageExistingToken=function(t,e,n,r){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(i){switch(i.label){case 0:return this.isTokenStillValid(e,n,r)?Date.now()<r.createTime+6048e5?[2,r.fcmToken]:[2,this.updateToken(t,e,n,r)]:[4,this.deleteToken(r.fcmToken)];case 1:return i.sent(),[2,this.getNewToken(t,e,n)]}})})},t.prototype.isTokenStillValid=function(t,e,n){return c(e)===n.vapidKey&&t.endpoint===n.endpoint&&c(t.getKey("auth"))===n.auth&&c(t.getKey("p256dh"))===n.p256dh},t.prototype.updateToken=function(t,e,n,r){return i.__awaiter(this,void 0,void 0,function(){var o,s;return i.__generator(this,function(i){switch(i.label){case 0:return i.trys.push([0,4,,6]),[4,this.iidModel_.updateToken(this.messagingSenderId_,r.fcmToken,r.fcmPushSet,e,n)];case 1:return o=i.sent(),[4,this.tokenDetailsModel_.saveTokenDetails({swScope:t.scope,vapidKey:n,subscription:e,fcmSenderId:this.messagingSenderId_,fcmToken:o,fcmPushSet:r.fcmPushSet})];case 2:return i.sent(),[4,this.vapidDetailsModel_.saveVapidDetails(t.scope,n)];case 3:return i.sent(),[2,o];case 4:return s=i.sent(),[4,this.deleteToken(r.fcmToken)];case 5:throw i.sent(),s;case 6:return[2]}})})},t.prototype.getNewToken=function(t,e,n){return i.__awaiter(this,void 0,void 0,function(){var r;return i.__generator(this,function(i){switch(i.label){case 0:return[4,this.iidModel_.getToken(this.messagingSenderId_,e,n)];case 1:return r=i.sent(),[4,this.tokenDetailsModel_.saveTokenDetails({swScope:t.scope,vapidKey:n,subscription:e,fcmSenderId:this.messagingSenderId_,fcmToken:r.token,fcmPushSet:r.pushSet})];case 2:return i.sent(),[4,this.vapidDetailsModel_.saveVapidDetails(t.scope,n)];case 3:return i.sent(),[2,r.token]}})})},t.prototype.deleteToken=function(t){var e=this;return this.tokenDetailsModel_.deleteToken(t).then(function(t){return e.iidModel_.deleteToken(t.fcmSenderId,t.fcmToken,t.fcmPushSet)}).then(function(){return e.getSWRegistration_().then(function(t){if(t)return t.pushManager.getSubscription()}).then(function(t){if(t)return t.unsubscribe()})})},t.prototype.getSWRegistration_=function(){throw this.errorFactory_.create(a.codes.SHOULD_BE_INHERITED)},t.prototype.getPublicVapidKey_=function(){throw this.errorFactory_.create(a.codes.SHOULD_BE_INHERITED)},t.prototype.requestPermission=function(){throw this.errorFactory_.create(a.codes.AVAILABLE_IN_WINDOW)},t.prototype.getPushSubscription=function(t,e){return t.pushManager.getSubscription().then(function(n){return n||t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:e})})},t.prototype.useServiceWorker=function(t){throw this.errorFactory_.create(a.codes.AVAILABLE_IN_WINDOW)},t.prototype.usePublicVapidKey=function(t){throw this.errorFactory_.create(a.codes.AVAILABLE_IN_WINDOW)},t.prototype.onMessage=function(t,e,n){throw this.errorFactory_.create(a.codes.AVAILABLE_IN_WINDOW)},t.prototype.onTokenRefresh=function(t,e,n){throw this.errorFactory_.create(a.codes.AVAILABLE_IN_WINDOW)},t.prototype.setBackgroundMessageHandler=function(t){throw this.errorFactory_.create(a.codes.AVAILABLE_IN_SW)},t.prototype.delete=function(){return Promise.all([this.tokenDetailsModel_.closeDatabase(),this.vapidDetailsModel_.closeDatabase()])},t.prototype.getNotificationPermission_=function(){return Notification.permission},t.prototype.getTokenDetailsModel=function(){return this.tokenDetailsModel_},t.prototype.getVapidDetailsModel=function(){return this.vapidDetailsModel_},t.prototype.getIIDModel=function(){return this.iidModel_},t}(),w={TYPE_OF_MSG:"firebase-messaging-msg-type",DATA:"firebase-messaging-msg-data"},E=w,C=function(t,e){var n;return(n={})[w.TYPE_OF_MSG]=t,n[w.DATA]=e,n},S=function(t){function e(e){var n=t.call(this,e)||this;return n.messageObserver_=null,n.onMessage_=Object(o.createSubscribe)(function(t){n.messageObserver_=t}),n.tokenRefreshObserver_=null,n.onTokenRefresh_=Object(o.createSubscribe)(function(t){n.tokenRefreshObserver_=t}),n.messageObserver_=null,n.onMessage_=Object(o.createSubscribe)(function(t){n.messageObserver_=t}),n.tokenRefreshObserver_=null,n.onTokenRefresh_=Object(o.createSubscribe)(function(t){n.tokenRefreshObserver_=t}),n.setupSWMessageListener_(),n}return i.__extends(e,t),e.prototype.getToken=function(){var e=this;return this.isSupported_()?this.manifestCheck_().then(function(){return t.prototype.getToken.call(e)}):Promise.reject(this.errorFactory_.create(a.codes.UNSUPPORTED_BROWSER))},e.prototype.manifestCheck_=function(){var t=this;if(this.manifestCheckPromise_)return this.manifestCheckPromise_;var e=document.querySelector('link[rel="manifest"]');return this.manifestCheckPromise_=e?fetch(e.href).then(function(t){return t.json()}).catch(function(){}).then(function(e){if(e&&e.gcm_sender_id&&"103953800507"!==e.gcm_sender_id)throw t.errorFactory_.create(a.codes.INCORRECT_GCM_SENDER_ID)}):Promise.resolve(),this.manifestCheckPromise_},e.prototype.requestPermission=function(){return i.__awaiter(this,void 0,void 0,function(){var t=this;return i.__generator(this,function(e){return"granted"===Notification.permission?[2]:[2,new Promise(function(e,n){var r=function(r){return"granted"===r?e():n(t.errorFactory_.create("denied"===r?a.codes.PERMISSION_BLOCKED:a.codes.PERMISSION_DEFAULT))},i=Notification.requestPermission(r);i&&i.then(r)})]})})},e.prototype.useServiceWorker=function(t){if(!(t instanceof ServiceWorkerRegistration))throw this.errorFactory_.create(a.codes.SW_REGISTRATION_EXPECTED);if("undefined"!=typeof this.registrationToUse_)throw this.errorFactory_.create(a.codes.USE_SW_BEFORE_GET_TOKEN);this.registrationToUse_=t},e.prototype.usePublicVapidKey=function(t){if("string"!=typeof t)throw this.errorFactory_.create(a.codes.INVALID_PUBLIC_VAPID_KEY);if("undefined"!=typeof this.publicVapidKeyToUse_)throw this.errorFactory_.create(a.codes.USE_PUBLIC_KEY_BEFORE_GET_TOKEN);var e=function(e){for(var n=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),r=window.atob(n),i=new Uint8Array(r.length),o=0;o<r.length;++o)i[o]=r.charCodeAt(o);return i}();if(65!==e.length)throw this.errorFactory_.create(a.codes.PUBLIC_KEY_DECRYPTION_FAILED);this.publicVapidKeyToUse_=e},e.prototype.onMessage=function(t,e,n){return this.onMessage_(t,e,n)},e.prototype.onTokenRefresh=function(t,e,n){return this.onTokenRefresh_(t,e,n)},e.prototype.waitForRegistrationToActivate_=function(t){var e=this,n=t.installing||t.waiting||t.active;return new Promise(function(r,i){if(n)if("activated"!==n.state)if("redundant"!==n.state){var o=function(){if("activated"===n.state)r(t);else{if("redundant"!==n.state)return;i(e.errorFactory_.create(a.codes.SW_REG_REDUNDANT))}n.removeEventListener("statechange",o)};n.addEventListener("statechange",o)}else i(e.errorFactory_.create(a.codes.SW_REG_REDUNDANT));else r(t);else i(e.errorFactory_.create(a.codes.NO_SW_IN_REG))})},e.prototype.getSWRegistration_=function(){var t=this;return this.registrationToUse_?this.waitForRegistrationToActivate_(this.registrationToUse_):(this.registrationToUse_=null,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}).catch(function(e){throw t.errorFactory_.create(a.codes.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:e.message})}).then(function(e){return t.waitForRegistrationToActivate_(e).then(function(){return t.registrationToUse_=e,e.update(),e})}))},e.prototype.getPublicVapidKey_=function(){return this.publicVapidKeyToUse_?Promise.resolve(this.publicVapidKeyToUse_):Promise.resolve(h.DEFAULT_PUBLIC_VAPID_KEY)},e.prototype.setupSWMessageListener_=function(){var t=this;"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",function(e){if(e.data&&e.data[E.TYPE_OF_MSG]){var n=e.data;switch(n[E.TYPE_OF_MSG]){case"push-msg-received":case"notification-clicked":t.messageObserver_&&t.messageObserver_.next(n[E.DATA])}}},!1)},e.prototype.isSupported_=function(){return"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")},e}(b),T=function(t){function e(e){var n=t.call(this,e)||this;return self.addEventListener("push",function(t){return n.onPush_(t)},!1),self.addEventListener("pushsubscriptionchange",function(t){return n.onSubChange_(t)},!1),self.addEventListener("notificationclick",function(t){return n.onNotificationClick_(t)},!1),n.bgMessageHandler_=null,n}return i.__extends(e,t),e.prototype.onPush_=function(t){var e,n=this;try{e=t.data.json()}catch(t){return}var r=this.hasVisibleClients_().then(function(t){if(t)return e.notification||n.bgMessageHandler_?n.sendMessageToWindowClients_(e):void 0;var r=n.getNotificationData_(e);if(r){var i=r.title||"";return n.getSWRegistration_().then(function(t){return t.showNotification(i,r)})}return n.bgMessageHandler_?n.bgMessageHandler_(e):void 0});t.waitUntil(r)},e.prototype.onSubChange_=function(t){var e=this,n=this.getSWRegistration_().then(function(t){return t.pushManager.getSubscription().then(function(t){}).catch(function(n){return e.getTokenDetailsModel().getTokenDetailsFromSWScope(t.scope).then(function(t){if(!t)throw n;return e.deleteToken(t.fcmToken).then(function(){throw n})})})}).catch(function(t){throw e.errorFactory_.create(a.codes.UNABLE_TO_RESUBSCRIBE,{message:t})});t.waitUntil(n)},e.prototype.onNotificationClick_=function(t){var e=this;if(t.notification&&t.notification.data&&t.notification.data.FCM_MSG){t.stopImmediatePropagation(),t.notification.close();var n=t.notification.data.FCM_MSG;if(n.notification){var r=n.notification.click_action;if(r){var i=this.getWindowClient_(r).then(function(t){return t?t.focus():self.clients.openWindow(r)}).then(function(t){if(t){delete n.notification;var r=C("notification-clicked",n);return e.attemptToMessageClient_(t,r)}});t.waitUntil(i)}}}},e.prototype.getNotificationData_=function(t){if(t&&"object"==typeof t.notification){var e,n=Object.assign({},t.notification);return n.data=((e={}).FCM_MSG=t,e),n}},e.prototype.setBackgroundMessageHandler=function(t){if(!t||"function"!=typeof t)throw this.errorFactory_.create(a.codes.BG_HANDLER_FUNCTION_EXPECTED);this.bgMessageHandler_=t},e.prototype.getWindowClient_=function(t){var e=new URL(t,self.location).href;return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(t){for(var n=null,r=0;r<t.length;r++)if(new URL(t[r].url,self.location).href===e){n=t[r];break}return n||null})},e.prototype.attemptToMessageClient_=function(t,e){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(n){return t?(t.postMessage(e),[2]):[2,Promise.reject(this.errorFactory_.create(a.codes.NO_WINDOW_CLIENT_TO_MSG))]})})},e.prototype.hasVisibleClients_=function(){return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(t){return t.some(function(t){return"visible"===t.visibilityState})})},e.prototype.sendMessageToWindowClients_=function(t){var e=this;return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(n){var r=C("push-msg-received",t);return Promise.all(n.map(function(t){return e.attemptToMessageClient_(t,r)}))})},e.prototype.getSWRegistration_=function(){return Promise.resolve(self.registration)},e.prototype.getPublicVapidKey_=function(){var t=this;return this.getSWRegistration_().then(function(e){return t.getVapidDetailsModel().getVapidFromSWScope(e.scope)}).then(function(t){return null===t?h.DEFAULT_PUBLIC_VAPID_KEY:t})},e}(b),O=n("XtH8");function I(t){t.INTERNAL.registerService("messaging",function(t){return self&&"ServiceWorkerGlobalScope"in self?new T(t):new S(t)},{Messaging:S})}e.registerMessaging=I,I(O.firebase)},PAZ8:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("AP4T"),i=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return r.a.of(this.value);case"E":return r.a.throw(this.error);case"C":return r.a.empty()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return"undefined"!=typeof e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}()},PKQO:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("fvGz"),i=n("mZoP"),o=n("F1yO");e.parseRepoInfo=function(t){var n=e.parseURL(t),s=n.subdomain;return"firebase"===n.domain&&o.fatal(n.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),s&&"undefined"!=s||"localhost"===n.domain||o.fatal("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),n.secure||o.warnIfPageIsSecure(),{repoInfo:new i.RepoInfo(n.host,n.secure,s,"ws"===n.scheme||"wss"===n.scheme),path:new r.Path(n.pathString)}},e.parseURL=function(t){var e="",n="",r="",i="",s=!0,a="https",u=443;if("string"==typeof t){var c=t.indexOf("//");c>=0&&(a=t.substring(0,c-1),t=t.substring(c+2));var l=t.indexOf("/");-1===l&&(l=t.length);var h=t.indexOf("?");-1===h&&(h=t.length),e=t.substring(0,Math.min(l,h)),l<h&&(i=function(e){for(var n="",r=t.substring(l,h).split("/"),i=0;i<r.length;i++)if(r[i].length>0){var o=r[i];try{o=decodeURIComponent(o.replace(/\+/g," "))}catch(t){}n+="/"+o}return n}());var p=function(t){var e={};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=t.split("&");n<r.length;n++){var i=r[n];if(0!==i.length){var s=i.split("=");2===s.length?e[decodeURIComponent(s[0])]=decodeURIComponent(s[1]):o.warn("Invalid query segment '"+i+"' in query '"+t+"'")}}return e}(t.substring(Math.min(t.length,h)));(c=e.indexOf(":"))>=0?(s="https"===a||"wss"===a,u=parseInt(e.substring(c+1),10)):c=t.length;var f=e.split(".");3===f.length?(n=f[1],r=f[0].toLowerCase()):2===f.length?n=f[0]:"localhost"===f[0].slice(0,c).toLowerCase()&&(n="localhost"),""===r&&"ns"in p&&(r=p.ns)}return{host:e,port:u,domain:n,subdomain:r,secure:s,scheme:a,pathString:i}}},"PR+T":function(t,e,n){"use strict";e.a=function(){}},R3TC:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("6Xbx"),o=n("JEJ4"),s=n("F1yO"),a=n("isNy"),u=n("p+VM"),c=n("3FiG"),l=n("/fob"),h=n("stu6"),p=n("b5Wm"),f=n("04zk"),d=n("zFzr"),v=function(){function t(t,e,n){this.children_=t,this.priorityNode_=e,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&c.validatePriorityNode(this.priorityNode_),this.children_.isEmpty()&&o.assert(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(t,"EMPTY_NODE",{get:function(){return r||(r=new t(new a.SortedMap(d.NAME_COMPARATOR),null,p.IndexMap.Default))},enumerable:!0,configurable:!0}),t.prototype.isLeafNode=function(){return!1},t.prototype.getPriority=function(){return this.priorityNode_||r},t.prototype.updatePriority=function(e){return this.children_.isEmpty()?this:new t(this.children_,e,this.indexMap_)},t.prototype.getImmediateChild=function(t){if(".priority"===t)return this.getPriority();var e=this.children_.get(t);return null===e?r:e},t.prototype.getChild=function(t){var e=t.getFront();return null===e?this:this.getImmediateChild(e).getChild(t.popFront())},t.prototype.hasChild=function(t){return null!==this.children_.get(t)},t.prototype.updateImmediateChild=function(e,n){if(o.assert(n,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(n);var i=new u.NamedNode(e,n),s=void 0,a=void 0;return n.isEmpty()?(s=this.children_.remove(e),a=this.indexMap_.removeFromIndexes(i,this.children_)):(s=this.children_.insert(e,n),a=this.indexMap_.addToIndexes(i,this.children_)),new t(s,s.isEmpty()?r:this.priorityNode_,a)},t.prototype.updateChild=function(t,e){var n=t.getFront();if(null===n)return e;o.assert(".priority"!==t.getFront()||1===t.getLength(),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(t.popFront(),e);return this.updateImmediateChild(n,r)},t.prototype.isEmpty=function(){return this.children_.isEmpty()},t.prototype.numChildren=function(){return this.children_.count()},t.prototype.val=function(e){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(l.PRIORITY_INDEX,function(s,a){n[s]=a.val(e),r++,o&&t.INTEGER_REGEXP_.test(s)?i=Math.max(i,Number(s)):o=!1}),!e&&o&&i<2*r){var s=[];for(var a in n)s[a]=n[a];return s}return e&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.getPriority().isEmpty()||(t+="priority:"+c.priorityHashText(this.getPriority().val())+":"),this.forEachChild(l.PRIORITY_INDEX,function(e,n){var r=n.hash();""!==r&&(t+=":"+e+":"+r)}),this.lazyHash_=""===t?"":s.sha1(t)}return this.lazyHash_},t.prototype.getPredecessorChildName=function(t,e,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new u.NamedNode(t,e));return i?i.name:null}return this.children_.getPredecessorKey(t)},t.prototype.getFirstChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.minKey();return n&&n.name}return this.children_.minKey()},t.prototype.getFirstChild=function(t){var e=this.getFirstChildName(t);return e?new u.NamedNode(e,this.children_.get(e)):null},t.prototype.getLastChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.maxKey();return n&&n.name}return this.children_.maxKey()},t.prototype.getLastChild=function(t){var e=this.getLastChildName(t);return e?new u.NamedNode(e,this.children_.get(e)):null},t.prototype.forEachChild=function(t,e){var n=this.resolveIndex_(t);return n?n.inorderTraversal(function(t){return e(t.name,t.node)}):this.children_.inorderTraversal(e)},t.prototype.getIterator=function(t){return this.getIteratorFrom(t.minPost(),t)},t.prototype.getIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getIteratorFrom(t,function(t){return t});for(var r=this.children_.getIteratorFrom(t.name,u.NamedNode.Wrap),i=r.peek();null!=i&&e.compare(i,t)<0;)r.getNext(),i=r.peek();return r},t.prototype.getReverseIterator=function(t){return this.getReverseIteratorFrom(t.maxPost(),t)},t.prototype.getReverseIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getReverseIteratorFrom(t,function(t){return t});for(var r=this.children_.getReverseIteratorFrom(t.name,u.NamedNode.Wrap),i=r.peek();null!=i&&e.compare(i,t)>0;)r.getNext(),i=r.peek();return r},t.prototype.compareTo=function(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===e.MAX_NODE?-1:0},t.prototype.withIndex=function(e){if(e===h.KEY_INDEX||this.indexMap_.hasIndex(e))return this;var n=this.indexMap_.addIndex(e,this.children_);return new t(this.children_,this.priorityNode_,n)},t.prototype.isIndexed=function(t){return t===h.KEY_INDEX||this.indexMap_.hasIndex(t)},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode())return!1;var e=t;if(this.getPriority().equals(e.getPriority())){if(this.children_.count()===e.children_.count()){for(var n=this.getIterator(l.PRIORITY_INDEX),r=e.getIterator(l.PRIORITY_INDEX),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},t.prototype.resolveIndex_=function(t){return t===h.KEY_INDEX?null:this.indexMap_.get(t.toString())},t.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,t}();e.ChildrenNode=v;var y=function(t){function e(){return t.call(this,new a.SortedMap(d.NAME_COMPARATOR),v.EMPTY_NODE,p.IndexMap.Default)||this}return i.__extends(e,t),e.prototype.compareTo=function(t){return t===this?0:1},e.prototype.equals=function(t){return t===this},e.prototype.getPriority=function(){return this},e.prototype.getImmediateChild=function(t){return v.EMPTY_NODE},e.prototype.isEmpty=function(){return!1},e}(v);e.MaxNode=y,e.MAX_NODE=new y,Object.defineProperties(u.NamedNode,{MIN:{value:new u.NamedNode(s.MIN_NAME,v.EMPTY_NODE)},MAX:{value:new u.NamedNode(s.MAX_NAME,e.MAX_NODE)}}),h.KeyIndex.__EMPTY_NODE=v.EMPTY_NODE,f.LeafNode.__childrenNodeConstructor=v,c.setMaxNode(e.MAX_NODE),l.setMaxNode(e.MAX_NODE)},RWQz:function(t,e,n){"use strict";e.a=function(){return function(t){return t.lift(new o(t))}};var r=n("6Xbx"),i=n("E9/g"),o=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new s(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),s=function(t){function e(e,n){t.call(this,e),this.connectable=n}return Object(r.__extends)(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(i.a)},Rgd9:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("1zSO"),i=n("Fwmd"),o=function(t){try{if("undefined"!=typeof window&&"undefined"!=typeof window[t]){var e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new r.DOMStorageWrapper(e)}}catch(t){}return new i.MemoryStorage};e.PersistentStorage=o("localStorage"),e.SessionStorage=o("sessionStorage")},Ropm:function(t,e,n){"use strict";e.a=function(t,e,n){return function(r){return r.lift(new s(t,e,n,r))}};var r=n("6Xbx"),i=n("E9/g"),o=n("Ry8D"),s=function(){function t(t,e,n,r){this.predicate=t,this.resultSelector=e,this.defaultValue=n,this.source=r}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.resultSelector,this.defaultValue,this.source))},t}(),a=function(t){function e(e,n,r,i,o){t.call(this,e),this.predicate=n,this.resultSelector=r,this.defaultValue=i,this.source=o,this.index=0,this.hasCompleted=!1,this._emitted=!1}return Object(r.__extends)(e,t),e.prototype._next=function(t){var e=this.index++;this.predicate?this._tryPredicate(t,e):this._emit(t,e)},e.prototype._tryPredicate=function(t,e){var n;try{n=this.predicate(t,e,this.source)}catch(t){return void this.destination.error(t)}n&&this._emit(t,e)},e.prototype._emit=function(t,e){this.resultSelector?this._tryResultSelector(t,e):this._emitFinal(t)},e.prototype._tryResultSelector=function(t,e){var n;try{n=this.resultSelector(t,e)}catch(t){return void this.destination.error(t)}this._emitFinal(n)},e.prototype._emitFinal=function(t){var e=this.destination;this._emitted||(this._emitted=!0,e.next(t),e.complete(),this.hasCompleted=!0)},e.prototype._complete=function(){var t=this.destination;this.hasCompleted||"undefined"==typeof this.defaultValue?this.hasCompleted||t.error(new o.a):(t.next(this.defaultValue),t.complete())},e}(i.a)},Rv9P:function(t,e,n){n("TL6u")},Ry8D:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("6Xbx"),i=function(t){function e(){var e=t.call(this,"no elements in sequence");this.name=e.name="EmptyError",this.stack=e.stack,this.message=e.message}return Object(r.__extends)(e,t),e}(Error)},RyBE:function(t,e,n){"use strict";n.d(e,"a",function(){return Wt}),n.d(e,"i",function(){return Ut}),n.d(e,"g",function(){return _}),n.d(e,"h",function(){return E}),n.d(e,"c",function(){return x}),n.d(e,"d",function(){return A}),n.d(e,"e",function(){return nt}),n.d(e,"f",function(){return rt}),n.d(e,"b",function(){return Pt}),n.d(e,"r",function(){return a}),n.d(e,"k",function(){return U}),n.d(e,"j",function(){return tt}),n.d(e,"m",function(){return it}),n.d(e,"n",function(){return at}),n.d(e,"l",function(){return k}),n.d(e,"o",function(){return R}),n.d(e,"p",function(){return Bt}),n.d(e,"s",function(){return N}),n.d(e,"q",function(){return Rt});var r=n("Un6q"),i=n("LMZF"),o=n("6Xbx"),s=null;function a(){return s}var u,c={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},l={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},h={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"};i._4.Node&&(u=i._4.Node.prototype.contains||function(t){return!!(16&this.compareDocumentPosition(t))});var p,f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(o.__extends)(e,t),e.prototype.parse=function(t){throw new Error("parse not implemented")},e.makeCurrent=function(){var t;t=new e,s||(s=t)},e.prototype.hasProperty=function(t,e){return e in t},e.prototype.setProperty=function(t,e,n){t[e]=n},e.prototype.getProperty=function(t,e){return t[e]},e.prototype.invoke=function(t,e,n){var r;(r=t)[e].apply(r,n)},e.prototype.logError=function(t){window.console&&(console.error?console.error(t):console.log(t))},e.prototype.log=function(t){window.console&&window.console.log&&window.console.log(t)},e.prototype.logGroup=function(t){window.console&&window.console.group&&window.console.group(t)},e.prototype.logGroupEnd=function(){window.console&&window.console.groupEnd&&window.console.groupEnd()},Object.defineProperty(e.prototype,"attrToPropMap",{get:function(){return c},enumerable:!0,configurable:!0}),e.prototype.contains=function(t,e){return u.call(t,e)},e.prototype.querySelector=function(t,e){return t.querySelector(e)},e.prototype.querySelectorAll=function(t,e){return t.querySelectorAll(e)},e.prototype.on=function(t,e,n){t.addEventListener(e,n,!1)},e.prototype.onAndCancel=function(t,e,n){return t.addEventListener(e,n,!1),function(){t.removeEventListener(e,n,!1)}},e.prototype.dispatchEvent=function(t,e){t.dispatchEvent(e)},e.prototype.createMouseEvent=function(t){var e=this.getDefaultDocument().createEvent("MouseEvent");return e.initEvent(t,!0,!0),e},e.prototype.createEvent=function(t){var e=this.getDefaultDocument().createEvent("Event");return e.initEvent(t,!0,!0),e},e.prototype.preventDefault=function(t){t.preventDefault(),t.returnValue=!1},e.prototype.isPrevented=function(t){return t.defaultPrevented||null!=t.returnValue&&!t.returnValue},e.prototype.getInnerHTML=function(t){return t.innerHTML},e.prototype.getTemplateContent=function(t){return"content"in t&&this.isTemplateElement(t)?t.content:null},e.prototype.getOuterHTML=function(t){return t.outerHTML},e.prototype.nodeName=function(t){return t.nodeName},e.prototype.nodeValue=function(t){return t.nodeValue},e.prototype.type=function(t){return t.type},e.prototype.content=function(t){return this.hasProperty(t,"content")?t.content:t},e.prototype.firstChild=function(t){return t.firstChild},e.prototype.nextSibling=function(t){return t.nextSibling},e.prototype.parentElement=function(t){return t.parentNode},e.prototype.childNodes=function(t){return t.childNodes},e.prototype.childNodesAsList=function(t){for(var e=t.childNodes,n=new Array(e.length),r=0;r<e.length;r++)n[r]=e[r];return n},e.prototype.clearNodes=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},e.prototype.appendChild=function(t,e){t.appendChild(e)},e.prototype.removeChild=function(t,e){t.removeChild(e)},e.prototype.replaceChild=function(t,e,n){t.replaceChild(e,n)},e.prototype.remove=function(t){return t.parentNode&&t.parentNode.removeChild(t),t},e.prototype.insertBefore=function(t,e,n){t.insertBefore(n,e)},e.prototype.insertAllBefore=function(t,e,n){n.forEach(function(n){return t.insertBefore(n,e)})},e.prototype.insertAfter=function(t,e,n){t.insertBefore(n,e.nextSibling)},e.prototype.setInnerHTML=function(t,e){t.innerHTML=e},e.prototype.getText=function(t){return t.textContent},e.prototype.setText=function(t,e){t.textContent=e},e.prototype.getValue=function(t){return t.value},e.prototype.setValue=function(t,e){t.value=e},e.prototype.getChecked=function(t){return t.checked},e.prototype.setChecked=function(t,e){t.checked=e},e.prototype.createComment=function(t){return this.getDefaultDocument().createComment(t)},e.prototype.createTemplate=function(t){var e=this.getDefaultDocument().createElement("template");return e.innerHTML=t,e},e.prototype.createElement=function(t,e){return(e=e||this.getDefaultDocument()).createElement(t)},e.prototype.createElementNS=function(t,e,n){return(n=n||this.getDefaultDocument()).createElementNS(t,e)},e.prototype.createTextNode=function(t,e){return(e=e||this.getDefaultDocument()).createTextNode(t)},e.prototype.createScriptTag=function(t,e,n){var r=(n=n||this.getDefaultDocument()).createElement("SCRIPT");return r.setAttribute(t,e),r},e.prototype.createStyleElement=function(t,e){var n=(e=e||this.getDefaultDocument()).createElement("style");return this.appendChild(n,this.createTextNode(t,e)),n},e.prototype.createShadowRoot=function(t){return t.createShadowRoot()},e.prototype.getShadowRoot=function(t){return t.shadowRoot},e.prototype.getHost=function(t){return t.host},e.prototype.clone=function(t){return t.cloneNode(!0)},e.prototype.getElementsByClassName=function(t,e){return t.getElementsByClassName(e)},e.prototype.getElementsByTagName=function(t,e){return t.getElementsByTagName(e)},e.prototype.classList=function(t){return Array.prototype.slice.call(t.classList,0)},e.prototype.addClass=function(t,e){t.classList.add(e)},e.prototype.removeClass=function(t,e){t.classList.remove(e)},e.prototype.hasClass=function(t,e){return t.classList.contains(e)},e.prototype.setStyle=function(t,e,n){t.style[e]=n},e.prototype.removeStyle=function(t,e){t.style[e]=""},e.prototype.getStyle=function(t,e){return t.style[e]},e.prototype.hasStyle=function(t,e,n){var r=this.getStyle(t,e)||"";return n?r==n:r.length>0},e.prototype.tagName=function(t){return t.tagName},e.prototype.attributeMap=function(t){for(var e=new Map,n=t.attributes,r=0;r<n.length;r++){var i=n.item(r);e.set(i.name,i.value)}return e},e.prototype.hasAttribute=function(t,e){return t.hasAttribute(e)},e.prototype.hasAttributeNS=function(t,e,n){return t.hasAttributeNS(e,n)},e.prototype.getAttribute=function(t,e){return t.getAttribute(e)},e.prototype.getAttributeNS=function(t,e,n){return t.getAttributeNS(e,n)},e.prototype.setAttribute=function(t,e,n){t.setAttribute(e,n)},e.prototype.setAttributeNS=function(t,e,n,r){t.setAttributeNS(e,n,r)},e.prototype.removeAttribute=function(t,e){t.removeAttribute(e)},e.prototype.removeAttributeNS=function(t,e,n){t.removeAttributeNS(e,n)},e.prototype.templateAwareRoot=function(t){return this.isTemplateElement(t)?this.content(t):t},e.prototype.createHtmlDocument=function(){return document.implementation.createHTMLDocument("fakeTitle")},e.prototype.getDefaultDocument=function(){return document},e.prototype.getBoundingClientRect=function(t){try{return t.getBoundingClientRect()}catch(t){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}},e.prototype.getTitle=function(t){return t.title},e.prototype.setTitle=function(t,e){t.title=e||""},e.prototype.elementMatches=function(t,e){return!!this.isElementNode(t)&&(t.matches&&t.matches(e)||t.msMatchesSelector&&t.msMatchesSelector(e)||t.webkitMatchesSelector&&t.webkitMatchesSelector(e))},e.prototype.isTemplateElement=function(t){return this.isElementNode(t)&&"TEMPLATE"===t.nodeName},e.prototype.isTextNode=function(t){return t.nodeType===Node.TEXT_NODE},e.prototype.isCommentNode=function(t){return t.nodeType===Node.COMMENT_NODE},e.prototype.isElementNode=function(t){return t.nodeType===Node.ELEMENT_NODE},e.prototype.hasShadowRoot=function(t){return null!=t.shadowRoot&&t instanceof HTMLElement},e.prototype.isShadowRoot=function(t){return t instanceof DocumentFragment},e.prototype.importIntoDoc=function(t){return document.importNode(this.templateAwareRoot(t),!0)},e.prototype.adoptNode=function(t){return document.adoptNode(t)},e.prototype.getHref=function(t){return t.getAttribute("href")},e.prototype.getEventKey=function(t){var e=t.key;if(null==e){if(null==(e=t.keyIdentifier))return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&h.hasOwnProperty(e)&&(e=h[e]))}return l[e]||e},e.prototype.getGlobalEventTarget=function(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null},e.prototype.getHistory=function(){return window.history},e.prototype.getLocation=function(){return window.location},e.prototype.getBaseHref=function(t){var e,n=d||(d=document.querySelector("base"))?d.getAttribute("href"):null;return null==n?null:(e=n,p||(p=document.createElement("a")),p.setAttribute("href",e),"/"===p.pathname.charAt(0)?p.pathname:"/"+p.pathname)},e.prototype.resetBaseElement=function(){d=null},e.prototype.getUserAgent=function(){return window.navigator.userAgent},e.prototype.setData=function(t,e,n){this.setAttribute(t,"data-"+e,n)},e.prototype.getData=function(t,e){return this.getAttribute(t,"data-"+e)},e.prototype.getComputedStyle=function(t){return getComputedStyle(t)},e.prototype.supportsWebAnimation=function(){return"function"==typeof Element.prototype.animate},e.prototype.performanceNow=function(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()},e.prototype.supportsCookies=function(){return!0},e.prototype.getCookie=function(t){return Object(r.p)(document.cookie,t)},e.prototype.setCookie=function(t,e){document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)},e}(function(t){function e(){var e=t.call(this)||this;e._animationPrefix=null,e._transitionEnd=null;try{var n=e.createElement("div",document);if(null!=e.getStyle(n,"animationName"))e._animationPrefix="";else for(var r=["Webkit","Moz","O","ms"],i=0;i<r.length;i++)if(null!=e.getStyle(n,r[i]+"AnimationName")){e._animationPrefix="-"+r[i].toLowerCase()+"-";break}var o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};Object.keys(o).forEach(function(t){null!=e.getStyle(n,t)&&(e._transitionEnd=o[t])})}catch(t){e._animationPrefix=null,e._transitionEnd=null}return e}return Object(o.__extends)(e,t),e.prototype.getDistributedNodes=function(t){return t.getDistributedNodes()},e.prototype.resolveAndSetHref=function(t,e,n){t.href=null==n?e:e+"/../"+n},e.prototype.supportsDOMEvents=function(){return!0},e.prototype.supportsNativeShadowDOM=function(){return"function"==typeof document.body.createShadowRoot},e.prototype.getAnimationPrefix=function(){return this._animationPrefix?this._animationPrefix:""},e.prototype.getTransitionEnd=function(){return this._transitionEnd?this._transitionEnd:""},e.prototype.supportsAnimation=function(){return null!=this._animationPrefix&&null!=this._transitionEnd},e}(function(){function t(){this.resourceLoaderType=null}return Object.defineProperty(t.prototype,"attrToPropMap",{get:function(){return this._attrToPropMap},set:function(t){this._attrToPropMap=t},enumerable:!0,configurable:!0}),t}())),d=null,v=r.c;function y(){return!!window.history.pushState}var g=function(t){function e(e){var n=t.call(this)||this;return n._doc=e,n._init(),n}return Object(o.__extends)(e,t),e.prototype._init=function(){this.location=a().getLocation(),this._history=a().getHistory()},e.prototype.getBaseHrefFromDOM=function(){return a().getBaseHref(this._doc)},e.prototype.onPopState=function(t){a().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)},e.prototype.onHashChange=function(t){a().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)},Object.defineProperty(e.prototype,"pathname",{get:function(){return this.location.pathname},set:function(t){this.location.pathname=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"search",{get:function(){return this.location.search},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hash",{get:function(){return this.location.hash},enumerable:!0,configurable:!0}),e.prototype.pushState=function(t,e,n){y()?this._history.pushState(t,e,n):this.location.hash=n},e.prototype.replaceState=function(t,e,n){y()?this._history.replaceState(t,e,n):this.location.hash=n},e.prototype.forward=function(){this._history.forward()},e.prototype.back=function(){this._history.back()},e.ctorParameters=function(){return[{type:void 0,decorators:[{type:i.n,args:[v]}]}]},e}(r.m),_=function(){function t(t){this._doc=t,this._dom=a()}return t.prototype.addTag=function(t,e){return void 0===e&&(e=!1),t?this._getOrCreateElement(t,e):null},t.prototype.addTags=function(t,e){var n=this;return void 0===e&&(e=!1),t?t.reduce(function(t,r){return r&&t.push(n._getOrCreateElement(r,e)),t},[]):[]},t.prototype.getTag=function(t){return t&&this._dom.querySelector(this._doc,"meta["+t+"]")||null},t.prototype.getTags=function(t){if(!t)return[];var e=this._dom.querySelectorAll(this._doc,"meta["+t+"]");return e?[].slice.call(e):[]},t.prototype.updateTag=function(t,e){if(!t)return null;e=e||this._parseSelector(t);var n=this.getTag(e);return n?this._setMetaElementAttributes(t,n):this._getOrCreateElement(t,!0)},t.prototype.removeTag=function(t){this.removeTagElement(this.getTag(t))},t.prototype.removeTagElement=function(t){t&&this._dom.remove(t)},t.prototype._getOrCreateElement=function(t,e){if(void 0===e&&(e=!1),!e){var n=this._parseSelector(t),r=this.getTag(n);if(r&&this._containsAttributes(t,r))return r}var i=this._dom.createElement("meta");this._setMetaElementAttributes(t,i);var o=this._dom.getElementsByTagName(this._doc,"head")[0];return this._dom.appendChild(o,i),i},t.prototype._setMetaElementAttributes=function(t,e){var n=this;return Object.keys(t).forEach(function(r){return n._dom.setAttribute(e,r,t[r])}),e},t.prototype._parseSelector=function(t){var e=t.name?"name":"property";return e+'="'+t[e]+'"'},t.prototype._containsAttributes=function(t,e){var n=this;return Object.keys(t).every(function(r){return n._dom.getAttribute(e,r)===t[r]})},t}(),m=new i.o("TRANSITION_ID"),b=[{provide:i.d,useFactory:function(t,e,n){return function(){n.get(i.e).donePromise.then(function(){var n=a();Array.prototype.slice.apply(n.querySelectorAll(e,"style[ng-transition]")).filter(function(e){return n.getAttribute(e,"ng-transition")===t}).forEach(function(t){return n.remove(t)})})}},deps:[m,v,i.p],multi:!0}],w=function(){function t(){}return t.init=function(){Object(i.V)(new t)},t.prototype.addToWindow=function(t){i._4.getAngularTestability=function(e,n){void 0===n&&(n=!0);var r=t.findTestabilityInTree(e,n);if(null==r)throw new Error("Could not find testability for element.");return r},i._4.getAllAngularTestabilities=function(){return t.getAllTestabilities()},i._4.getAllAngularRootElements=function(){return t.getAllRootElements()},i._4.frameworkStabilizers||(i._4.frameworkStabilizers=[]),i._4.frameworkStabilizers.push(function(t){var e=i._4.getAllAngularTestabilities(),n=e.length,r=!1,o=function(e){r=r||e,0==--n&&t(r)};e.forEach(function(t){t.whenStable(o)})})},t.prototype.findTestabilityInTree=function(t,e,n){if(null==e)return null;var r=t.getTestability(e);return null!=r?r:n?a().isShadowRoot(e)?this.findTestabilityInTree(t,a().getHost(e),!0):this.findTestabilityInTree(t,a().parentElement(e),!0):null},t}(),E=function(){function t(t){this._doc=t}return t.prototype.getTitle=function(){return a().getTitle(this._doc)},t.prototype.setTitle=function(t){a().setTitle(this._doc,t)},t}();function C(t,e){"undefined"!=typeof COMPILED&&COMPILED||((i._4.ng=i._4.ng||{})[t]=e)}var S={ApplicationRef:i.g,NgZone:i.x},T="probe",O="coreTokens";function I(t){return Object(i.S)(t)}function N(t){return C(T,I),C(O,Object(o.__assign)({},S,(t||[]).reduce(function(t,e){return t[e.name]=e.token,t},{}))),function(){return I}}var x=new i.o("EventManagerPlugins"),A=function(){function t(t,e){var n=this;this._zone=e,this._eventNameToPlugin=new Map,t.forEach(function(t){return t.manager=n}),this._plugins=t.slice().reverse()}return t.prototype.addEventListener=function(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)},t.prototype.addGlobalEventListener=function(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)},t.prototype.getZone=function(){return this._zone},t.prototype._findPluginFor=function(t){var e=this._eventNameToPlugin.get(t);if(e)return e;for(var n=this._plugins,r=0;r<n.length;r++){var i=n[r];if(i.supports(t))return this._eventNameToPlugin.set(t,i),i}throw new Error("No event manager plugin found for event "+t)},t}(),P=function(){function t(t){this._doc=t}return t.prototype.addGlobalEventListener=function(t,e,n){var r=a().getGlobalEventTarget(this._doc,t);if(!r)throw new Error("Unsupported event target "+r+" for event "+e);return this.addEventListener(r,e,n)},t}(),R=function(){function t(){this._stylesSet=new Set}return t.prototype.addStyles=function(t){var e=this,n=new Set;t.forEach(function(t){e._stylesSet.has(t)||(e._stylesSet.add(t),n.add(t))}),this.onStylesAdded(n)},t.prototype.onStylesAdded=function(t){},t.prototype.getAllStyles=function(){return Array.from(this._stylesSet)},t}(),k=function(t){function e(e){var n=t.call(this)||this;return n._doc=e,n._hostNodes=new Set,n._styleNodes=new Set,n._hostNodes.add(e.head),n}return Object(o.__extends)(e,t),e.prototype._addStylesToHost=function(t,e){var n=this;t.forEach(function(t){var r=n._doc.createElement("style");r.textContent=t,n._styleNodes.add(e.appendChild(r))})},e.prototype.addHost=function(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)},e.prototype.removeHost=function(t){this._hostNodes.delete(t)},e.prototype.onStylesAdded=function(t){var e=this;this._hostNodes.forEach(function(n){return e._addStylesToHost(t,n)})},e.prototype.ngOnDestroy=function(){this._styleNodes.forEach(function(t){return a().remove(t)})},e}(R),D={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},j=/%COMP%/g,M="_nghost-%COMP%",L="_ngcontent-%COMP%";function F(t,e,n){for(var r=0;r<e.length;r++){var i=e[r];Array.isArray(i)?F(t,i,n):(i=i.replace(j,t),n.push(i))}return n}function V(t){return function(e){!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}var U=function(){function t(t,e){this.eventManager=t,this.sharedStylesHost=e,this.rendererByCompId=new Map,this.defaultRenderer=new B(t)}return t.prototype.createRenderer=function(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case i.N.Emulated:var n=this.rendererByCompId.get(e.id);return n||(n=new G(this.eventManager,this.sharedStylesHost,e),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n;case i.N.Native:return new z(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){var r=F(e.id,e.styles,[]);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}},t.prototype.begin=function(){},t.prototype.end=function(){},t}(),B=function(){function t(t){this.eventManager=t,this.data=Object.create(null)}return t.prototype.destroy=function(){},t.prototype.createElement=function(t,e){return e?document.createElementNS(D[e],t):document.createElement(t)},t.prototype.createComment=function(t){return document.createComment(t)},t.prototype.createText=function(t){return document.createTextNode(t)},t.prototype.appendChild=function(t,e){t.appendChild(e)},t.prototype.insertBefore=function(t,e,n){t&&t.insertBefore(e,n)},t.prototype.removeChild=function(t,e){t&&t.removeChild(e)},t.prototype.selectRootElement=function(t){var e="string"==typeof t?document.querySelector(t):t;if(!e)throw new Error('The selector "'+t+'" did not match any elements');return e.textContent="",e},t.prototype.parentNode=function(t){return t.parentNode},t.prototype.nextSibling=function(t){return t.nextSibling},t.prototype.setAttribute=function(t,e,n,r){if(r){e=r+":"+e;var i=D[r];i?t.setAttributeNS(i,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)},t.prototype.removeAttribute=function(t,e,n){if(n){var r=D[n];r?t.removeAttributeNS(r,e):t.removeAttribute(n+":"+e)}else t.removeAttribute(e)},t.prototype.addClass=function(t,e){t.classList.add(e)},t.prototype.removeClass=function(t,e){t.classList.remove(e)},t.prototype.setStyle=function(t,e,n,r){r&i.D.DashCase?t.style.setProperty(e,n,r&i.D.Important?"important":""):t.style[e]=n},t.prototype.removeStyle=function(t,e,n){n&i.D.DashCase?t.style.removeProperty(e):t.style[e]=""},t.prototype.setProperty=function(t,e,n){q(e,"property"),t[e]=n},t.prototype.setValue=function(t,e){t.nodeValue=e},t.prototype.listen=function(t,e,n){return q(e,"listener"),"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,V(n)):this.eventManager.addEventListener(t,e,V(n))},t}(),W="@".charCodeAt(0);function q(t,e){if(t.charCodeAt(0)===W)throw new Error("Found the synthetic "+e+" "+t+'. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.')}var H,G=function(t){function e(e,n,r){var i=t.call(this,e)||this;i.component=r;var o=F(r.id,r.styles,[]);return n.addStyles(o),i.contentAttr=L.replace(j,r.id),i.hostAttr=M.replace(j,r.id),i}return Object(o.__extends)(e,t),e.prototype.applyToHost=function(e){t.prototype.setAttribute.call(this,e,this.hostAttr,"")},e.prototype.createElement=function(e,n){var r=t.prototype.createElement.call(this,e,n);return t.prototype.setAttribute.call(this,r,this.contentAttr,""),r},e}(B),z=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;o.sharedStylesHost=n,o.hostEl=r,o.component=i,o.shadowRoot=r.createShadowRoot(),o.sharedStylesHost.addHost(o.shadowRoot);for(var s=F(i.id,i.styles,[]),a=0;a<s.length;a++){var u=document.createElement("style");u.textContent=s[a],o.shadowRoot.appendChild(u)}return o}return Object(o.__extends)(e,t),e.prototype.nodeOrShadowRoot=function(t){return t===this.hostEl?this.shadowRoot:t},e.prototype.destroy=function(){this.sharedStylesHost.removeHost(this.shadowRoot)},e.prototype.appendChild=function(e,n){return t.prototype.appendChild.call(this,this.nodeOrShadowRoot(e),n)},e.prototype.insertBefore=function(e,n,r){return t.prototype.insertBefore.call(this,this.nodeOrShadowRoot(e),n,r)},e.prototype.removeChild=function(e,n){return t.prototype.removeChild.call(this,this.nodeOrShadowRoot(e),n)},e.prototype.parentNode=function(e){return this.nodeOrShadowRoot(t.prototype.parentNode.call(this,this.nodeOrShadowRoot(e)))},e}(B),K="undefined"!=typeof Zone&&Zone.__symbol__||function(t){return"__zone_symbol__"+t},J=K("addEventListener"),X=K("removeEventListener"),Q={},Y="__zone_symbol__propagationStopped";"undefined"!=typeof Zone&&Zone[K("BLACK_LISTED_EVENTS")]&&(H={});var Z=function(t){return!!H&&H.hasOwnProperty(t)},$=function(t){var e=Q[t.type];if(e){var n=this[e];if(n){var r=[t];if(1===n.length)return(s=n[0]).zone!==Zone.current?s.zone.run(s.handler,this,r):s.handler.apply(this,r);for(var i=n.slice(),o=0;o<i.length&&!0!==t[Y];o++){var s;(s=i[o]).zone!==Zone.current?s.zone.run(s.handler,this,r):s.handler.apply(this,r)}}}},tt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.ngZone=n,r.patchEvent(),r}return Object(o.__extends)(e,t),e.prototype.patchEvent=function(){if(Event&&Event.prototype&&!Event.prototype.__zone_symbol__stopImmediatePropagation){var t=Event.prototype.__zone_symbol__stopImmediatePropagation=Event.prototype.stopImmediatePropagation;Event.prototype.stopImmediatePropagation=function(){this&&(this[Y]=!0),t&&t.apply(this,arguments)}}},e.prototype.supports=function(t){return!0},e.prototype.addEventListener=function(t,e,n){var r=this,o=n;if(!t[J]||i.x.isInAngularZone()&&!Z(e))t.addEventListener(e,o,!1);else{var s=Q[e];s||(s=Q[e]=K("ANGULAR"+e+"FALSE"));var a=t[s],u=a&&a.length>0;a||(a=t[s]=[]);var c=Z(e)?Zone.root:Zone.current;if(0===a.length)a.push({zone:c,handler:o});else{for(var l=!1,h=0;h<a.length;h++)if(a[h].handler===o){l=!0;break}l||a.push({zone:c,handler:o})}u||t[J](e,$,!1)}return function(){return r.removeEventListener(t,e,o)}},e.prototype.removeEventListener=function(t,e,n){var r=t[X];if(!r)return t.removeEventListener.apply(t,[e,n,!1]);var i=Q[e],o=i&&t[i];if(!o)return t.removeEventListener.apply(t,[e,n,!1]);for(var s=!1,a=0;a<o.length;a++)if(o[a].handler===n){s=!0,o.splice(a,1);break}s?0===o.length&&r.apply(t,[e,$,!1]):t.removeEventListener.apply(t,[e,n,!1])},e}(P),et={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0},nt=new i.o("HammerGestureConfig"),rt=function(){function t(){this.events=[],this.overrides={}}return t.prototype.buildHammer=function(t){var e=new Hammer(t);for(var n in e.get("pinch").set({enable:!0}),e.get("rotate").set({enable:!0}),this.overrides)e.get(n).set(this.overrides[n]);return e},t}(),it=function(t){function e(e,n){var r=t.call(this,e)||this;return r._config=n,r}return Object(o.__extends)(e,t),e.prototype.supports=function(t){if(!et.hasOwnProperty(t.toLowerCase())&&!this.isCustomEvent(t))return!1;if(!window.Hammer)throw new Error("Hammer.js is not loaded, can not bind "+t+" event");return!0},e.prototype.addEventListener=function(t,e,n){var r=this,i=this.manager.getZone();return e=e.toLowerCase(),i.runOutsideAngular(function(){var o=r._config.buildHammer(t),s=function(t){i.runGuarded(function(){n(t)})};return o.on(e,s),function(){return o.off(e,s)}})},e.prototype.isCustomEvent=function(t){return this._config.events.indexOf(t)>-1},e}(P),ot=["alt","control","meta","shift"],st={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},at=function(t){function e(e){return t.call(this,e)||this}return Object(o.__extends)(e,t),e.prototype.supports=function(t){return null!=e.parseEventName(t)},e.prototype.addEventListener=function(t,n,r){var i=e.parseEventName(n),o=e.eventCallback(i.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return a().onAndCancel(t,i.domEventName,o)})},e.parseEventName=function(t){var n=t.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;var i=e._normalizeKey(n.pop()),o="";if(ot.forEach(function(t){var e=n.indexOf(t);e>-1&&(n.splice(e,1),o+=t+".")}),o+=i,0!=n.length||0===i.length)return null;var s={};return s.domEventName=r,s.fullKey=o,s},e.getEventFullKey=function(t){var e="",n=a().getEventKey(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),ot.forEach(function(r){r!=n&&(0,st[r])(t)&&(e+=r+".")}),e+=n},e.eventCallback=function(t,n,r){return function(i){e.getEventFullKey(i)===t&&r.runGuarded(function(){return n(i)})}},e._normalizeKey=function(t){switch(t){case"esc":return"escape";default:return t}},e}(P),ut=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,ct=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function lt(t){return(t=String(t)).match(ut)||t.match(ct)?t:(Object(i.T)()&&a().log("WARNING: sanitizing unsafe URL value "+t+" (see http://g.co/ng/security#xss)"),"unsafe:"+t)}var ht=null,pt=null;function ft(t){for(var e={},n=0,r=t.split(",");n<r.length;n++)e[r[n]]=!0;return e}function dt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0,i=t;r<i.length;r++){var o=i[r];for(var s in o)o.hasOwnProperty(s)&&(n[s]=!0)}return n}var vt=ft("area,br,col,hr,img,wbr"),yt=ft("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),gt=ft("rp,rt"),_t=dt(gt,yt),mt=dt(vt,dt(yt,ft("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),dt(gt,ft("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),_t),bt=ft("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),wt=ft("srcset"),Et=dt(bt,wt,ft("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width")),Ct=function(){function t(){this.sanitizedSomething=!1,this.buf=[]}return t.prototype.sanitizeChildren=function(t){for(var e=t.firstChild;e;)if(pt.isElementNode(e)?this.startElement(e):pt.isTextNode(e)?this.chars(pt.nodeValue(e)):this.sanitizedSomething=!0,pt.firstChild(e))e=pt.firstChild(e);else for(;e;){pt.isElementNode(e)&&this.endElement(e);var n=St(e,pt.nextSibling(e));if(n){e=n;break}e=St(e,pt.parentElement(e))}return this.buf.join("")},t.prototype.startElement=function(t){var e=this,n=pt.nodeName(t).toLowerCase();mt.hasOwnProperty(n)?(this.buf.push("<"),this.buf.push(n),pt.attributeMap(t).forEach(function(t,n){var r,i=n.toLowerCase();Et.hasOwnProperty(i)?(bt[i]&&(t=lt(t)),wt[i]&&(r=t,t=(r=String(r)).split(",").map(function(t){return lt(t.trim())}).join(", ")),e.buf.push(" "),e.buf.push(n),e.buf.push('="'),e.buf.push(It(t)),e.buf.push('"')):e.sanitizedSomething=!0}),this.buf.push(">")):this.sanitizedSomething=!0},t.prototype.endElement=function(t){var e=pt.nodeName(t).toLowerCase();mt.hasOwnProperty(e)&&!vt.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))},t.prototype.chars=function(t){this.buf.push(It(t))},t}();function St(t,e){if(e&&pt.contains(t,e))throw new Error("Failed to sanitize html because the element is clobbered: "+pt.getOuterHTML(t));return e}var Tt=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ot=/([^\#-~ |!])/g;function It(t){return t.replace(/&/g,"&").replace(Tt,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Ot,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function Nt(t){pt.attributeMap(t).forEach(function(e,n){"xmlns:ns1"!==n&&0!==n.indexOf("ns1:")||pt.removeAttribute(t,n)});for(var e=0,n=pt.childNodesAsList(t);e<n.length;e++){var r=n[e];pt.isElementNode(r)&&Nt(r)}}var xt=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:calc|attr))\\([-0-9.%, #a-zA-Z]+\\))$","g"),At=/^url\(([^)]+)\)$/,Pt=function(){},Rt=function(t){function e(e){var n=t.call(this)||this;return n._doc=e,n}return Object(o.__extends)(e,t),e.prototype.sanitize=function(t,e){if(null==e)return null;switch(t){case i.F.NONE:return e;case i.F.HTML:return e instanceof Dt?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"HTML"),function(t,e){try{var n=function(){if(ht)return ht;var t=(pt=a()).createElement("template");if("content"in t)return t;var e=pt.createHtmlDocument();if(null==(ht=pt.querySelector(e,"body"))){var n=pt.createElement("html",e);ht=pt.createElement("body",e),pt.appendChild(n,ht),pt.appendChild(e,n)}return ht}(),r=e?String(e):"",o=5,s=r;do{if(0===o)throw new Error("Failed to sanitize html because the input is unstable");o--,pt.setInnerHTML(n,r=s),t.documentMode&&Nt(n),s=pt.getInnerHTML(n)}while(r!==s);for(var u=new Ct,c=u.sanitizeChildren(pt.getTemplateContent(n)||n),l=pt.getTemplateContent(n)||n,h=0,p=pt.childNodesAsList(l);h<p.length;h++)pt.removeChild(l,p[h]);return Object(i.T)()&&u.sanitizedSomething&&pt.log("WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss)."),c}catch(t){throw ht=null,t}}(this._doc,String(e)));case i.F.STYLE:return e instanceof jt?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"Style"),function(t){if(!(t=String(t).trim()))return"";var e=t.match(At);return e&<(e[1])===e[1]||t.match(xt)&&function(t){for(var e=!0,n=!0,r=0;r<t.length;r++){var i=t.charAt(r);"'"===i&&n?e=!e:'"'===i&&e&&(n=!n)}return e&&n}(t)?t:(Object(i.T)()&&a().log("WARNING: sanitizing unsafe style value "+t+" (see http://g.co/ng/security#xss)."),"unsafe")}(e));case i.F.SCRIPT:if(e instanceof Mt)return e.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(e,"Script"),new Error("unsafe value used in a script context");case i.F.URL:return e instanceof Ft||e instanceof Lt?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"URL"),lt(String(e)));case i.F.RESOURCE_URL:if(e instanceof Ft)return e.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(e,"ResourceURL"),new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext "+t+" (see http://g.co/ng/security#xss)")}},e.prototype.checkNotSafeValue=function(t,e){if(t instanceof kt)throw new Error("Required a safe "+e+", got a "+t.getTypeName()+" (see http://g.co/ng/security#xss)")},e.prototype.bypassSecurityTrustHtml=function(t){return new Dt(t)},e.prototype.bypassSecurityTrustStyle=function(t){return new jt(t)},e.prototype.bypassSecurityTrustScript=function(t){return new Mt(t)},e.prototype.bypassSecurityTrustUrl=function(t){return new Lt(t)},e.prototype.bypassSecurityTrustResourceUrl=function(t){return new Ft(t)},e}(Pt),kt=function(){function t(t){this.changingThisBreaksApplicationSecurity=t}return t.prototype.toString=function(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"},t}(),Dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(o.__extends)(e,t),e.prototype.getTypeName=function(){return"HTML"},e}(kt),jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(o.__extends)(e,t),e.prototype.getTypeName=function(){return"Style"},e}(kt),Mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(o.__extends)(e,t),e.prototype.getTypeName=function(){return"Script"},e}(kt),Lt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(o.__extends)(e,t),e.prototype.getTypeName=function(){return"URL"},e}(kt),Ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(o.__extends)(e,t),e.prototype.getTypeName=function(){return"ResourceURL"},e}(kt),Vt=[{provide:i.z,useValue:r.n},{provide:i.A,useValue:function(){f.makeCurrent(),w.init()},multi:!0},{provide:r.m,useClass:g,deps:[v]},{provide:v,useFactory:function(){return document},deps:[]}],Ut=Object(i.P)(i.U,"browser",Vt);function Bt(){return new i.l}var Wt=function(){function t(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}return t.withServerTransition=function(e){return{ngModule:t,providers:[{provide:i.c,useValue:e.appId},{provide:m,useExisting:i.c},b]}},t}();"undefined"!=typeof window&&window},T2Au:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(){}},TL6u:function(t,e,n){(function(t){(function(){var t,e=n("XtH8").default,r=r||{},i=this;function o(t){return"string"==typeof t}function s(t){return"boolean"==typeof t}function a(){}function u(t){var e=typeof t;if("object"==e){if(!t)return"null";if(t instanceof Array)return"array";if(t instanceof Object)return e;var n=Object.prototype.toString.call(t);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof t.length&&"undefined"!=typeof t.splice&&"undefined"!=typeof t.propertyIsEnumerable&&!t.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof t.call&&"undefined"!=typeof t.propertyIsEnumerable&&!t.propertyIsEnumerable("call"))return"function"}else if("function"==e&&"undefined"==typeof t.call)return"object";return e}function c(t){return null===t}function l(t){return"array"==u(t)}function h(t){var e=u(t);return"array"==e||"object"==e&&"number"==typeof t.length}function p(t){return"function"==u(t)}function f(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var d="closure_uid_"+(1e9*Math.random()>>>0),v=0;function y(t,e,n){return t.call.apply(t.bind,arguments)}function g(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function _(t,e,n){return(_=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?y:g).apply(null,arguments)}function m(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var b=Date.now||function(){return+new Date};function w(t,e){function n(){}n.prototype=e.prototype,t.lb=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.$c=function(t,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return e.prototype[n].apply(t,i)}}function E(t){t.prototype.then=t.prototype.then,t.prototype.$goog_Thenable=!0}function C(t){if(!t)return!1;try{return!!t.$goog_Thenable}catch(t){return!1}}function S(t){if(Error.captureStackTrace)Error.captureStackTrace(this,S);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))}function T(t,e){for(var n="",r=(t=t.split("%s")).length-1,i=0;i<r;i++)n+=t[i]+(i<e.length?e[i]:"%s");S.call(this,n+t[r])}function O(t,e){throw new T("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function I(t,e){this.c=t,this.f=e,this.b=0,this.a=null}function N(t,e){t.f(e),100>t.b&&(t.b++,e.next=t.a,t.a=e)}function x(){this.b=this.a=null}w(S,Error),S.prototype.name="CustomError",w(T,S),T.prototype.name="AssertionError",I.prototype.get=function(){if(0<this.b){this.b--;var t=this.a;this.a=t.next,t.next=null}else t=this.c();return t};var A=new I(function(){return new R},function(t){t.reset()});function P(){var t=dt,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function R(){this.next=this.b=this.a=null}x.prototype.add=function(t,e){var n=A.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},R.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},R.prototype.reset=function(){this.next=this.b=this.a=null};var k=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if(o(t))return o(e)&&1==e.length?t.indexOf(e,0):-1;for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},D=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i=o(t)?t.split(""):t,s=0;s<r;s++)s in i&&e.call(n,i[s],s,t)},j=Array.prototype.map?function(t,e){return Array.prototype.map.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=Array(n),i=o(t)?t.split(""):t,s=0;s<n;s++)s in i&&(r[s]=e.call(void 0,i[s],s,t));return r},M=Array.prototype.some?function(t,e){return Array.prototype.some.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=o(t)?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t))return!0;return!1};function L(t,e){return 0<=k(t,e)}function F(t,e){var n;return(n=0<=(e=k(t,e)))&&Array.prototype.splice.call(t,e,1),n}function V(t,e){!function(t,e){var n=t.length,r=o(t)?t.split(""):t;for(--n;0<=n;--n)n in r&&e.call(void 0,r[n],n,t)}(t,function(n,r){e.call(void 0,n,r,t)&&Array.prototype.splice.call(t,r,1)})}function U(t){return Array.prototype.concat.apply([],arguments)}function B(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}function W(t,e){for(var n=t.split("%s"),r="",i=Array.prototype.slice.call(arguments,1);i.length&&1<n.length;)r+=n.shift()+i.shift();return r+n.join("%s")}var q=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};function H(t){return Z.test(t)?(-1!=t.indexOf("&")&&(t=t.replace(z,"&")),-1!=t.indexOf("<")&&(t=t.replace(K,"<")),-1!=t.indexOf(">")&&(t=t.replace(J,">")),-1!=t.indexOf('"')&&(t=t.replace(X,""")),-1!=t.indexOf("'")&&(t=t.replace(Q,"'")),-1!=t.indexOf("\0")&&(t=t.replace(Y,"�")),t):t}var G,z=/&/g,K=/</g,J=/>/g,X=/"/g,Q=/'/g,Y=/\x00/g,Z=/[\x00&<>"']/;function $(t,e){return-1!=t.indexOf(e)}function tt(t,e){return t<e?-1:t>e?1:0}t:{var et=i.navigator;if(et){var nt=et.userAgent;if(nt){G=nt;break t}}G=""}function rt(t){return $(G,t)}function it(t,e){for(var n in t)e.call(void 0,t[n],n,t)}function ot(t){for(var e in t)return!1;return!0}function st(t){var e,n={};for(e in t)n[e]=t[e];return n}var at,ut,ct="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function lt(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<ct.length;o++)n=ct[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function ht(t){i.setTimeout(function(){throw t},0)}function pt(t,e){ut||function(){if(-1!=String(i.Promise).indexOf("[native code]")){var t=i.Promise.resolve(void 0);ut=function(){t.then(vt)}}else ut=function(){var t=vt;!p(i.setImmediate)||i.Window&&i.Window.prototype&&!rt("Edge")&&i.Window.prototype.setImmediate==i.setImmediate?(at||(at=function(){var t=i.MessageChannel;if("undefined"==typeof t&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!rt("Presto")&&(t=function(){var t=document.createElement("IFRAME");t.style.display="none",t.src="",document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.write(""),t.close();var n="callImmediate"+Math.random(),r="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=_(function(t){"*"!=r&&t.origin!=r||t.data!=n||this.port1.onmessage()},this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,r)}}}),"undefined"!=typeof t&&!rt("Trident")&&!rt("MSIE")){var e=new t,n={},r=n;return e.port1.onmessage=function(){if(void 0!==n.next){var t=(n=n.next).rb;n.rb=null,t()}},function(t){r.next={rb:t},r=r.next,e.port2.postMessage(0)}}return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(t){var e=document.createElement("SCRIPT");e.onreadystatechange=function(){e.onreadystatechange=null,e.parentNode.removeChild(e),e=null,t(),t=null},document.documentElement.appendChild(e)}:function(t){i.setTimeout(t,0)}}()),at(t)):i.setImmediate(t)}}(),ft||(ut(),ft=!0),dt.add(t,e)}var ft=!1,dt=new x;function vt(){for(var t;t=P();){try{t.a.call(t.b)}catch(t){ht(t)}N(A,t)}ft=!1}function yt(t,e){if(this.a=gt,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,t!=a)try{var n=this;t.call(e,function(t){Nt(n,_t,t)},function(t){if(!(t instanceof jt))try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(t){}Nt(n,mt,t)})}catch(t){Nt(this,mt,t)}}var gt=0,_t=2,mt=3;function bt(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}bt.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var wt=new I(function(){return new bt},function(t){t.reset()});function Et(t,e,n){var r=wt.get();return r.g=t,r.b=e,r.f=n,r}function Ct(t){if(t instanceof yt)return t;var e=new yt(a);return Nt(e,_t,t),e}function St(t){return new yt(function(e,n){n(t)})}function Tt(t,e,n){xt(t,e,n,null)||pt(m(e,t))}function Ot(t,e){t.b||t.a!=_t&&t.a!=mt||At(t),t.f?t.f.next=e:t.b=e,t.f=e}function It(t,e,n,r){var i=Et(null,null,null);return i.a=new yt(function(t,o){i.g=e?function(n){try{var i=e.call(r,n);t(i)}catch(t){o(t)}}:t,i.b=n?function(e){try{var i=n.call(r,e);void 0===i&&e instanceof jt?o(e):t(i)}catch(t){o(t)}}:o}),i.a.c=t,Ot(t,i),i.a}function Nt(t,e,n){t.a==gt&&(t===n&&(e=mt,n=new TypeError("Promise cannot resolve to itself")),t.a=1,xt(n,t.Jc,t.Kc,t)||(t.i=n,t.a=e,t.c=null,At(t),e!=mt||n instanceof jt||function(t,e){t.g=!0,pt(function(){t.g&&Dt.call(null,e)})}(t,n)))}function xt(t,e,n,r){if(t instanceof yt)return Ot(t,Et(e||a,n||null,r)),!0;if(C(t))return t.then(e,n,r),!0;if(f(t))try{var i=t.then;if(p(i))return function(t,e,n,r,i){function o(t){s||(s=!0,r.call(i,t))}var s=!1;try{e.call(t,function(t){s||(s=!0,n.call(i,t))},o)}catch(t){o(t)}}(t,i,e,n,r),!0}catch(t){return n.call(r,t),!0}return!1}function At(t){t.h||(t.h=!0,pt(t.Ub,t))}function Pt(t){var e=null;return t.b&&(t.b=(e=t.b).next,e.next=null),t.b||(t.f=null),e}function Rt(t,e,n,r){if(n==mt&&e.b&&!e.c)for(;t&&t.g;t=t.c)t.g=!1;if(e.a)e.a.c=null,kt(e,n,r);else try{e.c?e.g.call(e.f):kt(e,n,r)}catch(t){Dt.call(null,t)}N(wt,e)}function kt(t,e,n){e==_t?t.g.call(t.f,n):t.b&&t.b.call(t.f,n)}yt.prototype.then=function(t,e,n){return It(this,p(t)?t:null,p(e)?e:null,n)},E(yt),(t=yt.prototype).ga=function(t,e){return(t=Et(t,t,e)).c=!0,Ot(this,t),this},t.o=function(t,e){return It(this,null,t,e)},t.cancel=function(t){this.a==gt&&pt(function(){!function t(e,n){if(e.a==gt)if(e.c){var r=e.c;if(r.b){for(var i=0,o=null,s=null,a=r.b;a&&(a.c||(i++,a.a==e&&(o=a),!(o&&1<i)));a=a.next)o||(s=a);o&&(r.a==gt&&1==i?t(r,n):(s?((i=s).next==r.f&&(r.f=i),i.next=i.next.next):Pt(r),Rt(r,o,mt,n)))}e.c=null}else Nt(e,mt,n)}(this,new jt(t))},this)},t.Jc=function(t){this.a=gt,Nt(this,_t,t)},t.Kc=function(t){this.a=gt,Nt(this,mt,t)},t.Ub=function(){for(var t;t=Pt(this);)Rt(this,t,this.a,this.i);this.h=!1};var Dt=ht;function jt(t){S.call(this,t)}function Mt(){0!=Lt&&(Ft[this[d]||(this[d]=++v)]=this),this.pa=this.pa,this.oa=this.oa}w(jt,S),jt.prototype.name="cancel";var Lt=0,Ft={};function Vt(t){if(!t.pa&&(t.pa=!0,t.ua(),0!=Lt)){var e=t[d]||(t[d]=++v);if(0!=Lt&&t.oa&&0<t.oa.length)throw Error(t+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete Ft[e]}}function Ut(t){return Ut[" "](t),t}Mt.prototype.pa=!1,Mt.prototype.ua=function(){if(this.oa)for(;this.oa.length;)this.oa.shift()()},Ut[" "]=a;var Bt,Wt,qt=rt("Opera"),Ht=rt("Trident")||rt("MSIE"),Gt=rt("Edge"),zt=Gt||Ht,Kt=rt("Gecko")&&!($(G.toLowerCase(),"webkit")&&!rt("Edge"))&&!(rt("Trident")||rt("MSIE"))&&!rt("Edge"),Jt=$(G.toLowerCase(),"webkit")&&!rt("Edge");function Xt(){var t=i.document;return t?t.documentMode:void 0}t:{var Qt="",Yt=(Wt=G,Kt?/rv:([^\);]+)(\)|;)/.exec(Wt):Gt?/Edge\/([\d\.]+)/.exec(Wt):Ht?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(Wt):Jt?/WebKit\/(\S+)/.exec(Wt):qt?/(?:Version)[ \/]?(\S+)/.exec(Wt):void 0);if(Yt&&(Qt=Yt?Yt[1]:""),Ht){var Zt=Xt();if(null!=Zt&&Zt>parseFloat(Qt)){Bt=String(Zt);break t}}Bt=Qt}var $t,te={};function ee(t){return function(t,e){var n=te;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e()}(t,function(){for(var e=0,n=q(String(Bt)).split("."),r=q(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var s=n[o]||"",a=r[o]||"";do{if(s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],0==s[0].length&&0==a[0].length)break;e=tt(0==s[1].length?0:parseInt(s[1],10),0==a[1].length?0:parseInt(a[1],10))||tt(0==s[2].length,0==a[2].length)||tt(s[2],a[2]),s=s[3],a=a[3]}while(0==e)}return 0<=e})}var ne=i.document;$t=ne&&Ht?Xt()||("CSS1Compat"==ne.compatMode?parseInt(Bt,10):5):void 0;var re=Object.freeze||function(t){return t},ie=!Ht||9<=Number($t),oe=Ht&&!ee("9"),se=function(){if(!i.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});return i.addEventListener("test",a,e),i.removeEventListener("test",a,e),t}();function ae(t,e){this.type=t,this.b=this.target=e,this.Eb=!0}function ue(t,e){if(ae.call(this,t?t.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,t){var n=this.type=t.type,r=t.changedTouches?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.b=e,e=t.relatedTarget){if(Kt){t:{try{Ut(e.nodeName);var i=!0;break t}catch(t){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,null===r?(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0):(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType=o(t.pointerType)?t.pointerType:ce[t.pointerType]||"",this.a=t,t.defaultPrevented&&this.c()}}ae.prototype.c=function(){this.Eb=!1},w(ue,ae);var ce=re({2:"touch",3:"pen",4:"mouse"});ue.prototype.c=function(){ue.lb.c.call(this);var t=this.a;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,oe)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(t){}},ue.prototype.g=function(){return this.a};var le="closure_listenable_"+(1e6*Math.random()|0),he=0;function pe(t){t.ma=!0,t.listener=null,t.proxy=null,t.src=null,t.La=null}function fe(t){this.src=t,this.a={},this.b=0}function de(t,e){var n=e.type;n in t.a&&F(t.a[n],e)&&(pe(e),0==t.a[n].length&&(delete t.a[n],t.b--))}function ve(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.ma&&o.listener==e&&o.capture==!!n&&o.La==r)return i}return-1}fe.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var s=ve(t,e,r,i);return-1<s?(e=t[s],n||(e.Ha=!1)):((e=new function(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.La=i,this.key=++he,this.ma=this.Ha=!1}(e,this.src,o,!!r,i)).Ha=n,t.push(e)),e};var ye="closure_lm_"+(1e6*Math.random()|0),ge={};function _e(t,e,n,r,i){if(r&&r.once)be(t,e,n,r,i);else if(l(e))for(var o=0;o<e.length;o++)_e(t,e[o],n,r,i);else n=xe(n),t&&t[le]?Pe(t,e,n,f(r)?!!r.capture:!!r,i):me(t,e,n,!1,r,i)}function me(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var s=f(i)?!!i.capture:!!i,a=Ie(t);if(a||(t[ye]=a=new fe(t)),!(n=a.add(e,n,r,s,o)).proxy)if(r=function(){var t=Oe,e=ie?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)se||(i=s),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(Ce(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}}function be(t,e,n,r,i){if(l(e))for(var o=0;o<e.length;o++)be(t,e[o],n,r,i);else n=xe(n),t&&t[le]?Re(t,e,n,f(r)?!!r.capture:!!r,i):me(t,e,n,!0,r,i)}function we(t,e,n,r,i){if(l(e))for(var o=0;o<e.length;o++)we(t,e[o],n,r,i);else r=f(r)?!!r.capture:!!r,n=xe(n),t&&t[le]?(t=t.u,(e=String(e).toString())in t.a&&-1<(n=ve(o=t.a[e],n,r,i))&&(pe(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--))):t&&(t=Ie(t))&&(e=t.a[e.toString()],t=-1,e&&(t=ve(e,n,r,i)),(n=-1<t?e[t]:null)&&Ee(n))}function Ee(t){if("number"!=typeof t&&t&&!t.ma){var e=t.src;if(e&&e[le])de(e.u,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(Ce(n),r):e.addListener&&e.removeListener&&e.removeListener(r),(n=Ie(e))?(de(n,t),0==n.b&&(n.src=null,e[ye]=null)):pe(t)}}}function Ce(t){return t in ge?ge[t]:ge[t]="on"+t}function Se(t,e,n,r){var i=!0;if((t=Ie(t))&&(e=t.a[e.toString()]))for(e=e.concat(),t=0;t<e.length;t++){var o=e[t];o&&o.capture==n&&!o.ma&&(o=Te(o,r),i=i&&!1!==o)}return i}function Te(t,e){var n=t.listener,r=t.La||t.src;return t.Ha&&Ee(t),n.call(r,e)}function Oe(t,e){if(t.ma)return!0;if(!ie){if(!e)t:{e=["window","event"];for(var n=i,r=0;r<e.length;r++)if(null==(n=n[e[r]])){e=null;break t}e=n}if(e=new ue(r=e,this),n=!0,!(0>r.keyCode||void 0!=r.returnValue)){t:{var o=!1;if(0==r.keyCode)try{r.keyCode=-1;break t}catch(t){o=!0}(o||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],o=e.b;o;o=o.parentNode)r.push(o);for(t=t.type,o=r.length-1;0<=o;o--){e.b=r[o];var s=Se(r[o],t,!0,e);n=n&&s}for(o=0;o<r.length;o++)e.b=r[o],s=Se(r[o],t,!1,e),n=n&&s}return n}return Te(t,new ue(e,this))}function Ie(t){return(t=t[ye])instanceof fe?t:null}var Ne="__closure_events_fn_"+(1e9*Math.random()>>>0);function xe(t){return p(t)?t:(t[Ne]||(t[Ne]=function(e){return t.handleEvent(e)}),t[Ne])}function Ae(){Mt.call(this),this.u=new fe(this),this.Mb=this,this.Ta=null}function Pe(t,e,n,r,i){t.u.add(String(e),n,!1,r,i)}function Re(t,e,n,r,i){t.u.add(String(e),n,!0,r,i)}function ke(t,e,n,r){if(!(e=t.u.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var s=e[o];if(s&&!s.ma&&s.capture==n){var a=s.listener,u=s.La||s.src;s.Ha&&de(t.u,s),i=!1!==a.call(u,r)&&i}}return i&&0!=r.Eb}function De(t,e,n){if(p(t))n&&(t=_(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=_(t.handleEvent,t)}return 2147483647<Number(e)?-1:i.setTimeout(t,e||0)}function je(t){var e=null;return new yt(function(n,r){-1==(e=De(function(){n(void 0)},t))&&r(Error("Failed to schedule timer."))}).o(function(t){throw i.clearTimeout(e),t})}function Me(t){if(t.R&&"function"==typeof t.R)return t.R();if(o(t))return t.split("");if(h(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}function Le(t){if(t.T&&"function"==typeof t.T)return t.T();if(!t.R||"function"!=typeof t.R){if(h(t)||o(t)){var e=[];t=t.length;for(var n=0;n<t;n++)e.push(n);return e}for(var r in e=[],n=0,t)e[n++]=r;return e}}function Fe(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof Fe)for(n=t.T(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function Ve(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];Ue(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)Ue(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function Ue(t,e){return Object.prototype.hasOwnProperty.call(t,e)}w(Ae,Mt),Ae.prototype[le]=!0,Ae.prototype.addEventListener=function(t,e,n,r){_e(this,t,e,n,r)},Ae.prototype.removeEventListener=function(t,e,n,r){we(this,t,e,n,r)},Ae.prototype.dispatchEvent=function(t){var e,n=this.Ta;if(n)for(e=[];n;n=n.Ta)e.push(n);n=this.Mb;var r=t.type||t;if(o(t))t=new ae(t,n);else if(t instanceof ae)t.target=t.target||n;else{var i=t;lt(t=new ae(r,n),i)}if(i=!0,e)for(var s=e.length-1;0<=s;s--){var a=t.b=e[s];i=ke(a,r,!0,t)&&i}if(i=ke(a=t.b=n,r,!0,t)&&i,i=ke(a,r,!1,t)&&i,e)for(s=0;s<e.length;s++)i=ke(a=t.b=e[s],r,!1,t)&&i;return i},Ae.prototype.ua=function(){if(Ae.lb.ua.call(this),this.u){var t,e=this.u;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)pe(n[r]);delete e.a[t],e.b--}}this.Ta=null},(t=Fe.prototype).R=function(){Ve(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},t.T=function(){return Ve(this),this.a.concat()},t.clear=function(){this.b={},this.c=this.a.length=0},t.get=function(t,e){return Ue(this.b,t)?this.b[t]:e},t.set=function(t,e){Ue(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},t.forEach=function(t,e){for(var n=this.T(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var Be=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function We(t,e){if(this.b=this.l=this.c="",this.i=null,this.h=this.g="",this.f=!1,t instanceof We){this.f=void 0!==e?e:t.f,qe(this,t.c),this.l=t.l,this.b=t.b,He(this,t.i),this.g=t.g,e=t.a;var n=new on;n.c=e.c,e.a&&(n.a=new Fe(e.a),n.b=e.b),Ge(this,n),this.h=t.h}else t&&(n=String(t).match(Be))?(this.f=!!e,qe(this,n[1]||"",!0),this.l=Qe(n[2]||""),this.b=Qe(n[3]||"",!0),He(this,n[4]),this.g=Qe(n[5]||"",!0),Ge(this,n[6]||"",!0),this.h=Qe(n[7]||"")):(this.f=!!e,this.a=new on(null,this.f))}function qe(t,e,n){t.c=n?Qe(e,!0):e,t.c&&(t.c=t.c.replace(/:$/,""))}function He(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.i=e}else t.i=null}function Ge(t,e,n){e instanceof on?(t.a=e,function(t,e){e&&!t.f&&(sn(t),t.c=null,t.a.forEach(function(t,e){var n=e.toLowerCase();e!=n&&(un(this,e),ln(this,n,t))},t)),t.f=e}(t.a,t.f)):(n||(e=Ye(e,nn)),t.a=new on(e,t.f))}function ze(t,e,n){t.a.set(e,n)}function Ke(t,e){return t.a.get(e)}function Je(t){return t instanceof We?new We(t):new We(t,void 0)}function Xe(t,e){var n=new We(null,void 0);return qe(n,"https"),t&&(n.b=t),e&&(n.g=e),n}function Qe(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function Ye(t,e,n){return o(t)?(t=encodeURI(t).replace(e,Ze),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function Ze(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}We.prototype.toString=function(){var t=[],e=this.c;e&&t.push(Ye(e,$e,!0),":");var n=this.b;return(n||"file"==e)&&(t.push("//"),(e=this.l)&&t.push(Ye(e,$e,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.i)&&t.push(":",String(n))),(n=this.g)&&(this.b&&"/"!=n.charAt(0)&&t.push("/"),t.push(Ye(n,"/"==n.charAt(0)?en:tn,!0))),(n=this.a.toString())&&t.push("?",n),(n=this.h)&&t.push("#",Ye(n,rn)),t.join("")};var $e=/[#\/\?@]/g,tn=/[#\?:]/g,en=/[#\?]/g,nn=/[#\?@]/g,rn=/#/g;function on(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function sn(t){t.a||(t.a=new Fe,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)}))}function an(t){var e=Le(t);if("undefined"==typeof e)throw Error("Keys are undefined");var n=new on(null,void 0);t=Me(t);for(var r=0;r<e.length;r++){var i=e[r],o=t[r];l(o)?ln(n,i,o):n.add(i,o)}return n}function un(t,e){sn(t),e=hn(t,e),Ue(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,Ue((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&Ve(t)))}function cn(t,e){return sn(t),e=hn(t,e),Ue(t.a.b,e)}function ln(t,e,n){un(t,e),0<n.length&&(t.c=null,t.a.set(hn(t,e),B(n)),t.b+=n.length)}function hn(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}(t=on.prototype).add=function(t,e){sn(this),this.c=null,t=hn(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},t.clear=function(){this.a=this.c=null,this.b=0},t.forEach=function(t,e){sn(this),this.a.forEach(function(n,r){D(n,function(n){t.call(e,n,r,this)},this)},this)},t.T=function(){sn(this);for(var t=this.a.R(),e=this.a.T(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},t.R=function(t){sn(this);var e=[];if(o(t))cn(this,t)&&(e=U(e,this.a.get(hn(this,t))));else{t=this.a.R();for(var n=0;n<t.length;n++)e=U(e,t[n])}return e},t.set=function(t,e){return sn(this),this.c=null,cn(this,t=hn(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},t.get=function(t,e){return 0<(t=t?this.R(t):[]).length?String(t[0]):e},t.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.T(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.R(r);for(var o=0;o<r.length;o++){var s=i;""!==r[o]&&(s+="="+encodeURIComponent(String(r[o]))),t.push(s)}}return this.c=t.join("&")};var pn=!Ht||9<=Number($t);function fn(){this.a="",this.b=vn}function dn(t){return t instanceof fn&&t.constructor===fn&&t.b===vn?t.a:(O("expected object of type Const, got '"+t+"'"),"type_error:Const")}fn.prototype.la=!0,fn.prototype.ja=function(){return this.a},fn.prototype.toString=function(){return"Const{"+this.a+"}"};var vn={};function yn(t){var e=new fn;return e.a=t,e}function gn(){this.a="",this.b=En}function _n(t){return t instanceof gn&&t.constructor===gn&&t.b===En?t.a:(O("expected object of type TrustedResourceUrl, got '"+t+"' of type "+u(t)),"type_error:TrustedResourceUrl")}function mn(t,e){var n=dn(t);if(!wn.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return function(t){var e=new gn;return e.a=t,e}(t=n.replace(bn,function(t,r){if(!Object.prototype.hasOwnProperty.call(e,r))throw Error('Found marker, "'+r+'", in format string, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(e));return(t=e[r])instanceof fn?dn(t):encodeURIComponent(String(t))}))}yn(""),gn.prototype.la=!0,gn.prototype.ja=function(){return this.a},gn.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var bn=/%{(\w+)}/g,wn=/^(?:https:)?\/\/[0-9a-z.:[\]-]+\/|^\/[^\/\\]|^about:blank#/i,En={};function Cn(){this.a="",this.b=In}function Sn(t){return t instanceof Cn&&t.constructor===Cn&&t.b===In?t.a:(O("expected object of type SafeUrl, got '"+t+"' of type "+u(t)),"type_error:SafeUrl")}Cn.prototype.la=!0,Cn.prototype.ja=function(){return this.a},Cn.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Tn=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function On(t){return t instanceof Cn?t:(t=t.la?t.ja():String(t),Tn.test(t)||(t="about:invalid#zClosurez"),Nn(t))}var In={};function Nn(t){var e=new Cn;return e.a=t,e}function xn(){this.a="",this.b=An}Nn("about:blank"),xn.prototype.la=!0,xn.prototype.ja=function(){return this.a},xn.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var An={};function Pn(t){var e=new xn;return e.a=t,e}function Rn(t){var e=document;return o(t)?e.getElementById(t):t}function kn(t,e){it(e,function(e,n){e&&e.la&&(e=e.ja()),"style"==n?t.style.cssText=e:"class"==n?t.className=e:"for"==n?t.htmlFor=e:Dn.hasOwnProperty(n)?t.setAttribute(Dn[n],e):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?t.setAttribute(n,e):t[n]=e})}Pn("<!DOCTYPE html>"),Pn(""),Pn("<br>");var Dn={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function jn(t){if(t&&"number"==typeof t.length){if(f(t))return"function"==typeof t.item||"string"==typeof t.item;if(p(t))return"function"==typeof t.item}return!1}function Mn(t){var e=[];return function t(e,n,r){if(null==n)r.push("null");else{if("object"==typeof n){if(l(n)){var i=n;n=i.length,r.push("[");for(var o="",s=0;s<n;s++)r.push(o),t(e,i[s],r),o=",";return void r.push("]")}if(!(n instanceof String||n instanceof Number||n instanceof Boolean)){for(i in r.push("{"),o="",n)Object.prototype.hasOwnProperty.call(n,i)&&"function"!=typeof(s=n[i])&&(r.push(o),Vn(i,r),r.push(":"),t(e,s,r),o=",");return void r.push("}")}n=n.valueOf()}switch(typeof n){case"string":Vn(n,r);break;case"number":r.push(isFinite(n)&&!isNaN(n)?String(n):"null");break;case"boolean":r.push(String(n));break;case"function":r.push("null");break;default:throw Error("Unknown type: "+typeof n)}}}(new function(){},t,e),e.join("")}var Ln={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},Fn=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function Vn(t,e){e.push('"',t.replace(Fn,function(t){var e=Ln[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),Ln[t]=e),e}),'"')}function Un(){var t=ir();return Ht&&!!$t&&11==$t||/Edge\/\d+/.test(t)}function Bn(){return i.window&&i.window.location.href||self&&self.location&&self.location.href||""}function Wn(t,e){e=e||i.window;var n="about:blank";t&&(n=Sn(On(t))),e.location.href=n}function qn(t){return!!((t=(t||ir()).toLowerCase()).match(/android/)||t.match(/webos/)||t.match(/iphone|ipad|ipod/)||t.match(/blackberry/)||t.match(/windows phone/)||t.match(/iemobile/))}function Hn(t){t=t||i.window;try{t.close()}catch(t){}}function Gn(t,e,n){var r=Math.floor(1e9*Math.random()).toString();e=e||500,n=n||600;var i=(window.screen.availHeight-n)/2,o=(window.screen.availWidth-e)/2;for(s in e={width:e,height:n,top:0<i?i:0,left:0<o?o:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=ir().toLowerCase(),r&&(e.target=r,$(n,"crios/")&&(e.target="_blank")),er(ir())==$n&&(t=t||"http://localhost",e.scrollbars=!0),n=t||"",(t=e)||(t={}),r=window,e=n instanceof Cn?n:On("undefined"!=typeof n.href?n.href:String(n)),n=t.target||n.target,i=[],t)switch(s){case"width":case"height":case"top":case"left":i.push(s+"="+t[s]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(s+"="+(t[s]?1:0))}var s=i.join(",");if((rt("iPhone")&&!rt("iPod")&&!rt("iPad")||rt("iPad")||rt("iPod"))&&r.navigator&&r.navigator.standalone&&n&&"_self"!=n?(s=r.document.createElement("A"),e instanceof Cn||e instanceof Cn||(e=e.la?e.ja():String(e),Tn.test(e)||(e="about:invalid#zClosurez"),e=Nn(e)),s.href=Sn(e),s.setAttribute("target",n),t.noreferrer&&s.setAttribute("rel","noreferrer"),(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,r,1),s.dispatchEvent(t),s={}):t.noreferrer?(s=r.open("",n,s),t=Sn(e),s&&(zt&&$(t,";")&&(t="'"+t.replace(/'/g,"%27")+"'"),s.opener=null,yn("b/12014412, meta tag with sanitized URL"),t=Pn(t='<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+H(t)+'">'),s.document.write(function(t){return t instanceof xn&&t.constructor===xn&&t.b===An?t.a:(O("expected object of type SafeHtml, got '"+t+"' of type "+u(t)),"type_error:SafeHtml")}(t)),s.document.close())):(s=r.open(Sn(e),n,s))&&t.noopener&&(s.opener=null),s)try{s.focus()}catch(t){}return s}var zn=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;function Kn(){var t=null;return new yt(function(e){"complete"==i.document.readyState?e():(t=function(){e()},be(window,"load",t))}).o(function(e){throw we(window,"load",t),e})}function Jn(t){return t=t||ir(),!("file:"!==cr()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function Xn(){var t=i.window;try{return!(!t||t==t.top)}catch(t){return!1}}function Qn(){return"object"!=typeof i.window&&"function"==typeof i.importScripts}function Yn(){return e.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":e.INTERNAL.hasOwnProperty("node")?"Node":Qn()?"Worker":"Browser"}function Zn(){var t=Yn();return"ReactNative"===t||"Node"===t}var $n="Firefox",tr="Chrome";function er(t){var e=t.toLowerCase();return $(e,"opera/")||$(e,"opr/")||$(e,"opios/")?"Opera":$(e,"iemobile")?"IEMobile":$(e,"msie")||$(e,"trident/")?"IE":$(e,"edge/")?"Edge":$(e,"firefox/")?$n:$(e,"silk/")?"Silk":$(e,"blackberry")?"Blackberry":$(e,"webos")?"Webos":!$(e,"safari/")||$(e,"chrome/")||$(e,"crios/")||$(e,"android")?!$(e,"chrome/")&&!$(e,"crios/")||$(e,"edge/")?$(e,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":tr:"Safari"}var nr={Pc:"FirebaseCore-web",Rc:"FirebaseUI-web"};function rr(t,e){e=e||[];var n,r=[],i={};for(n in nr)i[nr[n]]=!0;for(n=0;n<e.length;n++)"undefined"!=typeof i[e[n]]&&(delete i[e[n]],r.push(e[n]));return r.sort(),(e=r).length||(e=["FirebaseCore-web"]),"Browser"===(r=Yn())?r=er(i=ir()):"Worker"===r&&(r=er(i=ir())+"-"+r),r+"/JsCore/"+t+"/"+e.join(",")}function ir(){return i.navigator&&i.navigator.userAgent||""}function or(t,e){t=t.split("."),e=e||i;for(var n=0;n<t.length&&"object"==typeof e&&null!=e;n++)e=e[t[n]];return n!=t.length&&(e=void 0),e}function sr(){try{var t=i.localStorage,e=dr();if(t)return t.setItem(e,"1"),t.removeItem(e),!Un()||!!i.indexedDB}catch(t){return Qn()&&!!i.indexedDB}return!1}function ar(){return(ur()||"chrome-extension:"===cr()||Jn())&&!Zn()&&sr()&&!Qn()}function ur(){return"http:"===cr()||"https:"===cr()}function cr(){return i.location&&i.location.protocol||null}function lr(t){return!qn(t=t||ir())&&er(t)!=$n}function hr(t){return"undefined"==typeof t?null:Mn(t)}function pr(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&null!==t[e]&&void 0!==t[e]&&(n[e]=t[e]);return n}function fr(t){if(null!==t)return JSON.parse(t)}function dr(t){return t||Math.floor(1e9*Math.random()).toString()}function vr(t){return"Safari"!=er(t=t||ir())&&!t.toLowerCase().match(/iphone|ipad|ipod/)}function yr(){var t=i.___jsl;if(t&&t.H)for(var e in t.H)if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=t.H[e].L.concat(),t.CP)for(var n=0;n<t.CP.length;n++)t.CP[n]=null}function gr(){var t=i.navigator;return!t||"boolean"!=typeof t.onLine||!ur()&&"chrome-extension:"!==cr()&&"undefined"==typeof t.connection||t.onLine}function _r(t,e){if(t>e)throw Error("Short delay should be less than long delay!");this.c=t,this.b=e,t=ir(),e=Yn(),this.a=qn(t)||"ReactNative"===e}function mr(){var t=i.document;return!t||"undefined"==typeof t.visibilityState||"visible"==t.visibilityState}function br(t){try{var e=new Date(parseInt(t,10));if(!isNaN(e.getTime())&&!/[^0-9]/.test(t))return e.toUTCString()}catch(t){}return null}function wr(){return!(!or("fireauth.oauthhelper",i)&&!or("fireauth.iframe",i))}_r.prototype.get=function(){return this.a?this.b:this.c};var Er,Cr={};try{var Sr={};Object.defineProperty(Sr,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Sr,"abcd",{configurable:!0,enumerable:!0,value:2}),Er=2==Sr.abcd}catch(Wt){Er=!1}function Tr(t,e,n){Er?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n}):t[e]=n}function Or(t,e){if(e)for(var n in e)e.hasOwnProperty(n)&&Tr(t,n,e[n])}function Ir(t){var e={};return Or(e,t),e}function Nr(t){var e=t;if("object"==typeof t&&null!=t)for(var n in e="length"in t?[]:{},t)Tr(e,n,Nr(t[n]));return e}function xr(t,e){this.code=Pr+t,this.message=e||Rr[t]||""}function Ar(t){var e=t&&t.code;return e?new xr(e.substring(Pr.length),t.message):null}w(xr,Error),xr.prototype.C=function(){return{code:this.code,message:this.message}},xr.prototype.toJSON=function(){return this.C()};var Pr="auth/",Rr={"argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","user-cancelled":"User did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."};function kr(t){var e=t[Lr];if("undefined"==typeof e)throw new xr("missing-continue-uri");if("string"!=typeof e||"string"==typeof e&&!e.length)throw new xr("invalid-continue-uri");this.h=e,this.b=this.a=null,this.g=!1;var n=t[Dr];if(n&&"object"==typeof n){e=n[Ur];var r=n[Fr];if(n=n[Vr],"string"==typeof e&&e.length){if(this.a=e,"undefined"!=typeof r&&"boolean"!=typeof r)throw new xr("argument-error",Fr+" property must be a boolean when specified.");if(this.g=!!r,"undefined"!=typeof n&&("string"!=typeof n||"string"==typeof n&&!n.length))throw new xr("argument-error",Vr+" property must be a non empty string when specified.");this.b=n||null}else{if("undefined"!=typeof e)throw new xr("argument-error",Ur+" property must be a non empty string when specified.");if("undefined"!=typeof r||"undefined"!=typeof n)throw new xr("missing-android-pkg-name")}}else if("undefined"!=typeof n)throw new xr("argument-error",Dr+" property must be a non null object when specified.");if(this.f=null,(e=t[Mr])&&"object"==typeof e){if("string"==typeof(e=e[Br])&&e.length)this.f=e;else if("undefined"!=typeof e)throw new xr("argument-error",Br+" property must be a non empty string when specified.")}else if("undefined"!=typeof e)throw new xr("argument-error",Mr+" property must be a non null object when specified.");if("undefined"!=typeof(t=t[jr])&&"boolean"!=typeof t)throw new xr("argument-error",jr+" property must be a boolean when specified.");this.c=!!t}var Dr="android",jr="handleCodeInApp",Mr="iOS",Lr="url",Fr="installApp",Vr="minimumVersion",Ur="packageName",Br="bundleId";function Wr(t){var e={};for(var n in e.continueUrl=t.h,e.canHandleCodeInApp=t.c,(e.androidPackageName=t.a)&&(e.androidMinimumVersion=t.b,e.androidInstallApp=t.g),e.iOSBundleId=t.f,e)null===e[n]&&delete e[n];return e}var qr=null,Hr=null;function Gr(t){this.c=t.sub,b(),this.a=t.provider_id||t.firebase&&t.firebase.sign_in_provider||null,this.b=!!t.is_anonymous||"anonymous"==this.a}function zr(t){if(3!=(t=t.split(".")).length)return null;for(var e=(4-(t=t[1]).length%4)%4,n=0;n<e;n++)t+=".";try{var r=JSON.parse(function(t){var e="";return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=Hr[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}!function(){if(!qr){qr={},Hr={};for(var t=0;65>t;t++)qr[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t),Hr[qr[t]]=t,62<=t&&(Hr["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(t)]=t)}}();for(var r=0;;){var i=n(-1),o=n(0),s=n(64),a=n(64);if(64===a&&-1===i)break;e(i<<2|o>>4),64!=s&&(e(o<<4&240|s>>2),64!=a&&e(s<<6&192|a))}}(t,function(t){e+=String.fromCharCode(t)}),e}(t));if(r.sub&&r.iss&&r.aud&&r.exp)return new Gr(r)}catch(t){}return null}Gr.prototype.f=function(){return this.b};var Kr="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),Jr=["client_id","response_type","scope","redirect_uri","state"],Xr={Qc:{Ma:"locale",Aa:500,za:600,Na:"facebook.com",cb:Jr},Sc:{Ma:null,Aa:500,za:620,Na:"github.com",cb:Jr},Tc:{Ma:"hl",Aa:515,za:680,Na:"google.com",cb:Jr},Zc:{Ma:"lang",Aa:485,za:705,Na:"twitter.com",cb:Kr}};function Qr(t){for(var e in Xr)if(Xr[e].Na==t)return Xr[e];return null}function Yr(t){var e={};e["facebook.com"]=ni,e["google.com"]=ii,e["github.com"]=ri,e["twitter.com"]=oi;var n=t&&t[$r];try{if(n)return e[n]?new e[n](t):new ei(t);if("undefined"!=typeof t[Zr])return new ti(t)}catch(t){}return null}var Zr="idToken",$r="providerId";function ti(t){var e=t[$r];if(!e&&t[Zr]){var n=zr(t[Zr]);n&&n.a&&(e=n.a)}if(!e)throw Error("Invalid additional user info!");"anonymous"!=e&&"custom"!=e||(e=null),n=!1,"undefined"!=typeof t.isNewUser?n=!!t.isNewUser:"identitytoolkit#SignupNewUserResponse"===t.kind&&(n=!0),Tr(this,"providerId",e),Tr(this,"isNewUser",n)}function ei(t){ti.call(this,t),Tr(this,"profile",Nr((t=fr(t.rawUserInfo||"{}"))||{}))}function ni(t){if(ei.call(this,t),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function ri(t){if(ei.call(this,t),"github.com"!=this.providerId)throw Error("Invalid provider ID!");Tr(this,"username",this.profile&&this.profile.login||null)}function ii(t){if(ei.call(this,t),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function oi(t){if(ei.call(this,t),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");Tr(this,"username",t.screenName||null)}function si(t){var e=Je(t),n=Ke(e,"link"),r=Ke(Je(n),"link");return Ke(Je(e=Ke(e,"deep_link_id")),"link")||e||r||n||t}function ai(t,e){return t.then(function(t){if(t[Vo]){var n=zr(t[Vo]);if(!n||e!=n.c)throw new xr("user-mismatch");return t}throw new xr("user-mismatch")}).o(function(t){throw t&&t.code&&t.code==Pr+"user-not-found"?new xr("user-mismatch"):t})}function ui(t,e,n){if(e.idToken||e.accessToken)e.idToken&&Tr(this,"idToken",e.idToken),e.accessToken&&Tr(this,"accessToken",e.accessToken);else{if(!e.oauthToken||!e.oauthTokenSecret)throw new xr("internal-error","failed to construct a credential");Tr(this,"accessToken",e.oauthToken),Tr(this,"secret",e.oauthTokenSecret)}Tr(this,"providerId",t),Tr(this,"signInMethod",n)}function ci(t){var e={};return t.idToken&&(e.id_token=t.idToken),t.accessToken&&(e.access_token=t.accessToken),t.secret&&(e.oauth_token_secret=t.secret),e.providerId=t.providerId,{postBody:an(e).toString(),requestUri:"http://localhost"}}function li(t,e){this.zc=e||[],Or(this,{providerId:t,isOAuthProvider:!0}),this.tb={},this.Za=(Qr(t)||{}).Ma||null,this.Xa=null}function hi(t){li.call(this,t,Jr),this.a=[]}function pi(){hi.call(this,"facebook.com")}function fi(t){if(!t)throw new xr("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return f(t)&&(e=t.accessToken),(new pi).credential(null,e)}function di(){hi.call(this,"github.com")}function vi(t){if(!t)throw new xr("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return f(t)&&(e=t.accessToken),(new di).credential(null,e)}function yi(){hi.call(this,"google.com"),this.ta("profile")}function gi(t,e){var n=t;return f(t)&&(n=t.idToken,e=t.accessToken),(new yi).credential(n,e)}function _i(){li.call(this,"twitter.com",Kr)}function mi(t,e){var n=t;if(f(n)||(n={oauthToken:t,oauthTokenSecret:e}),!n.oauthToken||!n.oauthTokenSecret)throw new xr("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new ui("twitter.com",n,"twitter.com")}function bi(t,e,n){this.a=t,this.b=e,Tr(this,"providerId","password"),Tr(this,"signInMethod",n===wi.EMAIL_LINK_SIGN_IN_METHOD?wi.EMAIL_LINK_SIGN_IN_METHOD:wi.EMAIL_PASSWORD_SIGN_IN_METHOD)}function wi(){Or(this,{providerId:"password",isOAuthProvider:!1})}function Ei(t,e){if(!(e=Ci(e)))throw new xr("argument-error","Invalid email link!");return new bi(t,e,wi.EMAIL_LINK_SIGN_IN_METHOD)}function Ci(t){var e=Ke((t=new function(t){this.a=Je(t)}(t=si(t))).a,"oobCode")||null;return"signIn"===(Ke(t.a,"mode")||null)&&e?e:null}function Si(t){if(!(t.Ra&&t.Qa||t.Ea&&t.Y))throw new xr("internal-error");this.a=t,Tr(this,"providerId","phone"),Tr(this,"signInMethod","phone")}function Ti(t){return t.a.Ea&&t.a.Y?{temporaryProof:t.a.Ea,phoneNumber:t.a.Y}:{sessionInfo:t.a.Ra,code:t.a.Qa}}function Oi(t){try{this.a=t||e.auth()}catch(t){throw new xr("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Or(this,{providerId:"phone",isOAuthProvider:!1})}function Ii(t,e){if(!t)throw new xr("missing-verification-id");if(!e)throw new xr("missing-verification-code");return new Si({Ra:t,Qa:e})}function Ni(t){if(t.temporaryProof&&t.phoneNumber)return new Si({Ea:t.temporaryProof,Y:t.phoneNumber});var e=t&&t.providerId;if(!e||"password"===e)return null;var n=t&&t.oauthAccessToken,r=t&&t.oauthTokenSecret;t=t&&t.oauthIdToken;try{switch(e){case"google.com":return gi(t,n);case"facebook.com":return fi(n);case"github.com":return vi(n);case"twitter.com":return mi(n,r);default:return new hi(e).credential(t,n)}}catch(t){return null}}function xi(t){if(!t.isOAuthProvider)throw new xr("invalid-oauth-provider")}function Ai(t,e,n,r,i){if(this.b=t,this.c=e||null,this.f=n||null,this.g=r||null,this.a=i||null,!this.f&&!this.a)throw new xr("invalid-auth-event");if(this.f&&this.a)throw new xr("invalid-auth-event");if(this.f&&!this.g)throw new xr("invalid-auth-event")}function Pi(t){return(t=t||{}).type?new Ai(t.type,t.eventId,t.urlResponse,t.sessionId,t.error&&Ar(t.error)):null}function Ri(){this.b=null,this.a=[]}w(ei,ti),w(ni,ei),w(ri,ei),w(ii,ei),w(oi,ei),ui.prototype.xa=function(t){return ns(t,ci(this))},ui.prototype.c=function(t,e){var n=ci(this);return n.idToken=e,rs(t,n)},ui.prototype.f=function(t,e){return ai(is(t,ci(this)),e)},ui.prototype.C=function(){var t={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(t.oauthIdToken=this.idToken),this.accessToken&&(t.oauthAccessToken=this.accessToken),this.secret&&(t.oauthTokenSecret=this.secret),t},li.prototype.Ca=function(t){return this.tb=st(t),this},w(hi,li),hi.prototype.ta=function(t){return L(this.a,t)||this.a.push(t),this},hi.prototype.yb=function(){return B(this.a)},hi.prototype.credential=function(t,e){if(!t&&!e)throw new xr("argument-error","credential failed: must provide the ID token and/or the access token.");return new ui(this.providerId,{idToken:t||null,accessToken:e||null},this.providerId)},w(pi,hi),Tr(pi,"PROVIDER_ID","facebook.com"),Tr(pi,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),w(di,hi),Tr(di,"PROVIDER_ID","github.com"),Tr(di,"GITHUB_SIGN_IN_METHOD","github.com"),w(yi,hi),Tr(yi,"PROVIDER_ID","google.com"),Tr(yi,"GOOGLE_SIGN_IN_METHOD","google.com"),w(_i,li),Tr(_i,"PROVIDER_ID","twitter.com"),Tr(_i,"TWITTER_SIGN_IN_METHOD","twitter.com"),bi.prototype.xa=function(t){return this.signInMethod==wi.EMAIL_LINK_SIGN_IN_METHOD?ks(t,ps,{email:this.a,oobCode:this.b}):ks(t,xs,{email:this.a,password:this.b})},bi.prototype.c=function(t,e){return this.signInMethod==wi.EMAIL_LINK_SIGN_IN_METHOD?ks(t,fs,{idToken:e,email:this.a,oobCode:this.b}):ks(t,Cs,{idToken:e,email:this.a,password:this.b})},bi.prototype.f=function(t,e){return ai(this.xa(t),e)},bi.prototype.C=function(){return{email:this.a,password:this.b,signInMethod:this.signInMethod}},Or(wi,{PROVIDER_ID:"password"}),Or(wi,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Or(wi,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Si.prototype.xa=function(t){return t.Sa(Ti(this))},Si.prototype.c=function(t,e){var n=Ti(this);return n.idToken=e,ks(t,Ps,n)},Si.prototype.f=function(t,e){var n=Ti(this);return n.operation="REAUTH",ai(t=ks(t,Rs,n),e)},Si.prototype.C=function(){var t={providerId:"phone"};return this.a.Ra&&(t.verificationId=this.a.Ra),this.a.Qa&&(t.verificationCode=this.a.Qa),this.a.Ea&&(t.temporaryProof=this.a.Ea),this.a.Y&&(t.phoneNumber=this.a.Y),t},Oi.prototype.Sa=function(t,e){var n=this.a.b;return Ct(e.verify()).then(function(r){if(!o(r))throw new xr("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(e.type){case"recaptcha":return function(t,e){return ks(n,ws,e)}(0,{phoneNumber:t,recaptchaToken:r}).then(function(t){return"function"==typeof e.reset&&e.reset(),t},function(t){throw"function"==typeof e.reset&&e.reset(),t});default:throw new xr("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}})},Or(Oi,{PROVIDER_ID:"phone"}),Or(Oi,{PHONE_SIGN_IN_METHOD:"phone"}),Ai.prototype.C=function(){return{type:this.b,eventId:this.c,urlResponse:this.f,sessionId:this.g,error:this.a&&this.a.C()}};var ki=null;function Di(t){var e="unauthorized-domain",n=void 0,r=Je(t);t=r.b,"chrome-extension"==(r=r.c)?n=W("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):"http"==r||"https"==r?n=W("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):e="operation-not-supported-in-this-environment",xr.call(this,e,n)}function ji(t,e,n){xr.call(this,t,n),(t=e||{}).ub&&Tr(this,"email",t.ub),t.Y&&Tr(this,"phoneNumber",t.Y),t.credential&&Tr(this,"credential",t.credential)}function Mi(t){if(t.code){var e=t.code||"";0==e.indexOf(Pr)&&(e=e.substring(Pr.length));var n={credential:Ni(t)};if(t.email)n.ub=t.email;else{if(!t.phoneNumber)return new xr(e,t.message||void 0);n.Y=t.phoneNumber}return new ji(e,n,t.message)}return null}Ri.prototype.subscribe=function(t){var e=this;this.a.push(t),this.b||(this.b=function(t){for(var n=0;n<e.a.length;n++)e.a[n](t)},"function"==typeof(t=or("universalLinks.subscribe",i))&&t(null,this.b))},Ri.prototype.unsubscribe=function(t){V(this.a,function(e){return e==t})},w(Di,xr),w(ji,xr),ji.prototype.C=function(){var t={code:this.code,message:this.message};this.email&&(t.email=this.email),this.phoneNumber&&(t.phoneNumber=this.phoneNumber);var e=this.credential&&this.credential.C();return e&<(t,e),t},ji.prototype.toJSON=function(){return this.C()};var Li,Fi=/^[+a-zA-Z0-9_.!#$%&'*\/=?^`{|}~-]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,63}$/;function Vi(){}function Ui(){}function Bi(t){if(!t.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<e.length;n++){var r=e[n];try{return new ActiveXObject(r),t.f=r}catch(t){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.f}function Wi(){}function qi(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseText="",this.status=-1,this.statusText="",this.a.onload=_(this.ac,this),this.a.onerror=_(this.zb,this),this.a.onprogress=_(this.bc,this),this.a.ontimeout=_(this.ec,this)}function Hi(t,e){t.readyState=e,t.onreadystatechange&&t.onreadystatechange()}function Gi(t,e,n){this.reset(t,e,n,void 0,void 0)}function zi(t){this.f=t,this.b=this.c=this.a=null}function Ki(t,e){this.name=t,this.value=e}Vi.prototype.c=null,w(Ui,Vi),Ui.prototype.a=function(){var t=Bi(this);return t?new ActiveXObject(t):new XMLHttpRequest},Ui.prototype.b=function(){var t={};return Bi(this)&&(t[0]=!0,t[1]=!0),t},Li=new Ui,w(Wi,Vi),Wi.prototype.a=function(){var t=new XMLHttpRequest;if("withCredentials"in t)return t;if("undefined"!=typeof XDomainRequest)return new qi;throw Error("Unsupported browser")},Wi.prototype.b=function(){return{}},(t=qi.prototype).open=function(t,e,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(t,e)},t.send=function(t){if(t){if("string"!=typeof t)throw Error("Only string data is supported");this.a.send(t)}else this.a.send()},t.abort=function(){this.a.abort()},t.setRequestHeader=function(){},t.getResponseHeader=function(t){return"content-type"==t.toLowerCase()?this.a.contentType:""},t.ac=function(){this.status=200,this.responseText=this.a.responseText,Hi(this,4)},t.zb=function(){this.status=500,this.responseText="",Hi(this,4)},t.ec=function(){this.zb()},t.bc=function(){this.status=200,Hi(this,1)},t.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},Gi.prototype.a=null,Gi.prototype.reset=function(t,e,n,r,i){r||b(),delete this.a},Ki.prototype.toString=function(){return this.name};var Ji=new Ki("SEVERE",1e3),Xi=new Ki("WARNING",900),Qi=new Ki("CONFIG",700),Yi=new Ki("FINE",500);zi.prototype.log=function(t,e,n){if(t.value>=function t(e){return e.c?e.c:e.a?t(e.a):(O("Root logger has no level set."),null)}(this).value)for(p(e)&&(e=e()),t=new Gi(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var Zi={},$i=null;function to(t){var e;if($i||($i=new zi(""),Zi[""]=$i,$i.c=Qi),!(e=Zi[t])){e=new zi(t);var n=t.lastIndexOf("."),r=t.substr(n+1);(n=to(t.substr(0,n))).b||(n.b={}),n.b[r]=e,e.a=n,Zi[t]=e}return e}function eo(t,e){t&&t.log(Yi,e,void 0)}function no(t){this.f=t}function ro(t){Ae.call(this),this.i=t,this.readyState=io,this.status=0,this.responseText=this.statusText="",this.onreadystatechange=null,this.g=new Headers,this.b=null,this.h="GET",this.c="",this.a=!1,this.f=to("goog.net.FetchXmlHttp")}w(no,Vi),no.prototype.a=function(){return new ro(this.f)},no.prototype.b=function(t){return function(){return t}}({}),w(ro,Ae);var io=0;function oo(t){t.onreadystatechange&&t.onreadystatechange.call(t)}function so(t){Ae.call(this),this.headers=new Fe,this.D=t||null,this.c=!1,this.A=this.a=null,this.h=this.N=this.l="",this.f=this.I=this.i=this.G=!1,this.g=0,this.s=null,this.m=ao,this.v=this.O=!1}(t=ro.prototype).open=function(t,e){if(this.readyState!=io)throw this.abort(),Error("Error reopening a connection");this.h=t,this.c=e,this.readyState=1,oo(this)},t.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var e={headers:this.g,method:this.h,credentials:void 0,cache:void 0};t&&(e.body=t),this.i.fetch(new Request(this.c,e)).then(this.dc.bind(this),this.Ab.bind(this))},t.abort=function(){this.responseText="",this.g=new Headers,this.status=0,1<=this.readyState&&this.a&&4!=this.readyState&&(this.readyState=4,this.a=!1,oo(this)),this.readyState=io},t.dc=function(t){this.a&&(this.b||(this.b=t.headers,this.readyState=2,oo(this)),this.a&&(this.readyState=3,oo(this),this.a&&t.text().then(this.cc.bind(this,t),this.Ab.bind(this))))},t.cc=function(t,e){this.a&&(this.status=t.status,this.statusText=t.statusText,this.responseText=e,this.readyState=4,oo(this))},t.Ab=function(t){var e=this.f;e&&e.log(Xi,"Failed to fetch url "+this.c,t instanceof Error?t:Error(t)),this.a&&(this.readyState=4,oo(this))},t.setRequestHeader=function(t,e){this.g.append(t,e)},t.getResponseHeader=function(t){return this.b?this.b.get(t.toLowerCase())||"":((t=this.f)&&t.log(Xi,"Attempting to get response header but no headers have been received for url: "+this.c,void 0),"")},t.getAllResponseHeaders=function(){if(!this.b){var t=this.f;return t&&t.log(Xi,"Attempting to get all response headers but no headers have been received for url: "+this.c,void 0),""}t=[];for(var e=this.b.entries(),n=e.next();!n.done;)t.push((n=n.value)[0]+": "+n[1]),n=e.next();return t.join("\r\n")},w(so,Ae);var ao="";so.prototype.b=to("goog.net.XhrIo");var uo=/^https?$/i,co=["POST","PUT"];function lo(t){return"content-type"==t.toLowerCase()}function ho(t,e){t.c=!1,t.a&&(t.f=!0,t.a.abort(),t.f=!1),t.h=e,po(t),vo(t)}function po(t){t.G||(t.G=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function fo(t){if(t.c&&"undefined"!=typeof r)if(t.A[1]&&4==go(t)&&2==_o(t))eo(t.b,mo(t,"Local request error detected and ignored"));else if(t.i&&4==go(t))De(t.Db,0,t);else if(t.dispatchEvent("readystatechange"),4==go(t)){eo(t.b,mo(t,"Request complete")),t.c=!1;try{var e,n=_o(t);t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var o=!0;break t;default:o=!1}if(!(e=o)){var s;if(s=0===n){var a=String(t.l).match(Be)[1]||null;if(!a&&i.self&&i.self.location){var u=i.self.location.protocol;a=u.substr(0,u.length-1)}s=!uo.test(a?a.toLowerCase():"")}e=s}if(e)t.dispatchEvent("complete"),t.dispatchEvent("success");else{try{var c=2<go(t)?t.a.statusText:""}catch(e){eo(t.b,"Can not get status: "+e.message),c=""}t.h=c+" ["+_o(t)+"]",po(t)}}finally{vo(t)}}}function vo(t,e){if(t.a){yo(t);var n=t.a,r=t.A[0]?a:null;t.a=null,t.A=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(e){(t=t.b)&&t.log(Ji,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}}function yo(t){t.a&&t.v&&(t.a.ontimeout=null),t.s&&(i.clearTimeout(t.s),t.s=null)}function go(t){return t.a?t.a.readyState:0}function _o(t){try{return 2<go(t)?t.a.status:-1}catch(t){return-1}}function mo(t,e){return e+" ["+t.N+" "+t.l+" "+_o(t)+"]"}function bo(t,e){this.g=[],this.v=t,this.s=e||null,this.f=this.a=!1,this.c=void 0,this.u=this.A=this.i=!1,this.h=0,this.b=null,this.l=0}function wo(t,e,n){t.a=!0,t.c=n,t.f=!e,To(t)}function Eo(t){if(t.a){if(!t.u)throw new Oo(t);t.u=!1}}function Co(t,e,n,r){t.g.push([e,n,r]),t.a&&To(t)}function So(t){return M(t.g,function(t){return p(t[1])})}function To(t){if(t.h&&t.a&&So(t)){var e=t.h,n=xo[e];n&&(i.clearTimeout(n.a),delete xo[e]),t.h=0}t.b&&(t.b.l--,delete t.b),e=t.c;for(var r=n=!1;t.g.length&&!t.i;){var o=t.g.shift(),s=o[0],a=o[1];if(o=o[2],s=t.f?a:s)try{var u=s.call(o||t.s,e);void 0!==u&&(t.f=t.f&&(u==e||u instanceof Error),t.c=e=u),(C(e)||"function"==typeof i.Promise&&e instanceof i.Promise)&&(r=!0,t.i=!0)}catch(r){e=r,t.f=!0,So(t)||(n=!0)}}t.c=e,r&&(u=_(t.m,t,!0),r=_(t.m,t,!1),e instanceof bo?(Co(e,u,r),e.A=!0):e.then(u,r)),n&&(e=new No(e),xo[e.a]=e,t.h=e.a)}function Oo(){S.call(this)}function Io(){S.call(this)}function No(t){this.a=i.setTimeout(_(this.c,this),0),this.b=t}(t=so.prototype).Fa=function(){"undefined"!=typeof r&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",eo(this.b,mo(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},t.abort=function(){this.a&&this.c&&(eo(this.b,mo(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),vo(this))},t.ua=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),vo(this,!0)),so.lb.ua.call(this)},t.Db=function(){this.pa||(this.I||this.i||this.f?fo(this):this.sc())},t.sc=function(){fo(this)},t.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.m){case ao:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var t=this.b;return t&&t.log(Ji,"Response type "+this.m+" is not supported on this browser",void 0),null}catch(t){return eo(this.b,"Can not get response: "+t.message),null}},bo.prototype.cancel=function(t){if(this.a)this.c instanceof bo&&this.c.cancel();else{if(this.b){var e=this.b;delete this.b,t?e.cancel(t):(e.l--,0>=e.l&&e.cancel())}this.v?this.v.call(this.s,this):this.u=!0,this.a||(t=new Io(this),Eo(this),wo(this,!1,t))}},bo.prototype.m=function(t,e){this.i=!1,wo(this,t,e)},bo.prototype.D=function(){Eo(this),wo(this,!0,null)},bo.prototype.then=function(t,e,n){var r,i,o=new yt(function(t,e){r=t,i=e});return Co(this,r,function(t){t instanceof Io?o.cancel():i(t)}),o.then(t,e,n)},E(bo),w(Oo,S),Oo.prototype.message="Deferred has already fired",Oo.prototype.name="AlreadyCalledError",w(Io,S),Io.prototype.message="Deferred was canceled",Io.prototype.name="CanceledError",No.prototype.c=function(){throw delete xo[this.a],this.b};var xo={};function Ao(t){var e={},n=e.document||document,r=_n(t),i=document.createElement("SCRIPT"),o={Fb:i,Fa:void 0},s=new bo(Po,o),a=null,u=null!=e.timeout?e.timeout:5e3;return 0<u&&(a=window.setTimeout(function(){Ro(i,!0);var t=new jo(Do,"Timeout reached for loading script "+r);Eo(s),wo(s,!1,t)},u),o.Fa=a),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(Ro(i,e.ad||!1,a),s.D())},i.onerror=function(){Ro(i,!0,a);var t=new jo(ko,"Error while loading script "+r);Eo(s),wo(s,!1,t)},lt(o=e.attributes||{},{type:"text/javascript",charset:"UTF-8"}),kn(i,o),i.src=_n(t),function(t){var e;return(e=(t||document).getElementsByTagName("HEAD"))&&0!=e.length?e[0]:t.documentElement}(n).appendChild(i),s}function Po(){if(this&&this.Fb){var t=this.Fb;t&&"SCRIPT"==t.tagName&&Ro(t,!0,this.Fa)}}function Ro(t,e,n){null!=n&&i.clearTimeout(n),t.onload=a,t.onerror=a,t.onreadystatechange=a,e&&window.setTimeout(function(){t&&t.parentNode&&t.parentNode.removeChild(t)},0)}var ko=0,Do=1;function jo(t,e){var n="Jsloader error (code #"+t+")";e&&(n+=": "+e),S.call(this,n),this.code=t}function Mo(t){this.f=t}function Lo(t,n,r){if(this.b=t,this.i=(t=n||{}).secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.l=t.secureTokenTimeout||Uo,this.f=st(t.secureTokenHeaders||Bo),this.g=t.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.h=t.firebaseTimeout||Wo,this.a=st(t.firebaseHeaders||qo),r&&(this.a["X-Client-Version"]=r,this.f["X-Client-Version"]=r),r="Node"==Yn(),!(r=i.XMLHttpRequest||r&&e.INTERNAL.node&&e.INTERNAL.node.XMLHttpRequest)&&!Qn())throw new xr("internal-error","The XMLHttpRequest compatibility library was not found.");this.c=void 0,this.c=Qn()?new no(self):Zn()?new Mo(r):new Wi}w(jo,S),w(Mo,Vi),Mo.prototype.a=function(){return new this.f},Mo.prototype.b=function(){return{}};var Fo,Vo="idToken",Uo=new _r(3e4,6e4),Bo={"Content-Type":"application/x-www-form-urlencoded"},Wo=new _r(3e4,6e4),qo={"Content-Type":"application/json"};function Ho(t,e){e?t.a["X-Firebase-Locale"]=e:delete t.a["X-Firebase-Locale"]}function Go(t,e){e?(t.a["X-Client-Version"]=e,t.f["X-Client-Version"]=e):(delete t.a["X-Client-Version"],delete t.f["X-Client-Version"])}function zo(t,e,n,r,o,s,a){gr()?(function(){var t=ir();return!((t=er(t)!=tr?null:(t=t.match(/\sChrome\/(\d+)/i))&&2==t.length?parseInt(t[1],10):null)&&30>t||Ht&&$t&&!(9<$t))}()||Qn()?t=_(t.m,t):(Fo||(Fo=new yt(function(t,e){!function(t,e){if(((window.gapi||{}).client||{}).request)t();else{i[Jo]=function(){((window.gapi||{}).client||{}).request?t():e(Error("CORS_UNSUPPORTED"))};var n=mn(Ko,{onload:Jo});!function(t,e){Co(Ao(n),null,e,void 0)}(0,function(){e(Error("CORS_UNSUPPORTED"))})}}(t,e)})),t=_(t.u,t)),t(e,n,r,o,s,a)):n&&n(null)}Lo.prototype.m=function(t,e,n,r,s,a){if(Qn()&&("undefined"==typeof i.fetch||"undefined"==typeof i.Headers||"undefined"==typeof i.Request))throw new xr("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var u=new so(this.c);if(a){u.g=Math.max(0,a);var c=setTimeout(function(){u.dispatchEvent("timeout")},a)}Pe(u,"complete",function(){c&&clearTimeout(c);var t=null;try{t=JSON.parse(function(t){try{return t.a?t.a.responseText:""}catch(e){return eo(t.b,"Can not get responseText: "+e.message),""}}(this))||null}catch(e){t=null}e&&e(t)}),Re(u,"ready",function(){c&&clearTimeout(c),Vt(this)}),Re(u,"timeout",function(){c&&clearTimeout(c),Vt(this),e&&e(null)}),function(t,e,n,r,s){if(t.a)throw Error("[goog.net.XhrIo] Object is active with another request="+t.l+"; newUri="+e);n=n?n.toUpperCase():"GET",t.l=e,t.h="",t.N=n,t.G=!1,t.c=!0,t.a=t.D?t.D.a():Li.a(),t.A=function(t){return t.c||(t.c=t.b())}(t.D?t.D:Li),t.a.onreadystatechange=_(t.Db,t);try{eo(t.b,mo(t,"Opening Xhr")),t.I=!0,t.a.open(n,String(e),!0),t.I=!1}catch(e){return eo(t.b,mo(t,"Error opening Xhr: "+e.message)),void ho(t,e)}e=r||"";var a=new Fe(t.headers);s&&function(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(h(t)||o(t))D(t,e,void 0);else for(var n=Le(t),r=Me(t),i=r.length,s=0;s<i;s++)e.call(void 0,r[s],n&&n[s],t)}(s,function(t,e){a.set(e,t)}),s=function(t){t:{for(var e=lo,n=t.length,r=o(t)?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0>e?null:o(t)?t.charAt(e):t[e]}(a.T()),r=i.FormData&&e instanceof i.FormData,!L(co,n)||s||r||a.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),a.forEach(function(t,e){this.a.setRequestHeader(e,t)},t),t.m&&(t.a.responseType=t.m),"withCredentials"in t.a&&t.a.withCredentials!==t.O&&(t.a.withCredentials=t.O);try{yo(t),0<t.g&&(t.v=function(t){return Ht&&ee(9)&&"number"==typeof t.timeout&&void 0!==t.ontimeout}(t.a),eo(t.b,mo(t,"Will abort after "+t.g+"ms if incomplete, xhr2 "+t.v)),t.v?(t.a.timeout=t.g,t.a.ontimeout=_(t.Fa,t)):t.s=De(t.Fa,t.g,t)),eo(t.b,mo(t,"Sending request")),t.i=!0,t.a.send(e),t.i=!1}catch(e){eo(t.b,mo(t,"Send error: "+e.message)),ho(t,e)}}(u,t,n,r,s)};var Ko=yn("https://apis.google.com/js/client.js?onload=%{onload}"),Jo="__fcb"+Math.floor(1e6*Math.random()).toString();function Xo(t){if(!Fi.test(t.email))throw new xr("invalid-email")}function Qo(t){"email"in t&&Xo(t)}function Yo(t){if(!t[Vo])throw new xr("internal-error")}function Zo(t){if(t.phoneNumber||t.temporaryProof){if(!t.phoneNumber||!t.temporaryProof)throw new xr("internal-error")}else{if(!t.sessionInfo)throw new xr("missing-verification-id");if(!t.code)throw new xr("missing-verification-code")}}Lo.prototype.u=function(t,e,n,r,i){var o=this;Fo.then(function(){window.gapi.client.setApiKey(o.b);var s=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:n,body:r,headers:i,authType:"none",callback:function(t){window.gapi.auth.setToken(s),e&&e(t)}})}).o(function(t){e&&e({error:{message:t&&t.message||"CORS_UNSUPPORTED"}})})},Lo.prototype.jb=function(){return ks(this,Ss,{})},Lo.prototype.mb=function(t,e){return ks(this,Es,{idToken:t,email:e})},Lo.prototype.nb=function(t,e){return ks(this,Cs,{idToken:t,password:e})};var $o={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};function ts(t){if(!t.requestUri||!t.sessionId&&!t.postBody)throw new xr("internal-error")}function es(t){var e=null;if(t.needConfirmation?(t.code="account-exists-with-different-credential",e=Mi(t)):"FEDERATED_USER_ID_ALREADY_LINKED"==t.errorMessage?(t.code="credential-already-in-use",e=Mi(t)):"EMAIL_EXISTS"==t.errorMessage?(t.code="email-already-in-use",e=Mi(t)):t.errorMessage&&(e=Ds(t.errorMessage)),e)throw e;if(!t[Vo])throw new xr("internal-error")}function ns(t,e){return e.returnIdpCredential=!0,ks(t,Ts,e)}function rs(t,e){return e.returnIdpCredential=!0,ks(t,Is,e)}function is(t,e){return e.returnIdpCredential=!0,e.autoCreate=!1,ks(t,Os,e)}function os(t){if(!t.oobCode)throw new xr("invalid-action-code")}(t=Lo.prototype).ob=function(t,e){var n={idToken:t},r=[];return it($o,function(t,i){var o=e[i];null===o?r.push(t):i in e&&(n[i]=o)}),r.length&&(n.deleteAttribute=r),ks(this,Es,n)},t.gb=function(t,e){return lt(t={requestType:"PASSWORD_RESET",email:t},e),ks(this,gs,t)},t.hb=function(t,e){return lt(t={requestType:"EMAIL_SIGNIN",email:t},e),ks(this,vs,t)},t.fb=function(t,e){return lt(t={requestType:"VERIFY_EMAIL",idToken:t},e),ks(this,ys,t)},t.Sa=function(t){return ks(this,As,t)},t.Wa=function(t,e){return ks(this,bs,{oobCode:t,newPassword:e})},t.Ia=function(t){return ks(this,as,{oobCode:t})},t.Ua=function(t){return ks(this,ss,{oobCode:t})};var ss={endpoint:"setAccountInfo",w:os,$:"email"},as={endpoint:"resetPassword",w:os,J:function(t){if(!t.email||!t.requestType)throw new xr("internal-error")}},us={endpoint:"signupNewUser",w:function(t){if(Xo(t),!t.password)throw new xr("weak-password")},J:Yo,P:!0},cs={endpoint:"createAuthUri"},ls={endpoint:"deleteAccount",S:["idToken"]},hs={endpoint:"setAccountInfo",S:["idToken","deleteProvider"],w:function(t){if(!l(t.deleteProvider))throw new xr("internal-error")}},ps={endpoint:"emailLinkSignin",S:["email","oobCode"],w:Xo,J:Yo,P:!0},fs={endpoint:"emailLinkSignin",S:["idToken","email","oobCode"],w:Xo,J:Yo,P:!0},ds={endpoint:"getAccountInfo"},vs={endpoint:"getOobConfirmationCode",S:["requestType"],w:function(t){if("EMAIL_SIGNIN"!=t.requestType)throw new xr("internal-error");Xo(t)},$:"email"},ys={endpoint:"getOobConfirmationCode",S:["idToken","requestType"],w:function(t){if("VERIFY_EMAIL"!=t.requestType)throw new xr("internal-error")},$:"email"},gs={endpoint:"getOobConfirmationCode",S:["requestType"],w:function(t){if("PASSWORD_RESET"!=t.requestType)throw new xr("internal-error");Xo(t)},$:"email"},_s={pb:!0,endpoint:"getProjectConfig",Cb:"GET"},ms={pb:!0,endpoint:"getRecaptchaParam",Cb:"GET",J:function(t){if(!t.recaptchaSiteKey)throw new xr("internal-error")}},bs={endpoint:"resetPassword",w:os,$:"email"},ws={endpoint:"sendVerificationCode",S:["phoneNumber","recaptchaToken"],$:"sessionInfo"},Es={endpoint:"setAccountInfo",S:["idToken"],w:Qo,P:!0},Cs={endpoint:"setAccountInfo",S:["idToken"],w:function(t){if(Qo(t),!t.password)throw new xr("weak-password")},J:Yo,P:!0},Ss={endpoint:"signupNewUser",J:Yo,P:!0},Ts={endpoint:"verifyAssertion",w:ts,J:es,P:!0},Os={endpoint:"verifyAssertion",w:ts,J:function(t){if(t.errorMessage&&"USER_NOT_FOUND"==t.errorMessage)throw new xr("user-not-found");if(t.errorMessage)throw Ds(t.errorMessage);if(!t[Vo])throw new xr("internal-error")},P:!0},Is={endpoint:"verifyAssertion",w:function(t){if(ts(t),!t.idToken)throw new xr("internal-error")},J:es,P:!0},Ns={endpoint:"verifyCustomToken",w:function(t){if(!t.token)throw new xr("invalid-custom-token")},J:Yo,P:!0},xs={endpoint:"verifyPassword",w:function(t){if(Xo(t),!t.password)throw new xr("wrong-password")},J:Yo,P:!0},As={endpoint:"verifyPhoneNumber",w:Zo,J:Yo},Ps={endpoint:"verifyPhoneNumber",w:function(t){if(!t.idToken)throw new xr("internal-error");Zo(t)},J:function(t){if(t.temporaryProof)throw t.code="credential-already-in-use",Mi(t);Yo(t)}},Rs={Tb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",w:Zo,J:Yo};function ks(t,e,n){if(!function(t,e){if(!e||!e.length)return!0;if(!t)return!1;for(var n=0;n<e.length;n++){var r=t[e[n]];if(void 0===r||null===r||""===r)return!1}return!0}(n,e.S))return St(new xr("internal-error"));var r,i=e.Cb||"POST";return Ct(n).then(e.w).then(function(){return e.P&&(n.returnSecureToken=!0),function(t,e,n,r,i,o){var s=Je(t.g+e);ze(s,"key",t.b),o&&ze(s,"cb",b().toString());var a="GET"==n;if(a)for(var u in r)r.hasOwnProperty(u)&&ze(s,u,r[u]);return new yt(function(e,o){zo(t,s.toString(),function(t){t?t.error?o(js(t,i||{})):e(t):o(new xr("network-request-failed"))},n,a?void 0:Mn(pr(r)),t.a,t.h.get())})}(t,e.endpoint,i,n,e.Tb,e.pb||!1)}).then(function(t){return r=t}).then(e.J).then(function(){if(!e.$)return r;if(!(e.$ in r))throw new xr("internal-error");return r[e.$]})}function Ds(t){return js({error:{errors:[{message:t}],code:400,message:t}})}function js(t,e){var n=(t.error&&t.error.errors&&t.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new xr(r[n]):null)return n;for(var i in n=t.error&&t.error.message||"",lt(r={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash"},e||{}),e=(e=n.match(/^[^\s]+\s*:\s*(.*)$/))&&1<e.length?e[1]:void 0,r)if(0===n.indexOf(i))return new xr(r[i],e);return!e&&t&&(e=hr(t)),new xr("internal-error",e)}var Ms,Ls={Vc:{Ya:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",eb:"https://securetoken.googleapis.com/v1/token",id:"p"},Xc:{Ya:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",eb:"https://staging-securetoken.sandbox.googleapis.com/v1/token",id:"s"},Yc:{Ya:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",eb:"https://test-securetoken.sandbox.googleapis.com/v1/token",id:"t"}};function Fs(t){for(var e in Ls)if(Ls[e].id===t)return{firebaseEndpoint:(t=Ls[e]).Ya,secureTokenEndpoint:t.eb};return null}Ms=Fs("__EID__")?"__EID__":void 0;var Vs,Us=yn("https://apis.google.com/js/api.js?onload=%{onload}"),Bs=new _r(3e4,6e4),Ws=new _r(5e3,15e3),qs=null;function Hs(t,e,n){this.i=t,this.g=e,this.h=n,this.f=null,this.a=Xe(this.i,"/__/auth/iframe"),ze(this.a,"apiKey",this.g),ze(this.a,"appName",this.h),this.b=null,this.c=[]}function Gs(t,e,n,r,i){this.m=t,this.u=e,this.c=n,this.l=r,this.h=this.g=this.i=null,this.a=i,this.f=null}function zs(t){try{return e.app(t).auth().Ka()}catch(t){return[]}}function Ks(t,e,n,r,i){this.u=t,this.f=e,this.b=n,this.c=r||null,this.h=i||null,this.m=this.s=this.v=null,this.g=[],this.l=this.a=null}function Js(t){var e=Bn();return function(t){return ks(t,_s,{}).then(function(t){return t.authorizedDomains||[]})}(t).then(function(t){t:{var n=Je(e),r=n.c;n=n.b;for(var i=0;i<t.length;i++){var o=t[i],s=n,a=r;if(0==o.indexOf("chrome-extension://")?s=Je(o).b==s&&"chrome-extension"==a:"http"!=a&&"https"!=a?s=!1:zn.test(o)?s=s==o:(o=o.split(".").join("\\."),s=new RegExp("^(.+\\."+o+"|"+o+")$","i").test(s)),s){t=!0;break t}}t=!1}if(!t)throw new Di(Bn())})}function Xs(t){return t.l?t.l:(t.l=Kn().then(function(){if(!t.s){var e=t.c,n=t.h,r=zs(t.b),o=new Hs(t.u,t.f,t.b);o.f=e,o.b=n,o.c=B(r||[]),t.s=o.toString()}t.i=new function(t){this.b=t,this.a=null,this.ab=function(t){return(qs||(qs=new yt(function(t,e){if(gr()){var n=function(){yr(),or("gapi.load")("gapi.iframes",{callback:t,ontimeout:function(){yr(),e(Error("Network Error"))},timeout:Bs.get()})};if(or("gapi.iframes.Iframe"))t();else if(or("gapi.load"))n();else{var r="__iframefcb"+Math.floor(1e6*Math.random()).toString();i[r]=function(){or("gapi.load")?n():e(Error("Network Error"))},Ct(Ao(r=mn(Us,{onload:r}))).o(function(){e(Error("Network Error"))})}}else e(Error("Network Error"))}).o(function(t){throw qs=null,t}))).then(function(){return new yt(function(e,n){or("gapi.iframes.getContext")().open({where:document.body,url:t.b,messageHandlersFilter:or("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},function(r){function i(){clearTimeout(o),e()}t.a=r,t.a.restyle({setHideOnLeave:!1});var o=setTimeout(function(){n(Error("Network Error"))},Ws.get());r.ping(i).then(i,function(){n(Error("Network Error"))})})})})}(this)}(t.s),function(t){if(!t.i)throw Error("IfcHandler must be initialized!");!function(t,e){t.ab.then(function(){t.a.register("authEvent",e,or("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})}(t.i,function(e){var n={};if(e&&e.authEvent){var r=!1;for(e=Pi(e.authEvent),n=0;n<t.g.length;n++)r=t.g[n](e)||r;return(n={}).status=r?"ACK":"ERROR",Ct(n)}return n.status="ERROR",Ct(n)})}(t)}),t.l)}function Qs(t){return t.m||(t.v=t.c?rr(t.c,zs(t.b)):null,t.m=new Lo(t.f,Fs(t.h),t.v)),t.m}function Ys(t,e,n,r,i,o,s,a,u,c){return(t=new Gs(t,e,n,r,i)).i=o,t.g=s,t.h=a,t.b=st(u||null),t.f=c,t.toString()}function Zs(t){if(this.a=t||e.INTERNAL.reactNative&&e.INTERNAL.reactNative.AsyncStorage,!this.a)throw new xr("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function $s(){this.a={},this.type="inMemory"}function ta(){try{var t=!!i.indexedDB}catch(e){t=!1}if(!t)throw new xr("web-storage-unsupported");this.f={},this.c=[],this.a=0,this.h=i.indexedDB,this.type="indexedDB"}function ea(t){return t.g||(t.g=function(t){return new yt(function(e,n){var r=t.h.open("firebaseLocalStorageDb",1);r.onerror=function(t){n(Error(t.target.errorCode))},r.onupgradeneeded=function(t){t=t.target.result;try{t.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(t){n(t)}},r.onsuccess=function(t){e(t.target.result)}})}(t)),t.g}function na(t){return t.objectStore("firebaseLocalStorage")}function ra(t,e){return t.transaction(["firebaseLocalStorage"],e?"readwrite":"readonly")}function ia(t){return new yt(function(e,n){t.onsuccess=function(t){t&&t.target?e(t.target.result):e()},t.onerror=function(t){n(Error(t.target.errorCode))}})}function oa(){if(!function(){var t="Node"==Yn();if(!(t=sa()||t&&e.INTERNAL.node&&e.INTERNAL.node.localStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(t){return!1}}()){if("Node"==Yn())throw new xr("internal-error","The LocalStorage compatibility library was not found.");throw new xr("web-storage-unsupported")}this.a=sa()||e.INTERNAL.node.localStorage,this.type="localStorage"}function sa(){try{var t=i.localStorage,e=dr();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(t){return null}}function aa(){this.type="nullStorage"}function ua(){if(!function(){var t="Node"==Yn();if(!(t=ca()||t&&e.INTERNAL.node&&e.INTERNAL.node.sessionStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(t){return!1}}()){if("Node"==Yn())throw new xr("internal-error","The SessionStorage compatibility library was not found.");throw new xr("web-storage-unsupported")}this.a=ca()||e.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function ca(){try{var t=i.sessionStorage,e=dr();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(t){return null}}Hs.prototype.toString=function(){return this.f?ze(this.a,"v",this.f):un(this.a.a,"v"),this.b?ze(this.a,"eid",this.b):un(this.a.a,"eid"),this.c.length?ze(this.a,"fw",this.c.join(",")):un(this.a.a,"fw"),this.a.toString()},Gs.prototype.toString=function(){var t=Xe(this.m,"/__/auth/handler");if(ze(t,"apiKey",this.u),ze(t,"appName",this.c),ze(t,"authType",this.l),this.a.isOAuthProvider){var n=this.a;try{var r=e.app(this.c).auth().aa()}catch(t){r=null}for(var i in n.Xa=r,ze(t,"providerId",this.a.providerId),r=pr((n=this.a).tb))r[i]=r[i].toString();i=n.zc,r=st(r);for(var o=0;o<i.length;o++){var s=i[o];s in r&&delete r[s]}n.Za&&n.Xa&&!r[n.Za]&&(r[n.Za]=n.Xa),ot(r)||ze(t,"customParameters",hr(r))}if("function"==typeof this.a.yb&&(n=this.a.yb()).length&&ze(t,"scopes",n.join(",")),this.i?ze(t,"redirectUrl",this.i):un(t.a,"redirectUrl"),this.g?ze(t,"eventId",this.g):un(t.a,"eventId"),this.h?ze(t,"v",this.h):un(t.a,"v"),this.b)for(var a in this.b)this.b.hasOwnProperty(a)&&!Ke(t,a)&&ze(t,a,this.b[a]);return this.f?ze(t,"eid",this.f):un(t.a,"eid"),(a=zs(this.c)).length&&ze(t,"fw",a.join(",")),t.toString()},(t=Ks.prototype).Da=function(t,e,n){var r=new xr("popup-closed-by-user"),i=new xr("web-storage-unsupported"),o=this,s=!1;return this.ca().then(function(){(function(t){var e={type:"webStorageSupport"};return Xs(t).then(function(){return function(t,e){return t.ab.then(function(){return new yt(function(n){t.a.send(e.type,e,n,or("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))})})}(t.i,e)}).then(function(t){if(t&&t.length&&"undefined"!=typeof t[0].webStorageSupport)return t[0].webStorageSupport;throw Error()})})(o).then(function(n){n||(t&&Hn(t),e(i),s=!0)})}).o(function(){}).then(function(){if(!s)return function(t){return new yt(function(e){return function n(){je(2e3).then(function(){if(t&&!t.closed)return n();e()})}()})}(t)}).then(function(){if(!s)return je(n).then(function(){e(r)})})},t.Gb=function(){var t=ir();return!lr(t)&&!vr(t)},t.Bb=function(){return!1},t.xb=function(t,e,n,r,i,o,s){if(!t)return St(new xr("popup-blocked"));if(s&&!lr())return this.ca().o(function(e){Hn(t),i(e)}),r(),Ct();this.a||(this.a=Js(Qs(this)));var a=this;return this.a.then(function(){var e=a.ca().o(function(e){throw Hn(t),i(e),e});return r(),e}).then(function(){xi(n),s||Wn(Ys(a.u,a.f,a.b,e,n,null,o,a.c,void 0,a.h),t)}).o(function(t){throw"auth/network-request-failed"==t.code&&(a.a=null),t})},t.Ba=function(t,e,n){this.a||(this.a=Js(Qs(this)));var r=this;return this.a.then(function(){xi(e),Wn(Ys(r.u,r.f,r.b,t,e,Bn(),n,r.c,void 0,r.h))}).o(function(t){throw"auth/network-request-failed"==t.code&&(r.a=null),t})},t.ca=function(){var t=this;return Xs(this).then(function(){return t.i.ab}).o(function(){throw t.a=null,new xr("network-request-failed")})},t.Lb=function(){return!0},t.va=function(t){this.g.push(t)},t.Ja=function(t){V(this.g,function(e){return e==t})},(t=Zs.prototype).get=function(t){return Ct(this.a.getItem(t)).then(function(t){return t&&fr(t)})},t.set=function(t,e){return Ct(this.a.setItem(t,hr(e)))},t.X=function(t){return Ct(this.a.removeItem(t))},t.ia=function(){},t.ea=function(){},(t=$s.prototype).get=function(t){return Ct(this.a[t])},t.set=function(t,e){return this.a[t]=e,Ct()},t.X=function(t){return delete this.a[t],Ct()},t.ia=function(){},t.ea=function(){},(t=ta.prototype).set=function(t,e){var n,r=!1,i=this;return ea(this).then(function(e){return ia((e=na(ra(n=e,!0))).get(t))}).then(function(o){var s=na(ra(n,!0));return o?(o.value=e,ia(s.put(o))):(i.a++,r=!0,(o={}).fbase_key=t,o.value=e,ia(s.add(o)))}).then(function(){i.f[t]=e}).ga(function(){r&&i.a--})},t.get=function(t){return ea(this).then(function(e){return ia(na(ra(e,!1)).get(t))}).then(function(t){return t&&t.value})},t.X=function(t){var e=!1,n=this;return ea(this).then(function(r){return e=!0,n.a++,ia(na(ra(r,!0)).delete(t))}).then(function(){delete n.f[t]}).ga(function(){e&&n.a--})},t.Ic=function(){var t=this;return ea(this).then(function(t){var e=na(ra(t,!1));return e.getAll?ia(e.getAll()):new yt(function(t,n){var r=[],i=e.openCursor();i.onsuccess=function(e){(e=e.target.result)?(r.push(e.value),e.continue()):t(r)},i.onerror=function(t){n(Error(t.target.errorCode))}})}).then(function(e){var n={},r=[];if(0==t.a){for(r=0;r<e.length;r++)n[e[r].fbase_key]=e[r].value;r=function t(e,n){var r,i=[];for(r in e)if(r in n)if(typeof e[r]!=typeof n[r])i.push(r);else if(l(e[r])){t:{var o=void 0,s=e[r],a=n[r];for(o in s)if(!(o in a)||s[o]!==a[o]){o=!1;break t}for(o in a)if(!(o in s)){o=!1;break t}o=!0}o||i.push(r)}else"object"==typeof e[r]&&null!=e[r]&&null!=n[r]?0<t(e[r],n[r]).length&&i.push(r):e[r]!==n[r]&&i.push(r);else i.push(r);for(r in n)r in e||i.push(r);return i}(t.f,n),t.f=n}return r})},t.ia=function(t){0==this.c.length&&function(t){t.b&&t.b.cancel("STOP_EVENT"),function e(){return t.b=je(800).then(_(t.Ic,t)).then(function(e){0<e.length&&D(t.c,function(t){t(e)})}).then(e).o(function(t){"STOP_EVENT"!=t.message&&e()}),t.b}()}(this),this.c.push(t)},t.ea=function(t){V(this.c,function(e){return e==t}),0==this.c.length&&this.b&&this.b.cancel("STOP_EVENT")},(t=oa.prototype).get=function(t){var e=this;return Ct().then(function(){return fr(e.a.getItem(t))})},t.set=function(t,e){var n=this;return Ct().then(function(){var r=hr(e);null===r?n.X(t):n.a.setItem(t,r)})},t.X=function(t){var e=this;return Ct().then(function(){e.a.removeItem(t)})},t.ia=function(t){i.window&&_e(i.window,"storage",t)},t.ea=function(t){i.window&&we(i.window,"storage",t)},(t=aa.prototype).get=function(){return Ct(null)},t.set=function(){return Ct()},t.X=function(){return Ct()},t.ia=function(){},t.ea=function(){},(t=ua.prototype).get=function(t){var e=this;return Ct().then(function(){return fr(e.a.getItem(t))})},t.set=function(t,e){var n=this;return Ct().then(function(){var r=hr(e);null===r?n.X(t):n.a.setItem(t,r)})},t.X=function(t){var e=this;return Ct().then(function(){e.a.removeItem(t)})},t.ia=function(){},t.ea=function(){};var la,ha,pa={B:oa,Pa:ua},fa={B:oa,Pa:ua},da={B:Zs,Pa:aa},va={B:oa,Pa:aa},ya={Uc:"local",NONE:"none",Wc:"session"};function ga(){var t=!(vr(ir())||!Xn()),e=lr(),n=sr();this.m=t,this.h=e,this.l=n,this.a={},la||(la=new function(){var t={};t.Browser=pa,t.Node=fa,t.ReactNative=da,t.Worker=va,this.a=t[Yn()]}),t=la;try{if(!Un()&&wr()||!i.indexedDB)var r=new t.a.B;else Vs||(Vs=new ta),r=Vs;this.g=r}catch(t){this.g=new $s,this.h=!0}try{this.i=new t.a.Pa}catch(t){this.i=new $s}this.u=new $s,this.f=_(this.Kb,this),this.b={}}function _a(){return ha||(ha=new ga),ha}function ma(t,e){switch(e){case"session":return t.i;case"none":return t.u;default:return t.g}}function ba(t,e){return"firebase:"+t.name+(e?":"+e:"")}function wa(t,e,n){return n=ba(e,n),"local"==e.B&&(t.b[n]=null),ma(t,e.B).X(n)}function Ea(t){t.c&&(clearInterval(t.c),t.c=null)}(t=ga.prototype).get=function(t,e){return ma(this,t.B).get(ba(t,e))},t.set=function(t,e,n){var r=ba(t,n),i=this,o=ma(this,t.B);return o.set(r,e).then(function(){return o.get(r)}).then(function(e){"local"==t.B&&(i.b[r]=e)})},t.addListener=function(t,e,n){t=ba(t,e),this.l&&(this.b[t]=i.localStorage.getItem(t)),ot(this.a)&&(ma(this,"local").ia(this.f),this.h||(Un()||!wr())&&i.indexedDB||!this.l||function(t){Ea(t),t.c=setInterval(function(){for(var e in t.a){var n=i.localStorage.getItem(e),r=t.b[e];n!=r&&(t.b[e]=n,n=new ue({type:"storage",key:e,target:window,oldValue:r,newValue:n,a:!0}),t.Kb(n))}},1e3)}(this)),this.a[t]||(this.a[t]=[]),this.a[t].push(n)},t.removeListener=function(t,e,n){t=ba(t,e),this.a[t]&&(V(this.a[t],function(t){return t==n}),0==this.a[t].length&&delete this.a[t]),ot(this.a)&&(ma(this,"local").ea(this.f),Ea(this))},t.Kb=function(t){if(t&&t.g){var e=t.a.key;if(null==e)for(var n in this.a){var r=this.b[n];"undefined"==typeof r&&(r=null);var o=i.localStorage.getItem(n);o!==r&&(this.b[n]=o,this.Va(n))}else if(0==e.indexOf("firebase:")&&this.a[e]){if("undefined"!=typeof t.a.a?ma(this,"local").ea(this.f):Ea(this),this.m)if(n=i.localStorage.getItem(e),(r=t.a.newValue)!==n)null!==r?i.localStorage.setItem(e,r):i.localStorage.removeItem(e);else if(this.b[e]===r&&"undefined"==typeof t.a.a)return;var s=this;n=function(){"undefined"==typeof t.a.a&&s.b[e]===i.localStorage.getItem(e)||(s.b[e]=i.localStorage.getItem(e),s.Va(e))},Ht&&$t&&10==$t&&i.localStorage.getItem(e)!==t.a.newValue&&t.a.newValue!==t.a.oldValue?setTimeout(n,10):n()}}else D(t,_(this.Va,this))},t.Va=function(t){this.a[t]&&D(this.a[t],function(t){t()})};var Ca,Sa={name:"authEvent",B:"local"};function Ta(t,e){this.b=-1,this.b=Oa,this.f=i.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=t,this.h=e,this.l=i.Int32Array?new Int32Array(64):Array(64),void 0!==Ca||(Ca=i.Int32Array?new Int32Array(ka):ka),this.reset()}w(Ta,function(){this.b=-1});for(var Oa=64,Ia=Oa-1,Na=[],xa=0;xa<Ia;xa++)Na[xa]=0;var Aa=U(128,Na);function Pa(t){for(var e=t.f,n=t.l,r=0,i=0;i<e.length;)n[r++]=e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3],i=4*r;for(e=16;64>e;e++){var o=(0|n[e-16])+(((i=0|n[e-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,s=(0|n[e-7])+(((r=0|n[e-2])>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)|0;n[e]=o+s|0}r=0|t.a[0],i=0|t.a[1];var a=0|t.a[2],u=0|t.a[3],c=0|t.a[4],l=0|t.a[5],h=0|t.a[6];for(o=0|t.a[7],e=0;64>e;e++){var p=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&a^i&a)|0;s=(o=o+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0)+((s=(s=c&l^~c&h)+(0|Ca[e])|0)+(0|n[e])|0)|0,o=h,h=l,l=c,c=u+s|0,u=a,a=i,i=r,r=s+p|0}t.a[0]=t.a[0]+r|0,t.a[1]=t.a[1]+i|0,t.a[2]=t.a[2]+a|0,t.a[3]=t.a[3]+u|0,t.a[4]=t.a[4]+c|0,t.a[5]=t.a[5]+l|0,t.a[6]=t.a[6]+h|0,t.a[7]=t.a[7]+o|0}function Ra(t,e,n){void 0===n&&(n=e.length);var r=0,i=t.c;if(o(e))for(;r<n;)t.f[i++]=e.charCodeAt(r++),i==t.b&&(Pa(t),i=0);else{if(!h(e))throw Error("message must be string or array");for(;r<n;){var s=e[r++];if(!("number"==typeof s&&0<=s&&255>=s&&s==(0|s)))throw Error("message must be a byte array");t.f[i++]=s,i==t.b&&(Pa(t),i=0)}}t.c=i,t.g+=n}Ta.prototype.reset=function(){this.g=this.c=0,this.a=i.Int32Array?new Int32Array(this.h):B(this.h)};var ka=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Da(){Ta.call(this,8,ja)}w(Da,Ta);var ja=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function Ma(t,e,n,r,i){this.u=t,this.i=e,this.l=n,this.m=r||null,this.s=i||null,this.h=e+":"+n,this.v=new function(){this.a=_a()},this.g=new function(t){this.a=t,this.b=_a()}(this.h),this.f=null,this.b=[],this.a=this.c=null}function La(t){return new xr("invalid-cordova-configuration",t)}function Fa(t,e){for(var n=0;n<t.b.length;n++)try{t.b[n](e)}catch(t){}}function Va(t){return t.f||(t.f=t.ca().then(function(){return new yt(function(e){t.va(function n(r){return e(r),t.Ja(n),!1}),function(t){function e(e){r=!0,o&&o.cancel(),Ua(t).then(function(r){var i=n;if(r&&e&&e.url){var o=null;-1!=(i=si(e.url)).indexOf("/__/auth/callback")&&(o=(o="object"==typeof(o=fr(Ke(o=Je(i),"firebaseError")||null))?Ar(o):null)?new Ai(r.b,r.c,null,null,o):new Ai(r.b,r.c,i,r.g)),i=o||n}Fa(t,i)})}var n=new Ai("unknown",null,null,null,new xr("no-auth-event")),r=!1,o=je(500).then(function(){return Ua(t).then(function(){r||Fa(t,n)})}),s=i.handleOpenURL;i.handleOpenURL=function(t){if(0==t.toLowerCase().indexOf(or("BuildInfo.packageName",i).toLowerCase()+"://")&&e({url:t}),"function"==typeof s)try{s(t)}catch(t){console.error(t)}},ki||(ki=new Ri),ki.subscribe(e)}(t)})})),t.f}function Ua(t){var e=null;return function(t){return t.b.get(Sa,t.a).then(function(t){return Pi(t)})}(t.g).then(function(n){return e=n,wa((n=t.g).b,Sa,n.a)}).then(function(){return e})}(t=Ma.prototype).ca=function(){return this.ya?this.ya:this.ya=(Jn(void 0)?Kn().then(function(){return new yt(function(t,e){var n=i.document,r=setTimeout(function(){e(Error("Cordova framework is not ready."))},1e3);n.addEventListener("deviceready",function(){clearTimeout(r),t()},!1)})}):St(Error("Cordova must run in an Android or iOS file scheme."))).then(function(){if("function"!=typeof or("universalLinks.subscribe",i))throw La("cordova-universal-links-plugin is not installed");if("undefined"==typeof or("BuildInfo.packageName",i))throw La("cordova-plugin-buildinfo is not installed");if("function"!=typeof or("cordova.plugins.browsertab.openUrl",i))throw La("cordova-plugin-browsertab is not installed");if("function"!=typeof or("cordova.InAppBrowser.open",i))throw La("cordova-plugin-inappbrowser is not installed")},function(){throw new xr("cordova-not-ready")})},t.Da=function(t,e){return e(new xr("operation-not-supported-in-this-environment")),Ct()},t.xb=function(){return St(new xr("operation-not-supported-in-this-environment"))},t.Lb=function(){return!1},t.Gb=function(){return!0},t.Bb=function(){return!0},t.Ba=function(t,e,n){if(this.c)return St(new xr("redirect-operation-pending"));var r=this,o=i.document,s=null,a=null,u=null,c=null;return this.c=Ct().then(function(){return xi(e),Va(r)}).then(function(){return function(t,e,n,r){var o=function(){for(var t=20,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}(),s=new Ai(e,r,null,o,new xr("no-auth-event")),a=or("BuildInfo.packageName",i);if("string"!=typeof a)throw new xr("invalid-cordova-configuration");var u=or("BuildInfo.displayName",i),c={};if(ir().toLowerCase().match(/iphone|ipad|ipod/))c.ibi=a;else{if(!ir().toLowerCase().match(/android/))return St(new xr("operation-not-supported-in-this-environment"));c.apn=a}u&&(c.appDisplayName=u),o=function(t){var e=new Da;Ra(e,t),t=[];var n=8*e.g;Ra(e,Aa,56>e.c?56-e.c:e.b-(e.c-56));for(var r=63;56<=r;r--)e.f[r]=255&n,n/=256;for(Pa(e),r=n=0;r<e.i;r++)for(var i=24;0<=i;i-=8)t[n++]=e.a[r]>>i&255;return function(t){return j(t,function(t){return 1<(t=t.toString(16)).length?t:"0"+t}).join("")}(t)}(o),c.sessionId=o;var l=Ys(t.u,t.i,t.l,e,n,null,r,t.m,c,t.s);return t.ca().then(function(){var e=t.h;return t.v.a.set(Sa,s.C(),e)}).then(function(){var e=or("cordova.plugins.browsertab.isAvailable",i);if("function"!=typeof e)throw new xr("invalid-cordova-configuration");var n=null;e(function(e){if(e){if("function"!=typeof(n=or("cordova.plugins.browsertab.openUrl",i)))throw new xr("invalid-cordova-configuration");n(l)}else{if("function"!=typeof(n=or("cordova.InAppBrowser.open",i)))throw new xr("invalid-cordova-configuration");e=!(!(e=ir()).match(/(iPad|iPhone|iPod).*OS 7_\d/i)&&!e.match(/(iPad|iPhone|iPod).*OS 8_\d/i)),t.a=n(l,e?"_blank":"_system","location=yes")}})})}(r,t,e,n)}).then(function(){return new yt(function(t,e){a=function(){var e=or("cordova.plugins.browsertab.close",i);return t(),"function"==typeof e&&e(),r.a&&"function"==typeof r.a.close&&(r.a.close(),r.a=null),!1},r.va(a),c=function(){mr()&&u()},o.addEventListener("resume",u=function(){s||(s=je(2e3).then(function(){e(new xr("redirect-cancelled-by-user"))}))},!1),ir().toLowerCase().match(/android/)||o.addEventListener("visibilitychange",c,!1)}).o(function(t){return Ua(r).then(function(){throw t})})}).ga(function(){u&&o.removeEventListener("resume",u,!1),c&&o.removeEventListener("visibilitychange",c,!1),s&&s.cancel(),a&&r.Ja(a),r.c=null})},t.va=function(t){this.b.push(t),Va(this).o(function(e){"auth/invalid-cordova-configuration"===e.code&&(e=new Ai("unknown",null,null,null,new xr("no-auth-event")),t(e))})},t.Ja=function(t){V(this.b,function(e){return e==t})};var Ba={name:"pendingRedirect",B:"session"};function Wa(t){return wa(t.b,Ba,t.a)}function qa(t,e,n){this.v=t,this.l=e,this.u=n,this.h=[],this.f=!1,this.i=_(this.m,this),this.c=new $a,this.s=new ru,this.g=new function(t){this.a=t,this.b=_a()}(this.l+":"+this.u),this.b={},this.b.unknown=this.c,this.b.signInViaRedirect=this.c,this.b.linkViaRedirect=this.c,this.b.reauthViaRedirect=this.c,this.b.signInViaPopup=this.s,this.b.linkViaPopup=this.s,this.b.reauthViaPopup=this.s,this.a=Ha(this.v,this.l,this.u,Ms)}function Ha(t,n,r,i){var o=e.SDK_VERSION||null;return Jn()?new Ma(t,n,r,o,i):new Ks(t,n,r,o,i)}function Ga(t){t.f||(t.f=!0,t.a.va(t.i));var e=t.a;return t.a.ca().o(function(n){throw t.a==e&&t.reset(),n})}function za(t){t.a.Gb()&&Ga(t).o(function(e){var n=new Ai("unknown",null,null,null,new xr("operation-not-supported-in-this-environment"));Qa(e)&&t.m(n)}),t.a.Bb()||tu(t.c)}qa.prototype.reset=function(){this.f=!1,this.a.Ja(this.i),this.a=Ha(this.v,this.l,this.u)},qa.prototype.subscribe=function(t){if(L(this.h,t)||this.h.push(t),!this.f){var e=this;(function(t){return t.b.get(Ba,t.a).then(function(t){return"pending"==t})})(this.g).then(function(t){t?Wa(e.g).then(function(){Ga(e).o(function(t){var n=new Ai("unknown",null,null,null,new xr("operation-not-supported-in-this-environment"));Qa(t)&&e.m(n)})}):za(e)}).o(function(){za(e)})}},qa.prototype.unsubscribe=function(t){V(this.h,function(e){return e==t})},qa.prototype.m=function(t){if(!t)throw new xr("invalid-auth-event");for(var e=!1,n=0;n<this.h.length;n++){var r=this.h[n];if(r.qb(t.b,t.c)){(e=this.b[t.b])&&e.h(t,r),e=!0;break}}return tu(this.c),e};var Ka=new _r(2e3,1e4),Ja=new _r(3e4,6e4);function Xa(t,e,n,r,i,o){return t.a.xb(e,n,r,function(){t.f||(t.f=!0,t.a.va(t.i))},function(){t.reset()},i,o)}function Qa(t){return!(!t||"auth/cordova-not-ready"!=t.code)}qa.prototype.ba=function(){return this.c.ba()},qa.prototype.Ba=function(t,e,n){var r,i=this;return function(t){return t.b.set(Ba,"pending",t.a)}(this.g).then(function(){return i.a.Ba(t,e,n).o(function(t){if(Qa(t))throw new xr("operation-not-supported-in-this-environment");return r=t,Wa(i.g).then(function(){throw r})}).then(function(){return i.a.Lb()?new yt(function(){}):Wa(i.g).then(function(){return i.ba()}).then(function(){}).o(function(){})})})},qa.prototype.Da=function(t,e,n,r){return this.a.Da(n,function(n){t.fa(e,null,n,r)},Ka.get())};var Ya={};function Za(t,e,n){var r=e+":"+n;return Ya[r]||(Ya[r]=new qa(t,e,n)),Ya[r]}function $a(){this.b=null,this.f=[],this.c=[],this.a=null,this.g=!1}function tu(t){t.g||(t.g=!0,nu(t,!1,null,null))}function eu(t,e){if(t.b=function(){return Ct(e)},t.f.length)for(var n=0;n<t.f.length;n++)t.f[n](e)}function nu(t,e,n,r){e?r?function(t,e){if(t.b=function(){return St(e)},t.c.length)for(var n=0;n<t.c.length;n++)t.c[n](e)}(t,r):eu(t,n):eu(t,{user:null}),t.f=[],t.c=[]}function ru(){}function iu(t,e){this.a=e,Tr(this,"verificationId",t)}function ou(t,e,n,r){return new Oi(t).Sa(e,n).then(function(t){return new iu(t,r)})}function su(t,e,n){if(this.h=t,this.i=e,this.g=n,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function au(t){this.f=t,this.b=this.a=null,this.c=0}function uu(t,e){var n=e[Vo],r=e.refreshToken;e=cu(e.expiresIn),t.b=n,t.c=e,t.a=r}function cu(t){return b()+1e3*parseInt(t,10)}function lu(t,e){this.a=t||null,this.b=e||null,Or(this,{lastSignInTime:br(e||null),creationTime:br(t||null)})}function hu(t,e){for(var n in ae.call(this,t),e)this[n]=e[n]}function pu(t,n,r){this.D=[],this.G=t.apiKey,this.s=t.appName,this.A=t.authDomain||null,t=e.SDK_VERSION?rr(e.SDK_VERSION):null,this.b=new Lo(this.G,Fs(Ms),t),this.h=new au(this.b),mu(this,n[Vo]),uu(this.h,n),Tr(this,"refreshToken",this.h.a),Eu(this,r||{}),Ae.call(this),this.I=!1,this.A&&ar()&&(this.a=Za(this.A,this.G,this.s)),this.N=[],this.i=null,this.l=function(t){return new su(function(){return t.F(!0)},function(t){return!(!t||"auth/network-request-failed"!=t.code)},function(){var e=t.h.c-b()-3e5;return 0<e?e:0})}(this),this.U=_(this.Ga,this);var i=this;this.ha=null,this.sa=function(t){i.na(t.h)},this.W=null,this.O=[],this.ra=function(t){du(i,t.f)},this.V=null}function fu(t,e){t.W&&we(t.W,"languageCodeChanged",t.sa),(t.W=e)&&_e(e,"languageCodeChanged",t.sa)}function du(t,n){t.O=n,Go(t.b,e.SDK_VERSION?rr(e.SDK_VERSION,t.O):null)}function vu(t,e){t.V&&we(t.V,"frameworkChanged",t.ra),(t.V=e)&&_e(e,"frameworkChanged",t.ra)}function yu(t){try{return e.app(t.s).auth()}catch(e){throw new xr("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+t.s+"'!")}}function gu(t){t.m||t.l.b||(t.l.start(),we(t,"tokenChanged",t.U),_e(t,"tokenChanged",t.U))}function _u(t){we(t,"tokenChanged",t.U),t.l.stop()}function mu(t,e){t.qa=e,Tr(t,"_lat",e)}function bu(t){for(var e=[],n=0;n<t.N.length;n++)e.push(t.N[n](t));return function(t){return new yt(function(e){var n=t.length,r=[];if(n)for(var i=function(t,i,o){n--,r[t]=i?{Zb:!0,value:o}:{Zb:!1,reason:o},0==n&&e(r)},o=0;o<t.length;o++)Tt(t[o],m(i,o,!0),m(i,o,!1));else e(r)})}(e).then(function(){return t})}function wu(t){t.a&&!t.I&&(t.I=!0,t.a.subscribe(t))}function Eu(t,e){Or(t,{uid:e.uid,displayName:e.displayName||null,photoURL:e.photoURL||null,email:e.email||null,emailVerified:e.emailVerified||!1,phoneNumber:e.phoneNumber||null,isAnonymous:e.isAnonymous||!1,metadata:new lu(e.createdAt,e.lastLoginAt),providerData:[]})}function Cu(){}function Su(t){return Ct().then(function(){if(t.m)throw new xr("app-deleted")})}function Tu(t){return j(t.providerData,function(t){return t.providerId})}function Ou(t,e){e&&(Iu(t,e.providerId),t.providerData.push(e))}function Iu(t,e){V(t.providerData,function(t){return t.providerId==e})}function Nu(t,e,n){("uid"!=e||n)&&t.hasOwnProperty(e)&&Tr(t,e,n)}function xu(t,e){t!=e&&(Or(t,{uid:e.uid,displayName:e.displayName,photoURL:e.photoURL,email:e.email,emailVerified:e.emailVerified,phoneNumber:e.phoneNumber,isAnonymous:e.isAnonymous,providerData:[]}),Tr(t,"metadata",e.metadata?function(t){return new lu(t.a,t.b)}(e.metadata):new lu),D(e.providerData,function(e){Ou(t,e)}),t.h=e.h,Tr(t,"refreshToken",t.h.a))}function Au(t){return t.F().then(function(e){var n=t.isAnonymous;return function(t,e){return ks(t.b,ds,{idToken:e}).then(_(t.tc,t))}(t,e).then(function(){return n||Nu(t,"isAnonymous",!1),e})})}function Pu(t,e){e[Vo]&&t.qa!=e[Vo]&&(uu(t.h,e),t.dispatchEvent(new hu("tokenChanged")),mu(t,e[Vo]),Nu(t,"refreshToken",t.h.a))}function Ru(t,e){return Au(t).then(function(){if(L(Tu(t),e))return bu(t).then(function(){throw new xr("provider-already-linked")})})}function ku(t,e,n){return Ir({user:t,credential:Ni(e),additionalUserInfo:e=Yr(e),operationType:n})}function Du(t,e){return Pu(t,e),t.reload().then(function(){return t})}function ju(t,n,r,i,o){if(!ar())return St(new xr("operation-not-supported-in-this-environment"));if(t.i&&!o)return St(t.i);var s=Qr(r.providerId),a=dr(t.uid+":::"),u=null;(!lr()||Xn())&&t.A&&r.isOAuthProvider&&(u=Ys(t.A,t.G,t.s,n,r,null,a,e.SDK_VERSION||null));var c=Gn(u,s&&s.Aa,s&&s.za);return i=i().then(function(){if(Lu(t),!o)return t.F().then(function(){})}).then(function(){return Xa(t.a,c,n,r,a,!!u)}).then(function(){return new yt(function(e,r){t.fa(n,null,new xr("cancelled-popup-request"),t.g||null),t.f=e,t.v=r,t.g=a,t.c=t.a.Da(t,n,c,a)})}).then(function(t){return c&&Hn(c),t?Ir(t):null}).o(function(t){throw c&&Hn(c),t}),Fu(t,i,o)}function Mu(t,e,n,r,i){if(!ar())return St(new xr("operation-not-supported-in-this-environment"));if(t.i&&!i)return St(t.i);var o=null,s=dr(t.uid+":::");return r=r().then(function(){if(Lu(t),!i)return t.F().then(function(){})}).then(function(){return t.Z=s,bu(t)}).then(function(e){return t.da&&(e=(e=t.da).b.set(Uu,t.C(),e.a)),e}).then(function(){return t.a.Ba(e,n,s)}).o(function(e){if(o=e,t.da)return Bu(t.da);throw o}).then(function(){if(o)throw o}),Fu(t,r,i)}function Lu(t){if(!t.a||!t.I){if(t.a&&!t.I)throw new xr("internal-error");throw new xr("auth-domain-config-required")}}function Fu(t,e,n){var r=function(t,e,n){return t.i&&!n?(e.cancel(),St(t.i)):e.o(function(e){throw!e||"auth/user-disabled"!=e.code&&"auth/user-token-expired"!=e.code||(t.i||t.dispatchEvent(new hu("userInvalidated")),t.i=e),e})}(t,e,n);return t.D.push(r),r.ga(function(){F(t.D,r)}),r}function Vu(t){if(!t.apiKey)return null;var e={apiKey:t.apiKey,authDomain:t.authDomain,appName:t.appName},n={};if(!(t.stsTokenManager&&t.stsTokenManager.accessToken&&t.stsTokenManager.expirationTime))return null;n[Vo]=t.stsTokenManager.accessToken,n.refreshToken=t.stsTokenManager.refreshToken||null,n.expiresIn=(t.stsTokenManager.expirationTime-b())/1e3;var r=new pu(e,n,t);return t.providerData&&D(t.providerData,function(t){t&&Ou(r,Ir(t))}),t.redirectEventId&&(r.Z=t.redirectEventId),r}$a.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},$a.prototype.h=function(t,e){if(t){this.reset(),this.g=!0;var n=t.b,r=t.c;"unknown"!=n||t.a&&"auth/web-storage-unsupported"==t.a.code||t.a&&"auth/operation-not-supported-in-this-environment"==t.a.code?t.a?(nu(this,!0,null,t.a),Ct()):e.wa(n,r)?function(t,e,n){n=n.wa(e.b,e.c);var r=e.f,i=e.g,o=!!e.b.match(/Redirect$/);n(r,i).then(function(e){nu(t,o,e,null)}).o(function(e){nu(t,o,null,e)})}(this,t,e):St(new xr("invalid-auth-event")):(nu(this,!1,null,null),Ct())}else St(new xr("invalid-auth-event"))},$a.prototype.ba=function(){var t=this;return new yt(function(e,n){t.b?t.b().then(e,n):(t.f.push(e),t.c.push(n),function(t){var e=new xr("timeout");t.a&&t.a.cancel(),t.a=je(Ja.get()).then(function(){t.b||nu(t,!0,null,e)})}(t))})},ru.prototype.h=function(t,e){if(t){var n=t.b,r=t.c;t.a?(e.fa(t.b,null,t.a,t.c),Ct()):e.wa(n,r)?function(t,e){var n=t.c,r=t.b;e.wa(r,n)(t.f,t.g).then(function(t){e.fa(r,t,null,n)}).o(function(t){e.fa(r,null,t,n)})}(t,e):St(new xr("invalid-auth-event"))}else St(new xr("invalid-auth-event"))},iu.prototype.confirm=function(t){return t=Ii(this.verificationId,t),this.a(t)},su.prototype.start=function(){this.a=this.c,function t(e,n){e.stop(),e.b=je(function(t,e){return e?(t.a=t.c,t.g()):(e=t.a,t.a*=2,t.a>t.f&&(t.a=t.f),e)}(e,n)).then(function(){return t=i.document,e=null,mr()||!t?Ct():new yt(function(n){t.addEventListener("visibilitychange",e=function(){mr()&&(t.removeEventListener("visibilitychange",e,!1),n())},!1)}).o(function(n){throw t.removeEventListener("visibilitychange",e,!1),n});var t,e}).then(function(){return e.h()}).then(function(){t(e,!0)}).o(function(n){e.i(n)&&t(e,!1)})}(this,!0)},su.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},au.prototype.C=function(){return{apiKey:this.f.b,refreshToken:this.a,accessToken:this.b,expirationTime:this.c}},au.prototype.getToken=function(t){return t=!!t,this.b&&!this.a?St(new xr("user-token-expired")):t||!this.b||b()>this.c-3e4?this.a?function(t,e){return function(t,e){return new yt(function(n,r){"refresh_token"==e.grant_type&&e.refresh_token||"authorization_code"==e.grant_type&&e.code?zo(t,t.i+"?key="+encodeURIComponent(t.b),function(t){t?t.error?r(js(t)):t.access_token&&t.refresh_token?n(t):r(new xr("internal-error")):r(new xr("network-request-failed"))},"POST",an(e).toString(),t.f,t.l.get()):r(new xr("internal-error"))})}(t.f,e).then(function(e){return t.b=e.access_token,t.c=cu(e.expires_in),t.a=e.refresh_token,{accessToken:t.b,expirationTime:t.c,refreshToken:t.a}}).o(function(e){throw"auth/user-token-expired"==e.code&&(t.a=null),e})}(this,{grant_type:"refresh_token",refresh_token:this.a}):Ct(null):Ct({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},lu.prototype.C=function(){return{lastLoginAt:this.b,createdAt:this.a}},w(hu,ae),w(pu,Ae),pu.prototype.na=function(t){this.ha=t,Ho(this.b,t)},pu.prototype.aa=function(){return this.ha},pu.prototype.Ka=function(){return B(this.O)},pu.prototype.Ga=function(){this.l.b&&(this.l.stop(),this.l.start())},Tr(pu.prototype,"providerId","firebase"),(t=pu.prototype).reload=function(){var t=this;return Fu(this,Su(this).then(function(){return Au(t).then(function(){return bu(t)}).then(Cu)}))},t.F=function(t){var e=this;return Fu(this,Su(this).then(function(){return e.h.getToken(t)}).then(function(t){if(!t)throw new xr("internal-error");return t.accessToken!=e.qa&&(mu(e,t.accessToken),e.dispatchEvent(new hu("tokenChanged"))),Nu(e,"refreshToken",t.refreshToken),t.accessToken}))},t.getToken=function(t){return Cr["firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead."]||(Cr["firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead."]=!0,"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead.")),this.F(t)},t.tc=function(t){if(!(t=t.users)||!t.length)throw new xr("internal-error");Eu(this,{uid:(t=t[0]).localId,displayName:t.displayName,photoURL:t.photoUrl,email:t.email,emailVerified:!!t.emailVerified,phoneNumber:t.phoneNumber,lastLoginAt:t.lastLoginAt,createdAt:t.createdAt});for(var e=function(t){return(t=t.providerUserInfo)&&t.length?j(t,function(t){return new function(t,e,n,r,i,o){Or(this,{uid:t,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:e})}(t.rawId,t.providerId,t.email,t.displayName,t.photoUrl,t.phoneNumber)}):[]}(t),n=0;n<e.length;n++)Ou(this,e[n]);Nu(this,"isAnonymous",!(this.email&&t.passwordHash||this.providerData&&this.providerData.length))},t.bb=function(t){var e=this,n=null;return Fu(this,t.f(this.b,this.uid).then(function(t){return Pu(e,t),n=ku(e,t,"reauthenticate"),e.i=null,e.reload()}).then(function(){return n}),!0)},t.uc=function(t){return this.bb(t).then(function(){})},t.$a=function(t){var e=this,n=null;return Fu(this,Ru(this,t.providerId).then(function(){return e.F()}).then(function(n){return t.c(e.b,n)}).then(function(t){return n=ku(e,t,"link"),Du(e,t)}).then(function(){return n}))},t.kc=function(t){return this.$a(t).then(function(t){return t.user})},t.mc=function(t,e){var n=this;return Fu(this,Ru(this,"phone").then(function(){return ou(yu(n),t,e,_(n.$a,n))}))},t.vc=function(t,e){var n=this;return Fu(this,Ct().then(function(){return ou(yu(n),t,e,_(n.bb,n))}),!0)},t.mb=function(t){var e=this;return Fu(this,this.F().then(function(n){return e.b.mb(n,t)}).then(function(t){return Pu(e,t),e.reload()}))},t.Mc=function(t){var e=this;return Fu(this,this.F().then(function(n){return t.c(e.b,n)}).then(function(t){return Pu(e,t),e.reload()}))},t.nb=function(t){var e=this;return Fu(this,this.F().then(function(n){return e.b.nb(n,t)}).then(function(t){return Pu(e,t),e.reload()}))},t.ob=function(t){if(void 0===t.displayName&&void 0===t.photoURL)return Su(this);var e=this;return Fu(this,this.F().then(function(n){return e.b.ob(n,{displayName:t.displayName,photoUrl:t.photoURL})}).then(function(t){return Pu(e,t),Nu(e,"displayName",t.displayName||null),Nu(e,"photoURL",t.photoUrl||null),D(e.providerData,function(t){"password"===t.providerId&&(Tr(t,"displayName",e.displayName),Tr(t,"photoURL",e.photoURL))}),bu(e)}).then(Cu))},t.Lc=function(t){var e=this;return Fu(this,Au(this).then(function(n){return L(Tu(e),t)?function(t,e,n){return ks(t,hs,{idToken:e,deleteProvider:n})}(e.b,n,[t]).then(function(t){var n={};return D(t.providerUserInfo||[],function(t){n[t.providerId]=!0}),D(Tu(e),function(t){n[t]||Iu(e,t)}),n[Oi.PROVIDER_ID]||Tr(e,"phoneNumber",null),bu(e)}):bu(e).then(function(){throw new xr("no-such-provider")})}))},t.delete=function(){var t=this;return Fu(this,this.F().then(function(e){return ks(t.b,ls,{idToken:e})}).then(function(){t.dispatchEvent(new hu("userDeleted"))})).then(function(){for(var e=0;e<t.D.length;e++)t.D[e].cancel("app-deleted");fu(t,null),vu(t,null),t.D=[],t.m=!0,_u(t),Tr(t,"refreshToken",null),t.a&&t.a.unsubscribe(t)})},t.qb=function(t,e){return!!("linkViaPopup"==t&&(this.g||null)==e&&this.f||"reauthViaPopup"==t&&(this.g||null)==e&&this.f||"linkViaRedirect"==t&&(this.Z||null)==e||"reauthViaRedirect"==t&&(this.Z||null)==e)},t.fa=function(t,e,n,r){"linkViaPopup"!=t&&"reauthViaPopup"!=t||r!=(this.g||null)||(n&&this.v?this.v(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.v)},t.wa=function(t,e){return"linkViaPopup"==t&&e==(this.g||null)?_(this.vb,this):"reauthViaPopup"==t&&e==(this.g||null)?_(this.wb,this):"linkViaRedirect"==t&&(this.Z||null)==e?_(this.vb,this):"reauthViaRedirect"==t&&(this.Z||null)==e?_(this.wb,this):null},t.nc=function(t){var e=this;return ju(this,"linkViaPopup",t,function(){return Ru(e,t.providerId).then(function(){return bu(e)})},!1)},t.wc=function(t){return ju(this,"reauthViaPopup",t,function(){return Ct()},!0)},t.oc=function(t){var e=this;return Mu(this,"linkViaRedirect",t,function(){return Ru(e,t.providerId)},!1)},t.xc=function(t){return Mu(this,"reauthViaRedirect",t,function(){return Ct()},!0)},t.vb=function(t,e){var n=this;this.c&&(this.c.cancel(),this.c=null);var r=null;return Fu(this,this.F().then(function(r){return rs(n.b,{requestUri:t,sessionId:e,idToken:r})}).then(function(t){return r=ku(n,t,"link"),Du(n,t)}).then(function(){return r}))},t.wb=function(t,e){var n=this;this.c&&(this.c.cancel(),this.c=null);var r=null;return Fu(this,Ct().then(function(){return ai(is(n.b,{requestUri:t,sessionId:e}),n.uid)}).then(function(t){return r=ku(n,t,"reauthenticate"),Pu(n,t),n.i=null,n.reload()}).then(function(){return r}),!0)},t.fb=function(t){var e=this,n=null;return Fu(this,this.F().then(function(e){return n=e,"undefined"==typeof t||ot(t)?{}:Wr(new kr(t))}).then(function(t){return e.b.fb(n,t)}).then(function(t){if(e.email!=t)return e.reload()}).then(function(){}))},t.toJSON=function(){return this.C()},t.C=function(){var t={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,providerData:[],apiKey:this.G,appName:this.s,authDomain:this.A,stsTokenManager:this.h.C(),redirectEventId:this.Z||null};return this.metadata&<(t,this.metadata.C()),D(this.providerData,function(e){t.providerData.push(function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}(e))}),t};var Uu={name:"redirectUser",B:"session"};function Bu(t){return wa(t.b,Uu,t.a)}function Wu(t){this.a=t,this.b=_a(),this.c=null,this.f=function(t){var e=Gu("local"),n=Gu("session"),r=Gu("none");return function(t,e,n){var r=ba(e,n),o=ma(t,e.B);return t.get(e,n).then(function(s){var a=null;try{a=fr(i.localStorage.getItem(r))}catch(t){}if(a&&!s)return i.localStorage.removeItem(r),t.set(e,a,n);a&&s&&"localStorage"!=o.type&&i.localStorage.removeItem(r)})}(t.b,e,t.a).then(function(){return t.b.get(n,t.a)}).then(function(i){return i?n:t.b.get(r,t.a).then(function(n){return n?r:t.b.get(e,t.a).then(function(n){return n?e:t.b.get(Hu,t.a).then(function(t){return t?Gu(t):e})})})}).then(function(e){return t.c=e,qu(t,e.B)}).o(function(){t.c||(t.c=e)})}(this),this.b.addListener(Gu("local"),this.a,_(this.g,this))}function qu(t,e){var n,r=[];for(n in ya)ya[n]!==e&&r.push(wa(t.b,Gu(ya[n]),t.a));return r.push(wa(t.b,Hu,t.a)),function(t){return new yt(function(e,n){var r=t.length,i=[];if(r)for(var o=function(t,n){r--,i[t]=n,0==r&&e(i)},s=function(t){n(t)},a=0;a<t.length;a++)Tt(t[a],m(o,a),s);else e(i)})}(r)}Wu.prototype.g=function(){var t=this,e=Gu("local");Xu(this,function(){return Ct().then(function(){return t.c&&"local"!=t.c.B?t.b.get(e,t.a):null}).then(function(n){if(n)return qu(t,"local").then(function(){t.c=e})})})};var Hu={name:"persistence",B:"session"};function Gu(t){return{name:"authUser",B:t}}function zu(t,e){return Xu(t,function(){return t.b.set(t.c,e.C(),t.a)})}function Ku(t){return Xu(t,function(){return wa(t.b,t.c,t.a)})}function Ju(t,e){return Xu(t,function(){return t.b.get(t.c,t.a).then(function(t){return t&&e&&(t.authDomain=e),Vu(t||{})})})}function Xu(t,e){return t.f=t.f.then(e,e),t.f}function Qu(t){if(this.l=!1,Tr(this,"app",t),!rc(this).options||!rc(this).options.apiKey)throw new xr("invalid-api-key");t=e.SDK_VERSION?rr(e.SDK_VERSION):null,this.b=new Lo(rc(this).options&&rc(this).options.apiKey,Fs(Ms),t),this.N=[],this.m=[],this.I=[],this.Ob=e.INTERNAL.createSubscribe(_(this.hc,this)),this.O=void 0,this.Pb=e.INTERNAL.createSubscribe(_(this.ic,this)),ec(this,null),this.h=new Wu(rc(this).options.apiKey+":"+rc(this).name),this.G=new function(t){this.a=t,this.b=_a()}(rc(this).options.apiKey+":"+rc(this).name),this.U=ac(this,function(t){var e=rc(t).options.authDomain,n=function(t){var e=function(t,e){return t.b.get(Uu,t.a).then(function(t){return t&&e&&(t.authDomain=e),Vu(t||{})})}(t.G,rc(t).options.authDomain).then(function(e){return(t.A=e)&&(e.da=t.G),Bu(t.G)});return ac(t,e)}(t).then(function(){return Ju(t.h,e)}).then(function(e){return e?(e.da=t.G,t.A&&(t.A.Z||null)==(e.Z||null)?e:e.reload().then(function(){return zu(t.h,e).then(function(){return e})}).o(function(n){return"auth/network-request-failed"==n.code?e:Ku(t.h)})):null}).then(function(e){ec(t,e||null)});return ac(t,n)}(this)),this.i=ac(this,function(t){return t.U.then(function(){return t.ba()}).o(function(){}).then(function(){if(!t.l)return t.ha()}).o(function(){}).then(function(){if(!t.l){t.W=!0;var e=t.h;e.b.addListener(Gu("local"),e.a,t.ha)}})}(this)),this.W=!1,this.ha=_(this.Hc,this),this.Ga=_(this.ka,this),this.qa=_(this.Yb,this),this.ra=_(this.fc,this),this.sa=_(this.gc,this),function(t){var e=rc(t).options.authDomain,n=rc(t).options.apiKey;e&&ar()&&(t.Nb=t.U.then(function(){if(!t.l){if(t.a=Za(e,n,rc(t).name),t.a.subscribe(t),ic(t)&&wu(ic(t)),t.A){wu(t.A);var r=t.A;r.na(t.aa()),fu(r,t),du(r=t.A,t.D),vu(r,t),t.A=null}return t.a}}))}(this),this.INTERNAL={},this.INTERNAL.delete=_(this.delete,this),this.INTERNAL.logFramework=_(this.pc,this),this.s=0,Ae.call(this),function(t){Object.defineProperty(t,"lc",{get:function(){return this.aa()},set:function(t){this.na(t)},enumerable:!1}),t.V=null}(this),this.D=[]}function Yu(t){ae.call(this,"languageCodeChanged"),this.h=t}function Zu(t){ae.call(this,"frameworkChanged"),this.f=t}function $u(t){return t.Nb||St(new xr("auth-domain-config-required"))}function tc(t,e){var n={};return n.apiKey=rc(t).options.apiKey,n.authDomain=rc(t).options.authDomain,n.appName=rc(t).name,t.U.then(function(){return function(t,e,n,r){var i=new pu(t,e);return n&&(i.da=n),r&&du(i,r),i.reload().then(function(){return i})}(n,e,t.G,t.Ka())}).then(function(e){return ic(t)&&e.uid==ic(t).uid?(xu(ic(t),e),t.ka(e)):(ec(t,e),wu(e),t.ka(e))}).then(function(){sc(t)})}function ec(t,e){ic(t)&&(function(t,e){V(t.N,function(t){return t==e})}(ic(t),t.Ga),we(ic(t),"tokenChanged",t.qa),we(ic(t),"userDeleted",t.ra),we(ic(t),"userInvalidated",t.sa),_u(ic(t))),e&&(e.N.push(t.Ga),_e(e,"tokenChanged",t.qa),_e(e,"userDeleted",t.ra),_e(e,"userInvalidated",t.sa),0<t.s&&gu(e)),Tr(t,"currentUser",e),e&&(e.na(t.aa()),fu(e,t),du(e,t.D),vu(e,t))}function nc(t,e){var n=null,r=null;return ac(t,e.then(function(e){return n=Ni(e),r=Yr(e),tc(t,e)}).then(function(){return Ir({user:ic(t),credential:n,additionalUserInfo:r,operationType:"signIn"})}))}function rc(t){return t.app}function ic(t){return t.currentUser}function oc(t){return ic(t)&&ic(t)._lat||null}function sc(t){if(t.W){for(var e=0;e<t.m.length;e++)t.m[e]&&t.m[e](oc(t));if(t.O!==t.getUid()&&t.I.length)for(t.O=t.getUid(),e=0;e<t.I.length;e++)t.I[e]&&t.I[e](oc(t))}}function ac(t,e){return t.N.push(e),e.ga(function(){F(t.N,e)}),e}function uc(t,e,n,r,o,s){if(Tr(this,"type","recaptcha"),this.b=this.c=null,this.m=!1,this.l=e,this.a=n||{theme:"light",type:"image"},this.g=[],this.a[hc])throw new xr("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.h="invisible"===this.a[pc],!i.document)throw new xr("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!Rn(e)||!this.h&&Rn(e).hasChildNodes())throw new xr("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.u=new Lo(t,s||null,o||null),this.s=r||function(){return null};var a=this;this.i=[];var u=this.a[cc];this.a[cc]=function(t){if(fc(a,t),"function"==typeof u)u(t);else if("string"==typeof u){var e=or(u,i);"function"==typeof e&&e(t)}};var c=this.a[lc];this.a[lc]=function(){if(fc(a,null),"function"==typeof c)c();else if("string"==typeof c){var t=or(c,i);"function"==typeof t&&t()}}}Wu.prototype.ib=function(t){var e=null,n=this;return function(t){var e=new xr("invalid-persistence-type"),n=new xr("unsupported-persistence-type");t:{for(r in ya)if(ya[r]==t){var r=!0;break t}r=!1}if(!r||"string"!=typeof t)throw e;switch(Yn()){case"ReactNative":if("session"===t)throw n;break;case"Node":if("none"!==t)throw n;break;default:if(!sr()&&"none"!==t)throw n}}(t),Xu(this,function(){return t!=n.c.B?n.b.get(n.c,n.a).then(function(r){return e=r,qu(n,t)}).then(function(){if(n.c=Gu(t),e)return n.b.set(n.c,e,n.a)}):Ct()})},w(Qu,Ae),w(Yu,ae),w(Zu,ae),(t=Qu.prototype).ib=function(t){return ac(this,t=this.h.ib(t))},t.na=function(t){this.V===t||this.l||(this.V=t,Ho(this.b,this.V),this.dispatchEvent(new Yu(this.aa())))},t.aa=function(){return this.V},t.Nc=function(){var t=i.navigator;this.na(t&&(t.languages&&t.languages[0]||t.language||t.userLanguage)||null)},t.pc=function(t){this.D.push(t),Go(this.b,e.SDK_VERSION?rr(e.SDK_VERSION,this.D):null),this.dispatchEvent(new Zu(this.D))},t.Ka=function(){return B(this.D)},t.toJSON=function(){return{apiKey:rc(this).options.apiKey,authDomain:rc(this).options.authDomain,appName:rc(this).name,currentUser:ic(this)&&ic(this).C()}},t.qb=function(t,e){switch(t){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==e&&!!this.f;default:return!1}},t.fa=function(t,e,n,r){"signInViaPopup"==t&&this.g==r&&(n&&this.v?this.v(n):e&&!n&&this.f&&this.f(e),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.v)},t.wa=function(t,e){return"signInViaRedirect"==t||"signInViaPopup"==t&&this.g==e&&this.f?_(this.Xb,this):null},t.Xb=function(t,e){var n=this;t={requestUri:t,sessionId:e},this.c&&(this.c.cancel(),this.c=null);var r=null,i=null,o=ns(n.b,t).then(function(t){return r=Ni(t),i=Yr(t),t});return ac(this,t=n.U.then(function(){return o}).then(function(t){return tc(n,t)}).then(function(){return Ir({user:ic(n),credential:r,additionalUserInfo:i,operationType:"signIn"})}))},t.Fc=function(t){if(!ar())return St(new xr("operation-not-supported-in-this-environment"));var n=this,r=Qr(t.providerId),i=dr(),o=null;(!lr()||Xn())&&rc(this).options.authDomain&&t.isOAuthProvider&&(o=Ys(rc(this).options.authDomain,rc(this).options.apiKey,rc(this).name,"signInViaPopup",t,null,i,e.SDK_VERSION||null));var s=Gn(o,r&&r.Aa,r&&r.za);return ac(this,r=$u(this).then(function(e){return Xa(e,s,"signInViaPopup",t,i,!!o)}).then(function(){return new yt(function(t,e){n.fa("signInViaPopup",null,new xr("cancelled-popup-request"),n.g),n.f=t,n.v=e,n.g=i,n.c=n.a.Da(n,"signInViaPopup",s,i)})}).then(function(t){return s&&Hn(s),t?Ir(t):null}).o(function(t){throw s&&Hn(s),t}))},t.Gc=function(t){if(!ar())return St(new xr("operation-not-supported-in-this-environment"));var e=this;return ac(this,$u(this).then(function(){return Xu(t=e.h,function(){return t.b.set(Hu,t.c.B,t.a)});var t}).then(function(){return e.a.Ba("signInViaRedirect",t)}))},t.ba=function(){if(!ar())return St(new xr("operation-not-supported-in-this-environment"));var t=this;return ac(this,$u(this).then(function(){return t.a.ba()}).then(function(t){return t?Ir(t):null}))},t.kb=function(){var t=this;return ac(this,this.i.then(function(){return ic(t)?(ec(t,null),Ku(t.h).then(function(){sc(t)})):Ct()}))},t.Hc=function(){var t=this;return Ju(this.h,rc(this).options.authDomain).then(function(e){if(!t.l){var n;if(n=ic(t)&&e){n=ic(t).uid;var r=e.uid;n=void 0!==n&&null!==n&&""!==n&&void 0!==r&&null!==r&&""!==r&&n==r}if(n)return xu(ic(t),e),ic(t).F();(ic(t)||e)&&(ec(t,e),e&&(wu(e),e.da=t.G),t.a&&t.a.subscribe(t),sc(t))}})},t.ka=function(t){return zu(this.h,t)},t.Yb=function(){sc(this),this.ka(ic(this))},t.fc=function(){this.kb()},t.gc=function(){this.kb()},t.hc=function(t){var e=this;this.addAuthTokenListener(function(){t.next(ic(e))})},t.ic=function(t){var e=this;!function(t,e){t.I.push(e),ac(t,t.i.then(function(){!t.l&&L(t.I,e)&&t.O!==t.getUid()&&(t.O=t.getUid(),e(oc(t)))}))}(this,function(){t.next(ic(e))})},t.rc=function(t,n,r){var i=this;return this.W&&e.Promise.resolve().then(function(){p(t)?t(ic(i)):p(t.next)&&t.next(ic(i))}),this.Ob(t,n,r)},t.qc=function(t,n,r){var i=this;return this.W&&e.Promise.resolve().then(function(){i.O=i.getUid(),p(t)?t(ic(i)):p(t.next)&&t.next(ic(i))}),this.Pb(t,n,r)},t.$b=function(t){var e=this;return ac(this,this.i.then(function(){return ic(e)?ic(e).F(t).then(function(t){return{accessToken:t}}):null}))},t.Bc=function(t){return this.Hb(t).then(function(t){return t.user})},t.Hb=function(t){var e=this;return this.i.then(function(){return nc(e,ks(e.b,Ns,{token:t}))}).then(function(t){var n=t.user;return Nu(n,"isAnonymous",!1),e.ka(n),t})},t.Ib=function(t,e){var n=this;return this.i.then(function(){return nc(n,ks(n.b,xs,{email:t,password:e}))})},t.Cc=function(t,e){return this.Ib(t,e).then(function(t){return t.user})},t.Sb=function(t,e){return this.sb(t,e).then(function(t){return t.user})},t.sb=function(t,e){var n=this;return this.i.then(function(){return nc(n,ks(n.b,us,{email:t,password:e}))})},t.Ac=function(t){return this.Oa(t).then(function(t){return t.user})},t.Oa=function(t){var e=this;return this.i.then(function(){return nc(e,t.xa(e.b))})},t.jb=function(){return this.Jb().then(function(t){return t.user})},t.Jb=function(){var t=this;return this.i.then(function(){var e=ic(t);return e&&e.isAnonymous?Ir({user:e,credential:null,additionalUserInfo:Ir({providerId:null,isNewUser:!1}),operationType:"signIn"}):nc(t,t.b.jb()).then(function(e){var n=e.user;return Nu(n,"isAnonymous",!0),t.ka(n),e})})},t.getUid=function(){return ic(this)&&ic(this).uid||null},t.Qb=function(t){this.addAuthTokenListener(t),this.s++,0<this.s&&ic(this)&&gu(ic(this))},t.yc=function(t){var e=this;D(this.m,function(n){n==t&&e.s--}),0>this.s&&(this.s=0),0==this.s&&ic(this)&&_u(ic(this)),this.removeAuthTokenListener(t)},t.addAuthTokenListener=function(t){var e=this;this.m.push(t),ac(this,this.i.then(function(){e.l||L(e.m,t)&&t(oc(e))}))},t.removeAuthTokenListener=function(t){V(this.m,function(e){return e==t})},t.delete=function(){this.l=!0;for(var t=0;t<this.N.length;t++)this.N[t].cancel("app-deleted");return this.N=[],this.h&&(t=this.h).b.removeListener(Gu("local"),t.a,this.ha),this.a&&this.a.unsubscribe(this),e.Promise.resolve()},t.Vb=function(t){return ac(this,function(t,e){return ks(t,cs,{identifier:e,continueUri:ur()?Bn():"http://localhost"}).then(function(t){return t.allProviders||[]})}(this.b,t))},t.Wb=function(t){return ac(this,function(t,e){return ks(t,cs,{identifier:e,continueUri:ur()?Bn():"http://localhost"}).then(function(t){return t.signinMethods||[]})}(this.b,t))},t.jc=function(t){return!!Ci(t)},t.hb=function(t,e){var n=this;return ac(this,Ct().then(function(){var t=new kr(e);if(!t.c)throw new xr("argument-error",jr+" must be true when sending sign in link to email");return Wr(t)}).then(function(e){return n.b.hb(t,e)}).then(function(){}))},t.Oc=function(t){return this.Ia(t).then(function(t){return t.data.email})},t.Wa=function(t,e){return ac(this,this.b.Wa(t,e).then(function(){}))},t.Ia=function(t){return ac(this,this.b.Ia(t).then(function(t){return new function(t){var e={},n=t.email,r=t.newEmail;if(!(t=t.requestType)||"EMAIL_SIGNIN"!=t&&!n)throw Error("Invalid provider user info!");e.fromEmail=r||null,e.email=n||null,Tr(this,"operation",t),Tr(this,"data",Nr(e))}(t)}))},t.Ua=function(t){return ac(this,this.b.Ua(t).then(function(){}))},t.gb=function(t,e){var n=this;return ac(this,Ct().then(function(){return"undefined"==typeof e||ot(e)?{}:Wr(new kr(e))}).then(function(e){return n.b.gb(t,e)}).then(function(){}))},t.Ec=function(t,e){return ac(this,ou(this,t,e,_(this.Oa,this)))},t.Dc=function(t,e){var n=this;return ac(this,Ct().then(function(){var r=Ei(t,e||Bn());return n.Oa(r)}))};var cc="callback",lc="expired-callback",hc="sitekey",pc="size";function fc(t,e){for(var n=0;n<t.i.length;n++)try{t.i[n](e)}catch(t){}}function dc(t,e){return t.g.push(e),e.ga(function(){F(t.g,e)}),e}function vc(t){if(t.m)throw new xr("internal-error","RecaptchaVerifier instance has been destroyed.")}(t=uc.prototype).ya=function(){var t=this;return this.c?this.c:this.c=dc(this,Ct().then(function(){if(ur()&&!Qn())return Kn();throw new xr("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")}).then(function(){return function(t,e){return new yt(function(n,r){gr()?!i.grecaptcha||e!==t.c&&!t.b?(i[t.a]=function(){if(i.grecaptcha){t.c=e;var o=i.grecaptcha.render;i.grecaptcha.render=function(e,n){return e=o(e,n),t.b++,e},n()}else r(new xr("internal-error"));delete i[t.a]},Ct(Ao(mn(yc,{onload:t.a,hl:e||""}))).o(function(){r(new xr("internal-error","Unable to load external reCAPTCHA dependencies!"))})):n():r(new xr("network-request-failed"))})}(_c(),t.s())}).then(function(){return ks(t.u,ms,{})}).then(function(e){t.a[hc]=e.recaptchaSiteKey}).o(function(e){throw t.c=null,e}))},t.render=function(){vc(this);var t=this;return dc(this,this.ya().then(function(){if(null===t.b){var e=t.l;if(!t.h){var n=Rn(e);e=function(t,e,n){var r=arguments,i=document,s=String(r[0]),a=r[1];if(!pn&&a&&(a.name||a.type)){if(s=["<",s],a.name&&s.push(' name="',H(a.name),'"'),a.type){s.push(' type="',H(a.type),'"');var u={};lt(u,a),delete u.type,a=u}s.push(">"),s=s.join("")}return s=i.createElement(s),a&&(o(a)?s.className=a:l(a)?s.className=a.join(" "):kn(s,a)),2<r.length&&function(t,e,n){function r(n){n&&e.appendChild(o(n)?t.createTextNode(n):n)}for(var i=2;i<n.length;i++){var s=n[i];!h(s)||f(s)&&0<s.nodeType?r(s):D(jn(s)?B(s):s,r)}}(i,s,r),s}("DIV"),n.appendChild(e)}t.b=grecaptcha.render(e,t.a)}return t.b}))},t.verify=function(){vc(this);var t=this;return dc(this,this.render().then(function(e){return new yt(function(n){var r=grecaptcha.getResponse(e);if(r)n(r);else{var i=function(e){e&&(function(t,e){V(t.i,function(t){return t==e})}(t,i),n(e))};t.i.push(i),t.h&&grecaptcha.execute(t.b)}})}))},t.reset=function(){vc(this),null!==this.b&&grecaptcha.reset(this.b)},t.clear=function(){vc(this),this.m=!0,_c().b--;for(var t=0;t<this.g.length;t++)this.g[t].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.h){t=Rn(this.l);for(var e;e=t.firstChild;)t.removeChild(e)}};var yc=yn("https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),gc=null;function _c(){return gc||(gc=new function(){this.b=i.grecaptcha?1/0:0,this.c=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}),gc}function mc(t,n,r){try{this.f=r||e.app()}catch(t){throw new xr("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.f.options||!this.f.options.apiKey)throw new xr("invalid-api-key");r=this.f.options.apiKey;var i=this,o=null;try{o=this.f.auth().Ka()}catch(t){}o=e.SDK_VERSION?rr(e.SDK_VERSION,o):null,uc.call(this,r,t,n,function(){try{var t=i.f.auth().aa()}catch(e){t=null}return t},o,Fs(Ms))}function bc(t,e,n,r){t:{n=Array.prototype.slice.call(n);for(var i=0,o=!1,s=0;s<e.length;s++)if(e[s].optional)o=!0;else{if(o)throw new xr("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(o=e.length,n.length<i||o<n.length)r="Expected "+(i==o?1==i?"1 argument":i+" arguments":i+"-"+o+" arguments")+" but got "+n.length+".";else{for(i=0;i<n.length;i++)if(o=e[i].optional&&void 0===n[i],!e[i].M(n[i])&&!o){if(e=e[i],0>i||i>=wc.length)throw new xr("internal-error","Argument validator received an unsupported number of arguments.");n=wc[i],r=(r?"":n+" argument ")+(e.name?'"'+e.name+'" ':"")+"must be "+e.K+".";break t}r=null}}if(r)throw new xr("argument-error",t+" failed: "+r)}w(mc,uc);var wc="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function Ec(t,e){return{name:t||"",K:"a valid string",optional:!!e,M:o}}function Cc(){return{name:"opt_forceRefresh",K:"a boolean",optional:!0,M:s}}function Sc(t,e){return{name:t||"",K:"a valid object",optional:!!e,M:f}}function Tc(t,e){return{name:t||"",K:"a function",optional:!!e,M:p}}function Oc(t,e){return{name:t||"",K:"null",optional:!!e,M:c}}function Ic(t){return{name:t?t+"Credential":"credential",K:t?"a valid "+t+" credential":"a valid credential",optional:!1,M:function(e){return!!e&&!(!e.xa||t&&e.providerId!==t)}}}function Nc(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(t){return!!(t&&o(t.type)&&p(t.verify))}}}function xc(t,e,n,r){return{name:n||"",K:t.K+" or "+e.K,optional:!!r,M:function(n){return t.M(n)||e.M(n)}}}function Ac(t,e){for(var n in e){var r=e[n].name;t[r]=Rc(r,t[n],e[n].j)}}function Pc(t,e,n,r){t[e]=Rc(e,n,r)}function Rc(t,e,n){function r(){var t=Array.prototype.slice.call(arguments);return bc(o,n,t),e.apply(this,t)}if(!n)return e;var i,o=function(t){return(t=t.split("."))[t.length-1]}(t);for(i in e)r[i]=e[i];for(i in e.prototype)r.prototype[i]=e.prototype[i];return r}Ac(Qu.prototype,{Ua:{name:"applyActionCode",j:[Ec("code")]},Ia:{name:"checkActionCode",j:[Ec("code")]},Wa:{name:"confirmPasswordReset",j:[Ec("code"),Ec("newPassword")]},Sb:{name:"createUserWithEmailAndPassword",j:[Ec("email"),Ec("password")]},sb:{name:"createUserAndRetrieveDataWithEmailAndPassword",j:[Ec("email"),Ec("password")]},Vb:{name:"fetchProvidersForEmail",j:[Ec("email")]},Wb:{name:"fetchSignInMethodsForEmail",j:[Ec("email")]},ba:{name:"getRedirectResult",j:[]},jc:{name:"isSignInWithEmailLink",j:[Ec("emailLink")]},qc:{name:"onAuthStateChanged",j:[xc(Sc(),Tc(),"nextOrObserver"),Tc("opt_error",!0),Tc("opt_completed",!0)]},rc:{name:"onIdTokenChanged",j:[xc(Sc(),Tc(),"nextOrObserver"),Tc("opt_error",!0),Tc("opt_completed",!0)]},gb:{name:"sendPasswordResetEmail",j:[Ec("email"),xc(Sc("opt_actionCodeSettings",!0),Oc(null,!0),"opt_actionCodeSettings",!0)]},hb:{name:"sendSignInLinkToEmail",j:[Ec("email"),Sc("actionCodeSettings")]},ib:{name:"setPersistence",j:[Ec("persistence")]},Oa:{name:"signInAndRetrieveDataWithCredential",j:[Ic()]},jb:{name:"signInAnonymously",j:[]},Jb:{name:"signInAnonymouslyAndRetrieveData",j:[]},Ac:{name:"signInWithCredential",j:[Ic()]},Bc:{name:"signInWithCustomToken",j:[Ec("token")]},Hb:{name:"signInAndRetrieveDataWithCustomToken",j:[Ec("token")]},Cc:{name:"signInWithEmailAndPassword",j:[Ec("email"),Ec("password")]},Dc:{name:"signInWithEmailLink",j:[Ec("email"),Ec("emailLink",!0)]},Ib:{name:"signInAndRetrieveDataWithEmailAndPassword",j:[Ec("email"),Ec("password")]},Ec:{name:"signInWithPhoneNumber",j:[Ec("phoneNumber"),Nc()]},Fc:{name:"signInWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Gc:{name:"signInWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},kb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[Ec(null,!0)]},Nc:{name:"useDeviceLanguage",j:[]},Oc:{name:"verifyPasswordResetCode",j:[Ec("code")]}}),function(t,e){for(var n in e){var r=e[n].name;if(r!==n){var i=e[n].Rb;Object.defineProperty(t,r,{get:function(){return this[n]},set:function(t){bc(r,[i],[t],!0),this[n]=t},enumerable:!0})}}}(Qu.prototype,{lc:{name:"languageCode",Rb:xc(Ec(),Oc(),"languageCode")}}),(Qu.Persistence=ya).LOCAL="local",Qu.Persistence.SESSION="session",Qu.Persistence.NONE="none",Ac(pu.prototype,{delete:{name:"delete",j:[]},F:{name:"getIdToken",j:[Cc()]},getToken:{name:"getToken",j:[Cc()]},$a:{name:"linkAndRetrieveDataWithCredential",j:[Ic()]},kc:{name:"linkWithCredential",j:[Ic()]},mc:{name:"linkWithPhoneNumber",j:[Ec("phoneNumber"),Nc()]},nc:{name:"linkWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},oc:{name:"linkWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},bb:{name:"reauthenticateAndRetrieveDataWithCredential",j:[Ic()]},uc:{name:"reauthenticateWithCredential",j:[Ic()]},vc:{name:"reauthenticateWithPhoneNumber",j:[Ec("phoneNumber"),Nc()]},wc:{name:"reauthenticateWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},xc:{name:"reauthenticateWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},reload:{name:"reload",j:[]},fb:{name:"sendEmailVerification",j:[xc(Sc("opt_actionCodeSettings",!0),Oc(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[Ec(null,!0)]},Lc:{name:"unlink",j:[Ec("provider")]},mb:{name:"updateEmail",j:[Ec("email")]},nb:{name:"updatePassword",j:[Ec("password")]},Mc:{name:"updatePhoneNumber",j:[Ic("phone")]},ob:{name:"updateProfile",j:[Sc("profile")]}}),Ac(yt.prototype,{ga:{name:"finally"},o:{name:"catch"},then:{name:"then"}}),Ac(iu.prototype,{confirm:{name:"confirm",j:[Ec("verificationCode")]}}),Pc(wi,"credential",function(t,e){return new bi(t,e)},[Ec("email"),Ec("password")]),Ac(pi.prototype,{ta:{name:"addScope",j:[Ec("scope")]},Ca:{name:"setCustomParameters",j:[Sc("customOAuthParameters")]}}),Pc(pi,"credential",fi,[xc(Ec(),Sc(),"token")]),Pc(wi,"credentialWithLink",Ei,[Ec("email"),Ec("emailLink")]),Ac(di.prototype,{ta:{name:"addScope",j:[Ec("scope")]},Ca:{name:"setCustomParameters",j:[Sc("customOAuthParameters")]}}),Pc(di,"credential",vi,[xc(Ec(),Sc(),"token")]),Ac(yi.prototype,{ta:{name:"addScope",j:[Ec("scope")]},Ca:{name:"setCustomParameters",j:[Sc("customOAuthParameters")]}}),Pc(yi,"credential",gi,[xc(Ec(),xc(Sc(),Oc()),"idToken"),xc(Ec(),Oc(),"accessToken",!0)]),Ac(_i.prototype,{Ca:{name:"setCustomParameters",j:[Sc("customOAuthParameters")]}}),Pc(_i,"credential",mi,[xc(Ec(),Sc(),"token"),Ec("secret",!0)]),Ac(hi.prototype,{ta:{name:"addScope",j:[Ec("scope")]},credential:{name:"credential",j:[xc(Ec(),Oc(),"idToken",!0),xc(Ec(),Oc(),"accessToken",!0)]},Ca:{name:"setCustomParameters",j:[Sc("customOAuthParameters")]}}),Pc(Oi,"credential",Ii,[Ec("verificationId"),Ec("verificationCode")]),Ac(Oi.prototype,{Sa:{name:"verifyPhoneNumber",j:[Ec("phoneNumber"),Nc()]}}),Ac(xr.prototype,{toJSON:{name:"toJSON",j:[Ec(null,!0)]}}),Ac(ji.prototype,{toJSON:{name:"toJSON",j:[Ec(null,!0)]}}),Ac(Di.prototype,{toJSON:{name:"toJSON",j:[Ec(null,!0)]}}),Ac(mc.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),function(){if("undefined"==typeof e||!e.INTERNAL||!e.INTERNAL.registerService)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var t={Auth:Qu,Error:xr};Pc(t,"EmailAuthProvider",wi,[]),Pc(t,"FacebookAuthProvider",pi,[]),Pc(t,"GithubAuthProvider",di,[]),Pc(t,"GoogleAuthProvider",yi,[]),Pc(t,"TwitterAuthProvider",_i,[]),Pc(t,"OAuthProvider",hi,[Ec("providerId")]),Pc(t,"PhoneAuthProvider",Oi,[{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(t){return!!(t&&t instanceof Qu)}}]),Pc(t,"RecaptchaVerifier",mc,[xc(Ec(),{name:"",K:"an HTML element",optional:!1,M:function(t){return!!(t&&t instanceof Element)}},"recaptchaContainer"),Sc("recaptchaParameters",!0),{name:"app",K:"an instance of Firebase App",optional:!0,M:function(t){return!!(t&&t instanceof e.app.App)}}]),e.INTERNAL.registerService("auth",function(t,e){return e({INTERNAL:{getUid:_((t=new Qu(t)).getUid,t),getToken:_(t.$b,t),addAuthTokenListener:_(t.Qb,t),removeAuthTokenListener:_(t.yc,t)}}),t},t,function(t,e){if("create"===t)try{e.auth()}catch(t){}}),e.INTERNAL.extendNamespace({User:pu})}()}).call("undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}).call(e,n("fRUx"))},TO51:function(t,e,n){"use strict";n.d(e,"c",function(){return l}),n.d(e,"b",function(){return h}),n.d(e,"a",function(){return p});var r=n("6Xbx"),i=n("AP4T"),o=n("E9/g"),s=n("qLnt"),a=n("Upor"),u=n("jaVc"),c=n("V7AE"),l=function(t){function e(e){t.call(this,e),this.destination=e}return Object(r.__extends)(e,t),e}(o.a),h=function(t){function e(){t.call(this),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}return Object(r.__extends)(e,t),e.prototype[c.a]=function(){return new l(this)},e.prototype.lift=function(t){var e=new p(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new a.a;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new a.a;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new a.a;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new a.a;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new a.a;return this.hasError?(t.error(this.thrownError),s.a.EMPTY):this.isStopped?(t.complete(),s.a.EMPTY):(this.observers.push(t),new u.a(this,t))},e.prototype.asObservable=function(){var t=new i.a;return t.source=this,t},e.create=function(t,e){return new p(t,e)},e}(i.a),p=function(t){function e(e,n){t.call(this),this.destination=e,this.source=n}return Object(r.__extends)(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):s.a.EMPTY},e}(h)},TS1d:function(t,e,n){"use strict";e.a=function(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),Object(r.a)(t,e,n)(this)};var r=n("wP3s")},Tmcl:function(t,e,n){"use strict";function r(t,e,n){var r="";switch(e){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4. Need to update it?")}return t+" failed: "+r+" argument "}Object.defineProperty(e,"__esModule",{value:!0}),e.validateArgCount=function(t,e,n,r){var i;if(r<e?i="at least "+e:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(t+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")},e.errorPrefix=r,e.validateNamespace=function(t,e,n,i){if((!i||n)&&"string"!=typeof n)throw new Error(r(t,e,i)+"must be a valid firebase namespace.")},e.validateCallback=function(t,e,n,i){if((!i||n)&&"function"!=typeof n)throw new Error(r(t,e,i)+"must be a valid function.")},e.validateContextObject=function(t,e,n,i){if((!i||n)&&("object"!=typeof n||null===n))throw new Error(r(t,e,i)+"must be a valid context object.")}},U4XL:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("/byE");e.getUA=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""},e.isMobileCordova=function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(e.getUA())},e.isReactNative=function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},e.isNodeSdk=function(){return!0===r.CONSTANTS.NODE_CLIENT||!0===r.CONSTANTS.NODE_ADMIN}},UHIZ:function(t,e,n){"use strict";n.d(e,"m",function(){return Se}),n.d(e,"l",function(){return Oe}),n.d(e,"o",function(){return xe}),n.d(e,"j",function(){return fe}),n.d(e,"k",function(){return we}),n.d(e,"i",function(){return ve}),n.d(e,"g",function(){return je}),n.d(e,"h",function(){return Je}),n.d(e,"n",function(){return Ve}),n.d(e,"b",function(){return Ne}),n.d(e,"d",function(){return ke}),n.d(e,"e",function(){return Re}),n.d(e,"f",function(){return Pe}),n.d(e,"p",function(){return De}),n.d(e,"a",function(){return Mt}),n.d(e,"q",function(){return ge}),n.d(e,"c",function(){return ut}),n.d(e,"r",function(){return at}),n.d(e,"s",function(){return Me}),n.d(e,"y",function(){return Ge}),n.d(e,"z",function(){return ze}),n.d(e,"A",function(){return Ke}),n.d(e,"v",function(){return Be}),n.d(e,"u",function(){return Ue}),n.d(e,"x",function(){return He}),n.d(e,"t",function(){return Fe}),n.d(e,"w",function(){return qe});var r=n("Un6q"),i=n("LMZF"),o=n("6Xbx"),s=n("eoFs"),a=n("TO51"),u=n("GZB0"),c=n("eL9U"),l=n("dmC+"),h=n("TS1d"),p=n("AP4T"),f=n("fgj+"),d=n("D62v"),v=n("ASsP"),y=n("l+DM"),g=n("Ry8D"),_=n("CASk"),m=n("f37V"),b=n("uRSF"),w=n("yWZg"),E=n("24Q+"),C=n("RyBE"),S=n("6S6c"),T=function(t,e){this.id=t,this.url=e},O=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(o.__extends)(e,t),e.prototype.toString=function(){return"NavigationStart(id: "+this.id+", url: '"+this.url+"')"},e}(T),I=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.urlAfterRedirects=r,i}return Object(o.__extends)(e,t),e.prototype.toString=function(){return"NavigationEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"')"},e}(T),N=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.reason=r,i}return Object(o.__extends)(e,t),e.prototype.toString=function(){return"NavigationCancel(id: "+this.id+", url: '"+this.url+"')"},e}(T),x=function(t){function e(e,n,r){var i=t.call(this,e,n)||this;return i.error=r,i}return Object(o.__extends)(e,t),e.prototype.toString=function(){return"NavigationError(id: "+this.id+", url: '"+this.url+"', error: "+this.error+")"},e}(T),A=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return Object(o.__extends)(e,t),e.prototype.toString=function(){return"RoutesRecognized(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(T),P=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return Object(o.__extends)(e,t),e.prototype.toString=function(){return"GuardsCheckStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(T),R=function(t){function e(e,n,r,i,o){var s=t.call(this,e,n)||this;return s.urlAfterRedirects=r,s.state=i,s.shouldActivate=o,s}return Object(o.__extends)(e,t),e.prototype.toString=function(){return"GuardsCheckEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+", shouldActivate: "+this.shouldActivate+")"},e}(T),k=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return Object(o.__extends)(e,t),e.prototype.toString=function(){return"ResolveStart(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(T),D=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.urlAfterRedirects=r,o.state=i,o}return Object(o.__extends)(e,t),e.prototype.toString=function(){return"ResolveEnd(id: "+this.id+", url: '"+this.url+"', urlAfterRedirects: '"+this.urlAfterRedirects+"', state: "+this.state+")"},e}(T),j=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadStart(path: "+this.route.path+")"},t}(),M=function(){function t(t){this.route=t}return t.prototype.toString=function(){return"RouteConfigLoadEnd(path: "+this.route.path+")"},t}(),L=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),F=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ChildActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),V=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationStart(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),U=function(){function t(t){this.snapshot=t}return t.prototype.toString=function(){return"ActivationEnd(path: '"+(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"")+"')"},t}(),B="primary",W=function(){function t(t){this.params=t||{}}return t.prototype.has=function(t){return this.params.hasOwnProperty(t)},t.prototype.get=function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e[0]:e}return null},t.prototype.getAll=function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e:[e]}return[]},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}();function q(t){return new W(t)}function H(t,e,n){var r=n.path.split("/");if(r.length>t.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||r.length<t.length))return null;for(var i={},o=0;o<r.length;o++){var s=r[o],a=t[o];if(s.startsWith(":"))i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}var G=function(t,e){this.routes=t,this.module=e};function z(t,e){void 0===e&&(e="");for(var n=0;n<t.length;n++){var r=t[n];K(r,J(e,r))}}function K(t,e){if(!t)throw new Error("\n Invalid configuration of route '"+e+"': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n ");if(Array.isArray(t))throw new Error("Invalid configuration of route '"+e+"': Array cannot be specified");if(!t.component&&t.outlet&&t.outlet!==B)throw new Error("Invalid configuration of route '"+e+"': a componentless route cannot have a named outlet set");if(t.redirectTo&&t.children)throw new Error("Invalid configuration of route '"+e+"': redirectTo and children cannot be used together");if(t.redirectTo&&t.loadChildren)throw new Error("Invalid configuration of route '"+e+"': redirectTo and loadChildren cannot be used together");if(t.children&&t.loadChildren)throw new Error("Invalid configuration of route '"+e+"': children and loadChildren cannot be used together");if(t.redirectTo&&t.component)throw new Error("Invalid configuration of route '"+e+"': redirectTo and component cannot be used together");if(t.path&&t.matcher)throw new Error("Invalid configuration of route '"+e+"': path and matcher cannot be used together");if(void 0===t.redirectTo&&!t.component&&!t.children&&!t.loadChildren)throw new Error("Invalid configuration of route '"+e+"'. One of the following must be provided: component, redirectTo, children or loadChildren");if(void 0===t.path&&void 0===t.matcher)throw new Error("Invalid configuration of route '"+e+"': routes must have either a path or a matcher specified");if("string"==typeof t.path&&"/"===t.path.charAt(0))throw new Error("Invalid configuration of route '"+e+"': path cannot start with a slash");if(""===t.path&&void 0!==t.redirectTo&&void 0===t.pathMatch)throw new Error("Invalid configuration of route '{path: \""+e+'", redirectTo: "'+t.redirectTo+"\"}': please provide 'pathMatch'. The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.");if(void 0!==t.pathMatch&&"full"!==t.pathMatch&&"prefix"!==t.pathMatch)throw new Error("Invalid configuration of route '"+e+"': pathMatch can only be set to 'prefix' or 'full'");t.children&&z(t.children,e)}function J(t,e){return e?t||e.path?t&&!e.path?t+"/":!t&&e.path?e.path:t+"/"+e.path:"":t}function X(t,e){var n,r=Object.keys(t),i=Object.keys(e);if(r.length!=i.length)return!1;for(var o=0;o<r.length;o++)if(t[n=r[o]]!==e[n])return!1;return!0}function Q(t){return Array.prototype.concat.apply([],t)}function Y(t){return t.length>0?t[t.length-1]:null}function Z(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)}function $(t){var e=w.a.call(t);return m.a.call(e,function(t){return!0===t})}function tt(t){return Object(i._8)(t)?t:Object(i._9)(t)?Object(_.a)(Promise.resolve(t)):Object(u.a)(t)}function et(t,e,n){return n?function(t,e){return X(t,e)}(t.queryParams,e.queryParams)&&function t(e,n){if(!ot(e.segments,n.segments))return!1;if(e.numberOfChildren!==n.numberOfChildren)return!1;for(var r in n.children){if(!e.children[r])return!1;if(!t(e.children[r],n.children[r]))return!1}return!0}(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(function(n){return e[n]===t[n]})}(t.queryParams,e.queryParams)&&function t(e,n){return function e(n,r,i){if(n.segments.length>i.length)return!!ot(s=n.segments.slice(0,i.length),i)&&!r.hasChildren();if(n.segments.length===i.length){if(!ot(n.segments,i))return!1;for(var o in r.children){if(!n.children[o])return!1;if(!t(n.children[o],r.children[o]))return!1}return!0}var s=i.slice(0,n.segments.length),a=i.slice(n.segments.length);return!!ot(n.segments,s)&&!!n.children[B]&&e(n.children[B],r,a)}(e,n,n.segments)}(t.root,e.root)}var nt=function(){function t(t,e,n){this.root=t,this.queryParams=e,this.fragment=n}return Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=q(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return ct.serialize(this)},t}(),rt=function(){function t(t,e){var n=this;this.segments=t,this.children=e,this.parent=null,Z(e,function(t,e){return t.parent=n})}return t.prototype.hasChildren=function(){return this.numberOfChildren>0},Object.defineProperty(t.prototype,"numberOfChildren",{get:function(){return Object.keys(this.children).length},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return lt(this)},t}(),it=function(){function t(t,e){this.path=t,this.parameters=e}return Object.defineProperty(t.prototype,"parameterMap",{get:function(){return this._parameterMap||(this._parameterMap=q(this.parameters)),this._parameterMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return ft(this)},t}();function ot(t,e){return t.length===e.length&&t.every(function(t,n){return t.path===e[n].path})}function st(t,e){var n=[];return Z(t.children,function(t,r){r===B&&(n=n.concat(e(t,r)))}),Z(t.children,function(t,r){r!==B&&(n=n.concat(e(t,r)))}),n}var at=function(){},ut=function(){function t(){}return t.prototype.parse=function(t){var e=new _t(t);return new nt(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())},t.prototype.serialize=function(t){var e,n;return"/"+function t(e,n){if(!e.hasChildren())return lt(e);if(n){var r=e.children[B]?t(e.children[B],!1):"",i=[];return Z(e.children,function(e,n){n!==B&&i.push(n+":"+t(e,!1))}),i.length>0?r+"("+i.join("//")+")":r}var o=st(e,function(n,r){return r===B?[t(e.children[B],!1)]:[r+":"+t(n,!1)]});return lt(e)+"/("+o.join("//")+")"}(t.root,!0)+(e=t.queryParams,(n=Object.keys(e).map(function(t){var n=e[t];return Array.isArray(n)?n.map(function(e){return ht(t)+"="+ht(e)}).join("&"):ht(t)+"="+ht(n)})).length?"?"+n.join("&"):"")+("string"==typeof t.fragment?"#"+encodeURI(t.fragment):"")},t}(),ct=new ut;function lt(t){return t.segments.map(function(t){return ft(t)}).join("/")}function ht(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";")}function pt(t){return decodeURIComponent(t)}function ft(t){return""+ht(t.path)+(e=t.parameters,Object.keys(e).map(function(t){return";"+ht(t)+"="+ht(e[t])}).join(""));var e}var dt=/^[^\/()?;=&#]+/;function vt(t){var e=t.match(dt);return e?e[0]:""}var yt=/^[^=?&#]+/,gt=/^[^?&#]+/,_t=function(){function t(t){this.url=t,this.remaining=t}return t.prototype.parseRootSegment=function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new rt([],{}):new rt([],this.parseChildren())},t.prototype.parseQueryParams=function(){var t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t},t.prototype.parseFragment=function(){return this.consumeOptional("#")?decodeURI(this.remaining):null},t.prototype.parseChildren=function(){if(""===this.remaining)return{};this.consumeOptional("/");var t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());var e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n[B]=new rt(t,e)),n},t.prototype.parseSegment=function(){var t=vt(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '"+this.remaining+"'.");return this.capture(t),new it(pt(t),this.parseMatrixParams())},t.prototype.parseMatrixParams=function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t},t.prototype.parseParam=function(t){var e=vt(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var r=vt(this.remaining);r&&this.capture(n=r)}t[pt(e)]=pt(n)}},t.prototype.parseQueryParam=function(t){var e,n=(e=this.remaining.match(yt))?e[0]:"";if(n){this.capture(n);var r="";if(this.consumeOptional("=")){var i=function(t){var e=t.match(gt);return e?e[0]:""}(this.remaining);i&&this.capture(r=i)}var o=pt(n),s=pt(r);if(t.hasOwnProperty(o)){var a=t[o];Array.isArray(a)||(t[o]=a=[a]),a.push(s)}else t[o]=s}},t.prototype.parseParens=function(t){var e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=vt(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new Error("Cannot parse url '"+this.url+"'");var i=void 0;n.indexOf(":")>-1?(i=n.substr(0,n.indexOf(":")),this.capture(i),this.capture(":")):t&&(i=B);var o=this.parseChildren();e[i]=1===Object.keys(o).length?o[B]:new rt([],o),this.consumeOptional("//")}return e},t.prototype.peekStartsWith=function(t){return this.remaining.startsWith(t)},t.prototype.consumeOptional=function(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)},t.prototype.capture=function(t){if(!this.consumeOptional(t))throw new Error('Expected "'+t+'".')},t}(),mt=function(t){this.segmentGroup=t||null},bt=function(t){this.urlTree=t};function wt(t){return new p.a(function(e){return e.error(new mt(t))})}function Et(t){return new p.a(function(e){return e.error(new bt(t))})}function Ct(t){return new p.a(function(e){return e.error(new Error("Only absolute redirects can have named outlets. redirectTo: '"+t+"'"))})}var St=function(){function t(t,e,n,r,o){this.configLoader=e,this.urlSerializer=n,this.urlTree=r,this.config=o,this.allowRedirects=!0,this.ngModule=t.get(i.v)}return t.prototype.apply=function(){var t=this,e=this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,B),n=l.a.call(e,function(e){return t.createUrlTree(e,t.urlTree.queryParams,t.urlTree.fragment)});return d.a.call(n,function(e){if(e instanceof bt)return t.allowRedirects=!1,t.match(e.urlTree);if(e instanceof mt)throw t.noMatchError(e);throw e})},t.prototype.match=function(t){var e=this,n=this.expandSegmentGroup(this.ngModule,this.config,t.root,B),r=l.a.call(n,function(n){return e.createUrlTree(n,t.queryParams,t.fragment)});return d.a.call(r,function(t){if(t instanceof mt)throw e.noMatchError(t);throw t})},t.prototype.noMatchError=function(t){return new Error("Cannot match any routes. URL Segment: '"+t.segmentGroup+"'")},t.prototype.createUrlTree=function(t,e,n){var r,i=t.segments.length>0?new rt([],((r={})[B]=t,r)):t;return new nt(i,e,n)},t.prototype.expandSegmentGroup=function(t,e,n,r){return 0===n.segments.length&&n.hasChildren()?l.a.call(this.expandChildren(t,e,n),function(t){return new rt([],t)}):this.expandSegment(t,n,e,n.segments,r,!0)},t.prototype.expandChildren=function(t,e,n){var r=this;return function(n,i){if(0===Object.keys(n).length)return Object(u.a)({});var o=[],s=[],a={};Z(n,function(n,i){var u=l.a.call(r.expandSegmentGroup(t,e,n,i),function(t){return a[i]=t});i===B?o.push(u):s.push(u)});var c=v.a.call(u.a.apply(void 0,o.concat(s))),h=b.a.call(c);return l.a.call(h,function(){return a})}(n.children)},t.prototype.expandSegment=function(t,e,n,r,i,o){var s=this,a=u.a.apply(void 0,n),c=l.a.call(a,function(a){var c=s.expandSegmentAgainstRoute(t,e,n,a,r,i,o);return d.a.call(c,function(t){if(t instanceof mt)return Object(u.a)(null);throw t})}),h=v.a.call(c),p=y.a.call(h,function(t){return!!t});return d.a.call(p,function(t,n){if(t instanceof g.a||"EmptyError"===t.name){if(s.noLeftoversInUrl(e,r,i))return Object(u.a)(new rt([],{}));throw new mt(e)}throw t})},t.prototype.noLeftoversInUrl=function(t,e,n){return 0===e.length&&!t.children[n]},t.prototype.expandSegmentAgainstRoute=function(t,e,n,r,i,o,s){return Nt(r)!==o?wt(e):void 0===r.redirectTo?this.matchSegmentAgainstRoute(t,e,r,i):s&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,r,i,o):wt(e)},t.prototype.expandSegmentAgainstRouteUsingRedirect=function(t,e,n,r,i,o){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,r,o):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,r,i,o)},t.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect=function(t,e,n,r){var i=this,o=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?Et(o):h.a.call(this.lineralizeSegments(n,o),function(n){var o=new rt(n,{});return i.expandSegment(t,o,e,n,r,!1)})},t.prototype.expandRegularSegmentAgainstRouteUsingRedirect=function(t,e,n,r,i,o){var s=this,a=Tt(e,r,i),u=a.consumedSegments,c=a.lastChild,l=a.positionalParamSegments;if(!a.matched)return wt(e);var p=this.applyRedirectCommands(u,r.redirectTo,l);return r.redirectTo.startsWith("/")?Et(p):h.a.call(this.lineralizeSegments(r,p),function(r){return s.expandSegment(t,e,n,r.concat(i.slice(c)),o,!1)})},t.prototype.matchSegmentAgainstRoute=function(t,e,n,r){var i=this;if("**"===n.path)return n.loadChildren?l.a.call(this.configLoader.load(t.injector,n),function(t){return n._loadedConfig=t,new rt(r,{})}):Object(u.a)(new rt(r,{}));var s=Tt(e,n,r),a=s.consumedSegments,c=s.lastChild;if(!s.matched)return wt(e);var p=r.slice(c),f=this.getChildConfig(t,n);return h.a.call(f,function(t){var n=t.module,r=t.routes,s=function(t,e,n,r){return n.length>0&&function(t,e,n){return r.some(function(n){return It(t,e,n)&&Nt(n)!==B})}(t,n)?{segmentGroup:Ot(new rt(e,function(t,e){var n={};n[B]=e;for(var r=0,i=t;r<i.length;r++){var o=i[r];""===o.path&&Nt(o)!==B&&(n[Nt(o)]=new rt([],{}))}return n}(r,new rt(n,t.children)))),slicedSegments:[]}:0===n.length&&function(t,e,n){return r.some(function(n){return It(t,e,n)})}(t,n)?{segmentGroup:Ot(new rt(t.segments,function(t,e,n,i){for(var s={},a=0,u=r;a<u.length;a++){var c=u[a];It(t,e,c)&&!i[Nt(c)]&&(s[Nt(c)]=new rt([],{}))}return Object(o.__assign)({},i,s)}(t,n,0,t.children))),slicedSegments:n}:{segmentGroup:t,slicedSegments:n}}(e,a,p,r),c=s.segmentGroup,h=s.slicedSegments;if(0===h.length&&c.hasChildren()){var f=i.expandChildren(n,r,c);return l.a.call(f,function(t){return new rt(a,t)})}if(0===r.length&&0===h.length)return Object(u.a)(new rt(a,{}));var d=i.expandSegment(n,c,r,h,B,!0);return l.a.call(d,function(t){return new rt(a.concat(t.segments),t.children)})})},t.prototype.getChildConfig=function(t,e){var n=this;return e.children?Object(u.a)(new G(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Object(u.a)(e._loadedConfig):h.a.call(function(t,e){var n=e.canLoad;return n&&0!==n.length?$(l.a.call(Object(f.a)(n),function(n){var r=t.get(n);return tt(r.canLoad?r.canLoad(e):r(e))})):Object(u.a)(!0)}(t.injector,e),function(r){return r?l.a.call(n.configLoader.load(t.injector,e),function(t){return e._loadedConfig=t,t}):function(t){return new p.a(function(e){return e.error(((n=Error("NavigationCancelingError: Cannot load children because the guard of the route \"path: '"+t.path+"'\" returned false")).ngNavigationCancelingError=!0,n));var n})}(e)}):Object(u.a)(new G([],t))},t.prototype.lineralizeSegments=function(t,e){for(var n=[],r=e.root;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return Object(u.a)(n);if(r.numberOfChildren>1||!r.children[B])return Ct(t.redirectTo);r=r.children[B]}},t.prototype.applyRedirectCommands=function(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)},t.prototype.applyRedirectCreatreUrlTree=function(t,e,n,r){var i=this.createSegmentGroup(t,e.root,n,r);return new nt(i,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)},t.prototype.createQueryParams=function(t,e){var n={};return Z(t,function(t,r){if("string"==typeof t&&t.startsWith(":")){var i=t.substring(1);n[r]=e[i]}else n[r]=t}),n},t.prototype.createSegmentGroup=function(t,e,n,r){var i=this,o=this.createSegments(t,e.segments,n,r),s={};return Z(e.children,function(e,o){s[o]=i.createSegmentGroup(t,e,n,r)}),new rt(o,s)},t.prototype.createSegments=function(t,e,n,r){var i=this;return e.map(function(e){return e.path.startsWith(":")?i.findPosParam(t,e,r):i.findOrReturn(e,n)})},t.prototype.findPosParam=function(t,e,n){var r=n[e.path.substring(1)];if(!r)throw new Error("Cannot redirect to '"+t+"'. Cannot find '"+e.path+"'.");return r},t.prototype.findOrReturn=function(t,e){for(var n=0,r=0,i=e;r<i.length;r++){var o=i[r];if(o.path===t.path)return e.splice(n),o;n++}return t},t}();function Tt(t,e,n){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};var r=(e.matcher||H)(n,t,e);return r?{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,positionalParamSegments:r.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function Ot(t){if(1===t.numberOfChildren&&t.children[B]){var e=t.children[B];return new rt(t.segments.concat(e.segments),e.children)}return t}function It(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function Nt(t){return t.outlet||B}var xt=function(){function t(t){this._root=t}return Object.defineProperty(t.prototype,"root",{get:function(){return this._root.value},enumerable:!0,configurable:!0}),t.prototype.parent=function(t){var e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null},t.prototype.children=function(t){var e=At(t,this._root);return e?e.children.map(function(t){return t.value}):[]},t.prototype.firstChild=function(t){var e=At(t,this._root);return e&&e.children.length>0?e.children[0].value:null},t.prototype.siblings=function(t){var e=Pt(t,this._root);return e.length<2?[]:e[e.length-2].children.map(function(t){return t.value}).filter(function(e){return e!==t})},t.prototype.pathFromRoot=function(t){return Pt(t,this._root).map(function(t){return t.value})},t}();function At(t,e){if(t===e.value)return e;for(var n=0,r=e.children;n<r.length;n++){var i=At(t,r[n]);if(i)return i}return null}function Pt(t,e){if(t===e.value)return[e];for(var n=0,r=e.children;n<r.length;n++){var i=Pt(t,r[n]);if(i.length)return i.unshift(e),i}return[]}var Rt=function(){function t(t,e){this.value=t,this.children=e}return t.prototype.toString=function(){return"TreeNode("+this.value+")"},t}();function kt(t){var e={};return t&&t.children.forEach(function(t){return e[t.value.outlet]=t}),e}var Dt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.snapshot=n,Ut(r,e),r}return Object(o.__extends)(e,t),e.prototype.toString=function(){return this.snapshot.toString()},e}(xt);function jt(t,e){var n=function(t,e){var n=new Ft([],{},{},"",{},B,e,null,t.root,-1,{});return new Vt("",new Rt(n,[]))}(t,e),r=new s.a([new it("",{})]),i=new s.a({}),o=new s.a({}),a=new s.a({}),u=new s.a(""),c=new Mt(r,i,a,u,o,B,e,n.root);return c.snapshot=n.root,new Dt(new Rt(c,[]),n)}var Mt=function(){function t(t,e,n,r,i,o,s,a){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=o,this.component=s,this._futureSnapshot=a}return Object.defineProperty(t.prototype,"routeConfig",{get:function(){return this._futureSnapshot.routeConfig},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=l.a.call(this.params,function(t){return q(t)})),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=l.a.call(this.queryParams,function(t){return q(t)})),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.snapshot?this.snapshot.toString():"Future("+this._futureSnapshot+")"},t}();function Lt(t,e){void 0===e&&(e="emptyOnly");var n=t.pathFromRoot,r=0;if("always"!==e)for(r=n.length-1;r>=1;){var i=n[r],s=n[r-1];if(i.routeConfig&&""===i.routeConfig.path)r--;else{if(s.component)break;r--}}return function(t){return t.reduce(function(t,e){return{params:Object(o.__assign)({},t.params,e.params),data:Object(o.__assign)({},t.data,e.data),resolve:Object(o.__assign)({},t.resolve,e._resolvedData)}},{params:{},data:{},resolve:{}})}(n.slice(r))}var Ft=function(){function t(t,e,n,r,i,o,s,a,u,c,l){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=i,this.outlet=o,this.component=s,this.routeConfig=a,this._urlSegment=u,this._lastPathIndex=c,this._resolve=l}return Object.defineProperty(t.prototype,"root",{get:function(){return this._routerState.root},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._routerState.parent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._routerState.firstChild(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this._routerState.children(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pathFromRoot",{get:function(){return this._routerState.pathFromRoot(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMap",{get:function(){return this._paramMap||(this._paramMap=q(this.params)),this._paramMap},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryParamMap",{get:function(){return this._queryParamMap||(this._queryParamMap=q(this.queryParams)),this._queryParamMap},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"Route(url:'"+this.url.map(function(t){return t.toString()}).join("/")+"', path:'"+(this.routeConfig?this.routeConfig.path:"")+"')"},t}(),Vt=function(t){function e(e,n){var r=t.call(this,n)||this;return r.url=e,Ut(r,n),r}return Object(o.__extends)(e,t),e.prototype.toString=function(){return Bt(this._root)},e}(xt);function Ut(t,e){e.value._routerState=t,e.children.forEach(function(e){return Ut(t,e)})}function Bt(t){var e=t.children.length>0?" { "+t.children.map(Bt).join(", ")+" } ":"";return""+t.value+e}function Wt(t){if(t.snapshot){var e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,X(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),X(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;++n)if(!X(t[n],e[n]))return!1;return!0}(e.url,n.url)||t.url.next(n.url),X(e.data,n.data)||t.data.next(n.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function qt(t,e){var n,r;return X(t.params,e.params)&&ot(n=t.url,r=e.url)&&n.every(function(t,e){return X(t.parameters,r[e].parameters)})&&!(!t.parent!=!e.parent)&&(!t.parent||qt(t.parent,e.parent))}function Ht(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Gt(t,e,n,r,i){var o={};return r&&Z(r,function(t,e){o[e]=Array.isArray(t)?t.map(function(t){return""+t}):""+t}),new nt(n.root===t?e:function t(e,n,r){var i={};return Z(e.children,function(e,o){i[o]=e===n?r:t(e,n,r)}),new rt(e.segments,i)}(n.root,t,e),o,i)}var zt=function(){function t(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&Ht(n[0]))throw new Error("Root segment cannot have matrix parameters");var r=n.find(function(t){return"object"==typeof t&&null!=t&&t.outlets});if(r&&r!==Y(n))throw new Error("{outlets:{}} has to be the last command")}return t.prototype.toRoot=function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]},t}(),Kt=function(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n};function Jt(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets[B]:""+t}function Xt(t,e,n){if(t||(t=new rt([],{})),0===t.segments.length&&t.hasChildren())return Qt(t,e,n);var r=function(t,e,n){for(var r=0,i=e,o={match:!1,pathIndex:0,commandIndex:0};i<t.segments.length;){if(r>=n.length)return o;var s=t.segments[i],a=Jt(n[r]),u=r<n.length-1?n[r+1]:null;if(i>0&&void 0===a)break;if(a&&u&&"object"==typeof u&&void 0===u.outlets){if(!te(a,u,s))return o;r+=2}else{if(!te(a,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}(t,e,n),i=n.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){var o=new rt(t.segments.slice(0,r.pathIndex),{});return o.children[B]=new rt(t.segments.slice(r.pathIndex),t.children),Qt(o,0,i)}return r.match&&0===i.length?new rt(t.segments,{}):r.match&&!t.hasChildren()?Yt(t,e,n):r.match?Qt(t,0,i):Yt(t,e,n)}function Qt(t,e,n){if(0===n.length)return new rt(t.segments,{});var r=function(t){return"object"!=typeof t[0]?((e={})[B]=t,e):void 0===t[0].outlets?((n={})[B]=t,n):t[0].outlets;var e,n}(n),i={};return Z(r,function(n,r){null!==n&&(i[r]=Xt(t.children[r],e,n))}),Z(t.children,function(t,e){void 0===r[e]&&(i[e]=t)}),new rt(t.segments,i)}function Yt(t,e,n){for(var r=t.segments.slice(0,e),i=0;i<n.length;){if("object"==typeof n[i]&&void 0!==n[i].outlets){var o=Zt(n[i].outlets);return new rt(r,o)}if(0===i&&Ht(n[0]))r.push(new it(t.segments[e].path,n[0])),i++;else{var s=Jt(n[i]),a=i<n.length-1?n[i+1]:null;s&&a&&Ht(a)?(r.push(new it(s,$t(a))),i+=2):(r.push(new it(s,{})),i++)}}return new rt(r,{})}function Zt(t){var e={};return Z(t,function(t,n){null!==t&&(e[n]=Yt(new rt([],{}),0,t))}),e}function $t(t){var e={};return Z(t,function(t,n){return e[n]=""+t}),e}function te(t,e,n){return t==n.path&&X(e,n.parameters)}var ee=function(t){this.path=t,this.route=this.path[this.path.length-1]},ne=function(t,e){this.component=t,this.route=e},re=function(){function t(t,e,n,r){this.future=t,this.curr=e,this.moduleInjector=n,this.forwardEvent=r,this.canActivateChecks=[],this.canDeactivateChecks=[]}return t.prototype.initialize=function(t){var e=this.future._root;this.setupChildRouteGuards(e,this.curr?this.curr._root:null,t,[e.value])},t.prototype.checkGuards=function(){var t=this;if(!this.isDeactivating()&&!this.isActivating())return Object(u.a)(!0);var e=this.runCanDeactivateChecks();return h.a.call(e,function(e){return e?t.runCanActivateChecks():Object(u.a)(!1)})},t.prototype.resolveData=function(t){var e=this;if(!this.isActivating())return Object(u.a)(null);var n=Object(f.a)(this.canActivateChecks),r=c.a.call(n,function(n){return e.runResolve(n.route,t)});return E.a.call(r,function(t,e){return t})},t.prototype.isDeactivating=function(){return 0!==this.canDeactivateChecks.length},t.prototype.isActivating=function(){return 0!==this.canActivateChecks.length},t.prototype.setupChildRouteGuards=function(t,e,n,r){var i=this,o=kt(e);t.children.forEach(function(t){i.setupRouteGuards(t,o[t.value.outlet],n,r.concat([t.value])),delete o[t.value.outlet]}),Z(o,function(t,e){return i.deactivateRouteAndItsChildren(t,n.getContext(e))})},t.prototype.setupRouteGuards=function(t,e,n,r){var i=t.value,o=e?e.value:null,s=n?n.getContext(t.value.outlet):null;if(o&&i.routeConfig===o.routeConfig){var a=this.shouldRunGuardsAndResolvers(o,i,i.routeConfig.runGuardsAndResolvers);a?this.canActivateChecks.push(new ee(r)):(i.data=o.data,i._resolvedData=o._resolvedData),this.setupChildRouteGuards(t,e,i.component?s?s.children:null:n,r),a&&this.canDeactivateChecks.push(new ne(s.outlet.component,o))}else o&&this.deactivateRouteAndItsChildren(e,s),this.canActivateChecks.push(new ee(r)),this.setupChildRouteGuards(t,null,i.component?s?s.children:null:n,r)},t.prototype.shouldRunGuardsAndResolvers=function(t,e,n){switch(n){case"always":return!0;case"paramsOrQueryParamsChange":return!qt(t,e)||!X(t.queryParams,e.queryParams);case"paramsChange":default:return!qt(t,e)}},t.prototype.deactivateRouteAndItsChildren=function(t,e){var n=this,r=kt(t),i=t.value;Z(r,function(t,r){n.deactivateRouteAndItsChildren(t,i.component?e?e.children.getContext(r):null:e)}),this.canDeactivateChecks.push(new ne(i.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,i))},t.prototype.runCanDeactivateChecks=function(){var t=this,e=Object(f.a)(this.canDeactivateChecks),n=h.a.call(e,function(e){return t.runCanDeactivate(e.component,e.route)});return m.a.call(n,function(t){return!0===t})},t.prototype.runCanActivateChecks=function(){var t=this,e=Object(f.a)(this.canActivateChecks),n=c.a.call(e,function(e){return $(Object(f.a)([t.fireChildActivationStart(e.route.parent),t.fireActivationStart(e.route),t.runCanActivateChild(e.path),t.runCanActivate(e.route)]))});return m.a.call(n,function(t){return!0===t})},t.prototype.fireActivationStart=function(t){return null!==t&&this.forwardEvent&&this.forwardEvent(new V(t)),Object(u.a)(!0)},t.prototype.fireChildActivationStart=function(t){return null!==t&&this.forwardEvent&&this.forwardEvent(new L(t)),Object(u.a)(!0)},t.prototype.runCanActivate=function(t){var e=this,n=t.routeConfig?t.routeConfig.canActivate:null;return n&&0!==n.length?$(l.a.call(Object(f.a)(n),function(n){var r,i=e.getToken(n,t);return r=tt(i.canActivate?i.canActivate(t,e.future):i(t,e.future)),y.a.call(r)})):Object(u.a)(!0)},t.prototype.runCanActivateChild=function(t){var e=this,n=t[t.length-1],r=t.slice(0,t.length-1).reverse().map(function(t){return e.extractCanActivateChild(t)}).filter(function(t){return null!==t});return $(l.a.call(Object(f.a)(r),function(t){return $(l.a.call(Object(f.a)(t.guards),function(r){var i,o=e.getToken(r,t.node);return i=tt(o.canActivateChild?o.canActivateChild(n,e.future):o(n,e.future)),y.a.call(i)}))}))},t.prototype.extractCanActivateChild=function(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null},t.prototype.runCanDeactivate=function(t,e){var n=this,r=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!r||0===r.length)return Object(u.a)(!0);var i=h.a.call(Object(f.a)(r),function(r){var i,o=n.getToken(r,e);return i=tt(o.canDeactivate?o.canDeactivate(t,e,n.curr,n.future):o(t,e,n.curr,n.future)),y.a.call(i)});return m.a.call(i,function(t){return!0===t})},t.prototype.runResolve=function(t,e){return l.a.call(this.resolveNode(t._resolve,t),function(n){return t._resolvedData=n,t.data=Object(o.__assign)({},t.data,Lt(t,e).resolve),null})},t.prototype.resolveNode=function(t,e){var n=this,r=Object.keys(t);if(0===r.length)return Object(u.a)({});if(1===r.length){var i=r[0];return l.a.call(this.getResolver(t[i],e),function(t){return(e={})[i]=t,e;var e})}var o={},s=h.a.call(Object(f.a)(r),function(r){return l.a.call(n.getResolver(t[r],e),function(t){return o[r]=t,t})});return l.a.call(b.a.call(s),function(){return o})},t.prototype.getResolver=function(t,e){var n=this.getToken(t,e);return tt(n.resolve?n.resolve(e,this.future):n(e,this.future))},t.prototype.getToken=function(t,e){var n=function(t){if(!t)return null;for(var e=t.parent;e;e=e.parent){var n=e.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(e);return(n?n.module.injector:this.moduleInjector).get(t)},t}(),ie=function(){},oe=function(){function t(t,e,n,r,i){this.rootComponentType=t,this.config=e,this.urlTree=n,this.url=r,this.paramsInheritanceStrategy=i}return t.prototype.recognize=function(){try{var t=ue(this.urlTree.root,[],[],this.config).segmentGroup,e=this.processSegmentGroup(this.config,t,B),n=new Ft([],Object.freeze({}),Object.freeze(this.urlTree.queryParams),this.urlTree.fragment,{},B,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Rt(n,e),i=new Vt(this.url,r);return this.inheritParamsAndData(i._root),Object(u.a)(i)}catch(t){return new p.a(function(e){return e.error(t)})}},t.prototype.inheritParamsAndData=function(t){var e=this,n=t.value,r=Lt(n,this.paramsInheritanceStrategy);n.params=Object.freeze(r.params),n.data=Object.freeze(r.data),t.children.forEach(function(t){return e.inheritParamsAndData(t)})},t.prototype.processSegmentGroup=function(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)},t.prototype.processChildren=function(t,e){var n,r=this,i=st(e,function(e,n){return r.processSegmentGroup(t,e,n)});return n={},i.forEach(function(t){var e=n[t.value.outlet];if(e){var r=e.url.map(function(t){return t.toString()}).join("/"),i=t.value.url.map(function(t){return t.toString()}).join("/");throw new Error("Two segments cannot have the same outlet name: '"+r+"' and '"+i+"'.")}n[t.value.outlet]=t.value}),i.sort(function(t,e){return t.value.outlet===B?-1:e.value.outlet===B?1:t.value.outlet.localeCompare(e.value.outlet)}),i},t.prototype.processSegment=function(t,e,n,r){for(var i=0,o=t;i<o.length;i++){var s=o[i];try{return this.processSegmentAgainstRoute(s,e,n,r)}catch(t){if(!(t instanceof ie))throw t}}if(this.noLeftoversInUrl(e,n,r))return[];throw new ie},t.prototype.noLeftoversInUrl=function(t,e,n){return 0===e.length&&!t.children[n]},t.prototype.processSegmentAgainstRoute=function(t,e,n,r){if(t.redirectTo)throw new ie;if((t.outlet||B)!==r)throw new ie;var i,s=[],a=[];if("**"===t.path){var u=n.length>0?Y(n).parameters:{};i=new Ft(n,u,Object.freeze(this.urlTree.queryParams),this.urlTree.fragment,he(t),r,t.component,t,se(e),ae(e)+n.length,pe(t))}else{var c=function(t,e,n){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||n.length>0))throw new ie;return{consumedSegments:[],lastChild:0,parameters:{}}}var r=(e.matcher||H)(n,t,e);if(!r)throw new ie;var i={};Z(r.posParams,function(t,e){i[e]=t.path});var s=r.consumed.length>0?Object(o.__assign)({},i,r.consumed[r.consumed.length-1].parameters):i;return{consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:s}}(e,t,n);s=c.consumedSegments,a=n.slice(c.lastChild),i=new Ft(s,c.parameters,Object.freeze(this.urlTree.queryParams),this.urlTree.fragment,he(t),r,t.component,t,se(e),ae(e)+s.length,pe(t))}var l=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),h=ue(e,s,a,l),p=h.segmentGroup,f=h.slicedSegments;if(0===f.length&&p.hasChildren()){var d=this.processChildren(l,p);return[new Rt(i,d)]}if(0===l.length&&0===f.length)return[new Rt(i,[])];var v=this.processSegment(l,p,f,B);return[new Rt(i,v)]},t}();function se(t){for(var e=t;e._sourceSegment;)e=e._sourceSegment;return e}function ae(t){for(var e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;e._sourceSegment;)n+=(e=e._sourceSegment)._segmentIndexShift?e._segmentIndexShift:0;return n-1}function ue(t,e,n,r){if(n.length>0&&function(t,e,n){return r.some(function(n){return ce(t,e,n)&&le(n)!==B})}(t,n)){var i=new rt(e,function(t,e,n,r){var i={};i[B]=r,r._sourceSegment=t,r._segmentIndexShift=e.length;for(var o=0,s=n;o<s.length;o++){var a=s[o];if(""===a.path&&le(a)!==B){var u=new rt([],{});u._sourceSegment=t,u._segmentIndexShift=e.length,i[le(a)]=u}}return i}(t,e,r,new rt(n,t.children)));return i._sourceSegment=t,i._segmentIndexShift=e.length,{segmentGroup:i,slicedSegments:[]}}if(0===n.length&&function(t,e,n){return r.some(function(n){return ce(t,e,n)})}(t,n)){var s=new rt(t.segments,function(t,e,n,i){for(var s={},a=0,u=r;a<u.length;a++){var c=u[a];if(ce(t,e,c)&&!i[le(c)]){var l=new rt([],{});l._sourceSegment=t,l._segmentIndexShift=t.segments.length,s[le(c)]=l}}return Object(o.__assign)({},i,s)}(t,n,0,t.children));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:n}}var a=new rt(t.segments,t.children);return a._sourceSegment=t,a._segmentIndexShift=e.length,{segmentGroup:a,slicedSegments:n}}function ce(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function le(t){return t.outlet||B}function he(t){return t.data||{}}function pe(t){return t.resolve||{}}var fe=function(){},de=function(){function t(){}return t.prototype.shouldDetach=function(t){return!1},t.prototype.store=function(t,e){},t.prototype.shouldAttach=function(t){return!1},t.prototype.retrieve=function(t){return null},t.prototype.shouldReuseRoute=function(t,e){return t.routeConfig===e.routeConfig},t}(),ve=new i.o("ROUTES"),ye=function(){function t(t,e,n,r){this.loader=t,this.compiler=e,this.onLoadStartListener=n,this.onLoadEndListener=r}return t.prototype.load=function(t,e){var n=this;this.onLoadStartListener&&this.onLoadStartListener(e);var r=this.loadModuleFactory(e.loadChildren);return l.a.call(r,function(r){n.onLoadEndListener&&n.onLoadEndListener(e);var i=r.create(t);return new G(Q(i.injector.get(ve)),i)})},t.prototype.loadModuleFactory=function(t){var e=this;return"string"==typeof t?Object(_.a)(this.loader.load(t)):h.a.call(tt(t()),function(t){return t instanceof i.t?Object(u.a)(t):Object(_.a)(e.compiler.compileModuleAsync(t))})},t}(),ge=function(){},_e=function(){function t(){}return t.prototype.shouldProcessUrl=function(t){return!0},t.prototype.extract=function(t){return t},t.prototype.merge=function(t,e){return t},t}();function me(t){throw t}function be(t){return Object(u.a)(null)}var we=function(){function t(t,e,n,r,o,u,c,l){var h=this;this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=n,this.location=r,this.config=l,this.navigations=new s.a(null),this.navigationId=0,this.events=new a.b,this.errorHandler=me,this.navigated=!1,this.hooks={beforePreactivation:be,afterPreactivation:be},this.urlHandlingStrategy=new _e,this.routeReuseStrategy=new de,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.ngModule=o.get(i.v),this.resetConfig(l),this.currentUrlTree=new nt(new rt([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.configLoader=new ye(u,c,function(t){return h.triggerEvent(new j(t))},function(t){return h.triggerEvent(new M(t))}),this.routerState=jt(this.currentUrlTree,this.rootComponentType),this.processNavigations()}return t.prototype.resetRootComponentType=function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType},t.prototype.initialNavigation=function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})},t.prototype.setUpLocationChangeListener=function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(Zone.current.wrap(function(e){var n=t.urlSerializer.parse(e.url),r="popstate"===e.type?"popstate":"hashchange";setTimeout(function(){t.scheduleNavigation(n,r,{replaceUrl:!0})},0)})))},Object.defineProperty(t.prototype,"url",{get:function(){return this.serializeUrl(this.currentUrlTree)},enumerable:!0,configurable:!0}),t.prototype.triggerEvent=function(t){this.events.next(t)},t.prototype.resetConfig=function(t){z(t),this.config=t,this.navigated=!1},t.prototype.ngOnDestroy=function(){this.dispose()},t.prototype.dispose=function(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=null)},t.prototype.createUrlTree=function(t,e){void 0===e&&(e={});var n=e.relativeTo,r=e.queryParams,s=e.fragment,a=e.preserveQueryParams,u=e.queryParamsHandling,c=e.preserveFragment;Object(i.T)()&&a&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");var l=n||this.routerState.root,h=c?this.currentUrlTree.fragment:s,p=null;if(u)switch(u){case"merge":p=Object(o.__assign)({},this.currentUrlTree.queryParams,r);break;case"preserve":p=this.currentUrlTree.queryParams;break;default:p=r||null}else p=a?this.currentUrlTree.queryParams:r||null;return null!==p&&(p=this.removeEmptyProps(p)),function(t,e,n,r,i){if(0===n.length)return Gt(e.root,e.root,e,r,i);var o=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new zt(!0,0,t);var e=0,n=!1,r=t.reduce(function(t,r,i){if("object"==typeof r&&null!=r){if(r.outlets){var o={};return Z(r.outlets,function(t,e){o[e]="string"==typeof t?t.split("/"):t}),t.concat([{outlets:o}])}if(r.segmentPath)return t.concat([r.segmentPath])}return"string"!=typeof r?t.concat([r]):0===i?(r.split("/").forEach(function(r,i){0==i&&"."===r||(0==i&&""===r?n=!0:".."===r?e++:""!=r&&t.push(r))}),t):t.concat([r])},[]);return new zt(n,e,r)}(n);if(o.toRoot())return Gt(e.root,new rt([],{}),e,r,i);var s=function(t,n,r){if(t.isAbsolute)return new Kt(e.root,!0,0);if(-1===r.snapshot._lastPathIndex)return new Kt(r.snapshot._urlSegment,!0,0);var i=Ht(t.commands[0])?0:1;return function(e,n,o){for(var s=r.snapshot._urlSegment,a=r.snapshot._lastPathIndex+i,u=t.numberOfDoubleDots;u>a;){if(u-=a,!(s=s.parent))throw new Error("Invalid number of '../'");a=s.segments.length}return new Kt(s,!1,a-u)}()}(o,0,t),a=s.processChildren?Qt(s.segmentGroup,s.index,o.commands):Xt(s.segmentGroup,s.index,o.commands);return Gt(s.segmentGroup,a,e,r,i)}(l,this.currentUrlTree,t,p,h)},t.prototype.navigateByUrl=function(t,e){void 0===e&&(e={skipLocationChange:!1});var n=t instanceof nt?t:this.parseUrl(t),r=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(r,"imperative",e)},t.prototype.navigate=function(t,e){return void 0===e&&(e={skipLocationChange:!1}),function(t){for(var e=0;e<t.length;e++){var n=t[e];if(null==n)throw new Error("The requested path contains "+n+" segment at index "+e)}}(t),this.navigateByUrl(this.createUrlTree(t,e),e)},t.prototype.serializeUrl=function(t){return this.urlSerializer.serialize(t)},t.prototype.parseUrl=function(t){return this.urlSerializer.parse(t)},t.prototype.isActive=function(t,e){if(t instanceof nt)return et(this.currentUrlTree,t,e);var n=this.urlSerializer.parse(t);return et(this.currentUrlTree,n,e)},t.prototype.removeEmptyProps=function(t){return Object.keys(t).reduce(function(e,n){var r=t[n];return null!==r&&void 0!==r&&(e[n]=r),e},{})},t.prototype.processNavigations=function(){var t=this;c.a.call(this.navigations,function(e){return e?(t.executeScheduledNavigation(e),e.promise.catch(function(){})):Object(u.a)(null)}).subscribe(function(){})},t.prototype.scheduleNavigation=function(t,e,n){var r=this.navigations.value;if(r&&"imperative"!==e&&"imperative"===r.source&&r.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(r&&"hashchange"==e&&"popstate"===r.source&&r.rawUrl.toString()===t.toString())return Promise.resolve(!0);if(r&&"popstate"==e&&"hashchange"===r.source&&r.rawUrl.toString()===t.toString())return Promise.resolve(!0);var i=null,o=null,s=new Promise(function(t,e){i=t,o=e}),a=++this.navigationId;return this.navigations.next({id:a,source:e,rawUrl:t,extras:n,resolve:i,reject:o,promise:s}),s.catch(function(t){return Promise.reject(t)})},t.prototype.executeScheduledNavigation=function(t){var e=this,n=t.id,r=t.rawUrl,i=t.extras,o=t.resolve,s=t.reject,a=this.urlHandlingStrategy.extract(r),u=!this.navigated||a.toString()!==this.currentUrlTree.toString();("reload"===this.onSameUrlNavigation||u)&&this.urlHandlingStrategy.shouldProcessUrl(r)?(this.events.next(new O(n,this.serializeUrl(a))),Promise.resolve().then(function(t){return e.runNavigate(a,r,!!i.skipLocationChange,!!i.replaceUrl,n,null)}).then(o,s)):u&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)?(this.events.next(new O(n,this.serializeUrl(a))),Promise.resolve().then(function(t){return e.runNavigate(a,r,!1,!1,n,jt(a,e.rootComponentType).snapshot)}).then(o,s)):(this.rawUrlTree=r,o(null))},t.prototype.runNavigate=function(t,e,n,r,i,o){var a=this;return i!==this.navigationId?(this.events.next(new N(i,this.serializeUrl(t),"Navigation ID "+i+" is not equal to the current navigation id "+this.navigationId)),Promise.resolve(!1)):new Promise(function(c,p){var f;if(o)f=Object(u.a)({appliedUrl:t,snapshot:o});else{var d=new St(a.ngModule.injector,a.configLoader,a.urlSerializer,t,a.config).apply();f=h.a.call(d,function(e){return l.a.call(function(t,e,n,r,i){return void 0===i&&(i="emptyOnly"),new oe(t,e,n,r,i).recognize()}(a.rootComponentType,a.config,e,a.serializeUrl(e),a.paramsInheritanceStrategy),function(n){return a.events.next(new A(i,a.serializeUrl(t),a.serializeUrl(e),n)),{appliedUrl:e,snapshot:n}})})}var v,y,g=h.a.call(f,function(t){return l.a.call(a.hooks.beforePreactivation(t.snapshot),function(){return t})}),_=l.a.call(g,function(t){var e=t.appliedUrl,n=t.snapshot;return(v=new re(n,a.routerState.snapshot,a.ngModule.injector,function(t){return a.triggerEvent(t)})).initialize(a.rootContexts),{appliedUrl:e,snapshot:n}}),m=h.a.call(_,function(e){var n=e.appliedUrl,r=e.snapshot;return a.navigationId!==i?Object(u.a)(!1):(a.triggerEvent(new P(i,a.serializeUrl(t),n,r)),l.a.call(v.checkGuards(),function(e){return a.triggerEvent(new R(i,a.serializeUrl(t),n,r,e)),{appliedUrl:n,snapshot:r,shouldActivate:e}}))}),b=h.a.call(m,function(e){return a.navigationId!==i?Object(u.a)(!1):e.shouldActivate&&v.isActivating()?(a.triggerEvent(new k(i,a.serializeUrl(t),e.appliedUrl,e.snapshot)),l.a.call(v.resolveData(a.paramsInheritanceStrategy),function(){return a.triggerEvent(new D(i,a.serializeUrl(t),e.appliedUrl,e.snapshot)),e})):Object(u.a)(e)}),w=h.a.call(b,function(t){return l.a.call(a.hooks.afterPreactivation(t.snapshot),function(){return t})}),E=l.a.call(w,function(t){var e,n,r,i=t.appliedUrl,o=t.shouldActivate;return o?{appliedUrl:i,state:(r=function t(e,n,r){if(r&&e.shouldReuseRoute(n.value,r.value.snapshot)){(u=r.value)._futureSnapshot=n.value;var i=function(e,n,r){return n.children.map(function(n){for(var i=0,o=r.children;i<o.length;i++){var s=o[i];if(e.shouldReuseRoute(s.value.snapshot,n.value))return t(e,n,s)}return t(e,n)})}(e,n,r);return new Rt(u,i)}if(e.retrieve(n.value)){var o=e.retrieve(n.value).route;return function t(e,n){if(e.value.routeConfig!==n.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==n.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");n.value._futureSnapshot=e.value;for(var r=0;r<e.children.length;++r)t(e.children[r],n.children[r])}(n,o),o}var a,u=new Mt(new s.a((a=n.value).url),new s.a(a.params),new s.a(a.queryParams),new s.a(a.fragment),new s.a(a.data),a.outlet,a.component,a);return i=n.children.map(function(n){return t(e,n)}),new Rt(u,i)}(a.routeReuseStrategy,(e=t.snapshot)._root,(n=a.routerState)?n._root:void 0),new Dt(r,e)),shouldActivate:o}:{appliedUrl:i,state:null,shouldActivate:o}}),C=a.routerState,S=a.currentUrlTree;E.forEach(function(t){var o=t.state;if(t.shouldActivate&&i===a.navigationId){if(a.currentUrlTree=t.appliedUrl,a.rawUrlTree=a.urlHandlingStrategy.merge(a.currentUrlTree,e),a.routerState=o,!n){var s=a.urlSerializer.serialize(a.rawUrlTree);a.location.isCurrentPathEqualTo(s)||r?a.location.replaceState(s):a.location.go(s)}new Ee(a.routeReuseStrategy,o,C,function(t){return a.triggerEvent(t)}).activate(a.rootContexts),y=!0}else y=!1}).then(function(){y?(a.navigated=!0,a.events.next(new I(i,a.serializeUrl(t),a.serializeUrl(a.currentUrlTree))),c(!0)):(a.resetUrlToCurrentUrlTree(),a.events.next(new N(i,a.serializeUrl(t),"")),c(!1))},function(n){if((r=n)&&r.ngNavigationCancelingError)a.navigated=!0,a.resetStateAndUrl(C,S,e),a.events.next(new N(i,a.serializeUrl(t),n.message)),c(!1);else{a.resetStateAndUrl(C,S,e),a.events.next(new x(i,a.serializeUrl(t),n));try{c(a.errorHandler(n))}catch(t){p(t)}}var r})})},t.prototype.resetStateAndUrl=function(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()},t.prototype.resetUrlToCurrentUrlTree=function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree))},t}(),Ee=function(){function t(t,e,n,r){this.routeReuseStrategy=t,this.futureState=e,this.currState=n,this.forwardEvent=r}return t.prototype.activate=function(t){var e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,t),Wt(this.futureState.root),this.activateChildRoutes(e,n,t)},t.prototype.deactivateChildRoutes=function(t,e,n){var r=this,i=kt(e);t.children.forEach(function(t){var e=t.value.outlet;r.deactivateRoutes(t,i[e],n),delete i[e]}),Z(i,function(t,e){r.deactivateRouteAndItsChildren(t,n)})},t.prototype.deactivateRoutes=function(t,e,n){var r=t.value,i=e?e.value:null;if(r===i)if(r.component){var o=n.getContext(r.outlet);o&&this.deactivateChildRoutes(t,e,o.children)}else this.deactivateChildRoutes(t,e,n);else i&&this.deactivateRouteAndItsChildren(e,n)},t.prototype.deactivateRouteAndItsChildren=function(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)},t.prototype.detachAndStoreRouteSubtree=function(t,e){var n=e.getContext(t.value.outlet);if(n&&n.outlet){var r=n.outlet.detach(),i=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:r,route:t,contexts:i})}},t.prototype.deactivateRouteAndOutlet=function(t,e){var n=this,r=e.getContext(t.value.outlet);if(r){var i=kt(t),o=t.value.component?r.children:e;Z(i,function(t,e){return n.deactivateRouteAndItsChildren(t,o)}),r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated())}},t.prototype.activateChildRoutes=function(t,e,n){var r=this,i=kt(e);t.children.forEach(function(t){r.activateRoutes(t,i[t.value.outlet],n),r.forwardEvent(new U(t.value.snapshot))}),t.children.length&&this.forwardEvent(new F(t.value.snapshot))},t.prototype.activateRoutes=function(t,e,n){var r=t.value,i=e?e.value:null;if(Wt(r),r===i)if(r.component){var o=n.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,o.children)}else this.activateChildRoutes(t,e,n);else if(r.component)if(o=n.getOrCreateContext(r.outlet),this.routeReuseStrategy.shouldAttach(r.snapshot)){var s=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(s.contexts),o.attachRef=s.componentRef,o.route=s.route.value,o.outlet&&o.outlet.attach(s.componentRef,s.route.value),Ce(s.route)}else{var a=function(t){for(var e=r.snapshot.parent;e;e=e.parent){var n=e.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig;if(n&&n.component)return null}return null}(),u=a?a.module.componentFactoryResolver:null;o.route=r,o.resolver=u,o.outlet&&o.outlet.activateWith(r,u),this.activateChildRoutes(t,null,o.children)}else this.activateChildRoutes(t,null,n)},t}();function Ce(t){Wt(t.value),t.children.forEach(Ce)}var Se=function(){function t(t,e,n){var r=this;this.router=t,this.route=e,this.locationStrategy=n,this.commands=[],this.subscription=t.events.subscribe(function(t){t instanceof I&&r.updateTargetUrlAndHref()})}return Object.defineProperty(t.prototype,"routerLink",{set:function(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"preserveQueryParams",{set:function(t){Object(i.T)()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead."),this.preserve=t},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){this.updateTargetUrlAndHref()},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.onClick=function(t,e,n,r){if(0!==t||e||n||r)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;var i={skipLocationChange:Te(this.skipLocationChange),replaceUrl:Te(this.replaceUrl)};return this.router.navigateByUrl(this.urlTree,i),!1},t.prototype.updateTargetUrlAndHref=function(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))},Object.defineProperty(t.prototype,"urlTree",{get:function(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:Te(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:Te(this.preserveFragment)})},enumerable:!0,configurable:!0}),t}();function Te(t){return""===t||!!t}var Oe=function(){function t(t,e,n,r){var i=this;this.router=t,this.element=e,this.renderer=n,this.cdr=r,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.subscription=t.events.subscribe(function(t){t instanceof I&&i.update()})}return t.prototype.ngAfterContentInit=function(){var t=this;this.links.changes.subscribe(function(e){return t.update()}),this.linksWithHrefs.changes.subscribe(function(e){return t.update()}),this.update()},Object.defineProperty(t.prototype,"routerLinkActive",{set:function(t){var e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter(function(t){return!!t})},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){this.update()},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.update=function(){var t=this;this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then(function(){var e=t.hasActiveLinks();t.isActive!==e&&(t.isActive=e,t.classes.forEach(function(n){e?t.renderer.addClass(t.element.nativeElement,n):t.renderer.removeClass(t.element.nativeElement,n)}))})},t.prototype.isLinkActive=function(t){var e=this;return function(n){return t.isActive(n.urlTree,e.routerLinkActiveOptions.exact)}},t.prototype.hasActiveLinks=function(){return this.links.some(this.isLinkActive(this.router))||this.linksWithHrefs.some(this.isLinkActive(this.router))},t}(),Ie=function(){return function(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Ne,this.attachRef=null}}(),Ne=function(){function t(){this.contexts=new Map}return t.prototype.onChildOutletCreated=function(t,e){var n=this.getOrCreateContext(t);n.outlet=e,this.contexts.set(t,n)},t.prototype.onChildOutletDestroyed=function(t){var e=this.getContext(t);e&&(e.outlet=null)},t.prototype.onOutletDeactivated=function(){var t=this.contexts;return this.contexts=new Map,t},t.prototype.onOutletReAttached=function(t){this.contexts=t},t.prototype.getOrCreateContext=function(t){var e=this.getContext(t);return e||(e=new Ie,this.contexts.set(t,e)),e},t.prototype.getContext=function(t){return this.contexts.get(t)||null},t}(),xe=function(){function t(t,e,n,r,o){this.parentContexts=t,this.location=e,this.resolver=n,this.changeDetector=o,this.activated=null,this._activatedRoute=null,this.activateEvents=new i.m,this.deactivateEvents=new i.m,this.name=r||B,t.onChildOutletCreated(this.name,this)}return t.prototype.ngOnDestroy=function(){this.parentContexts.onChildOutletDestroyed(this.name)},t.prototype.ngOnInit=function(){if(!this.activated){var t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}},Object.defineProperty(t.prototype,"isActivated",{get:function(){return!!this.activated},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activatedRoute",{get:function(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activatedRouteData",{get:function(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}},enumerable:!0,configurable:!0}),t.prototype.detach=function(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();var t=this.activated;return this.activated=null,this._activatedRoute=null,t},t.prototype.attach=function(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)},t.prototype.deactivate=function(){if(this.activated){var t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}},t.prototype.activateWith=function(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;var n=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),r=this.parentContexts.getOrCreateContext(this.name).children,i=new Ae(t,r,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,i),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)},t}(),Ae=function(){function t(t,e,n){this.route=t,this.childContexts=e,this.parent=n}return t.prototype.get=function(t,e){return t===Mt?this.route:t===Ne?this.childContexts:this.parent.get(t,e)},t}(),Pe=function(){},Re=function(){function t(){}return t.prototype.preload=function(t,e){return d.a.call(e(),function(){return Object(u.a)(null)})},t}(),ke=function(){function t(){}return t.prototype.preload=function(t,e){return Object(u.a)(null)},t}(),De=function(){function t(t,e,n,r,i){this.router=t,this.injector=r,this.preloadingStrategy=i,this.loader=new ye(e,n,function(e){return t.triggerEvent(new j(e))},function(e){return t.triggerEvent(new M(e))})}return t.prototype.setUpPreloading=function(){var t=this,e=S.a.call(this.router.events,function(t){return t instanceof I});this.subscription=c.a.call(e,function(){return t.preload()}).subscribe(function(){})},t.prototype.preload=function(){var t=this.injector.get(i.v);return this.processRoutes(t,this.router.config)},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.processRoutes=function(t,e){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];if(o.loadChildren&&!o.canLoad&&o._loadedConfig){var s=o._loadedConfig;n.push(this.processRoutes(s.module,s.routes))}else o.loadChildren&&!o.canLoad?n.push(this.preloadConfig(t,o)):o.children&&n.push(this.processRoutes(t,o.children))}return w.a.call(Object(f.a)(n))},t.prototype.preloadConfig=function(t,e){var n=this;return this.preloadingStrategy.preload(e,function(){var r=n.loader.load(t.injector,e);return h.a.call(r,function(t){return e._loadedConfig=t,n.processRoutes(t.module,t.routes)})})},t}(),je=new i.o("ROUTER_CONFIGURATION"),Me=new i.o("ROUTER_FORROOT_GUARD"),Le=[r.f,{provide:at,useClass:ut},{provide:we,useFactory:qe,deps:[i.g,at,Ne,r.f,i.p,i.u,i.i,ve,je,[ge,new i.y],[fe,new i.y]]},Ne,{provide:Mt,useFactory:He,deps:[we]},{provide:i.u,useClass:i.H},De,ke,Re,{provide:je,useValue:{enableTracing:!1}}];function Fe(){return new i.w("Router",we)}var Ve=function(){function t(t,e){}return t.forRoot=function(e,n){return{ngModule:t,providers:[Le,We(e),{provide:Me,useFactory:Be,deps:[[we,new i.y,new i.G]]},{provide:je,useValue:n||{}},{provide:r.g,useFactory:Ue,deps:[r.m,[new i.n(r.a),new i.y],je]},{provide:Pe,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:ke},{provide:i.w,multi:!0,useFactory:Fe},[Ge,{provide:i.d,multi:!0,useFactory:ze,deps:[Ge]},{provide:Je,useFactory:Ke,deps:[Ge]},{provide:i.b,multi:!0,useExisting:Je}]]}},t.forChild=function(e){return{ngModule:t,providers:[We(e)]}},t}();function Ue(t,e,n){return void 0===n&&(n={}),n.useHash?new r.d(t,e):new r.l(t,e)}function Be(t){if(t)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function We(t){return[{provide:i.a,multi:!0,useValue:t},{provide:ve,multi:!0,useValue:t}]}function qe(t,e,n,r,i,o,s,a,u,c,l){void 0===u&&(u={});var h=new we(null,e,n,r,i,o,s,Q(a));if(c&&(h.urlHandlingStrategy=c),l&&(h.routeReuseStrategy=l),u.errorHandler&&(h.errorHandler=u.errorHandler),u.enableTracing){var p=Object(C.r)();h.events.subscribe(function(t){p.logGroup("Router Event: "+t.constructor.name),p.log(t.toString()),p.log(t),p.logGroupEnd()})}return u.onSameUrlNavigation&&(h.onSameUrlNavigation=u.onSameUrlNavigation),u.paramsInheritanceStrategy&&(h.paramsInheritanceStrategy=u.paramsInheritanceStrategy),h}function He(t){return t.routerState.root}var Ge=function(){function t(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new a.b}return t.prototype.appInitializer=function(){var t=this;return this.injector.get(r.e,Promise.resolve(null)).then(function(){var e=null,n=new Promise(function(t){return e=t}),r=t.injector.get(we),i=t.injector.get(je);if(t.isLegacyDisabled(i)||t.isLegacyEnabled(i))e(!0);else if("disabled"===i.initialNavigation)r.setUpLocationChangeListener(),e(!0);else{if("enabled"!==i.initialNavigation)throw new Error("Invalid initialNavigation options: '"+i.initialNavigation+"'");r.hooks.afterPreactivation=function(){return t.initNavigation?Object(u.a)(null):(t.initNavigation=!0,e(!0),t.resultOfPreactivationDone)},r.initialNavigation()}return n})},t.prototype.bootstrapListener=function(t){var e=this.injector.get(je),n=this.injector.get(De),r=this.injector.get(we),o=this.injector.get(i.g);t===o.components[0]&&(this.isLegacyEnabled(e)?r.initialNavigation():this.isLegacyDisabled(e)&&r.setUpLocationChangeListener(),n.setUpPreloading(),r.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())},t.prototype.isLegacyEnabled=function(t){return"legacy_enabled"===t.initialNavigation||!0===t.initialNavigation||void 0===t.initialNavigation},t.prototype.isLegacyDisabled=function(t){return"legacy_disabled"===t.initialNavigation||!1===t.initialNavigation},t}();function ze(t){return t.appInitializer.bind(t)}function Ke(t){return t.bootstrapListener.bind(t)}var Je=new i.o("Router Initializer")},URbD:function(t,e,n){"use strict";e.a=function(){return Object(r.a)()(this)};var r=n("eIqN")},UcKF:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PROTOCOL_VERSION="5",e.VERSION_PARAM="v",e.TRANSPORT_SESSION_PARAM="s",e.REFERER_PARAM="r",e.FORGE_REF="f",e.FORGE_DOMAIN="firebaseio.com",e.LAST_SESSION_PARAM="ls",e.WEBSOCKET="websocket",e.LONG_POLLING="long_polling"},Un6q:function(t,e,n){"use strict";n.d(e,"j",function(){return _}),n.d(e,"k",function(){return g}),n.d(e,"p",function(){return m}),n.d(e,"b",function(){return T}),n.d(e,"h",function(){return w}),n.d(e,"i",function(){return C}),n.d(e,"c",function(){return O}),n.d(e,"n",function(){return I}),n.d(e,"m",function(){return o}),n.d(e,"e",function(){return s}),n.d(e,"g",function(){return a}),n.d(e,"a",function(){return u}),n.d(e,"d",function(){return h}),n.d(e,"l",function(){return p}),n.d(e,"f",function(){return c}),n.d(e,"o",function(){return y});var r=n("LMZF"),i=n("6Xbx"),o=function(){},s=new r.o("Location Initialized"),a=function(){},u=new r.o("appBaseHref"),c=function(){function t(e){var n=this;this._subject=new r.m,this._platformStrategy=e;var i=this._platformStrategy.getBaseHref();this._baseHref=t.stripTrailingSlash(l(i)),this._platformStrategy.onPopState(function(t){n._subject.emit({url:n.path(!0),pop:!0,type:t.type})})}return t.prototype.path=function(t){return void 0===t&&(t=!1),this.normalize(this._platformStrategy.path(t))},t.prototype.isCurrentPathEqualTo=function(e,n){return void 0===n&&(n=""),this.path()==this.normalize(e+t.normalizeQueryParams(n))},t.prototype.normalize=function(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,l(e)))},t.prototype.prepareExternalUrl=function(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)},t.prototype.go=function(t,e){void 0===e&&(e=""),this._platformStrategy.pushState(null,"",t,e)},t.prototype.replaceState=function(t,e){void 0===e&&(e=""),this._platformStrategy.replaceState(null,"",t,e)},t.prototype.forward=function(){this._platformStrategy.forward()},t.prototype.back=function(){this._platformStrategy.back()},t.prototype.subscribe=function(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})},t.normalizeQueryParams=function(t){return t&&"?"!==t[0]?"?"+t:t},t.joinWithSlash=function(t,e){if(0==t.length)return e;if(0==e.length)return t;var n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e},t.stripTrailingSlash=function(t){var e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)},t}();function l(t){return t.replace(/\/index.html$/,"")}var h=function(t){function e(e,n){var r=t.call(this)||this;return r._platformLocation=e,r._baseHref="",null!=n&&(r._baseHref=n),r}return Object(i.__extends)(e,t),e.prototype.onPopState=function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)},e.prototype.getBaseHref=function(){return this._baseHref},e.prototype.path=function(t){void 0===t&&(t=!1);var e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e},e.prototype.prepareExternalUrl=function(t){var e=c.joinWithSlash(this._baseHref,t);return e.length>0?"#"+e:e},e.prototype.pushState=function(t,e,n,r){var i=this.prepareExternalUrl(n+c.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(t,e,i)},e.prototype.replaceState=function(t,e,n,r){var i=this.prepareExternalUrl(n+c.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,i)},e.prototype.forward=function(){this._platformLocation.forward()},e.prototype.back=function(){this._platformLocation.back()},e}(a),p=function(t){function e(e,n){var r=t.call(this)||this;if(r._platformLocation=e,null==n&&(n=r._platformLocation.getBaseHrefFromDOM()),null==n)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return r._baseHref=n,r}return Object(i.__extends)(e,t),e.prototype.onPopState=function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)},e.prototype.getBaseHref=function(){return this._baseHref},e.prototype.prepareExternalUrl=function(t){return c.joinWithSlash(this._baseHref,t)},e.prototype.path=function(t){void 0===t&&(t=!1);var e=this._platformLocation.pathname+c.normalizeQueryParams(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?""+e+n:e},e.prototype.pushState=function(t,e,n,r){var i=this.prepareExternalUrl(n+c.normalizeQueryParams(r));this._platformLocation.pushState(t,e,i)},e.prototype.replaceState=function(t,e,n,r){var i=this.prepareExternalUrl(n+c.normalizeQueryParams(r));this._platformLocation.replaceState(t,e,i)},e.prototype.forward=function(){this._platformLocation.forward()},e.prototype.back=function(){this._platformLocation.back()},e}(a),f=["en",[["a","p"],["AM","PM"]],[["AM","PM"],,],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",,"{1} 'at' {0}"],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"$","US Dollar",function(t){var e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}],d={},v=function(){var t={Zero:0,One:1,Two:2,Few:3,Many:4,Other:5};return t[t.Zero]="Zero",t[t.One]="One",t[t.Two]="Two",t[t.Few]="Few",t[t.Many]="Many",t[t.Other]="Other",t}(),y=new r.o("UseV4Plurals"),g=function(){},_=function(t){function e(e,n){var r=t.call(this)||this;return r.locale=e,r.deprecatedPluralFn=n,r}return Object(i.__extends)(e,t),e.prototype.getPluralCategory=function(t,e){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(e||this.locale,t):function(t){return function(t){var e=t.toLowerCase().replace(/_/g,"-"),n=d[e];if(n)return n;var r=e.split("-")[0];if(n=d[r])return n;if("en"===r)return f;throw new Error('Missing locale data for the locale "'+t+'".')}(t)[17]}(e||this.locale)(t)){case v.Zero:return"zero";case v.One:return"one";case v.Two:return"two";case v.Few:return"few";case v.Many:return"many";default:return"other"}},e}(g);function m(t,e){e=encodeURIComponent(e);for(var n=0,r=t.split(";");n<r.length;n++){var i=r[n],o=i.indexOf("="),s=-1==o?[i,""]:[i.slice(0,o),i.slice(o+1)],a=s[1];if(s[0].trim()===e)return decodeURIComponent(a)}return null}var b=function(){function t(t,e,n,r){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=r}return Object.defineProperty(t.prototype,"first",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return this.index===this.count-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"even",{get:function(){return this.index%2==0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"odd",{get:function(){return!this.even},enumerable:!0,configurable:!0}),t}(),w=function(){function t(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._differ=null}return Object.defineProperty(t.prototype,"ngForTrackBy",{get:function(){return this._trackByFn},set:function(t){Object(r.T)()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn("trackBy must be a function, but received "+JSON.stringify(t)+". See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information."),this._trackByFn=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTemplate",{set:function(t){t&&(this._template=t)},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){if("ngForOf"in t){var e=t.ngForOf.currentValue;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(t){throw new Error("Cannot find a differ supporting object '"+e+"' of type '"+((n=e).name||typeof n)+"'. NgFor only supports binding to Iterables such as Arrays.")}}var n},t.prototype.ngDoCheck=function(){if(this._differ){var t=this._differ.diff(this.ngForOf);t&&this._applyChanges(t)}},t.prototype._applyChanges=function(t){var e=this,n=[];t.forEachOperation(function(t,r,i){if(null==t.previousIndex){var o=e._viewContainer.createEmbeddedView(e._template,new b(null,e.ngForOf,-1,-1),i),s=new E(t,o);n.push(s)}else null==i?e._viewContainer.remove(r):(o=e._viewContainer.get(r),e._viewContainer.move(o,i),s=new E(t,o),n.push(s))});for(var r=0;r<n.length;r++)this._perViewChange(n[r].view,n[r].record);r=0;for(var i=this._viewContainer.length;r<i;r++){var o=this._viewContainer.get(r);o.context.index=r,o.context.count=i}t.forEachIdentityChange(function(t){e._viewContainer.get(t.currentIndex).context.$implicit=t.item})},t.prototype._perViewChange=function(t,e){t.context.$implicit=e.item},t}(),E=function(t,e){this.record=t,this.view=e},C=function(){function t(t,e){this._viewContainer=t,this._context=new S,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}return Object.defineProperty(t.prototype,"ngIf",{set:function(t){this._context.$implicit=this._context.ngIf=t,this._updateView()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngIfThen",{set:function(t){this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngIfElse",{set:function(t){this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()},enumerable:!0,configurable:!0}),t.prototype._updateView=function(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))},t}(),S=function(){this.$implicit=null,this.ngIf=null},T=function(){},O=new r.o("DocumentToken"),I="browser"},Upor:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("6Xbx"),i=function(t){function e(){var e=t.call(this,"object unsubscribed");this.name=e.name="ObjectUnsubscribedError",this.stack=e.stack,this.message=e.message}return Object(r.__extends)(e,t),e}(Error)},UqtS:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("iEW0"),i=(n.n(r),function(){function t(t){this.router=t}return t.prototype.signupUser=function(t,e){r.auth().createUserWithEmailAndPassword(t,e).catch(function(t){return console.log(t)})},t.prototype.signinUser=function(t,e){var n=this;r.auth().signInWithEmailAndPassword(t,e).then(function(t){n.router.navigate(["/"]),r.auth().currentUser.getToken().then(function(t){return n.token=t})}).catch(function(t){return console.log(t)})},t.prototype.getToken=function(){var t=this;return r.auth().currentUser.getToken().then(function(e){return t.token=e}),this.token},t.prototype.isAuthenticated=function(){return null!=this.token},t.prototype.logOut=function(){r.auth().signOut(),this.token=null},t}())},V7AE:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("xIGM").a.Symbol,i="function"==typeof r&&"function"==typeof r.for?r.for("rxSubscriber"):"@@rxSubscriber"},VzZx:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("JEJ4"),o=n("5pXs"),s=n("GnQ5"),a=n("fvGz"),u=n("hkXn"),c=n("/fob"),l=n("F1yO"),h=n("ZGn5"),p=n("xfHL"),f=n("JEJ4"),d=n("43Go"),v=n("R3TC"),y=n("pHuv");!function(t){t[t.RUN=0]="RUN",t[t.SENT=1]="SENT",t[t.COMPLETED=2]="COMPLETED",t[t.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",t[t.NEEDS_ABORT=4]="NEEDS_ABORT"}(r=e.TransactionStatus||(e.TransactionStatus={})),y.Repo.MAX_TRANSACTION_RETRIES_=25,y.Repo.prototype.transactions_init_=function(){this.transactionQueueTree_=new u.Tree},y.Repo.prototype.startTransaction=function(t,e,n,a){this.log_("transaction on "+t);var u=function(){},y=new o.Reference(this,t);y.on("value",u);var g={path:t,update:e,onComplete:n,status:null,order:l.LUIDGenerator(),applyLocally:a,retryCount:0,unwatcher:function(){y.off("value",u)},abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},_=this.getLatestState_(t);g.currentInputSnapshot=_;var m=g.update(_.val());if(void 0===m){if(g.unwatcher(),g.currentOutputSnapshotRaw=null,g.currentOutputSnapshotResolved=null,g.onComplete){var b=new s.DataSnapshot(g.currentInputSnapshot,new o.Reference(this,g.path),c.PRIORITY_INDEX);g.onComplete(null,!1,b)}}else{p.validateFirebaseData("transaction failed: Data returned ",m,g.path),g.status=r.RUN;var w=this.transactionQueueTree_.subTree(t),E=w.getValue()||[];E.push(g),w.setValue(E);var C=void 0;"object"==typeof m&&null!==m&&f.contains(m,".priority")?(C=f.safeGet(m,".priority"),i.assert(p.isValidPriority(C),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.")):C=(this.serverSyncTree_.calcCompleteEventCache(t)||v.ChildrenNode.EMPTY_NODE).getPriority().val(),C=C;var S=this.generateServerValues(),T=d.nodeFromJSON(m,C),O=h.resolveDeferredValueSnapshot(T,S);g.currentOutputSnapshotRaw=T,g.currentOutputSnapshotResolved=O,g.currentWriteId=this.getNextWriteId_();var I=this.serverSyncTree_.applyUserOverwrite(t,O,g.currentWriteId,g.applyLocally);this.eventQueue_.raiseEventsForChangedPath(t,I),this.sendReadyTransactions_()}},y.Repo.prototype.getLatestState_=function(t,e){return this.serverSyncTree_.calcCompleteEventCache(t,e)||v.ChildrenNode.EMPTY_NODE},y.Repo.prototype.sendReadyTransactions_=function(t){var e=this;if(void 0===t&&(t=this.transactionQueueTree_),t||this.pruneCompletedTransactionsBelowNode_(t),null!==t.getValue()){var n=this.buildTransactionQueue_(t);i.assert(n.length>0,"Sending zero length transaction queue"),n.every(function(t){return t.status===r.RUN})&&this.sendTransactionQueue_(t.path(),n)}else t.hasChildren()&&t.forEachChild(function(t){e.sendReadyTransactions_(t)})},y.Repo.prototype.sendTransactionQueue_=function(t,e){for(var n=this,u=e.map(function(t){return t.currentWriteId}),h=this.getLatestState_(t,u),p=h,f=h.hash(),d=0;d<e.length;d++){var v=e[d];i.assert(v.status===r.RUN,"tryToSendTransactionQueue_: items in queue should all be run."),v.status=r.SENT,v.retryCount++;var y=a.Path.relativePath(t,v.path);p=p.updateChild(y,v.currentOutputSnapshotRaw)}var g=p.val(!0),_=t;this.server_.put(_.toString(),g,function(i){n.log_("transaction put response",{path:_.toString(),status:i});var a=[];if("ok"===i){for(var u=[],h=0;h<e.length;h++){if(e[h].status=r.COMPLETED,a=a.concat(n.serverSyncTree_.ackUserWrite(e[h].currentWriteId)),e[h].onComplete){var p=e[h].currentOutputSnapshotResolved,f=new o.Reference(n,e[h].path),d=new s.DataSnapshot(p,f,c.PRIORITY_INDEX);u.push(e[h].onComplete.bind(null,null,!0,d))}e[h].unwatcher()}for(n.pruneCompletedTransactionsBelowNode_(n.transactionQueueTree_.subTree(t)),n.sendReadyTransactions_(),n.eventQueue_.raiseEventsForChangedPath(t,a),h=0;h<u.length;h++)l.exceptionGuard(u[h])}else{if("datastale"===i)for(h=0;h<e.length;h++)e[h].status=e[h].status===r.SENT_NEEDS_ABORT?r.NEEDS_ABORT:r.RUN;else for(l.warn("transaction at "+_.toString()+" failed: "+i),h=0;h<e.length;h++)e[h].status=r.NEEDS_ABORT,e[h].abortReason=i;n.rerunTransactions_(t)}},f)},y.Repo.prototype.rerunTransactions_=function(t){var e=this.getAncestorTransactionNode_(t),n=e.path(),r=this.buildTransactionQueue_(e);return this.rerunTransactionQueue_(r,n),n},y.Repo.prototype.rerunTransactionQueue_=function(t,e){if(0!==t.length){for(var n=[],u=[],v=t.filter(function(t){return t.status===r.RUN}).map(function(t){return t.currentWriteId}),g=0;g<t.length;g++){var _=t[g],m=a.Path.relativePath(e,_.path),b=!1,w=void 0;if(i.assert(null!==m,"rerunTransactionsUnderNode_: relativePath should not be null."),_.status===r.NEEDS_ABORT)b=!0,w=_.abortReason,u=u.concat(this.serverSyncTree_.ackUserWrite(_.currentWriteId,!0));else if(_.status===r.RUN)if(_.retryCount>=y.Repo.MAX_TRANSACTION_RETRIES_)b=!0,w="maxretry",u=u.concat(this.serverSyncTree_.ackUserWrite(_.currentWriteId,!0));else{var E=this.getLatestState_(_.path,v);_.currentInputSnapshot=E;var C=t[g].update(E.val());if(void 0!==C){p.validateFirebaseData("transaction failed: Data returned ",C,_.path);var S=d.nodeFromJSON(C);"object"==typeof C&&null!=C&&f.contains(C,".priority")||(S=S.updatePriority(E.getPriority()));var T=_.currentWriteId,O=this.generateServerValues(),I=h.resolveDeferredValueSnapshot(S,O);_.currentOutputSnapshotRaw=S,_.currentOutputSnapshotResolved=I,_.currentWriteId=this.getNextWriteId_(),v.splice(v.indexOf(T),1),u=(u=u.concat(this.serverSyncTree_.applyUserOverwrite(_.path,I,_.currentWriteId,_.applyLocally))).concat(this.serverSyncTree_.ackUserWrite(T,!0))}else b=!0,w="nodata",u=u.concat(this.serverSyncTree_.ackUserWrite(_.currentWriteId,!0))}if(this.eventQueue_.raiseEventsForChangedPath(e,u),u=[],b&&(t[g].status=r.COMPLETED,setTimeout(t[g].unwatcher,Math.floor(0)),t[g].onComplete))if("nodata"===w){var N=new o.Reference(this,t[g].path),x=new s.DataSnapshot(t[g].currentInputSnapshot,N,c.PRIORITY_INDEX);n.push(t[g].onComplete.bind(null,null,!1,x))}else n.push(t[g].onComplete.bind(null,new Error(w),!1,null))}for(this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_),g=0;g<n.length;g++)l.exceptionGuard(n[g]);this.sendReadyTransactions_()}},y.Repo.prototype.getAncestorTransactionNode_=function(t){for(var e,n=this.transactionQueueTree_;null!==(e=t.getFront())&&null===n.getValue();)n=n.subTree(e),t=t.popFront();return n},y.Repo.prototype.buildTransactionQueue_=function(t){var e=[];return this.aggregateTransactionQueuesForNode_(t,e),e.sort(function(t,e){return t.order-e.order}),e},y.Repo.prototype.aggregateTransactionQueuesForNode_=function(t,e){var n=this,r=t.getValue();if(null!==r)for(var i=0;i<r.length;i++)e.push(r[i]);t.forEachChild(function(t){n.aggregateTransactionQueuesForNode_(t,e)})},y.Repo.prototype.pruneCompletedTransactionsBelowNode_=function(t){var e=this,n=t.getValue();if(n){for(var i=0,o=0;o<n.length;o++)n[o].status!==r.COMPLETED&&(n[i]=n[o],i++);n.length=i,t.setValue(n.length>0?n:null)}t.forEachChild(function(t){e.pruneCompletedTransactionsBelowNode_(t)})},y.Repo.prototype.abortTransactions_=function(t){var e=this,n=this.getAncestorTransactionNode_(t).path(),r=this.transactionQueueTree_.subTree(t);return r.forEachAncestor(function(t){e.abortTransactionsOnNode_(t)}),this.abortTransactionsOnNode_(r),r.forEachDescendant(function(t){e.abortTransactionsOnNode_(t)}),n},y.Repo.prototype.abortTransactionsOnNode_=function(t){var e=t.getValue();if(null!==e){for(var n=[],o=[],s=-1,a=0;a<e.length;a++)e[a].status===r.SENT_NEEDS_ABORT||(e[a].status===r.SENT?(i.assert(s===a-1,"All SENT items should be at beginning of queue."),s=a,e[a].status=r.SENT_NEEDS_ABORT,e[a].abortReason="set"):(i.assert(e[a].status===r.RUN,"Unexpected transaction status in abort"),e[a].unwatcher(),o=o.concat(this.serverSyncTree_.ackUserWrite(e[a].currentWriteId,!0)),e[a].onComplete&&n.push(e[a].onComplete.bind(null,new Error("set"),!1,null))));for(-1===s?t.setValue(null):e.length=s+1,this.eventQueue_.raiseEventsForChangedPath(t.path(),o),a=0;a<n.length;a++)l.exceptionGuard(n[a])}}},W4Cj:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4"),i=n("ertD"),o=n("R3TC"),s=n("/fob");e.IndexedFilter=function(){function t(t){this.index_=t}return t.prototype.updateChild=function(t,e,n,o,s,a){r.assert(t.isIndexed(this.index_),"A node must be indexed if only a child is updated");var u=t.getImmediateChild(e);return u.getChild(o).equals(n.getChild(o))&&u.isEmpty()==n.isEmpty()?t:(null!=a&&(n.isEmpty()?t.hasChild(e)?a.trackChildChange(i.Change.childRemovedChange(e,u)):r.assert(t.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):u.isEmpty()?a.trackChildChange(i.Change.childAddedChange(e,n)):a.trackChildChange(i.Change.childChangedChange(e,n,u))),t.isLeafNode()&&n.isEmpty()?t:t.updateImmediateChild(e,n).withIndex(this.index_))},t.prototype.updateFullNode=function(t,e,n){return null!=n&&(t.isLeafNode()||t.forEachChild(s.PRIORITY_INDEX,function(t,r){e.hasChild(t)||n.trackChildChange(i.Change.childRemovedChange(t,r))}),e.isLeafNode()||e.forEachChild(s.PRIORITY_INDEX,function(e,r){if(t.hasChild(e)){var o=t.getImmediateChild(e);o.equals(r)||n.trackChildChange(i.Change.childChangedChange(e,r,o))}else n.trackChildChange(i.Change.childAddedChange(e,r))})),e.withIndex(this.index_)},t.prototype.updatePriority=function(t,e){return t.isEmpty()?o.ChildrenNode.EMPTY_NODE:t.updatePriority(e)},t.prototype.filtersNodes=function(){return!1},t.prototype.getIndexedFilter=function(){return this},t.prototype.getIndex=function(){return this.index_},t}()},WH8D:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.jsonEval=function(t){return JSON.parse(t)},e.stringify=function(t){return JSON.stringify(t)}},X3fp:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(t){var e=t.Symbol;if("function"==typeof e)return e.iterator||(e.iterator=e("iterator polyfill")),e.iterator;var n=t.Set;if(n&&"function"==typeof(new n)["@@iterator"])return"@@iterator";var r=t.Map;if(r)for(var i=Object.getOwnPropertyNames(r.prototype),o=0;o<i.length;++o){var s=i[o];if("entries"!==s&&"size"!==s&&r.prototype[s]===r.prototype.entries)return s}return"@@iterator"}(n("xIGM").a)},X9X7:function(t,e,n){"use strict";var r=n("6Xbx"),i=n("1j/l"),o=n("kQVV"),s=n("mHG6"),a=n("KRwF"),u=n("xIGM"),c=n("AP4T"),l=n("X3fp"),h=function(t){function e(e,n){if(t.call(this),this.scheduler=n,null==e)throw new Error("iterator cannot be null.");this.iterator=d(e)}return Object(r.__extends)(e,t),e.create=function(t,n){return new e(t,n)},e.dispatch=function(t){var e=t.index,n=t.iterator,r=t.subscriber;if(t.hasError)r.error(t.error);else{var i=n.next();i.done?r.complete():(r.next(i.value),t.index=e+1,r.closed?"function"==typeof n.return&&n.return():this.schedule(t))}},e.prototype._subscribe=function(t){var n=this.iterator,r=this.scheduler;if(r)return r.schedule(e.dispatch,0,{index:0,iterator:n,subscriber:t});for(;;){var i=n.next();if(i.done){t.complete();break}if(t.next(i.value),t.closed){"function"==typeof n.return&&n.return();break}}},e}(c.a),p=function(){function t(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.length),this.str=t,this.idx=e,this.len=n}return t.prototype[l.a]=function(){return this},t.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.str.charAt(this.idx++)}:{done:!0,value:void 0}},t}(),f=function(){function t(t,e,n){void 0===e&&(e=0),void 0===n&&(n=function(e){var n,r,i=+t.length;return isNaN(i)?0:0!==i&&"number"==typeof(n=i)&&u.a.isFinite(n)?(i=(0==(r=+i)?r:isNaN(r)?r:r<0?-1:1)*Math.floor(Math.abs(i)))<=0?0:i>v?v:i:i}()),this.arr=t,this.idx=e,this.len=n}return t.prototype[l.a]=function(){return this},t.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.arr[this.idx++]}:{done:!0,value:void 0}},t}();function d(t){var e=t[l.a];if(!e&&"string"==typeof t)return new p(t);if(!e&&void 0!==t.length)return new f(t);if(!e)throw new TypeError("object is not iterable");return t[l.a]()}var v=Math.pow(2,53)-1,y=n("Oryw"),g=n("8Ut3"),_=n("Ecq+"),m=function(t){function e(e,n){t.call(this),this.arrayLike=e,this.scheduler=n,n||1!==e.length||(this._isScalar=!0,this.value=e[0])}return Object(r.__extends)(e,t),e.create=function(t,n){var r=t.length;return 0===r?new _.a:1===r?new g.a(t[0],n):new e(t,n)},e.dispatch=function(t){var e=t.arrayLike,n=t.index,r=t.subscriber;r.closed||(n>=t.length?r.complete():(r.next(e[n]),t.index=n+1,this.schedule(t)))},e.prototype._subscribe=function(t){var n=this.arrayLike,r=this.scheduler,i=n.length;if(r)return r.schedule(e.dispatch,0,{arrayLike:n,index:0,length:i,subscriber:t});for(var o=0;o<i&&!t.closed;o++)t.next(n[o]);t.complete()},e}(c.a),b=n("YRqN"),w=n("mz3w");n.d(e,"a",function(){return E});var E=function(t){function e(e,n){t.call(this,null),this.ish=e,this.scheduler=n}return Object(r.__extends)(e,t),e.create=function(t,n){if(null!=t){if("function"==typeof t[w.a])return t instanceof c.a&&!n?t:new e(t,n);if(Object(i.a)(t))return new y.a(t,n);if(Object(s.a)(t))return new a.a(t,n);if("function"==typeof t[l.a]||"string"==typeof t)return new h(t,n);if(Object(o.a)(t))return new m(t,n)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")},e.prototype._subscribe=function(t){var e=this.ish,n=this.scheduler;return null==n?e[w.a]().subscribe(t):e[w.a]().subscribe(new b.a(t,n,0))},e}(c.a)},XD1n:function(t,e){},XiwH:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("W4Cj"),i=n("/fob"),o=n("p+VM"),s=n("R3TC");e.RangedFilter=function(){function t(e){this.indexedFilter_=new r.IndexedFilter(e.getIndex()),this.index_=e.getIndex(),this.startPost_=t.getStartPost_(e),this.endPost_=t.getEndPost_(e)}return t.prototype.getStartPost=function(){return this.startPost_},t.prototype.getEndPost=function(){return this.endPost_},t.prototype.matches=function(t){return this.index_.compare(this.getStartPost(),t)<=0&&this.index_.compare(t,this.getEndPost())<=0},t.prototype.updateChild=function(t,e,n,r,i,a){return this.matches(new o.NamedNode(e,n))||(n=s.ChildrenNode.EMPTY_NODE),this.indexedFilter_.updateChild(t,e,n,r,i,a)},t.prototype.updateFullNode=function(t,e,n){e.isLeafNode()&&(e=s.ChildrenNode.EMPTY_NODE);var r=e.withIndex(this.index_);r=r.updatePriority(s.ChildrenNode.EMPTY_NODE);var a=this;return e.forEachChild(i.PRIORITY_INDEX,function(t,e){a.matches(new o.NamedNode(t,e))||(r=r.updateImmediateChild(t,s.ChildrenNode.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.indexedFilter_},t.prototype.getIndex=function(){return this.index_},t.getStartPost_=function(t){if(t.hasStart()){var e=t.getIndexStartName();return t.getIndex().makePost(t.getIndexStartValue(),e)}return t.getIndex().minPost()},t.getEndPost_=function(t){if(t.hasEnd()){var e=t.getIndexEndName();return t.getIndex().makePost(t.getIndexEndValue(),e)}return t.getIndex().maxPost()},t}()},Xp63:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createSubscribe=function(t,e){var n=new r(t,e);return n.subscribe.bind(n)};var r=function(){function t(t,e){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then(function(){t(n)}).catch(function(t){n.error(t)})}return t.prototype.next=function(t){this.forEachObserver(function(e){e.next(t)})},t.prototype.error=function(t){this.forEachObserver(function(e){e.error(t)}),this.close(t)},t.prototype.complete=function(){this.forEachObserver(function(t){t.complete()}),this.close()},t.prototype.subscribe=function(t,e,n){var r,o=this;if(void 0===t&&void 0===e&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=0,r=["next","error","complete"];n<r.length;n++){var i=r[n];if(i in t&&"function"==typeof t[i])return!0}return!1}(t)?t:{next:t,error:e,complete:n}).next&&(r.next=i),void 0===r.error&&(r.error=i),void 0===r.complete&&(r.complete=i);var s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{o.finalError?r.error(o.finalError):r.complete()}catch(t){}}),this.observers.push(r),s},t.prototype.unsubscribeOne=function(t){void 0!==this.observers&&void 0!==this.observers[t]&&(delete this.observers[t],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},t.prototype.forEachObserver=function(t){if(!this.finalized)for(var e=0;e<this.observers.length;e++)this.sendOne(e,t)},t.prototype.sendOne=function(t,e){var n=this;this.task.then(function(){if(void 0!==n.observers&&void 0!==n.observers[t])try{e(n.observers[t])}catch(t){"undefined"!=typeof console&&console.error&&console.error(t)}})},t.prototype.close=function(t){var e=this;this.finalized||(this.finalized=!0,void 0!==t&&(this.finalError=t),this.task.then(function(){e.observers=void 0,e.onNoObservers=void 0}))},t}();function i(){}e.async=function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];Promise.resolve(!0).then(function(){t.apply(void 0,n)}).catch(function(t){e&&e(t)})}}},XtH8:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4"),i=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o="[DEFAULT]",s=[],a=function(){function t(t,e,n){this.firebase_=n,this.isDeleted_=!1,this.services_={},this.name_=e,this.options_=Object(r.deepCopy)(t),this.INTERNAL={getUid:function(){return null},getToken:function(){return Promise.resolve(null)},addAuthTokenListener:function(t){s.push(t),setTimeout(function(){return t(null)},0)},removeAuthTokenListener:function(t){s=s.filter(function(e){return e!==t})}}}return Object.defineProperty(t.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!0,configurable:!0}),t.prototype.delete=function(){var t=this;return new Promise(function(e){t.checkDestroyed_(),e()}).then(function(){t.firebase_.INTERNAL.removeApp(t.name_);var e=[];return Object.keys(t.services_).forEach(function(n){Object.keys(t.services_[n]).forEach(function(r){e.push(t.services_[n][r])})}),Promise.all(e.map(function(t){return t.INTERNAL.delete()}))}).then(function(){t.isDeleted_=!0,t.services_={}})},t.prototype._getService=function(t,e){if(void 0===e&&(e=o),this.checkDestroyed_(),this.services_[t]||(this.services_[t]={}),!this.services_[t][e]){var n=e!==o?e:void 0,r=this.firebase_.INTERNAL.factories[t](this,this.extendApp.bind(this),n);this.services_[t][e]=r}return this.services_[t][e]},t.prototype.extendApp=function(t){var e=this;Object(r.deepExtend)(this,t),t.INTERNAL&&t.INTERNAL.addAuthTokenListener&&(s.forEach(function(t){e.INTERNAL.addAuthTokenListener(t)}),s=[])},t.prototype.checkDestroyed_=function(){this.isDeleted_&&u("app-deleted",{name:this.name_})},t}();function u(t,e){throw c.create(t,e)}a.prototype.name&&a.prototype.options||a.prototype.delete||console.log("dc");var c=new r.ErrorFactory("app","Firebase",{"no-app":"No Firebase App '{$name}' has been created - call Firebase App.initializeApp()","bad-app-name":"Illegal App name: '{$name}","duplicate-app":"Firebase App named '{$name}' already exists","app-deleted":"Firebase App named '{$name}' already deleted","duplicate-service":"Firebase service named '{$name}' already registered","sa-not-supported":"Initializing the Firebase SDK with a service account is only allowed in a Node.js environment. On client devices, you should instead initialize the SDK with an api key and auth domain","invalid-app-argument":"firebase.{$name}() takes either no argument or a Firebase App instance."});n.d(e,"firebase",function(){return l});var l=function t(){var e={},n={},s={},c={__esModule:!0,initializeApp:function(t,n){void 0===n?n=o:"string"==typeof n&&""!==n||u("bad-app-name",{name:n+""}),i(e,n)&&u("duplicate-app",{name:n});var r=new a(t,n,c);return e[n]=r,p(r,"create"),r},app:l,apps:null,Promise:Promise,SDK_VERSION:"4.10.1",INTERNAL:{registerService:function(t,e,i,o,p){n[t]&&u("duplicate-service",{name:t}),n[t]=e,o&&(s[t]=o,h().forEach(function(t){o("create",t)}));var f=function(e){return void 0===e&&(e=l()),"function"!=typeof e[t]&&u("invalid-app-argument",{name:t}),e[t]()};return void 0!==i&&Object(r.deepExtend)(f,i),c[t]=f,a.prototype[t]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this._getService.bind(this,t).apply(this,p?e:[])},f},createFirebaseNamespace:t,extendNamespace:function(t){Object(r.deepExtend)(c,t)},createSubscribe:r.createSubscribe,ErrorFactory:r.ErrorFactory,removeApp:function(t){p(e[t],"delete"),delete e[t]},factories:n,useAsService:f,Promise:Promise,deepExtend:r.deepExtend}};function l(t){return i(e,t=t||o)||u("no-app",{name:t}),e[t]}function h(){return Object.keys(e).map(function(t){return e[t]})}function p(t,e){Object.keys(n).forEach(function(n){var r=f(0,n);null!==r&&s[r]&&s[r](e,t)})}function f(t,e){return"serverAuth"===e?null:e}return Object(r.patchProperty)(c,"default",c),Object.defineProperty(c,"apps",{get:h}),Object(r.patchProperty)(l,"App",a),c}();e.default=l},Y5DG:function(t,e,n){n("OzfH")},YRqN:function(t,e,n){"use strict";e.b=function(t,e){return void 0===e&&(e=0),function(n){return n.lift(new s(t,e))}},n.d(e,"a",function(){return a});var r=n("6Xbx"),i=n("E9/g"),o=n("PAZ8"),s=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.scheduler,this.delay))},t}(),a=function(t){function e(e,n,r){void 0===r&&(r=0),t.call(this,e),this.scheduler=n,this.delay=r}return Object(r.__extends)(e,t),e.dispatch=function(t){t.notification.observe(t.destination),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new u(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(o.a.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(o.a.createError(t))},e.prototype._complete=function(){this.scheduleMessage(o.a.createComplete())},e}(i.a),u=function(t,e){this.notification=t,this.destination=e}},YY8E:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4");e.EventEmitter=function(){function t(t){this.allowedEvents_=t,this.listeners_={},r.assert(Array.isArray(t)&&t.length>0,"Requires a non-empty array")}return t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(Array.isArray(this.listeners_[t]))for(var r=this.listeners_[t].slice(),i=0;i<r.length;i++)r[i].callback.apply(r[i].context,e)},t.prototype.on=function(t,e,n){this.validateEventType_(t),this.listeners_[t]=this.listeners_[t]||[],this.listeners_[t].push({callback:e,context:n});var r=this.getInitialEvent(t);r&&e.apply(n,r)},t.prototype.off=function(t,e,n){this.validateEventType_(t);for(var r=this.listeners_[t]||[],i=0;i<r.length;i++)if(r[i].callback===e&&(!n||n===r[i].context))return void r.splice(i,1)},t.prototype.validateEventType_=function(t){r.assert(this.allowedEvents_.find(function(e){return e===t}),"Unknown event: "+t)},t}()},YuZA:function(t,e,n){var r={"./recipes/recipes.module.ngfactory":["GrDH",0]};function i(t){var e=r[t];return e?n.e(e[1]).then(function(){return n(e[0])}):Promise.reject(new Error("Cannot find module '"+t+"'."))}i.keys=function(){return Object.keys(r)},i.id="YuZA",t.exports=i},ZGn5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4"),i=n("fvGz"),o=n("z8+r"),s=n("04zk"),a=n("43Go"),u=n("/fob");e.generateWithValues=function(t){return(t=t||{}).timestamp=t.timestamp||(new Date).getTime(),t},e.resolveDeferredValue=function(t,e){return t&&"object"==typeof t?(r.assert(".sv"in t,"Unexpected leaf node or priority contents"),e[t[".sv"]]):t},e.resolveDeferredValueTree=function(t,n){var r=new o.SparseSnapshotTree;return t.forEachTree(new i.Path(""),function(t,i){r.remember(t,e.resolveDeferredValueSnapshot(i,n))}),r},e.resolveDeferredValueSnapshot=function(t,n){var r,i=t.getPriority().val(),o=e.resolveDeferredValue(i,n);if(t.isLeafNode()){var c=t,l=e.resolveDeferredValue(c.getValue(),n);return l!==c.getValue()||o!==c.getPriority().val()?new s.LeafNode(l,a.nodeFromJSON(o)):t}var h=t;return r=h,o!==h.getPriority().val()&&(r=r.updatePriority(new s.LeafNode(o))),h.forEachChild(u.PRIORITY_INDEX,function(t,i){var o=e.resolveDeferredValueSnapshot(i,n);o!==i&&(r=r.updateImmediateChild(t,o))}),r}},b5Wm:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("JEJ4"),o=n("2BLv"),s=n("JEJ4"),a=n("p+VM"),u=n("/fob"),c=n("stu6"),l={};e.IndexMap=function(){function t(t,e){this.indexes_=t,this.indexSet_=e}return Object.defineProperty(t,"Default",{get:function(){return i.assert(l&&u.PRIORITY_INDEX,"ChildrenNode.ts has not been loaded"),r=r||new t({".priority":l},{".priority":u.PRIORITY_INDEX})},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var e=s.safeGet(this.indexes_,t);if(!e)throw new Error("No index defined for "+t);return e===l?null:e},t.prototype.hasIndex=function(t){return s.contains(this.indexSet_,t.toString())},t.prototype.addIndex=function(e,n){i.assert(e!==c.KEY_INDEX,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r,u=[],h=!1,p=n.getIterator(a.NamedNode.Wrap),f=p.getNext();f;)h=h||e.isDefinedOn(f.node),u.push(f),f=p.getNext();r=h?o.buildChildSet(u,e.getCompare()):l;var d=e.toString(),v=s.clone(this.indexSet_);v[d]=e;var y=s.clone(this.indexes_);return y[d]=r,new t(y,v)},t.prototype.addToIndexes=function(e,n){var r=this;return new t(s.map(this.indexes_,function(t,u){var c=s.safeGet(r.indexSet_,u);if(i.assert(c,"Missing index implementation for "+u),t===l){if(c.isDefinedOn(e.node)){for(var h=[],p=n.getIterator(a.NamedNode.Wrap),f=p.getNext();f;)f.name!=e.name&&h.push(f),f=p.getNext();return h.push(e),o.buildChildSet(h,c.getCompare())}return l}var d=n.get(e.name),v=t;return d&&(v=v.remove(new a.NamedNode(e.name,d))),v.insert(e,e.node)}),this.indexSet_)},t.prototype.removeFromIndexes=function(e,n){return new t(s.map(this.indexes_,function(t){if(t===l)return t;var r=n.get(e.name);return r?t.remove(new a.NamedNode(e.name,r)):t}),this.indexSet_)},t}()},bN85:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("R3TC"),i=n("y8hQ");e.ViewCache=function(){function t(t,e){this.eventCache_=t,this.serverCache_=e}return t.prototype.updateEventSnap=function(e,n,r){return new t(new i.CacheNode(e,n,r),this.serverCache_)},t.prototype.updateServerSnap=function(e,n,r){return new t(this.eventCache_,new i.CacheNode(e,n,r))},t.prototype.getEventCache=function(){return this.eventCache_},t.prototype.getCompleteEventSnap=function(){return this.eventCache_.isFullyInitialized()?this.eventCache_.getNode():null},t.prototype.getServerCache=function(){return this.serverCache_},t.prototype.getCompleteServerSnap=function(){return this.serverCache_.isFullyInitialized()?this.serverCache_.getNode():null},t.Empty=new t(new i.CacheNode(r.ChildrenNode.EMPTY_NODE,!1,!1),new i.CacheNode(r.ChildrenNode.EMPTY_NODE,!1,!1)),t}()},bywS:function(t,e,n){"use strict";e.a=function(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Object(r.a)(i.a,null,t)};var r=n("wP3s"),i=n("ltvI")},cDNt:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={};n.d(r,"audit",function(){return qr}),n.d(r,"auditTime",function(){return zr}),n.d(r,"buffer",function(){return Qe}),n.d(r,"bufferCount",function(){return $e}),n.d(r,"bufferTime",function(){return rn}),n.d(r,"bufferToggle",function(){return ln}),n.d(r,"bufferWhen",function(){return fn}),n.d(r,"catchError",function(){return Ms.a}),n.d(r,"combineAll",function(){return gn}),n.d(r,"combineLatest",function(){return Mt}),n.d(r,"concat",function(){return _n}),n.d(r,"concatAll",function(){return Bt.a}),n.d(r,"concatMap",function(){return wn.a}),n.d(r,"concatMapTo",function(){return En}),n.d(r,"count",function(){return Cn}),n.d(r,"debounce",function(){return xn}),n.d(r,"debounceTime",function(){return Rn}),n.d(r,"defaultIfEmpty",function(){return Mn.a}),n.d(r,"delay",function(){return Fn}),n.d(r,"delayWhen",function(){return Wn}),n.d(r,"dematerialize",function(){return On}),n.d(r,"distinct",function(){return Jn}),n.d(r,"distinctUntilChanged",function(){return Yn}),n.d(r,"distinctUntilKeyChanged",function(){return tr}),n.d(r,"elementAt",function(){return vr}),n.d(r,"every",function(){return Ls.a}),n.d(r,"exhaust",function(){return or}),n.d(r,"exhaustMap",function(){return ur}),n.d(r,"expand",function(){return hr}),n.d(r,"filter",function(){return bi.a}),n.d(r,"finalize",function(){return mr}),n.d(r,"find",function(){return Cr}),n.d(r,"findIndex",function(){return Or}),n.d(r,"first",function(){return Fs.a}),n.d(r,"groupBy",function(){return Pr}),n.d(r,"ignoreElements",function(){return Lr}),n.d(r,"isEmpty",function(){return Ur}),n.d(r,"last",function(){return Vs.a}),n.d(r,"map",function(){return Ie.a}),n.d(r,"mapTo",function(){return Yr}),n.d(r,"materialize",function(){return ti}),n.d(r,"max",function(){return ii}),n.d(r,"merge",function(){return oi}),n.d(r,"mergeAll",function(){return Us.a}),n.d(r,"mergeMap",function(){return Bs.a}),n.d(r,"flatMap",function(){return Bs.a}),n.d(r,"mergeMapTo",function(){return ui}),n.d(r,"mergeScan",function(){return pi}),n.d(r,"min",function(){return vi}),n.d(r,"multicast",function(){return yi.a}),n.d(r,"observeOn",function(){return qe.b}),n.d(r,"onErrorResumeNext",function(){return le}),n.d(r,"pairwise",function(){return gi}),n.d(r,"partition",function(){return wi}),n.d(r,"pluck",function(){return Ei}),n.d(r,"publish",function(){return Ci}),n.d(r,"publishBehavior",function(){return Ti}),n.d(r,"publishLast",function(){return Ii}),n.d(r,"publishReplay",function(){return Oi}),n.d(r,"race",function(){return Ni}),n.d(r,"reduce",function(){return ri.a}),n.d(r,"repeat",function(){return Ai}),n.d(r,"repeatWhen",function(){return ki}),n.d(r,"retry",function(){return Mi}),n.d(r,"retryWhen",function(){return Vi}),n.d(r,"refCount",function(){return Ws.a}),n.d(r,"sample",function(){return Wi}),n.d(r,"sampleTime",function(){return Gi}),n.d(r,"scan",function(){return Xi.a}),n.d(r,"sequenceEqual",function(){return Qi}),n.d(r,"share",function(){return qs.a}),n.d(r,"shareReplay",function(){return eo}),n.d(r,"single",function(){return ro}),n.d(r,"skip",function(){return so}),n.d(r,"skipLast",function(){return co}),n.d(r,"skipUntil",function(){return po}),n.d(r,"skipWhile",function(){return yo}),n.d(r,"startWith",function(){return bo}),n.d(r,"switchAll",function(){return Ao}),n.d(r,"switchMap",function(){return Oo}),n.d(r,"switchMapTo",function(){return Ro}),n.d(r,"take",function(){return jo}),n.d(r,"takeLast",function(){return Fo.a}),n.d(r,"takeUntil",function(){return Vo}),n.d(r,"takeWhile",function(){return Wo}),n.d(r,"tap",function(){return er}),n.d(r,"throttle",function(){return zo}),n.d(r,"throttleTime",function(){return Xo}),n.d(r,"timeInterval",function(){return $o}),n.d(r,"timeout",function(){return rs}),n.d(r,"timeoutWith",function(){return ss}),n.d(r,"timestamp",function(){return cs}),n.d(r,"toArray",function(){return ps}),n.d(r,"window",function(){return fs}),n.d(r,"windowCount",function(){return ys}),n.d(r,"windowTime",function(){return ms}),n.d(r,"windowToggle",function(){return Os}),n.d(r,"windowWhen",function(){return xs}),n.d(r,"withLatestFrom",function(){return Rs}),n.d(r,"zip",function(){return be}),n.d(r,"zipAll",function(){return js});var i=n("LMZF"),o=function(){},s=n("iEW0"),a=function(){function t(){}return t.prototype.ngOnInit=function(){s.initializeApp({apiKey:"AIzaSyDk2mFCC2_9LMJ5DteV4huM37AumUhCICE",authDomain:"test-server-61884.firebaseapp.com"})},t}(),u=function(){function t(){}return t.prototype.ngOnInit=function(){},t}(),c=i._1({encapsulation:0,styles:[[""]],data:{}});function l(t){return i._22(0,[(t()(),i._3(0,0,null,null,1,"h2",[],null,null,null,null,null)),(t()(),i._21(-1,null,["Welcome to the Recipe Book"])),(t()(),i._21(-1,null,["\n"]))],null,null)}var h=i.Z("app-home",u,function(t){return i._22(0,[(t()(),i._3(0,0,null,null,1,"app-home",[],null,null,null,l,c)),i._2(1,114688,null,0,u,[],null,null)],function(t,e){t(e,1,0)},null)},{},{},[]),p=n("0nO6"),f=n("Un6q"),d=n("mxkr"),v=n("JyCd"),y=function(){function t(t){this.shoppinglistService=t,this.editMode=!1}return t.prototype.ngOnInit=function(){var t=this;this.subscription=this.shoppinglistService.onEditing.subscribe(function(e){t.editMode=!0,t.editedItemIndex=e,t.editedItem=t.shoppinglistService.getIngre(e),t.slForm.setValue({name:t.editedItem.name,amount:t.editedItem.amount})})},t.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},t.prototype.onSubmit=function(t){var e=t.value,n=new d.a(e.name,e.amount);this.editMode?this.shoppinglistService.UpdateIngredient(this.editedItemIndex,n):this.shoppinglistService.AddIngredient(n),this.editMode=!1,t.reset()},t.prototype.onClear=function(){this.slForm.reset(),this.editMode=!1},t.prototype.onDelete=function(){this.shoppinglistService.deleteIngredient(this.editedItemIndex),this.onClear()},t}(),g=i._1({encapsulation:0,styles:[[""]],data:{}});function _(t){return i._22(0,[(t()(),i._3(0,0,null,null,1,"button",[["class","btn btn-danger"],["type","button"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.onDelete()&&r),r},null,null)),(t()(),i._21(-1,null,["\n Delete"]))],null,null)}function m(t){return i._22(0,[i._19(402653184,1,{slForm:0}),(t()(),i._3(1,0,null,null,61,"div",[["class","row"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(3,0,null,null,58,"div",[["class","col-xs-12"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(5,0,null,null,55,"form",[["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngSubmit"],[null,"submit"],[null,"reset"]],function(t,e,n){var r=!0,o=t.component;return"submit"===e&&(r=!1!==i._14(t,7).onSubmit(n)&&r),"reset"===e&&(r=!1!==i._14(t,7).onReset()&&r),"ngSubmit"===e&&(r=!1!==o.onSubmit(i._14(t,7))&&r),r},null,null)),i._2(6,16384,null,0,p.z,[],null,null),i._2(7,4210688,[[1,4],["f",4]],0,p.r,[[8,null],[8,null]],null,{ngSubmit:"ngSubmit"}),i._17(2048,null,p.b,null,[p.r]),i._2(9,16384,null,0,p.q,[p.b],null,null),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(11,0,null,null,33,"div",[["class","row"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(13,0,null,null,13,"div",[["class","col-sm-5 form-group"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(15,0,null,null,1,"label",[["for","name"]],null,null,null,null,null)),(t()(),i._21(-1,null,["Name"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(18,0,null,null,7,"input",[["class","form-control"],["id","name"],["name","name"],["ngModel",""],["required",""],["type","text"]],[[1,"required",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0;return"input"===e&&(r=!1!==i._14(t,19)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==i._14(t,19).onTouched()&&r),"compositionstart"===e&&(r=!1!==i._14(t,19)._compositionStart()&&r),"compositionend"===e&&(r=!1!==i._14(t,19)._compositionEnd(n.target.value)&&r),r},null,null)),i._2(19,16384,null,0,p.c,[i.B,i.k,[2,p.a]],null,null),i._2(20,16384,null,0,p.v,[],{required:[0,"required"]},null),i._17(1024,null,p.m,function(t){return[t]},[p.v]),i._17(1024,null,p.n,function(t){return[t]},[p.c]),i._2(23,671744,null,0,p.s,[[2,p.b],[2,p.m],[8,null],[2,p.n]],{name:[0,"name"],model:[1,"model"]},null),i._17(2048,null,p.o,null,[p.s]),i._2(25,16384,null,0,p.p,[p.o],null,null),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(28,0,null,null,15,"div",[["class","col-sm-3 form-group"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(30,0,null,null,1,"label",[["for","amount"]],null,null,null,null,null)),(t()(),i._21(-1,null,["Amount"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(33,0,null,null,9,"input",[["class","form-control"],["id","amount"],["name","amount"],["ngModel",""],["pattern","^[1-9]+[0-9]*$"],["required",""],["type","number"]],[[1,"required",0],[1,"pattern",0],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"],[null,"change"]],function(t,e,n){var r=!0;return"input"===e&&(r=!1!==i._14(t,34)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==i._14(t,34).onTouched()&&r),"compositionstart"===e&&(r=!1!==i._14(t,34)._compositionStart()&&r),"compositionend"===e&&(r=!1!==i._14(t,34)._compositionEnd(n.target.value)&&r),"change"===e&&(r=!1!==i._14(t,35).onChange(n.target.value)&&r),"input"===e&&(r=!1!==i._14(t,35).onChange(n.target.value)&&r),"blur"===e&&(r=!1!==i._14(t,35).onTouched()&&r),r},null,null)),i._2(34,16384,null,0,p.c,[i.B,i.k,[2,p.a]],null,null),i._2(35,16384,null,0,p.y,[i.B,i.k],null,null),i._2(36,16384,null,0,p.v,[],{required:[0,"required"]},null),i._2(37,540672,null,0,p.t,[],{pattern:[0,"pattern"]},null),i._17(1024,null,p.m,function(t,e){return[t,e]},[p.v,p.t]),i._17(1024,null,p.n,function(t,e){return[t,e]},[p.c,p.y]),i._2(40,671744,null,0,p.s,[[2,p.b],[2,p.m],[8,null],[2,p.n]],{name:[0,"name"],model:[1,"model"]},null),i._17(2048,null,p.o,null,[p.s]),i._2(42,16384,null,0,p.p,[p.o],null,null),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(46,0,null,null,13,"div",[["class","row"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(48,0,null,null,10,"div",[["class","col-sm-12"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(50,0,null,null,1,"button",[["class","btn btn-success"],["type","submit"]],[[8,"disabled",0]],null,null,null,null)),(t()(),i._21(51,null,["",""])),(t()(),i._21(-1,null,["\n "])),(t()(),i.Y(16777216,null,null,1,null,_)),i._2(54,16384,null,0,f.i,[i.M,i.J],{ngIf:[0,"ngIf"]},null),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(56,0,null,null,1,"button",[["class","btn btn-primary"],["type","button"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.onClear()&&r),r},null,null)),(t()(),i._21(-1,null,["Clear"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n"])),(t()(),i._21(-1,null,["\n"]))],function(t,e){var n=e.component;t(e,20,0,""),t(e,23,0,"name",""),t(e,36,0,""),t(e,37,0,"^[1-9]+[0-9]*$"),t(e,40,0,"amount",""),t(e,54,0,n.editMode)},function(t,e){var n=e.component;t(e,5,0,i._14(e,9).ngClassUntouched,i._14(e,9).ngClassTouched,i._14(e,9).ngClassPristine,i._14(e,9).ngClassDirty,i._14(e,9).ngClassValid,i._14(e,9).ngClassInvalid,i._14(e,9).ngClassPending),t(e,18,0,i._14(e,20).required?"":null,i._14(e,25).ngClassUntouched,i._14(e,25).ngClassTouched,i._14(e,25).ngClassPristine,i._14(e,25).ngClassDirty,i._14(e,25).ngClassValid,i._14(e,25).ngClassInvalid,i._14(e,25).ngClassPending),t(e,33,0,i._14(e,36).required?"":null,i._14(e,37).pattern?i._14(e,37).pattern:null,i._14(e,42).ngClassUntouched,i._14(e,42).ngClassTouched,i._14(e,42).ngClassPristine,i._14(e,42).ngClassDirty,i._14(e,42).ngClassValid,i._14(e,42).ngClassInvalid,i._14(e,42).ngClassPending),t(e,50,0,!i._14(e,7).valid),t(e,51,0,n.editMode?"Update":"Add")})}var b=function(){function t(t){this.shoppinglistservice=t}return t.prototype.ngOnInit=function(){var t=this;this.ingredients=this.shoppinglistservice.getIngredient(),this.subcription=this.shoppinglistservice.onIngredientAdded.subscribe(function(e){t.ingredients=e})},t.prototype.onEditItem=function(t){this.shoppinglistservice.onEditing.next(t)},t.prototype.ngOnDestroy=function(){this.subcription.unsubscribe()},t}(),w=i._1({encapsulation:0,styles:[[""]],data:{}});function E(t){return i._22(0,[(t()(),i._3(0,0,null,null,1,"a",[["class","list-group-item"],["style","cursor: pointer"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.onEditItem(t.context.index)&&r),r},null,null)),(t()(),i._21(1,null,["\n "," (",")\n "]))],null,function(t,e){t(e,1,0,e.context.$implicit.name,e.context.$implicit.amount)})}function C(t){return i._22(0,[(t()(),i._3(0,0,null,null,15,"div",[["class","row"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(2,0,null,null,12,"div",[["class","col-sm-12"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(4,0,null,null,1,"app-shopping-edit",[],null,null,null,m,g)),i._2(5,245760,null,0,y,[v.a],null,null),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(7,0,null,null,0,"hr",[],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(9,0,null,null,4,"ul",[["class","list-group"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i.Y(16777216,null,null,1,null,E)),i._2(12,802816,null,0,f.h,[i.M,i.J,i.q],{ngForOf:[0,"ngForOf"]},null),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n"])),(t()(),i._21(-1,null,["\n"]))],function(t,e){var n=e.component;t(e,5,0),t(e,12,0,n.ingredients)},null)}var S=i.Z("app-shopping-list",b,function(t){return i._22(0,[(t()(),i._3(0,0,null,null,1,"app-shopping-list",[],null,null,null,C,w)),i._2(1,245760,null,0,b,[v.a],null,null)],function(t,e){t(e,1,0)},null)},{},{},[]),T=n("UqtS"),O=function(){function t(t){this.authService=t}return t.prototype.ngOnInit=function(){},t.prototype.onSignUp=function(t){this.authService.signupUser(t.value.email,t.value.password)},t}(),I=i._1({encapsulation:0,styles:[[""]],data:{}});function N(t){return i._22(0,[(t()(),i._3(0,0,null,null,40,"div",[["class","row"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(2,0,null,null,37,"div",[["class","col-sm-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(4,0,null,null,34,"form",[["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngSubmit"],[null,"submit"],[null,"reset"]],function(t,e,n){var r=!0,o=t.component;return"submit"===e&&(r=!1!==i._14(t,6).onSubmit(n)&&r),"reset"===e&&(r=!1!==i._14(t,6).onReset()&&r),"ngSubmit"===e&&(r=!1!==o.onSignUp(i._14(t,6))&&r),r},null,null)),i._2(5,16384,null,0,p.z,[],null,null),i._2(6,4210688,[["f",4]],0,p.r,[[8,null],[8,null]],null,{ngSubmit:"ngSubmit"}),i._17(2048,null,p.b,null,[p.r]),i._2(8,16384,null,0,p.q,[p.b],null,null),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(10,0,null,null,11,"div",[["class","form-group"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(12,0,null,null,1,"label",[["for","email"]],null,null,null,null,null)),(t()(),i._21(-1,null,["Mail"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(15,0,null,null,5,"input",[["class","form-control"],["id","email"],["name","email"],["ngModel",""],["type","email"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0;return"input"===e&&(r=!1!==i._14(t,16)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==i._14(t,16).onTouched()&&r),"compositionstart"===e&&(r=!1!==i._14(t,16)._compositionStart()&&r),"compositionend"===e&&(r=!1!==i._14(t,16)._compositionEnd(n.target.value)&&r),r},null,null)),i._2(16,16384,null,0,p.c,[i.B,i.k,[2,p.a]],null,null),i._17(1024,null,p.n,function(t){return[t]},[p.c]),i._2(18,671744,null,0,p.s,[[2,p.b],[8,null],[8,null],[2,p.n]],{name:[0,"name"],model:[1,"model"]},null),i._17(2048,null,p.o,null,[p.s]),i._2(20,16384,null,0,p.p,[p.o],null,null),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(23,0,null,null,11,"div",[["class","form-group"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(25,0,null,null,1,"label",[["for","password"]],null,null,null,null,null)),(t()(),i._21(-1,null,["Password"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(28,0,null,null,5,"input",[["class","form-control"],["id","password"],["name","password"],["ngModel",""],["type","password"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0;return"input"===e&&(r=!1!==i._14(t,29)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==i._14(t,29).onTouched()&&r),"compositionstart"===e&&(r=!1!==i._14(t,29)._compositionStart()&&r),"compositionend"===e&&(r=!1!==i._14(t,29)._compositionEnd(n.target.value)&&r),r},null,null)),i._2(29,16384,null,0,p.c,[i.B,i.k,[2,p.a]],null,null),i._17(1024,null,p.n,function(t){return[t]},[p.c]),i._2(31,671744,null,0,p.s,[[2,p.b],[8,null],[8,null],[2,p.n]],{name:[0,"name"],model:[1,"model"]},null),i._17(2048,null,p.o,null,[p.s]),i._2(33,16384,null,0,p.p,[p.o],null,null),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(36,0,null,null,1,"button",[["class","btn btn-primary"],["type","submit"]],null,null,null,null,null)),(t()(),i._21(-1,null,["Sign Up"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n"])),(t()(),i._21(-1,null,["\n"]))],function(t,e){t(e,18,0,"email",""),t(e,31,0,"password","")},function(t,e){t(e,4,0,i._14(e,8).ngClassUntouched,i._14(e,8).ngClassTouched,i._14(e,8).ngClassPristine,i._14(e,8).ngClassDirty,i._14(e,8).ngClassValid,i._14(e,8).ngClassInvalid,i._14(e,8).ngClassPending),t(e,15,0,i._14(e,20).ngClassUntouched,i._14(e,20).ngClassTouched,i._14(e,20).ngClassPristine,i._14(e,20).ngClassDirty,i._14(e,20).ngClassValid,i._14(e,20).ngClassInvalid,i._14(e,20).ngClassPending),t(e,28,0,i._14(e,33).ngClassUntouched,i._14(e,33).ngClassTouched,i._14(e,33).ngClassPristine,i._14(e,33).ngClassDirty,i._14(e,33).ngClassValid,i._14(e,33).ngClassInvalid,i._14(e,33).ngClassPending)})}var x=i.Z("app-signup",O,function(t){return i._22(0,[(t()(),i._3(0,0,null,null,1,"app-signup",[],null,null,null,N,I)),i._2(1,114688,null,0,O,[T.a],null,null)],function(t,e){t(e,1,0)},null)},{},{},[]),A=function(){function t(t){this.authService=t}return t.prototype.ngOnInit=function(){},t.prototype.onSignin=function(t){this.authService.signinUser(t.value.email,t.value.password)},t}(),P=i._1({encapsulation:0,styles:[[""]],data:{}});function R(t){return i._22(0,[(t()(),i._3(0,0,null,null,40,"div",[["class","row"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(2,0,null,null,37,"div",[["class","col-sm-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(4,0,null,null,34,"form",[["novalidate",""]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngSubmit"],[null,"submit"],[null,"reset"]],function(t,e,n){var r=!0,o=t.component;return"submit"===e&&(r=!1!==i._14(t,6).onSubmit(n)&&r),"reset"===e&&(r=!1!==i._14(t,6).onReset()&&r),"ngSubmit"===e&&(r=!1!==o.onSignin(i._14(t,6))&&r),r},null,null)),i._2(5,16384,null,0,p.z,[],null,null),i._2(6,4210688,[["f",4]],0,p.r,[[8,null],[8,null]],null,{ngSubmit:"ngSubmit"}),i._17(2048,null,p.b,null,[p.r]),i._2(8,16384,null,0,p.q,[p.b],null,null),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(10,0,null,null,11,"div",[["class","form-group"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(12,0,null,null,1,"label",[["for","email"]],null,null,null,null,null)),(t()(),i._21(-1,null,["Mail"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(15,0,null,null,5,"input",[["class","form-control"],["id","email"],["name","email"],["ngModel",""],["type","email"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0;return"input"===e&&(r=!1!==i._14(t,16)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==i._14(t,16).onTouched()&&r),"compositionstart"===e&&(r=!1!==i._14(t,16)._compositionStart()&&r),"compositionend"===e&&(r=!1!==i._14(t,16)._compositionEnd(n.target.value)&&r),r},null,null)),i._2(16,16384,null,0,p.c,[i.B,i.k,[2,p.a]],null,null),i._17(1024,null,p.n,function(t){return[t]},[p.c]),i._2(18,671744,null,0,p.s,[[2,p.b],[8,null],[8,null],[2,p.n]],{name:[0,"name"],model:[1,"model"]},null),i._17(2048,null,p.o,null,[p.s]),i._2(20,16384,null,0,p.p,[p.o],null,null),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(23,0,null,null,11,"div",[["class","form-group"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(25,0,null,null,1,"label",[["for","password"]],null,null,null,null,null)),(t()(),i._21(-1,null,["Password"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(28,0,null,null,5,"input",[["class","form-control"],["id","password"],["name","password"],["ngModel",""],["type","password"]],[[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"input"],[null,"blur"],[null,"compositionstart"],[null,"compositionend"]],function(t,e,n){var r=!0;return"input"===e&&(r=!1!==i._14(t,29)._handleInput(n.target.value)&&r),"blur"===e&&(r=!1!==i._14(t,29).onTouched()&&r),"compositionstart"===e&&(r=!1!==i._14(t,29)._compositionStart()&&r),"compositionend"===e&&(r=!1!==i._14(t,29)._compositionEnd(n.target.value)&&r),r},null,null)),i._2(29,16384,null,0,p.c,[i.B,i.k,[2,p.a]],null,null),i._17(1024,null,p.n,function(t){return[t]},[p.c]),i._2(31,671744,null,0,p.s,[[2,p.b],[8,null],[8,null],[2,p.n]],{name:[0,"name"],model:[1,"model"]},null),i._17(2048,null,p.o,null,[p.s]),i._2(33,16384,null,0,p.p,[p.o],null,null),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(36,0,null,null,1,"button",[["class","btn btn-primary"],["type","submit"]],null,null,null,null,null)),(t()(),i._21(-1,null,["Sign in"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "]))],function(t,e){t(e,18,0,"email",""),t(e,31,0,"password","")},function(t,e){t(e,4,0,i._14(e,8).ngClassUntouched,i._14(e,8).ngClassTouched,i._14(e,8).ngClassPristine,i._14(e,8).ngClassDirty,i._14(e,8).ngClassValid,i._14(e,8).ngClassInvalid,i._14(e,8).ngClassPending),t(e,15,0,i._14(e,20).ngClassUntouched,i._14(e,20).ngClassTouched,i._14(e,20).ngClassPristine,i._14(e,20).ngClassDirty,i._14(e,20).ngClassValid,i._14(e,20).ngClassInvalid,i._14(e,20).ngClassPending),t(e,28,0,i._14(e,33).ngClassUntouched,i._14(e,33).ngClassTouched,i._14(e,33).ngClassPristine,i._14(e,33).ngClassDirty,i._14(e,33).ngClassValid,i._14(e,33).ngClassInvalid,i._14(e,33).ngClassPending)})}var k=i.Z("app-signin",A,function(t){return i._22(0,[(t()(),i._3(0,0,null,null,1,"app-signin",[],null,null,null,R,P)),i._2(1,114688,null,0,A,[T.a],null,null)],function(t,e){t(e,1,0)},null)},{},{},[]),D=n("UHIZ"),j=n("O/TX"),M=n("6Xbx"),L=n("AP4T"),F=n("RyBE"),V=function(){function t(){}return t.prototype.build=function(){return new XMLHttpRequest},t}(),U=function(){var t={Get:0,Post:1,Put:2,Delete:3,Options:4,Head:5,Patch:6};return t[t.Get]="Get",t[t.Post]="Post",t[t.Put]="Put",t[t.Delete]="Delete",t[t.Options]="Options",t[t.Head]="Head",t[t.Patch]="Patch",t}(),B=function(){var t={Basic:0,Cors:1,Default:2,Error:3,Opaque:4};return t[t.Basic]="Basic",t[t.Cors]="Cors",t[t.Default]="Default",t[t.Error]="Error",t[t.Opaque]="Opaque",t}(),W=function(){var t={NONE:0,JSON:1,FORM:2,FORM_DATA:3,TEXT:4,BLOB:5,ARRAY_BUFFER:6};return t[t.NONE]="NONE",t[t.JSON]="JSON",t[t.FORM]="FORM",t[t.FORM_DATA]="FORM_DATA",t[t.TEXT]="TEXT",t[t.BLOB]="BLOB",t[t.ARRAY_BUFFER]="ARRAY_BUFFER",t}(),q=function(){var t={Text:0,Json:1,ArrayBuffer:2,Blob:3};return t[t.Text]="Text",t[t.Json]="Json",t[t.ArrayBuffer]="ArrayBuffer",t[t.Blob]="Blob",t}(),H=function(){function t(e){var n=this;this._headers=new Map,this._normalizedNames=new Map,e&&(e instanceof t?e.forEach(function(t,e){t.forEach(function(t){return n.append(e,t)})}):Object.keys(e).forEach(function(t){var r=Array.isArray(e[t])?e[t]:[e[t]];n.delete(t),r.forEach(function(e){return n.append(t,e)})}))}return t.fromResponseHeaderString=function(e){var n=new t;return e.split("\n").forEach(function(t){var e=t.indexOf(":");if(e>0){var r=t.slice(0,e),i=t.slice(e+1).trim();n.set(r,i)}}),n},t.prototype.append=function(t,e){var n=this.getAll(t);null===n?this.set(t,e):n.push(e)},t.prototype.delete=function(t){var e=t.toLowerCase();this._normalizedNames.delete(e),this._headers.delete(e)},t.prototype.forEach=function(t){var e=this;this._headers.forEach(function(n,r){return t(n,e._normalizedNames.get(r),e._headers)})},t.prototype.get=function(t){var e=this.getAll(t);return null===e?null:e.length>0?e[0]:null},t.prototype.has=function(t){return this._headers.has(t.toLowerCase())},t.prototype.keys=function(){return Array.from(this._normalizedNames.values())},t.prototype.set=function(t,e){Array.isArray(e)?e.length&&this._headers.set(t.toLowerCase(),[e.join(",")]):this._headers.set(t.toLowerCase(),[e]),this.mayBeSetNormalizedName(t)},t.prototype.values=function(){return Array.from(this._headers.values())},t.prototype.toJSON=function(){var t=this,e={};return this._headers.forEach(function(n,r){var i=[];n.forEach(function(t){return i.push.apply(i,t.split(","))}),e[t._normalizedNames.get(r)]=i}),e},t.prototype.getAll=function(t){return this.has(t)&&this._headers.get(t.toLowerCase())||null},t.prototype.entries=function(){throw new Error('"entries" method is not implemented on Headers class')},t.prototype.mayBeSetNormalizedName=function(t){var e=t.toLowerCase();this._normalizedNames.has(e)||this._normalizedNames.set(e,t)},t}(),G=function(){function t(t){void 0===t&&(t={});var e=t.body,n=t.status,r=t.headers,i=t.statusText,o=t.type,s=t.url;this.body=null!=e?e:null,this.status=null!=n?n:null,this.headers=null!=r?r:null,this.statusText=null!=i?i:null,this.type=null!=o?o:null,this.url=null!=s?s:null}return t.prototype.merge=function(e){return new t({body:e&&null!=e.body?e.body:this.body,status:e&&null!=e.status?e.status:this.status,headers:e&&null!=e.headers?e.headers:this.headers,statusText:e&&null!=e.statusText?e.statusText:this.statusText,type:e&&null!=e.type?e.type:this.type,url:e&&null!=e.url?e.url:this.url})},t}(),z=function(t){function e(){return t.call(this,{status:200,statusText:"Ok",type:B.Default,headers:new H})||this}return Object(M.__extends)(e,t),e}(G),K=function(){};function J(t){if("string"!=typeof t)return t;switch(t.toUpperCase()){case"GET":return U.Get;case"POST":return U.Post;case"PUT":return U.Put;case"DELETE":return U.Delete;case"OPTIONS":return U.Options;case"HEAD":return U.Head;case"PATCH":return U.Patch}throw new Error('Invalid request method. The method "'+t+'" is not supported.')}var X=function(t){return t>=200&&t<300},Q=function(){function t(){}return t.prototype.encodeKey=function(t){return Y(t)},t.prototype.encodeValue=function(t){return Y(t)},t}();function Y(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var Z=function(){function t(t,e){void 0===t&&(t=""),void 0===e&&(e=new Q),this.rawParams=t,this.queryEncoder=e,this.paramsMap=function(t){void 0===t&&(t="");var e=new Map;return t.length>0&&t.split("&").forEach(function(t){var n=t.indexOf("="),r=-1==n?[t,""]:[t.slice(0,n),t.slice(n+1)],i=r[0],o=r[1],s=e.get(i)||[];s.push(o),e.set(i,s)}),e}(t)}return t.prototype.clone=function(){var e=new t("",this.queryEncoder);return e.appendAll(this),e},t.prototype.has=function(t){return this.paramsMap.has(t)},t.prototype.get=function(t){var e=this.paramsMap.get(t);return Array.isArray(e)?e[0]:null},t.prototype.getAll=function(t){return this.paramsMap.get(t)||[]},t.prototype.set=function(t,e){if(void 0!==e&&null!==e){var n=this.paramsMap.get(t)||[];n.length=0,n.push(e),this.paramsMap.set(t,n)}else this.delete(t)},t.prototype.setAll=function(t){var e=this;t.paramsMap.forEach(function(t,n){var r=e.paramsMap.get(n)||[];r.length=0,r.push(t[0]),e.paramsMap.set(n,r)})},t.prototype.append=function(t,e){if(void 0!==e&&null!==e){var n=this.paramsMap.get(t)||[];n.push(e),this.paramsMap.set(t,n)}},t.prototype.appendAll=function(t){var e=this;t.paramsMap.forEach(function(t,n){for(var r=e.paramsMap.get(n)||[],i=0;i<t.length;++i)r.push(t[i]);e.paramsMap.set(n,r)})},t.prototype.replaceAll=function(t){var e=this;t.paramsMap.forEach(function(t,n){var r=e.paramsMap.get(n)||[];r.length=0;for(var i=0;i<t.length;++i)r.push(t[i]);e.paramsMap.set(n,r)})},t.prototype.toString=function(){var t=this,e=[];return this.paramsMap.forEach(function(n,r){n.forEach(function(n){return e.push(t.queryEncoder.encodeKey(r)+"="+t.queryEncoder.encodeValue(n))})}),e.join("&")},t.prototype.delete=function(t){this.paramsMap.delete(t)},t}(),$=function(){function t(){}return t.prototype.json=function(){return"string"==typeof this._body?JSON.parse(this._body):this._body instanceof ArrayBuffer?JSON.parse(this.text()):this._body},t.prototype.text=function(t){if(void 0===t&&(t="legacy"),this._body instanceof Z)return this._body.toString();if(this._body instanceof ArrayBuffer)switch(t){case"legacy":return String.fromCharCode.apply(null,new Uint16Array(this._body));case"iso-8859":return String.fromCharCode.apply(null,new Uint8Array(this._body));default:throw new Error("Invalid value for encodingHint: "+t)}return null==this._body?"":"object"==typeof this._body?JSON.stringify(this._body,null,2):this._body.toString()},t.prototype.arrayBuffer=function(){return this._body instanceof ArrayBuffer?this._body:function(t){for(var e=new Uint16Array(t.length),n=0,r=t.length;n<r;n++)e[n]=t.charCodeAt(n);return e.buffer}(this.text())},t.prototype.blob=function(){if(this._body instanceof Blob)return this._body;if(this._body instanceof ArrayBuffer)return new Blob([this._body]);throw new Error("The request body isn't either a blob or an array buffer")},t}(),tt=function(t){function e(e){var n=t.call(this)||this;return n._body=e.body,n.status=e.status,n.ok=n.status>=200&&n.status<=299,n.statusText=e.statusText,n.headers=e.headers,n.type=e.type,n.url=e.url,n}return Object(M.__extends)(e,t),e.prototype.toString=function(){return"Response with status: "+this.status+" "+this.statusText+" for URL: "+this.url},e}($),et=/^\)\]\}',?\n/,nt=function(){function t(t,e,n){var r=this;this.request=t,this.response=new L.a(function(i){var o=e.build();o.open(U[t.method].toUpperCase(),t.url),null!=t.withCredentials&&(o.withCredentials=t.withCredentials);var s=function(){var e=1223===o.status?204:o.status,r=null;204!==e&&"string"==typeof(r="undefined"==typeof o.response?o.responseText:o.response)&&(r=r.replace(et,"")),0===e&&(e=r?200:0);var s,a=H.fromResponseHeaderString(o.getAllResponseHeaders()),u=("responseURL"in(s=o)?s.responseURL:/^X-Request-URL:/m.test(s.getAllResponseHeaders())?s.getResponseHeader("X-Request-URL"):null)||t.url,c=new G({body:r,status:e,headers:a,statusText:o.statusText||"OK",url:u});null!=n&&(c=n.merge(c));var l=new tt(c);if(l.ok=X(e),l.ok)return i.next(l),void i.complete();i.error(l)},a=function(t){var e=new G({body:t,type:B.Error,status:o.status,statusText:o.statusText});null!=n&&(e=n.merge(e)),i.error(new tt(e))};if(r.setDetectedContentType(t,o),null==t.headers&&(t.headers=new H),t.headers.has("Accept")||t.headers.append("Accept","application/json, text/plain, */*"),t.headers.forEach(function(t,e){return o.setRequestHeader(e,t.join(","))}),null!=t.responseType&&null!=o.responseType)switch(t.responseType){case q.ArrayBuffer:o.responseType="arraybuffer";break;case q.Json:o.responseType="json";break;case q.Text:o.responseType="text";break;case q.Blob:o.responseType="blob";break;default:throw new Error("The selected responseType is not supported")}return o.addEventListener("load",s),o.addEventListener("error",a),o.send(r.request.getBody()),function(){o.removeEventListener("load",s),o.removeEventListener("error",a),o.abort()}})}return t.prototype.setDetectedContentType=function(t,e){if(null==t.headers||null==t.headers.get("Content-Type"))switch(t.contentType){case W.NONE:break;case W.JSON:e.setRequestHeader("content-type","application/json");break;case W.FORM:e.setRequestHeader("content-type","application/x-www-form-urlencoded;charset=UTF-8");break;case W.TEXT:e.setRequestHeader("content-type","text/plain");break;case W.BLOB:var n=t.blob();n.type&&e.setRequestHeader("content-type",n.type)}},t}(),rt=function(){function t(t,e){void 0===t&&(t="XSRF-TOKEN"),void 0===e&&(e="X-XSRF-TOKEN"),this._cookieName=t,this._headerName=e}return t.prototype.configureRequest=function(t){var e=Object(F.r)().getCookie(this._cookieName);e&&t.headers.set(this._headerName,e)},t}(),it=function(){function t(t,e,n){this._browserXHR=t,this._baseResponseOptions=e,this._xsrfStrategy=n}return t.prototype.createConnection=function(t){return this._xsrfStrategy.configureRequest(t),new nt(t,this._browserXHR,this._baseResponseOptions)},t}(),ot=function(){function t(t){void 0===t&&(t={});var e=t.method,n=t.headers,r=t.body,i=t.url,o=t.search,s=t.params,a=t.withCredentials,u=t.responseType;this.method=null!=e?J(e):null,this.headers=null!=n?n:null,this.body=null!=r?r:null,this.url=null!=i?i:null,this.params=this._mergeSearchParams(s||o),this.withCredentials=null!=a?a:null,this.responseType=null!=u?u:null}return Object.defineProperty(t.prototype,"search",{get:function(){return this.params},set:function(t){this.params=t},enumerable:!0,configurable:!0}),t.prototype.merge=function(e){return new t({method:e&&null!=e.method?e.method:this.method,headers:e&&null!=e.headers?e.headers:new H(this.headers),body:e&&null!=e.body?e.body:this.body,url:e&&null!=e.url?e.url:this.url,params:e&&this._mergeSearchParams(e.params||e.search),withCredentials:e&&null!=e.withCredentials?e.withCredentials:this.withCredentials,responseType:e&&null!=e.responseType?e.responseType:this.responseType})},t.prototype._mergeSearchParams=function(t){return t?t instanceof Z?t.clone():"string"==typeof t?new Z(t):this._parseParams(t):this.params},t.prototype._parseParams=function(t){var e=this;void 0===t&&(t={});var n=new Z;return Object.keys(t).forEach(function(r){var i=t[r];Array.isArray(i)?i.forEach(function(t){return e._appendParam(r,t,n)}):e._appendParam(r,i,n)}),n},t.prototype._appendParam=function(t,e,n){"string"!=typeof e&&(e=JSON.stringify(e)),n.append(t,e)},t}(),st=function(t){function e(){return t.call(this,{method:U.Get,headers:new H})||this}return Object(M.__extends)(e,t),e}(ot),at=function(t){function e(e){var n=t.call(this)||this,r=e.url;n.url=e.url;var i,o=e.params||e.search;if(o&&(i="object"!=typeof o||o instanceof Z?o.toString():function(t){var e=new Z;return Object.keys(t).forEach(function(n){var r=t[n];r&&Array.isArray(r)?r.forEach(function(t){return e.append(n,t.toString())}):e.append(n,r.toString())}),e}(o).toString()).length>0){var s="?";-1!=n.url.indexOf("?")&&(s="&"==n.url[n.url.length-1]?"":"&"),n.url=r+s+i}return n._body=e.body,n.method=J(e.method),n.headers=new H(e.headers),n.contentType=n.detectContentType(),n.withCredentials=e.withCredentials,n.responseType=e.responseType,n}return Object(M.__extends)(e,t),e.prototype.detectContentType=function(){switch(this.headers.get("content-type")){case"application/json":return W.JSON;case"application/x-www-form-urlencoded":return W.FORM;case"multipart/form-data":return W.FORM_DATA;case"text/plain":case"text/html":return W.TEXT;case"application/octet-stream":return this._body instanceof pt?W.ARRAY_BUFFER:W.BLOB;default:return this.detectContentTypeFromBody()}},e.prototype.detectContentTypeFromBody=function(){return null==this._body?W.NONE:this._body instanceof Z?W.FORM:this._body instanceof lt?W.FORM_DATA:this._body instanceof ht?W.BLOB:this._body instanceof pt?W.ARRAY_BUFFER:this._body&&"object"==typeof this._body?W.JSON:W.TEXT},e.prototype.getBody=function(){switch(this.contentType){case W.JSON:case W.FORM:return this.text();case W.FORM_DATA:return this._body;case W.TEXT:return this.text();case W.BLOB:return this.blob();case W.ARRAY_BUFFER:return this.arrayBuffer();default:return null}},e}($),ut=function(){},ct="object"==typeof window?window:ut,lt=ct.FormData||ut,ht=ct.Blob||ut,pt=ct.ArrayBuffer||ut;function ft(t,e){return t.createConnection(e).response}function dt(t,e,n,r){return t.merge(new ot(e?{method:e.method||n,url:e.url||r,search:e.search,params:e.params,headers:e.headers,body:e.body,withCredentials:e.withCredentials,responseType:e.responseType}:{method:n,url:r}))}var vt=function(){function t(t,e){this._backend=t,this._defaultOptions=e}return t.prototype.request=function(t,e){var n;if("string"==typeof t)n=ft(this._backend,new at(dt(this._defaultOptions,e,U.Get,t)));else{if(!(t instanceof at))throw new Error("First argument must be a url string or Request instance.");n=ft(this._backend,t)}return n},t.prototype.get=function(t,e){return this.request(new at(dt(this._defaultOptions,e,U.Get,t)))},t.prototype.post=function(t,e,n){return this.request(new at(dt(this._defaultOptions.merge(new ot({body:e})),n,U.Post,t)))},t.prototype.put=function(t,e,n){return this.request(new at(dt(this._defaultOptions.merge(new ot({body:e})),n,U.Put,t)))},t.prototype.delete=function(t,e){return this.request(new at(dt(this._defaultOptions,e,U.Delete,t)))},t.prototype.patch=function(t,e,n){return this.request(new at(dt(this._defaultOptions.merge(new ot({body:e})),n,U.Patch,t)))},t.prototype.head=function(t,e){return this.request(new at(dt(this._defaultOptions,e,U.Head,t)))},t.prototype.options=function(t,e){return this.request(new at(dt(this._defaultOptions,e,U.Options,t)))},t}();function yt(){return new rt}function gt(t,e){return new vt(t,e)}var _t=function(){},mt=n("dnjB"),bt=n("TO51"),wt=n("8ofh"),Et=n("NePw"),Ct=n("qLnt"),St=function(t){function e(){t.apply(this,arguments),this.value=null,this.hasNext=!1,this.hasCompleted=!1}return Object(M.__extends)(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),Ct.a.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),Ct.a.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(bt.b);function Tt(t){var e=t.subject;e.next(t.value),e.complete()}function Ot(t){t.subject.error(t.err)}function It(t){var e=this,n=t.source,r=t.subscriber,i=t.context,o=n.callbackFunc,s=n.args,a=n.scheduler,u=n.subject;if(!u){u=n.subject=new St;var c=function t(){for(var n=[],r=0;r<arguments.length;r++)n[r-0]=arguments[r];var i=t.source,o=i.selector,s=i.subject,u=n.shift();if(u)e.add(a.schedule(xt,0,{err:u,subject:s}));else if(o){var c=Object(wt.a)(o).apply(this,n);e.add(c===Et.a?a.schedule(xt,0,{err:Et.a.e,subject:s}):a.schedule(Nt,0,{value:c,subject:s}))}else e.add(a.schedule(Nt,0,{value:n.length<=1?n[0]:n,subject:s}))};c.source=n,Object(wt.a)(o).apply(i,s.concat(c))===Et.a&&e.add(a.schedule(xt,0,{err:Et.a.e,subject:u}))}e.add(u.subscribe(r))}function Nt(t){var e=t.subject;e.next(t.value),e.complete()}function xt(t){t.subject.error(t.err)}L.a.bindCallback=function(t){function e(e,n,r,i,o){t.call(this),this.callbackFunc=e,this.selector=n,this.args=r,this.context=i,this.scheduler=o}return Object(M.__extends)(e,t),e.create=function(t,n,r){return void 0===n&&(n=void 0),function(){for(var i=[],o=0;o<arguments.length;o++)i[o-0]=arguments[o];return new e(t,n,i,this,r)}},e.prototype._subscribe=function(t){var n=this.callbackFunc,r=this.args,i=this.scheduler,o=this.subject;if(i)return i.schedule(e.dispatch,0,{source:this,subscriber:t,context:this.context});if(!o){o=this.subject=new St;var s=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n-0]=arguments[n];var r=t.source,i=r.selector,o=r.subject;if(i){var s=Object(wt.a)(i).apply(this,e);s===Et.a?o.error(Et.a.e):(o.next(s),o.complete())}else o.next(e.length<=1?e[0]:e),o.complete()};s.source=this,Object(wt.a)(n).apply(this.context,r.concat(s))===Et.a&&o.error(Et.a.e)}return o.subscribe(t)},e.dispatch=function(t){var e=this,n=t.source,r=t.subscriber,i=t.context,o=n.callbackFunc,s=n.args,a=n.scheduler,u=n.subject;if(!u){u=n.subject=new St;var c=function t(){for(var n=[],r=0;r<arguments.length;r++)n[r-0]=arguments[r];var i=t.source,o=i.selector,s=i.subject;if(o){var u=Object(wt.a)(o).apply(this,n);e.add(u===Et.a?a.schedule(Ot,0,{err:Et.a.e,subject:s}):a.schedule(Tt,0,{value:u,subject:s}))}else e.add(a.schedule(Tt,0,{value:n.length<=1?n[0]:n,subject:s}))};c.source=n,Object(wt.a)(o).apply(i,s.concat(c))===Et.a&&u.error(Et.a.e)}e.add(u.subscribe(r))},e}(L.a).create,L.a.bindNodeCallback=function(t){function e(e,n,r,i,o){t.call(this),this.callbackFunc=e,this.selector=n,this.args=r,this.context=i,this.scheduler=o}return Object(M.__extends)(e,t),e.create=function(t,n,r){return void 0===n&&(n=void 0),function(){for(var i=[],o=0;o<arguments.length;o++)i[o-0]=arguments[o];return new e(t,n,i,this,r)}},e.prototype._subscribe=function(t){var e=this.callbackFunc,n=this.args,r=this.scheduler,i=this.subject;if(r)return r.schedule(It,0,{source:this,subscriber:t,context:this.context});if(!i){i=this.subject=new St;var o=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n-0]=arguments[n];var r=t.source,i=r.selector,o=r.subject,s=e.shift();if(s)o.error(s);else if(i){var a=Object(wt.a)(i).apply(this,e);a===Et.a?o.error(Et.a.e):(o.next(a),o.complete())}else o.next(e.length<=1?e[0]:e),o.complete()};o.source=this,Object(wt.a)(e).apply(this.context,n.concat(o))===Et.a&&i.error(Et.a.e)}return i.subscribe(t)},e}(L.a).create;var At=n("3iOE"),Pt=n("1j/l"),Rt=n("Oryw"),kt=n("lI6h"),Dt=n("qgI0"),jt={};function Mt(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n=null;return"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(Pt.a)(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(new Rt.a([e].concat(t)),new Lt(n))}}var Lt=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new Ft(t,this.project))},t}(),Ft=function(t){function e(e,n){t.call(this,e),this.project=n,this.active=0,this.values=[],this.observables=[]}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.values.push(jt),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(Object(Dt.a)(this,r,r,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.values,s=this.toRespond?o[n]===jt?--this.toRespond:this.toRespond:0;o[n]=e,0===s&&(this.project?this._tryProject(o):this.destination.next(o.slice()))},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(kt.a);L.a.combineLatest=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n=null,r=null;return Object(At.a)(t[t.length-1])&&(r=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(Pt.a)(t[0])&&(t=t[0]),new Rt.a(t,r).lift(new Lt(n))};var Vt=n("GZB0"),Ut=n("fgj+"),Bt=n("Bk5J");function Wt(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return 1===t.length||2===t.length&&Object(At.a)(t[1])?Object(Ut.a)(t[0]):Object(Bt.a)()(Vt.a.apply(void 0,t))}L.a.concat=Wt;var qt=function(t){function e(e){t.call(this),this.observableFactory=e}return Object(M.__extends)(e,t),e.create=function(t){return new e(t)},e.prototype._subscribe=function(t){return new Ht(t,this.observableFactory)},e}(L.a),Ht=function(t){function e(e,n){t.call(this,e),this.factory=n,this.tryDefer()}return Object(M.__extends)(e,t),e.prototype.tryDefer=function(){try{this._callFactory()}catch(t){this._error(t)}},e.prototype._callFactory=function(){var t=this.factory();t&&this.add(Object(Dt.a)(this,t))},e}(kt.a);L.a.defer=qt.create;var Gt=n("Ecq+");L.a.empty=Gt.a.create;var zt=n("Jsyr");L.a.forkJoin=zt.a,L.a.from=Ut.a;var Kt=n("B1iP"),Jt=Object.prototype.toString;L.a.fromEvent=function(t){function e(e,n,r,i){t.call(this),this.sourceObj=e,this.eventName=n,this.selector=r,this.options=i}return Object(M.__extends)(e,t),e.create=function(t,n,r,i){return Object(Kt.a)(r)&&(i=r,r=void 0),new e(t,n,i,r)},e.setupSubscription=function(t,n,r,i,o){var s;if(function(t){return!!t&&"[object NodeList]"===Jt.call(t)}(t)||function(t){return!!t&&"[object HTMLCollection]"===Jt.call(t)}(t))for(var a=0,u=t.length;a<u;a++)e.setupSubscription(t[a],n,r,i,o);else if(function(t){return!!t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){var c=t;t.addEventListener(n,r,o),s=function(){return c.removeEventListener(n,r)}}else if(function(t){return!!t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){var l=t;t.on(n,r),s=function(){return l.off(n,r)}}else{if(!function(t){return!!t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t))throw new TypeError("Invalid event target");var h=t;t.addListener(n,r),s=function(){return h.removeListener(n,r)}}i.add(new Ct.a(s))},e.prototype._subscribe=function(t){var n=this.selector;e.setupSubscription(this.sourceObj,this.eventName,n?function(){for(var e=[],r=0;r<arguments.length;r++)e[r-0]=arguments[r];var i=Object(wt.a)(n).apply(void 0,e);i===Et.a?t.error(Et.a.e):t.next(i)}:function(e){return t.next(e)},t,this.options)},e}(L.a).create,L.a.fromEventPattern=function(t){function e(e,n,r){t.call(this),this.addHandler=e,this.removeHandler=n,this.selector=r}return Object(M.__extends)(e,t),e.create=function(t,n,r){return new e(t,n,r)},e.prototype._subscribe=function(t){var e=this,n=this.removeHandler,r=this.selector?function(){for(var n=[],r=0;r<arguments.length;r++)n[r-0]=arguments[r];e._callSelector(t,n)}:function(e){t.next(e)},i=this._callAddHandler(r,t);Object(Kt.a)(n)&&t.add(new Ct.a(function(){n(r,i)}))},e.prototype._callSelector=function(t,e){try{var n=this.selector.apply(this,e);t.next(n)}catch(e){t.error(e)}},e.prototype._callAddHandler=function(t,e){try{return this.addHandler(t)||null}catch(t){e.error(t)}},e}(L.a).create;var Xt=n("CASk");L.a.fromPromise=Xt.a;var Qt=function(t){return t};L.a.generate=function(t){function e(e,n,r,i,o){t.call(this),this.initialState=e,this.condition=n,this.iterate=r,this.resultSelector=i,this.scheduler=o}return Object(M.__extends)(e,t),e.create=function(t,n,r,i,o){return 1==arguments.length?new e(t.initialState,t.condition,t.iterate,t.resultSelector||Qt,t.scheduler):void 0===i||Object(At.a)(i)?new e(t,n,r,Qt,i):new e(t,n,r,i,o)},e.prototype._subscribe=function(t){var n=this.initialState;if(this.scheduler)return this.scheduler.schedule(e.dispatch,0,{subscriber:t,iterate:this.iterate,condition:this.condition,resultSelector:this.resultSelector,state:n});for(var r=this.condition,i=this.resultSelector,o=this.iterate;;){if(r){var s=void 0;try{s=r(n)}catch(e){return void t.error(e)}if(!s){t.complete();break}}var a=void 0;try{a=i(n)}catch(e){return void t.error(e)}if(t.next(a),t.closed)break;try{n=o(n)}catch(e){return void t.error(e)}}},e.dispatch=function(t){var e=t.subscriber,n=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(t){return void e.error(t)}else t.needIterate=!0;if(n){var r=void 0;try{r=n(t.state)}catch(t){return void e.error(t)}if(!r)return void e.complete();if(e.closed)return}var i;try{i=t.resultSelector(t.state)}catch(t){return void e.error(t)}if(!e.closed&&(e.next(i),!e.closed))return this.schedule(t)}},e}(L.a).create;var Yt=function(t){function e(e,n,r){t.call(this),this.condition=e,this.thenSource=n,this.elseSource=r}return Object(M.__extends)(e,t),e.create=function(t,n,r){return new e(t,n,r)},e.prototype._subscribe=function(t){return new Zt(t,this.condition,this.thenSource,this.elseSource)},e}(L.a),Zt=function(t){function e(e,n,r,i){t.call(this,e),this.condition=n,this.thenSource=r,this.elseSource=i,this.tryIf()}return Object(M.__extends)(e,t),e.prototype.tryIf=function(){var t=this.condition,e=this.thenSource,n=this.elseSource;try{var r=t()?e:n;r?this.add(Object(Dt.a)(this,r)):this._complete()}catch(t){this._error(t)}},e}(kt.a);function $t(t){return!Object(Pt.a)(t)&&t-parseFloat(t)+1>=0}L.a.if=Yt.create;var te=n("xIGM"),ee=function(t){function e(e,n){t.call(this,e,n),this.scheduler=e,this.work=n,this.pending=!1}return Object(M.__extends)(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t,this.pending=!0;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),te.a.setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;te.a.clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){t.call(this)}return Object(M.__extends)(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(Ct.a)),ne=function(t){function e(){t.apply(this,arguments),this.actions=[],this.active=!1,this.scheduled=void 0}return Object(M.__extends)(e,t),e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=Date.now?Date.now:function(){return+new Date},t}()),re=new ne(ee);L.a.interval=function(t){function e(e,n){void 0===e&&(e=0),void 0===n&&(n=re),t.call(this),this.period=e,this.scheduler=n,(!$t(e)||e<0)&&(this.period=0),n&&"function"==typeof n.schedule||(this.scheduler=re)}return Object(M.__extends)(e,t),e.create=function(t,n){return void 0===t&&(t=0),void 0===n&&(n=re),new e(t,n)},e.dispatch=function(t){var e=t.subscriber,n=t.period;e.next(t.index),e.closed||(t.index+=1,this.schedule(t,n))},e.prototype._subscribe=function(t){var n=this.period;t.add(this.scheduler.schedule(e.dispatch,n,{index:0,subscriber:t,period:n}))},e}(L.a).create;var ie=n("2kLc");function oe(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];if(1===t.length){if(!Object(Pt.a)(t[0]))return t[0];t=t[0]}return new Rt.a(t).lift(new se)}L.a.merge=ie.a;var se=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ae(t))},t}(),ae=function(t){function e(e){t.call(this,e),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],i=Object(Dt.a)(this,r,r,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},e.prototype.notifyNext=function(t,e,n,r,i){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==n){var s=this.subscriptions[o];s.unsubscribe(),this.remove(s)}this.subscriptions=null}this.destination.next(e)},e}(kt.a);L.a.race=oe;var ue=n("PR+T");L.a.never=function(t){function e(){t.call(this)}return Object(M.__extends)(e,t),e.create=function(){return new e},e.prototype._subscribe=function(t){Object(ue.a)()},e}(L.a).create,L.a.of=Vt.a;var ce=n("X9X7");function le(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return 1===t.length&&Object(Pt.a)(t[0])&&(t=t[0]),function(e){return e.lift(new he(t))}}var he=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new pe(t,this.nextSources))},t}(),pe=function(t){function e(e,n){t.call(this,e),this.destination=e,this.nextSources=n}return Object(M.__extends)(e,t),e.prototype.notifyError=function(t,e){this.subscribeToNextSource()},e.prototype.notifyComplete=function(t){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource()},e.prototype._complete=function(){this.subscribeToNextSource()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();t?this.add(Object(Dt.a)(this,t)):this.destination.complete()},e}(kt.a);function fe(t){var e=t.index,n=t.subscriber;if(e!==t.length){var r=t.keys[e];n.next([r,t.obj[r]]),t.index=e+1,this.schedule(t)}else n.complete()}L.a.onErrorResumeNext=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n;return 1===t.length&&Object(Pt.a)(t[0])&&(t=t[0]),n=t.shift(),new ce.a(n,null).lift(new he(t))},L.a.pairs=function(t){function e(e,n){t.call(this),this.obj=e,this.scheduler=n,this.keys=Object.keys(e)}return Object(M.__extends)(e,t),e.create=function(t,n){return new e(t,n)},e.prototype._subscribe=function(t){var e=this.keys,n=this.scheduler,r=e.length;if(n)return n.schedule(fe,0,{obj:this.obj,keys:e,length:r,index:0,subscriber:t});for(var i=0;i<r;i++){var o=e[i];t.next([o,this.obj[o]])}t.complete()},e}(L.a).create,L.a.range=function(t){function e(e,n,r){t.call(this),this.start=e,this._count=n,this.scheduler=r}return Object(M.__extends)(e,t),e.create=function(t,n,r){return void 0===t&&(t=0),void 0===n&&(n=0),new e(t,n,r)},e.dispatch=function(t){var e=t.start,n=t.index,r=t.subscriber;n>=t.count?r.complete():(r.next(e),r.closed||(t.index=n+1,t.start=e+1,this.schedule(t)))},e.prototype._subscribe=function(t){var n=0,r=this.start,i=this._count,o=this.scheduler;if(o)return o.schedule(e.dispatch,0,{index:n,count:i,start:r,subscriber:t});for(;;){if(n++>=i){t.complete();break}if(t.next(r++),t.closed)break}},e}(L.a).create;var de=function(t){function e(e,n){t.call(this),this.resourceFactory=e,this.observableFactory=n}return Object(M.__extends)(e,t),e.create=function(t,n){return new e(t,n)},e.prototype._subscribe=function(t){var e,n=this.resourceFactory,r=this.observableFactory;try{return e=n(),new ve(t,e,r)}catch(e){t.error(e)}},e}(L.a),ve=function(t){function e(e,n,r){t.call(this,e),this.resource=n,this.observableFactory=r,e.add(n),this.tryUse()}return Object(M.__extends)(e,t),e.prototype.tryUse=function(){try{var t=this.observableFactory.call(this,this.resource);t&&this.add(Object(Dt.a)(this,t))}catch(t){this._error(t)}},e}(kt.a);function ye(t){return t instanceof Date&&!isNaN(+t)}L.a.using=de.create,L.a.throw=function(t){function e(e,n){t.call(this),this.error=e,this.scheduler=n}return Object(M.__extends)(e,t),e.create=function(t,n){return new e(t,n)},e.dispatch=function(t){t.subscriber.error(t.error)},e.prototype._subscribe=function(t){var n=this.error,r=this.scheduler;if(t.syncErrorThrowable=!0,r)return r.schedule(e.dispatch,0,{error:n,subscriber:t});t.error(n)},e}(L.a).create;var ge=function(t){function e(e,n,r){void 0===e&&(e=0),t.call(this),this.period=-1,this.dueTime=0,$t(n)?this.period=Number(n)<1?1:Number(n):Object(At.a)(n)&&(r=n),Object(At.a)(r)||(r=re),this.scheduler=r,this.dueTime=ye(e)?+e-this.scheduler.now():e}return Object(M.__extends)(e,t),e.create=function(t,n,r){return void 0===t&&(t=0),new e(t,n,r)},e.dispatch=function(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}},e.prototype._subscribe=function(t){return this.scheduler.schedule(e.dispatch,this.dueTime,{index:0,period:this.period,subscriber:t})},e}(L.a).create;L.a.timer=ge;var _e=n("E9/g"),me=n("X3fp");function be(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){return e.lift.call(we.apply(void 0,[e].concat(t)))}}function we(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n=t[t.length-1];return"function"==typeof n&&t.pop(),new Rt.a(t).lift(new Ee(n))}var Ee=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new Ce(t,this.project))},t}(),Ce=function(t){function e(e,n,r){void 0===r&&(r=Object.create(null)),t.call(this,e),this.iterators=[],this.active=0,this.project="function"==typeof n?n:null,this.values=r}return Object(M.__extends)(e,t),e.prototype._next=function(t){var e=this.iterators;Object(Pt.a)(t)?e.push(new Te(t)):e.push("function"==typeof t[me.a]?new Se(t[me.a]()):new Oe(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];r.stillUnsubscribed?this.add(r.subscribe(r,n)):this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++)if("function"==typeof(s=t[r]).hasValue&&!s.hasValue())return;var i=!1,o=[];for(r=0;r<e;r++){var s,a=(s=t[r]).next();if(s.hasCompleted()&&(i=!0),a.done)return void n.complete();o.push(a.value)}this.project?this._tryProject(o):n.next(o),i&&n.complete()},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(_e.a),Se=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return t&&t.done},t}(),Te=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[me.a]=function(){return this},t.prototype.next=function(t){var e=this.index++;return e<this.length?{value:this.array[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),Oe=function(t){function e(e,n,r){t.call(this,e),this.parent=n,this.observable=r,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}return Object(M.__extends)(e,t),e.prototype[me.a]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return Object(Dt.a)(this,this.observable,this,e)},e}(kt.a);L.a.zip=we;var Ie=n("qqDE");function Ne(t,e){return void 0===e&&(e=null),new je({method:"GET",url:t,headers:e})}function xe(t,e,n){return new je({method:"POST",url:t,body:e,headers:n})}function Ae(t,e){return new je({method:"DELETE",url:t,headers:e})}function Pe(t,e,n){return new je({method:"PUT",url:t,body:e,headers:n})}function Re(t,e,n){return new je({method:"PATCH",url:t,body:e,headers:n})}var ke=Object(Ie.a)(function(t,e){return t.response});function De(t,e){return ke(new je({method:"GET",url:t,responseType:"json",headers:e}))}var je=function(t){function e(e){t.call(this);var n={async:!0,createXHR:function(){return this.crossDomain?(function(){if(te.a.XMLHttpRequest)return new te.a.XMLHttpRequest;if(te.a.XDomainRequest)return new te.a.XDomainRequest;throw new Error("CORS is not supported by your browser")}).call(this):function(){if(te.a.XMLHttpRequest)return new te.a.XMLHttpRequest;var t=void 0;try{for(var e=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],n=0;n<3;n++)try{if(new te.a.ActiveXObject(t=e[n]))break}catch(t){}return new te.a.ActiveXObject(t)}catch(t){throw new Error("XMLHttpRequest is not supported by your browser")}}()},crossDomain:!1,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"==typeof e)n.url=e;else for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);this.request=n}var n;return Object(M.__extends)(e,t),e.prototype._subscribe=function(t){return new Me(t,this.request)},e.create=((n=function(t){return new e(t)}).get=Ne,n.post=xe,n.delete=Ae,n.put=Pe,n.patch=Re,n.getJSON=De,n),e}(L.a),Me=function(t){function e(e,n){t.call(this,e),this.request=n,this.done=!1;var r=n.headers=n.headers||{};n.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),"Content-Type"in r||te.a.FormData&&n.body instanceof te.a.FormData||"undefined"==typeof n.body||(r["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),n.body=this.serializeBody(n.body,n.headers["Content-Type"]),this.send()}return Object(M.__extends)(e,t),e.prototype.next=function(t){this.done=!0;var e=this.destination,n=new Le(t,this.xhr,this.request);e.next(n)},e.prototype.send=function(){var t=this.request,e=this.request,n=e.user,r=e.method,i=e.url,o=e.async,s=e.password,a=e.headers,u=e.body,c=t.createXHR,l=Object(wt.a)(c).call(t);if(l===Et.a)this.error(Et.a.e);else{if(this.xhr=l,this.setupEvents(l,t),(n?Object(wt.a)(l.open).call(l,r,i,o,n,s):Object(wt.a)(l.open).call(l,r,i,o))===Et.a)return this.error(Et.a.e),null;if(o&&(l.timeout=t.timeout,l.responseType=t.responseType),"withCredentials"in l&&(l.withCredentials=!!t.withCredentials),this.setHeaders(l,a),(u?Object(wt.a)(l.send).call(l,u):Object(wt.a)(l.send).call(l))===Et.a)return this.error(Et.a.e),null}return l},e.prototype.serializeBody=function(t,e){if(!t||"string"==typeof t)return t;if(te.a.FormData&&t instanceof te.a.FormData)return t;if(e){var n=e.indexOf(";");-1!==n&&(e=e.substring(0,n))}switch(e){case"application/x-www-form-urlencoded":return Object.keys(t).map(function(e){return encodeURI(e)+"="+encodeURI(t[e])}).join("&");case"application/json":return JSON.stringify(t);default:return t}},e.prototype.setHeaders=function(t,e){for(var n in e)e.hasOwnProperty(n)&&t.setRequestHeader(n,e[n])},e.prototype.setupEvents=function(t,e){var n,r,i=e.progressSubscriber;function o(t){var e=o.subscriber,n=o.progressSubscriber,r=o.request;n&&n.error(t),e.error(new Ue(this,r))}function s(t){var e=s.subscriber,n=s.progressSubscriber,r=s.request;if(4===this.readyState){var i=1223===this.status?204:this.status;0===i&&(i=("text"===this.responseType?this.response||this.responseText:this.response)?200:0),200<=i&&i<300?(n&&n.complete(),e.next(t),e.complete()):(n&&n.error(t),e.error(new Fe("ajax error "+i,this,r)))}}t.ontimeout=o,o.request=e,o.subscriber=this,o.progressSubscriber=i,t.upload&&"withCredentials"in t&&(i&&(n=function(t){n.progressSubscriber.next(t)},te.a.XDomainRequest?t.onprogress=n:t.upload.onprogress=n,n.progressSubscriber=i),t.onerror=r=function(t){var e=r.progressSubscriber,n=r.subscriber,i=r.request;e&&e.error(t),n.error(new Fe("ajax error",this,i))},r.request=e,r.subscriber=this,r.progressSubscriber=i),t.onreadystatechange=s,s.subscriber=this,s.progressSubscriber=i,s.request=e},e.prototype.unsubscribe=function(){var e=this.xhr;!this.done&&e&&4!==e.readyState&&"function"==typeof e.abort&&e.abort(),t.prototype.unsubscribe.call(this)},e}(_e.a),Le=function(){return function(t,e,n){this.originalEvent=t,this.xhr=e,this.request=n,this.status=e.status,this.responseType=e.responseType||n.responseType,this.response=Ve(this.responseType,e)}}(),Fe=function(t){function e(e,n,r){t.call(this,e),this.message=e,this.xhr=n,this.request=r,this.status=n.status,this.responseType=n.responseType||r.responseType,this.response=Ve(this.responseType,n)}return Object(M.__extends)(e,t),e}(Error);function Ve(t,e){switch(t){case"json":return"response"in e?e.responseType?e.response:JSON.parse(e.response||e.responseText||"null"):JSON.parse(e.responseText||"null");case"xml":return e.responseXML;case"text":default:return"response"in e?e.response:e.responseText}}var Ue=function(t){function e(e,n){t.call(this,"ajax timeout",e,n)}return Object(M.__extends)(e,t),e}(Fe);L.a.ajax=je.create;var Be=function(t){function e(e,n){t.call(this,e,n),this.scheduler=e,this.work=n}return Object(M.__extends)(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(ee),We=new(function(t){function e(){t.apply(this,arguments)}return Object(M.__extends)(e,t),e}(ne))(Be),qe=n("YRqN"),He=n("Upor"),Ge=n("jaVc"),ze=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY),t.call(this),this.scheduler=r,this._events=[],this._bufferSize=e<1?1:e,this._windowTime=n<1?1:n}return Object(M.__extends)(e,t),e.prototype.next=function(e){var n=this._getNow();this._events.push(new Ke(n,e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._trimBufferThenGetEvents(),r=this.scheduler;if(this.closed)throw new He.a;this.hasError?e=Ct.a.EMPTY:this.isStopped?e=Ct.a.EMPTY:(this.observers.push(t),e=new Ge.a(this,t)),r&&t.add(t=new qe.a(t,r));for(var i=n.length,o=0;o<i&&!t.closed;o++)t.next(n[o].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||We).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(t-r[o].time<n);)o++;return i>e&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(bt.b),Ke=function(t,e){this.time=t,this.value=e};function Je(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=e.length,i=0;i<r;i++){var o=e[i];for(var s in o)o.hasOwnProperty(s)&&(t[s]=o[s])}return t}var Xe=function(t){return t.Object.assign||Je}(te.a);function Qe(t){return function(e){return e.lift(new Ye(t))}}L.a.webSocket=function(t){function e(e,n){if(e instanceof L.a)t.call(this,n,e);else{if(t.call(this),this.WebSocketCtor=te.a.WebSocket,this._output=new bt.b,"string"==typeof e?this.url=e:Xe(this,e),!this.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new ze}}return Object(M.__extends)(e,t),e.prototype.resultSelector=function(t){return JSON.parse(t.data)},e.create=function(t){return new e(t)},e.prototype.lift=function(t){var n=new e(this,this.destination);return n.operator=t,n},e.prototype._resetState=function(){this.socket=null,this.source||(this.destination=new ze),this._output=new bt.b},e.prototype.multiplex=function(t,e,n){var r=this;return new L.a(function(i){var o=Object(wt.a)(t)();o===Et.a?i.error(Et.a.e):r.next(o);var s=r.subscribe(function(t){var e=Object(wt.a)(n)(t);e===Et.a?i.error(Et.a.e):e&&i.next(t)},function(t){return i.error(t)},function(){return i.complete()});return function(){var t=Object(wt.a)(e)();t===Et.a?i.error(Et.a.e):r.next(t),s.unsubscribe()}})},e.prototype._connectSocket=function(){var t=this,e=this.WebSocketCtor,n=this._output,r=null;try{r=this.protocol?new e(this.url,this.protocol):new e(this.url),this.socket=r,this.binaryType&&(this.socket.binaryType=this.binaryType)}catch(t){return void n.error(t)}var i=new Ct.a(function(){t.socket=null,r&&1===r.readyState&&r.close()});r.onopen=function(e){var o=t.openObserver;o&&o.next(e);var s=t.destination;t.destination=_e.a.create(function(t){return 1===r.readyState&&r.send(t)},function(e){var i=t.closingObserver;i&&i.next(void 0),e&&e.code?r.close(e.code,e.reason):n.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }")),t._resetState()},function(){var e=t.closingObserver;e&&e.next(void 0),r.close(),t._resetState()}),s&&s instanceof ze&&i.add(s.subscribe(t.destination))},r.onerror=function(e){t._resetState(),n.error(e)},r.onclose=function(e){t._resetState();var r=t.closeObserver;r&&r.next(e),e.wasClean?n.complete():n.error(e)},r.onmessage=function(e){var r=Object(wt.a)(t.resultSelector)(e);r===Et.a?n.error(Et.a.e):n.next(r)}},e.prototype._subscribe=function(t){var e=this,n=this.source;if(n)return n.subscribe(t);this.socket||this._connectSocket();var r=new Ct.a;return r.add(this._output.subscribe(t)),r.add(function(){var t=e.socket;0===e._output.observers.length&&(t&&1===t.readyState&&t.close(),e._resetState())}),r},e.prototype.unsubscribe=function(){var e=this.source,n=this.socket;n&&1===n.readyState&&(n.close(),this._resetState()),t.prototype.unsubscribe.call(this),e||(this.destination=new ze)},e}(bt.a).create;var Ye=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Ze(t,this.closingNotifier))},t}(),Ze=function(t){function e(e,n){t.call(this,e),this.buffer=[],this.add(Object(Dt.a)(this,n))}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.buffer;this.buffer=[],this.destination.next(o)},e}(kt.a);function $e(t,e){return void 0===e&&(e=null),function(n){return n.lift(new tn(t,e))}}L.a.prototype.buffer=function(t){return Qe(t)(this)};var tn=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?nn:en}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),en=function(t){function e(e,n){t.call(this,e),this.bufferSize=n,this.buffer=[]}return Object(M.__extends)(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(_e.a),nn=function(t){function e(e,n,r){t.call(this,e),this.bufferSize=n,this.startBufferEvery=r,this.buffers=[],this.count=0}return Object(M.__extends)(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,r=this.buffers,i=this.count;this.count++,i%n==0&&r.push([]);for(var o=r.length;o--;){var s=r[o];s.push(t),s.length===e&&(r.splice(o,1),this.destination.next(s))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)},e}(_e.a);function rn(t){var e=arguments.length,n=re;Object(At.a)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(e){return e.lift(new on(t,r,i,n))}}L.a.prototype.bufferCount=function(t,e){return void 0===e&&(e=null),$e(t,e)(this)};var on=function(){function t(t,e,n,r){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new sn(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),sn=function(t){function e(e,n,r,i,o){t.call(this,e),this.bufferTimeSpan=n,this.bufferCreationInterval=r,this.maxBufferSize=i,this.scheduler=o,this.contexts=[];var s=this.openContext();if(this.timespanOnly=null==r||r<0,this.timespanOnly)this.add(s.closeAction=o.schedule(an,n,{subscriber:this,context:s,bufferTimeSpan:n}));else{var a={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:this,scheduler:o};this.add(s.closeAction=o.schedule(cn,n,{subscriber:this,context:s})),this.add(o.schedule(un,r,a))}}return Object(M.__extends)(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i<r;i++){var o=n[i],s=o.buffer;s.push(t),s.length==this.maxBufferSize&&(e=o)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var r=e.shift();n.next(r.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan;this.add(t.closeAction=this.scheduler.schedule(an,n,{subscriber:this,context:t,bufferTimeSpan:n}))}},e.prototype.openContext=function(){var t=new function(){this.buffer=[]};return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(_e.a);function an(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function un(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(cn,n,{subscriber:r,context:o})),this.schedule(t,e))}function cn(t){t.subscriber.closeContext(t.context)}function ln(t,e){return function(n){return n.lift(new hn(t,e))}}L.a.prototype.bufferTime=function(t){var e=arguments.length,n=re;Object(At.a)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),rn(t,r,i,n)(this)};var hn=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new pn(t,this.openings,this.closingSelector))},t}(),pn=function(t){function e(e,n,r){t.call(this,e),this.openings=n,this.closingSelector=r,this.contexts=[],this.add(Object(Dt.a)(this,n))}return Object(M.__extends)(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r<n;r++)e[r].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.subscription;this.destination.next(t.buffer),e.splice(e.indexOf(t),1),this.remove(n),n.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new Ct.a,r={buffer:[],subscription:n};e.push(r);var i=Object(Dt.a)(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))},e}(kt.a);function fn(t){return function(e){return e.lift(new dn(t))}}L.a.prototype.bufferToggle=function(t,e){return ln(t,e)(this)};var dn=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new vn(t,this.closingSelector))},t}(),vn=function(t){function e(e,n){t.call(this,e),this.closingSelector=n,this.subscribing=!1,this.openBuffer()}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=null,this.subscribing=!1},e.prototype.notifyNext=function(t,e,n,r,i){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe()),this.buffer&&this.destination.next(this.buffer),this.buffer=[];var e=Object(wt.a)(this.closingSelector)();e===Et.a?this.error(Et.a.e):(t=new Ct.a,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(Object(Dt.a)(this,e)),this.subscribing=!1)},e}(kt.a);L.a.prototype.bufferWhen=function(t){return fn(t)(this)};var yn=n("D62v");function gn(t){return function(e){return e.lift(new Lt(t))}}function _n(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){return e.lift.call(Wt.apply(void 0,[e].concat(t)))}}L.a.prototype.catch=yn.a,L.a.prototype._catch=yn.a,L.a.prototype.combineAll=function(t){return gn(t)(this)},L.a.prototype.combineLatest=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return Mt.apply(void 0,t)(this)},L.a.prototype.concat=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return _n.apply(void 0,t)(this)};var mn=n("ASsP");L.a.prototype.concatAll=mn.a;var bn=n("eL9U");L.a.prototype.concatMap=bn.a;var wn=n("8JPw");function En(t,e){return Object(wn.a)(function(){return t},e)}function Cn(t){return function(e){return e.lift(new Sn(t,e))}}L.a.prototype.concatMapTo=function(t,e){return En(t,e)(this)};var Sn=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Tn(t,this.predicate,this.source))},t}(),Tn=function(t){function e(e,n,r){t.call(this,e),this.predicate=n,this.source=r,this.count=0,this.index=0}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(_e.a);function On(){return function(t){return t.lift(new In)}}L.a.prototype.count=function(t){return Cn(t)(this)};var In=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Nn(t))},t}(),Nn=function(t){function e(e){t.call(this,e)}return Object(M.__extends)(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(_e.a);function xn(t){return function(e){return e.lift(new An(t))}}L.a.prototype.dematerialize=function(){return On()(this)};var An=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Pn(t,this.durationSelector))},t}(),Pn=function(t){function e(e,n){t.call(this,e),this.durationSelector=n,this.hasValue=!1,this.durationSubscription=null}return Object(M.__extends)(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=Object(Dt.a)(this,e)).closed||this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(t,e,n,r,i){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=null,n.unsubscribe(),this.remove(n)),this.value=null,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(kt.a);function Rn(t,e){return void 0===e&&(e=re),function(n){return n.lift(new kn(t,e))}}L.a.prototype.debounce=function(t){return xn(t)(this)};var kn=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Dn(t,this.dueTime,this.scheduler))},t}(),Dn=function(t){function e(e,n,r){t.call(this,e),this.dueTime=n,this.scheduler=r,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(jn,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){this.clearDebounce(),this.hasValue&&(this.destination.next(this.lastValue),this.lastValue=null,this.hasValue=!1)},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(_e.a);function jn(t){t.debouncedNext()}L.a.prototype.debounceTime=function(t,e){return void 0===e&&(e=re),Rn(t,e)(this)};var Mn=n("x4z8");L.a.prototype.defaultIfEmpty=function(t){return void 0===t&&(t=null),Object(Mn.a)(t)(this)};var Ln=n("PAZ8");function Fn(t,e){void 0===e&&(e=re);var n=ye(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new Vn(n,e))}}var Vn=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Un(t,this.delay,this.scheduler))},t}(),Un=function(t){function e(e,n,r){t.call(this,e),this.delay=n,this.scheduler=r,this.queue=[],this.active=!1,this.errored=!1}return Object(M.__extends)(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,i=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o)}else e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new Bn(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(Ln.a.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t)},e.prototype._complete=function(){this.scheduleNotification(Ln.a.createComplete())},e}(_e.a),Bn=function(t,e){this.time=t,this.notification=e};function Wn(t,e){return e?function(n){return new Gn(n,e).lift(new qn(t))}:function(e){return e.lift(new qn(t))}}L.a.prototype.delay=function(t,e){return void 0===e&&(e=re),Fn(t,e)(this)};var qn=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Hn(t,this.delayDurationSelector))},t}(),Hn=function(t){function e(e,n){t.call(this,e),this.delayDurationSelector=n,this.completed=!1,this.delayNotifierSubscriptions=[],this.values=[]}return Object(M.__extends)(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){try{var e=this.delayDurationSelector(t);e&&this.tryDelay(e,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t),n=null;return-1!==e&&(n=this.values[e],this.delayNotifierSubscriptions.splice(e,1),this.values.splice(e,1)),n},e.prototype.tryDelay=function(t,e){var n=Object(Dt.a)(this,t,e);n&&!n.closed&&(this.add(n),this.delayNotifierSubscriptions.push(n)),this.values.push(e)},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(kt.a),Gn=function(t){function e(e,n){t.call(this),this.source=e,this.subscriptionDelay=n}return Object(M.__extends)(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new zn(t,this.source))},e}(L.a),zn=function(t){function e(e,n){t.call(this),this.parent=e,this.source=n,this.sourceSubscribed=!1}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(_e.a);L.a.prototype.delayWhen=function(t,e){return Wn(t,e)(this)};var Kn=te.a.Set||function(){return function(){function t(){this._values=[]}return t.prototype.add=function(t){this.has(t)||this._values.push(t)},t.prototype.has=function(t){return-1!==this._values.indexOf(t)},Object.defineProperty(t.prototype,"size",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),t.prototype.clear=function(){this._values.length=0},t}()}();function Jn(t,e){return function(n){return n.lift(new Xn(t,e))}}var Xn=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new Qn(t,this.keySelector,this.flushes))},t}(),Qn=function(t){function e(e,n,r){t.call(this,e),this.keySelector=n,this.values=new Kn,r&&this.add(Object(Dt.a)(this,r))}return Object(M.__extends)(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values.clear()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(kt.a);function Yn(t,e){return function(n){return n.lift(new Zn(t,e))}}L.a.prototype.distinct=function(t,e){return Jn(t,e)(this)};var Zn=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new $n(t,this.compare,this.keySelector))},t}(),$n=function(t){function e(e,n,r){t.call(this,e),this.keySelector=r,this.hasKey=!1,"function"==typeof n&&(this.compare=n)}return Object(M.__extends)(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e=t;if(this.keySelector&&(e=Object(wt.a)(this.keySelector)(t))===Et.a)return this.destination.error(Et.a.e);var n=!1;if(this.hasKey){if((n=Object(wt.a)(this.compare)(this.key,e))===Et.a)return this.destination.error(Et.a.e)}else this.hasKey=!0;!1===Boolean(n)&&(this.key=e,this.destination.next(t))},e}(_e.a);function tr(t,e){return Yn(function(n,r){return e?e(n[t],r[t]):n[t]===r[t]})}function er(t,e,n){return function(r){return r.lift(new nr(t,e,n))}}L.a.prototype.distinctUntilChanged=function(t,e){return Yn(t,e)(this)},L.a.prototype.distinctUntilKeyChanged=function(t,e){return tr(t,e)(this)};var nr=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new rr(t,this.nextOrObserver,this.error,this.complete))},t}(),rr=function(t){function e(e,n,r,i){t.call(this,e);var o=new _e.a(n,r,i);o.syncErrorThrowable=!0,this.add(o),this.safeSubscriber=o}return Object(M.__extends)(e,t),e.prototype._next=function(t){var e=this.safeSubscriber;e.next(t),e.syncErrorThrown?this.destination.error(e.syncErrorValue):this.destination.next(t)},e.prototype._error=function(t){var e=this.safeSubscriber;e.error(t),this.destination.error(e.syncErrorThrown?e.syncErrorValue:t)},e.prototype._complete=function(){var t=this.safeSubscriber;t.complete(),t.syncErrorThrown?this.destination.error(t.syncErrorValue):this.destination.complete()},e}(_e.a);function ir(t,e,n){return er(t,e,n)(this)}function or(){return function(t){return t.lift(new sr)}}L.a.prototype.do=ir,L.a.prototype._do=ir;var sr=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ar(t))},t}(),ar=function(t){function e(e){t.call(this,e),this.hasCompleted=!1,this.hasSubscription=!1}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(Object(Dt.a)(this,t)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(kt.a);function ur(t,e){return function(n){return n.lift(new cr(t,e))}}L.a.prototype.exhaust=function(){return or()(this)};var cr=function(){function t(t,e){this.project=t,this.resultSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new lr(t,this.project,this.resultSelector))},t}(),lr=function(t){function e(e,n,r){t.call(this,e),this.project=n,this.resultSelector=r,this.hasSubscription=!1,this.hasCompleted=!1,this.index=0}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e=this.index++,n=this.destination;try{var r=this.project(t,e);this.hasSubscription=!0,this.add(Object(Dt.a)(this,r,t,e))}catch(t){n.error(t)}},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.destination;this.resultSelector?this.trySelectResult(t,e,n,r):o.next(e)},e.prototype.trySelectResult=function(t,e,n,r){var i=this.resultSelector,o=this.destination;try{var s=i(t,e,n,r);o.next(s)}catch(t){o.error(t)}},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.remove(t),this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(kt.a);function hr(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=void 0),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(r){return r.lift(new pr(t,e,n))}}L.a.prototype.exhaustMap=function(t,e){return ur(t,e)(this)};var pr=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new fr(t,this.project,this.concurrent,this.scheduler))},t}(),fr=function(t){function e(e,n,r,i){t.call(this,e),this.project=n,this.concurrent=r,this.scheduler=i,this.index=0,this.active=0,this.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(this.buffer=[])}return Object(M.__extends)(e,t),e.dispatch=function(t){t.subscriber.subscribeToProjection(t.result,t.value,t.index)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(t);var i=Object(wt.a)(this.project)(t,r);i===Et.a?n.error(Et.a.e):this.scheduler?this.add(this.scheduler.schedule(e.dispatch,0,{subscriber:this,result:i,value:t,index:r})):this.subscribeToProjection(i,t,r)}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.add(Object(Dt.a)(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){this._next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e&&e.length>0&&this._next(e.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(kt.a);L.a.prototype.expand=function(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=void 0),hr(t,e=(e||0)<1?Number.POSITIVE_INFINITY:e,n)(this)};var dr=n("2kvl");function vr(t,e){return function(n){return n.lift(new yr(t,e))}}var yr=function(){function t(t,e){if(this.index=t,this.defaultValue=e,t<0)throw new dr.a}return t.prototype.call=function(t,e){return e.subscribe(new gr(t,this.index,this.defaultValue))},t}(),gr=function(t){function e(e,n,r){t.call(this,e),this.index=n,this.defaultValue=r}return Object(M.__extends)(e,t),e.prototype._next=function(t){0==this.index--&&(this.destination.next(t),this.destination.complete())},e.prototype._complete=function(){var t=this.destination;this.index>=0&&("undefined"!=typeof this.defaultValue?t.next(this.defaultValue):t.error(new dr.a)),t.complete()},e}(_e.a);L.a.prototype.elementAt=function(t,e){return vr(t,e)(this)};var _r=n("6S6c");function mr(t){return function(e){return e.lift(new br(t))}}L.a.prototype.filter=_r.a;var br=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new wr(t,this.callback))},t}(),wr=function(t){function e(e,n){t.call(this,e),this.add(new Ct.a(n))}return Object(M.__extends)(e,t),e}(_e.a);function Er(t){return mr(t)(this)}function Cr(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new Sr(t,n,!1,e))}}L.a.prototype.finally=Er,L.a.prototype._finally=Er;var Sr=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r}return t.prototype.call=function(t,e){return e.subscribe(new Tr(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),Tr=function(t){function e(e,n,r,i,o){t.call(this,e),this.predicate=n,this.source=r,this.yieldIndex=i,this.thisArg=o,this.index=0}return Object(M.__extends)(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(_e.a);function Or(t,e){return function(n){return n.lift(new Sr(t,n,!0,e))}}L.a.prototype.find=function(t,e){return Cr(t,e)(this)},L.a.prototype.findIndex=function(t,e){return Or(t,e)(this)};var Ir=n("l+DM");L.a.prototype.first=Ir.a;var Nr=function(){function t(){this.size=0,this._values=[],this._keys=[]}return t.prototype.get=function(t){var e=this._keys.indexOf(t);return-1===e?void 0:this._values[e]},t.prototype.set=function(t,e){var n=this._keys.indexOf(t);return-1===n?(this._keys.push(t),this._values.push(e),this.size++):this._values[n]=e,this},t.prototype.delete=function(t){var e=this._keys.indexOf(t);return-1!==e&&(this._values.splice(e,1),this._keys.splice(e,1),this.size--,!0)},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this.size=0},t.prototype.forEach=function(t,e){for(var n=0;n<this.size;n++)t.call(e,this._values[n],this._keys[n])},t}(),xr=te.a.Map||function(){return Nr}(),Ar=function(){function t(){this.values={}}return t.prototype.delete=function(t){return this.values[t]=null,!0},t.prototype.set=function(t,e){return this.values[t]=e,this},t.prototype.get=function(t){return this.values[t]},t.prototype.forEach=function(t,e){var n=this.values;for(var r in n)n.hasOwnProperty(r)&&null!==n[r]&&t.call(e,n[r],r)},t.prototype.clear=function(){this.values={}},t}();function Pr(t,e,n,r){return function(i){return i.lift(new Rr(t,e,n,r))}}var Rr=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r}return t.prototype.call=function(t,e){return e.subscribe(new kr(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),kr=function(t){function e(e,n,r,i,o){t.call(this,e),this.keySelector=n,this.elementSelector=r,this.durationSelector=i,this.subjectSelector=o,this.groups=null,this.attemptedToUnsubscribe=!1,this.count=0}return Object(M.__extends)(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups="string"==typeof e?new Ar:new xr);var r,i=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new bt.b,n.set(e,i);var o=new jr(e,i,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new jr(e,i))}catch(t){return void this.error(t)}this.add(s.subscribe(new Dr(e,i,this)))}}i.closed||i.next(r)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach(function(e,n){e.error(t)}),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach(function(t,e){t.complete()}),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(_e.a),Dr=function(t){function e(e,n,r){t.call(this,n),this.key=e,this.group=n,this.parent=r}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(_e.a),jr=function(t){function e(e,n,r){t.call(this),this.key=e,this.groupSubject=n,this.refCountSubscription=r}return Object(M.__extends)(e,t),e.prototype._subscribe=function(t){var e=new Ct.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new Mr(n)),e.add(r.subscribe(t)),e},e}(L.a),Mr=function(t){function e(e){t.call(this),this.parent=e,e.count++}return Object(M.__extends)(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(Ct.a);function Lr(){return function(t){return t.lift(new Fr)}}L.a.prototype.groupBy=function(t,e,n,r){return Pr(t,e,n,r)(this)};var Fr=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Vr(t))},t}(),Vr=function(t){function e(){t.apply(this,arguments)}return Object(M.__extends)(e,t),e.prototype._next=function(t){Object(ue.a)()},e}(_e.a);function Ur(){return function(t){return t.lift(new Br)}}L.a.prototype.ignoreElements=function(){return Lr()(this)};var Br=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Wr(t))},t}(),Wr=function(t){function e(e){t.call(this,e)}return Object(M.__extends)(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(_e.a);function qr(t){return function(e){return e.lift(new Hr(t))}}L.a.prototype.isEmpty=function(){return Ur()(this)};var Hr=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Gr(t,this.durationSelector))},t}(),Gr=function(t){function e(e,n){t.call(this,e),this.durationSelector=n,this.hasValue=!1}return Object(M.__extends)(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=Object(wt.a)(this.durationSelector)(t);if(e===Et.a)this.destination.error(Et.a.e);else{var n=Object(Dt.a)(this,e);n.closed?this.clearThrottle():this.add(this.throttled=n)}}},e.prototype.clearThrottle=function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=null,n.unsubscribe()),e&&(this.value=null,this.hasValue=!1,this.destination.next(t))},e.prototype.notifyNext=function(t,e,n,r){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(kt.a);function zr(t,e){return void 0===e&&(e=re),qr(function(){return ge(t,e)})}L.a.prototype.audit=function(t){return qr(t)(this)},L.a.prototype.auditTime=function(t,e){return void 0===e&&(e=re),zr(t,e)(this)};var Kr=n("uRSF");function Jr(t){return t(this)}L.a.prototype.last=Kr.a,L.a.prototype.let=Jr,L.a.prototype.letBind=Jr;var Xr=n("f37V");L.a.prototype.every=Xr.a;var Qr=n("dmC+");function Yr(t){return function(e){return e.lift(new Zr(t))}}L.a.prototype.map=Qr.a;var Zr=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new $r(t,this.value))},t}(),$r=function(t){function e(e,n){t.call(this,e),this.value=n}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(_e.a);function ti(){return function(t){return t.lift(new ei)}}L.a.prototype.mapTo=function(t){return Yr(t)(this)};var ei=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ni(t))},t}(),ni=function(t){function e(e){t.call(this,e)}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.destination.next(Ln.a.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(Ln.a.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(Ln.a.createComplete()),t.complete()},e}(_e.a);L.a.prototype.materialize=function(){return ti()(this)};var ri=n("tK9/");function ii(t){var e="function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e};return Object(ri.a)(e)}function oi(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){return e.lift.call(ie.a.apply(void 0,[e].concat(t)))}}L.a.prototype.max=function(t){return ii(t)(this)},L.a.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return oi.apply(void 0,t)(this)};var si=n("yWZg");L.a.prototype.mergeAll=si.a;var ai=n("TS1d");function ui(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"number"==typeof e&&(n=e,e=null),function(r){return r.lift(new ci(t,e,n))}}L.a.prototype.mergeMap=ai.a,L.a.prototype.flatMap=ai.a;var ci=function(){function t(t,e,n){void 0===n&&(n=Number.POSITIVE_INFINITY),this.ish=t,this.resultSelector=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new li(t,this.ish,this.resultSelector,this.concurrent))},t}(),li=function(t){function e(e,n,r,i){void 0===i&&(i=Number.POSITIVE_INFINITY),t.call(this,e),this.ish=n,this.resultSelector=r,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return Object(M.__extends)(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.resultSelector,n=this.index++,r=this.ish,i=this.destination;this.active++,this._innerSub(r,i,e,t,n)}else this.buffer.push(t)},e.prototype._innerSub=function(t,e,n,r,i){this.add(Object(Dt.a)(this,t,r,i))},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.destination;this.resultSelector?this.trySelectResult(t,e,n,r):o.next(e)},e.prototype.trySelectResult=function(t,e,n,r){var i,o=this.resultSelector,s=this.destination;try{i=o(t,e,n,r)}catch(t){return void s.error(t)}s.next(i)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(kt.a);function hi(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),ui(t,e,n)(this)}function pi(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new fi(t,e,n))}}L.a.prototype.flatMapTo=hi,L.a.prototype.mergeMapTo=hi;var fi=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new di(t,this.accumulator,this.seed,this.concurrent))},t}(),di=function(t){function e(e,n,r,i){t.call(this,e),this.accumulator=n,this.acc=r,this.concurrent=i,this.hasValue=!1,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return Object(M.__extends)(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=Object(wt.a)(this.accumulator)(this.acc,t);n===Et.a?this.destination.error(Et.a.e):(this.active++,this._innerSub(n,t,e))}else this.buffer.push(t)},e.prototype._innerSub=function(t,e,n){this.add(Object(Dt.a)(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.destination;this.acc=e,this.hasValue=!0,o.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(kt.a);function vi(t){var e="function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e};return Object(ri.a)(e)}L.a.prototype.mergeScan=function(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),pi(t,e,n)(this)},L.a.prototype.min=function(t){return vi(t)(this)};var yi=n("LHF8");function gi(){return function(t){return t.lift(new _i)}}L.a.prototype.multicast=function(t,e){return Object(yi.a)(t,e)(this)},L.a.prototype.observeOn=function(t,e){return void 0===e&&(e=0),Object(qe.b)(t,e)(this)},L.a.prototype.onErrorResumeNext=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return le.apply(void 0,t)(this)};var _i=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new mi(t))},t}(),mi=function(t){function e(e){t.call(this,e),this.hasPrev=!1}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.hasPrev?this.destination.next([this.prev,t]):this.hasPrev=!0,this.prev=t},e}(_e.a);L.a.prototype.pairwise=function(){return gi()(this)};var bi=n("LaOa");function wi(t,e){return function(n){return[Object(bi.a)(t,e)(n),Object(bi.a)(function(e,n){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=t,r.thisArg=n,r}(0,e))(n)]}}function Ei(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Object(Ie.a)(function(t,e){return function(n){for(var r=n,i=0;i<e;i++){var o=r[t[i]];if("undefined"==typeof o)return;r=o}return r}}(t,n))(e)}}function Ci(t){return t?Object(yi.a)(function(){return new bt.b},t):Object(yi.a)(new bt.b)}L.a.prototype.partition=function(t,e){return wi(t,e)(this)},L.a.prototype.pluck=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return Ei.apply(void 0,t)(this)},L.a.prototype.publish=function(t){return Ci(t)(this)};var Si=n("eoFs");function Ti(t){return function(e){return Object(yi.a)(new Si.a(t))(e)}}function Oi(t,e,n,r){n&&"function"!=typeof n&&(r=n);var i="function"==typeof n?n:void 0,o=new ze(t,e,r);return function(t){return Object(yi.a)(function(){return o},i)(t)}}function Ii(){return function(t){return Object(yi.a)(new St)(t)}}function Ni(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){return 1===t.length&&Object(Pt.a)(t[0])&&(t=t[0]),e.lift.call(oe.apply(void 0,[e].concat(t)))}}L.a.prototype.publishBehavior=function(t){return Ti(t)(this)},L.a.prototype.publishReplay=function(t,e,n,r){return Oi(t,e,n,r)(this)},L.a.prototype.publishLast=function(){return Ii()(this)},L.a.prototype.race=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return Ni.apply(void 0,t)(this)};var xi=n("24Q+");function Ai(t){return void 0===t&&(t=-1),function(e){return 0===t?new Gt.a:e.lift(new Pi(t<0?-1:t-1,e))}}L.a.prototype.reduce=xi.a;var Pi=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Ri(t,this.count,this.source))},t}(),Ri=function(t){function e(e,n,r){t.call(this,e),this.count=n,this.source=r}return Object(M.__extends)(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(_e.a);function ki(t){return function(e){return e.lift(new Di(t))}}L.a.prototype.repeat=function(t){return void 0===t&&(t=-1),Ai(t)(this)};var Di=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new ji(t,this.notifier,e))},t}(),ji=function(t){function e(e,n,r){t.call(this,e),this.notifier=n,this.source=r,this.sourceIsBeingSubscribedTo=!0}return Object(M.__extends)(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(e){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries){if(this.retriesSubscription.closed)return t.prototype.complete.call(this)}else this.subscribeToRetries();this._unsubscribeAndRecycle(),this.notifications.next()}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype._unsubscribeAndRecycle=function(){var e=this.notifications,n=this.retries,r=this.retriesSubscription;return this.notifications=null,this.retries=null,this.retriesSubscription=null,t.prototype._unsubscribeAndRecycle.call(this),this.notifications=e,this.retries=n,this.retriesSubscription=r,this},e.prototype.subscribeToRetries=function(){this.notifications=new bt.b;var e=Object(wt.a)(this.notifier)(this.notifications);if(e===Et.a)return t.prototype.complete.call(this);this.retries=e,this.retriesSubscription=Object(Dt.a)(this,e)},e}(kt.a);function Mi(t){return void 0===t&&(t=-1),function(e){return e.lift(new Li(t,e))}}L.a.prototype.repeatWhen=function(t){return ki(t)(this)};var Li=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Fi(t,this.count,this.source))},t}(),Fi=function(t){function e(e,n,r){t.call(this,e),this.count=n,this.source=r}return Object(M.__extends)(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(_e.a);function Vi(t){return function(e){return e.lift(new Ui(t,e))}}L.a.prototype.retry=function(t){return void 0===t&&(t=-1),Mi(t)(this)};var Ui=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Bi(t,this.notifier,this.source))},t}(),Bi=function(t){function e(e,n,r){t.call(this,e),this.notifier=n,this.source=r}return Object(M.__extends)(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,i=this.retriesSubscription;if(r)this.errors=null,this.retriesSubscription=null;else{if(n=new bt.b,(r=Object(wt.a)(this.notifier)(n))===Et.a)return t.prototype.error.call(this,Et.a.e);i=Object(Dt.a)(this,r)}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=i,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=null),e&&(e.unsubscribe(),this.retriesSubscription=null),this.retries=null},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.errors,s=this.retries,a=this.retriesSubscription;this.errors=null,this.retries=null,this.retriesSubscription=null,this._unsubscribeAndRecycle(),this.errors=o,this.retries=s,this.retriesSubscription=a,this.source.subscribe(this)},e}(kt.a);function Wi(t){return function(e){return e.lift(new qi(t))}}L.a.prototype.retryWhen=function(t){return Vi(t)(this)};var qi=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Hi(t),r=e.subscribe(n);return r.add(Object(Dt.a)(n,this.notifier)),r},t}(),Hi=function(t){function e(){t.apply(this,arguments),this.hasValue=!1}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(t,e,n,r,i){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(kt.a);function Gi(t,e){return void 0===e&&(e=re),function(n){return n.lift(new zi(t,e))}}L.a.prototype.sample=function(t){return Wi(t)(this)};var zi=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Ki(t,this.period,this.scheduler))},t}(),Ki=function(t){function e(e,n,r){t.call(this,e),this.period=n,this.scheduler=r,this.hasValue=!1,this.add(r.schedule(Ji,n,{subscriber:this,period:n}))}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(_e.a);function Ji(t){var e=t.period;t.subscriber.notifyNext(),this.schedule(t,e)}L.a.prototype.sampleTime=function(t,e){return void 0===e&&(e=re),Gi(t,e)(this)};var Xi=n("nAqi");function Qi(t,e){return function(n){return n.lift(new Yi(t,e))}}L.a.prototype.scan=function(t,e){return arguments.length>=2?Object(Xi.a)(t,e)(this):Object(Xi.a)(t)(this)};var Yi=function(){function t(t,e){this.compareTo=t,this.comparor=e}return t.prototype.call=function(t,e){return e.subscribe(new Zi(t,this.compareTo,this.comparor))},t}(),Zi=function(t){function e(e,n,r){t.call(this,e),this.compareTo=n,this.comparor=r,this._a=[],this._b=[],this._oneComplete=!1,this.add(n.subscribe(new $i(e,this)))}return Object(M.__extends)(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e.prototype.checkValues=function(){for(var t=this._a,e=this._b,n=this.comparor;t.length>0&&e.length>0;){var r=t.shift(),i=e.shift(),o=!1;n?(o=Object(wt.a)(n)(r,i))===Et.a&&this.destination.error(Et.a.e):o=r===i,o||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e}(_e.a),$i=function(t){function e(e,n){t.call(this,e),this.parent=n}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t)},e.prototype._complete=function(){this.parent._complete()},e}(_e.a);L.a.prototype.sequenceEqual=function(t,e){return Qi(t,e)(this)};var to=n("URbD");function eo(t,e,n){return function(r){return r.lift(function(t,e,n){var r,i,o=0,s=!1,a=!1;return function(u){o++,r&&!s||(s=!1,r=new ze(t,e,n),i=u.subscribe({next:function(t){r.next(t)},error:function(t){s=!0,r.error(t)},complete:function(){a=!0,r.complete()}}));var c=r.subscribe(this);return function(){o--,c.unsubscribe(),i&&0===o&&a&&i.unsubscribe()}}}(t,e,n))}}L.a.prototype.share=to.a,L.a.prototype.shareReplay=function(t,e,n){return eo(t,e,n)(this)};var no=n("Ry8D");function ro(t){return function(e){return e.lift(new io(t,e))}}var io=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new oo(t,this.predicate,this.source))},t}(),oo=function(t){function e(e,n,r){t.call(this,e),this.predicate=n,this.source=r,this.seenValue=!1,this.index=0}return Object(M.__extends)(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new no.a)},e}(_e.a);function so(t){return function(e){return e.lift(new ao(t))}}L.a.prototype.single=function(t){return ro(t)(this)};var ao=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new uo(t,this.total))},t}(),uo=function(t){function e(e,n){t.call(this,e),this.total=n,this.count=0}return Object(M.__extends)(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(_e.a);function co(t){return function(e){return e.lift(new lo(t))}}L.a.prototype.skip=function(t){return so(t)(this)};var lo=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new dr.a}return t.prototype.call=function(t,e){return e.subscribe(0===this._skipCount?new _e.a(t):new ho(t,this._skipCount))},t}(),ho=function(t){function e(e,n){t.call(this,e),this._skipCount=n,this._count=0,this._ring=new Array(n)}return Object(M.__extends)(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var r=n%e,i=this._ring,o=i[r];i[r]=t,this.destination.next(o)}},e}(_e.a);function po(t){return function(e){return e.lift(new fo(t))}}L.a.prototype.skipLast=function(t){return co(t)(this)};var fo=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new vo(t,this.notifier))},t}(),vo=function(t){function e(e,n){t.call(this,e),this.hasValue=!1,this.isInnerStopped=!1,this.add(Object(Dt.a)(this,n))}return Object(M.__extends)(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype._complete=function(){this.isInnerStopped?t.prototype._complete.call(this):this.unsubscribe()},e.prototype.notifyNext=function(t,e,n,r,i){this.hasValue=!0},e.prototype.notifyComplete=function(){this.isInnerStopped=!0,this.isStopped&&t.prototype._complete.call(this)},e}(kt.a);function yo(t){return function(e){return e.lift(new go(t))}}L.a.prototype.skipUntil=function(t){return po(t)(this)};var go=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new _o(t,this.predicate))},t}(),_o=function(t){function e(e,n){t.call(this,e),this.predicate=n,this.skipping=!0,this.index=0}return Object(M.__extends)(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}},e}(_e.a);L.a.prototype.skipWhile=function(t){return yo(t)(this)};var mo=n("8Ut3");function bo(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){var n=t[t.length-1];Object(At.a)(n)?t.pop():n=null;var r=t.length;return Wt(1===r?new mo.a(t[0],n):r>1?new Rt.a(t,n):new Gt.a(n),e)}}L.a.prototype.startWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return bo.apply(void 0,t)(this)};var wo=new(function(){function t(t){if(this.root=t,t.setImmediate&&"function"==typeof t.setImmediate)this.setImmediate=t.setImmediate.bind(t),this.clearImmediate=t.clearImmediate.bind(t);else{this.nextHandle=1,this.tasksByHandle={},this.currentlyRunningATask=!1,this.setImmediate=this.canUseProcessNextTick()?this.createProcessNextTickSetImmediate():this.canUsePostMessage()?this.createPostMessageSetImmediate():this.canUseMessageChannel()?this.createMessageChannelSetImmediate():this.canUseReadyStateChange()?this.createReadyStateChangeSetImmediate():this.createSetTimeoutSetImmediate();var e=function t(e){delete t.instance.tasksByHandle[e]};e.instance=this,this.clearImmediate=e}}return t.prototype.identify=function(t){return this.root.Object.prototype.toString.call(t)},t.prototype.canUseProcessNextTick=function(){return"[object process]"===this.identify(this.root.process)},t.prototype.canUseMessageChannel=function(){return Boolean(this.root.MessageChannel)},t.prototype.canUseReadyStateChange=function(){var t=this.root.document;return Boolean(t&&"onreadystatechange"in t.createElement("script"))},t.prototype.canUsePostMessage=function(){var t=this.root;if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}return!1},t.prototype.partiallyApplied=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=function t(){var e=t.handler;"function"==typeof e?e.apply(void 0,t.args):new Function(""+e)()};return r.handler=t,r.args=e,r},t.prototype.addFromSetImmediateArguments=function(t){return this.tasksByHandle[this.nextHandle]=this.partiallyApplied.apply(void 0,t),this.nextHandle++},t.prototype.createProcessNextTickSetImmediate=function(){var t=function t(){var e=t.instance,n=e.addFromSetImmediateArguments(arguments);return e.root.process.nextTick(e.partiallyApplied(e.runIfPresent,n)),n};return t.instance=this,t},t.prototype.createPostMessageSetImmediate=function(){var t=this.root,e="setImmediate$"+t.Math.random()+"$",n=function n(r){var i=n.instance;r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&i.runIfPresent(+r.data.slice(e.length))};n.instance=this,t.addEventListener("message",n,!1);var r=function t(){var e=t.messagePrefix,n=t.instance,r=n.addFromSetImmediateArguments(arguments);return n.root.postMessage(e+r,"*"),r};return r.instance=this,r.messagePrefix=e,r},t.prototype.runIfPresent=function(t){if(this.currentlyRunningATask)this.root.setTimeout(this.partiallyApplied(this.runIfPresent,t),0);else{var e=this.tasksByHandle[t];if(e){this.currentlyRunningATask=!0;try{e()}finally{this.clearImmediate(t),this.currentlyRunningATask=!1}}}},t.prototype.createMessageChannelSetImmediate=function(){var t=this,e=new this.root.MessageChannel;e.port1.onmessage=function(e){t.runIfPresent(e.data)};var n=function t(){var e=t.channel,n=t.instance.addFromSetImmediateArguments(arguments);return e.port2.postMessage(n),n};return n.channel=e,n.instance=this,n},t.prototype.createReadyStateChangeSetImmediate=function(){var t=function t(){var e=t.instance,n=e.root.document,r=n.documentElement,i=e.addFromSetImmediateArguments(arguments),o=n.createElement("script");return o.onreadystatechange=function(){e.runIfPresent(i),o.onreadystatechange=null,r.removeChild(o),o=null},r.appendChild(o),i};return t.instance=this,t},t.prototype.createSetTimeoutSetImmediate=function(){var t=function t(){var e=t.instance,n=e.addFromSetImmediateArguments(arguments);return e.root.setTimeout(e.partiallyApplied(e.runIfPresent,n),0),n};return t.instance=this,t},t}())(te.a),Eo=function(t){function e(e,n){t.call(this,e,n),this.scheduler=e,this.work=n}return Object(M.__extends)(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=wo.setImmediate(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(wo.clearImmediate(n),e.scheduled=void 0)},e}(ee),Co=new(function(t){function e(){t.apply(this,arguments)}return Object(M.__extends)(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(ne))(Eo),So=function(t){function e(e,n,r){void 0===n&&(n=0),void 0===r&&(r=Co),t.call(this),this.source=e,this.delayTime=n,this.scheduler=r,(!$t(n)||n<0)&&(this.delayTime=0),r&&"function"==typeof r.schedule||(this.scheduler=Co)}return Object(M.__extends)(e,t),e.create=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=Co),new e(t,n,r)},e.dispatch=function(t){return this.add(t.source.subscribe(t.subscriber))},e.prototype._subscribe=function(t){return this.scheduler.schedule(e.dispatch,this.delayTime,{source:this.source,subscriber:t})},e}(L.a),To=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new So(e,this.delay,this.scheduler).subscribe(t)},t}();function Oo(t,e){return function(n){return n.lift(new Io(t,e))}}L.a.prototype.subscribeOn=function(t,e){return void 0===e&&(e=0),function(t,e){return void 0===e&&(e=0),function(n){return n.lift(new To(t,e))}}(t,e)(this)};var Io=function(){function t(t,e){this.project=t,this.resultSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new No(t,this.project,this.resultSelector))},t}(),No=function(t){function e(e,n,r){t.call(this,e),this.project=n,this.resultSelector=r,this.index=0}return Object(M.__extends)(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=this.innerSubscription;r&&r.unsubscribe(),this.add(this.innerSubscription=Object(Dt.a)(this,t,e,n))},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){this.resultSelector?this._tryNotifyNext(t,e,n,r):this.destination.next(e)},e.prototype._tryNotifyNext=function(t,e,n,r){var i;try{i=this.resultSelector(t,e,n,r)}catch(t){return void this.destination.error(t)}this.destination.next(i)},e}(kt.a),xo=n("ltvI");function Ao(){return Oo(xo.a)}function Po(){return Ao()(this)}function Ro(t,e){return function(n){return n.lift(new ko(t,e))}}L.a.prototype.switch=Po,L.a.prototype._switch=Po,L.a.prototype.switchMap=function(t,e){return Oo(t,e)(this)};var ko=function(){function t(t,e){this.observable=t,this.resultSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Do(t,this.observable,this.resultSelector))},t}(),Do=function(t){function e(e,n,r){t.call(this,e),this.inner=n,this.resultSelector=r,this.index=0}return Object(M.__extends)(e,t),e.prototype._next=function(t){var e=this.innerSubscription;e&&e.unsubscribe(),this.add(this.innerSubscription=Object(Dt.a)(this,this.inner,t,this.index++))},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.destination;this.resultSelector?this.tryResultSelector(t,e,n,r):o.next(e)},e.prototype.tryResultSelector=function(t,e,n,r){var i,o=this.resultSelector,s=this.destination;try{i=o(t,e,n,r)}catch(t){return void s.error(t)}s.next(i)},e}(kt.a);function jo(t){return function(e){return 0===t?new Gt.a:e.lift(new Mo(t))}}L.a.prototype.switchMapTo=function(t,e){return Ro(t,e)(this)};var Mo=function(){function t(t){if(this.total=t,this.total<0)throw new dr.a}return t.prototype.call=function(t,e){return e.subscribe(new Lo(t,this.total))},t}(),Lo=function(t){function e(e,n){t.call(this,e),this.total=n,this.count=0}return Object(M.__extends)(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(_e.a);L.a.prototype.take=function(t){return jo(t)(this)};var Fo=n("fxt9");function Vo(t){return function(e){return e.lift(new Uo(t))}}L.a.prototype.takeLast=function(t){return Object(Fo.a)(t)(this)};var Uo=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Bo(t,this.notifier))},t}(),Bo=function(t){function e(e,n){t.call(this,e),this.notifier=n,this.add(Object(Dt.a)(this,n))}return Object(M.__extends)(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.complete()},e.prototype.notifyComplete=function(){},e}(kt.a);function Wo(t){return function(e){return e.lift(new qo(t))}}L.a.prototype.takeUntil=function(t){return Vo(t)(this)};var qo=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new Ho(t,this.predicate))},t}(),Ho=function(t){function e(e,n){t.call(this,e),this.predicate=n,this.index=0}return Object(M.__extends)(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):n.complete()},e}(_e.a);L.a.prototype.takeWhile=function(t){return Wo(t)(this)};var Go={leading:!0,trailing:!1};function zo(t,e){return void 0===e&&(e=Go),function(n){return n.lift(new Ko(t,e.leading,e.trailing))}}var Ko=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new Jo(t,this.durationSelector,this.leading,this.trailing))},t}(),Jo=function(t){function e(e,n,r,i){t.call(this,e),this.destination=e,this.durationSelector=n,this._leading=r,this._trailing=i,this._hasTrailingValue=!1}return Object(M.__extends)(e,t),e.prototype._next=function(t){if(this.throttled)this._trailing&&(this._hasTrailingValue=!0,this._trailingValue=t);else{var e=this.tryDurationSelector(t);e&&this.add(this.throttled=Object(Dt.a)(this,e)),this._leading&&(this.destination.next(t),this._trailing&&(this._hasTrailingValue=!0,this._trailingValue=t))}},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype._unsubscribe=function(){var t=this.throttled;this._trailingValue=null,this._hasTrailingValue=!1,t&&(this.remove(t),this.throttled=null,t.unsubscribe())},e.prototype._sendTrailing=function(){var t=this;t.throttled&&t._trailing&&t._hasTrailingValue&&(t.destination.next(t._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1)},e.prototype.notifyNext=function(t,e,n,r,i){this._sendTrailing(),this._unsubscribe()},e.prototype.notifyComplete=function(){this._sendTrailing(),this._unsubscribe()},e}(kt.a);function Xo(t,e,n){return void 0===e&&(e=re),void 0===n&&(n=Go),function(r){return r.lift(new Qo(t,e,n.leading,n.trailing))}}L.a.prototype.throttle=function(t,e){return void 0===e&&(e=Go),zo(t,e)(this)};var Qo=function(){function t(t,e,n,r){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new Yo(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),Yo=function(t){function e(e,n,r,i,o){t.call(this,e),this.duration=n,this.scheduler=r,this.leading=i,this.trailing=o,this._hasTrailingValue=!1,this._trailingValue=null}return Object(M.__extends)(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Zo,this.duration,{subscriber:this})),this.leading&&this.destination.next(t))},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(_e.a);function Zo(t){t.subscriber.clearThrottle()}function $o(t){return void 0===t&&(t=re),function(e){return e.lift(new ts(t))}}L.a.prototype.throttleTime=function(t,e,n){return void 0===e&&(e=re),void 0===n&&(n=Go),Xo(t,e,n)(this)};var ts=function(){function t(t){this.scheduler=t}return t.prototype.call=function(t,e){return e.subscribe(new es(t,this.scheduler))},t}(),es=function(t){function e(e,n){t.call(this,e),this.scheduler=n,this.lastTime=0,this.lastTime=n.now()}return Object(M.__extends)(e,t),e.prototype._next=function(t){var e=this.scheduler.now(),n=e-this.lastTime;this.lastTime=e,this.destination.next(new function(t,e){this.value=t,this.interval=e}(t,n))},e}(_e.a);L.a.prototype.timeInterval=function(t){return void 0===t&&(t=re),$o(t)(this)};var ns=function(t){function e(){var e=t.call(this,"Timeout has occurred");this.name=e.name="TimeoutError",this.stack=e.stack,this.message=e.message}return Object(M.__extends)(e,t),e}(Error);function rs(t,e){void 0===e&&(e=re);var n=ye(t),r=n?+t-e.now():Math.abs(t);return function(t){return t.lift(new is(r,n,e,new ns))}}var is=function(){function t(t,e,n,r){this.waitFor=t,this.absoluteTimeout=e,this.scheduler=n,this.errorInstance=r}return t.prototype.call=function(t,e){return e.subscribe(new os(t,this.absoluteTimeout,this.waitFor,this.scheduler,this.errorInstance))},t}(),os=function(t){function e(e,n,r,i,o){t.call(this,e),this.absoluteTimeout=n,this.waitFor=r,this.scheduler=i,this.errorInstance=o,this.action=null,this.scheduleTimeout()}return Object(M.__extends)(e,t),e.dispatchTimeout=function(t){t.error(t.errorInstance)},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.errorInstance=null},e}(_e.a);function ss(t,e,n){return void 0===n&&(n=re),function(r){var i=ye(t),o=i?+t-n.now():Math.abs(t);return r.lift(new as(o,i,e,n))}}L.a.prototype.timeout=function(t,e){return void 0===e&&(e=re),rs(t,e)(this)};var as=function(){function t(t,e,n,r){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new us(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),us=function(t){function e(e,n,r,i,o){t.call(this,e),this.absoluteTimeout=n,this.waitFor=r,this.withObservable=i,this.scheduler=o,this.action=null,this.scheduleTimeout()}return Object(M.__extends)(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(Object(Dt.a)(t,e))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=null,this.scheduler=null,this.withObservable=null},e}(kt.a);function cs(t){return void 0===t&&(t=re),Object(Ie.a)(function(e){return new ls(e,t.now())})}L.a.prototype.timeoutWith=function(t,e,n){return void 0===n&&(n=re),ss(t,e,n)(this)};var ls=function(t,e){this.value=t,this.timestamp=e};function hs(t,e,n){return t.push(e),t}function ps(){return Object(ri.a)(hs,[])}function fs(t){return function(e){return e.lift(new ds(t))}}L.a.prototype.timestamp=function(t){return void 0===t&&(t=re),cs(t)(this)},L.a.prototype.toArray=function(){return ps()(this)},n("XD1n");var ds=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new vs(t),r=e.subscribe(n);return r.closed||n.add(Object(Dt.a)(n,this.windowBoundaries)),r},t}(),vs=function(t){function e(e){t.call(this,e),this.window=new bt.b,e.next(this.window)}return Object(M.__extends)(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new bt.b;e.next(n)},e}(kt.a);function ys(t,e){return void 0===e&&(e=0),function(n){return n.lift(new gs(t,e))}}L.a.prototype.window=function(t){return fs(t)(this)};var gs=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new _s(t,this.windowSize,this.startWindowEvery))},t}(),_s=function(t){function e(e,n,r){t.call(this,e),this.destination=e,this.windowSize=n,this.startWindowEvery=r,this.windows=[new bt.b],this.count=0,e.next(this.windows[0])}return Object(M.__extends)(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,o=i.length,s=0;s<o&&!this.closed;s++)i[s].next(t);var a=this.count-r+1;if(a>=0&&a%e==0&&!this.closed&&i.shift().complete(),++this.count%e==0&&!this.closed){var u=new bt.b;i.push(u),n.next(u)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(_e.a);function ms(t){var e=re,n=null,r=Number.POSITIVE_INFINITY;return Object(At.a)(arguments[3])&&(e=arguments[3]),Object(At.a)(arguments[2])?e=arguments[2]:$t(arguments[2])&&(r=arguments[2]),Object(At.a)(arguments[1])?e=arguments[1]:$t(arguments[1])&&(n=arguments[1]),function(i){return i.lift(new bs(t,n,r,e))}}L.a.prototype.windowCount=function(t,e){return void 0===e&&(e=0),ys(t,e)(this)};var bs=function(){function t(t,e,n,r){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new Es(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),ws=function(t){function e(){t.apply(this,arguments),this._numberOfNextedValues=0}return Object(M.__extends)(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(bt.b),Es=function(t){function e(e,n,r,i,o){t.call(this,e),this.destination=e,this.windowTimeSpan=n,this.windowCreationInterval=r,this.maxWindowSize=i,this.scheduler=o,this.windows=[];var s=this.openWindow();if(null!==r&&r>=0){var a={windowTimeSpan:n,windowCreationInterval:r,subscriber:this,scheduler:o};this.add(o.schedule(Ts,n,{subscriber:this,window:s,context:null})),this.add(o.schedule(Ss,r,a))}else this.add(o.schedule(Cs,n,{subscriber:this,window:s,windowTimeSpan:n}))}return Object(M.__extends)(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r<n;r++){var i=e[r];i.closed||(i.next(t),i.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(i))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new ws;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(_e.a);function Cs(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n)}function Ss(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,i=t.windowCreationInterval,o=n.openWindow(),s={action:this,subscription:null};s.subscription=r.schedule(Ts,e,{subscriber:n,window:o,context:s}),this.add(s.subscription),this.schedule(t,i)}function Ts(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}function Os(t,e){return function(n){return n.lift(new Is(t,e))}}L.a.prototype.windowTime=function(t){var e=re,n=null,r=Number.POSITIVE_INFINITY;return Object(At.a)(arguments[3])&&(e=arguments[3]),Object(At.a)(arguments[2])?e=arguments[2]:$t(arguments[2])&&(r=arguments[2]),Object(At.a)(arguments[1])?e=arguments[1]:$t(arguments[1])&&(n=arguments[1]),ms(t,n,r,e)(this)};var Is=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Ns(t,this.openings,this.closingSelector))},t}(),Ns=function(t){function e(e,n,r){t.call(this,e),this.openings=n,this.closingSelector=r,this.contexts=[],this.add(this.openSubscription=Object(Dt.a)(this,n,n))}return Object(M.__extends)(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r<n;r++)e[r].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,i=-1;++i<r;){var o=n[i];o.window.error(e),o.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,r=-1;++r<n;){var i=e[r];i.window.complete(),i.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var r=t[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,r,i){if(t===this.openings){var o=this.closingSelector,s=Object(wt.a)(o)(e);if(s===Et.a)return this.error(Et.a.e);var a=new bt.b,u=new Ct.a,c={window:a,subscription:u};this.contexts.push(c);var l=Object(Dt.a)(this,s,c);l.closed?this.closeWindow(this.contexts.length-1):(l.context=c,u.add(l)),this.destination.next(a)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],r=n.window,i=n.subscription;e.splice(t,1),r.complete(),i.unsubscribe()}},e}(kt.a);function xs(t){return function(e){return e.lift(new As(t))}}L.a.prototype.windowToggle=function(t,e){return Os(t,e)(this)};var As=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new Ps(t,this.closingSelector))},t}(),Ps=function(t){function e(e,n){t.call(this,e),this.destination=e,this.closingSelector=n,this.openWindow()}return Object(M.__extends)(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow(i)},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n=this.window=new bt.b;this.destination.next(n);var r=Object(wt.a)(this.closingSelector)();if(r===Et.a){var i=Et.a.e;this.destination.error(i),this.window.error(i)}else this.add(this.closingNotification=Object(Dt.a)(this,r))},e}(kt.a);function Rs(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return function(e){var n;return"function"==typeof t[t.length-1]&&(n=t.pop()),e.lift(new ks(t,n))}}L.a.prototype.windowWhen=function(t){return xs(t)(this)};var ks=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new Ds(t,this.observables,this.project))},t}(),Ds=function(t){function e(e,n,r){t.call(this,e),this.observables=n,this.project=r,this.toRespond=[];var i=n.length;this.values=new Array(i);for(var o=0;o<i;o++)this.toRespond.push(o);for(o=0;o<i;o++){var s=n[o];this.add(Object(Dt.a)(this,s,s,o))}}return Object(M.__extends)(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values[n]=e;var o=this.toRespond;if(o.length>0){var s=o.indexOf(n);-1!==s&&o.splice(s,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(kt.a);function js(t){return function(e){return e.lift(new Ee(t))}}L.a.prototype.withLatestFrom=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return Rs.apply(void 0,t)(this)},L.a.prototype.zip=function(){for(var t=[],e=0;e<arguments.length;e++)t[e-0]=arguments[e];return be.apply(void 0,t)(this)},L.a.prototype.zipAll=function(t){return js(t)(this)},n("z0HA"),n("iNm/"),n("ExCY"),new function(t){t.requestAnimationFrame?(this.cancelAnimationFrame=t.cancelAnimationFrame.bind(t),this.requestAnimationFrame=t.requestAnimationFrame.bind(t)):t.mozRequestAnimationFrame?(this.cancelAnimationFrame=t.mozCancelAnimationFrame.bind(t),this.requestAnimationFrame=t.mozRequestAnimationFrame.bind(t)):t.webkitRequestAnimationFrame?(this.cancelAnimationFrame=t.webkitCancelAnimationFrame.bind(t),this.requestAnimationFrame=t.webkitRequestAnimationFrame.bind(t)):t.msRequestAnimationFrame?(this.cancelAnimationFrame=t.msCancelAnimationFrame.bind(t),this.requestAnimationFrame=t.msRequestAnimationFrame.bind(t)):t.oRequestAnimationFrame?(this.cancelAnimationFrame=t.oCancelAnimationFrame.bind(t),this.requestAnimationFrame=t.oRequestAnimationFrame.bind(t)):(this.cancelAnimationFrame=t.clearTimeout.bind(t),this.requestAnimationFrame=function(e){return t.setTimeout(e,1e3/60)})}(te.a),n("V7AE"),n("mz3w");var Ms=n("wORZ"),Ls=n("D0q/"),Fs=n("Ropm"),Vs=n("xEhG"),Us=n("bywS"),Bs=n("wP3s"),Ws=n("RWQz"),qs=n("eIqN"),Hs=function(){function t(t,e,n){this.http=t,this.recipeService=e,this.authService=n}return t.prototype.storeRecipe=function(){var t=this.authService.getToken();return this.http.put("https://test-server-61884.firebaseio.com/recipes.json?auth="+t,this.recipeService.getRecipes())},t.prototype.fetchRecipe=function(){var t=this,e=this.authService.getToken();return this.http.get("https://test-server-61884.firebaseio.com/recipes.json?auth="+e).map(function(t){for(var e=t.json(),n=0,r=e;n<r.length;n++){var i=r[n];i.ingredients||(i.ingredient=[])}return e}).subscribe(function(e){t.recipeService.setRecipes(e)})},t}(),Gs=function(){function t(t,e,n){this.dataStorageService=t,this.authService=e,this.router=n}return t.prototype.onSave=function(){this.dataStorageService.storeRecipe().subscribe(function(t){console.log(t)})},t.prototype.onFetch=function(){this.dataStorageService.fetchRecipe()},t.prototype.onLogout=function(){this.authService.logOut(),this.router.navigate(["/"])},t.prototype.isAuthenticated=function(){return this.authService.isAuthenticated()},t}(),zs=i._1({encapsulation:0,styles:[[".open[_ngcontent-%COMP%]{display:block;outline:0}"]],data:{}});function Ks(t){return i._22(0,[(t()(),i._21(-1,null,["\n "])),(t()(),i._3(1,0,null,null,3,"li",[],null,null,null,null,null)),(t()(),i._3(2,0,null,null,2,"a",[["class","mr-sm-2"],["routerLink","/signup"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==i._14(t,3).onClick(n.button,n.ctrlKey,n.metaKey,n.shiftKey)&&r),r},null,null)),i._2(3,671744,null,0,D.m,[D.k,D.a,f.g],{routerLink:[0,"routerLink"]},null),(t()(),i._21(-1,null,["Register"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(6,0,null,null,3,"li",[],null,null,null,null,null)),(t()(),i._3(7,0,null,null,2,"a",[["class","mr-sm-2"],["routerLink","/signin"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==i._14(t,8).onClick(n.button,n.ctrlKey,n.metaKey,n.shiftKey)&&r),r},null,null)),i._2(8,671744,null,0,D.m,[D.k,D.a,f.g],{routerLink:[0,"routerLink"]},null),(t()(),i._21(-1,null,["Login"])),(t()(),i._21(-1,null,["\n "]))],function(t,e){t(e,3,0,"/signup"),t(e,8,0,"/signin")},function(t,e){t(e,2,0,i._14(e,3).target,i._14(e,3).href),t(e,7,0,i._14(e,8).target,i._14(e,8).href)})}function Js(t){return i._22(0,[(t()(),i._3(0,0,null,null,1,"li",[["class","mr-sm-2"],["style","cursor:pointer;"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.onLogout()&&r),r},null,null)),(t()(),i._21(-1,null,["Logout"]))],null,null)}function Xs(t){return i._22(0,[(t()(),i._3(0,0,null,null,14,"li",[["appDropdown",""],["class","dropdown"]],[[2,"show",null]],[[null,"click"],["document","click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==i._14(t,1).open()&&r),"document:click"===e&&(r=!1!==i._14(t,1).close(n.target)&&r),r},null,null)),i._2(1,16384,null,0,j.a,[i.k],null,null),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(3,0,null,null,1,"a",[["class","dropdown-toggle"],["role","button"],["style","cursor:pointer;"]],null,null,null,null,null)),(t()(),i._21(-1,null,["Manage"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(6,0,null,null,7,"div",[["class","dropdown-menu "]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(8,0,null,null,1,"a",[["class","dropdown-item"],["style","cursor:pointer;"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.onSave()&&r),r},null,null)),(t()(),i._21(-1,null,["Save Data"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(11,0,null,null,1,"a",[["class","dropdown-item"],["style","cursor:pointer;"]],null,[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==t.component.onFetch()&&r),r},null,null)),(t()(),i._21(-1,null,["Fetch Data"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "]))],null,function(t,e){t(e,0,0,i._14(e,1).opened)})}function Qs(t){return i._22(0,[(t()(),i._3(0,0,null,null,45,"nav",[["class","navbar navbar-expand-lg navbar-light bg-light"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(2,0,null,null,42,"div",[["class","container-fluid"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(4,0,null,null,5,"div",[["class","navbar-header"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(6,0,null,null,2,"a",[["class","navbar-brand"],["routerLink","/"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==i._14(t,7).onClick(n.button,n.ctrlKey,n.metaKey,n.shiftKey)&&r),r},null,null)),i._2(7,671744,null,0,D.m,[D.k,D.a,f.g],{routerLink:[0,"routerLink"]},null),(t()(),i._21(-1,null,["Recipe Book"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n \n "])),(t()(),i._3(11,0,null,null,32,"div",[["class","collapse navbar-collapse"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(13,0,null,null,17,"ul",[["class","nav nav-pills"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(15,0,null,null,6,"li",[["class","nav-item"]],null,null,null,null,null)),(t()(),i._3(16,0,null,null,5,"a",[["class","nav-link"],["routerLink","/recipes"],["routerLinkActive","active"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==i._14(t,17).onClick(n.button,n.ctrlKey,n.metaKey,n.shiftKey)&&r),r},null,null)),i._2(17,671744,[[2,4]],0,D.m,[D.k,D.a,f.g],{routerLink:[0,"routerLink"]},null),i._2(18,1720320,null,2,D.l,[D.k,i.k,i.B,i.h],{routerLinkActive:[0,"routerLinkActive"]},null),i._19(603979776,1,{links:1}),i._19(603979776,2,{linksWithHrefs:1}),(t()(),i._21(-1,null,["Recipes"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(23,0,null,null,6,"li",[["class","nav-item"]],null,null,null,null,null)),(t()(),i._3(24,0,null,null,5,"a",[["class","nav-link"],["routerLink","/shopping-list"],["routerLinkActive","active"]],[[1,"target",0],[8,"href",4]],[[null,"click"]],function(t,e,n){var r=!0;return"click"===e&&(r=!1!==i._14(t,25).onClick(n.button,n.ctrlKey,n.metaKey,n.shiftKey)&&r),r},null,null)),i._2(25,671744,[[4,4]],0,D.m,[D.k,D.a,f.g],{routerLink:[0,"routerLink"]},null),i._2(26,1720320,null,2,D.l,[D.k,i.k,i.B,i.h],{routerLinkActive:[0,"routerLinkActive"]},null),i._19(603979776,3,{links:1}),i._19(603979776,4,{linksWithHrefs:1}),(t()(),i._21(-1,null,["Shopping List"])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(32,0,null,null,10,"ul",[["class","nav my-2 ml-md-auto"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i.Y(16777216,null,null,1,null,Ks)),i._2(35,16384,null,0,f.i,[i.M,i.J],{ngIf:[0,"ngIf"]},null),(t()(),i._21(-1,null,["\n "])),(t()(),i.Y(16777216,null,null,1,null,Js)),i._2(38,16384,null,0,f.i,[i.M,i.J],{ngIf:[0,"ngIf"]},null),(t()(),i._21(-1,null,["\n "])),(t()(),i.Y(16777216,null,null,1,null,Xs)),i._2(41,16384,null,0,f.i,[i.M,i.J],{ngIf:[0,"ngIf"]},null),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n"])),(t()(),i._21(-1,null,["\n "]))],function(t,e){var n=e.component;t(e,7,0,"/"),t(e,17,0,"/recipes"),t(e,18,0,"active"),t(e,25,0,"/shopping-list"),t(e,26,0,"active"),t(e,35,0,!n.isAuthenticated()),t(e,38,0,n.isAuthenticated()),t(e,41,0,n.isAuthenticated())},function(t,e){t(e,6,0,i._14(e,7).target,i._14(e,7).href),t(e,16,0,i._14(e,17).target,i._14(e,17).href),t(e,24,0,i._14(e,25).target,i._14(e,25).href)})}var Ys=i._1({encapsulation:0,styles:[[""]],data:{}});function Zs(t){return i._22(0,[(t()(),i._3(0,0,null,null,1,"app-header",[],null,null,null,Qs,zs)),i._2(1,49152,null,0,Gs,[Hs,T.a,D.k],null,null),(t()(),i._21(-1,null,["\n"])),(t()(),i._3(3,0,null,null,10,"div",[["class","container"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(5,0,null,null,7,"div",[["class","row"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(7,0,null,null,4,"div",[["class","col-md-12"]],null,null,null,null,null)),(t()(),i._21(-1,null,["\n "])),(t()(),i._3(9,16777216,null,null,1,"router-outlet",[],null,null,null,null,null)),i._2(10,212992,null,0,D.o,[D.b,i.M,i.j,[8,null],i.h],null,null),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n "])),(t()(),i._21(-1,null,["\n"])),(t()(),i._21(-1,null,["\n\n"]))],function(t,e){t(e,10,0)},null)}var $s=i.Z("app-root",a,function(t){return i._22(0,[(t()(),i._3(0,0,null,null,1,"app-root",[],null,null,null,Zs,Ys)),i._2(1,114688,null,0,a,[],null,null)],function(t,e){t(e,1,0)},null)},{},{},[]),ta=function(){},ea=n("T2Au"),na=function(){},ra=function(){},ia=function(){},oa=function(){},sa=i._0(o,[a],function(t){return i._11([i._12(512,i.j,i.W,[[8,[h,S,x,k,$s]],[3,i.j],i.v]),i._12(5120,i.s,i._18,[[3,i.s]]),i._12(4608,f.k,f.j,[i.s,[2,f.o]]),i._12(5120,i.c,i._5,[]),i._12(5120,i.q,i._13,[]),i._12(5120,i.r,i._15,[]),i._12(4608,F.b,F.q,[f.c]),i._12(6144,i.E,null,[F.b]),i._12(4608,F.e,F.f,[]),i._12(5120,F.c,function(t,e,n,r,i){return[new F.j(t,e),new F.n(n),new F.m(r,i)]},[f.c,i.x,f.c,f.c,F.e]),i._12(4608,F.d,F.d,[F.c,i.x]),i._12(135680,F.l,F.l,[f.c]),i._12(4608,F.k,F.k,[F.d,F.l]),i._12(6144,i.C,null,[F.k]),i._12(6144,F.o,null,[F.l]),i._12(4608,i.K,i.K,[i.x]),i._12(4608,F.g,F.g,[f.c]),i._12(4608,F.h,F.h,[f.c]),i._12(4608,V,V,[]),i._12(4608,G,z,[]),i._12(5120,K,yt,[]),i._12(4608,it,it,[V,G,K]),i._12(4608,ot,st,[]),i._12(5120,vt,gt,[it,ot]),i._12(5120,D.a,D.x,[D.k]),i._12(4608,D.e,D.e,[]),i._12(6144,D.f,null,[D.e]),i._12(135680,D.p,D.p,[D.k,i.u,i.i,i.p,D.f]),i._12(4608,D.d,D.d,[]),i._12(5120,D.h,D.A,[D.y]),i._12(5120,i.b,function(t){return[t]},[D.h]),i._12(4608,p.A,p.A,[]),i._12(4608,v.a,v.a,[]),i._12(4608,mt.a,mt.a,[v.a]),i._12(4608,T.a,T.a,[D.k]),i._12(4608,Hs,Hs,[vt,mt.a,T.a]),i._12(512,f.b,f.b,[]),i._12(1024,i.l,F.p,[]),i._12(1024,i.w,function(){return[D.t()]},[]),i._12(512,D.y,D.y,[i.p]),i._12(1024,i.d,function(t,e){return[F.s(t),D.z(e)]},[[2,i.w],D.y]),i._12(512,i.e,i.e,[[2,i.d]]),i._12(131584,i.g,i.g,[i.x,i.X,i.p,i.l,i.j,i.e]),i._12(512,i.f,i.f,[i.g]),i._12(512,F.a,F.a,[[3,F.a]]),i._12(512,_t,_t,[]),i._12(1024,D.s,D.v,[[3,D.k]]),i._12(512,D.r,D.c,[]),i._12(512,D.b,D.b,[]),i._12(256,D.g,{preloadingStrategy:D.e},[]),i._12(1024,f.g,D.u,[f.m,[2,f.a],D.g]),i._12(512,f.f,f.f,[f.g]),i._12(512,i.i,i.i,[]),i._12(512,i.u,i.H,[i.i,[2,i.I]]),i._12(1024,D.i,function(){return[[{path:"",component:u},{path:"recipes",loadChildren:"./recipes/recipes.module#RecipesModule"},{path:"shopping-list",component:b}],[{path:"signup",component:O},{path:"signin",component:A}]]},[]),i._12(1024,D.k,D.w,[i.g,D.r,D.b,f.f,i.p,i.u,i.i,D.i,D.g,[2,D.q],[2,D.j]]),i._12(512,D.n,D.n,[[2,D.s],[2,D.k]]),i._12(512,ta,ta,[]),i._12(512,ea.a,ea.a,[]),i._12(512,p.x,p.x,[]),i._12(512,p.l,p.l,[]),i._12(512,na,na,[]),i._12(512,ra,ra,[]),i._12(512,ia,ia,[]),i._12(512,oa,oa,[]),i._12(512,o,o,[])])});Object(i.Q)(),F.i().bootstrapModuleFactory(sa).catch(function(t){return console.log(t)})},"ce4+":function(t,e,n){n("usOC")},cm6g:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("/HC2");e.StatsManager=function(){function t(){}return t.getCollection=function(t){var e=t.toString();return this.collections_[e]||(this.collections_[e]=new r.StatsCollection),this.collections_[e]},t.getOrCreateReporter=function(t,e){var n=t.toString();return this.reporters_[n]||(this.reporters_[n]=e()),this.reporters_[n]},t.collections_={},t.reporters_={},t}()},dVae:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("isNy"),o=n("fvGz"),s=n("F1yO"),a=n("JEJ4"),u=function(){return r||(r=new i.SortedMap(s.stringCompare)),r};e.ImmutableTree=function(){function t(t,e){void 0===e&&(e=u()),this.value=t,this.children=e}return t.fromObject=function(e){var n=t.Empty;return a.forEach(e,function(t,e){n=n.set(new o.Path(t),e)}),n},t.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},t.prototype.findRootMostMatchingPathAndValue=function(t,e){if(null!=this.value&&e(this.value))return{path:o.Path.Empty,value:this.value};if(t.isEmpty())return null;var n=t.getFront(),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(t.popFront(),e);return null!=i?{path:new o.Path(n).child(i.path),value:i.value}:null}return null},t.prototype.findRootMostValueAndPath=function(t){return this.findRootMostMatchingPathAndValue(t,function(){return!0})},t.prototype.subtree=function(e){if(e.isEmpty())return this;var n=e.getFront(),r=this.children.get(n);return null!==r?r.subtree(e.popFront()):t.Empty},t.prototype.set=function(e,n){if(e.isEmpty())return new t(n,this.children);var r=e.getFront(),i=(this.children.get(r)||t.Empty).set(e.popFront(),n),o=this.children.insert(r,i);return new t(this.value,o)},t.prototype.remove=function(e){if(e.isEmpty())return this.children.isEmpty()?t.Empty:new t(null,this.children);var n=e.getFront(),r=this.children.get(n);if(r){var i=r.remove(e.popFront()),o=void 0;return o=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),null===this.value&&o.isEmpty()?t.Empty:new t(this.value,o)}return this},t.prototype.get=function(t){if(t.isEmpty())return this.value;var e=t.getFront(),n=this.children.get(e);return n?n.get(t.popFront()):null},t.prototype.setTree=function(e,n){if(e.isEmpty())return n;var r,i=e.getFront(),o=(this.children.get(i)||t.Empty).setTree(e.popFront(),n);return r=o.isEmpty()?this.children.remove(i):this.children.insert(i,o),new t(this.value,r)},t.prototype.fold=function(t){return this.fold_(o.Path.Empty,t)},t.prototype.fold_=function(t,e){var n={};return this.children.inorderTraversal(function(r,i){n[r]=i.fold_(t.child(r),e)}),e(t,this.value,n)},t.prototype.findOnPath=function(t,e){return this.findOnPath_(t,o.Path.Empty,e)},t.prototype.findOnPath_=function(t,e,n){var r=!!this.value&&n(e,this.value);if(r)return r;if(t.isEmpty())return null;var i=t.getFront(),o=this.children.get(i);return o?o.findOnPath_(t.popFront(),e.child(i),n):null},t.prototype.foreachOnPath=function(t,e){return this.foreachOnPath_(t,o.Path.Empty,e)},t.prototype.foreachOnPath_=function(e,n,r){if(e.isEmpty())return this;this.value&&r(n,this.value);var i=e.getFront(),o=this.children.get(i);return o?o.foreachOnPath_(e.popFront(),n.child(i),r):t.Empty},t.prototype.foreach=function(t){this.foreach_(o.Path.Empty,t)},t.prototype.foreach_=function(t,e){this.children.inorderTraversal(function(n,r){r.foreach_(t.child(n),e)}),this.value&&e(t,this.value)},t.prototype.foreachChild=function(t){this.children.inorderTraversal(function(e,n){n.value&&t(e,n.value)})},t.Empty=new t(null),t}()},"dmC+":function(t,e,n){"use strict";e.a=function(t,e){return Object(r.a)(t,e)(this)};var r=n("qqDE")},dnjB:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("srua"),i=n("mxkr"),o=n("TO51"),s=function(){function t(t){this.shoppinglistSv=t,this.recipesChanged=new o.b,this.recipes=[new r.a("A Test Recipe","This is simply a test","https://upload.wikimedia.org/wikipedia/commons/1/15/Recipe_logo.jpeg",[new i.a("Meat",1),new i.a("Nachos",5)]),new r.a("Another Test Recipe","This is another simply a test","https://upload.wikimedia.org/wikipedia/commons/1/15/Recipe_logo.jpeg",[new i.a("French Fries",5),new i.a("Chicken Wings",10)])]}return t.prototype.setRecipes=function(t){this.recipes=t,this.recipesChanged.next(this.recipes.slice())},t.prototype.getRecipes=function(){return this.recipes.slice()},t.prototype.getRecipe=function(t){return this.recipes[t]},t.prototype.onAddIngredienToShoppingList=function(t){this.shoppinglistSv.AddIngredients(t)},t.prototype.addRecipe=function(t){this.recipes.push(t),this.recipesChanged.next(this.recipes.slice())},t.prototype.updateRecipe=function(t,e){this.recipes[t]=e,this.recipesChanged.next(this.recipes.slice())},t.prototype.deleteRecipe=function(t){this.recipes.splice(t,1),this.recipesChanged.next(this.recipes.slice())},t}()},"e9+7":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):55296==(64512&i)&&r+1<t.length&&56320==(64512&t.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++r)),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e};e.base64={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<t.length;i+=3){var o=t[i],s=i+1<t.length,a=s?t[i+1]:0,u=i+2<t.length,c=u?t[i+2]:0,l=(15&a)<<2|c>>6,h=63&c;u||(h=64,s||(l=64)),r.push(n[o>>2],n[(3&o)<<4|a>>4],n[l],n[h])}return r.join("")},encodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(r(t),e)},decodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){for(var e=[],n=0,r=0;n<t.length;){var i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=t[n++];e[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var s=((7&i)<<18|(63&(o=t[n++]))<<12|(63&(a=t[n++]))<<6|63&t[n++])-65536;e[r++]=String.fromCharCode(55296+(s>>10)),e[r++]=String.fromCharCode(56320+(1023&s))}else{o=t[n++];var a=t[n++];e[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&a)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray:function(t,e){this.init_();for(var n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<t.length;){var o=n[t.charAt(i++)],s=i<t.length?n[t.charAt(i)]:0,a=++i<t.length?n[t.charAt(i)]:64,u=++i<t.length?n[t.charAt(i)]:64;if(++i,null==o||null==s||null==a||null==u)throw Error();r.push(o<<2|s>>4),64!=a&&(r.push(s<<4&240|a>>2),64!=u&&r.push(a<<6&192|u))}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},e.base64Encode=function(t){var n=r(t);return e.base64.encodeByteArray(n,!0)},e.base64Decode=function(t){try{return e.base64.decodeString(t,!0)}catch(t){console.error("base64Decode failed: ",t)}return null}},eIqN:function(t,e,n){"use strict";e.a=function(){return function(t){return Object(i.a)()(Object(r.a)(s)(t))}};var r=n("LHF8"),i=n("RWQz"),o=n("TO51");function s(){return new o.b}},eL9U:function(t,e,n){"use strict";e.a=function(t,e){return Object(r.a)(t,e)(this)};var r=n("8JPw")},eoFs:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("6Xbx"),i=n("TO51"),o=n("Upor"),s=function(t){function e(e){t.call(this),this._value=e}return Object(r.__extends)(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.a;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.b)},ertD:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Change=function(){function t(t,e,n,r,i){this.type=t,this.snapshotNode=e,this.childName=n,this.oldSnap=r,this.prevName=i}return t.valueChange=function(e){return new t(t.VALUE,e)},t.childAddedChange=function(e,n){return new t(t.CHILD_ADDED,n,e)},t.childRemovedChange=function(e,n){return new t(t.CHILD_REMOVED,n,e)},t.childChangedChange=function(e,n,r){return new t(t.CHILD_CHANGED,n,e,r)},t.childMovedChange=function(e,n){return new t(t.CHILD_MOVED,n,e)},t.CHILD_ADDED="child_added",t.CHILD_REMOVED="child_removed",t.CHILD_CHANGED="child_changed",t.CHILD_MOVED="child_moved",t.VALUE="value",t}()},f37V:function(t,e,n){"use strict";e.a=function(t,e){return Object(r.a)(t,e)(this)};var r=n("D0q/")},fAJX:function(t,e,n){(function(t){var e=function(){if("undefined"!=typeof t)return t;if("undefined"!=typeof window)return window;if("undefined"!=typeof self)return self;throw new Error("unable to locate global object")}();"undefined"==typeof Promise&&(e.Promise=Promise=n("yiM5"))}).call(e,n("fRUx"))},fRUx:function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},"fgj+":function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=n("X9X7").a.create},fvGz:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("F1yO"),i=n("JEJ4");e.Path=function(){function t(t,e){if(void 0===e){this.pieces_=t.split("/");for(var n=0,r=0;r<this.pieces_.length;r++)this.pieces_[r].length>0&&(this.pieces_[n]=this.pieces_[r],n++);this.pieces_.length=n,this.pieceNum_=0}else this.pieces_=t,this.pieceNum_=e}return Object.defineProperty(t,"Empty",{get:function(){return new t("")},enumerable:!0,configurable:!0}),t.prototype.getFront=function(){return this.pieceNum_>=this.pieces_.length?null:this.pieces_[this.pieceNum_]},t.prototype.getLength=function(){return this.pieces_.length-this.pieceNum_},t.prototype.popFront=function(){var e=this.pieceNum_;return e<this.pieces_.length&&e++,new t(this.pieces_,e)},t.prototype.getBack=function(){return this.pieceNum_<this.pieces_.length?this.pieces_[this.pieces_.length-1]:null},t.prototype.toString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+this.pieces_[e]);return t||"/"},t.prototype.toUrlEncodedString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+encodeURIComponent(String(this.pieces_[e])));return t||"/"},t.prototype.slice=function(t){return void 0===t&&(t=0),this.pieces_.slice(this.pieceNum_+t)},t.prototype.parent=function(){if(this.pieceNum_>=this.pieces_.length)return null;for(var e=[],n=this.pieceNum_;n<this.pieces_.length-1;n++)e.push(this.pieces_[n]);return new t(e,0)},t.prototype.child=function(e){for(var n=[],r=this.pieceNum_;r<this.pieces_.length;r++)n.push(this.pieces_[r]);if(e instanceof t)for(r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);else{var i=e.split("/");for(r=0;r<i.length;r++)i[r].length>0&&n.push(i[r])}return new t(n,0)},t.prototype.isEmpty=function(){return this.pieceNum_>=this.pieces_.length},t.relativePath=function(e,n){var r=e.getFront(),i=n.getFront();if(null===r)return n;if(r===i)return t.relativePath(e.popFront(),n.popFront());throw new Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+e+")")},t.comparePaths=function(t,e){for(var n=t.slice(),i=e.slice(),o=0;o<n.length&&o<i.length;o++){var s=r.nameCompare(n[o],i[o]);if(0!==s)return s}return n.length===i.length?0:n.length<i.length?-1:1},t.prototype.equals=function(t){if(this.getLength()!==t.getLength())return!1;for(var e=this.pieceNum_,n=t.pieceNum_;e<=this.pieces_.length;e++,n++)if(this.pieces_[e]!==t.pieces_[n])return!1;return!0},t.prototype.contains=function(t){var e=this.pieceNum_,n=t.pieceNum_;if(this.getLength()>t.getLength())return!1;for(;e<this.pieces_.length;){if(this.pieces_[e]!==t.pieces_[n])return!1;++e,++n}return!0},t}(),e.ValidationPath=function(){function t(t,e){this.errorPrefix_=e,this.parts_=t.slice(),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n<this.parts_.length;n++)this.byteLength_+=i.stringLength(this.parts_[n]);this.checkValid_()}return Object.defineProperty(t,"MAX_PATH_DEPTH",{get:function(){return 32},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MAX_PATH_LENGTH_BYTES",{get:function(){return 768},enumerable:!0,configurable:!0}),t.prototype.push=function(t){this.parts_.length>0&&(this.byteLength_+=1),this.parts_.push(t),this.byteLength_+=i.stringLength(t),this.checkValid_()},t.prototype.pop=function(){var t=this.parts_.pop();this.byteLength_-=i.stringLength(t),this.parts_.length>0&&(this.byteLength_-=1)},t.prototype.checkValid_=function(){if(this.byteLength_>t.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+t.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");if(this.parts_.length>t.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+t.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},t.prototype.toErrorString=function(){return 0==this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},t}()},fxt9:function(t,e,n){"use strict";e.a=function(t){return function(e){return 0===t?new s.a:e.lift(new a(t))}};var r=n("6Xbx"),i=n("E9/g"),o=n("2kvl"),s=n("Ecq+"),a=function(){function t(t){if(this.total=t,this.total<0)throw new o.a}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.total))},t}(),u=function(t){function e(e,n){t.call(this,e),this.total=n,this.ring=new Array,this.count=0}return Object(r.__extends)(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var o=e++%n;t.next(r[o])}t.complete()},e}(i.a)},gOHv:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4");!function(t){t[t.OVERWRITE=0]="OVERWRITE",t[t.MERGE=1]="MERGE",t[t.ACK_USER_WRITE=2]="ACK_USER_WRITE",t[t.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(e.OperationType||(e.OperationType={})),e.OperationSource=function(){function t(t,e,n,i){this.fromUser=t,this.fromServer=e,this.queryId=n,this.tagged=i,r.assert(!i||e,"Tagged queries must be from server.")}return t.User=new t(!0,!1,null,!1),t.Server=new t(!1,!0,null,!1),t.forServerTaggedQuery=function(e){return new t(!1,!0,e,!0)},t}()},grVA:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r={closed:!0,next:function(t){},error:function(t){throw t},complete:function(){}}},hQ4o:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("F1yO");e.PacketReceiver=function(){function t(t){this.onMessage_=t,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return t.prototype.closeAfter=function(t,e){this.closeAfterResponse=t,this.onClose=e,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},t.prototype.handleResponse=function(t,e){var n=this;this.pendingResponses[t]=e;for(var i=function(){var t=o.pendingResponses[o.currentResponseNum];delete o.pendingResponses[o.currentResponseNum];for(var e=function(e){t[e]&&r.exceptionGuard(function(){n.onMessage_(t[e])})},i=0;i<t.length;++i)e(i);if(o.currentResponseNum===o.closeAfterResponse)return o.onClose&&(o.onClose(),o.onClose=null),"break";o.currentResponseNum++},o=this;this.pendingResponses[this.currentResponseNum]&&"break"!==i(););},t}()},hkXn:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4"),i=n("fvGz"),o=n("JEJ4"),s=function(){this.children={},this.childCount=0,this.value=null};e.TreeNode=s,e.Tree=function(){function t(t,e,n){void 0===t&&(t=""),void 0===e&&(e=null),void 0===n&&(n=new s),this.name_=t,this.parent_=e,this.node_=n}return t.prototype.subTree=function(e){for(var n,r=e instanceof i.Path?e:new i.Path(e),a=this;null!==(n=r.getFront());)a=new t(n,a,o.safeGet(a.node_.children,n)||new s),r=r.popFront();return a},t.prototype.getValue=function(){return this.node_.value},t.prototype.setValue=function(t){r.assert("undefined"!=typeof t,"Cannot set value to undefined"),this.node_.value=t,this.updateParents_()},t.prototype.clear=function(){this.node_.value=null,this.node_.children={},this.node_.childCount=0,this.updateParents_()},t.prototype.hasChildren=function(){return this.node_.childCount>0},t.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},t.prototype.forEachChild=function(e){var n=this;o.forEach(this.node_.children,function(r,i){e(new t(r,n,i))})},t.prototype.forEachDescendant=function(t,e,n){e&&!n&&t(this),this.forEachChild(function(e){e.forEachDescendant(t,!0,n)}),e&&n&&t(this)},t.prototype.forEachAncestor=function(t,e){for(var n=e?this:this.parent();null!==n;){if(t(n))return!0;n=n.parent()}return!1},t.prototype.forEachImmediateDescendantWithValue=function(t){this.forEachChild(function(e){null!==e.getValue()?t(e):e.forEachImmediateDescendantWithValue(t)})},t.prototype.path=function(){return new i.Path(null===this.parent_?this.name_:this.parent_.path()+"/"+this.name_)},t.prototype.name=function(){return this.name_},t.prototype.parent=function(){return this.parent_},t.prototype.updateParents_=function(){null!==this.parent_&&this.parent_.updateChild_(this.name_,this)},t.prototype.updateChild_=function(t,e){var n=e.isEmpty(),r=o.contains(this.node_.children,t);n&&r?(delete this.node_.children[t],this.node_.childCount--,this.updateParents_()):n||r||(this.node_.children[t]=e.node_,this.node_.childCount++,this.updateParents_())},t}()},iEW0:function(t,e,n){var r=n("kUdC");n("Rv9P"),n("Dvgu"),n("Y5DG"),n("ce4+"),t.exports=r},"iNm/":function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("6Xbx"),i=function(t){function e(e){t.call(this),this.errors=e;var n=Error.call(this,e?e.length+" errors occurred during unsubscription:\n "+e.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"");this.name=n.name="UnsubscriptionError",this.stack=n.stack,this.message=n.message}return Object(r.__extends)(e,t),e}(Error)},isNy:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e,n,r,i){void 0===i&&(i=null),this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];for(var o=1;!t.isEmpty();)if(t=t,o=e?n(t.key,e):1,r&&(o*=-1),o<0)t=this.isReverse_?t.left:t.right;else{if(0===o){this.nodeStack_.push(t);break}this.nodeStack_.push(t),t=this.isReverse_?t.right:t.left}}return t.prototype.getNext=function(){if(0===this.nodeStack_.length)return null;var t,e=this.nodeStack_.pop();if(t=this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value},this.isReverse_)for(e=e.left;!e.isEmpty();)this.nodeStack_.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack_.push(e),e=e.left;return t},t.prototype.hasNext=function(){return this.nodeStack_.length>0},t.prototype.peek=function(){if(0===this.nodeStack_.length)return null;var t=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value}},t}();e.SortedMapIterator=r;var i=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:s.EMPTY_NODE,this.right=null!=o?o:s.EMPTY_NODE}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.count=function(){return this.left.count()+1+this.right.count()},t.prototype.isEmpty=function(){return!1},t.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},t.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},t.prototype.minKey=function(){return this.min_().key},t.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},t.prototype.insert=function(t,e,n){var r,i;return(i=(r=n(t,(i=this).key))<0?i.copy(null,null,null,i.left.insert(t,e,n),null):0===r?i.copy(null,e,null,null,null):i.copy(null,null,null,null,i.right.insert(t,e,n))).fixUp_()},t.prototype.removeMin_=function(){if(this.left.isEmpty())return s.EMPTY_NODE;var t=this;return t.left.isRed_()||t.left.left.isRed_()||(t=t.moveRedLeft_()),(t=t.copy(null,null,null,t.left.removeMin_(),null)).fixUp_()},t.prototype.remove=function(t,e){var n,r;if(e(t,(n=this).key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(t,e),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===e(t,n.key)){if(n.right.isEmpty())return s.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(t,e))}return n.fixUp_()},t.prototype.isRed_=function(){return this.color},t.prototype.fixUp_=function(){var t=this;return t.right.isRed_()&&!t.left.isRed_()&&(t=t.rotateLeft_()),t.left.isRed_()&&t.left.left.isRed_()&&(t=t.rotateRight_()),t.left.isRed_()&&t.right.isRed_()&&(t=t.colorFlip_()),t},t.prototype.moveRedLeft_=function(){var t=this.colorFlip_();return t.right.left.isRed_()&&(t=(t=(t=t.copy(null,null,null,null,t.right.rotateRight_())).rotateLeft_()).colorFlip_()),t},t.prototype.moveRedRight_=function(){var t=this.colorFlip_();return t.left.left.isRed_()&&(t=(t=t.rotateRight_()).colorFlip_()),t},t.prototype.rotateLeft_=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.rotateRight_=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.colorFlip_=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.checkMaxDepth_=function(){var t=this.check_();return Math.pow(2,t)<=this.count()+1},t.prototype.check_=function(){var t;if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");if((t=this.left.check_())!==this.right.check_())throw new Error("Black depths differ");return t+(this.isRed_()?0:1)},t.RED=!0,t.BLACK=!1,t}();e.LLRBNode=i;var o=function(){function t(){}return t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new i(t,e,null)},t.prototype.remove=function(t,e){return this},t.prototype.count=function(){return 0},t.prototype.isEmpty=function(){return!0},t.prototype.inorderTraversal=function(t){return!1},t.prototype.reverseTraversal=function(t){return!1},t.prototype.minKey=function(){return null},t.prototype.maxKey=function(){return null},t.prototype.check_=function(){return 0},t.prototype.isRed_=function(){return!1},t}();e.LLRBEmptyNode=o;var s=function(){function t(e,n){void 0===n&&(n=t.EMPTY_NODE),this.comparator_=e,this.root_=n}return t.prototype.insert=function(e,n){return new t(this.comparator_,this.root_.insert(e,n,this.comparator_).copy(null,null,i.BLACK,null,null))},t.prototype.remove=function(e){return new t(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,i.BLACK,null,null))},t.prototype.get=function(t){for(var e,n=this.root_;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key)))return n.value;e<0?n=n.left:e>0&&(n=n.right)}return null},t.prototype.getPredecessorKey=function(t){for(var e,n=this.root_,r=null;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}e<0?n=n.left:e>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")},t.prototype.isEmpty=function(){return this.root_.isEmpty()},t.prototype.count=function(){return this.root_.count()},t.prototype.minKey=function(){return this.root_.minKey()},t.prototype.maxKey=function(){return this.root_.maxKey()},t.prototype.inorderTraversal=function(t){return this.root_.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.root_.reverseTraversal(t)},t.prototype.getIterator=function(t){return new r(this.root_,null,this.comparator_,!1,t)},t.prototype.getIteratorFrom=function(t,e){return new r(this.root_,t,this.comparator_,!1,e)},t.prototype.getReverseIteratorFrom=function(t,e){return new r(this.root_,t,this.comparator_,!0,e)},t.prototype.getReverseIterator=function(t){return new r(this.root_,null,this.comparator_,!0,t)},t.EMPTY_NODE=new o,t}();e.SortedMap=s},j0qB:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("F1yO"),i=n("Rgd9"),o=n("UcKF"),s=n("FGYS");e.Connection=function(){function t(t,e,n,i,o,a,u){this.id=t,this.repoInfo_=e,this.onMessage_=n,this.onReady_=i,this.onDisconnect_=o,this.onKill_=a,this.lastSessionId=u,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=r.logWrapper("c:"+this.id+":"),this.transportManager_=new s.TransportManager(e),this.log_("Connection created"),this.start_()}return t.prototype.start_=function(){var t=this,e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,void 0,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.conn_),i=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(function(){t.conn_&&t.conn_.open(n,i)},Math.floor(0));var o=e.healthyTimeout||0;o>0&&(this.healthyTimeout_=r.setTimeoutNonBlocking(function(){t.healthyTimeout_=null,t.isHealthy_||(t.conn_&&t.conn_.bytesReceived>102400?(t.log_("Connection exceeded healthy timeout but has received "+t.conn_.bytesReceived+" bytes. Marking connection healthy."),t.isHealthy_=!0,t.conn_.markConnectionHealthy()):t.conn_&&t.conn_.bytesSent>10240?t.log_("Connection exceeded healthy timeout but has sent "+t.conn_.bytesSent+" bytes. Leaving connection alive."):(t.log_("Closing unhealthy connection after timeout."),t.close()))},Math.floor(o)))},t.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},t.prototype.disconnReceiver_=function(t){var e=this;return function(n){t===e.conn_?e.onConnectionLost_(n):t===e.secondaryConn_?(e.log_("Secondary connection lost."),e.onSecondaryConnectionLost_()):e.log_("closing an old connection")}},t.prototype.connReceiver_=function(t){var e=this;return function(n){2!=e.state_&&(t===e.rx_?e.onPrimaryMessageReceived_(n):t===e.secondaryConn_?e.onSecondaryMessageReceived_(n):e.log_("message on old connection"))}},t.prototype.sendRequest=function(t){this.sendData_({t:"d",d:t})},t.prototype.tryCleanupConnection=function(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)},t.prototype.onSecondaryControl_=function(t){if("t"in t){var e=t.t;"a"===e?this.upgradeIfSecondaryHealthy_():"r"===e?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===e&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},t.prototype.onSecondaryMessageReceived_=function(t){var e=r.requireKey("t",t),n=r.requireKey("d",t);if("c"==e)this.onSecondaryControl_(n);else{if("d"!=e)throw new Error("Unknown protocol layer: "+e);this.pendingDataMessages.push(n)}},t.prototype.upgradeIfSecondaryHealthy_=function(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))},t.prototype.proceedWithUpgrade_=function(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()},t.prototype.onPrimaryMessageReceived_=function(t){var e=r.requireKey("t",t),n=r.requireKey("d",t);"c"==e?this.onControl_(n):"d"==e&&this.onDataMessage_(n)},t.prototype.onDataMessage_=function(t){this.onPrimaryResponse_(),this.onMessage_(t)},t.prototype.onPrimaryResponse_=function(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))},t.prototype.onControl_=function(t){var e=r.requireKey("t",t);if("d"in t){var n=t.d;if("h"===e)this.onHandshake_(n);else if("n"===e){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var i=0;i<this.pendingDataMessages.length;++i)this.onDataMessage_(this.pendingDataMessages[i]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===e?this.onConnectionShutdown_(n):"r"===e?this.onReset_(n):"e"===e?r.error("Server Error: "+n):"o"===e?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):r.error("Unknown control packet command: "+e)}},t.prototype.onHandshake_=function(t){var e=t.ts,n=t.v,i=t.h;this.sessionId=t.s,this.repoInfo_.updateHost(i),0==this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,e),o.PROTOCOL_VERSION!==n&&r.warn("Protocol version mismatch detected"),this.tryStartUpgrade_())},t.prototype.tryStartUpgrade_=function(){var t=this.transportManager_.upgradeTransport();t&&this.startUpgrade_(t)},t.prototype.startUpgrade_=function(t){var e=this;this.secondaryConn_=new t(this.nextTransportId_(),this.repoInfo_,this.sessionId),this.secondaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.secondaryConn_),i=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,i),r.setTimeoutNonBlocking(function(){e.secondaryConn_&&(e.log_("Timed out trying to upgrade."),e.secondaryConn_.close())},Math.floor(6e4))},t.prototype.onReset_=function(t){this.log_("Reset packet received. New host: "+t),this.repoInfo_.updateHost(t),1===this.state_?this.close():(this.closeConnections_(),this.start_())},t.prototype.onConnectionEstablished_=function(t,e){var n=this;this.log_("Realtime connection established."),this.conn_=t,this.state_=1,this.onReady_&&(this.onReady_(e,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):r.setTimeoutNonBlocking(function(){n.sendPingOnPrimaryIfNecessary_()},Math.floor(5e3))},t.prototype.sendPingOnPrimaryIfNecessary_=function(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))},t.prototype.onSecondaryConnectionLost_=function(){var t=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==t&&this.rx_!==t||this.close()},t.prototype.onConnectionLost_=function(t){this.conn_=null,t||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(i.PersistentStorage.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()},t.prototype.onConnectionShutdown_=function(t){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(t),this.onKill_=null),this.onDisconnect_=null,this.close()},t.prototype.sendData_=function(t){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(t)},t.prototype.close=function(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))},t.prototype.closeConnections_=function(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)},t}()},j3M3:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("R3TC");e.SnapshotHolder=function(){function t(){this.rootNode_=r.ChildrenNode.EMPTY_NODE}return t.prototype.getNode=function(t){return this.rootNode_.getChild(t)},t.prototype.updateSnapshot=function(t,e){this.rootNode_=this.rootNode_.updateChild(t,e)},t}()},jaVc:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("6Xbx"),i=function(t){function e(e,n){t.call(this),this.subject=e,this.subscriber=n,this.closed=!1}return Object(r.__extends)(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n("qLnt").a)},kCHx:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("gOHv"),i=n("fvGz");e.Overwrite=function(){function t(t,e,n){this.source=t,this.path=e,this.snap=n,this.type=r.OperationType.OVERWRITE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,i.Path.Empty,this.snap.getImmediateChild(e)):new t(this.source,this.path.popFront(),this.snap)},t}()},kQVV:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(t){return t&&"number"==typeof t.length}},kUdC:function(t,e,n){n("ryHz"),t.exports=n("XtH8").default},"l+DM":function(t,e,n){"use strict";e.a=function(t,e,n){return Object(r.a)(t,e,n)(this)};var r=n("Ropm")},lDZL:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("F1yO");e.EventQueue=function(){function t(){this.eventLists_=[],this.recursionDepth_=0}return t.prototype.queueEvents=function(t){for(var e=null,n=0;n<t.length;n++){var r=t[n],o=r.getPath();null===e||o.equals(e.getPath())||(this.eventLists_.push(e),e=null),null===e&&(e=new i(o)),e.add(r)}e&&this.eventLists_.push(e)},t.prototype.raiseEventsAtPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_(function(e){return e.equals(t)})},t.prototype.raiseEventsForChangedPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_(function(e){return e.contains(t)||t.contains(e)})},t.prototype.raiseQueuedEventsMatchingPredicate_=function(t){this.recursionDepth_++;for(var e=!0,n=0;n<this.eventLists_.length;n++){var r=this.eventLists_[n];r&&(t(r.getPath())?(this.eventLists_[n].raise(),this.eventLists_[n]=null):e=!1)}e&&(this.eventLists_=[]),this.recursionDepth_--},t}();var i=function(){function t(t){this.path_=t,this.events_=[]}return t.prototype.add=function(t){this.events_.push(t)},t.prototype.raise=function(){for(var t=0;t<this.events_.length;t++){var e=this.events_[t];if(null!==e){this.events_[t]=null;var n=e.getEventRunner();r.logger&&r.log("event: "+e.toString()),r.exceptionGuard(n)}}},t.prototype.getPath=function(){return this.path_},t}();e.EventList=i},lI6h:function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n("6Xbx"),i=function(t){function e(){t.apply(this,arguments)}return Object(r.__extends)(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(n("E9/g").a)},ltvI:function(t,e,n){"use strict";e.a=function(t){return t}},mHG6:function(t,e,n){"use strict";e.a=function(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}},mZoP:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4"),i=n("JEJ4"),o=n("Rgd9"),s=n("UcKF");e.RepoInfo=function(){function t(t,e,n,r,i){void 0===i&&(i=""),this.secure=e,this.namespace=n,this.webSocketOnly=r,this.persistenceKey=i,this.host=t.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=o.PersistentStorage.get("host:"+t)||this.host}return t.prototype.needsQueryParam=function(){return this.host!==this.internalHost||this.isCustomHost()},t.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},t.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},t.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},t.prototype.updateHost=function(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&o.PersistentStorage.set("host:"+this.host,this.internalHost))},t.prototype.connectionURL=function(t,e){var n;if(r.assert("string"==typeof t,"typeof type must == string"),r.assert("object"==typeof e,"typeof params must == object"),t===s.WEBSOCKET)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(t!==s.LONG_POLLING)throw new Error("Unknown connection type: "+t);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(e.ns=this.namespace);var o=[];return i.forEach(e,function(t,e){o.push(t+"="+e)}),n+o.join("&")},t.prototype.toString=function(){var t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t},t.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},t}()},miEe:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4"),i=n("F1yO"),o=n("stu6"),s=n("/fob"),a=n("Nq7v"),u=n("G0Qy"),c=n("W4Cj"),l=n("n3qp"),h=n("XiwH"),p=n("JEJ4");e.QueryParams=function(){function t(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=s.PRIORITY_INDEX}return t.prototype.hasStart=function(){return this.startSet_},t.prototype.isViewFromLeft=function(){return""===this.viewFrom_?this.startSet_:this.viewFrom_===t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT},t.prototype.getIndexStartValue=function(){return r.assert(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},t.prototype.getIndexStartName=function(){return r.assert(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:i.MIN_NAME},t.prototype.hasEnd=function(){return this.endSet_},t.prototype.getIndexEndValue=function(){return r.assert(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},t.prototype.getIndexEndName=function(){return r.assert(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:i.MAX_NAME},t.prototype.hasLimit=function(){return this.limitSet_},t.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},t.prototype.getLimit=function(){return r.assert(this.limitSet_,"Only valid if limit has been set"),this.limit_},t.prototype.getIndex=function(){return this.index_},t.prototype.copy_=function(){var e=new t;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e},t.prototype.limit=function(t){var e=this.copy_();return e.limitSet_=!0,e.limit_=t,e.viewFrom_="",e},t.prototype.limitToFirst=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT,n},t.prototype.limitToLast=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT,n},t.prototype.startAt=function(t,e){var n=this.copy_();return n.startSet_=!0,void 0===t&&(t=null),n.indexStartValue_=t,null!=e?(n.startNameSet_=!0,n.indexStartName_=e):(n.startNameSet_=!1,n.indexStartName_=""),n},t.prototype.endAt=function(t,e){var n=this.copy_();return n.endSet_=!0,void 0===t&&(t=null),n.indexEndValue_=t,void 0!==e?(n.endNameSet_=!0,n.indexEndName_=e):(n.endNameSet_=!1,n.indexEndName_=""),n},t.prototype.orderBy=function(t){var e=this.copy_();return e.index_=t,e},t.prototype.getQueryObject=function(){var e=t.WIRE_PROTOCOL_CONSTANTS_,n={};if(this.startSet_&&(n[e.INDEX_START_VALUE]=this.indexStartValue_,this.startNameSet_&&(n[e.INDEX_START_NAME]=this.indexStartName_)),this.endSet_&&(n[e.INDEX_END_VALUE]=this.indexEndValue_,this.endNameSet_&&(n[e.INDEX_END_NAME]=this.indexEndName_)),this.limitSet_){n[e.LIMIT]=this.limit_;var r=this.viewFrom_;""===r&&(r=this.isViewFromLeft()?e.VIEW_FROM_LEFT:e.VIEW_FROM_RIGHT),n[e.VIEW_FROM]=r}return this.index_!==s.PRIORITY_INDEX&&(n[e.INDEX]=this.index_.toString()),n},t.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},t.prototype.isDefault=function(){return this.loadsAllData()&&this.index_==s.PRIORITY_INDEX},t.prototype.getNodeFilter=function(){return this.loadsAllData()?new c.IndexedFilter(this.getIndex()):this.hasLimit()?new l.LimitedFilter(this):new h.RangedFilter(this)},t.prototype.toRestQueryStringParameters=function(){var e,n=t.REST_QUERY_CONSTANTS_,i={};return this.isDefault()?i:(this.index_===s.PRIORITY_INDEX?e=n.PRIORITY_INDEX:this.index_===a.VALUE_INDEX?e=n.VALUE_INDEX:this.index_===o.KEY_INDEX?e=n.KEY_INDEX:(r.assert(this.index_ instanceof u.PathIndex,"Unrecognized index type!"),e=this.index_.toString()),i[n.ORDER_BY]=p.stringify(e),this.startSet_&&(i[n.START_AT]=p.stringify(this.indexStartValue_),this.startNameSet_&&(i[n.START_AT]+=","+p.stringify(this.indexStartName_))),this.endSet_&&(i[n.END_AT]=p.stringify(this.indexEndValue_),this.endNameSet_&&(i[n.END_AT]+=","+p.stringify(this.indexEndName_))),this.limitSet_&&(this.isViewFromLeft()?i[n.LIMIT_TO_FIRST]=this.limit_:i[n.LIMIT_TO_LAST]=this.limit_),i)},t.WIRE_PROTOCOL_CONSTANTS_={INDEX_START_VALUE:"sp",INDEX_START_NAME:"sn",INDEX_END_VALUE:"ep",INDEX_END_NAME:"en",LIMIT:"l",VIEW_FROM:"vf",VIEW_FROM_LEFT:"l",VIEW_FROM_RIGHT:"r",INDEX:"i"},t.REST_QUERY_CONSTANTS_={ORDER_BY:"orderBy",PRIORITY_INDEX:"$priority",VALUE_INDEX:"$value",KEY_INDEX:"$key",START_AT:"startAt",END_AT:"endAt",LIMIT_TO_FIRST:"limitToFirst",LIMIT_TO_LAST:"limitToLast"},t.DEFAULT=new t,t}()},mxkr:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(t,e){this.name=t,this.amount=e}},mz3w:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(t){var e,r=n("xIGM").a.Symbol;return"function"==typeof r?r.observable?e=r.observable:(e=r("observable"),r.observable=e):e="@@observable",e}()},n3qp:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("XiwH"),i=n("R3TC"),o=n("p+VM"),s=n("JEJ4"),a=n("ertD");e.LimitedFilter=function(){function t(t){this.rangedFilter_=new r.RangedFilter(t),this.index_=t.getIndex(),this.limit_=t.getLimit(),this.reverse_=!t.isViewFromLeft()}return t.prototype.updateChild=function(t,e,n,r,s,a){return this.rangedFilter_.matches(new o.NamedNode(e,n))||(n=i.ChildrenNode.EMPTY_NODE),t.getImmediateChild(e).equals(n)?t:t.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(t,e,n,r,s,a):this.fullLimitUpdateChild_(t,e,n,s,a)},t.prototype.updateFullNode=function(t,e,n){var r;if(e.isLeafNode()||e.isEmpty())r=i.ChildrenNode.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<e.numChildren()&&e.isIndexed(this.index_)){r=i.ChildrenNode.EMPTY_NODE.withIndex(this.index_);var o=void 0;o=this.reverse_?e.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):e.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);for(var s=0;o.hasNext()&&s<this.limit_;){var a=o.getNext();if(!(this.reverse_?this.index_.compare(this.rangedFilter_.getStartPost(),a)<=0:this.index_.compare(a,this.rangedFilter_.getEndPost())<=0))break;r=r.updateImmediateChild(a.name,a.node),s++}}else{r=(r=e.withIndex(this.index_)).updatePriority(i.ChildrenNode.EMPTY_NODE);var u=void 0,c=void 0,l=void 0;if(o=void 0,this.reverse_){o=r.getReverseIterator(this.index_),u=this.rangedFilter_.getEndPost(),c=this.rangedFilter_.getStartPost();var h=this.index_.getCompare();l=function(t,e){return h(e,t)}}else o=r.getIterator(this.index_),u=this.rangedFilter_.getStartPost(),c=this.rangedFilter_.getEndPost(),l=this.index_.getCompare();s=0;for(var p=!1;o.hasNext();)a=o.getNext(),!p&&l(u,a)<=0&&(p=!0),p&&s<this.limit_&&l(a,c)<=0?s++:r=r.updateImmediateChild(a.name,i.ChildrenNode.EMPTY_NODE)}return this.rangedFilter_.getIndexedFilter().updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.rangedFilter_.getIndexedFilter()},t.prototype.getIndex=function(){return this.index_},t.prototype.fullLimitUpdateChild_=function(t,e,n,r,u){var c;if(this.reverse_){var l=this.index_.getCompare();c=function(t,e){return l(e,t)}}else c=this.index_.getCompare();var h=t;s.assert(h.numChildren()==this.limit_,"");var p=new o.NamedNode(e,n),f=this.reverse_?h.getFirstChild(this.index_):h.getLastChild(this.index_),d=this.rangedFilter_.matches(p);if(h.hasChild(e)){for(var v=h.getImmediateChild(e),y=r.getChildAfterChild(this.index_,f,this.reverse_);null!=y&&(y.name==e||h.hasChild(y.name));)y=r.getChildAfterChild(this.index_,y,this.reverse_);var g=null==y?1:c(y,p);if(d&&!n.isEmpty()&&g>=0)return null!=u&&u.trackChildChange(a.Change.childChangedChange(e,n,v)),h.updateImmediateChild(e,n);null!=u&&u.trackChildChange(a.Change.childRemovedChange(e,v));var _=h.updateImmediateChild(e,i.ChildrenNode.EMPTY_NODE);return null!=y&&this.rangedFilter_.matches(y)?(null!=u&&u.trackChildChange(a.Change.childAddedChange(y.name,y.node)),_.updateImmediateChild(y.name,y.node)):_}return n.isEmpty()?t:d&&c(f,p)>=0?(null!=u&&(u.trackChildChange(a.Change.childRemovedChange(f.name,f.node)),u.trackChildChange(a.Change.childAddedChange(e,n))),h.updateImmediateChild(e,n).updateImmediateChild(f.name,i.ChildrenNode.EMPTY_NODE)):t},t}()},nAqi:function(t,e,n){"use strict";e.a=function(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new o(t,e,n))}};var r=n("6Xbx"),i=n("E9/g"),o=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.accumulator,this.seed,this.hasSeed))},t}(),s=function(t){function e(e,n,r,i){t.call(this,e),this.accumulator=n,this._seed=r,this.hasSeed=i,this.index=0}return Object(r.__extends)(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(i.a)},opdF:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4");e.StatsListener=function(){function t(t){this.collection_=t,this.last_=null}return t.prototype.get=function(){var t=this.collection_.get(),e=r.clone(t);return this.last_&&r.forEach(this.last_,function(t,n){e[t]=e[t]-n}),this.last_=t,e},t}()},oyal:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4"),i=n("xfHL"),o=n("F1yO"),s=n("JEJ4");e.OnDisconnect=function(){function t(t,e){this.repo_=t,this.path_=e}return t.prototype.cancel=function(t){r.validateArgCount("OnDisconnect.cancel",0,1,arguments.length),r.validateCallback("OnDisconnect.cancel",1,t,!0);var e=new s.Deferred;return this.repo_.onDisconnectCancel(this.path_,e.wrapCallback(t)),e.promise},t.prototype.remove=function(t){r.validateArgCount("OnDisconnect.remove",0,1,arguments.length),i.validateWritablePath("OnDisconnect.remove",this.path_),r.validateCallback("OnDisconnect.remove",1,t,!0);var e=new s.Deferred;return this.repo_.onDisconnectSet(this.path_,null,e.wrapCallback(t)),e.promise},t.prototype.set=function(t,e){r.validateArgCount("OnDisconnect.set",1,2,arguments.length),i.validateWritablePath("OnDisconnect.set",this.path_),i.validateFirebaseDataArg("OnDisconnect.set",1,t,this.path_,!1),r.validateCallback("OnDisconnect.set",2,e,!0);var n=new s.Deferred;return this.repo_.onDisconnectSet(this.path_,t,n.wrapCallback(e)),n.promise},t.prototype.setWithPriority=function(t,e,n){r.validateArgCount("OnDisconnect.setWithPriority",2,3,arguments.length),i.validateWritablePath("OnDisconnect.setWithPriority",this.path_),i.validateFirebaseDataArg("OnDisconnect.setWithPriority",1,t,this.path_,!1),i.validatePriority("OnDisconnect.setWithPriority",2,e,!1),r.validateCallback("OnDisconnect.setWithPriority",3,n,!0);var o=new s.Deferred;return this.repo_.onDisconnectSetWithPriority(this.path_,t,e,o.wrapCallback(n)),o.promise},t.prototype.update=function(t,e){if(r.validateArgCount("OnDisconnect.update",1,2,arguments.length),i.validateWritablePath("OnDisconnect.update",this.path_),Array.isArray(t)){for(var n={},a=0;a<t.length;++a)n[""+a]=t[a];t=n,o.warn("Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}i.validateFirebaseMergeDataArg("OnDisconnect.update",1,t,this.path_,!1),r.validateCallback("OnDisconnect.update",2,e,!0);var u=new s.Deferred;return this.repo_.onDisconnectUpdate(this.path_,t,u.wrapCallback(e)),u.promise},t}()},"p+VM":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NamedNode=function(){function t(t,e){this.name=t,this.node=e}return t.Wrap=function(e,n){return new t(e,n)},t}()},pHuv:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("ZGn5"),i=n("43Go"),o=n("fvGz"),s=n("z8+r"),a=n("Htcq"),u=n("j3M3"),c=n("JEJ4"),l=n("F1yO"),h=n("JEJ4"),p=n("phte"),f=n("cm6g"),d=n("zPe/"),v=n("opdF"),y=n("lDZL"),g=n("xhf5"),_=n("6oqh"),m=n("8UuO");e.Repo=function(){function t(t,e,n){var r=this;this.repoInfo_=t,this.app=n,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new y.EventQueue,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=new s.SparseSnapshotTree,this.persistentConnection_=null;var i=new p.AuthTokenProvider(n);if(this.stats_=f.StatsManager.getCollection(t),e||l.beingCrawled())this.server_=new _.ReadonlyRestClient(this.repoInfo_,this.onDataUpdate_.bind(this),i),setTimeout(this.onConnectStatus_.bind(this,!0),0);else{var o=n.options.databaseAuthVariableOverride;if("undefined"!=typeof o&&null!==o){if("object"!=typeof o)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{c.stringify(o)}catch(t){throw new Error("Invalid authOverride provided: "+t)}}this.persistentConnection_=new g.PersistentConnection(this.repoInfo_,this.onDataUpdate_.bind(this),this.onConnectStatus_.bind(this),this.onServerInfoUpdate_.bind(this),i,o),this.server_=this.persistentConnection_}i.addTokenChangeListener(function(t){r.server_.refreshAuthToken(t)}),this.statsReporter_=f.StatsManager.getOrCreateReporter(t,function(){return new d.StatsReporter(r.stats_,r.server_)}),this.transactions_init_(),this.infoData_=new u.SnapshotHolder,this.infoSyncTree_=new a.SyncTree({startListening:function(t,e,n,i){var o=[],s=r.infoData_.getNode(t.path);return s.isEmpty()||(o=r.infoSyncTree_.applyServerOverwrite(t.path,s),setTimeout(function(){i("ok")},0)),o},stopListening:function(){}}),this.updateInfo_("connected",!1),this.serverSyncTree_=new a.SyncTree({startListening:function(t,e,n,i){return r.server_.listen(t,n,e,function(e,n){var o=i(e,n);r.eventQueue_.raiseEventsForChangedPath(t.path,o)}),[]},stopListening:function(t,e){r.server_.unlisten(t,e)}})}return t.prototype.toString=function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host},t.prototype.name=function(){return this.repoInfo_.namespace},t.prototype.serverTime=function(){var t=this.infoData_.getNode(new o.Path(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+t},t.prototype.generateServerValues=function(){return r.generateWithValues({timestamp:this.serverTime()})},t.prototype.onDataUpdate_=function(t,e,n,r){this.dataUpdateCount++;var s=new o.Path(t);e=this.interceptServerDataCallback_?this.interceptServerDataCallback_(t,e):e;var a=[];if(r)if(n){var u=h.map(e,function(t){return i.nodeFromJSON(t)});a=this.serverSyncTree_.applyTaggedQueryMerge(s,u,r)}else{var c=i.nodeFromJSON(e);a=this.serverSyncTree_.applyTaggedQueryOverwrite(s,c,r)}else if(n){var l=h.map(e,function(t){return i.nodeFromJSON(t)});a=this.serverSyncTree_.applyServerMerge(s,l)}else{var p=i.nodeFromJSON(e);a=this.serverSyncTree_.applyServerOverwrite(s,p)}var f=s;a.length>0&&(f=this.rerunTransactions_(s)),this.eventQueue_.raiseEventsForChangedPath(f,a)},t.prototype.interceptServerData_=function(t){this.interceptServerDataCallback_=t},t.prototype.onConnectStatus_=function(t){this.updateInfo_("connected",t),!1===t&&this.runOnDisconnectEvents_()},t.prototype.onServerInfoUpdate_=function(t){var e=this;l.each(t,function(t,n){e.updateInfo_(n,t)})},t.prototype.updateInfo_=function(t,e){var n=new o.Path("/.info/"+t),r=i.nodeFromJSON(e);this.infoData_.updateSnapshot(n,r);var s=this.infoSyncTree_.applyServerOverwrite(n,r);this.eventQueue_.raiseEventsForChangedPath(n,s)},t.prototype.getNextWriteId_=function(){return this.nextWriteId_++},t.prototype.setWithPriority=function(t,e,n,o){var s=this;this.log_("set",{path:t.toString(),value:e,priority:n});var a=this.generateServerValues(),u=i.nodeFromJSON(e,n),c=r.resolveDeferredValueSnapshot(u,a),h=this.getNextWriteId_(),p=this.serverSyncTree_.applyUserOverwrite(t,c,h,!0);this.eventQueue_.queueEvents(p),this.server_.put(t.toString(),u.val(!0),function(e,n){var r="ok"===e;r||l.warn("set at "+t+" failed: "+e);var i=s.serverSyncTree_.ackUserWrite(h,!r);s.eventQueue_.raiseEventsForChangedPath(t,i),s.callOnCompleteCallback(o,e,n)});var f=this.abortTransactions_(t);this.rerunTransactions_(f),this.eventQueue_.raiseEventsForChangedPath(f,[])},t.prototype.update=function(t,e,n){var o=this;this.log_("update",{path:t.toString(),value:e});var s=!0,a=this.generateServerValues(),u={};if(h.forEach(e,function(t,e){s=!1;var n=i.nodeFromJSON(e);u[t]=r.resolveDeferredValueSnapshot(n,a)}),s)l.log("update() called with empty data. Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var c=this.getNextWriteId_(),p=this.serverSyncTree_.applyUserMerge(t,u,c);this.eventQueue_.queueEvents(p),this.server_.merge(t.toString(),e,function(e,r){var i="ok"===e;i||l.warn("update at "+t+" failed: "+e);var s=o.serverSyncTree_.ackUserWrite(c,!i),a=s.length>0?o.rerunTransactions_(t):t;o.eventQueue_.raiseEventsForChangedPath(a,s),o.callOnCompleteCallback(n,e,r)}),h.forEach(e,function(e){var n=o.abortTransactions_(t.child(e));o.rerunTransactions_(n)}),this.eventQueue_.raiseEventsForChangedPath(t,[])}},t.prototype.runOnDisconnectEvents_=function(){var t=this;this.log_("onDisconnectEvents");var e=this.generateServerValues(),n=[];r.resolveDeferredValueTree(this.onDisconnect_,e).forEachTree(o.Path.Empty,function(e,r){n=n.concat(t.serverSyncTree_.applyServerOverwrite(e,r));var i=t.abortTransactions_(e);t.rerunTransactions_(i)}),this.onDisconnect_=new s.SparseSnapshotTree,this.eventQueue_.raiseEventsForChangedPath(o.Path.Empty,n)},t.prototype.onDisconnectCancel=function(t,e){var n=this;this.server_.onDisconnectCancel(t.toString(),function(r,i){"ok"===r&&n.onDisconnect_.forget(t),n.callOnCompleteCallback(e,r,i)})},t.prototype.onDisconnectSet=function(t,e,n){var r=this,o=i.nodeFromJSON(e);this.server_.onDisconnectPut(t.toString(),o.val(!0),function(e,i){"ok"===e&&r.onDisconnect_.remember(t,o),r.callOnCompleteCallback(n,e,i)})},t.prototype.onDisconnectSetWithPriority=function(t,e,n,r){var o=this,s=i.nodeFromJSON(e,n);this.server_.onDisconnectPut(t.toString(),s.val(!0),function(e,n){"ok"===e&&o.onDisconnect_.remember(t,s),o.callOnCompleteCallback(r,e,n)})},t.prototype.onDisconnectUpdate=function(t,e,n){var r=this;if(h.isEmpty(e))return l.log("onDisconnect().update() called with empty data. Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.server_.onDisconnectMerge(t.toString(),e,function(o,s){"ok"===o&&h.forEach(e,function(e,n){var o=i.nodeFromJSON(n);r.onDisconnect_.remember(t.child(e),o)}),r.callOnCompleteCallback(n,o,s)})},t.prototype.addEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.addEventRegistration(t,e):this.serverSyncTree_.addEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.removeEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.removeEventRegistration(t,e):this.serverSyncTree_.removeEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.interrupt=function(){this.persistentConnection_&&this.persistentConnection_.interrupt("repo_interrupt")},t.prototype.resume=function(){this.persistentConnection_&&this.persistentConnection_.resume("repo_interrupt")},t.prototype.stats=function(t){if(void 0===t&&(t=!1),"undefined"!=typeof console){var e;t?(this.statsListener_||(this.statsListener_=new v.StatsListener(this.stats_)),e=this.statsListener_.get()):e=this.stats_.get();var n=Object.keys(e).reduce(function(t,e){return Math.max(e.length,t)},0);h.forEach(e,function(t,e){for(var r=t.length;r<n+2;r++)t+=" ";console.log(t+e)})}},t.prototype.statsIncrementCounter=function(t){this.stats_.incrementCounter(t),this.statsReporter_.includeStat(t)},t.prototype.log_=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="";this.persistentConnection_&&(n=this.persistentConnection_.id+":"),l.log.apply(void 0,[n].concat(t))},t.prototype.callOnCompleteCallback=function(t,e,n){t&&l.exceptionGuard(function(){if("ok"==e)t(null);else{var r=(e||"error").toUpperCase(),i=r;n&&(i+=": "+n);var o=new Error(i);o.code=r,t(o)}})},Object.defineProperty(t.prototype,"database",{get:function(){return this.__database||(this.__database=new m.Database(this))},enumerable:!0,configurable:!0}),t}()},phte:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("F1yO");e.AuthTokenProvider=function(){function t(t){this.app_=t}return t.prototype.getToken=function(t){return this.app_.INTERNAL.getToken(t).then(null,function(t){return t&&"auth/token-not-initialized"===t.code?(r.log("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(t)})},t.prototype.addTokenChangeListener=function(t){this.app_.INTERNAL.addAuthTokenListener(t)},t.prototype.removeTokenChangeListener=function(t){this.app_.INTERNAL.removeAuthTokenListener(t)},t.prototype.notifyForInvalidToken=function(){var t='Provided authentication credentials for the app named "'+this.app_.name+'" are invalid. This usually indicates your app was not initialized correctly. ';r.warn(t+="credential"in this.app_.options?'Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.app_.options?'Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':'Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.')},t}()},qLnt:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n("1j/l"),i=n("NGRF"),o=n("B1iP"),s=n("8ofh"),a=n("NePw"),u=n("iNm/"),c=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,c=this._parents,h=this._unsubscribe,p=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var f=-1,d=c?c.length:0;n;)n.remove(this),n=++f<d&&c[f]||null;if(Object(o.a)(h)&&Object(s.a)(h).call(this)===a.a&&(e=!0,t=t||(a.a.e instanceof u.a?l(a.a.e.errors):[a.a.e])),Object(r.a)(p))for(f=-1,d=p.length;++f<d;){var v=p[f];if(Object(i.a)(v)&&Object(s.a)(v.unsubscribe).call(v)===a.a){e=!0,t=t||[];var y=a.a.e;y instanceof u.a?t=t.concat(l(y.errors)):t.push(y)}}if(e)throw new u.a(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if("function"!=typeof n._addParent){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(n),n._addParent(this),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.prototype._addParent=function(t){var e=this._parent,n=this._parents;e&&e!==t?n?-1===n.indexOf(t)&&n.push(t):this._parents=[t]:this._parent=t},t.EMPTY=((e=new t).closed=!0,e),t}();function l(t){return t.reduce(function(t,e){return t.concat(e instanceof u.a?e.errors:e)},[])}},qYrH:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("F1yO"),i=n("r9Yg"),o=n("cm6g"),s=n("hQ4o"),a=n("UcKF"),u=n("JEJ4"),c=n("JEJ4");e.FIREBASE_LONGPOLL_START_PARAM="start",e.FIREBASE_LONGPOLL_CLOSE_COMMAND="close",e.FIREBASE_LONGPOLL_COMMAND_CB_NAME="pLPCommand",e.FIREBASE_LONGPOLL_DATA_CB_NAME="pRTLPCB",e.FIREBASE_LONGPOLL_ID_PARAM="id",e.FIREBASE_LONGPOLL_PW_PARAM="pw",e.FIREBASE_LONGPOLL_SERIAL_PARAM="ser",e.FIREBASE_LONGPOLL_CALLBACK_ID_PARAM="cb",e.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM="seg",e.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET="ts",e.FIREBASE_LONGPOLL_DATA_PARAM="d",e.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM="disconn",e.FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM="dframe",e.BrowserPollConnection=function(){function t(t,e,n,i){this.connId=t,this.repoInfo=e,this.transportSessionId=n,this.lastSessionId=i,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=r.logWrapper(t),this.stats_=o.StatsManager.getCollection(e),this.urlFn=function(t){return e.connectionURL(a.LONG_POLLING,t)}}return t.prototype.open=function(t,n){var i=this;this.curSegmentNum=0,this.onDisconnect_=n,this.myPacketOrderer=new s.PacketReceiver(t),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(function(){i.log_("Timed out trying to connect."),i.onClosed_(),i.connectTimeoutTimer_=null},Math.floor(3e4)),r.executeWhenDOMReady(function(){if(!i.isClosed_){i.scriptTagHolder=new l(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[0],o=t[1],s=t[2];if(i.incrementIncomingBytes_(t),i.scriptTagHolder)if(i.connectTimeoutTimer_&&(clearTimeout(i.connectTimeoutTimer_),i.connectTimeoutTimer_=null),i.everConnected_=!0,r==e.FIREBASE_LONGPOLL_START_PARAM)i.id=o,i.password=s;else{if(r!==e.FIREBASE_LONGPOLL_CLOSE_COMMAND)throw new Error("Unrecognized command received: "+r);o?(i.scriptTagHolder.sendNewPolls=!1,i.myPacketOrderer.closeAfter(o,function(){i.onClosed_()})):i.onClosed_()}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1];i.incrementIncomingBytes_(t),i.myPacketOrderer.handleResponse(n,r)},function(){i.onClosed_()},i.urlFn);var t={};t[e.FIREBASE_LONGPOLL_START_PARAM]="t",t[e.FIREBASE_LONGPOLL_SERIAL_PARAM]=Math.floor(1e8*Math.random()),i.scriptTagHolder.uniqueCallbackIdentifier&&(t[e.FIREBASE_LONGPOLL_CALLBACK_ID_PARAM]=i.scriptTagHolder.uniqueCallbackIdentifier),t[a.VERSION_PARAM]=a.PROTOCOL_VERSION,i.transportSessionId&&(t[a.TRANSPORT_SESSION_PARAM]=i.transportSessionId),i.lastSessionId&&(t[a.LAST_SESSION_PARAM]=i.lastSessionId),!c.isNodeSdk()&&"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf(a.FORGE_DOMAIN)&&(t[a.REFERER_PARAM]=a.FORGE_REF);var n=i.urlFn(t);i.log_("Connecting via long-poll to "+n),i.scriptTagHolder.addTag(n,function(){})}})},t.prototype.start=function(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)},t.forceAllow=function(){t.forceAllow_=!0},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){return t.forceAllow_||!t.forceDisallow_&&"undefined"!=typeof document&&null!=document.createElement&&!r.isChromeExtensionContentScript()&&!r.isWindowsStoreApp()&&!c.isNodeSdk()},t.prototype.markConnectionHealthy=function(){},t.prototype.shutdown_=function(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))},t.prototype.close=function(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())},t.prototype.send=function(t){var e=u.stringify(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);for(var n=u.base64Encode(e),i=r.splitStringBySize(n,1840),o=0;o<i.length;o++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,i.length,i[o]),this.curSegmentNum++},t.prototype.addDisconnectPingFrame=function(t,n){if(!c.isNodeSdk()){this.myDisconnFrame=document.createElement("iframe");var r={};r[e.FIREBASE_LONGPOLL_DISCONN_FRAME_REQUEST_PARAM]="t",r[e.FIREBASE_LONGPOLL_ID_PARAM]=t,r[e.FIREBASE_LONGPOLL_PW_PARAM]=n,this.myDisconnFrame.src=this.urlFn(r),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}},t.prototype.incrementIncomingBytes_=function(t){var e=u.stringify(t).length;this.bytesReceived+=e,this.stats_.incrementCounter("bytes_received",e)},t}();var l=function(){function t(n,o,s,a){if(this.onDisconnect=s,this.urlFn=a,this.outstandingRequests=new i.CountedSet,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,c.isNodeSdk())this.commandCB=n,this.onMessageCB=o;else{this.uniqueCallbackIdentifier=r.LUIDGenerator(),window[e.FIREBASE_LONGPOLL_COMMAND_CB_NAME+this.uniqueCallbackIdentifier]=n,window[e.FIREBASE_LONGPOLL_DATA_CB_NAME+this.uniqueCallbackIdentifier]=o,this.myIFrame=t.createIFrame_();var u="";this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length)&&(u='<script>document.domain="'+document.domain+'";<\/script>');var l="<html><body>"+u+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(l),this.myIFrame.doc.close()}catch(t){r.log("frame writing exception"),t.stack&&r.log(t.stack),r.log(t)}}}return t.createIFrame_=function(){var t=document.createElement("iframe");if(t.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(t);try{t.contentWindow.document||r.log("No IE domain setting required")}catch(n){var e=document.domain;t.src="javascript:void((function(){document.open();document.domain='"+e+"';document.close();})())"}return t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document),t},t.prototype.close=function(){var n=this;if(this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout(function(){null!==n.myIFrame&&(document.body.removeChild(n.myIFrame),n.myIFrame=null)},Math.floor(0))),c.isNodeSdk()&&this.myID){var r={};r[e.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM]="t",r[e.FIREBASE_LONGPOLL_ID_PARAM]=this.myID,r[e.FIREBASE_LONGPOLL_PW_PARAM]=this.myPW;var i=this.urlFn(r);t.nodeRestRequest(i)}var o=this.onDisconnect;o&&(this.onDisconnect=null,o())},t.prototype.startLongPoll=function(t,e){for(this.myID=t,this.myPW=e,this.alive=!0;this.newRequest_(););},t.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.count()<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var t={};t[e.FIREBASE_LONGPOLL_ID_PARAM]=this.myID,t[e.FIREBASE_LONGPOLL_PW_PARAM]=this.myPW,t[e.FIREBASE_LONGPOLL_SERIAL_PARAM]=this.currentSerial;for(var n=this.urlFn(t),r="",i=0;this.pendingSegs.length>0&&this.pendingSegs[0].d.length+30+r.length<=1870;){var o=this.pendingSegs.shift();r=r+"&"+e.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM+i+"="+o.seg+"&"+e.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET+i+"="+o.ts+"&"+e.FIREBASE_LONGPOLL_DATA_PARAM+i+"="+o.d,i++}return this.addLongPollTag_(n+=r,this.currentSerial),!0}return!1},t.prototype.enqueueSegment=function(t,e,n){this.pendingSegs.push({seg:t,ts:e,d:n}),this.alive&&this.newRequest_()},t.prototype.addLongPollTag_=function(t,e){var n=this;this.outstandingRequests.add(e,1);var r=function(){n.outstandingRequests.remove(e),n.newRequest_()},i=setTimeout(r,Math.floor(25e3));this.addTag(t,function(){clearTimeout(i),r()})},t.prototype.addTag=function(t,e){var n=this;c.isNodeSdk()?this.doNodeLongPoll(t,e):setTimeout(function(){try{if(!n.sendNewPolls)return;var i=n.myIFrame.doc.createElement("script");i.type="text/javascript",i.async=!0,i.src=t,i.onload=i.onreadystatechange=function(){var t=i.readyState;t&&"loaded"!==t&&"complete"!==t||(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),e())},i.onerror=function(){r.log("Long-poll script failed to load: "+t),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(i)}catch(t){}},Math.floor(1))},t}();e.FirebaseIFrameScriptHolder=l},qgI0:function(t,e,n){"use strict";var r=n("xIGM"),i=n("kQVV"),o=n("mHG6"),s=n("NGRF"),a=n("AP4T"),u=n("X3fp"),c=n("6Xbx"),l=function(t){function e(e,n,r){t.call(this),this.parent=e,this.outerValue=n,this.outerIndex=r,this.index=0}return Object(c.__extends)(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n("E9/g").a),h=n("mz3w");e.a=function(t,e,n,c){var p=new l(t,n,c);if(p.closed)return null;if(e instanceof a.a)return e._isScalar?(p.next(e.value),p.complete(),null):(p.syncErrorThrowable=!0,e.subscribe(p));if(Object(i.a)(e)){for(var f=0,d=e.length;f<d&&!p.closed;f++)p.next(e[f]);p.closed||p.complete()}else{if(Object(o.a)(e))return e.then(function(t){p.closed||(p.next(t),p.complete())},function(t){return p.error(t)}).then(null,function(t){r.a.setTimeout(function(){throw t})}),p;if(e&&"function"==typeof e[u.a])for(var v=e[u.a]();;){var y=v.next();if(y.done){p.complete();break}if(p.next(y.value),p.closed)break}else if(e&&"function"==typeof e[h.a]){var g=e[h.a]();if("function"==typeof g.subscribe)return g.subscribe(new l(t,n,c));p.error(new TypeError("Provided object does not correctly implement Symbol.observable"))}else{var _=Object(s.a)(e)?"an invalid object":"'"+e+"'";p.error(new TypeError("You provided "+_+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable."))}}return null}},qqDE:function(t,e,n){"use strict";e.a=function(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new o(t,e))}};var r=n("6Xbx"),i=n("E9/g"),o=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.project,this.thisArg))},t}(),s=function(t){function e(e,n,r){t.call(this,e),this.project=n,this.count=0,this.thisArg=r||this}return Object(r.__extends)(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.a)},r9Yg:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4");e.CountedSet=function(){function t(){this.set={}}return t.prototype.add=function(t,e){this.set[t]=null===e||e},t.prototype.contains=function(t){return r.contains(this.set,t)},t.prototype.get=function(t){return this.contains(t)?this.set[t]:void 0},t.prototype.remove=function(t){delete this.set[t]},t.prototype.clear=function(){this.set={}},t.prototype.isEmpty=function(){return r.isEmpty(this.set)},t.prototype.count=function(){return r.getCount(this.set)},t.prototype.each=function(t){r.forEach(this.set,function(e,n){return t(e,n)})},t.prototype.keys=function(){var t=[];return r.forEach(this.set,function(e){t.push(e)}),t},t}()},rB9K:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("JEJ4"),o=n("stu6"),s=n("/fob"),a=n("Nq7v"),u=n("G0Qy"),c=n("F1yO"),l=n("fvGz"),h=n("xfHL"),p=n("JEJ4"),f=n("rtGJ"),d=n("JEJ4");e.Query=function(){function t(t,e,n,r){this.repo=t,this.path=e,this.queryParams_=n,this.orderByCalled_=r}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return i.assert(r,"Reference.ts has not been loaded"),r},set:function(t){r=t},enumerable:!0,configurable:!0}),t.validateQueryEndpoints_=function(t){var e=null,n=null;if(t.hasStart()&&(e=t.getIndexStartValue()),t.hasEnd()&&(n=t.getIndexEndValue()),t.getIndex()===o.KEY_INDEX){var r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",l="Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.";if(t.hasStart()){if(t.getIndexStartName()!=c.MIN_NAME)throw new Error(r);if("string"!=typeof e)throw new Error(l)}if(t.hasEnd()){if(t.getIndexEndName()!=c.MAX_NAME)throw new Error(r);if("string"!=typeof n)throw new Error(l)}}else if(t.getIndex()===s.PRIORITY_INDEX){if(null!=e&&!h.isValidPriority(e)||null!=n&&!h.isValidPriority(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), endAt(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(i.assert(t.getIndex()instanceof u.PathIndex||t.getIndex()===a.VALUE_INDEX,"unknown index type."),null!=e&&"object"==typeof e||null!=n&&"object"==typeof n)throw new Error("Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.")},t.validateLimit_=function(t){if(t.hasStart()&&t.hasEnd()&&t.hasLimit()&&!t.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.")},t.prototype.validateNoPreviousOrderByCall_=function(t){if(!0===this.orderByCalled_)throw new Error(t+": You can't combine multiple orderBy calls.")},t.prototype.getQueryParams=function(){return this.queryParams_},t.prototype.getRef=function(){return p.validateArgCount("Query.ref",0,0,arguments.length),new t.__referenceConstructor(this.repo,this.path)},t.prototype.on=function(e,n,r,i){p.validateArgCount("Query.on",2,4,arguments.length),h.validateEventType("Query.on",1,e,!1),p.validateCallback("Query.on",2,n,!1);var o=t.getCancelAndContextArgs_("Query.on",r,i);if("value"===e)this.onValueEvent(n,o.cancel,o.context);else{var s={};s[e]=n,this.onChildEvent(s,o.cancel,o.context)}return n},t.prototype.onValueEvent=function(t,e,n){var r=new f.ValueEventRegistration(t,e||null,n||null);this.repo.addEventCallbackForQuery(this,r)},t.prototype.onChildEvent=function(t,e,n){var r=new f.ChildEventRegistration(t,e,n);this.repo.addEventCallbackForQuery(this,r)},t.prototype.off=function(t,e,n){p.validateArgCount("Query.off",0,3,arguments.length),h.validateEventType("Query.off",1,t,!0),p.validateCallback("Query.off",2,e,!0),p.validateContextObject("Query.off",3,n,!0);var r=null,i=null;"value"===t?r=new f.ValueEventRegistration(e||null,null,n||null):t&&(e&&((i={})[t]=e),r=new f.ChildEventRegistration(i,null,n||null)),this.repo.removeEventCallbackForQuery(this,r)},t.prototype.once=function(e,n,r,i){var o=this;p.validateArgCount("Query.once",1,4,arguments.length),h.validateEventType("Query.once",1,e,!1),p.validateCallback("Query.once",2,n,!0);var s=t.getCancelAndContextArgs_("Query.once",r,i),a=!0,u=new d.Deferred;u.promise.catch(function(){});var c=function(t){a&&(a=!1,o.off(e,c),n&&n.bind(s.context)(t),u.resolve(t))};return this.on(e,c,function(t){o.off(e,c),s.cancel&&s.cancel.bind(s.context)(t),u.reject(t)}),u.promise},t.prototype.limitToFirst=function(e){if(p.validateArgCount("Query.limitToFirst",1,1,arguments.length),"number"!=typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToFirst: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.queryParams_.limitToFirst(e),this.orderByCalled_)},t.prototype.limitToLast=function(e){if(p.validateArgCount("Query.limitToLast",1,1,arguments.length),"number"!=typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToLast: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToLast: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.queryParams_.limitToLast(e),this.orderByCalled_)},t.prototype.orderByChild=function(e){if(p.validateArgCount("Query.orderByChild",1,1,arguments.length),"$key"===e)throw new Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===e)throw new Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');if("$value"===e)throw new Error('Query.orderByChild: "$value" is invalid. Use Query.orderByValue() instead.');h.validatePathString("Query.orderByChild",1,e,!1),this.validateNoPreviousOrderByCall_("Query.orderByChild");var n=new l.Path(e);if(n.isEmpty())throw new Error("Query.orderByChild: cannot pass in empty path. Use Query.orderByValue() instead.");var r=new u.PathIndex(n),i=this.queryParams_.orderBy(r);return t.validateQueryEndpoints_(i),new t(this.repo,this.path,i,!0)},t.prototype.orderByKey=function(){p.validateArgCount("Query.orderByKey",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByKey");var e=this.queryParams_.orderBy(o.KEY_INDEX);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByPriority=function(){p.validateArgCount("Query.orderByPriority",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByPriority");var e=this.queryParams_.orderBy(s.PRIORITY_INDEX);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByValue=function(){p.validateArgCount("Query.orderByValue",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByValue");var e=this.queryParams_.orderBy(a.VALUE_INDEX);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.startAt=function(e,n){void 0===e&&(e=null),p.validateArgCount("Query.startAt",0,2,arguments.length),h.validateFirebaseDataArg("Query.startAt",1,e,this.path,!0),h.validateKey("Query.startAt",2,n,!0);var r=this.queryParams_.startAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasStart())throw new Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return void 0===e&&(e=null,n=null),new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.endAt=function(e,n){void 0===e&&(e=null),p.validateArgCount("Query.endAt",0,2,arguments.length),h.validateFirebaseDataArg("Query.endAt",1,e,this.path,!0),h.validateKey("Query.endAt",2,n,!0);var r=this.queryParams_.endAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasEnd())throw new Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.equalTo=function(t,e){if(p.validateArgCount("Query.equalTo",1,2,arguments.length),h.validateFirebaseDataArg("Query.equalTo",1,t,this.path,!1),h.validateKey("Query.equalTo",2,e,!0),this.queryParams_.hasStart())throw new Error("Query.equalTo: Starting point was already set (by another call to startAt or equalTo).");if(this.queryParams_.hasEnd())throw new Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.startAt(t,e).endAt(t,e)},t.prototype.toString=function(){return p.validateArgCount("Query.toString",0,0,arguments.length),this.repo.toString()+this.path.toUrlEncodedString()},t.prototype.toJSON=function(){return p.validateArgCount("Query.toJSON",0,1,arguments.length),this.toString()},t.prototype.queryObject=function(){return this.queryParams_.getQueryObject()},t.prototype.queryIdentifier=function(){var t=this.queryObject(),e=c.ObjectToUniqueKey(t);return"{}"===e?"default":e},t.prototype.isEqual=function(e){if(p.validateArgCount("Query.isEqual",1,1,arguments.length),!(e instanceof t))throw new Error("Query.isEqual failed: First argument must be an instance of firebase.database.Query.");var n=this.repo===e.repo,r=this.path.equals(e.path),i=this.queryIdentifier()===e.queryIdentifier();return n&&r&&i},t.getCancelAndContextArgs_=function(t,e,n){var r={cancel:null,context:null};if(e&&n)r.cancel=e,p.validateCallback(t,3,r.cancel,!0),r.context=n,p.validateContextObject(t,4,r.context,!0);else if(e)if("object"==typeof e&&null!==e)r.context=e;else{if("function"!=typeof e)throw new Error(p.errorPrefix(t,3,!0)+" must either be a cancel callback or a context object.");r.cancel=e}return r},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!0,configurable:!0}),t}()},rbSf:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4"),i=n("fvGz"),o=n("gOHv");e.AckUserWrite=function(){function t(t,e,n){this.path=t,this.affectedTree=e,this.revert=n,this.type=o.OperationType.ACK_USER_WRITE,this.source=o.OperationSource.User}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return r.assert(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new i.Path(e));return new t(i.Path.Empty,n,this.revert)}return r.assert(this.path.getFront()===e,"operationForChild called for unrelated child."),new t(this.path.popFront(),this.affectedTree,this.revert)},t}()},rtGJ:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("GnQ5"),i=n("A4jy"),o=n("JEJ4"),s=n("JEJ4");e.ValueEventRegistration=function(){function t(t,e,n){this.callback_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){return"value"===t},t.prototype.createEvent=function(t,e){var n=e.getQueryParams().getIndex();return new i.DataEvent("value",this,new r.DataSnapshot(t.snapshotNode,e.getRef(),n))},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){s.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callback_;return function(){r.call(e,t.snapshot)}},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new i.CancelEvent(this,t,e):null},t.prototype.matches=function(e){return e instanceof t&&(!e.callback_||!this.callback_||e.callback_===this.callback_&&e.context_===this.context_)},t.prototype.hasAnyCallback=function(){return null!==this.callback_},t}(),e.ChildEventRegistration=function(){function t(t,e,n){this.callbacks_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){var e="children_added"===t?"child_added":t;return o.contains(this.callbacks_,e="children_removed"===e?"child_removed":e)},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new i.CancelEvent(this,t,e):null},t.prototype.createEvent=function(t,e){s.assert(null!=t.childName,"Child events should have a childName.");var n=e.getRef().child(t.childName),o=e.getQueryParams().getIndex();return new i.DataEvent(t.type,this,new r.DataSnapshot(t.snapshotNode,n,o),t.prevName)},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){s.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callbacks_[t.eventType];return function(){r.call(e,t.snapshot,t.prevName)}},t.prototype.matches=function(e){if(e instanceof t){if(!this.callbacks_||!e.callbacks_)return!0;if(this.context_===e.context_){var n=o.getCount(e.callbacks_);if(n===o.getCount(this.callbacks_)){if(1===n){var r=o.getAnyKey(e.callbacks_),i=o.getAnyKey(this.callbacks_);return!(i!==r||e.callbacks_[r]&&this.callbacks_[i]&&e.callbacks_[r]!==this.callbacks_[i])}return o.every(this.callbacks_,function(t,n){return e.callbacks_[t]===n})}}}return!1},t.prototype.hasAnyCallback=function(){return null!==this.callbacks_},t}()},ryHz:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("fAJX"),i=(n.n(r),n("1JLS")),o=(n.n(i),n("0dLi"));n.n(o)},sZ8A:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i,o,s=n("JEJ4");e.nextPushId=(r="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",i=0,o=[],function(t){var e,n=t===i;i=t;var a=new Array(8);for(e=7;e>=0;e--)a[e]=r.charAt(t%64),t=Math.floor(t/64);s.assert(0===t,"Cannot push at time == 0");var u=a.join("");if(n){for(e=11;e>=0&&63===o[e];e--)o[e]=0;o[e]++}else for(e=0;e<12;e++)o[e]=Math.floor(64*Math.random());for(e=0;e<12;e++)u+=r.charAt(o[e]);return s.assert(20===u.length,"nextPushId: Length should be 20."),u})},srua:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(t,e,n,r){this.name=t,this.description=e,this.imagePath=n,this.ingredients=r}},stu6:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("6Xbx"),o=n("GboV"),s=n("p+VM"),a=n("F1yO"),u=n("JEJ4"),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),Object.defineProperty(e,"__EMPTY_NODE",{get:function(){return r},set:function(t){r=t},enumerable:!0,configurable:!0}),e.prototype.compare=function(t,e){return a.nameCompare(t.name,e.name)},e.prototype.isDefinedOn=function(t){throw u.assertionError("KeyIndex.isDefinedOn not expected to be called.")},e.prototype.indexedValueChanged=function(t,e){return!1},e.prototype.minPost=function(){return s.NamedNode.MIN},e.prototype.maxPost=function(){return new s.NamedNode(a.MAX_NAME,r)},e.prototype.makePost=function(t,e){return u.assert("string"==typeof t,"KeyIndex indexValue must always be a string."),new s.NamedNode(t,r)},e.prototype.toString=function(){return".key"},e}(o.Index);e.KeyIndex=c,e.KEY_INDEX=new c},"tK9/":function(t,e,n){"use strict";e.a=function(t,e){return arguments.length>=2?function(n){return Object(s.a)(Object(r.a)(t,e),Object(i.a)(1),Object(o.a)(e))(n)}:function(e){return Object(s.a)(Object(r.a)(function(e,n,r){return t(e,n,r+1)}),Object(i.a)(1))(e)}};var r=n("nAqi"),i=n("fxt9"),o=n("x4z8"),s=n("ExCY")},tYwN:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("XtH8"),i=n("8UuO");e.Database=i.Database;var o=n("rB9K");e.Query=o.Query;var s=n("5pXs");e.Reference=s.Reference;var a=n("F1yO");e.enableLogging=a.enableLogging;var u=n("+VeI"),c=n("xvZM"),l=n("7qHF"),h=n("JEJ4"),p=i.Database.ServerValue;function f(e){var n=e.INTERNAL.registerService("database",function(t,e,n){return u.RepoManager.getInstance().databaseFromApp(t,n)},{Reference:s.Reference,Query:o.Query,Database:i.Database,enableLogging:a.enableLogging,INTERNAL:c,ServerValue:p,TEST_ACCESS:l},null,!0);h.isNodeSdk()&&(t.exports=n)}e.ServerValue=p,e.registerDatabase=f,f(r.default);var d=n("GnQ5");e.DataSnapshot=d.DataSnapshot;var v=n("oyal");e.OnDisconnect=v.OnDisconnect},uCc5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n("y8hQ"),o=n("R3TC"),s=n("JEJ4"),a=n("JEJ4"),u=n("bN85"),c=n("0npo");e.SyncPoint=function(){function t(){this.views_={}}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return s.assert(r,"Reference.ts has not been loaded"),r},set:function(t){s.assert(!r,"__referenceConstructor has already been defined"),r=t},enumerable:!0,configurable:!0}),t.prototype.isEmpty=function(){return a.isEmpty(this.views_)},t.prototype.applyOperation=function(t,e,n){var r=t.source.queryId;if(null!==r){var i=a.safeGet(this.views_,r);return s.assert(null!=i,"SyncTree gave us an op for an invalid query."),i.applyOperation(t,e,n)}var o=[];return a.forEach(this.views_,function(r,i){o=o.concat(i.applyOperation(t,e,n))}),o},t.prototype.addEventRegistration=function(t,e,n,r,s){var l=t.queryIdentifier(),h=a.safeGet(this.views_,l);if(!h){var p=n.calcCompleteEventCache(s?r:null),f=!1;p?f=!0:r instanceof o.ChildrenNode?(p=n.calcCompleteEventChildren(r),f=!1):(p=o.ChildrenNode.EMPTY_NODE,f=!1);var d=new u.ViewCache(new i.CacheNode(p,f,!1),new i.CacheNode(r,s,!1));h=new c.View(t,d),this.views_[l]=h}return h.addEventRegistration(e),h.getInitialEvents(e)},t.prototype.removeEventRegistration=function(e,n,r){var i=e.queryIdentifier(),o=[],s=[],u=this.hasCompleteView();if("default"===i){var c=this;a.forEach(this.views_,function(t,e){s=s.concat(e.removeEventRegistration(n,r)),e.isEmpty()&&(delete c.views_[t],e.getQuery().getQueryParams().loadsAllData()||o.push(e.getQuery()))})}else{var l=a.safeGet(this.views_,i);l&&(s=s.concat(l.removeEventRegistration(n,r)),l.isEmpty()&&(delete this.views_[i],l.getQuery().getQueryParams().loadsAllData()||o.push(l.getQuery())))}return u&&!this.hasCompleteView()&&o.push(new t.__referenceConstructor(e.repo,e.path)),{removed:o,events:s}},t.prototype.getQueryViews=function(){var t=this;return Object.keys(this.views_).map(function(e){return t.views_[e]}).filter(function(t){return!t.getQuery().getQueryParams().loadsAllData()})},t.prototype.getCompleteServerCache=function(t){var e=null;return a.forEach(this.views_,function(n,r){e=e||r.getCompleteServerCache(t)}),e},t.prototype.viewForQuery=function(t){if(t.getQueryParams().loadsAllData())return this.getCompleteView();var e=t.queryIdentifier();return a.safeGet(this.views_,e)},t.prototype.viewExistsForQuery=function(t){return null!=this.viewForQuery(t)},t.prototype.hasCompleteView=function(){return null!=this.getCompleteView()},t.prototype.getCompleteView=function(){return a.findValue(this.views_,function(t){return t.getQuery().getQueryParams().loadsAllData()})||null},t}()},uRSF:function(t,e,n){"use strict";e.a=function(t,e,n){return Object(r.a)(t,e,n)(this)};var r=n("xEhG")},usOC:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("XtH8"),i="https://firebasestorage.googleapis.com",o="/v0",s="/v0",a=12e4,u=6e4,c=-9007199254740991,l=function(){function t(t,e){this.code_=p(t),this.message_="Firebase Storage: "+e,this.serverResponse_=null,this.name_="FirebaseError"}return t.prototype.codeProp=function(){return this.code},t.prototype.codeEquals=function(t){return p(t)===this.codeProp()},t.prototype.serverResponseProp=function(){return this.serverResponse_},t.prototype.setServerResponseProp=function(t){this.serverResponse_=t},Object.defineProperty(t.prototype,"name",{get:function(){return this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"code",{get:function(){return this.code_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this.message_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.serverResponse_},enumerable:!0,configurable:!0}),t}(),h={UNKNOWN:"unknown",OBJECT_NOT_FOUND:"object-not-found",BUCKET_NOT_FOUND:"bucket-not-found",PROJECT_NOT_FOUND:"project-not-found",QUOTA_EXCEEDED:"quota-exceeded",UNAUTHENTICATED:"unauthenticated",UNAUTHORIZED:"unauthorized",RETRY_LIMIT_EXCEEDED:"retry-limit-exceeded",INVALID_CHECKSUM:"invalid-checksum",CANCELED:"canceled",INVALID_EVENT_NAME:"invalid-event-name",INVALID_URL:"invalid-url",INVALID_DEFAULT_BUCKET:"invalid-default-bucket",NO_DEFAULT_BUCKET:"no-default-bucket",CANNOT_SLICE_BLOB:"cannot-slice-blob",SERVER_FILE_WRONG_SIZE:"server-file-wrong-size",NO_DOWNLOAD_URL:"no-download-url",INVALID_ARGUMENT:"invalid-argument",INVALID_ARGUMENT_COUNT:"invalid-argument-count",APP_DELETED:"app-deleted",INVALID_ROOT_OPERATION:"invalid-root-operation",INVALID_FORMAT:"invalid-format",INTERNAL_ERROR:"internal-error"};function p(t){return"storage/"+t}function f(){return new l(h.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function d(){return new l(h.CANCELED,"User canceled the upload/download.")}function v(){return new l(h.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function y(t,e,n){return new l(h.INVALID_ARGUMENT,"Invalid argument in `"+e+"` at index "+t+": "+n)}function g(){return new l(h.APP_DELETED,"The Firebase app was deleted.")}function _(t,e){return new l(h.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function m(t){throw new l(h.INTERNAL_ERROR,"Internal error: "+t)}var b={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};function w(t){switch(t){case b.RAW:case b.BASE64:case b.BASE64URL:case b.DATA_URL:return;default:throw"Expected one of the event types: ["+b.RAW+", "+b.BASE64+", "+b.BASE64URL+", "+b.DATA_URL+"]."}}var E=function(t,e){this.data=t,this.contentType=e||null};function C(t,e){switch(t){case b.RAW:return new E(S(e));case b.BASE64:case b.BASE64URL:return new E(T(t,e));case b.DATA_URL:return new E(function(t){var e=new O(t);return e.base64?T(b.BASE64,e.rest):function(t){var e;try{e=decodeURIComponent(t)}catch(t){throw _(b.DATA_URL,"Malformed data URL.")}return S(e)}(e.rest)}(e),function(t){return new O(t).contentType}(e))}throw f()}function S(t){for(var e=[],n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r<=127)e.push(r);else if(r<=2047)e.push(192|r>>6,128|63&r);else if(55296==(64512&r))if(n<t.length-1&&56320==(64512&t.charCodeAt(n+1))){var i=r,o=t.charCodeAt(++n);e.push(240|(r=65536|(1023&i)<<10|1023&o)>>18,128|r>>12&63,128|r>>6&63,128|63&r)}else e.push(239,191,189);else 56320==(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function T(t,e){switch(t){case b.BASE64:var n=-1!==e.indexOf("-"),r=-1!==e.indexOf("_");if(n||r)throw _(t,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case b.BASE64URL:var i=-1!==e.indexOf("+"),o=-1!==e.indexOf("/");if(i||o)throw _(t,"Invalid character '"+(i?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/")}var s;try{s=atob(e)}catch(e){throw _(t,"Invalid character found")}for(var a=new Uint8Array(s.length),u=0;u<s.length;u++)a[u]=s.charCodeAt(u);return a}var O=function(){return function(t){this.base64=!1,this.contentType=null;var e=t.match(/^data:([^,]+)?,/);if(null===e)throw _(b.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var n,r,i=e[1]||null;null!=i&&(this.base64=(n=i).length>=(r=";base64").length&&n.substring(n.length-r.length)===r,this.contentType=this.base64?i.substring(0,i.length-";base64".length):i),this.rest=t.substring(t.indexOf(",")+1)}}(),I={STATE_CHANGED:"state_changed"},N={RUNNING:"running",PAUSING:"pausing",PAUSED:"paused",SUCCESS:"success",CANCELING:"canceling",CANCELED:"canceled",ERROR:"error"},x={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function A(t){switch(t){case N.RUNNING:case N.PAUSING:case N.CANCELING:return x.RUNNING;case N.PAUSED:return x.PAUSED;case N.SUCCESS:return x.SUCCESS;case N.CANCELED:return x.CANCELED;case N.ERROR:default:return x.ERROR}}function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function R(t,e){for(var n in t)P(t,n)&&e(n,t[n])}function k(t){if(null==t)return{};var e={};return R(t,function(t,n){e[t]=n}),e}function D(t){return new Promise(t)}function j(t){return Promise.resolve(t)}function M(t){return null!=t}function L(t){return void 0!==t}function F(t){return"function"==typeof t}function V(t){return"object"==typeof t}function U(t){return V(t)&&null!==t}function B(t){return"string"==typeof t||t instanceof String}function W(t){return q()&&t instanceof Blob}function q(){return"undefined"!=typeof Blob}var H=function(t){return t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT",t}({}),G=function(){function t(){var t=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=H.NO_ERROR,this.sendPromise_=D(function(e,n){t.xhr_.addEventListener("abort",function(n){t.errorCode_=H.ABORT,e(t)}),t.xhr_.addEventListener("error",function(n){t.errorCode_=H.NETWORK_ERROR,e(t)}),t.xhr_.addEventListener("load",function(n){e(t)})})}return t.prototype.send=function(t,e,n,r){var i=this;if(this.sent_)throw m("cannot .send() more than once");return this.sent_=!0,this.xhr_.open(e,t,!0),M(r)&&R(r,function(t,e){i.xhr_.setRequestHeader(t,e.toString())}),M(n)?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_},t.prototype.getErrorCode=function(){if(!this.sent_)throw m("cannot .getErrorCode() before sending");return this.errorCode_},t.prototype.getStatus=function(){if(!this.sent_)throw m("cannot .getStatus() before sending");try{return this.xhr_.status}catch(t){return-1}},t.prototype.getResponseText=function(){if(!this.sent_)throw m("cannot .getResponseText() before sending");return this.xhr_.responseText},t.prototype.abort=function(){this.xhr_.abort()},t.prototype.getResponseHeader=function(t){return this.xhr_.getResponseHeader(t)},t.prototype.addUploadProgressListener=function(t){M(this.xhr_.upload)&&this.xhr_.upload.addEventListener("progress",t)},t.prototype.removeUploadProgressListener=function(t){M(this.xhr_.upload)&&this.xhr_.upload.removeEventListener("progress",t)},t}(),z=function(){function t(){}return t.prototype.createXhrIo=function(){return new G},t}(),K=function(){function t(t,e){this.bucket=t,this.path_=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this.path_},enumerable:!0,configurable:!0}),t.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},t.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},t.makeFromBucketSpec=function(e){var n;try{n=t.makeFromUrl(e)}catch(n){return new t(e,"")}if(""===n.path)return n;throw new l(h.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+e+"'.")},t.makeFromUrl=function(e){for(var n=null,r=[{regex:new RegExp("^gs://([A-Za-z0-9.\\-]+)(/(.*))?$","i"),indices:{bucket:1,path:3},postModify:function(t){"/"===t.path.charAt(t.path.length-1)&&(t.path_=t.path_.slice(0,-1))}},{regex:new RegExp("^https?://firebasestorage\\.googleapis\\.com/v[A-Za-z0-9_]+/b/([A-Za-z0-9.\\-]+)/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:function(t){t.path_=decodeURIComponent(t.path)}}],i=0;i<r.length;i++){var o=r[i],s=o.regex.exec(e);if(s){var a=s[o.indices.path];a||(a=""),n=new t(s[o.indices.bucket],a),o.postModify(n);break}}if(null==n)throw function(t){return new l(h.INVALID_URL,"Invalid URL '"+t+"'.")}(e);return n},t}();function J(t){var e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)}function X(t){return i+o+t}function Q(t){return i+s+t}function Y(t){var e=encodeURIComponent,n="?";return R(t,function(t,r){var i=e(t)+"="+e(r);n=n+i+"&"}),n=n.slice(0,-1)}function Z(t,e){return e}var $=function(){return function(t,e,n,r){this.server=t,this.local=e||t,this.writable=!!n,this.xform=r||Z}}(),tt=null;function et(t,e){for(var n={},r=e.length,i=0;i<r;i++){var o=e[i];o.writable&&(n[o.server]=t[o.local])}return JSON.stringify(n)}function nt(t){if(!t||!V(t))throw"Expected Metadata object.";for(var e in t){var n=t[e];if("customMetadata"===e){if(!V(n))throw"Expected object for 'customMetadata' mapping."}else if(U(n))throw"Mapping for '"+e+"' cannot be an object."}}function rt(t,e,n){for(var r=e.length,i=e.length,o=0;o<e.length;o++)if(e[o].optional){r=o;break}var s,a,u,c;if(!(r<=n.length&&n.length<=i))throw(s=r)===(a=i)?(u=s,c=1===s?"argument":"arguments"):(u="between "+s+" and "+a,c="arguments"),new l(h.INVALID_ARGUMENT_COUNT,"Invalid argument count in `"+t+"`: Expected "+u+" "+c+", received "+n.length+".");for(o=0;o<n.length;o++)try{e[o].validator(n[o])}catch(e){throw e instanceof Error?y(o,t,e.message):y(o,t,e)}}var it=function(){return function(t,e){var n=this;this.validator=function(e){n.optional&&!L(e)||t(e)},this.optional=!!e}}();function ot(t,e){function n(t){if(!B(t))throw"Expected string."}var r,i,o;return t?(i=n,o=t,r=function(t){i(t),o(t)}):r=n,new it(r,e)}function st(t){return new it(nt,t)}function at(){return new it(function(t){if(!(function(t){return"number"==typeof t||t instanceof Number}(t)&&t>=0))throw"Expected a number 0 or greater."})}function ut(t,e){return new it(function(e){if(!(null===e||M(e)&&e instanceof Object))throw"Expected an Object.";void 0!==t&&null!==t&&t(e)},e)}function ct(t){return new it(function(t){if(null!==t&&!F(t))throw"Expected a Function."},t)}function lt(){return"undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}var ht=function(){function t(t,e){var n=0,r="";W(t)?(this.data_=t,n=t.size,r=t.type):t instanceof ArrayBuffer?(e?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),n=this.data_.length):t instanceof Uint8Array&&(e?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),n=t.length),this.size_=n,this.type_=r}return t.prototype.size=function(){return this.size_},t.prototype.type=function(){return this.type_},t.prototype.slice=function(e,n){if(W(this.data_)){var r=(o=e,s=n,(i=this.data_).webkitSlice?i.webkitSlice(o,s):i.mozSlice?i.mozSlice(o,s):i.slice?i.slice(o,s):null);return null===r?null:new t(r)}var i,o,s;return new t(new Uint8Array(this.data_.buffer,e,n-e),!0)},t.getBlob=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(q()){var r=e.map(function(e){return e instanceof t?e.data_:e});return new t((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=lt();if(void 0!==n){for(var r=new n,i=0;i<t.length;i++)r.append(t[i]);return r.getBlob()}if(q())return new Blob(t);throw Error("This browser doesn't seem to support creating Blobs")}).apply(null,r))}var i=e.map(function(t){return B(t)?C(b.RAW,t).data:t.data_}),o=0;i.forEach(function(t){o+=t.byteLength});var s=new Uint8Array(o),a=0;return i.forEach(function(t){for(var e=0;e<t.length;e++)s[a++]=t[e]}),new t(s,!0)},t.prototype.uploadData=function(){return this.data_},t}();function pt(t,e){return-1!==t.indexOf(e)}var ft=function(t,e,n,r){this.url=t,this.method=e,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]};function dt(t){if(!t)throw f()}function vt(t,e){return function(n,r){var i=function(t,e,n){var i=function(t){var e,n;try{e=JSON.parse(t)}catch(t){return null}return V(n=e)&&!Array.isArray(n)?e:null}(r);return null===i?null:function(t,e,n){for(var r={type:"file"},i=n.length,o=0;o<i;o++){var s=n[o];r[s.local]=s.xform(r,e[s.server])}return function(t,e){Object.defineProperty(t,"ref",{get:function(){var n=new K(t.bucket,t.fullPath);return e.makeStorageReference(n)}})}(r,t),r}(t,i,n)}(t,0,e);return dt(null!==i),i}}function yt(t){return function(e,n){var r;return(r=401===e.getStatus()?new l(h.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===e.getStatus()?new l(h.QUOTA_EXCEEDED,"Quota for bucket '"+t.bucket+"' exceeded, please view quota on https://firebase.google.com/pricing/."):403===e.getStatus()?new l(h.UNAUTHORIZED,"User does not have permission to access '"+t.path+"'."):n).setServerResponseProp(n.serverResponseProp()),r}}function gt(t){var e=yt(t);return function(n,r){var i=e(n,r);return 404===n.getStatus()&&(i=new l(h.OBJECT_NOT_FOUND,"Object '"+t.path+"' does not exist.")),i.setServerResponseProp(r.serverResponseProp()),i}}function _t(t,e,n){var r=X(e.fullServerUrl()),i=t.maxOperationRetryTime(),o=new ft(r,"GET",vt(t,n),i);return o.errorHandler=gt(e),o}function mt(t,e,n){var r=k(n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=function(t,e){return e&&e.type()||"application/octet-stream"}(0,e)),r}var bt=function(t,e,n,r){this.current=t,this.total=e,this.finalized=!!n,this.metadata=r||null};function wt(t,e){var n;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch(t){dt(!1)}return dt(pt(e||["active"],n)),n}var Et=function(){return function(t,e,n){if(F(t)||M(e)||M(n))this.next=t,this.error=e||null,this.complete=n||null;else{var r=t;this.next=r.next||null,this.error=r.error||null,this.complete=r.complete||null}}}(),Ct=function(){function t(t,e,n,r,i,o){this.bytesTransferred=t,this.totalBytes=e,this.state=n,this.metadata=r,this.task=i,this.ref=o}return Object.defineProperty(t.prototype,"downloadURL",{get:function(){if(null!==this.metadata){var t=this.metadata.downloadURLs;return null!=t&&null!=t[0]?t[0]:null}return null},enumerable:!0,configurable:!0}),t}();function St(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];j(!0).then(function(){t.apply(null,e)})}}var Tt=function(){function t(t,e,n,r,i,o){void 0===o&&(o=null);var s=this;this.transferred_=0,this.needToFetchStatus_=!1,this.needToFetchMetadata_=!1,this.observers_=[],this.error_=null,this.uploadUrl_=null,this.request_=null,this.chunkMultiplier_=1,this.resolve_=null,this.reject_=null,this.ref_=t,this.authWrapper_=e,this.location_=n,this.blob_=i,this.metadata_=o,this.mappings_=r,this.resumable_=this.shouldDoResumable_(this.blob_),this.state_=N.RUNNING,this.errorHandler_=function(t){s.request_=null,s.chunkMultiplier_=1,t.codeEquals(h.CANCELED)?(s.needToFetchStatus_=!0,s.completeTransitions_()):(s.error_=t,s.transition_(N.ERROR))},this.metadataErrorHandler_=function(t){s.request_=null,t.codeEquals(h.CANCELED)?s.completeTransitions_():(s.error_=t,s.transition_(N.ERROR))},this.promise_=D(function(t,e){s.resolve_=t,s.reject_=e,s.start_()}),this.promise_.then(null,function(){})}return t.prototype.makeProgressCallback_=function(){var t=this,e=this.transferred_;return function(n,r){t.updateProgress_(e+n)}},t.prototype.shouldDoResumable_=function(t){return t.size()>262144},t.prototype.start_=function(){this.state_===N.RUNNING&&null===this.request_&&(this.resumable_?null===this.uploadUrl_?this.createResumable_():this.needToFetchStatus_?this.fetchStatus_():this.needToFetchMetadata_?this.fetchMetadata_():this.continueUpload_():this.oneShotUpload_())},t.prototype.resolveToken_=function(t){var e=this;this.authWrapper_.getAuthToken().then(function(n){switch(e.state_){case N.RUNNING:t(n);break;case N.CANCELING:e.transition_(N.CANCELED);break;case N.PAUSING:e.transition_(N.PAUSED)}})},t.prototype.createResumable_=function(){var t=this;this.resolveToken_(function(e){var n=function(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),s=mt(e,r,i),a={name:s.fullPath},u=Q(o),c={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":r.size(),"X-Goog-Upload-Header-Content-Type":s.contentType,"Content-Type":"application/json; charset=utf-8"},l=et(s,n),h=t.maxUploadRetryTime(),p=new ft(u,"POST",function(t,e){var n;wt(t);try{n=t.getResponseHeader("X-Goog-Upload-URL")}catch(t){dt(!1)}return dt(B(n)),n},h);return p.urlParams=a,p.headers=c,p.body=l,p.errorHandler=yt(e),p}(t.authWrapper_,t.location_,t.mappings_,t.blob_,t.metadata_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.uploadUrl_=e,t.needToFetchStatus_=!1,t.completeTransitions_()},t.errorHandler_)})},t.prototype.fetchStatus_=function(){var t=this,e=this.uploadUrl_;this.resolveToken_(function(n){var r=function(e,n,r,i){var o=t.authWrapper_.maxUploadRetryTime(),s=new ft(r,"POST",function(t,e){var n,r=wt(t,["active","final"]);try{n=t.getResponseHeader("X-Goog-Upload-Size-Received")}catch(t){dt(!1)}var o=parseInt(n,10);return dt(!isNaN(o)),new bt(o,i.size(),"final"===r)},o);return s.headers={"X-Goog-Upload-Command":"query"},s.errorHandler=yt(n),s}(0,t.location_,e,t.blob_),i=t.authWrapper_.makeRequest(r,n);t.request_=i,i.getPromise().then(function(e){e=e,t.request_=null,t.updateProgress_(e.current),t.needToFetchStatus_=!1,e.finalized&&(t.needToFetchMetadata_=!0),t.completeTransitions_()},t.errorHandler_)})},t.prototype.continueUpload_=function(){var t=this,e=262144*this.chunkMultiplier_,n=new bt(this.transferred_,this.blob_.size()),r=this.uploadUrl_;this.resolveToken_(function(i){var o;try{o=function(t,e,n,r,i,o,s,a){var u=new bt(0,0);if(s?(u.current=s.current,u.total=s.total):(u.current=0,u.total=r.size()),r.size()!==u.total)throw new l(h.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.");var c=u.total-u.current,p=c;i>0&&(p=Math.min(p,i));var f=u.current,d={"X-Goog-Upload-Command":p===c?"upload, finalize":"upload","X-Goog-Upload-Offset":u.current},y=r.slice(f,f+p);if(null===y)throw v();var g=e.maxUploadRetryTime(),_=new ft(n,"POST",function(t,n){var i,s=wt(t,["active","final"]),a=u.current+p,c=r.size();return i="final"===s?vt(e,o)(t,n):null,new bt(a,c,"final"===s,i)},g);return _.headers=d,_.body=y.uploadData(),_.progressCallback=a||null,_.errorHandler=yt(t),_}(t.location_,t.authWrapper_,r,t.blob_,e,t.mappings_,n,t.makeProgressCallback_())}catch(e){return t.error_=e,void t.transition_(N.ERROR)}var s=t.authWrapper_.makeRequest(o,i);t.request_=s,s.getPromise().then(function(e){t.increaseMultiplier_(),t.request_=null,t.updateProgress_(e.current),e.finalized?(t.metadata_=e.metadata,t.transition_(N.SUCCESS)):t.completeTransitions_()},t.errorHandler_)})},t.prototype.increaseMultiplier_=function(){262144*this.chunkMultiplier_<33554432&&(this.chunkMultiplier_*=2)},t.prototype.fetchMetadata_=function(){var t=this;this.resolveToken_(function(e){var n=_t(t.authWrapper_,t.location_,t.mappings_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.metadata_=e,t.transition_(N.SUCCESS)},t.metadataErrorHandler_)})},t.prototype.oneShotUpload_=function(){var t=this;this.resolveToken_(function(e){var n=function(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),s={"X-Goog-Upload-Protocol":"multipart"},a=function(){for(var t="",e=0;e<2;e++)t+=Math.random().toString().slice(2);return t}();s["Content-Type"]="multipart/related; boundary="+a;var u=mt(e,r,i),c=et(u,n),l=ht.getBlob("--"+a+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+c+"\r\n--"+a+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",r,"\r\n--"+a+"--");if(null===l)throw v();var h={name:u.fullPath},p=Q(o),f=t.maxUploadRetryTime(),d=new ft(p,"POST",vt(t,n),f);return d.urlParams=h,d.headers=s,d.body=l.uploadData(),d.errorHandler=yt(e),d}(t.authWrapper_,t.location_,t.mappings_,t.blob_,t.metadata_),r=t.authWrapper_.makeRequest(n,e);t.request_=r,r.getPromise().then(function(e){t.request_=null,t.metadata_=e,t.updateProgress_(t.blob_.size()),t.transition_(N.SUCCESS)},t.errorHandler_)})},t.prototype.updateProgress_=function(t){var e=this.transferred_;this.transferred_=t,this.transferred_!==e&&this.notifyObservers_()},t.prototype.transition_=function(t){if(this.state_!==t)switch(t){case N.CANCELING:case N.PAUSING:this.state_=t,null!==this.request_&&this.request_.cancel();break;case N.RUNNING:var e=this.state_===N.PAUSED;this.state_=t,e&&(this.notifyObservers_(),this.start_());break;case N.PAUSED:this.state_=t,this.notifyObservers_();break;case N.CANCELED:this.error_=d(),this.state_=t,this.notifyObservers_();break;case N.ERROR:case N.SUCCESS:this.state_=t,this.notifyObservers_()}},t.prototype.completeTransitions_=function(){switch(this.state_){case N.PAUSING:this.transition_(N.PAUSED);break;case N.CANCELING:this.transition_(N.CANCELED);break;case N.RUNNING:this.start_()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=A(this.state_);return new Ct(this.transferred_,this.blob_.size(),t,this.metadata_,this,this.ref_)},enumerable:!0,configurable:!0}),t.prototype.on=function(t,e,n,r){void 0===e&&(e=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0);var i="Expected a function or an Object with one of `next`, `error`, `complete` properties.",o=ct(!0).validator,s=ut(null,!0).validator;function a(t){try{return void o(t)}catch(t){}try{if(s(t),!(L(t.next)||L(t.error)||L(t.complete)))throw"";return}catch(t){throw i}}rt("on",[ot(function(e){if(t!==I.STATE_CHANGED)throw"Expected one of the event types: ["+I.STATE_CHANGED+"]."}),ut(a,!0),ct(!0),ct(!0)],arguments);var u=this;function c(t){return function(e,n,i){null!==t&&rt("on",t,arguments);var o=new Et(e,n,r);return u.addObserver_(o),function(){u.removeObserver_(o)}}}var l=[ut(function(t){if(null===t)throw i;a(t)}),ct(!0),ct(!0)];return L(e)||L(n)||L(r)?c(null)(e,n,r):c(l)},t.prototype.then=function(t,e){return this.promise_.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype.addObserver_=function(t){this.observers_.push(t),this.notifyObserver_(t)},t.prototype.removeObserver_=function(t){var e,n;-1!==(n=(e=this.observers_).indexOf(t))&&e.splice(n,1)},t.prototype.notifyObservers_=function(){var t=this;this.finishPromise_(),Array.prototype.slice.call(this.observers_).forEach(function(e){t.notifyObserver_(e)})},t.prototype.finishPromise_=function(){if(null!==this.resolve_){var t=!0;switch(A(this.state_)){case x.SUCCESS:St(this.resolve_.bind(null,this.snapshot))();break;case x.CANCELED:case x.ERROR:St(this.reject_.bind(null,this.error_))();break;default:t=!1}t&&(this.resolve_=null,this.reject_=null)}},t.prototype.notifyObserver_=function(t){switch(A(this.state_)){case x.RUNNING:case x.PAUSED:null!==t.next&&St(t.next.bind(t,this.snapshot))();break;case x.SUCCESS:null!==t.complete&&St(t.complete.bind(t))();break;case x.CANCELED:case x.ERROR:null!==t.error&&St(t.error.bind(t,this.error_))();break;default:null!==t.error&&St(t.error.bind(t,this.error_))()}},t.prototype.resume=function(){rt("resume",[],arguments);var t=this.state_===N.PAUSED||this.state_===N.PAUSING;return t&&this.transition_(N.RUNNING),t},t.prototype.pause=function(){rt("pause",[],arguments);var t=this.state_===N.RUNNING;return t&&this.transition_(N.PAUSING),t},t.prototype.cancel=function(){rt("cancel",[],arguments);var t=this.state_===N.RUNNING||this.state_===N.PAUSING;return t&&this.transition_(N.CANCELING),t},t}(),Ot=function(){function t(t,e){this.authWrapper=t,this.location=e instanceof K?e:K.makeFromUrl(e)}return t.prototype.toString=function(){return rt("toString",[],arguments),"gs://"+this.location.bucket+"/"+this.location.path},t.prototype.newRef=function(e,n){return new t(e,n)},t.prototype.mappings=function(){return function(){if(tt)return tt;var t=[];t.push(new $("bucket")),t.push(new $("generation")),t.push(new $("metageneration")),t.push(new $("name","fullPath",!0));var e=new $("name");e.xform=function(t,e){return function(t){return!B(t)||t.length<2?t:J(t=t)}(e)},t.push(e);var n=new $("size");return n.xform=function(t,e){return M(e)?+e:e},t.push(n),t.push(new $("timeCreated")),t.push(new $("updated")),t.push(new $("md5Hash",null,!0)),t.push(new $("cacheControl",null,!0)),t.push(new $("contentDisposition",null,!0)),t.push(new $("contentEncoding",null,!0)),t.push(new $("contentLanguage",null,!0)),t.push(new $("contentType",null,!0)),t.push(new $("metadata","customMetadata",!0)),t.push(new $("downloadTokens","downloadURLs",!1,function(t,e){if(!(B(e)&&e.length>0))return[];var n=encodeURIComponent;return e.split(",").map(function(e){var r,i=t.fullPath;return r="/b/"+n(t.bucket)+"/o/"+n(i),"https://firebasestorage.googleapis.com"+o+r+Y({alt:"media",token:e})})})),tt=t}()},t.prototype.child=function(t){rt("child",[ot()],arguments);var e=function(t,e){var n=e.split("/").filter(function(t){return t.length>0}).join("/");return 0===t.length?n:t+"/"+n}(this.location.path,t),n=new K(this.location.bucket,e);return this.newRef(this.authWrapper,n)},Object.defineProperty(t.prototype,"parent",{get:function(){var t=function(t){if(0==t.length)return null;var e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}(this.location.path);if(null===t)return null;var e=new K(this.location.bucket,t);return this.newRef(this.authWrapper,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){var t=new K(this.location.bucket,"");return this.newRef(this.authWrapper,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this.location.bucket},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this.location.path},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return J(this.location.path)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this.authWrapper.service()},enumerable:!0,configurable:!0}),t.prototype.put=function(t,e){return void 0===e&&(e=null),rt("put",[new it(function(t){if(!(t instanceof Uint8Array||t instanceof ArrayBuffer||q()&&t instanceof Blob))throw"Expected Blob or File."}),st(!0)],arguments),this.throwIfRoot_("put"),new Tt(this,this.authWrapper,this.location,this.mappings(),new ht(t),e)},t.prototype.putString=function(t,e,n){void 0===e&&(e=b.RAW),rt("putString",[ot(),ot(w,!0),st(!0)],arguments),this.throwIfRoot_("putString");var r=C(e,t),i=k(n);return!M(i.contentType)&&M(r.contentType)&&(i.contentType=r.contentType),new Tt(this,this.authWrapper,this.location,this.mappings(),new ht(r.data,!0),i)},t.prototype.delete=function(){rt("delete",[],arguments),this.throwIfRoot_("delete");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=function(t,e){var n=X(e.fullServerUrl()),r=t.maxOperationRetryTime(),i=new ft(n,"DELETE",function(t,e){},r);return i.successCodes=[200,204],i.errorHandler=gt(e),i}(t.authWrapper,t.location);return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.getMetadata=function(){rt("getMetadata",[],arguments),this.throwIfRoot_("getMetadata");var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=_t(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.updateMetadata=function(t){rt("updateMetadata",[st()],arguments),this.throwIfRoot_("updateMetadata");var e=this;return this.authWrapper.getAuthToken().then(function(n){var r=function(t,e,n,r){var i=X(e.fullServerUrl()),o=et(n,r),s=t.maxOperationRetryTime(),a=new ft(i,"PATCH",vt(t,r),s);return a.headers={"Content-Type":"application/json; charset=utf-8"},a.body=o,a.errorHandler=gt(e),a}(e.authWrapper,e.location,t,e.mappings());return e.authWrapper.makeRequest(r,n).getPromise()})},t.prototype.getDownloadURL=function(){return rt("getDownloadURL",[],arguments),this.throwIfRoot_("getDownloadURL"),this.getMetadata().then(function(t){var e=t.downloadURLs[0];if(M(e))return e;throw new l(h.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")})},t.prototype.throwIfRoot_=function(t){if(""===this.location.path)throw function(t){return new l(h.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(t)},t}(),It=function(){function t(t){this.promise_=function(t){return Promise.reject(t)}(t)}return t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){void 0===t&&(t=!1)},t}(),Nt=function(){function t(){this.map_={},this.id_=c}return t.prototype.addRequest=function(t){var e=this.id_;this.id_++,this.map_[e]=t;var n=this;function r(){delete n.map_[e]}t.getPromise().then(r,r)},t.prototype.clear=function(){R(this.map_,function(t,e){e&&e.cancel(!0)}),this.map_={}},t}(),xt=function(){function t(e,n,r,i,o){if(this.bucket_=null,this.deleted_=!1,this.app_=e,null!==this.app_){var s=this.app_.options;M(s)&&(this.bucket_=t.extractBucket_(s))}this.storageRefMaker_=n,this.requestMaker_=r,this.pool_=o,this.service_=i,this.maxOperationRetryTime_=a,this.maxUploadRetryTime_=u,this.requestMap_=new Nt}return t.extractBucket_=function(t){var e=t.storageBucket||null;return null==e?null:K.makeFromBucketSpec(e).bucket},t.prototype.getAuthToken=function(){return null!==this.app_&&M(this.app_.INTERNAL)&&M(this.app_.INTERNAL.getToken)?this.app_.INTERNAL.getToken().then(function(t){return null!==t?t.accessToken:null},function(t){return null}):j(null)},t.prototype.bucket=function(){if(this.deleted_)throw g();return this.bucket_},t.prototype.service=function(){return this.service_},t.prototype.makeStorageReference=function(t){return this.storageRefMaker_(this,t)},t.prototype.makeRequest=function(t,e){if(this.deleted_)return new It(g());var n=this.requestMaker_(t,e,this.pool_);return this.requestMap_.addRequest(n),n},t.prototype.deleteApp=function(){this.deleted_=!0,this.app_=null,this.requestMap_.clear()},t.prototype.maxUploadRetryTime=function(){return this.maxUploadRetryTime_},t.prototype.setMaxUploadRetryTime=function(t){this.maxUploadRetryTime_=t},t.prototype.maxOperationRetryTime=function(){return this.maxOperationRetryTime_},t.prototype.setMaxOperationRetryTime=function(t){this.maxOperationRetryTime_=t},t}(),At=function(){function t(t,e,n,r,i,o,s,a,u,c,l){this.pendingXhr_=null,this.backoffId_=null,this.resolve_=null,this.reject_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=t,this.method_=e,this.headers_=n,this.body_=r,this.successCodes_=i.slice(),this.additionalRetryCodes_=o.slice(),this.callback_=s,this.errorCallback_=a,this.progressCallback_=c,this.timeout_=u,this.pool_=l;var h=this;this.promise_=D(function(t,e){h.resolve_=t,h.reject_=e,h.start_()})}return t.prototype.start_=function(){var t=this;function e(e,n){var r,i=t.resolve_,o=t.reject_,s=n.xhr;if(n.wasSuccessCode)try{var a=t.callback_(s,s.getResponseText());L(a)?i(a):i()}catch(t){o(t)}else null!==s?((r=f()).setServerResponseProp(s.getResponseText()),o(t.errorCallback_?t.errorCallback_(s,r):r)):o(r=n.canceled?t.appDelete_?g():d():new l(h.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again."))}this.canceled_?e(0,new Pt(!1,null,!0)):this.backoffId_=function(t,e,n){var r=1,i=null,o=!1,s=0;function a(){return 2===s}var u=!1;function c(){u||(u=!0,e.apply(null,arguments))}function l(e){i=setTimeout(function(){i=null,t(h,a())},e)}function h(t){for(var e,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];u||(t?c.apply(null,arguments):a()||o?c.apply(null,arguments):(r<64&&(r*=2),1===s?(s=2,e=0):e=1e3*(r+Math.random()),l(e)))}var p=!1;function f(t){p||(p=!0,u||(null!==i?(t||(s=2),clearTimeout(i),l(0)):t||(s=1)))}return l(0),setTimeout(function(){o=!0,f(!0)},n),f}(function(e,n){if(n)e(!1,new Pt(!1,null,!0));else{var r=t.pool_.createXhrIo();t.pendingXhr_=r,null!==t.progressCallback_&&r.addUploadProgressListener(i),r.send(t.url_,t.method_,t.body_,t.headers_).then(function(n){null!==t.progressCallback_&&n.removeUploadProgressListener(i),t.pendingXhr_=null;var r=(n=n).getErrorCode()===H.NO_ERROR,o=n.getStatus();if(r&&!t.isRetryStatusCode_(o)){var s=pt(t.successCodes_,o);e(!0,new Pt(s,n))}else{var a=n.getErrorCode()===H.ABORT;e(!1,new Pt(!1,null,a))}})}function i(e){null!==t.progressCallback_&&t.progressCallback_(e.loaded,e.lengthComputable?e.total:-1)}},e,this.timeout_)},t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){this.canceled_=!0,this.appDelete_=t||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingXhr_&&this.pendingXhr_.abort()},t.prototype.isRetryStatusCode_=function(t){var e=t>=500&&t<600,n=pt([408,429],t),r=pt(this.additionalRetryCodes_,t);return e||n||r},t}(),Pt=function(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n};function Rt(t,e,n){var i=Y(t.urlParams),o=t.url+i,s=k(t.headers);return function(t,e){null!==e&&e.length>0&&(t.Authorization="Firebase "+e)}(s,e),function(t){t["X-Firebase-Storage-Version"]="webjs/"+("undefined"!=typeof r.default?r.default.SDK_VERSION:"AppManager")}(s),new At(o,t.method,s,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,n)}var kt=function(){function t(t,e,n){if(this.bucket_=null,this.authWrapper_=new xt(t,function(t,e){return new Ot(t,e)},Rt,this,e),this.app_=t,null!=n)this.bucket_=K.makeFromBucketSpec(n);else{var r=this.authWrapper_.bucket();null!=r&&(this.bucket_=new K(r,""))}this.internals_=new Dt(this)}return t.prototype.ref=function(t){if(rt("ref",[ot(function(t){if(/^[A-Za-z]+:\/\//.test(t))throw"Expected child path but got a URL, use refFromURL instead."},!0)],arguments),null==this.bucket_)throw new Error("No Storage Bucket defined in Firebase Options.");var e=new Ot(this.authWrapper_,this.bucket_);return null!=t?e.child(t):e},t.prototype.refFromURL=function(t){return rt("refFromURL",[ot(function(t){if(!/^[A-Za-z]+:\/\//.test(t))throw"Expected full URL but got a child path, use ref instead.";try{K.makeFromUrl(t)}catch(t){throw"Expected valid full URL but got an invalid one."}},!1)],arguments),new Ot(this.authWrapper_,t)},Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this.authWrapper_.maxUploadRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxUploadRetryTime=function(t){rt("setMaxUploadRetryTime",[at()],arguments),this.authWrapper_.setMaxUploadRetryTime(t)},Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this.authWrapper_.maxOperationRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxOperationRetryTime=function(t){rt("setMaxOperationRetryTime",[at()],arguments),this.authWrapper_.setMaxOperationRetryTime(t)},Object.defineProperty(t.prototype,"app",{get:function(){return this.app_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"INTERNAL",{get:function(){return this.internals_},enumerable:!0,configurable:!0}),t}(),Dt=function(){function t(t){this.service_=t}return t.prototype.delete=function(){return this.service_.authWrapper_.deleteApp(),j(void 0)},t}();e.registerStorage=Lt;var jt="storage";function Mt(t,e,n){return new kt(t,new z,n)}function Lt(t){t.INTERNAL.registerService(jt,Mt,{TaskState:x,TaskEvent:I,StringFormat:b,Storage:kt,Reference:Ot},void 0,!0)}Lt(r.default)},uzI5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("6Xbx"),i=function(t){function e(){var e=t.call(this)||this;e.chain_=[],e.buf_=[],e.W_=[],e.pad_=[],e.inbuf_=0,e.total_=0,e.blockSize=64,e.pad_[0]=128;for(var n=1;n<e.blockSize;++n)e.pad_[n]=0;return e.reset(),e}return r.__extends(e,t),e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(t,e){e||(e=0);var n=this.W_;if("string"==typeof t)for(var r=0;r<16;r++)n[r]=t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|t.charCodeAt(e+3),e+=4;else for(r=0;r<16;r++)n[r]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],e+=4;for(r=16;r<80;r++)n[r]=4294967295&((h=n[r-3]^n[r-8]^n[r-14]^n[r-16])<<1|h>>>31);var i,o,s=this.chain_[0],a=this.chain_[1],u=this.chain_[2],c=this.chain_[3],l=this.chain_[4];for(r=0;r<80;r++){r<40?r<20?(i=c^a&(u^c),o=1518500249):(i=a^u^c,o=1859775393):r<60?(i=a&u|c&(a|u),o=2400959708):(i=a^u^c,o=3395469782);var h=(s<<5|s>>>27)+i+l+o+n[r]&4294967295;l=c,c=u,u=4294967295&(a<<30|a>>>2),a=s,s=h}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+a&4294967295,this.chain_[2]=this.chain_[2]+u&4294967295,this.chain_[3]=this.chain_[3]+c&4294967295,this.chain_[4]=this.chain_[4]+l&4294967295},e.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<e;){if(0==o)for(;r<=n;)this.compress_(t,r),r+=this.blockSize;if("string"==typeof t){for(;r<e;)if(i[o]=t.charCodeAt(r),++r,++o==this.blockSize){this.compress_(i),o=0;break}}else for(;r<e;)if(i[o]=t[r],++r,++o==this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=e}},e.prototype.digest=function(){var t=[],e=8*this.total_;this.update(this.pad_,this.inbuf_<56?56-this.inbuf_:this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&e,e/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)t[r]=this.chain_[n]>>i&255,++r;return t},e}(n("32XG").Hash);e.Sha1=i},wORZ:function(t,e,n){"use strict";e.a=function(t){return function(e){var n=new s(t),r=e.lift(n);return n.caught=r}};var r=n("6Xbx"),i=n("lI6h"),o=n("qgI0"),s=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.selector,this.caught))},t}(),a=function(t){function e(e,n,r){t.call(this,e),this.selector=n,this.caught=r}return Object(r.__extends)(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle(),this.add(Object(o.a)(this,n))}},e}(i.a)},wP3s:function(t,e,n){"use strict";e.a=function(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return"number"==typeof e&&(n=e,e=null),r.lift(new s(t,e,n))}};var r=n("6Xbx"),i=n("qgI0"),o=n("lI6h"),s=function(){function t(t,e,n){void 0===n&&(n=Number.POSITIVE_INFINITY),this.project=t,this.resultSelector=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.resultSelector,this.concurrent))},t}(),a=function(t){function e(e,n,r,i){void 0===i&&(i=Number.POSITIVE_INFINITY),t.call(this,e),this.project=n,this.resultSelector=r,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return Object(r.__extends)(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){this.add(Object(i.a)(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){this.resultSelector?this._notifyResultSelector(t,e,n,r):this.destination.next(e)},e.prototype._notifyResultSelector=function(t,e,n,r){var i;try{i=this.resultSelector(t,e,n,r)}catch(t){return void this.destination.error(t)}this.destination.next(i)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(o.a)},x4z8:function(t,e,n){"use strict";e.a=function(t){return void 0===t&&(t=null),function(e){return e.lift(new o(t))}};var r=n("6Xbx"),i=n("E9/g"),o=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.defaultValue))},t}(),s=function(t){function e(e,n){t.call(this,e),this.defaultValue=n,this.isEmpty=!0}return Object(r.__extends)(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(i.a)},xEhG:function(t,e,n){"use strict";e.a=function(t,e,n){return function(r){return r.lift(new s(t,e,n,r))}};var r=n("6Xbx"),i=n("E9/g"),o=n("Ry8D"),s=function(){function t(t,e,n,r){this.predicate=t,this.resultSelector=e,this.defaultValue=n,this.source=r}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.resultSelector,this.defaultValue,this.source))},t}(),a=function(t){function e(e,n,r,i,o){t.call(this,e),this.predicate=n,this.resultSelector=r,this.defaultValue=i,this.source=o,this.hasValue=!1,this.index=0,"undefined"!=typeof i&&(this.lastValue=i,this.hasValue=!0)}return Object(r.__extends)(e,t),e.prototype._next=function(t){var e=this.index++;if(this.predicate)this._tryPredicate(t,e);else{if(this.resultSelector)return void this._tryResultSelector(t,e);this.lastValue=t,this.hasValue=!0}},e.prototype._tryPredicate=function(t,e){var n;try{n=this.predicate(t,e,this.source)}catch(t){return void this.destination.error(t)}if(n){if(this.resultSelector)return void this._tryResultSelector(t,e);this.lastValue=t,this.hasValue=!0}},e.prototype._tryResultSelector=function(t,e){var n;try{n=this.resultSelector(t,e)}catch(t){return void this.destination.error(t)}this.lastValue=n,this.hasValue=!0},e.prototype._complete=function(){var t=this.destination;this.hasValue?(t.next(this.lastValue),t.complete()):t.error(new o.a)},e}(i.a)},xIGM:function(t,e,n){"use strict";(function(t){n.d(e,"a",function(){return o});var r="undefined"!=typeof window&&window,i="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,o=r||"undefined"!=typeof t&&t||i}).call(e,n("fRUx"))},xfHL:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("fvGz"),i=n("JEJ4"),o=n("F1yO"),s=n("JEJ4"),a=n("JEJ4");e.INVALID_KEY_REGEX_=/[\[\].#$\/\u0000-\u001F\u007F]/,e.INVALID_PATH_REGEX_=/[\[\].#$\u0000-\u001F\u007F]/,e.MAX_LEAF_SIZE_=10485760,e.isValidKey=function(t){return"string"==typeof t&&0!==t.length&&!e.INVALID_KEY_REGEX_.test(t)},e.isValidPathString=function(t){return"string"==typeof t&&0!==t.length&&!e.INVALID_PATH_REGEX_.test(t)},e.isValidRootPathString=function(t){return t&&(t=t.replace(/^\/*\.info(\/|$)/,"/")),e.isValidPathString(t)},e.isValidPriority=function(t){return null===t||"string"==typeof t||"number"==typeof t&&!o.isInvalidJSONNumber(t)||t&&"object"==typeof t&&i.contains(t,".sv")},e.validateFirebaseDataArg=function(t,n,r,i,o){o&&void 0===r||e.validateFirebaseData(s.errorPrefix(t,n,o),r,i)},e.validateFirebaseData=function(t,n,s){var u=s instanceof r.Path?new r.ValidationPath(s,t):s;if(void 0===n)throw new Error(t+"contains undefined "+u.toErrorString());if("function"==typeof n)throw new Error(t+"contains a function "+u.toErrorString()+" with contents = "+n.toString());if(o.isInvalidJSONNumber(n))throw new Error(t+"contains "+n.toString()+" "+u.toErrorString());if("string"==typeof n&&n.length>e.MAX_LEAF_SIZE_/3&&a.stringLength(n)>e.MAX_LEAF_SIZE_)throw new Error(t+"contains a string greater than "+e.MAX_LEAF_SIZE_+" utf8 bytes "+u.toErrorString()+" ('"+n.substring(0,50)+"...')");if(n&&"object"==typeof n){var c=!1,l=!1;if(i.forEach(n,function(n,r){if(".value"===n)c=!0;else if(".priority"!==n&&".sv"!==n&&(l=!0,!e.isValidKey(n)))throw new Error(t+" contains an invalid key ("+n+") "+u.toErrorString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');u.push(n),e.validateFirebaseData(t,r,u),u.pop()}),c&&l)throw new Error(t+' contains ".value" child '+u.toErrorString()+" in addition to actual children.")}},e.validateFirebaseMergePaths=function(t,n){var i,o;for(i=0;i<n.length;i++)for(var s=(o=n[i]).slice(),a=0;a<s.length;a++)if(".priority"===s[a]&&a===s.length-1);else if(!e.isValidKey(s[a]))throw new Error(t+"contains an invalid key ("+s[a]+") in path "+o.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');n.sort(r.Path.comparePaths);var u=null;for(i=0;i<n.length;i++){if(o=n[i],null!==u&&u.contains(o))throw new Error(t+"contains a path "+u.toString()+" that is ancestor of another path "+o.toString());u=o}},e.validateFirebaseMergeDataArg=function(t,n,o,a,u){if(!u||void 0!==o){var c=s.errorPrefix(t,n,u);if(!o||"object"!=typeof o||Array.isArray(o))throw new Error(c+" must be an object containing the children to replace.");var l=[];i.forEach(o,function(t,n){var i=new r.Path(t);if(e.validateFirebaseData(c,n,a.child(i)),".priority"===i.getBack()&&!e.isValidPriority(n))throw new Error(c+"contains an invalid value for '"+i.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");l.push(i)}),e.validateFirebaseMergePaths(c,l)}},e.validatePriority=function(t,n,r,i){if(!i||void 0!==r){if(o.isInvalidJSONNumber(r))throw new Error(s.errorPrefix(t,n,i)+"is "+r.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!e.isValidPriority(r))throw new Error(s.errorPrefix(t,n,i)+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},e.validateEventType=function(t,e,n,r){if(!r||void 0!==n)switch(n){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw new Error(s.errorPrefix(t,e,r)+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},e.validateKey=function(t,n,r,i){if(!(i&&void 0===r||e.isValidKey(r)))throw new Error(s.errorPrefix(t,n,i)+'was an invalid key = "'+r+'". Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},e.validatePathString=function(t,n,r,i){if(!(i&&void 0===r||e.isValidPathString(r)))throw new Error(s.errorPrefix(t,n,i)+'was an invalid path = "'+r+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},e.validateRootPathString=function(t,n,r,i){r&&(r=r.replace(/^\/*\.info(\/|$)/,"/")),e.validatePathString(t,n,r,i)},e.validateWritablePath=function(t,e){if(".info"===e.getFront())throw new Error(t+" failed = Can't modify data under /.info/")},e.validateUrl=function(t,n,r){var i=r.path.toString();if("string"!=typeof r.repoInfo.host||0===r.repoInfo.host.length||!e.isValidKey(r.repoInfo.namespace)&&"localhost"!==r.repoInfo.host.split(":")[0]||0!==i.length&&!e.isValidRootPathString(i))throw new Error(s.errorPrefix(t,n,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},e.validateCredential=function(t,e,n,r){if((!r||void 0!==n)&&"string"!=typeof n)throw new Error(s.errorPrefix(t,e,r)+"must be a valid credential (a string).")},e.validateBoolean=function(t,e,n,r){if((!r||void 0!==n)&&"boolean"!=typeof n)throw new Error(s.errorPrefix(t,e,r)+"must be a boolean.")},e.validateString=function(t,e,n,r){if((!r||void 0!==n)&&"string"!=typeof n)throw new Error(s.errorPrefix(t,e,r)+"must be a valid string.")},e.validateObject=function(t,e,n,r){if(!(r&&void 0===n||n&&"object"==typeof n&&null!==n))throw new Error(s.errorPrefix(t,e,r)+"must be a valid object.")},e.validateObjectContainsKey=function(t,e,n,r,o,a){if(!n||"object"!=typeof n||!i.contains(n,r)){if(o)return;throw new Error(s.errorPrefix(t,e,o)+'must contain the key "'+r+'"')}if(a){var u=i.safeGet(n,r);if("number"===a&&"number"!=typeof u||"string"===a&&"string"!=typeof u||"boolean"===a&&"boolean"!=typeof u||"function"===a&&"function"!=typeof u||"object"===a&&"object"!=typeof u&&u)throw o?new Error(s.errorPrefix(t,e,o)+'contains invalid value for key "'+r+'" (must be of type "'+a+'")'):new Error(s.errorPrefix(t,e,o)+'must contain the key "'+r+'" with type "'+a+'"')}}},xhf5:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("6Xbx"),i=n("XtH8"),o=n("JEJ4"),s=n("JEJ4"),a=n("JEJ4"),u=n("F1yO"),c=n("fvGz"),l=n("CIVu"),h=n("0hmO"),p=n("JEJ4"),f=n("j0qB"),d=n("JEJ4"),v=n("JEJ4"),y=1e3,g=3e5,_=function(t){function e(n,r,i,o,s,a){var c=t.call(this)||this;if(c.repoInfo_=n,c.onDataUpdate_=r,c.onConnectStatus_=i,c.onServerInfoUpdate_=o,c.authTokenProvider_=s,c.authOverride_=a,c.id=e.nextPersistentConnectionId_++,c.log_=u.logWrapper("p:"+c.id+":"),c.interruptReasons_={},c.listens_={},c.outstandingPuts_=[],c.outstandingPutCount_=0,c.onDisconnectRequestQueue_=[],c.connected_=!1,c.reconnectDelay_=y,c.maxReconnectDelay_=g,c.securityDebugCallback_=null,c.lastSessionId=null,c.establishConnectionTimer_=null,c.visible_=!1,c.requestCBHash_={},c.requestNumber_=0,c.realtime_=null,c.authToken_=null,c.forceTokenRefresh_=!1,c.invalidAuthTokenCount_=0,c.firstConnection_=!0,c.lastConnectionAttemptTime_=null,c.lastConnectionEstablishedTime_=null,a&&!v.isNodeSdk())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return c.scheduleConnect_(0),l.VisibilityMonitor.getInstance().on("visible",c.onVisible_,c),-1===n.host.indexOf("fblocal")&&h.OnlineMonitor.getInstance().on("online",c.onOnline_,c),c}return r.__extends(e,t),e.prototype.sendRequest=function(t,e,n){var r=++this.requestNumber_,i={r:r,a:t,b:e};this.log_(s.stringify(i)),a.assert(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)},e.prototype.listen=function(t,e,n,r){var i=t.queryIdentifier(),o=t.path.toString();this.log_("Listen called for "+o+" "+i),this.listens_[o]=this.listens_[o]||{},a.assert(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"listen() called for non-default but complete query"),a.assert(!this.listens_[o][i],"listen() called twice for same path/queryId.");var s={onComplete:r,hashFn:e,query:t,tag:n};this.listens_[o][i]=s,this.connected_&&this.sendListen_(s)},e.prototype.sendListen_=function(t){var n=this,r=t.query,i=r.path.toString(),o=r.queryIdentifier();this.log_("Listen on "+i+" for "+o);var s={p:i};t.tag&&(s.q=r.queryObject(),s.t=t.tag),s.h=t.hashFn(),this.sendRequest("q",s,function(s){var a=s.d,u=s.s;e.warnOnListenWarnings_(a,r),(n.listens_[i]&&n.listens_[i][o])===t&&(n.log_("listen response",s),"ok"!==u&&n.removeListen_(i,o),t.onComplete&&t.onComplete(u,a))})},e.warnOnListenWarnings_=function(t,e){if(t&&"object"==typeof t&&o.contains(t,"w")){var n=o.safeGet(t,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+e.getQueryParams().getIndex().toString()+'"',i=e.path.toString();u.warn("Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding "+r+" at "+i+" to your security rules for better performance.")}}},e.prototype.refreshAuthToken=function(t){this.authToken_=t,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},function(){}),this.reduceReconnectDelayIfAdminCredential_(t)},e.prototype.reduceReconnectDelayIfAdminCredential_=function(t){(t&&40===t.length||p.isAdmin(t))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=3e4)},e.prototype.tryAuth=function(){var t=this;if(this.connected_&&this.authToken_){var e=this.authToken_,n=p.isValidFormat(e)?"auth":"gauth",r={cred:e};null===this.authOverride_?r.noauth=!0:"object"==typeof this.authOverride_&&(r.authvar=this.authOverride_),this.sendRequest(n,r,function(n){var r=n.s,i=n.d||"error";t.authToken_===e&&("ok"===r?t.invalidAuthTokenCount_=0:t.onAuthRevoked_(r,i))})}},e.prototype.unlisten=function(t,e){var n=t.path.toString(),r=t.queryIdentifier();this.log_("Unlisten called for "+n+" "+r),a.assert(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,t.queryObject(),e)},e.prototype.sendUnlisten_=function(t,e,n,r){this.log_("Unlisten on "+t+" for "+e);var i={p:t};r&&(i.q=n,i.t=r),this.sendRequest("n",i)},e.prototype.onDisconnectPut=function(t,e,n){this.connected_?this.sendOnDisconnect_("o",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"o",data:e,onComplete:n})},e.prototype.onDisconnectMerge=function(t,e,n){this.connected_?this.sendOnDisconnect_("om",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"om",data:e,onComplete:n})},e.prototype.onDisconnectCancel=function(t,e){this.connected_?this.sendOnDisconnect_("oc",t,null,e):this.onDisconnectRequestQueue_.push({pathString:t,action:"oc",data:null,onComplete:e})},e.prototype.sendOnDisconnect_=function(t,e,n,r){var i={p:e,d:n};this.log_("onDisconnect "+t,i),this.sendRequest(t,i,function(t){r&&setTimeout(function(){r(t.s,t.d)},Math.floor(0))})},e.prototype.put=function(t,e,n,r){this.putInternal("p",t,e,n,r)},e.prototype.merge=function(t,e,n,r){this.putInternal("m",t,e,n,r)},e.prototype.putInternal=function(t,e,n,r,i){var o={p:e,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:t,request:o,onComplete:r}),this.outstandingPutCount_++,this.connected_?this.sendPut_(this.outstandingPuts_.length-1):this.log_("Buffering put: "+e)},e.prototype.sendPut_=function(t){var e=this,n=this.outstandingPuts_[t].action,r=this.outstandingPuts_[t].request,i=this.outstandingPuts_[t].onComplete;this.outstandingPuts_[t].queued=this.connected_,this.sendRequest(n,r,function(r){e.log_(n+" response",r),delete e.outstandingPuts_[t],e.outstandingPutCount_--,0===e.outstandingPutCount_&&(e.outstandingPuts_=[]),i&&i(r.s,r.d)})},e.prototype.reportStats=function(t){var e=this;if(this.connected_){var n={c:t};this.log_("reportStats",n),this.sendRequest("s",n,function(t){"ok"!==t.s&&e.log_("reportStats","Error sending stats: "+t.d)})}},e.prototype.onDataMessage_=function(t){if("r"in t){this.log_("from server: "+s.stringify(t));var e=t.r,n=this.requestCBHash_[e];n&&(delete this.requestCBHash_[e],n(t.b))}else{if("error"in t)throw"A server-side error has occurred: "+t.error;"a"in t&&this.onDataPush_(t.a,t.b)}},e.prototype.onDataPush_=function(t,e){this.log_("handleServerMessage",t,e),"d"===t?this.onDataUpdate_(e.p,e.d,!1,e.t):"m"===t?this.onDataUpdate_(e.p,e.d,!0,e.t):"c"===t?this.onListenRevoked_(e.p,e.q):"ac"===t?this.onAuthRevoked_(e.s,e.d):"sd"===t?this.onSecurityDebugPacket_(e):u.error("Unrecognized action received from server: "+s.stringify(t)+"\nAre you using the latest client?")},e.prototype.onReady_=function(t,e){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(t),this.lastSessionId=e,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},e.prototype.scheduleConnect_=function(t){var e=this;a.assert(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(function(){e.establishConnectionTimer_=null,e.establishConnection_()},Math.floor(t))},e.prototype.onVisible_=function(t){t&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=y,this.realtime_||this.scheduleConnect_(0)),this.visible_=t},e.prototype.onOnline_=function(t){t?(this.log_("Browser went online."),this.reconnectDelay_=y,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())},e.prototype.onRealtimeDisconnect_=function(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){this.visible_?this.lastConnectionEstablishedTime_&&((new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=y),this.lastConnectionEstablishedTime_=null):(this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime());var t=(new Date).getTime()-this.lastConnectionAttemptTime_,e=Math.max(0,this.reconnectDelay_-t);e=Math.random()*e,this.log_("Trying to reconnect in "+e+"ms"),this.scheduleConnect_(e),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)},e.prototype.establishConnection_=function(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null;var t=this.onDataMessage_.bind(this),n=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),i=this.id+":"+e.nextConnectionId_++,o=this,s=this.lastSessionId,c=!1,l=null,h=function(){l?l.close():(c=!0,r())};this.realtime_={close:h,sendRequest:function(t){a.assert(l,"sendRequest call when we're not connected not allowed."),l.sendRequest(t)}};var p=this.forceTokenRefresh_;this.forceTokenRefresh_=!1,this.authTokenProvider_.getToken(p).then(function(e){c?u.log("getToken() completed but was canceled"):(u.log("getToken() completed. Creating connection."),o.authToken_=e&&e.accessToken,l=new f.Connection(i,o.repoInfo_,t,n,r,function(t){u.warn(t+" ("+o.repoInfo_.toString()+")"),o.interrupt("server_kill")},s))}).then(null,function(t){o.log_("Failed to get token: "+t),c||(d.CONSTANTS.NODE_ADMIN&&u.warn(t),h())})}},e.prototype.interrupt=function(t){u.log("Interrupting connection for reason: "+t),this.interruptReasons_[t]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},e.prototype.resume=function(t){u.log("Resuming connection for reason: "+t),delete this.interruptReasons_[t],o.isEmpty(this.interruptReasons_)&&(this.reconnectDelay_=y,this.realtime_||this.scheduleConnect_(0))},e.prototype.handleTimestamp_=function(t){var e=t-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:e})},e.prototype.cancelSentTransactions_=function(){for(var t=0;t<this.outstandingPuts_.length;t++){var e=this.outstandingPuts_[t];e&&"h"in e.request&&e.queued&&(e.onComplete&&e.onComplete("disconnect"),delete this.outstandingPuts_[t],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])},e.prototype.onListenRevoked_=function(t,e){var n;n=e?e.map(function(t){return u.ObjectToUniqueKey(t)}).join("$"):"default";var r=this.removeListen_(t,n);r&&r.onComplete&&r.onComplete("permission_denied")},e.prototype.removeListen_=function(t,e){var n,r=new c.Path(t).toString();return void 0!==this.listens_[r]?(n=this.listens_[r][e],delete this.listens_[r][e],0===o.getCount(this.listens_[r])&&delete this.listens_[r]):n=void 0,n},e.prototype.onAuthRevoked_=function(t,e){u.log("Auth token revoked: "+t+"/"+e),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==t&&"permission_denied"!==t||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))},e.prototype.onSecurityDebugPacket_=function(t){this.securityDebugCallback_?this.securityDebugCallback_(t):"msg"in t&&console.log("FIREBASE: "+t.msg.replace("\n","\nFIREBASE: "))},e.prototype.restoreState_=function(){var t=this;this.tryAuth(),o.forEach(this.listens_,function(e,n){o.forEach(n,function(e,n){t.sendListen_(n)})});for(var e=0;e<this.outstandingPuts_.length;e++)this.outstandingPuts_[e]&&this.sendPut_(e);for(;this.onDisconnectRequestQueue_.length;){var n=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(n.action,n.pathString,n.data,n.onComplete)}},e.prototype.sendConnectStats_=function(){var t={},e="js";d.CONSTANTS.NODE_ADMIN?e="admin_node":d.CONSTANTS.NODE_CLIENT&&(e="node"),t["sdk."+e+"."+i.default.SDK_VERSION.replace(/\./g,"-")]=1,v.isMobileCordova()?t["framework.cordova"]=1:v.isReactNative()&&(t["framework.reactnative"]=1),this.reportStats(t)},e.prototype.shouldReconnect_=function(){var t=h.OnlineMonitor.getInstance().currentlyOnline();return o.isEmpty(this.interruptReasons_)&&t},e.nextPersistentConnectionId_=0,e.nextConnectionId_=0,e}(n("zzcx").ServerActions);e.PersistentConnection=_},xvZM:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("9ard"),i=n("qYrH");e.forceLongPolling=function(){r.WebSocketConnection.forceDisallow(),i.BrowserPollConnection.forceAllow()},e.forceWebSockets=function(){i.BrowserPollConnection.forceDisallow()},e.isWebSocketsAvailable=function(){return r.WebSocketConnection.isAvailable()},e.setSecurityDebugCallback=function(t,e){t.repo.persistentConnection_.securityDebugCallback_=e},e.stats=function(t,e){t.repo.stats(e)},e.statsIncrementCounter=function(t,e){t.repo.statsIncrementCounter(e)},e.dataUpdateCount=function(t){return t.repo.dataUpdateCount},e.interceptServerData=function(t,e){return t.repo.interceptServerData_(e)}},y8hQ:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CacheNode=function(){function t(t,e,n){this.node_=t,this.fullyInitialized_=e,this.filtered_=n}return t.prototype.isFullyInitialized=function(){return this.fullyInitialized_},t.prototype.isFiltered=function(){return this.filtered_},t.prototype.isCompleteForPath=function(t){if(t.isEmpty())return this.isFullyInitialized()&&!this.filtered_;var e=t.getFront();return this.isCompleteForChild(e)},t.prototype.isCompleteForChild=function(t){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(t)},t.prototype.getNode=function(){return this.node_},t}()},yWZg:function(t,e,n){"use strict";e.a=function(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Object(r.a)(t)(this)};var r=n("bywS")},yiM5:function(t,e,n){"use strict";var r=setTimeout;function i(){}function o(t){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(t,this)}function s(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void u(e.promise,t)}a(e.promise,r)}else(1===t._state?a:u)(e.promise,t._value)})):t._deferreds.push(e)}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void l((r=n,i=e,function(){r.apply(i,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){u(t,e)}var r,i}function u(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)s(t,t._deferreds[e]);t._deferreds=null}function l(t,e){var n=!1;try{t(function(t){n||(n=!0,a(e,t))},function(t){n||(n=!0,u(e,t))})}catch(t){if(n)return;n=!0,u(e,t)}}o.prototype.catch=function(t){return this.then(null,t)},o.prototype.then=function(t,e){var n=new this.constructor(i);return s(this,new function(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}(t,e,n)),n},o.prototype.finally=function(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})},o.all=function(t){return new o(function(e,n){if(!t||"undefined"==typeof t.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var i=r.length;function o(t,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,function(e){o(t,e)},n)}r[t]=s,0==--i&&e(r)}catch(t){n(t)}}for(var s=0;s<r.length;s++)o(s,r[s])})},o.resolve=function(t){return t&&"object"==typeof t&&t.constructor===o?t:new o(function(e){e(t)})},o.reject=function(t){return new o(function(e,n){n(t)})},o.race=function(t){return new o(function(e,n){for(var r=0,i=t.length;r<i;r++)t[r].then(e,n)})},o._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){r(t,0)},o._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},t.exports=o},z0HA:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n("6Xbx"),i=n("TO51"),o=n("AP4T"),s=n("qLnt"),a=n("RWQz"),u=function(t){function e(e,n){t.call(this),this.source=e,this.subjectFactory=n,this._refCount=0,this._isComplete=!1}return Object(r.__extends)(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new s.a).add(this.source.subscribe(new l(this.getSubject(),this))),t.closed?(this._connection=null,t=s.a.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return Object(a.a)()(this)},e}(o.a).prototype,c={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:u._subscribe},_isComplete:{value:u._isComplete,writable:!0},getSubject:{value:u.getSubject},connect:{value:u.connect},refCount:{value:u.refCount}},l=function(t){function e(e,n){t.call(this,e),this.connectable=n}return Object(r.__extends)(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.c)},"z8+r":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("fvGz"),i=n("/fob"),o=n("r9Yg");e.SparseSnapshotTree=function(){function t(){this.value_=null,this.children_=null}return t.prototype.find=function(t){if(null!=this.value_)return this.value_.getChild(t);if(t.isEmpty()||null==this.children_)return null;var e=t.getFront();return t=t.popFront(),this.children_.contains(e)?this.children_.get(e).find(t):null},t.prototype.remember=function(e,n){if(e.isEmpty())this.value_=n,this.children_=null;else if(null!==this.value_)this.value_=this.value_.updateChild(e,n);else{null==this.children_&&(this.children_=new o.CountedSet);var r=e.getFront();this.children_.contains(r)||this.children_.add(r,new t);var i=this.children_.get(r);e=e.popFront(),i.remember(e,n)}},t.prototype.forget=function(t){if(t.isEmpty())return this.value_=null,this.children_=null,!0;if(null!==this.value_){if(this.value_.isLeafNode())return!1;var e=this.value_;this.value_=null;var n=this;return e.forEachChild(i.PRIORITY_INDEX,function(t,e){n.remember(new r.Path(t),e)}),this.forget(t)}if(null!==this.children_){var o=t.getFront();return t=t.popFront(),this.children_.contains(o)&&this.children_.get(o).forget(t)&&this.children_.remove(o),!!this.children_.isEmpty()&&(this.children_=null,!0)}return!0},t.prototype.forEachTree=function(t,e){null!==this.value_?e(t,this.value_):this.forEachChild(function(n,i){var o=new r.Path(t.toString()+"/"+n);i.forEachTree(o,e)})},t.prototype.forEachChild=function(t){null!==this.children_&&this.children_.each(function(e,n){t(e,n)})},t}()},zFzr:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("F1yO");e.NAME_ONLY_COMPARATOR=function(t,e){return r.nameCompare(t.name,e.name)},e.NAME_COMPARATOR=function(t,e){return r.nameCompare(t,e)}},"zPe/":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("JEJ4"),i=n("F1yO"),o=n("opdF"),s=1e4,a=3e4;e.StatsReporter=function(){function t(t,e){this.server_=e,this.statsToReport_={},this.statsListener_=new o.StatsListener(t);var n=s+(a-s)*Math.random();i.setTimeoutNonBlocking(this.reportStats_.bind(this),Math.floor(n))}return t.prototype.includeStat=function(t){this.statsToReport_[t]=!0},t.prototype.reportStats_=function(){var t=this,e=this.statsListener_.get(),n={},o=!1;r.forEach(e,function(e,i){i>0&&r.contains(t.statsToReport_,e)&&(n[e]=i,o=!0)}),o&&this.server_.reportStats(n),i.setTimeoutNonBlocking(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},t}()},zzcx:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServerActions=function(){function t(){}return t.prototype.put=function(t,e,n,r){},t.prototype.merge=function(t,e,n,r){},t.prototype.refreshAuthToken=function(t){},t.prototype.onDisconnectPut=function(t,e,n){},t.prototype.onDisconnectMerge=function(t,e,n){},t.prototype.onDisconnectCancel=function(t,e){},t.prototype.reportStats=function(t){},t}()}},[0]);