!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/build/",t(t.s=130)}([function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(79)),r(n(80)),r(n(45)),r(n(187)),r(n(188)),r(n(189)),r(n(190)),r(n(81)),r(n(191)),r(n(82)),r(n(192)),r(n(193)),r(n(195)),r(n(196)),r(n(197))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(0),i=n(0),a=n(0),s=n(0),u=n(0),c=n(30),l=n(0);t.LUIDGenerator=function(){var e=1;return function(){return e++}}(),t.sha1=function(e){var t=s.stringToByteArray(e),n=new a.Sha1;n.update(t);var r=n.digest();return i.base64.encodeByteArray(r)};var h=function(){for(var e=[],t=0;tn?r.push(e.substring(o,n)):r.push(e.substring(o,o+t));return r},t.each=function(e,t){if(Array.isArray(e))for(var n=0;n=Math.pow(2,-1022)?(a=Math.min(Math.floor(Math.log(e)/Math.LN2),1023),o=a+1023,i=Math.round(e*Math.pow(2,52-a)-Math.pow(2,52))):(o=0,i=Math.round(e/Math.pow(2,-1074)))),u=[],s=52;s;s-=1)u.push(i%2?1:0),i=Math.floor(i/2);for(s=11;s;s-=1)u.push(o%2?1:0),o=Math.floor(o/2);u.push(n?1:0),u.reverse(),c=u.join("");var l="";for(s=0;s<64;s+=8){var h=parseInt(c.substr(s,8),2).toString(16);1===h.length&&(h="0"+h),l+=h}return l.toLowerCase()},t.isChromeExtensionContentScript=function(){return!("object"!==typeof window||!window.chrome||!window.chrome.extension||/^chrome/.test(window.location.href))},t.isWindowsStoreApp=function(){return"object"===typeof Windows&&"object"===typeof Windows.UI},t.errorForServerCode=function(e,t){var n="Unknown Error";"too_big"===e?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"==e?n="Client doesn't have permission to access the desired data.":"unavailable"==e&&(n="The service is unavailable");var r=new Error(e+" at "+t.path.toString()+": "+n);return r.code=e.toUpperCase(),r},t.INTEGER_REGEXP_=new RegExp("^-?\\d{1,10}$"),t.tryParseInt=function(e){if(t.INTEGER_REGEXP_.test(e)){var n=Number(e);if(n>=-2147483648&&n<=2147483647)return n}return null},t.exceptionGuard=function(e){try{e()}catch(e){setTimeout(function(){var n=e.stack||"";throw t.warn("Exception was thrown by user callback.",n),e},Math.floor(0))}},t.callUserCallback=function(e){for(var n=[],r=1;r=0},t.exportPropGetter=function(e,t,n){Object.defineProperty(e,t,{get:n})},t.setTimeoutNonBlocking=function(e,t){var n=setTimeout(e,t);return"object"===typeof n&&n.unref&&n.unref(),n}},function(e,t,n){"use strict";e.exports=n(137)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(0),i=function(){function e(e,t){if(void 0===t){this.pieces_=e.split("/");for(var n=0,r=0;r0&&(this.pieces_[n]=this.pieces_[r],n++);this.pieces_.length=n,this.pieceNum_=0}else this.pieces_=e,this.pieceNum_=t}return Object.defineProperty(e,"Empty",{get:function(){return new e("")},enumerable:!0,configurable:!0}),e.prototype.getFront=function(){return this.pieceNum_>=this.pieces_.length?null:this.pieces_[this.pieceNum_]},e.prototype.getLength=function(){return this.pieces_.length-this.pieceNum_},e.prototype.popFront=function(){var t=this.pieceNum_;return t=this.pieces_.length)return null;for(var t=[],n=this.pieceNum_;n0&&n.push(o[r]);return new e(n,0)},e.prototype.isEmpty=function(){return this.pieceNum_>=this.pieces_.length},e.relativePath=function(t,n){var r=t.getFront(),o=n.getFront();if(null===r)return n;if(r===o)return e.relativePath(t.popFront(),n.popFront());throw new Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+t+")")},e.comparePaths=function(e,t){for(var n=e.slice(),o=t.slice(),i=0;ie.getLength())return!1;for(;t0&&(this.byteLength_+=1),this.parts_.push(e),this.byteLength_+=o.stringLength(e),this.checkValid_()},e.prototype.pop=function(){var e=this.parts_.pop();this.byteLength_-=o.stringLength(e),this.parts_.length>0&&(this.byteLength_-=1)},e.prototype.checkValid_=function(){if(this.byteLength_>e.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+e.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");if(this.parts_.length>e.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+e.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},e.prototype.toErrorString=function(){return 0==this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},e}();t.ValidationPath=a},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){e.exports=n(151)()},function(e,t,n){"use strict";function r(e){a=e}function o(e){s=e}var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var a,s,u=n(32),c=n(1),l=n(9),h=n(33);t.setNodeFromJSON=r,t.setMaxNode=o;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.compare=function(e,t){var n=e.node.getPriority(),r=t.node.getPriority(),o=n.compareTo(r);return 0===o?c.nameCompare(e.name,t.name):o},t.prototype.isDefinedOn=function(e){return!e.getPriority().isEmpty()},t.prototype.indexedValueChanged=function(e,t){return!e.getPriority().equals(t.getPriority())},t.prototype.minPost=function(){return l.NamedNode.MIN},t.prototype.maxPost=function(){return new l.NamedNode(c.MAX_NAME,new h.LeafNode("[PRIORITY-POST]",s))},t.prototype.makePost=function(e,t){var n=a(e);return new l.NamedNode(t,new h.LeafNode("[PRIORITY-POST]",n))},t.prototype.toString=function(){return".priority"},t}(u.Index);t.PriorityIndex=f,t.PRIORITY_INDEX=new f},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(0),a=n(1),s=n(34),u=n(9),c=n(88),l=n(6),h=n(21),f=n(90),p=n(33),d=n(92),y=function(){function e(e,t,n){this.children_=e,this.priorityNode_=t,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&c.validatePriorityNode(this.priorityNode_),this.children_.isEmpty()&&i.assert(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(e,"EMPTY_NODE",{get:function(){return o||(o=new e(new s.SortedMap(d.NAME_COMPARATOR),null,f.IndexMap.Default))},enumerable:!0,configurable:!0}),e.prototype.isLeafNode=function(){return!1},e.prototype.getPriority=function(){return this.priorityNode_||o},e.prototype.updatePriority=function(t){return this.children_.isEmpty()?this:new e(this.children_,t,this.indexMap_)},e.prototype.getImmediateChild=function(e){if(".priority"===e)return this.getPriority();var t=this.children_.get(e);return null===t?o:t},e.prototype.getChild=function(e){var t=e.getFront();return null===t?this:this.getImmediateChild(t).getChild(e.popFront())},e.prototype.hasChild=function(e){return null!==this.children_.get(e)},e.prototype.updateImmediateChild=function(t,n){if(i.assert(n,"We should always be passing snapshot nodes"),".priority"===t)return this.updatePriority(n);var r=new u.NamedNode(t,n),a=void 0,s=void 0,c=void 0;return n.isEmpty()?(a=this.children_.remove(t),s=this.indexMap_.removeFromIndexes(r,this.children_)):(a=this.children_.insert(t,n),s=this.indexMap_.addToIndexes(r,this.children_)),c=a.isEmpty()?o:this.priorityNode_,new e(a,c,s)},e.prototype.updateChild=function(e,t){var n=e.getFront();if(null===n)return t;i.assert(".priority"!==e.getFront()||1===e.getLength(),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(e.popFront(),t);return this.updateImmediateChild(n,r)},e.prototype.isEmpty=function(){return this.children_.isEmpty()},e.prototype.numChildren=function(){return this.children_.count()},e.prototype.val=function(t){if(this.isEmpty())return null;var n={},r=0,o=0,i=!0;if(this.forEachChild(l.PRIORITY_INDEX,function(a,s){n[a]=s.val(t),r++,i&&e.INTEGER_REGEXP_.test(a)?o=Math.max(o,Number(a)):i=!1}),!t&&i&&o<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return t&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},e.prototype.hash=function(){if(null===this.lazyHash_){var e="";this.getPriority().isEmpty()||(e+="priority:"+c.priorityHashText(this.getPriority().val())+":"),this.forEachChild(l.PRIORITY_INDEX,function(t,n){var r=n.hash();""!==r&&(e+=":"+t+":"+r)}),this.lazyHash_=""===e?"":a.sha1(e)}return this.lazyHash_},e.prototype.getPredecessorChildName=function(e,t,n){var r=this.resolveIndex_(n);if(r){var o=r.getPredecessorKey(new u.NamedNode(e,t));return o?o.name:null}return this.children_.getPredecessorKey(e)},e.prototype.getFirstChildName=function(e){var t=this.resolveIndex_(e);if(t){var n=t.minKey();return n&&n.name}return this.children_.minKey()},e.prototype.getFirstChild=function(e){var t=this.getFirstChildName(e);return t?new u.NamedNode(t,this.children_.get(t)):null},e.prototype.getLastChildName=function(e){var t=this.resolveIndex_(e);if(t){var n=t.maxKey();return n&&n.name}return this.children_.maxKey()},e.prototype.getLastChild=function(e){var t=this.getLastChildName(e);return t?new u.NamedNode(t,this.children_.get(t)):null},e.prototype.forEachChild=function(e,t){var n=this.resolveIndex_(e);return n?n.inorderTraversal(function(e){return t(e.name,e.node)}):this.children_.inorderTraversal(t)},e.prototype.getIterator=function(e){return this.getIteratorFrom(e.minPost(),e)},e.prototype.getIteratorFrom=function(e,t){var n=this.resolveIndex_(t);if(n)return n.getIteratorFrom(e,function(e){return e});for(var r=this.children_.getIteratorFrom(e.name,u.NamedNode.Wrap),o=r.peek();null!=o&&t.compare(o,e)<0;)r.getNext(),o=r.peek();return r},e.prototype.getReverseIterator=function(e){return this.getReverseIteratorFrom(e.maxPost(),e)},e.prototype.getReverseIteratorFrom=function(e,t){var n=this.resolveIndex_(t);if(n)return n.getReverseIteratorFrom(e,function(e){return e});for(var r=this.children_.getReverseIteratorFrom(e.name,u.NamedNode.Wrap),o=r.peek();null!=o&&t.compare(o,e)>0;)r.getNext(),o=r.peek();return r},e.prototype.compareTo=function(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===t.MAX_NODE?-1:0},e.prototype.withIndex=function(t){if(t===h.KEY_INDEX||this.indexMap_.hasIndex(t))return this;var n=this.indexMap_.addIndex(t,this.children_);return new e(this.children_,this.priorityNode_,n)},e.prototype.isIndexed=function(e){return e===h.KEY_INDEX||this.indexMap_.hasIndex(e)},e.prototype.equals=function(e){if(e===this)return!0;if(e.isLeafNode())return!1;var t=e;if(this.getPriority().equals(t.getPriority())){if(this.children_.count()===t.children_.count()){for(var n=this.getIterator(l.PRIORITY_INDEX),r=t.getIterator(l.PRIORITY_INDEX),o=n.getNext(),i=r.getNext();o&&i;){if(o.name!==i.name||!o.node.equals(i.node))return!1;o=n.getNext(),i=r.getNext()}return null===o&&null===i}return!1}return!1},e.prototype.resolveIndex_=function(e){return e===h.KEY_INDEX?null:this.indexMap_.get(e.toString())},e.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,e}();t.ChildrenNode=y;var v=function(e){function t(){return e.call(this,new s.SortedMap(d.NAME_COMPARATOR),y.EMPTY_NODE,f.IndexMap.Default)||this}return r(t,e),t.prototype.compareTo=function(e){return e===this?0:1},t.prototype.equals=function(e){return e===this},t.prototype.getPriority=function(){return this},t.prototype.getImmediateChild=function(e){return y.EMPTY_NODE},t.prototype.isEmpty=function(){return!1},t}(y);t.MaxNode=v,t.MAX_NODE=new v,Object.defineProperties(u.NamedNode,{MIN:{value:new u.NamedNode(a.MIN_NAME,y.EMPTY_NODE)},MAX:{value:new u.NamedNode(a.MAX_NAME,t.MAX_NODE)}}),h.KeyIndex.__EMPTY_NODE=y.EMPTY_NODE,p.LeafNode.__childrenNodeConstructor=y,c.setMaxNode(t.MAX_NODE),l.setMaxNode(t.MAX_NODE)},function(e,t,n){"use strict";var r=function(e,t,n,r,o,i,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,s],l=0;u=new Error(t.replace(/%s/g,function(){return c[l++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.name=e,this.node=t}return e.Wrap=function(t,n){return new e(t,n)},e}();t.NamedNode=r},function(e,t,n){"use strict";function r(e){return null!=e}function o(e){return void 0!==e}function i(e){return"function"===typeof e}function a(e){return"object"===typeof e}function s(e){return a(e)&&null!==e}function u(e){return a(e)&&!Array.isArray(e)}function c(e){return"string"===typeof e||e instanceof String}function l(e){return"number"===typeof e||e instanceof Number}function h(e){return f()&&e instanceof Blob}function f(){return"undefined"!==typeof Blob}t.a=r,t.c=o,t.b=i,t.i=a,t.g=s,t.f=u,t.j=c,t.h=l,t.d=h,t.e=f},function(e,t,n){"use strict";function r(e){return"[object Array]"===T.call(e)}function o(e){return"[object ArrayBuffer]"===T.call(e)}function i(e){return"undefined"!==typeof FormData&&e instanceof FormData}function a(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function s(e){return"string"===typeof e}function u(e){return"number"===typeof e}function c(e){return"undefined"===typeof e}function l(e){return null!==e&&"object"===typeof e}function h(e){return"[object Date]"===T.call(e)}function f(e){return"[object File]"===T.call(e)}function p(e){return"[object Blob]"===T.call(e)}function d(e){return"[object Function]"===T.call(e)}function y(e){return l(e)&&d(e.pipe)}function v(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams}function m(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function _(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;nt.MAX_LEAF_SIZE_/3&&s.stringLength(n)>t.MAX_LEAF_SIZE_)throw new Error(e+"contains a string greater than "+t.MAX_LEAF_SIZE_+" utf8 bytes "+u.toErrorString()+" ('"+n.substring(0,50)+"...')");if(n&&"object"===typeof n){var c=!1,l=!1;if(o.forEach(n,function(n,r){if(".value"===n)c=!0;else if(".priority"!==n&&".sv"!==n&&(l=!0,!t.isValidKey(n)))throw new Error(e+" contains an invalid key ("+n+") "+u.toErrorString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');u.push(n),t.validateFirebaseData(e,r,u),u.pop()}),c&&l)throw new Error(e+' contains ".value" child '+u.toErrorString()+" in addition to actual children.")}},t.validateFirebaseMergePaths=function(e,n){var o,i;for(o=0;o>6,128|63&r);else if(55296==(64512&r)){var o=n>18,128|r>>12&63,128|r>>6&63,128|63&r)}else t.push(239,191,189)}else 56320==(64512&r)?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function a(e){var t;try{t=decodeURIComponent(e)}catch(e){throw h.i(f.DATA_URL,"Malformed data URL.")}return i(t)}function s(e,t){switch(e){case f.BASE64:var n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r){var o=n?"-":"_";throw h.i(e,"Invalid character '"+o+"' found: is it base64url encoded?")}break;case f.BASE64URL:var i=-1!==t.indexOf("+"),a=-1!==t.indexOf("/");if(i||a){var o=i?"+":"/";throw h.i(e,"Invalid character '"+o+"' found: is it base64 encoded?")}t=t.replace(/-/g,"+").replace(/_/g,"/")}var s;try{s=atob(t)}catch(t){throw h.i(e,"Invalid character found")}for(var u=new Uint8Array(s.length),c=0;c=t.length)&&e.substring(e.length-t.length)===t}n.d(t,"a",function(){return f}),t.c=r,t.b=o;var h=n(12),f={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},p=function(){function e(e,t){this.data=e,this.contentType=t||null}return e}(),d=function(){function e(e){this.base64=!1,this.contentType=null;var t=e.match(/^data:([^,]+)?,/);if(null===t)throw h.i(f.DATA_URL,"Must be formatted 'data:[][;base64],");var n=t[1]||null;null!=n&&(this.base64=l(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=e.substring(e.indexOf(",")+1)}return e}()},function(e,t,n){"use strict";function r(e){switch(e){case i.RUNNING:case i.PAUSING:case i.CANCELING:return a.RUNNING;case i.PAUSED:return a.PAUSED;case i.SUCCESS:return a.SUCCESS;case i.CANCELED:return a.CANCELED;case i.ERROR:default:return a.ERROR}}n.d(t,"b",function(){return o}),n.d(t,"a",function(){return i}),n.d(t,"c",function(){return a}),t.d=r;var o={STATE_CHANGED:"state_changed"},i={RUNNING:"running",PAUSING:"pausing",PAUSED:"paused",SUCCESS:"success",CANCELING:"canceling",CANCELED:"canceled",ERROR:"error"},a={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"}},function(e,t,n){"use strict";t.__esModule=!0;var r=(t.addLeadingSlash=function(e){return"/"===e.charAt(0)?e:"/"+e},t.stripLeadingSlash=function(e){return"/"===e.charAt(0)?e.substr(1):e},t.hasBasename=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)});t.stripBasename=function(e,t){return r(e,t)?e.substr(t.length):e},t.stripTrailingSlash=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},t.parsePath=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},t.createPath=function(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"f",function(){return o}),n.d(t,"c",function(){return i}),n.d(t,"e",function(){return a}),n.d(t,"g",function(){return s}),n.d(t,"d",function(){return u}),n.d(t,"b",function(){return c});var r=function(e){return"/"===e.charAt(0)?e:"/"+e},o=function(e){return"/"===e.charAt(0)?e.substr(1):e},i=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)},a=function(e,t){return i(e,t)?e.substr(t.length):e},s=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},u=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}},c=function(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function s(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t=0,"Unknown leaf type: "+n),o.assert(a>=0,"Unknown leaf type: "+r),i===a?"object"===r?0:this.value_0},e.prototype.peek=function(){if(0===this.nodeStack_.length)return null;var e=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value}},e}();t.SortedMapIterator=r;var o=function(){function e(t,n,r,o,i){this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=o?o:a.EMPTY_NODE,this.right=null!=i?i:a.EMPTY_NODE}return e.prototype.copy=function(t,n,r,o,i){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=o?o:this.left,null!=i?i:this.right)},e.prototype.count=function(){return this.left.count()+1+this.right.count()},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)},e.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},e.prototype.minKey=function(){return this.min_().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(e,t,n){var r,o;return o=this,r=n(e,o.key),o=r<0?o.copy(null,null,null,o.left.insert(e,t,n),null):0===r?o.copy(null,t,null,null,null):o.copy(null,null,null,null,o.right.insert(e,t,n)),o.fixUp_()},e.prototype.removeMin_=function(){if(this.left.isEmpty())return a.EMPTY_NODE;var e=this;return e.left.isRed_()||e.left.left.isRed_()||(e=e.moveRedLeft_()),e=e.copy(null,null,null,e.left.removeMin_(),null),e.fixUp_()},e.prototype.remove=function(e,t){var n,r;if(n=this,t(e,n.key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===t(e,n.key)){if(n.right.isEmpty())return a.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(e,t))}return n.fixUp_()},e.prototype.isRed_=function(){return this.color},e.prototype.fixUp_=function(){var e=this;return e.right.isRed_()&&!e.left.isRed_()&&(e=e.rotateLeft_()),e.left.isRed_()&&e.left.left.isRed_()&&(e=e.rotateRight_()),e.left.isRed_()&&e.right.isRed_()&&(e=e.colorFlip_()),e},e.prototype.moveRedLeft_=function(){var e=this.colorFlip_();return e.right.left.isRed_()&&(e=e.copy(null,null,null,null,e.right.rotateRight_()),e=e.rotateLeft_(),e=e.colorFlip_()),e},e.prototype.moveRedRight_=function(){var e=this.colorFlip_();return e.left.left.isRed_()&&(e=e.rotateRight_(),e=e.colorFlip_()),e},e.prototype.rotateLeft_=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight_=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip_=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.checkMaxDepth_=function(){var e=this.check_();return Math.pow(2,e)<=this.count()+1},e.prototype.check_=function(){var e;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((e=this.left.check_())!==this.right.check_())throw new Error("Black depths differ");return e+(this.isRed_()?0:1)},e.RED=!0,e.BLACK=!1,e}();t.LLRBNode=o;var i=function(){function e(){}return e.prototype.copy=function(e,t,n,r,o){return this},e.prototype.insert=function(e,t,n){return new o(e,t,null)},e.prototype.remove=function(e,t){return this},e.prototype.count=function(){return 0},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(e){return!1},e.prototype.reverseTraversal=function(e){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.check_=function(){return 0},e.prototype.isRed_=function(){return!1},e}();t.LLRBEmptyNode=i;var a=function(){function e(t,n){void 0===n&&(n=e.EMPTY_NODE),this.comparator_=t,this.root_=n}return e.prototype.insert=function(t,n){return new e(this.comparator_,this.root_.insert(t,n,this.comparator_).copy(null,null,o.BLACK,null,null))},e.prototype.remove=function(t){return new e(this.comparator_,this.root_.remove(t,this.comparator_).copy(null,null,o.BLACK,null,null))},e.prototype.get=function(e){for(var t,n=this.root_;!n.isEmpty();){if(0===(t=this.comparator_(e,n.key)))return n.value;t<0?n=n.left:t>0&&(n=n.right)}return null},e.prototype.getPredecessorKey=function(e){for(var t,n=this.root_,r=null;!n.isEmpty();){if(0===(t=this.comparator_(e,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}t<0?n=n.left:t>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")},e.prototype.isEmpty=function(){return this.root_.isEmpty()},e.prototype.count=function(){return this.root_.count()},e.prototype.minKey=function(){return this.root_.minKey()},e.prototype.maxKey=function(){return this.root_.maxKey()},e.prototype.inorderTraversal=function(e){return this.root_.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.root_.reverseTraversal(e)},e.prototype.getIterator=function(e){return new r(this.root_,null,this.comparator_,!1,e)},e.prototype.getIteratorFrom=function(e,t){return new r(this.root_,e,this.comparator_,!1,t)},e.prototype.getReverseIteratorFrom=function(e,t){return new r(this.root_,e,this.comparator_,!0,t)},e.prototype.getReverseIterator=function(e){return new r(this.root_,null,this.comparator_,!0,e)},e.EMPTY_NODE=new i,e}();t.SortedMap=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(94),o=n(22),i=n(3),a=n(95),s=n(208),u=n(219),c=n(0),l=n(1),h=n(0),f=n(220),p=n(50),d=n(222),y=n(100),v=n(223),m=n(101),g=n(228),_=n(83),b=function(){function e(e,t,n){var r=this;this.repoInfo_=e,this.app=n,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new v.EventQueue,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=new a.SparseSnapshotTree,this.persistentConnection_=null;var o=new f.AuthTokenProvider(n);if(this.stats_=p.StatsManager.getCollection(e),t||l.beingCrawled())this.server_=new g.ReadonlyRestClient(this.repoInfo_,this.onDataUpdate_.bind(this),o),setTimeout(this.onConnectStatus_.bind(this,!0),0);else{var i=n.options.databaseAuthVariableOverride;if("undefined"!==typeof i&&null!==i){if("object"!==typeof i)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{c.stringify(i)}catch(e){throw new Error("Invalid authOverride provided: "+e)}}this.persistentConnection_=new m.PersistentConnection(this.repoInfo_,this.onDataUpdate_.bind(this),this.onConnectStatus_.bind(this),this.onServerInfoUpdate_.bind(this),o,i),this.server_=this.persistentConnection_}o.addTokenChangeListener(function(e){r.server_.refreshAuthToken(e)}),this.statsReporter_=p.StatsManager.getOrCreateReporter(e,function(){return new d.StatsReporter(r.stats_,r.server_)}),this.transactions_init_(),this.infoData_=new u.SnapshotHolder,this.infoSyncTree_=new s.SyncTree({startListening:function(e,t,n,o){var i=[],a=r.infoData_.getNode(e.path);return a.isEmpty()||(i=r.infoSyncTree_.applyServerOverwrite(e.path,a),setTimeout(function(){o("ok")},0)),i},stopListening:function(){}}),this.updateInfo_("connected",!1),this.serverSyncTree_=new s.SyncTree({startListening:function(e,t,n,o){return r.server_.listen(e,n,t,function(t,n){var i=o(t,n);r.eventQueue_.raiseEventsForChangedPath(e.path,i)}),[]},stopListening:function(e,t){r.server_.unlisten(e,t)}})}return e.prototype.toString=function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host},e.prototype.name=function(){return this.repoInfo_.namespace},e.prototype.serverTime=function(){var e=this.infoData_.getNode(new i.Path(".info/serverTimeOffset")),t=e.val()||0;return(new Date).getTime()+t},e.prototype.generateServerValues=function(){return r.generateWithValues({timestamp:this.serverTime()})},e.prototype.onDataUpdate_=function(e,t,n,r){this.dataUpdateCount++;var a=new i.Path(e);t=this.interceptServerDataCallback_?this.interceptServerDataCallback_(e,t):t;var s=[];if(r)if(n){var u=h.map(t,function(e){return o.nodeFromJSON(e)});s=this.serverSyncTree_.applyTaggedQueryMerge(a,u,r)}else{var c=o.nodeFromJSON(t);s=this.serverSyncTree_.applyTaggedQueryOverwrite(a,c,r)}else if(n){var l=h.map(t,function(e){return o.nodeFromJSON(e)});s=this.serverSyncTree_.applyServerMerge(a,l)}else{var f=o.nodeFromJSON(t);s=this.serverSyncTree_.applyServerOverwrite(a,f)}var p=a;s.length>0&&(p=this.rerunTransactions_(a)),this.eventQueue_.raiseEventsForChangedPath(p,s)},e.prototype.interceptServerData_=function(e){this.interceptServerDataCallback_=e},e.prototype.onConnectStatus_=function(e){this.updateInfo_("connected",e),!1===e&&this.runOnDisconnectEvents_()},e.prototype.onServerInfoUpdate_=function(e){var t=this;l.each(e,function(e,n){t.updateInfo_(n,e)})},e.prototype.updateInfo_=function(e,t){var n=new i.Path("/.info/"+e),r=o.nodeFromJSON(t);this.infoData_.updateSnapshot(n,r);var a=this.infoSyncTree_.applyServerOverwrite(n,r);this.eventQueue_.raiseEventsForChangedPath(n,a)},e.prototype.getNextWriteId_=function(){return this.nextWriteId_++},e.prototype.setWithPriority=function(e,t,n,i){var a=this;this.log_("set",{path:e.toString(),value:t,priority:n});var s=this.generateServerValues(),u=o.nodeFromJSON(t,n),c=r.resolveDeferredValueSnapshot(u,s),h=this.getNextWriteId_(),f=this.serverSyncTree_.applyUserOverwrite(e,c,h,!0);this.eventQueue_.queueEvents(f),this.server_.put(e.toString(),u.val(!0),function(t,n){var r="ok"===t;r||l.warn("set at "+e+" failed: "+t);var o=a.serverSyncTree_.ackUserWrite(h,!r);a.eventQueue_.raiseEventsForChangedPath(e,o),a.callOnCompleteCallback(i,t,n)});var p=this.abortTransactions_(e);this.rerunTransactions_(p),this.eventQueue_.raiseEventsForChangedPath(p,[])},e.prototype.update=function(e,t,n){var i=this;this.log_("update",{path:e.toString(),value:t});var a=!0,s=this.generateServerValues(),u={};if(h.forEach(t,function(e,t){a=!1;var n=o.nodeFromJSON(t);u[e]=r.resolveDeferredValueSnapshot(n,s)}),a)l.log("update() called with empty data. Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var c=this.getNextWriteId_(),f=this.serverSyncTree_.applyUserMerge(e,u,c);this.eventQueue_.queueEvents(f),this.server_.merge(e.toString(),t,function(t,r){var o="ok"===t;o||l.warn("update at "+e+" failed: "+t);var a=i.serverSyncTree_.ackUserWrite(c,!o),s=a.length>0?i.rerunTransactions_(e):e;i.eventQueue_.raiseEventsForChangedPath(s,a),i.callOnCompleteCallback(n,t,r)}),h.forEach(t,function(t){var n=i.abortTransactions_(e.child(t));i.rerunTransactions_(n)}),this.eventQueue_.raiseEventsForChangedPath(e,[])}},e.prototype.runOnDisconnectEvents_=function(){var e=this;this.log_("onDisconnectEvents");var t=this.generateServerValues(),n=r.resolveDeferredValueTree(this.onDisconnect_,t),o=[];n.forEachTree(i.Path.Empty,function(t,n){o=o.concat(e.serverSyncTree_.applyServerOverwrite(t,n));var r=e.abortTransactions_(t);e.rerunTransactions_(r)}),this.onDisconnect_=new a.SparseSnapshotTree,this.eventQueue_.raiseEventsForChangedPath(i.Path.Empty,o)},e.prototype.onDisconnectCancel=function(e,t){var n=this;this.server_.onDisconnectCancel(e.toString(),function(r,o){"ok"===r&&n.onDisconnect_.forget(e),n.callOnCompleteCallback(t,r,o)})},e.prototype.onDisconnectSet=function(e,t,n){var r=this,i=o.nodeFromJSON(t);this.server_.onDisconnectPut(e.toString(),i.val(!0),function(t,o){"ok"===t&&r.onDisconnect_.remember(e,i),r.callOnCompleteCallback(n,t,o)})},e.prototype.onDisconnectSetWithPriority=function(e,t,n,r){var i=this,a=o.nodeFromJSON(t,n);this.server_.onDisconnectPut(e.toString(),a.val(!0),function(t,n){"ok"===t&&i.onDisconnect_.remember(e,a),i.callOnCompleteCallback(r,t,n)})},e.prototype.onDisconnectUpdate=function(e,t,n){var r=this;if(h.isEmpty(t))return l.log("onDisconnect().update() called with empty data. Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.server_.onDisconnectMerge(e.toString(),t,function(i,a){"ok"===i&&h.forEach(t,function(t,n){var i=o.nodeFromJSON(n);r.onDisconnect_.remember(e.child(t),i)}),r.callOnCompleteCallback(n,i,a)})},e.prototype.addEventCallbackForQuery=function(e,t){var n;n=".info"===e.path.getFront()?this.infoSyncTree_.addEventRegistration(e,t):this.serverSyncTree_.addEventRegistration(e,t),this.eventQueue_.raiseEventsAtPath(e.path,n)},e.prototype.removeEventCallbackForQuery=function(e,t){var n;n=".info"===e.path.getFront()?this.infoSyncTree_.removeEventRegistration(e,t):this.serverSyncTree_.removeEventRegistration(e,t),this.eventQueue_.raiseEventsAtPath(e.path,n)},e.prototype.interrupt=function(){this.persistentConnection_&&this.persistentConnection_.interrupt("repo_interrupt")},e.prototype.resume=function(){this.persistentConnection_&&this.persistentConnection_.resume("repo_interrupt")},e.prototype.stats=function(e){if(void 0===e&&(e=!1),"undefined"!==typeof console){var t;e?(this.statsListener_||(this.statsListener_=new y.StatsListener(this.stats_)),t=this.statsListener_.get()):t=this.stats_.get();var n=Object.keys(t).reduce(function(e,t){return Math.max(t.length,e)},0);h.forEach(t,function(e,t){for(var r=e.length;r1)for(var n=1;n=0))throw"Expected a number 0 or greater."}return new d(e)}function c(e,t){function n(t){if(!(null===t||p.a(t)&&t instanceof Object))throw"Expected an Object.";void 0!==e&&null!==e&&e(t)}return new d(n,t)}function l(e){function t(e){if(null!==e&&!p.b(e))throw"Expected a Function."}return new d(t,e)}t.g=r,t.e=i,t.f=a,t.b=s,t.c=u,t.a=c,t.d=l;var h=n(12),f=n(53),p=n(10),d=function(){function e(e,t){var n=this;this.validator=function(t){n.optional&&!p.c(t)||e(t)},this.optional=!!t}return e}()},function(e,t,n){"use strict";function r(e,t){return t}function o(e){return!d.j(e)||e.length<2?e:(e=e,p.b(e))}function i(){function e(e,t){return o(t)}function t(e,t){return d.a(t)?+t:t}function n(e,t){if(!(d.j(t)&&t.length>0))return[];var n=encodeURIComponent;return t.split(",").map(function(t){var r=e.bucket,o=e.fullPath,i="/b/"+n(r)+"/o/"+n(o);return y.a(i)+y.c({alt:"media",token:t})})}if(m)return m;var r=[];r.push(new v("bucket")),r.push(new v("generation")),r.push(new v("metageneration")),r.push(new v("name","fullPath",!0));var i=new v("name");i.xform=e,r.push(i);var a=new v("size");return a.xform=t,r.push(a),r.push(new v("timeCreated")),r.push(new v("updated")),r.push(new v("md5Hash",null,!0)),r.push(new v("cacheControl",null,!0)),r.push(new v("contentDisposition",null,!0)),r.push(new v("contentEncoding",null,!0)),r.push(new v("contentLanguage",null,!0)),r.push(new v("contentType",null,!0)),r.push(new v("metadata","customMetadata",!0)),r.push(new v("downloadTokens","downloadURLs",!1,n)),m=r}function a(e,t){function n(){var n=e.bucket,r=e.fullPath,o=new f.a(n,r);return t.makeStorageReference(o)}Object.defineProperty(e,"ref",{get:n})}function s(e,t,n){var r={};r.type="file";for(var o=n.length,i=0;i=200&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(e){s.headers[e]={}}),o.forEach(["post","put","patch"],function(e){s.headers[e]=o.merge(a)}),e.exports=s}).call(t,n(44))},function(e,t,n){"use strict";var r=(n(280),n(281),n(125));n.d(t,"a",function(){return r.a});var o=(n(283),n(286));n.d(t,"b",function(){return o.a});var i=(n(289),n(291),n(126));n.d(t,"c",function(){return i.a});var a=n(62);n.d(t,"d",function(){return a.a});n(297),n(299),n(301),n(302)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};(0,c.default)(d.canUseDOM,"Browser history needs a DOM");var t=window.history,n=(0,d.supportsHistory)(),r=!(0,d.supportsPopStateOnHashChange)(),a=e.forceRefresh,u=void 0!==a&&a,f=e.getUserConfirmation,v=void 0===f?d.getConfirmation:f,m=e.keyLength,g=void 0===m?6:m,_=e.basename?(0,h.stripTrailingSlash)((0,h.addLeadingSlash)(e.basename)):"",b=function(e){var t=e||{},n=t.key,r=t.state,o=window.location,i=o.pathname,a=o.search,u=o.hash,c=i+a+u;return(0,s.default)(!_||(0,h.hasBasename)(c,_),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+c+'" to begin with "'+_+'".'),_&&(c=(0,h.stripBasename)(c,_)),(0,l.createLocation)(c,r,n)},w=function(){return Math.random().toString(36).substr(2,g)},E=(0,p.default)(),C=function(e){i(V,e),V.length=t.length,E.notifyListeners(V.location,V.action)},T=function(e){(0,d.isExtraneousPopstateEvent)(e)||N(b(e.state))},S=function(){N(b(y()))},O=!1,N=function(e){if(O)O=!1,C();else{E.confirmTransitionTo(e,"POP",v,function(t){t?C({action:"POP",location:e}):P(e)})}},P=function(e){var t=V.location,n=R.indexOf(t.key);-1===n&&(n=0);var r=R.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(O=!0,D(o))},I=b(y()),R=[I.key],A=function(e){return _+(0,h.createPath)(e)},k=function(e,r){(0,s.default)(!("object"===("undefined"===typeof e?"undefined":o(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var i=(0,l.createLocation)(e,r,w(),V.location);E.confirmTransitionTo(i,"PUSH",v,function(e){if(e){var r=A(i),o=i.key,a=i.state;if(n)if(t.pushState({key:o,state:a},null,r),u)window.location.href=r;else{var c=R.indexOf(V.location.key),l=R.slice(0,-1===c?0:c+1);l.push(i.key),R=l,C({action:"PUSH",location:i})}else(0,s.default)(void 0===a,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=r}})},x=function(e,r){(0,s.default)(!("object"===("undefined"===typeof e?"undefined":o(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var i=(0,l.createLocation)(e,r,w(),V.location);E.confirmTransitionTo(i,"REPLACE",v,function(e){if(e){var r=A(i),o=i.key,a=i.state;if(n)if(t.replaceState({key:o,state:a},null,r),u)window.location.replace(r);else{var c=R.indexOf(V.location.key);-1!==c&&(R[c]=i.key),C({action:"REPLACE",location:i})}else(0,s.default)(void 0===a,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(r)}})},D=function(e){t.go(e)},M=function(){return D(-1)},L=function(){return D(1)},j=0,F=function(e){j+=e,1===j?((0,d.addEventListener)(window,"popstate",T),r&&(0,d.addEventListener)(window,"hashchange",S)):0===j&&((0,d.removeEventListener)(window,"popstate",T),r&&(0,d.removeEventListener)(window,"hashchange",S))},U=!1,W=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=E.setPrompt(e);return U||(F(1),U=!0),function(){return U&&(U=!1,F(-1)),t()}},B=function(e){var t=E.appendListener(e);return F(1),function(){F(-1),t()}},V={length:t.length,action:"POP",location:I,createHref:A,push:k,replace:x,go:D,goBack:M,goForward:L,block:W,listen:B};return V};t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.locationsAreEqual=t.createLocation=void 0;var o=Object.assign||function(e){for(var t=1;t may have only one child element"),this.unlisten=r.listen(function(){e.setState({match:e.computeMatch(r.location.pathname)})})},t.prototype.componentWillReceiveProps=function(e){s()(this.props.history===e.history,"You cannot change ")},t.prototype.componentWillUnmount=function(){this.unlisten()},t.prototype.render=function(){var e=this.props.children;return e?h.a.Children.only(e):null},t}(h.a.Component);y.propTypes={history:p.a.object.isRequired,children:p.a.node},y.contextTypes={router:p.a.object},y.childContextTypes={router:p.a.object.isRequired},t.a=y},function(e,t,n){"use strict";var r=n(287),o=n.n(r),i={},a=0,s=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=i[n]||(i[n]={});if(r[e])return r[e];var s=[],u=o()(e,s,t),c={re:u,keys:s};return a<1e4&&(r[e]=c,a++),c},u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"===typeof t&&(t={path:t});var n=t,r=n.path,o=void 0===r?"/":r,i=n.exact,a=void 0!==i&&i,u=n.strict,c=void 0!==u&&u,l=n.sensitive,h=void 0!==l&&l,f=s(o,{end:a,strict:c,sensitive:h}),p=f.re,d=f.keys,y=p.exec(e);if(!y)return null;var v=y[0],m=y.slice(1),g=e===v;return a&&!g?null:{path:o,url:"/"===o&&""===v?"/":v,isExact:g,params:d.reduce(function(e,t,n){return e[t.name]=m[n],e},{})}};t.a=u},function(e,t,n){"use strict";var r=n(4),o=n.n(r),i=function(){var e=null,t=function(t){return o()(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},n=function(t,n,r,i){if(null!=e){var a="function"===typeof e?e(t,n):e;"string"===typeof a?"function"===typeof r?r(a,i):(o()(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==a)}else i(!0)},r=[];return{setPrompt:t,confirmTransitionTo:n,appendListener:function(e){var t=!0,n=function(){t&&e.apply(void 0,arguments)};return r.push(n),function(){t=!1,r=r.filter(function(e){return e!==n})}},notifyListeners:function(){for(var e=arguments.length,t=Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function s(){}function u(e,t){var n={run:function(r){try{var o=e(t.getState(),r);(o!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=o,n.error=null)}catch(e){n.shouldComponentUpdate=!0,n.error=e}}};return n}function c(e){var t,n,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=c.getDisplayName,f=void 0===l?function(e){return"ConnectAdvanced("+e+")"}:l,b=c.methodName,w=void 0===b?"connectAdvanced":b,E=c.renderCountProp,C=void 0===E?void 0:E,T=c.shouldHandleStateChanges,S=void 0===T||T,O=c.storeKey,N=void 0===O?"store":O,P=c.withRef,I=void 0!==P&&P,R=a(c,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),A=N+"Subscription",k=g++,x=(t={},t[N]=v.a,t[A]=v.b,t),D=(n={},n[A]=v.b,n);return function(t){p()("function"==typeof t,"You must pass a component to the function returned by connect. Instead received "+JSON.stringify(t));var n=t.displayName||t.name||"Component",a=f(n),c=m({},R,{getDisplayName:f,methodName:w,renderCountProp:C,shouldHandleStateChanges:S,storeKey:N,withRef:I,displayName:a,wrappedComponentName:n,WrappedComponent:t}),l=function(n){function l(e,t){r(this,l);var i=o(this,n.call(this,e,t));return i.version=k,i.state={},i.renderCount=0,i.store=e[N]||t[N],i.propsMode=Boolean(e[N]),i.setWrappedInstance=i.setWrappedInstance.bind(i),p()(i.store,'Could not find "'+N+'" in either the context or props of "'+a+'". Either wrap the root component in a , or explicitly pass "'+N+'" as a prop to "'+a+'".'),i.initSelector(),i.initSubscription(),i}return i(l,n),l.prototype.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return e={},e[A]=t||this.context[A],e},l.prototype.componentDidMount=function(){S&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},l.prototype.componentWillReceiveProps=function(e){this.selector.run(e)},l.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},l.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=s,this.store=null,this.selector.run=s,this.selector.shouldComponentUpdate=!1},l.prototype.getWrappedInstance=function(){return p()(I,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+w+"() call."),this.wrappedInstance},l.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},l.prototype.initSelector=function(){var t=e(this.store.dispatch,c);this.selector=u(t,this.store),this.selector.run(this.props)},l.prototype.initSubscription=function(){if(S){var e=(this.propsMode?this.props:this.context)[A];this.subscription=new y.a(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},l.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(_)):this.notifyNestedSubs()},l.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},l.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},l.prototype.addExtraProps=function(e){if(!I&&!C&&(!this.propsMode||!this.subscription))return e;var t=m({},e);return I&&(t.ref=this.setWrappedInstance),C&&(t[C]=this.renderCount++),this.propsMode&&this.subscription&&(t[A]=this.subscription),t},l.prototype.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return Object(d.createElement)(t,this.addExtraProps(e.props))},l}(d.Component);return l.WrappedComponent=t,l.displayName=a,l.childContextTypes=D,l.contextTypes=x,l.propTypes=x,h()(l,t)}}t.a=c;var l=n(70),h=n.n(l),f=n(8),p=n.n(f),d=n(2),y=(n.n(d),n(154)),v=n(68),m=Object.assign||function(e){for(var t=1;t>6|192,t[n++]=63&o|128):55296==(64512&o)&&r+1>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=63&o|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=63&o|128)}return t},o=function(e){for(var t=[],n=0,r=0;n191&&o<224){var i=e[n++];t[r++]=String.fromCharCode((31&o)<<6|63&i)}else if(o>239&&o<365){var i=e[n++],a=e[n++],s=e[n++],u=((7&o)<<18|(63&i)<<12|(63&a)<<6|63&s)-65536;t[r++]=String.fromCharCode(55296+(u>>10)),t[r++]=String.fromCharCode(56320+(1023&u))}else{var i=e[n++],a=e[n++];t[r++]=String.fromCharCode((15&o)<<12|(63&i)<<6|63&a)}}return t.join("")};t.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(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],o=0;o>2,h=(3&i)<<4|s>>4,f=(15&s)<<2|c>>6,p=63&c;u||(p=64,a||(f=64)),r.push(n[l],n[h],n[f],n[p])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(r(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):o(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],o=0;o>4;if(r.push(f),64!=c){var p=s<<4&240|c>>2;if(r.push(p),64!=h){var d=c<<6&192|h;r.push(d)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},t.base64Encode=function(e){var n=r(e);return t.base64.encodeByteArray(n,!0)},t.base64Decode=function(e){try{return t.base64.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null}},function(e,t,n){"use strict";function r(e){return JSON.parse(e)}function o(e){return JSON.stringify(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.jsonEval=r,t.stringify=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contains=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.safeGet=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},t.forEach=function(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])},t.extend=function(e,n){return t.forEach(n,function(t,n){e[t]=n}),e},t.clone=function(e){return t.extend({},e)},t.isNonNullObject=function(e){return"object"===typeof e&&null!==e},t.isEmpty=function(e){for(var t in e)return!1;return!0},t.getCount=function(e){var t=0;for(var n in e)t++;return t},t.map=function(e,t,n){var r={};for(var o in e)r[o]=t.call(n,e[o],o,e);return r},t.findKey=function(e,t,n){for(var r in e)if(t.call(n,e[r],r,e))return r},t.findValue=function(e,n,r){var o=t.findKey(e,n,r);return o&&e[o]},t.getAnyKey=function(e){for(var t in e)return t},t.getValues=function(e){var t=[],n=0;for(var r in e)t[n++]=e[r];return t},t.every=function(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!t(n,e[n]))return!1;return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=n(84),i=n(3),a=n(46),s=n(35),u=n(51),c=n(0),l=n(14),h=function(){function e(e){this.repo_=e,e instanceof s.Repo||r.fatal("Don't call new Database() directly - please use firebase.database()."),this.root_=new a.Reference(e,i.Path.Empty),this.INTERNAL=new f(this)}return Object.defineProperty(e.prototype,"app",{get:function(){return this.repo_.app},enumerable:!0,configurable:!0}),e.prototype.ref=function(e){return this.checkDeleted_("ref"),c.validateArgCount("database.ref",0,1,arguments.length),void 0!==e?this.root_.child(e):this.root_},e.prototype.refFromURL=function(e){var t="database.refFromURL";this.checkDeleted_(t),c.validateArgCount(t,1,1,arguments.length);var n=o.parseRepoInfo(e);l.validateUrl(t,1,n);var i=n.repoInfo;return i.host!==this.repo_.repoInfo_.host&&r.fatal(t+": Host name does not match the current database: (found "+i.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},e.prototype.checkDeleted_=function(e){null===this.repo_&&r.fatal("Cannot call "+e+" on a deleted database.")},e.prototype.goOffline=function(){c.validateArgCount("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},e.prototype.goOnline=function(){c.validateArgCount("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},e.ServerValue={TIMESTAMP:{".sv":"timestamp"}},e}();t.Database=h;var f=function(){function e(e){this.database=e}return e.prototype.delete=function(){return this.database.checkDeleted_("delete"),u.RepoManager.getInstance().deleteRepo(this.database.repo_),this.database.repo_=null,this.database.root_=null,this.database.INTERNAL=null,this.database=null,Promise.resolve()},e}();t.DatabaseInternals=f},function(e,t,n){"use strict";function r(e){for(var t="",n=e.split("/"),r=0;r0){var o=n[r];try{o=decodeURIComponent(o.replace(/\+/g," "))}catch(e){}t+="/"+o}return t}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),i=n(85),a=n(1);t.parseRepoInfo=function(e){var n=t.parseURL(e),r=n.subdomain;"firebase"===n.domain&&a.fatal(n.host+" is no longer supported. Please use .firebaseio.com instead"),r&&"undefined"!=r||a.fatal("Cannot parse Firebase url. Please use https://.firebaseio.com"),n.secure||a.warnIfPageIsSecure();var s="ws"===n.scheme||"wss"===n.scheme;return{repoInfo:new i.RepoInfo(n.host,n.secure,r,s),path:new o.Path(n.pathString)}},t.parseURL=function(e){var t="",n="",o="",i="",a=!0,s="https",u=443;if("string"===typeof e){var c=e.indexOf("//");c>=0&&(s=e.substring(0,c-1),e=e.substring(c+2));var l=e.indexOf("/");-1===l&&(l=e.length),t=e.substring(0,l),i=r(e.substring(l));var h=t.split(".");3===h.length?(n=h[1],o=h[0].toLowerCase()):2===h.length&&(n=h[0]),c=t.indexOf(":"),c>=0&&(a="https"===s||"wss"===s,u=parseInt(t.substring(c+1),10))}return{host:t,port:u,domain:n,subdomain:o,secure:a,scheme:s,pathString:i}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(0),i=n(30),a=n(31),s=function(){function e(e,t,n,r,o){void 0===o&&(o=""),this.secure=t,this.namespace=n,this.webSocketOnly=r,this.persistenceKey=o,this.host=e.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=i.PersistentStorage.get("host:"+e)||this.host}return e.prototype.needsQueryParam=function(){return this.host!==this.internalHost},e.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},e.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},e.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},e.prototype.updateHost=function(e){e!==this.internalHost&&(this.internalHost=e,this.isCacheableHost()&&i.PersistentStorage.set("host:"+this.host,this.internalHost))},e.prototype.connectionURL=function(e,t){r.assert("string"===typeof e,"typeof type must == string"),r.assert("object"===typeof t,"typeof params must == object");var n;if(e===a.WEBSOCKET)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(e!==a.LONG_POLLING)throw new Error("Unknown connection type: "+e);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(t.ns=this.namespace);var i=[];return o.forEach(t,function(e,t){i.push(e+"="+t)}),n+i.join("&")},e.prototype.toString=function(){var e=this.toURLString();return this.persistenceKey&&(e+="<"+this.persistenceKey+">"),e},e.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},e}();t.RepoInfo=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(14),i=n(1),a=n(0),s=function(){function e(e,t){this.repo_=e,this.path_=t}return e.prototype.cancel=function(e){r.validateArgCount("OnDisconnect.cancel",0,1,arguments.length),r.validateCallback("OnDisconnect.cancel",1,e,!0);var t=new a.Deferred;return this.repo_.onDisconnectCancel(this.path_,t.wrapCallback(e)),t.promise},e.prototype.remove=function(e){r.validateArgCount("OnDisconnect.remove",0,1,arguments.length),o.validateWritablePath("OnDisconnect.remove",this.path_),r.validateCallback("OnDisconnect.remove",1,e,!0);var t=new a.Deferred;return this.repo_.onDisconnectSet(this.path_,null,t.wrapCallback(e)),t.promise},e.prototype.set=function(e,t){r.validateArgCount("OnDisconnect.set",1,2,arguments.length),o.validateWritablePath("OnDisconnect.set",this.path_),o.validateFirebaseDataArg("OnDisconnect.set",1,e,this.path_,!1),r.validateCallback("OnDisconnect.set",2,t,!0);var n=new a.Deferred;return this.repo_.onDisconnectSet(this.path_,e,n.wrapCallback(t)),n.promise},e.prototype.setWithPriority=function(e,t,n){r.validateArgCount("OnDisconnect.setWithPriority",2,3,arguments.length),o.validateWritablePath("OnDisconnect.setWithPriority",this.path_),o.validateFirebaseDataArg("OnDisconnect.setWithPriority",1,e,this.path_,!1),o.validatePriority("OnDisconnect.setWithPriority",2,t,!1),r.validateCallback("OnDisconnect.setWithPriority",3,n,!0);var i=new a.Deferred;return this.repo_.onDisconnectSetWithPriority(this.path_,e,t,i.wrapCallback(n)),i.promise},e.prototype.update=function(e,t){if(r.validateArgCount("OnDisconnect.update",1,2,arguments.length),o.validateWritablePath("OnDisconnect.update",this.path_),Array.isArray(e)){for(var n={},s=0;s3e4&&(this.reconnectDelay_=m),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();var t=(new Date).getTime()-this.lastConnectionAttemptTime_,n=Math.max(0,this.reconnectDelay_-t);n=Math.random()*n,this.log_("Trying to reconnect in "+n+"ms"),this.scheduleConnect_(n),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)},t.prototype.establishConnection_=function(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null;var e=this.onDataMessage_.bind(this),n=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),o=this.id+":"+t.nextConnectionId_++,i=this,a=this.lastSessionId,c=!1,l=null,h=function(){l?l.close():(c=!0,r())},f=function(e){s.assert(l,"sendRequest call when we're not connected not allowed."),l.sendRequest(e)};this.realtime_={close:h,sendRequest:f};var y=this.forceTokenRefresh_;this.forceTokenRefresh_=!1,this.authTokenProvider_.getToken(y).then(function(t){c?u.log("getToken() completed but was canceled"):(u.log("getToken() completed. Creating connection."),i.authToken_=t&&t.accessToken,l=new p.Connection(o,i.repoInfo_,e,n,r,function(e){u.warn(e+" ("+i.repoInfo_.toString()+")"),i.interrupt("server_kill")},a))}).then(null,function(e){i.log_("Failed to get token: "+e),c||(d.CONSTANTS.NODE_ADMIN&&u.warn(e),h())})}},t.prototype.interrupt=function(e){u.log("Interrupting connection for reason: "+e),this.interruptReasons_[e]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},t.prototype.resume=function(e){u.log("Resuming connection for reason: "+e),delete this.interruptReasons_[e],i.isEmpty(this.interruptReasons_)&&(this.reconnectDelay_=m,this.realtime_||this.scheduleConnect_(0))},t.prototype.handleTimestamp_=function(e){var t=e-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:t})},t.prototype.cancelSentTransactions_=function(){for(var e=0;e=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken())},t.prototype.onSecurityDebugPacket_=function(e){this.securityDebugCallback_?this.securityDebugCallback_(e):"msg"in e&&"undefined"!==typeof console&&console.log("FIREBASE: "+e.msg.replace("\n","\nFIREBASE: "))},t.prototype.restoreState_=function(){var e=this;this.tryAuth(),i.forEach(this.listens_,function(t,n){i.forEach(n,function(t,n){e.sendListen_(n)})});for(var t=0;t0,"Requires a non-empty array")}return e.prototype.trigger=function(e){for(var t=[],n=1;n0&&(this.healthyTimeout_=r.setTimeoutNonBlocking(function(){e.healthyTimeout_=null,e.isHealthy_||(e.conn_&&e.conn_.bytesReceived>102400?(e.log_("Connection exceeded healthy timeout but has received "+e.conn_.bytesReceived+" bytes. Marking connection healthy."),e.isHealthy_=!0,e.conn_.markConnectionHealthy()):e.conn_&&e.conn_.bytesSent>10240?e.log_("Connection exceeded healthy timeout but has sent "+e.conn_.bytesSent+" bytes. Leaving connection alive."):(e.log_("Closing unhealthy connection after timeout."),e.close()))},Math.floor(i)))},e.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},e.prototype.disconnReceiver_=function(e){var t=this;return function(n){e===t.conn_?t.onConnectionLost_(n):e===t.secondaryConn_?(t.log_("Secondary connection lost."),t.onSecondaryConnectionLost_()):t.log_("closing an old connection")}},e.prototype.connReceiver_=function(e){var t=this;return function(n){2!=t.state_&&(e===t.rx_?t.onPrimaryMessageReceived_(n):e===t.secondaryConn_?t.onSecondaryMessageReceived_(n):t.log_("message on old connection"))}},e.prototype.sendRequest=function(e){var t={t:"d",d:e};this.sendData_(t)},e.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)},e.prototype.onSecondaryControl_=function(e){if("t"in e){var t=e.t;"a"===t?this.upgradeIfSecondaryHealthy_():"r"===t?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===t&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},e.prototype.onSecondaryMessageReceived_=function(e){var t=r.requireKey("t",e),n=r.requireKey("d",e);if("c"==t)this.onSecondaryControl_(n);else{if("d"!=t)throw new Error("Unknown protocol layer: "+t);this.pendingDataMessages.push(n)}},e.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:{}}}))},e.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()},e.prototype.onPrimaryMessageReceived_=function(e){var t=r.requireKey("t",e),n=r.requireKey("d",e);"c"==t?this.onControl_(n):"d"==t&&this.onDataMessage_(n)},e.prototype.onDataMessage_=function(e){this.onPrimaryResponse_(),this.onMessage_(e)},e.prototype.onPrimaryResponse_=function(){this.isHealthy_||--this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy())},e.prototype.onControl_=function(e){var t=r.requireKey("t",e);if("d"in e){var n=e.d;if("h"===t)this.onHandshake_(n);else if("n"===t){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var o=0;odocument.domain="'+document.domain+'";<\/script>'}var l=""+u+"";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(l),this.myIFrame.doc.close()}catch(e){r.log("frame writing exception"),e.stack&&r.log(e.stack),r.log(e)}}}return e.createIFrame_=function(){var e=document.createElement("iframe");if(e.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(e);try{e.contentWindow.document||r.log("No IE domain setting required")}catch(n){var t=document.domain;e.src="javascript:void((function(){document.open();document.domain='"+t+"';document.close();})())"}return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e},e.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[t.FIREBASE_LONGPOLL_DISCONN_FRAME_PARAM]="t",r[t.FIREBASE_LONGPOLL_ID_PARAM]=this.myID,r[t.FIREBASE_LONGPOLL_PW_PARAM]=this.myPW;var o=this.urlFn(r);e.nodeRestRequest(o)}var i=this.onDisconnect;i&&(this.onDisconnect=null,i())},e.prototype.startLongPoll=function(e,t){for(this.myID=e,this.myPW=t,this.alive=!0;this.newRequest_(););},e.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.count()<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var e={};e[t.FIREBASE_LONGPOLL_ID_PARAM]=this.myID,e[t.FIREBASE_LONGPOLL_PW_PARAM]=this.myPW,e[t.FIREBASE_LONGPOLL_SERIAL_PARAM]=this.currentSerial;for(var n=this.urlFn(e),r="",o=0;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+r.length<=1870))break;var i=this.pendingSegs.shift();r=r+"&"+t.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM+o+"="+i.seg+"&"+t.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET+o+"="+i.ts+"&"+t.FIREBASE_LONGPOLL_DATA_PARAM+o+"="+i.d,o++}return n+=r,this.addLongPollTag_(n,this.currentSerial),!0}return!1},e.prototype.enqueueSegment=function(e,t,n){this.pendingSegs.push({seg:e,ts:t,d:n}),this.alive&&this.newRequest_()},e.prototype.addLongPollTag_=function(e,t){var n=this;this.outstandingRequests.add(t,1);var r=function(){n.outstandingRequests.remove(t),n.newRequest_()},o=setTimeout(r,Math.floor(25e3)),i=function(){clearTimeout(o),r()};this.addTag(e,i)},e.prototype.addTag=function(e,t){var n=this;c.isNodeSdk()?this.doNodeLongPoll(e,t):setTimeout(function(){try{if(!n.sendNewPolls)return;var o=n.myIFrame.doc.createElement("script");o.type="text/javascript",o.async=!0,o.src=e,o.onload=o.onreadystatechange=function(){var e=o.readyState;e&&"loaded"!==e&&"complete"!==e||(o.onload=o.onreadystatechange=null,o.parentNode&&o.parentNode.removeChild(o),t())},o.onerror=function(){r.log("Long-poll script failed to load: "+e),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(o)}catch(e){}},Math.floor(1))},e}();t.FirebaseIFrameScriptHolder=h},function(e,t,n){"use strict";(function(e){function r(e){p=e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(13),i=n(0),a=n(1),s=n(50),u=n(31),c=n(0),l=n(30),h=n(0),f=n(0),p=null;"undefined"!==typeof MozWebSocket?p=MozWebSocket:"undefined"!==typeof WebSocket&&(p=WebSocket),t.setWebSocketImpl=r;var d=function(){function t(e,n,r,o){this.connId=e,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=a.logWrapper(this.connId),this.stats_=s.StatsManager.getCollection(n),this.connURL=t.connectionURL_(n,r,o)}return t.connectionURL_=function(e,t,n){var r={};return r[u.VERSION_PARAM]=u.PROTOCOL_VERSION,!f.isNodeSdk()&&"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf(u.FORGE_DOMAIN)&&(r[u.REFERER_PARAM]=u.FORGE_REF),t&&(r[u.TRANSPORT_SESSION_PARAM]=t),n&&(r[u.LAST_SESSION_PARAM]=n),e.connectionURL(u.WEBSOCKET,r)},t.prototype.open=function(t,n){var r=this;this.onDisconnect=n,this.onMessage=t,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,l.PersistentStorage.set("previous_websocket_failure",!0);try{if(f.isNodeSdk()){var i=c.CONSTANTS.NODE_ADMIN?"AdminNode":"Node",a={headers:{"User-Agent":"Firebase/"+u.PROTOCOL_VERSION+"/"+o.default.SDK_VERSION+"/"+e.platform+"/"+i}},s=Object({NODE_ENV:"production",PUBLIC_URL:"/build"}),h=0==this.connURL.indexOf("wss://")?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;h&&(a.proxy={origin:h}),this.mySock=new p(this.connURL,[],a)}else this.mySock=new p(this.connURL)}catch(e){this.log_("Error instantiating WebSocket.");var d=e.message||e.data;return d&&this.log_(d),void this.onClosed_()}this.mySock.onopen=function(){r.log_("Websocket connected."),r.everConnected_=!0},this.mySock.onclose=function(){r.log_("Websocket connection was disconnected."),r.mySock=null,r.onClosed_()},this.mySock.onmessage=function(e){r.handleIncomingFrame(e)},this.mySock.onerror=function(e){r.log_("WebSocket error. Closing connection.");var t=e.message||e.data;t&&r.log_(t),r.onClosed_()}},t.prototype.start=function(){},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){var e=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var n=/Android ([0-9]{0,}\.[0-9]{0,})/,r=navigator.userAgent.match(n);r&&r.length>1&&parseFloat(r[1])<4.4&&(e=!0)}return!e&&null!==p&&!t.forceDisallow_},t.previouslyFailed=function(){return l.PersistentStorage.isInMemoryStorage||!0===l.PersistentStorage.get("previous_websocket_failure")},t.prototype.markConnectionHealthy=function(){l.PersistentStorage.remove("previous_websocket_failure")},t.prototype.appendFrame_=function(e){if(this.frames.push(e),this.frames.length==this.totalFrames){var t=this.frames.join("");this.frames=null;var n=h.jsonEval(t);this.onMessage(n)}},t.prototype.handleNewFrameCount_=function(e){this.totalFrames=e,this.frames=[]},t.prototype.extractFrameCount_=function(e){if(i.assert(null===this.frames,"We already have a frame buffer"),e.length<=6){var t=Number(e);if(!isNaN(t))return this.handleNewFrameCount_(t),null}return this.handleNewFrameCount_(1),e},t.prototype.handleIncomingFrame=function(e){if(null!==this.mySock){var t=e.data;if(this.bytesReceived+=t.length,this.stats_.incrementCounter("bytes_received",t.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(t);else{var n=this.extractFrameCount_(t);null!==n&&this.appendFrame_(n)}}},t.prototype.send=function(e){this.resetKeepAlive();var t=h.stringify(e);this.bytesSent+=t.length,this.stats_.incrementCounter("bytes_sent",t.length);var n=a.splitStringBySize(t,16384);n.length>1&&this.sendString_(String(n.length));for(var r=0;r0}).join("/");return 0===e.length?n:e+"/"+n}function i(e){var t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}t.c=r,t.a=o,t.b=i},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(247),o=n(23),i=n(10),a=function(){function e(e,t){var n=0,r="";i.d(e)?(this.data_=e,n=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=r}return e.prototype.size=function(){return this.size_},e.prototype.type=function(){return this.type_},e.prototype.slice=function(t,n){if(i.d(this.data_)){var o=this.data_,a=r.b(o,t,n);return null===a?null:new e(a)}return new e(new Uint8Array(this.data_.buffer,t,n-t),!0)},e.getBlob=function(){for(var t=[],n=0;n0&&(d=Math.min(d,a));var y=h.current,v=y+d,m=d===f?"upload, finalize":"upload",g={"X-Goog-Upload-Command":m,"X-Goog-Upload-Offset":h.current},b=r.slice(y,v);if(null===b)throw _.d();var w=t.maxUploadRetryTime(),C=new E.a(n,"POST",l,w);return C.headers=g,C.body=b.uploadData(),C.progressCallback=c||null,C.errorHandler=i(e),C}t.e=s,t.i=u,t.d=c,t.g=f,n.d(t,"a",function(){return S}),t.c=d,t.f=y,n.d(t,"h",function(){return O}),t.b=v;var m=n(55),g=n(115),_=n(12),b=n(53),w=n(19),E=n(248),C=n(10),T=n(54),S=function(){function e(e,t,n,r){this.current=e,this.total=t,this.finalized=!!n,this.metadata=r||null}return e}(),O=262144},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],i=t&&t.split("/")||[],a=e&&r(e),s=t&&r(t),u=a||s;if(e&&r(e)?i=n:n.length&&(i.pop(),i=i.concat(n)),!i.length)return"/";var c=void 0;if(i.length){var l=i[i.length-1];c="."===l||".."===l||""===l}else c=!1;for(var h=0,f=i.length;f>=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),h++):h&&(o(i,f),h--)}if(!u)for(;h--;h)i.unshift("..");!u||""===i[0]||i[0]&&r(i[0])||i.unshift("");var d=i.join("/");return c&&"/"!==d.substr(-1)&&(d+="/"),d}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});var n="undefined"===typeof e?"undefined":o(e);if(n!==("undefined"===typeof t?"undefined":o(t)))return!1;if("object"===n){var i=e.valueOf(),a=t.valueOf();if(i!==e||a!==t)return r(i,a);var s=Object.keys(e),u=Object.keys(t);return s.length===u.length&&s.every(function(n){return r(e[n],t[n])})}return!1}Object.defineProperty(t,"__esModule",{value:!0});var o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=r},function(e,t,n){"use strict";t.__esModule=!0;t.canUseDOM=!("undefined"===typeof window||!window.document||!window.document.createElement),t.addEventListener=function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},t.removeEventListener=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},t.getConfirmation=function(e,t){return t(window.confirm(e))},t.supportsHistory=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},t.supportsPopStateOnHashChange=function(){return-1===window.navigator.userAgent.indexOf("Trident")},t.supportsGoWithoutReloadUsingHash=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},t.isExtraneousPopstateEvent=function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(2),u=n.n(s),c=n(5),l=n.n(c),h=n(8),f=n.n(h),p=Object.assign||function(e){for(var t=1;t outside a ");var i=this.context.router.history.createHref("string"===typeof t?{pathname:t}:t);return u.a.createElement("a",p({},o,{onClick:this.handleClick,href:i,ref:n}))},t}(u.a.Component);y.propTypes={onClick:l.a.func,target:l.a.string,replace:l.a.bool,to:l.a.oneOfType([l.a.string,l.a.object]).isRequired,innerRef:l.a.oneOfType([l.a.string,l.a.func])},y.defaultProps={replace:!1},y.contextTypes={router:l.a.shape({history:l.a.shape({push:l.a.func.isRequired,replace:l.a.func.isRequired,createHref:l.a.func.isRequired}).isRequired}).isRequired},t.a=y},function(e,t,n){"use strict";var r=n(127);t.a=r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(4),s=n.n(a),u=n(8),c=n.n(u),l=n(2),h=n.n(l),f=n(5),p=n.n(f),d=n(64),y=Object.assign||function(e){for(var t=1;t or withRouter() outside a ");var u=t.route,l=(r||u.location).pathname;return o?Object(d.a)(l,{path:o,strict:i,exact:a,sensitive:s}):u.match},t.prototype.componentWillMount=function(){s()(!(this.props.component&&this.props.render),"You should not use and in the same route; will be ignored"),s()(!(this.props.component&&this.props.children&&!v(this.props.children)),"You should not use and in the same route; will be ignored"),s()(!(this.props.render&&this.props.children&&!v(this.props.children)),"You should not use and in the same route; will be ignored")},t.prototype.componentWillReceiveProps=function(e,t){s()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),s()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(e,t.router)})},t.prototype.render=function(){var e=this.state.match,t=this.props,n=t.children,r=t.component,o=t.render,i=this.context.router,a=i.history,s=i.route,u=i.staticContext,c=this.props.location||s.location,l={match:e,location:c,history:a,staticContext:u};return r?e?h.a.createElement(r,l):null:o?e?o(l):null:n?"function"===typeof n?n(l):v(n)?null:h.a.Children.only(n):null},t}(h.a.Component);m.propTypes={computedMatch:p.a.object,path:p.a.string,exact:p.a.bool,strict:p.a.bool,sensitive:p.a.bool,component:p.a.func,render:p.a.func,children:p.a.oneOfType([p.a.func,p.a.node]),location:p.a.object},m.contextTypes={router:p.a.shape({history:p.a.object.isRequired,route:p.a.object.isRequired,staticContext:p.a.object})},m.childContextTypes={router:p.a.object.isRequired},t.a=m},function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"a",function(){return o}),n.d(t,"e",function(){return i}),n.d(t,"c",function(){return a}),n.d(t,"g",function(){return s}),n.d(t,"h",function(){return u}),n.d(t,"f",function(){return c}),n.d(t,"d",function(){return l});var r=!("undefined"===typeof window||!window.document||!window.document.createElement),o=function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},i=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},a=function(e,t){return t(window.confirm(e))},s=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},u=function(){return-1===window.navigator.userAgent.indexOf("Trident")},c=function(){return-1===window.navigator.userAgent.indexOf("Firefox")},l=function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),s=n.n(a),u=(n(58),n(59)),c=(n.n(u),n(29)),l=n(306),h=n(27),f=n.n(h),p=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,t=n.state.answerArray.reduce(function(e,t){return e+t}),r=Math.floor(t/(4*n.state.testObject.questions.length)*100);n.setState({answerNumber:e}),ec){for(var t=0,n=a.length-u;t-1?t:e}function p(e,t){t=t||{};var n=t.body;if(e instanceof p){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=f(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function y(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function v(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var m={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(m.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_=function(e){return e&&DataView.prototype.isPrototypeOf(e)},b=ArrayBuffer.isView||function(e){return e&&g.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];this.map[e]=o?o+","+r:r},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=n(r)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},m.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];p.prototype.clone=function(){return new p(this,{body:this._bodyInit})},h.call(p.prototype),h.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];v.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=p,e.Response=v,e.fetch=function(e,t){return new Promise(function(n,r){var o=new p(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:y(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;n(new v(t,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&m.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"===typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n.n(r),i=n(138),a=n.n(i),s=n(148),u=(n.n(s),n(149)),c=n(309),l=n(78);n.n(l);a.a.render(o.a.createElement(u.a,null),document.getElementById("root")),Object(c.a)()},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;rM.length&&M.push(e)}function p(e,t,n,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case E:case C:case T:case S:a=!0}}if(a)return n(o,e,""===t?"."+d(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;sthis.eventPool.length&&this.eventPool.push(e)}function V(e){e.eventPool=[],e.getPooled=W,e.release=B}function q(e,t,n,r){return U.call(this,e,t,n,r)}function H(e,t,n,r){return U.call(this,e,t,n,r)}function K(e,t){switch(e){case"topKeyUp":return-1!==pr.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function G(e){return e=e.detail,"object"===typeof e&&"data"in e?e.data:null}function z(e,t){switch(e){case"topCompositionEnd":return G(t);case"topKeyPress":return 32!==t.which?null:(Cr=!0,wr);case"topTextInput":return e=t.data,e===wr&&Cr?null:e;default:return null}}function Q(e,t){if(Tr)return"topCompositionEnd"===e||!dr&&K(e,t)?(e=j(),lr._root=null,lr._startText=null,lr._fallbackText=null,Tr=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1Vr.length&&Vr.push(e)}}}function xe(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function De(e){if(zr[e])return zr[e];if(!Gr[e])return e;var t,n=Gr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Qr)return zr[e]=n[t];return""}function Me(e){return Object.prototype.hasOwnProperty.call(e,Jr)||(e[Jr]=$r++,Yr[e[Jr]]={}),Yr[e[Jr]]}function Le(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function je(e,t){var n=Le(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Le(n)}}function Fe(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}function Ue(e,t){if(oo||null==to||to!==Tn())return null;var n=to;return"selectionStart"in n&&Fe(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,ro&&Sn(ro,n)?null:(ro=n,e=U.getPooled(eo.select,no,e,t),e.type="select",e.target=to,D(e),e)}function We(e,t,n,r){return U.call(this,e,t,n,r)}function Be(e,t,n,r){return U.call(this,e,t,n,r)}function Ve(e,t,n,r){return U.call(this,e,t,n,r)}function qe(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,32<=e||13===e?e:0}function He(e,t,n,r){return U.call(this,e,t,n,r)}function Ke(e,t,n,r){return U.call(this,e,t,n,r)}function Ge(e,t,n,r){return U.call(this,e,t,n,r)}function ze(e,t,n,r){return U.call(this,e,t,n,r)}function Qe(e,t,n,r){return U.call(this,e,t,n,r)}function Xe(e){0>fo||(e.current=ho[fo],ho[fo]=null,fo--)}function Ye(e,t){fo++,ho[fo]=e.current,e.current=t}function $e(e){return Ze(e)?vo:po.current}function Je(e,t){var n=e.type.contextTypes;if(!n)return Pn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ze(e){return 2===e.tag&&null!=e.type.childContextTypes}function et(e){Ze(e)&&(Xe(yo,e),Xe(po,e))}function tt(e,t,n){null!=po.cursor&&r("168"),Ye(po,t,e),Ye(yo,n,e)}function nt(e,t){var n=e.stateNode,o=e.type.childContextTypes;if("function"!==typeof n.getChildContext)return t;n=n.getChildContext();for(var i in n)i in o||r("108",we(e)||"Unknown",i);return wn({},t,n)}function rt(e){if(!Ze(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Pn,vo=po.current,Ye(po,t,e),Ye(yo,yo.current,e),!0}function ot(e,t){var n=e.stateNode;if(n||r("169"),t){var o=nt(e,vo);n.__reactInternalMemoizedMergedChildContext=o,Xe(yo,e),Xe(po,e),Ye(po,o,e)}else Xe(yo,e);Ye(yo,t,e)}function it(e,t,n){this.tag=e,this.key=t,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null,this.internalContextTag=n,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function at(e,t,n){var r=e.alternate;return null===r?(r=new it(e.tag,e.key,e.internalContextTag),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.pendingProps=t,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function st(e,t,n){var o=void 0,i=e.type,a=e.key;return"function"===typeof i?(o=i.prototype&&i.prototype.isReactComponent?new it(2,a,t):new it(0,a,t),o.type=i,o.pendingProps=e.props):"string"===typeof i?(o=new it(5,a,t),o.type=i,o.pendingProps=e.props):"object"===typeof i&&null!==i&&"number"===typeof i.tag?(o=i,o.pendingProps=e.props):r("130",null==i?i:typeof i,""),o.expirationTime=n,o}function ut(e,t,n,r){return t=new it(10,r,t),t.pendingProps=e,t.expirationTime=n,t}function ct(e,t,n){return t=new it(6,null,t),t.pendingProps=e,t.expirationTime=n,t}function lt(e,t,n){return t=new it(7,e.key,t),t.type=e.handler,t.pendingProps=e,t.expirationTime=n,t}function ht(e,t,n){return e=new it(9,null,t),e.expirationTime=n,e}function ft(e,t,n){return t=new it(4,e.key,t),t.pendingProps=e.children||[],t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pt(e){return function(t){try{return e(t)}catch(e){}}}function dt(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);mo=pt(function(e){return t.onCommitFiberRoot(n,e)}),go=pt(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function yt(e){"function"===typeof mo&&mo(e)}function vt(e){"function"===typeof go&&go(e)}function mt(e){return{baseState:e,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1}}function gt(e,t){null===e.last?e.first=e.last=t:(e.last.next=t,e.last=t),(0===e.expirationTime||e.expirationTime>t.expirationTime)&&(e.expirationTime=t.expirationTime)}function _t(e,t){var n=e.alternate,r=e.updateQueue;null===r&&(r=e.updateQueue=mt(null)),null!==n?null===(e=n.updateQueue)&&(e=n.updateQueue=mt(null)):e=null,e=e!==r?e:null,null===e?gt(r,t):null===r.last||null===e.last?(gt(r,t),gt(e,t)):(gt(r,t),e.last=t)}function bt(e,t,n,r){return e=e.partialState,"function"===typeof e?e.call(t,n,r):e}function wt(e,t,n,r,o,i){null!==e&&e.updateQueue===n&&(n=t.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,callbackList:null,hasForceUpdate:!1}),n.expirationTime=0,n.isInitialized?e=n.baseState:(e=n.baseState=t.memoizedState,n.isInitialized=!0);for(var a=!0,s=n.first,u=!1;null!==s;){var c=s.expirationTime;if(c>i){var l=n.expirationTime;(0===l||l>c)&&(n.expirationTime=c),u||(u=!0,n.baseState=e)}else u||(n.first=s.next,null===n.first&&(n.last=null)),s.isReplace?(e=bt(s,r,e,o),a=!0):(c=bt(s,r,e,o))&&(e=a?wn({},e,c):wn(e,c),a=!1),s.isForced&&(n.hasForceUpdate=!0),null!==s.callback&&(c=n.callbackList,null===c&&(c=n.callbackList=[]),c.push(s));s=s.next}return null!==n.callbackList?t.effectTag|=32:null!==n.first||n.hasForceUpdate||(t.updateQueue=null),u||(n.baseState=e),e}function Et(e,t){var n=e.callbackList;if(null!==n)for(e.callbackList=null,e=0;ef?(p=h,h=null):p=h.sibling;var m=y(r,h,s[f],u);if(null===m){null===h&&(h=p);break}e&&h&&null===m.alternate&&t(r,h),i=a(m,i,f),null===l?c=m:l.sibling=m,l=m,h=p}if(f===s.length)return n(r,h),c;if(null===h){for(;fp?(m=f,f=null):m=f.sibling;var _=y(i,f,g.value,c);if(null===_){f||(f=m);break}e&&f&&null===_.alternate&&t(i,f),s=a(_,s,p),null===h?l=_:h.sibling=_,h=_,f=m}if(g.done)return n(i,f),l;if(null===f){for(;!g.done;p++,g=u.next())null!==(g=d(i,g.value,c))&&(s=a(g,s,p),null===h?l=g:h.sibling=g,h=g);return l}for(f=o(i,f);!g.done;p++,g=u.next())null!==(g=v(f,i,p,g.value,c))&&(e&&null!==g.alternate&&f.delete(null===g.key?p:g.key),s=a(g,s,p),null===h?l=g:h.sibling=g,h=g);return e&&f.forEach(function(e){return t(i,e)}),l}return function(e,o,a,u){"object"===typeof a&&null!==a&&a.type===To&&null===a.key&&(a=a.props.children);var c="object"===typeof a&&null!==a;if(c)switch(a.$$typeof){case bo:e:{var l=a.key;for(c=o;null!==c;){if(c.key===l){if(10===c.tag?a.type===To:c.type===a.type){n(e,c.sibling),o=i(c,a.type===To?a.props.children:a.props,u),o.ref=St(c,a),o.return=e,e=o;break e}n(e,c);break}t(e,c),c=c.sibling}a.type===To?(o=ut(a.props.children,e.internalContextTag,u,a.key),o.return=e,e=o):(u=st(a,e.internalContextTag,u),u.ref=St(o,a),u.return=e,e=u)}return s(e);case wo:e:{for(c=a.key;null!==o;){if(o.key===c){if(7===o.tag){n(e,o.sibling),o=i(o,a,u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=lt(a,e.internalContextTag,u),o.return=e,e=o}return s(e);case Eo:e:{if(null!==o){if(9===o.tag){n(e,o.sibling),o=i(o,null,u),o.type=a.value,o.return=e,e=o;break e}n(e,o)}o=ht(a,e.internalContextTag,u),o.type=a.value,o.return=e,e=o}return s(e);case Co:e:{for(c=a.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(e,o.sibling),o=i(o,a.children||[],u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=ft(a,e.internalContextTag,u),o.return=e,e=o}return s(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==o&&6===o.tag?(n(e,o.sibling),o=i(o,a,u)):(n(e,o),o=ct(a,e.internalContextTag,u)),o.return=e,e=o,s(e);if(Oo(a))return m(e,o,a,u);if(Tt(a))return g(e,o,a,u);if(c&&Ot(e,a),"undefined"===typeof a)switch(e.tag){case 2:case 1:u=e.type,r("152",u.displayName||u.name||"Component")}return n(e,o)}}function Pt(e,t,n,o,i){function a(e,t,n){var r=t.expirationTime;t.child=null===e?Po(t,null,n,r):No(t,e.child,n,r)}function s(e,t){var n=t.ref;null===n||e&&e.ref===n||(t.effectTag|=128)}function u(e,t,n,r){if(s(e,t),!n)return r&&ot(t,!1),l(e,t);n=t.stateNode,Br.current=t;var o=n.render();return t.effectTag|=1,a(e,t,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&ot(t,!0),t.child}function c(e){var t=e.stateNode;t.pendingContext?tt(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tt(e,t.context,!1),v(e,t.containerInfo)}function l(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=at(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=at(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}function h(e,t){switch(t.tag){case 3:c(t);break;case 2:rt(t);break;case 4:v(t,t.stateNode.containerInfo)}return null}var f=e.shouldSetTextContent,p=e.useSyncScheduling,d=e.shouldDeprioritizeSubtree,y=t.pushHostContext,v=t.pushHostContainer,m=n.enterHydrationState,g=n.resetHydrationState,_=n.tryToClaimNextHydratableInstance;e=Ct(o,i,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t});var b=e.adoptClassInstance,w=e.constructClassInstance,E=e.mountClassInstance,C=e.updateClassInstance;return{beginWork:function(e,t,n){if(0===t.expirationTime||t.expirationTime>n)return h(e,t);switch(t.tag){case 0:null!==e&&r("155");var o=t.type,i=t.pendingProps,T=$e(t);return T=Je(t,T),o=o(i,T),t.effectTag|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render?(t.tag=2,i=rt(t),b(t,o),E(t,n),t=u(e,t,!0,i)):(t.tag=1,a(e,t,o),t.memoizedProps=i,t=t.child),t;case 1:e:{if(i=t.type,n=t.pendingProps,o=t.memoizedProps,yo.current)null===n&&(n=o);else if(null===n||o===n){t=l(e,t);break e}o=$e(t),o=Je(t,o),i=i(n,o),t.effectTag|=1,a(e,t,i),t.memoizedProps=n,t=t.child}return t;case 2:return i=rt(t),o=void 0,null===e?t.stateNode?r("153"):(w(t,t.pendingProps),E(t,n),o=!0):o=C(e,t,n),u(e,t,o,i);case 3:return c(t),i=t.updateQueue,null!==i?(o=t.memoizedState,i=wt(e,t,i,null,null,n),o===i?(g(),t=l(e,t)):(o=i.element,T=t.stateNode,(null===e||null===e.child)&&T.hydrate&&m(t)?(t.effectTag|=2,t.child=Po(t,null,o,n)):(g(),a(e,t,o)),t.memoizedState=i,t=t.child)):(g(),t=l(e,t)),t;case 5:y(t),null===e&&_(t),i=t.type;var S=t.memoizedProps;return o=t.pendingProps,null===o&&null===(o=S)&&r("154"),T=null!==e?e.memoizedProps:null,yo.current||null!==o&&S!==o?(S=o.children,f(i,o)?S=null:T&&f(i,T)&&(t.effectTag|=16),s(e,t),2147483647!==n&&!p&&d(i,o)?(t.expirationTime=2147483647,t=null):(a(e,t,S),t.memoizedProps=o,t=t.child)):t=l(e,t),t;case 6:return null===e&&_(t),e=t.pendingProps,null===e&&(e=t.memoizedProps),t.memoizedProps=e,null;case 8:t.tag=7;case 7:return i=t.pendingProps,yo.current?null===i&&null===(i=e&&e.memoizedProps)&&r("154"):null!==i&&t.memoizedProps!==i||(i=t.memoizedProps),o=i.children,t.stateNode=null===e?Po(t,t.stateNode,o,n):No(t,t.stateNode,o,n),t.memoizedProps=i,t.stateNode;case 9:return null;case 4:e:{if(v(t,t.stateNode.containerInfo),i=t.pendingProps,yo.current)null===i&&null==(i=e&&e.memoizedProps)&&r("154");else if(null===i||t.memoizedProps===i){t=l(e,t);break e}null===e?t.child=No(t,null,i,n):a(e,t,i),t.memoizedProps=i,t=t.child}return t;case 10:e:{if(n=t.pendingProps,yo.current)null===n&&(n=t.memoizedProps);else if(null===n||t.memoizedProps===n){t=l(e,t);break e}a(e,t,n),t.memoizedProps=n,t=t.child}return t;default:r("156")}},beginFailedWork:function(e,t,n){switch(t.tag){case 2:rt(t);break;case 3:c(t);break;default:r("157")}return t.effectTag|=64,null===e?t.child=null:t.child!==e.child&&(t.child=e.child),0===t.expirationTime||t.expirationTime>n?h(e,t):(t.firstEffect=null,t.lastEffect=null,t.child=null===e?Po(t,null,null,n):No(t,e.child,null,n),2===t.tag&&(e=t.stateNode,t.memoizedProps=e.props,t.memoizedState=e.state),t.child)}}}function It(e,t,n){function o(e){e.effectTag|=4}var i=e.createInstance,a=e.createTextInstance,s=e.appendInitialChild,u=e.finalizeInitialChildren,c=e.prepareUpdate,l=e.persistence,h=t.getRootHostContainer,f=t.popHostContext,p=t.getHostContext,d=t.popHostContainer,y=n.prepareToHydrateHostInstance,v=n.prepareToHydrateHostTextInstance,m=n.popHydrationState,g=void 0,_=void 0,b=void 0;return e.mutation?(g=function(){},_=function(e,t,n){(t.updateQueue=n)&&o(t)},b=function(e,t,n,r){n!==r&&o(t)}):r(l?"235":"236"),{completeWork:function(e,t,n){var l=t.pendingProps;switch(null===l?l=t.memoizedProps:2147483647===t.expirationTime&&2147483647!==n||(t.pendingProps=null),t.tag){case 1:return null;case 2:return et(t),null;case 3:return d(t),Xe(yo,t),Xe(po,t),l=t.stateNode,l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),null!==e&&null!==e.child||(m(t),t.effectTag&=-3),g(t),null;case 5:f(t),n=h();var w=t.type;if(null!==e&&null!=t.stateNode){var E=e.memoizedProps,C=t.stateNode,T=p();C=c(C,w,E,l,n,T),_(e,t,C,w,E,l,n),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!l)return null===t.stateNode&&r("166"),null;if(e=p(),m(t))y(t,n,e)&&o(t);else{e=i(w,l,n,e,t);e:for(E=t.child;null!==E;){if(5===E.tag||6===E.tag)s(e,E.stateNode);else if(4!==E.tag&&null!==E.child){E.child.return=E,E=E.child;continue}if(E===t)break;for(;null===E.sibling;){if(null===E.return||E.return===t)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}u(e,w,l,n)&&o(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)b(e,t,e.memoizedProps,l);else{if("string"!==typeof l)return null===t.stateNode&&r("166"),null;e=h(),n=p(),m(t)?v(t)&&o(t):t.stateNode=a(l,e,n,t)}return null;case 7:(l=t.memoizedProps)||r("165"),t.tag=8,w=[];e:for((E=t.stateNode)&&(E.return=t);null!==E;){if(5===E.tag||6===E.tag||4===E.tag)r("247");else if(9===E.tag)w.push(E.type);else if(null!==E.child){E.child.return=E,E=E.child;continue}for(;null===E.sibling;){if(null===E.return||E.return===t)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}return E=l.handler,l=E(l.props,w),t.child=No(t,null!==e?e.child:null,l,n),t.child;case 8:return t.tag=7,null;case 9:case 10:return null;case 4:return d(t),g(t),null;case 0:r("167");default:r("156")}}}}function Rt(e,t){function n(e){var n=e.ref;if(null!==n)try{n(null)}catch(n){t(e,n)}}function o(e){switch("function"===typeof vt&&vt(e),e.tag){case 2:n(e);var r=e.stateNode;if("function"===typeof r.componentWillUnmount)try{r.props=e.memoizedProps,r.state=e.memoizedState,r.componentWillUnmount()}catch(n){t(e,n)}break;case 5:n(e);break;case 7:i(e.stateNode);break;case 4:c&&s(e)}}function i(e){for(var t=e;;)if(o(t),null===t.child||c&&4===t.tag){if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}else t.child.return=t,t=t.child}function a(e){return 5===e.tag||3===e.tag||4===e.tag}function s(e){for(var t=e,n=!1,a=void 0,s=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:a=n.stateNode,s=!1;break e;case 3:case 4:a=n.stateNode.containerInfo,s=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag)i(t),s?_(a,t.stateNode):g(a,t.stateNode);else if(4===t.tag?a=t.stateNode.containerInfo:o(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}var u=e.getPublicInstance,c=e.mutation;e=e.persistence,c||r(e?"235":"236");var l=c.commitMount,h=c.commitUpdate,f=c.resetTextContent,p=c.commitTextUpdate,d=c.appendChild,y=c.appendChildToContainer,v=c.insertBefore,m=c.insertInContainerBefore,g=c.removeChild,_=c.removeChildFromContainer;return{commitResetTextContent:function(e){f(e.stateNode)},commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(a(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var o=t=void 0;switch(n.tag){case 5:t=n.stateNode,o=!1;break;case 3:case 4:t=n.stateNode.containerInfo,o=!0;break;default:r("161")}16&n.effectTag&&(f(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||a(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)n?o?m(t,i.stateNode,n):v(t,i.stateNode,n):o?y(t,i.stateNode):d(t,i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},commitDeletion:function(e){s(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var o=t.memoizedProps;e=null!==e?e.memoizedProps:o;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&h(n,a,i,e,o,t)}break;case 6:null===t.stateNode&&r("162"),n=t.memoizedProps,p(t.stateNode,null!==e?e.memoizedProps:n,n);break;case 3:break;default:r("163")}},commitLifeCycles:function(e,t){switch(t.tag){case 2:var n=t.stateNode;if(4&t.effectTag)if(null===e)n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidMount();else{var o=e.memoizedProps;e=e.memoizedState,n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidUpdate(o,e)}t=t.updateQueue,null!==t&&Et(t,n);break;case 3:n=t.updateQueue,null!==n&&Et(n,null!==t.child?t.child.stateNode:null);break;case 5:n=t.stateNode,null===e&&4&t.effectTag&&l(n,t.type,t.memoizedProps,t);break;case 6:case 4:break;default:r("163")}},commitAttachRef:function(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case 5:t(u(n));break;default:t(n)}}},commitDetachRef:function(e){null!==(e=e.ref)&&e(null)}}}function At(e){function t(e){return e===Io&&r("174"),e}var n=e.getChildHostContext,o=e.getRootHostContext,i={current:Io},a={current:Io},s={current:Io};return{getHostContext:function(){return t(i.current)},getRootHostContainer:function(){return t(s.current)},popHostContainer:function(e){Xe(i,e),Xe(a,e),Xe(s,e)},popHostContext:function(e){a.current===e&&(Xe(i,e),Xe(a,e))},pushHostContainer:function(e,t){Ye(s,t,e),t=o(t),Ye(a,e,e),Ye(i,t,e)},pushHostContext:function(e){var r=t(s.current),o=t(i.current);r=n(o,e.type,r),o!==r&&(Ye(a,e,e),Ye(i,r,e))},resetHostContainer:function(){i.current=Io,s.current=Io}}}function kt(e){function t(e,t){var n=new it(5,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function n(e,t){switch(e.tag){case 5:return null!==(t=a(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=s(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function o(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;f=e}var i=e.shouldSetTextContent;if(!(e=e.hydration))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){r("175")},prepareToHydrateHostTextInstance:function(){r("176")},popHydrationState:function(){return!1}};var a=e.canHydrateInstance,s=e.canHydrateTextInstance,u=e.getNextHydratableSibling,c=e.getFirstHydratableChild,l=e.hydrateInstance,h=e.hydrateTextInstance,f=null,p=null,d=!1;return{enterHydrationState:function(e){return p=c(e.stateNode.containerInfo),f=e,d=!0},resetHydrationState:function(){p=f=null,d=!1},tryToClaimNextHydratableInstance:function(e){if(d){var r=p;if(r){if(!n(e,r)){if(!(r=u(r))||!n(e,r))return e.effectTag|=2,d=!1,void(f=e);t(f,p)}f=e,p=c(r)}else e.effectTag|=2,d=!1,f=e}},prepareToHydrateHostInstance:function(e,t,n){return t=l(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return h(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==f)return!1;if(!d)return o(e),d=!0,!1;var n=e.type;if(5!==e.tag||"head"!==n&&"body"!==n&&!i(n,e.memoizedProps))for(n=p;n;)t(e,n),n=u(n);return o(e),p=f?u(e.stateNode):null,!0}}}function xt(e){function t(e){ie=X=!0;var t=e.stateNode;if(t.current===e&&r("177"),t.isReadyForCommit=!1,Br.current=null,1a.expirationTime)&&(i=a.expirationTime),a=a.sibling;o.expirationTime=i}if(null!==t)return t;if(null!==n&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1e))if(J<=z)for(;null!==Y;)Y=c(Y)?i(Y):o(Y);else for(;null!==Y&&!E();)Y=c(Y)?i(Y):o(Y)}else if(!(0===J||J>e))if(J<=z)for(;null!==Y;)Y=o(Y);else for(;null!==Y&&!E();)Y=o(Y)}function s(e,t){if(X&&r("243"),X=!0,e.isReadyForCommit=!1,e!==$||t!==J||null===Y){for(;-1t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!X&&n===$&&tbe&&r("185"),null===o.nextScheduledRoot)o.remainingExpirationTime=i,null===ue?(se=ue=o,o.nextScheduledRoot=o):(ue=ue.nextScheduledRoot=o,ue.nextScheduledRoot=se);else{var a=o.remainingExpirationTime;(0===a||ice)return;V(le)}var t=W()-G;ce=e,le=B(_,{timeout:10*(e-2)-t})}function g(){var e=0,t=null;if(null!==ue)for(var n=ue,o=se;null!==o;){var i=o.remainingExpirationTime;if(0===i){if((null===n||null===ue)&&r("244"),o===o.nextScheduledRoot){se=ue=o.nextScheduledRoot=null;break}if(o===se)se=i=o.nextScheduledRoot,ue.nextScheduledRoot=i,o.nextScheduledRoot=null;else{if(o===ue){ue=n,ue.nextScheduledRoot=se,o.nextScheduledRoot=null;break}n.nextScheduledRoot=o.nextScheduledRoot,o.nextScheduledRoot=null}o=n.nextScheduledRoot}else{if((0===e||iCe)&&(de=!0)}function C(e){null===fe&&r("246"),fe.remainingExpirationTime=0,ye||(ye=!0,ve=e)}var T=At(e),S=kt(e),O=T.popHostContainer,N=T.popHostContext,P=T.resetHostContainer,I=Pt(e,T,S,p,f),R=I.beginWork,A=I.beginFailedWork,k=It(e,T,S).completeWork;T=Rt(e,u);var x=T.commitResetTextContent,D=T.commitPlacement,M=T.commitDeletion,L=T.commitWork,j=T.commitLifeCycles,F=T.commitAttachRef,U=T.commitDetachRef,W=e.now,B=e.scheduleDeferredCallback,V=e.cancelDeferredCallback,q=e.useSyncScheduling,H=e.prepareForCommit,K=e.resetAfterCommit,G=W(),z=2,Q=0,X=!1,Y=null,$=null,J=0,Z=null,ee=null,te=null,ne=null,re=null,oe=!1,ie=!1,ae=!1,se=null,ue=null,ce=0,le=-1,he=!1,fe=null,pe=0,de=!1,ye=!1,ve=null,me=null,ge=!1,_e=!1,be=1e3,Ee=0,Ce=1;return{computeAsyncExpiration:h,computeExpirationForFiber:f,scheduleWork:p,batchedUpdates:function(e,t){var n=ge;ge=!0;try{return e(t)}finally{(ge=n)||he||b(1,null)}},unbatchedUpdates:function(e){if(ge&&!_e){_e=!0;try{return e()}finally{_e=!1}}return e()},flushSync:function(e){var t=ge;ge=!0;try{e:{var n=Q;Q=1;try{var o=e();break e}finally{Q=n}o=void 0}return o}finally{ge=t,he&&r("187"),b(1,null)}},deferredUpdates:function(e){var t=Q;Q=h();try{return e()}finally{Q=t}}}}function Dt(e){function t(e){return e=Oe(e),null===e?null:e.stateNode}var n=e.getPublicInstance;e=xt(e);var o=e.computeAsyncExpiration,i=e.computeExpirationForFiber,a=e.scheduleWork;return{createContainer:function(e,t){var n=new it(3,null,0);return e={current:n,containerInfo:e,pendingChildren:null,remainingExpirationTime:0,isReadyForCommit:!1,finishedWork:null,context:null,pendingContext:null,hydrate:t,nextScheduledRoot:null},n.stateNode=e},updateContainer:function(e,t,n,s){var u=t.current;if(n){n=n._reactInternalFiber;var c;e:{for(2===Ee(n)&&2===n.tag||r("170"),c=n;3!==c.tag;){if(Ze(c)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}(c=c.return)||r("171")}c=c.stateNode.context}n=Ze(n)?nt(n,c):c}else n=Pn;null===t.context?t.context=n:t.pendingContext=n,t=s,t=void 0===t?null:t,s=null!=e&&null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent?o():i(u),_t(u,{expirationTime:s,partialState:{element:e},callback:t,isReplace:!1,isForced:!1,nextCallback:null,next:null}),a(u,s)},batchedUpdates:e.batchedUpdates,unbatchedUpdates:e.unbatchedUpdates,deferredUpdates:e.deferredUpdates,flushSync:e.flushSync,getPublicRootInstance:function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return n(e.child.stateNode);default:return e.child.stateNode}},findHostInstance:t,findHostInstanceWithNoPortals:function(e){return e=Ne(e),null===e?null:e.stateNode},injectIntoDevTools:function(e){var n=e.findFiberByHostInstance;return dt(wn({},e,{findHostInstanceByFiber:function(e){return t(e)},findFiberByHostInstance:function(e){return n?n(e):null}}))}}}function Mt(e,t,n){var r=3n||r.hasOverloadedBooleanValue&&!1===n?Ut(e,t):r.mustUseProperty?e[r.propertyName]=n:(t=r.attributeName,(o=r.attributeNamespace)?e.setAttributeNS(o,t,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&!0===n?e.setAttribute(t,""):e.setAttribute(t,""+n))}else Ft(e,t,i(t,n)?n:null)}function Ft(e,t,n){Lt(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))}function Ut(e,t){var n=a(t);n?(t=n.mutationMethod)?t(e,void 0):n.mustUseProperty?e[n.propertyName]=!n.hasBooleanValue&&"":e.removeAttribute(n.attributeName):e.removeAttribute(t)}function Wt(e,t){var n=t.value,r=t.checked;return wn({type:void 0,step:void 0,min:void 0,max:void 0},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked})}function Bt(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:null!=t.value?t.value:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Vt(e,t){null!=(t=t.checked)&&jt(e,"checked",t)}function qt(e,t){Vt(e,t);var n=t.value;null!=n?0===n&&""===e.value?e.value="0":"number"===t.type?(t=parseFloat(e.value)||0,(n!=t||n==t&&e.value!=n)&&(e.value=""+n)):e.value!==""+n&&(e.value=""+n):(null==t.value&&null!=t.defaultValue&&e.defaultValue!==""+t.defaultValue&&(e.defaultValue=""+t.defaultValue),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked))}function Ht(e,t){switch(t.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":e.value="",e.value=e.defaultValue;break;default:e.value=e.value}t=e.name,""!==t&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==t&&(e.name=t)}function Kt(e){var t="";return _n.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}function Gt(e,t){return e=wn({children:void 0},t),(t=Kt(t.children))&&(e.children=t),e}function zt(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function $t(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Jt(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function Zt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function en(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Zt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function tn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function nn(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,i=t[n];o=null==i||"boolean"===typeof i||""===i?"":r||"number"!==typeof i||0===i||Zo.hasOwnProperty(o)&&Zo[o]?(""+i).trim():i+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}function rn(e,t,n){t&&(ti[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!==typeof t.style&&r("62",n()))}function on(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function an(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=Me(e);t=Yn[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"===typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function un(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function cn(e,t,n,r){var o=on(t,n);switch(t){case"iframe":case"object":Re("topLoad","load",e);var i=n;break;case"video":case"audio":for(i in oi)oi.hasOwnProperty(i)&&Re(i,oi[i],e);i=n;break;case"source":Re("topError","error",e),i=n;break;case"img":case"image":Re("topError","error",e),Re("topLoad","load",e),i=n;break;case"form":Re("topReset","reset",e),Re("topSubmit","submit",e),i=n;break;case"details":Re("topToggle","toggle",e),i=n;break;case"input":Bt(e,n),i=Wt(e,n),Re("topInvalid","invalid",e),an(r,"onChange");break;case"option":i=Gt(e,n);break;case"select":Qt(e,n),i=wn({},n,{value:void 0}),Re("topInvalid","invalid",e),an(r,"onChange");break;case"textarea":Yt(e,n),i=Xt(e,n),Re("topInvalid","invalid",e),an(r,"onChange");break;default:i=n}rn(t,i,ri);var a,s=i;for(a in s)if(s.hasOwnProperty(a)){var u=s[a];"style"===a?nn(e,u,ri):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&Jo(e,u):"children"===a?"string"===typeof u?("textarea"!==t||""!==u)&&tn(e,u):"number"===typeof u&&tn(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(Xn.hasOwnProperty(a)?null!=u&&an(r,a):o?Ft(e,a,u):null!=u&&jt(e,a,u))}switch(t){case"input":ie(e),Ht(e,n);break;case"textarea":ie(e),Jt(e,n);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,t=n.value,null!=t?zt(e,!!n.multiple,t,!1):null!=n.defaultValue&&zt(e,!!n.multiple,n.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=En)}}function ln(e,t,n,r,o){var i=null;switch(t){case"input":n=Wt(e,n),r=Wt(e,r),i=[];break;case"option":n=Gt(e,n),r=Gt(e,r),i=[];break;case"select":n=wn({},n,{value:void 0}),r=wn({},r,{value:void 0}),i=[];break;case"textarea":n=Xt(e,n),r=Xt(e,r),i=[];break;default:"function"!==typeof n.onClick&&"function"===typeof r.onClick&&(e.onclick=En)}rn(t,r,ri);var a,s;e=null;for(a in n)if(!r.hasOwnProperty(a)&&n.hasOwnProperty(a)&&null!=n[a])if("style"===a)for(s in t=n[a])t.hasOwnProperty(s)&&(e||(e={}),e[s]="");else"dangerouslySetInnerHTML"!==a&&"children"!==a&&"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(Xn.hasOwnProperty(a)?i||(i=[]):(i=i||[]).push(a,null));for(a in r){var u=r[a];if(t=null!=n?n[a]:void 0,r.hasOwnProperty(a)&&u!==t&&(null!=u||null!=t))if("style"===a)if(t){for(s in t)!t.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(e||(e={}),e[s]="");for(s in u)u.hasOwnProperty(s)&&t[s]!==u[s]&&(e||(e={}),e[s]=u[s])}else e||(i||(i=[]),i.push(a,e)),e=u;else"dangerouslySetInnerHTML"===a?(u=u?u.__html:void 0,t=t?t.__html:void 0,null!=u&&t!==u&&(i=i||[]).push(a,""+u)):"children"===a?t===u||"string"!==typeof u&&"number"!==typeof u||(i=i||[]).push(a,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&(Xn.hasOwnProperty(a)?(null!=u&&an(o,a),i||t===u||(i=[])):(i=i||[]).push(a,u))}return e&&(i=i||[]).push("style",e),i}function hn(e,t,n,r,o){"input"===n&&"radio"===o.type&&null!=o.name&&Vt(e,o),on(n,r),r=on(n,o);for(var i=0;i=u.hasBooleanValue+u.hasNumericValue+u.hasOverloadedBooleanValue||r("50",s),a.hasOwnProperty(s)&&(u.attributeName=a[s]),i.hasOwnProperty(s)&&(u.attributeNamespace=i[s]),e.hasOwnProperty(s)&&(u.mutationMethod=e[s]),An[s]=u}}},An={},kn=Rn,xn=kn.MUST_USE_PROPERTY,Dn=kn.HAS_BOOLEAN_VALUE,Mn=kn.HAS_NUMERIC_VALUE,Ln=kn.HAS_POSITIVE_NUMERIC_VALUE,jn=kn.HAS_OVERLOADED_BOOLEAN_VALUE,Fn=kn.HAS_STRING_BOOLEAN_VALUE,Un={Properties:{allowFullScreen:Dn,async:Dn,autoFocus:Dn,autoPlay:Dn,capture:jn,checked:xn|Dn,cols:Ln,contentEditable:Fn,controls:Dn,default:Dn,defer:Dn,disabled:Dn,download:jn,draggable:Fn,formNoValidate:Dn,hidden:Dn,loop:Dn,multiple:xn|Dn,muted:xn|Dn,noValidate:Dn,open:Dn,playsInline:Dn,readOnly:Dn,required:Dn,reversed:Dn,rows:Ln,rowSpan:Mn,scoped:Dn,seamless:Dn,selected:xn|Dn,size:Ln,start:Mn,span:Ln,spellCheck:Fn,style:0,tabIndex:0,itemScope:Dn,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:Fn},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute("value");"number"!==e.type||!1===e.hasAttribute("value")?e.setAttribute("value",""+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute("value",""+t)}}},Wn=kn.HAS_STRING_BOOLEAN_VALUE,Bn={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Vn={Properties:{autoReverse:Wn,externalResourcesRequired:Wn,preserveAlpha:Wn},DOMAttributeNames:{autoReverse:"autoReverse",externalResourcesRequired:"externalResourcesRequired",preserveAlpha:"preserveAlpha"},DOMAttributeNamespaces:{xlinkActuate:Bn.xlink,xlinkArcrole:Bn.xlink,xlinkHref:Bn.xlink,xlinkRole:Bn.xlink,xlinkShow:Bn.xlink,xlinkTitle:Bn.xlink,xlinkType:Bn.xlink,xmlBase:Bn.xml,xmlLang:Bn.xml,xmlSpace:Bn.xml}},qn=/[\-\:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space".split(" ").forEach(function(e){var t=e.replace(qn,s);Vn.Properties[t]=0,Vn.DOMAttributeNames[t]=e}),kn.injectDOMPropertyConfig(Un),kn.injectDOMPropertyConfig(Vn);var Hn={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(e){"function"!==typeof e.invokeGuardedCallback&&r("197"),u=e.invokeGuardedCallback}},invokeGuardedCallback:function(e,t,n,r,o,i,a,s,c){u.apply(Hn,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,o,i,a,s,u){if(Hn.invokeGuardedCallback.apply(this,arguments),Hn.hasCaughtError()){var c=Hn.clearCaughtError();Hn._hasRethrowError||(Hn._hasRethrowError=!0,Hn._rethrowError=c)}},rethrowCaughtError:function(){return c.apply(Hn,arguments)},hasCaughtError:function(){return Hn._hasCaughtError},clearCaughtError:function(){if(Hn._hasCaughtError){var e=Hn._caughtError;return Hn._caughtError=null,Hn._hasCaughtError=!1,e}r("198")}},Kn=null,Gn={},zn=[],Qn={},Xn={},Yn={},$n=Object.freeze({plugins:zn,eventNameDispatchConfigs:Qn,registrationNameModules:Xn,registrationNameDependencies:Yn,possibleRegistrationNames:null,injectEventPluginOrder:f,injectEventPluginsByName:p}),Jn=null,Zn=null,er=null,tr=null,nr={injectEventPluginOrder:f,injectEventPluginsByName:p},rr=Object.freeze({injection:nr,getListener:b,extractEvents:w,enqueueEvents:E,processEventQueue:C}),or=Math.random().toString(36).slice(2),ir="__reactInternalInstance$"+or,ar="__reactEventHandlers$"+or,sr=Object.freeze({precacheFiberNode:function(e,t){t[ir]=e},getClosestInstanceFromNode:T,getInstanceFromNode:function(e){return e=e[ir],!e||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:S,getFiberCurrentPropsFromNode:O,updateFiberProps:function(e,t){e[ar]=t}}),ur=Object.freeze({accumulateTwoPhaseDispatches:D,accumulateTwoPhaseDispatchesSkipTarget:function(e){v(e,A)},accumulateEnterLeaveDispatches:M,accumulateDirectDispatches:function(e){v(e,x)}}),cr=null,lr={_root:null,_startText:null,_fallbackText:null},hr="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),fr={type:null,target:null,currentTarget:En.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};wn(U.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=En.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=En.thatReturnsTrue)},persist:function(){this.isPersistent=En.thatReturnsTrue},isPersistent:En.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t=parseInt(mr.version(),10))}var gr,_r=vr,br=bn.canUseDOM&&(!dr||yr&&8=yr),wr=String.fromCharCode(32),Er={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Cr=!1,Tr=!1,Sr={eventTypes:Er,extractEvents:function(e,t,n,r){var o;if(dr)e:{switch(e){case"topCompositionStart":var i=Er.compositionStart;break e;case"topCompositionEnd":i=Er.compositionEnd;break e;case"topCompositionUpdate":i=Er.compositionUpdate;break e}i=void 0}else Tr?K(e,n)&&(i=Er.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(i=Er.compositionStart);return i?(br&&(Tr||i!==Er.compositionStart?i===Er.compositionEnd&&Tr&&(o=j()):(lr._root=r,lr._startText=F(),Tr=!0)),i=q.getPooled(i,t,n,r),o?i.data=o:null!==(o=G(n))&&(i.data=o),D(i),o=i):o=null,(e=_r?z(e,n):Q(e,n))?(t=H.getPooled(Er.beforeInput,t,n,r),t.data=e,D(t)):t=null,[o,t]}},Or=null,Nr=null,Pr=null,Ir={injectFiberControlledHostComponent:function(e){Or=e}},Rr=Object.freeze({injection:Ir,enqueueStateRestore:Y,restoreStateIfNeeded:$}),Ar=!1,kr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};bn.canUseDOM&&(gr=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));var xr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}},Dr=null,Mr=null,Lr=!1;bn.canUseDOM&&(Lr=ne("input")&&(!document.documentMode||9=document.documentMode,eo={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},to=null,no=null,ro=null,oo=!1,io={eventTypes:eo,extractEvents:function(e,t,n,r){var o,i=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!i)){e:{i=Me(i),o=Yn.onSelect;for(var a=0;a=Vo-e){if(!(-1!==Wo&&Wo<=e))return void(Bo||(Bo=!0,requestAnimationFrame(Go)));jo.didTimeout=!0}else jo.didTimeout=!1;Wo=-1,e=Fo,Fo=null,null!==e&&e(jo)}},!1);var Go=function(e){Bo=!1;var t=e-Vo+Ho;tt&&(t=8),Ho=t"+t+"",t=$o.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),Zo={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ei=["Webkit","ms","Moz","O"];Object.keys(Zo).forEach(function(e){ei.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zo[t]=Zo[e]})});var ti=wn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),ni=Yo.html,ri=En.thatReturns(""),oi={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},ii=Object.freeze({createElement:sn,createTextNode:un,setInitialProperties:cn,diffProperties:ln,updateProperties:hn,diffHydratedProperties:fn,diffHydratedText:pn,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(qt(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;tr&&(o=r,r=e,e=o),o=je(n,e);var i=je(n,r);if(o&&i&&(1!==t.rangeCount||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==i.node||t.focusOffset!==i.offset)){var a=document.createRange();a.setStart(o.node,o.offset),t.removeAllRanges(),e>r?(t.addRange(a),t.extend(i.node,i.offset)):(a.setEnd(i.node,i.offset),t.addRange(a))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(Nn(n),n=0;n0&&void 0!==arguments[0]?arguments[0]:"store",n=arguments[1],s=n||t+"Subscription",l=function(e){function n(i,a){r(this,n);var s=o(this,e.call(this,i,a));return s[t]=i.store,s}return i(n,e),n.prototype.getChildContext=function(){var e;return e={},e[t]=this[t],e[s]=null,e},n.prototype.render=function(){return a.Children.only(this.props.children)},n}(a.Component);return l.propTypes={store:c.a.isRequired,children:u.a.element.isRequired},l.childContextTypes=(e={},e[t]=c.a.isRequired,e[s]=c.b,e),l}()},function(e,t,n){"use strict";var r=n(28),o=n(152),i=n(153);e.exports=function(){function e(e,t,n,r,a,s){s!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";function r(e,t,n,r,i,a,s,u){if(o(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,s,u],h=0;c=new Error(t.replace(/%s/g,function(){return l[h++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(e){};e.exports=r},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){var e=[],t=[];return{clear:function(){t=i,e=i},notify:function(){for(var n=e=t,r=0;r=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function i(e,t){return e===t}var a=n(69),s=n(156),u=n(157),c=n(173),l=n(174),h=n(175),f=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.connectHOC,n=void 0===t?a.a:t,p=e.mapStateToPropsFactories,d=void 0===p?c.a:p,y=e.mapDispatchToPropsFactories,v=void 0===y?u.a:y,m=e.mergePropsFactories,g=void 0===m?l.a:m,_=e.selectorFactory,b=void 0===_?h.a:_;return function(e,t,a){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=u.pure,l=void 0===c||c,h=u.areStatesEqual,p=void 0===h?i:h,y=u.areOwnPropsEqual,m=void 0===y?s.a:y,_=u.areStatePropsEqual,w=void 0===_?s.a:_,E=u.areMergedPropsEqual,C=void 0===E?s.a:E,T=r(u,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),S=o(e,d,"mapStateToProps"),O=o(t,v,"mapDispatchToProps"),N=o(a,g,"mergeProps");return n(b,f({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:S,initMapDispatchToProps:O,initMergeProps:N,pure:l,areStatesEqual:p,areOwnPropsEqual:m,areStatePropsEqual:w,areMergedPropsEqual:C},T))}}()},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=0;a=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t,n,r){return function(o,i){return n(e(o,i),t(r,i),i)}}function i(e,t,n,r,o){function i(o,i){return d=o,y=i,v=e(d,y),m=t(r,y),g=n(v,m,y),p=!0,g}function a(){return v=e(d,y),t.dependsOnOwnProps&&(m=t(r,y)),g=n(v,m,y)}function s(){return e.dependsOnOwnProps&&(v=e(d,y)),t.dependsOnOwnProps&&(m=t(r,y)),g=n(v,m,y)}function u(){var t=e(d,y),r=!f(t,v);return v=t,r&&(g=n(v,m,y)),g}function c(e,t){var n=!h(t,y),r=!l(e,d);return d=e,y=t,n&&r?a():n?s():r?u():g}var l=o.areStatesEqual,h=o.areOwnPropsEqual,f=o.areStatePropsEqual,p=!1,d=void 0,y=void 0,v=void 0,m=void 0,g=void 0;return function(e,t){return p?c(e,t):i(e,t)}}function a(e,t){var n=t.initMapStateToProps,a=t.initMapDispatchToProps,s=t.initMergeProps,u=r(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),c=n(e,u),l=a(e,u),h=s(e,u);return(u.pure?i:o)(c,l,h,e,u)}t.a=a;n(176)},function(e,t,n){"use strict";n(42)},function(e,t,n){"use strict";var r=n(78),o=n.n(r),i=n(259),a=(n(20),n(56),n(260)),s=(n.n(a),n(77)),u=o.a.initializeApp(i.a),c=u.database().ref().child("tests");c.on("value",function(e){var t=[],n=e.val();if(n)for(var r=Object.keys(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];return"ADD_NEW_TEST"===t.type?(c.push().set(t.testObject),e):"REFRESH_STATE"===t.type?t.databaseTests:e};t.a=l},function(e,t,n){n(179),e.exports=n(13).default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(180),o=(n.n(r),n(184)),i=(n.n(o),n(185));n.n(i)},function(e,t,n){(function(e){var t=function(){if("undefined"!==typeof e)return e;if("undefined"!==typeof window)return window;if("undefined"!==typeof self)return self;throw new Error("unable to locate global object")}();"undefined"===typeof Promise&&(t.Promise=Promise=n(181))}).call(t,n(17))},function(e,t,n){(function(t){!function(n){function r(){}function o(e,t){return function(){e.apply(t,arguments)}}function i(e){if(!(this instanceof i))throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],h(e,this)}function a(e,t){for(;3===e._state;)e=e._value;if(0===e._state)return void e._deferreds.push(t);e._handled=!0,i._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._state?s:u)(t.promise,e._value);var r;try{r=n(e._value)}catch(e){return void u(t.promise,e)}s(t.promise,r)})}function s(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===typeof t||"function"===typeof t)){var n=t.then;if(t instanceof i)return e._state=3,e._value=t,void c(e);if("function"===typeof n)return void h(o(n,t),e)}e._state=1,e._value=t,c(e)}catch(t){u(e,t)}}function u(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(183),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!==typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n>>0;if("function"!==typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o>>0;if("function"!==typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o"}),n=this.serviceName+": "+n+" ("+o+").";var i=new a(o,n);for(var s in t)t.hasOwnProperty(s)&&"_"!==s.slice(-1)&&(i[s]=t[s]);return i},e}();t.ErrorFactory=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80),o=n(81);t.decode=function(e){var t={},n={},i={},a="";try{var s=e.split(".");t=o.jsonEval(r.base64Decode(s[0])||""),n=o.jsonEval(r.base64Decode(s[1])||""),a=s[2],i=n.d||{},delete n.d}catch(e){}return{header:t,claims:n,data:i,signature:a}},t.isValidTimestamp=function(e){var n,r,o=t.decode(e).claims,i=Math.floor((new Date).getTime()/1e3);return"object"===typeof o&&(o.hasOwnProperty("nbf")?n=o.nbf:o.hasOwnProperty("iat")&&(n=o.iat),r=o.hasOwnProperty("exp")?o.exp:n+86400),i&&n&&r&&i>=n&&i<=r},t.issuedAtTime=function(e){var n=t.decode(e).claims;return"object"===typeof n&&n.hasOwnProperty("iat")?n.iat:null},t.isValidFormat=function(e){var n=t.decode(e),r=n.claims;return!!n.signature&&!!r&&"object"===typeof r&&r.hasOwnProperty("iat")},t.isAdmin=function(e){var n=t.decode(e).claims;return"object"===typeof n&&!0===n.admin}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(82);t.querystring=function(e){var t=[];return r.forEach(e,function(e,n){Array.isArray(n)?n.forEach(function(n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}),t.length?"&"+t.join("&"):""},t.querystringDecode=function(e){var t={};return e.replace(/^\?/,"").split("&").forEach(function(e){if(e){var n=e.split("=");t[n[0]]=n[1]}}),t}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(194),i=function(e){function t(){var t=e.call(this)||this;t.chain_=[],t.buf_=[],t.W_=[],t.pad_=[],t.inbuf_=0,t.total_=0,t.blockSize=64,t.pad_[0]=128;for(var n=1;n>>31)}for(var i,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],h=this.chain_[4],r=0;r<80;r++){r<40?r<20?(i=l^u&(c^l),a=1518500249):(i=u^c^l,a=1859775393):r<60?(i=u&c|l&(u|c),a=2400959708):(i=u^c^l,a=3395469782);var o=(s<<5|s>>>27)+i+h+a+n[r]&4294967295;h=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=o}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+h&4294967295},t.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=0,o=this.buf_,i=this.inbuf_;r=56;n--)this.buf_[n]=255&t,t/=256;this.compress_(this.buf_);for(var r=0,n=0;n<5;n++)for(var o=24;o>=0;o-=8)e[r]=this.chain_[n]>>o&255,++r;return e},t}(o.Hash);t.Sha1=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.blockSize=-1}return e}();t.Hash=r},function(e,t,n){"use strict";function r(e,t){var n=new s(e,t);return n.subscribe.bind(n)}function o(e,t){return function(){for(var n=[],r=0;r 4. Need to update it?")}var o=e+" failed: ";return o+=r+" argument "}function o(e,t,n,o){if((!o||n)&&"string"!==typeof n)throw new Error(r(e,t,o)+"must be a valid firebase namespace.")}function i(e,t,n,o){if((!o||n)&&"function"!==typeof n)throw new Error(r(e,t,o)+"must be a valid function.")}function a(e,t,n,o){if((!o||n)&&("object"!==typeof n||null===n))throw new Error(r(e,t,o)+"must be a valid context object.")}Object.defineProperty(t,"__esModule",{value:!0}),t.validateArgCount=function(e,t,n,r){var o;if(rn&&(o=0===n?"none":"no more than "+n),o){var i=e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+o+".";throw new Error(i)}},t.errorPrefix=r,t.validateNamespace=o,t.validateCallback=i,t.validateContextObject=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(79);t.stringToByteArray=function(e){for(var t=[],n=0,o=0;o=55296&&i<=56319){var a=i-55296;o++,r.assert(o>6|192,t[n++]=63&i|128):i<65536?(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},t.stringLength=function(e){for(var t=0,n=0;n=55296&&r<=56319?(t+=4,n++):t+=3}return t}},function(e,t,n){n(199)},function(e,t,n){(function(e){(function(){function e(e){return"string"==typeof e}function t(e){return"boolean"==typeof e}function r(){}function o(e){var t=typeof e;if("object"==t){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var n=Object.prototype.toString.call(e);if("[object Window]"==n)return"object";if("[object Array]"==n||"number"==typeof e.length&&"undefined"!=typeof e.splice&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==n||"undefined"!=typeof e.call&&"undefined"!=typeof e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else if("function"==t&&"undefined"==typeof e.call)return"object";return t}function i(e){return null===e}function a(e){return"array"==o(e)}function s(e){var t=o(e);return"array"==t||"object"==t&&"number"==typeof e.length}function u(e){return"function"==o(e)}function c(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function l(e,t,n){return e.call.apply(e.bind,arguments)}function h(e,t,n){if(!e)throw Error();if(2")&&(e=e.replace(yu,">")),-1!=e.indexOf('"')&&(e=e.replace(vu,""")),-1!=e.indexOf("'")&&(e=e.replace(mu,"'")),-1!=e.indexOf("\0")&&(e=e.replace(gu,"�")),e):e}function g(e,t){return-1!=e.indexOf(t)}function _(e,t){return et?1:0}function b(e,t){t.unshift(e),y.call(this,v.apply(null,t)),t.shift()}function w(e,t){throw new b("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1))}function E(t,n){var r=t.length,o=e(t)?t.split(""):t;for(--r;0<=r;--r)r in o&&n.call(void 0,o[r],r,t)}function C(t){e:{for(var n=Cn,r=t.length,o=e(t)?t.split(""):t,i=0;in?null:e(t)?t.charAt(n):t[n]}function T(e,t){return 0<=wu(e,t)}function S(e,t){t=wu(e,t);var n;return(n=0<=t)&&Array.prototype.splice.call(e,t,1),n}function O(e,t){var n=0;E(e,function(r,o){t.call(void 0,r,o,e)&&1==Array.prototype.splice.call(e,o,1).length&&n++})}function N(e){return Array.prototype.concat.apply([],arguments)}function P(e){var t=e.length;if(0"),s=s.join("")}return s=i.createElement(s),u&&(e(u)?s.className=u:a(u)?s.className=u.join(" "):De(s,u)),2r.keyCode||void 0!=r.returnValue)){e:{var o=!1;if(0==r.keyCode)try{r.keyCode=-1;break e}catch(e){o=!0}(o||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],o=t.b;o;o=o.parentNode)r.push(o);for(e=e.type,o=r.length-1;0<=o;o--){t.b=r[o];var i=it(r[o],e,!0,t);n=n&&i}for(o=0;o>4),64!=a&&(t(i<<4&240|a>>2),64!=s&&t(a<<6&192|s))}}function It(){if(!Nc){Nc={},Pc={};for(var e=0;65>e;e++)Nc[e]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e),Pc[Nc[e]]=e,62<=e&&(Pc["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(e)]=e)}}function Rt(e,t){this.g=[],this.v=e,this.o=t||null,this.f=this.a=!1,this.c=void 0,this.u=this.w=this.i=!1,this.h=0,this.b=null,this.l=0}function At(e,t,n){e.a=!0,e.c=n,e.f=!t,Lt(e)}function kt(e){if(e.a){if(!e.u)throw new jt;e.u=!1}}function xt(e,t){Dt(e,null,t,void 0)}function Dt(e,t,n,r){e.g.push([t,n,r]),e.a&&Lt(e)}function Mt(e){return Tu(e.g,function(e){return u(e[1])})}function Lt(e){if(e.h&&e.a&&Mt(e)){var t=e.h,n=Rc[t];n&&(uu.clearTimeout(n.a),delete Rc[t]),e.h=0}e.b&&(e.b.l--,delete e.b),t=e.c;for(var r=n=!1;e.g.length&&!e.i;){var o=e.g.shift(),i=o[0],a=o[1];if(o=o[2],i=e.f?a:i)try{var s=i.call(o||e.o,t);void 0!==s&&(e.f=e.f&&(s==t||s instanceof Error),e.c=t=s),(V(t)||"function"===typeof uu.Promise&&t instanceof uu.Promise)&&(r=!0,e.i=!0)}catch(r){t=r,e.f=!0,Mt(e)||(n=!0)}}e.c=t,r&&(s=f(e.m,e,!0),r=f(e.m,e,!1),t instanceof Rt?(Dt(t,s,r),t.w=!0):t.then(s,r)),n&&(t=new Ut(t),Rc[t.a]=t,e.h=t.a)}function jt(){y.call(this)}function Ft(){y.call(this)}function Ut(e){this.a=uu.setTimeout(f(this.c,this),0),this.b=e}function Wt(){this.b=-1}function Bt(e,t){this.b=-1,this.b=Ac,this.f=uu.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=e,this.h=t,this.l=uu.Int32Array?new Int32Array(64):Array(64),Ic||(Ic=uu.Int32Array?new Int32Array(Lc):Lc),this.reset()}function Vt(e){for(var t=e.f,n=e.l,r=0,o=0;ot;t++){o=0|n[t-15],r=0|n[t-2];var i=(0|n[t-16])+((o>>>7|o<<25)^(o>>>18|o<<14)^o>>>3)|0,a=(0|n[t-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)|0;n[t]=i+a|0}r=0|e.a[0],o=0|e.a[1];var s=0|e.a[2],u=0|e.a[3],c=0|e.a[4],l=0|e.a[5],h=0|e.a[6];for(i=0|e.a[7],t=0;64>t;t++){var f=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&o^r&s^o&s)|0;a=c&l^~c&h,i=i+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0,a=a+(0|Ic[t])|0,a=i+(a+(0|n[t])|0)|0,i=h,h=l,l=c,c=u+a|0,u=s,s=o,o=r,r=a+f|0}e.a[0]=e.a[0]+r|0,e.a[1]=e.a[1]+o|0,e.a[2]=e.a[2]+s|0,e.a[3]=e.a[3]+u|0,e.a[4]=e.a[4]+c|0,e.a[5]=e.a[5]+l|0,e.a[6]=e.a[6]+h|0,e.a[7]=e.a[7]+i|0}function qt(t,n,r){void 0===r&&(r=n.length);var o=0,i=t.c;if(e(n))for(;o=a&&a==(0|a)))throw Error("message must be a byte array");t.f[i++]=a,i==t.b&&(Vt(t),i=0)}}t.c=i,t.g+=r}function Ht(){Bt.call(this,8,jc)}function Kt(t){if(t.P&&"function"==typeof t.P)return t.P();if(e(t))return t.split("");if(s(t)){for(var n=[],r=t.length,o=0;ot)throw Error("Bad port number "+t);e.i=t}else e.i=null}function Jt(e,t,n){t instanceof sn?(e.a=t,yn(e.a,e.f)):(n||(t=on(t,Vc)),e.a=new sn(t,0,e.f))}function Zt(e,t,n){e.a.set(t,n)}function en(e,t){return e.a.get(t)}function tn(e){return e instanceof Xt?new Xt(e):new Xt(e,void 0)}function nn(e,t){var n=new Xt(null,void 0);return Yt(n,"https"),e&&(n.b=e),t&&(n.g=t),n}function rn(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function on(t,n,r){return e(t)?(t=encodeURI(t).replace(n,an),r&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function an(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(15&e).toString(16)}function sn(e,t,n){this.b=this.a=null,this.c=e||null,this.f=!!n}function un(e){e.a||(e.a=new Et,e.b=0,e.c&&Qt(e.c,function(t,n){ln(e,decodeURIComponent(t.replace(/\+/g," ")),n)}))}function cn(e){var t=Gt(e);if("undefined"==typeof t)throw Error("Keys are undefined");var n=new sn(null,0,void 0);e=Kt(e);for(var r=0;r2*e.c&&Ct(e)))}function fn(e,t){return un(e),t=dn(e,t),Tt(e.a.b,t)}function pn(e,t,n){hn(e,t),0e)&&(!Ru||!Fu||9',e=ke(e),a.document.write(Ae(e)),a.document.close())):a=e.open(Ne(t),n,a),a)try{a.focus()}catch(e){}return a}function Xn(e){return new J(function(t){function n(){vt(2e3).then(function(){if(e&&!e.closed)return n();t()})}return n()})}function Yn(){var e=null;return new J(function(t){"complete"==uu.document.readyState?t():(e=function(){t()},tt(window,"load",e))}).s(function(t){throw nt(window,"load",e),t})}function $n(){return Jn(void 0)?Yn().then(function(){return new J(function(e,t){var n=uu.document,r=setTimeout(function(){t(Error("Cordova framework is not ready."))},1e3);n.addEventListener("deviceready",function(){clearTimeout(r),e()},!1)})}):ne(Error("Cordova must run in an Android or iOS file scheme."))}function Jn(e){return e=e||or(),!("file:"!==cr()||!e.toLowerCase().match(/iphone|ipad|ipod|android/))}function Zn(){var e=uu.window;try{return!(!e||e==e.top)}catch(e){return!1}}function er(){return au.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":au.INTERNAL.hasOwnProperty("node")?"Node":"Browser"}function tr(){var e=er();return"ReactNative"===e||"Node"===e}function nr(e){var t=e.toLowerCase();return g(t,"opera/")||g(t,"opr/")||g(t,"opios/")?"Opera":g(t,"iemobile")?"IEMobile":g(t,"msie")||g(t,"trident/")?"IE":g(t,"edge/")?"Edge":g(t,"firefox/")?el:g(t,"silk/")?"Silk":g(t,"blackberry")?"Blackberry":g(t,"webos")?"Webos":!g(t,"safari/")||g(t,"chrome/")||g(t,"crios/")||g(t,"android")?!g(t,"chrome/")&&!g(t,"crios/")||g(t,"edge/")?g(t,"android")?"Android":(e=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==e.length?e[1]:"Other":tl:"Safari"}function rr(e,t){t=t||[];var n,r=[],o={};for(n in nl)o[nl[n]]=!0;for(n=0;nt)throw Error("Short delay should be less than long delay!");this.c=e,this.b=t,e=n||or(),r=r||er(),this.a=Gn(e)||"ReactNative"===r}function _r(){var e=uu.document;return!e||"undefined"===typeof e.visibilityState||"visible"==e.visibilityState}function br(){var e=uu.document,t=null;return _r()||!e?te():new J(function(n){t=function(){_r()&&(e.removeEventListener("visibilitychange",t,!1),n())},e.addEventListener("visibilitychange",t,!1)}).s(function(n){throw e.removeEventListener("visibilitychange",t,!1),n})}function wr(e){try{var t=new Date(parseInt(e,10));if(!isNaN(t.getTime())&&!/[^0-9]/.test(e))return t.toUTCString()}catch(e){}return null}function Er(e,t,n){rl?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n}):e[t]=n}function Cr(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&Er(e,n,t[n])}function Tr(e){var t={};return Cr(t,e),t}function Sr(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function Or(e,t){if(!t||!t.length)return!0;if(!e)return!1;for(var n=0;n Auth section -> Sign in method tab.",e):"http"==r||"https"==r?n=v("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.",e):t="operation-not-supported-in-this-environment",Ir.call(this,t,n)}function po(e,t,n){Ir.call(this,e,n),e=t||{},e.sb&&Er(this,"email",e.sb),e.Y&&Er(this,"phoneNumber",e.Y),e.credential&&Er(this,"credential",e.credential)}function yo(e){if(e.code){var t=e.code||"";0==t.indexOf(pl)&&(t=t.substring(pl.length));var n={credential:uo(e)};if(e.email)n.sb=e.email;else{if(!e.phoneNumber)return new Ir(t,e.message||void 0);n.Y=e.phoneNumber}return new po(t,n,e.message)}return null}function vo(e){this.f=e}function mo(e,t,n){var r="Node"==er();if(!(r=uu.XMLHttpRequest||r&&au.INTERNAL.node&&au.INTERNAL.node.XMLHttpRequest))throw new Ir("internal-error","The XMLHttpRequest compatibility library was not found.");this.b=e,e=t||{},this.i=e.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.l=e.secureTokenTimeout||Rl,this.c=M(e.secureTokenHeaders||Al),this.g=e.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.h=e.firebaseTimeout||kl,this.a=M(e.firebaseHeaders||xl),n&&(this.a["X-Client-Version"]=n,this.c["X-Client-Version"]=n),this.f=new Fn,this.o=new vo(r)}function go(e,t){t?e.a["X-Firebase-Locale"]=t:delete e.a["X-Firebase-Locale"]}function _o(e,t){t?(e.a["X-Client-Version"]=t,e.c["X-Client-Version"]=t):(delete e.a["X-Client-Version"],delete e.c["X-Client-Version"])}function bo(e,t,n,r,o,i,a){mr()?(Kn()?e=f(e.m,e):(Pl||(Pl=new J(function(e,t){wo(e,t)})),e=f(e.u,e)),e(t,n,r,o,i,a)):n&&n(null)}function wo(e,t){if(((window.gapi||{}).client||{}).request)e();else{uu[Ml]=function(){((window.gapi||{}).client||{}).request?e():t(Error("CORS_UNSUPPORTED"))};xt(xn(Te(Dl,{onload:Ml})),function(){t(Error("CORS_UNSUPPORTED"))})}}function Eo(e,t){return new J(function(n,r){"refresh_token"==t.grant_type&&t.refresh_token||"authorization_code"==t.grant_type&&t.code?bo(e,e.i+"?key="+encodeURIComponent(e.b),function(e){e?e.error?r(Wo(e)):e.access_token&&e.refresh_token?n(e):r(new Ir("internal-error")):r(new Ir("network-request-failed"))},"POST",cn(t).toString(),e.c,e.l.get()):r(new Ir("internal-error"))})}function Co(e,t,n,r,o,i){var a=tn(e.g+t);Zt(a,"key",e.b),i&&Zt(a,"cb",hu().toString());var s="GET"==n;if(s)for(var u in r)r.hasOwnProperty(u)&&Zt(a,u,r[u]);return new J(function(t,i){bo(e,a.toString(),function(e){e?e.error?i(Wo(e,o||{})):t(e):i(new Ir("network-request-failed"))},n,s?void 0:Fe(fr(r)),e.a,e.h.get())})}function To(e){if(!Yc.test(e.email))throw new Ir("invalid-email")}function So(e){"email"in e&&To(e)}function Oo(e,t){return Fo(e,Bl,{identifier:t,continueUri:ur()?Vn():"http://localhost"}).then(function(e){return e.allProviders||[]})}function No(e){return Fo(e,zl,{}).then(function(e){return e.authorizedDomains||[]})}function Po(e){if(!e[Il])throw new Ir("internal-error")}function Io(e){if(e.phoneNumber||e.temporaryProof){if(!e.phoneNumber||!e.temporaryProof)throw new Ir("internal-error")}else{if(!e.sessionInfo)throw new Ir("missing-verification-id");if(!e.code)throw new Ir("missing-verification-code")}}function Ro(e,t){return Fo(e,Yl,t)}function Ao(e,t,n){return Fo(e,ql,{idToken:t,deleteProvider:n})}function ko(e){if(!e.requestUri||!e.sessionId&&!e.postBody)throw new Ir("internal-error")}function xo(e){var t=null;if(e.needConfirmation?(e.code="account-exists-with-different-credential",t=yo(e)):"FEDERATED_USER_ID_ALREADY_LINKED"==e.errorMessage?(e.code="credential-already-in-use",t=yo(e)):"EMAIL_EXISTS"==e.errorMessage?(e.code="email-already-in-use",t=yo(e)):e.errorMessage&&(t=Uo(e.errorMessage)),t)throw t;if(!e[Il])throw new Ir("internal-error")}function Do(e,t){return t.returnIdpCredential=!0,Fo(e,eh,t)}function Mo(e,t){return t.returnIdpCredential=!0,Fo(e,nh,t)}function Lo(e,t){return t.returnIdpCredential=!0,t.autoCreate=!1,Fo(e,th,t)}function jo(e){if(!e.oobCode)throw new Ir("invalid-action-code")}function Fo(e,t,n){if(!Or(n,t.ea))return ne(new Ir("internal-error"));var r,o=t.zb||"POST";return te(n).then(t.D).then(function(){return t.T&&(n.returnSecureToken=!0),Co(e,t.endpoint,o,n,t.Pb,t.nb||!1)}).then(function(e){return r=e}).then(t.O).then(function(){if(!t.ga)return r;if(!(t.ga in r))throw new Ir("internal-error");return r[t.ga]})}function Uo(e){return Wo({error:{errors:[{message:e}],code:400,message:e}})}function Wo(e,t){var n=(e.error&&e.error.errors&&e.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new Ir(r[n]):null)return n;n=e.error&&e.error.message||"",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"},L(r,t||{}),t=(t=n.match(/^[^\s]+\s*:\s*(.*)$/))&&1t.c?qt(t,Mc,56-t.c):qt(t,Mc,t.b-(t.c-56));for(var r=63;56<=r;r--)t.f[r]=255&n,n/=256;for(Vt(t),r=n=0;r>o&255;return Ot(e)}function Fi(e,t,n,r){var o=Li(),i=new lo(t,r,null,o,new Ir("no-auth-event")),a=ir("BuildInfo.packageName",uu);if("string"!==typeof a)throw new Ir("invalid-cordova-configuration");var s=ir("BuildInfo.displayName",uu),u={};if(or().toLowerCase().match(/iphone|ipad|ipod/))u.ibi=a;else{if(!or().toLowerCase().match(/android/))return ne(new Ir("operation-not-supported-in-this-environment"));u.apn=a}s&&(u.appDisplayName=s),o=ji(o),u.sessionId=o;var c=ei(e.u,e.i,e.l,t,n,null,r,e.m,u,e.o);return e.ba().then(function(){var t=e.h;return e.A.a.set(bh,i.B(),t)}).then(function(){var t=ir("cordova.plugins.browsertab.isAvailable",uu);if("function"!==typeof t)throw new Ir("invalid-cordova-configuration");var n=null;t(function(t){if(t){if("function"!==typeof(n=ir("cordova.plugins.browsertab.openUrl",uu)))throw new Ir("invalid-cordova-configuration");n(c)}else{if("function"!==typeof(n=ir("cordova.InAppBrowser.open",uu)))throw new Ir("invalid-cordova-configuration");t=or(),t=!(!t.match(/(iPad|iPhone|iPod).*OS 7_\d/i)&&!t.match(/(iPad|iPhone|iPod).*OS 8_\d/i)),e.a=n(c,t?"_blank":"_system","location=yes")}})})}function Ui(e,t){for(var n=0;ne.f&&(e.a=e.f),t)}function pa(e,t){da(e),e.b=vt(fa(e,t)).then(function(){return e.l?te():br()}).then(function(){return e.h()}).then(function(){pa(e,!0)}).s(function(t){e.i(t)&&pa(e,!1)})}function da(e){e.b&&(e.b.cancel(),e.b=null)}function ya(e){this.f=e,this.b=this.a=null,this.c=0}function va(e,t){var n=t[Il],r=t.refreshToken;t=ma(t.expiresIn),e.b=n,e.c=t,e.a=r}function ma(e){return hu()+1e3*parseInt(e,10)}function ga(e,t){return Eo(e.f,t).then(function(t){return e.b=t.access_token,e.c=ma(t.expires_in),e.a=t.refresh_token,{accessToken:e.b,expirationTime:e.c,refreshToken:e.a}}).s(function(t){throw"auth/user-token-expired"==t.code&&(e.a=null),t})}function _a(e,t){this.a=e||null,this.b=t||null,Cr(this,{lastSignInTime:wr(t||null),creationTime:wr(e||null)})}function ba(e){return new _a(e.a,e.b)}function wa(e,t,n,r,o,i){Cr(this,{uid:e,displayName:r||null,photoURL:o||null,email:n||null,phoneNumber:i||null,providerId:t})}function Ea(e,t){He.call(this,e);for(var n in t)this[n]=t[n]}function Ca(e,t,n){this.A=[],this.G=e.apiKey,this.o=e.appName,this.w=e.authDomain||null,e=au.SDK_VERSION?rr(au.SDK_VERSION):null,this.c=new mo(this.G,Bo(jl),e),this.h=new ya(this.c),Aa(this,t[Il]),va(this.h,t),Er(this,"refreshToken",this.h.a),Ma(this,n||{}),lt.call(this),this.I=!1,this.w&&sr()&&(this.a=Zi(this.w,this.G,this.o)),this.N=[],this.i=null,this.l=Pa(this),this.U=f(this.Ga,this);var r=this;this.ha=null,this.ra=function(e){r.na(e.h)},this.W=null,this.R=[],this.qa=function(e){Sa(r,e.f)},this.V=null}function Ta(e,t){e.W&&nt(e.W,"languageCodeChanged",e.ra),(e.W=t)&&Je(t,"languageCodeChanged",e.ra)}function Sa(e,t){e.R=t,_o(e.c,au.SDK_VERSION?rr(au.SDK_VERSION,e.R):null)}function Oa(e,t){e.V&&nt(e.V,"frameworkChanged",e.qa),(e.V=t)&&Je(t,"frameworkChanged",e.qa)}function Na(e){try{return au.app(e.o).auth()}catch(t){throw new Ir("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+e.o+"'!")}}function Pa(e){return new ha(function(){return e.F(!0)},function(e){return!(!e||"auth/network-request-failed"!=e.code)},function(){var t=e.h.c-hu()-3e5;return 0o||o>=Nh.length)throw new Ir("internal-error","Argument validator received an unsupported number of arguments.");n=Nh[o],r=(r?"":n+" argument ")+(t.name?'"'+t.name+'" ':"")+"must be "+t.K+".";break e}r=null}}if(r)throw new Ir("argument-error",e+" failed: "+r)}function Ds(t,n){return{name:t||"",K:"a valid string",optional:!!n,M:e}}function Ms(){return{name:"opt_forceRefresh",K:"a boolean",optional:!0,M:t}}function Ls(e,t){return{name:e||"",K:"a valid object",optional:!!t,M:c}}function js(e,t){return{name:e||"",K:"a function",optional:!!t,M:u}}function Fs(e,t){return{name:e||"",K:"null",optional:!!t,M:i}}function Us(){return{name:"",K:"an HTML element",optional:!1,M:function(e){return!!(e&&e instanceof Element)}}}function Ws(){return{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(e){return!!(e&&e instanceof ys)}}}function Bs(){return{name:"app",K:"an instance of Firebase App",optional:!0,M:function(e){return!!(e&&e instanceof au.app.App)}}}function Vs(e){return{name:e?e+"Credential":"credential",K:e?"a valid "+e+" credential":"a valid credential",optional:!1,M:function(t){if(!t)return!1;var n=!e||t.providerId===e;return!(!t.wa||!n)}}}function qs(){return{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}}function Hs(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(t){return!!(t&&e(t.type)&&u(t.verify))}}}function Ks(e,t,n,r){return{name:n||"",K:e.K+" or "+t.K,optional:!!r,M:function(n){return e.M(n)||t.M(n)}}}function Gs(e,t,n,r,o,i){if(Er(this,"type","recaptcha"),this.b=this.c=null,this.m=!1,this.l=t,this.a=n||{theme:"light",type:"image"},this.g=[],this.a[Rh])throw new Ir("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.h="invisible"===this.a[Ah],!xe(t)||!this.h&&xe(t).hasChildNodes())throw new Ir("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.u=new mo(e,i||null,o||null),this.o=r||function(){return null};var a=this;this.i=[];var s=this.a[Ph];this.a[Ph]=function(e){if(zs(a,e),"function"===typeof s)s(e);else if("string"===typeof s){var t=ir(s,uu);"function"===typeof t&&t(e)}};var u=this.a[Ih];this.a[Ih]=function(){if(zs(a,null),"function"===typeof u)u();else if("string"===typeof u){var e=ir(u,uu);"function"===typeof e&&e()}}}function zs(e,t){for(var n=0;n>>0),lu=0,hu=Date.now||function(){return+new Date};d(y,Error),y.prototype.name="CustomError";var fu=String.prototype.trim?function(e){return e.trim()}:function(e){return e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},pu=/&/g,du=//g,vu=/"/g,mu=/'/g,gu=/\x00/g,_u=/[\x00&<>"']/;d(b,y),b.prototype.name="AssertionError";var bu,wu=Array.prototype.indexOf?function(e,t,n){return Array.prototype.indexOf.call(e,t,n)}:function(t,n,r){if(r=null==r?0:0>r?Math.max(0,t.length+r):r,e(t))return e(n)&&1==n.length?t.indexOf(n,r):-1;for(;rparseFloat(Mu)){Pu=String(ju);break e}}Pu=Mu}var Fu,Uu={},Wu=uu.document;Fu=Wu&&Ru?U()||("CSS1Compat"==Wu.compatMode?parseInt(Pu,10):5):void 0,q.prototype.get=function(){if(0"),ke(""),ke("
");var ic={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"},ac={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},sc=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,uc=0,cc={};Ve.prototype.oa=!1,Ve.prototype.ta=function(){if(this.Fa)for(;this.Fa.length;)this.Fa.shift()()};var lc=Object.freeze||function(e){return e},hc=!Ru||9<=Number(Fu),fc=Ru&&!W("9"),pc=function(){if(!uu.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});return uu.addEventListener("test",r,t),uu.removeEventListener("test",r,t),e}();He.prototype.c=function(){this.Bb=!1},d(Ke,He);var dc=lc({2:"touch",3:"pen",4:"mouse"});Ke.prototype.c=function(){Ke.ib.c.call(this);var e=this.a;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,fc)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(e){}},Ke.prototype.g=function(){return this.a};var yc="closure_listenable_"+(1e6*Math.random()|0),vc=0,mc="closure_lm_"+(1e6*Math.random()|0),gc={},_c=0,bc="__closure_events_fn_"+(1e9*Math.random()>>>0);d(lt,Ve),lt.prototype[yc]=!0,lt.prototype.removeEventListener=function(e,t,n,r){nt(this,e,t,n,r)},lt.prototype.ta=function(){if(lt.ib.ta.call(this),this.u){var e,t=this.u,n=0;for(e in t.a){for(var r=t.a[e],o=0;o=bt(this).value)for(u(t)&&(t=t()),e=new mt(e,String(t),this.f),n&&(e.a=n),n="log:"+e.b,(e=uu.console)&&e.timeStamp&&e.timeStamp(n),(e=uu.msWriteProfilerMark)&&e(n),n=this;n;)n=n.a};var Sc={},Oc=null;iu=Et.prototype,iu.P=function(){Ct(this);for(var e=[],t=0;t=--t.l&&t.cancel()}this.v?this.v.call(this.o,this):this.u=!0,this.a||(e=new Ft,kt(this),At(this,!1,e))}},Rt.prototype.m=function(e,t){this.i=!1,At(this,e,t)},Rt.prototype.A=function(e){kt(this),At(this,!0,e)},Rt.prototype.then=function(e,t,n){var r,o,i=new J(function(e,t){r=e,o=t});return Dt(this,r,function(e){e instanceof Ft?i.cancel():o(e)}),i.then(e,t,n)},B(Rt),d(jt,y),jt.prototype.message="Deferred has already fired",jt.prototype.name="AlreadyCalledError",d(Ft,y),Ft.prototype.message="Deferred was canceled",Ft.prototype.name="CanceledError",Ut.prototype.c=function(){throw delete Rc[this.a],this.b};var Ic,Rc={};d(Bt,Wt);for(var Ac=64,kc=Ac-1,xc=[],Dc=0;Dcthis.c-3e4?this.a?ga(this,{grant_type:"refresh_token",refresh_token:this.a}):te(null):te({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},_a.prototype.B=function(){return{lastLoginAt:this.b,createdAt:this.a}},d(Ea,He),d(Ca,lt),Ca.prototype.na=function(e){this.ha=e,go(this.c,e)},Ca.prototype.$=function(){return this.ha},Ca.prototype.Ka=function(){return P(this.R)},Ca.prototype.Ga=function(){this.l.b&&(da(this.l),this.l.start())},Er(Ca.prototype,"providerId","firebase"),iu=Ca.prototype,iu.reload=function(){var e=this;return Za(this,ja(this).then(function(){return qa(e).then(function(){return xa(e)}).then(La)}))},iu.F=function(e){var t=this;return Za(this,ja(this).then(function(){return t.h.getToken(e)}).then(function(e){if(!e)throw new Ir("internal-error");return e.accessToken!=t.pa&&(Aa(t,e.accessToken),ht(t,new Ea("tokenChanged"))),Ba(t,"refreshToken",e.refreshToken),e.accessToken}))},iu.getToken=function(e){return ol["firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead."]||(ol["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(e)},iu.kc=function(e){if(!(e=e.users)||!e.length)throw new Ir("internal-error");e=e[0],Ma(this,{uid:e.localId,displayName:e.displayName,photoURL:e.photoUrl,email:e.email,emailVerified:!!e.emailVerified,phoneNumber:e.phoneNumber,lastLoginAt:e.lastLoginAt,createdAt:e.createdAt});for(var t=Ga(e),n=0;nthis.o&&(this.o=0),0==this.o&&Ps(this)&&Ra(Ps(this)),this.removeAuthTokenListener(e)},iu.addAuthTokenListener=function(e){var t=this;this.m.push(e),ks(this,this.i.then(function(){t.l||T(t.m,e)&&e(Is(t))}))},iu.removeAuthTokenListener=function(e){O(this.m,function(t){return t==e})},iu.delete=function(){this.l=!0;for(var e=0;e=0;a--)s[a]=e.charAt(o%64),o=Math.floor(o/64);r.assert(0===o,"Cannot push at time == 0");var u=s.join("");if(i){for(a=11;a>=0&&63===n[a];a--)n[a]=0;n[a]++}else for(a=0;a<12;a++)n[a]=Math.floor(64*Math.random());for(a=0;a<12;a++)u+=e.charAt(n[a]);return r.assert(20===u.length,"nextPushId: Length should be 20."),u}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(47),o=n(207),i=n(0),a=n(0),s=function(){function e(e,t,n){this.callback_=e,this.cancelCallback_=t,this.context_=n}return e.prototype.respondsTo=function(e){return"value"===e},e.prototype.createEvent=function(e,t){var n=t.getQueryParams().getIndex();return new o.DataEvent("value",this,new r.DataSnapshot(e.snapshotNode,t.getRef(),n))},e.prototype.getEventRunner=function(e){var t=this.context_;if("cancel"===e.getEventType()){a.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(t,e.error)}}var r=this.callback_;return function(){r.call(t,e.snapshot)}},e.prototype.createCancelEvent=function(e,t){return this.cancelCallback_?new o.CancelEvent(this,e,t):null},e.prototype.matches=function(t){return t instanceof e&&(!t.callback_||!this.callback_||t.callback_===this.callback_&&t.context_===this.context_)},e.prototype.hasAnyCallback=function(){return null!==this.callback_},e}();t.ValueEventRegistration=s;var u=function(){function e(e,t,n){this.callbacks_=e,this.cancelCallback_=t,this.context_=n}return e.prototype.respondsTo=function(e){var t="children_added"===e?"child_added":e;return t="children_removed"===t?"child_removed":t,i.contains(this.callbacks_,t)},e.prototype.createCancelEvent=function(e,t){return this.cancelCallback_?new o.CancelEvent(this,e,t):null},e.prototype.createEvent=function(e,t){a.assert(null!=e.childName,"Child events should have a childName.");var n=t.getRef().child(e.childName),i=t.getQueryParams().getIndex();return new o.DataEvent(e.type,this,new r.DataSnapshot(e.snapshotNode,n,i),e.prevName)},e.prototype.getEventRunner=function(e){var t=this.context_;if("cancel"===e.getEventType()){a.assert(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(t,e.error)}}var r=this.callbacks_[e.eventType];return function(){r.call(t,e.snapshot,e.prevName)}},e.prototype.matches=function(t){if(t instanceof e){if(!this.callbacks_||!t.callbacks_)return!0;if(this.context_===t.context_){var n=i.getCount(t.callbacks_);if(n===i.getCount(this.callbacks_)){if(1===n){var r=i.getAnyKey(t.callbacks_),o=i.getAnyKey(this.callbacks_);return o===r&&(!t.callbacks_[r]||!this.callbacks_[o]||t.callbacks_[r]===this.callbacks_[o])}return i.every(this.callbacks_,function(e,n){return t.callbacks_[e]===n})}}}return!1},e.prototype.hasAnyCallback=function(){return null!==this.callbacks_},e}();t.ChildEventRegistration=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(){function e(e,t,n,r){this.eventType=e,this.eventRegistration=t,this.snapshot=n,this.prevName=r}return e.prototype.getPath=function(){var e=this.snapshot.getRef();return"value"===this.eventType?e.path:e.getParent().path},e.prototype.getEventType=function(){return this.eventType},e.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},e.prototype.toString=function(){return this.getPath().toString()+":"+this.eventType+":"+r.stringify(this.snapshot.exportVal())},e}();t.DataEvent=o;var i=function(){function e(e,t,n){this.eventRegistration=e,this.error=t,this.path=n}return e.prototype.getPath=function(){return this.path},e.prototype.getEventType=function(){return"cancel"},e.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},e.prototype.toString=function(){return this.path.toString()+":cancel"},e}();t.CancelEvent=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(209),a=n(7),s=n(0),u=n(48),c=n(210),l=n(211),h=n(15),f=n(97),p=n(3),d=n(98),y=n(217),v=function(){function e(e){this.listenProvider_=e,this.syncPointTree_=u.ImmutableTree.Empty,this.pendingWriteTree_=new y.WriteTree,this.tagToQueryMap_={},this.queryToTagMap_={}}return e.prototype.applyUserOverwrite=function(e,t,n,r){return this.pendingWriteTree_.addOverwrite(e,t,n,r),r?this.applyOperationToSyncPoints_(new f.Overwrite(h.OperationSource.User,e,t)):[]},e.prototype.applyUserMerge=function(e,t,n){this.pendingWriteTree_.addMerge(e,t,n);var r=u.ImmutableTree.fromObject(t);return this.applyOperationToSyncPoints_(new l.Merge(h.OperationSource.User,e,r))},e.prototype.ackUserWrite=function(e,t){void 0===t&&(t=!1);var n=this.pendingWriteTree_.getWrite(e);if(this.pendingWriteTree_.removeWrite(e)){var r=u.ImmutableTree.Empty;return null!=n.snap?r=r.set(p.Path.Empty,!0):s.forEach(n.children,function(e,t){r=r.set(new p.Path(e),t)}),this.applyOperationToSyncPoints_(new i.AckUserWrite(n.path,r,t))}return[]},e.prototype.applyServerOverwrite=function(e,t){return this.applyOperationToSyncPoints_(new f.Overwrite(h.OperationSource.Server,e,t))},e.prototype.applyServerMerge=function(e,t){var n=u.ImmutableTree.fromObject(t);return this.applyOperationToSyncPoints_(new l.Merge(h.OperationSource.Server,e,n))},e.prototype.applyListenComplete=function(e){return this.applyOperationToSyncPoints_(new c.ListenComplete(h.OperationSource.Server,e))},e.prototype.applyTaggedQueryOverwrite=function(t,n,r){var o=this.queryKeyForTag_(r);if(null!=o){var i=e.parseQueryKey_(o),a=i.path,s=i.queryId,u=p.Path.relativePath(a,t),c=new f.Overwrite(h.OperationSource.forServerTaggedQuery(s),u,n);return this.applyTaggedOperation_(a,c)}return[]},e.prototype.applyTaggedQueryMerge=function(t,n,r){var o=this.queryKeyForTag_(r);if(o){var i=e.parseQueryKey_(o),a=i.path,s=i.queryId,c=p.Path.relativePath(a,t),f=u.ImmutableTree.fromObject(n),d=new l.Merge(h.OperationSource.forServerTaggedQuery(s),c,f);return this.applyTaggedOperation_(a,d)}return[]},e.prototype.applyTaggedListenComplete=function(t,n){var r=this.queryKeyForTag_(n);if(r){var o=e.parseQueryKey_(r),i=o.path,a=o.queryId,s=p.Path.relativePath(i,t),u=new c.ListenComplete(h.OperationSource.forServerTaggedQuery(a),s);return this.applyTaggedOperation_(i,u)}return[]},e.prototype.addEventRegistration=function(t,n){var o=t.path,i=null,s=!1;this.syncPointTree_.foreachOnPath(o,function(e,t){var n=p.Path.relativePath(e,o);i=i||t.getCompleteServerCache(n),s=s||t.hasCompleteView()});var u=this.syncPointTree_.get(o);u?(s=s||u.hasCompleteView(),i=i||u.getCompleteServerCache(p.Path.Empty)):(u=new d.SyncPoint,this.syncPointTree_=this.syncPointTree_.set(o,u));var c;if(null!=i)c=!0;else{c=!1,i=a.ChildrenNode.EMPTY_NODE;this.syncPointTree_.subtree(o).foreachChild(function(e,t){var n=t.getCompleteServerCache(p.Path.Empty);n&&(i=i.updateImmediateChild(e,n))})}var l=u.viewExistsForQuery(t);if(!l&&!t.getQueryParams().loadsAllData()){var h=e.makeQueryKey_(t);r.assert(!(h in this.queryToTagMap_),"View does not exist, but we have a tag");var f=e.getNextQueryTag_();this.queryToTagMap_[h]=f,this.tagToQueryMap_["_"+f]=h}var y=this.pendingWriteTree_.childWrites(o),v=u.addEventRegistration(t,n,y,i,c);if(!l&&!s){var m=u.viewForQuery(t);v=v.concat(this.setupListener_(t,m))}return v},e.prototype.removeEventRegistration=function(t,n,r){var o=this,i=t.path,a=this.syncPointTree_.get(i),s=[];if(a&&("default"===t.queryIdentifier()||a.viewExistsForQuery(t))){var u=a.removeEventRegistration(t,n,r);a.isEmpty()&&(this.syncPointTree_=this.syncPointTree_.remove(i));var c=u.removed;s=u.events;var l=-1!==c.findIndex(function(e){return e.getQueryParams().loadsAllData()}),h=this.syncPointTree_.findOnPath(i,function(e,t){return t.hasCompleteView()});if(l&&!h){var f=this.syncPointTree_.subtree(i);if(!f.isEmpty())for(var p=this.collectDistinctViewsForSubTree_(f),d=0;d0&&!r)if(l){this.listenProvider_.stopListening(e.queryForListening_(t),null)}else c.forEach(function(t){var n=o.queryToTagMap_[e.makeQueryKey_(t)];o.listenProvider_.stopListening(e.queryForListening_(t),n)});this.removeTags_(c)}return s},e.prototype.calcCompleteEventCache=function(e,t){var n=this.pendingWriteTree_,r=this.syncPointTree_.findOnPath(e,function(t,n){var r=p.Path.relativePath(t,e),o=n.getCompleteServerCache(r);if(o)return o});return n.calcCompleteEventCache(e,r,t,!0)},e.prototype.collectDistinctViewsForSubTree_=function(e){return e.fold(function(e,t,n){if(t&&t.hasCompleteView()){return[t.getCompleteView()]}var r=[];return t&&(r=t.getQueryViews()),s.forEach(n,function(e,t){r=r.concat(t)}),r})},e.prototype.removeTags_=function(t){for(var n=0;n0||!e.getEventCache().isFullyInitialized()||o&&!r.getNode().equals(i)||!r.getNode().getPriority().equals(i.getPriority()))&&n.push(a.Change.valueChange(t.getCompleteEventSnap()))}},e.prototype.generateEventCacheAfterServerEvent_=function(e,t,n,r,i){var a=e.getEventCache();if(null!=n.shadowingWrite(t))return e;var u=void 0,c=void 0;if(t.isEmpty())if(o.assert(e.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),e.getServerCache().isFiltered()){var l=e.getCompleteServerSnap(),h=l instanceof s.ChildrenNode?l:s.ChildrenNode.EMPTY_NODE,f=n.calcCompleteEventChildren(h);u=this.filter_.updateFullNode(e.getEventCache().getNode(),f,i)}else{var p=n.calcCompleteEventCache(e.getCompleteServerSnap());u=this.filter_.updateFullNode(e.getEventCache().getNode(),p,i)}else{var d=t.getFront();if(".priority"==d){o.assert(1==t.getLength(),"Can't have a priority with additional path components");var y=a.getNode();c=e.getServerCache().getNode();var v=n.calcEventCacheAfterServerOverwrite(t,y,c);u=null!=v?this.filter_.updatePriority(y,v):a.getNode()}else{var m=t.popFront(),g=void 0;if(a.isCompleteForChild(d)){c=e.getServerCache().getNode();var _=n.calcEventCacheAfterServerOverwrite(t,a.getNode(),c);g=null!=_?a.getNode().getImmediateChild(d).updateChild(m,_):a.getNode().getImmediateChild(d)}else g=n.calcCompleteChild(d,e.getServerCache());u=null!=g?this.filter_.updateChild(a.getNode(),d,g,m,r,i):a.getNode()}}return e.updateEventSnap(u,a.isFullyInitialized()||t.isEmpty(),this.filter_.filtersNodes())},e.prototype.applyServerOverwrite_=function(e,t,n,r,o,i,a){var s,u=e.getServerCache(),c=i?this.filter_:this.filter_.getIndexedFilter();if(t.isEmpty())s=c.updateFullNode(u.getNode(),n,null);else if(c.filtersNodes()&&!u.isFiltered()){var l=u.getNode().updateChild(t,n);s=c.updateFullNode(u.getNode(),l,null)}else{var f=t.getFront();if(!u.isCompleteForPath(t)&&t.getLength()>1)return e;var p=t.popFront(),d=u.getNode().getImmediateChild(f),y=d.updateChild(p,n);s=".priority"==f?c.updatePriority(u.getNode(),y):c.updateChild(u.getNode(),f,y,p,h.NO_COMPLETE_CHILD_SOURCE,null)}var v=e.updateServerSnap(s,u.isFullyInitialized()||t.isEmpty(),c.filtersNodes()),m=new h.WriteTreeCompleteChildSource(r,v,o);return this.generateEventCacheAfterServerEvent_(v,t,r,m,a)},e.prototype.applyUserOverwrite_=function(e,t,n,r,o,i){var a,u,c=e.getEventCache(),l=new h.WriteTreeCompleteChildSource(r,e,o);if(t.isEmpty())u=this.filter_.updateFullNode(e.getEventCache().getNode(),n,i),a=e.updateEventSnap(u,!0,this.filter_.filtersNodes());else{var f=t.getFront();if(".priority"===f)u=this.filter_.updatePriority(e.getEventCache().getNode(),n),a=e.updateEventSnap(u,c.isFullyInitialized(),c.isFiltered());else{var p=t.popFront(),d=c.getNode().getImmediateChild(f),y=void 0;if(p.isEmpty())y=n;else{var v=l.getCompleteChild(f);y=null!=v?".priority"===p.getBack()&&v.getChild(p.parent()).isEmpty()?v:v.updateChild(p,n):s.ChildrenNode.EMPTY_NODE}if(d.equals(y))a=e;else{var m=this.filter_.updateChild(c.getNode(),f,y,p,l,i);a=e.updateEventSnap(m,c.isFullyInitialized(),this.filter_.filtersNodes())}}}return a},e.cacheHasChild_=function(e,t){return e.getEventCache().isCompleteForChild(t)},e.prototype.applyUserMerge_=function(t,n,r,o,i,a){var s=this,u=t;return r.foreach(function(r,c){var l=n.child(r);e.cacheHasChild_(t,l.getFront())&&(u=s.applyUserOverwrite_(u,l,c,o,i,a))}),r.foreach(function(r,c){var l=n.child(r);e.cacheHasChild_(t,l.getFront())||(u=s.applyUserOverwrite_(u,l,c,o,i,a))}),u},e.prototype.applyMerge_=function(e,t){return t.foreach(function(t,n){e=e.updateChild(t,n)}),e},e.prototype.applyServerMerge_=function(e,t,n,r,o,i,a){var s=this;if(e.getServerCache().getNode().isEmpty()&&!e.getServerCache().isFullyInitialized())return e;var u,h=e;u=t.isEmpty()?n:c.ImmutableTree.Empty.setTree(t,n);var f=e.getServerCache().getNode();return u.children.inorderTraversal(function(t,n){if(f.hasChild(t)){var u=e.getServerCache().getNode().getImmediateChild(t),c=s.applyMerge_(u,n);h=s.applyServerOverwrite_(h,new l.Path(t),c,r,o,i,a)}}),u.children.inorderTraversal(function(t,n){var u=!e.getServerCache().isCompleteForChild(t)&&null==n.value;if(!f.hasChild(t)&&!u){var c=e.getServerCache().getNode().getImmediateChild(t),p=s.applyMerge_(c,n);h=s.applyServerOverwrite_(h,new l.Path(t),p,r,o,i,a)}}),h},e.prototype.ackUserWrite_=function(e,t,n,r,o,i){if(null!=r.shadowingWrite(t))return e;var a=e.getServerCache().isFiltered(),s=e.getServerCache();if(null!=n.value){if(t.isEmpty()&&s.isFullyInitialized()||s.isCompleteForPath(t))return this.applyServerOverwrite_(e,t,s.getNode().getChild(t),r,o,a,i);if(t.isEmpty()){var h=c.ImmutableTree.Empty;return s.getNode().forEachChild(u.KEY_INDEX,function(e,t){h=h.set(new l.Path(e),t)}),this.applyServerMerge_(e,t,h,r,o,a,i)}return e}var f=c.ImmutableTree.Empty;return n.foreach(function(e,n){var r=t.child(e);s.isCompleteForPath(r)&&(f=f.set(e,s.getNode().getChild(r)))}),this.applyServerMerge_(e,t,f,r,o,a,i)},e.prototype.listenComplete_=function(e,t,n,r){var o=e.getServerCache(),i=e.updateServerSnap(o.getNode(),o.isFullyInitialized()||t.isEmpty(),o.isFiltered());return this.generateEventCacheAfterServerEvent_(i,t,n,h.NO_COMPLETE_CHILD_SOURCE,r)},e.prototype.revertUserWrite_=function(e,t,n,r,i){var a;if(null!=n.shadowingWrite(t))return e;var u=new h.WriteTreeCompleteChildSource(n,e,r),c=e.getEventCache().getNode(),f=void 0;if(t.isEmpty()||".priority"===t.getFront()){var p=void 0;if(e.getServerCache().isFullyInitialized())p=n.calcCompleteEventCache(e.getCompleteServerSnap());else{var d=e.getServerCache().getNode();o.assert(d instanceof s.ChildrenNode,"serverChildren would be complete if leaf node"),p=n.calcCompleteEventChildren(d)}p=p,f=this.filter_.updateFullNode(c,p,i)}else{var y=t.getFront(),v=n.calcCompleteChild(y,e.getServerCache());null==v&&e.getServerCache().isCompleteForChild(y)&&(v=c.getImmediateChild(y)),f=null!=v?this.filter_.updateChild(c,y,v,t.popFront(),u,i):e.getEventCache().getNode().hasChild(y)?this.filter_.updateChild(c,y,s.ChildrenNode.EMPTY_NODE,t.popFront(),u,i):c,f.isEmpty()&&e.getServerCache().isFullyInitialized()&&(a=n.calcCompleteEventCache(e.getCompleteServerSnap()),a.isLeafNode()&&(f=this.filter_.updateFullNode(f,a,i)))}return a=e.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(l.Path.Empty),e.updateEventSnap(f,a,this.filter_.filtersNodes())},e}();t.ViewProcessor=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(18),i=n(0),a=function(){function e(){this.changeMap_={}}return e.prototype.trackChildChange=function(e){var t=e.type,n=e.childName;i.assert(t==o.Change.CHILD_ADDED||t==o.Change.CHILD_CHANGED||t==o.Change.CHILD_REMOVED,"Only child changes supported for tracking"),i.assert(".priority"!==n,"Only non-priority child changes can be tracked.");var a=r.safeGet(this.changeMap_,n);if(a){var s=a.type;if(t==o.Change.CHILD_ADDED&&s==o.Change.CHILD_REMOVED)this.changeMap_[n]=o.Change.childChangedChange(n,e.snapshotNode,a.snapshotNode);else if(t==o.Change.CHILD_REMOVED&&s==o.Change.CHILD_ADDED)delete this.changeMap_[n];else if(t==o.Change.CHILD_REMOVED&&s==o.Change.CHILD_CHANGED)this.changeMap_[n]=o.Change.childRemovedChange(n,a.oldSnap);else if(t==o.Change.CHILD_CHANGED&&s==o.Change.CHILD_ADDED)this.changeMap_[n]=o.Change.childAddedChange(n,e.snapshotNode);else{if(t!=o.Change.CHILD_CHANGED||s!=o.Change.CHILD_CHANGED)throw i.assertionError("Illegal combination of changes: "+e+" occurred after "+a);this.changeMap_[n]=o.Change.childChangedChange(n,e.snapshotNode,a.oldSnap)}}else this.changeMap_[n]=e},e.prototype.getChanges=function(){return r.getValues(this.changeMap_)},e}();t.ChildChangeAccumulator=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(36),o=function(){function e(){}return e.prototype.getCompleteChild=function(e){return null},e.prototype.getChildAfterChild=function(e,t,n){return null},e}();t.NoCompleteChildSource_=o,t.NO_COMPLETE_CHILD_SOURCE=new o;var i=function(){function e(e,t,n){void 0===n&&(n=null),this.writes_=e,this.viewCache_=t,this.optCompleteServerCache_=n}return e.prototype.getCompleteChild=function(e){var t=this.viewCache_.getEventCache();if(t.isCompleteForChild(e))return t.getNode().getImmediateChild(e);var n=null!=this.optCompleteServerCache_?new r.CacheNode(this.optCompleteServerCache_,!0,!1):this.viewCache_.getServerCache();return this.writes_.calcCompleteChild(e,n)},e.prototype.getChildAfterChild=function(e,t,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:this.viewCache_.getCompleteServerSnap(),o=this.writes_.calcIndexedSlice(r,t,1,n,e);return 0===o.length?null:o[0]},e}();t.WriteTreeCompleteChildSource=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),o=n(18),i=n(0),a=function(){function e(e){this.query_=e,this.index_=this.query_.getQueryParams().getIndex()}return e.prototype.generateEventsForChanges=function(e,t,n){var r=this,i=[],a=[];return e.forEach(function(e){e.type===o.Change.CHILD_CHANGED&&r.index_.indexedValueChanged(e.oldSnap,e.snapshotNode)&&a.push(o.Change.childMovedChange(e.childName,e.snapshotNode))}),this.generateEventsForType_(i,o.Change.CHILD_REMOVED,e,n,t),this.generateEventsForType_(i,o.Change.CHILD_ADDED,e,n,t),this.generateEventsForType_(i,o.Change.CHILD_MOVED,a,n,t),this.generateEventsForType_(i,o.Change.CHILD_CHANGED,e,n,t),this.generateEventsForType_(i,o.Change.VALUE,e,n,t),i},e.prototype.generateEventsForType_=function(e,t,n,r,o){var i=this,a=n.filter(function(e){return e.type===t});a.sort(this.compareChanges_.bind(this)),a.forEach(function(t){var n=i.materializeSingleChange_(t,o);r.forEach(function(r){r.respondsTo(t.type)&&e.push(r.createEvent(n,i.query_))})})},e.prototype.materializeSingleChange_=function(e,t){return"value"===e.type||"child_removed"===e.type?e:(e.prevName=t.getPredecessorChildName(e.childName,e.snapshotNode,this.index_),e)},e.prototype.compareChanges_=function(e,t){if(null==e.childName||null==t.childName)throw i.assertionError("Should only compare child_ events.");var n=new r.NamedNode(e.childName,e.snapshotNode),o=new r.NamedNode(t.childName,t.snapshotNode);return this.index_.compare(n,o)},e}();t.EventGenerator=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(0),i=n(3),a=n(218),s=n(6),u=n(7),c=function(){function e(){this.visibleWrites_=a.CompoundWrite.Empty,this.allWrites_=[],this.lastWriteId_=-1}return e.prototype.childWrites=function(e){return new l(e,this)},e.prototype.addOverwrite=function(e,t,n,r){o.assert(n>this.lastWriteId_,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.allWrites_.push({path:e,snap:t,writeId:n,visible:r}),r&&(this.visibleWrites_=this.visibleWrites_.addWrite(e,t)),this.lastWriteId_=n},e.prototype.addMerge=function(e,t,n){o.assert(n>this.lastWriteId_,"Stacking an older merge on top of newer ones"),this.allWrites_.push({path:e,children:t,writeId:n,visible:!0}),this.visibleWrites_=this.visibleWrites_.addWrites(e,t),this.lastWriteId_=n},e.prototype.getWrite=function(e){for(var t=0;t=0,"removeWrite called with nonexistent writeId.");var i=this.allWrites_[n];this.allWrites_.splice(n,1);for(var a=i.visible,s=!1,u=this.allWrites_.length-1;a&&u>=0;){var c=this.allWrites_[u];c.visible&&(u>=n&&this.recordContainsPath_(c,i.path)?a=!1:i.path.contains(c.path)&&(s=!0)),u--}if(a){if(s)return this.resetTree_(),!0;if(i.snap)this.visibleWrites_=this.visibleWrites_.removeWrite(i.path);else{var l=i.children;r.forEach(l,function(e){t.visibleWrites_=t.visibleWrites_.removeWrite(i.path.child(e))})}return!0}return!1},e.prototype.getCompleteWriteData=function(e){return this.visibleWrites_.getCompleteNode(e)},e.prototype.calcCompleteEventCache=function(t,n,r,o){if(r||o){var a=this.visibleWrites_.childCompoundWrite(t);if(!o&&a.isEmpty())return n;if(o||null!=n||a.hasCompleteWrite(i.Path.Empty)){var s=function(e){return(e.visible||o)&&(!r||!~r.indexOf(e.writeId))&&(e.path.contains(t)||t.contains(e.path))},c=e.layerTree_(this.allWrites_,s,t),l=n||u.ChildrenNode.EMPTY_NODE;return c.apply(l)}return null}var h=this.visibleWrites_.getCompleteNode(t);if(null!=h)return h;var f=this.visibleWrites_.childCompoundWrite(t);if(f.isEmpty())return n;if(null!=n||f.hasCompleteWrite(i.Path.Empty)){var l=n||u.ChildrenNode.EMPTY_NODE;return f.apply(l)}return null},e.prototype.calcCompleteEventChildren=function(e,t){var n=u.ChildrenNode.EMPTY_NODE,r=this.visibleWrites_.getCompleteNode(e);if(r)return r.isLeafNode()||r.forEachChild(s.PRIORITY_INDEX,function(e,t){n=n.updateImmediateChild(e,t)}),n;if(t){var o=this.visibleWrites_.childCompoundWrite(e);return t.forEachChild(s.PRIORITY_INDEX,function(e,t){var r=o.childCompoundWrite(new i.Path(e)).apply(t);n=n.updateImmediateChild(e,r)}),o.getCompleteChildren().forEach(function(e){n=n.updateImmediateChild(e.name,e.node)}),n}return this.visibleWrites_.childCompoundWrite(e).getCompleteChildren().forEach(function(e){n=n.updateImmediateChild(e.name,e.node)}),n},e.prototype.calcEventCacheAfterServerOverwrite=function(e,t,n,r){o.assert(n||r,"Either existingEventSnap or existingServerSnap must exist");var i=e.child(t);if(this.visibleWrites_.hasCompleteWrite(i))return null;var a=this.visibleWrites_.childCompoundWrite(i);return a.isEmpty()?r.getChild(t):a.apply(r.getChild(t))},e.prototype.calcCompleteChild=function(e,t,n){var r=e.child(t),o=this.visibleWrites_.getCompleteNode(r);if(null!=o)return o;if(n.isCompleteForChild(t)){return this.visibleWrites_.childCompoundWrite(r).apply(n.getNode().getImmediateChild(t))}return null},e.prototype.shadowingWrite=function(e){return this.visibleWrites_.getCompleteNode(e)},e.prototype.calcIndexedSlice=function(e,t,n,r,o,a){var s,u=this.visibleWrites_.childCompoundWrite(e),c=u.getCompleteNode(i.Path.Empty);if(null!=c)s=c;else{if(null==t)return[];s=u.apply(t)}if(s=s.withIndex(a),s.isEmpty()||s.isLeafNode())return[];for(var l=[],h=a.getCompare(),f=o?s.getReverseIteratorFrom(n,a):s.getIteratorFrom(n,a),p=f.getNext();p&&l.length0?this.lastWriteId_=this.allWrites_[this.allWrites_.length-1].writeId:this.lastWriteId_=-1},e.DefaultFilter_=function(e){return e.visible},e.layerTree_=function(e,t,n){for(var s=a.CompoundWrite.Empty,u=0;u0&&r.contains(e.statsToReport_,t)&&(n[t]=o,i=!0)}),i&&this.server_.reportStats(n),o.setTimeoutNonBlocking(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},e}();t.StatsReporter=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=function(){function e(){this.eventLists_=[],this.recursionDepth_=0}return e.prototype.queueEvents=function(e){for(var t=null,n=0;n0)return this.transports_[0];throw new Error("No transports available")},e.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},e}();t.TransportManager=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),o=function(){function e(e){this.onMessage_=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return e.prototype.closeAfter=function(e,t){this.closeAfterResponse=e,this.onClose=t,this.closeAfterResponse=200&&l.status<300){try{e=a.jsonEval(l.responseText)}catch(e){i.warn("Failed to parse JSON response for "+c+": "+l.responseText)}n(null,e)}else 401!==l.status&&404!==l.status&&i.warn("Got unsuccessful REST response for "+c+" Status: "+l.status),n(l.status);n=null}},l.open("GET",c,!0),l.send()})},t}(c.ServerActions);t.ReadonlyRestClient=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(1),i=n(21),a=n(6),s=n(89),u=n(93),c=n(49),l=n(230),h=n(107),f=n(0),p=function(){function e(){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_=a.PRIORITY_INDEX}return e.prototype.hasStart=function(){return this.startSet_},e.prototype.isViewFromLeft=function(){return""===this.viewFrom_?this.startSet_:this.viewFrom_===e.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT},e.prototype.getIndexStartValue=function(){return r.assert(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},e.prototype.getIndexStartName=function(){return r.assert(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:o.MIN_NAME},e.prototype.hasEnd=function(){return this.endSet_},e.prototype.getIndexEndValue=function(){return r.assert(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},e.prototype.getIndexEndName=function(){return r.assert(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:o.MAX_NAME},e.prototype.hasLimit=function(){return this.limitSet_},e.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},e.prototype.getLimit=function(){return r.assert(this.limitSet_,"Only valid if limit has been set"),this.limit_},e.prototype.getIndex=function(){return this.index_},e.prototype.copy_=function(){var t=new e;return t.limitSet_=this.limitSet_,t.limit_=this.limit_,t.startSet_=this.startSet_,t.indexStartValue_=this.indexStartValue_,t.startNameSet_=this.startNameSet_,t.indexStartName_=this.indexStartName_,t.endSet_=this.endSet_,t.indexEndValue_=this.indexEndValue_,t.endNameSet_=this.endNameSet_,t.indexEndName_=this.indexEndName_,t.index_=this.index_,t.viewFrom_=this.viewFrom_,t},e.prototype.limit=function(e){var t=this.copy_();return t.limitSet_=!0,t.limit_=e,t.viewFrom_="",t},e.prototype.limitToFirst=function(t){var n=this.copy_();return n.limitSet_=!0,n.limit_=t,n.viewFrom_=e.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT,n},e.prototype.limitToLast=function(t){var n=this.copy_();return n.limitSet_=!0,n.limit_=t,n.viewFrom_=e.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT,n},e.prototype.startAt=function(e,t){var n=this.copy_();return n.startSet_=!0,void 0===e&&(e=null),n.indexStartValue_=e,null!=t?(n.startNameSet_=!0,n.indexStartName_=t):(n.startNameSet_=!1,n.indexStartName_=""),n},e.prototype.endAt=function(e,t){var n=this.copy_();return n.endSet_=!0,void 0===e&&(e=null),n.indexEndValue_=e,void 0!==t?(n.endNameSet_=!0,n.indexEndName_=t):(n.endNameSet_=!1,n.indexEndName_=""),n},e.prototype.orderBy=function(e){var t=this.copy_();return t.index_=e,t},e.prototype.getQueryObject=function(){var t=e.WIRE_PROTOCOL_CONSTANTS_,n={};if(this.startSet_&&(n[t.INDEX_START_VALUE]=this.indexStartValue_,this.startNameSet_&&(n[t.INDEX_START_NAME]=this.indexStartName_)),this.endSet_&&(n[t.INDEX_END_VALUE]=this.indexEndValue_,this.endNameSet_&&(n[t.INDEX_END_NAME]=this.indexEndName_)),this.limitSet_){n[t.LIMIT]=this.limit_;var r=this.viewFrom_;""===r&&(r=this.isViewFromLeft()?t.VIEW_FROM_LEFT:t.VIEW_FROM_RIGHT),n[t.VIEW_FROM]=r}return this.index_!==a.PRIORITY_INDEX&&(n[t.INDEX]=this.index_.toString()),n},e.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},e.prototype.isDefault=function(){return this.loadsAllData()&&this.index_==a.PRIORITY_INDEX},e.prototype.getNodeFilter=function(){return this.loadsAllData()?new c.IndexedFilter(this.getIndex()):this.hasLimit()?new l.LimitedFilter(this):new h.RangedFilter(this)},e.prototype.toRestQueryStringParameters=function(){var t=e.REST_QUERY_CONSTANTS_,n={};if(this.isDefault())return n;var o;return this.index_===a.PRIORITY_INDEX?o=t.PRIORITY_INDEX:this.index_===s.VALUE_INDEX?o=t.VALUE_INDEX:this.index_===i.KEY_INDEX?o=t.KEY_INDEX:(r.assert(this.index_ instanceof u.PathIndex,"Unrecognized index type!"),o=this.index_.toString()),n[t.ORDER_BY]=f.stringify(o),this.startSet_&&(n[t.START_AT]=f.stringify(this.indexStartValue_),this.startNameSet_&&(n[t.START_AT]+=","+f.stringify(this.indexStartName_))),this.endSet_&&(n[t.END_AT]=f.stringify(this.indexEndValue_),this.endNameSet_&&(n[t.END_AT]+=","+f.stringify(this.indexEndName_))),this.limitSet_&&(this.isViewFromLeft()?n[t.LIMIT_TO_FIRST]=this.limit_:n[t.LIMIT_TO_LAST]=this.limit_),n},e.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"},e.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"},e.DEFAULT=new e,e}();t.QueryParams=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(107),o=n(7),i=n(9),a=n(0),s=n(18),u=function(){function e(e){this.rangedFilter_=new r.RangedFilter(e),this.index_=e.getIndex(),this.limit_=e.getLimit(),this.reverse_=!e.isViewFromLeft()}return e.prototype.updateChild=function(e,t,n,r,a,s){return this.rangedFilter_.matches(new i.NamedNode(t,n))||(n=o.ChildrenNode.EMPTY_NODE),e.getImmediateChild(t).equals(n)?e:e.numChildren()=0)return null!=u&&u.trackChildChange(s.Change.childChangedChange(t,n,y)),h.updateImmediateChild(t,n);null!=u&&u.trackChildChange(s.Change.childRemovedChange(t,y));var g=h.updateImmediateChild(t,o.ChildrenNode.EMPTY_NODE);return null!=v&&this.rangedFilter_.matches(v)?(null!=u&&u.trackChildChange(s.Change.childAddedChange(v.name,v.node)),g.updateImmediateChild(v.name,v.node)):g}return n.isEmpty()?e:d&&c(p,f)>=0?(null!=u&&(u.trackChildChange(s.Change.childRemovedChange(p.name,p.node)),u.trackChildChange(s.Change.childAddedChange(t,n))),h.updateImmediateChild(t,n).updateImmediateChild(p.name,o.ChildrenNode.EMPTY_NODE)):e},e}();t.LimitedFilter=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(0),i=n(46),a=n(47),s=n(3),u=n(232),c=n(6),l=n(1),h=n(94),f=n(14),p=n(0),d=n(22),y=n(7),v=n(35);!function(e){e[e.RUN=0]="RUN",e[e.SENT=1]="SENT",e[e.COMPLETED=2]="COMPLETED",e[e.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",e[e.NEEDS_ABORT=4]="NEEDS_ABORT"}(r=t.TransactionStatus||(t.TransactionStatus={})),v.Repo.MAX_TRANSACTION_RETRIES_=25,v.Repo.prototype.transactions_init_=function(){this.transactionQueueTree_=new u.Tree},v.Repo.prototype.startTransaction=function(e,t,n,s){this.log_("transaction on "+e);var u=function(){},v=new i.Reference(this,e);v.on("value",u);var m=function(){v.off("value",u)},g={path:e,update:t,onComplete:n,status:null,order:l.LUIDGenerator(),applyLocally:s,retryCount:0,unwatcher:m,abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},_=this.getLatestState_(e);g.currentInputSnapshot=_;var b=g.update(_.val());if(void 0===b){if(g.unwatcher(),g.currentOutputSnapshotRaw=null,g.currentOutputSnapshotResolved=null,g.onComplete){var w=new a.DataSnapshot(g.currentInputSnapshot,new i.Reference(this,g.path),c.PRIORITY_INDEX);g.onComplete(null,!1,w)}}else{f.validateFirebaseData("transaction failed: Data returned ",b,g.path),g.status=r.RUN;var E=this.transactionQueueTree_.subTree(e),C=E.getValue()||[];C.push(g),E.setValue(C);var T=void 0;if("object"===typeof b&&null!==b&&p.contains(b,".priority"))T=p.safeGet(b,".priority"),o.assert(f.isValidPriority(T),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.");else{T=(this.serverSyncTree_.calcCompleteEventCache(e)||y.ChildrenNode.EMPTY_NODE).getPriority().val()}T=T;var S=this.generateServerValues(),O=d.nodeFromJSON(b,T),N=h.resolveDeferredValueSnapshot(O,S);g.currentOutputSnapshotRaw=O,g.currentOutputSnapshotResolved=N,g.currentWriteId=this.getNextWriteId_();var P=this.serverSyncTree_.applyUserOverwrite(e,N,g.currentWriteId,g.applyLocally);this.eventQueue_.raiseEventsForChangedPath(e,P),this.sendReadyTransactions_()}},v.Repo.prototype.getLatestState_=function(e,t){return this.serverSyncTree_.calcCompleteEventCache(e,t)||y.ChildrenNode.EMPTY_NODE},v.Repo.prototype.sendReadyTransactions_=function(e){var t=this;if(void 0===e&&(e=this.transactionQueueTree_),e||this.pruneCompletedTransactionsBelowNode_(e),null!==e.getValue()){var n=this.buildTransactionQueue_(e);o.assert(n.length>0,"Sending zero length transaction queue");n.every(function(e){return e.status===r.RUN})&&this.sendTransactionQueue_(e.path(),n)}else e.hasChildren()&&e.forEachChild(function(e){t.sendReadyTransactions_(e)})},v.Repo.prototype.sendTransactionQueue_=function(e,t){for(var n=this,u=t.map(function(e){return e.currentWriteId}),h=this.getLatestState_(e,u),f=h,p=h.hash(),d=0;d=v.Repo.MAX_TRANSACTION_RETRIES_)w=!0,E="maxretry",u=u.concat(this.serverSyncTree_.ackUserWrite(_.currentWriteId,!0));else{var C=this.getLatestState_(_.path,m);_.currentInputSnapshot=C;var T=e[g].update(C.val());if(void 0!==T){f.validateFirebaseData("transaction failed: Data returned ",T,_.path);var S=d.nodeFromJSON(T),O="object"===typeof T&&null!=T&&p.contains(T,".priority");O||(S=S.updatePriority(C.getPriority()));var N=_.currentWriteId,P=this.generateServerValues(),I=h.resolveDeferredValueSnapshot(S,P);_.currentOutputSnapshotRaw=S,_.currentOutputSnapshotResolved=I,_.currentWriteId=this.getNextWriteId_(),m.splice(m.indexOf(N),1),u=u.concat(this.serverSyncTree_.applyUserOverwrite(_.path,I,_.currentWriteId,_.applyLocally)),u=u.concat(this.serverSyncTree_.ackUserWrite(N,!0))}else w=!0,E="nodata",u=u.concat(this.serverSyncTree_.ackUserWrite(_.currentWriteId,!0))}if(this.eventQueue_.raiseEventsForChangedPath(t,u),u=[],w&&(e[g].status=r.COMPLETED,function(e){setTimeout(e,Math.floor(0))}(e[g].unwatcher),e[g].onComplete))if("nodata"===E){var R=new i.Reference(this,e[g].path),A=e[g].currentInputSnapshot,k=new a.DataSnapshot(A,R,c.PRIORITY_INDEX);n.push(e[g].onComplete.bind(null,null,!1,k))}else n.push(e[g].onComplete.bind(null,new Error(E),!1,null))}this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);for(var g=0;g0?n:null)}e.forEachChild(function(e){t.pruneCompletedTransactionsBelowNode_(e)})},v.Repo.prototype.abortTransactions_=function(e){var t=this,n=this.getAncestorTransactionNode_(e).path(),r=this.transactionQueueTree_.subTree(e);return r.forEachAncestor(function(e){t.abortTransactionsOnNode_(e)}),this.abortTransactionsOnNode_(r),r.forEachDescendant(function(e){t.abortTransactionsOnNode_(e)}),n},v.Repo.prototype.abortTransactionsOnNode_=function(e){var t=e.getValue();if(null!==t){for(var n=[],i=[],a=-1,s=0;s0},e.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},e.prototype.forEachChild=function(t){var n=this;i.forEach(this.node_.children,function(r,o){t(new e(r,n,o))})},e.prototype.forEachDescendant=function(e,t,n){t&&!n&&e(this),this.forEachChild(function(t){t.forEachDescendant(e,!0,n)}),t&&n&&e(this)},e.prototype.forEachAncestor=function(e,t){for(var n=t?this:this.parent();null!==n;){if(e(n))return!0;n=n.parent()}return!1},e.prototype.forEachImmediateDescendantWithValue=function(e){this.forEachChild(function(t){null!==t.getValue()?e(t):t.forEachImmediateDescendantWithValue(e)})},e.prototype.path=function(){return new o.Path(null===this.parent_?this.name_:this.parent_.path()+"/"+this.name_)},e.prototype.name=function(){return this.name_},e.prototype.parent=function(){return this.parent_},e.prototype.updateParents_=function(){null!==this.parent_&&this.parent_.updateChild_(this.name_,this)},e.prototype.updateChild_=function(e,t){var n=t.isEmpty(),r=i.contains(this.node_.children,e);n&&r?(delete this.node_.children[e],this.node_.childCount--,this.updateParents_()):n||r||(this.node_.children[e]=t.node_,this.node_.childCount++,this.updateParents_())},e}();t.Tree=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(105),o=n(104);t.forceLongPolling=function(){r.WebSocketConnection.forceDisallow(),o.BrowserPollConnection.forceAllow()},t.forceWebSockets=function(){o.BrowserPollConnection.forceDisallow()},t.isWebSocketsAvailable=function(){return r.WebSocketConnection.isAvailable()},t.setSecurityDebugCallback=function(e,t){e.repo.persistentConnection_.securityDebugCallback_=t},t.stats=function(e,t){e.repo.stats(t)},t.statsIncrementCounter=function(e,t){e.repo.statsIncrementCounter(t)},t.dataUpdateCount=function(e){return e.repo.dataUpdateCount},t.interceptServerData=function(e,t){return e.repo.interceptServerData_(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(85),o=n(101),i=n(51),a=n(103);t.DataConnection=o.PersistentConnection,o.PersistentConnection.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)},o.PersistentConnection.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)},t.RealTimeConnection=a.Connection,t.hijackHash=function(e){var t=o.PersistentConnection.prototype.put;return o.PersistentConnection.prototype.put=function(n,r,o,i){void 0!==i&&(i=e()),t.call(this,n,r,o,i)},function(){o.PersistentConnection.prototype.put=t}},t.ConnectionTarget=r.RepoInfo,t.queryIdentifier=function(e){return e.queryIdentifier()},t.listens=function(e){return e.repo.persistentConnection_.listens_},t.forceRestClient=function(e){i.RepoManager.getInstance().forceRestClient(e)}},function(e,t,n){n(236)},function(e,t,n){"use strict";function r(e){var t=function(e){return self&&"ServiceWorkerGlobalScope"in self?new i.a(e):new o.a(e)},n={Messaging:o.a};e.INTERNAL.registerService("messaging",t,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.registerMessaging=r;var o=n(237),i=n(241);r(n(13).firebase)},function(e,t,n){"use strict";var r=n(108),o=n(37),i=n(111),a=n(240),s=n(110),u=n(0),c=(n.n(u),this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),l=function(e){function t(t){var n=e.call(this,t)||this;return n.messageObserver_=null,n.onMessage_=Object(u.createSubscribe)(function(e){n.messageObserver_=e}),n.tokenRefreshObserver_=null,n.onTokenRefresh_=Object(u.createSubscribe)(function(e){n.tokenRefreshObserver_=e}),n.setupSWMessageListener_(),n}return c(t,e),t.prototype.getToken=function(){var t=this;return this.isSupported_()?this.manifestCheck_().then(function(){return e.prototype.getToken.call(t)}):Promise.reject(this.errorFactory_.create(o.a.codes.UNSUPPORTED_BROWSER))},t.prototype.manifestCheck_=function(){var e=this;if(this.manifestCheckPromise_)return this.manifestCheckPromise_;var t=document.querySelector('link[rel="manifest"]');return this.manifestCheckPromise_=t?fetch(t.href).then(function(e){return e.json()}).catch(function(){return Promise.resolve()}).then(function(t){if(t&&t.gcm_sender_id&&"103953800507"!==t.gcm_sender_id)throw e.errorFactory_.create(o.a.codes.INCORRECT_GCM_SENDER_ID)}):Promise.resolve(),this.manifestCheckPromise_},t.prototype.requestPermission=function(){var e=this;return Notification.permission===s.a.granted?Promise.resolve():new Promise(function(t,n){var r=function(r){return r===s.a.granted?t():n(r===s.a.denied?e.errorFactory_.create(o.a.codes.PERMISSION_BLOCKED):e.errorFactory_.create(o.a.codes.PERMISSION_DEFAULT))},i=Notification.requestPermission(function(e){i||r(e)});i&&i.then(r)})},t.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw this.errorFactory_.create(o.a.codes.SW_REGISTRATION_EXPECTED);if("undefined"!==typeof this.registrationToUse_)throw this.errorFactory_.create(o.a.codes.USE_SW_BEFORE_GET_TOKEN);this.registrationToUse_=e},t.prototype.onMessage=function(e,t,n){return this.onMessage_(e,t,n)},t.prototype.onTokenRefresh=function(e,t,n){return this.onTokenRefresh_(e,t,n)},t.prototype.waitForRegistrationToActivate_=function(e){var t=this,n=e.installing||e.waiting||e.active;return new Promise(function(r,i){if(!n)return void i(t.errorFactory_.create(o.a.codes.NO_SW_IN_REG));if("activated"===n.state)return void r(e);if("redundant"===n.state)return void i(t.errorFactory_.create(o.a.codes.SW_REG_REDUNDANT));var a=function(){if("activated"===n.state)r(e);else{if("redundant"!==n.state)return;i(t.errorFactory_.create(o.a.codes.SW_REG_REDUNDANT))}n.removeEventListener("statechange",a)};n.addEventListener("statechange",a)})},t.prototype.getSWRegistration_=function(){var e=this;return this.registrationToUse_?this.waitForRegistrationToActivate_(this.registrationToUse_):(this.registrationToUse_=null,navigator.serviceWorker.register(a.a.path,{scope:a.a.scope}).catch(function(t){throw e.errorFactory_.create(o.a.codes.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:t.message})}).then(function(t){return e.waitForRegistrationToActivate_(t).then(function(){return e.registrationToUse_=t,t.update(),t})}))},t.prototype.setupSWMessageListener_=function(){var e=this;"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",function(t){if(t.data&&t.data[i.a.PARAMS.TYPE_OF_MSG]){var n=t.data;switch(n[i.a.PARAMS.TYPE_OF_MSG]){case i.a.TYPES_OF_MSG.PUSH_MSG_RECEIVED:case i.a.TYPES_OF_MSG.NOTIFICATION_CLICKED:var r=n[i.a.PARAMS.DATA];e.messageObserver_.next(r)}}},!1)},t.prototype.isSupported_=function(){return"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")},t}(r.a);t.a=l},function(e,t,n){"use strict";var r=n(0),o=(n.n(r),n(37)),i=n(239),a=n(109),s="fcm_token_object_Store",u=function(){function e(){this.errorFactory_=new r.ErrorFactory("messaging","Messaging",o.a.map),this.openDbPromise_=null}return e.prototype.openDatabase_=function(){return this.openDbPromise_?this.openDbPromise_:(this.openDbPromise_=new Promise(function(t,n){var r=indexedDB.open(e.DB_NAME,1);r.onerror=function(e){n(e.target.error)},r.onsuccess=function(e){t(e.target.result)},r.onupgradeneeded=function(e){var t=e.target.result,n=t.createObjectStore(s,{keyPath:"swScope"});n.createIndex("fcmSenderId","fcmSenderId",{unique:!1}),n.createIndex("fcmToken","fcmToken",{unique:!0})}}),this.openDbPromise_)},e.prototype.closeDatabase=function(){var e=this;return this.openDbPromise_?this.openDbPromise_.then(function(t){t.close(),e.openDbPromise_=null}):Promise.resolve()},e.prototype.getTokenDetailsFromToken=function(e){return this.openDatabase_().then(function(t){return new Promise(function(n,r){var o=t.transaction([s]),i=o.objectStore(s),a=i.index("fcmToken"),u=a.get(e);u.onerror=function(e){r(e.target.error)},u.onsuccess=function(e){n(e.target.result)}})})},e.prototype.getTokenDetailsFromSWScope_=function(e){return this.openDatabase_().then(function(t){return new Promise(function(n,r){var o=t.transaction([s]),i=o.objectStore(s),a=i.get(e);a.onerror=function(e){r(e.target.error)},a.onsuccess=function(e){n(e.target.result)}})})},e.prototype.getAllTokenDetailsForSenderId_=function(e){return this.openDatabase_().then(function(t){return new Promise(function(n,r){var o=t.transaction([s]),i=o.objectStore(s),a=[],u=i.openCursor();u.onerror=function(e){r(e.target.error)},u.onsuccess=function(t){var r=t.target.result;r?(r.value.fcmSenderId===e&&a.push(r.value),r.continue()):n(a)}})})},e.prototype.subscribeToFCM=function(e,t,n){var r=this,s=Object(i.a)(t.getKey("p256dh")),u=Object(i.a)(t.getKey("auth")),c="authorized_entity="+e+"&endpoint="+t.endpoint+"&encryption_key="+s+"&encryption_auth="+u;n&&(c+="&pushSet="+n);var l=new Headers;l.append("Content-Type","application/x-www-form-urlencoded");var h={method:"POST",headers:l,body:c};return fetch(a.a.ENDPOINT+"/fcm/connect/subscribe",h).then(function(e){return e.json()}).then(function(e){var t=e;if(t.error){var n=t.error.message;throw r.errorFactory_.create(o.a.codes.TOKEN_SUBSCRIBE_FAILED,{message:n})}if(!t.token)throw r.errorFactory_.create(o.a.codes.TOKEN_SUBSCRIBE_NO_TOKEN);if(!t.pushSet)throw r.errorFactory_.create(o.a.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);return{token:t.token,pushSet:t.pushSet}})},e.prototype.isSameSubscription_=function(e,t){return e.endpoint===t.endpoint&&Object(i.a)(e.getKey("auth"))===t.auth&&Object(i.a)(e.getKey("p256dh"))===t.p256dh},e.prototype.saveTokenDetails_=function(e,t,n,r,o){var a={swScope:t.scope,endpoint:n.endpoint,auth:Object(i.a)(n.getKey("auth")),p256dh:Object(i.a)(n.getKey("p256dh")),fcmToken:r,fcmPushSet:o,fcmSenderId:e};return this.openDatabase_().then(function(e){return new Promise(function(t,n){var r=e.transaction([s],"readwrite"),o=r.objectStore(s),i=o.put(a);i.onerror=function(e){n(e.target.error)},i.onsuccess=function(e){t()}})})},e.prototype.getSavedToken=function(e,t){var n=this;return t instanceof ServiceWorkerRegistration?"string"!==typeof e||0===e.length?Promise.reject(this.errorFactory_.create(o.a.codes.BAD_SENDER_ID)):this.getAllTokenDetailsForSenderId_(e).then(function(n){if(0!==n.length){var r=n.findIndex(function(n){return t.scope===n.swScope&&e===n.fcmSenderId});if(-1!==r)return n[r]}}).then(function(e){if(e)return t.pushManager.getSubscription().catch(function(e){throw n.errorFactory_.create(o.a.codes.GET_SUBSCRIPTION_FAILED)}).then(function(t){if(t&&n.isSameSubscription_(t,e))return e.fcmToken})}):Promise.reject(this.errorFactory_.create(o.a.codes.SW_REGISTRATION_EXPECTED))},e.prototype.createToken=function(e,t){var n=this;if("string"!==typeof e||0===e.length)return Promise.reject(this.errorFactory_.create(o.a.codes.BAD_SENDER_ID));if(!(t instanceof ServiceWorkerRegistration))return Promise.reject(this.errorFactory_.create(o.a.codes.SW_REGISTRATION_EXPECTED));var r,i;return t.pushManager.getSubscription().then(function(e){return e||t.pushManager.subscribe(a.a.SUBSCRIPTION_OPTIONS)}).then(function(t){return r=t,n.subscribeToFCM(e,r)}).then(function(o){return i=o,n.saveTokenDetails_(e,t,r,i.token,i.pushSet)}).then(function(){return i.token})},e.prototype.deleteToken=function(e){var t=this;return"string"!==typeof e||0===e.length?Promise.reject(this.errorFactory_.create(o.a.codes.INVALID_DELETE_TOKEN)):this.getTokenDetailsFromToken(e).then(function(e){if(!e)throw t.errorFactory_.create(o.a.codes.DELETE_TOKEN_NOT_FOUND);return t.openDatabase_().then(function(n){return new Promise(function(r,i){var a=n.transaction([s],"readwrite"),u=a.objectStore(s),c=u.delete(e.swScope);c.onerror=function(e){i(e.target.error)},c.onsuccess=function(n){if(0===n.target.result)return void i(t.errorFactory_.create(o.a.codes.FAILED_TO_DELETE_TOKEN));r(e)}})})})},e}();t.a=u},function(e,t,n){"use strict";function r(e){var t=new Uint8Array(e);return window.btoa(String.fromCharCode.apply(null,t))}t.a=function(e){return r(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}},function(e,t,n){"use strict";t.a={path:"/firebase-messaging-sw.js",scope:"/firebase-cloud-messaging-push-scope"}},function(e,t,n){"use strict";var r=n(108),o=n(37),i=n(111),a=n(109),s=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(e){function t(t){var n=e.call(this,t)||this;return self.addEventListener("push",function(e){return n.onPush_(e)},!1),self.addEventListener("pushsubscriptionchange",function(e){return n.onSubChange_(e)},!1),self.addEventListener("notificationclick",function(e){return n.onNotificationClick_(e)},!1),n.bgMessageHandler_=null,n}return s(t,e),t.prototype.onPush_=function(e){var t,n=this;try{t=e.data.json()}catch(e){return}var r=this.hasVisibleClients_().then(function(e){if(e){if(t.notification||n.bgMessageHandler_)return n.sendMessageToWindowClients_(t)}else{var r=n.getNotificationData_(t);if(r){var o=r.title||"";return self.registration.showNotification(o,r)}if(n.bgMessageHandler_)return n.bgMessageHandler_(t)}});e.waitUntil(r)},t.prototype.onSubChange_=function(e){var t=this,n=this.getToken().then(function(e){if(!e)throw t.errorFactory_.create(o.a.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE);var n=null,r=t.getTokenManager();return r.getTokenDetailsFromToken(e).then(function(e){if(!(n=e))throw t.errorFactory_.create(o.a.codes.INVALID_SAVED_TOKEN);return self.registration.pushManager.subscribe(a.a.SUBSCRIPTION_OPTIONS)}).then(function(e){return r.subscribeToFCM(n.fcmSenderId,e,n.fcmPushSet)}).catch(function(e){return r.deleteToken(n.fcmToken).then(function(){throw t.errorFactory_.create(o.a.codes.UNABLE_TO_RESUBSCRIBE,{message:e})})})});e.waitUntil(n)},t.prototype.onNotificationClick_=function(e){var t=this;if(e.notification&&e.notification.data&&e.notification.data.FCM_MSG){e.stopImmediatePropagation(),e.notification.close();var n=e.notification.data.FCM_MSG,r=n.notification.click_action;if(r){var o=this.getWindowClient_(r).then(function(e){return e||self.clients.openWindow(r)}).then(function(e){if(e){n.notification;delete n.notification;var r=i.a.createNewMsg(i.a.TYPES_OF_MSG.NOTIFICATION_CLICKED,n);return t.attemptToMessageClient_(e,r)}});e.waitUntil(o)}}},t.prototype.getNotificationData_=function(e){if(e&&"object"===typeof e.notification){var t=Object.assign({},e.notification);return t.data=(n={},n.FCM_MSG=e,n),t;var n}},t.prototype.setBackgroundMessageHandler=function(e){if(e&&"function"!==typeof e)throw this.errorFactory_.create(o.a.codes.BG_HANDLER_FUNCTION_EXPECTED);this.bgMessageHandler_=e},t.prototype.getWindowClient_=function(e){var t=new URL(e).href;return self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(function(e){for(var n=null,r=0;r262144},e.prototype.start_=function(){this.state_===r.a.RUNNING&&null===this.request_&&(this.resumable_?null===this.uploadUrl_?this.createResumable_():this.needToFetchStatus_?this.fetchStatus_():this.needToFetchMetadata_?this.fetchMetadata_():this.continueUpload_():this.oneShotUpload_())},e.prototype.resolveToken_=function(e){var t=this;this.authWrapper_.getAuthToken().then(function(n){switch(t.state_){case r.a.RUNNING:e(n);break;case r.a.CANCELING:t.transition_(r.a.CANCELED);break;case r.a.PAUSING:t.transition_(r.a.PAUSED)}})},e.prototype.createResumable_=function(){var e=this;this.resolveToken_(function(t){var n=h.c(e.authWrapper_,e.location_,e.mappings_,e.blob_,e.metadata_),r=e.authWrapper_.makeRequest(n,t);e.request_=r,r.getPromise().then(function(t){e.request_=null,e.uploadUrl_=t,e.needToFetchStatus_=!1,e.completeTransitions_()},e.errorHandler_)})},e.prototype.fetchStatus_=function(){var e=this,t=this.uploadUrl_;this.resolveToken_(function(n){var r=h.f(e.authWrapper_,e.location_,t,e.blob_),o=e.authWrapper_.makeRequest(r,n);e.request_=o,o.getPromise().then(function(t){t=t,e.request_=null,e.updateProgress_(t.current),e.needToFetchStatus_=!1,t.finalized&&(e.needToFetchMetadata_=!0),e.completeTransitions_()},e.errorHandler_)})},e.prototype.continueUpload_=function(){var e=this,t=h.h*this.chunkMultiplier_,n=new h.a(this.transferred_,this.blob_.size()),o=this.uploadUrl_;this.resolveToken_(function(i){var a;try{a=h.b(e.location_,e.authWrapper_,o,e.blob_,t,e.mappings_,n,e.makeProgressCallback_())}catch(t){return e.error_=t,void e.transition_(r.a.ERROR)}var s=e.authWrapper_.makeRequest(a,i);e.request_=s,s.getPromise().then(function(t){e.increaseMultiplier_(),e.request_=null,e.updateProgress_(t.current),t.finalized?(e.metadata_=t.metadata,e.transition_(r.a.SUCCESS)):e.completeTransitions_()},e.errorHandler_)})},e.prototype.increaseMultiplier_=function(){h.h*this.chunkMultiplier_<33554432&&(this.chunkMultiplier_*=2)},e.prototype.fetchMetadata_=function(){var e=this;this.resolveToken_(function(t){var n=h.e(e.authWrapper_,e.location_,e.mappings_),o=e.authWrapper_.makeRequest(n,t);e.request_=o,o.getPromise().then(function(t){e.request_=null,e.metadata_=t,e.transition_(r.a.SUCCESS)},e.metadataErrorHandler_)})},e.prototype.oneShotUpload_=function(){var e=this;this.resolveToken_(function(t){var n=h.g(e.authWrapper_,e.location_,e.mappings_,e.blob_,e.metadata_),o=e.authWrapper_.makeRequest(n,t);e.request_=o,o.getPromise().then(function(t){e.request_=null,e.metadata_=t,e.updateProgress_(e.blob_.size()),e.transition_(r.a.SUCCESS)},e.errorHandler_)})},e.prototype.updateProgress_=function(e){var t=this.transferred_;this.transferred_=e,this.transferred_!==t&&this.notifyObservers_()},e.prototype.transition_=function(e){if(this.state_!==e)switch(e){case r.a.CANCELING:case r.a.PAUSING:this.state_=e,null!==this.request_&&this.request_.cancel();break;case r.a.RUNNING:var t=this.state_===r.a.PAUSED;this.state_=e,t&&(this.notifyObservers_(),this.start_());break;case r.a.PAUSED:this.state_=e,this.notifyObservers_();break;case r.a.CANCELED:this.error_=c.c(),this.state_=e,this.notifyObservers_();break;case r.a.ERROR:case r.a.SUCCESS:this.state_=e,this.notifyObservers_()}},e.prototype.completeTransitions_=function(){switch(this.state_){case r.a.PAUSING:this.transition_(r.a.PAUSED);break;case r.a.CANCELING:this.transition_(r.a.CANCELED);break;case r.a.RUNNING:this.start_()}},Object.defineProperty(e.prototype,"snapshot",{get:function(){var e=r.d(this.state_);return new i.a(this.transferred_,this.blob_.size(),e,this.metadata_,this,this.ref_)},enumerable:!0,configurable:!0}),e.prototype.on=function(e,t,n,i){function s(t){if(e!==r.b.STATE_CHANGED)throw"Expected one of the event types: ["+r.b.STATE_CHANGED+"]."}function u(e){try{return void p(e)}catch(e){}try{d(e);if(!(f.c(e.next)||f.c(e.error)||f.c(e.complete)))throw"";return}catch(e){throw h}}function c(e){function t(t,n,r){null!==e&&a.g("on",e,arguments);var s=new o.a(t,n,i);return v.addObserver_(s),function(){v.removeObserver_(s)}}return t}function l(e){if(null===e)throw h;u(e)}void 0===t&&(t=void 0),void 0===n&&(n=void 0),void 0===i&&(i=void 0);var h="Expected a function or an Object with one of `next`, `error`, `complete` properties.",p=a.d(!0).validator,d=a.a(null,!0).validator,y=[a.e(s),a.a(u,!0),a.d(!0),a.d(!0)];a.g("on",y,arguments);var v=this,m=[a.a(l),a.d(!0),a.d(!0)];return f.c(t)||f.c(n)||f.c(i)?c(null)(t,n,i):c(m)},e.prototype.then=function(e,t){return this.promise_.then(e,t)},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.addObserver_=function(e){this.observers_.push(e),this.notifyObserver_(e)},e.prototype.removeObserver_=function(e){s.c(this.observers_,e)},e.prototype.notifyObservers_=function(){var e=this;this.finishPromise_(),s.a(this.observers_).forEach(function(t){e.notifyObserver_(t)})},e.prototype.finishPromise_=function(){if(null!==this.resolve_){var e=!0;switch(r.d(this.state_)){case r.c.SUCCESS:Object(u.a)(this.resolve_.bind(null,this.snapshot))();break;case r.c.CANCELED:case r.c.ERROR:var t=this.reject_;Object(u.a)(t.bind(null,this.error_))();break;default:e=!1}e&&(this.resolve_=null,this.reject_=null)}},e.prototype.notifyObserver_=function(e){switch(r.d(this.state_)){case r.c.RUNNING:case r.c.PAUSED:null!==e.next&&Object(u.a)(e.next.bind(e,this.snapshot))();break;case r.c.SUCCESS:null!==e.complete&&Object(u.a)(e.complete.bind(e))();break;case r.c.CANCELED:case r.c.ERROR:null!==e.error&&Object(u.a)(e.error.bind(e,this.error_))();break;default:null!==e.error&&Object(u.a)(e.error.bind(e,this.error_))()}},e.prototype.resume=function(){a.g("resume",[],arguments);var e=this.state_===r.a.PAUSED||this.state_===r.a.PAUSING;return e&&this.transition_(r.a.RUNNING),e},e.prototype.pause=function(){a.g("pause",[],arguments);var e=this.state_===r.a.RUNNING;return e&&this.transition_(r.a.PAUSING),e},e.prototype.cancel=function(){a.g("cancel",[],arguments);var e=this.state_===r.a.RUNNING||this.state_===r.a.PAUSING;return e&&this.transition_(r.a.CANCELING),e},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(10),o=function(){function e(e,t,n){if(r.b(e)||r.a(t)||r.a(n))this.next=e,this.error=t||null,this.complete=n||null;else{var o=e;this.next=o.next||null,this.error=o.error||null,this.complete=o.complete||null}}return e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(e,t,n,r,o,i){this.bytesTransferred=e,this.totalBytes=t,this.state=n,this.metadata=r,this.task=o,this.ref=i}return Object.defineProperty(e.prototype,"downloadURL",{get:function(){if(null!==this.metadata){var e=this.metadata.downloadURLs;return null!=e&&null!=e[0]?e[0]:null}return null},enumerable:!0,configurable:!0}),e}()},function(e,t,n){"use strict";function r(e){return function(){for(var t=[],n=0;n0&&(e.Authorization="Firebase "+t)}function o(e){var t="undefined"!==typeof a.default?a.default.SDK_VERSION:"AppManager";e["X-Firebase-Storage-Version"]="webjs/"+t}function i(e,t,n){var i=p.c(e.urlParams),a=e.url+i,s=l.a(e.headers);return r(s,t),o(s),new y(a,e.method,s,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,n)}t.a=i;var a=n(13),s=n(55),u=n(258),c=n(12),l=n(19),h=n(16),f=n(10),p=n(54),d=n(112),y=function(){function e(e,t,n,r,o,i,a,s,u,c,l){this.pendingXhr_=null,this.backoffId_=null,this.resolve_=null,this.reject_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=e,this.method_=t,this.headers_=n,this.body_=r,this.successCodes_=o.slice(),this.additionalRetryCodes_=i.slice(),this.callback_=a,this.errorCallback_=s,this.progressCallback_=c,this.timeout_=u,this.pool_=l;var f=this;this.promise_=h.a(function(e,t){f.resolve_=e,f.reject_=t,f.start_()})}return e.prototype.start_=function(){function e(e,t){function r(e){var t=e.loaded,r=e.lengthComputable?e.total:-1;null!==n.progressCallback_&&n.progressCallback_(t,r)}if(t)return void e(!1,new v(!1,null,!0));var o=n.pool_.createXhrIo();n.pendingXhr_=o,null!==n.progressCallback_&&o.addUploadProgressListener(r),o.send(n.url_,n.method_,n.body_,n.headers_).then(function(t){null!==n.progressCallback_&&t.removeUploadProgressListener(r),n.pendingXhr_=null,t=t;var o=t.getErrorCode()===d.a.NO_ERROR,i=t.getStatus();if(!o||n.isRetryStatusCode_(i)){var a=t.getErrorCode()===d.a.ABORT;return void e(!1,new v(!1,null,a))}var u=s.b(n.successCodes_,i);e(!0,new v(u,t))})}function t(e,t){var r=n.resolve_,o=n.reject_,i=t.xhr;if(t.wasSuccessCode)try{var a=n.callback_(i,i.getResponseText());f.c(a)?r(a):r()}catch(e){o(e)}else if(null!==i){var s=c.s();s.setServerResponseProp(i.getResponseText()),o(n.errorCallback_?n.errorCallback_(i,s):s)}else if(t.canceled){var s=n.appDelete_?c.b():c.c();o(s)}else{var s=c.o();o(s)}}var n=this;this.canceled_?t(!1,new v(!1,null,!0)):this.backoffId_=u.a(e,t,this.timeout_)},e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&u.b(this.backoffId_),null!==this.pendingXhr_&&this.pendingXhr_.abort()},e.prototype.isRetryStatusCode_=function(e){var t=e>=500&&e<600,n=[408,429],r=s.b(n,e),o=s.b(this.additionalRetryCodes_,e);return t||r||o},e}(),v=function(){function e(e,t,n){this.wasSuccessCode=e,this.xhr=t,this.canceled=!!n}return e}()},function(e,t,n){"use strict";function r(e,t,n){function r(){return 2===h}function o(){f||(f=!0,t.apply(null,arguments))}function i(t){c=setTimeout(function(){c=null,e(a,r())},t)}function a(e){for(var t=[],n=1;n=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},function(e,t,n){"use strict";var r=n(11);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";function r(){this.message="String contains an invalid character"}function o(e){for(var t,n,o=String(e),a="",s=0,u=i;o.charAt(0|s)||(u="=",s%1);a+=u.charAt(63&t>>8-s%1*8)){if((n=o.charCodeAt(s+=.75))>255)throw new r;t=t<<8|n}return a}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",e.exports=o},function(e,t,n){"use strict";var r=n(11);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(11);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(11),i=n(274),a=n(120),s=n(57),u=n(275),c=n(276);e.exports=function(e){return r(e),e.baseURL&&!u(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return r(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(r(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";function r(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(121);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r(function(t){e=t}),cancel:e}},e.exports=r},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),s=n.n(a),u=n(58),c=n(27),l=n.n(c),h=n(59),f=n.n(h),p=n(305),d=n(307),y=n(129),v=function(){function e(e,t){for(var n=0;n ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},t.prototype.render=function(){return c.a.createElement(d.a,{history:this.history,children:this.props.children})},t}(c.a.Component);y.propTypes={basename:h.a.string,forceRefresh:h.a.bool,getUserConfirmation:h.a.func,keyLength:h.a.number,children:h.a.node}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(4),s=n.n(a),u=n(2),c=n.n(u),l=n(5),h=n.n(l),f=n(282),p=n.n(f),d=n(62),y=function(e){function t(){var n,i,a;r(this,t);for(var s=arguments.length,u=Array(s),c=0;c ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},t.prototype.render=function(){return c.a.createElement(d.a,{history:this.history,children:this.props.children})},t}(c.a.Component);y.propTypes={basename:h.a.string,getUserConfirmation:h.a.func,hashType:h.a.oneOf(["hashbang","noslash","slash"]),children:h.a.node}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t=0?t:0)+"#"+e)},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,u.default)(p.canUseDOM,"Hash history needs a DOM");var t=window.history,n=(0,p.supportsGoWithoutReloadUsingHash)(),r=e.getUserConfirmation,i=void 0===r?p.getConfirmation:r,s=e.hashType,h=void 0===s?"slash":s,g=e.basename?(0,l.stripTrailingSlash)((0,l.addLeadingSlash)(e.basename)):"",_=d[h],b=_.encodePath,w=_.decodePath,E=function(){var e=w(y());return(0,a.default)(!g||(0,l.hasBasename)(e,g),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+e+'" to begin with "'+g+'".'),g&&(e=(0,l.stripBasename)(e,g)),(0,c.createLocation)(e)},C=(0,f.default)(),T=function(e){o(K,e),K.length=t.length,C.notifyListeners(K.location,K.action)},S=!1,O=null,N=function(){var e=y(),t=b(e);if(e!==t)m(t);else{var n=E(),r=K.location;if(!S&&(0,c.locationsAreEqual)(r,n))return;if(O===(0,l.createPath)(n))return;O=null,P(n)}},P=function(e){if(S)S=!1,T();else{C.confirmTransitionTo(e,"POP",i,function(t){t?T({action:"POP",location:e}):I(e)})}},I=function(e){var t=K.location,n=x.lastIndexOf((0,l.createPath)(t));-1===n&&(n=0);var r=x.lastIndexOf((0,l.createPath)(e));-1===r&&(r=0);var o=n-r;o&&(S=!0,j(o))},R=y(),A=b(R);R!==A&&m(A);var k=E(),x=[(0,l.createPath)(k)],D=function(e){return"#"+b(g+(0,l.createPath)(e))},M=function(e,t){(0,a.default)(void 0===t,"Hash history cannot push state; it is ignored");var n=(0,c.createLocation)(e,void 0,void 0,K.location);C.confirmTransitionTo(n,"PUSH",i,function(e){if(e){var t=(0,l.createPath)(n),r=b(g+t);if(y()!==r){O=t,v(r);var o=x.lastIndexOf((0,l.createPath)(K.location)),i=x.slice(0,-1===o?0:o+1);i.push(t),x=i,T({action:"PUSH",location:n})}else(0,a.default)(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),T()}})},L=function(e,t){(0,a.default)(void 0===t,"Hash history cannot replace state; it is ignored");var n=(0,c.createLocation)(e,void 0,void 0,K.location);C.confirmTransitionTo(n,"REPLACE",i,function(e){if(e){var t=(0,l.createPath)(n),r=b(g+t);y()!==r&&(O=t,m(r));var o=x.indexOf((0,l.createPath)(K.location));-1!==o&&(x[o]=t),T({action:"REPLACE",location:n})}})},j=function(e){(0,a.default)(n,"Hash history go(n) causes a full page reload in this browser"),t.go(e)},F=function(){return j(-1)},U=function(){return j(1)},W=0,B=function(e){W+=e,1===W?(0,p.addEventListener)(window,"hashchange",N):0===W&&(0,p.removeEventListener)(window,"hashchange",N)},V=!1,q=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=C.setPrompt(e);return V||(B(1),V=!0),function(){return V&&(V=!1,B(-1)),t()}},H=function(e){var t=C.appendListener(e);return B(1),function(){B(-1),t()}},K={length:t.length,action:"POP",location:k,createHref:D,push:M,replace:L,go:j,goBack:F,goForward:U,block:q,listen:H};return K};t.default=g},function(e,t,n){"use strict";var r=n(284);r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(4),s=n.n(a),u=n(2),c=n.n(u),l=n(5),h=n.n(l),f=n(285),p=n.n(f),d=n(63),y=function(e){function t(){var n,i,a;r(this,t);for(var s=arguments.length,u=Array(s),c=0;c ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},t.prototype.render=function(){return c.a.createElement(d.a,{history:this.history,children:this.props.children})},t}(c.a.Component);y.propTypes={initialEntries:h.a.array,initialIndex:h.a.number,getUserConfirmation:h.a.func,keyLength:h.a.number,children:h.a.node},t.a=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.getUserConfirmation,n=e.initialEntries,r=void 0===n?["/"]:n,a=e.initialIndex,l=void 0===a?0:a,p=e.keyLength,d=void 0===p?6:p,y=(0,h.default)(),v=function(e){i(I,e),I.length=I.entries.length,y.notifyListeners(I.location,I.action)},m=function(){return Math.random().toString(36).substr(2,d)},g=f(l,0,r.length-1),_=r.map(function(e){return"string"===typeof e?(0,c.createLocation)(e,void 0,m()):(0,c.createLocation)(e,void 0,e.key||m())}),b=u.createPath,w=function(e,n){(0,s.default)(!("object"===("undefined"===typeof e?"undefined":o(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var r=(0,c.createLocation)(e,n,m(),I.location);y.confirmTransitionTo(r,"PUSH",t,function(e){if(e){var t=I.index,n=t+1,o=I.entries.slice(0);o.length>n?o.splice(n,o.length-n,r):o.push(r),v({action:"PUSH",location:r,index:n,entries:o})}})},E=function(e,n){(0,s.default)(!("object"===("undefined"===typeof e?"undefined":o(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var r=(0,c.createLocation)(e,n,m(),I.location);y.confirmTransitionTo(r,"REPLACE",t,function(e){e&&(I.entries[I.index]=r,v({action:"REPLACE",location:r}))})},C=function(e){var n=f(I.index+e,0,I.entries.length-1),r=I.entries[n];y.confirmTransitionTo(r,"POP",t,function(e){e?v({action:"POP",location:r,index:n}):v()})},T=function(){return C(-1)},S=function(){return C(1)},O=function(e){var t=I.index+e;return t>=0&&t0&&void 0!==arguments[0]&&arguments[0];return y.setPrompt(e)},P=function(e){return y.appendListener(e)},I={length:_.length,action:"POP",location:_[g],index:g,entries:_,createHref:b,push:w,replace:E,go:C,goBack:T,goForward:S,canGo:O,block:N,listen:P};return I};t.default=p},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var o=n(2),i=n.n(o),a=n(5),s=n.n(a),u=n(126),c=n(125),l=Object.assign||function(e){for(var t=1;t outside a "),this.props.when&&this.enable(this.props.message)},t.prototype.componentWillReceiveProps=function(e){e.when?this.props.when&&this.props.message===e.message||this.enable(e.message):this.disable()},t.prototype.componentWillUnmount=function(){this.disable()},t.prototype.render=function(){return null},t}(s.a.Component);f.propTypes={when:c.a.bool,message:c.a.oneOfType([c.a.func,c.a.string]).isRequired},f.defaultProps={when:!0},f.contextTypes={router:c.a.shape({history:c.a.shape({block:c.a.func.isRequired}).isRequired}).isRequired},t.a=f},function(e,t,n){"use strict";var r=n(292);r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),s=n.n(a),u=n(5),c=n.n(u),l=n(4),h=n.n(l),f=n(8),p=n.n(f),d=n(293),y=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.isStatic=function(){return this.context.router&&this.context.router.staticContext},t.prototype.componentWillMount=function(){p()(this.context.router,"You should not use outside a "),this.isStatic()&&this.perform()},t.prototype.componentDidMount=function(){this.isStatic()||this.perform()},t.prototype.componentDidUpdate=function(e){var t=Object(d.a)(e.to),n=Object(d.a)(this.props.to);if(Object(d.b)(t,n))return void h()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"');this.perform()},t.prototype.perform=function(){var e=this.context.router.history,t=this.props,n=t.push,r=t.to;n?e.push(r):e.replace(r)},t.prototype.render=function(){return null},t}(s.a.Component);y.propTypes={push:c.a.bool,from:c.a.string,to:c.a.oneOfType([c.a.string,c.a.object]).isRequired},y.defaultProps={push:!1},y.contextTypes={router:c.a.shape({history:c.a.shape({push:c.a.func.isRequired,replace:c.a.func.isRequired}).isRequired,staticContext:c.a.object}).isRequired},t.a=y},function(e,t,n){"use strict";var r=(n(294),n(295),n(296),n(40));n.d(t,"a",function(){return r.a}),n.d(t,"b",function(){return r.b});n(26)},function(e,t,n){"use strict";var r=n(4),o=(n.n(r),n(8));n.n(o),n(40),n(26),n(65),n(128),"function"===typeof Symbol&&Symbol.iterator,Object.assign},function(e,t,n){"use strict";var r=n(4),o=(n.n(r),n(8)),i=(n.n(o),n(40),n(26));n(65),n(128),Object.assign,i.f,i.a,i.a,i.a},function(e,t,n){"use strict";var r=n(4);n.n(r),n(26),n(40),n(65),"function"===typeof Symbol&&Symbol.iterator,Object.assign},function(e,t,n){"use strict";var r=n(298);r.a},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(4),u=n.n(s),c=n(8),l=n.n(c),h=n(2),f=n.n(h),p=n(5),d=n.n(p),y=n(25),v=(n.n(y),n(63)),m=Object.assign||function(e){for(var t=1;t",e)}},T=function(){},S=function(e){function t(){var n,r,a;o(this,t);for(var s=arguments.length,u=Array(s),c=0;c ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},t.prototype.render=function(){var e=this.props,t=e.basename,n=(e.context,e.location),o=r(e,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:b(t,w(n)),push:this.handlePush,replace:this.handleReplace,go:C("go"),goBack:C("goBack"),goForward:C("goForward"),listen:this.handleListen,block:this.handleBlock};return f.a.createElement(v.a,m({},o,{history:i}))},t}(f.a.Component);S.propTypes={basename:d.a.string,context:d.a.object.isRequired,location:d.a.oneOfType([d.a.string,d.a.object])},S.defaultProps={basename:"",location:"/"},S.childContextTypes={router:d.a.object.isRequired},t.a=S},function(e,t,n){"use strict";var r=n(300);r.a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),s=n.n(a),u=n(5),c=n.n(u),l=n(4),h=n.n(l),f=n(8),p=n.n(f),d=n(64),y=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return i(t,e),t.prototype.componentWillMount=function(){p()(this.context.router,"You should not use outside a ")},t.prototype.componentWillReceiveProps=function(e){h()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),h()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},t.prototype.render=function(){var e=this.context.router.route,t=this.props.children,n=this.props.location||e.location,r=void 0,o=void 0;return s.a.Children.forEach(t,function(t){if(s.a.isValidElement(t)){var i=t.props,a=i.path,u=i.exact,c=i.strict,l=i.sensitive,h=i.from,f=a||h;null==r&&(o=t,r=f?Object(d.a)(n.pathname,{path:f,exact:u,strict:c,sensitive:l}):e.match)}}),r?s.a.cloneElement(o,{location:n,computedMatch:r}):null},t}(s.a.Component);y.contextTypes={router:c.a.shape({route:c.a.object.isRequired}).isRequired},y.propTypes={children:c.a.node,location:c.a.object},t.a=y},function(e,t,n){"use strict";var r=n(64);r.a},function(e,t,n){"use strict";var r=n(303);r.a},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var o=n(2),i=n.n(o),a=n(5),s=n.n(a),u=n(70),c=n.n(u),l=n(127),h=Object.assign||function(e){for(var t=1;t