reactfire 4.2.3-exp.9801ee9 → 4.2.3-exp.a1d5930
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1465,7 +1465,7 @@ function Ce(e) {
|
|
|
1465
1465
|
return { unsubscribe: n };
|
|
1466
1466
|
});
|
|
1467
1467
|
}
|
|
1468
|
-
const Bn = "[DEFAULT]", mt = f.createContext(void 0), Ee = f.createContext(!1), Xn = "4.2.3-exp.
|
|
1468
|
+
const Bn = "[DEFAULT]", mt = f.createContext(void 0), Ee = f.createContext(!1), Xn = "4.2.3-exp.a1d5930", er = (e, t) => e === t || [...Object.keys(e), ...Object.keys(t)].every((n) => e[n] === t[n]);
|
|
1469
1469
|
function Mr(e) {
|
|
1470
1470
|
const { firebaseConfig: t, appName: n, suspense: r } = e, i = f.useMemo(() => {
|
|
1471
1471
|
if (e.firebaseApp)
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(l,W){typeof exports=="object"&&typeof module<"u"?W(exports,require("react"),require("firebase/auth"),require("firebase/database"),require("firebase/app"),require("firebase/firestore"),require("firebase/functions"),require("firebase/storage"),require("firebase/remote-config")):typeof define=="function"&&define.amd?define(["exports","react","firebase/auth","firebase/database","firebase/app","firebase/firestore","firebase/functions","firebase/storage","firebase/remote-config"],W):(l=typeof globalThis<"u"?globalThis:l||self,W(l.ReactFire={},l.React,l.auth,l.database,l.app,l.firestore,l.functions,l.storage,l.remoteConfig))})(this,function(l,W,Wt,T,Z,He,Qt,Ye,V){"use strict";function Kt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const d=Kt(W);var we=function(e,t){return we=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},we(e,t)};function k(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");we(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Ht(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,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}function Se(e,t,n,r){function i(o){return o instanceof n?o:new n(function(u){u(o)})}return new(n||(n=Promise))(function(o,u){function a(f){try{c(r.next(f))}catch(v){u(v)}}function s(f){try{c(r.throw(f))}catch(v){u(v)}}function c(f){f.done?o(f.value):i(f.value).then(a,s)}c((r=r.apply(e,t||[])).next())})}function Ge(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(c){return function(f){return s([c,f])}}function s(c){if(r)throw new TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(f){c=[6,f],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function M(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")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 R(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],u;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){u={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(u)throw u.error}}return o}function x(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function L(e){return this instanceof L?(this.v=e,this):new L(e)}function Yt(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},u("next"),u("throw"),u("return"),i[Symbol.asyncIterator]=function(){return this},i;function u(h){r[h]&&(i[h]=function(y){return new Promise(function(C,p){o.push([h,y,C,p])>1||a(h,y)})})}function a(h,y){try{s(r[h](y))}catch(C){v(o[0][3],C)}}function s(h){h.value instanceof L?Promise.resolve(h.value.v).then(c,f):v(o[0][2],h)}function c(h){a("next",h)}function f(h){a("throw",h)}function v(h,y){h(y),o.shift(),o.length&&a(o[0][0],o[0][1])}}function Gt(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof M=="function"?M(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(u){return new Promise(function(a,s){u=e[o](u),i(a,s,u.done,u.value)})}}function i(o,u,a,s){Promise.resolve(s).then(function(c){o({value:c,done:a})},u)}}typeof SuppressedError=="function"&&SuppressedError;function b(e){return typeof e=="function"}function _e(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Ce=_e(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
2
2
|
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
|
3
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function B(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Q=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var a=M(u),s=a.next();!s.done;s=a.next()){var c=s.value;c.remove(this)}}catch(p){t={error:p}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else u.remove(this);var f=this.initialTeardown;if(b(f))try{f()}catch(p){o=p instanceof Ce?p.errors:[p]}var v=this._finalizers;if(v){this._finalizers=null;try{for(var h=M(v),y=h.next();!y.done;y=h.next()){var C=y.value;try{Ze(C)}catch(p){o=o??[],p instanceof Ce?o=x(x([],R(o)),R(p.errors)):o.push(p)}}}catch(p){r={error:p}}finally{try{y&&!y.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new Ce(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Ze(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&B(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&B(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),ze=Q.EMPTY;function Je(e){return e instanceof Q||e&&"closed"in e&&b(e.remove)&&b(e.add)&&b(e.unsubscribe)}function Ze(e){b(e)?e():e.unsubscribe()}var Be={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ee={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Ee.delegate;return i!=null&&i.setTimeout?i.setTimeout.apply(i,x([e,t],R(n))):setTimeout.apply(void 0,x([e,t],R(n)))},clearTimeout:function(e){var t=Ee.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Xe(e){Ee.setTimeout(function(){throw e})}function Ie(){}function X(e){e()}var ke=function(e){k(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Je(n)&&n.add(r)):r.destination=Bt,r}return t.create=function(n,r,i){return new K(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Q),zt=Function.prototype.bind;function Oe(e,t){return zt.call(e,t)}var Jt=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){ee(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){ee(r)}else ee(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){ee(n)}},e}(),K=function(e){k(t,e);function t(n,r,i){var o=e.call(this)||this,u;if(b(n)||!n)u={next:n??void 0,error:r??void 0,complete:i??void 0};else{var a;o&&Be.useDeprecatedNextContext?(a=Object.create(n),a.unsubscribe=function(){return o.unsubscribe()},u={next:n.next&&Oe(n.next,a),error:n.error&&Oe(n.error,a),complete:n.complete&&Oe(n.complete,a)}):u=n}return o.destination=new Jt(u),o}return t}(ke);function ee(e){Xe(e)}function Zt(e){throw e}var Bt={closed:!0,next:Ie,error:Zt,complete:Ie},Fe=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function H(e){return e}function Xt(e){return e.length===0?H:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var g=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=tn(t)?t:new K(t,n,r);return X(function(){var u=i,a=u.operator,s=u.source;o.add(a?a.call(o,s):s?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=et(n),new n(function(i,o){var u=new K({next:function(a){try{t(a)}catch(s){o(s),u.unsubscribe()}},error:o,complete:i});r.subscribe(u)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Fe]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Xt(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=et(t),new t(function(r,i){var o;n.subscribe(function(u){return o=u},function(u){return i(u)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function et(e){var t;return(t=e??Be.Promise)!==null&&t!==void 0?t:Promise}function en(e){return e&&b(e.next)&&b(e.error)&&b(e.complete)}function tn(e){return e&&e instanceof ke||en(e)&&Je(e)}function nn(e){return b(e==null?void 0:e.lift)}function S(e){return function(t){if(nn(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function _(e,t,n,r,i){return new rn(e,t,n,r,i)}var rn=function(e){k(t,e);function t(n,r,i,o,u,a){var s=e.call(this,n)||this;return s.onFinalize=u,s.shouldUnsubscribe=a,s._next=r?function(c){try{r(c)}catch(f){n.error(f)}}:e.prototype._next,s._error=o?function(c){try{o(c)}catch(f){n.error(f)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t}(ke),on=_e(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),te=function(e){k(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new tt(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new on},t.prototype.next=function(n){var r=this;X(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var u=M(r.currentObservers),a=u.next();!a.done;a=u.next()){var s=a.value;s.next(n)}}catch(c){i={error:c}}finally{try{a&&!a.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;X(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;X(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,u=i.isStopped,a=i.observers;return o||u?ze:(this.currentObservers=null,a.push(n),new Q(function(){r.currentObservers=null,B(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,u=r.isStopped;i?n.error(o):u&&n.complete()},t.prototype.asObservable=function(){var n=new g;return n.source=this,n},t.create=function(n,r){return new tt(n,r)},t}(g),tt=function(e){k(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:ze},t}(te),Ae={now:function(){return(Ae.delegate||Date).now()},delegate:void 0},un=function(e){k(t,e);function t(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=Ae);var o=e.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return t.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,u=r._infiniteTimeWindow,a=r._timestampProvider,s=r._windowTime;i||(o.push(n),!u&&o.push(a.now()+s)),this._trimBuffer(),e.prototype.next.call(this,n)},t.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,u=i._buffer,a=u.slice(),s=0;s<a.length&&!n.closed;s+=o?1:2)n.next(a[s]);return this._checkFinalizedStatuses(n),r},t.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,u=n._infiniteTimeWindow,a=(u?1:2)*r;if(r<1/0&&a<o.length&&o.splice(0,o.length-a),!u){for(var s=i.now(),c=0,f=1;f<o.length&&o[f]<=s;f+=2)c=f;c&&o.splice(0,c+1)}},t}(te),an=function(e){k(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t}(Q),ne={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=ne.delegate;return i!=null&&i.setInterval?i.setInterval.apply(i,x([e,t],R(n))):setInterval.apply(void 0,x([e,t],R(n)))},clearInterval:function(e){var t=ne.delegate;return((t==null?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},sn=function(e){k(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,u=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(u,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(u,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),ne.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&ne.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(u){i=!0,o=u||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,B(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(an),nt=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=Ae.now,e}(),cn=function(e){k(t,e);function t(n,r){r===void 0&&(r=nt.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t}(nt),Pe=new cn(sn),ln=Pe,De=new g(function(e){return e.complete()});function fn(e){return e?dn(e):De}function dn(e){return new g(function(t){return e.schedule(function(){return t.complete()})})}function rt(e){return e&&b(e.schedule)}function it(e){return e[e.length-1]}function $e(e){return rt(it(e))?e.pop():void 0}function vn(e,t){return typeof it(e)=="number"?e.pop():t}var ot=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function ut(e){return b(e==null?void 0:e.then)}function at(e){return b(e[Fe])}function st(e){return Symbol.asyncIterator&&b(e==null?void 0:e[Symbol.asyncIterator])}function ct(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function hn(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var lt=hn();function ft(e){return b(e==null?void 0:e[lt])}function dt(e){return Yt(this,arguments,function(){var n,r,i,o;return Ge(this,function(u){switch(u.label){case 0:n=e.getReader(),u.label=1;case 1:u.trys.push([1,,9,10]),u.label=2;case 2:return[4,L(n.read())];case 3:return r=u.sent(),i=r.value,o=r.done,o?[4,L(void 0)]:[3,5];case 4:return[2,u.sent()];case 5:return[4,L(i)];case 6:return[4,u.sent()];case 7:return u.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function vt(e){return b(e==null?void 0:e.getReader)}function E(e){if(e instanceof g)return e;if(e!=null){if(at(e))return pn(e);if(ot(e))return bn(e);if(ut(e))return mn(e);if(st(e))return ht(e);if(ft(e))return yn(e);if(vt(e))return gn(e)}throw ct(e)}function pn(e){return new g(function(t){var n=e[Fe]();if(b(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function bn(e){return new g(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function mn(e){return new g(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,Xe)})}function yn(e){return new g(function(t){var n,r;try{for(var i=M(e),o=i.next();!o.done;o=i.next()){var u=o.value;if(t.next(u),t.closed)return}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function ht(e){return new g(function(t){wn(e,t).catch(function(n){return t.error(n)})})}function gn(e){return ht(dt(e))}function wn(e,t){var n,r,i,o;return Se(this,void 0,void 0,function(){var u,a;return Ge(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),n=Gt(e),s.label=1;case 1:return[4,n.next()];case 2:if(r=s.sent(),!!r.done)return[3,4];if(u=r.value,t.next(u),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=s.sent(),i={error:a},[3,11];case 6:return s.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function $(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function pt(e,t){return t===void 0&&(t=0),S(function(n,r){n.subscribe(_(r,function(i){return $(r,e,function(){return r.next(i)},t)},function(){return $(r,e,function(){return r.complete()},t)},function(i){return $(r,e,function(){return r.error(i)},t)}))})}function bt(e,t){return t===void 0&&(t=0),S(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function Sn(e,t){return E(e).pipe(bt(t),pt(t))}function _n(e,t){return E(e).pipe(bt(t),pt(t))}function Cn(e,t){return new g(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function En(e,t){return new g(function(n){var r;return $(n,t,function(){r=e[lt](),$(n,t,function(){var i,o,u;try{i=r.next(),o=i.value,u=i.done}catch(a){n.error(a);return}u?n.complete():n.next(o)},0,!0)}),function(){return b(r==null?void 0:r.return)&&r.return()}})}function mt(e,t){if(!e)throw new Error("Iterable cannot be null");return new g(function(n){$(n,t,function(){var r=e[Symbol.asyncIterator]();$(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function In(e,t){return mt(dt(e),t)}function kn(e,t){if(e!=null){if(at(e))return Sn(e,t);if(ot(e))return Cn(e,t);if(ut(e))return _n(e,t);if(st(e))return mt(e,t);if(ft(e))return En(e,t);if(vt(e))return In(e,t)}throw ct(e)}function O(e,t){return t?kn(e,t):E(e)}function re(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=$e(e);return O(e,n)}var yt=_e(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function On(e){return e instanceof Date&&!isNaN(e)}function I(e,t){return S(function(n,r){var i=0;n.subscribe(_(r,function(o){r.next(e.call(t,o,i++))}))})}function Fn(e,t,n,r,i,o,u,a){var s=[],c=0,f=0,v=!1,h=function(){v&&!s.length&&!c&&t.complete()},y=function(p){return c<r?C(p):s.push(p)},C=function(p){o&&t.next(p),c++;var U=!1;E(n(p,f++)).subscribe(_(t,function(D){i==null||i(D),o?y(D):t.next(D)},function(){U=!0},void 0,function(){if(U)try{c--;for(var D=function(){var q=s.shift();u?$(t,u,function(){return C(q)}):C(q)};s.length&&c<r;)D();h()}catch(q){t.error(q)}}))};return e.subscribe(_(t,y,function(){v=!0,h()})),function(){a==null||a()}}function Te(e,t,n){return n===void 0&&(n=1/0),b(t)?Te(function(r,i){return I(function(o,u){return t(r,o,i,u)})(E(e(r,i)))},n):(typeof t=="number"&&(n=t),S(function(r,i){return Fn(r,i,e,n)}))}function gt(e){return e===void 0&&(e=1/0),Te(H,e)}function An(){return gt(1)}function Pn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return An()(O(e,$e(e)))}function Dn(e,t,n){e===void 0&&(e=0),n===void 0&&(n=ln);var r=-1;return t!=null&&(rt(t)?n=t:r=t),new g(function(i){var o=On(e)?+e-n.now():e;o<0&&(o=0);var u=0;return n.schedule(function(){i.closed||(i.next(u++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function $n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=$e(e),r=vn(e,1/0),i=e;return i.length?i.length===1?E(i[0]):gt(r)(O(i,n)):De}function Tn(e,t){return S(function(n,r){var i=0;n.subscribe(_(r,function(o){return e.call(t,o,i++)&&r.next(o)}))})}function wt(e){return S(function(t,n){var r=null,i=!1,o;r=t.subscribe(_(n,void 0,void 0,function(u){o=E(e(u,wt(e)(t))),r?(r.unsubscribe(),r=null,o.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,o.subscribe(n))})}function Rn(e,t,n,r,i){return function(o,u){var a=n,s=t,c=0;o.subscribe(_(u,function(f){var v=c++;s=a?e(s,f,v):(a=!0,f),r&&u.next(s)},i&&function(){a&&u.next(s),u.complete()}))}}function xn(e,t){return t===void 0&&(t=Pe),S(function(n,r){var i=null,o=null,u=null,a=function(){if(i){i.unsubscribe(),i=null;var c=o;o=null,r.next(c)}};function s(){var c=u+e,f=t.now();if(f<c){i=this.schedule(void 0,c-f),r.add(i);return}a()}n.subscribe(_(r,function(c){o=c,u=t.now(),i||(i=t.schedule(s,e),r.add(i))},function(){a(),r.complete()},void 0,function(){o=i=null}))})}function jn(e){return S(function(t,n){var r=!1;t.subscribe(_(n,function(i){r=!0,n.next(i)},function(){r||n.next(e),n.complete()}))})}function Re(e){return e<=0?function(){return De}:S(function(t,n){var r=0;t.subscribe(_(n,function(i){++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function Un(){return S(function(e,t){e.subscribe(_(t,Ie))})}function Vn(e){return I(function(){return e})}function St(e,t){return t?function(n){return Pn(t.pipe(Re(1),Un()),n.pipe(St(e)))}:Te(function(n,r){return E(e(n,r)).pipe(Re(1),Vn(n))})}function Mn(e,t){t===void 0&&(t=Pe);var n=Dn(e,t);return St(function(){return n})}function Ln(e,t){return t===void 0&&(t=H),e=e??Nn,S(function(n,r){var i,o=!0;n.subscribe(_(r,function(u){var a=t(u);(o||!e(i,a))&&(o=!1,i=a,r.next(u))}))})}function Nn(e,t){return e===t}function qn(e){return e===void 0&&(e=Wn),S(function(t,n){var r=!1;t.subscribe(_(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(e())}))})}function Wn(){return new yt}function _t(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?Tn(function(i,o){return e(i,o,r)}):H,Re(1),n?jn(t):qn(function(){return new yt}))}}function Qn(e,t){return S(Rn(e,t,arguments.length>=2,!0))}function Kn(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new te}:t,r=e.resetOnError,i=r===void 0?!0:r,o=e.resetOnComplete,u=o===void 0?!0:o,a=e.resetOnRefCountZero,s=a===void 0?!0:a;return function(c){var f,v,h,y=0,C=!1,p=!1,U=function(){v==null||v.unsubscribe(),v=void 0},D=function(){U(),f=h=void 0,C=p=!1},q=function(){var J=f;D(),J==null||J.unsubscribe()};return S(function(J,qt){y++,!p&&!C&&U();var ye=h=h??n();qt.add(function(){y--,y===0&&!p&&!C&&(v=xe(q,s))}),ye.subscribe(qt),!f&&y>0&&(f=new K({next:function(ge){return ye.next(ge)},error:function(ge){p=!0,U(),v=xe(D,i,ge),ye.error(ge)},complete:function(){C=!0,U(),v=xe(D,u),ye.complete()}}),E(J).subscribe(f))})(c)}}function xe(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new K({next:function(){i.unsubscribe(),e()}});return E(t.apply(void 0,x([],R(n)))).subscribe(i)}}function Hn(e,t,n){var r,i,o,u,a=!1;return e&&typeof e=="object"?(r=e.bufferSize,u=r===void 0?1/0:r,i=e.windowTime,t=i===void 0?1/0:i,o=e.refCount,a=o===void 0?!1:o,n=e.scheduler):u=e??1/0,Kn({connector:function(){return new un(u,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function Ct(e,t){return S(function(n,r){var i=null,o=0,u=!1,a=function(){return u&&!i&&r.complete()};n.subscribe(_(r,function(s){i==null||i.unsubscribe();var c=0,f=o++;E(e(s,f)).subscribe(i=_(r,function(v){return r.next(t?t(s,v,f,c++):v)},function(){i=null,a()}))},function(){u=!0,a()}))})}function Yn(e,t,n){var r=b(e)||t||n?{next:e,error:t,complete:n}:e;return r?S(function(i,o){var u;(u=r.subscribe)===null||u===void 0||u.call(r);var a=!0;i.subscribe(_(o,function(s){var c;(c=r.next)===null||c===void 0||c.call(r,s),o.next(s)},function(){var s;a=!1,(s=r.complete)===null||s===void 0||s.call(r),o.complete()},function(s){var c;a=!1,(c=r.error)===null||c===void 0||c.call(r,s),o.error(s)},function(){var s,c;a&&((s=r.unsubscribe)===null||s===void 0||s.call(r)),(c=r.finalize)===null||c===void 0||c.call(r)}))}):H}function je(e){return new g(function(t){var n=Wt.onIdTokenChanged(e,t.next.bind(t),t.error.bind(t),t.complete.bind(t));return{unsubscribe:n}})}const Gn="[DEFAULT]",Et=d.createContext(void 0),Ue=d.createContext(!1),It="4.2.3-exp.9801ee9",zn=(e,t)=>e===t||[...Object.keys(e),...Object.keys(t)].every(n=>e[n]===t[n]);function Jn(e){const{firebaseConfig:t,appName:n,suspense:r}=e,i=d.useMemo(()=>{if(e.firebaseApp)return e.firebaseApp;const o=Z.getApps().find(u=>u.name===(n||Gn));if(o){if(t&&zn(o.options,t))return o;throw new Error(`Does not match the options already provided to the ${n||"default"} firebase app instance, give this new instance a different appName.`)}else{if(!t)throw new Error("No firebaseConfig provided");const u=d.version||"unknown";return Z.registerVersion("react",u),Z.registerVersion("reactfire",It),Z.initializeApp(t,n)}},[e.firebaseApp,t,n]);return d.createElement(Et.Provider,{value:i},d.createElement(Ue.Provider,Object.assign({value:r??!1},e)))}function Zn(){const e=d.useContext(Ue);return e??!1}function Y(e){const t=d.useContext(Ue);return e!==void 0?e:t}function Ve(){const e=d.useContext(Et);if(!e)throw new Error("Cannot call useFirebaseApp unless your component is within a FirebaseAppProvider");return e}function Bn(e){return Se(this,void 0,void 0,function*(){const t=yield e();return ae(je(t),`auth:user:${t.name}`).toPromise()})}function kt(e){const t=Qe(),n=`auth:user:${t.name}`,r=je(t);return w(n,r,e)}function Ot(e,t=!1,n){if(!e)throw new Error("you must provide a user");const r=`auth:idTokenResult:${e.uid}:forceRefresh=${t}`,i=O(e.getIdTokenResult(t));return w(r,i,n)}function Xn(e){if(e!=null&&e.hasOwnProperty("requiredClaims")&&(e!=null&&e.hasOwnProperty("validateCustomClaims")))throw new Error('Cannot have both "requiredClaims" and "validateCustomClaims". Use one or the other.');const t=Qe();let n=`auth:signInCheck:${t.name}::forceRefresh:${!!(e!=null&&e.forceRefresh)}`;e!=null&&e.forceRefresh&&(n=`${n}:forceRefresh:${e.forceRefresh}`),e!=null&&e.hasOwnProperty("requiredClaims")?n=`${n}:requiredClaims:${JSON.stringify(e.requiredClaims)}`:e!=null&&e.hasOwnProperty("validateCustomClaims")&&(n=`${n}:validateCustomClaims:${JSON.stringify(e.validateCustomClaims)}`);const r=je(t).pipe(Ct(i=>{var o;return i?e&&(e.hasOwnProperty("requiredClaims")||e.hasOwnProperty("validateCustomClaims"))?O(i.getIdTokenResult((o=e==null?void 0:e.forceRefresh)!==null&&o!==void 0?o:!1)).pipe(I(u=>{let a;e.hasOwnProperty("requiredClaims")?a=er(e.requiredClaims):a=e.validateCustomClaims;const{hasRequiredClaims:s,errors:c}=a(u.claims);return{signedIn:!0,hasRequiredClaims:s,errors:c,user:i}})):re({signedIn:!0,hasRequiredClaims:!0,errors:{},user:i}):re({signedIn:!1,hasRequiredClaims:!1,errors:{},user:null})}));return w(n,r,e)}function er(e){return function(n){const r={};return Object.keys(e).forEach(i=>{e[i]!==n[i]&&(r[i]=[new me("auth/missing-claim",`Expected "${e[i]}", but user has "${n[i]}" instead`)])}),{hasRequiredClaims:Object.keys(r).length===0,errors:r}}}function Ft({user:e,fallback:t,children:n,requiredClaims:r}){const{data:i}=Ot(e,!1),{claims:o}=i,u={};return Y()||console.warn("ClaimsCheck is deprecated and only works when ReactFire is in experimental Suspense Mode. Use useSigninCheck or set suspense={true} in FirebaseAppProvider if you want to use this component."),r&&Object.keys(r).forEach(s=>{var c;r[s]!==o[s]&&(u[s]={expected:r[s],actual:(c=o[s])===null||c===void 0?void 0:c.toString()})}),Object.keys(u).length===0?d.createElement(d.Fragment,null,n):d.createElement(d.Fragment,null,t)}function tr({fallback:e,children:t,requiredClaims:n}){const{data:r}=kt();return Y()||console.warn("AuthCheck is deprecated and only works when ReactFire is in experimental Suspense Mode. Use useSigninCheck or set suspense={true} in FirebaseAppProvider if you want to use this component."),r?n?d.createElement(Ft,{user:r,fallback:e,requiredClaims:n},t):d.createElement(d.Fragment,null,t):d.createElement(d.Fragment,null,e)}/*! *****************************************************************************
|
|
3
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function B(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Q=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var a=M(u),s=a.next();!s.done;s=a.next()){var c=s.value;c.remove(this)}}catch(p){t={error:p}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else u.remove(this);var f=this.initialTeardown;if(b(f))try{f()}catch(p){o=p instanceof Ce?p.errors:[p]}var v=this._finalizers;if(v){this._finalizers=null;try{for(var h=M(v),y=h.next();!y.done;y=h.next()){var C=y.value;try{Ze(C)}catch(p){o=o??[],p instanceof Ce?o=x(x([],R(o)),R(p.errors)):o.push(p)}}}catch(p){r={error:p}}finally{try{y&&!y.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new Ce(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Ze(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&B(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&B(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),ze=Q.EMPTY;function Je(e){return e instanceof Q||e&&"closed"in e&&b(e.remove)&&b(e.add)&&b(e.unsubscribe)}function Ze(e){b(e)?e():e.unsubscribe()}var Be={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ee={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Ee.delegate;return i!=null&&i.setTimeout?i.setTimeout.apply(i,x([e,t],R(n))):setTimeout.apply(void 0,x([e,t],R(n)))},clearTimeout:function(e){var t=Ee.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Xe(e){Ee.setTimeout(function(){throw e})}function Ie(){}function X(e){e()}var ke=function(e){k(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Je(n)&&n.add(r)):r.destination=Bt,r}return t.create=function(n,r,i){return new K(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Q),zt=Function.prototype.bind;function Oe(e,t){return zt.call(e,t)}var Jt=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){ee(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){ee(r)}else ee(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){ee(n)}},e}(),K=function(e){k(t,e);function t(n,r,i){var o=e.call(this)||this,u;if(b(n)||!n)u={next:n??void 0,error:r??void 0,complete:i??void 0};else{var a;o&&Be.useDeprecatedNextContext?(a=Object.create(n),a.unsubscribe=function(){return o.unsubscribe()},u={next:n.next&&Oe(n.next,a),error:n.error&&Oe(n.error,a),complete:n.complete&&Oe(n.complete,a)}):u=n}return o.destination=new Jt(u),o}return t}(ke);function ee(e){Xe(e)}function Zt(e){throw e}var Bt={closed:!0,next:Ie,error:Zt,complete:Ie},Fe=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function H(e){return e}function Xt(e){return e.length===0?H:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var g=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=tn(t)?t:new K(t,n,r);return X(function(){var u=i,a=u.operator,s=u.source;o.add(a?a.call(o,s):s?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=et(n),new n(function(i,o){var u=new K({next:function(a){try{t(a)}catch(s){o(s),u.unsubscribe()}},error:o,complete:i});r.subscribe(u)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Fe]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Xt(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=et(t),new t(function(r,i){var o;n.subscribe(function(u){return o=u},function(u){return i(u)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function et(e){var t;return(t=e??Be.Promise)!==null&&t!==void 0?t:Promise}function en(e){return e&&b(e.next)&&b(e.error)&&b(e.complete)}function tn(e){return e&&e instanceof ke||en(e)&&Je(e)}function nn(e){return b(e==null?void 0:e.lift)}function S(e){return function(t){if(nn(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function _(e,t,n,r,i){return new rn(e,t,n,r,i)}var rn=function(e){k(t,e);function t(n,r,i,o,u,a){var s=e.call(this,n)||this;return s.onFinalize=u,s.shouldUnsubscribe=a,s._next=r?function(c){try{r(c)}catch(f){n.error(f)}}:e.prototype._next,s._error=o?function(c){try{o(c)}catch(f){n.error(f)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t}(ke),on=_e(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),te=function(e){k(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new tt(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new on},t.prototype.next=function(n){var r=this;X(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var u=M(r.currentObservers),a=u.next();!a.done;a=u.next()){var s=a.value;s.next(n)}}catch(c){i={error:c}}finally{try{a&&!a.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;X(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;X(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,u=i.isStopped,a=i.observers;return o||u?ze:(this.currentObservers=null,a.push(n),new Q(function(){r.currentObservers=null,B(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,u=r.isStopped;i?n.error(o):u&&n.complete()},t.prototype.asObservable=function(){var n=new g;return n.source=this,n},t.create=function(n,r){return new tt(n,r)},t}(g),tt=function(e){k(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:ze},t}(te),Ae={now:function(){return(Ae.delegate||Date).now()},delegate:void 0},un=function(e){k(t,e);function t(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=Ae);var o=e.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return t.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,u=r._infiniteTimeWindow,a=r._timestampProvider,s=r._windowTime;i||(o.push(n),!u&&o.push(a.now()+s)),this._trimBuffer(),e.prototype.next.call(this,n)},t.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,u=i._buffer,a=u.slice(),s=0;s<a.length&&!n.closed;s+=o?1:2)n.next(a[s]);return this._checkFinalizedStatuses(n),r},t.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,u=n._infiniteTimeWindow,a=(u?1:2)*r;if(r<1/0&&a<o.length&&o.splice(0,o.length-a),!u){for(var s=i.now(),c=0,f=1;f<o.length&&o[f]<=s;f+=2)c=f;c&&o.splice(0,c+1)}},t}(te),an=function(e){k(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t}(Q),ne={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=ne.delegate;return i!=null&&i.setInterval?i.setInterval.apply(i,x([e,t],R(n))):setInterval.apply(void 0,x([e,t],R(n)))},clearInterval:function(e){var t=ne.delegate;return((t==null?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},sn=function(e){k(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,u=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(u,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(u,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),ne.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&ne.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(u){i=!0,o=u||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,B(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(an),nt=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=Ae.now,e}(),cn=function(e){k(t,e);function t(n,r){r===void 0&&(r=nt.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t}(nt),Pe=new cn(sn),ln=Pe,De=new g(function(e){return e.complete()});function fn(e){return e?dn(e):De}function dn(e){return new g(function(t){return e.schedule(function(){return t.complete()})})}function rt(e){return e&&b(e.schedule)}function it(e){return e[e.length-1]}function $e(e){return rt(it(e))?e.pop():void 0}function vn(e,t){return typeof it(e)=="number"?e.pop():t}var ot=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function ut(e){return b(e==null?void 0:e.then)}function at(e){return b(e[Fe])}function st(e){return Symbol.asyncIterator&&b(e==null?void 0:e[Symbol.asyncIterator])}function ct(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function hn(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var lt=hn();function ft(e){return b(e==null?void 0:e[lt])}function dt(e){return Yt(this,arguments,function(){var n,r,i,o;return Ge(this,function(u){switch(u.label){case 0:n=e.getReader(),u.label=1;case 1:u.trys.push([1,,9,10]),u.label=2;case 2:return[4,L(n.read())];case 3:return r=u.sent(),i=r.value,o=r.done,o?[4,L(void 0)]:[3,5];case 4:return[2,u.sent()];case 5:return[4,L(i)];case 6:return[4,u.sent()];case 7:return u.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function vt(e){return b(e==null?void 0:e.getReader)}function E(e){if(e instanceof g)return e;if(e!=null){if(at(e))return pn(e);if(ot(e))return bn(e);if(ut(e))return mn(e);if(st(e))return ht(e);if(ft(e))return yn(e);if(vt(e))return gn(e)}throw ct(e)}function pn(e){return new g(function(t){var n=e[Fe]();if(b(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function bn(e){return new g(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function mn(e){return new g(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,Xe)})}function yn(e){return new g(function(t){var n,r;try{for(var i=M(e),o=i.next();!o.done;o=i.next()){var u=o.value;if(t.next(u),t.closed)return}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function ht(e){return new g(function(t){wn(e,t).catch(function(n){return t.error(n)})})}function gn(e){return ht(dt(e))}function wn(e,t){var n,r,i,o;return Se(this,void 0,void 0,function(){var u,a;return Ge(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),n=Gt(e),s.label=1;case 1:return[4,n.next()];case 2:if(r=s.sent(),!!r.done)return[3,4];if(u=r.value,t.next(u),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=s.sent(),i={error:a},[3,11];case 6:return s.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function $(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function pt(e,t){return t===void 0&&(t=0),S(function(n,r){n.subscribe(_(r,function(i){return $(r,e,function(){return r.next(i)},t)},function(){return $(r,e,function(){return r.complete()},t)},function(i){return $(r,e,function(){return r.error(i)},t)}))})}function bt(e,t){return t===void 0&&(t=0),S(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function Sn(e,t){return E(e).pipe(bt(t),pt(t))}function _n(e,t){return E(e).pipe(bt(t),pt(t))}function Cn(e,t){return new g(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function En(e,t){return new g(function(n){var r;return $(n,t,function(){r=e[lt](),$(n,t,function(){var i,o,u;try{i=r.next(),o=i.value,u=i.done}catch(a){n.error(a);return}u?n.complete():n.next(o)},0,!0)}),function(){return b(r==null?void 0:r.return)&&r.return()}})}function mt(e,t){if(!e)throw new Error("Iterable cannot be null");return new g(function(n){$(n,t,function(){var r=e[Symbol.asyncIterator]();$(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function In(e,t){return mt(dt(e),t)}function kn(e,t){if(e!=null){if(at(e))return Sn(e,t);if(ot(e))return Cn(e,t);if(ut(e))return _n(e,t);if(st(e))return mt(e,t);if(ft(e))return En(e,t);if(vt(e))return In(e,t)}throw ct(e)}function O(e,t){return t?kn(e,t):E(e)}function re(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=$e(e);return O(e,n)}var yt=_e(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function On(e){return e instanceof Date&&!isNaN(e)}function I(e,t){return S(function(n,r){var i=0;n.subscribe(_(r,function(o){r.next(e.call(t,o,i++))}))})}function Fn(e,t,n,r,i,o,u,a){var s=[],c=0,f=0,v=!1,h=function(){v&&!s.length&&!c&&t.complete()},y=function(p){return c<r?C(p):s.push(p)},C=function(p){o&&t.next(p),c++;var U=!1;E(n(p,f++)).subscribe(_(t,function(D){i==null||i(D),o?y(D):t.next(D)},function(){U=!0},void 0,function(){if(U)try{c--;for(var D=function(){var q=s.shift();u?$(t,u,function(){return C(q)}):C(q)};s.length&&c<r;)D();h()}catch(q){t.error(q)}}))};return e.subscribe(_(t,y,function(){v=!0,h()})),function(){a==null||a()}}function Te(e,t,n){return n===void 0&&(n=1/0),b(t)?Te(function(r,i){return I(function(o,u){return t(r,o,i,u)})(E(e(r,i)))},n):(typeof t=="number"&&(n=t),S(function(r,i){return Fn(r,i,e,n)}))}function gt(e){return e===void 0&&(e=1/0),Te(H,e)}function An(){return gt(1)}function Pn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return An()(O(e,$e(e)))}function Dn(e,t,n){e===void 0&&(e=0),n===void 0&&(n=ln);var r=-1;return t!=null&&(rt(t)?n=t:r=t),new g(function(i){var o=On(e)?+e-n.now():e;o<0&&(o=0);var u=0;return n.schedule(function(){i.closed||(i.next(u++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function $n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=$e(e),r=vn(e,1/0),i=e;return i.length?i.length===1?E(i[0]):gt(r)(O(i,n)):De}function Tn(e,t){return S(function(n,r){var i=0;n.subscribe(_(r,function(o){return e.call(t,o,i++)&&r.next(o)}))})}function wt(e){return S(function(t,n){var r=null,i=!1,o;r=t.subscribe(_(n,void 0,void 0,function(u){o=E(e(u,wt(e)(t))),r?(r.unsubscribe(),r=null,o.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,o.subscribe(n))})}function Rn(e,t,n,r,i){return function(o,u){var a=n,s=t,c=0;o.subscribe(_(u,function(f){var v=c++;s=a?e(s,f,v):(a=!0,f),r&&u.next(s)},i&&function(){a&&u.next(s),u.complete()}))}}function xn(e,t){return t===void 0&&(t=Pe),S(function(n,r){var i=null,o=null,u=null,a=function(){if(i){i.unsubscribe(),i=null;var c=o;o=null,r.next(c)}};function s(){var c=u+e,f=t.now();if(f<c){i=this.schedule(void 0,c-f),r.add(i);return}a()}n.subscribe(_(r,function(c){o=c,u=t.now(),i||(i=t.schedule(s,e),r.add(i))},function(){a(),r.complete()},void 0,function(){o=i=null}))})}function jn(e){return S(function(t,n){var r=!1;t.subscribe(_(n,function(i){r=!0,n.next(i)},function(){r||n.next(e),n.complete()}))})}function Re(e){return e<=0?function(){return De}:S(function(t,n){var r=0;t.subscribe(_(n,function(i){++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function Un(){return S(function(e,t){e.subscribe(_(t,Ie))})}function Vn(e){return I(function(){return e})}function St(e,t){return t?function(n){return Pn(t.pipe(Re(1),Un()),n.pipe(St(e)))}:Te(function(n,r){return E(e(n,r)).pipe(Re(1),Vn(n))})}function Mn(e,t){t===void 0&&(t=Pe);var n=Dn(e,t);return St(function(){return n})}function Ln(e,t){return t===void 0&&(t=H),e=e??Nn,S(function(n,r){var i,o=!0;n.subscribe(_(r,function(u){var a=t(u);(o||!e(i,a))&&(o=!1,i=a,r.next(u))}))})}function Nn(e,t){return e===t}function qn(e){return e===void 0&&(e=Wn),S(function(t,n){var r=!1;t.subscribe(_(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(e())}))})}function Wn(){return new yt}function _t(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?Tn(function(i,o){return e(i,o,r)}):H,Re(1),n?jn(t):qn(function(){return new yt}))}}function Qn(e,t){return S(Rn(e,t,arguments.length>=2,!0))}function Kn(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new te}:t,r=e.resetOnError,i=r===void 0?!0:r,o=e.resetOnComplete,u=o===void 0?!0:o,a=e.resetOnRefCountZero,s=a===void 0?!0:a;return function(c){var f,v,h,y=0,C=!1,p=!1,U=function(){v==null||v.unsubscribe(),v=void 0},D=function(){U(),f=h=void 0,C=p=!1},q=function(){var J=f;D(),J==null||J.unsubscribe()};return S(function(J,qt){y++,!p&&!C&&U();var ye=h=h??n();qt.add(function(){y--,y===0&&!p&&!C&&(v=xe(q,s))}),ye.subscribe(qt),!f&&y>0&&(f=new K({next:function(ge){return ye.next(ge)},error:function(ge){p=!0,U(),v=xe(D,i,ge),ye.error(ge)},complete:function(){C=!0,U(),v=xe(D,u),ye.complete()}}),E(J).subscribe(f))})(c)}}function xe(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new K({next:function(){i.unsubscribe(),e()}});return E(t.apply(void 0,x([],R(n)))).subscribe(i)}}function Hn(e,t,n){var r,i,o,u,a=!1;return e&&typeof e=="object"?(r=e.bufferSize,u=r===void 0?1/0:r,i=e.windowTime,t=i===void 0?1/0:i,o=e.refCount,a=o===void 0?!1:o,n=e.scheduler):u=e??1/0,Kn({connector:function(){return new un(u,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function Ct(e,t){return S(function(n,r){var i=null,o=0,u=!1,a=function(){return u&&!i&&r.complete()};n.subscribe(_(r,function(s){i==null||i.unsubscribe();var c=0,f=o++;E(e(s,f)).subscribe(i=_(r,function(v){return r.next(t?t(s,v,f,c++):v)},function(){i=null,a()}))},function(){u=!0,a()}))})}function Yn(e,t,n){var r=b(e)||t||n?{next:e,error:t,complete:n}:e;return r?S(function(i,o){var u;(u=r.subscribe)===null||u===void 0||u.call(r);var a=!0;i.subscribe(_(o,function(s){var c;(c=r.next)===null||c===void 0||c.call(r,s),o.next(s)},function(){var s;a=!1,(s=r.complete)===null||s===void 0||s.call(r),o.complete()},function(s){var c;a=!1,(c=r.error)===null||c===void 0||c.call(r,s),o.error(s)},function(){var s,c;a&&((s=r.unsubscribe)===null||s===void 0||s.call(r)),(c=r.finalize)===null||c===void 0||c.call(r)}))}):H}function je(e){return new g(function(t){var n=Wt.onIdTokenChanged(e,t.next.bind(t),t.error.bind(t),t.complete.bind(t));return{unsubscribe:n}})}const Gn="[DEFAULT]",Et=d.createContext(void 0),Ue=d.createContext(!1),It="4.2.3-exp.a1d5930",zn=(e,t)=>e===t||[...Object.keys(e),...Object.keys(t)].every(n=>e[n]===t[n]);function Jn(e){const{firebaseConfig:t,appName:n,suspense:r}=e,i=d.useMemo(()=>{if(e.firebaseApp)return e.firebaseApp;const o=Z.getApps().find(u=>u.name===(n||Gn));if(o){if(t&&zn(o.options,t))return o;throw new Error(`Does not match the options already provided to the ${n||"default"} firebase app instance, give this new instance a different appName.`)}else{if(!t)throw new Error("No firebaseConfig provided");const u=d.version||"unknown";return Z.registerVersion("react",u),Z.registerVersion("reactfire",It),Z.initializeApp(t,n)}},[e.firebaseApp,t,n]);return d.createElement(Et.Provider,{value:i},d.createElement(Ue.Provider,Object.assign({value:r??!1},e)))}function Zn(){const e=d.useContext(Ue);return e??!1}function Y(e){const t=d.useContext(Ue);return e!==void 0?e:t}function Ve(){const e=d.useContext(Et);if(!e)throw new Error("Cannot call useFirebaseApp unless your component is within a FirebaseAppProvider");return e}function Bn(e){return Se(this,void 0,void 0,function*(){const t=yield e();return ae(je(t),`auth:user:${t.name}`).toPromise()})}function kt(e){const t=Qe(),n=`auth:user:${t.name}`,r=je(t);return w(n,r,e)}function Ot(e,t=!1,n){if(!e)throw new Error("you must provide a user");const r=`auth:idTokenResult:${e.uid}:forceRefresh=${t}`,i=O(e.getIdTokenResult(t));return w(r,i,n)}function Xn(e){if(e!=null&&e.hasOwnProperty("requiredClaims")&&(e!=null&&e.hasOwnProperty("validateCustomClaims")))throw new Error('Cannot have both "requiredClaims" and "validateCustomClaims". Use one or the other.');const t=Qe();let n=`auth:signInCheck:${t.name}::forceRefresh:${!!(e!=null&&e.forceRefresh)}`;e!=null&&e.forceRefresh&&(n=`${n}:forceRefresh:${e.forceRefresh}`),e!=null&&e.hasOwnProperty("requiredClaims")?n=`${n}:requiredClaims:${JSON.stringify(e.requiredClaims)}`:e!=null&&e.hasOwnProperty("validateCustomClaims")&&(n=`${n}:validateCustomClaims:${JSON.stringify(e.validateCustomClaims)}`);const r=je(t).pipe(Ct(i=>{var o;return i?e&&(e.hasOwnProperty("requiredClaims")||e.hasOwnProperty("validateCustomClaims"))?O(i.getIdTokenResult((o=e==null?void 0:e.forceRefresh)!==null&&o!==void 0?o:!1)).pipe(I(u=>{let a;e.hasOwnProperty("requiredClaims")?a=er(e.requiredClaims):a=e.validateCustomClaims;const{hasRequiredClaims:s,errors:c}=a(u.claims);return{signedIn:!0,hasRequiredClaims:s,errors:c,user:i}})):re({signedIn:!0,hasRequiredClaims:!0,errors:{},user:i}):re({signedIn:!1,hasRequiredClaims:!1,errors:{},user:null})}));return w(n,r,e)}function er(e){return function(n){const r={};return Object.keys(e).forEach(i=>{e[i]!==n[i]&&(r[i]=[new me("auth/missing-claim",`Expected "${e[i]}", but user has "${n[i]}" instead`)])}),{hasRequiredClaims:Object.keys(r).length===0,errors:r}}}function Ft({user:e,fallback:t,children:n,requiredClaims:r}){const{data:i}=Ot(e,!1),{claims:o}=i,u={};return Y()||console.warn("ClaimsCheck is deprecated and only works when ReactFire is in experimental Suspense Mode. Use useSigninCheck or set suspense={true} in FirebaseAppProvider if you want to use this component."),r&&Object.keys(r).forEach(s=>{var c;r[s]!==o[s]&&(u[s]={expected:r[s],actual:(c=o[s])===null||c===void 0?void 0:c.toString()})}),Object.keys(u).length===0?d.createElement(d.Fragment,null,n):d.createElement(d.Fragment,null,t)}function tr({fallback:e,children:t,requiredClaims:n}){const{data:r}=kt();return Y()||console.warn("AuthCheck is deprecated and only works when ReactFire is in experimental Suspense Mode. Use useSigninCheck or set suspense={true} in FirebaseAppProvider if you want to use this component."),r?n?d.createElement(Ft,{user:r,fallback:e,requiredClaims:n},t):d.createElement(d.Fragment,null,t):d.createElement(d.Fragment,null,e)}/*! *****************************************************************************
|
|
4
4
|
Copyright (c) Microsoft Corporation.
|
|
5
5
|
|
|
6
6
|
Permission to use, copy, modify, and/or distribute this software for any
|
package/package.json
CHANGED