!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.firebase=e()}(this,function(){"use strict";!function(t){if(!t.fetch){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=function(t){return t&&DataView.prototype.isPrototypeOf(t)},i=ArrayBuffer.isView||function(t){return t&&n.indexOf(Object.prototype.toString.call(t))>-1};h.prototype.append=function(t,e){t=a(t),e=u(e);var n=this.map[t];this.map[t]=n?n+","+e:e},h.prototype.delete=function(t){delete this.map[a(t)]},h.prototype.get=function(t){return t=a(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(a(t))},h.prototype.set=function(t,e){this.map[a(t)]=u(e)},h.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},h.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),c(t)},h.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),c(t)},h.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),c(t)},e.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);var o=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},y.call(m.prototype),y.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},v.error=function(){var t=new v(null,{status:0,statusText:""});return t.type="error",t};var s=[301,302,303,307,308];v.redirect=function(t,e){if(-1===s.indexOf(e))throw new RangeError("Invalid status code");return new v(null,{status:e,headers:{location:t}})},t.Headers=h,t.Request=m,t.Response=v,t.fetch=function(t,n){return new Promise(function(r,i){var o=new m(t,n),s=new XMLHttpRequest;s.onload=function(){var t,e,n={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}}),e)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new v(i,n))},s.onerror=function(){i(new TypeError("Network request failed"))},s.ontimeout=function(){i(new TypeError("Network request failed"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&e.blob&&(s.responseType="blob"),o.headers.forEach(function(t,e){s.setRequestHeader(e,t)}),s.send(void 0===o._bodyInit?null:o._bodyInit)})},t.fetch.polyfill=!0}function a(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function c(t){var n={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(n[Symbol.iterator]=function(){return n}),n}function h(t){this.map={},t instanceof h?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function l(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function p(t){var e=new FileReader,n=f(e);return e.readAsArrayBuffer(t),n}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(e.arrayBuffer&&e.blob&&r(t))this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!e.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!i(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=d(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var t,e,n,r=l(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=f(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r-1?r:n),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function g(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function v(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:void 0);var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=setTimeout;function r(){}function i(t){if(!(this instanceof i))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(t,this)}function o(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,i._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void a(e.promise,t)}s(e.promise,r)}else(1===t._state?s:a)(e.promise,t._value)})):t._deferreds.push(e)}function s(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void u(t);if("function"==typeof n)return void c((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,u(t)}catch(e){a(t,e)}var r,o}function a(t,e){t._state=2,t._value=e,u(t)}function u(t){2===t._state&&0===t._deferreds.length&&i._immediateFn(function(){t._handled||i._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e0?V:B)(t)},j=Math.min,K=function(t){return t>0?j(W(t),9007199254740991):0},Q=Array.isArray||function(t){return"Array"==x(t)},H=l["__core-js_shared__"]||(l["__core-js_shared__"]={}),G=function(t){return H[t]||(H[t]={})},z=e(function(t){var e=G("wks"),n=l.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:R)("Symbol."+t))}).store=e}),Y=z("species"),X=function(t,e){return new(function(t){var e;return Q(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!Q(e.prototype)||(e=void 0),p(e)&&null===(e=e[Y])&&(e=void 0)),void 0===e?Array:e}(t))(e)},J=function(t,e){var n=1==t,r=2==t,i=3==t,o=4==t,s=6==t,a=5==t||s,u=e||X;return function(e,c,h){for(var l,f,p=q(e),d=F(p),y=O(c,h,3),m=K(d.length),g=0,v=n?u(e,m):r?u(e,0):void 0;m>g;g++)if((a||g in d)&&(f=y(l=d[g],g,p),t))if(n)v[g]=f;else if(f)switch(t){case 3:return!0;case 5:return l;case 6:return g;case 2:v.push(l)}else if(o)return!1;return s?-1:i||o?o:v}},$=z("unscopables"),Z=Array.prototype;void 0==Z[$]&&I(Z,$,{});var tt=function(t){Z[$][t]=!0},et=J(5),nt=!0;"find"in[]&&Array(1).find(function(){nt=!1}),L(L.P+L.F*nt,"Array",{find:function(t){return et(this,t,arguments.length>1?arguments[1]:void 0)}}),tt("find");f.Array.find;var rt=J(6),it=!0;"findIndex"in[]&&Array(1).findIndex(function(){it=!1}),L(L.P+L.F*it,"Array",{findIndex:function(t){return rt(this,t,arguments.length>1?arguments[1]:void 0)}}),tt("findIndex");f.Array.findIndex;var ot,st=function(t){return F(U(t))},at=Math.max,ut=Math.min,ct=G("keys"),ht=function(t){return ct[t]||(ct[t]=R(t))},lt=(ot=!1,function(t,e,n){var r,i=st(t),o=K(i.length),s=function(t,e){return(t=W(t))<0?at(t+e,0):ut(t,e)}(n,o);if(ot&&e!=e){for(;o>s;)if((r=i[s++])!=r)return!0}else for(;o>s;s++)if((ot||s in i)&&i[s]===e)return ot||s||0;return!ot&&-1}),ft=ht("IE_PROTO"),pt=function(t,e){var n,r=st(t),i=0,o=[];for(n in r)n!=ft&&N(r,n)&&o.push(n);for(;e.length>i;)N(r,n=e[i++])&&(~lt(o,n)||o.push(n));return o},dt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),yt=Object.keys||function(t){return pt(t,dt)},mt={f:Object.getOwnPropertySymbols},gt={f:{}.propertyIsEnumerable},vt=Object.assign,bt=!vt||y(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=vt({},t)[n]||Object.keys(vt({},e)).join("")!=r})?function(t,e){for(var n=q(t),r=arguments.length,i=1,o=mt.f,s=gt.f;r>i;)for(var a,u=F(arguments[i++]),c=o?yt(u).concat(o(u)):yt(u),h=c.length,l=0;h>l;)s.call(u,a=c[l++])&&(n[a]=u[a]);return n}:vt;L(L.S+L.F,"Object",{assign:bt});f.Object.assign;var _t=z("match"),wt=function(t,e,n){if(p(r=e)&&(void 0!==(i=r[_t])?i:"RegExp"==x(r)))throw TypeError("String#"+n+" doesn't accept regex!");var r,i;return String(U(t))},Et=z("match"),Tt="".startsWith;L(L.P+L.F*function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[Et]=!1,!"/./"[t](e)}catch(t){}}return!0}("startsWith"),"String",{startsWith:function(t){var e=wt(this,t,"startsWith"),n=K(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return Tt?Tt.call(e,r,n):e.slice(n,n+r.length)===r}});f.String.startsWith;L(L.P,"String",{repeat:function(t){var e=String(U(this)),n="",r=W(t);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n}});f.String.repeat;var St=e(function(t){var e=R("meta"),n=T.f,r=0,i=Object.isExtensible||function(){return!0},o=!y(function(){return i(Object.preventExtensions({}))}),s=function(t){n(t,e,{value:{i:"O"+ ++r,w:{}}})},a=t.exports={KEY:e,NEED:!1,fastKey:function(t,n){if(!p(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!N(t,e)){if(!i(t))return"F";if(!n)return"E";s(t)}return t[e].i},getWeak:function(t,n){if(!N(t,e)){if(!i(t))return!0;if(!n)return!1;s(t)}return t[e].w},onFreeze:function(t){return o&&a.NEED&&i(t)&&!N(t,e)&&s(t),t}}}),It=(St.KEY,St.NEED,St.fastKey,St.getWeak,St.onFreeze,T.f),Ct=z("toStringTag"),Nt=function(t,e,n){t&&!N(t=n?t:t.prototype,Ct)&&It(t,Ct,{configurable:!0,value:e})},Dt={f:z},At=T.f,Rt=function(t){var e=f.Symbol||(f.Symbol=l.Symbol||{});"_"==t.charAt(0)||t in e||At(e,t,{value:Dt.f(t)})},kt=m?Object.defineProperties:function(t,e){d(t);for(var n,r=yt(e),i=r.length,o=0;i>o;)T.f(t,n=r[o++],e[n]);return t},Ot=l.document,Pt=Ot&&Ot.documentElement,Lt=ht("IE_PROTO"),Mt=function(){},xt=function(){var t,e=b("iframe"),n=dt.length;for(e.style.display="none",Pt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("