暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

firebase-auth-react-native.js 146KB

123
  1. import e from"react-native";import t from"https://www.gstatic.com/firebasejs/9.16.0/firebase-app.js";function n(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}var r={},i={},o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)};var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};var s=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function u(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function d(e){return this instanceof d?(this.v=e,this):new d(e)}var l=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};var h=n(Object.freeze({__proto__:null,__extends:function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},get __assign(){return a},__rest:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},__decorate:function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},__param:function(e,t){return function(n,r){t(n,r,e)}},__metadata:function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},__generator:function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},__createBinding:s,__exportStar:function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)},__values:u,__read:c,__spread:function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e},__spreadArrays:function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},__spreadArray:function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},__await:d,__asyncGenerator:function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof d?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}},__asyncDelegator:function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:d(e[r](t)),done:"return"===r}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=u(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return l(t,e),t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet:function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},__classPrivateFieldSet:function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}}));const f={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},p=function(e,t){if(!e)throw _(t)},_=function(e){return new Error("Firebase Database ("+f.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},v=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},m={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(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t<e.length;t+=3){const i=e[t],o=t+1<e.length,a=o?e[t+1]:0,s=t+2<e.length,u=s?e[t+2]:0,c=i>>2,d=(3&i)<<4|a>>4;let l=(15&a)<<2|u>>6,h=63&u;s||(h=64,o||(l=64)),r.push(n[c],n[d],n[l],n[h])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(v(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){const o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){const o=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{const o=e[n++],a=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&a)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t<e.length;){const i=n[e.charAt(t++)],o=t<e.length?n[e.charAt(t)]:0;++t;const a=t<e.length?n[e.charAt(t)]:64;++t;const s=t<e.length?n[e.charAt(t)]:64;if(++t,null==i||null==o||null==a||null==s)throw Error();const u=i<<2|o>>4;if(r.push(u),64!==a){const e=o<<4&240|a>>2;if(r.push(e),64!==s){const e=a<<6&192|s;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},g=function(e){const t=v(e);return m.encodeByteArray(t,!0)},I=function(e){return g(e).replace(/\./g,"")},y=function(e){try{return m.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function b(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(const n in t)t.hasOwnProperty(n)&&"__proto__"!==n&&(e[n]=b(e[n],t[n]));return e}function T(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}const E=()=>{try{return T().__FIREBASE_DEFAULTS__||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e=process.env.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}const t=e&&y(e[1]);return t&&JSON.parse(t)})()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}},A=e=>{var t,n;return null===(n=null===(t=E())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]};class w{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,n))}}}function O(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function S(){var e;const t=null===(e=E())||void 0===e?void 0:e.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(global.process)}catch(e){return!1}}class k extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,k.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,N.prototype.create)}}class N{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],o=i?function(e,t){return e.replace(R,((e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`}))}(i,n):"Error",a=`${this.serviceName}: ${o} (${r}).`;return new k(r,a,n)}}const R=/\{\$([^}]+)}/g;function P(e){return JSON.parse(e)}const C=function(e){let t={},n={},r={},i="";try{const o=e.split(".");t=P(y(o[0])||""),n=P(y(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(e){}return{header:t,claims:n,data:r,signature:i}};function D(e){return null!==e&&"object"==typeof e}class L{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((()=>{e(this)})).catch((e=>{this.error(e)}))}next(e){this.forEachObserver((t=>{t.next(e)}))}error(e){this.forEachObserver((t=>{t.error(e)})),this.close(e)}complete(){this.forEachObserver((e=>{e.complete()})),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=function(e,t){if("object"!=typeof e||null===e)return!1;for(const n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=M),void 0===r.error&&(r.error=M),void 0===r.complete&&(r.complete=M);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}})),this.observers.push(r),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then((()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}}))}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((()=>{this.observers=void 0,this.onNoObservers=void 0})))}}function M(){}function U(e,t){return`${e} failed: ${t} argument `}var F=Object.freeze({__proto__:null,CONSTANTS:f,Deferred:w,ErrorFactory:N,FirebaseError:k,MAX_VALUE_MILLIS:144e5,RANDOM_FACTOR:.5,Sha1:class{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(let e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}reset(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0}compress_(e,t){t||(t=0);const n=this.W_;if("string"==typeof e)for(let r=0;r<16;r++)n[r]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(let r=0;r<16;r++)n[r]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(let e=16;e<80;e++){const t=n[e-3]^n[e-8]^n[e-14]^n[e-16];n[e]=4294967295&(t<<1|t>>>31)}let r,i,o=this.chain_[0],a=this.chain_[1],s=this.chain_[2],u=this.chain_[3],c=this.chain_[4];for(let e=0;e<80;e++){e<40?e<20?(r=u^a&(s^u),i=1518500249):(r=a^s^u,i=1859775393):e<60?(r=a&s|u&(a|s),i=2400959708):(r=a^s^u,i=3395469782);const t=(o<<5|o>>>27)+r+c+i+n[e]&4294967295;c=u,u=s,s=4294967295&(a<<30|a>>>2),a=o,o=t}this.chain_[0]=this.chain_[0]+o&4294967295,this.chain_[1]=this.chain_[1]+a&4294967295,this.chain_[2]=this.chain_[2]+s&4294967295,this.chain_[3]=this.chain_[3]+u&4294967295,this.chain_[4]=this.chain_[4]+c&4294967295}update(e,t){if(null==e)return;void 0===t&&(t=e.length);const n=t-this.blockSize;let r=0;const i=this.buf_;let o=this.inbuf_;for(;r<t;){if(0===o)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"==typeof e){for(;r<t;)if(i[o]=e.charCodeAt(r),++o,++r,o===this.blockSize){this.compress_(i),o=0;break}}else for(;r<t;)if(i[o]=e[r],++o,++r,o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=t}digest(){const e=[];let t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(let e=this.blockSize-1;e>=56;e--)this.buf_[e]=255&t,t/=256;this.compress_(this.buf_);let n=0;for(let t=0;t<5;t++)for(let r=24;r>=0;r-=8)e[n]=this.chain_[t]>>r&255,++n;return e}},areCookiesEnabled:function(){return!("undefined"==typeof navigator||!navigator.cookieEnabled)},assert:p,assertionError:_,async:function(e,t){return(...n)=>{Promise.resolve(!0).then((()=>{e(...n)})).catch((e=>{t&&t(e)}))}},base64:m,base64Decode:y,base64Encode:g,base64urlEncodeWithoutPadding:I,calculateBackoffMillis:function(e,t=1e3,n=2){const r=t*Math.pow(n,e),i=Math.round(.5*r*(Math.random()-.5)*2);return Math.min(144e5,r+i)},contains:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},createMockUserToken:function(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[I(JSON.stringify({alg:"none",type:"JWT"})),I(JSON.stringify(o)),""].join(".")},createSubscribe:function(e,t){const n=new L(e,t);return n.subscribe.bind(n)},decode:C,deepCopy:function(e){return b(void 0,e)},deepEqual:function e(t,n){if(t===n)return!0;const r=Object.keys(t),i=Object.keys(n);for(const o of r){if(!i.includes(o))return!1;const r=t[o],a=n[o];if(D(r)&&D(a)){if(!e(r,a))return!1}else if(r!==a)return!1}for(const e of i)if(!r.includes(e))return!1;return!0},deepExtend:b,errorPrefix:U,extractQuerystring:function(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)},getDefaultAppConfig:()=>{var e;return null===(e=E())||void 0===e?void 0:e.config},getDefaultEmulatorHost:A,getDefaultEmulatorHostnameAndPort:e=>{const t=A(e);if(!t)return;const n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]},getDefaults:E,getExperimentalSetting:e=>{var t;return null===(t=E())||void 0===t?void 0:t[`_${e}`]},getGlobal:T,getModularInstance:function(e){return e&&e._delegate?e._delegate:e},getUA:O,isAdmin:function(e){const t=C(e).claims;return"object"==typeof t&&!0===t.admin},isBrowser:function(){return"object"==typeof self&&self.self===self},isBrowserExtension:function(){const e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id},isElectron:function(){return O().indexOf("Electron/")>=0},isEmpty:function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},isIE:function(){const e=O();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0},isIndexedDBAvailable:function(){try{return"object"==typeof indexedDB}catch(e){return!1}},isMobileCordova:function(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(O())},isNode:S,isNodeSdk:function(){return!0===f.NODE_CLIENT||!0===f.NODE_ADMIN},isReactNative:function(){return"object"==typeof navigator&&"ReactNative"===navigator.product},isSafari:function(){return!S()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")},isUWP:function(){return O().indexOf("MSAppHost/")>=0},isValidFormat:function(e){const t=C(e).claims;return!!t&&"object"==typeof t&&t.hasOwnProperty("iat")},isValidTimestamp:function(e){const t=C(e).claims,n=Math.floor((new Date).getTime()/1e3);let r=0,i=0;return"object"==typeof t&&(t.hasOwnProperty("nbf")?r=t.nbf:t.hasOwnProperty("iat")&&(r=t.iat),i=t.hasOwnProperty("exp")?t.exp:r+86400),!!n&&!!r&&!!i&&n>=r&&n<=i},issuedAtTime:function(e){const t=C(e).claims;return"object"==typeof t&&t.hasOwnProperty("iat")?t.iat:null},jsonEval:P,map:function(e,t,n){const r={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r},ordinal:function(e){return Number.isFinite(e)?e+function(e){const t=(e=Math.abs(e))%100;if(t>=10&&t<=20)return"th";const n=e%10;if(1===n)return"st";if(2===n)return"nd";if(3===n)return"rd";return"th"}(e):`${e}`},promiseWithTimeout:function(e,t=2e3){const n=new w;return setTimeout((()=>n.reject("timeout!")),t),e.then(n.resolve,n.reject),n.promise},querystring:function(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""},querystringDecode:function(e){const t={};return e.replace(/^\?/,"").split("&").forEach((e=>{if(e){const[n,r]=e.split("=");t[decodeURIComponent(n)]=decodeURIComponent(r)}})),t},safeGet:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0},stringLength:function(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t},stringToByteArray:function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i>=55296&&i<=56319){const t=i-55296;r++,p(r<e.length,"Surrogate pair missing trail surrogate.");i=65536+(t<<10)+(e.charCodeAt(r)-56320)}i<128?t[n++]=i:i<2048?(t[n++]=i>>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},stringify:function(e){return JSON.stringify(e)},uuidv4:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},validateArgCount:function(e,t,n,r){let i;if(r<t?i="at least "+t:r>n&&(i=0===n?"none":"no more than "+n),i){throw new Error(e+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")}},validateCallback:function(e,t,n,r){if((!r||n)&&"function"!=typeof n)throw new Error(U(e,t)+"must be a valid function.")},validateContextObject:function(e,t,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw new Error(U(e,t)+"must be a valid context object.")},validateIndexedDBOpenable:function(){return new Promise(((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}}))},validateNamespace:function(e,t,n){if((!n||t)&&"string"!=typeof t)throw new Error(U(e,"namespace")+"must be a valid firebase namespace.")}}),x=n(F),V={};Object.defineProperty(V,"__esModule",{value:!0});var j=h,z=x,W=function(){function e(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},e}(),H=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}return e.prototype.get=function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new z.Deferred;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t,n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error("Service ".concat(this.name," is not available"))}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(e){var t,n;if(e.name!==this.name)throw Error("Mismatching Component ".concat(e.name," for Provider ").concat(this.name,"."));if(this.component)throw Error("Component for ".concat(this.name," has already been provided"));if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:"[DEFAULT]"})}catch(e){}try{for(var r=j.__values(this.instancesDeferred.entries()),i=r.next();!i.done;i=r.next()){var o=j.__read(i.value,2),a=o[0],s=o[1],u=this.normalizeInstanceIdentifier(a);try{var c=this.getOrInitializeService({instanceIdentifier:u});s.resolve(c)}catch(e){}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}},e.prototype.clearInstance=function(e){void 0===e&&(e="[DEFAULT]"),this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return j.__awaiter(this,void 0,void 0,(function(){var e;return j.__generator(this,(function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(j.__spreadArray(j.__spreadArray([],j.__read(e.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()}))),!1),j.__read(e.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()}))),!1))];case 1:return t.sent(),[2]}}))}))},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.isInitialized=function(e){return void 0===e&&(e="[DEFAULT]"),this.instances.has(e)},e.prototype.getOptions=function(e){return void 0===e&&(e="[DEFAULT]"),this.instancesOptions.get(e)||{}},e.prototype.initialize=function(e){var t,n;void 0===e&&(e={});var r=e.options,i=void 0===r?{}:r,o=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(o))throw Error("".concat(this.name,"(").concat(o,") has already been initialized"));if(!this.isComponentSet())throw Error("Component ".concat(this.name," has not been registered yet"));var a=this.getOrInitializeService({instanceIdentifier:o,options:i});try{for(var s=j.__values(this.instancesDeferred.entries()),u=s.next();!u.done;u=s.next()){var c=j.__read(u.value,2),d=c[0],l=c[1];o===this.normalizeInstanceIdentifier(d)&&l.resolve(a)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a},e.prototype.onInit=function(e,t){var n,r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);var o=this.instances.get(r);return o&&e(o,r),function(){i.delete(e)}},e.prototype.invokeOnInitCallbacks=function(e,t){var n,r,i=this.onInitCallbacks.get(t);if(i)try{for(var o=j.__values(i),a=o.next();!a.done;a=o.next()){var s=a.value;try{s(e,t)}catch(e){}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.getOrInitializeService=function(e){var t,n=e.instanceIdentifier,r=e.options,i=void 0===r?{}:r,o=this.instances.get(n);if(!o&&this.component&&(o=this.component.instanceFactory(this.container,{instanceIdentifier:(t=n,"[DEFAULT]"===t?void 0:t),options:i}),this.instances.set(n,o),this.instancesOptions.set(n,i),this.invokeOnInitCallbacks(o,n),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,o)}catch(e){}return o||null},e.prototype.normalizeInstanceIdentifier=function(e){return void 0===e&&(e="[DEFAULT]"),this.component?this.component.multipleInstances?e:"[DEFAULT]":e},e.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},e}();var G=function(){function e(e){this.name=e,this.providers=new Map}return e.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component ".concat(e.name," has already been registered with ").concat(this.name));t.setComponent(e)},e.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new H(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())},e}();V.Component=W,V.ComponentContainer=G,V.Provider=H;var B={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t,n,r=h,i=[];e.LogLevel=void 0,(n=e.LogLevel||(e.LogLevel={}))[n.DEBUG=0]="DEBUG",n[n.VERBOSE=1]="VERBOSE",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.SILENT=5]="SILENT";var o={debug:e.LogLevel.DEBUG,verbose:e.LogLevel.VERBOSE,info:e.LogLevel.INFO,warn:e.LogLevel.WARN,error:e.LogLevel.ERROR,silent:e.LogLevel.SILENT},a=e.LogLevel.INFO,s=((t={})[e.LogLevel.DEBUG]="log",t[e.LogLevel.VERBOSE]="log",t[e.LogLevel.INFO]="info",t[e.LogLevel.WARN]="warn",t[e.LogLevel.ERROR]="error",t),u=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!(t<e.logLevel)){var o=(new Date).toISOString(),a=s[t];if(!a)throw new Error("Attempted to log a message with an invalid logType (value: ".concat(t,")"));console[a].apply(console,r.__spreadArray(["[".concat(o,"] ").concat(e.name,":")],n,!1))}},c=function(){function t(e){this.name=e,this._logLevel=a,this._logHandler=u,this._userLogHandler=null,i.push(this)}return Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in e.LogLevel))throw new TypeError('Invalid value "'.concat(t,'" assigned to `logLevel`'));this._logLevel=t},enumerable:!1,configurable:!0}),t.prototype.setLogLevel=function(e){this._logLevel="string"==typeof e?o[e]:e},Object.defineProperty(t.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,configurable:!0}),t.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,r.__spreadArray([this,e.LogLevel.DEBUG],t,!1)),this._logHandler.apply(this,r.__spreadArray([this,e.LogLevel.DEBUG],t,!1))},t.prototype.log=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,r.__spreadArray([this,e.LogLevel.VERBOSE],t,!1)),this._logHandler.apply(this,r.__spreadArray([this,e.LogLevel.VERBOSE],t,!1))},t.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,r.__spreadArray([this,e.LogLevel.INFO],t,!1)),this._logHandler.apply(this,r.__spreadArray([this,e.LogLevel.INFO],t,!1))},t.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,r.__spreadArray([this,e.LogLevel.WARN],t,!1)),this._logHandler.apply(this,r.__spreadArray([this,e.LogLevel.WARN],t,!1))},t.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,r.__spreadArray([this,e.LogLevel.ERROR],t,!1)),this._logHandler.apply(this,r.__spreadArray([this,e.LogLevel.ERROR],t,!1))},t}();e.Logger=c,e.setLogLevel=function(e){i.forEach((function(t){t.setLogLevel(e)}))},e.setUserLogHandler=function(t,n){for(var r=function(r){var i=null;n&&n.level&&(i=o[n.level]),r.userLogHandler=null===t?null:function(n,r){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];var s=o.map((function(e){if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}})).filter((function(e){return e})).join(" ");r>=(null!=i?i:n.logLevel)&&t({level:e.LogLevel[r].toLowerCase(),message:s,args:o,type:n.name})}},a=0,s=i;a<s.length;a++){r(s[a])}}}(B);var q=h,K=x,J=t,Y=V,X=B;function $(){var e;return(e={})["dependent-sdk-initialized-before-auth"]="Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK.",e}var Q=function(){var e;return(e={})["admin-restricted-operation"]="This operation is restricted to administrators only.",e["argument-error"]="",e["app-not-authorized"]="This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.",e["app-not-installed"]="The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.",e["captcha-check-failed"]="The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.",e["code-expired"]="The SMS code has expired. Please re-send the verification code to try again.",e["cordova-not-ready"]="Cordova framework is not ready.",e["cors-unsupported"]="This browser is not supported.",e["credential-already-in-use"]="This credential is already associated with a different user account.",e["custom-token-mismatch"]="The custom token corresponds to a different audience.",e["requires-recent-login"]="This operation is sensitive and requires recent authentication. Log in again before retrying this request.",e["dependent-sdk-initialized-before-auth"]="Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK.",e["dynamic-link-not-activated"]="Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.",e["email-change-needs-verification"]="Multi-factor users must always have a verified email.",e["email-already-in-use"]="The email address is already in use by another account.",e["emulator-config-failed"]='Auth instance has already been used to make a network call. Auth can no longer be configured to use the emulator. Try calling "connectAuthEmulator()" sooner.',e["expired-action-code"]="The action code has expired.",e["cancelled-popup-request"]="This operation has been cancelled due to another conflicting popup being opened.",e["internal-error"]="An internal AuthError has occurred.",e["invalid-app-credential"]="The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.",e["invalid-app-id"]="The mobile app identifier is not registed for the current project.",e["invalid-user-token"]="This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.",e["invalid-auth-event"]="An internal AuthError has occurred.",e["invalid-verification-code"]="The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure to use the verification code provided by the user.",e["invalid-continue-uri"]="The continue URL provided in the request is invalid.",e["invalid-cordova-configuration"]="The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.",e["invalid-custom-token"]="The custom token format is incorrect. Please check the documentation.",e["invalid-dynamic-link-domain"]="The provided dynamic link domain is not configured or authorized for the current project.",e["invalid-email"]="The email address is badly formatted.",e["invalid-emulator-scheme"]="Emulator URL must start with a valid scheme (http:// or https://).",e["invalid-api-key"]="Your API key is invalid, please check you have copied it correctly.",e["invalid-cert-hash"]="The SHA-1 certificate hash provided is invalid.",e["invalid-credential"]="The supplied auth credential is malformed or has expired.",e["invalid-message-payload"]="The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.",e["invalid-multi-factor-session"]="The request does not contain a valid proof of first factor successful sign-in.",e["invalid-oauth-provider"]="EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.",e["invalid-oauth-client-id"]="The OAuth client ID provided is either invalid or does not match the specified API key.",e["unauthorized-domain"]="This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.",e["invalid-action-code"]="The action code is invalid. This can happen if the code is malformed, expired, or has already been used.",e["wrong-password"]="The password is invalid or the user does not have a password.",e["invalid-persistence-type"]="The specified persistence type is invalid. It can only be local, session or none.",e["invalid-phone-number"]="The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].",e["invalid-provider-id"]="The specified provider ID is invalid.",e["invalid-recipient-email"]="The email corresponding to this action failed to send as the provided recipient email address is invalid.",e["invalid-sender"]="The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.",e["invalid-verification-id"]="The verification ID used to create the phone auth credential is invalid.",e["invalid-tenant-id"]="The Auth instance's tenant ID is invalid.",e["login-blocked"]="Login blocked by user-provided method: {$originalMessage}",e["missing-android-pkg-name"]="An Android Package Name must be provided if the Android App is required to be installed.",e["auth-domain-config-required"]="Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.",e["missing-app-credential"]="The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.",e["missing-verification-code"]="The phone auth credential was created with an empty SMS verification code.",e["missing-continue-uri"]="A continue URL must be provided in the request.",e["missing-iframe-start"]="An internal AuthError has occurred.",e["missing-ios-bundle-id"]="An iOS Bundle ID must be provided if an App Store ID is provided.",e["missing-or-invalid-nonce"]="The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.",e["missing-multi-factor-info"]="No second factor identifier is provided.",e["missing-multi-factor-session"]="The request is missing proof of first factor successful sign-in.",e["missing-phone-number"]="To send verification codes, provide a phone number for the recipient.",e["missing-verification-id"]="The phone auth credential was created with an empty verification ID.",e["app-deleted"]="This instance of FirebaseApp has been deleted.",e["multi-factor-info-not-found"]="The user does not have a second factor matching the identifier provided.",e["multi-factor-auth-required"]="Proof of ownership of a second factor is required to complete sign-in.",e["account-exists-with-different-credential"]="An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.",e["network-request-failed"]="A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred.",e["no-auth-event"]="An internal AuthError has occurred.",e["no-such-provider"]="User was not linked to an account with the given provider.",e["null-user"]="A null user object was provided as the argument for an operation which requires a non-null user object.",e["operation-not-allowed"]="The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.",e["operation-not-supported-in-this-environment"]='This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',e["popup-blocked"]="Unable to establish a connection with the popup. It may have been blocked by the browser.",e["popup-closed-by-user"]="The popup has been closed by the user before finalizing the operation.",e["provider-already-linked"]="User can only be linked to one identity for the given provider.",e["quota-exceeded"]="The project's quota for this operation has been exceeded.",e["redirect-cancelled-by-user"]="The redirect operation has been cancelled by the user before finalizing.",e["redirect-operation-pending"]="A redirect sign-in operation is already pending.",e["rejected-credential"]="The request contains malformed or mismatching credentials.",e["second-factor-already-in-use"]="The second factor is already enrolled on this account.",e["maximum-second-factor-count-exceeded"]="The maximum allowed number of second factors on a user has been exceeded.",e["tenant-id-mismatch"]="The provided tenant ID does not match the Auth instance's tenant ID",e.timeout="The operation has timed out.",e["user-token-expired"]="The user's credential is no longer valid. The user must sign in again.",e["too-many-requests"]="We have blocked all requests from this device due to unusual activity. Try again later.",e["unauthorized-continue-uri"]="The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.",e["unsupported-first-factor"]="Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.",e["unsupported-persistence-type"]="The current environment does not support the specified persistence type.",e["unsupported-tenant-operation"]="This operation is not supported in a multi-tenant context.",e["unverified-email"]="The operation requires a verified email.",e["user-cancelled"]="The user did not grant your application the permissions it requested.",e["user-not-found"]="There is no user record corresponding to this identifier. The user may have been deleted.",e["user-disabled"]="The user account has been disabled by an administrator.",e["user-mismatch"]="The supplied credentials do not correspond to the previously signed in user.",e["user-signed-out"]="",e["weak-password"]="The password must be 6 characters long or more.",e["web-storage-unsupported"]="This browser is not supported or 3rd party cookies and data may be disabled.",e["already-initialized"]="initializeAuth() has already been called with different options. To avoid this error, call initializeAuth() with the same options as when it was originally called, or call getAuth() to return the already initialized instance.",e},Z=$,ee=new K.ErrorFactory("auth","Firebase",$()),te=new X.Logger("@firebase/auth");function ne(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];te.logLevel<=X.LogLevel.ERROR&&te.error.apply(te,q.__spreadArray(["Auth (".concat(J.SDK_VERSION,"): ").concat(e)],t,!1))}function re(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];throw ae.apply(void 0,q.__spreadArray([e],t,!1))}function ie(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return ae.apply(void 0,q.__spreadArray([e],t,!1))}function oe(e,t,n){var r,i=q.__assign(q.__assign({},Z()),((r={})[t]=n,r));return new K.ErrorFactory("auth","Firebase",i).create(t,{appName:e.name})}function ae(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if("string"!=typeof e){var i=n[0],o=q.__spreadArray([],n.slice(1),!0);return o[0]&&(o[0].appName=e.name),(t=e._errorFactory).create.apply(t,q.__spreadArray([i],o,!1))}return ee.create.apply(ee,q.__spreadArray([e],n,!1))}function se(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!e)throw ae.apply(void 0,q.__spreadArray([t],n,!1))}function ue(e){var t="INTERNAL ASSERTION FAILED: "+e;throw ne(t),new Error(t)}function ce(e,t){e||ue(t)}var de=new Map;function le(e){ce(e instanceof Function,"Expected a class definition");var t=de.get(e);return t?(ce(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,de.set(e,t),t)}function he(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function fe(){return"http:"===pe()||"https:"===pe()}function pe(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}var _e=function(){function e(e,t){this.shortDelay=e,this.longDelay=t,ce(t>e,"Short delay should be less than long delay!"),this.isMobile=K.isMobileCordova()||K.isReactNative()}return e.prototype.get=function(){return"undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&(fe()||K.isBrowserExtension()||"connection"in navigator)&&!navigator.onLine?Math.min(5e3,this.shortDelay):this.isMobile?this.longDelay:this.shortDelay},e}();function ve(e,t){ce(e.emulator,"Emulator should always be set here");var n=e.emulator.url;return t?"".concat(n).concat(t.startsWith("/")?t.slice(1):t):n}var me,ge=function(){function e(){}return e.initialize=function(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)},e.fetch=function(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:void ue("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")},e.headers=function(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:void ue("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")},e.response=function(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:void ue("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")},e}(),Ie=((me={}).CREDENTIAL_MISMATCH="custom-token-mismatch",me.MISSING_CUSTOM_TOKEN="internal-error",me.INVALID_IDENTIFIER="invalid-email",me.MISSING_CONTINUE_URI="internal-error",me.INVALID_PASSWORD="wrong-password",me.MISSING_PASSWORD="internal-error",me.EMAIL_EXISTS="email-already-in-use",me.PASSWORD_LOGIN_DISABLED="operation-not-allowed",me.INVALID_IDP_RESPONSE="invalid-credential",me.INVALID_PENDING_TOKEN="invalid-credential",me.FEDERATED_USER_ID_ALREADY_LINKED="credential-already-in-use",me.MISSING_REQ_TYPE="internal-error",me.EMAIL_NOT_FOUND="user-not-found",me.RESET_PASSWORD_EXCEED_LIMIT="too-many-requests",me.EXPIRED_OOB_CODE="expired-action-code",me.INVALID_OOB_CODE="invalid-action-code",me.MISSING_OOB_CODE="internal-error",me.CREDENTIAL_TOO_OLD_LOGIN_AGAIN="requires-recent-login",me.INVALID_ID_TOKEN="invalid-user-token",me.TOKEN_EXPIRED="user-token-expired",me.USER_NOT_FOUND="user-token-expired",me.TOO_MANY_ATTEMPTS_TRY_LATER="too-many-requests",me.INVALID_CODE="invalid-verification-code",me.INVALID_SESSION_INFO="invalid-verification-id",me.INVALID_TEMPORARY_PROOF="invalid-credential",me.MISSING_SESSION_INFO="missing-verification-id",me.SESSION_EXPIRED="code-expired",me.MISSING_ANDROID_PACKAGE_NAME="missing-android-pkg-name",me.UNAUTHORIZED_DOMAIN="unauthorized-continue-uri",me.INVALID_OAUTH_CLIENT_ID="invalid-oauth-client-id",me.ADMIN_ONLY_OPERATION="admin-restricted-operation",me.INVALID_MFA_PENDING_CREDENTIAL="invalid-multi-factor-session",me.MFA_ENROLLMENT_NOT_FOUND="multi-factor-info-not-found",me.MISSING_MFA_ENROLLMENT_ID="missing-multi-factor-info",me.MISSING_MFA_PENDING_CREDENTIAL="missing-multi-factor-session",me.SECOND_FACTOR_EXISTS="second-factor-already-in-use",me.SECOND_FACTOR_LIMIT_EXCEEDED="maximum-second-factor-count-exceeded",me.BLOCKING_FUNCTION_ERROR_RESPONSE="internal-error",me),ye=new _e(3e4,6e4);function be(e,t){return e.tenantId&&!t.tenantId?q.__assign(q.__assign({},t),{tenantId:e.tenantId}):t}function Te(e,t,n,r,i){return void 0===i&&(i={}),q.__awaiter(this,void 0,void 0,(function(){var o=this;return q.__generator(this,(function(a){return[2,Ee(e,i,(function(){return q.__awaiter(o,void 0,void 0,(function(){var i,o,a,s;return q.__generator(this,(function(u){switch(u.label){case 0:return i={},o={},r&&("GET"===t?o=r:i={body:JSON.stringify(r)}),a=K.querystring(q.__assign({key:e.config.apiKey},o)).slice(1),[4,e._getAdditionalHeaders()];case 1:return(s=u.sent())["Content-Type"]="application/json",e.languageCode&&(s["X-Firebase-Locale"]=e.languageCode),[2,ge.fetch()(we(e,e.config.apiHost,n,a),q.__assign({method:t,headers:s,referrerPolicy:"no-referrer"},i))]}}))}))}))]}))}))}function Ee(e,t,n){return q.__awaiter(this,void 0,void 0,(function(){var r,i,o,a,s,u,c,d,l,h;return q.__generator(this,(function(f){switch(f.label){case 0:e._canInitEmulator=!1,r=q.__assign(q.__assign({},Ie),t),f.label=1;case 1:return f.trys.push([1,4,,5]),i=new Oe(e),[4,Promise.race([n(),i.promise])];case 2:return o=f.sent(),i.clearNetworkTimeout(),[4,o.json()];case 3:if("needConfirmation"in(a=f.sent()))throw Se(e,"account-exists-with-different-credential",a);if(o.ok&&!("errorMessage"in a))return[2,a];if(s=o.ok?a.errorMessage:a.error.message,u=s.split(" : "),c=u[0],d=u[1],"FEDERATED_USER_ID_ALREADY_LINKED"===c)throw Se(e,"credential-already-in-use",a);if("EMAIL_EXISTS"===c)throw Se(e,"email-already-in-use",a);if("USER_DISABLED"===c)throw Se(e,"user-disabled",a);if(l=r[c]||c.toLowerCase().replace(/[_\s]+/g,"-"),d)throw oe(e,l,d);return re(e,l),[3,5];case 4:if((h=f.sent())instanceof K.FirebaseError)throw h;return re(e,"network-request-failed"),[3,5];case 5:return[2]}}))}))}function Ae(e,t,n,r,i){return void 0===i&&(i={}),q.__awaiter(this,void 0,void 0,(function(){var o;return q.__generator(this,(function(a){switch(a.label){case 0:return[4,Te(e,t,n,r,i)];case 1:return"mfaPendingCredential"in(o=a.sent())&&re(e,"multi-factor-auth-required",{_serverResponse:o}),[2,o]}}))}))}function we(e,t,n,r){var i="".concat(t).concat(n,"?").concat(r);return e.config.emulator?ve(e.config,i):"".concat(e.config.apiScheme,"://").concat(i)}var Oe=function(){function e(e){var t=this;this.auth=e,this.timer=null,this.promise=new Promise((function(e,n){t.timer=setTimeout((function(){return n(ie(t.auth,"network-request-failed"))}),ye.get())}))}return e.prototype.clearNetworkTimeout=function(){clearTimeout(this.timer)},e}();function Se(e,t,n){var r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);var i=ie(e,t,r);return i.customData._tokenResponse=n,i}function ke(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Te(e,"POST","/v1/accounts:delete",t)]}))}))}function Ne(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Te(e,"POST","/v1/accounts:update",t)]}))}))}function Re(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Te(e,"POST","/v1/accounts:lookup",t)]}))}))}function Pe(e){if(e)try{var t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}function Ce(e,t){return void 0===t&&(t=!1),q.__awaiter(this,void 0,void 0,(function(){var n,r,i,o,a;return q.__generator(this,(function(s){switch(s.label){case 0:return[4,(n=K.getModularInstance(e)).getIdToken(t)];case 1:return r=s.sent(),se((i=Le(r))&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error"),o="object"==typeof i.firebase?i.firebase:void 0,a=null==o?void 0:o.sign_in_provider,[2,{claims:i,token:r,authTime:Pe(De(i.auth_time)),issuedAtTime:Pe(De(i.iat)),expirationTime:Pe(De(i.exp)),signInProvider:a||null,signInSecondFactor:(null==o?void 0:o.sign_in_second_factor)||null}]}}))}))}function De(e){return 1e3*Number(e)}function Le(e){var t=e.split("."),n=t[0],r=t[1],i=t[2];if(void 0===n||void 0===r||void 0===i)return ne("JWT malformed, contained fewer than 3 sections"),null;try{var o=K.base64Decode(r);return o?JSON.parse(o):(ne("Failed to decode base64 JWT payload"),null)}catch(e){return ne("Caught error parsing JWT payload as JSON",null==e?void 0:e.toString()),null}}function Me(e,t,n){return void 0===n&&(n=!1),q.__awaiter(this,void 0,void 0,(function(){var r;return q.__generator(this,(function(i){switch(i.label){case 0:if(n)return[2,t];i.label=1;case 1:return i.trys.push([1,3,,6]),[4,t];case 2:return[2,i.sent()];case 3:return(r=i.sent())instanceof K.FirebaseError&&function(e){var t=e.code;return t==="auth/".concat("user-disabled")||t==="auth/".concat("user-token-expired")}(r)?e.auth.currentUser!==e?[3,5]:[4,e.auth.signOut()]:[3,5];case 4:i.sent(),i.label=5;case 5:throw r;case 6:return[2]}}))}))}var Ue=function(){function e(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}return e.prototype._start=function(){this.isRunning||(this.isRunning=!0,this.schedule())},e.prototype._stop=function(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))},e.prototype.getInterval=function(e){var t;if(e){var n=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),n}this.errorBackoff=3e4;n=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,n)},e.prototype.schedule=function(e){var t=this;if(void 0===e&&(e=!1),this.isRunning){var n=this.getInterval(e);this.timerId=setTimeout((function(){return q.__awaiter(t,void 0,void 0,(function(){return q.__generator(this,(function(e){switch(e.label){case 0:return[4,this.iteration()];case 1:return e.sent(),[2]}}))}))}),n)}},e.prototype.iteration=function(){return q.__awaiter(this,void 0,void 0,(function(){var e;return q.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.user.getIdToken(!0)];case 1:return t.sent(),[3,3];case 2:return(null==(e=t.sent())?void 0:e.code)==="auth/".concat("network-request-failed")&&this.schedule(!0),[2];case 3:return this.schedule(),[2]}}))}))},e}(),Fe=function(){function e(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}return e.prototype._initializeTime=function(){this.lastSignInTime=Pe(this.lastLoginAt),this.creationTime=Pe(this.createdAt)},e.prototype._copy=function(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()},e.prototype.toJSON=function(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}},e}();function xe(e){var t;return q.__awaiter(this,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,d,l;return q.__generator(this,(function(h){switch(h.label){case 0:return n=e.auth,[4,e.getIdToken()];case 1:return r=h.sent(),[4,Me(e,Re(n,{idToken:r}))];case 2:return se(null==(i=h.sent())?void 0:i.users.length,n,"internal-error"),o=i.users[0],e._notifyReloadListener(o),a=(null===(t=o.providerUserInfo)||void 0===t?void 0:t.length)?o.providerUserInfo.map((function(e){var t=e.providerId,n=q.__rest(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})):[],f=e.providerData,p=a,_=f.filter((function(e){return!p.some((function(t){return t.providerId===e.providerId}))})),s=q.__spreadArray(q.__spreadArray([],_,!0),p,!0),u=e.isAnonymous,c=!(e.email&&o.passwordHash||(null==s?void 0:s.length)),d=!!u&&c,l={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:s,metadata:new Fe(o.createdAt,o.lastLoginAt),isAnonymous:d},Object.assign(e,l),[2]}var f,p,_}))}))}function Ve(e){return q.__awaiter(this,void 0,void 0,(function(){var t;return q.__generator(this,(function(n){switch(n.label){case 0:return[4,xe(t=K.getModularInstance(e))];case 1:return n.sent(),[4,t.auth._persistUserIfCurrent(t)];case 2:return n.sent(),t.auth._notifyListenersIfCurrent(t),[2]}}))}))}function je(e,t){return q.__awaiter(this,void 0,void 0,(function(){var n,r=this;return q.__generator(this,(function(i){switch(i.label){case 0:return[4,Ee(e,{},(function(){return q.__awaiter(r,void 0,void 0,(function(){var n,r,i,o,a,s;return q.__generator(this,(function(u){switch(u.label){case 0:return n=K.querystring({grant_type:"refresh_token",refresh_token:t}).slice(1),r=e.config,i=r.tokenApiHost,o=r.apiKey,a=we(e,i,"/v1/token","key=".concat(o)),[4,e._getAdditionalHeaders()];case 1:return(s=u.sent())["Content-Type"]="application/x-www-form-urlencoded",[2,ge.fetch()(a,{method:"POST",headers:s,body:n})]}}))}))}))];case 1:return[2,{accessToken:(n=i.sent()).access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}]}}))}))}var ze=function(){function e(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}return Object.defineProperty(e.prototype,"isExpired",{get:function(){return!this.expirationTime||Date.now()>this.expirationTime-3e4},enumerable:!1,configurable:!0}),e.prototype.updateFromServerResponse=function(e){se(e.idToken,"internal-error"),se(void 0!==e.idToken,"internal-error"),se(void 0!==e.refreshToken,"internal-error");var t,n,r="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):(t=e.idToken,se(n=Le(t),"internal-error"),se(void 0!==n.exp,"internal-error"),se(void 0!==n.iat,"internal-error"),Number(n.exp)-Number(n.iat));this.updateTokensAndExpiration(e.idToken,e.refreshToken,r)},e.prototype.getToken=function(e,t){return void 0===t&&(t=!1),q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){switch(n.label){case 0:return se(!this.accessToken||this.refreshToken,e,"user-token-expired"),t||!this.accessToken||this.isExpired?this.refreshToken?[4,this.refresh(e,this.refreshToken)]:[3,2]:[2,this.accessToken];case 1:return n.sent(),[2,this.accessToken];case 2:return[2,null]}}))}))},e.prototype.clearRefreshToken=function(){this.refreshToken=null},e.prototype.refresh=function(e,t){return q.__awaiter(this,void 0,void 0,(function(){var n,r,i,o;return q.__generator(this,(function(a){switch(a.label){case 0:return[4,je(e,t)];case 1:return n=a.sent(),r=n.accessToken,i=n.refreshToken,o=n.expiresIn,this.updateTokensAndExpiration(r,i,Number(o)),[2]}}))}))},e.prototype.updateTokensAndExpiration=function(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n},e.fromJSON=function(t,n){var r=n.refreshToken,i=n.accessToken,o=n.expirationTime,a=new e;return r&&(se("string"==typeof r,"internal-error",{appName:t}),a.refreshToken=r),i&&(se("string"==typeof i,"internal-error",{appName:t}),a.accessToken=i),o&&(se("number"==typeof o,"internal-error",{appName:t}),a.expirationTime=o),a},e.prototype.toJSON=function(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}},e.prototype._assign=function(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime},e.prototype._clone=function(){return Object.assign(new e,this.toJSON())},e.prototype._performRefresh=function(){return ue("not implemented")},e}();function We(e,t){se("string"==typeof e||void 0===e,"internal-error",{appName:t})}var He=function(){function e(e){var t=e.uid,n=e.auth,r=e.stsTokenManager,i=q.__rest(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Ue(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?q.__spreadArray([],i.providerData,!0):[],this.metadata=new Fe(i.createdAt||void 0,i.lastLoginAt||void 0)}return e.prototype.getIdToken=function(e){return q.__awaiter(this,void 0,void 0,(function(){var t;return q.__generator(this,(function(n){switch(n.label){case 0:return[4,Me(this,this.stsTokenManager.getToken(this.auth,e))];case 1:return se(t=n.sent(),this.auth,"internal-error"),this.accessToken===t?[3,3]:(this.accessToken=t,[4,this.auth._persistUserIfCurrent(this)]);case 2:n.sent(),this.auth._notifyListenersIfCurrent(this),n.label=3;case 3:return[2,t]}}))}))},e.prototype.getIdTokenResult=function(e){return Ce(this,e)},e.prototype.reload=function(){return Ve(this)},e.prototype._assign=function(e){this!==e&&(se(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map((function(e){return q.__assign({},e)})),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))},e.prototype._clone=function(t){return new e(q.__assign(q.__assign({},this),{auth:t,stsTokenManager:this.stsTokenManager._clone()}))},e.prototype._onReload=function(e){se(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)},e.prototype._notifyReloadListener=function(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e},e.prototype._startProactiveRefresh=function(){this.proactiveRefresh._start()},e.prototype._stopProactiveRefresh=function(){this.proactiveRefresh._stop()},e.prototype._updateTokensIfNecessary=function(e,t){return void 0===t&&(t=!1),q.__awaiter(this,void 0,void 0,(function(){var n;return q.__generator(this,(function(r){switch(r.label){case 0:return n=!1,e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t?[4,xe(this)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[4,this.auth._persistUserIfCurrent(this)];case 3:return r.sent(),n&&this.auth._notifyListenersIfCurrent(this),[2]}}))}))},e.prototype.delete=function(){return q.__awaiter(this,void 0,void 0,(function(){var e;return q.__generator(this,(function(t){switch(t.label){case 0:return[4,this.getIdToken()];case 1:return e=t.sent(),[4,Me(this,ke(this.auth,{idToken:e}))];case 2:return t.sent(),this.stsTokenManager.clearRefreshToken(),[2,this.auth.signOut()]}}))}))},e.prototype.toJSON=function(){return q.__assign(q.__assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map((function(e){return q.__assign({},e)})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})},Object.defineProperty(e.prototype,"refreshToken",{get:function(){return this.stsTokenManager.refreshToken||""},enumerable:!1,configurable:!0}),e._fromJSON=function(t,n){var r,i,o,a,s,u,c,d,l=null!==(r=n.displayName)&&void 0!==r?r:void 0,h=null!==(i=n.email)&&void 0!==i?i:void 0,f=null!==(o=n.phoneNumber)&&void 0!==o?o:void 0,p=null!==(a=n.photoURL)&&void 0!==a?a:void 0,_=null!==(s=n.tenantId)&&void 0!==s?s:void 0,v=null!==(u=n._redirectEventId)&&void 0!==u?u:void 0,m=null!==(c=n.createdAt)&&void 0!==c?c:void 0,g=null!==(d=n.lastLoginAt)&&void 0!==d?d:void 0,I=n.uid,y=n.emailVerified,b=n.isAnonymous,T=n.providerData,E=n.stsTokenManager;se(I&&E,t,"internal-error");var A=ze.fromJSON(this.name,E);se("string"==typeof I,t,"internal-error"),We(l,t.name),We(h,t.name),se("boolean"==typeof y,t,"internal-error"),se("boolean"==typeof b,t,"internal-error"),We(f,t.name),We(p,t.name),We(_,t.name),We(v,t.name),We(m,t.name),We(g,t.name);var w=new e({uid:I,auth:t,email:h,emailVerified:y,displayName:l,isAnonymous:b,photoURL:p,phoneNumber:f,tenantId:_,stsTokenManager:A,createdAt:m,lastLoginAt:g});return T&&Array.isArray(T)&&(w.providerData=T.map((function(e){return q.__assign({},e)}))),v&&(w._redirectEventId=v),w},e._fromIdTokenResponse=function(t,n,r){return void 0===r&&(r=!1),q.__awaiter(this,void 0,void 0,(function(){var i,o;return q.__generator(this,(function(a){switch(a.label){case 0:return(i=new ze).updateFromServerResponse(n),[4,xe(o=new e({uid:n.localId,auth:t,stsTokenManager:i,isAnonymous:r}))];case 1:return a.sent(),[2,o]}}))}))},e}(),Ge=function(){function e(){this.type="NONE",this.storage={}}return e.prototype._isAvailable=function(){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(e){return[2,!0]}))}))},e.prototype._set=function(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return this.storage[e]=t,[2]}))}))},e.prototype._get=function(e){return q.__awaiter(this,void 0,void 0,(function(){var t;return q.__generator(this,(function(n){return[2,void 0===(t=this.storage[e])?null:t]}))}))},e.prototype._remove=function(e){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(t){return delete this.storage[e],[2]}))}))},e.prototype._addListener=function(e,t){},e.prototype._removeListener=function(e,t){},e.type="NONE",e}();function Be(e,t,n){return"".concat("firebase",":").concat(e,":").concat(t,":").concat(n)}var qe=function(){function e(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;var r=this.auth,i=r.config,o=r.name;this.fullUserKey=Be(this.userKey,i.apiKey,o),this.fullPersistenceKey=Be("persistence",i.apiKey,o),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}return e.prototype.setCurrentUser=function(e){return this.persistence._set(this.fullUserKey,e.toJSON())},e.prototype.getCurrentUser=function(){return q.__awaiter(this,void 0,void 0,(function(){var e;return q.__generator(this,(function(t){switch(t.label){case 0:return[4,this.persistence._get(this.fullUserKey)];case 1:return[2,(e=t.sent())?He._fromJSON(this.auth,e):null]}}))}))},e.prototype.removeCurrentUser=function(){return this.persistence._remove(this.fullUserKey)},e.prototype.savePersistenceForRedirect=function(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)},e.prototype.setPersistence=function(e){return q.__awaiter(this,void 0,void 0,(function(){var t;return q.__generator(this,(function(n){switch(n.label){case 0:return this.persistence===e?[2]:[4,this.getCurrentUser()];case 1:return t=n.sent(),[4,this.removeCurrentUser()];case 2:return n.sent(),this.persistence=e,t?[2,this.setCurrentUser(t)]:[2]}}))}))},e.prototype.delete=function(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)},e.create=function(t,n,r){return void 0===r&&(r="authUser"),q.__awaiter(this,void 0,void 0,(function(){var i,o,a,s,u,c,d,l,h,f,p=this;return q.__generator(this,(function(_){switch(_.label){case 0:return n.length?[4,Promise.all(n.map((function(e){return q.__awaiter(p,void 0,void 0,(function(){return q.__generator(this,(function(t){switch(t.label){case 0:return[4,e._isAvailable()];case 1:return t.sent()?[2,e]:[2,void 0]}}))}))})))]:[2,new e(le(Ge),t,r)];case 1:i=_.sent().filter((function(e){return e})),o=i[0]||le(Ge),a=Be(r,t.config.apiKey,t.name),s=null,u=0,c=n,_.label=2;case 2:if(!(u<c.length))return[3,7];d=c[u],_.label=3;case 3:return _.trys.push([3,5,,6]),[4,d._get(a)];case 4:return(l=_.sent())?(h=He._fromJSON(t,l),d!==o&&(s=h),o=d,[3,7]):[3,6];case 5:return _.sent(),[3,6];case 6:return u++,[3,2];case 7:return f=i.filter((function(e){return e._shouldAllowMigration})),o._shouldAllowMigration&&f.length?(o=f[0],s?[4,o._set(a,s.toJSON())]:[3,9]):[2,new e(o,t,r)];case 8:_.sent(),_.label=9;case 9:return[4,Promise.all(n.map((function(e){return q.__awaiter(p,void 0,void 0,(function(){return q.__generator(this,(function(t){switch(t.label){case 0:if(e===o)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,e._remove(a)];case 2:case 3:return t.sent(),[3,4];case 4:return[2]}}))}))})))];case 10:return _.sent(),[2,new e(o,t,r)]}}))}))},e}();function Ke(e){var t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if($e(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Je(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Ze(t))return"Blackberry";if(et(t))return"Webos";if(Ye(t))return"Safari";if((t.includes("chrome/")||Xe(t))&&!t.includes("edge/"))return"Chrome";if(Qe(t))return"Android";var n=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);return 2===(null==n?void 0:n.length)?n[1]:"Other"}function Je(e){return void 0===e&&(e=K.getUA()),/firefox\//i.test(e)}function Ye(e){void 0===e&&(e=K.getUA());var t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function Xe(e){return void 0===e&&(e=K.getUA()),/crios\//i.test(e)}function $e(e){return void 0===e&&(e=K.getUA()),/iemobile/i.test(e)}function Qe(e){return void 0===e&&(e=K.getUA()),/android/i.test(e)}function Ze(e){return void 0===e&&(e=K.getUA()),/blackberry/i.test(e)}function et(e){return void 0===e&&(e=K.getUA()),/webos/i.test(e)}function tt(e){return void 0===e&&(e=K.getUA()),/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function nt(e,t){var n;switch(void 0===t&&(t=[]),e){case"Browser":n=Ke(K.getUA());break;case"Worker":n="".concat(Ke(K.getUA()),"-").concat(e);break;default:n=e}var r=t.length?t.join(","):"FirebaseCore-web";return"".concat(n,"/").concat("JsCore","/").concat(J.SDK_VERSION,"/").concat(r)}var rt=function(){function e(e){this.auth=e,this.queue=[]}return e.prototype.pushCallback=function(e,t){var n=this,r=function(t){return new Promise((function(n,r){try{n(e(t))}catch(e){r(e)}}))};r.onAbort=t,this.queue.push(r);var i=this.queue.length-1;return function(){n.queue[i]=function(){return Promise.resolve()}}},e.prototype.runMiddleware=function(e){return q.__awaiter(this,void 0,void 0,(function(){var t,n,r,i,o,a,s,u;return q.__generator(this,(function(c){switch(c.label){case 0:if(this.auth.currentUser===e)return[2];t=[],c.label=1;case 1:c.trys.push([1,6,,7]),n=0,r=this.queue,c.label=2;case 2:return n<r.length?[4,(i=r[n])(e)]:[3,5];case 3:c.sent(),i.onAbort&&t.push(i.onAbort),c.label=4;case 4:return n++,[3,2];case 5:return[3,7];case 6:for(o=c.sent(),t.reverse(),a=0,s=t;a<s.length;a++){u=s[a];try{u()}catch(e){}}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==o?void 0:o.message});case 7:return[2]}}))}))},e}(),it=function(){function e(e,t,n){this.app=e,this.heartbeatServiceProvider=t,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new at(this),this.idTokenSubscription=new at(this),this.beforeStateQueue=new rt(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=ee,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion}return e.prototype._initializeWithPersistence=function(e,t){var n=this;return t&&(this._popupRedirectResolver=le(t)),this._initializationPromise=this.queue((function(){return q.__awaiter(n,void 0,void 0,(function(){var n,r,i;return q.__generator(this,(function(o){switch(o.label){case 0:return this._deleted?[2]:(n=this,[4,qe.create(this,e)]);case 1:if(n.persistenceManager=o.sent(),this._deleted)return[2];if(!(null===(r=this._popupRedirectResolver)||void 0===r?void 0:r._shouldInitProactively))return[3,5];o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this._popupRedirectResolver._initialize(this)];case 3:case 4:return o.sent(),[3,5];case 5:return[4,this.initializeCurrentUser(t)];case 6:return o.sent(),this.lastNotifiedUid=(null===(i=this.currentUser)||void 0===i?void 0:i.uid)||null,this._deleted?[2]:(this._isInitialized=!0,[2])}}))}))})),this._initializationPromise},e.prototype._onStorageEvent=function(){return q.__awaiter(this,void 0,void 0,(function(){var e;return q.__generator(this,(function(t){switch(t.label){case 0:return this._deleted?[2]:[4,this.assertedPersistence.getCurrentUser()];case 1:return e=t.sent(),this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),[4,this.currentUser.getIdToken()]):[3,3]:[2];case 2:case 4:return t.sent(),[2];case 3:return[4,this._updateCurrentUser(e,!0)]}}))}))},e.prototype.initializeCurrentUser=function(e){var t;return q.__awaiter(this,void 0,void 0,(function(){var n,r,i,o,a,s,u;return q.__generator(this,(function(c){switch(c.label){case 0:return[4,this.assertedPersistence.getCurrentUser()];case 1:return n=c.sent(),r=n,i=!1,e&&this.config.authDomain?[4,this.getOrInitRedirectPersistenceManager()]:[3,4];case 2:return c.sent(),o=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,a=null==r?void 0:r._redirectEventId,[4,this.tryRedirectSignIn(e)];case 3:s=c.sent(),o&&o!==a||!(null==s?void 0:s.user)||(r=s.user,i=!0),c.label=4;case 4:if(!r)return[2,this.directlySetCurrentUser(null)];if(r._redirectEventId)return[3,9];if(!i)return[3,8];c.label=5;case 5:return c.trys.push([5,7,,8]),[4,this.beforeStateQueue.runMiddleware(r)];case 6:return c.sent(),[3,8];case 7:return u=c.sent(),r=n,this._popupRedirectResolver._overrideRedirectResult(this,(function(){return Promise.reject(u)})),[3,8];case 8:return r?[2,this.reloadAndSetCurrentUserOrClear(r)]:[2,this.directlySetCurrentUser(null)];case 9:return se(this._popupRedirectResolver,this,"argument-error"),[4,this.getOrInitRedirectPersistenceManager()];case 10:return c.sent(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?[2,this.directlySetCurrentUser(r)]:[2,this.reloadAndSetCurrentUserOrClear(r)]}}))}))},e.prototype.tryRedirectSignIn=function(e){return q.__awaiter(this,void 0,void 0,(function(){var t;return q.__generator(this,(function(n){switch(n.label){case 0:t=null,n.label=1;case 1:return n.trys.push([1,3,,5]),[4,this._popupRedirectResolver._completeRedirectFn(this,e,!0)];case 2:return t=n.sent(),[3,5];case 3:return n.sent(),[4,this._setRedirectUser(null)];case 4:return n.sent(),[3,5];case 5:return[2,t]}}))}))},e.prototype.reloadAndSetCurrentUserOrClear=function(e){return q.__awaiter(this,void 0,void 0,(function(){var t;return q.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,xe(e)];case 1:return n.sent(),[3,3];case 2:return(null==(t=n.sent())?void 0:t.code)!=="auth/".concat("network-request-failed")?[2,this.directlySetCurrentUser(null)]:[3,3];case 3:return[2,this.directlySetCurrentUser(e)]}}))}))},e.prototype.useDeviceLanguage=function(){this.languageCode=function(){if("undefined"==typeof navigator)return null;var e=navigator;return e.languages&&e.languages[0]||e.language||null}()},e.prototype._delete=function(){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(e){return this._deleted=!0,[2]}))}))},e.prototype.updateCurrentUser=function(e){return q.__awaiter(this,void 0,void 0,(function(){var t;return q.__generator(this,(function(n){return(t=e?K.getModularInstance(e):null)&&se(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),[2,this._updateCurrentUser(t&&t._clone(this))]}))}))},e.prototype._updateCurrentUser=function(e,t){return void 0===t&&(t=!1),q.__awaiter(this,void 0,void 0,(function(){var n=this;return q.__generator(this,(function(r){switch(r.label){case 0:return this._deleted?[2]:(e&&se(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t?[3,2]:[4,this.beforeStateQueue.runMiddleware(e)]);case 1:r.sent(),r.label=2;case 2:return[2,this.queue((function(){return q.__awaiter(n,void 0,void 0,(function(){return q.__generator(this,(function(t){switch(t.label){case 0:return[4,this.directlySetCurrentUser(e)];case 1:return t.sent(),this.notifyAuthListeners(),[2]}}))}))}))]}}))}))},e.prototype.signOut=function(){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(e){switch(e.label){case 0:return[4,this.beforeStateQueue.runMiddleware(null)];case 1:return e.sent(),this.redirectPersistenceManager||this._popupRedirectResolver?[4,this._setRedirectUser(null)]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2,this._updateCurrentUser(null,!0)]}}))}))},e.prototype.setPersistence=function(e){var t=this;return this.queue((function(){return q.__awaiter(t,void 0,void 0,(function(){return q.__generator(this,(function(t){switch(t.label){case 0:return[4,this.assertedPersistence.setPersistence(le(e))];case 1:return t.sent(),[2]}}))}))}))},e.prototype._getPersistence=function(){return this.assertedPersistence.persistence.type},e.prototype._updateErrorMap=function(e){this._errorFactory=new K.ErrorFactory("auth","Firebase",e())},e.prototype.onAuthStateChanged=function(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)},e.prototype.beforeAuthStateChanged=function(e,t){return this.beforeStateQueue.pushCallback(e,t)},e.prototype.onIdTokenChanged=function(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)},e.prototype.toJSON=function(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}},e.prototype._setRedirectUser=function(e,t){return q.__awaiter(this,void 0,void 0,(function(){var n;return q.__generator(this,(function(r){switch(r.label){case 0:return[4,this.getOrInitRedirectPersistenceManager(t)];case 1:return n=r.sent(),[2,null===e?n.removeCurrentUser():n.setCurrentUser(e)]}}))}))},e.prototype.getOrInitRedirectPersistenceManager=function(e){return q.__awaiter(this,void 0,void 0,(function(){var t,n,r;return q.__generator(this,(function(i){switch(i.label){case 0:return this.redirectPersistenceManager?[3,3]:(se(t=e&&le(e)||this._popupRedirectResolver,this,"argument-error"),n=this,[4,qe.create(this,[le(t._redirectPersistence)],"redirectUser")]);case 1:return n.redirectPersistenceManager=i.sent(),r=this,[4,this.redirectPersistenceManager.getCurrentUser()];case 2:r.redirectUser=i.sent(),i.label=3;case 3:return[2,this.redirectPersistenceManager]}}))}))},e.prototype._redirectUserForId=function(e){var t,n;return q.__awaiter(this,void 0,void 0,(function(){var r=this;return q.__generator(this,(function(i){switch(i.label){case 0:return this._isInitialized?[4,this.queue((function(){return q.__awaiter(r,void 0,void 0,(function(){return q.__generator(this,(function(e){return[2]}))}))}))]:[3,2];case 1:i.sent(),i.label=2;case 2:return(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e?[2,this._currentUser]:(null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId)===e?[2,this.redirectUser]:[2,null]}}))}))},e.prototype._persistUserIfCurrent=function(e){return q.__awaiter(this,void 0,void 0,(function(){var t=this;return q.__generator(this,(function(n){return e===this.currentUser?[2,this.queue((function(){return q.__awaiter(t,void 0,void 0,(function(){return q.__generator(this,(function(t){return[2,this.directlySetCurrentUser(e)]}))}))}))]:[2]}))}))},e.prototype._notifyListenersIfCurrent=function(e){e===this.currentUser&&this.notifyAuthListeners()},e.prototype._key=function(){return"".concat(this.config.authDomain,":").concat(this.config.apiKey,":").concat(this.name)},e.prototype._startProactiveRefresh=function(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()},e.prototype._stopProactiveRefresh=function(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()},Object.defineProperty(e.prototype,"_currentUser",{get:function(){return this.currentUser},enumerable:!1,configurable:!0}),e.prototype.notifyAuthListeners=function(){var e,t;if(this._isInitialized){this.idTokenSubscription.next(this.currentUser);var n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}},e.prototype.registerStateListener=function(e,t,n,r){var i=this;if(this._deleted)return function(){};var o="function"==typeof t?t:t.next.bind(t),a=this._isInitialized?Promise.resolve():this._initializationPromise;return se(a,this,"internal-error"),a.then((function(){return o(i.currentUser)})),"function"==typeof t?e.addObserver(t,n,r):e.addObserver(t)},e.prototype.directlySetCurrentUser=function(e){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(t){switch(t.label){case 0:return this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?[4,this.assertedPersistence.setCurrentUser(e)]:[3,2];case 1:return t.sent(),[3,4];case 2:return[4,this.assertedPersistence.removeCurrentUser()];case 3:t.sent(),t.label=4;case 4:return[2]}}))}))},e.prototype.queue=function(e){return this.operations=this.operations.then(e,e),this.operations},Object.defineProperty(e.prototype,"assertedPersistence",{get:function(){return se(this.persistenceManager,this,"internal-error"),this.persistenceManager},enumerable:!1,configurable:!0}),e.prototype._logFramework=function(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=nt(this.config.clientPlatform,this._getFrameworks()))},e.prototype._getFrameworks=function(){return this.frameworks},e.prototype._getAdditionalHeaders=function(){var e;return q.__awaiter(this,void 0,void 0,(function(){var t,n,r;return q.__generator(this,(function(i){switch(i.label){case 0:return(r={})["X-Client-Version"]=this.clientVersion,t=r,this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId),[4,null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader()];case 1:return(n=i.sent())&&(t["X-Firebase-Client"]=n),[2,t]}}))}))},e}();function ot(e){return K.getModularInstance(e)}var at=function(){function e(e){var t=this;this.auth=e,this.observer=null,this.addObserver=K.createSubscribe((function(e){return t.observer=e}))}return Object.defineProperty(e.prototype,"next",{get:function(){return se(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)},enumerable:!1,configurable:!0}),e}();function st(e){var t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function ut(e){if(!e)return null;var t=Number(e);return isNaN(t)?null:t}var ct=function(){function e(e,t){this.providerId=e,this.signInMethod=t}return e.prototype.toJSON=function(){return ue("not implemented")},e.prototype._getIdTokenResponse=function(e){return ue("not implemented")},e.prototype._linkToIdToken=function(e,t){return ue("not implemented")},e.prototype._getReauthenticationResolver=function(e){return ue("not implemented")},e}();function dt(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Te(e,"POST","/v1/accounts:resetPassword",be(e,t))]}))}))}function lt(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Te(e,"POST","/v1/accounts:update",t)]}))}))}function ht(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Te(e,"POST","/v1/accounts:update",be(e,t))]}))}))}function ft(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Ae(e,"POST","/v1/accounts:signInWithPassword",be(e,t))]}))}))}function pt(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Te(e,"POST","/v1/accounts:sendOobCode",be(e,t))]}))}))}function _t(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,pt(e,t)]}))}))}function vt(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,pt(e,t)]}))}))}function mt(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,pt(e,t)]}))}))}function gt(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,pt(e,t)]}))}))}function It(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Ae(e,"POST","/v1/accounts:signInWithEmailLink",be(e,t))]}))}))}function yt(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Ae(e,"POST","/v1/accounts:signInWithEmailLink",be(e,t))]}))}))}var bt=function(e){function t(t,n,r,i){void 0===i&&(i=null);var o=e.call(this,"password",r)||this;return o._email=t,o._password=n,o._tenantId=i,o}return q.__extends(t,e),t._fromEmailAndPassword=function(e,n){return new t(e,n,"password")},t._fromEmailAndCode=function(e,n,r){return void 0===r&&(r=null),new t(e,n,"emailLink",r)},t.prototype.toJSON=function(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}},t.fromJSON=function(e){var t="string"==typeof e?JSON.parse(e):e;if((null==t?void 0:t.email)&&(null==t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null},t.prototype._getIdTokenResponse=function(e){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(t){switch(this.signInMethod){case"password":return[2,ft(e,{returnSecureToken:!0,email:this._email,password:this._password})];case"emailLink":return[2,It(e,{email:this._email,oobCode:this._password})];default:re(e,"internal-error")}return[2]}))}))},t.prototype._linkToIdToken=function(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){switch(this.signInMethod){case"password":return[2,lt(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password})];case"emailLink":return[2,yt(e,{idToken:t,email:this._email,oobCode:this._password})];default:re(e,"internal-error")}return[2]}))}))},t.prototype._getReauthenticationResolver=function(e){return this._getIdTokenResponse(e)},t}(ct);function Tt(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Ae(e,"POST","/v1/accounts:signInWithIdp",be(e,t))]}))}))}var Et,At=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.pendingToken=null,t}return q.__extends(t,e),t._fromParams=function(e){var n=new t(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(n.idToken=e.idToken),e.accessToken&&(n.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(n.nonce=e.nonce),e.pendingToken&&(n.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(n.accessToken=e.oauthToken,n.secret=e.oauthTokenSecret):re("argument-error"),n},t.prototype.toJSON=function(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}},t.fromJSON=function(e){var n="string"==typeof e?JSON.parse(e):e,r=n.providerId,i=n.signInMethod,o=q.__rest(n,["providerId","signInMethod"]);if(!r||!i)return null;var a=new t(r,i);return a.idToken=o.idToken||void 0,a.accessToken=o.accessToken||void 0,a.secret=o.secret,a.nonce=o.nonce,a.pendingToken=o.pendingToken||null,a},t.prototype._getIdTokenResponse=function(e){return Tt(e,this.buildRequest())},t.prototype._linkToIdToken=function(e,t){var n=this.buildRequest();return n.idToken=t,Tt(e,n)},t.prototype._getReauthenticationResolver=function(e){var t=this.buildRequest();return t.autoCreate=!1,Tt(e,t)},t.prototype.buildRequest=function(){var e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{var t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=K.querystring(t)}return e},t}(ct);function wt(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Te(e,"POST","/v1/accounts:sendVerificationCode",be(e,t))]}))}))}var Ot=((Et={}).USER_NOT_FOUND="user-not-found",Et);var St=function(e){function t(t){var n=e.call(this,"phone","phone")||this;return n.params=t,n}return q.__extends(t,e),t._fromVerification=function(e,n){return new t({verificationId:e,verificationCode:n})},t._fromTokenResponse=function(e,n){return new t({phoneNumber:e,temporaryProof:n})},t.prototype._getIdTokenResponse=function(e){return function(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Ae(e,"POST","/v1/accounts:signInWithPhoneNumber",be(e,t))]}))}))}(e,this._makeVerificationRequest())},t.prototype._linkToIdToken=function(e,t){return function(e,t){return q.__awaiter(this,void 0,void 0,(function(){var n;return q.__generator(this,(function(r){switch(r.label){case 0:return[4,Ae(e,"POST","/v1/accounts:signInWithPhoneNumber",be(e,t))];case 1:if((n=r.sent()).temporaryProof)throw Se(e,"account-exists-with-different-credential",n);return[2,n]}}))}))}(e,q.__assign({idToken:t},this._makeVerificationRequest()))},t.prototype._getReauthenticationResolver=function(e){return function(e,t){return q.__awaiter(this,void 0,void 0,(function(){var n;return q.__generator(this,(function(r){return n=q.__assign(q.__assign({},t),{operation:"REAUTH"}),[2,Ae(e,"POST","/v1/accounts:signInWithPhoneNumber",be(e,n),Ot)]}))}))}(e,this._makeVerificationRequest())},t.prototype._makeVerificationRequest=function(){var e=this.params,t=e.temporaryProof,n=e.phoneNumber,r=e.verificationId,i=e.verificationCode;return t&&n?{temporaryProof:t,phoneNumber:n}:{sessionInfo:r,code:i}},t.prototype.toJSON=function(){var e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e},t.fromJSON=function(e){"string"==typeof e&&(e=JSON.parse(e));var n=e,r=n.verificationId,i=n.verificationCode,o=n.phoneNumber,a=n.temporaryProof;return i||r||o||a?new t({verificationId:r,verificationCode:i,phoneNumber:o,temporaryProof:a}):null},t}(ct);var kt=function(){function e(e){var t,n,r,i,o,a,s=K.querystringDecode(K.extractQuerystring(e)),u=null!==(t=s.apiKey)&&void 0!==t?t:null,c=null!==(n=s.oobCode)&&void 0!==n?n:null,d=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(r=s.mode)&&void 0!==r?r:null);se(u&&c&&d,"argument-error"),this.apiKey=u,this.operation=d,this.code=c,this.continueUrl=null!==(i=s.continueUrl)&&void 0!==i?i:null,this.languageCode=null!==(o=s.languageCode)&&void 0!==o?o:null,this.tenantId=null!==(a=s.tenantId)&&void 0!==a?a:null}return e.parseLink=function(t){var n=function(e){var t=K.querystringDecode(K.extractQuerystring(e)).link,n=t?K.querystringDecode(K.extractQuerystring(t)).deep_link_id:null,r=K.querystringDecode(K.extractQuerystring(e)).deep_link_id;return(r?K.querystringDecode(K.extractQuerystring(r)).link:null)||r||n||t||e}(t);try{return new e(n)}catch(e){return null}},e}();var Nt=function(){function e(){this.providerId=e.PROVIDER_ID}return e.credential=function(e,t){return bt._fromEmailAndPassword(e,t)},e.credentialWithLink=function(e,t){var n=kt.parseLink(t);return se(n,"argument-error"),bt._fromEmailAndCode(e,n.code,n.tenantId)},e.PROVIDER_ID="password",e.EMAIL_PASSWORD_SIGN_IN_METHOD="password",e.EMAIL_LINK_SIGN_IN_METHOD="emailLink",e}(),Rt=function(){function e(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}return e.prototype.setDefaultLanguage=function(e){this.defaultLanguageCode=e},e.prototype.setCustomParameters=function(e){return this.customParameters=e,this},e.prototype.getCustomParameters=function(){return this.customParameters},e}(),Pt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.scopes=[],t}return q.__extends(t,e),t.prototype.addScope=function(e){return this.scopes.includes(e)||this.scopes.push(e),this},t.prototype.getScopes=function(){return q.__spreadArray([],this.scopes,!0)},t}(Rt),Ct=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return q.__extends(t,e),t.credentialFromJSON=function(e){var t="string"==typeof e?JSON.parse(e):e;return se("providerId"in t&&"signInMethod"in t,"argument-error"),At._fromParams(t)},t.prototype.credential=function(e){return this._credential(q.__assign(q.__assign({},e),{nonce:e.rawNonce}))},t.prototype._credential=function(e){return se(e.idToken||e.accessToken,"argument-error"),At._fromParams(q.__assign(q.__assign({},e),{providerId:this.providerId,signInMethod:this.providerId}))},t.credentialFromResult=function(e){return t.oauthCredentialFromTaggedObject(e)},t.credentialFromError=function(e){return t.oauthCredentialFromTaggedObject(e.customData||{})},t.oauthCredentialFromTaggedObject=function(e){var n=e._tokenResponse;if(!n)return null;var r=n,i=r.oauthIdToken,o=r.oauthAccessToken,a=r.oauthTokenSecret,s=r.pendingToken,u=r.nonce,c=r.providerId;if(!(o||a||i||s))return null;if(!c)return null;try{return new t(c)._credential({idToken:i,accessToken:o,nonce:u,pendingToken:s})}catch(e){return null}},t}(Pt),Dt=function(e){function t(){return e.call(this,"facebook.com")||this}return q.__extends(t,e),t.credential=function(e){return At._fromParams({providerId:t.PROVIDER_ID,signInMethod:t.FACEBOOK_SIGN_IN_METHOD,accessToken:e})},t.credentialFromResult=function(e){return t.credentialFromTaggedObject(e)},t.credentialFromError=function(e){return t.credentialFromTaggedObject(e.customData||{})},t.credentialFromTaggedObject=function(e){var n=e._tokenResponse;if(!n||!("oauthAccessToken"in n))return null;if(!n.oauthAccessToken)return null;try{return t.credential(n.oauthAccessToken)}catch(e){return null}},t.FACEBOOK_SIGN_IN_METHOD="facebook.com",t.PROVIDER_ID="facebook.com",t}(Pt),Lt=function(e){function t(){var t=e.call(this,"google.com")||this;return t.addScope("profile"),t}return q.__extends(t,e),t.credential=function(e,n){return At._fromParams({providerId:t.PROVIDER_ID,signInMethod:t.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:n})},t.credentialFromResult=function(e){return t.credentialFromTaggedObject(e)},t.credentialFromError=function(e){return t.credentialFromTaggedObject(e.customData||{})},t.credentialFromTaggedObject=function(e){var n=e._tokenResponse;if(!n)return null;var r=n,i=r.oauthIdToken,o=r.oauthAccessToken;if(!i&&!o)return null;try{return t.credential(i,o)}catch(e){return null}},t.GOOGLE_SIGN_IN_METHOD="google.com",t.PROVIDER_ID="google.com",t}(Pt),Mt=function(e){function t(){return e.call(this,"github.com")||this}return q.__extends(t,e),t.credential=function(e){return At._fromParams({providerId:t.PROVIDER_ID,signInMethod:t.GITHUB_SIGN_IN_METHOD,accessToken:e})},t.credentialFromResult=function(e){return t.credentialFromTaggedObject(e)},t.credentialFromError=function(e){return t.credentialFromTaggedObject(e.customData||{})},t.credentialFromTaggedObject=function(e){var n=e._tokenResponse;if(!n||!("oauthAccessToken"in n))return null;if(!n.oauthAccessToken)return null;try{return t.credential(n.oauthAccessToken)}catch(e){return null}},t.GITHUB_SIGN_IN_METHOD="github.com",t.PROVIDER_ID="github.com",t}(Pt),Ut=function(e){function t(t,n){var r=e.call(this,t,t)||this;return r.pendingToken=n,r}return q.__extends(t,e),t.prototype._getIdTokenResponse=function(e){return Tt(e,this.buildRequest())},t.prototype._linkToIdToken=function(e,t){var n=this.buildRequest();return n.idToken=t,Tt(e,n)},t.prototype._getReauthenticationResolver=function(e){var t=this.buildRequest();return t.autoCreate=!1,Tt(e,t)},t.prototype.toJSON=function(){return{signInMethod:this.signInMethod,providerId:this.providerId,pendingToken:this.pendingToken}},t.fromJSON=function(e){var n="string"==typeof e?JSON.parse(e):e,r=n.providerId,i=n.signInMethod,o=n.pendingToken;return r&&i&&o&&r===i?new t(r,o):null},t._create=function(e,n){return new t(e,n)},t.prototype.buildRequest=function(){return{requestUri:"http://localhost",returnSecureToken:!0,pendingToken:this.pendingToken}},t}(ct),Ft=function(e){function t(t){return se(t.startsWith("saml."),"argument-error"),e.call(this,t)||this}return q.__extends(t,e),t.credentialFromResult=function(e){return t.samlCredentialFromTaggedObject(e)},t.credentialFromError=function(e){return t.samlCredentialFromTaggedObject(e.customData||{})},t.credentialFromJSON=function(e){var t=Ut.fromJSON(e);return se(t,"argument-error"),t},t.samlCredentialFromTaggedObject=function(e){var t=e._tokenResponse;if(!t)return null;var n=t,r=n.pendingToken,i=n.providerId;if(!r||!i)return null;try{return Ut._create(i,r)}catch(e){return null}},t}(Rt),xt=function(e){function t(){return e.call(this,"twitter.com")||this}return q.__extends(t,e),t.credential=function(e,n){return At._fromParams({providerId:t.PROVIDER_ID,signInMethod:t.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:n})},t.credentialFromResult=function(e){return t.credentialFromTaggedObject(e)},t.credentialFromError=function(e){return t.credentialFromTaggedObject(e.customData||{})},t.credentialFromTaggedObject=function(e){var n=e._tokenResponse;if(!n)return null;var r=n,i=r.oauthAccessToken,o=r.oauthTokenSecret;if(!i||!o)return null;try{return t.credential(i,o)}catch(e){return null}},t.TWITTER_SIGN_IN_METHOD="twitter.com",t.PROVIDER_ID="twitter.com",t}(Pt);function Vt(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Ae(e,"POST","/v1/accounts:signUp",be(e,t))]}))}))}var jt=function(){function e(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}return e._fromIdTokenResponse=function(t,n,r,i){return void 0===i&&(i=!1),q.__awaiter(this,void 0,void 0,(function(){var o,a;return q.__generator(this,(function(s){switch(s.label){case 0:return[4,He._fromIdTokenResponse(t,r,i)];case 1:return o=s.sent(),a=zt(r),[2,new e({user:o,providerId:a,_tokenResponse:r,operationType:n})]}}))}))},e._forOperation=function(t,n,r){return q.__awaiter(this,void 0,void 0,(function(){var i;return q.__generator(this,(function(o){switch(o.label){case 0:return[4,t._updateTokensIfNecessary(r,!0)];case 1:return o.sent(),i=zt(r),[2,new e({user:t,providerId:i,_tokenResponse:r,operationType:n})]}}))}))},e}();function zt(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}var Wt=function(e){function t(n,r,i,o){var a,s=this;return(s=e.call(this,r.code,r.message)||this).operationType=i,s.user=o,Object.setPrototypeOf(s,t.prototype),s.customData={appName:n.name,tenantId:null!==(a=n.tenantId)&&void 0!==a?a:void 0,_serverResponse:r.customData._serverResponse,operationType:i},s}return q.__extends(t,e),t._fromErrorAndOperation=function(e,n,r,i){return new t(e,n,r,i)},t}(K.FirebaseError);function Ht(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch((function(n){if(n.code==="auth/".concat("multi-factor-auth-required"))throw Wt._fromErrorAndOperation(e,n,t,r);throw n}))}function Gt(e){return new Set(e.map((function(e){return e.providerId})).filter((function(e){return!!e})))}function Bt(e,t,n){return void 0===n&&(n=!1),q.__awaiter(this,void 0,void 0,(function(){var r,i,o,a,s,u;return q.__generator(this,(function(c){switch(c.label){case 0:return i=Me,o=[e],s=(a=t)._linkToIdToken,u=[e.auth],[4,e.getIdToken()];case 1:return[4,i.apply(void 0,o.concat([s.apply(a,u.concat([c.sent()])),n]))];case 2:return r=c.sent(),[2,jt._forOperation(e,"link",r)]}}))}))}function qt(e,t,n){return q.__awaiter(this,void 0,void 0,(function(){var r,i;return q.__generator(this,(function(o){switch(o.label){case 0:return[4,xe(t)];case 1:return o.sent(),r=Gt(t.providerData),i=!1===e?"provider-already-linked":"no-such-provider",se(r.has(n)===e,t.auth,i),[2]}}))}))}function Kt(e,t,n){return void 0===n&&(n=!1),q.__awaiter(this,void 0,void 0,(function(){var r,i,o,a,s,u;return q.__generator(this,(function(c){switch(c.label){case 0:r=e.auth,i="reauthenticate",c.label=1;case 1:return c.trys.push([1,3,,4]),[4,Me(e,Ht(r,i,t,e),n)];case 2:return se((o=c.sent()).idToken,r,"internal-error"),se(a=Le(o.idToken),r,"internal-error"),s=a.sub,se(e.uid===s,r,"user-mismatch"),[2,jt._forOperation(e,i,o)];case 3:throw(null==(u=c.sent())?void 0:u.code)==="auth/".concat("user-not-found")&&re(r,"user-mismatch"),u;case 4:return[2]}}))}))}function Jt(e,t,n){return void 0===n&&(n=!1),q.__awaiter(this,void 0,void 0,(function(){var r,i,o;return q.__generator(this,(function(a){switch(a.label){case 0:return[4,Ht(e,r="signIn",t)];case 1:return i=a.sent(),[4,jt._fromIdTokenResponse(e,r,i)];case 2:return o=a.sent(),n?[3,4]:[4,e._updateCurrentUser(o.user)];case 3:a.sent(),a.label=4;case 4:return[2,o]}}))}))}function Yt(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Jt(ot(e),t)]}))}))}function Xt(e,t){return q.__awaiter(this,void 0,void 0,(function(){var n;return q.__generator(this,(function(r){switch(r.label){case 0:return[4,qt(!1,n=K.getModularInstance(e),t.providerId)];case 1:return r.sent(),[2,Bt(n,t)]}}))}))}function $t(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Kt(K.getModularInstance(e),t)]}))}))}function Qt(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Ae(e,"POST","/v1/accounts:signInWithCustomToken",be(e,t))]}))}))}var Zt=function(){function e(e,t){this.factorId=e,this.uid=t.mfaEnrollmentId,this.enrollmentTime=new Date(t.enrolledAt).toUTCString(),this.displayName=t.displayName}return e._fromServerResponse=function(e,t){return"phoneInfo"in t?en._fromServerResponse(e,t):re(e,"internal-error")},e}(),en=function(e){function t(t){var n=e.call(this,"phone",t)||this;return n.phoneNumber=t.phoneInfo,n}return q.__extends(t,e),t._fromServerResponse=function(e,n){return new t(n)},t}(Zt);function tn(e,t,n){var r;se((null===(r=n.url)||void 0===r?void 0:r.length)>0,e,"invalid-continue-uri"),se(void 0===n.dynamicLinkDomain||n.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),t.continueUrl=n.url,t.dynamicLinkDomain=n.dynamicLinkDomain,t.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(se(n.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=n.iOS.bundleId),n.android&&(se(n.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=n.android.installApp,t.androidMinimumVersionCode=n.android.minimumVersion,t.androidPackageName=n.android.packageName)}function nn(e,t){return q.__awaiter(this,void 0,void 0,(function(){var n,r,i,o;return q.__generator(this,(function(a){switch(a.label){case 0:return[4,dt(n=K.getModularInstance(e),{oobCode:t})];case 1:switch(r=a.sent(),se(i=r.requestType,n,"internal-error"),i){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":se(r.newEmail,n,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":se(r.mfaInfo,n,"internal-error");default:se(r.email,n,"internal-error")}return o=null,r.mfaInfo&&(o=Zt._fromServerResponse(ot(n),r.mfaInfo)),[2,{data:{email:("VERIFY_AND_CHANGE_EMAIL"===r.requestType?r.newEmail:r.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===r.requestType?r.email:r.newEmail)||null,multiFactorInfo:o},operation:i}]}}))}))}function rn(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Te(e,"POST","/v1/accounts:createAuthUri",be(e,t))]}))}))}function on(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){return[2,Te(e,"POST","/v1/accounts:update",t)]}))}))}function an(e,t,n){return q.__awaiter(this,void 0,void 0,(function(){var r,i,o,a;return q.__generator(this,(function(s){switch(s.label){case 0:return r=e.auth,[4,e.getIdToken()];case 1:return i=s.sent(),o={idToken:i,returnSecureToken:!0},t&&(o.email=t),n&&(o.password=n),[4,Me(e,lt(r,o))];case 2:return a=s.sent(),[4,e._updateTokensIfNecessary(a,!0)];case 3:return s.sent(),[2]}}))}))}var sn=function(e,t,n){void 0===n&&(n={}),this.isNewUser=e,this.providerId=t,this.profile=n},un=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r)||this;return o.username=i,o}return q.__extends(t,e),t}(sn),cn=function(e){function t(t,n){return e.call(this,t,"facebook.com",n)||this}return q.__extends(t,e),t}(sn),dn=function(e){function t(t,n){return e.call(this,t,"github.com",n,"string"==typeof(null==n?void 0:n.login)?null==n?void 0:n.login:null)||this}return q.__extends(t,e),t}(un),ln=function(e){function t(t,n){return e.call(this,t,"google.com",n)||this}return q.__extends(t,e),t}(sn),hn=function(e){function t(t,n,r){return e.call(this,t,"twitter.com",n,r)||this}return q.__extends(t,e),t}(un);var fn=function(){function e(e,t,n){this.type=e,this.credential=t,this.auth=n}return e._fromIdtoken=function(t,n){return new e("enroll",t,n)},e._fromMfaPendingCredential=function(t){return new e("signin",t)},e.prototype.toJSON=function(){var e;return{multiFactorSession:(e={},e["enroll"===this.type?"idToken":"pendingCredential"]=this.credential,e)}},e.fromJSON=function(t){var n,r;if(null==t?void 0:t.multiFactorSession){if(null===(n=t.multiFactorSession)||void 0===n?void 0:n.pendingCredential)return e._fromMfaPendingCredential(t.multiFactorSession.pendingCredential);if(null===(r=t.multiFactorSession)||void 0===r?void 0:r.idToken)return e._fromIdtoken(t.multiFactorSession.idToken)}return null},e}(),pn=function(){function e(e,t,n){this.session=e,this.hints=t,this.signInResolver=n}return e._fromError=function(t,n){var r=this,i=ot(t),o=n.customData._serverResponse,a=(o.mfaInfo||[]).map((function(e){return Zt._fromServerResponse(i,e)}));se(o.mfaPendingCredential,i,"internal-error");var s=fn._fromMfaPendingCredential(o.mfaPendingCredential);return new e(s,a,(function(e){return q.__awaiter(r,void 0,void 0,(function(){var t,r,a;return q.__generator(this,(function(u){switch(u.label){case 0:return[4,e._process(i,s)];case 1:switch(t=u.sent(),delete o.mfaInfo,delete o.mfaPendingCredential,r=q.__assign(q.__assign({},o),{idToken:t.idToken,refreshToken:t.refreshToken}),n.operationType){case"signIn":return[3,2];case"reauthenticate":return[3,5]}return[3,6];case 2:return[4,jt._fromIdTokenResponse(i,n.operationType,r)];case 3:return a=u.sent(),[4,i._updateCurrentUser(a.user)];case 4:return u.sent(),[2,a];case 5:return se(n.user,i,"internal-error"),[2,jt._forOperation(n.user,n.operationType,r)];case 6:re(i,"internal-error"),u.label=7;case 7:return[2]}}))}))}))},e.prototype.resolveSignIn=function(e){return q.__awaiter(this,void 0,void 0,(function(){var t;return q.__generator(this,(function(n){return t=e,[2,this.signInResolver(t)]}))}))},e}();function _n(e,t){return Te(e,"POST","/v2/accounts/mfaEnrollment:start",be(e,t))}var vn=function(){function e(e){var t=this;this.user=e,this.enrolledFactors=[],e._onReload((function(n){n.mfaInfo&&(t.enrolledFactors=n.mfaInfo.map((function(t){return Zt._fromServerResponse(e.auth,t)})))}))}return e._fromUser=function(t){return new e(t)},e.prototype.getSession=function(){return q.__awaiter(this,void 0,void 0,(function(){var e,t;return q.__generator(this,(function(n){switch(n.label){case 0:return t=(e=fn)._fromIdtoken,[4,this.user.getIdToken()];case 1:return[2,t.apply(e,[n.sent(),this.user.auth])]}}))}))},e.prototype.enroll=function(e,t){return q.__awaiter(this,void 0,void 0,(function(){var n,r,i;return q.__generator(this,(function(o){switch(o.label){case 0:return n=e,[4,this.getSession()];case 1:return r=o.sent(),[4,Me(this.user,n._process(this.user.auth,r,t))];case 2:return i=o.sent(),[4,this.user._updateTokensIfNecessary(i)];case 3:return o.sent(),[2,this.user.reload()]}}))}))},e.prototype.unenroll=function(e){return q.__awaiter(this,void 0,void 0,(function(){var t,n,r,i;return q.__generator(this,(function(o){switch(o.label){case 0:return t="string"==typeof e?e:e.uid,[4,this.user.getIdToken()];case 1:return n=o.sent(),[4,Me(this.user,(a=this.user.auth,s={idToken:n,mfaEnrollmentId:t},Te(a,"POST","/v2/accounts/mfaEnrollment:withdraw",be(a,s))))];case 2:return r=o.sent(),this.enrolledFactors=this.enrolledFactors.filter((function(e){return e.uid!==t})),[4,this.user._updateTokensIfNecessary(r)];case 3:o.sent(),o.label=4;case 4:return o.trys.push([4,6,,7]),[4,this.user.reload()];case 5:return o.sent(),[3,7];case 6:if((null==(i=o.sent())?void 0:i.code)!=="auth/".concat("user-token-expired"))throw i;return[3,7];case 7:return[2]}var a,s}))}))},e}(),mn=new WeakMap;var gn="@firebase/auth",In=function(){function e(e){this.auth=e,this.internalListeners=new Map}return e.prototype.getUid=function(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null},e.prototype.getToken=function(e){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(t){switch(t.label){case 0:return this.assertAuthConfigured(),[4,this.auth._initializationPromise];case 1:return t.sent(),this.auth.currentUser?[4,this.auth.currentUser.getIdToken(e)]:[2,null];case 2:return[2,{accessToken:t.sent()}]}}))}))},e.prototype.addAuthTokenListener=function(e){if(this.assertAuthConfigured(),!this.internalListeners.has(e)){var t=this.auth.onIdTokenChanged((function(t){e((null==t?void 0:t.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}},e.prototype.removeAuthTokenListener=function(e){this.assertAuthConfigured();var t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())},e.prototype.assertAuthConfigured=function(){se(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")},e.prototype.updateProactiveRefresh=function(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()},e}();function yn(e,t){return Te(e,"POST","/v2/accounts/mfaSignIn:start",be(e,t))}function bn(e){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(t){switch(t.label){case 0:return[4,Te(e,"GET","/v1/recaptchaParams")];case 1:return[2,t.sent().recaptchaSiteKey||""]}}))}))}function Tn(){return window}function En(){return void 0!==Tn().WorkerGlobalScope&&"function"==typeof Tn().importScripts}function An(e){return new Promise((function(t,n){var r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=function(e){var t=ie("internal-error");t.customData=e,n(t)},r.type="text/javascript",r.charset="UTF-8",function(){var e,t;return null!==(t=null===(e=document.getElementsByTagName("head"))||void 0===e?void 0:e[0])&&void 0!==t?t:document}().appendChild(r)}))}function wn(e){return"__".concat(e).concat(Math.floor(1e6*Math.random()))}var On=function(){function e(e){this.auth=e,this.counter=1e12,this._widgets=new Map}return e.prototype.render=function(e,t){var n=this.counter;return this._widgets.set(n,new Sn(e,this.auth.name,t||{})),this.counter++,n},e.prototype.reset=function(e){var t,n=e||1e12;null===(t=this._widgets.get(n))||void 0===t||t.delete(),this._widgets.delete(n)},e.prototype.getResponse=function(e){var t,n=e||1e12;return(null===(t=this._widgets.get(n))||void 0===t?void 0:t.getResponse())||""},e.prototype.execute=function(e){var t;return q.__awaiter(this,void 0,void 0,(function(){var n;return q.__generator(this,(function(r){return n=e||1e12,null===(t=this._widgets.get(n))||void 0===t||t.execute(),[2,""]}))}))},e}(),Sn=function(){function e(e,t,n){var r=this;this.params=n,this.timerId=null,this.deleted=!1,this.responseToken=null,this.clickHandler=function(){r.execute()};var i="string"==typeof e?document.getElementById(e):e;se(i,"argument-error",{appName:t}),this.container=i,this.isVisible="invisible"!==this.params.size,this.isVisible?this.execute():this.container.addEventListener("click",this.clickHandler)}return e.prototype.getResponse=function(){return this.checkIfDeleted(),this.responseToken},e.prototype.delete=function(){this.checkIfDeleted(),this.deleted=!0,this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.container.removeEventListener("click",this.clickHandler)},e.prototype.execute=function(){var e=this;this.checkIfDeleted(),this.timerId||(this.timerId=window.setTimeout((function(){e.responseToken=function(e){for(var t=[],n="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r=0;r<e;r++)t.push(n.charAt(Math.floor(Math.random()*n.length)));return t.join("")}(50);var t=e.params,n=t.callback,r=t["expired-callback"];if(n)try{n(e.responseToken)}catch(e){}e.timerId=window.setTimeout((function(){if(e.timerId=null,e.responseToken=null,r)try{r()}catch(e){}e.isVisible&&e.execute()}),6e4)}),500))},e.prototype.checkIfDeleted=function(){if(this.deleted)throw new Error("reCAPTCHA mock was already deleted!")},e}();var kn=wn("rcb"),Nn=new _e(3e4,6e4),Rn=function(){function e(){var e;this.hostLanguage="",this.counter=0,this.librarySeparatelyLoaded=!!(null===(e=Tn().grecaptcha)||void 0===e?void 0:e.render)}return e.prototype.load=function(e,t){var n=this;return void 0===t&&(t=""),se(function(e){return e.length<=6&&/^\s*[a-zA-Z0-9\-]*\s*$/.test(e)}(t),e,"argument-error"),this.shouldResolveImmediately(t)?Promise.resolve(Tn().grecaptcha):new Promise((function(r,i){var o=Tn().setTimeout((function(){i(ie(e,"network-request-failed"))}),Nn.get());Tn()[kn]=function(){Tn().clearTimeout(o),delete Tn()[kn];var a=Tn().grecaptcha;if(a){var s=a.render;a.render=function(e,t){var r=s(e,t);return n.counter++,r},n.hostLanguage=t,r(a)}else i(ie(e,"internal-error"))},An("".concat("https://www.google.com/recaptcha/api.js?","?").concat(K.querystring({onload:kn,render:"explicit",hl:t}))).catch((function(){clearTimeout(o),i(ie(e,"internal-error"))}))}))},e.prototype.clearedOneInstance=function(){this.counter--},e.prototype.shouldResolveImmediately=function(e){var t;return!!(null===(t=Tn().grecaptcha)||void 0===t?void 0:t.render)&&(e===this.hostLanguage||this.counter>0||this.librarySeparatelyLoaded)},e}();var Pn=function(){function e(){}return e.prototype.load=function(e){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(t){return[2,new On(e)]}))}))},e.prototype.clearedOneInstance=function(){},e}(),Cn={theme:"light",type:"image"},Dn=function(){function e(e,t,n){void 0===t&&(t=q.__assign({},Cn)),this.parameters=t,this.type="recaptcha",this.destroyed=!1,this.widgetId=null,this.tokenChangeListeners=new Set,this.renderPromise=null,this.recaptcha=null,this.auth=ot(n),this.isInvisible="invisible"===this.parameters.size,se("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment");var r="string"==typeof e?document.getElementById(e):e;se(r,this.auth,"argument-error"),this.container=r,this.parameters.callback=this.makeTokenCallback(this.parameters.callback),this._recaptchaLoader=this.auth.settings.appVerificationDisabledForTesting?new Pn:new Rn,this.validateStartingState()}return e.prototype.verify=function(){return q.__awaiter(this,void 0,void 0,(function(){var e,t,n,r=this;return q.__generator(this,(function(i){switch(i.label){case 0:return this.assertNotDestroyed(),[4,this.render()];case 1:return e=i.sent(),t=this.getAssertedRecaptcha(),(n=t.getResponse(e))?[2,n]:[2,new Promise((function(n){var i=function(e){e&&(r.tokenChangeListeners.delete(i),n(e))};r.tokenChangeListeners.add(i),r.isInvisible&&t.execute(e)}))]}}))}))},e.prototype.render=function(){var e=this;try{this.assertNotDestroyed()}catch(e){return Promise.reject(e)}return this.renderPromise||(this.renderPromise=this.makeRenderPromise().catch((function(t){throw e.renderPromise=null,t}))),this.renderPromise},e.prototype._reset=function(){this.assertNotDestroyed(),null!==this.widgetId&&this.getAssertedRecaptcha().reset(this.widgetId)},e.prototype.clear=function(){var e=this;this.assertNotDestroyed(),this.destroyed=!0,this._recaptchaLoader.clearedOneInstance(),this.isInvisible||this.container.childNodes.forEach((function(t){e.container.removeChild(t)}))},e.prototype.validateStartingState=function(){se(!this.parameters.sitekey,this.auth,"argument-error"),se(this.isInvisible||!this.container.hasChildNodes(),this.auth,"argument-error"),se("undefined"!=typeof document,this.auth,"operation-not-supported-in-this-environment")},e.prototype.makeTokenCallback=function(e){var t=this;return function(n){if(t.tokenChangeListeners.forEach((function(e){return e(n)})),"function"==typeof e)e(n);else if("string"==typeof e){var r=Tn()[e];"function"==typeof r&&r(n)}}},e.prototype.assertNotDestroyed=function(){se(!this.destroyed,this.auth,"internal-error")},e.prototype.makeRenderPromise=function(){return q.__awaiter(this,void 0,void 0,(function(){var e,t;return q.__generator(this,(function(n){switch(n.label){case 0:return[4,this.init()];case 1:return n.sent(),this.widgetId||(e=this.container,this.isInvisible||(t=document.createElement("div"),e.appendChild(t),e=t),this.widgetId=this.getAssertedRecaptcha().render(e,this.parameters)),[2,this.widgetId]}}))}))},e.prototype.init=function(){return q.__awaiter(this,void 0,void 0,(function(){var e,t;return q.__generator(this,(function(n){switch(n.label){case 0:return se(fe()&&!En(),this.auth,"internal-error"),[4,(r=null,new Promise((function(e){"complete"!==document.readyState?(r=function(){return e()},window.addEventListener("load",r)):e()})).catch((function(e){throw r&&window.removeEventListener("load",r),e})))];case 1:return n.sent(),e=this,[4,this._recaptchaLoader.load(this.auth,this.auth.languageCode||void 0)];case 2:return e.recaptcha=n.sent(),[4,bn(this.auth)];case 3:return se(t=n.sent(),this.auth,"internal-error"),this.parameters.sitekey=t,[2]}var r}))}))},e.prototype.getAssertedRecaptcha=function(){return se(this.recaptcha,this.auth,"internal-error"),this.recaptcha},e}();var Ln=function(){function e(e,t){this.verificationId=e,this.onConfirmation=t}return e.prototype.confirm=function(e){var t=St._fromVerification(this.verificationId,e);return this.onConfirmation(t)},e}();function Mn(e,t,n){var r;return q.__awaiter(this,void 0,void 0,(function(){var i,o,a,s;return q.__generator(this,(function(u){switch(u.label){case 0:return[4,n.verify()];case 1:i=u.sent(),u.label=2;case 2:return u.trys.push([2,,10,11]),se("string"==typeof i,e,"argument-error"),se("recaptcha"===n.type,e,"argument-error"),o=void 0,"session"in(o="string"==typeof t?{phoneNumber:t}:t)?(a=o.session,"phoneNumber"in o?(se("enroll"===a.type,e,"internal-error"),[4,_n(e,{idToken:a.credential,phoneEnrollmentInfo:{phoneNumber:o.phoneNumber,recaptchaToken:i}})]):[3,4]):[3,7];case 3:return[2,u.sent().phoneSessionInfo.sessionInfo];case 4:return se("signin"===a.type,e,"internal-error"),se(s=(null===(r=o.multiFactorHint)||void 0===r?void 0:r.uid)||o.multiFactorUid,e,"missing-multi-factor-info"),[4,yn(e,{mfaPendingCredential:a.credential,mfaEnrollmentId:s,phoneSignInInfo:{recaptchaToken:i}})];case 5:return[2,u.sent().phoneResponseInfo.sessionInfo];case 6:return[3,9];case 7:return[4,wt(e,{phoneNumber:o.phoneNumber,recaptchaToken:i})];case 8:return[2,u.sent().sessionInfo];case 9:return[3,11];case 10:return n._reset(),[7];case 11:return[2]}}))}))}var Un=function(){function e(t){this.providerId=e.PROVIDER_ID,this.auth=ot(t)}return e.prototype.verifyPhoneNumber=function(e,t){return Mn(this.auth,e,K.getModularInstance(t))},e.credential=function(e,t){return St._fromVerification(e,t)},e.credentialFromResult=function(t){var n=t;return e.credentialFromTaggedObject(n)},e.credentialFromError=function(t){return e.credentialFromTaggedObject(t.customData||{})},e.credentialFromTaggedObject=function(e){var t=e._tokenResponse;if(!t)return null;var n=t,r=n.phoneNumber,i=n.temporaryProof;return r&&i?St._fromTokenResponse(r,i):null},e.PROVIDER_ID="phone",e.PHONE_SIGN_IN_METHOD="phone",e}(),Fn=function(e){function t(t){var n=e.call(this,"phone")||this;return n.credential=t,n}return q.__extends(t,e),t._fromCredential=function(e){return new t(e)},t.prototype._finalizeEnroll=function(e,t,n){return function(e,t){return Te(e,"POST","/v2/accounts/mfaEnrollment:finalize",be(e,t))}(e,{idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()})},t.prototype._finalizeSignIn=function(e,t){return function(e,t){return Te(e,"POST","/v2/accounts/mfaSignIn:finalize",be(e,t))}(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()})},t}(function(){function e(e){this.factorId=e}return e.prototype._process=function(e,t,n){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,n);case"signin":return this._finalizeSignIn(e,t.credential);default:return ue("unexpected MultiFactorSessionType")}},e}()),xn=function(){function e(){}return e.assertion=function(e){return Fn._fromCredential(e)},e.FACTOR_ID="phone",e}();i.AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY={ADMIN_ONLY_OPERATION:"auth/admin-restricted-operation",ARGUMENT_ERROR:"auth/argument-error",APP_NOT_AUTHORIZED:"auth/app-not-authorized",APP_NOT_INSTALLED:"auth/app-not-installed",CAPTCHA_CHECK_FAILED:"auth/captcha-check-failed",CODE_EXPIRED:"auth/code-expired",CORDOVA_NOT_READY:"auth/cordova-not-ready",CORS_UNSUPPORTED:"auth/cors-unsupported",CREDENTIAL_ALREADY_IN_USE:"auth/credential-already-in-use",CREDENTIAL_MISMATCH:"auth/custom-token-mismatch",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"auth/requires-recent-login",DEPENDENT_SDK_INIT_BEFORE_AUTH:"auth/dependent-sdk-initialized-before-auth",DYNAMIC_LINK_NOT_ACTIVATED:"auth/dynamic-link-not-activated",EMAIL_CHANGE_NEEDS_VERIFICATION:"auth/email-change-needs-verification",EMAIL_EXISTS:"auth/email-already-in-use",EMULATOR_CONFIG_FAILED:"auth/emulator-config-failed",EXPIRED_OOB_CODE:"auth/expired-action-code",EXPIRED_POPUP_REQUEST:"auth/cancelled-popup-request",INTERNAL_ERROR:"auth/internal-error",INVALID_API_KEY:"auth/invalid-api-key",INVALID_APP_CREDENTIAL:"auth/invalid-app-credential",INVALID_APP_ID:"auth/invalid-app-id",INVALID_AUTH:"auth/invalid-user-token",INVALID_AUTH_EVENT:"auth/invalid-auth-event",INVALID_CERT_HASH:"auth/invalid-cert-hash",INVALID_CODE:"auth/invalid-verification-code",INVALID_CONTINUE_URI:"auth/invalid-continue-uri",INVALID_CORDOVA_CONFIGURATION:"auth/invalid-cordova-configuration",INVALID_CUSTOM_TOKEN:"auth/invalid-custom-token",INVALID_DYNAMIC_LINK_DOMAIN:"auth/invalid-dynamic-link-domain",INVALID_EMAIL:"auth/invalid-email",INVALID_EMULATOR_SCHEME:"auth/invalid-emulator-scheme",INVALID_IDP_RESPONSE:"auth/invalid-credential",INVALID_MESSAGE_PAYLOAD:"auth/invalid-message-payload",INVALID_MFA_SESSION:"auth/invalid-multi-factor-session",INVALID_OAUTH_CLIENT_ID:"auth/invalid-oauth-client-id",INVALID_OAUTH_PROVIDER:"auth/invalid-oauth-provider",INVALID_OOB_CODE:"auth/invalid-action-code",INVALID_ORIGIN:"auth/unauthorized-domain",INVALID_PASSWORD:"auth/wrong-password",INVALID_PERSISTENCE:"auth/invalid-persistence-type",INVALID_PHONE_NUMBER:"auth/invalid-phone-number",INVALID_PROVIDER_ID:"auth/invalid-provider-id",INVALID_RECIPIENT_EMAIL:"auth/invalid-recipient-email",INVALID_SENDER:"auth/invalid-sender",INVALID_SESSION_INFO:"auth/invalid-verification-id",INVALID_TENANT_ID:"auth/invalid-tenant-id",MFA_INFO_NOT_FOUND:"auth/multi-factor-info-not-found",MFA_REQUIRED:"auth/multi-factor-auth-required",MISSING_ANDROID_PACKAGE_NAME:"auth/missing-android-pkg-name",MISSING_APP_CREDENTIAL:"auth/missing-app-credential",MISSING_AUTH_DOMAIN:"auth/auth-domain-config-required",MISSING_CODE:"auth/missing-verification-code",MISSING_CONTINUE_URI:"auth/missing-continue-uri",MISSING_IFRAME_START:"auth/missing-iframe-start",MISSING_IOS_BUNDLE_ID:"auth/missing-ios-bundle-id",MISSING_OR_INVALID_NONCE:"auth/missing-or-invalid-nonce",MISSING_MFA_INFO:"auth/missing-multi-factor-info",MISSING_MFA_SESSION:"auth/missing-multi-factor-session",MISSING_PHONE_NUMBER:"auth/missing-phone-number",MISSING_SESSION_INFO:"auth/missing-verification-id",MODULE_DESTROYED:"auth/app-deleted",NEED_CONFIRMATION:"auth/account-exists-with-different-credential",NETWORK_REQUEST_FAILED:"auth/network-request-failed",NULL_USER:"auth/null-user",NO_AUTH_EVENT:"auth/no-auth-event",NO_SUCH_PROVIDER:"auth/no-such-provider",OPERATION_NOT_ALLOWED:"auth/operation-not-allowed",OPERATION_NOT_SUPPORTED:"auth/operation-not-supported-in-this-environment",POPUP_BLOCKED:"auth/popup-blocked",POPUP_CLOSED_BY_USER:"auth/popup-closed-by-user",PROVIDER_ALREADY_LINKED:"auth/provider-already-linked",QUOTA_EXCEEDED:"auth/quota-exceeded",REDIRECT_CANCELLED_BY_USER:"auth/redirect-cancelled-by-user",REDIRECT_OPERATION_PENDING:"auth/redirect-operation-pending",REJECTED_CREDENTIAL:"auth/rejected-credential",SECOND_FACTOR_ALREADY_ENROLLED:"auth/second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"auth/maximum-second-factor-count-exceeded",TENANT_ID_MISMATCH:"auth/tenant-id-mismatch",TIMEOUT:"auth/timeout",TOKEN_EXPIRED:"auth/user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"auth/too-many-requests",UNAUTHORIZED_DOMAIN:"auth/unauthorized-continue-uri",UNSUPPORTED_FIRST_FACTOR:"auth/unsupported-first-factor",UNSUPPORTED_PERSISTENCE:"auth/unsupported-persistence-type",UNSUPPORTED_TENANT_OPERATION:"auth/unsupported-tenant-operation",UNVERIFIED_EMAIL:"auth/unverified-email",USER_CANCELLED:"auth/user-cancelled",USER_DELETED:"auth/user-not-found",USER_DISABLED:"auth/user-disabled",USER_MISMATCH:"auth/user-mismatch",USER_SIGNED_OUT:"auth/user-signed-out",WEAK_PASSWORD:"auth/weak-password",WEB_STORAGE_UNSUPPORTED:"auth/web-storage-unsupported",ALREADY_INITIALIZED:"auth/already-initialized"},i.ActionCodeOperation={EMAIL_SIGNIN:"EMAIL_SIGNIN",PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:"REVERT_SECOND_FACTOR_ADDITION",VERIFY_AND_CHANGE_EMAIL:"VERIFY_AND_CHANGE_EMAIL",VERIFY_EMAIL:"VERIFY_EMAIL"},i.ActionCodeURL=kt,i.AuthCredential=ct,i.AuthImpl=it,i.BaseOAuthProvider=Pt,i.Delay=_e,i.EmailAuthCredential=bt,i.EmailAuthProvider=Nt,i.FacebookAuthProvider=Dt,i.FactorId={PHONE:"phone"},i.FederatedAuthProvider=Rt,i.FetchProvider=ge,i.GithubAuthProvider=Mt,i.GoogleAuthProvider=Lt,i.OAuthCredential=At,i.OAuthProvider=Ct,i.OperationType={LINK:"link",REAUTHENTICATE:"reauthenticate",SIGN_IN:"signIn"},i.PhoneAuthCredential=St,i.PhoneAuthProvider=Un,i.PhoneMultiFactorGenerator=xn,i.ProviderId={FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PASSWORD:"password",PHONE:"phone",TWITTER:"twitter.com"},i.RecaptchaVerifier=Dn,i.SAMLAuthCredential=Ut,i.SAMLAuthProvider=Ft,i.STORAGE_AVAILABLE_KEY="__sak",i.SignInMethod={EMAIL_LINK:"emailLink",EMAIL_PASSWORD:"password",FACEBOOK:"facebook.com",GITHUB:"github.com",GOOGLE:"google.com",PHONE:"phone",TWITTER:"twitter.com"},i.TwitterAuthProvider=xt,i.UserImpl=He,i._assert=se,i._assertInstanceOf=function(e,t,n){if(!(t instanceof n))throw n.name!==t.constructor.name&&re(e,"argument-error"),oe(e,"argument-error","Type of ".concat(t.constructor.name," does not match expected instance.")+"Did you pass a reference from a different Auth SDK?")},i._assertLinkedStatus=qt,i._castAuth=ot,i._createError=ie,i._emulatorUrl=ve,i._fail=re,i._generateCallbackName=wn,i._getActiveServiceWorker=function(){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(e){switch(e.label){case 0:if(!(null===navigator||void 0===navigator?void 0:navigator.serviceWorker))return[2,null];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,navigator.serviceWorker.ready];case 2:return[2,e.sent().active];case 3:return e.sent(),[2,null];case 4:return[2]}}))}))},i._getClientVersion=nt,i._getCurrentUrl=he,i._getInstance=le,i._getServiceWorkerController=function(){var e;return(null===(e=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===e?void 0:e.controller)||null},i._getWorkerGlobalScope=function(){return En()?self:null},i._isAndroid=Qe,i._isChromeIOS=Xe,i._isFirefox=Je,i._isIE10=function(){return K.isIE()&&10===document.documentMode},i._isIOS=tt,i._isIOS7Or8=function(e){return void 0===e&&(e=K.getUA()),/(iPad|iPhone|iPod).*OS 7_\d/i.test(e)||/(iPad|iPhone|iPod).*OS 8_\d/i.test(e)},i._isIOSStandalone=function(e){var t;return void 0===e&&(e=K.getUA()),tt(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)},i._isIframe=function(){try{return!(!window||window===window.top)}catch(e){return!1}},i._isMobileBrowser=function(e){return void 0===e&&(e=K.getUA()),tt(e)||Qe(e)||et(e)||Ze(e)||/windows phone/i.test(e)||$e(e)},i._isSafari=Ye,i._isWorker=En,i._link=Bt,i._loadJS=An,i._performApiRequest=Te,i._persistenceKeyName=Be,i._reauthenticate=Kt,i._setWindowLocation=function(e){Tn().location.href=e},i._signInWithCredential=Jt,i._window=Tn,i.applyActionCode=function(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){switch(n.label){case 0:return[4,ht(K.getModularInstance(e),{oobCode:t})];case 1:return n.sent(),[2]}}))}))},i.beforeAuthStateChanged=function(e,t,n){return K.getModularInstance(e).beforeAuthStateChanged(t,n)},i.checkActionCode=nn,i.confirmPasswordReset=function(e,t,n){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(r){switch(r.label){case 0:return[4,dt(K.getModularInstance(e),{oobCode:t,newPassword:n})];case 1:return r.sent(),[2]}}))}))},i.connectAuthEmulator=function(e,t,n){var r=ot(e);se(r._canInitEmulator,r,"emulator-config-failed"),se(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");var i=!!(null==n?void 0:n.disableWarnings),o=st(t),a=function(e){var t=st(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};var r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i)return{host:o=i[1],port:ut(r.substr(o.length+1))};var o,a=r.split(":");return{host:o=a[0],port:ut(a[1])}}(t),s=a.host,u=a.port,c=null===u?"":":".concat(u);r.config.emulator={url:"".concat(o,"//").concat(s).concat(c,"/")},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:s,port:u,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||function(){function e(){var e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials.");"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()},i.createUserWithEmailAndPassword=function(e,t,n){return q.__awaiter(this,void 0,void 0,(function(){var r,i,o;return q.__generator(this,(function(a){switch(a.label){case 0:return[4,Vt(r=ot(e),{returnSecureToken:!0,email:t,password:n})];case 1:return i=a.sent(),[4,jt._fromIdTokenResponse(r,"signIn",i)];case 2:return o=a.sent(),[4,r._updateCurrentUser(o.user)];case 3:return a.sent(),[2,o]}}))}))},i.debugAssert=ce,i.debugErrorMap=Q,i.deleteUser=function(e){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(t){return[2,K.getModularInstance(e).delete()]}))}))},i.fetchSignInMethodsForEmail=function(e,t){return q.__awaiter(this,void 0,void 0,(function(){var n,r;return q.__generator(this,(function(i){switch(i.label){case 0:return n=fe()?he():"http://localhost",r={identifier:t,continueUri:n},[4,rn(K.getModularInstance(e),r)];case 1:return[2,i.sent().signinMethods||[]]}}))}))},i.getAdditionalUserInfo=function(e){var t=e,n=t.user,r=t._tokenResponse;return n.isAnonymous&&!r?{providerId:null,isNewUser:!1,profile:null}:function(e){var t,n;if(!e)return null;var r=e.providerId,i=e.rawUserInfo?JSON.parse(e.rawUserInfo):{},o=e.isNewUser||"identitytoolkit#SignupNewUserResponse"===e.kind;if(!r&&(null==e?void 0:e.idToken)){var a=null===(n=null===(t=Le(e.idToken))||void 0===t?void 0:t.firebase)||void 0===n?void 0:n.sign_in_provider;if(a)return new sn(o,"anonymous"!==a&&"custom"!==a?a:null)}if(!r)return null;switch(r){case"facebook.com":return new cn(o,i);case"github.com":return new dn(o,i);case"google.com":return new ln(o,i);case"twitter.com":return new hn(o,i,e.screenName||null);case"custom":case"anonymous":return new sn(o,null);default:return new sn(o,r,i)}}(r)},i.getIdToken=function(e,t){return void 0===t&&(t=!1),K.getModularInstance(e).getIdToken(t)},i.getIdTokenResult=Ce,i.getMultiFactorResolver=function(e,t){var n,r=K.getModularInstance(e),i=t;return se(t.customData.operationType,r,"argument-error"),se(null===(n=i.customData._serverResponse)||void 0===n?void 0:n.mfaPendingCredential,r,"argument-error"),pn._fromError(r,i)},i.inMemoryPersistence=Ge,i.initializeAuth=function(e,t){var n=J._getProvider(e,"auth");if(n.isInitialized()){var r=n.getImmediate(),i=n.getOptions();if(K.deepEqual(i,null!=t?t:{}))return r;re(r,"already-initialized")}return n.initialize({options:t})},i.isSignInWithEmailLink=function(e,t){var n=kt.parseLink(t);return"EMAIL_SIGNIN"===(null==n?void 0:n.operation)},i.linkWithCredential=Xt,i.linkWithPhoneNumber=function(e,t,n){return q.__awaiter(this,void 0,void 0,(function(){var r,i;return q.__generator(this,(function(o){switch(o.label){case 0:return[4,qt(!1,r=K.getModularInstance(e),"phone")];case 1:return o.sent(),[4,Mn(r.auth,t,K.getModularInstance(n))];case 2:return i=o.sent(),[2,new Ln(i,(function(e){return Xt(r,e)}))]}}))}))},i.multiFactor=function(e){var t=K.getModularInstance(e);return mn.has(t)||mn.set(t,vn._fromUser(t)),mn.get(t)},i.onAuthStateChanged=function(e,t,n,r){return K.getModularInstance(e).onAuthStateChanged(t,n,r)},i.onIdTokenChanged=function(e,t,n,r){return K.getModularInstance(e).onIdTokenChanged(t,n,r)},i.parseActionCodeURL=function(e){return kt.parseLink(e)},i.prodErrorMap=Z,i.reauthenticateWithCredential=$t,i.reauthenticateWithPhoneNumber=function(e,t,n){return q.__awaiter(this,void 0,void 0,(function(){var r,i;return q.__generator(this,(function(o){switch(o.label){case 0:return[4,Mn((r=K.getModularInstance(e)).auth,t,K.getModularInstance(n))];case 1:return i=o.sent(),[2,new Ln(i,(function(e){return $t(r,e)}))]}}))}))},i.registerAuth=function(e){J._registerComponent(new Y.Component("auth",(function(t,n){var r=n.options,i=t.getProvider("app").getImmediate(),o=t.getProvider("heartbeat"),a=i.options,s=a.apiKey,u=a.authDomain;return function(t,n){se(s&&!s.includes(":"),"invalid-api-key",{appName:t.name}),se(!(null==u?void 0:u.includes(":")),"argument-error",{appName:t.name});var i={apiKey:s,authDomain:u,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:nt(e)},o=new it(t,n,i);return function(e,t){var n=(null==t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(le);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(o,r),o}(i,o)}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((function(e,t,n){e.getProvider("auth-internal").initialize()}))),J._registerComponent(new Y.Component("auth-internal",(function(e){return function(e){return new In(e)}(ot(e.getProvider("auth").getImmediate()))}),"PRIVATE").setInstantiationMode("EXPLICIT")),J.registerVersion(gn,"0.21.1",function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(e)),J.registerVersion(gn,"0.21.1","cjs5")},i.reload=Ve,i.sendEmailVerification=function(e,t){return q.__awaiter(this,void 0,void 0,(function(){var n,r,i;return q.__generator(this,(function(o){switch(o.label){case 0:return n=K.getModularInstance(e),[4,e.getIdToken()];case 1:return r=o.sent(),i={requestType:"VERIFY_EMAIL",idToken:r},t&&tn(n.auth,i,t),[4,_t(n.auth,i)];case 2:return o.sent().email===e.email?[3,4]:[4,e.reload()];case 3:o.sent(),o.label=4;case 4:return[2]}}))}))},i.sendPasswordResetEmail=function(e,t,n){return q.__awaiter(this,void 0,void 0,(function(){var r,i;return q.__generator(this,(function(o){switch(o.label){case 0:return r=K.getModularInstance(e),i={requestType:"PASSWORD_RESET",email:t},n&&tn(r,i,n),[4,vt(r,i)];case 1:return o.sent(),[2]}}))}))},i.sendSignInLinkToEmail=function(e,t,n){return q.__awaiter(this,void 0,void 0,(function(){var r,i;return q.__generator(this,(function(o){switch(o.label){case 0:return r=K.getModularInstance(e),i={requestType:"EMAIL_SIGNIN",email:t},se(n.handleCodeInApp,r,"argument-error"),n&&tn(r,i,n),[4,mt(r,i)];case 1:return o.sent(),[2]}}))}))},i.setPersistence=function(e,t){return K.getModularInstance(e).setPersistence(t)},i.signInAnonymously=function(e){var t;return q.__awaiter(this,void 0,void 0,(function(){var n,r,i;return q.__generator(this,(function(o){switch(o.label){case 0:return[4,(n=ot(e))._initializationPromise];case 1:return o.sent(),(null===(t=n.currentUser)||void 0===t?void 0:t.isAnonymous)?[2,new jt({user:n.currentUser,providerId:null,operationType:"signIn"})]:[4,Vt(n,{returnSecureToken:!0})];case 2:return r=o.sent(),[4,jt._fromIdTokenResponse(n,"signIn",r,!0)];case 3:return i=o.sent(),[4,n._updateCurrentUser(i.user)];case 4:return o.sent(),[2,i]}}))}))},i.signInWithCredential=Yt,i.signInWithCustomToken=function(e,t){return q.__awaiter(this,void 0,void 0,(function(){var n,r,i;return q.__generator(this,(function(o){switch(o.label){case 0:return[4,Qt(n=ot(e),{token:t,returnSecureToken:!0})];case 1:return r=o.sent(),[4,jt._fromIdTokenResponse(n,"signIn",r)];case 2:return i=o.sent(),[4,n._updateCurrentUser(i.user)];case 3:return o.sent(),[2,i]}}))}))},i.signInWithEmailAndPassword=function(e,t,n){return Yt(K.getModularInstance(e),Nt.credential(t,n))},i.signInWithEmailLink=function(e,t,n){return q.__awaiter(this,void 0,void 0,(function(){var r,i;return q.__generator(this,(function(o){return r=K.getModularInstance(e),se((i=Nt.credentialWithLink(t,n||he()))._tenantId===(r.tenantId||null),r,"tenant-id-mismatch"),[2,Yt(r,i)]}))}))},i.signInWithIdp=Tt,i.signInWithPhoneNumber=function(e,t,n){return q.__awaiter(this,void 0,void 0,(function(){var r,i;return q.__generator(this,(function(o){switch(o.label){case 0:return[4,Mn(r=ot(e),t,K.getModularInstance(n))];case 1:return i=o.sent(),[2,new Ln(i,(function(e){return Yt(r,e)}))]}}))}))},i.signOut=function(e){return K.getModularInstance(e).signOut()},i.unlink=function(e,t){return q.__awaiter(this,void 0,void 0,(function(){var n,r,i,o,a,s;return q.__generator(this,(function(u){switch(u.label){case 0:return[4,qt(!0,n=K.getModularInstance(e),t)];case 1:return u.sent(),i=Ne,o=[n.auth],s={},[4,n.getIdToken()];case 2:return[4,i.apply(void 0,o.concat([(s.idToken=u.sent(),s.deleteProvider=[t],s)]))];case 3:return r=u.sent().providerUserInfo,a=Gt(r||[]),n.providerData=n.providerData.filter((function(e){return a.has(e.providerId)})),a.has("phone")||(n.phoneNumber=null),[4,n.auth._persistUserIfCurrent(n)];case 4:return u.sent(),[2,n]}}))}))},i.updateCurrentUser=function(e,t){return K.getModularInstance(e).updateCurrentUser(t)},i.updateEmail=function(e,t){return an(K.getModularInstance(e),t,null)},i.updatePassword=function(e,t){return an(K.getModularInstance(e),null,t)},i.updatePhoneNumber=function(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){switch(n.label){case 0:return[4,Bt(K.getModularInstance(e),t)];case 1:return n.sent(),[2]}}))}))},i.updateProfile=function(e,t){var n=t.displayName,r=t.photoURL;return q.__awaiter(this,void 0,void 0,(function(){var t,i,o,a,s;return q.__generator(this,(function(u){switch(u.label){case 0:return void 0===n&&void 0===r?[2]:[4,(t=K.getModularInstance(e)).getIdToken()];case 1:return i=u.sent(),o={idToken:i,displayName:n,photoUrl:r,returnSecureToken:!0},[4,Me(t,on(t.auth,o))];case 2:return a=u.sent(),t.displayName=a.displayName||null,t.photoURL=a.photoUrl||null,s=t.providerData.find((function(e){return"password"===e.providerId})),s&&(s.displayName=t.displayName,s.photoURL=t.photoURL),[4,t._updateTokensIfNecessary(a)];case 3:return u.sent(),[2]}}))}))},i.useDeviceLanguage=function(e){K.getModularInstance(e).useDeviceLanguage()},i.verifyBeforeUpdateEmail=function(e,t,n){return q.__awaiter(this,void 0,void 0,(function(){var r,i,o;return q.__generator(this,(function(a){switch(a.label){case 0:return r=K.getModularInstance(e),[4,e.getIdToken()];case 1:return i=a.sent(),o={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:i,newEmail:t},n&&tn(r.auth,o,n),[4,gt(r.auth,o)];case 2:return a.sent().email===e.email?[3,4]:[4,e.reload()];case 3:a.sent(),a.label=4;case 4:return[2]}}))}))},i.verifyPasswordResetCode=function(e,t){return q.__awaiter(this,void 0,void 0,(function(){return q.__generator(this,(function(n){switch(n.label){case 0:return[4,nn(K.getModularInstance(e),t)];case 1:return[2,n.sent().data.email]}}))}))},Object.defineProperty(r,"__esModule",{value:!0});var Vn=t,jn=i,zn=h;function Wn(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var Hn=Wn(e);function Gn(e){var t;return(t=function(){function t(){this.type="LOCAL"}return t.prototype._isAvailable=function(){return zn.__awaiter(this,void 0,void 0,(function(){return zn.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),e?[4,e.setItem(jn.STORAGE_AVAILABLE_KEY,"1")]:[2,!1];case 1:return t.sent(),[4,e.removeItem(jn.STORAGE_AVAILABLE_KEY)];case 2:return t.sent(),[2,!0];case 3:return t.sent(),[2,!1];case 4:return[2]}}))}))},t.prototype._set=function(t,n){return e.setItem(t,JSON.stringify(n))},t.prototype._get=function(t){return zn.__awaiter(this,void 0,void 0,(function(){var n;return zn.__generator(this,(function(r){switch(r.label){case 0:return[4,e.getItem(t)];case 1:return[2,(n=r.sent())?JSON.parse(n):null]}}))}))},t.prototype._remove=function(t){return e.removeItem(t)},t.prototype._addListener=function(e,t){},t.prototype._removeListener=function(e,t){},t}()).type="LOCAL",t}var Bn=Gn({getItem:function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=Hn.AsyncStorage).getItem.apply(e,t)},setItem:function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=Hn.AsyncStorage).setItem.apply(e,t)},removeItem:function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=Hn.AsyncStorage).removeItem.apply(e,t)}});jn.registerAuth("ReactNative");var qn=r.ActionCodeOperation=jn.ActionCodeOperation,Kn=r.ActionCodeURL=jn.ActionCodeURL,Jn=r.AuthCredential=jn.AuthCredential,Yn=r.AuthErrorCodes=jn.AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY,Xn=r.EmailAuthCredential=jn.EmailAuthCredential,$n=r.EmailAuthProvider=jn.EmailAuthProvider,Qn=r.FacebookAuthProvider=jn.FacebookAuthProvider,Zn=r.FactorId=jn.FactorId,er=r.GithubAuthProvider=jn.GithubAuthProvider,tr=r.GoogleAuthProvider=jn.GoogleAuthProvider,nr=r.OAuthCredential=jn.OAuthCredential,rr=r.OAuthProvider=jn.OAuthProvider,ir=r.OperationType=jn.OperationType,or=r.PhoneAuthCredential=jn.PhoneAuthCredential,ar=r.PhoneAuthProvider=jn.PhoneAuthProvider,sr=r.PhoneMultiFactorGenerator=jn.PhoneMultiFactorGenerator,ur=r.ProviderId=jn.ProviderId,cr=r.SAMLAuthProvider=jn.SAMLAuthProvider,dr=r.SignInMethod=jn.SignInMethod,lr=r.TwitterAuthProvider=jn.TwitterAuthProvider,hr=r.applyActionCode=jn.applyActionCode,fr=r.beforeAuthStateChanged=jn.beforeAuthStateChanged,pr=r.checkActionCode=jn.checkActionCode,_r=r.confirmPasswordReset=jn.confirmPasswordReset,vr=r.connectAuthEmulator=jn.connectAuthEmulator,mr=r.createUserWithEmailAndPassword=jn.createUserWithEmailAndPassword,gr=r.debugErrorMap=jn.debugErrorMap,Ir=r.deleteUser=jn.deleteUser,yr=r.fetchSignInMethodsForEmail=jn.fetchSignInMethodsForEmail,br=r.getAdditionalUserInfo=jn.getAdditionalUserInfo,Tr=r.getIdToken=jn.getIdToken,Er=r.getIdTokenResult=jn.getIdTokenResult,Ar=r.getMultiFactorResolver=jn.getMultiFactorResolver,wr=r.inMemoryPersistence=jn.inMemoryPersistence,Or=r.initializeAuth=jn.initializeAuth,Sr=r.isSignInWithEmailLink=jn.isSignInWithEmailLink,kr=r.linkWithCredential=jn.linkWithCredential,Nr=r.linkWithPhoneNumber=jn.linkWithPhoneNumber,Rr=r.multiFactor=jn.multiFactor,Pr=r.onAuthStateChanged=jn.onAuthStateChanged,Cr=r.onIdTokenChanged=jn.onIdTokenChanged,Dr=r.parseActionCodeURL=jn.parseActionCodeURL,Lr=r.prodErrorMap=jn.prodErrorMap,Mr=r.reauthenticateWithCredential=jn.reauthenticateWithCredential,Ur=r.reauthenticateWithPhoneNumber=jn.reauthenticateWithPhoneNumber,Fr=r.reload=jn.reload,xr=r.sendEmailVerification=jn.sendEmailVerification,Vr=r.sendPasswordResetEmail=jn.sendPasswordResetEmail,jr=r.sendSignInLinkToEmail=jn.sendSignInLinkToEmail,zr=r.setPersistence=jn.setPersistence,Wr=r.signInAnonymously=jn.signInAnonymously,Hr=r.signInWithCredential=jn.signInWithCredential,Gr=r.signInWithCustomToken=jn.signInWithCustomToken,Br=r.signInWithEmailAndPassword=jn.signInWithEmailAndPassword,qr=r.signInWithEmailLink=jn.signInWithEmailLink,Kr=r.signInWithPhoneNumber=jn.signInWithPhoneNumber,Jr=r.signOut=jn.signOut,Yr=r.unlink=jn.unlink,Xr=r.updateCurrentUser=jn.updateCurrentUser,$r=r.updateEmail=jn.updateEmail,Qr=r.updatePassword=jn.updatePassword,Zr=r.updatePhoneNumber=jn.updatePhoneNumber,ei=r.updateProfile=jn.updateProfile,ti=r.useDeviceLanguage=jn.useDeviceLanguage,ni=r.verifyBeforeUpdateEmail=jn.verifyBeforeUpdateEmail,ri=r.verifyPasswordResetCode=jn.verifyPasswordResetCode,ii=r.getAuth=function(e){void 0===e&&(e=Vn.getApp());var t=Vn._getProvider(e,"auth");return t.isInitialized()?t.getImmediate():jn.initializeAuth(e,{persistence:Bn})},oi=r.getReactNativePersistence=Gn,ai=r.reactNativeLocalPersistence=Bn;export{qn as ActionCodeOperation,Kn as ActionCodeURL,Jn as AuthCredential,Yn as AuthErrorCodes,Xn as EmailAuthCredential,$n as EmailAuthProvider,Qn as FacebookAuthProvider,Zn as FactorId,er as GithubAuthProvider,tr as GoogleAuthProvider,nr as OAuthCredential,rr as OAuthProvider,ir as OperationType,or as PhoneAuthCredential,ar as PhoneAuthProvider,sr as PhoneMultiFactorGenerator,ur as ProviderId,cr as SAMLAuthProvider,dr as SignInMethod,lr as TwitterAuthProvider,hr as applyActionCode,fr as beforeAuthStateChanged,pr as checkActionCode,_r as confirmPasswordReset,vr as connectAuthEmulator,mr as createUserWithEmailAndPassword,gr as debugErrorMap,Ir as deleteUser,yr as fetchSignInMethodsForEmail,br as getAdditionalUserInfo,ii as getAuth,Tr as getIdToken,Er as getIdTokenResult,Ar as getMultiFactorResolver,oi as getReactNativePersistence,wr as inMemoryPersistence,Or as initializeAuth,Sr as isSignInWithEmailLink,kr as linkWithCredential,Nr as linkWithPhoneNumber,Rr as multiFactor,Pr as onAuthStateChanged,Cr as onIdTokenChanged,Dr as parseActionCodeURL,Lr as prodErrorMap,ai as reactNativeLocalPersistence,Mr as reauthenticateWithCredential,Ur as reauthenticateWithPhoneNumber,Fr as reload,xr as sendEmailVerification,Vr as sendPasswordResetEmail,jr as sendSignInLinkToEmail,zr as setPersistence,Wr as signInAnonymously,Hr as signInWithCredential,Gr as signInWithCustomToken,Br as signInWithEmailAndPassword,qr as signInWithEmailLink,Kr as signInWithPhoneNumber,Jr as signOut,Yr as unlink,Xr as updateCurrentUser,$r as updateEmail,Qr as updatePassword,Zr as updatePhoneNumber,ei as updateProfile,ti as useDeviceLanguage,ni as verifyBeforeUpdateEmail,ri as verifyPasswordResetCode};
  2. //# sourceMappingURL=firebase-auth-react-native.js.map