PageSourceSearch

https://laravel-8c2d4.web.app/static/js/6.a4d7ce28.chunk.js

js laravel-8c2d4.web.app collected 2026-10-03 12:28:07 UTC 1,108,325 bytes, 3 lines download raw bytes

1/*! For license information please see 6.a4d7ce28.chunk.js.LICENSE.txt */
2(this["webpackJsonpreact-todo-app"]=this["webpackJsonpreact-todo-app"]||[]).push([[6],[function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"h",(function(){return u})),n.d(e,"e",(function(){return c})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return f}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function a(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(e){o(e)}}function s(t){try{u(r.throw(t))}catch(e){o(e)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function s(t,e){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=(i=a.trys).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=e.call(t,a)}catch(s){o=[6,s],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])}}}function u(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function l(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t}function f(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return v})),n.d(e,"b",(function(){return A})),n.d(e,"c",(function(){return P})),n.d(e,"d",(function(){return H})),n.d(e,"e",(function(){return k})),n.d(e,"f",(function(){return s})),n.d(e,"g",(function(){return u})),n.d(e,"h",(function(){return l})),n.d(e,"i",(function(){return f})),n.d(e,"j",(function(){return Z})),n.d(e,"k",(function(){return F})),n.d(e,"l",(function(){return z})),n.d(e,"m",(function(){return p})),n.d(e,"n",(function(){return d})),n.d(e,"o",(function(){return Q})),n.d(e,"p",(function(){return g})),n.d(e,"q",(function(){return M})),n.d(e,"r",(function(){return b})),n.d(e,"s",(function(){return w})),n.d(e,"t",(function(){return E})),n.d(e,"u",(function(){return V})),n.d(e,"v",(function(){return O})),n.d(e,"w",(function(){return I})),n.d(e,"x",(function(){return y})),n.d(e,"y",(function(){return m})),n.d(e,"z",(function(){return T})),n.d(e,"A",(function(){return _})),n.d(e,"B",(function(){return S})),n.d(e,"C",(function(){return L})),n.d(e,"D",(function(){return j})),n.d(e,"E",(function(){return q})),n.d(e,"F",(function(){return B})),n.d(e,"G",(function(){return U})),n.d(e,"H",(function(){return X})),n.d(e,"I",(function(){return J})),n.d(e,"J",(function(){return R})),n.d(e,"K",(function(){return G})),n.d(e,"L",(function(){return $})),n.d(e,"M",(function(){return Y})),n.d(e,"N",(function(){return C}));var r=n(0),i=!1,o=!1,a="${JSCORE_VERSION}",s=function(t,e){if(!t)throw u(e)},u=function(t){return new Error("Firebase Database ("+a+") INTERNAL ASSERT FAILED: "+t)},c=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):55296===(64512&i)&&r+1<t.length&&56320===(64512&t.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&t.charCodeAt(++r)),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},l={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"===typeof atob,encodeByteArray:function(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<t.length;i+=3){var o=t[i],a=i+1<t.length,s=a?t[i+1]:0,u=i+2<t.length,c=u?t[i+2]:0,l=o>>2,f=(3&o)<<4|s>>4,h=(15&s)<<2|c>>6,p=63&c;u||(p=64,a||(h=64)),r.push(n[l],n[f],n[h],n[p])}return r.join("")},encodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(c(t),e)},decodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){for(var e=[],n=0,r=0;n<t.length;){var i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){var o=t[n++];e[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){var a=((7&i)<<18|(63&(o=t[n++]))<<12|(63&(s=t[n++]))<<6|63&t[n++])-65536;e[r++]=String.fromCharCode(55296+(a>>10)),e[r++]=String.fromCharCode(56320+(1023&a))}else{o=t[n++];var s=t[n++];
2e[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray:function(t,e){this.init_();for(var n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<t.length;){var o=n[t.charAt(i++)],a=i<t.length?n[t.charAt(i)]:0,s=++i<t.length?n[t.charAt(i)]:64,u=++i<t.length?n[t.charAt(i)]:64;if(++i,null==o||null==a||null==s||null==u)throw Error();var c=o<<2|a>>4;if(r.push(c),64!==s){var l=a<<4&240|s>>2;if(r.push(l),64!==u){var f=s<<6&192|u;r.push(f)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},f=function(t){var e=c(t);return l.encodeByteArray(e,!0)},h=function(t){try{return l.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function p(t){return d(void 0,t)}function d(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:return new Date(e.getTime());case Object:void 0===t&&(t={});break;case Array:t=[];break;default:return e}for(var n in e)e.hasOwnProperty(n)&&"__proto__"!==n&&(t[n]=d(t[n],e[n]));return t}var v=function(){function t(){var t=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))}return t.prototype.wrapCallback=function(t){var e=this;return function(n,r){n?e.reject(n):e.resolve(r),"function"===typeof t&&(e.promise.catch((function(){})),1===t.length?t(n):t(n,r))}},t}();function g(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function y(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(g())}function m(){try{return"[object process]"===Object.prototype.toString.call(t.process)}catch(e){return!1}}function b(){return"object"===typeof self&&self.self===self}function w(){var t="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof t&&void 0!==t.id}function _(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function E(){return g().indexOf("Electron/")>=0}function O(){var t=g();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function S(){return g().indexOf("MSAppHost/")>=0}function T(){return!0===i||!0===o}function I(){return"indexedDB"in self&&null!=indexedDB}function C(){return new Promise((function(t,e){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=window.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||window.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var t;e((null===(t=i.error)||void 0===t?void 0:t.message)||"")}}catch(o){e(o)}}))}function k(){return!(!navigator||!navigator.cookieEnabled)}var P=function(t){function e(n,r,i){var o=t.call(this,r)||this;return o.code=n,o.customData=i,o.name="FirebaseError",Object.setPrototypeOf(o,e.prototype),Error.captureStackTrace&&Error.captureStackTrace(o,A.prototype.create),o}return Object(r.c)(e,t),e}(Error),A=function(){function t(t,e,n){this.service=t,this.serviceName=e,this.errors=n}return t.prototype.create=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=e[0]||{},i=this.service+"/"+t,o=this.errors[t],a=o?N(o,r):"Error",s=this.serviceName+": "+a+" ("+i+").",u=new P(i,s,r);return u},t}();function N(t,e){return t.replace(x,(function(t,n){var r=e[n];return null!=r?String(r):"<"+n+"?>"}))}var x=/\{\$([^}]+)}/g;function j(t){return JSON.parse(t)}function R(t){return JSON.stringify(t)}var D=function(t){var e={},n={},r={},i="";try{var o=t.split(".");e=j(h(o[0])||""),n=j(h(o[1])||""),i=o[2],r=n.d||{},delete n.d}catch(a){}return{header:e,claims:n,data:r,signature:i}},L=function(t){var e=D(t).claims;return!!e&&"object"===typeof e&&e.hasOwnProperty("iat")},M=function(t){var e=D(t).claims;return"object"===typeof e&&!0===e.admin};function F(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function U(t,e){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0}function V(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function q(t,e,n){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=e.call(n,t[i],i,t));return r}function B(t){for(var e=[],n=function(t,n){Array.isArray(n)?n.forEac
2h((function(n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))})):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))},r=0,i=Object.entries(t);r<i.length;r++){var o=i[r];n(o[0],o[1])}return e.length?"&"+e.join("&"):""}var H=function(){function t(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var t=1;t<this.blockSize;++t)this.pad_[t]=0;this.reset()}return t.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},t.prototype.compress_=function(t,e){e||(e=0);var n=this.W_;if("string"===typeof t)for(var r=0;r<16;r++)n[r]=t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|t.charCodeAt(e+3),e+=4;else for(r=0;r<16;r++)n[r]=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3],e+=4;for(r=16;r<80;r++){var i=n[r-3]^n[r-8]^n[r-14]^n[r-16];n[r]=4294967295&(i<<1|i>>>31)}var o,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],f=this.chain_[4];for(r=0;r<80;r++){r<40?r<20?(o=l^u&(c^l),a=1518500249):(o=u^c^l,a=1859775393):r<60?(o=u&c|l&(u|c),a=2400959708):(o=u^c^l,a=3395469782);i=(s<<5|s>>>27)+o+f+a+n[r]&4294967295;f=l,l=c,c=4294967295&(u<<30|u>>>2),u=s,s=i}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+u&4294967295,this.chain_[2]=this.chain_[2]+c&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+f&4294967295},t.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r<e;){if(0===o)for(;r<=n;)this.compress_(t,r),r+=this.blockSize;if("string"===typeof t){for(;r<e;)if(i[o]=t.charCodeAt(r),++r,++o===this.blockSize){this.compress_(i),o=0;break}}else for(;r<e;)if(i[o]=t[r],++r,++o===this.blockSize){this.compress_(i),o=0;break}}this.inbuf_=o,this.total_+=e}},t.prototype.digest=function(){var t=[],e=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var n=this.blockSize-1;n>=56;n--)this.buf_[n]=255&e,e/=256;this.compress_(this.buf_);var r=0;for(n=0;n<5;n++)for(var i=24;i>=0;i-=8)t[r]=this.chain_[n]>>i&255,++r;return t},t}();function z(t,e){var n=new K(t,e);return n.subscribe.bind(n)}var K=function(){function t(t,e){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=e,this.task.then((function(){t(n)})).catch((function(t){n.error(t)}))}return t.prototype.next=function(t){this.forEachObserver((function(e){e.next(t)}))},t.prototype.error=function(t){this.forEachObserver((function(e){e.error(t)})),this.close(t)},t.prototype.complete=function(){this.forEachObserver((function(t){t.complete()})),this.close()},t.prototype.subscribe=function(t,e,n){var r,i=this;if(void 0===t&&void 0===e&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(t,e){if("object"!==typeof t||null===t)return!1;for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i in t&&"function"===typeof t[i])return!0}return!1}(t,["next","error","complete"])?t:{next:t,error:e,complete:n}).next&&(r.next=W),void 0===r.error&&(r.error=W),void 0===r.complete&&(r.complete=W);var o=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(t){}})),this.observers.push(r),o},t.prototype.unsubscribeOne=function(t){void 0!==this.observers&&void 0!==this.observers[t]&&(delete this.observers[t],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},t.prototype.forEachObserver=function(t){if(!this.finalized)for(var e=0;e<this.observers.length;e++)this.sendOne(e,t)},t.prototype.sendOne=function(t,e){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[t])try{e(n.observers[t])}catch(r){"undefined"!==typeof console&&console.error&&console.error(r)}}))},t.prototype.close=function(t){var e=this;this.finalized||(this.finalized=!0,void 0!==t&&(this.finalError=t),this.task.then((function(){e.observers=void 0,e.onNoObservers=void 0})))},t}();function W(){}var G=function(t,e,n,r){var i;if(r<e?i="at least "+e:r>n&&(i=0===n?"none":"no more than "+n),i)throw new Error(t+" failed: Was called with "+r+(1===r?" argument.":" arguments.")+" Expects "+i+".")};function Q(t,e,n){var r="";switch(e){case 1:r=n?"first":"First";break;case 2:r=n?"second":"Second";break;case 3:r=n?"third":"Third";break;case 4:r=n?"fourth":"Fourth";break;default:throw new Error("errorPrefix called with argumentNumber > 4.  Need to update it?")}var i=t+" failed: ";return i+=r+" argument "}function $(t,e,n,r){if((!r||n)&&"function"!==typeof n)throw new Error(Q(t,e,r)+"must be a valid function.")}function Y(t,e,n,r){if((!r||n)&&("object"!==typeof n||null===n))throw new Error(Q(t,e,r)+"must be a valid context object.")}var J=function(t){for(var e=[],n=0,r=0;r<t.length;r++){var i=t.charCodeAt(r);if(i>=55296&&i<=56319){var o=i-55296;r++,s(r<t.length,"Surrogate pair missing trail surrogate."),i=65536+(o<<10)+(t.charCodeAt(r)-56320)}i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=63&i|128):i<65536?(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=63&i|128):(e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=63&i|128)}return e},X=function(t){for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);
2r<128?e++:r<2048?e+=2:r>=55296&&r<=56319?(e+=4,n++):e+=3}return e};function Z(t,e,n){void 0===e&&(e=1e3),void 0===n&&(n=2);var r=e*Math.pow(n,t),i=Math.round(.5*r*(Math.random()-.5)*2);return Math.min(144e5,r+i)}}).call(this,n(34))},function(t,e,n){"use strict";t.exports=n(67)},function(t,e,n){"use strict";var r,i,o=n(0),a=n(1),s=n(6),u=n(5),c=((r={})["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",r["bad-app-name"]="Illegal App name: '{$appName}",r["duplicate-app"]="Firebase App named '{$appName}' already exists",r["app-deleted"]="Firebase App named '{$appName}' already deleted",r["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",r["invalid-log-argument"]="First argument to `onLog` must be null or a function.",r),l=new a.b("app","Firebase",c),f="@firebase/app",h="[DEFAULT]",p=((i={})[f]="fire-core",i["@firebase/analytics"]="fire-analytics",i["@firebase/auth"]="fire-auth",i["@firebase/database"]="fire-rtdb",i["@firebase/functions"]="fire-fn",i["@firebase/installations"]="fire-iid",i["@firebase/messaging"]="fire-fcm",i["@firebase/performance"]="fire-perf",i["@firebase/remote-config"]="fire-rc",i["@firebase/storage"]="fire-gcs",i["@firebase/firestore"]="fire-fst",i["fire-js"]="fire-js",i["firebase-wrapper"]="fire-js-all",i),d=new u.b("@firebase/app"),v=function(){function t(t,e,n){var r,i,u=this;this.firebase_=n,this.isDeleted_=!1,this.name_=e.name,this.automaticDataCollectionEnabled_=e.automaticDataCollectionEnabled||!1,this.options_=Object(a.m)(t),this.container=new s.b(e.name),this._addComponent(new s.a("app",(function(){return u}),"PUBLIC"));try{for(var c=Object(o.h)(this.firebase_.INTERNAL.components.values()),l=c.next();!l.done;l=c.next()){var f=l.value;this._addComponent(f)}}catch(h){r={error:h}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}}return Object.defineProperty(t.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(t){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),t.prototype.delete=function(){var t=this;return new Promise((function(e){t.checkDestroyed_(),e()})).then((function(){return t.firebase_.INTERNAL.removeApp(t.name_),Promise.all(t.container.getProviders().map((function(t){return t.delete()})))})).then((function(){t.isDeleted_=!0}))},t.prototype._getService=function(t,e){return void 0===e&&(e=h),this.checkDestroyed_(),this.container.getProvider(t).getImmediate({identifier:e})},t.prototype._removeServiceInstance=function(t,e){void 0===e&&(e=h),this.container.getProvider(t).clearInstance(e)},t.prototype._addComponent=function(t){try{this.container.addComponent(t)}catch(e){d.debug("Component "+t.name+" failed to register with FirebaseApp "+this.name,e)}},t.prototype._addOrOverwriteComponent=function(t){this.container.addOrOverwriteComponent(t)},t.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw l.create("app-deleted",{appName:this.name_})},t}();v.prototype.name&&v.prototype.options||v.prototype.delete||console.log("dc");var g=function t(){var e=function(t){var e={},n=new Map,r={__esModule:!0,initializeApp:function(n,i){void 0===i&&(i={}),"object"===typeof i&&null!==i||(i={name:i});var o=i;void 0===o.name&&(o.name=h);var s=o.name;if("string"!==typeof s||!s)throw l.create("bad-app-name",{appName:String(s)});
2if(Object(a.k)(e,s))throw l.create("duplicate-app",{appName:s});var u=new t(n,o,r);return e[s]=u,u},app:i,registerVersion:function(t,e,n){var r,i=null!==(r=p[t])&&void 0!==r?r:t;n&&(i+="-"+n);var o=i.match(/\s|\//),a=e.match(/\s|\//);if(o||a){var u=['Unable to register library "'+i+'" with version "'+e+'":'];return o&&u.push('library name "'+i+'" contains illegal characters (whitespace or "/")'),o&&a&&u.push("and"),a&&u.push('version name "'+e+'" contains illegal characters (whitespace or "/")'),void d.warn(u.join(" "))}c(new s.a(i+"-version",(function(){return{library:i,version:e}}),"VERSION"))},setLogLevel:u.c,onLog:function(t,e){if(null!==t&&"function"!==typeof t)throw l.create("invalid-log-argument",{appName:name});Object(u.d)(t,e)},apps:null,SDK_VERSION:"8.0.1",INTERNAL:{registerComponent:c,removeApp:function(t){delete e[t]},components:n,useAsService:function(t,e){return"serverAuth"===e?null:e}}};function i(t){if(t=t||h,!Object(a.k)(e,t))throw l.create("no-app",{appName:t});return e[t]}function c(s){var u,c,f=s.name;if(n.has(f))return d.debug("There were multiple attempts to register component "+f+"."),"PUBLIC"===s.type?r[f]:null;if(n.set(f,s),"PUBLIC"===s.type){var h=function(t){if(void 0===t&&(t=i()),"function"!==typeof t[f])throw l.create("invalid-app-argument",{appName:f});return t[f]()};void 0!==s.serviceProps&&Object(a.n)(h,s.serviceProps),r[f]=h,t.prototype[f]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._getService.bind(this,f).apply(this,s.multipleInstances?t:[])}}try{for(var p=Object(o.h)(Object.keys(e)),v=p.next();!v.done;v=p.next()){var g=v.value;e[g]._addComponent(s)}}catch(y){u={error:y}}finally{try{v&&!v.done&&(c=p.return)&&c.call(p)}finally{if(u)throw u.error}}return"PUBLIC"===s.type?r[f]:null}return r.default=r,Object.defineProperty(r,"apps",{get:function(){return Object.keys(e).map((function(t){return e[t]}))}}),i.App=t,r}(v);return e.INTERNAL=Object(o.a)(Object(o.a)({},e.INTERNAL),{createFirebaseNamespace:t,extendNamespace:function(t){Object(a.n)(e,t)},createSubscribe:a.l,ErrorFactory:a.b,deepExtend:a.n}),e}(),y=function(){function t(t){this.container=t}return t.prototype.getPlatformInfoString=function(){return this.container.getProviders().map((function(t){if(function(t){var e=t.getComponent();return"VERSION"===(null===e||void 0===e?void 0:e.type)}(t)){var e=t.getImmediate();return e.library+"/"+e.version}return null})).filter((function(t){return t})).join(" ")},t}();if(Object(a.r)()&&void 0!==self.firebase){d.warn("\n    Warning: Firebase is already defined in the global scope. Please make sure\n    Firebase library is only loaded once.\n  ");var m=self.firebase.SDK_VERSION;m&&m.indexOf("LITE")>=0&&d.warn("\n    Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n    You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n    ")}var b=g.initializeApp;g.initializeApp=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object(a.y)()&&d.warn('\n      Warning: This is a browser-targeted Firebase bundle but it appears it is being\n      run in a Node environment.  If running in a Node environment, make sure you\n      are using the bundle specified by the "main" field in package.json.\n      \n      If you are using Webpack, you can specify "main" as the first item in\n      "resolve.mainFields":\n      https://webpack.js.org/configuration/resolve/#resolvemainfields\n      \n      If using Rollup, use the @rollup/plugin-node-resolve plugin and specify "main"\n      as the first item in "mainFields", e.g. [\'main\', \'module\'].\n      https://github.com/rollup/@rollup/plugin-node-resolve\n      '),b.apply(void 0,t)};var w=g;!function(t,e){t.INTERNAL.registerComponent(new s.a("platform-logger",(function(t){return new y(t)}),"PRIVATE")),t.registerVersion(f,"0.6.13",e),t.registerVersion("fire-js","")}(w),e.a=w},function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),i=0;for(e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var i;n.d(e,"a",(function(){return o}
2)),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return h})),n.d(e,"d",(function(){return p}));var o,a=[];!function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"}(o||(o={}));var s={debug:o.DEBUG,verbose:o.VERBOSE,info:o.INFO,warn:o.WARN,error:o.ERROR,silent:o.SILENT},u=o.INFO,c=((i={})[o.DEBUG]="log",i[o.VERBOSE]="log",i[o.INFO]="info",i[o.WARN]="warn",i[o.ERROR]="error",i),l=function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];if(!(e<t.logLevel)){var o=(new Date).toISOString(),a=c[e];if(!a)throw new Error("Attempted to log a message with an invalid logType (value: "+e+")");console[a].apply(console,r(["["+o+"]  "+t.name+":"],n))}},f=function(){function t(t){this.name=t,this._logLevel=u,this._logHandler=l,this._userLogHandler=null,a.push(this)}return Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(t){if(!(t in o))throw new TypeError('Invalid value "'+t+'" assigned to `logLevel`');this._logLevel=t},enumerable:!1,configurable:!0}),t.prototype.setLogLevel=function(t){this._logLevel="string"===typeof t?s[t]:t},Object.defineProperty(t.prototype,"logHandler",{get:function(){return this._logHandler},set:function(t){if("function"!==typeof t)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(t){this._userLogHandler=t},enumerable:!1,configurable:!0}),t.prototype.debug=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.DEBUG],t)),this._logHandler.apply(this,r([this,o.DEBUG],t))},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.VERBOSE],t)),this._logHandler.apply(this,r([this,o.VERBOSE],t))},t.prototype.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.INFO],t)),this._logHandler.apply(this,r([this,o.INFO],t))},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.WARN],t)),this._logHandler.apply(this,r([this,o.WARN],t))},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._userLogHandler&&this._userLogHandler.apply(this,r([this,o.ERROR],t)),this._logHandler.apply(this,r([this,o.ERROR],t))},t}();function h(t){a.forEach((function(e){e.setLogLevel(t)}))}function p(t,e){for(var n=function(n){var r=null;e&&e.level&&(r=s[e.level]),n.userLogHandler=null===t?null:function(e,n){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=i.map((function(t){if(null==t)return null;if("string"===typeof t)return t;if("number"===typeof t||"boolean"===typeof t)return t.toString();if(t instanceof Error)return t.message;try{return JSON.stringify(t)}catch(e){return null}})).filter((function(t){return t})).join(" ");n>=(null!==r&&void 0!==r?r:e.logLevel)&&t({level:o[n].toLowerCase(),message:s,args:i,type:e.name})}},r=0,i=a;r<i.length;r++){n(i[r])}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return s}));var r=n(0),i=n(1),o=function(){function t(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY"}return t.prototype.setInstantiationMode=function(t){return this.instantiationMode=t,this},t.prototype.setMultipleInstances=function(t){return this.multipleInstances=t,this},t.prototype.setServiceProps=function(t){return this.serviceProps=t,this},t}(),a="[DEFAULT]",s=function(){function t(t,e){this.name=t,this.container=e,this.component=null,this.instances=new Map,this.instancesDeferred=new Map}return t.prototype.get=function(t){void 0===t&&(t=a);var e=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(e)){var n=new i.a;this.instancesDeferred.set(e,n);try{var r=this.getOrInitializeService(e);r&&n.resolve(r)}catch(o){}}return this.instancesDeferred.get(e).promise},t.prototype.getImmediate=function(t){var e=Object(r.a)({identifier:a,optional:!1},t),n=e.identifier,i=e.optional,o=this.normalizeInstanceIdentifier(n);try{var s=this.getOrInitializeService(o);if(!s){if(i)return null;throw Error("Service "+this.name+" is not available")}return s}catch(u){if(i)return null;throw u}},t.prototype.getComponent=function(){return this.component},t.prototype.setComponent=function(t){var e,n;if(t.name!==this.name)throw Error("Mismatching Component "+t.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");
2if(this.component=t,function(t){return"EAGER"===t.instantiationMode}(t))try{this.getOrInitializeService(a)}catch(h){}try{for(var i=Object(r.h)(this.instancesDeferred.entries()),o=i.next();!o.done;o=i.next()){var s=Object(r.e)(o.value,2),u=s[0],c=s[1],l=this.normalizeInstanceIdentifier(u);try{var f=this.getOrInitializeService(l);c.resolve(f)}catch(h){}}}catch(p){e={error:p}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},t.prototype.clearInstance=function(t){void 0===t&&(t=a),this.instancesDeferred.delete(t),this.instances.delete(t)},t.prototype.delete=function(){return Object(r.b)(this,void 0,void 0,(function(){var t;return Object(r.d)(this,(function(e){switch(e.label){case 0:return t=Array.from(this.instances.values()),[4,Promise.all(Object(r.f)(t.filter((function(t){return"INTERNAL"in t})).map((function(t){return t.INTERNAL.delete()})),t.filter((function(t){return"_delete"in t})).map((function(t){return t._delete()}))))];case 1:return e.sent(),[2]}}))}))},t.prototype.isComponentSet=function(){return null!=this.component},t.prototype.getOrInitializeService=function(t){var e=this.instances.get(t);return!e&&this.component&&(e=this.component.instanceFactory(this.container,function(t){return t===a?void 0:t}(t)),this.instances.set(t,e)),e||null},t.prototype.normalizeInstanceIdentifier=function(t){return this.component?this.component.multipleInstances?t:a:t},t}();var u=function(){function t(t){this.name=t,this.providers=new Map}return t.prototype.addComponent=function(t){var e=this.getProvider(t.name);if(e.isComponentSet())throw new Error("Component "+t.name+" has already been registered with "+this.name);e.setComponent(t)},t.prototype.addOrOverwriteComponent=function(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)},t.prototype.getProvider=function(t){if(this.providers.has(t))return this.providers.get(t);var e=new s(t,this);return this.providers.set(t,e),e},t.prototype.getProviders=function(){return Array.from(this.providers.values())},t}()},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return vc})),n.d(e,"b",(function(){return hc})),n.d(e,"c",(function(){return k})),n.d(e,"d",(function(){return lc})),n.d(e,"e",(function(){return pc})),n.d(e,"f",(function(){return wc})),n.d(e,"g",(function(){return bc})),n.d(e,"h",(function(){return Tu})),n.d(e,"i",(function(){return _c})),n.d(e,"j",(function(){return Sc})),n.d(e,"k",(function(){return Su})),n.d(e,"l",(function(){return Pc})),n.d(e,"m",(function(){return Oc})),n.d(e,"n",(function(){return Ac})),n.d(e,"o",(function(){return Ic})),n.d(e,"p",(function(){return dc})),n.d(e,"q",(function(){return Ls})),n.d(e,"r",(function(){return cc})),n.d(e,"s",(function(){return Cc})),n.d(e,"t",(function(){return F}));var r=n(5),i=n(1),o=n(11),a=n(0),s=new r.b("@firebase/firestore");function u(){return s.logLevel}function c(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(s.logLevel<=r.a.DEBUG){var i=e.map(h);s.debug.apply(s,Object(a.g)(["Firestore (8.2.1): "+t],i))}}function l(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(s.logLevel<=r.a.ERROR){var i=e.map(h);s.error.apply(s,Object(a.g)(["Firestore (8.2.1): "+t],i))}}function f(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(s.logLevel<=r.a.WARN){var i=e.map(h);s.warn.apply(s,Object(a.g)(["Firestore (8.2.1): "+t],i))}}function h(t){if("string"==typeof t)return t;try{return e=t,JSON.stringify(e)}catch(e){return t}var e}function p(t){void 0===t&&(t="Unexpected state");var e="FIRESTORE (8.2.1) INTERNAL ASSERTION FAILED: "+t;throw l(e),new Error(e)}function d(t,e){t||p()}function v(t,e){return t}function g(t){var e="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&"function"==typeof e.getRandomValues)e.getRandomValues(n);else for(var r=0;r<t;r++)n[r]=Math.floor(256*Math.random());return n}var y=function(){function t(){}return t.t=function(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e=Math.floor(256/t.length)*t.length,n="";n.length<20;)for(var r=g(40),i=0;i<r.length;++i)n.length<20&&r[i]<e&&(n+=t.charAt(r[i]%t.length));return n},t}();function m(t,e){return t<e?-1:t>e?1:0}function b(t,e,n){return t.length===e.length&&t.every((function(t,r){return n(t,e[r])}))}function w(t){return t+"\0"}var _=function(){function t(t){this.i=t}return t.fromBase64String=function(e){return new t(atob(e))},t.fromUint8Array=function(e){return new t(function(t){for(var e="",n=0;n<t.length;++n)e+=String.fromCharCode(t[n]);return e}(e))},t.prototype.toBase64=function(){return t=this.i,btoa(t);var t},t.prototype.toUint8Array=function(){return function(t){for(var e=new Uint8Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}(this.i)},t.prototype.o=function(){return 2*this.i.length},t.prototype.u=function(t){return m(this.i,t.i)},t.prototype.isEqual=function(t){return this.i===t.i},t}();_.h=new _("");var E={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENT
2ED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},O=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).code=e,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return Object(a.c)(e,t),e}(Error),S=function(){function t(t){this.l=t}return t.fromBase64String=function(e){try{return new t(_.fromBase64String(e))}catch(e){throw new O(E.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}},t.fromUint8Array=function(e){return new t(_.fromUint8Array(e))},t.prototype.toBase64=function(){return this.l.toBase64()},t.prototype.toUint8Array=function(){return this.l.toUint8Array()},t.prototype.toString=function(){return"Bytes(base64: "+this.toBase64()+")"},t.prototype.isEqual=function(t){return this.l.isEqual(t.l)},t}(),T=function(t){this._=t};function I(){if("undefined"==typeof Uint8Array)throw new O(E.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function C(){if("undefined"==typeof atob)throw new O(E.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var k=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.fromBase64String=function(t){return C(),new e(S.fromBase64String(t))},e.fromUint8Array=function(t){return I(),new e(S.fromUint8Array(t))},e.prototype.toBase64=function(){return C(),this._.toBase64()},e.prototype.toUint8Array=function(){return I(),this._.toUint8Array()},e.prototype.isEqual=function(t){return this._.isEqual(t._)},e.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},e}(T),P=function(t,e,n,r,i,o){this.T=t,this.persistenceKey=e,this.host=n,this.ssl=r,this.forceLongPolling=i,this.I=o},A=function(){function t(t,e){this.projectId=t,this.database=e||"(default)"}return Object.defineProperty(t.prototype,"m",{get:function(){return"(default)"===this.database},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return e instanceof t&&e.projectId===this.projectId&&e.database===this.database},t}(),N=function(){function t(t){this.uid=t}return t.prototype.A=function(){return null!=this.uid},t.prototype.R=function(){return this.A()?"uid:"+this.uid:"anonymous-user"},t.prototype.isEqual=function(t){return t.uid===this.uid},t}();N.UNAUTHENTICATED=new N(null),N.P=new N("google-credentials-uid"),N.g=new N("first-party-uid");var x=function(t,e){this.user=e,this.type="OAuth",this.V={},this.V.Authorization="Bearer "+t},j=function(){function t(){this.p=null}return t.prototype.getToken=function(){return Promise.resolve(null)},t.prototype.v=function(){},t.prototype.S=function(t){this.p=t,t(N.UNAUTHENTICATED)},t.prototype.D=function(){this.p=null},t}(),R=function(){function t(t){var e=this;this.C=null,this.currentUser=N.UNAUTHENTICATED,this.N=!1,this.F=0,this.p=null,this.forceRefresh=!1,this.C=function(){e.F++,e.currentUser=e.O(),e.N=!0,e.p&&e.p(e.currentUser)},this.F=0,this.auth=t.getImmediate({optional:!0}),this.auth?this.auth.addAuthTokenListener(this.C):(this.C(null),t.get().then((function(t){e.auth=t,e.C&&e.auth.addAuthTokenListener(e.C)}),(function(){})))}return t.prototype.getToken=function(){var t=this,e=this.F,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return t.F!==e?(c("FirebaseCredentialsProvider","getToken aborted due to token change."),t.getToken()):n?(d("string"==typeof n.accessToken),new x(n.accessToken,t.currentUser)):null})):Promise.resolve(null)},t.prototype.v=function(){this.forceRefresh=!0},t.prototype.S=function(t){this.p=t,this.N&&t(this.currentUser)},t.prototype.D=function(){this.auth&&this.auth.removeAuthTokenListener(this.C),this.C=null,this.p=null},t.prototype.O=function(){var t=this.auth&&this.auth.getUid();return d(null===t||"string"==typeof t),new N(t)},t}(),D=function(){function t(t,e){this.k=t,this.M=e,this.type="FirstParty",this.user=N.g}return Object.defineProperty(t.prototype,"V",{get:function(){var t={"X-Goog-AuthUser":this.M},e=this.k.auth.getAuthHeaderValueForFirstParty([]);return e&&(t.Authorization=e),t}
2,enumerable:!1,configurable:!0}),t}(),L=function(){function t(t,e){this.k=t,this.M=e}return t.prototype.getToken=function(){return Promise.resolve(new D(this.k,this.M))},t.prototype.S=function(t){t(N.g)},t.prototype.D=function(){},t.prototype.v=function(){},t}(),M=function(){function t(t,e){var n=this;this.previousValue=t,e&&(e.L=function(t){return n.$(t)},this.B=function(t){return e.q(t)})}return t.prototype.$=function(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue},t.prototype.next=function(){var t=++this.previousValue;return this.B&&this.B(t),t},t}();M.U=-1;var F=function(){function t(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new O(E.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new O(E.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new O(E.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new O(E.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return t.now=function(){return t.fromMillis(Date.now())},t.fromDate=function(e){return t.fromMillis(e.getTime())},t.fromMillis=function(e){var n=Math.floor(e/1e3);return new t(n,1e6*(e-1e3*n))},t.prototype.toDate=function(){return new Date(this.toMillis())},t.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},t.prototype.K=function(t){return this.seconds===t.seconds?m(this.nanoseconds,t.nanoseconds):m(this.seconds,t.seconds)},t.prototype.isEqual=function(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds},t.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},t.prototype.toJSON=function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}},t.prototype.valueOf=function(){var t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")},t}(),U=function(){function t(t){this.timestamp=t}return t.W=function(e){return new t(e)},t.min=function(){return new t(new F(0,0))},t.prototype.u=function(t){return this.timestamp.K(t.timestamp)},t.prototype.isEqual=function(t){return this.timestamp.isEqual(t.timestamp)},t.prototype.j=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},t.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},t.prototype.G=function(){return this.timestamp},t}(),V=function(){function t(t,e,n){void 0===e?e=0:e>t.length&&p(),void 0===n?n=t.length-e:n>t.length-e&&p(),this.segments=t,this.offset=e,this.H=n}return Object.defineProperty(t.prototype,"length",{get:function(){return this.H},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return 0===t.J(this,e)},t.prototype.child=function(e){var n=this.segments.slice(this.offset,this.limit());return e instanceof t?e.forEach((function(t){n.push(t)})):n.push(e),this.Y(n)},t.prototype.limit=function(){return this.offset+this.length},t.prototype.X=function(t){return t=void 0===t?1:t,this.Y(this.segments,this.offset+t,this.length-t)},t.prototype.Z=function(){return this.Y(this.segments,this.offset,this.length-1)},t.prototype.tt=function(){return this.segments[this.offset]},t.prototype.et=function(){return this.get(this.length-1)},t.prototype.get=function(t){return this.segments[this.offset+t]},t.prototype.nt=function(){return 0===this.length},t.prototype.st=function(t){if(t.length<this.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.it=function(t){if(this.length+1!==t.length)return!1;for(var e=0;e<this.length;e++)if(this.get(e)!==t.get(e))return!1;return!0},t.prototype.forEach=function(t){for(var e=this.offset,n=this.limit();e<n;e++)t(this.segments[e])},t.prototype.rt=function(){return this.segments.slice(this.offset,this.limit())},t.J=function(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){var i=t.get(r),o=e.get(r);if(i<o)return-1;if(i>o)return 1}return t.length<e.length?-1:t.length>e.length?1:0},t}(),q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.Y=function(t,n,r){return new e(t,n,r)},e.prototype.ot=function(){return this.rt().join("/")},e.prototype.toString=function(){return this.ot()},e.ct=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=[],i=0,o=t;i<o.length;i++){var a=o[i];if(a.indexOf("//")>=0)throw new O(E.INVALID_ARGUMENT,"Invalid segment ("+a+"). Paths must not contain // in them.");r.push.apply(r,a.split("/").filter((function(t){return t.length>0})))}return new e(r)},e.at=function(){return new e([])},e}(V),B=/^[_a-zA-Z][_a-zA-Z0-9]*$/,H=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.Y=function(t,n,r){return new e(t,n,r)},e.ut=function(t){return B.test(t)},e.prototype.ot=function(){return this.rt().map((function(t){return t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),e.ut(t)||(t="`"+t+"`"),t})).join(".")},e.prototype.toString=function(){return this.ot()},e.prototype.ht=function(){return 1===this.length&&"__name__"===this.get(0)},e.lt=function(){return new e(["__name__"])},e._t=function(t){for(var n=[],r="",i=0,o=function(){if(0===r.length)throw new O(E.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},a=!1;i<t.length;){var s=t[i];if("\\"===s){if(i+1===t.length)throw new O(E.INVALID_ARGUMENT,"Path has trailing escape character: "+t);var u=t[i+1];if("\\"!==u&&"."!==u&&"`"!==u)throw new O(E.INVALID_ARGUMENT,"Path has invali
2d escape sequence: "+t);r+=u,i+=2}else"`"===s?(a=!a,i++):"."!==s||a?(r+=s,i++):(o(),i++)}if(o(),a)throw new O(E.INVALID_ARGUMENT,"Unterminated ` in path: "+t);return new e(n)},e.at=function(){return new e([])},e}(V),z=function(){function t(t){this.path=t}return t.ft=function(e){return new t(q.ct(e))},t.dt=function(e){return new t(q.ct(e).X(5))},t.prototype.wt=function(t){return this.path.length>=2&&this.path.get(this.path.length-2)===t},t.prototype.isEqual=function(t){return null!==t&&0===q.J(this.path,t.path)},t.prototype.toString=function(){return this.path.toString()},t.J=function(t,e){return q.J(t.path,e.path)},t.Et=function(t){return t.length%2==0},t.Tt=function(e){return new t(new q(e.slice()))},t}();function K(t){var e=0;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function W(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function G(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}var Q=function(){function t(t){this.fields=t,t.sort(H.J)}return t.prototype.It=function(t){for(var e=0,n=this.fields;e<n.length;e++)if(n[e].st(t))return!0;return!1},t.prototype.isEqual=function(t){return b(this.fields,t.fields,(function(t,e){return t.isEqual(e)}))},t}(),$=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Y(t){if(d(!!t),"string"==typeof t){var e=0,n=$.exec(t);if(d(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),e=Number(r)}var i=new Date(t);return{seconds:Math.floor(i.getTime()/1e3),nanos:e}}return{seconds:J(t.seconds),nanos:J(t.nanos)}}function J(t){return"number"==typeof t?t:"string"==typeof t?Number(t):0}function X(t){return"string"==typeof t?_.fromBase64String(t):_.fromUint8Array(t)}function Z(t){var e,n;return"server_timestamp"===(null===(n=((null===(e=null==t?void 0:t.mapValue)||void 0===e?void 0:e.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function tt(t){var e=t.mapValue.fields.__previous_value__;return Z(e)?tt(e):e}function et(t){var e=Y(t.mapValue.fields.__local_write_time__.timestampValue);return new F(e.seconds,e.nanos)}function nt(t){return null==t}function rt(t){return 0===t&&1/t==-1/0}function it(t){return"number"==typeof t&&Number.isInteger(t)&&!rt(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}function ot(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?Z(t)?4:10:p()}function at(t,e){var n=ot(t);if(n!==ot(e))return!1;switch(n){case 0:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return et(t).isEqual(et(e));case 3:return function(t,e){if("string"==typeof t.timestampValue&&"string"==typeof e.timestampValue&&t.timestampValue.length===e.timestampValue.length)return t.timestampValue===e.timestampValue;var n=Y(t.timestampValue),r=Y(e.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(t,e){return X(t.bytesValue).isEqual(X(e.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(t,e){return J(t.geoPointValue.latitude)===J(e.geoPointValue.latitude)&&J(t.geoPointValue.longitude)===J(e.geoPointValue.longitude)}(t,e);case 2:return function(t,e){if("integerValue"in t&&"integerValue"in e)return J(t.integerValue)===J(e.integerValue);if("doubleValue"in t&&"doubleValue"in e){var n=J(t.doubleValue),r=J(e.doubleValue);return n===r?rt(n)===rt(r):isNaN(n)&&isNaN(r)}return!1}(t,e);case 9:return b(t.arrayValue.values||[],e.arrayValue.values||[],at);case 10:return function(t,e){var n=t.mapValue.fields||{},r=e.mapValue.fields||{};if(K(n)!==K(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!at(n[i],r[i])))return!1;return!0}(t,e);default:return p()}}function st(t,e){return void 0!==(t.values||[]).find((function(t){return at(t,e)}))}function ut(t,e){var n=ot(t),r=ot(e);if(n!==r)return m(n,r);switch(n){case 0:return 0;case 1:return m(t.booleanValue,e.booleanValue);case 2:return function(t,e){var n=J(t.integerValue||t.doubleValue),r=J(e.integerValue||e.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(t,e);case 3:return ct(t.timestampValue,e.timestampValue);case 4:return ct(et(t),et(e));case 5:return m(t.stringValue,e.stringValue);case 6:return function(t,e){var n=X(t),r=X(e);return n.u(r)}(t.bytesValue,e.bytesValue);case 7:return function(t,e){for(var n=t.split("/"),r=e.split("/"),i=0;i<n.length&&i<r.length;i++){var o=m(n[i],r[i]);if(0!==o)return o}return m(n.length,r.length)}(t.referenceValue,e.referenceValue);case 8:return function(t,e){var n=m(J(t.latitude),J(e.latitude));return 0!==n?n:m(J(t.longitude),J(e.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return function(t,e){for(var n=t.values||[],r=e.values||[],i=0;i<n.length&&i<r.length;++i){var o=ut(n[i],r[i]);if(o)return o}return m(n.length,r.length)}(t.arrayValue,e.arrayValue);case 10:return function(t,e){var n=t.fields||{},r=Object.keys(n),i=e.fields||{},o=Object.keys(i);r.sort(),o.sort();for(var a=0;a<r.length&&a<o.length;++a){var s=m(r[a],o[a]);if(0!==s)return s;var u=ut(n[r[a]],i[o[a]]);if(0!==u)return u}return m(r.length,o.length)}(t.mapValue,e.mapValue);default:throw p()}}function ct(t,e){if("string"==typeof t&&"string"==typeof e&&t.length===e.length)return m(t,e);var n=Y(t),r=Y(e),i=m(n.seconds,r.seconds);return 0!==i?i:m(n.nanos,r.nanos)}function lt(t){return ft(t)}function ft(t){return"nullValue"in t?"null":"booleanValue"in t?""+t.booleanValue:"integerValue"in t?""+t.integerValue:"doubleValue"in t?""+t.doubleValue:"timestampValue"in t?function(t){var e=Y(t);return"time("+e.seconds+","+e.nanos+")"}
2(t.timestampValue):"stringValue"in t?t.stringValue:"bytesValue"in t?X(t.bytesValue).toBase64():"referenceValue"in t?(n=t.referenceValue,z.dt(n).toString()):"geoPointValue"in t?"geo("+(e=t.geoPointValue).latitude+","+e.longitude+")":"arrayValue"in t?function(t){for(var e="[",n=!0,r=0,i=t.values||[];r<i.length;r++)n?n=!1:e+=",",e+=ft(i[r]);return e+"]"}(t.arrayValue):"mapValue"in t?function(t){for(var e="{",n=!0,r=0,i=Object.keys(t.fields||{}).sort();r<i.length;r++){var o=i[r];n?n=!1:e+=",",e+=o+":"+ft(t.fields[o])}return e+"}"}(t.mapValue):p();var e,n}function ht(t,e){return{referenceValue:"projects/"+t.projectId+"/databases/"+t.database+"/documents/"+e.path.ot()}}function pt(t){return!!t&&"integerValue"in t}function dt(t){return!!t&&"arrayValue"in t}function vt(t){return!!t&&"nullValue"in t}function gt(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function yt(t){return!!t&&"mapValue"in t}var mt=function(){function t(t){this.proto=t}return t.empty=function(){return new t({mapValue:{}})},t.prototype.field=function(t){if(t.nt())return this.proto;for(var e=this.proto,n=0;n<t.length-1;++n){if(!e.mapValue.fields)return null;if(!yt(e=e.mapValue.fields[t.get(n)]))return null}return(e=(e.mapValue.fields||{})[t.et()])||null},t.prototype.isEqual=function(t){return at(this.proto,t.proto)},t}(),bt=function(){function t(t){void 0===t&&(t=mt.empty()),this.At=t,this.Rt=new Map}return t.prototype.set=function(t,e){return this.Pt(t,e),this},t.prototype.delete=function(t){return this.Pt(t,null),this},t.prototype.Pt=function(t,e){for(var n=this.Rt,r=0;r<t.length-1;++r){var i=t.get(r),o=n.get(i);o instanceof Map?n=o:o&&10===ot(o)?(o=new Map(Object.entries(o.mapValue.fields||{})),n.set(i,o),n=o):(o=new Map,n.set(i,o),n=o)}n.set(t.et(),e)},t.prototype.yt=function(){var t=this.gt(H.at(),this.Rt);return null!=t?new mt(t):this.At},t.prototype.gt=function(t,e){var n=this,r=!1,i=this.At.field(t),o=yt(i)?Object.assign({},i.mapValue.fields):{};return e.forEach((function(e,i){if(e instanceof Map){var a=n.gt(t.child(i),e);null!=a&&(o[i]=a,r=!0)}else null!==e?(o[i]=e,r=!0):o.hasOwnProperty(i)&&(delete o[i],r=!0)})),r?{mapValue:{fields:o}}:null},t}();function wt(t){var e=[];return W(t.fields||{},(function(t,n){var r=new H([t]);if(yt(n)){var i=wt(n.mapValue).fields;if(0===i.length)e.push(r);else for(var o=0,a=i;o<a.length;o++){var s=a[o];e.push(r.child(s))}}else e.push(r)})),new Q(e)}var _t=function(t,e){this.key=t,this.version=e},Et=function(t){function e(e,n,r,i){var o=this;return(o=t.call(this,e,n)||this).Vt=r,o.bt=!!i.bt,o.hasCommittedMutations=!!i.hasCommittedMutations,o}return Object(a.c)(e,t),e.prototype.field=function(t){return this.Vt.field(t)},e.prototype.data=function(){return this.Vt},e.prototype.vt=function(){return this.Vt.proto},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.bt===t.bt&&this.hasCommittedMutations===t.hasCommittedMutations&&this.Vt.isEqual(t.Vt)},e.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+this.Vt.toString()+", {hasLocalMutations: "+this.bt+"}), {hasCommittedMutations: "+this.hasCommittedMutations+"})"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.bt||this.hasCommittedMutations},enumerable:!1,configurable:!0}),e}(_t),Ot=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n)||this).hasCommittedMutations=!(!r||!r.hasCommittedMutations),i}return Object(a.c)(e,t),e.prototype.toString=function(){return"NoDocument("+this.key+", "+this.version+")"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.hasCommittedMutations},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.hasCommittedMutations===this.hasCommittedMutations&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},e}(_t),St=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.toString=function(){return"UnknownDocument("+this.key+", "+this.version+")"},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return!0}
2,enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.version.isEqual(this.version)&&t.key.isEqual(this.key)},e}(_t),Tt=function(t,e,n,r,i,o,a){void 0===e&&(e=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o=null),void 0===a&&(a=null),this.path=t,this.collectionGroup=e,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=o,this.endAt=a,this.St=null};function It(t,e,n,r,i,o,a){return void 0===e&&(e=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o=null),void 0===a&&(a=null),new Tt(t,e,n,r,i,o,a)}function Ct(t){var e=v(t);if(null===e.St){var n=e.path.ot();null!==e.collectionGroup&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map((function(t){return function(t){return t.field.ot()+t.op.toString()+lt(t.value)}(t)})).join(","),n+="|ob:",n+=e.orderBy.map((function(t){return function(t){return t.field.ot()+t.dir}(t)})).join(","),nt(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=Vt(e.startAt)),e.endAt&&(n+="|ub:",n+=Vt(e.endAt)),e.St=n}return e.St}function kt(t,e){if(t.limit!==e.limit)return!1;if(t.orderBy.length!==e.orderBy.length)return!1;for(var n=0;n<t.orderBy.length;n++)if(!Bt(t.orderBy[n],e.orderBy[n]))return!1;if(t.filters.length!==e.filters.length)return!1;for(var r=0;r<t.filters.length;r++)if(i=t.filters[r],o=e.filters[r],i.op!==o.op||!i.field.isEqual(o.field)||!at(i.value,o.value))return!1;var i,o;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!zt(t.startAt,e.startAt)&&zt(t.endAt,e.endAt)}function Pt(t){return z.Et(t.path)&&null===t.collectionGroup&&0===t.filters.length}var At=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).field=e,i.op=n,i.value=r,i}return Object(a.c)(e,t),e.create=function(t,n,r){return t.ht()?"in"===n||"not-in"===n?this.Dt(t,n,r):new Nt(t,n,r):"array-contains"===n?new Dt(t,r):"in"===n?new Lt(t,r):"not-in"===n?new Mt(t,r):"array-contains-any"===n?new Ft(t,r):new e(t,n,r)},e.Dt=function(t,e,n){return"in"===e?new xt(t,n):new jt(t,n)},e.prototype.matches=function(t){var e=t.field(this.field);return"!="===this.op?null!==e&&this.Ct(ut(e,this.value)):null!==e&&ot(this.value)===ot(e)&&this.Ct(ut(e,this.value))},e.prototype.Ct=function(t){switch(this.op){case"<":return t<0;case"<=":return t<=0;case"==":return 0===t;case"!=":return 0!==t;case">":return t>0;case">=":return t>=0;default:return p()}},e.prototype.xt=function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0},e}((function(){})),Nt=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n,r)||this).key=z.dt(r.referenceValue),i}return Object(a.c)(e,t),e.prototype.matches=function(t){var e=z.J(t.key,this.key);return this.Ct(e)},e}(At),xt=function(t){function e(e,n){var r=this;return(r=t.call(this,e,"in",n)||this).keys=Rt("in",n),r}return Object(a.c)(e,t),e.prototype.matches=function(t){return this.keys.some((function(e){return e.isEqual(t.key)}))},e}(At),jt=function(t){function e(e,n){var r=this;return(r=t.call(this,e,"not-in",n)||this).keys=Rt("not-in",n),r}return Object(a.c)(e,t),e.prototype.matches=function(t){return!this.keys.some((function(e){return e.isEqual(t.key)}))},e}(At);function Rt(t,e){var n;return((null===(n=e.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(t){return z.dt(t.referenceValue)}))}var Dt=function(t){function e(e,n){return t.call(this,e,"array-contains",n)||this}return Object(a.c)(e,t),e.prototype.matches=function(t){var e=t.field(this.field);return dt(e)&&st(e.arrayValue,this.value)},e}(At),Lt=function(t){function e(e,n){return t.call(this,e,"in",n)||this}return Object(a.c)(e,t),e.prototype.matches=function(t){var e=t.field(this.field);return null!==e&&st(this.value.arrayValue,e)},e}(At),Mt=function(t){function e(e,n){return t.call(this,e,"not-in",n)||this}return Object(a.c)(e,t),e.prototype.matches=function(t){if(st(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var e=t.field(this.field);return null!==e&&!st(this.value.arrayValue,e)},e}(At),Ft=function(t){function e(e,n){return t.call(this,e,"array-contains-any",n)||this}return Object(a.c)(e,t),e.prototype.matches=function(t){var e=this,n=t.field(this.field);return!(!dt(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(t){return st(e.value.arrayValue,t)}))},e}(At),Ut=function(t,e){this.position=t,this.before=e};function Vt(t){return(t.before?"b":"a")+":"+t.position.map((function(t){return lt(t)})).join(",")}var qt=function(t,e){void 0===e&&(e="asc"),this.field=t,this.dir=e};function Bt(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}function Ht(t,e,n){for(var r=0,i=0;i<t.position.length;i++){var o=e[i],a=t.position[i];if(r=o.field.ht()?z.J(z.dt(a.referenceValue),n.key):ut(a,n.field(o.field)),"desc"===o.dir&&(r*=-1),0!==r)break}return t.before?r<=0:r<0}function zt(t,e){if(null===t)return null===e;if(null===e)return!1;if(t.before!==e.before||t.position.length!==e.position.length)return!1;for(var n=0;n<t.position.length;n++)if(!at(t.position[n],e.position[n]))return!1;return!0}var Kt=function(t,e,n,r,i,o,a,s){void 0===e&&(e=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===o&&(o="F"),void 0===a&&(a=null),void 0===s&&(s=null),this.path=t,this.collectionGroup=e,this.Nt=n,this.filters=r,this.limit=i,this.limitType=o,this.startAt=a,this.endAt=s,this.Ft=null,this.Ot=null,this.startAt,this.endAt};function Wt(t,e,n,r,i,o,a,s){return new Kt(t,e,n,r,i,o,a,s)}function Gt(t){return new Kt(t)}function Qt(t){return!nt(t.limit)&&"F"===t.limitType}function $t(t){return!nt(t.limit)&&"L"===t.limitType}function Yt(t){return t.Nt.length>0?t.Nt[0].field:null}function Jt(t){for(var e=0,n=t.filters;e<n.length;e++){var r=n[e];
2if(r.xt())return r.field}return null}function Xt(t){return null!==t.collectionGroup}function Zt(t){var e=v(t);if(null===e.Ft){e.Ft=[];var n=Jt(e),r=Yt(e);if(null!==n&&null===r)n.ht()||e.Ft.push(new qt(n)),e.Ft.push(new qt(H.lt(),"asc"));else{for(var i=!1,o=0,a=e.Nt;o<a.length;o++){var s=a[o];e.Ft.push(s),s.field.ht()&&(i=!0)}if(!i){var u=e.Nt.length>0?e.Nt[e.Nt.length-1].dir:"asc";e.Ft.push(new qt(H.lt(),u))}}}return e.Ft}function te(t){var e=v(t);if(!e.Ot)if("F"===e.limitType)e.Ot=It(e.path,e.collectionGroup,Zt(e),e.filters,e.limit,e.startAt,e.endAt);else{for(var n=[],r=0,i=Zt(e);r<i.length;r++){var o=i[r],a="desc"===o.dir?"asc":"desc";n.push(new qt(o.field,a))}var s=e.endAt?new Ut(e.endAt.position,!e.endAt.before):null,u=e.startAt?new Ut(e.startAt.position,!e.startAt.before):null;e.Ot=It(e.path,e.collectionGroup,n,e.filters,e.limit,s,u)}return e.Ot}function ee(t,e,n){return new Kt(t.path,t.collectionGroup,t.Nt.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function ne(t,e){return kt(te(t),te(e))&&t.limitType===e.limitType}function re(t){return Ct(te(t))+"|lt:"+t.limitType}function ie(t){return"Query(target="+function(t){var e=t.path.ot();return null!==t.collectionGroup&&(e+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(e+=", filters: ["+t.filters.map((function(t){return(e=t).field.ot()+" "+e.op+" "+lt(e.value);var e})).join(", ")+"]"),nt(t.limit)||(e+=", limit: "+t.limit),t.orderBy.length>0&&(e+=", orderBy: ["+t.orderBy.map((function(t){return function(t){return t.field.ot()+" ("+t.dir+")"}(t)})).join(", ")+"]"),t.startAt&&(e+=", startAt: "+Vt(t.startAt)),t.endAt&&(e+=", endAt: "+Vt(t.endAt)),"Target("+e+")"}(te(t))+"; limitType="+t.limitType+")"}function oe(t,e){return function(t,e){var n=e.key.path;return null!==t.collectionGroup?e.key.wt(t.collectionGroup)&&t.path.st(n):z.Et(t.path)?t.path.isEqual(n):t.path.it(n)}(t,e)&&function(t,e){for(var n=0,r=t.Nt;n<r.length;n++){var i=r[n];if(!i.field.ht()&&null===e.field(i.field))return!1}return!0}(t,e)&&function(t,e){for(var n=0,r=t.filters;n<r.length;n++)if(!r[n].matches(e))return!1;return!0}(t,e)&&function(t,e){return!(t.startAt&&!Ht(t.startAt,Zt(t),e))&&(!t.endAt||!Ht(t.endAt,Zt(t),e))}(t,e)}function ae(t){return function(e,n){for(var r=!1,i=0,o=Zt(t);i<o.length;i++){var a=o[i],s=se(a,e,n);if(0!==s)return s;r=r||a.field.ht()}return 0}}function se(t,e,n){var r=t.field.ht()?z.J(e.key,n.key):function(t,e,n){var r=e.field(t),i=n.field(t);return null!==r&&null!==i?ut(r,i):p()}(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return p()}}var ue=function(){function t(t,e,n,r,i,o,a){void 0===i&&(i=U.min()),void 0===o&&(o=U.min()),void 0===a&&(a=_.h),this.target=t,this.targetId=e,this.kt=n,this.sequenceNumber=r,this.Mt=i,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a}return t.prototype.Lt=function(e){return new t(this.target,this.targetId,this.kt,e,this.Mt,this.lastLimboFreeSnapshotVersion,this.resumeToken)},t.prototype.$t=function(e,n){return new t(this.target,this.targetId,this.kt,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e)},t.prototype.Bt=function(e){return new t(this.target,this.targetId,this.kt,this.sequenceNumber,this.Mt,e,this.resumeToken)},t}();function ce(t,e){if(t.qt){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:rt(e)?"-0":e}}function le(t){return{integerValue:""+t}}function fe(t,e){return it(e)?le(e):ce(t,e)}var he=function(){this.Ut=void 0};function pe(t,e,n){return t instanceof ge?function(t,e){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:t.seconds,nanos:t.nanoseconds}}}};return e&&(n.fields.__previous_value__=e),{mapValue:n}}(n,e):t instanceof ye?me(t,e):t instanceof be?we(t,e):function(t,e){var n=ve(t,e),r=Ee(n)+Ee(t.Qt);return pt(n)&&pt(t.Qt)?le(r):ce(t.Kt,r)}(t,e)}function de(t,e,n){return t instanceof ye?me(t,e):t instanceof be?we(t,e):n}function ve(t,e){return t instanceof _e?pt(n=e)||function(t){return!!t&&"doubleValue"in t}(n)?e:{integerValue:0}:null;var n}var ge=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e}(he),ye=function(t){function e(e){var n=this;return(n=t.call(this)||this).elements=e,n}return Object(a.c)(e,t),e}(he);function me(t,e){for(var n=Oe(e),r=function(t){n.some((function(e){return at(e,t)}))||n.push(t)},i=0,o=t.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var be=function(t){function e(e){var n=this;return(n=t.call(this)||this).elements=e,n}return Object(a.c)(e,t),e}(he);function we(t,e){for(var n=Oe(e),r=function(t){n=n.filter((function(e){return!at(e,t)}))},i=0,o=t.elements;i<o.length;i++)r(o[i]);return{arrayValue:{values:n}}}var _e=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).Kt=e,r.Qt=n,r}return Object(a.c)(e,t),e}(he);function Ee(t){return J(t.integerValue||t.doubleValue)}function Oe(t){return dt(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}var Se=function(t,e){this.field=t,this.transform=e},Te=function(t,e){this.version=t,this.transformResults=e},Ie=function(){function t(t,e){this.updateTime=t,this.exists=e}return t.Wt=function(){return new t},t.exists=function(e){return new t(void 0,e)},t.updateTime=function(e){return new t(e)},Object.defineProperty(t.prototype,"jt",{get:function(){return void 0===this.updateTime&&void 0===this.exists}
2,enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.exists===t.exists&&(this.updateTime?!!t.updateTime&&this.updateTime.isEqual(t.updateTime):!t.updateTime)},t}();function Ce(t,e){return void 0!==t.updateTime?e instanceof Et&&e.version.isEqual(t.updateTime):void 0===t.exists||t.exists===e instanceof Et}var ke=function(){};function Pe(t,e,n){return t instanceof Re?function(t,e,n){var r=t.value;if(n.transformResults){var i=Me(t.fieldTransforms,e,n.transformResults);r=Ue(t.fieldTransforms,r,i)}return new Et(t.key,n.version,r,{hasCommittedMutations:!0})}(t,e,n):t instanceof De?function(t,e,n){if(!Ce(t.Gt,e))return new St(t.key,n.version);var r=Le(t,e,n.transformResults?Me(t.fieldTransforms,e,n.transformResults):[]);return new Et(t.key,n.version,r,{hasCommittedMutations:!0})}(t,e,n):function(t,e,n){return new Ot(t.key,n.version,{hasCommittedMutations:!0})}(t,0,n)}function Ae(t,e,n,r){return t instanceof Re?function(t,e,n,r){if(!Ce(t.Gt,e))return e;var i=t.value;if(t.fieldTransforms){var o=Fe(t.fieldTransforms,n,e,r);i=Ue(t.fieldTransforms,i,o)}var a=je(e);return new Et(t.key,a,i,{bt:!0})}(t,e,r,n):t instanceof De?function(t,e,n,r){if(!Ce(t.Gt,e))return e;var i=je(e),o=Le(t,e,Fe(t.fieldTransforms,n,e,r));return new Et(t.key,i,o,{bt:!0})}(t,e,r,n):function(t,e){return Ce(t.Gt,e)?new Ot(t.key,U.min()):e}(t,e)}function Ne(t,e){return void 0!==t.fieldTransforms?function(t,e){for(var n=null,r=0,i=t;r<i.length;r++){var o=i[r],a=e instanceof Et?e.field(o.field):void 0,s=ve(o.transform,a||null);null!=s&&(n=null==n?(new bt).set(o.field,s):n.set(o.field,s))}return n?n.yt():null}(t.fieldTransforms,e):null}function xe(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.Gt.isEqual(e.Gt)&&!!function(t,e){return void 0===t&&void 0===e||!(!t||!e)&&b(t,e,(function(t,e){return function(t,e){return t.field.isEqual(e.field)&&function(t,e){return t instanceof ye&&e instanceof ye||t instanceof be&&e instanceof be?b(t.elements,e.elements,at):t instanceof _e&&e instanceof _e?at(t.Qt,e.Qt):t instanceof ge&&e instanceof ge}(t.transform,e.transform)}(t,e)}))}(t.fieldTransforms,e.fieldTransforms)&&(0===t.type?t.value.isEqual(e.value):1!==t.type||t.data.isEqual(e.data)&&t.zt.isEqual(e.zt))}function je(t){return t instanceof Et?t.version:U.min()}var Re=function(t){function e(e,n,r,i){void 0===i&&(i=[]);var o=this;return(o=t.call(this)||this).key=e,o.value=n,o.Gt=r,o.fieldTransforms=i,o.type=0,o}return Object(a.c)(e,t),e}(ke),De=function(t){function e(e,n,r,i,o){void 0===o&&(o=[]);var a=this;return(a=t.call(this)||this).key=e,a.data=n,a.zt=r,a.Gt=i,a.fieldTransforms=o,a.type=1,a}return Object(a.c)(e,t),e}(ke);function Le(t,e,n){var r;return r=function(t,e){var n=new bt(e);return t.zt.fields.forEach((function(e){if(!e.nt()){var r=t.data.field(e);null!==r?n.set(e,r):n.delete(e)}})),n.yt()}(t,r=e instanceof Et?e.data():mt.empty()),Ue(t.fieldTransforms,r,n)}function Me(t,e,n){var r=[];d(t.length===n.length);for(var i=0;i<n.length;i++){var o=t[i],a=o.transform,s=null;e instanceof Et&&(s=e.field(o.field)),r.push(de(a,s,n[i]))}return r}function Fe(t,e,n,r){for(var i=[],o=0,a=t;o<a.length;o++){var s=a[o],u=s.transform,c=null;n instanceof Et&&(c=n.field(s.field)),null===c&&r instanceof Et&&(c=r.field(s.field)),i.push(pe(u,c,e))}return i}function Ue(t,e,n){for(var r=new bt(e),i=0;i<t.length;i++){var o=t[i];r.set(o.field,n[i])}return r.yt()}var Ve,qe,Be=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.Gt=n,r.type=2,r.fieldTransforms=[],r}return Object(a.c)(e,t),e}(ke),He=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).key=e,r.Gt=n,r.type=3,r.fieldTransforms=[],r}return Object(a.c)(e,t),e}(ke),ze=function(t){this.count=t};function Ke(t){switch(t){case E.OK:return p();case E.CANCELLED:case E.UNKNOWN:case E.DEADLINE_EXCEEDED:case E.RESOURCE_EXHAUSTED:case E.INTERNAL:case E.UNAVAILABLE:case E.UNAUTHENTICATED:return!1;case E.INVALID_ARGUMENT:case E.NOT_FOUND:case E.ALREADY_EXISTS:case E.PERMISSION_DENIED:case E.FAILED_PRECONDITION:case E.ABORTED:case E.OUT_OF_RANGE:case E.UNIMPLEMENTED:case E.DATA_LOSS:return!0;default:return p()}}function We(t){if(void 0===t)return l("GRPC error has no .code"),E.UNKNOWN;switch(t){case Ve.OK:return E.OK;case Ve.CANCELLED:return E.CANCELLED;case Ve.UNKNOWN:return E.UNKNOWN;case Ve.DEADLINE_EXCEEDED:return E.DEADLINE_EXCEEDED;case Ve.RESOURCE_EXHAUSTED:return E.RESOURCE_EXHAUSTED;case Ve.INTERNAL:return E.INTERNAL;case Ve.UNAVAILABLE:return E.UNAVAILABLE;case Ve.UNAUTHENTICATED:return E.UNAUTHENTICATED;case Ve.INVALID_ARGUMENT:return E.INVALID_ARGUMENT;case Ve.NOT_FOUND:return E.NOT_FOUND;case Ve.ALREADY_EXISTS:return E.ALREADY_EXISTS;case Ve.PERMISSION_DENIED:return E.PERMISSION_DENIED;case Ve.FAILED_PRECONDITION:return E.FAILED_PRECONDITION;case Ve.ABORTED:return E.ABORTED;case Ve.OUT_OF_RANGE:return E.OUT_OF_RANGE;
2case Ve.UNIMPLEMENTED:return E.UNIMPLEMENTED;case Ve.DATA_LOSS:return E.DATA_LOSS;default:return p()}}(qe=Ve||(Ve={}))[qe.OK=0]="OK",qe[qe.CANCELLED=1]="CANCELLED",qe[qe.UNKNOWN=2]="UNKNOWN",qe[qe.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",qe[qe.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",qe[qe.NOT_FOUND=5]="NOT_FOUND",qe[qe.ALREADY_EXISTS=6]="ALREADY_EXISTS",qe[qe.PERMISSION_DENIED=7]="PERMISSION_DENIED",qe[qe.UNAUTHENTICATED=16]="UNAUTHENTICATED",qe[qe.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",qe[qe.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",qe[qe.ABORTED=10]="ABORTED",qe[qe.OUT_OF_RANGE=11]="OUT_OF_RANGE",qe[qe.UNIMPLEMENTED=12]="UNIMPLEMENTED",qe[qe.INTERNAL=13]="INTERNAL",qe[qe.UNAVAILABLE=14]="UNAVAILABLE",qe[qe.DATA_LOSS=15]="DATA_LOSS";var Ge=function(){function t(t,e){this.J=t,this.root=e||$e.EMPTY}return t.prototype.Ht=function(e,n){return new t(this.J,this.root.Ht(e,n,this.J).copy(null,null,$e.Jt,null,null))},t.prototype.remove=function(e){return new t(this.J,this.root.remove(e,this.J).copy(null,null,$e.Jt,null,null))},t.prototype.get=function(t){for(var e=this.root;!e.nt();){var n=this.J(t,e.key);if(0===n)return e.value;n<0?e=e.left:n>0&&(e=e.right)}return null},t.prototype.indexOf=function(t){for(var e=0,n=this.root;!n.nt();){var r=this.J(t,n.key);if(0===r)return e+n.left.size;r<0?n=n.left:(e+=n.left.size+1,n=n.right)}return-1},t.prototype.nt=function(){return this.root.nt()},Object.defineProperty(t.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),t.prototype.Yt=function(){return this.root.Yt()},t.prototype.Xt=function(){return this.root.Xt()},t.prototype.Zt=function(t){return this.root.Zt(t)},t.prototype.forEach=function(t){this.Zt((function(e,n){return t(e,n),!1}))},t.prototype.toString=function(){var t=[];return this.Zt((function(e,n){return t.push(e+":"+n),!1})),"{"+t.join(", ")+"}"},t.prototype.te=function(t){return this.root.te(t)},t.prototype.ee=function(){return new Qe(this.root,null,this.J,!1)},t.prototype.ne=function(t){return new Qe(this.root,t,this.J,!1)},t.prototype.se=function(){return new Qe(this.root,null,this.J,!0)},t.prototype.ie=function(t){return new Qe(this.root,t,this.J,!0)},t}(),Qe=function(){function t(t,e,n,r){this.re=r,this.oe=[];for(var i=1;!t.nt();)if(i=e?n(t.key,e):1,r&&(i*=-1),i<0)t=this.re?t.left:t.right;else{if(0===i){this.oe.push(t);break}this.oe.push(t),t=this.re?t.right:t.left}}return t.prototype.ce=function(){var t=this.oe.pop(),e={key:t.key,value:t.value};if(this.re)for(t=t.left;!t.nt();)this.oe.push(t),t=t.right;else for(t=t.right;!t.nt();)this.oe.push(t),t=t.left;return e},t.prototype.ae=function(){return this.oe.length>0},t.prototype.ue=function(){if(0===this.oe.length)return null;var t=this.oe[this.oe.length-1];return{key:t.key,value:t.value}},t}(),$e=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:t.EMPTY,this.right=null!=o?o:t.EMPTY,this.size=this.left.size+1+this.right.size}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.nt=function(){return!1},t.prototype.Zt=function(t){return this.left.Zt(t)||t(this.key,this.value)||this.right.Zt(t)},t.prototype.te=function(t){return this.right.te(t)||t(this.key,this.value)||this.left.te(t)},t.prototype.min=function(){return this.left.nt()?this:this.left.min()},t.prototype.Yt=function(){return this.min().key},t.prototype.Xt=function(){return this.right.nt()?this.key:this.right.Xt()},t.prototype.Ht=function(t,e,n){var r=this,i=n(t,r.key);return(r=i<0?r.copy(null,null,null,r.left.Ht(t,e,n),null):0===i?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.Ht(t,e,n))).he()},t.prototype.le=function(){if(this.left.nt())return t.EMPTY;var e=this;return e.left._e()||e.left.left._e()||(e=e.fe()),(e=e.copy(null,null,null,e.left.le(),null)).he()},t.prototype.remove=function(e,n){var r,i=this;if(n(e,i.key)<0)i.left.nt()||i.left._e()||i.left.left._e()||(i=i.fe()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left._e()&&(i=i.de()),i.right.nt()||i.right._e()||i.right.left._e()||(i=i.we()),0===n(e,i.key)){if(i.right.nt())return t.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.le())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.he()},t.prototype._e=function(){return this.color},t.prototype.he=function(){var t=this;return t.right._e()&&!t.left._e()&&(t=t.Ee()),t.left._e()&&t.left.left._e()&&(t=t.de()),t.left._e()&&t.right._e()&&(t=t.Te()),t},t.prototype.fe=function(){var t=this.Te();return t.right.left._e()&&(t=(t=(t=t.copy(null,null,null,null,t.right.de())).Ee()).Te()),t},t.prototype.we=function(){var t=this.Te();return t.left.left._e()&&(t=(t=t.de()).Te()),t},t.prototype.Ee=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.de=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.Te=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.Ie=function(){var t=this.me();return Math.pow(2,t)<=this.size+1},t.prototype.me=function(){if(this._e()&&this.left._e())throw p();if(this.right._e())throw p();var t=this.left.me();if(t!==this.right.me())throw p();return t+(this._e()?0:1)},t}();
2$e.EMPTY=null,$e.RED=!0,$e.Jt=!1,$e.EMPTY=new(function(){function t(){this.size=0}return Object.defineProperty(t.prototype,"key",{get:function(){throw p()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){throw p()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){throw p()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){throw p()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){throw p()},enumerable:!1,configurable:!0}),t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.Ht=function(t,e,n){return new $e(t,e)},t.prototype.remove=function(t,e){return this},t.prototype.nt=function(){return!0},t.prototype.Zt=function(t){return!1},t.prototype.te=function(t){return!1},t.prototype.Yt=function(){return null},t.prototype.Xt=function(){return null},t.prototype._e=function(){return!1},t.prototype.Ie=function(){return!0},t.prototype.me=function(){return 0},t}());var Ye=function(){function t(t){this.J=t,this.data=new Ge(this.J)}return t.prototype.has=function(t){return null!==this.data.get(t)},t.prototype.first=function(){return this.data.Yt()},t.prototype.last=function(){return this.data.Xt()},Object.defineProperty(t.prototype,"size",{get:function(){return this.data.size},enumerable:!1,configurable:!0}),t.prototype.indexOf=function(t){return this.data.indexOf(t)},t.prototype.forEach=function(t){this.data.Zt((function(e,n){return t(e),!1}))},t.prototype.Ae=function(t,e){for(var n=this.data.ne(t[0]);n.ae();){var r=n.ce();if(this.J(r.key,t[1])>=0)return;e(r.key)}},t.prototype.Re=function(t,e){var n;for(n=void 0!==e?this.data.ne(e):this.data.ee();n.ae();)if(!t(n.ce().key))return},t.prototype.Pe=function(t){var e=this.data.ne(t);return e.ae()?e.ce().key:null},t.prototype.ee=function(){return new Je(this.data.ee())},t.prototype.ne=function(t){return new Je(this.data.ne(t))},t.prototype.add=function(t){return this.copy(this.data.remove(t).Ht(t,!0))},t.prototype.delete=function(t){return this.has(t)?this.copy(this.data.remove(t)):this},t.prototype.nt=function(){return this.data.nt()},t.prototype.ye=function(t){var e=this;return e.size<t.size&&(e=t,t=this),t.forEach((function(t){e=e.add(t)})),e},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.data.ee(),r=e.data.ee();n.ae();){var i=n.ce().key,o=r.ce().key;if(0!==this.J(i,o))return!1}return!0},t.prototype.rt=function(){var t=[];return this.forEach((function(e){t.push(e)})),t},t.prototype.toString=function(){var t=[];return this.forEach((function(e){return t.push(e)})),"SortedSet("+t.toString()+")"},t.prototype.copy=function(e){var n=new t(this.J);return n.data=e,n},t}(),Je=function(){function t(t){this.ge=t}return t.prototype.ce=function(){return this.ge.ce().key},t.prototype.ae=function(){return this.ge.ae()},t}(),Xe=new Ge(z.J);function Ze(){return Xe}function tn(){return Ze()}var en=new Ge(z.J);function nn(){return en}var rn=new Ge(z.J);function on(){return rn}var an=new Ye(z.J);function sn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=an,r=0,i=t;r<i.length;r++){var o=i[r];n=n.add(o)}return n}var un=new Ye(m);function cn(){return un}var ln=function(){function t(t){this.J=t?function(e,n){return t(e,n)||z.J(e.key,n.key)}:function(t,e){return z.J(t.key,e.key)},this.Ve=nn(),this.pe=new Ge(this.J)}return t.be=function(e){return new t(e.J)},t.prototype.has=function(t){return null!=this.Ve.get(t)},t.prototype.get=function(t){return this.Ve.get(t)},t.prototype.first=function(){return this.pe.Yt()},t.prototype.last=function(){return this.pe.Xt()},t.prototype.nt=function(){return this.pe.nt()},t.prototype.indexOf=function(t){var e=this.Ve.get(t);return e?this.pe.indexOf(e):-1},Object.defineProperty(t.prototype,"size",{get:function(){return this.pe.size},enumerable:!1,configurable:!0}),t.prototype.forEach=function(t){this.pe.Zt((function(e,n){return t(e),!1}))},t.prototype.add=function(t){var e=this.delete(t.key);return e.copy(e.Ve.Ht(t.key,t),e.pe.Ht(t,null))},t.prototype.delete=function(t){var e=this.get(t);return e?this.copy(this.Ve.remove(t),this.pe.remove(e)):this},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;
2for(var n=this.pe.ee(),r=e.pe.ee();n.ae();){var i=n.ce().key,o=r.ce().key;if(!i.isEqual(o))return!1}return!0},t.prototype.toString=function(){var t=[];return this.forEach((function(e){t.push(e.toString())})),0===t.length?"DocumentSet ()":"DocumentSet (\n  "+t.join("  \n")+"\n)"},t.prototype.copy=function(e,n){var r=new t;return r.J=this.J,r.Ve=e,r.pe=n,r},t}(),fn=function(){function t(){this.ve=new Ge(z.J)}return t.prototype.track=function(t){var e=t.doc.key,n=this.ve.get(e);n?0!==t.type&&3===n.type?this.ve=this.ve.Ht(e,t):3===t.type&&1!==n.type?this.ve=this.ve.Ht(e,{type:n.type,doc:t.doc}):2===t.type&&2===n.type?this.ve=this.ve.Ht(e,{type:2,doc:t.doc}):2===t.type&&0===n.type?this.ve=this.ve.Ht(e,{type:0,doc:t.doc}):1===t.type&&0===n.type?this.ve=this.ve.remove(e):1===t.type&&2===n.type?this.ve=this.ve.Ht(e,{type:1,doc:n.doc}):0===t.type&&1===n.type?this.ve=this.ve.Ht(e,{type:2,doc:t.doc}):p():this.ve=this.ve.Ht(e,t)},t.prototype.Se=function(){var t=[];return this.ve.Zt((function(e,n){t.push(n)})),t},t}(),hn=function(){function t(t,e,n,r,i,o,a,s){this.query=t,this.docs=e,this.De=n,this.docChanges=r,this.Ce=i,this.fromCache=o,this.xe=a,this.Ne=s}return t.Fe=function(e,n,r,i){var o=[];return n.forEach((function(t){o.push({type:0,doc:t})})),new t(e,n,ln.be(n),o,r,i,!0,!1)},Object.defineProperty(t.prototype,"hasPendingWrites",{get:function(){return!this.Ce.nt()},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){if(!(this.fromCache===t.fromCache&&this.xe===t.xe&&this.Ce.isEqual(t.Ce)&&ne(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.De.isEqual(t.De)))return!1;var e=this.docChanges,n=t.docChanges;if(e.length!==n.length)return!1;for(var r=0;r<e.length;r++)if(e[r].type!==n[r].type||!e[r].doc.isEqual(n[r].doc))return!1;return!0},t}(),pn=function(){function t(t,e,n,r,i){this.Mt=t,this.Oe=e,this.ke=n,this.Me=r,this.Le=i}return t.$e=function(e,n){var r=new Map;return r.set(e,dn.Be(e,n)),new t(U.min(),r,cn(),Ze(),sn())},t}(),dn=function(){function t(t,e,n,r,i){this.resumeToken=t,this.qe=e,this.Ue=n,this.Qe=r,this.Ke=i}return t.Be=function(e,n){return new t(_.h,n,sn(),sn(),sn())},t}(),vn=function(t,e,n,r){this.We=t,this.removedTargetIds=e,this.key=n,this.je=r},gn=function(t,e){this.targetId=t,this.Ge=e},yn=function(t,e,n,r){void 0===n&&(n=_.h),void 0===r&&(r=null),this.state=t,this.targetIds=e,this.resumeToken=n,this.cause=r},mn=function(){function t(){this.ze=0,this.He=_n(),this.Je=_.h,this.Ye=!1,this.Xe=!0}return Object.defineProperty(t.prototype,"qe",{get:function(){return this.Ye},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resumeToken",{get:function(){return this.Je},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Ze",{get:function(){return 0!==this.ze},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tn",{get:function(){return this.Xe},enumerable:!1,configurable:!0}),t.prototype.en=function(t){t.o()>0&&(this.Xe=!0,this.Je=t)},t.prototype.nn=function(){var t=sn(),e=sn(),n=sn();return this.He.forEach((function(r,i){switch(i){case 0:t=t.add(r);break;case 2:e=e.add(r);break;case 1:n=n.add(r);break;default:p()}})),new dn(this.Je,this.Ye,t,e,n)},t.prototype.sn=function(){this.Xe=!1,this.He=_n()},t.prototype.rn=function(t,e){this.Xe=!0,this.He=this.He.Ht(t,e)},t.prototype.on=function(t){this.Xe=!0,this.He=this.He.remove(t)},t.prototype.cn=function(){this.ze+=1},t.prototype.an=function(){this.ze-=1},t.prototype.un=function(){this.Xe=!0,this.Ye=!0},t}(),bn=function(){function t(t){this.hn=t,this.ln=new Map,this._n=Ze(),this.fn=wn(),this.dn=new Ye(m)}return t.prototype.wn=function(t){for(var e=0,n=t.We;e<n.length;e++){var r=n[e];t.je instanceof Et?this.En(r,t.je):t.je instanceof Ot&&this.Tn(r,t.key,t.je)}for(var i=0,o=t.removedTargetIds;i<o.length;i++)r=o[i],this.Tn(r,t.key,t.je)},t.prototype.In=function(t){var e=this;this.mn(t,(function(n){var r=e.An(n);switch(t.state){case 0:e.Rn(n)&&r.en(t.resumeToken);break;case 1:r.an(),r.Ze||r.sn(),r.en(t.resumeToken);break;case 2:r.an(),r.Ze||e.removeTarget(n);break;case 3:e.Rn(n)&&(r.un(),r.en(t.resumeToken));break;case 4:e.Rn(n)&&(e.Pn(n),r.en(t.resumeToken));break;default:p()}}))},t.prototype.mn=function(t,e){var n=this;t.targetIds.length>
20?t.targetIds.forEach(e):this.ln.forEach((function(t,r){n.Rn(r)&&e(r)}))},t.prototype.yn=function(t){var e=t.targetId,n=t.Ge.count,r=this.gn(e);if(r){var i=r.target;if(Pt(i))if(0===n){var o=new z(i.path);this.Tn(e,o,new Ot(o,U.min()))}else d(1===n);else this.Vn(e)!==n&&(this.Pn(e),this.dn=this.dn.add(e))}},t.prototype.pn=function(t){var e=this,n=new Map;this.ln.forEach((function(r,i){var o=e.gn(i);if(o){if(r.qe&&Pt(o.target)){var a=new z(o.target.path);null!==e._n.get(a)||e.bn(i,a)||e.Tn(i,a,new Ot(a,t))}r.tn&&(n.set(i,r.nn()),r.sn())}}));var r=sn();this.fn.forEach((function(t,n){var i=!0;n.Re((function(t){var n=e.gn(t);return!n||2===n.kt||(i=!1,!1)})),i&&(r=r.add(t))}));var i=new pn(t,n,this.dn,this._n,r);return this._n=Ze(),this.fn=wn(),this.dn=new Ye(m),i},t.prototype.En=function(t,e){if(this.Rn(t)){var n=this.bn(t,e.key)?2:0;this.An(t).rn(e.key,n),this._n=this._n.Ht(e.key,e),this.fn=this.fn.Ht(e.key,this.vn(e.key).add(t))}},t.prototype.Tn=function(t,e,n){if(this.Rn(t)){var r=this.An(t);this.bn(t,e)?r.rn(e,1):r.on(e),this.fn=this.fn.Ht(e,this.vn(e).delete(t)),n&&(this._n=this._n.Ht(e,n))}},t.prototype.removeTarget=function(t){this.ln.delete(t)},t.prototype.Vn=function(t){var e=this.An(t).nn();return this.hn.Sn(t).size+e.Ue.size-e.Ke.size},t.prototype.cn=function(t){this.An(t).cn()},t.prototype.An=function(t){var e=this.ln.get(t);return e||(e=new mn,this.ln.set(t,e)),e},t.prototype.vn=function(t){var e=this.fn.get(t);return e||(e=new Ye(m),this.fn=this.fn.Ht(t,e)),e},t.prototype.Rn=function(t){var e=null!==this.gn(t);return e||c("WatchChangeAggregator","Detected inactive target",t),e},t.prototype.gn=function(t){var e=this.ln.get(t);return e&&e.Ze?null:this.hn.Dn(t)},t.prototype.Pn=function(t){var e=this;this.ln.set(t,new mn),this.hn.Sn(t).forEach((function(n){e.Tn(t,n,null)}))},t.prototype.bn=function(t,e){return this.hn.Sn(t).has(e)},t}();function wn(){return new Ge(z.J)}function _n(){return new Ge(z.J)}var En={asc:"ASCENDING",desc:"DESCENDING"},On={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},Sn=function(t,e){this.T=t,this.qt=e};function Tn(t,e){return t.qt?new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+e.nanoseconds).slice(-9)+"Z":{seconds:""+e.seconds,nanos:e.nanoseconds}}function In(t,e){return t.qt?e.toBase64():e.toUint8Array()}function Cn(t,e){return Tn(t,e.G())}function kn(t){return d(!!t),U.W(function(t){var e=Y(t);return new F(e.seconds,e.nanos)}(t))}function Pn(t,e){return function(t){return new q(["projects",t.projectId,"databases",t.database])}(t).child("documents").child(e).ot()}function An(t){var e=q.ct(t);return d(tr(e)),e}function Nn(t,e){return Pn(t.T,e.path)}function xn(t,e){var n=An(e);if(n.get(1)!==t.T.projectId)throw new O(E.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.T.projectId);if(n.get(3)!==t.T.database)throw new O(E.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.T.database);return new z(Ln(n))}function jn(t,e){return Pn(t.T,e)}function Rn(t){var e=An(t);return 4===e.length?q.at():Ln(e)}function Dn(t){return new q(["projects",t.T.projectId,"databases",t.T.database]).ot()}function Ln(t){return d(t.length>4&&"documents"===t.get(4)),t.X(5)}function Mn(t,e,n){return{name:Nn(t,e),fields:n.proto.mapValue.fields}}function Fn(t,e,n){var r=xn(t,e.name),i=kn(e.updateTime),o=new mt({mapValue:{fields:e.fields}});return new Et(r,i,o,{hasCommittedMutations:!!n})}function Un(t,e){var n;if(e instanceof Re)n={update:Mn(t,e.key,e.value)};else if(e instanceof Be)n={delete:Nn(t,e.key)};else if(e instanceof De)n={update:Mn(t,e.key,e.data),updateMask:Zn(e.zt)};else{if(!(e instanceof He))return p();n={verify:Nn(t,e.key)}}return e.fieldTransforms.length>0&&(n.updateTransforms=e.fieldTransforms.map((function(t){return function(t,e){var n=e.transform;if(n instanceof ge)return{fieldPath:e.field.ot(),setToServerValue:"REQUEST_TIME"};if(n instanceof ye)return{fieldPath:e.field.ot(),appendMissingElements:{values:n.elements}};if(n instanceof be)return{fieldPath:e.field.ot(),removeAllFromArray:{values:n.elements}};if(n instanceof _e)return{fieldPath:e.field.ot(),increment:n.Qt};throw p()}(0,t)}))),e.Gt.jt||(n.currentDocument=function(t,e){return void 0!==e.updateTime?{updateTime:Cn(t,e.updateTime)}:void 0!==e.exists?{exists:e.exists}:p()}(t,e.Gt)),n}function Vn(t,e){var n=e.currentDocument?function(t){return void 0!==t.updateTime?Ie.updateTime(kn(t.updateTime)):void 0!==t.exists?Ie.exists(t.exists):Ie.Wt()}(e.currentDocument):Ie.Wt(),r=e.updateTransforms?e.updateTransforms.map((function(e){return function(t,e){var n=null;if("setToServerValue"in e)d("REQUEST_TIME"===e.setToServerValue),n=new ge;else if("appendMissingElements"in e){var r=e.appendMissingElements.values||[];n=new ye(r)}else if("removeAllFromArray"in e){var i=e.removeAllFromArray.values||[];n=new be(i)}else"increment"in e?n=new _e(t,e.increment):p();var o=H._t(e.fieldPath);return new Se(o,n)}(t,e)})):[];if(e.update){e.update.name;var i=xn(t,e.update.name),o=new mt({mapValue:{fields:e.update.fields}});if(e.updateMask){var a=function(t){var e=t.fieldPaths||[];return new Q(e.map((function(t){return H._t(t)})))}(e.updateMask);return new De(i,o,a,n,r)}return new Re(i,o,n,r)}if(e.delete){var s=xn(t,e.delete);return new Be(s,n)}if(e.verify){var u=xn(t,e.verify);return new He(u,n)}return p()}function qn(t,e){return{documents:[jn(t,e.path)]}}function Bn(t,e){var n={structuredQuery:{}},r=e.path;null!==e.collectionGroup?(n.parent=jn(t,r),n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(n.parent=jn(t,r.Z()),n.structuredQuery.from=[{collectionId:r.et()}]);var i=function(t){if(0!==t.length){var e=t.map((function(t){return function(t){if("=="===t.op){if(gt(t.value))return{unaryFilter:{field:$n(t.field),op:"IS_NAN"}};if(vt(t.value))return{unaryFilter:{field:$n(t.field),op:"IS_NULL"}}}else if("!="===t.op){if(gt(t.value))return{unaryFilter:{field:$n(t.field),op:"IS_NOT_NA
2N"}};if(vt(t.value))return{unaryFilter:{field:$n(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:$n(t.field),op:Qn(t.op),value:t.value}}}(t)}));return 1===e.length?e[0]:{compositeFilter:{op:"AND",filters:e}}}}(e.filters);i&&(n.structuredQuery.where=i);var o=function(t){if(0!==t.length)return t.map((function(t){return function(t){return{field:$n(t.field),direction:Gn(t.dir)}}(t)}))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);var a=function(t,e){return t.qt||nt(e)?e:{value:e}}(t,e.limit);return null!==a&&(n.structuredQuery.limit=a),e.startAt&&(n.structuredQuery.startAt=Kn(e.startAt)),e.endAt&&(n.structuredQuery.endAt=Kn(e.endAt)),n}function Hn(t){var e=Rn(t.parent),n=t.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){d(1===r);var o=n.from[0];o.allDescendants?i=o.collectionId:e=e.child(o.collectionId)}var a=[];n.where&&(a=zn(n.where));var s=[];n.orderBy&&(s=n.orderBy.map((function(t){return function(t){return new qt(Yn(t.field),function(t){switch(t){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(t.direction))}(t)})));var u=null;n.limit&&(u=function(t){var e;return nt(e="object"==typeof t?t.value:t)?null:e}(n.limit));var c=null;n.startAt&&(c=Wn(n.startAt));var l=null;return n.endAt&&(l=Wn(n.endAt)),Wt(e,i,s,a,u,"F",c,l)}function zn(t){return t?void 0!==t.unaryFilter?[Xn(t)]:void 0!==t.fieldFilter?[Jn(t)]:void 0!==t.compositeFilter?t.compositeFilter.filters.map((function(t){return zn(t)})).reduce((function(t,e){return t.concat(e)})):p():[]}function Kn(t){return{before:t.before,values:t.position}}function Wn(t){var e=!!t.before,n=t.values||[];return new Ut(n,e)}function Gn(t){return En[t]}function Qn(t){return On[t]}function $n(t){return{fieldPath:t.ot()}}function Yn(t){return H._t(t.fieldPath)}function Jn(t){return At.create(Yn(t.fieldFilter.field),function(t){switch(t){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":default:return p()}}(t.fieldFilter.op),t.fieldFilter.value)}function Xn(t){switch(t.unaryFilter.op){case"IS_NAN":var e=Yn(t.unaryFilter.field);return At.create(e,"==",{doubleValue:NaN});case"IS_NULL":var n=Yn(t.unaryFilter.field);return At.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=Yn(t.unaryFilter.field);return At.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=Yn(t.unaryFilter.field);return At.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return p()}}function Zn(t){var e=[];return t.fields.forEach((function(t){return e.push(t.ot())})),{fieldPaths:e}}function tr(t){return t.length>=4&&"projects"===t.get(0)&&"databases"===t.get(2)}var er=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},nr=function(){function t(t){var e=this;this.Cn=null,this.xn=null,this.result=void 0,this.error=void 0,this.Nn=!1,this.Fn=!1,t((function(t){e.Nn=!0,e.result=t,e.Cn&&e.Cn(t)}),(function(t){e.Nn=!0,e.error=t,e.xn&&e.xn(t)}))}return t.prototype.catch=function(t){return this.next(void 0,t)},t.prototype.next=function(e,n){var r=this;return this.Fn&&p(),this.Fn=!0,this.Nn?this.error?this.On(n,this.error):this.kn(e,this.result):new t((function(t,i){r.Cn=function(n){r.kn(e,n).next(t,i)},r.xn=function(e){r.On(n,e).next(t,i)}}))},t.prototype.Mn=function(){var t=this;return new Promise((function(e,n){t.next(e,n)}))},t.prototype.Ln=function(e){try{var n=e();return n instanceof t?n:t.resolve(n)}catch(e){return t.reject(e)}},t.prototype.kn=function(e,n){return e?this.Ln((function(){return e(n)})):t.resolve(n)},t.prototype.On=function(e,n){return e?this.Ln((function(){return e(n)})):t.reject(n)},t.resolve=function(e){return new t((function(t,n){t(e)}))},t.reject=function(e){return new t((function(t,n){n(e)}))},t.$n=function(e){return new t((function(t,n){var r=0,i=0,o=!1;e.forEach((function(e){++r,e.next((function(){++i,o&&i===r&&t()}),(function(t){return n(t)}))})),o=!0,i===r&&t()}))},t.Bn=function(e){for(var n=t.resolve(!1),r=function(e){n=n.next((function(n){return n?t.resolve(n):e()}))},i=0,o=e;i<o.length;i++)r(o[i]);return n},t.forEach=function(t,e){var n=this,r=[];return t.forEach((function(t,i){r.push(e.call(n,t,i))})),this.$n(r)},t}(),rr=function(){function t(t,e){var n=this;this.action=t,this.transaction=e,this.aborted=!1,this.qn=new er,this.transaction.oncomplete=function(){n.qn.resolve()},this.transaction.onabort=function(){e.error?n.qn.reject(new ar(t,e.error)):n.qn.resolve()},this.transaction.onerror=function(e){var r=fr(e.target.error);n.qn.reject(new ar(t,r))}}return t.open=function(e,n,r,i){try{return new t(n,e.transaction(i,r))}catch(e){throw new ar(n,e)}},Object.defineProperty(t.prototype,"Un",{get:function(){return this.qn.promise}
2,enumerable:!1,configurable:!0}),t.prototype.abort=function(t){t&&this.qn.reject(t),this.aborted||(c("SimpleDb","Aborting transaction:",t?t.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},t.prototype.store=function(t){var e=this.transaction.objectStore(t);return new ur(e)},t}(),ir=function(){function e(t,n,r){this.name=t,this.version=n,this.Qn=r,12.2===e.Kn(Object(i.p)())&&l("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}return e.delete=function(t){return c("SimpleDb","Removing database:",t),cr(window.indexedDB.deleteDatabase(t)).Mn()},e.Wn=function(){if("undefined"==typeof indexedDB)return!1;if(e.jn())return!0;var t=Object(i.p)(),n=e.Kn(t),r=0<n&&n<10,o=e.Gn(t),a=0<o&&o<4.5;return!(t.indexOf("MSIE ")>0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||r||a)},e.jn=function(){var e;return"undefined"!=typeof t&&"YES"===(null===(e=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_KEY:"AIzaSyD-OS7MCa3p5VbOVoCPoBx2XfoHEhPoGeg",REACT_APP_API_AUTH_DOMAIN:"laravel-8c2d4.firebaseapp.com",REACT_APP_API_PROJECT_ID:"laravel-8c2d4",REACT_APP_API_STORAGE_BUCKET:"gs://laravel-8c2d4.appspot.com"}))||void 0===e?void 0:e.zn)},e.Hn=function(t,e){return t.store(e)},e.Kn=function(t){var e=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=e?e[1].split("_").slice(0,2).join("."):"-1";return Number(n)},e.Gn=function(t){var e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)},e.prototype.Jn=function(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n=this;return Object(a.d)(this,(function(r){switch(r.label){case 0:return this.db?[3,2]:(c("SimpleDb","Opening database:",this.name),e=this,[4,new Promise((function(e,r){var i=indexedDB.open(n.name,n.version);i.onsuccess=function(t){var n=t.target.result;e(n)},i.onblocked=function(){r(new ar(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},i.onerror=function(e){var n=e.target.error;"VersionError"===n.name?r(new O(E.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):r(new ar(t,n))},i.onupgradeneeded=function(t){c("SimpleDb",'Database "'+n.name+'" requires upgrade from version:',t.oldVersion);var e=t.target.result;n.Qn.Yn(e,i.transaction,t.oldVersion,n.version).next((function(){c("SimpleDb","Database upgrade to version "+n.version+" complete")}))}}))]);case 1:e.db=r.sent(),r.label=2;case 2:return[2,(this.Xn&&(this.db.onversionchange=function(t){return n.Xn(t)}),this.db)]}}))}))},e.prototype.Zn=function(t){this.Xn=t,this.db&&(this.db.onversionchange=function(e){return t(e)})},e.prototype.runTransaction=function(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s,u,l;return Object(a.d)(this,(function(f){switch(f.label){case 0:i="readonly"===e,o=0,s=function(){var e,s,l,f,h;return Object(a.d)(this,(function(a){switch(a.label){case 0:++o,a.label=1;case 1:return a.trys.push([1,4,,5]),[4,u.Jn(t)];case 2:return u.db=a.sent(),e=rr.open(u.db,t,i?"readonly":"readwrite",n),s=r(e).catch((function(t){return e.abort(t),nr.reject(t)})).Mn(),l={},s.catch((function(){})),[4,e.Un];case 3:return[2,(l.value=(a.sent(),s),l)];case 4:return f=a.sent(),h="FirebaseError"!==f.name&&o<3,c("SimpleDb","Transaction failed with error:",f.message,"Retrying:",h),u.close(),h?[3,5]:[2,{value:Promise.reject(f)}];case 5:return[2]}}
2))},u=this,f.label=1;case 1:return[5,s()];case 2:if("object"==typeof(l=f.sent()))return[2,l.value];f.label=3;case 3:return[3,1];case 4:return[2]}}))}))},e.prototype.close=function(){this.db&&this.db.close(),this.db=void 0},e}(),or=function(){function t(t){this.ts=t,this.es=!1,this.ns=null}return Object.defineProperty(t.prototype,"Nn",{get:function(){return this.es},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ss",{get:function(){return this.ns},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursor",{set:function(t){this.ts=t},enumerable:!1,configurable:!0}),t.prototype.done=function(){this.es=!0},t.prototype.rs=function(t){this.ns=t},t.prototype.delete=function(){return cr(this.ts.delete())},t}(),ar=function(t){function e(e,n){var r=this;return(r=t.call(this,E.UNAVAILABLE,"IndexedDB transaction '"+e+"' failed: "+n)||this).name="IndexedDbTransactionError",r}return Object(a.c)(e,t),e}(O);function sr(t){return"IndexedDbTransactionError"===t.name}var ur=function(){function t(t){this.store=t}return t.prototype.put=function(t,e){var n;return void 0!==e?(c("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(c("SimpleDb","PUT",this.store.name,"<auto-key>",t),n=this.store.put(t)),cr(n)},t.prototype.add=function(t){return c("SimpleDb","ADD",this.store.name,t,t),cr(this.store.add(t))},t.prototype.get=function(t){var e=this;return cr(this.store.get(t)).next((function(n){return void 0===n&&(n=null),c("SimpleDb","GET",e.store.name,t,n),n}))},t.prototype.delete=function(t){return c("SimpleDb","DELETE",this.store.name,t),cr(this.store.delete(t))},t.prototype.count=function(){return c("SimpleDb","COUNT",this.store.name),cr(this.store.count())},t.prototype.os=function(t,e){var n=this.cursor(this.options(t,e)),r=[];return this.cs(n,(function(t,e){r.push(e)})).next((function(){return r}))},t.prototype.us=function(t,e){c("SimpleDb","DELETE ALL",this.store.name);var n=this.options(t,e);n.hs=!1;var r=this.cursor(n);return this.cs(r,(function(t,e,n){return n.delete()}))},t.prototype.ls=function(t,e){var n;e?n=t:(n={},e=t);var r=this.cursor(n);return this.cs(r,e)},t.prototype._s=function(t){var e=this.cursor({});return new nr((function(n,r){e.onerror=function(t){var e=fr(t.target.error);r(e)},e.onsuccess=function(e){var r=e.target.result;r?t(r.primaryKey,r.value).next((function(t){t?r.continue():n()})):n()}}))},t.prototype.cs=function(t,e){var n=[];return new nr((function(r,i){t.onerror=function(t){i(t.target.error)},t.onsuccess=function(t){var i=t.target.result;if(i){var o=new or(i),a=e(i.primaryKey,i.value,o);if(a instanceof nr){var s=a.catch((function(t){return o.done(),nr.reject(t)}));n.push(s)}o.Nn?r():null===o.ss?i.continue():i.continue(o.ss)}else r()}})).next((function(){return nr.$n(n)}))},t.prototype.options=function(t,e){var n=void 0;return void 0!==t&&("string"==typeof t?n=t:e=t),{index:n,range:e}},t.prototype.cursor=function(t){var e="next";if(t.reverse&&(e="prev"),t.index){var n=this.store.index(t.index);return t.hs?n.openKeyCursor(t.range,e):n.openCursor(t.range,e)}return this.store.openCursor(t.range,e)},t}();function cr(t){return new nr((function(e,n){t.onsuccess=function(t){var n=t.target.result;e(n)},t.onerror=function(t){var e=fr(t.target.error);n(e)}}))}var lr=!1;function fr(t){var e=ir.Kn(Object(i.p)());if(e>=12.2&&e<13){var n="An internal error was encountered in the Indexed Database server";if(t.message.indexOf(n)>=0){var r=new O("internal","IOS_INDEXEDDB_BUG1: IndexedDb has thrown '"+n+"'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.");return lr||(lr=!0,setTimeout((function(){throw r}),0)),r}}return t}var hr=function(){function t(t,e,n,r,i){this.fs=t,this.ds=e,this.ws=n,this.op=r,this.Es=i,this.Ts=new er,this.then=this.Ts.promise.then.bind(this.Ts.promise),this.Ts.promise.catch((function(t){}))}return t.Is=function(e,n,r,i,o){var a=new t(e,n,Date.now()+r,i,o);return a.start(r),a},t.prototype.start=function(t){var e=this;this.As=setTimeout((function(){return e.Rs()}),t)},t.prototype.Ps=function(){return this.Rs()},t.prototype.cancel=function(t){null!==this.As&&(this.clearTimeout(),this.Ts.reject(new O(E.CANCELLED,"Operation cancelled"+(t?": "+t:"")))
2)},t.prototype.Rs=function(){var t=this;this.fs.ys((function(){return null!==t.As?(t.clearTimeout(),t.op().then((function(e){return t.Ts.resolve(e)}))):Promise.resolve()}))},t.prototype.clearTimeout=function(){null!==this.As&&(this.Es(this),clearTimeout(this.As),this.As=null)},t}();function pr(t,e){if(l("AsyncQueue",e+": "+t),sr(t))return new O(E.UNAVAILABLE,e+": "+t);throw t}var dr=function(t,e){this.progress=t,this.gs=e},vr="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",gr=function(){function t(){this.Vs=[]}return t.prototype.ps=function(t){this.Vs.push(t)},t.prototype.bs=function(){this.Vs.forEach((function(t){return t()}))},t}();function yr(t){for(var e="",n=0;n<t.length;n++)e.length>0&&(e=br(e)),e=mr(t.get(n),e);return br(e)}function mr(t,e){for(var n=e,r=t.length,i=0;i<r;i++){var o=t.charAt(i);switch(o){case"\0":n+="\x01\x10";break;case"\x01":n+="\x01\x11";break;default:n+=o}}return n}function br(t){return t+"\x01\x01"}function wr(t){var e=t.length;if(d(e>=2),2===e)return d("\x01"===t.charAt(0)&&"\x01"===t.charAt(1)),q.at();for(var n=e-2,r=[],i="",o=0;o<e;){var a=t.indexOf("\x01",o);switch((a<0||a>n)&&p(),t.charAt(a+1)){case"\x01":var s=t.substring(o,a),u=void 0;0===i.length?u=s:(u=i+=s,i=""),r.push(u);break;case"\x10":i+=t.substring(o,a),i+="\0";break;case"\x11":i+=t.substring(o,a+1);break;default:p()}o=a+2}return new q(r)}var _r=function(t,e){this.seconds=t,this.nanoseconds=e},Er=function(t,e,n){this.ownerId=t,this.allowTabSynchronization=e,this.leaseTimestampMs=n};Er.store="owner",Er.key="owner";var Or=function(t,e,n){this.userId=t,this.lastAcknowledgedBatchId=e,this.lastStreamToken=n};Or.store="mutationQueues",Or.keyPath="userId";var Sr=function(t,e,n,r,i){this.userId=t,this.batchId=e,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=i};Sr.store="mutations",Sr.keyPath="batchId",Sr.userMutationsIndex="userMutationsIndex",Sr.userMutationsKeyPath=["userId","batchId"];var Tr=function(){function t(){}return t.prefixForUser=function(t){return[t]},t.prefixForPath=function(t,e){return[t,yr(e)]},t.key=function(t,e,n){return[t,yr(e),n]},t}();Tr.store="documentMutations",Tr.PLACEHOLDER=new Tr;var Ir=function(t,e){this.path=t,this.readTime=e},Cr=function(t,e){this.path=t,this.version=e},kr=function(t,e,n,r,i,o){this.unknownDocument=t,this.noDocument=e,this.document=n,this.hasCommittedMutations=r,this.readTime=i,this.parentPath=o};kr.store="remoteDocuments",kr.readTimeIndex="readTimeIndex",kr.readTimeIndexPath="readTime",kr.collectionReadTimeIndex="collectionReadTimeIndex",kr.collectionReadTimeIndexPath=["parentPath","readTime"];var Pr=function(t){this.byteSize=t};Pr.store="remoteDocumentGlobal",Pr.key="remoteDocumentGlobalKey";var Ar=function(t,e,n,r,i,o,a){this.targetId=t,this.canonicalId=e,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.lastLimboFreeSnapshotVersion=o,this.query=a};Ar.store="targets",Ar.keyPath="targetId",Ar.queryTargetsIndexName="queryTargetsIndex",Ar.queryTargetsKeyPath=["canonicalId","targetId"];var Nr=function(t,e,n){this.targetId=t,this.path=e,this.sequenceNumber=n};Nr.store="targetDocuments",Nr.keyPath=["targetId","path"],Nr.documentTargetsIndex="documentTargetsIndex",Nr.documentTargetsKeyPath=["path","targetId"];var xr=function(t,e,n,r){this.highestTargetId=t,this.highestListenSequenceNumber=e,this.lastRemoteSnapshotVersion=n,this.targetCount=r};xr.key="targetGlobalKey",xr.store="targetGlobal";var jr=function(t,e){this.collectionId=t,this.parent=e};jr.store="collectionParents",jr.keyPath=["collectionId","parent"];var Rr=function(t,e,n,r){this.clientId=t,this.updateTimeMs=e,this.networkEnabled=n,this.inForeground=r};Rr.store="clientMetadata",Rr.keyPath="clientId";var Dr=function(t,e,n){this.bundleId=t,this.createTime=e,this.version=n};Dr.store="bundles",Dr.keyPath="bundleId";var Lr=function(t,e,n){this.name=t,this.readTime=e,this.bundledQuery=n};Lr.store="namedQueries",Lr.keyPath="name";var Mr=Object(a.g)(Object(a.g)(Object(a.g)(Object(a.g)([Or.store,Sr.store,Tr.store,kr.store,Ar.store,Er.store,xr.store,Nr.store],[Rr.store]),[Pr.store]),[jr.store]),[Dr.
2store,Lr.store]),Fr=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).vs=e,r.Ss=n,r}return Object(a.c)(e,t),e}(gr);function Ur(t,e){var n=v(t);return ir.Hn(n.vs,e)}var Vr=function(){function t(t,e,n,r){this.batchId=t,this.Ds=e,this.baseMutations=n,this.mutations=r}return t.prototype.Cs=function(t,e,n){for(var r=n.xs,i=0;i<this.mutations.length;i++){var o=this.mutations[i];o.key.isEqual(t)&&(e=Pe(o,e,r[i]))}return e},t.prototype.Ns=function(t,e){for(var n=0,r=this.baseMutations;n<r.length;n++){var i=r[n];i.key.isEqual(t)&&(e=Ae(i,e,e,this.Ds))}for(var o=e,a=0,s=this.mutations;a<s.length;a++){var u=s[a];u.key.isEqual(t)&&(e=Ae(u,e,o,this.Ds))}return e},t.prototype.Fs=function(t){var e=this,n=t;return this.mutations.forEach((function(r){var i=e.Ns(r.key,t.get(r.key));i&&(n=n.Ht(r.key,i))})),n},t.prototype.keys=function(){return this.mutations.reduce((function(t,e){return t.add(e.key)}),sn())},t.prototype.isEqual=function(t){return this.batchId===t.batchId&&b(this.mutations,t.mutations,(function(t,e){return xe(t,e)}))&&b(this.baseMutations,t.baseMutations,(function(t,e){return xe(t,e)}))},t}(),qr=function(){function t(t,e,n,r){this.batch=t,this.Os=e,this.xs=n,this.ks=r}return t.from=function(e,n,r){d(e.mutations.length===r.length);for(var i=on(),o=e.mutations,a=0;a<o.length;a++)i=i.Ht(o[a].key,r[a].version);return new t(e,n,r,i)},t}(),Br=function(t){this.Ms=t};function Hr(t,e){if(e.document)return Fn(t.Ms,e.document,!!e.hasCommittedMutations);if(e.noDocument){var n=z.Tt(e.noDocument.path),r=Qr(e.noDocument.readTime);return new Ot(n,r,{hasCommittedMutations:!!e.hasCommittedMutations})}if(e.unknownDocument){var i=z.Tt(e.unknownDocument.path);return r=Qr(e.unknownDocument.version),new St(i,r)}return p()}function zr(t,e,n){var r=Kr(n),i=e.key.path.Z().rt();if(e instanceof Et){var o=function(t,e){return{name:Nn(t,e.key),fields:e.vt().mapValue.fields,updateTime:Tn(t,e.version.G())}}(t.Ms,e),a=e.hasCommittedMutations;return new kr(null,null,o,a,r,i)}if(e instanceof Ot){var s=e.key.path.rt(),u=Gr(e.version);return a=e.hasCommittedMutations,new kr(null,new Ir(s,u),null,a,r,i)}if(e instanceof St){var c=e.key.path.rt(),l=Gr(e.version);return new kr(new Cr(c,l),null,null,!0,r,i)}return p()}function Kr(t){var e=t.G();return[e.seconds,e.nanoseconds]}function Wr(t){var e=new F(t[0],t[1]);return U.W(e)}function Gr(t){var e=t.G();return new _r(e.seconds,e.nanoseconds)}function Qr(t){var e=new F(t.seconds,t.nanoseconds);return U.W(e)}function $r(t,e){for(var n=(e.baseMutations||[]).map((function(e){return Vn(t.Ms,e)})),r=e.mutations.length-1;r>=0;--r){var i=e.mutations[r];void 0!==(null==i?void 0:i.transform)&&(e.mutations[r-1].updateTransforms=i.transform.fieldTransforms,e.mutations.splice(r,1),--r)}var o=e.mutations.map((function(e){return Vn(t.Ms,e)})),a=F.fromMillis(e.localWriteTimeMs);return new Vr(e.batchId,a,n,o)}function Yr(t){var e,n,r=Qr(t.readTime),i=void 0!==t.lastLimboFreeSnapshotVersion?Qr(t.lastLimboFreeSnapshotVersion):U.min();return void 0!==t.query.documents?(d(1===(n=t.query).documents.length),e=te(Gt(Rn(n.documents[0])))):e=function(t){return te(Hn(t))}(t.query),new ue(e,t.targetId,0,t.lastListenSequenceNumber,r,i,_.fromBase64String(t.resumeToken))}function Jr(t,e){var n,r=Gr(e.Mt),i=Gr(e.lastLimboFreeSnapshotVersion);n=Pt(e.target)?qn(t.Ms,e.target):Bn(t.Ms,e.target);var o=e.resumeToken.toBase64();return new Ar(e.targetId,Ct(e.target),r,o,e.sequenceNumber,i,n)}function Xr(t){var e=Hn({parent:t.parent,structuredQuery:t.structuredQuery});return"LAST"===t.limitType?ee(e,e.limit,"L"):e}var Zr=function(){function t(){}return t.prototype.Ls=function(t,e){return ti(t).get(e).next((function(t){if(t)return{id:(e=t).bundleId,createTime:Qr(e.createTime),version:e.version};var e}))},t.prototype.$s=function(t,e){return ti(t).put({bundleId:(n=e).id,createTime:Gr(kn(n.createTime)),version:n.version});var n},t.prototype.Bs=function(t,e){return ei(t).get(e).next((function(t){if(t)return{name:(e=t).name,query:Xr(e.bundledQuery),readTime:Qr(e.readTime)};var e}))},t.prototype.qs=function(t,e){return ei(t).put(function(t){return{name:t.name,readTime:Gr(kn(t.readTime)),bundledQuery:t.bundledQuery}}(e))},t}();function ti(t){return Ur(t,Dr.store)}function ei(t){return Ur(t,Lr.store)}var ni=function(){function t(){this.Us=new ri}return t.prototype.Qs=function(t,e){return this.Us.add(e),nr.resolve()},t.prototype.Ks=function(t,e){return nr.resolve(this.Us.getEntries(e))},t}(),ri=function(){function t(){this.index={}}return t.prototype.add=function(t){var e=t.et(),n=t.Z(),r=this.index[e]||new Ye(q.J),i=!r.has(n);return this.index[e]=r.add(n),i},t.prototype.has=function(t){var e=t.et(),n=t.Z(),r=this.index[e];return r&&r.has(n)},t.prototype.getEntries=function(t){return(this.index[t]||new Ye(q.J)).rt()},t}(),ii=function(){function t(){this.Ws=new ri}return t.prototype.Qs=function(t,e){var n=this;if(!this.Ws.has(e)){var r=e.et(),i=e.Z();t.ps((function(){n.Ws.add(e)}));var o={collectionId:r,parent:yr(i)};return oi(t).put(o)}return nr.resolve()},t.prototype.Ks=function(t,e){var n=[],r=IDBKeyRange.bound([e,""],[w(e),""],!1,!0);return oi(t).os(r).next((function(t){for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.collectionId!==e)break;n.push(wr(o.parent))}return n}))},t}();function oi(t){return Ur(t,jr.store)}var ai={js:!1,Gs:0,zs:0,Hs:0},si=function(){function t(t,e,n){this.Js=t,this.Ys=e,this.Xs=n}return t.Zs=function(e){return new t(e,t.ti,t.ei)},t}();function ui(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){if(t.code!==E.FAILED_PRECONDITION||t.message!==vr)throw t;return c("LocalStore","Unexpectedly lost primary lease"),[2]}))}
2))}si.ti=10,si.ei=1e3,si.ni=new si(41943040,si.ti,si.ei),si.si=new si(-1,0,0);var ci=function(){function t(t,e){this.ii=t,this.ri=e,this.oi={}}return t.prototype.get=function(t){var e=this.ii(t),n=this.oi[e];if(void 0!==n)for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];if(this.ri(a,t))return s}},t.prototype.has=function(t){return void 0!==this.get(t)},t.prototype.set=function(t,e){var n=this.ii(t),r=this.oi[n];if(void 0!==r){for(var i=0;i<r.length;i++)if(this.ri(r[i][0],t))return void(r[i]=[t,e]);r.push([t,e])}else this.oi[n]=[[t,e]]},t.prototype.delete=function(t){var e=this.ii(t),n=this.oi[e];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(this.ri(n[r][0],t))return 1===n.length?delete this.oi[e]:n.splice(r,1),!0;return!1},t.prototype.forEach=function(t){W(this.oi,(function(e,n){for(var r=0,i=n;r<i.length;r++){var o=i[r],a=o[0],s=o[1];t(a,s)}}))},t.prototype.nt=function(){return G(this.oi)},t}(),li=function(){function t(){this.ci=new ci((function(t){return t.toString()}),(function(t,e){return t.isEqual(e)})),this.ai=!1}return t.prototype.ui=function(t){var e=this.ci.get(t);return e?e.readTime:U.min()},t.prototype.hi=function(t,e){this.li(),this.ci.set(t.key,{_i:t,readTime:e})},t.prototype.fi=function(t,e){void 0===e&&(e=null),this.li(),this.ci.set(t,{_i:null,readTime:e})},t.prototype.di=function(t,e){this.li();var n=this.ci.get(e);return void 0!==n?nr.resolve(n._i):this.wi(t,e)},t.prototype.getEntries=function(t,e){return this.Ei(t,e)},t.prototype.apply=function(t){return this.li(),this.ai=!0,this.Ti(t)},t.prototype.li=function(){},t}();function fi(t,e,n){var r=t.store(Sr.store),i=t.store(Tr.store),o=[],a=IDBKeyRange.only(n.batchId),s=0,u=r.ls({range:a},(function(t,e,n){return s++,n.delete()}));o.push(u.next((function(){d(1===s)})));for(var c=[],l=0,f=n.mutations;l<f.length;l++){var h=f[l],p=Tr.key(e,h.key.path,n.batchId);o.push(i.delete(p)),c.push(h.key)}return nr.$n(o).next((function(){return c}))}function hi(t){var e;if(t.document)e=t.document;else if(t.unknownDocument)e=t.unknownDocument;else{if(!t.noDocument)throw p();e=t.noDocument}return JSON.stringify(e).length}var pi=function(){function t(t,e,n,r){this.userId=t,this.Kt=e,this.Ii=n,this.mi=r,this.Ai={}}return t.Ri=function(e,n,r,i){return d(""!==e.uid),new t(e.A()?e.uid:"",n,r,i)},t.prototype.Pi=function(t){var e=!0,n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return vi(t).ls({index:Sr.userMutationsIndex,range:n},(function(t,n,r){e=!1,r.done()})).next((function(){return e}))},t.prototype.yi=function(t,e,n,r){var i=this,o=gi(t),a=vi(t);return a.add({}).next((function(s){d("number"==typeof s);for(var u=new Vr(s,e,n,r),c=function(t,e,n){var r=n.baseMutations.map((function(e){return Un(t.Ms,e)})),i=n.mutations.map((function(e){return Un(t.Ms,e)}));return new Sr(e,n.batchId,n.Ds.toMillis(),r,i)}(i.Kt,i.userId,u),l=[],f=new Ye((function(t,e){return m(t.ot(),e.ot())})),h=0,p=r;h<p.length;h++){var v=p[h],g=Tr.key(i.userId,v.key.path,s);f=f.add(v.key.path.Z()),l.push(a.put(c)),l.push(o.put(g,Tr.PLACEHOLDER))}return f.forEach((function(e){l.push(i.Ii.Qs(t,e))})),t.ps((function(){i.Ai[s]=u.keys()})),nr.$n(l).next((function(){return u}))}))},t.prototype.gi=function(t,e){var n=this;return vi(t).get(e).next((function(t){return t?(d(t.userId===n.userId),$r(n.Kt,t)):null}))},t.prototype.Vi=function(t,e){var n=this;return this.Ai[e]?nr.resolve(this.Ai[e]):this.gi(t,e).next((function(t){if(t){var r=t.keys();return n.Ai[e]=r,r}return null}))},t.prototype.pi=function(t,e){var n=this,r=e+1,i=IDBKeyRange.lowerBound([this.userId,r]),o=null;return vi(t).ls({index:Sr.userMutationsIndex,range:i},(function(t,e,i){e.userId===n.userId&&(d(e.batchId>=r),o=$r(n.Kt,e)),i.done()})).next((function(){return o}))},t.prototype.bi=function(t){var e=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return vi(t).ls({index:Sr.userMutationsIndex,range:e,reverse:!0},(function(t,e,r){n=e.batchId,r.done()})).next((function(){return n}))},t.prototype.vi=function(t){var e=this,n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return vi(t).os(Sr.userMutationsIndex,n).next((function(t){return t.map((function(t){return $r(e.Kt,t)}))}))},t.prototype.Si=function(t,e){var n=this,r=Tr.prefixForPath(this.userId,e.path),i=IDBKeyRange.lowerBound(r),o=[];return gi(t).ls({range:i},(function(r,i,a){var s=r[0],u=r[1],c=r[2],l=wr(u);if(s===n.userId&&e.path.isEqual(l))return vi(t).get(c).next((function(t){if(!t)throw p();d(t.userId===n.userId),o.push($r(n.Kt,t))}));a.done()})).next((function(){return o}
2))},t.prototype.Di=function(t,e){var n=this,r=new Ye(m),i=[];return e.forEach((function(e){var o=Tr.prefixForPath(n.userId,e.path),a=IDBKeyRange.lowerBound(o),s=gi(t).ls({range:a},(function(t,i,o){var a=t[0],s=t[1],u=t[2],c=wr(s);a===n.userId&&e.path.isEqual(c)?r=r.add(u):o.done()}));i.push(s)})),nr.$n(i).next((function(){return n.Ci(t,r)}))},t.prototype.xi=function(t,e){var n=this,r=e.path,i=r.length+1,o=Tr.prefixForPath(this.userId,r),a=IDBKeyRange.lowerBound(o),s=new Ye(m);return gi(t).ls({range:a},(function(t,e,o){var a=t[0],u=t[1],c=t[2],l=wr(u);a===n.userId&&r.st(l)?l.length===i&&(s=s.add(c)):o.done()})).next((function(){return n.Ci(t,s)}))},t.prototype.Ci=function(t,e){var n=this,r=[],i=[];return e.forEach((function(e){i.push(vi(t).get(e).next((function(t){if(null===t)throw p();d(t.userId===n.userId),r.push($r(n.Kt,t))})))})),nr.$n(i).next((function(){return r}))},t.prototype.Ni=function(t,e){var n=this;return fi(t.vs,this.userId,e).next((function(r){return t.ps((function(){n.Fi(e.batchId)})),nr.forEach(r,(function(e){return n.mi.Oi(t,e)}))}))},t.prototype.Fi=function(t){delete this.Ai[t]},t.prototype.ki=function(t){var e=this;return this.Pi(t).next((function(n){if(!n)return nr.resolve();var r=IDBKeyRange.lowerBound(Tr.prefixForUser(e.userId)),i=[];return gi(t).ls({range:r},(function(t,n,r){if(t[0]===e.userId){var o=wr(t[1]);i.push(o)}else r.done()})).next((function(){d(0===i.length)}))}))},t.prototype.Mi=function(t,e){return di(t,this.userId,e)},t.prototype.Li=function(t){var e=this;return yi(t).get(this.userId).next((function(t){return t||new Or(e.userId,-1,"")}))},t}();function di(t,e,n){var r=Tr.prefixForPath(e,n.path),i=r[1],o=IDBKeyRange.lowerBound(r),a=!1;return gi(t).ls({range:o,hs:!0},(function(t,n,r){var o=t[0],s=t[1];t[2],o===e&&s===i&&(a=!0),r.done()})).next((function(){return a}))}function vi(t){return Ur(t,Sr.store)}function gi(t){return Ur(t,Tr.store)}function yi(t){return Ur(t,Or.store)}var mi=function(){function t(t){this.$i=t}return t.prototype.next=function(){return this.$i+=2,this.$i},t.Bi=function(){return new t(0)},t.qi=function(){return new t(-1)},t}(),bi=function(){function t(t,e){this.mi=t,this.Kt=e}return t.prototype.Ui=function(t){var e=this;return this.Qi(t).next((function(n){var r=new mi(n.highestTargetId);return n.highestTargetId=r.next(),e.Ki(t,n).next((function(){return n.highestTargetId}))}))},t.prototype.Wi=function(t){return this.Qi(t).next((function(t){return U.W(new F(t.lastRemoteSnapshotVersion.seconds,t.lastRemoteSnapshotVersion.nanoseconds))}))},t.prototype.ji=function(t){return this.Qi(t).next((function(t){return t.highestListenSequenceNumber}))},t.prototype.Gi=function(t,e,n){var r=this;return this.Qi(t).next((function(i){return i.highestListenSequenceNumber=e,n&&(i.lastRemoteSnapshotVersion=n.G()),e>i.highestListenSequenceNumber&&(i.highestListenSequenceNumber=e),r.Ki(t,i)}))},t.prototype.zi=function(t,e){var n=this;return this.Hi(t,e).next((function(){return n.Qi(t).next((function(r){return r.targetCount+=1,n.Ji(e,r),n.Ki(t,r)}))}))},t.prototype.Yi=function(t,e){return this.Hi(t,e)},t.prototype.Xi=function(t,e){var n=this;return this.Zi(t,e.targetId).next((function(){return wi(t).delete(e.targetId)})).next((function(){return n.Qi(t)})).next((function(e){return d(e.targetCount>0),e.targetCount-=1,n.Ki(t,e)}))},t.prototype.tr=function(t,e,n){var r=this,i=0,o=[];return wi(t).ls((function(a,s){var u=Yr(s);u.sequenceNumber<=e&&null===n.get(u.targetId)&&(i++,o.push(r.Xi(t,u)))})).next((function(){return nr.$n(o)})).next((function(){return i}))},t.prototype.mn=function(t,e){return wi(t).ls((function(t,n){var r=Yr(n);e(r)}))},t.prototype.Qi=function(t){return _i(t).get(xr.key).next((function(t){return d(null!==t),t}))},t.prototype.Ki=function(t,e){return _i(t).put(xr.key,e)},t.prototype.Hi=function(t,e){return wi(t).put(Jr(this.Kt,e))},t.prototype.Ji=function(t,e){var n=!1;return t.targetId>e.highestTargetId&&(e.highestTargetId=t.targetId,n=!0),t.sequenceNumber>e.highestListenSequenceNumber&&(e.highestListenSequenceNumber=t.sequenceNumber,n=!0),n},t.prototype.er=function(t){return this.Qi(t).next((function(t){return t.targetCount}))},t.prototype.nr=function(t,e){var n=Ct(e),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]),i=null;return wi(t).ls({range:r,index:Ar.queryTargetsIndexName},(function(t,n,r){var o=Yr(n);kt(e,o.target)&&(i=o,r.done())})).next((function(){return i}))},t.prototype.sr=function(t,e,n){var r=this,i=[],o=Ei(t);return e.forEach((function(e){var a=yr(e.path);i.push(o.put(new Nr(n,a))),i.push(r.mi.ir(t,n,e))})),nr.$n(i)},t.prototype.rr=function(t,e,n){var r=this,i=Ei(t);return nr.forEach(e,(function(e){var o=yr(e.path);return nr.$n([i.delete([n,o]),r.mi.cr(t,n,e)])}))},t.prototype.Zi=function(t,e){var n=Ei(t),r=IDBKeyRange.bound([e],[e+1],!1,!0);return n.delete(r)},t.prototype.ar=function(t,e){var n=IDBKeyRange.bound([e],[e+1],!1,!0),r=Ei(t),i=sn();return r.ls({range:n,hs:!0},(function(t,e,n){var r=wr(t[1]),o=new z(r);
2i=i.add(o)})).next((function(){return i}))},t.prototype.Mi=function(t,e){var n=yr(e.path),r=IDBKeyRange.bound([n],[w(n)],!1,!0),i=0;return Ei(t).ls({index:Nr.documentTargetsIndex,hs:!0,range:r},(function(t,e,n){var r=t[0];t[1],0!==r&&(i++,n.done())})).next((function(){return i>0}))},t.prototype.Dn=function(t,e){return wi(t).get(e).next((function(t){return t?Yr(t):null}))},t}();function wi(t){return Ur(t,Ar.store)}function _i(t){return Ur(t,xr.store)}function Ei(t){return Ur(t,Nr.store)}function Oi(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=m(n,i);return 0===a?m(r,o):a}var Si=function(){function t(t){this.ur=t,this.buffer=new Ye(Oi),this.hr=0}return t.prototype.lr=function(){return++this.hr},t.prototype._r=function(t){var e=[t,this.lr()];if(this.buffer.size<this.ur)this.buffer=this.buffer.add(e);else{var n=this.buffer.last();Oi(e,n)<0&&(this.buffer=this.buffer.delete(n).add(e))}},Object.defineProperty(t.prototype,"maxValue",{get:function(){return this.buffer.last()[0]},enumerable:!1,configurable:!0}),t}(),Ti=function(){function t(t,e){this.dr=t,this.fs=e,this.wr=!1,this.Er=null}return t.prototype.start=function(t){-1!==this.dr.params.Js&&this.Tr(t)},t.prototype.stop=function(){this.Er&&(this.Er.cancel(),this.Er=null)},Object.defineProperty(t.prototype,"Ir",{get:function(){return null!==this.Er},enumerable:!1,configurable:!0}),t.prototype.Tr=function(t){var e=this,n=this.wr?3e5:6e4;c("LruGarbageCollector","Garbage collection scheduled in "+n+"ms"),this.Er=this.fs.mr("lru_garbage_collection",n,(function(){return Object(a.b)(e,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:this.Er=null,this.wr=!0,n.label=1;case 1:return n.trys.push([1,3,,7]),[4,t.Ar(this.dr)];case 2:return n.sent(),[3,7];case 3:return sr(e=n.sent())?(c("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",e),[3,6]):[3,4];case 4:return[4,ui(e)];case 5:n.sent(),n.label=6;case 6:return[3,7];case 7:return[4,this.Tr(t)];case 8:return n.sent(),[2]}}))}))}))},t}(),Ii=function(){function t(t,e){this.Rr=t,this.params=e}return t.prototype.Pr=function(t,e){return this.Rr.yr(t).next((function(t){return Math.floor(e/100*t)}))},t.prototype.gr=function(t,e){var n=this;if(0===e)return nr.resolve(M.U);var r=new Si(e);return this.Rr.mn(t,(function(t){return r._r(t.sequenceNumber)})).next((function(){return n.Rr.Vr(t,(function(t){return r._r(t)}))})).next((function(){return r.maxValue}))},t.prototype.tr=function(t,e,n){return this.Rr.tr(t,e,n)},t.prototype.pr=function(t,e){return this.Rr.pr(t,e)},t.prototype.br=function(t,e){var n=this;return-1===this.params.Js?(c("LruGarbageCollector","Garbage collection skipped; disabled"),nr.resolve(ai)):this.vr(t).next((function(r){return r<n.params.Js?(c("LruGarbageCollector","Garbage collection skipped; Cache size "+r+" is lower than threshold "+n.params.Js),ai):n.Sr(t,e)}))},t.prototype.vr=function(t){return this.Rr.vr(t)},t.prototype.Sr=function(t,e){var n,i,o,a,s,l,f,h=this,p=Date.now();return this.Pr(t,this.params.Ys).next((function(e){return e>h.params.Xs?(c("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+h.params.Xs+" from "+e),i=h.params.Xs):i=e,a=Date.now(),h.gr(t,i)})).next((function(r){return n=r,s=Date.now(),h.tr(t,n,e)})).next((function(e){return o=e,l=Date.now(),h.pr(t,n)})).next((function(t){return f=Date.now(),u()<=r.a.DEBUG&&c("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in "+(a-p)+"ms\n\tDetermined least recently used "+i+" in "+(s-a)+"ms\n\tRemoved "+o+" targets in "+(l-s)+"ms\n\tRemoved "+t+" documents in "+(f-l)+"ms\nTotal Duration: "+(f-p)+"ms"),nr.resolve({js:!0,Gs:i,zs:o,Hs:t})}))},t}(),Ci=function(){function t(t,e){this.db=t,this.dr=function(t,e){return new Ii(t,e)}(this,e)}return t.prototype.yr=function(t){var e=this.Dr(t);return this.db.Cr().er(t).next((function(t){return e.next((function(e){return t+e}))}))},t.prototype.Dr=function(t){var e=0;return this.Vr(t,(function(t){e++})).next((function(){return e}))},t.prototype.mn=function(t,e){return this.db.Cr().mn(t,e)},t.prototype.Vr=function(t,e){return this.Nr(t,(function(t,n){return e(n)}))},t.prototype.ir=function(t,e,n){return ki(t,n)},t.prototype.cr=function(t,e,n){return ki(t,n)},t.prototype.tr=function(t,e,n){return this.db.Cr().tr(t,e,n)},t.prototype.Oi=function(t,e){return ki(t,e)},t.prototype.Fr=function(t,e){return function(t,e){var n=!1;return yi(t)._s((function(r){return di(t,r,e).next((function(t){return t&&(n=!0),nr.resolve(!t)}))})).next((function(){return n}))}(t,e)},t.prototype.pr=function(t,e){var n=this,r=this.db.kr().Or(),i=[],o=0;return this.Nr(t,(function(a,s){if(s<=e){var u=n.Fr(t,a).next((function(e){if(!e)return o++,r.di(t,a).next((function(){return r.fi(a),Ei(t).delete([0,yr(a.path)])}))}));i.push(u)}})).next((function(){return nr.$n(i)})).next((function(){return r.apply(t)})).next((function(){return o}
2))},t.prototype.removeTarget=function(t,e){var n=e.Lt(t.Ss);return this.db.Cr().Yi(t,n)},t.prototype.Mr=function(t,e){return ki(t,e)},t.prototype.Nr=function(t,e){var n,r=Ei(t),i=M.U;return r.ls({index:Nr.documentTargetsIndex},(function(t,r){var o=t[0],a=(t[1],r.path),s=r.sequenceNumber;0===o?(i!==M.U&&e(new z(wr(n)),i),i=s,n=a):i=M.U})).next((function(){i!==M.U&&e(new z(wr(n)),i)}))},t.prototype.vr=function(t){return this.db.kr().Lr(t)},t}();function ki(t,e){return Ei(t).put(function(t,e){return new Nr(0,yr(t.path),e)}(e,t.Ss))}var Pi=function(){function t(t,e){this.Kt=t,this.Ii=e}return t.prototype.hi=function(t,e,n){return xi(t).put(ji(e),n)},t.prototype.fi=function(t,e){var n=xi(t),r=ji(e);return n.delete(r)},t.prototype.updateMetadata=function(t,e){var n=this;return this.getMetadata(t).next((function(r){return r.byteSize+=e,n.$r(t,r)}))},t.prototype.di=function(t,e){var n=this;return xi(t).get(ji(e)).next((function(t){return n.Br(t)}))},t.prototype.qr=function(t,e){var n=this;return xi(t).get(ji(e)).next((function(t){var e=n.Br(t);return e?{_i:e,size:hi(t)}:null}))},t.prototype.getEntries=function(t,e){var n=this,r=tn();return this.Ur(t,e,(function(t,e){var i=n.Br(e);r=r.Ht(t,i)})).next((function(){return r}))},t.prototype.Qr=function(t,e){var n=this,r=tn(),i=new Ge(z.J);return this.Ur(t,e,(function(t,e){var o=n.Br(e);o?(r=r.Ht(t,o),i=i.Ht(t,hi(e))):(r=r.Ht(t,null),i=i.Ht(t,0))})).next((function(){return{Kr:r,Wr:i}}))},t.prototype.Ur=function(t,e,n){if(e.nt())return nr.resolve();var r=IDBKeyRange.bound(e.first().path.rt(),e.last().path.rt()),i=e.ee(),o=i.ce();return xi(t).ls({range:r},(function(t,e,r){for(var a=z.Tt(t);o&&z.J(o,a)<0;)n(o,null),o=i.ce();o&&o.isEqual(a)&&(n(o,e),o=i.ae()?i.ce():null),o?r.rs(o.path.rt()):r.done()})).next((function(){for(;o;)n(o,null),o=i.ae()?i.ce():null}))},t.prototype.jr=function(t,e,n){var r=this,i=nn(),o=e.path.length+1,a={};if(n.isEqual(U.min())){var s=e.path.rt();a.range=IDBKeyRange.lowerBound(s)}else{var u=e.path.rt(),c=Kr(n);a.range=IDBKeyRange.lowerBound([u,c],!0),a.index=kr.collectionReadTimeIndex}return xi(t).ls(a,(function(t,n,a){if(t.length===o){var s=Hr(r.Kt,n);e.path.st(s.key.path)?s instanceof Et&&oe(e,s)&&(i=i.Ht(s.key,s)):a.done()}})).next((function(){return i}))},t.prototype.Or=function(t){return new Ai(this,!!t&&t.Gr)},t.prototype.Lr=function(t){return this.getMetadata(t).next((function(t){return t.byteSize}))},t.prototype.getMetadata=function(t){return Ni(t).get(Pr.key).next((function(t){return d(!!t),t}))},t.prototype.$r=function(t,e){return Ni(t).put(Pr.key,e)},t.prototype.Br=function(t){if(t){var e=Hr(this.Kt,t);return e instanceof Ot&&e.version.isEqual(U.min())?null:e}return null},t}(),Ai=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).zr=e,r.Gr=n,r.Hr=new ci((function(t){return t.toString()}),(function(t,e){return t.isEqual(e)})),r}return Object(a.c)(e,t),e.prototype.Ti=function(t){var e=this,n=[],r=0,i=new Ye((function(t,e){return m(t.ot(),e.ot())}));return this.ci.forEach((function(o,a){var s=e.Hr.get(o);if(a._i){var u=zr(e.zr.Kt,a._i,e.ui(o));i=i.add(o.path.Z());var c=hi(u);r+=c-s,n.push(e.zr.hi(t,o,u))}else if(r-=s,e.Gr){var l=zr(e.zr.Kt,new Ot(o,U.min()),e.ui(o));n.push(e.zr.hi(t,o,l))}else n.push(e.zr.fi(t,o))})),i.forEach((function(r){n.push(e.zr.Ii.Qs(t,r))})),n.push(this.zr.updateMetadata(t,r)),nr.$n(n)},e.prototype.wi=function(t,e){var n=this;return this.zr.qr(t,e).next((function(t){return null===t?(n.Hr.set(e,0),null):(n.Hr.set(e,t.size),t._i)}))},e.prototype.Ei=function(t,e){var n=this;return this.zr.Qr(t,e).next((function(t){var e=t.Kr;return t.Wr.forEach((function(t,e){n.Hr.set(t,e)})),e}))},e}(li);function Ni(t){return Ur(t,Pr.store)}function xi(t){return Ur(t,kr.store)}function ji(t){return t.path.rt()}var Ri=function(){function t(t){this.Kt=t}return t.prototype.Yn=function(t,e,n,r){var i=this;d(n<r&&n>=0&&r<=11);var o=new rr("createOrUpgrade",e);n<1&&r>=1&&(function(t){t.createObjectStore(Er.store)}(t),function(t){t.createObjectStore(Or.store,{keyPath:Or.keyPath}),t.createObjectStore(Sr.store,{keyPath:Sr.keyPath,autoIncrement:!0}).createIndex(Sr.userMutationsIndex,Sr.userMutationsKeyPath,{unique:!0}),t.createObjectStore(Tr.store)}(t),Di(t),function(t){t.createObjectStore(kr.store)}(t));var a=nr.resolve();return n<3&&r>=3&&(0!==n&&(function(t){t.deleteObjectStore(Nr.store),t.deleteObjectStore(Ar.store),t.deleteObjectStore(xr.store)}(t),Di(t)),a=a.next((function(){return function(t){var e=t.store(xr.store),n=new xr(0,0,U.min().G(),0);return e.put(xr.key,n)}(o)}))),n<4&&r>=4&&(0!==n&&(a=a.next((function(){return function(t,e){return e.store(Sr.store).os().next((function(n){t.deleteObjectStore(Sr.store),t.createObjectStore(Sr.store,{keyPath:Sr.keyPath,autoIncrement:!0}).createIndex(Sr.userMutationsIndex,Sr.userMutationsKeyPath,{unique:!0});var r=e.store(Sr.store),i=n.map((function(t){return r.put(t)}));return nr.$n(i)}))}(t,o)}))),a=a.next((function(){!function(t){t.createObjectStore(Rr.store,{keyPath:Rr.keyPath})}(t)}))),n<5&&r>=5&&(a=a.next((function(){return i.Jr(o)}))),n<6&&r>=6&&(a=a.next((function(){return function(t){t.createObjectStore(Pr.store)}(t),i.Yr(o)}))),n<7&&r>=7&&(a=a.next((function(){return i.Xr(o)}))),n<8&&r>=8&&(a=a.next((function(){return i.Zr(t,o)}))),n<9&&r>=9&&(a=a.next((function(){!function(t){t.objectStoreNames.contains("remoteDocumentChanges")&&t.deleteObjectStore("remoteDocumentChanges")}
2(t),function(t){var e=t.objectStore(kr.store);e.createIndex(kr.readTimeIndex,kr.readTimeIndexPath,{unique:!1}),e.createIndex(kr.collectionReadTimeIndex,kr.collectionReadTimeIndexPath,{unique:!1})}(e)}))),n<10&&r>=10&&(a=a.next((function(){return i.eo(o)}))),n<11&&r>=11&&(a=a.next((function(){!function(t){t.createObjectStore(Dr.store,{keyPath:Dr.keyPath})}(t),function(t){t.createObjectStore(Lr.store,{keyPath:Lr.keyPath})}(t)}))),a},t.prototype.Yr=function(t){var e=0;return t.store(kr.store).ls((function(t,n){e+=hi(n)})).next((function(){var n=new Pr(e);return t.store(Pr.store).put(Pr.key,n)}))},t.prototype.Jr=function(t){var e=this,n=t.store(Or.store),r=t.store(Sr.store);return n.os().next((function(n){return nr.forEach(n,(function(n){var i=IDBKeyRange.bound([n.userId,-1],[n.userId,n.lastAcknowledgedBatchId]);return r.os(Sr.userMutationsIndex,i).next((function(r){return nr.forEach(r,(function(r){d(r.userId===n.userId);var i=$r(e.Kt,r);return fi(t,n.userId,i).next((function(){}))}))}))}))}))},t.prototype.Xr=function(t){var e=t.store(Nr.store),n=t.store(kr.store);return t.store(xr.store).get(xr.key).next((function(t){var r=[];return n.ls((function(n,i){var o=new q(n),a=function(t){return[0,yr(t)]}(o);r.push(e.get(a).next((function(n){return n?nr.resolve():function(n){return e.put(new Nr(0,yr(n),t.highestListenSequenceNumber))}(o)})))})).next((function(){return nr.$n(r)}))}))},t.prototype.Zr=function(t,e){t.createObjectStore(jr.store,{keyPath:jr.keyPath});var n=e.store(jr.store),r=new ri,i=function(t){if(r.add(t)){var e=t.et(),i=t.Z();return n.put({collectionId:e,parent:yr(i)})}};return e.store(kr.store).ls({hs:!0},(function(t,e){var n=new q(t);return i(n.Z())})).next((function(){return e.store(Tr.store).ls({hs:!0},(function(t,e){t[0];var n=t[1],r=(t[2],wr(n));return i(r.Z())}))}))},t.prototype.eo=function(t){var e=this,n=t.store(Ar.store);return n.ls((function(t,r){var i=Yr(r),o=Jr(e.Kt,i);return n.put(o)}))},t}();function Di(t){t.createObjectStore(Nr.store,{keyPath:Nr.keyPath}).createIndex(Nr.documentTargetsIndex,Nr.documentTargetsKeyPath,{unique:!0}),t.createObjectStore(Ar.store,{keyPath:Ar.keyPath}).createIndex(Ar.queryTargetsIndexName,Ar.queryTargetsKeyPath,{unique:!0}),t.createObjectStore(xr.store)}var Li="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",Mi=function(){function t(e,n,r,i,o,a,s,u,c,f){if(this.allowTabSynchronization=e,this.persistenceKey=n,this.clientId=r,this.no=o,this.window=a,this.document=s,this.so=c,this.io=f,this.ro=null,this.oo=!1,this.isPrimary=!1,this.networkEnabled=!0,this.co=null,this.inForeground=!1,this.ao=null,this.uo=null,this.ho=Number.NEGATIVE_INFINITY,this.lo=function(t){return Promise.resolve()},!t.Wn())throw new O(E.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.mi=new Ci(this,i),this._o=n+"main",this.Kt=new Br(u),this.fo=new ir(this._o,11,new Ri(this.Kt)),this.wo=new bi(this.mi,this.Kt),this.Ii=new ii,this.Eo=function(t,e){return new Pi(t,e)}(this.Kt,this.Ii),this.To=new Zr,this.window&&this.window.localStorage?this.Io=this.window.localStorage:(this.Io=null,!1===f&&l("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return t.prototype.start=function(){var t=this;return this.mo().then((function(){if(!t.isPrimary&&!t.allowTabSynchronization)throw new O(E.FAILED_PRECONDITION,Li);return t.Ao(),t.Ro(),t.Po(),t.runTransaction("getHighestListenSequenceNumber","readonly",(function(e){return t.wo.ji(e)}))})).then((function(e){t.ro=new M(e,t.so)})).then((function(){t.oo=!0})).catch((function(e){return t.fo&&t.fo.close(),Promise.reject(e)}))},t.prototype.yo=function(t){var e=this;return this.lo=function(n){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return this.Ir?[2,t(n)]:[2]}))}))},t(this.isPrimary)},t.prototype.Vo=function(t){var e=this;this.fo.Zn((function(n){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return null===n.newVersion?[4,t()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
2))}))}))},t.prototype.po=function(t){var e=this;this.networkEnabled!==t&&(this.networkEnabled=t,this.no.ys((function(){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return this.Ir?[4,this.mo()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))})))},t.prototype.mo=function(){var t=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(function(e){return Ui(e).put(new Rr(t.clientId,Date.now(),t.networkEnabled,t.inForeground)).next((function(){if(t.isPrimary)return t.bo(e).next((function(e){e||(t.isPrimary=!1,t.no.vo((function(){return t.lo(!1)})))}))})).next((function(){return t.So(e)})).next((function(n){return t.isPrimary&&!n?t.Do(e).next((function(){return!1})):!!n&&t.Co(e).next((function(){return!0}))}))})).catch((function(e){if(sr(e))return c("IndexedDbPersistence","Failed to extend owner lease: ",e),t.isPrimary;if(!t.allowTabSynchronization)throw e;return c("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1})).then((function(e){t.isPrimary!==e&&t.no.vo((function(){return t.lo(e)})),t.isPrimary=e}))},t.prototype.bo=function(t){var e=this;return Fi(t).get(Er.key).next((function(t){return nr.resolve(e.xo(t))}))},t.prototype.No=function(t){return Ui(t).delete(this.clientId)},t.prototype.Fo=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e,n,r,i=this;return Object(a.d)(this,(function(o){switch(o.label){case 0:return!this.isPrimary||this.Oo(this.ho,18e5)?[3,2]:(this.ho=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(function(t){var e=Ur(t,Rr.store);return e.os().next((function(t){var n=i.ko(t,18e5),r=t.filter((function(t){return-1===n.indexOf(t)}));return nr.forEach(r,(function(t){return e.delete(t.clientId)})).next((function(){return r}))}))})).catch((function(){return[]}))]);case 1:if(t=o.sent(),this.Io)for(e=0,n=t;e<n.length;e++)r=n[e],this.Io.removeItem(this.Mo(r.clientId));o.label=2;case 2:return[2]}}
2))}))},t.prototype.Po=function(){var t=this;this.uo=this.no.mr("client_metadata_refresh",4e3,(function(){return t.mo().then((function(){return t.Fo()})).then((function(){return t.Po()}))}))},t.prototype.xo=function(t){return!!t&&t.ownerId===this.clientId},t.prototype.So=function(t){var e=this;return this.io?nr.resolve(!0):Fi(t).get(Er.key).next((function(n){if(null!==n&&e.Oo(n.leaseTimestampMs,5e3)&&!e.Lo(n.ownerId)){if(e.xo(n)&&e.networkEnabled)return!0;if(!e.xo(n)){if(!n.allowTabSynchronization)throw new O(E.FAILED_PRECONDITION,Li);return!1}}return!(!e.networkEnabled||!e.inForeground)||Ui(t).os().next((function(t){return void 0===e.ko(t,5e3).find((function(t){if(e.clientId!==t.clientId){var n=!e.networkEnabled&&t.networkEnabled,r=!e.inForeground&&t.inForeground,i=e.networkEnabled===t.networkEnabled;if(n||r&&i)return!0}return!1}))}))})).next((function(t){return e.isPrimary!==t&&c("IndexedDbPersistence","Client "+(t?"is":"is not")+" eligible for a primary lease."),t}))},t.prototype.$o=function(){return Object(a.b)(this,void 0,void 0,(function(){var t=this;return Object(a.d)(this,(function(e){switch(e.label){case 0:return this.oo=!1,this.Bo(),this.uo&&(this.uo.cancel(),this.uo=null),this.qo(),this.Uo(),[4,this.fo.runTransaction("shutdown","readwrite",[Er.store,Rr.store],(function(e){var n=new Fr(e,M.U);return t.Do(n).next((function(){return t.No(n)}))}))];case 1:return e.sent(),this.fo.close(),this.Qo(),[2]}}))}))},t.prototype.ko=function(t,e){var n=this;return t.filter((function(t){return n.Oo(t.updateTimeMs,e)&&!n.Lo(t.clientId)}))},t.prototype.Ko=function(){var t=this;return this.runTransaction("getActiveClients","readonly",(function(e){return Ui(e).os().next((function(e){return t.ko(e,18e5).map((function(t){return t.clientId}))}))}))},Object.defineProperty(t.prototype,"Ir",{get:function(){return this.oo},enumerable:!1,configurable:!0}),t.prototype.Wo=function(t){return pi.Ri(t,this.Kt,this.Ii,this.mi)},t.prototype.Cr=function(){return this.wo},t.prototype.kr=function(){return this.Eo},t.prototype.jo=function(){return this.Ii},t.prototype.Go=function(){return this.To},t.prototype.runTransaction=function(t,e,n){var r=this;c("IndexedDbPersistence","Starting transaction:",t);var i,o="readonly"===e?"readonly":"readwrite";return this.fo.runTransaction(t,o,Mr,(function(o){return i=new Fr(o,r.ro?r.ro.next():M.U),"readwrite-primary"===e?r.bo(i).next((function(t){return!!t||r.So(i)})).next((function(e){if(!e)throw l("Failed to obtain primary lease for action '"+t+"'."),r.isPrimary=!1,r.no.vo((function(){return r.lo(!1)})),new O(E.FAILED_PRECONDITION,vr);return n(i)})).next((function(t){return r.Co(i).next((function(){return t}))})):r.zo(i).next((function(){return n(i)}))})).then((function(t){return i.bs(),t}))},t.prototype.zo=function(t){var e=this;return Fi(t).get(Er.key).next((function(t){if(null!==t&&e.Oo(t.leaseTimestampMs,5e3)&&!e.Lo(t.ownerId)&&!e.xo(t)&&!(e.io||e.allowTabSynchronization&&t.allowTabSynchronization))throw new O(E.FAILED_PRECONDITION,Li)}))},t.prototype.Co=function(t){var e=new Er(this.clientId,this.allowTabSynchronization,Date.now());return Fi(t).put(Er.key,e)},t.Wn=function(){return ir.Wn()},t.prototype.Do=function(t){var e=this,n=Fi(t);return n.get(Er.key).next((function(t){return e.xo(t)?(c("IndexedDbPersistence","Releasing primary lease."),n.delete(Er.key)):nr.resolve()}))},t.prototype.Oo=function(t,e){var n=Date.now();return!(t<n-e||t>n&&(l("Detected an update time that is in the future: "+t+" > "+n),1))},t.prototype.Ao=function(){var t=this;null!==this.document&&"function"==typeof this.document.addEventListener&&(this.ao=function(){t.no.ys((function(){return t.inForeground="visible"===t.document.visibilityState,t.mo()}))},this.document.addEventListener("visibilitychange",this.ao),this.inForeground="visible"===this.document.visibilityState)},t.prototype.qo=function(){this.ao&&(this.document.removeEventListener("visibilitychange",this.ao),this.ao=null)},t.prototype.Ro=function(){var t,e=this;"function"==typeof(null===(t=this.window)||void 0===t?void 0:t.addEventListener)&&(this.co=function(){e.Bo(),e.no.ys((function(){return e.$o()}))},this.window.addEventListener("unload",this.co))},t.prototype.Uo=function(){this.co&&(this.window.removeEventListener("unload",this.co),this.co=null)},t.prototype.Lo=function(t){var e;try{var n=null!==(null===(e=this.Io)||void 0===e?void 0:e.getItem(this.Mo(t)));return c("IndexedDbPersistence","Client '"+t+"' "+(n?"is":"is not")+" zombied in LocalStorage"),n}catch(t){return l("IndexedDbPersistence","Failed to get zombied client id.",t),!1}},t.prototype.Bo=function(){if(this.Io)try{this.Io.setItem(this.Mo(this.clientId),String(Date.now()))}catch(t){l("Failed to set zombie client id.",t)}},t.prototype.Qo=function(){if(this.Io)try{this.Io.removeItem(this.Mo(this.clientId))}catch(t){}},t.prototype.Mo=function(t){return"firestore_zombie_"+this.persistenceKey+"_"+t},t}();function Fi(t){return Ur(t,Er.store)}function Ui(t){return Ur(t,Rr.store)}function Vi(t,e){var n=t.projectId;return t.m||(n+="."+t.database),"firestore/"+e+"/"+n+"/"}var qi=function(){function t(t,e,n){this.Eo=t,this.Ho=e,this.Ii=n}return t.prototype.Jo=function(t,e){var n=this;return this.Ho.Si(t,e).next((function(r){return n.Yo(t,e,r)}))},t.prototype.Yo=function(t,e,n){return this.Eo.di(t,e).next((function(t){for(var r=0,i=n;r<i.length;r++)t=i[r].Ns(e,t);return t}))},t.prototype.Xo=function(t,e,n){var r=tn();return e.forEach((function(t,e){for(var i=0,o=n;i<o.length;i++)e=o[i].Ns(t,e);r=r.Ht(t,e)})),r},t.prototype.Zo=function(t,e){var n=this;return this.Eo.getEntries(t,e).next((function(e){return n.tc(t,e)}))},t.prototype.tc=function(t,e){var n=this;return this.Ho.Di(t,e).next((function(r){var i=n.Xo(t,e,r),o=Ze();
2return i.forEach((function(t,e){e||(e=new Ot(t,U.min())),o=o.Ht(t,e)})),o}))},t.prototype.jr=function(t,e,n){return function(t){return z.Et(t.path)&&null===t.collectionGroup&&0===t.filters.length}(e)?this.ec(t,e.path):Xt(e)?this.nc(t,e,n):this.sc(t,e,n)},t.prototype.ec=function(t,e){return this.Jo(t,new z(e)).next((function(t){var e=nn();return t instanceof Et&&(e=e.Ht(t.key,t)),e}))},t.prototype.nc=function(t,e,n){var r=this,i=e.collectionGroup,o=nn();return this.Ii.Ks(t,i).next((function(a){return nr.forEach(a,(function(a){var s=function(t,e){return new Kt(e,null,t.Nt.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt)}(e,a.child(i));return r.sc(t,s,n).next((function(t){t.forEach((function(t,e){o=o.Ht(t,e)}))}))})).next((function(){return o}))}))},t.prototype.sc=function(t,e,n){var r,i,o=this;return this.Eo.jr(t,e,n).next((function(n){return r=n,o.Ho.xi(t,e)})).next((function(e){return i=e,o.ic(t,i,r).next((function(t){r=t;for(var e=0,n=i;e<n.length;e++)for(var o=n[e],a=0,s=o.mutations;a<s.length;a++){var u=s[a],c=u.key,l=r.get(c),f=Ae(u,l,l,o.Ds);r=f instanceof Et?r.Ht(c,f):r.remove(c)}}))})).next((function(){return r.forEach((function(t,n){oe(e,n)||(r=r.remove(t))})),r}))},t.prototype.ic=function(t,e,n){for(var r=sn(),i=0,o=e;i<o.length;i++)for(var a=0,s=o[i].mutations;a<s.length;a++){var u=s[a];u instanceof De&&null===n.get(u.key)&&(r=r.add(u.key))}var c=n;return this.Eo.getEntries(t,r).next((function(t){return t.forEach((function(t,e){null!==e&&e instanceof Et&&(c=c.Ht(t,e))})),c}))},t}(),Bi=function(){function t(t,e,n,r){this.targetId=t,this.fromCache=e,this.rc=n,this.oc=r}return t.cc=function(e,n){for(var r=sn(),i=sn(),o=0,a=n.docChanges;o<a.length;o++){var s=a[o];switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}}return new t(e,n.fromCache,r,i)},t}(),Hi=function(){function t(){}return t.prototype.ac=function(t){this.uc=t},t.prototype.jr=function(t,e,n,i){var o=this;return function(t){return 0===t.filters.length&&null===t.limit&&null==t.startAt&&null==t.endAt&&(0===t.Nt.length||1===t.Nt.length&&t.Nt[0].field.ht())}(e)||n.isEqual(U.min())?this.hc(t,e):this.uc.Zo(t,i).next((function(a){var s=o.lc(e,a);return(Qt(e)||$t(e))&&o._c(e.limitType,s,i,n)?o.hc(t,e):(u()<=r.a.DEBUG&&c("QueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),ie(e)),o.uc.jr(t,e,n).next((function(t){return s.forEach((function(e){t=t.Ht(e.key,e)})),t})))}))},t.prototype.lc=function(t,e){var n=new Ye(ae(t));return e.forEach((function(e,r){r instanceof Et&&oe(t,r)&&(n=n.add(r))})),n},t.prototype._c=function(t,e,n,r){if(n.size!==e.size)return!0;var i="F"===t?e.last():e.first();return!!i&&(i.hasPendingWrites||i.version.u(r)>0)},t.prototype.hc=function(t,e){return u()<=r.a.DEBUG&&c("QueryEngine","Using full collection scan to execute query:",ie(e)),this.uc.jr(t,e,U.min())},t}(),zi=function(){function t(t,e,n,r){this.persistence=t,this.fc=e,this.Kt=r,this.dc=new Ge(m),this.wc=new ci((function(t){return Ct(t)}),kt),this.Ec=U.min(),this.Ho=t.Wo(n),this.Tc=t.kr(),this.wo=t.Cr(),this.Ic=new qi(this.Tc,this.Ho,this.persistence.jo()),this.To=t.Go(),this.fc.ac(this.Ic)}return t.prototype.Ar=function(t){var e=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return t.br(n,e.dc)}))},t}();function Ki(t,e,n,r){return new zi(t,e,n,r)}function Wi(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o;return Object(a.d)(this,(function(a){switch(a.label){case 0:return n=v(t),r=n.Ho,i=n.Ic,[4,n.persistence.runTransaction("Handle user change","readonly",(function(t){var o;return n.Ho.vi(t).next((function(a){return o=a,r=n.persistence.Wo(e),i=new qi(n.Tc,r,n.persistence.jo()),r.vi(t)})).next((function(e){for(var n=[],r=[],a=sn(),s=0,u=o;s<u.length;s++){var c=u[s];n.push(c.batchId);for(var l=0,f=c.mutations;l<f.length;l++){var h=f[l];a=a.add(h.key)}}for(var p=0,d=e;p<d.length;p++){var v=d[p];r.push(v.batchId);for(var g=0,y=v.mutations;g<y.length;g++){var m=y[g];a=a.add(m.key)}}return i.Zo(t,a).next((function(t){return{mc:t,Ac:n,Rc:r}}))}))}))];case 1:return o=a.sent(),[2,(n.Ho=r,n.Ic=i,n.fc.ac(n.Ic),o)]}}))}))}function Gi(t,e){var n=v(t);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(t){var r=e.batch.keys(),i=n.Tc.Or({Gr:!0});return function(t,e,n,r){var i=n.batch,o=i.keys(),a=nr.resolve();return o.forEach((function(t){a=a.next((function(){return r.di(e,t)})).next((function(e){var o=e,a=n.ks.get(t);d(null!==a),(!o||o.version.u(a)<0)&&(o=i.Cs(t,o,n))&&r.hi(o,n.Os)}))})),a.next((function(){return t.Ho.Ni(e,i)}))}(n,t,e,i).next((function(){return i.apply(t)})).next((function(){return n.Ho.ki(t)})).next((function(){return n.Ic.Zo(t,r)}))}))}function Qi(t){var e=v(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",(function(t){return e.wo.Wi(t)}))}function $i(t,e){var n=v(t),r=e.Mt,i=n.dc;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(t){var o=n.Tc.Or({Gr:!0});i=n.dc;var a=[];e.Oe.forEach((function(e,o){var s=i.get(o);if(s){a.push(n.wo.rr(t,e.Ke,o).next((function(){return n.wo.sr(t,e.Ue,o)})));var u=e.resumeToken;if(u.o()>0){var c=s.$t(u,r).Lt(t.Ss);i=i.Ht(o,c),function(t,e,n){return d(e.resumeToken.o()>0),0===t.resumeToken.o()||e.Mt.j()-t.Mt.j()>=3e8||n.Ue.size+n.Qe.size+n.Ke.size>0}(s,c,e)&&a.push(n.wo.Yi(t,c))}}}));var s=Ze();if(e.Me.forEach((function(r,i){e.Le.has(r)&&a.push(n.persistence.mi.Mr(t,r))})),a.push(Yi(t,o,e.Me,r,void 0).next((function(t){s=t}))),!r.isEqual(U.min())){var u=n.wo.Wi(t).next((function(e){return n.wo.Gi(t,t.Ss,r)}));a.push(u)}return nr.$n(a).next((function(){return o.apply(t)})).next((function(){return n.Ic.tc(t,s)}))})).then((function(t){return n.dc=i,t}))}function Yi(t,e,n,r,i){var o=sn();
2return n.forEach((function(t){return o=o.add(t)})),e.getEntries(t,o).next((function(t){var o=Ze();return n.forEach((function(n,a){var s=t.get(n),u=(null==i?void 0:i.get(n))||r;a instanceof Ot&&a.version.isEqual(U.min())?(e.fi(n,u),o=o.Ht(n,a)):null==s||a.version.u(s.version)>0||0===a.version.u(s.version)&&s.hasPendingWrites?(e.hi(a,u),o=o.Ht(n,a)):c("LocalStore","Ignoring outdated watch update for ",n,". Current version:",s.version," Watch version:",a.version)})),o}))}function Ji(t,e){var n=v(t);return n.persistence.runTransaction("Get next mutation batch","readonly",(function(t){return void 0===e&&(e=-1),n.Ho.pi(t,e)}))}function Xi(t,e){var n=v(t);return n.persistence.runTransaction("Allocate target","readwrite",(function(t){var r;return n.wo.nr(t,e).next((function(i){return i?(r=i,nr.resolve(r)):n.wo.Ui(t).next((function(i){return r=new ue(e,i,0,t.Ss),n.wo.zi(t,r).next((function(){return r}))}))}))})).then((function(t){var r=n.dc.get(t.targetId);return(null===r||t.Mt.u(r.Mt)>0)&&(n.dc=n.dc.Ht(t.targetId,t),n.wc.set(e,t.targetId)),t}))}function Zi(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:r=v(t),i=r.dc.get(e),o=n?"readwrite":"readwrite-primary",a.label=1;case 1:return a.trys.push([1,4,,5]),n?[3,3]:[4,r.persistence.runTransaction("Release target",o,(function(t){return r.persistence.mi.removeTarget(t,i)}))];case 2:a.sent(),a.label=3;case 3:return[3,5];case 4:if(!sr(s=a.sent()))throw s;return c("LocalStore","Failed to update sequence numbers for target "+e+": "+s),[3,5];case 5:return r.dc=r.dc.remove(e),r.wc.delete(i.target),[2]}}))}))}function to(t,e,n){var r=v(t),i=U.min(),o=sn();return r.persistence.runTransaction("Execute query","readonly",(function(t){return function(t,e,n){var r=v(t),i=r.wc.get(n);return void 0!==i?nr.resolve(r.dc.get(i)):r.wo.nr(e,n)}(r,t,te(e)).next((function(e){if(e)return i=e.lastLimboFreeSnapshotVersion,r.wo.ar(t,e.targetId).next((function(t){o=t}))})).next((function(){return r.fc.jr(t,e,n?i:U.min(),n?o:sn())})).next((function(t){return{documents:t,Pc:o}}))}))}function eo(t,e){var n=v(t),r=v(n.wo),i=n.dc.get(e);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",(function(t){return r.Dn(t,e).next((function(t){return t?t.target:null}))}))}function no(t){var e=v(t);return e.persistence.runTransaction("Get new document changes","readonly",(function(t){return function(t,e,n){var r=v(t),i=Ze(),o=Kr(n),a=xi(e),s=IDBKeyRange.lowerBound(o,!0);return a.ls({index:kr.readTimeIndex,range:s},(function(t,e){var n=Hr(r.Kt,e);i=i.Ht(n.key,n),o=e.readTime})).next((function(){return{gs:i,readTime:Wr(o)}}))}(e.Tc,t,e.Ec)})).then((function(t){var n=t.gs,r=t.readTime;return e.Ec=r,n}))}function ro(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){return[2,(e=v(t)).persistence.runTransaction("Synchronize last document change read time","readonly",(function(t){return function(t){var e=xi(t),n=U.min();return e.ls({index:kr.readTimeIndex,reverse:!0},(function(t,e,r){e.readTime&&(n=Wr(e.readTime)),r.done()})).next((function(){return n}))}(t)})).then((function(t){e.Ec=t}))]}))}))}function io(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s,u,c,l,f,h,p,d;return Object(a.d)(this,(function(a){switch(a.label){case 0:for(i=v(t),o=sn(),s=Ze(),u=on(),c=0,l=n;c<l.length;c++)f=l[c],h=e.yc(f.metadata.name),f.document&&(o=o.add(h)),s=s.Ht(h,e.gc(f)),u=u.Ht(h,e.Vc(f.metadata.readTime));return p=i.Tc.Or({Gr:!0}),[4,Xi(i,function(t){return te(Gt(q.ct("__bundle__/docs/"+t)))}(r))];case 1:return d=a.sent(),[2,i.persistence.runTransaction("Apply bundle documents","readwrite",(function(t){return Yi(t,p,s,U.min(),u).next((function(e){return p.apply(t),e})).next((function(e){return i.wo.Zi(t,d.targetId).next((function(){return i.wo.sr(t,o,d.targetId)})).next((function(){return i.Ic.tc(t,e)}))}))}))]}}))}))}function oo(t,e,n){return void 0===n&&(n=sn()),Object(a.b)(this,void 0,void 0,(function(){var r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return[4,Xi(t,te(Xr(e.bundledQuery)))];case 1:return r=o.sent(),[2,(i=v(t)).persistence.runTransaction("Save named query","readwrite",(function(t){var o=kn(e.readTime);if(r.Mt.u(o)>=0)return i.To.qs(t,e);var a=r.$t(_.h,o);return i.dc=i.dc.Ht(a.targetId,a),i.wo.Yi(t,a).next((function(){return i.wo.Zi(t,r.targetId)})).next((function(){return i.wo.sr(t,n,r.targetId)})).next((function(){return i.To.qs(t,e)}))}
2))]}}))}))}var ao=function(){function t(t){this.Kt=t,this.bc=new Map,this.vc=new Map}return t.prototype.Ls=function(t,e){return nr.resolve(this.bc.get(e))},t.prototype.$s=function(t,e){var n;return this.bc.set(e.id,{id:(n=e).id,version:n.version,createTime:kn(n.createTime)}),nr.resolve()},t.prototype.Bs=function(t,e){return nr.resolve(this.vc.get(e))},t.prototype.qs=function(t,e){return this.vc.set(e.name,function(t){return{name:t.name,query:Xr(t.bundledQuery),readTime:kn(t.readTime)}}(e)),nr.resolve()},t}(),so=function(){function t(){this.Sc=new Ye(uo.Dc),this.Cc=new Ye(uo.xc)}return t.prototype.nt=function(){return this.Sc.nt()},t.prototype.ir=function(t,e){var n=new uo(t,e);this.Sc=this.Sc.add(n),this.Cc=this.Cc.add(n)},t.prototype.Nc=function(t,e){var n=this;t.forEach((function(t){return n.ir(t,e)}))},t.prototype.cr=function(t,e){this.Fc(new uo(t,e))},t.prototype.Oc=function(t,e){var n=this;t.forEach((function(t){return n.cr(t,e)}))},t.prototype.kc=function(t){var e=this,n=new z(new q([])),r=new uo(n,t),i=new uo(n,t+1),o=[];return this.Cc.Ae([r,i],(function(t){e.Fc(t),o.push(t.key)})),o},t.prototype.Mc=function(){var t=this;this.Sc.forEach((function(e){return t.Fc(e)}))},t.prototype.Fc=function(t){this.Sc=this.Sc.delete(t),this.Cc=this.Cc.delete(t)},t.prototype.Lc=function(t){var e=new z(new q([])),n=new uo(e,t),r=new uo(e,t+1),i=sn();return this.Cc.Ae([n,r],(function(t){i=i.add(t.key)})),i},t.prototype.Mi=function(t){var e=new uo(t,0),n=this.Sc.Pe(e);return null!==n&&t.isEqual(n.key)},t}(),uo=function(){function t(t,e){this.key=t,this.$c=e}return t.Dc=function(t,e){return z.J(t.key,e.key)||m(t.$c,e.$c)},t.xc=function(t,e){return m(t.$c,e.$c)||z.J(t.key,e.key)},t}(),co=function(){function t(t,e){this.Ii=t,this.mi=e,this.Ho=[],this.Bc=1,this.qc=new Ye(uo.Dc)}return t.prototype.Pi=function(t){return nr.resolve(0===this.Ho.length)},t.prototype.yi=function(t,e,n,r){var i=this.Bc;this.Bc++,this.Ho.length>0&&this.Ho[this.Ho.length-1];var o=new Vr(i,e,n,r);this.Ho.push(o);for(var a=0,s=r;a<s.length;a++){var u=s[a];this.qc=this.qc.add(new uo(u.key,i)),this.Ii.Qs(t,u.key.path.Z())}return nr.resolve(o)},t.prototype.gi=function(t,e){return nr.resolve(this.Uc(e))},t.prototype.pi=function(t,e){var n=e+1,r=this.Qc(n),i=r<0?0:r;return nr.resolve(this.Ho.length>i?this.Ho[i]:null)},t.prototype.bi=function(){return nr.resolve(0===this.Ho.length?-1:this.Bc-1)},t.prototype.vi=function(t){return nr.resolve(this.Ho.slice())},t.prototype.Si=function(t,e){var n=this,r=new uo(e,0),i=new uo(e,Number.POSITIVE_INFINITY),o=[];return this.qc.Ae([r,i],(function(t){var e=n.Uc(t.$c);o.push(e)})),nr.resolve(o)},t.prototype.Di=function(t,e){var n=this,r=new Ye(m);return e.forEach((function(t){var e=new uo(t,0),i=new uo(t,Number.POSITIVE_INFINITY);n.qc.Ae([e,i],(function(t){r=r.add(t.$c)}))})),nr.resolve(this.Kc(r))},t.prototype.xi=function(t,e){var n=e.path,r=n.length+1,i=n;z.Et(i)||(i=i.child(""));var o=new uo(new z(i),0),a=new Ye(m);return this.qc.Re((function(t){var e=t.key.path;return!!n.st(e)&&(e.length===r&&(a=a.add(t.$c)),!0)}),o),nr.resolve(this.Kc(a))},t.prototype.Kc=function(t){var e=this,n=[];return t.forEach((function(t){var r=e.Uc(t);null!==r&&n.push(r)})),n},t.prototype.Ni=function(t,e){var n=this;d(0===this.Wc(e.batchId,"removed")),this.Ho.shift();var r=this.qc;return nr.forEach(e.mutations,(function(i){var o=new uo(i.key,e.batchId);return r=r.delete(o),n.mi.Oi(t,i.key)})).next((function(){n.qc=r}))},t.prototype.Fi=function(t){},t.prototype.Mi=function(t,e){var n=new uo(e,0),r=this.qc.Pe(n);return nr.resolve(e.isEqual(r&&r.key))},t.prototype.ki=function(t){return this.Ho.length,nr.resolve()},t.prototype.Wc=function(t,e){return this.Qc(t)},t.prototype.Qc=function(t){return 0===this.Ho.length?0:t-this.Ho[0].batchId},t.prototype.Uc=function(t){var e=this.Qc(t);return e<0||e>=this.Ho.length?null:this.Ho[e]},t}(),lo=function(){function t(t,e){this.Ii=t,this.jc=e,this.docs=new Ge(z.J),this.size=0}return t.prototype.hi=function(t,e,n){var r=e.key,i=this.docs.get(r),o=i?i.size:0,a=this.jc(e);return this.docs=this.docs.Ht(r,{_i:e,size:a,readTime:n}),this.size+=a-o,this.Ii.Qs(t,r.path.Z())},t.prototype.fi=function(t){var e=this.docs.get(t);e&&(this.docs=this.docs.remove(t),this.size-=e.size)},t.prototype.di=function(t,e){var n=this.docs.get(e);return nr.resolve(n?n._i:null)},t.prototype.getEntries=function(t,e){var n=this,r=tn();return e.forEach((function(t){var e=n.docs.get(t);r=r.Ht(t,e?e._i:null)})),nr.resolve(r)},t.prototype.jr=function(t,e,n){for(var r=nn(),i=new z(e.path.child("")),o=this.docs.ne(i);o.ae();){var a=o.ce(),s=a.key,u=a.value,c=u._i,l=u.readTime;if(!e.path.st(s.path))break;l.u(n)<=0||c instanceof Et&&oe(e,c)&&(r=r.Ht(c.key,c))}return nr.resolve(r)},t.prototype.Gc=function(t,e){return nr.forEach(this.docs,(function(t){return e(t)}))},t.prototype.Or=function(t){return new fo(this)},t.prototype.Lr=function(t){return nr.resolve(this.size)},t}(),fo=function(t){function e(e){var n=this;return(n=t.call(this)||this).zr=e,n}return Object(a.c)(e,t),e.prototype.Ti=function(t){var e=this,n=[];return this.ci.forEach((function(r,i){i&&i._i?n.push(e.zr.hi(t,i._i,e.ui(r))):e.zr.fi(r)})),nr.$n(n)},e.prototype.wi=function(t,e){return this.zr.di(t,e)},e.prototype.Ei=function(t,e){return this.zr.getEntries(t,e)},e}(li),ho=function(){function t(t){this.persistence=t,this.zc=new ci((function(t){return Ct(t)}),kt),this.lastRemoteSnapshotVersion=U.min(),this.highestTargetId=0,this.Hc=0,this.Jc=new so,this.targetCount=0,this.Yc=mi.Bi()}
2return t.prototype.mn=function(t,e){return this.zc.forEach((function(t,n){return e(n)})),nr.resolve()},t.prototype.Wi=function(t){return nr.resolve(this.lastRemoteSnapshotVersion)},t.prototype.ji=function(t){return nr.resolve(this.Hc)},t.prototype.Ui=function(t){return this.highestTargetId=this.Yc.next(),nr.resolve(this.highestTargetId)},t.prototype.Gi=function(t,e,n){return n&&(this.lastRemoteSnapshotVersion=n),e>this.Hc&&(this.Hc=e),nr.resolve()},t.prototype.Hi=function(t){this.zc.set(t.target,t);var e=t.targetId;e>this.highestTargetId&&(this.Yc=new mi(e),this.highestTargetId=e),t.sequenceNumber>this.Hc&&(this.Hc=t.sequenceNumber)},t.prototype.zi=function(t,e){return this.Hi(e),this.targetCount+=1,nr.resolve()},t.prototype.Yi=function(t,e){return this.Hi(e),nr.resolve()},t.prototype.Xi=function(t,e){return this.zc.delete(e.target),this.Jc.kc(e.targetId),this.targetCount-=1,nr.resolve()},t.prototype.tr=function(t,e,n){var r=this,i=0,o=[];return this.zc.forEach((function(a,s){s.sequenceNumber<=e&&null===n.get(s.targetId)&&(r.zc.delete(a),o.push(r.Zi(t,s.targetId)),i++)})),nr.$n(o).next((function(){return i}))},t.prototype.er=function(t){return nr.resolve(this.targetCount)},t.prototype.nr=function(t,e){var n=this.zc.get(e)||null;return nr.resolve(n)},t.prototype.sr=function(t,e,n){return this.Jc.Nc(e,n),nr.resolve()},t.prototype.rr=function(t,e,n){this.Jc.Oc(e,n);var r=this.persistence.mi,i=[];return r&&e.forEach((function(e){i.push(r.Oi(t,e))})),nr.$n(i)},t.prototype.Zi=function(t,e){return this.Jc.kc(e),nr.resolve()},t.prototype.ar=function(t,e){var n=this.Jc.Lc(e);return nr.resolve(n)},t.prototype.Mi=function(t,e){return nr.resolve(this.Jc.Mi(e))},t}(),po=function(){function t(t,e){var n=this;this.Xc={},this.ro=new M(0),this.oo=!1,this.oo=!0,this.mi=t(this),this.wo=new ho(this),this.Ii=new ni,this.Eo=function(t,e){return new lo(t,(function(t){return n.mi.Zc(t)}))}(this.Ii),this.Kt=new Br(e),this.To=new ao(this.Kt)}return t.prototype.start=function(){return Promise.resolve()},t.prototype.$o=function(){return this.oo=!1,Promise.resolve()},Object.defineProperty(t.prototype,"Ir",{get:function(){return this.oo},enumerable:!1,configurable:!0}),t.prototype.Vo=function(){},t.prototype.po=function(){},t.prototype.jo=function(){return this.Ii},t.prototype.Wo=function(t){var e=this.Xc[t.R()];return e||(e=new co(this.Ii,this.mi),this.Xc[t.R()]=e),e},t.prototype.Cr=function(){return this.wo},t.prototype.kr=function(){return this.Eo},t.prototype.Go=function(){return this.To},t.prototype.runTransaction=function(t,e,n){var r=this;c("MemoryPersistence","Starting transaction:",t);var i=new vo(this.ro.next());return this.mi.ta(),n(i).next((function(t){return r.mi.ea(i).next((function(){return t}))})).Mn().then((function(t){return i.bs(),t}))},t.prototype.na=function(t,e){return nr.Bn(Object.values(this.Xc).map((function(n){return function(){return n.Mi(t,e)}})))},t}(),vo=function(t){function e(e){var n=this;return(n=t.call(this)||this).Ss=e,n}return Object(a.c)(e,t),e}(gr),go=function(){function t(t){this.persistence=t,this.sa=new so,this.ia=null}return t.ra=function(e){return new t(e)},Object.defineProperty(t.prototype,"oa",{get:function(){if(this.ia)return this.ia;throw p()},enumerable:!1,configurable:!0}),t.prototype.ir=function(t,e,n){return this.sa.ir(n,e),this.oa.delete(n.toString()),nr.resolve()},t.prototype.cr=function(t,e,n){return this.sa.cr(n,e),this.oa.add(n.toString()),nr.resolve()},t.prototype.Oi=function(t,e){return this.oa.add(e.toString()),nr.resolve()},t.prototype.removeTarget=function(t,e){var n=this;this.sa.kc(e.targetId).forEach((function(t){return n.oa.add(t.toString())}));var r=this.persistence.Cr();return r.ar(t,e.targetId).next((function(t){t.forEach((function(t){return n.oa.add(t.toString())}))})).next((function(){return r.Xi(t,e)}))},t.prototype.ta=function(){this.ia=new Set},t.prototype.ea=function(t){var e=this,n=this.persistence.kr().Or();return nr.forEach(this.oa,(function(r){var i=z.ft(r);return e.ca(t,i).next((function(t){t||n.fi(i)}))})).next((function(){return e.ia=null,n.apply(t)}))},t.prototype.Mr=function(t,e){var n=this;return this.ca(t,e).next((function(t){t?n.oa.delete(e.toString()):n.oa.add(e.toString())}))},t.prototype.Zc=function(t){return 0},t.prototype.ca=function(t,e){var n=this;return nr.Bn([function(){return nr.resolve(n.sa.Mi(e))},function(){return n.persistence.Cr().Mi(t,e)},function(){return n.persistence.na(t,e)}])},t}();function yo(t,e){return"firestore_clients_"+t+"_"+e}function mo(t,e,n){var r="firestore_mutations_"+t+"_"+n;return e.A()&&(r+="_"+e.uid),r}function bo(t,e){return"firestore_targets_"+t+"_"+e}var wo=function(){function t(t,e,n,r){this.user=t,this.batchId=e,this.state=n,this.error=r}return t.aa=function(e,n,r){var i=JSON.parse(r),o="object"==typeof i&&-1!==["pending","acknowledged","rejected"].indexOf(i.state)&&(void 0===i.error||"object"==typeof i.error),a=void 0;return o&&i.error&&(o="string"==typeof i.error.message&&"string"==typeof i.error.code)&&(a=new O(i.error.code,i.error.message)),o?new t(e,n,i.state,a):(l("SharedCl
2ientState","Failed to parse mutation state for ID '"+n+"': "+r),null)},t.prototype.ua=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},t}(),_o=function(){function t(t,e,n){this.targetId=t,this.state=e,this.error=n}return t.aa=function(e,n){var r=JSON.parse(n),i="object"==typeof r&&-1!==["not-current","current","rejected"].indexOf(r.state)&&(void 0===r.error||"object"==typeof r.error),o=void 0;return i&&r.error&&(i="string"==typeof r.error.message&&"string"==typeof r.error.code)&&(o=new O(r.error.code,r.error.message)),i?new t(e,r.state,o):(l("SharedClientState","Failed to parse target state for ID '"+e+"': "+n),null)},t.prototype.ua=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},t}(),Eo=function(){function t(t,e){this.clientId=t,this.activeTargetIds=e}return t.aa=function(e,n){for(var r=JSON.parse(n),i="object"==typeof r&&r.activeTargetIds instanceof Array,o=cn(),a=0;i&&a<r.activeTargetIds.length;++a)i=it(r.activeTargetIds[a]),o=o.add(r.activeTargetIds[a]);return i?new t(e,o):(l("SharedClientState","Failed to parse client data for instance '"+e+"': "+n),null)},t}(),Oo=function(){function t(t,e){this.clientId=t,this.onlineState=e}return t.aa=function(e){var n=JSON.parse(e);return"object"==typeof n&&-1!==["Unknown","Online","Offline"].indexOf(n.onlineState)&&"string"==typeof n.clientId?new t(n.clientId,n.onlineState):(l("SharedClientState","Failed to parse online state: "+e),null)},t}(),So=function(){function t(){this.activeTargetIds=cn()}return t.prototype.ha=function(t){this.activeTargetIds=this.activeTargetIds.add(t)},t.prototype.la=function(t){this.activeTargetIds=this.activeTargetIds.delete(t)},t.prototype.ua=function(){var t={activeTargetIds:this.activeTargetIds.rt(),updateTimeMs:Date.now()};return JSON.stringify(t)},t}(),To=function(){function t(t,e,n,r,i){this.window=t,this.no=e,this.persistenceKey=n,this._a=r,this.fa=null,this.da=null,this.L=null,this.wa=this.Ea.bind(this),this.Ta=new Ge(m),this.Ir=!1,this.Ia=[];var o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=i,this.ma=yo(this.persistenceKey,this._a),this.Aa=function(t){return"firestore_sequence_number_"+t}(this.persistenceKey),this.Ta=this.Ta.Ht(this._a,new So),this.Ra=new RegExp("^firestore_clients_"+o+"_([^_]*)$"),this.Pa=new RegExp("^firestore_mutations_"+o+"_(\\d+)(?:_(.*))?$"),this.ya=new RegExp("^firestore_targets_"+o+"_(\\d+)$"),this.ga=function(t){return"firestore_online_state_"+t}(this.persistenceKey),this.Va=function(t){return"firestore_bundle_loaded_"+t}(this.persistenceKey),this.window.addEventListener("storage",this.wa)}return t.Wn=function(t){return!(!t||!t.localStorage)},t.prototype.start=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e,n,r,i,o,s,u,c,l,f,h=this;return Object(a.d)(this,(function(a){switch(a.label){case 0:return[4,this.fa.Ko()];case 1:for(t=a.sent(),e=0,n=t;e<n.length;e++)(r=n[e])!==this._a&&(i=this.getItem(yo(this.persistenceKey,r)))&&(o=Eo.aa(r,i))&&(this.Ta=this.Ta.Ht(o.clientId,o));for(this.pa(),(s=this.storage.getItem(this.ga))&&(u=this.ba(s))&&this.va(u),c=0,l=this.Ia;c<l.length;c++)f=l[c],this.Ea(f);return this.Ia=[],this.window.addEventListener("unload",(function(){return h.$o()})),this.Ir=!0,[2]}}))}))},t.prototype.q=function(t){this.setItem(this.Aa,JSON.stringify(t))},t.prototype.Sa=function(){return this.Da(this.Ta)},t.prototype.Ca=function(t){var e=!1;return this.Ta.forEach((function(n,r){r.activeTargetIds.has(t)&&(e=!0)})),e},t.prototype.xa=function(t){this.Na(t,"pending")},t.prototype.Fa=function(t,e,n){this.Na(t,e,n),this.Oa(t)},t.prototype.ka=function(t){var e="not-current";if(this.Ca(t)){var n=this.storage.getItem(bo(this.persistenceKey,t));if(n){var r=_o.aa(t,n);r&&(e=r.state)}}return this.Ma.ha(t),this.pa(),e},t.prototype.La=function(t){this.Ma.la(t),this.pa()},t.prototype.$a=function(t){return this.Ma.activeTargetIds.has(t)},t.prototype.Ba=function(t){this.removeItem(bo(this.persistenceKey,t))},t.prototype.qa=function(t,e,n){this.Ua(t,e,n)},t.prototype.Qa=function(t,e,n){var r=this;e.forEach((function(t){r.Oa(t)}
2)),this.currentUser=t,n.forEach((function(t){r.xa(t)}))},t.prototype.Ka=function(t){this.Wa(t)},t.prototype.ja=function(){this.Ga()},t.prototype.$o=function(){this.Ir&&(this.window.removeEventListener("storage",this.wa),this.removeItem(this.ma),this.Ir=!1)},t.prototype.getItem=function(t){var e=this.storage.getItem(t);return c("SharedClientState","READ",t,e),e},t.prototype.setItem=function(t,e){c("SharedClientState","SET",t,e),this.storage.setItem(t,e)},t.prototype.removeItem=function(t){c("SharedClientState","REMOVE",t),this.storage.removeItem(t)},t.prototype.Ea=function(t){var e=this,n=t;if(n.storageArea===this.storage){if(c("SharedClientState","EVENT",n.key,n.newValue),n.key===this.ma)return void l("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.no.vo((function(){return Object(a.b)(e,void 0,void 0,(function(){var t,e,r,i,o,s;return Object(a.d)(this,(function(a){if(this.Ir){if(null!==n.key)if(this.Ra.test(n.key)){if(null==n.newValue)return t=this.za(n.key),[2,this.Ha(t,null)];if(e=this.Ja(n.key,n.newValue))return[2,this.Ha(e.clientId,e)]}else if(this.Pa.test(n.key)){if(null!==n.newValue&&(r=this.Ya(n.key,n.newValue)))return[2,this.Xa(r)]}else if(this.ya.test(n.key)){if(null!==n.newValue&&(i=this.Za(n.key,n.newValue)))return[2,this.tu(i)]}else if(n.key===this.ga){if(null!==n.newValue&&(o=this.ba(n.newValue)))return[2,this.va(o)]}else if(n.key===this.Aa)(s=function(t){var e=M.U;if(null!=t)try{var n=JSON.parse(t);d("number"==typeof n),e=n}catch(t){l("SharedClientState","Failed to read sequence number from WebStorage",t)}return e}(n.newValue))!==M.U&&this.L(s);else if(n.key===this.Va)return[2,this.fa.eu()]}else this.Ia.push(n);return[2]}))}))}))}},Object.defineProperty(t.prototype,"Ma",{get:function(){return this.Ta.get(this._a)},enumerable:!1,configurable:!0}),t.prototype.pa=function(){this.setItem(this.ma,this.Ma.ua())},t.prototype.Na=function(t,e,n){var r=new wo(this.currentUser,t,e,n),i=mo(this.persistenceKey,this.currentUser,t);this.setItem(i,r.ua())},t.prototype.Oa=function(t){var e=mo(this.persistenceKey,this.currentUser,t);this.removeItem(e)},t.prototype.Wa=function(t){var e={clientId:this._a,onlineState:t};this.storage.setItem(this.ga,JSON.stringify(e))},t.prototype.Ua=function(t,e,n){var r=bo(this.persistenceKey,t),i=new _o(t,e,n);this.setItem(r,i.ua())},t.prototype.Ga=function(){this.setItem(this.Va,"value-not-used")},t.prototype.za=function(t){var e=this.Ra.exec(t);return e?e[1]:null},t.prototype.Ja=function(t,e){var n=this.za(t);return Eo.aa(n,e)},t.prototype.Ya=function(t,e){var n=this.Pa.exec(t),r=Number(n[1]),i=void 0!==n[2]?n[2]:null;return wo.aa(new N(i),r,e)},t.prototype.Za=function(t,e){var n=this.ya.exec(t),r=Number(n[1]);return _o.aa(r,e)},t.prototype.ba=function(t){return Oo.aa(t)},t.prototype.Xa=function(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return t.user.uid===this.currentUser.uid?[2,this.fa.nu(t.batchId,t.state,t.error)]:(c("SharedClientState","Ignoring mutation for non-active user "+t.user.uid),[2])}))}))},t.prototype.tu=function(t){return this.fa.su(t.targetId,t.state,t.error)},t.prototype.Ha=function(t,e){var n=this,r=e?this.Ta.Ht(t,e):this.Ta.remove(t),i=this.Da(this.Ta),o=this.Da(r),a=[],s=[];return o.forEach((function(t){i.has(t)||a.push(t)})),i.forEach((function(t){o.has(t)||s.push(t)})),this.fa.iu(a,s).then((function(){n.Ta=r}))},t.prototype.va=function(t){this.Ta.get(t.clientId)&&this.da(t.onlineState)},t.prototype.Da=function(t){var e=cn();return t.forEach((function(t,n){e=e.ye(n.activeTargetIds)})),e},t}(),Io=function(){function t(){this.ru=new So,this.ou={},this.da=null,this.L=null}return t.prototype.xa=function(t){},t.prototype.Fa=function(t,e,n){},t.prototype.ka=function(t){return this.ru.ha(t),this.ou[t]||"not-current"},t.prototype.qa=function(t,e,n){this.ou[t]=e},t.prototype.La=function(t){this.ru.la(t)},t.prototype.$a=function(t){return this.ru.activeTargetIds.has(t)},t.prototype.Ba=function(t){delete this.ou[t]},t.prototype.Sa=function(){return this.ru.activeTargetIds},t.prototype.Ca=function(t){return this.ru.activeTargetIds.has(t)},t.prototype.start=function(){return this.ru=new So,Promise.resolve()},t.prototype.Qa=function(t,e,n){},t.prototype.Ka=function(t){},t.prototype.$o=function(){},t.prototype.q=function(t){},t.prototype.ja=function(){},t}(),Co=function(){function t(){}return t.prototype.cu=function(t){},t.prototype.$o=function(){},t}(),ko=function(){function t(){var t=this;this.au=function(){return t.uu()},this.hu=function(){return t.lu()},this._u=[],this.fu()}return t.prototype.cu=function(t){this._u.push(t)},t.prototype.$o=function(){window.removeEventListener("online",this.au),window.removeEventListener("offline",this.hu)},t.prototype.fu=function(){window.addEventListener("online",this.au),window.addEventListener("offline",this.hu)},t.prototype.uu=function(){c("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(var t=0,e=this._u;t<e.length;t++)(0,e[t])(0)},t.prototype.lu=function(){c("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(var t=0,e=this._u;t<e.length;t++)(0,e[t])(1)},t.Wn=function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener},t}(),Po={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"},Ao=function(){function t(t){this.du=t.du,this.wu=t.wu}return t.prototype.Eu=function(t){this.Tu=t},t.prototype.Iu=function(t){this.mu=t},t.prototype.onMessage=function(t){this.Au=t},t.prototype.close=function(){this.wu()},t.prototype.send=function(t){this.du(t)},t.prototype.Ru=function(){this.Tu()},t.prototype.Pu=function(t){this.mu(t)},t.prototype.yu=function(t){this.Au(t)},t}(),No=function(t){function e(e){var n=this;return(n=t.call(this,e)||this).forceLongPolling=e.forceLongPolling,n.I=e.I,n}return Object(a.c)(e,t),e.prototype.Du=function(t,e,n,r){return new Promise((function(i,a){var s=new o.f;
2s.listenOnce(o.c.COMPLETE,(function(){try{switch(s.getLastErrorCode()){case o.a.NO_ERROR:var e=s.getResponseJson();c("Connection","XHR received:",JSON.stringify(e)),i(e);break;case o.a.TIMEOUT:c("Connection",'RPC "'+t+'" timed out'),a(new O(E.DEADLINE_EXCEEDED,"Request time out"));break;case o.a.HTTP_ERROR:var n=s.getStatus();if(c("Connection",'RPC "'+t+'" failed with status:',n,"response text:",s.getResponseText()),n>0){var r=s.getResponseJson().error;if(r&&r.status&&r.message){var u=function(t){var e=t.toLowerCase().replace(/_/g,"-");return Object.values(E).indexOf(e)>=0?e:E.UNKNOWN}(r.status);a(new O(u,r.message))}else a(new O(E.UNKNOWN,"Server responded with status "+s.getStatus()))}else a(new O(E.UNAVAILABLE,"Connection failed."));break;default:p()}}finally{c("Connection",'RPC "'+t+'" completed.')}}));var u=JSON.stringify(r);s.send(e,"POST",u,n,15)}))},e.prototype.xu=function(t,e){var n=[this.Vu,"/","google.firestore.v1.Firestore","/",t,"/channel"],r=Object(o.g)(),a=Object(o.h)(),s={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.T.projectId+"/databases/"+this.T.database},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.I};this.Su(s.initMessageHeaders,e),Object(i.x)()||Object(i.A)()||Object(i.t)()||Object(i.v)()||Object(i.B)()||Object(i.s)()||(s.httpHeadersOverwriteParam="$httpHeaders");var u=n.join("");c("Connection","Creating WebChannel: "+u,s);var l=r.createWebChannel(u,s),h=!1,p=!1,v=new Ao({du:function(t){p?c("Connection","Not sending because WebChannel is closed:",t):(h||(c("Connection","Opening WebChannel transport."),l.open(),h=!0),c("Connection","WebChannel sending:",t),l.send(t))},wu:function(){return l.close()}}),g=function(t,e,n){t.listen(e,(function(t){try{n(t)}catch(t){setTimeout((function(){throw t}),0)}}))};return g(l,o.e.EventType.OPEN,(function(){p||c("Connection","WebChannel transport opened.")})),g(l,o.e.EventType.CLOSE,(function(){p||(p=!0,c("Connection","WebChannel transport closed"),v.Pu())})),g(l,o.e.EventType.ERROR,(function(t){p||(p=!0,f("Connection","WebChannel transport errored:",t),v.Pu(new O(E.UNAVAILABLE,"The operation could not be completed")))})),g(l,o.e.EventType.MESSAGE,(function(t){var e;if(!p){var n=t.data[0];d(!!n);var r=n,i=r.error||(null===(e=r[0])||void 0===e?void 0:e.error);if(i){c("Connection","WebChannel received error:",i);var o=i.status,a=function(t){var e=Ve[t];if(void 0!==e)return We(e)}(o),s=i.message;void 0===a&&(a=E.INTERNAL,s="Unknown error status: "+o+" with message "+i.message),p=!0,v.Pu(new O(a,s)),l.close()}else c("Connection","WebChannel received:",n),v.yu(n)}})),g(a,o.b.STAT_EVENT,(function(t){t.stat===o.d.PROXY?c("Connection","Detected buffering proxy"):t.stat===o.d.NOPROXY&&c("Connection","Detected no buffering proxy")})),setTimeout((function(){v.Ru()}),0),v},e}(function(){function t(t){this.gu=t,this.T=t.T;var e=t.ssl?"https":"http";this.Vu=e+"://"+t.host,this.pu="projects/"+this.T.projectId+"/databases/"+this.T.database+"/documents"}return t.prototype.bu=function(t,e,n,r){var i=this.vu(t,e);c("RestConnection","Sending: ",i,n);var o={};return this.Su(o,r),this.Du(t,i,o,n).then((function(t){return c("RestConnection","Received: ",t),t}),(function(e){throw f("RestConnection",t+" failed with error: ",e,"url: ",i,"request:",n),e}))},t.prototype.Cu=function(t,e,n,r){return this.bu(t,e,n,r)},t.prototype.Su=function(t,e){if(t["X-Goog-Api-Client"]="gl-js/ fire/8.2.1",t["Content-Type"]="text/plain",e)for(var n in e.V)e.V.hasOwnProperty(n)&&(t[n]=e.V[n])},t.prototype.vu=function(t,e){var n=Po[t];return this.Vu+"/v1/"+e+":"+n},t}());function xo(){return"undefined"!=typeof window?window:null}function jo(){return"undefined"!=typeof document?document:null}function Ro(t){return new Sn(t,!0)}var Do=function(){function t(t,e,n,r,i){void 0===n&&(n=1e3),void 0===r&&(r=1.5),void 0===i&&(i=6e4),this.no=t,this.ds=e,this.Nu=n,this.Fu=r,this.Ou=i,this.ku=0,this.Mu=null,this.Lu=Date.now(),this.reset()}return t.prototype.reset=function(){this.ku=0},t.prototype.$u=function(){this.ku=this.Ou},t.prototype.Bu=function(t){var e=this;this.cancel();var n=Math.floor(this.ku+this.qu()),r=Math.max(0,Date.now()-this.Lu),i=Math.max(0,n-r);i>0&&c("ExponentialBackoff","Backing off for "+i+" ms (base delay: "+this.ku+" ms, delay with 
2jitter: "+n+" ms, last attempt: "+r+" ms ago)"),this.Mu=this.no.mr(this.ds,i,(function(){return e.Lu=Date.now(),t()})),this.ku*=this.Fu,this.ku<this.Nu&&(this.ku=this.Nu),this.ku>this.Ou&&(this.ku=this.Ou)},t.prototype.Uu=function(){null!==this.Mu&&(this.Mu.Ps(),this.Mu=null)},t.prototype.cancel=function(){null!==this.Mu&&(this.Mu.cancel(),this.Mu=null)},t.prototype.qu=function(){return(Math.random()-.5)*this.ku},t}(),Lo=function(){function t(t,e,n,r,i,o){this.no=t,this.Qu=n,this.Ku=r,this.Wu=i,this.listener=o,this.state=0,this.ju=0,this.Gu=null,this.stream=null,this.zu=new Do(t,e)}return t.prototype.Hu=function(){return 1===this.state||2===this.state||4===this.state},t.prototype.Ju=function(){return 2===this.state},t.prototype.start=function(){3!==this.state?this.auth():this.Yu()},t.prototype.stop=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return this.Hu()?[4,this.close(0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.Xu=function(){this.state=0,this.zu.reset()},t.prototype.Zu=function(){var t=this;this.Ju()&&null===this.Gu&&(this.Gu=this.no.mr(this.Qu,6e4,(function(){return t.th()})))},t.prototype.eh=function(t){this.nh(),this.stream.send(t)},t.prototype.th=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){return this.Ju()?[2,this.close(0)]:[2]}))}))},t.prototype.nh=function(){this.Gu&&(this.Gu.cancel(),this.Gu=null)},t.prototype.close=function(t,e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(n){switch(n.label){case 0:return this.nh(),this.zu.cancel(),this.ju++,3!==t?this.zu.reset():e&&e.code===E.RESOURCE_EXHAUSTED?(l(e.toString()),l("Using maximum backoff delay to prevent overloading the backend."),this.zu.$u()):e&&e.code===E.UNAUTHENTICATED&&this.Wu.v(),null!==this.stream&&(this.sh(),this.stream.close(),this.stream=null),this.state=t,[4,this.listener.Iu(e)];case 1:return n.sent(),[2]}}))}))},t.prototype.sh=function(){},t.prototype.auth=function(){var t=this;this.state=1;var e=this.ih(this.ju),n=this.ju;this.Wu.getToken().then((function(e){t.ju===n&&t.rh(e)}),(function(n){e((function(){var e=new O(E.UNKNOWN,"Fetching auth token failed: "+n.message);return t.oh(e)}))}))},t.prototype.rh=function(t){var e=this,n=this.ih(this.ju);this.stream=this.ah(t),this.stream.Eu((function(){n((function(){return e.state=2,e.listener.Eu()}))})),this.stream.Iu((function(t){n((function(){return e.oh(t)}))})),this.stream.onMessage((function(t){n((function(){return e.onMessage(t)}))}))},t.prototype.Yu=function(){var t=this;this.state=4,this.zu.Bu((function(){return Object(a.b)(t,void 0,void 0,(function(){return Object(a.d)(this,(function(t){return this.state=0,this.start(),[2]}))}))}))},t.prototype.oh=function(t){return c("PersistentStream","close with error: "+t),this.stream=null,this.close(3,t)},t.prototype.ih=function(t){var e=this;return function(n){e.no.ys((function(){return e.ju===t?n():(c("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}},t}(),Mo=function(t){function e(e,n,r,i,o){var a=this;return(a=t.call(this,e,"listen_stream_connection_backoff","listen_stream_idle",n,r,o)||this).Kt=i,a}return Object(a.c)(e,t),e.prototype.ah=function(t){return this.Ku.xu("Listen",t)},e.prototype.onMessage=function(t){this.zu.reset();var e=function(t,e){var n;if("targetChange"in e){e.targetChange;var r=function(t){return"NO_CHANGE"===t?0:"ADD"===t?1:"REMOVE"===t?2:"CURRENT"===t?3:"RESET"===t?4:p()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],o=function(t,e){return t.qt?(d(void 0===e||"string"==typeof e),_.fromBase64String(e||"")):(d(void 0===e||e instanceof Uint8Array),_.fromUint8Array(e||new Uint8Array))}(t,e.targetChange.resumeToken),a=(s=e.targetChange.cause)&&function(t){var e=void 0===t.code?E.UNKNOWN:We(t.code);return new O(e,t.message||"")}(s);n=new yn(r,i,o,a||null)}else if("documentChange"in e){e.documentChange,(r=e.documentChange).document,r.document.name,r.document.updateTime,i=xn(t,r.document.name),o=kn(r.document.updateTime);var s=new mt({mapValue:{fields:r.document.fields}}),u=(a=new Et(i,o,s,{}),r.targetIds||[]),c=r.removedTargetIds||[];n=new vn(u,c,a.key,a)}else if("documentDelete"in e)e.documentDelete,(r=e.documentDelete).document,i=xn(t,r.document),o=r.readTime?kn(r.readTime):U.min(),s=new Ot(i,o),a=r.removedTargetIds||[],n=new vn([],a,s.key,s);else if("documentRemove"in e)e.documentRemove,(r=e.documentRemove).document,i=xn(t,r.document),o=r.removedTargetIds||[],n=new vn([],o,i,null);else{if(!("filter"in e))return p();e.filter;var l=e.filter;l.targetId,r=l.count||0,i=new ze(r),o=l.targetId,n=new gn(o,i)}return n}(this.Kt,t),n=function(t){if(!("targetChange"in t))return U.min();var e=t.targetChange;return e.targetIds&&e.targetIds.length?U.min():e.readTime?kn(e.readTime):U.min()}(t);return this.listener.uh(e,n)},e.prototype.hh=function(t){var e={};e.database=Dn(this.Kt),e.addTarget=function(t,e){var n,r=e.target;return(n=Pt(r)?{documents:qn(t,r)}:{query:Bn(t,r)}).targetId=e.targetId,e.resumeToken.o()>0?n.resumeToken=In(t,e.resumeToken):e.Mt.u(U.min())>0&&(n.readTime=Tn(t,e.Mt.G())),n}(this.Kt,t);var n=function(t,e){var n=function(t,e){switch(e){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return p()}}(0,e.kt);return null==n?null:{"goog-listen-tags":n}}(this.Kt,t);n&&(e.labels=n),this.eh(e)},e.prototype.lh=function(t){var e={};e.database=Dn(this.Kt),e.removeTarget=t,this.eh(e)},e}(Lo),Fo=function(t){function e(e,n,r,i,o){var a=this;return(a=t.call(this,e,"write_stream_connection_backoff","write_stream_idle",n,r,o)||this).Kt=i,a._h=!1,a}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"fh",{get:function(){return this._h}
2,enumerable:!1,configurable:!0}),e.prototype.start=function(){this._h=!1,this.lastStreamToken=void 0,t.prototype.start.call(this)},e.prototype.sh=function(){this._h&&this.dh([])},e.prototype.ah=function(t){return this.Ku.xu("Write",t)},e.prototype.onMessage=function(t){if(d(!!t.streamToken),this.lastStreamToken=t.streamToken,this._h){this.zu.reset();var e=function(t,e){return t&&t.length>0?(d(void 0!==e),t.map((function(t){return function(t,e){var n=t.updateTime?kn(t.updateTime):kn(e);n.isEqual(U.min())&&(n=kn(e));var r=null;return t.transformResults&&t.transformResults.length>0&&(r=t.transformResults),new Te(n,r)}(t,e)}))):[]}(t.writeResults,t.commitTime),n=kn(t.commitTime);return this.listener.wh(n,e)}return d(!t.writeResults||0===t.writeResults.length),this._h=!0,this.listener.Eh()},e.prototype.Th=function(){var t={};t.database=Dn(this.Kt),this.eh(t)},e.prototype.dh=function(t){var e=this,n={streamToken:this.lastStreamToken,writes:t.map((function(t){return Un(e.Kt,t)}))};this.eh(n)},e}(Lo),Uo=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).credentials=e,i.Ku=n,i.Kt=r,i.Ih=!1,i}return Object(a.c)(e,t),e.prototype.mh=function(){if(this.Ih)throw new O(E.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.bu=function(t,e,n){var r=this;return this.mh(),this.credentials.getToken().then((function(i){return r.Ku.bu(t,e,n,i)})).catch((function(t){throw t.code===E.UNAUTHENTICATED&&r.credentials.v(),t}))},e.prototype.Cu=function(t,e,n){var r=this;return this.mh(),this.credentials.getToken().then((function(i){return r.Ku.Cu(t,e,n,i)})).catch((function(t){throw t.code===E.UNAUTHENTICATED&&r.credentials.v(),t}))},e.prototype.terminate=function(){this.Ih=!1},e}((function(){})),Vo=function(){function t(t,e){this.fs=t,this.da=e,this.state="Unknown",this.Ah=0,this.Rh=null,this.Ph=!0}return t.prototype.yh=function(){var t=this;0===this.Ah&&(this.gh("Unknown"),this.Rh=this.fs.mr("online_state_timeout",1e4,(function(){return t.Rh=null,t.Vh("Backend didn't respond within 10 seconds."),t.gh("Offline"),Promise.resolve()})))},t.prototype.ph=function(t){"Online"===this.state?this.gh("Unknown"):(this.Ah++,this.Ah>=1&&(this.bh(),this.Vh("Connection failed 1 times. Most recent error: "+t.toString()),this.gh("Offline")))},t.prototype.set=function(t){this.bh(),this.Ah=0,"Online"===t&&(this.Ph=!1),this.gh(t)},t.prototype.gh=function(t){t!==this.state&&(this.state=t,this.da(t))},t.prototype.Vh=function(t){var e="Could not reach Cloud Firestore backend. "+t+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.Ph?(l(e),this.Ph=!1):c("OnlineStateTracker",e)},t.prototype.bh=function(){null!==this.Rh&&(this.Rh.cancel(),this.Rh=null)},t}(),qo=function(t,e,n,r,i){var o=this;this.Sh=t,this.Dh=e,this.fs=n,this.Ch={},this.xh=[],this.Nh=new Map,this.Fh=new Set,this.Oh=[],this.kh=i,this.kh.cu((function(t){n.ys((function(){return Object(a.b)(o,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return Yo(this)?(c("RemoteStore","Restarting streams for network reachability change."),[4,function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return(e=v(t)).Fh.add(4),[4,Ho(e)];case 1:return n.sent(),e.Mh.set("Unknown"),e.Fh.delete(4),[4,Bo(e)];case 2:return n.sent(),[2]}}))}))}(this)]):[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}
2))}))}))})),this.Mh=new Vo(n,r)};function Bo(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:if(!Yo(t))return[3,4];e=0,n=t.Oh,r.label=1;case 1:return e<n.length?[4,(0,n[e])(!0)]:[3,4];case 2:r.sent(),r.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))}function Ho(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:e=0,n=t.Oh,r.label=1;case 1:return e<n.length?[4,(0,n[e])(!1)]:[3,4];case 2:r.sent(),r.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))}function zo(t,e){var n=v(t);n.Nh.has(e.targetId)||(n.Nh.set(e.targetId,e),$o(n)?Qo(n):fa(n).Ju()&&Wo(n,e))}function Ko(t,e){var n=v(t),r=fa(n);n.Nh.delete(e),r.Ju()&&Go(n,e),0===n.Nh.size&&(r.Ju()?r.Zu():Yo(n)&&n.Mh.set("Unknown"))}function Wo(t,e){t.Lh.cn(e.targetId),fa(t).hh(e)}function Go(t,e){t.Lh.cn(e),fa(t).lh(e)}function Qo(t){t.Lh=new bn({Sn:function(e){return t.Ch.Sn(e)},Dn:function(e){return t.Nh.get(e)||null}}),fa(t).start(),t.Mh.yh()}function $o(t){return Yo(t)&&!fa(t).Hu()&&t.Nh.size>0}function Yo(t){return 0===v(t).Fh.size}function Jo(t){t.Lh=void 0}function Xo(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return t.Nh.forEach((function(e,n){Wo(t,e)})),[2]}))}))}function Zo(t,e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(n){return Jo(t),$o(t)?(t.Mh.ph(e),Qo(t)):t.Mh.set("Unknown"),[2]}))}))}function ta(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o;return Object(a.d)(this,(function(s){switch(s.label){case 0:if(t.Mh.set("Online"),!(e instanceof yn&&2===e.state&&e.cause))return[3,6];s.label=1;case 1:return s.trys.push([1,3,,5]),[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o;return Object(a.d)(this,(function(a){switch(a.label){case 0:n=e.cause,r=0,i=e.targetIds,a.label=1;case 1:return r<i.length?(o=i[r],t.Nh.has(o)?[4,t.Ch.$h(o,n)]:[3,3]):[3,5];case 2:a.sent(),t.Nh.delete(o),t.Lh.removeTarget(o),a.label=3;case 3:a.label=4;case 4:return r++,[3,1];case 5:return[2]}}
2))}))}(t,e)];case 2:return s.sent(),[3,5];case 3:return r=s.sent(),c("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),[4,ea(t,r)];case 4:return s.sent(),[3,5];case 5:return[3,13];case 6:if(e instanceof vn?t.Lh.wn(e):e instanceof gn?t.Lh.yn(e):t.Lh.In(e),n.isEqual(U.min()))return[3,13];s.label=7;case 7:return s.trys.push([7,11,,13]),[4,Qi(t.Sh)];case 8:return i=s.sent(),n.u(i)>=0?[4,function(t,e){var n=t.Lh.pn(e);return n.Oe.forEach((function(n,r){if(n.resumeToken.o()>0){var i=t.Nh.get(r);i&&t.Nh.set(r,i.$t(n.resumeToken,e))}})),n.ke.forEach((function(e){var n=t.Nh.get(e);if(n){t.Nh.set(e,n.$t(_.h,n.Mt)),Go(t,e);var r=new ue(n.target,e,1,n.sequenceNumber);Wo(t,r)}})),t.Ch.Bh(n)}(t,n)]:[3,10];case 9:s.sent(),s.label=10;case 10:return[3,13];case 11:return c("RemoteStore","Failed to raise snapshot:",o=s.sent()),[4,ea(t,o)];case 12:return s.sent(),[3,13];case 13:return[2]}}))}))}function ea(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r=this;return Object(a.d)(this,(function(i){switch(i.label){case 0:if(!sr(e))throw e;return t.Fh.add(1),[4,Ho(t)];case 1:return i.sent(),t.Mh.set("Offline"),n||(n=function(){return Qi(t.Sh)}),t.fs.vo((function(){return Object(a.b)(r,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return c("RemoteStore","Retrying IndexedDB access"),[4,n()];case 1:return e.sent(),t.Fh.delete(1),[4,Bo(t)];case 2:return e.sent(),[2]}}))}))})),[2]}}))}))}function na(t,e){return e().catch((function(n){return ea(t,n,e)}))}function ra(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n,r,i,o;return Object(a.d)(this,(function(a){switch(a.label){case 0:e=v(t),n=ha(e),r=e.xh.length>0?e.xh[e.xh.length-1].batchId:-1,a.label=1;case 1:if(!function(t){return Yo(t)&&t.xh.length<10}(e))return[3,7];a.label=2;case 2:return a.trys.push([2,4,,6]),[4,Ji(e.Sh,r)];case 3:return null===(i=a.sent())?(0===e.xh.length&&n.Zu(),[3,7]):(r=i.batchId,function(t,e){t.xh.push(e);var n=ha(t);n.Ju()&&n.fh&&n.dh(e.mutations)}(e,i),[3,6]);case 4:return o=a.sent(),[4,ea(e,o)];case 5:return a.sent(),[3,6];case 6:return[3,1];case 7:return ia(e)&&oa(e),[2]}}))}))}function ia(t){return Yo(t)&&!ha(t).Hu()&&t.xh.length>0}function oa(t){ha(t).start()}function aa(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return ha(t).Th(),[2]}))}))}function sa(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n,r,i;return Object(a.d)(this,(function(o){for(e=ha(t),n=0,r=t.xh;n<r.length;n++)i=r[n],e.dh(i.mutations);return[2]}))}))}function ua(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return r=t.xh.shift(),i=qr.from(r,e,n),[4,na(t,(function(){return t.Ch.qh(i)}))];case 1:return o.sent(),[4,ra(t)];case 2:return o.sent(),[2]}}))}))}function ca(t,e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(n){switch(n.label){case 0:return e&&ha(t).fh?[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return Ke(r=e.code)&&r!==E.ABORTED?(n=t.xh.shift(),ha(t).Xu(),[4,na(t,(function(){return t.Ch.Uh(n.batchId,e)}))]):[3,3];case 1:return i.sent(),[4,ra(t)];case 2:i.sent(),i.label=3;case 3:return[2]}}
2))}))}(t,e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return ia(t)&&oa(t),[2]}}))}))}function la(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return n=v(t),e?(n.Fh.delete(2),[4,Bo(n)]):[3,2];case 1:return r.sent(),[3,5];case 2:return e?[3,4]:(n.Fh.add(2),[4,Ho(n)]);case 3:r.sent(),n.Mh.set("Unknown"),r.label=4;case 4:r.label=5;case 5:return[2]}}))}))}function fa(t){var e=this;return t.Qh||(t.Qh=function(t,e,n){var r=v(t);return r.mh(),new Mo(e,r.Ku,r.credentials,r.Kt,n)}(t.Dh,t.fs,{Eu:Xo.bind(null,t),Iu:Zo.bind(null,t),uh:ta.bind(null,t)}),t.Oh.push((function(n){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return n?(t.Qh.Xu(),$o(t)?Qo(t):t.Mh.set("Unknown"),[3,3]):[3,1];case 1:return[4,t.Qh.stop()];case 2:e.sent(),Jo(t),e.label=3;case 3:return[2]}}))}))}))),t.Qh}function ha(t){var e=this;return t.Kh||(t.Kh=function(t,e,n){var r=v(t);return r.mh(),new Fo(e,r.Ku,r.credentials,r.Kt,n)}(t.Dh,t.fs,{Eu:aa.bind(null,t),Iu:ca.bind(null,t),Eh:sa.bind(null,t),wh:ua.bind(null,t)}),t.Oh.push((function(n){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return n?(t.Kh.Xu(),[4,ra(t)]):[3,2];case 1:return e.sent(),[3,4];case 2:return[4,t.Kh.stop()];case 3:e.sent(),t.xh.length>0&&(c("RemoteStore","Stopping write stream with "+t.xh.length+" pending writes"),t.xh=[]),e.label=4;case 4:return[2]}}
2))}))}))),t.Kh}var pa=function(){this.Wh=void 0,this.listeners=[]},da=function(){this.queries=new ci((function(t){return re(t)}),ne),this.onlineState="Unknown",this.jh=new Set};function va(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c;return Object(a.d)(this,(function(a){switch(a.label){case 0:if(n=v(t),r=e.query,i=!1,(o=n.queries.get(r))||(i=!0,o=new pa),!i)return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),s=o,[4,n.Gh(r)];case 2:return s.Wh=a.sent(),[3,4];case 3:return u=a.sent(),c=pr(u,"Initialization of query '"+ie(e.query)+"' failed"),[2,void e.onError(c)];case 4:return n.queries.set(r,o),o.listeners.push(e),e.zh(n.onlineState),o.Wh&&e.Hh(o.Wh)&&ba(n),[2]}}))}))}function ga(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s;return Object(a.d)(this,(function(a){return n=v(t),r=e.query,i=!1,(o=n.queries.get(r))&&(s=o.listeners.indexOf(e))>=0&&(o.listeners.splice(s,1),i=0===o.listeners.length),i?[2,(n.queries.delete(r),n.Jh(r))]:[2]}))}))}function ya(t,e){for(var n=v(t),r=!1,i=0,o=e;i<o.length;i++){var a=o[i],s=a.query,u=n.queries.get(s);if(u){for(var c=0,l=u.listeners;c<l.length;c++)l[c].Hh(a)&&(r=!0);u.Wh=a}}r&&ba(n)}function ma(t,e,n){var r=v(t),i=r.queries.get(e);if(i)for(var o=0,a=i.listeners;o<a.length;o++)a[o].onError(n);r.queries.delete(e)}function ba(t){t.jh.forEach((function(t){t.next()}))}var wa=function(){function t(t,e,n){this.query=t,this.Yh=e,this.Xh=!1,this.Zh=null,this.onlineState="Unknown",this.options=n||{}}return t.prototype.Hh=function(t){if(!this.options.includeMetadataChanges){for(var e=[],n=0,r=t.docChanges;n<r.length;n++){var i=r[n];3!==i.type&&e.push(i)}t=new hn(t.query,t.docs,t.De,e,t.Ce,t.fromCache,t.xe,!0)}var o=!1;return this.Xh?this.tl(t)&&(this.Yh.next(t),o=!0):this.el(t,this.onlineState)&&(this.nl(t),o=!0),this.Zh=t,o},t.prototype.onError=function(t){this.Yh.error(t)},t.prototype.zh=function(t){this.onlineState=t;var e=!1;return this.Zh&&!this.Xh&&this.el(this.Zh,t)&&(this.nl(this.Zh),e=!0),e},t.prototype.el=function(t,e){if(!t.fromCache)return!0;var n="Offline"!==e;return!(this.options.sl&&n||t.docs.nt()&&"Offline"!==e)},t.prototype.tl=function(t){if(t.docChanges.length>0)return!0;var e=this.Zh&&this.Zh.hasPendingWrites!==t.hasPendingWrites;return!(!t.xe&&!e)&&!0===this.options.includeMetadataChanges},t.prototype.nl=function(t){t=hn.Fe(t.query,t.docs,t.Ce,t.fromCache),this.Xh=!0,this.Yh.next(t)},t}(),_a=function(){function t(t,e){this.payload=t,this.byteLength=e}return t.prototype.il=function(){return"metadata"in this.payload},t}(),Ea=function(){function t(t){this.Kt=t}return t.prototype.yc=function(t){return xn(this.Kt,t)},t.prototype.gc=function(t){return t.metadata.exists?Fn(this.Kt,t.document,!1):new Ot(this.yc(t.metadata.name),this.Vc(t.metadata.readTime))},t.prototype.Vc=function(t){return kn(t)},t}(),Oa=function(){function t(t,e,n){this.rl=t,this.Sh=e,this.Kt=n,this.queries=[],this.documents=[],this.progress=Sa(t)}return t.prototype.ol=function(t){this.progress.bytesLoaded+=t.byteLength;var e=this.progress.documentsLoaded;return t.payload.namedQuery?this.queries.push(t.payload.namedQuery):t.payload.documentMetadata?(this.documents.push({metadata:t.payload.documentMetadata}),t.payload.documentMetadata.exists||++e):t.payload.document&&(this.documents[this.documents.length-1].document=t.payload.document,++e),e!==this.progress.documentsLoaded?(this.progress.documentsLoaded=e,Object.assign({},this.progress)):null},t.prototype.cl=function(t){for(var e=new Map,n=new Ea(this.Kt),r=0,i=t;r<i.length;r++){var o=i[r];if(o.metadata.queries)for(var a=n.yc(o.metadata.name),s=0,u=o.metadata.queries;s<u.length;s++){var c=u[s],l=(e.get(c)||sn()).add(a);e.set(c,l)}}return e},t.prototype.complete=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e,n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return[4,io(this.Sh,new Ea(this.Kt),this.documents,this.rl.id)];case 1:t=o.sent(),e=this.cl(this.documents),n=0,r=this.queries,o.label=2;case 2:return n<r.length?(i=r[n],[4,oo(this.Sh,i,e.get(i.name))]):[3,5];case 3:o.sent(),o.label=4;case 4:return n++,[3,2];case 5:return[2,(this.progress.taskState="Success",new dr(Object.assign({},this.progress),t))]}}))}))},t}();function Sa(t){return{taskState:"Running",documentsLoaded:0,bytesLoaded:0,totalDocuments:t.totalDocuments,totalBytes:t.totalBytes}}var Ta=function(t){this.key=t},Ia=function(t){this.key=t},Ca=function(){function t(t,e){this.query=t,this.al=e,this.ul=null,this.qe=!1,this.hl=sn(),this.Ce=sn(),this.ll=ae(t),this._l=new ln(this.ll)}return Object.defineProperty(t.prototype,"fl",{get:function(){return this.al}
2,enumerable:!1,configurable:!0}),t.prototype.dl=function(t,e){var n=this,r=e?e.wl:new fn,i=e?e._l:this._l,o=e?e.Ce:this.Ce,a=i,s=!1,u=Qt(this.query)&&i.size===this.query.limit?i.last():null,c=$t(this.query)&&i.size===this.query.limit?i.first():null;if(t.Zt((function(t,e){var l=i.get(t),f=e instanceof Et?e:null;f&&(f=oe(n.query,f)?f:null);var h=!!l&&n.Ce.has(l.key),p=!!f&&(f.bt||n.Ce.has(f.key)&&f.hasCommittedMutations),d=!1;l&&f?l.data().isEqual(f.data())?h!==p&&(r.track({type:3,doc:f}),d=!0):n.El(l,f)||(r.track({type:2,doc:f}),d=!0,(u&&n.ll(f,u)>0||c&&n.ll(f,c)<0)&&(s=!0)):!l&&f?(r.track({type:0,doc:f}),d=!0):l&&!f&&(r.track({type:1,doc:l}),d=!0,(u||c)&&(s=!0)),d&&(f?(a=a.add(f),o=p?o.add(t):o.delete(t)):(a=a.delete(t),o=o.delete(t)))})),Qt(this.query)||$t(this.query))for(;a.size>this.query.limit;){var l=Qt(this.query)?a.last():a.first();a=a.delete(l.key),o=o.delete(l.key),r.track({type:1,doc:l})}return{_l:a,wl:r,_c:s,Ce:o}},t.prototype.El=function(t,e){return t.bt&&e.hasCommittedMutations&&!e.bt},t.prototype.Ti=function(t,e,n){var r=this,i=this._l;this._l=t._l,this.Ce=t.Ce;var o=t.wl.Se();o.sort((function(t,e){return function(t,e){var n=function(t){switch(t){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return p()}};return n(t)-n(e)}(t.type,e.type)||r.ll(t.doc,e.doc)})),this.Tl(n);var a=e?this.Il():[],s=0===this.hl.size&&this.qe?1:0,u=s!==this.ul;return this.ul=s,0!==o.length||u?{snapshot:new hn(this.query,t._l,i,o,t.Ce,0===s,u,!1),ml:a}:{ml:a}},t.prototype.zh=function(t){return this.qe&&"Offline"===t?(this.qe=!1,this.Ti({_l:this._l,wl:new fn,Ce:this.Ce,_c:!1},!1)):{ml:[]}},t.prototype.Al=function(t){return!this.al.has(t)&&!!this._l.has(t)&&!this._l.get(t).bt},t.prototype.Tl=function(t){var e=this;t&&(t.Ue.forEach((function(t){return e.al=e.al.add(t)})),t.Qe.forEach((function(t){})),t.Ke.forEach((function(t){return e.al=e.al.delete(t)})),this.qe=t.qe)},t.prototype.Il=function(){var t=this;if(!this.qe)return[];var e=this.hl;this.hl=sn(),this._l.forEach((function(e){t.Al(e.key)&&(t.hl=t.hl.add(e.key))}));var n=[];return e.forEach((function(e){t.hl.has(e)||n.push(new Ia(e))})),this.hl.forEach((function(t){e.has(t)||n.push(new Ta(t))})),n},t.prototype.Rl=function(t){this.al=t.Pc,this.hl=sn();var e=this.dl(t.documents);return this.Ti(e,!0)},t.prototype.Pl=function(){return hn.Fe(this.query,this._l,this.Ce,0===this.ul)},t}(),ka=function(t,e,n){this.query=t,this.targetId=e,this.view=n},Pa=function(t){this.key=t,this.yl=!1},Aa=function(){function t(t,e,n,r,i,o){this.Sh=t,this.gl=e,this.Vl=n,this.pl=r,this.currentUser=i,this.bl=o,this.vl={},this.Sl=new ci((function(t){return re(t)}),ne),this.Dl=new Map,this.Cl=[],this.xl=new Ge(z.J),this.Nl=new Map,this.Fl=new so,this.Ol={},this.kl=new Map,this.Ml=mi.qi(),this.onlineState="Unknown",this.Ll=void 0}return Object.defineProperty(t.prototype,"$l",{get:function(){return!0===this.Ll},enumerable:!1,configurable:!0}),t}();function Na(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u;return Object(a.d)(this,(function(a){switch(a.label){case 0:return n=as(t),(o=n.Sl.get(e))?(r=o.targetId,n.pl.ka(r),i=o.view.Pl(),[3,4]):[3,1];case 1:return[4,Xi(n.Sh,te(e))];case 2:return s=a.sent(),u=n.pl.ka(s.targetId),r=s.targetId,[4,xa(n,e,r,"current"===u)];case 3:i=a.sent(),n.$l&&zo(n.gl,s),a.label=4;case 4:return[2,i]}}))}))}function xa(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s,u,c,l;return Object(a.d)(this,(function(f){switch(f.label){case 0:return t.Bl=function(e,n,r){return function(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:return(i=e.view.dl(n))._c?[4,to(t.Sh,e.query,!1).then((function(t){var n=t.documents;return e.view.dl(n,i)}))]:[3,2];case 1:i=a.sent(),a.label=2;case 2:return o=r&&r.Oe.get(e.targetId),s=e.view.Ti(i,t.$l,o),[2,(Ka(t,e.targetId,s.ml),s.snapshot)]}}))}))}(t,e,n,r)},[4,to(t.Sh,e,!0)];case 1:return i=f.sent(),o=new Ca(e,i.Pc),s=o.dl(i.documents),u=dn.Be(n,r&&"Offline"!==t.onlineState),c=o.Ti(s,t.$l,u),Ka(t,n,c.ml),l=new ka(e,n,o),[2,(t.Sl.set(e,l),t.Dl.has(n)?t.Dl.get(n).push(e):t.Dl.set(n,[e]),c.snapshot)]}}))}))}function ja(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return n=v(t),r=n.Sl.get(e),(i=n.Dl.get(r.targetId)).length>1?[2,(n.Dl.set(r.targetId,i.filter((function(t){return!ne(t,e)}))),void n.Sl.delete(e))]:n.$l?(n.pl.La(r.targetId),n.pl.Ca(r.targetId)?[3,2]:[4,Zi(n.Sh,r.targetId,!1).then((function(){n.pl.Ba(r.targetId),Ko(n.gl,r.targetId),Ha(n,r.targetId)})).catch(ui)]):[3,3];case 1:o.sent(),o.label=2;case 2:return[3,5];case 3:return Ha(n,r.targetId),[4,Zi(n.Sh,r.targetId,!0)];case 4:o.sent(),o.label=5;case 5:return[2]}}
2))}))}function Ra(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:r=ss(t),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,function(t,e){var n,r=v(t),i=F.now(),o=e.reduce((function(t,e){return t.add(e.key)}),sn());return r.persistence.runTransaction("Locally write mutations","readwrite",(function(t){return r.Ic.Zo(t,o).next((function(o){n=o;for(var a=[],s=0,u=e;s<u.length;s++){var c=u[s],l=Ne(c,n.get(c.key));null!=l&&a.push(new De(c.key,l,wt(l.proto.mapValue),Ie.exists(!0)))}return r.Ho.yi(t,i,a,e)}))})).then((function(t){var e=t.Fs(n);return{batchId:t.batchId,ci:e}}))}(r.Sh,e)];case 2:return i=a.sent(),r.pl.xa(i.batchId),function(t,e,n){var r=t.Ol[t.currentUser.R()];r||(r=new Ge(m)),r=r.Ht(e,n),t.Ol[t.currentUser.R()]=r}(r,i.batchId,n),[4,Qa(r,i.ci)];case 3:return a.sent(),[4,ra(r.gl)];case 4:return a.sent(),[3,6];case 5:return o=a.sent(),s=pr(o,"Failed to persist write"),n.reject(s),[3,6];case 6:return[2]}}))}))}function Da(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:n=v(t),i.label=1;case 1:return i.trys.push([1,4,,6]),[4,$i(n.Sh,e)];case 2:return r=i.sent(),e.Oe.forEach((function(t,e){var r=n.Nl.get(e);r&&(d(t.Ue.size+t.Qe.size+t.Ke.size<=1),t.Ue.size>0?r.yl=!0:t.Qe.size>0?d(r.yl):t.Ke.size>0&&(d(r.yl),r.yl=!1))})),[4,Qa(n,r,e)];case 3:return i.sent(),[3,6];case 4:return[4,ui(i.sent())];case 5:return i.sent(),[3,6];case 6:return[2]}}
2))}))}function La(t,e,n){var r=v(t);if(r.$l&&0===n||!r.$l&&1===n){var i=[];r.Sl.forEach((function(t,n){var r=n.view.zh(e);r.snapshot&&i.push(r.snapshot)})),function(t,e){var n=v(t);n.onlineState=e;var r=!1;n.queries.forEach((function(t,n){for(var i=0,o=n.listeners;i<o.length;i++)o[i].zh(e)&&(r=!0)})),r&&ba(n)}(r.Vl,e),i.length&&r.vl.uh(i),r.onlineState=e,r.$l&&r.pl.Ka(e)}}function Ma(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s,u,c;return Object(a.d)(this,(function(a){switch(a.label){case 0:return(r=v(t)).pl.qa(e,"rejected",n),i=r.Nl.get(e),(o=i&&i.key)?(s=(s=new Ge(z.J)).Ht(o,new Ot(o,U.min())),u=sn().add(o),c=new pn(U.min(),new Map,new Ye(m),s,u),[4,Da(r,c)]):[3,2];case 1:return a.sent(),r.xl=r.xl.remove(o),r.Nl.delete(e),Ga(r),[3,4];case 2:return[4,Zi(r.Sh,e,!1).then((function(){return Ha(r,e,n)})).catch(ui)];case 3:a.sent(),a.label=4;case 4:return[2]}}))}))}function Fa(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:n=v(t),r=e.batch.batchId,o.label=1;case 1:return o.trys.push([1,4,,6]),[4,Gi(n.Sh,e)];case 2:return i=o.sent(),Ba(n,r,null),qa(n,r),n.pl.Fa(r,"acknowledged"),[4,Qa(n,i)];case 3:return o.sent(),[3,6];case 4:return[4,ui(o.sent())];case 5:return o.sent(),[3,6];case 6:return[2]}}
2))}))}function Ua(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:r=v(t),o.label=1;case 1:return o.trys.push([1,4,,6]),[4,function(t,e){var n=v(t);return n.persistence.runTransaction("Reject batch","readwrite-primary",(function(t){var r;return n.Ho.gi(t,e).next((function(e){return d(null!==e),r=e.keys(),n.Ho.Ni(t,e)})).next((function(){return n.Ho.ki(t)})).next((function(){return n.Ic.Zo(t,r)}))}))}(r.Sh,e)];case 2:return i=o.sent(),Ba(r,e,n),qa(r,e),r.pl.Fa(e,"rejected",n),[4,Qa(r,i)];case 3:return o.sent(),[3,6];case 4:return[4,ui(o.sent())];case 5:return o.sent(),[3,6];case 6:return[2]}}))}))}function Va(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:Yo((n=v(t)).gl)||c("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled."),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,function(t){var e=v(t);return e.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(function(t){return e.Ho.bi(t)}))}(n.Sh)];case 2:return-1===(r=a.sent())?[2,void e.resolve()]:((i=n.kl.get(r)||[]).push(e),n.kl.set(r,i),[3,4]);case 3:return o=a.sent(),s=pr(o,"Initialization of waitForPendingWrites() operation failed"),e.reject(s),[3,4];case 4:return[2]}}
2))}))}function qa(t,e){(t.kl.get(e)||[]).forEach((function(t){t.resolve()})),t.kl.delete(e)}function Ba(t,e,n){var r=v(t),i=r.Ol[r.currentUser.R()];if(i){var o=i.get(e);o&&(n?o.reject(n):o.resolve(),i=i.remove(e)),r.Ol[r.currentUser.R()]=i}}function Ha(t,e,n){void 0===n&&(n=null),t.pl.La(e);for(var r=0,i=t.Dl.get(e);r<i.length;r++){var o=i[r];t.Sl.delete(o),n&&t.vl.ql(o,n)}t.Dl.delete(e),t.$l&&t.Fl.kc(e).forEach((function(e){t.Fl.Mi(e)||za(t,e)}))}function za(t,e){var n=t.xl.get(e);null!==n&&(Ko(t.gl,n),t.xl=t.xl.remove(e),t.Nl.delete(n),Ga(t))}function Ka(t,e,n){for(var r=0,i=n;r<i.length;r++){var o=i[r];o instanceof Ta?(t.Fl.ir(o.key,e),Wa(t,o)):o instanceof Ia?(c("SyncEngine","Document no longer in limbo: "+o.key),t.Fl.cr(o.key,e),t.Fl.Mi(o.key)||za(t,o.key)):p()}}function Wa(t,e){var n=e.key;t.xl.get(n)||(c("SyncEngine","New document in limbo: "+n),t.Cl.push(n),Ga(t))}function Ga(t){for(;t.Cl.length>0&&t.xl.size<t.bl;){var e=t.Cl.shift(),n=t.Ml.next();t.Nl.set(n,new Pa(e)),t.xl=t.xl.Ht(e,n),zo(t.gl,new ue(te(Gt(e.path)),n,2,M.U))}}function Qa(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s;return Object(a.d)(this,(function(u){switch(u.label){case 0:return r=v(t),i=[],o=[],s=[],r.Sl.nt()?[3,3]:(r.Sl.forEach((function(t,a){s.push(r.Bl(a,e,n).then((function(t){if(t){r.$l&&r.pl.qa(a.targetId,t.fromCache?"not-current":"current"),i.push(t);var e=Bi.cc(a.targetId,t);o.push(e)}})))})),[4,Promise.all(s)]);case 1:return u.sent(),r.vl.uh(i),[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u,l,f,h;return Object(a.d)(this,(function(a){switch(a.label){case 0:n=v(t),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,n.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(t){return nr.forEach(e,(function(e){return nr.forEach(e.rc,(function(r){return n.persistence.mi.ir(t,e.targetId,r)})).next((function(){return nr.forEach(e.oc,(function(r){return n.persistence.mi.cr(t,e.targetId,r)}))}))}))}))];case 2:return a.sent(),[3,4];case 3:if(!sr(r=a.sent()))throw r;return c("LocalStore","Failed to update sequence numbers: "+r),[3,4];case 4:for(i=0,o=e;i<o.length;i++)s=o[i],u=s.targetId,s.fromCache||(l=n.dc.get(u),f=l.Mt,h=l.Bt(f),n.dc=n.dc.Ht(u,h));return[2]}}))}))}(r.Sh,o)];case 2:u.sent(),u.label=3;case 3:return[2]}}
2))}))}function $a(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return(n=v(t)).currentUser.isEqual(e)?[3,3]:(c("SyncEngine","User change. New user:",e.R()),[4,Wi(n.Sh,e)]);case 1:return r=i.sent(),n.currentUser=e,function(t,e){t.kl.forEach((function(t){t.forEach((function(t){t.reject(new O(E.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),t.kl.clear()}(n),n.pl.Qa(e,r.Ac,r.Rc),[4,Qa(n,r.mc)];case 2:i.sent(),i.label=3;case 3:return[2]}}))}))}function Ya(t,e){var n=v(t),r=n.Nl.get(e);if(r&&r.yl)return sn().add(r.key);var i=sn(),o=n.Dl.get(e);if(!o)return i;for(var a=0,s=o;a<s.length;a++){var u=s[a],c=n.Sl.get(u);i=i.ye(c.view.fl)}return i}function Ja(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return[4,to((n=v(t)).Sh,e.query,!0)];case 1:return r=o.sent(),i=e.view.Rl(r),[2,(n.$l&&Ka(n,e.targetId,i.ml),i)]}}))}))}function Xa(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){return[2,no((e=v(t)).Sh).then((function(t){return Qa(e,t)}))]}))}))}function Za(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o;return Object(a.d)(this,(function(a){switch(a.label){case 0:return[4,function(t,e){var n=v(t),r=v(n.Ho);return n.persistence.runTransaction("Lookup mutation documents","readonly",(function(t){return r.Vi(t,e).next((function(e){return e?n.Ic.Zo(t,e):nr.resolve(null)}))}))}((i=v(t)).Sh,e)];case 1:return null===(o=a.sent())?[3,6]:"pending"!==n?[3,3]:[4,ra(i.gl)];case 2:return a.sent(),[3,4];case 3:"acknowledged"===n||"rejected"===n?(Ba(i,e,r||null),qa(i,e),function(t,e){v(v(t).Ho).Fi(e)}(i.Sh,e)):p(),a.label=4;case 4:return[4,Qa(i,o)];case 5:return a.sent(),[3,7];case 6:c("SyncEngine","Cannot apply mutation batch with id: "+e),a.label=7;case 7:return[2]}}
2))}))}function ts(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c,l;return Object(a.d)(this,(function(a){switch(a.label){case 0:return as(n=v(t)),ss(n),!0!==e||!0===n.Ll?[3,3]:(r=n.pl.Sa(),[4,es(n,r.rt())]);case 1:return i=a.sent(),n.Ll=!0,[4,la(n.gl,!0)];case 2:for(a.sent(),o=0,s=i;o<s.length;o++)u=s[o],zo(n.gl,u);return[3,7];case 3:return!1!==e||!1===n.Ll?[3,7]:(c=[],l=Promise.resolve(),n.Dl.forEach((function(t,e){n.pl.$a(e)?c.push(e):l=l.then((function(){return Ha(n,e),Zi(n.Sh,e,!0)})),Ko(n.gl,e)})),[4,l]);case 4:return a.sent(),[4,es(n,c)];case 5:return a.sent(),function(t){var e=v(t);e.Nl.forEach((function(t,n){Ko(e.gl,n)})),e.Fl.Mc(),e.Nl=new Map,e.xl=new Ge(z.J)}(n),n.Ll=!1,[4,la(n.gl,!1)];case 6:a.sent(),a.label=7;case 7:return[2]}}))}))}function es(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u,c,l,f,h,p,d,g,y;return Object(a.d)(this,(function(a){switch(a.label){case 0:n=v(t),r=[],i=[],o=0,s=e,a.label=1;case 1:return o<s.length?(u=s[o],c=void 0,(l=n.Dl.get(u))&&0!==l.length?[4,Xi(n.Sh,te(l[0]))]:[3,7]):[3,13];case 2:c=a.sent(),f=0,h=l,a.label=3;case 3:return f<h.length?(p=h[f],d=n.Sl.get(p),[4,Ja(n,d)]):[3,6];case 4:(g=a.sent()).snapshot&&i.push(g.snapshot),a.label=5;case 5:return f++,[3,3];case 6:return[3,11];case 7:return[4,eo(n.Sh,u)];case 8:return y=a.sent(),[4,Xi(n.Sh,y)];case 9:return c=a.sent(),[4,xa(n,ns(y),u,!1)];case 10:a.sent(),a.label=11;case 11:r.push(c),a.label=12;case 12:return o++,[3,1];case 13:return[2,(n.vl.uh(i),r)]}}))}))}function ns(t){return Wt(t.path,t.collectionGroup,t.orderBy,t.filters,t.limit,"F",t.startAt,t.endAt)}function rs(t){var e=v(t);return v(v(e.Sh).persistence).Ko()}function is(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s;return Object(a.d)(this,(function(a){switch(a.label){case 0:return(i=v(t)).Ll?(c("SyncEngine","Ignoring unexpected query state notification."),[3,8]):[3,1];case 1:if(!i.Dl.has(e))return[3,8];switch(n){case"current":case"not-current":return[3,2];case"rejected":return[3,5]}return[3,7];case 2:return[4,no(i.Sh)];case 3:return o=a.sent(),s=pn.$e(e,"current"===n),[4,Qa(i,o,s)];case 4:return a.sent(),[3,8];case 5:return[4,Zi(i.Sh,e,!0)];case 6:return a.sent(),Ha(i,e,r),[3,8];case 7:p(),a.label=8;case 8:return[2]}}
2))}))}function os(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s,u,l,f,h,p,d;return Object(a.d)(this,(function(v){switch(v.label){case 0:if(!(r=as(t)).Ll)return[3,10];i=0,o=e,v.label=1;case 1:return i<o.length?(s=o[i],r.Dl.has(s)?(c("SyncEngine","Adding an already active target "+s),[3,5]):[4,eo(r.Sh,s)]):[3,6];case 2:return u=v.sent(),[4,Xi(r.Sh,u)];case 3:return l=v.sent(),[4,xa(r,ns(u),l.targetId,!1)];case 4:v.sent(),zo(r.gl,l),v.label=5;case 5:return i++,[3,1];case 6:f=function(t){return Object(a.d)(this,(function(e){switch(e.label){case 0:return r.Dl.has(t)?[4,Zi(r.Sh,t,!1).then((function(){Ko(r.gl,t),Ha(r,t)})).catch(ui)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))},h=0,p=n,v.label=7;case 7:return h<p.length?(d=p[h],[5,f(d)]):[3,10];case 8:v.sent(),v.label=9;case 9:return h++,[3,7];case 10:return[2]}}))}))}function as(t){var e=v(t);return e.gl.Ch.Bh=Da.bind(null,e),e.gl.Ch.Sn=Ya.bind(null,e),e.gl.Ch.$h=Ma.bind(null,e),e.vl.uh=ya.bind(null,e.Vl),e.vl.ql=ma.bind(null,e.Vl),e}function ss(t){var e=v(t);return e.gl.Ch.qh=Fa.bind(null,e),e.gl.Ch.Uh=Ua.bind(null,e),e}function us(t,e,n){var r=v(t);(function(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s,u,c;return Object(a.d)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,14,,15]),[4,e.getMetadata()];case 1:return r=a.sent(),[4,function(t,e){var n=v(t),r=kn(e.createTime);return n.persistence.runTransaction("hasNewerBundle","readonly",(function(t){return n.To.Ls(t,e.id)})).then((function(t){return!!t&&t.createTime.u(r)>=0}))}(t.Sh,r)];case 2:return a.sent()?[4,e.close()]:[3,4];case 3:return[2,(a.sent(),void n.Ul(function(t){return{taskState:"Success",documentsLoaded:t.totalDocuments,bytesLoaded:t.totalBytes,totalDocuments:t.totalDocuments,totalBytes:t.totalBytes}}(r)))];case 4:return n.Ql(Sa(r)),i=new Oa(r,t.Sh,e.Kt),[4,e.Kl()];case 5:o=a.sent(),a.label=6;case 6:return o?[4,i.ol(o)]:[3,10];case 7:return(s=a.sent())&&n.Ql(s),[4,e.Kl()];case 8:o=a.sent(),a.label=9;case 9:return[3,6];case 10:return[4,i.complete()];case 11:return u=a.sent(),[4,Qa(t,u.gs,void 0)];case 12:return a.sent(),[4,function(t,e){var n=v(t);return n.persistence.runTransaction("Save bundle","readwrite",(function(t){return n.To.$s(t,e)}))}(t.Sh,r)];case 13:return a.sent(),n.Ul(u.progress),[3,15];case 14:return f("SyncEngine","Loading bundle failed with "+(c=a.sent())),n.Wl(c),[3,15];case 15:return[2]}}
2))}))})(r,e,n).then((function(){r.pl.ja()}))}var cs=function(){function t(){this.synchronizeTabs=!1}return t.prototype.initialize=function(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return this.Kt=Ro(t.gu.T),this.pl=this.jl(t),this.persistence=this.Gl(t),[4,this.persistence.start()];case 1:return e.sent(),this.zl=this.Hl(t),this.Sh=this.Jl(t),[2]}}))}))},t.prototype.Hl=function(t){return null},t.prototype.Jl=function(t){return Ki(this.persistence,new Hi,t.Yl,this.Kt)},t.prototype.Gl=function(t){return new po(go.ra,this.Kt)},t.prototype.jl=function(t){return new Io},t.prototype.terminate=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return this.zl&&this.zl.stop(),[4,this.pl.$o()];case 1:return t.sent(),[4,this.persistence.$o()];case 2:return t.sent(),[2]}}))}))},t}(),ls=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).Xl=e,i.cacheSizeBytes=n,i.forceOwnership=r,i.synchronizeTabs=!1,i}return Object(a.c)(e,t),e.prototype.initialize=function(e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(n){switch(n.label){case 0:return[4,t.prototype.initialize.call(this,e)];case 1:return n.sent(),[4,ro(this.Sh)];case 2:return n.sent(),[4,this.Xl.initialize(this,e)];case 3:return n.sent(),[4,ss(this.Xl.fa)];case 4:return n.sent(),[4,ra(this.Xl.gl)];case 5:return n.sent(),[2]}}))}))},e.prototype.Jl=function(t){return Ki(this.persistence,new Hi,t.Yl,this.Kt)},e.prototype.Hl=function(t){var e=this.persistence.mi.dr;return new Ti(e,t.fs)},e.prototype.Gl=function(t){var e=Vi(t.gu.T,t.gu.persistenceKey),n=void 0!==this.cacheSizeBytes?si.Zs(this.cacheSizeBytes):si.ni;return new Mi(this.synchronizeTabs,e,t.clientId,n,t.fs,xo(),jo(),this.Kt,this.pl,!!this.forceOwnership)},e.prototype.jl=function(t){return new Io},e}(cs),fs=function(t){function e(e,n){var r=this;return(r=t.call(this,e,n,!1)||this).Xl=e,r.cacheSizeBytes=n,r.synchronizeTabs=!0,r}return Object(a.c)(e,t),e.prototype.initialize=function(e){return Object(a.b)(this,void 0,void 0,(function(){var n,r=this;return Object(a.d)(this,(function(i){switch(i.label){case 0:return[4,t.prototype.initialize.call(this,e)];case 1:return i.sent(),n=this.Xl.fa,this.pl instanceof To?(this.pl.fa={nu:Za.bind(null,n),su:is.bind(null,n),iu:os.bind(null,n),Ko:rs.bind(null,n),eu:Xa.bind(null,n)},[4,this.pl.start()]):[3,3];case 2:i.sent(),i.label=3;case 3:return[4,this.persistence.yo((function(t){return Object(a.b)(r,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return[4,ts(this.Xl.fa,t)];case 1:return e.sent(),this.zl&&(t&&!this.zl.Ir?this.zl.start(this.Sh):t||this.zl.stop()),[2]}}))}))}))];case 4:return i.sent(),[2]}}))}))},e.prototype.jl=function(t){var e=xo();if(!To.Wn(e))throw new O(E.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var n=Vi(t.gu.T,t.gu.persistenceKey);return new To(e,t.fs,n,t.clientId,t.Yl)},e}(ls),hs=function(){function t(){}return t.prototype.initialize=function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n=this;return Object(a.d)(this,(function(r){switch(r.label){case 0:return this.Sh?[3,2]:(this.Sh=t.Sh,this.pl=t.pl,this.Dh=this.Zl(e),this.gl=this.t_(e),this.Vl=this.e_(e),this.fa=this.n_(e,!t.synchronizeTabs),this.pl.da=function(t){return La(n.fa,t,1)},this.gl.Ch.s_=$a.bind(null,this.fa),[4,la(this.gl,this.fa.$l)]);case 1:r.sent(),r.label=2;case 2:return[2]}}
2))}))},t.prototype.e_=function(t){return new da},t.prototype.Zl=function(t){var e,n=Ro(t.gu.T),r=(e=t.gu,new No(e));return function(t,e,n){return new Uo(t,e,n)}(t.credentials,r,n)},t.prototype.t_=function(t){var e,n,r,i,o,a=this;return e=this.Sh,n=this.Dh,r=t.fs,i=function(t){return La(a.fa,t,0)},o=ko.Wn()?new ko:new Co,new qo(e,n,r,i,o)},t.prototype.n_=function(t,e){return function(t,e,n,r,i,o,a){var s=new Aa(t,e,n,r,i,o);return a&&(s.Ll=!0),s}(this.Sh,this.gl,this.Vl,this.pl,t.Yl,t.bl,e)},t.prototype.terminate=function(){return function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=v(t),c("RemoteStore","RemoteStore shutting down."),e.Fh.add(5),[4,Ho(e)];case 1:return n.sent(),e.kh.$o(),e.Mh.set("Unknown"),[2]}}))}))}(this.gl)},t}();function ps(t,e){void 0===e&&(e=10240);var n=0;return{read:function(){return Object(a.b)(this,void 0,void 0,(function(){var r;return Object(a.d)(this,(function(i){return n<t.byteLength?(r={value:t.slice(n,n+e),done:!1},[2,(n+=e,r)]):[2,{done:!0}]}))}))},cancel:function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){return[2]}))}))},releaseLock:function(){}}}var ds=function(){function t(t){this.observer=t,this.muted=!1}return t.prototype.next=function(t){this.observer.next&&this.i_(this.observer.next,t)},t.prototype.error=function(t){this.observer.error?this.i_(this.observer.error,t):console.error("Uncaught Error in snapshot listener:",t)},t.prototype.r_=function(){this.muted=!0},t.prototype.i_=function(t,e){var n=this;this.muted||setTimeout((function(){n.muted||t(e)}),0)},t}(),vs=function(){function t(t,e){var n=this;this.o_=t,this.Kt=e,this.metadata=new er,this.buffer=new Uint8Array,this.c_=new TextDecoder("utf-8"),this.a_().then((function(t){t&&t.il()?n.metadata.resolve(t.payload.metadata):n.metadata.reject(new Error("The first element of the bundle is not a metadata, it is\n             "+JSON.stringify(null==t?void 0:t.payload)))}),(function(t){return n.metadata.reject(t)}))}return t.prototype.close=function(){return this.o_.cancel()},t.prototype.getMetadata=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){return[2,this.metadata.promise]}))}))},t.prototype.Kl=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return[4,this.getMetadata()];case 1:return[2,(t.sent(),this.a_())]}}))}))},t.prototype.a_=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e,n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return[4,this.u_()];case 1:return null===(t=i.sent())?[2,null]:(e=this.c_.decode(t),n=Number(e),isNaN(n)&&this.h_("length string ("+e+") is not valid number"),[4,this.l_(n)]);case 2:return r=i.sent(),[2,new _a(JSON.parse(r),t.length+n)]}}))}))},t.prototype.__=function(){return this.buffer.findIndex((function(t){return t==="{".charCodeAt(0)}))},t.prototype.u_=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return this.__()<0?[4,this.f_()]:[3,3];case 1:if(n.sent())return[3,3];n.label=2;case 2:return[3,0];case 3:return 0===this.buffer.length?[2,null]:((t=this.__())<0&&this.h_("Reached the end of bundle when a length string is expected."),e=this.buffer.slice(0,t),[2,(this.buffer=this.buffer.slice(t),e)])}}))}))},t.prototype.l_=function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return this.buffer.length<t?[4,this.f_()]:[3,3];case 1:n.sent()&&this.h_("Reached the end of bundle when more is expected."),n.label=2;case 2:return[3,0];case 3:return e=this.c_.decode(this.buffer.slice(0,t)),[2,(this.buffer=this.buffer.slice(t),e)]}}))}))},t.prototype.h_=function(t){throw this.o_.cancel(),new Error("Invalid bundle format: "+t)},t.prototype.f_=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return[4,this.o_.read()];
2case 1:return(t=n.sent()).done||((e=new Uint8Array(this.buffer.length+t.value.length)).set(this.buffer),e.set(t.value,this.buffer.length),this.buffer=e),[2,t.done]}}))}))},t}(),gs=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0;n<t.length;++n)if(0===t[n].length)throw new O(E.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this.d_=new H(t)}return t.prototype.isEqual=function(t){return this.d_.isEqual(t.d_)},t}(),ys=function(t){this._methodName=t};function ms(t,e,n){if(!n)throw new O(E.INVALID_ARGUMENT,"Function "+t+"() cannot be called with an empty "+e+".")}function bs(t,e){if(void 0===e)return{merge:!1};if(void 0!==e.mergeFields&&void 0!==e.merge)throw new O(E.INVALID_ARGUMENT,"Invalid options passed to function "+t+'(): You cannot specify both "merge" and "mergeFields".');return e}function ws(t,e,n,r){if(!0===e&&!0===r)throw new O(E.INVALID_ARGUMENT,t+" and "+n+" cannot be used together.")}function _s(t){if(!z.Et(t))throw new O(E.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t+" has "+t.length+".")}function Es(t){if(z.Et(t))throw new O(E.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+t+" has "+t.length+".")}function Os(t){if(void 0===t)return"undefined";if(null===t)return"null";if("string"==typeof t)return t.length>20&&(t=t.substring(0,20)+"..."),JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return""+t;if("object"==typeof t){if(t instanceof Array)return"an array";var e=function(t){if(t.constructor){var e=/function\s+([^\s(]+)\s*\(/.exec(t.constructor.toString());if(e&&e.length>1)return e[1]}return null}(t);return e?"a custom "+e+" object":"an object"}return"function"==typeof t?"a function":p()}function Ss(t,e){if("_delegate"in t&&(t=t._),!(t instanceof e)){if(e.name===t.constructor.name)throw new O(E.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=Os(t);throw new O(E.INVALID_ARGUMENT,"Expected type '"+e.name+"', but it was: "+n)}return t}function Ts(t,e){if(e<=0)throw new O(E.INVALID_ARGUMENT,"Function "+t+"() requires a positive number, but it was: "+e+".")}var Is=function(){function t(t){var e;if(void 0===t.host){if(void 0!==t.ssl)throw new O(E.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=null===(e=t.ssl)||void 0===e||e;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,void 0===t.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==t.cacheSizeBytes&&t.cacheSizeBytes<1048576)throw new O(E.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,ws("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling)}return t.prototype.isEqual=function(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties},t}(),Cs=new Map,ks=function(){function t(t,e){this.w_="(lite)",this.E_=new Is({}),this.T_=!1,t instanceof A?(this.I_=t,this.m_=new j):(this.A_=t,this.I_=function(t){if(!Object.prototype.hasOwnProperty.apply(t.options,["projectId"]))throw new O(E.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new A(t.options.projectId)}(t),this.m_=new R(e))}return Object.defineProperty(t.prototype,"app",{get:function(){if(!this.A_)throw new O(E.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.A_}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"R_",{get:function(){return this.T_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"P_",{get:function(){return void 0!==this.y_},enumerable:!1,configurable:!0}),t.prototype.g_=function(t){if(this.T_)throw new O(E.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this.E_=new Is(t),void 0!==t.credentials&&(this.m_=function(t){if(!t)return new j;switch(t.type){case"gapi":var e=t.client;return d(!("object"!=typeof e||null===e||!e.auth||!e.auth.getAuthHeaderValueForFirstParty)),new L(e,t.sessionIndex||"0");case"provider":return t.client;default:throw new O(E.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(t.credentials))},t.prototype.V_=function(){return this.E_},t.prototype.p_=function(){return this.T_=!0,this.E_},t.prototype._delete=function(){return this.y_||(this.y_=this.b_()),this.y_},t.prototype.b_=function(){return this,(t=Cs.get(this))&&(c("ComponentProvider","Removing Datastore"),Cs.delete(this),t.terminate()),Promise.resolve();var t},t}(),Ps=function(){function t(t,e,n){this.v_=e,this.S_=n,this.type="document",this.firestore=t}return Object.defineProperty(t.prototype,"D_",{get:function(){return this.S_.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this.S_.path.et()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this.S_.path.ot()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return new Ns(this.firestore,this.v_,this.S_.path.Z())},enumerable:!1,configurable:!0}),t.prototype.withConverter=function(e){return new t(this.firestore,e,this.S_)},t}(),As=function(){function t(t,e,n){this.v_=e,this.C_=n,this.type="query",this.firestore=t}return t.prototype.withConverter=function(e){return new t(this.firestore,e,this.C_)},t}(),Ns=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n,Gt(r))||this).firestore=e,i.D_=r,i.type="collection",i}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.C_.path.et()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.C_.path.ot()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this.D_.Z();return t.nt()?null:new Ps(this.firestore,null,new z(t))},enumerable:!1,configurable:!0}),e.prototype.withConverter=function(t){return new e(this.firestore,t,this.D_)},e}(As);function xs(t,e){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];if(t instanceof T&&(t=t._),ms("collection","path",e),t instanceof ks)return Es(n=q.ct.apply(q,Object(a.g)([e],r))),new Ns(t,null,n);if(!(t instanceof Ps||t instanceof Ns))throw new O(E.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");return Es(n=q.ct.apply(q,Object(a.g)([t.path],r)).child(q.ct(e))),new Ns(t.firestore,null,n)}function js(t,e){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];if(t instanceof T&&(t=t._),1===arguments.length&&(e=y.t()),ms("doc","path",e),t instanceof ks)return _s(n=q.ct.apply(q,Object(a.g)([e],r))),new Ps(t,null,new z(n));if(!(t instanceof Ps||t instanceof Ns))throw new O(E.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");return _s(n=t.D_.child(q.ct.apply(q,Object(a.g)([e],r)))),new Ps(t.firestore,t instanceof Ns?t.v_:null,new z(n))}function Rs(t,e){return t instanceof T&&(t=t._),e instanceof T&&(e=e._),(t instanceof Ps||t instanceof Ns)&&(e instanceof Ps||e instanceof Ns)&&t.firestore===e.firestore&&t.path===e.path&&t.v_===e.v_}function Ds(t,e){return t instanceof T&&(t=t._),e instanceof T&&(e=e._),t instanceof As&&e instanceof As&&t.firestore===e.firestore&&ne(t.C_,e.C_)&&t.v_===e.v_}var Ls=function(){function t(t,e){if(!isFinite(t)||t<-90||t>90)throw new O(E.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new O(E.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this.x_=t,this.N_=e}return Object.defineProperty(t.prototype,"latitude",{get:function(){return this.x_}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"longitude",{get:function(){return this.N_},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.x_===t.x_&&this.N_===t.N_},t.prototype.toJSON=function(){return{latitude:this.x_,longitude:this.N_}},t.prototype.K=function(t){return m(this.x_,t.x_)||m(this.N_,t.N_)},t}(),Ms=/^__.*__$/,Fs=function(){function t(t,e,n){this.data=t,this.zt=e,this.fieldTransforms=n}return t.prototype.F_=function(t,e){return null!==this.zt?new De(t,this.data,this.zt,e,this.fieldTransforms):new Re(t,this.data,e,this.fieldTransforms)},t}(),Us=function(){function t(t,e,n){this.data=t,this.zt=e,this.fieldTransforms=n}return t.prototype.F_=function(t,e){return new De(t,this.data,this.zt,e,this.fieldTransforms)},t}();function Vs(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw p()}}var qs=function(){function t(t,e,n,r,i,o){this.settings=t,this.T=e,this.Kt=n,this.ignoreUndefinedProperties=r,void 0===i&&this.O_(),this.fieldTransforms=i||[],this.zt=o||[]}return Object.defineProperty(t.prototype,"path",{get:function(){return this.settings.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"k_",{get:function(){return this.settings.k_},enumerable:!1,configurable:!0}),t.prototype.M_=function(e){return new t(Object.assign(Object.assign({},this.settings),e),this.T,this.Kt,this.ignoreUndefinedProperties,this.fieldTransforms,this.zt)},t.prototype.L_=function(t){var e,n=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.M_({path:n,B_:!1});return r.q_(t),r},t.prototype.U_=function(t){var e,n=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.M_({path:n,B_:!1});return r.O_(),r},t.prototype.Q_=function(t){return this.M_({path:void 0,B_:!0})},t.prototype.K_=function(t){return su(t,this.settings.methodName,this.settings.W_||!1,this.path,this.settings.j_)},t.prototype.contains=function(t){return void 0!==this.zt.find((function(e){return t.st(e)}))||void 0!==this.fieldTransforms.find((function(e){return t.st(e.field)}))},t.prototype.O_=function(){if(this.path)for(var t=0;t<this.path.length;t++)this.q_(this.path.get(t))},t.prototype.q_=function(t){if(0===t.length)throw this.K_("Document fields must not be empty");if(Vs(this.k_)&&Ms.test(t))throw this.K_('Document fields cannot begin and end with "__"')},t}(),Bs=function(){function t(t,e,n){this.T=t,this.ignoreUndefinedProperties=e,this.Kt=n||Ro(t)}return t.prototype.G_=function(t,e,n,r){return void 0===r&&(r=!1),new qs({k_:t,methodName:e,j_:n,path:H.at(),B_:!1,W_:r},this.T,this.Kt,this.ignoreUndefinedProperties)},t}();function Hs(t){var e=t.p_(),n=Ro(t.I_);return new Bs(t.I_,!!e.ignoreUndefinedProperties,n)}function zs(t,e,n,r,i,o){void 0===o&&(o={});var a=t.G_(o.merge||o.mergeFields?2:0,e,n,i);ru("Data must be an object, but it was:",a,r);var s,u,c=eu(r,a);if(o.merge)s=new Q(a.zt),u=a.fieldTransforms;else if(o.mergeFields){for(var l=[],f=0,h=o.mergeFields;f<h.length;f++){var p=iu(e,h[f],n);if(!a.contains(p))throw new O(E.INVALID_ARGUMENT,"Field '"+p+"' is specified in your field mask but missing from your input data.");uu(l,p)||l.push(p)}s=new Q(l),u=a.fieldTransforms.filter((function(t){return s.It(t.field)}))}else s=null,u=a.fieldTransforms;return new Fs(new mt(c),s,u)}var Ks=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.z_=function(t){if(2!==t.k_)throw 1===t.k_?t.K_(this._methodName+"() can only appear at the top level of your update data"):t.K_(this._methodName+"() cannot be used with set() unless you pass {merge:true}");return t.zt.push(t.path),null},e.prototype.isEqual=function(t){return t instanceof e},e}(ys);function Ws(t,e,n){return new qs({k_:3,j_:e.settings.j_,methodName:t._methodName,B_:n},e.T,e.Kt,e.ignoreUndefinedProperties)}var Gs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.z_=function(t){return new Se(t.path,new ge)},e.prototype.isEqual=function(t){return t instanceof e},e}(ys),Qs=function(t){function e(e,n){var r=this;return(r=t.call(this,e)||this).H_=n,r}return Object(a.c)(e,t),e.prototype.z_=function(t){var e=Ws(this,t,!0),n=this.H_.map((function(t){return tu(t,e)})),r=new ye(n);return new Se(t.path,r)},e.prototype.isEqual=function(t){return this===t},e}(ys),$s=function(t){function e(e,n){var r=this;return(r=t.call(this,e)||this).H_=n,r}return Object(a.c)(e,t),e.prototype.z_=function(t){var e=Ws(this,t,!0),n=this.H_.map((function(t){return tu(t,e)})),r=new be(n);return new Se(t.path,r)},e.prototype.isEqual=function(t){return this===t},e}(ys),Ys=function(t){function e(e,n){var r=this;return(r=t.call(this,e)||this).J_=n,r}return Object(a.c)(e,t),e.prototype.z_=function(t){var e=new _e(t.Kt,fe(t.Kt,this.J_));return new Se(t.path,e)},e.prototype.isEqual=function(t){return this===t},e}(ys);function Js(t,e,n,r){var i=t.G_(1,e,n);ru("Data must be an object, but it was:",i,r);var o=[],a=new bt;W(r,(function(t,r){var s=au(e,t,n);r instanceof T&&(r=r._);var u=i.U_(s);if(r instanceof Ks)o.push(s);else{var c=tu(r,u);null!=c&&(o.push(s),a.set(s,c))}}));var s=new Q(o);return new Us(a.yt(),s,i.fieldTransforms)}function Xs(t,e,n,r,i,o){var a=t.G_(1,e,n),s=[iu(e,r,n)],u=[i];if(o.length%2!=0)throw new O(E.INVALID_ARGUMENT,"Function "+e+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var c=0;c<o.length;c+=2)s.push(iu(e,o[c])),u.push(o[c+1]);for(var l=[],f=new bt,h=s.length-1;h>=0;--h)if(!uu(l,s[h])){var p=s[h],d=u[h];d instanceof T&&(d=d._);var v=a.U_(p);if(d instanceof Ks)l.push(p);else{var g=tu(d,v);null!=g&&(l.push(p),f.set(p,g))}}var y=new Q(l);return new Us(f.yt(),y,a.fieldTransforms)}function Zs(t,e,n,r){return void 0===r&&(r=!1),tu(n,t.G_(r?4:3,e))}function tu(t,e){if(t instanceof T&&(t=t._),nu(t))return ru("Unsupported field value:",e,t),eu(t,e);if(t instanceof ys)return function(t,e){if(!Vs(e.k_))throw e.K_(t._methodName+"() can only be used with update(
2) and set()");if(!e.path)throw e.K_(t._methodName+"() is not currently supported inside arrays");var n=t.z_(e);n&&e.fieldTransforms.push(n)}(t,e),null;if(e.path&&e.zt.push(e.path),t instanceof Array){if(e.settings.B_&&4!==e.k_)throw e.K_("Nested arrays are not supported");return function(t,e){for(var n=[],r=0,i=0,o=t;i<o.length;i++){var a=tu(o[i],e.Q_(r));null==a&&(a={nullValue:"NULL_VALUE"}),n.push(a),r++}return{arrayValue:{values:n}}}(t,e)}return function(t,e){if(t instanceof T&&(t=t._),null===t)return{nullValue:"NULL_VALUE"};if("number"==typeof t)return fe(e.Kt,t);if("boolean"==typeof t)return{booleanValue:t};if("string"==typeof t)return{stringValue:t};if(t instanceof Date){var n=F.fromDate(t);return{timestampValue:Tn(e.Kt,n)}}if(t instanceof F)return n=new F(t.seconds,1e3*Math.floor(t.nanoseconds/1e3)),{timestampValue:Tn(e.Kt,n)};if(t instanceof Ls)return{geoPointValue:{latitude:t.latitude,longitude:t.longitude}};if(t instanceof S)return{bytesValue:In(e.Kt,t.l)};if(t instanceof Ps){n=e.T;var r=t.firestore.I_;if(!r.isEqual(n))throw e.K_("Document reference is for database "+r.projectId+"/"+r.database+" but should be for database "+n.projectId+"/"+n.database);return{referenceValue:Pn(t.firestore.I_||e.T,t.S_.path)}}if(void 0===t&&e.ignoreUndefinedProperties)return null;throw e.K_("Unsupported field value: "+Os(t))}(t,e)}function eu(t,e){var n={};return G(t)?e.path&&e.path.length>0&&e.zt.push(e.path):W(t,(function(t,r){var i=tu(r,e.L_(t));null!=i&&(n[t]=i)})),{mapValue:{fields:n}}}function nu(t){return!("object"!=typeof t||null===t||t instanceof Array||t instanceof Date||t instanceof F||t instanceof Ls||t instanceof S||t instanceof Ps||t instanceof ys)}function ru(t,e,n){if(!nu(n)||!function(t){return"object"==typeof t&&null!==t&&(Object.getPrototypeOf(t)===Object.prototype||null===Object.getPrototypeOf(t))}(n)){var r=Os(n);throw"an object"===r?e.K_(t+" a custom object"):e.K_(t+" "+r)}}function iu(t,e,n){if(e instanceof T&&(e=e._),e instanceof gs)return e.d_;if("string"==typeof e)return au(t,e);throw su("Field path arguments must be of type string or FieldPath.",t,!1,void 0,n)}var ou=new RegExp("[~\\*/\\[\\]]");function au(t,e,n){if(e.search(ou)>=0)throw su("Invalid field path ("+e+"). Paths must not contain '~', '*', '/', '[', or ']'",t,!1,void 0,n);try{return(new(gs.bind.apply(gs,Object(a.g)([void 0],e.split("."))))).d_}catch(r){throw su("Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'",t,!1,void 0,n)}}function su(t,e,n,r,i){var o=r&&!r.nt(),a=void 0!==i,s="Function "+e+"() called with invalid data";n&&(s+=" (via `toFirestore()`)");var u="";return(o||a)&&(u+=" (found",o&&(u+=" in field "+r),a&&(u+=" in document "+i),u+=")"),new O(E.INVALID_ARGUMENT,(s+=". ")+t+u)}function uu(t,e){return t.some((function(t){return t.isEqual(e)}))}var cu=function(){function t(t){this.Dh=t,this.Y_=new Map,this.mutations=[],this.X_=!1,this.Z_=null,this.tf=new Set}return t.prototype.ef=function(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n=this;return Object(a.d)(this,(function(r){switch(r.label){case 0:if(this.nf(),this.mutations.length>0)throw new O(E.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i,o,s,u;return Object(a.d)(this,(function(a){switch(a.label){case 0:return n=v(t),r=Dn(n.Kt)+"/documents",i={documents:e.map((function(t){return Nn(n.Kt,t)}))},[4,n.Cu("BatchGetDocuments",r,i)];case 1:return o=a.sent(),s=new Map,o.forEach((function(t){var e=function(t,e){return"found"in e?function(t,e){d(!!e.found),e.found.name,e.found.updateTime;var n=xn(t,e.found.name),r=kn(e.found.updateTime),i=new mt({mapValue:{fields:e.found.fields}});return new Et(n,r,i,{})}(t,e):"missing"in e?function(t,e){d(!!e.missing),d(!!e.readTime);var n=xn(t,e.missing),r=kn(e.readTime);return new Ot(n,r)}(t,e):p()}(n.Kt,t);s.set(e.key.toString(),e)})),u=[],[2,(e.forEach((function(t){var e=s.get(t.toString());d(!!e),u.push(e)})),u)]}}))}))}(this.Dh,t)];
2case 1:return[2,((e=r.sent()).forEach((function(t){t instanceof Ot||t instanceof Et?n.sf(t):p()})),e)]}}))}))},t.prototype.set=function(t,e){this.write(e.F_(t,this.Gt(t))),this.tf.add(t.toString())},t.prototype.update=function(t,e){try{this.write(e.F_(t,this.rf(t)))}catch(t){this.Z_=t}this.tf.add(t.toString())},t.prototype.delete=function(t){this.write(new Be(t,this.Gt(t))),this.tf.add(t.toString())},t.prototype.commit=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e=this;return Object(a.d)(this,(function(n){switch(n.label){case 0:if(this.nf(),this.Z_)throw this.Z_;return t=this.Y_,this.mutations.forEach((function(e){t.delete(e.key.toString())})),t.forEach((function(t,n){var r=z.ft(n);e.mutations.push(new He(r,e.Gt(r)))})),[4,function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return n=v(t),r=Dn(n.Kt)+"/documents",i={writes:e.map((function(t){return Un(n.Kt,t)}))},[4,n.bu("Commit",r,i)];case 1:return o.sent(),[2]}}))}))}(this.Dh,this.mutations)];case 1:return n.sent(),this.X_=!0,[2]}}))}))},t.prototype.sf=function(t){var e;if(t instanceof Et)e=t.version;else{if(!(t instanceof Ot))throw p();e=U.min()}var n=this.Y_.get(t.key.toString());if(n){if(!e.isEqual(n))throw new O(E.ABORTED,"Document version changed between two reads.")}else this.Y_.set(t.key.toString(),e)},t.prototype.Gt=function(t){var e=this.Y_.get(t.toString());return!this.tf.has(t.toString())&&e?Ie.updateTime(e):Ie.Wt()},t.prototype.rf=function(t){var e=this.Y_.get(t.toString());if(!this.tf.has(t.toString())&&e){if(e.isEqual(U.min()))throw new O(E.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return Ie.updateTime(e)}return Ie.exists(!0)},t.prototype.write=function(t){this.nf(),this.mutations.push(t)},t.prototype.nf=function(){},t}(),lu=function(){function t(t,e,n,r){this.fs=t,this.Dh=e,this.updateFunction=n,this.Ts=r,this.cf=5,this.zu=new Do(this.fs,"transaction_retry")}return t.prototype.run=function(){this.af()},t.prototype.af=function(){var t=this;this.zu.Bu((function(){return Object(a.b)(t,void 0,void 0,(function(){var t,e,n=this;return Object(a.d)(this,(function(r){return t=new cu(this.Dh),(e=this.uf(t))&&e.then((function(e){n.fs.ys((function(){return t.commit().then((function(){n.Ts.resolve(e)})).catch((function(t){n.hf(t)}))}))})).catch((function(t){n.hf(t)})),[2]}))}))}))},t.prototype.uf=function(t){try{var e=this.updateFunction(t);return!nt(e)&&e.catch&&e.then?e:(this.Ts.reject(Error("Transaction callback must return a Promise")),null)}catch(t){return this.Ts.reject(t),null}},t.prototype.hf=function(t){var e=this;this.cf>0&&this.lf(t)?(this.cf-=1,this.fs.ys((function(){return e.af(),Promise.resolve()}))):this.Ts.reject(t)},t.prototype.lf=function(t){if("FirebaseError"===t.name){var e=t.code;return"aborted"===e||"failed-precondition"===e||!Ke(e)}return!1},t}(),fu=function(){function t(t,e,n){var r=this;this.credentials=t,this.fs=e,this.gu=n,this.user=N.UNAUTHENTICATED,this.clientId=y.t(),this._f=function(){},this.N=new er,this.credentials.S((function(t){c("FirestoreClient","Received user=",t.uid),r.user=t,r._f(t),r.N.resolve()}))}return t.prototype.getConfiguration=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return[4,this.N.promise];case 1:return[2,(t.sent(),{fs:this.fs,gu:this.gu,clientId:this.clientId,credentials:this.credentials,Yl:this.user,bl:100})]}}))}))},t.prototype.ff=function(t){var e=this;this._f=t,this.N.promise.then((function(){return e._f(e.user)}))},t.prototype.df=function(){if(this.fs.wf)throw new O(E.FAILED_PRECONDITION,"The client has already been terminated.")},t.prototype.terminate=function(){var t=this;this.fs.Ef();var e=new er;return this.fs.Tf((function(){return Object(a.b)(t,void 0,void 0,(function(){var t,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,5,,6]),this.If?[4,this.If.terminate()]:[3,2];case 1:r.sent(),r.label=2;case 2:return this.mf?[4,this.mf.terminate()]:[3,4];case 3:r.sent(),r.label=4;case 4:return this.credentials.D(),e.resolve(),[3,6];case 5:return t=r.sent(),n=pr(t,"Failed to shutdown persistence"),e.reject(n),[3,6];case 6:return[2]}}
2))}))})),e.promise},t}();function hu(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r,i=this;return Object(a.d)(this,(function(o){switch(o.label){case 0:return t.fs.Af(),c("FirestoreClient","Initializing OfflineComponentProvider"),[4,t.getConfiguration()];case 1:return n=o.sent(),[4,e.initialize(n)];case 2:return o.sent(),r=n.Yl,t.ff((function(n){r.isEqual(n)||(r=n,t.fs.vo((function(){return Object(a.b)(i,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return[4,Wi(e.Sh,n)];case 1:return t.sent(),[2]}}))}))})))})),e.persistence.Vo((function(){return t.terminate()})),t.mf=e,[2]}}))}))}function pu(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return t.fs.Af(),[4,du(t)];case 1:return n=i.sent(),c("FirestoreClient","Initializing OnlineComponentProvider"),[4,t.getConfiguration()];case 2:return r=i.sent(),[4,e.initialize(n,r)];case 3:return i.sent(),t.ff((function(n){return t.fs.vo((function(){return function(t,e){return Object(a.b)(this,void 0,void 0,(function(){var n,r;return Object(a.d)(this,(function(i){switch(i.label){case 0:return(n=v(t)).fs.Af(),c("RemoteStore","RemoteStore received new credentials"),r=Yo(n),n.Fh.add(3),[4,Ho(n)];case 1:return i.sent(),r&&n.Mh.set("Unknown"),[4,n.Ch.s_(e)];case 2:return i.sent(),n.Fh.delete(3),[4,Bo(n)];case 3:return i.sent(),[2]}}))}))}(e.gl,n)}))})),t.If=e,[2]}}))}))}function du(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return t.mf?[3,2]:(c("FirestoreClient","Using default OfflineComponentProvider"),[4,hu(t,new cs)]);case 1:e.sent(),e.label=2;case 2:return[2,t.mf]}}))}))}function vu(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return t.If?[3,2]:(c("FirestoreClient","Using default OnlineComponentProvider"),[4,pu(t,new hs)]);case 1:e.sent(),e.label=2;case 2:return[2,t.If]}}))}))}function gu(t){return du(t).then((function(t){return t.persistence}))}function yu(t){return du(t).then((function(t){return t.Sh}))}function mu(t){return vu(t).then((function(t){return t.gl}))}function bu(t){return vu(t).then((function(t){return t.fa}))}function wu(t){return Object(a.b)(this,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return[4,vu(t)];case 1:return e=r.sent(),[2,((n=e.Vl).Gh=Na.bind(null,e.fa),n.Jh=ja.bind(null,e.fa),n)]}}))}))}function _u(t,e,n){var r=this;void 0===n&&(n={});var i=new er;return t.fs.ys((function(){return Object(a.b)(r,void 0,void 0,(function(){var r;return Object(a.d)(this,(function(o){switch(o.label){case 0:return r=function(t,e,n,r,i){var o=new ds({next:function(o){e.ys((function(){return ga(t,a)}));var s=o.docs.has(n);!s&&o.fromCache?i.reject(new O(E.UNAVAILABLE,"Failed to get document because the client is offline.")):s&&o.fromCache&&r&&"server"===r.source?i.reject(new O(E.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):i.resolve(o)},error:function(t){return i.reject(t)}}),a=new wa(Gt(n.path),o,{includeMetadataChanges:!0,sl:!0});return va(t,a)},[4,wu(t)];case 1:return[2,r.apply(void 0,[o.sent(),t.fs,e,n,i])]}}))}))})),i.promise}function Eu(t,e,n){var r=this;void 0===n&&(n={});var i=new er;return t.fs.ys((function(){return Object(a.b)(r,void 0,void 0,(function(){var r;return Object(a.d)(this,(function(o){switch(o.label){case 0:return r=function(t,e,n,r,i){var o=new ds({next:function(n){e.ys((function(){return ga(t,a)})),n.fromCache&&"server"===r.source?i.reject(new O(E.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:function(t){return i.reject(t)}}),a=new wa(n,o,{includeMetadataChanges:!0,sl:!0});return va(t,a)},[4,wu(t)];case 1:return[2,r.apply(void 0,[o.sent(),t.fs,e,n,i])]}}))}))})),i.promise}var Ou=function(){function t(){var t=this;this.Rf=Promise.resolve(),this.Pf=[],this.yf=!1,this.gf=[],this.Vf=null,this.pf=!1,this.bf=[],this.zu=new Do(this,"async_queue_retry"),this.vf=function(){var e=jo();e&&c("AsyncQueue","Visibility state changed to "+e.visibilityState),t.zu.Uu()};var e=jo();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.vf)}return Object.defineProperty(t.prototype,"wf",{get:function(){return this.yf}
2,enumerable:!1,configurable:!0}),t.prototype.ys=function(t){this.enqueue(t)},t.prototype.Tf=function(t){this.Sf(),this.Df(t)},t.prototype.Ef=function(){if(!this.yf){this.yf=!0;var t=jo();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.vf)}},t.prototype.enqueue=function(t){return this.Sf(),this.yf?new Promise((function(t){})):this.Df(t)},t.prototype.vo=function(t){var e=this;this.ys((function(){return e.Pf.push(t),e.Cf()}))},t.prototype.Cf=function(){return Object(a.b)(this,void 0,void 0,(function(){var t,e=this;return Object(a.d)(this,(function(n){switch(n.label){case 0:if(0===this.Pf.length)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.Pf[0]()];case 2:return n.sent(),this.Pf.shift(),this.zu.reset(),[3,4];case 3:if(!sr(t=n.sent()))throw t;return c("AsyncQueue","Operation failed with retryable error: "+t),[3,4];case 4:this.Pf.length>0&&this.zu.Bu((function(){return e.Cf()})),n.label=5;case 5:return[2]}}))}))},t.prototype.Df=function(t){var e=this,n=this.Rf.then((function(){return e.pf=!0,t().catch((function(t){throw e.Vf=t,e.pf=!1,l("INTERNAL UNHANDLED ERROR: ",function(t){var e=t.message||"";return t.stack&&(e=t.stack.includes(t.message)?t.stack:t.message+"\n"+t.stack),e}(t)),t})).then((function(t){return e.pf=!1,t}))}));return this.Rf=n,n},t.prototype.mr=function(t,e,n){var r=this;this.Sf(),this.bf.indexOf(t)>-1&&(e=0);var i=hr.Is(this,t,e,n,(function(t){return r.xf(t)}));return this.gf.push(i),i},t.prototype.Sf=function(){this.Vf&&p()},t.prototype.Af=function(){},t.prototype.Nf=function(){return Object(a.b)(this,void 0,void 0,(function(){var t;return Object(a.d)(this,(function(e){switch(e.label){case 0:return[4,t=this.Rf];case 1:e.sent(),e.label=2;case 2:if(t!==this.Rf)return[3,0];e.label=3;case 3:return[2]}}
2))}))},t.prototype.Ff=function(t){for(var e=0,n=this.gf;e<n.length;e++)if(n[e].ds===t)return!0;return!1},t.prototype.Of=function(t){var e=this;return this.Nf().then((function(){e.gf.sort((function(t,e){return t.ws-e.ws}));for(var n=0,r=e.gf;n<r.length;n++){var i=r[n];if(i.Ps(),"all"!==t&&i.ds===t)break}return e.Nf()}))},t.prototype.kf=function(t){this.bf.push(t)},t.prototype.xf=function(t){var e=this.gf.indexOf(t);this.gf.splice(e,1)},t}(),Su=-1,Tu=function(t){function e(e,n){var r=this;return(r=t.call(this,e,n)||this).Mf=new Ou,r.w_="name"in e?e.name:"[DEFAULT]",r}return Object(a.c)(e,t),e.prototype.b_=function(){return this.Lf||Cu(this),this.Lf.terminate()},e}(ks);function Iu(t){return t.Lf||Cu(t),t.Lf.df(),t.Lf}function Cu(t){var e=t.p_(),n=function(t,e,n){return new P(t,e,n.host,n.ssl,n.experimentalForceLongPolling,n.experimentalAutoDetectLongPolling)}(t.I_,t.w_,e);t.Lf=new fu(t.m_,t.Mf,n)}function ku(t,e,n){var r=this,i=new er;return t.fs.enqueue((function(){return Object(a.b)(r,void 0,void 0,(function(){var r;return Object(a.d)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,hu(t,n)];case 1:return o.sent(),[4,pu(t,e)];case 2:return o.sent(),i.resolve(),[3,4];case 3:if(!function(t){return"FirebaseError"===t.name?t.code===E.FAILED_PRECONDITION||t.code===E.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||22===t.code||20===t.code||11===t.code}(r=o.sent()))throw r;return console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+r),i.reject(r),[3,4];case 4:return[2]}}
2))}))})).then((function(){return i.promise}))}function Pu(t){if(t.R_||t.P_)throw new O(E.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")}var Au=function(){function t(){}return t.prototype.$f=function(t,e){switch(void 0===e&&(e="none"),ot(t)){case 0:return null;case 1:return t.booleanValue;case 2:return J(t.integerValue||t.doubleValue);case 3:return this.Bf(t.timestampValue);case 4:return this.qf(t,e);case 5:return t.stringValue;case 6:return this.Uf(X(t.bytesValue));case 7:return this.Qf(t.referenceValue);case 8:return this.Kf(t.geoPointValue);case 9:return this.Wf(t.arrayValue,e);case 10:return this.jf(t.mapValue,e);default:throw p()}},t.prototype.jf=function(t,e){var n=this,r={};return W(t.fields||{},(function(t,i){r[t]=n.$f(i,e)})),r},t.prototype.Kf=function(t){return new Ls(J(t.latitude),J(t.longitude))},t.prototype.Wf=function(t,e){var n=this;return(t.values||[]).map((function(t){return n.$f(t,e)}))},t.prototype.qf=function(t,e){switch(e){case"previous":var n=tt(t);return null==n?null:this.$f(n,e);case"estimate":return this.Bf(et(t));default:return null}},t.prototype.Bf=function(t){var e=Y(t);return new F(e.seconds,e.nanos)},t.prototype.Gf=function(t,e){var n=q.ct(t);d(tr(n));var r=new A(n.get(1),n.get(3)),i=new z(n.X(5));return r.isEqual(e)||l("Document "+i+" contains a document reference within a different database ("+r.projectId+"/"+r.database+") which is not supported. It will be treated as a reference in the current database ("+e.projectId+"/"+e.database+") instead."),i},t}(),Nu=function(){function t(t,e,n,r,i){this.zf=t,this.Hf=e,this.S_=n,this.Jf=r,this.v_=i}return Object.defineProperty(t.prototype,"id",{get:function(){return this.S_.path.et()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ref",{get:function(){return new Ps(this.zf,this.v_,this.S_)},enumerable:!1,configurable:!0}),t.prototype.exists=function(){return null!==this.Jf},t.prototype.data=function(){if(this.Jf){if(this.v_){var t=new xu(this.zf,this.Hf,this.S_,this.Jf,null);return this.v_.fromFirestore(t)}return this.Hf.$f(this.Jf.vt())}},t.prototype.get=function(t){if(this.Jf){var e=this.Jf.data().field(ju("DocumentSnapshot.get",t));if(null!==e)return this.Hf.$f(e)}},t}(),xu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.data=function(){return t.prototype.data.call(this)},e}(Nu);function ju(t,e){return"string"==typeof e?au(t,e):e instanceof T?e._.d_:e.d_}function Ru(t){if($t(t)&&0===t.Nt.length)throw new O(E.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var Du=function(){};function Lu(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var o=i[r];t=o.Yf(t)}return t}var Mu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).Xf=e,i.Zf=n,i.td=r,i.type="where",i}return Object(a.c)(e,t),e.prototype.Yf=function(t){var e=Hs(t.firestore),n=function(t,e,n,r,i,o,a){var s;if(i.ht()){if("array-contains"===o||"array-contains-any"===o)throw new O(E.INVALID_ARGUMENT,"Invalid Query. You can't perform '"+o+"' queries on FieldPath.documentId().");if("in"===o||"not-in"===o){zu(a,o);for(var u=[],c=0,l=a;c<l.length;c++){var f=l[c];u.push(Hu(r,t,f))}s={arrayValue:{values:u}}}else s=Hu(r,t,a)}else"in"!==o&&"not-in"!==o&&"array-contains-any"!==o||zu(a,o),s=Zs(n,"where",a,"in"===o||"not-in"===o);var h=At.create(i,o,s);return function(t,e){if(e.xt()){var n=Jt(t);if(null!==n&&!n.isEqual(e.field))throw new O(E.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, >, or >=) must be on the same field. But you have inequality filters on '"+n.toString()+"' and '"+e.field.toString()+"'");var r=Yt(t);null!==r&&Ku(t,e.field,r)}var i=function(t,e){for(var n=0,r=t.filters;n<r.length;n++){var i=r[n];if(e.indexOf(i.op)>=0)return i.op}return null}(t,function(t){switch(t){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","
2not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(null!==i)throw i===e.op?new O(E.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+e.op.toString()+"' filter."):new O(E.INVALID_ARGUMENT,"Invalid query. You cannot use '"+e.op.toString()+"' filters with '"+i.toString()+"' filters.")}(t,h),h}(t.C_,0,e,t.firestore.I_,this.Xf,this.Zf,this.td);return new As(t.firestore,t.v_,function(t,e){var n=t.filters.concat([e]);return new Kt(t.path,t.collectionGroup,t.Nt.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}(t.C_,n))},e}(Du),Fu=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).Xf=e,r.ed=n,r.type="orderBy",r}return Object(a.c)(e,t),e.prototype.Yf=function(t){var e=function(t,e,n){if(null!==t.startAt)throw new O(E.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==t.endAt)throw new O(E.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var r=new qt(e,n);return function(t,e){if(null===Yt(t)){var n=Jt(t);null!==n&&Ku(t,n,e.field)}}(t,r),r}(t.C_,this.Xf,this.ed);return new As(t.firestore,t.v_,function(t,e){var n=t.Nt.concat([e]);return new Kt(t.path,t.collectionGroup,n,t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt)}(t.C_,e))},e}(Du),Uu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).type=e,i.nd=n,i.sd=r,i}return Object(a.c)(e,t),e.prototype.Yf=function(t){return new As(t.firestore,t.v_,ee(t.C_,this.nd,this.sd))},e}(Du),Vu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).type=e,i.rd=n,i.od=r,i}return Object(a.c)(e,t),e.prototype.Yf=function(t){var e=Bu(t,this.type,this.rd,this.od);return new As(t.firestore,t.v_,function(t,e){return new Kt(t.path,t.collectionGroup,t.Nt.slice(),t.filters.slice(),t.limit,t.limitType,e,t.endAt)}(t.C_,e))},e}(Du),qu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).type=e,i.rd=n,i.od=r,i}return Object(a.c)(e,t),e.prototype.Yf=function(t){var e=Bu(t,this.type,this.rd,this.od);return new As(t.firestore,t.v_,function(t,e){return new Kt(t.path,t.collectionGroup,t.Nt.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,e)}(t.C_,e))},e}(Du);function Bu(t,e,n,r){if(n[0]instanceof T&&(n[0]=n[0]._),n[0]instanceof Nu)return function(t,e,n,r,i){if(!r)throw new O(E.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+n+"().");for(var o=[],a=0,s=Zt(t);a<s.length;a++){var u=s[a];if(u.field.ht())o.push(ht(e,r.key));else{var c=r.field(u.field);if(Z(c))throw new O(E.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+u.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===c){var l=u.field.ot();throw new O(E.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+l+"' (used as the orderBy) does not exist.")}o.push(c)}}return new Ut(o,i)}(t.C_,t.firestore.I_,e,n[0].Jf,r);var i=Hs(t.firestore);return function(t,e,n,r,i,o){var a=t.Nt;if(i.length>a.length)throw new O(E.INVALID_ARGUMENT,"Too many arguments provided to "+r+"(). The number of arguments must be less than or equal to the number of orderBy() clauses");for(var s=[],u=0;u<i.length;u++){var c=i[u];if(a[u].field.ht()){if("string"!=typeof c)throw new O(E.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+r+"(), but got a "+typeof c);if(!Xt(t)&&-1!==c.indexOf("/"))throw new O(E.INVALID_ARGUMENT,"Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to "+r+"() must be a plain document ID, but '"+c+"' contains a slash.");var l=t.path.child(q.ct(c));if(!z.Et(l))throw new O(E.INVALID_ARGUMENT,"Invalid query. When querying a collection group and ordering by FieldPath.documentId(), the value passed to "+r+"() must result in a valid document path, but '"+l+"' is not because it c
2ontains an odd number of segments.");var f=new z(l);s.push(ht(e,f))}else{var h=Zs(n,r,c);s.push(h)}}return new Ut(s,o)}(t.C_,t.firestore.I_,i,e,n,r)}function Hu(t,e,n){if(n instanceof T&&(n=n._),"string"==typeof n){if(""===n)throw new O(E.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");if(!Xt(e)&&-1!==n.indexOf("/"))throw new O(E.INVALID_ARGUMENT,"Invalid query. When querying a collection by FieldPath.documentId(), you must provide a plain document ID, but '"+n+"' contains a '/' character.");var r=e.path.child(q.ct(n));if(!z.Et(r))throw new O(E.INVALID_ARGUMENT,"Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but '"+r+"' is not because it has an odd number of segments ("+r.length+").");return ht(t,new z(r))}if(n instanceof Ps)return ht(t,n.S_);throw new O(E.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: "+Os(n)+".")}function zu(t,e){if(!Array.isArray(t)||0===t.length)throw new O(E.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '"+e.toString()+"' filters.");if(t.length>10)throw new O(E.INVALID_ARGUMENT,"Invalid Query. '"+e.toString()+"' filters support a maximum of 10 elements in the value array.")}function Ku(t,e,n){if(!n.isEqual(e))throw new O(E.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, >, or >=) on field '"+e.toString()+"' and so you must also use '"+e.toString()+"' as your first argument to orderBy(), but your first orderBy() is on field '"+n.toString()+"' instead.")}function Wu(t){return function(t,e){if("object"!=typeof t||null===t)return!1;for(var n=t,r=0,i=["next","error","complete"];r<i.length;r++){var o=i[r];if(o in n&&"function"==typeof n[o])return!0}return!1}(t)}function Gu(t,e,n){return t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e}var Qu=function(t){function e(e){var n=this;return(n=t.call(this)||this).firestore=e,n}return Object(a.c)(e,t),e.prototype.Uf=function(t){return new S(t)},e.prototype.Qf=function(t){var e=this.Gf(t,this.firestore.I_);return new Ps(this.firestore,null,e)},e}(Au),$u=function(){function t(t,e){this.hasPendingWrites=t,this.fromCache=e}return t.prototype.isEqual=function(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache},t}(),Yu=function(t){function e(e,n,r,i,o,a){var s=this;return(s=t.call(this,e,n,r,i,a)||this).zf=e,s.ad=e,s.metadata=o,s}return Object(a.c)(e,t),e.prototype.exists=function(){return t.prototype.exists.call(this)},e.prototype.data=function(t){if(void 0===t&&(t={}),this.Jf){if(this.v_){var e=new Ju(this.zf,this.Hf,this.S_,this.Jf,this.metadata,null);return this.v_.fromFirestore(e,t)}return this.Hf.$f(this.Jf.vt(),t.serverTimestamps)}},e.prototype.get=function(t,e){if(void 0===e&&(e={}),this.Jf){var n=this.Jf.data().field(ju("DocumentSnapshot.get",t));if(null!==n)return this.Hf.$f(n,e.serverTimestamps)}},e}(Nu),Ju=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.data=function(e){return void 0===e&&(e={}),t.prototype.data.call(this,e)},e}(Yu),Xu=function(){function t(t,e,n,r){this.zf=t,this.Hf=e,this.ud=r,this.metadata=new $u(r.hasPendingWrites,r.fromCache),this.query=n}return Object.defineProperty(t.prototype,"docs",{get:function(){var t=[];return this.forEach((function(e){return t.push(e)})),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.ud.docs.size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.size},enumerable:!1,configurable:!0}),t.prototype.forEach=function(t,e){var n=this;this.ud.docs.forEach((function(r){t.call(e,new Ju(n.zf,n.Hf,r.key,r,new $u(n.ud.Ce.has(r.key),n.ud.fromCache),n.query.v_))}))},t.prototype.docChanges=function(t){void 0===t&&(t={});var e=!!t.includeMetadataChanges;if(e&&this.ud.Ne)throw new O(E.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this.hd&&this.ld===e||(this.hd=function(t,e){if(t.ud.De.nt()){var n=0;return t.ud.docChanges.map((function(e){var r=new Ju(t.zf,t.Hf,e.doc.key,e.doc,new $u(t.ud.Ce.has(e.doc.key),t.ud.fromCache),t.query.v_);return e.doc,{type:"added",doc:r,oldIndex:-1,newIndex:n++}}))}var r=t.ud.De;return t.ud.docChanges.filter((function(t){return e||3!==t.type})).map((function(e){var n=new Ju(t.zf,t.Hf,e.doc.key,e.doc,new $u(t.ud.Ce.has(e.doc.key),t.ud.fromCache),t.query.v_),i=-1,o=-1;return 0!==e.type&&(i=r.indexOf(e.doc.key),r=r.delete(e.doc.key)),1!==e.type&&(o=(r=r.add(e.doc)).indexOf(e.doc.key)),{type:Zu(e.type),doc:n,oldIndex:i,newIndex:o}}))}(this,e),this.ld=e),this.hd},t}();function Zu(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return p()}}function tc(t,e){return t instanceof Yu&&e instanceof Yu?t.zf===e.zf&&t.S_.isEqual(e.S_)&&(null===t.Jf?null===e.Jf:t.Jf.isEqual(e.Jf))&&t.v_===e.v_:t instanceof Xu&&e instanceof Xu&&t.zf===e.zf&&Ds(t.query,e.query)&&t.metadata.isEqual(e.metadata)&&t.ud.isEqual(e.ud)}var ec=function(t){function e(e){var n=this;return(n=t.call(this)||this).firestore=e,n}return Object(a.c)(e,t),e.prototype.Uf=function(t){return new S(t)},e.prototype.Qf=function(t){var e=this.Gf(t,this.firestore.I_);
2return new Ps(this.firestore,null,e)},e}(Au);function nc(t,e,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];t=Ss(t,Ps);var o=Ss(t.firestore,Tu),a=Hs(o);return e instanceof T&&(e=e._),ic(o,[("string"==typeof e||e instanceof gs?Xs(a,"updateDoc",t.S_,e,n,r):Js(a,"updateDoc",t.S_,e)).F_(t.S_,Ie.exists(!0))])}function rc(t){for(var e,n,r,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];t instanceof T&&(t=t._);var s={includeMetadataChanges:!1},u=0;"object"!=typeof i[u]||Wu(i[u])||(s=i[u],u++);var c,l,f,h={includeMetadataChanges:s.includeMetadataChanges};if(Wu(i[u])){var p=i[u];i[u]=null===(e=p.next)||void 0===e?void 0:e.bind(p),i[u+1]=null===(n=p.error)||void 0===n?void 0:n.bind(p),i[u+2]=null===(r=p.complete)||void 0===r?void 0:r.bind(p)}if(t instanceof Ps)l=Ss(t.firestore,Tu),f=Gt(t.S_.path),c={next:function(e){i[u]&&i[u](oc(l,t,e))},error:i[u+1],complete:i[u+2]};else{var d=Ss(t,As);l=Ss(d.firestore,Tu),f=d.C_;var v=new ec(l);c={next:function(t){i[u]&&i[u](new Xu(l,v,d,t))},error:i[u+1],complete:i[u+2]},Ru(t.C_)}return function(t,e,n,r){var i=this,o=new ds(r),s=new wa(e,o,n);return t.fs.ys((function(){return Object(a.b)(i,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=va,[4,wu(t)];case 1:return[2,e.apply(void 0,[n.sent(),s])]}}))}))})),function(){o.r_(),t.fs.ys((function(){return Object(a.b)(i,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=ga,[4,wu(t)];case 1:return[2,e.apply(void 0,[n.sent(),s])]}}))}))}))}}(Iu(l),f,h,c)}function ic(t,e){return function(t,e){var n=this,r=new er;return t.fs.ys((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(i){switch(i.label){case 0:return n=Ra,[4,bu(t)];case 1:return[2,n.apply(void 0,[i.sent(),e,r])]}}))}))})),r.promise}(Iu(t),e)}function oc(t,e,n){var r=n.docs.get(e.S_),i=new ec(t);return new Yu(t,i,e.S_,r,new $u(n.hasPendingWrites,n.fromCache),e.v_)}var ac=function(){function t(t,e){this.zf=t,this._d=e,this.fd=[],this.dd=!1,this.wd=Hs(t)}return t.prototype.set=function(t,e,n){this.Ed();var r=sc(t,this.zf),i=Gu(r.v_,e,n),o=zs(this.wd,"WriteBatch.set",r.S_,i,null!==r.v_,n);return this.fd.push(o.F_(r.S_,Ie.Wt())),this},t.prototype.update=function(t,e,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];this.Ed();var o,a=sc(t,this.zf);return e instanceof T&&(e=e._),o="string"==typeof e||e instanceof gs?Xs(this.wd,"WriteBatch.update",a.S_,e,n,r):Js(this.wd,"WriteBatch.update",a.S_,e),this.fd.push(o.F_(a.S_,Ie.exists(!0))),this},t.prototype.delete=function(t){this.Ed();var e=sc(t,this.zf);return this.fd=this.fd.concat(new Be(e.S_,Ie.Wt())),this},t.prototype.commit=function(){return this.Ed(),this.dd=!0,this.fd.length>0?this._d(this.fd):Promise.resolve()},t.prototype.Ed=function(){if(this.dd)throw new O(E.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},t}();function sc(t,e){if(t instanceof T&&(t=t._),t.firestore!==e)throw new O(E.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return t}var uc=function(t){function e(e,n){var r=this;return(r=t.call(this,e,n)||this).zf=e,r}return Object(a.c)(e,t),e.prototype.get=function(e){var n=this,r=sc(e,this.zf),i=new ec(this.zf);return t.prototype.get.call(this,e).then((function(t){return new Yu(n.zf,i,r.S_,t.Jf,new $u(!1,!1),r.v_)}))},e}(function(){function t(t,e){this.zf=t,this.Td=e,this.wd=Hs(t)}return t.prototype.get=function(t){var e=this,n=sc(t,this.zf),r=new Qu(this.zf);return this.Td.ef([n.S_]).then((function(t){if(!t||1!==t.length)return p();var i=t[0];if(i instanceof Ot)return new Nu(e.zf,r,n.S_,null,n.v_);if(i instanceof Et)return new Nu(e.zf,r,i.key,i,n.v_);throw p()}))},t.prototype.set=function(t,e,n){var r=sc(t,this.zf),i=Gu(r.v_,e,n),o=zs(this.wd,"Transaction.set",r.S_,i,null!==r.v_,n);return this.Td.set(r.S_,o),this},t.prototype.update=function(t,e,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];var o,a=sc(t,this.zf);return e instanceof T&&(e=e._),o="string"==typeof e||e instanceof gs?Xs(this.wd,"Transaction.update",a.S_,e,n,r):Js(this.wd,"Transaction.update",a.S_,e),this.Td.update(a.S_,o),this},t.prototype.delete=function(t){var e=sc(t,this.zf);return this.Td.delete(e.S_),this},t}()),cc=function(){function t(){}return t.prototype.enableIndexedDbPersistence=function(t,e){return function(t,e){Pu(t=Ss(t,Tu));var n=Iu(t),r=t.p_(),i=new hs;return ku(n,i,new ls(i,r.cacheSizeBytes,null==e?void 0:e.forceOwnership))}(t._,{forceOwnership:e})},t.prototype.enableMultiTabIndexedDbPersistence=function(t){return function(t){Pu(t=Ss(t,Tu));var e=Iu(t),n=t.p_(),r=new hs;return ku(e,r,new fs(r,n.cacheSizeBytes))}(t._)},t.prototype.clearIndexedDbPersistence=function(t){return function(t){var e=this;if(t.R_&&!t.P_)throw new O(E.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");var n=new er;return t.Mf.Tf((function(){return Object(a.b)(e,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return ir.Wn()?(e=t+"main",[4,ir.delete(e)]):[2,Promise.resolve()];case 1:return n.sent(),[2]}}))}))}(Vi(t.I_,t.w_))];case 1:return r.sent(),n.resolve(),[3,3];case 2:return e=r.sent(),n.reject(e),[3,3];case 3:return[2]}}
2))}))})),n.promise}(t._)},t}(),lc=function(t){function e(e,n,r){var i=this;return(i=t.call(this,n)||this).Id=r,i.INTERNAL={delete:function(){return i.terminate()}},e instanceof A||(i.md=e),i}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"I_",{get:function(){return this._.I_},enumerable:!1,configurable:!0}),e.prototype.settings=function(t){t.merge&&delete(t=Object.assign(Object.assign({},this._.V_()),t)).merge,this._.g_(t)},e.prototype.useEmulator=function(t,e){"firestore.googleapis.com"!==this._.V_().host&&f("Host has been set in both settings() and useEmulator(), emulator host will be used"),this.settings({host:t+":"+e,ssl:!1,merge:!0})},e.prototype.enableNetwork=function(){return function(t){var e=this;return t.fs.enqueue((function(){return Object(a.b)(e,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return[4,gu(t)];case 1:return e=r.sent(),[4,mu(t)];case 2:return n=r.sent(),[2,(e.po(!0),function(t){var e=v(t);return e.Fh.delete(0),Bo(e)}(n))]}}))}))}))}(Iu(Ss(this._,Tu)))},e.prototype.disableNetwork=function(){return function(t){var e=this;return t.fs.enqueue((function(){return Object(a.b)(e,void 0,void 0,(function(){var e,n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return[4,gu(t)];case 1:return e=r.sent(),[4,mu(t)];case 2:return n=r.sent(),[2,(e.po(!1),function(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return(e=v(t)).Fh.add(0),[4,Ho(e)];case 1:return n.sent(),e.Mh.set("Offline"),[2]}}))}))}(n))]}}))}))}))}(Iu(Ss(this._,Tu)))},e.prototype.enablePersistence=function(t){var e=!1,n=!1;return t&&ws("synchronizeTabs",e=!!t.synchronizeTabs,"experimentalForceOwningTab",n=!!t.experimentalForceOwningTab),e?this.Id.enableMultiTabIndexedDbPersistence(this):this.Id.enableIndexedDbPersistence(this,n)},e.prototype.clearPersistence=function(){return this.Id.clearIndexedDbPersistence(this)},e.prototype.terminate=function(){return this.app._removeServiceInstance("firestore"),this.app._removeServiceInstance("firestore-exp"),this._._delete()},e.prototype.waitForPendingWrites=function(){return function(t){var e=this,n=new er;return t.fs.ys((function(){return Object(a.b)(e,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(r){switch(r.label){case 0:return e=Va,[4,bu(t)];case 1:return[2,e.apply(void 0,[r.sent(),n])]}}))}))})),n.promise}(Iu(Ss(this._,Tu)))},e.prototype.onSnapshotsInSync=function(t){return function(t,e){return function(t,e){var n=this,r=new ds(e);return t.fs.ys((function(){return Object(a.b)(n,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=function(t,e){v(t).jh.add(e),e.next()},[4,wu(t)];case 1:return[2,e.apply(void 0,[n.sent(),r])]}}))}))})),function(){r.r_(),t.fs.ys((function(){return Object(a.b)(n,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=function(t,e){v(t).jh.delete(e)},[4,wu(t)];case 1:return[2,e.apply(void 0,[n.sent(),r])]}}))}))}))}}(Iu(t=Ss(t,Tu)),Wu(e)?e:{next:e})}(this._,t)},Object.defineProperty(e.prototype,"app",{get:function(){if(!this.md)throw new O(E.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.md},enumerable:!1,configurable:!0}),e.prototype.collection=function(t){try{return new Sc(this,xs(this._,t))}catch(t){throw gc(t,"collection()","Firestore.collection()")}},e.prototype.doc=function(t){try{return new vc(this,js(this._,t))}catch(t){throw gc(t,"doc()","Firestore.doc()")}},e.prototype.collectionGroup=function(t){try{return new _c(this,function(t,e){if(t=Ss(t,ks),ms("collectionGroup","collection id",e),e.indexOf("/")>=0)throw new O(E.INVALID_ARGUMENT,"Invalid collection ID '"+e+"' passed to function collectionGroup(). Collection IDs must not contain '/'.");return new As(t,null,function(t){return new Kt(q.at(),t)}(e))}(this._,t))}catch(t){throw gc(t,"collectionGroup()","Firestore.collectionGroup()")}},e.prototype.runTransaction=function(t){var e=this;return function(t,e){return function(t,e){var n=this,r=new er;return t.fs.ys((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(i){switch(i.label){case 0:return[4,function(t){return vu(t).then((function(t){return t.Dh}))}(t)];case 1:return n=i.sent(),new lu(t.fs,n,e,r).run(),[2]}}))}))})),r.promise}(Iu(t),(function(n){return e(new uc(t,n))}
2))}(this._,(function(n){return t(new pc(e,n))}))},e.prototype.batch=function(){var t=this;return Iu(this._),new dc(new ac(this._,(function(e){return ic(t._,e)})))},e.prototype.loadBundle=function(t){throw new O(E.FAILED_PRECONDITION,'"loadBundle()" does not exist, have you imported "firebase/firestore/bundle"?')},e.prototype.namedQuery=function(t){throw new O(E.FAILED_PRECONDITION,'"namedQuery()" does not exist, have you imported "firebase/firestore/bundle"?')},e}(T),fc=function(t){function e(e){var n=this;return(n=t.call(this)||this).firestore=e,n}return Object(a.c)(e,t),e.prototype.Uf=function(t){return new k(new S(t))},e.prototype.Qf=function(t){var e=this.Gf(t,this.firestore.I_);return vc.Ad(e,this.firestore,null)},e}(Au);function hc(t){var e;e=t,s.setLogLevel(e)}var pc=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).zf=e,r}return Object(a.c)(e,t),e.prototype.get=function(t){var e=this,n=Tc(t);return this._.get(n).then((function(t){return new bc(e.zf,t)}))},e.prototype.set=function(t,e,n){var r=Tc(t);return n?(bs("Transaction.set",n),this._.set(r,e,n)):this._.set(r,e),this},e.prototype.update=function(t,e,n){for(var r,i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=Tc(t);return 2===arguments.length?this._.update(s,e):(r=this._).update.apply(r,Object(a.g)([s,e,n],i)),this},e.prototype.delete=function(t){var e=Tc(t);return this._.delete(e),this},e}(T),dc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.set=function(t,e,n){var r=Tc(t);return n?(bs("WriteBatch.set",n),this._.set(r,e,n)):this._.set(r,e),this},e.prototype.update=function(t,e,n){for(var r,i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=Tc(t);return 2===arguments.length?this._.update(s,e):(r=this._).update.apply(r,Object(a.g)([s,e,n],i)),this},e.prototype.delete=function(t){var e=Tc(t);return this._.delete(e),this},e.prototype.commit=function(){return this._.commit()},e}(T),vc=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).firestore=e,r.Hf=new fc(e),r}return Object(a.c)(e,t),e.Rd=function(t,n,r){if(t.length%2!=0)throw new O(E.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t.ot()+" has "+t.length);return new e(n,new Ps(n._,r,new z(t)))},e.Ad=function(t,n,r){return new e(n,new Ps(n._,r,t))},Object.defineProperty(e.prototype,"id",{get:function(){return this._.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new Sc(this.firestore,this._.parent)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._.path},enumerable:!1,configurable:!0}),e.prototype.collection=function(t){try{return new Sc(this.firestore,xs(this._,t))}catch(t){throw gc(t,"collection()","DocumentReference.collection()")}},e.prototype.isEqual=function(t){return t instanceof T&&(t=t._),t instanceof Ps&&Rs(this._,t)},e.prototype.set=function(t,e){e=bs("DocumentReference.set",e);try{return function(t,e,n){t=Ss(t,Ps);var r=Ss(t.firestore,Tu),i=Gu(t.v_,e,n);return ic(r,[zs(Hs(r),"setDoc",t.S_,i,null!==t.v_,n).F_(t.S_,Ie.Wt())])}(this._,t,e)}catch(t){throw gc(t,"setDoc()","DocumentReference.set()")}},e.prototype.update=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];try{return 1===arguments.length?nc(this._,t):nc.apply(void 0,Object(a.g)([this._,t,e],n))}catch(t){throw gc(t,"updateDoc()","DocumentReference.update()")}},e.prototype.delete=function(){return ic(Ss((t=this._).firestore,Tu),[new Be(t.S_,Ie.Wt())]);var t},e.prototype.onSnapshot=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=yc(e),i=mc(e,(function(e){return new bc(t.firestore,new Yu(t.firestore._,t.Hf,e.S_,e.Jf,e.metadata,t._.v_))}));return rc(this._,r,i)},e.prototype.get=function(t){var e=this;return("cache"===(null==t?void 0:t.source)?function(t){t=Ss(t,Ps);var e=Ss(t.firestore,Tu),n=Iu(e),r=new ec(e);return function(t,e){var n=this,r=new er;return t.fs.ys((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(i){switch(i.label){case 0:return n=function(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i;return Object(a.d)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,function(t,e){var n=v(t);return n.persistence.runTransaction("read document","readonly",(function(t){return n.Ic.Jo(t,e)}))}(t,e)];case 1:return(i=o.sent())instanceof Et?n.resolve(i):i instanceof Ot?n.resolve(null):n.reject(new O(E.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)")),[3,3];case 2:return r=o.sent(),i=pr(r,"Failed to get document '"+e+" from cache"),n.reject(i),[3,3];case 3:return[2]}}
2))}))},[4,yu(t)];case 1:return[2,n.apply(void 0,[i.sent(),e,r])]}}))}))})),r.promise}(n,t.S_).then((function(n){return new Yu(e,r,t.S_,n,new $u(n instanceof Et&&n.bt,!0),t.v_)}))}(this._):"server"===(null==t?void 0:t.source)?function(t){t=Ss(t,Ps);var e=Ss(t.firestore,Tu);return _u(Iu(e),t.S_,{source:"server"}).then((function(n){return oc(e,t,n)}))}(this._):function(t){t=Ss(t,Ps);var e=Ss(t.firestore,Tu);return _u(Iu(e),t.S_).then((function(n){return oc(e,t,n)}))}(this._)).then((function(t){return new bc(e.firestore,new Yu(e.firestore._,e.Hf,t.S_,t.Jf,t.metadata,e._.v_))}))},e.prototype.withConverter=function(t){return new e(this.firestore,this._.withConverter(t))},e}(T);function gc(t,e,n){return t.message=t.message.replace(e,n),t}function yc(t){for(var e=0,n=t;e<n.length;e++){var r=n[e];if("object"==typeof r&&!Wu(r))return r}return{}}function mc(t,e){var n,r,i;return{next:function(t){i.next&&i.next(e(t))},error:null===(n=(i=Wu(t[0])?t[0]:Wu(t[1])?t[1]:"function"==typeof t[0]?{next:t[0],error:t[1],complete:t[2]}:{next:t[1],error:t[2],complete:t[3]}).error)||void 0===n?void 0:n.bind(i),complete:null===(r=i.complete)||void 0===r?void 0:r.bind(i)}}var bc=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).zf=e,r}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"ref",{get:function(){return new vc(this.zf,this._.ref)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this._.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exists",{get:function(){return this._.exists()},enumerable:!1,configurable:!0}),e.prototype.data=function(t){return this._.data(t)},e.prototype.get=function(t,e){return this._.get(t,e)},e.prototype.isEqual=function(t){return tc(this._,t._)},e}(T),wc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.data=function(t){return this._.data(t)},e}(bc),_c=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).firestore=e,r.Hf=new fc(e),r}return Object(a.c)(e,t),e.prototype.where=function(t,n,r){try{return new e(this.firestore,Lu(this._,function(t,e,n){var r=e,i=ju("where",t);return new Mu(i,r,n)}(t,n,r)))}catch(t){throw gc(t,/(orderBy|where)\(\)/,"Query.$1()")}},e.prototype.orderBy=function(t,n){try{return new e(this.firestore,Lu(this._,function(t,e){void 0===e&&(e="asc");var n=e,r=ju("orderBy",t);return new Fu(r,n)}(t,n)))}catch(t){throw gc(t,/(orderBy|where)\(\)/,"Query.$1()")}},e.prototype.limit=function(t){try{return new e(this.firestore,Lu(this._,function(t){return Ts("limit",t),new Uu("limit",t,"F")}(t)))}catch(t){throw gc(t,"limit()","Query.limit()")}},e.prototype.limitToLast=function(t){try{return new e(this.firestore,Lu(this._,function(t){return Ts("limitToLast",t),new Uu("limitToLast",t,"L")}(t)))}catch(t){throw gc(t,"limitToLast()","Query.limitToLast()")}},e.prototype.startAt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Lu(this._,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Vu("startAt",t,!0)}.apply(void 0,t)))}catch(t){throw gc(t,"startAt()","Query.startAt()")}},e.prototype.startAfter=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Lu(this._,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Vu("startAfter",t,!1)}.apply(void 0,t)))}catch(t){throw gc(t,"startAfter()","Query.startAfter()")}},e.prototype.endBefore=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Lu(this._,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new qu("endBefore",t,!0)}.apply(void 0,t)))}catch(t){throw gc(t,"endBefore()","Query.endBefore()")}},e.prototype.endAt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Lu(this._,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new qu("endAt",t,!1)}.apply(void 0,t)))}catch(t){throw gc(t,"endAt()","Query.endAt()")}},e.prototype.isEqual=function(t){return Ds(this._,t._)},e.prototype.get=function(t){var e=this;
2return("cache"===(null==t?void 0:t.source)?function(t){t=Ss(t,As);var e=Ss(t.firestore,Tu),n=Iu(e),r=new ec(e);return function(t,e){var n=this,r=new er;return t.fs.ys((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(i){switch(i.label){case 0:return n=function(t,e,n){return Object(a.b)(this,void 0,void 0,(function(){var r,i,o,s,u;return Object(a.d)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,to(t,e,!0)];case 1:return u=a.sent(),r=new Ca(e,u.Pc),i=r.dl(u.documents),o=r.Ti(i,!1),n.resolve(o.snapshot),[3,3];case 2:return s=a.sent(),u=pr(s,"Failed to execute query '"+e+" against cache"),n.reject(u),[3,3];case 3:return[2]}}))}))},[4,yu(t)];case 1:return[2,n.apply(void 0,[i.sent(),e,r])]}}))}))})),r.promise}(n,t.C_).then((function(n){return new Xu(e,r,t,n)}))}(this._):"server"===(null==t?void 0:t.source)?function(t){t=Ss(t,As);var e=Ss(t.firestore,Tu),n=Iu(e),r=new ec(e);return Eu(n,t.C_,{source:"server"}).then((function(n){return new Xu(e,r,t,n)}))}(this._):function(t){t=Ss(t,As);var e=Ss(t.firestore,Tu),n=Iu(e),r=new ec(e);return Ru(t.C_),Eu(n,t.C_).then((function(n){return new Xu(e,r,t,n)}))}(this._)).then((function(t){return new Oc(e.firestore,new Xu(e.firestore._,e.Hf,e._,t.ud))}))},e.prototype.onSnapshot=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=yc(e),i=mc(e,(function(e){return new Oc(t.firestore,new Xu(t.firestore._,t.Hf,t._,e.ud))}));return rc(this._,r,i)},e.prototype.withConverter=function(t){return new e(this.firestore,this._.withConverter(t))},e}(T),Ec=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).zf=e,r}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"type",{get:function(){return this._.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doc",{get:function(){return new wc(this.zf,this._.doc)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oldIndex",{get:function(){return this._.oldIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"newIndex",{get:function(){return this._.newIndex},enumerable:!1,configurable:!0}),e}(T),Oc=function(t){function e(e,n){var r=this;return(r=t.call(this,n)||this).zf=e,r}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"query",{get:function(){return new _c(this.zf,this._.query)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this._.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this._.empty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"docs",{get:function(){var t=this;return this._.docs.map((function(e){return new wc(t.zf,e)}))},enumerable:!1,configurable:!0}),e.prototype.docChanges=function(t){var e=this;return this._.docChanges(t).map((function(t){return new Ec(e.zf,t)}))},e.prototype.forEach=function(t,e){var n=this;this._.forEach((function(r){t.call(e,new wc(n.zf,r))}))},e.prototype.isEqual=function(t){return tc(this._,t._)},e}(T),Sc=function(t){function e(e,n){var r=this;return(r=t.call(this,e,n)||this).firestore=e,r._=n,r}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this._.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this._.parent;return t?new vc(this.firestore,t):null},enumerable:!1,configurable:!0}),e.prototype.doc=function(t){try{return new vc(this.firestore,void 0===t?js(this._):js(this._,t))}catch(t){throw gc(t,"doc()","CollectionReference.doc()")}},e.prototype.add=function(t){var e=this;return function(t,e){var n=Ss(t.firestore,Tu),r=js(t),i=Gu(t.v_,e);return ic(n,[zs(Hs(t.firestore),"addDoc",r.S_,i,null!==t.v_,{}).F_(r.S_,Ie.exists(!1))]).then((function(){return r}))}(this._,t).then((function(t){return new vc(e.firestore,t)}))},e.prototype.isEqual=function(t){return Rs(this._,t._)},e.prototype.withConverter=function(t){return new e(this.firestore,this._.withConverter(t))},e}(_c);function Tc(t){return t instanceof T&&(t=t._),Ss(t,Ps)}var Ic=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.call(this,new(gs.bind.apply(gs,Object(a.g)([void 0],e))))||this}return Object(a.c)(e,t),e.documentId=function(){return new e(H.lt().ot())},e.prototype.isEqual=function(t){return t instanceof T&&(t=t._),t instanceof gs&&this._.d_.isEqual(t.d_)},e}(T),Cc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.serverTimestamp=function(){var t=new Gs("serverTimestamp");return t._methodName="FieldValue.serverTimestamp",new e(t)},e.delete=function(){var t=new Ks("deleteField");return t._methodName="FieldValue.delete",new e(t)},e.arrayUnion=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new Qs("arrayUnion",t)}.apply(void 0,t);return r._methodName="FieldValue.arrayUnion",new e(r)},e.arrayRemove=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new $s("arrayRemove",t)}.apply(void 0,t);return r._methodName="FieldValue.arrayRemove",new e(r)},e.increment=function(t){var n=function(t){return new Ys("increment",t)}(t);return n._methodName="FieldValue.increment",new e(n)},e.prototype.isEqual=function(t){return this._.isEqual(t._)},e}(T),kc=function(){function t(){this.Pd={},this.yd=new er,this.gd={taskState:"Running",totalBytes:0,totalDocuments:0,bytesLoaded:0,documentsLoaded:0}}return t.prototype.onProgress=function(t,e,n){this.Pd={next:t,error:e,complete:n}},t.prototype.catch=function(t){return this.yd.promise.catch(t)},t.prototype.then=function(t,e){return this.yd.promise.then(t,e)},t.prototype.Ul=function(t){this.Ql(t),this.Pd.complete&&this.Pd.complete(),this.yd.resolve(t)},t.prototype.Wl=function(t){this.gd.taskState="Error",this.Pd.next&&this.Pd.next(this.gd),this.Pd.error&&this.Pd.error(t),this.yd.reject(t)},t.prototype.Ql=function(t){this.gd=t,this.Pd.next&&this.Pd.next(t)},t}();function Pc(t,e){var n=new kc;return function(t,e,n,r){var i=this,o=function(t,e){return function(t,e){return new vs(t,e)}(function(t,e){if(t instanceof Uint8Array)return ps(t,e);if(t instanceof ArrayBuffer)return ps(new Uint8Array(t),e);if(t instanceof ReadableStream)return t.getReader();throw new Error("Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream")}
2("string"==typeof t?(new TextEncoder).encode(t):t),e)}(n,Ro(e));t.fs.ys((function(){return Object(a.b)(i,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){switch(n.label){case 0:return e=us,[4,bu(t)];case 1:return e.apply(void 0,[n.sent(),o,r]),[2]}}))}))}))}(Iu(t._),t.I_,e,n),n}function Ac(t,e){return function(t,e){var n=this;return t.fs.enqueue((function(){return Object(a.b)(n,void 0,void 0,(function(){var n;return Object(a.d)(this,(function(r){switch(r.label){case 0:return n=function(t,e){var n=v(t);return n.persistence.runTransaction("Get named query","readonly",(function(t){return n.To.Bs(t,e)}))},[4,yu(t)];case 1:return[2,n.apply(void 0,[r.sent(),e])]}}))}))}))}(Iu(t._),e).then((function(e){return e?new _c(t,new As(t._,null,e.query)):null}))}}).call(this,n(44))},function(t,e,n){"use strict";n.d(e,"a",(function(){return b})),n.d(e,"b",(function(){return v})),n.d(e,"c",(function(){return T})),n.d(e,"d",(function(){return d})),n.d(e,"e",(function(){return m})),n.d(e,"f",(function(){return C})),n.d(e,"g",(function(){return k})),n.d(e,"h",(function(){return P})),n.d(e,"i",(function(){return A}));var r=n(16),i=n(2),o=n.n(i),a=(n(31),n(19)),s=n(47),u=n(17),c=n(4),l=n(48),f=n.n(l),h=(n(30),n(13)),p=(n(26),function(t){var e=Object(s.a)();return e.displayName=t,e}("Router-History")),d=function(t){var e=Object(s.a)();return e.displayName=t,e}("Router"),v=function(t){function e(e){var n;return(n=t.call(this,e)||this).state={location:e.history.location},n._isMounted=!1,n._pendingLocation=null,e.staticContext||(n.unlisten=e.history.listen((function(t){n._isMounted?n.setState({location:t}):n._pendingLocation=t}))),n}Object(r.a)(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var n=e.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return o.a.createElement(d.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(p.Provider,{children:this.props.children||null,value:this.props.history}))},e}(o.a.Component);o.a.Component;o.a.Component;var g={},y=0;function m(t,e){void 0===e&&(e={}),("string"===typeof e||Array.isArray(e))&&(e={path:e});var n=e,r=n.path,i=n.exact,o=void 0!==i&&i,a=n.strict,s=void 0!==a&&a,u=n.sensitive,c=void 0!==u&&u;return[].concat(r).reduce((function(e,n){if(!n&&""!==n)return null;if(e)return e;var r=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=g[n]||(g[n]={});if(r[t])return r[t];var i=[],o={regexp:f()(t,i,e),keys:i};return y<1e4&&(r[t]=o,y++),o}(n,{end:o,strict:s,sensitive:c}),i=r.regexp,a=r.keys,u=i.exec(t);if(!u)return null;var l=u[0],h=u.slice(1),p=t===l;return o&&!p?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:p,params:a.reduce((function(t,e,n){return t[e.name]=h[n],t}),{})}}),null)}var b=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.render=function(){var t=this;return o.a.createElement(d.Consumer,null,(function(e){e||Object(u.a)(!1);var n=t.props.location||e.location,r=t.props.computedMatch?t.props.computedMatch:t.props.path?m(n.pathname,t.props):e.match,i=Object(c.a)({},e,{location:n,match:r}),a=t.props,s=a.children,l=a.component,f=a.render;return Array.isArray(s)&&0===s.length&&(s=null),o.a.createElement(d.Provider,{value:i},i.match?s?"function"===typeof s?s(i):s:l?o.a.createElement(l,i):f?f(i):null:"function"===typeof s?s(i):null)}))},e}(o.a.Component);function w(t){return"/"===t.charAt(0)?t:"/"+t}function _(t,e){if(!t)return e;var n=w(t);return 0!==e.pathname.indexOf(n)?e:Object(c.a)({},e,{pathname:e.pathname.substr(n.length)})}function E(t){return"string"===typeof t?t:Object(a.e)(t)}function O(t){return function(){Object(u.a)(!1)}}function S(){}o.a.Component;var T=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.render=function(){var t=this;return o.a.createElement(d.Consumer,null,(function(e){e||Object(u.a)(!1);var n,r,i=t.props.location||e.location;
2return o.a.Children.forEach(t.props.children,(function(t){if(null==r&&o.a.isValidElement(t)){n=t;var a=t.props.path||t.props.from;r=a?m(i.pathname,Object(c.a)({},t.props,{path:a})):e.match}})),r?o.a.cloneElement(n,{location:i,computedMatch:r}):null}))},e}(o.a.Component);var I=o.a.useContext;function C(){return I(p)}function k(){return I(d).location}function P(){var t=I(d).match;return t?t.params:{}}function A(t){var e=k(),n=I(d).match;return t?m(e.pathname,t):n}},function(t,e,n){"use strict";t.exports=n(66)},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return ir})),n.d(e,"b",(function(){return ar})),n.d(e,"c",(function(){return or})),n.d(e,"d",(function(){return sr})),n.d(e,"e",(function(){return ur})),n.d(e,"f",(function(){return cr})),n.d(e,"g",(function(){return nr})),n.d(e,"h",(function(){return rr}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function i(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var o,a="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},s=s||{},u=a||self;function c(){}function l(t){var e=typeof t;return"array"==(e="object"!=e?e:t?Array.isArray(t)?"array":e:"null")||"object"==e&&"number"==typeof t.length}function f(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var h="closure_uid_"+(1e9*Math.random()>>>0),p=0;function d(t,e,n){return t.call.apply(t.bind,arguments)}function v(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function g(t,e,n){return(g=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?d:v).apply(null,arguments)}function y(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}function m(){return Date.now()}function b(t,e){function n(){}n.prototype=e.prototype,t.X=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.Kb=function(t,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return e.prototype[n].apply(t,i)}}function w(){this.j=this.j,this.i=this.i}w.prototype.j=!1,w.prototype.ja=function(){if(!this.j&&(this.j=!0,this.G(),0))(function(t){Object.prototype.hasOwnProperty.call(t,h)&&t[h]||(t[h]=++p)})(this)},w.prototype.G=function(){if(this.i)for(;this.i.length;)this.i.shift()()};var _=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if("string"===typeof t)return"string"!==typeof e||1!=e.length?-1:t.indexOf(e,0);for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},E=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i="string"===typeof t?t.split(""):t,o=0;o<r;o++)o in i&&e.call(n,i[o],o,t)};function O(t){return Array.prototype.concat.apply([],arguments)}function S(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}function T(t){return/^[\s\xa0]*$/.test(t)}var I,C=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]};function k(t,e){return-1!=t.indexOf(e)}function P(t,e){return t<e?-1:t>e?1:0}t:{var A=u.navigator;if(A){var N=A.userAgent;if(N){I=N;break t}}I=""}function x(t,e,n){for(var r in t)e.call(n,t[r],r,t)}function j(t){var e={};for(var n in t)e[n]=t[n];return e}var R="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
2ing toString valueOf".split(" ");function D(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<R.length;o++)n=R[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function L(t){return L[" "](t),t}L[" "]=c;var M,F=k(I,"Opera"),U=k(I,"Trident")||k(I,"MSIE"),V=k(I,"Edge"),q=V||U,B=k(I,"Gecko")&&!(k(I.toLowerCase(),"webkit")&&!k(I,"Edge"))&&!(k(I,"Trident")||k(I,"MSIE"))&&!k(I,"Edge"),H=k(I.toLowerCase(),"webkit")&&!k(I,"Edge");function z(){var t=u.document;return t?t.documentMode:void 0}t:{var K="",W=function(){var t=I;return B?/rv:([^\);]+)(\)|;)/.exec(t):V?/Edge\/([\d\.]+)/.exec(t):U?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):H?/WebKit\/(\S+)/.exec(t):F?/(?:Version)[ \/]?(\S+)/.exec(t):void 0}();if(W&&(K=W?W[1]:""),U){var G=z();if(null!=G&&G>parseFloat(K)){M=String(G);break t}}M=K}var Q,$={};function Y(t){return function(t,e){var n=$;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,(function(){for(var e=0,n=C(String(M)).split("."),r=C(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;e=P(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||P(0==a[2].length,0==s[2].length)||P(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0<=e}))}if(u.document&&U){var J=z();Q=J||(parseInt(M,10)||void 0)}else Q=void 0;var X=Q,Z=!U||9<=Number(X),tt=U&&!Y("9"),et=function(){if(!u.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{u.addEventListener("test",c,e),u.removeEventListener("test",c,e)}catch(n){}return t}();function nt(t,e){this.type=t,this.a=this.target=e,this.defaultPrevented=!1}function rt(t,e){if(nt.call(this,t?t.type:""),this.relatedTarget=this.a=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.c=null,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.a=e,e=t.relatedTarget){if(B){t:{try{L(e.nodeName);var i=!0;break t}catch(o){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"===typeof t.pointerType?t.pointerType:it[t.pointerType]||"",this.c=t,t.defaultPrevented&&this.b()}}nt.prototype.b=function(){this.defaultPrevented=!0},b(rt,nt);var it={2:"touch",3:"pen",4:"mouse"};rt.prototype.b=function(){rt.X.b.call(this);var t=this.c;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,tt)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}};var ot="closure_listenable_"+(1e6*Math.random()|0),at=0;function st(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.ca=i,this.key=++at,this.Y=this.Z=!1}function ut(t){t.Y=!0,t.listener=null,t.proxy=null,t.src=null,t.ca=null}function ct(t){this.src=t,this.a={},this.b=0}function lt(t,e){var n=e.type;if(n in t.a){var r,i=t.a[n],o=_(i,e);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(ut(e),0==t.a[n].length&&(delete t.a[n],t.b--))}}function ft(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.Y&&o.listener==e&&o.capture==!!n&&o.ca==r)return i}return-1}ct.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=ft(t,e,r,i);return-1<a?(e=t[a],n||(e.Z=!1)):((e=new st(e,this.src,o,!!r,i)).Z=n,t.push(e)),e};var ht="closure_lm_"+(1e6*Math.random()|0),pt={};function dt(t,e,n,r,i){if(r&&r.once)return gt(t,e,n,r,i);if(Array.isArray(e)){for(var o=0;o<e.length;o++)dt(t,e[o],n,r,i);return null}return n=St(n),t&&t[ot]?t.va(e,n,f(r)?!!r.capture:!!r,i):vt(t,e,n,!1,r,i)}function vt(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=f(i)?!!i.capture:!!i;if(a&&!Z)return null;var s=Et(t);if(s||(t[ht]=s=new ct(t)),(n=s.add(e,n,r,a,o)).proxy)return n;if(r=function(){var t=_t,e=Z?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)et||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(bt(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}return n}function gt(t,e,n,r,i){if(Array.isArray(e)){for(var o=0;o<e.length;o++)gt(t,e[o],n,r,i);return null}return n=St(n),t&&t[ot]?t.wa(e,n,f(r)?!!r.capture:!!r,i):vt(t,e,n,!0,r,i)}function yt(t,e,n,r,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)yt(t,e[o],n,r,i);else r=f(r)?!!r.capture:!!r,n=St(n),t&&t[ot]?(t=t.c,(e=String(e).toString())in t.a&&(-1<(n=ft(o=t.a[e],n,r,i))&&(ut(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--)))):t&&(t=Et(t))&&(e=t.a[e.toString()],t=-1,e&&(t=ft(e,n,r,i)),(n=-1<t?e[t]:null)&&mt(n))}function mt(t){if("number"!==typeof t&&t&&!t.Y){var e=t.src;if(e&&e[ot])lt(e.c,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(bt(n),r):e.addListener&&e.removeListener&&e.removeListener(r),(n=Et(e))?(lt(n,t),0==n.b&&(n.src=null,e[ht]=null)):ut(t)}}}function bt(t){return t in pt?pt[t]:pt[t]="on"+t}function wt(t,e){var n=t.listener,r=t.ca||t.src;return t.Z&&mt(t),n.call(r,e)}function _t(t,e){if(t.Y)return!0;
2if(!Z){if(!e)t:{e=["window","event"];for(var n=u,r=0;r<e.length;r++)if(null==(n=n[e[r]])){e=null;break t}e=n}return wt(t,e=new rt(e,this))}return wt(t,new rt(e,this))}function Et(t){return(t=t[ht])instanceof ct?t:null}var Ot="__closure_events_fn_"+(1e9*Math.random()>>>0);function St(t){return"function"===typeof t?t:(t[Ot]||(t[Ot]=function(e){return t.handleEvent(e)}),t[Ot])}function Tt(){w.call(this),this.c=new ct(this),this.J=this,this.C=null}function It(t,e){var n,r=t.C;if(r)for(n=[];r;r=r.C)n.push(r);if(t=t.J,r=e.type||e,"string"===typeof e)e=new nt(e,t);else if(e instanceof nt)e.target=e.target||t;else{var i=e;D(e=new nt(r,t),i)}if(i=!0,n)for(var o=n.length-1;0<=o;o--){var a=e.a=n[o];i=Ct(a,r,!0,e)&&i}if(i=Ct(a=e.a=t,r,!0,e)&&i,i=Ct(a,r,!1,e)&&i,n)for(o=0;o<n.length;o++)i=Ct(a=e.a=n[o],r,!1,e)&&i}function Ct(t,e,n,r){if(!(e=t.c.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.Y&&a.capture==n){var s=a.listener,u=a.ca||a.src;a.Z&&lt(t.c,a),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}b(Tt,w),Tt.prototype[ot]=!0,(o=Tt.prototype).addEventListener=function(t,e,n,r){dt(this,t,e,n,r)},o.removeEventListener=function(t,e,n,r){yt(this,t,e,n,r)},o.G=function(){if(Tt.X.G.call(this),this.c){var t,e=this.c;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)ut(n[r]);delete e.a[t],e.b--}}this.C=null},o.va=function(t,e,n,r){return this.c.add(String(t),e,!1,n,r)},o.wa=function(t,e,n,r){return this.c.add(String(t),e,!0,n,r)};var kt=u.JSON.stringify;function Pt(){this.b=this.a=null}var At,Nt=new(function(){function t(t,e){this.c=t,this.f=e,this.b=0,this.a=null}return t.prototype.get=function(){var t;return 0<this.b?(this.b--,t=this.a,this.a=t.next,t.next=null):t=this.c(),t},t}())((function(){return new jt}),(function(t){t.reset()}));function xt(){var t=Mt,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function jt(){this.next=this.b=this.a=null}function Rt(t){u.setTimeout((function(){throw t}),0)}function Dt(t,e){At||function(){var t=u.Promise.resolve(void 0);At=function(){t.then(Ft)}}(),Lt||(At(),Lt=!0),Mt.add(t,e)}Pt.prototype.add=function(t,e){var n=Nt.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},jt.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},jt.prototype.reset=function(){this.next=this.b=this.a=null};var Lt=!1,Mt=new Pt;function Ft(){for(var t;t=xt();){try{t.a.call(t.b)}catch(n){Rt(n)}var e=Nt;e.f(t),100>e.b&&(e.b++,t.next=e.a,e.a=t)}Lt=!1}function Ut(t,e){Tt.call(this),this.b=t||1,this.a=e||u,this.f=g(this.Za,this),this.g=m()}function Vt(t){t.aa=!1,t.M&&(t.a.clearTimeout(t.M),t.M=null)}function qt(t,e,n){if("function"===typeof t)n&&(t=g(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=g(t.handleEvent,t)}return 2147483647<Number(e)?-1:u.setTimeout(t,e||0)}function Bt(t){t.a=qt((function(){t.a=null,t.c&&(t.c=!1,Bt(t))}),t.h);var e=t.b;t.b=null,t.g.apply(null,e)}b(Ut,Tt),(o=Ut.prototype).aa=!1,o.M=null,o.Za=function(){if(this.aa){var t=m()-this.g;0<t&&t<.8*this.b?this.M=this.a.setTimeout(this.f,this.b-t):(this.M&&(this.a.clearTimeout(this.M),this.M=null),It(this,"tick"),this.aa&&(Vt(this),this.start()))}},o.start=function(){this.aa=!0,this.M||(this.M=this.a.setTimeout(this.f,this.b),this.g=m())},o.G=function(){Ut.X.G.call(this),Vt(this),delete this.a};var Ht=function(t){function e(e,n){var r=t.call(this)||this;return r.g=e,r.h=n,r.b=null,r.c=!1,r.a=null,r}return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.f=function(t){this.b=arguments,this.a?this.c=!0:Bt(this)},e.prototype.G=function(){t.prototype.G.call(this),this.a&&(u.clearTimeout(this.a),this.a=null,this.c=!1,this.b=null)},e}(w);function zt(t){w.call(this),this.b=t,this.a={}}
2b(zt,w);var Kt=[];function Wt(t,e,n,r){Array.isArray(n)||(n&&(Kt[0]=n.toString()),n=Kt);for(var i=0;i<n.length;i++){var o=dt(e,n[i],r||t.handleEvent,!1,t.b||t);if(!o)break;t.a[o.key]=o}}function Gt(t){x(t.a,(function(t,e){this.a.hasOwnProperty(e)&&mt(t)}),t),t.a={}}function Qt(){this.a=!0}function $t(t,e,n,r){t.info((function(){return"XMLHTTP TEXT ("+e+"): "+function(t,e){if(!t.a)return e;if(!e)return null;try{var n=JSON.parse(e);if(n)for(t=0;t<n.length;t++)if(Array.isArray(n[t])){var r=n[t];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var o=i[0];if("noop"!=o&&"stop"!=o&&"close"!=o)for(var a=1;a<i.length;a++)i[a]=""}}}return kt(n)}catch(s){return e}}(t,n)+(r?" "+r:"")}))}zt.prototype.G=function(){zt.X.G.call(this),Gt(this)},zt.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Qt.prototype.info=function(){};var Yt={},Jt=null;function Xt(){return Jt=Jt||new Tt}function Zt(t){nt.call(this,Yt.Fa,t)}function te(t){var e=Xt();It(e,new Zt(e,t))}function ee(t,e){nt.call(this,Yt.STAT_EVENT,t),this.stat=e}function ne(t){var e=Xt();It(e,new ee(e,t))}function re(t){nt.call(this,Yt.Ga,t)}function ie(t,e){if("function"!==typeof t)throw Error("Fn must not be null and must be a function");return u.setTimeout((function(){t()}),e)}Yt.Fa="serverreachability",b(Zt,nt),Yt.STAT_EVENT="statevent",b(ee,nt),Yt.Ga="timingevent",b(re,nt);var oe={NO_ERROR:0,$a:1,nb:2,mb:3,hb:4,lb:5,ob:6,Da:7,TIMEOUT:8,rb:9},ae={fb:"complete",Bb:"success",Ea:"error",Da:"abort",tb:"ready",ub:"readystatechange",TIMEOUT:"timeout",pb:"incrementaldata",sb:"progress",ib:"downloadprogress",Jb:"uploadprogress"};function se(){}function ue(t){var e;return(e=t.a)||(e=t.a={}),e}function ce(){}se.prototype.a=null;var le,fe={OPEN:"a",eb:"b",Ea:"c",qb:"d"};function he(){nt.call(this,"d")}function pe(){nt.call(this,"c")}function de(){}function ve(t,e,n,r){this.g=t,this.c=e,this.f=n,this.S=r||1,this.J=new zt(this),this.P=ge,t=q?125:void 0,this.R=new Ut(t),this.B=null,this.b=!1,this.j=this.l=this.i=this.H=this.u=this.T=this.o=null,this.s=[],this.a=null,this.D=0,this.h=this.m=null,this.N=-1,this.A=!1,this.O=0,this.F=null,this.V=this.C=this.U=this.I=!1}b(he,nt),b(pe,nt),b(de,se),le=new de;var ge=45e3,ye={},me={};function be(t,e,n){t.H=1,t.i=qe(De(e)),t.j=n,t.I=!0,we(t,null)}function we(t,e){t.u=m(),Oe(t),t.l=De(t.i);var n=t.l,r=t.S;Array.isArray(r)||(r=[String(r)]),tn(n.b,"t",r),t.D=0,t.a=$n(t.g,t.g.C?e:null),0<t.O&&(t.F=new Ht(g(t.Ca,t,t.a),t.O)),Wt(t.J,t.a,"readystatechange",t.Xa),e=t.B?j(t.B):{},t.j?(t.m||(t.m="POST"),e["Content-Type"]="application/x-www-form-urlencoded",t.a.ba(t.l,t.m,t.j,e)):(t.m="GET",t.a.ba(t.l,t.m,null,e)),te(1),function(t,e,n,r,i,o){t.info((function(){if(t.a)if(o)for(var a="",s=o.split("&"),u=0;u<s.length;u++){var c=s[u].split("=");if(1<c.length){var l=c[0];c=c[1];var f=l.split("_");a=2<=f.length&&"type"==f[1]?a+(l+"=")+c+"&":a+(l+"=redacted&")}}else a=null;else a=o;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+e+"\n"+n+"\n"+a}))}(t.c,t.m,t.l,t.f,t.S,t.j)}function _e(t,e,n){for(var r=!0;!t.A&&t.D<n.length;){var i=Ee(t,n);if(i==me){4==e&&(t.h=4,ne(14),r=!1),$t(t.c,t.f,null,"[Incomplete Response]");break}if(i==ye){t.h=4,ne(15),$t(t.c,t.f,n,"[Invalid Chunk]"),r=!1;break}$t(t.c,t.f,i,null),ke(t,i)}4==e&&0==n.length&&(t.h=1,ne(16),r=!1),t.b=t.b&&r,r?0<n.length&&!t.V&&(t.V=!0,(e=t.g).a==t&&e.U&&!e.F&&(e.c.info("Great, no buffering proxy detected. Bytes received: "+n.length),qn(e),e.F=!0,ne(11))):($t(t.c,t.f,n,"[Invalid Chunked Response]"),Ce(t),Ie(t))}function Ee(t,e){var n=t.D,r=e.indexOf("\n",n);return-1==r?me:(n=Number(e.substring(n,r)),isNaN(n)?ye:(r+=1)+n>e.length?me:(e=e.substr(r,n),t.D=r+n,e))}function Oe(t){t.T=m()+t.P,Se(t,t.P)}function Se(t,e){if(null!=t.o)throw Error("WatchDog timer not null");t.o=ie(g(t.Va,t),e)}function Te(t){t.o&&(u.clearTimeout(t.o),t.o=null)}function Ie(t){0==t.g.v||t.A||zn(t.g,t)}function Ce(t){Te(t);var e=t.F;e&&"function"==typeof e.ja&&e.ja(),t.F=null,Vt(t.R),Gt(t.J),t.a&&(e=t.a,t.a=null,e.abort(),e.ja())}function ke(t,e){try{var n=t.g;if(0!=n.v&&(n.a==t||un(n.b,t)))if(n.I=t.N,!t.C&&un(n.b,t)&&3==n.v){try{var r=n.ka.a.parse(e)}catch(y){r=null}if(Array.isArray(r)&&3==r.length){var i=r;
2if(0==i[0]){t:if(!n.j){if(n.a){if(!(n.a.u+3e3<t.u))break t;Hn(n),xn(n)}Vn(n),ne(18)}}else n.oa=i[1],0<n.oa-n.P&&37500>i[2]&&n.H&&0==n.o&&!n.m&&(n.m=ie(g(n.Sa,n),6e3));if(1>=sn(n.b)&&n.ea){try{n.ea()}catch(y){}n.ea=void 0}}else Wn(n,11)}else if((t.C||n.a==t)&&Hn(n),!T(e))for(e=r=n.ka.a.parse(e),r=0;r<e.length;r++)if(i=e[r],n.P=i[0],i=i[1],2==n.v)if("c"==i[0]){n.J=i[1],n.ga=i[2];var o=i[3];null!=o&&(n.ha=o,n.c.info("VER="+n.ha));var a=i[4];null!=a&&(n.pa=a,n.c.info("SVER="+n.pa));var s=i[5];if(null!=s&&"number"===typeof s&&0<s){var u=1.5*s;n.D=u,n.c.info("backChannelRequestTimeoutMs_="+u)}u=n;var c=t.a;if(c){var l=c.a?c.a.getResponseHeader("X-Client-Wire-Protocol"):null;if(l){var f=u.b;!f.a&&(k(l,"spdy")||k(l,"quic")||k(l,"h2"))&&(f.f=f.g,f.a=new Set,f.b&&(cn(f,f.b),f.b=null))}if(u.A){var h=c.a?c.a.getResponseHeader("X-HTTP-Session-Id"):null;h&&(u.na=h,Ve(u.B,u.A,h))}}n.v=3,n.f&&n.f.ta(),n.U&&(n.N=m()-t.u,n.c.info("Handshake RTT: "+n.N+"ms"));var p=t;if((u=n).la=Qn(u,u.C?u.ga:null,u.fa),p.C){ln(u.b,p);var d=p,v=u.D;v&&d.setTimeout(v),d.o&&(Te(d),Oe(d)),u.a=p}else Un(u);0<n.g.length&&Dn(n)}else"stop"!=i[0]&&"close"!=i[0]||Wn(n,7);else 3==n.v&&("stop"==i[0]||"close"==i[0]?"stop"==i[0]?Wn(n,7):Nn(n):"noop"!=i[0]&&n.f&&n.f.sa(i),n.o=0);te(4)}catch(y){}}function Pe(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(l(t)||"string"===typeof t)E(t,e,void 0);else{if(t.L&&"function"==typeof t.L)var n=t.L();else if(t.K&&"function"==typeof t.K)n=void 0;else if(l(t)||"string"===typeof t){n=[];for(var r=t.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,t)n[r++]=i;i=(r=function(t){if(t.K&&"function"==typeof t.K)return t.K();if("string"===typeof t)return t.split("");if(l(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}(t)).length;for(var o=0;o<i;o++)e.call(void 0,r[o],n&&n[o],t)}}function Ae(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof Ae)for(n=t.L(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function Ne(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];xe(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)xe(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function xe(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(o=ve.prototype).setTimeout=function(t){this.P=t},o.Xa=function(t){t=t.target;var e=this.F;e&&3==Cn(t)?e.f():this.Ca(t)},o.Ca=function(t){try{if(t==this.a)t:{var e=Cn(this.a),n=this.a.ua(),r=this.a.W();if(!(3>e||3==e&&!q&&!this.a.$())){this.A||4!=e||7==n||te(8==n||0>=r?3:2),Te(this);var i=this.a.W();this.N=i;var o=this.a.$();if(this.b=200==i,function(t,e,n,r,i,o,a){t.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+e+"\n"+n+"\n"+o+" "+a}))}(this.c,this.m,this.l,this.f,this.S,e,i),this.b){if(this.U&&!this.C){e:{if(this.a){var a,s=this.a;if((a=s.a?s.a.getResponseHeader("X-HTTP-Initial-Response"):null)&&!T(a)){var u=a;break e}}u=null}if(!u){this.b=!1,this.h=3,ne(12),Ce(this),Ie(this);break t}$t(this.c,this.f,u,"Initial handshake response via X-HTTP-Initial-Response"),this.C=!0,ke(this,u)}this.I?(_e(this,e,o),q&&this.b&&3==e&&(Wt(this.J,this.R,"tick",this.Wa),this.R.start())):($t(this.c,this.f,o,null),ke(this,o)),4==e&&Ce(this),this.b&&!this.A&&(4==e?zn(this.g,this):(this.b=!1,Oe(this)))}else 400==i&&0<o.indexOf("Unknown SID")?(this.h=3,ne(12)):(this.h=0,ne(13)),Ce(this),Ie(this)}}}catch(c){}},o.Wa=function(){if(this.a){var t=Cn(this.a),e=this.a.$();this.D<e.length&&(Te(this),_e(this,t,e),this.b&&4!=t&&Oe(this))}},o.cancel=function(){this.A=!0,Ce(this)},o.Va=function(){this.o=null;var t=m();0<=t-this.T?(function(t,e){t.info((function(){return"TIMEOUT: "+e}))}(this.c,this.l),2!=this.H&&(te(3),ne(17)),Ce(this),this.h=2,Ie(this)):Se(this,this.T-t)},(o=Ae.prototype).K=function(){Ne(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},o.L=function(){return Ne(this),this.a.concat()},o.get=function(t,e){return xe(this.b,t)?this.b[t]:e},o.set=function(t,e){xe(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},o.forEach=function(t,e){for(var n=this.L(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var je=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Re(t,e){if(this.c=this.j=this.f="",this.h=null,this.i=this.g="",this.a=!1,t instanceof Re){this.a=void 0!==e?e:t.a,Le(this,t.f),this.j=t.j,Me(this,t.c),Fe(this,t.h),this.g=t.g,e=t.b;var n=new Ye;n.c=e.c,e.a&&(n.a=new Ae(e.a),n.b=e.b),Ue(this,n),this.i=t.i}else t&&(n=String(t).match(je))?(this.a=!!e,Le(this,n[1]||"",!0),this.j=Be(n[2]||""),Me(this,n[3]||"",!0),Fe(this,n[4]),this.g=Be(n[5]||"",!0),Ue(this,n[6]||"",!0),this.i=Be(n[7]||"")):(this.a=!!e,this.b=new Ye(null,this.a))}function De(t){return new Re(t)}
vendor: 2,027 bytes, line 2
2function Le(t,e,n){t.f=n?Be(e,!0):e,t.f&&(t.f=t.f.replace(/:$/,""))}function Me(t,e,n){t.c=n?Be(e,!0):e}function Fe(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.h=e}else t.h=null}function Ue(t,e,n){e instanceof Ye?(t.b=e,function(t,e){e&&!t.f&&(Je(t),t.c=null,t.a.forEach((function(t,e){var n=e.toLowerCase();e!=n&&(Xe(this,e),tn(this,n,t))}),t)),t.f=e}(t.b,t.a)):(n||(e=He(e,Qe)),t.b=new Ye(e,t.a))}function Ve(t,e,n){t.b.set(e,n)}function qe(t){return Ve(t,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^m()).toString(36)),t}function Be(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function He(t,e,n){return"string"===typeof t?(t=encodeURI(t).replace(e,ze),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function ze(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Re.prototype.toString=function(){var t=[],e=this.f;e&&t.push(He(e,Ke,!0),":");var n=this.c;return(n||"file"==e)&&(t.push("//"),(e=this.j)&&t.push(He(e,Ke,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.h)&&t.push(":",String(n))),(n=this.g)&&(this.c&&"/"!=n.charAt(0)&&t.push("/"),t.push(He(n,"/"==n.charAt(0)?Ge:We,!0))),(n=this.b.toString())&&t.push("?",n),(n=this.i)&&t.push("#",He(n,$e)),t.join("")};var Ke=/[#\/\?@]/g,We=/[#\?:]/g,Ge=/[#\?]/g,Qe=/[#\?@]/g,$e=/#/g;function Ye(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function Je(t){t.a||(t.a=new Ae,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,(function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)})))}function Xe(t,e){Je(t),e=en(t,e),xe(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,xe((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&Ne(t)))}function Ze(t,e){return Je(t),e=en(t,e),xe(t.a.b,e)}
2function tn(t,e,n){Xe(t,e),0<n.length&&(t.c=null,t.a.set(en(t,e),S(n)),t.b+=n.length)}function en(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}(o=Ye.prototype).add=function(t,e){Je(this),this.c=null,t=en(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},o.forEach=function(t,e){Je(this),this.a.forEach((function(n,r){E(n,(function(n){t.call(e,n,r,this)}),this)}),this)},o.L=function(){Je(this);for(var t=this.a.K(),e=this.a.L(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},o.K=function(t){Je(this);var e=[];if("string"===typeof t)Ze(this,t)&&(e=O(e,this.a.get(en(this,t))));else{t=this.a.K();for(var n=0;n<t.length;n++)e=O(e,t[n])}return e},o.set=function(t,e){return Je(this),this.c=null,Ze(this,t=en(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},o.get=function(t,e){return t&&0<(t=this.K(t)).length?String(t[0]):e},o.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.L(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.K(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&")};var nn=function(t,e){this.b=t,this.a=e};function rn(t){this.g=t||on,u.PerformanceNavigationTiming?t=0<(t=u.performance.getEntriesByType("navigation")).length&&("hq"==t[0].nextHopProtocol||"h2"==t[0].nextHopProtocol):t=!!(u.ia&&u.ia.ya&&u.ia.ya()&&u.ia.ya().Lb),this.f=t?this.g:1,this.a=null,1<this.f&&(this.a=new Set),this.b=null,this.c=[]}var on=10;function an(t){return!!t.b||!!t.a&&t.a.size>=t.f}function sn(t){return t.b?1:t.a?t.a.size:0}function un(t,e){return t.b?t.b==e:!!t.a&&t.a.has(e)}function cn(t,e){t.a?t.a.add(e):t.b=e}function ln(t,e){t.b&&t.b==e?t.b=null:t.a&&t.a.has(e)&&t.a.delete(e)}function fn(t){var e,n;if(null!=t.b)return t.c.concat(t.b.s);if(null!=t.a&&0!==t.a.size){var r=t.c;try{for(var o=i(t.a.values()),a=o.next();!a.done;a=o.next()){var s=a.value;r=r.concat(s.s)}}catch(u){e={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}return S(t.c)}function hn(){}function pn(){this.a=new hn}function dn(t,e,n){var r=n||"";try{Pe(t,(function(t,n){var i=t;f(t)&&(i=kt(t)),e.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw e.push(r+"type="+encodeURIComponent("_badmap")),i}}function vn(t,e,n,r,i){try{e.onload=null,e.onerror=null,e.onabort=null,e.ontimeout=null,i(r)}catch(o){}}rn.prototype.cancel=function(){var t,e;if(this.c=fn(this),this.b)this.b.cancel(),this.b=null;else if(this.a&&0!==this.a.size){try{for(var n=i(this.a.values()),r=n.next();!r.done;r=n.next()){r.value.cancel()}}catch(o){t={error:o}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}this.a.clear()}},hn.prototype.stringify=function(t){return u.JSON.stringify(t,void 0)},hn.prototype.parse=function(t){return u.JSON.parse(t,void 0)};var gn=u.JSON.parse;function yn(t){Tt.call(this),this.headers=new Ae,this.H=t||null,this.b=!1,this.s=this.a=null,this.B="",this.h=0,this.f="",this.g=this.A=this.l=this.u=!1,this.o=0,this.m=null,this.I=mn,this.D=this.F=!1}b(yn,Tt);var mn="",bn=/^https?$/i,wn=["POST","PUT"];function _n(t){return"content-type"==t.toLowerCase()}function En(t,e){t.b=!1,t.a&&(t.g=!0,t.a.abort(),t.g=!1),t.f=e,t.h=5,On(t),Tn(t)}function On(t){t.u||(t.u=!0,It(t,"complete"),It(t,"error"))}function Sn(t){if(t.b&&"undefined"!=typeof s&&(!t.s[1]||4!=Cn(t)||2!=t.W()))if(t.l&&4==Cn(t))qt(t.za,0,t);else if(It(t,"readystatechange"),4==Cn(t)){t.b=!1;try{var e,n=t.W();t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break t;default:r=!1}if(!(e=r)){var i;if(i=0===n){var o=String(t.B).match(je)[1]||null;if(!o&&u.self&&u.self.location){var a=u.self.location.protocol;o=a.substr(0,a.length-1)}i=!bn.test(o?o.toLowerCase():"")}e=i}if(e)It(t,"complete"),It(t,"success");else{t.h=6;try{var c=2<Cn(t)?t.a.statusText:""}catch(n){c=""}t.f=c+" ["+t.W()+"]",On(t)}}finally{Tn(t)}}}function Tn(t,e){if(t.a){In(t);var n=t.a,r=t.s[0]?c:null;t.a=null,t.s=null,e||It(t,"ready");try{n.onreadystatechange=r}catch(i){}}}function In(t){t.a&&t.D&&(t.a.ontimeout=null),t.m&&(u.clearTimeout(t.m),t.m=null)}function Cn(t){return t.a?t.a.readyState:0}function kn(t,e,n){t:{for(r in n){var r=!1;break t}r=!0}r||(n=function(t){var e="";return x(t,(function(t,n){e+=n,e+=":",e+=t,e+="\r\n"})),e}(n),"string"===typeof t?null!=n&&encodeURIComponent(String(n)):Ve(t,e,n))}
2function Pn(t,e,n){return n&&n.internalChannelParams&&n.internalChannelParams[t]||e}function An(t){this.pa=0,this.g=[],this.c=new Qt,this.ga=this.la=this.B=this.fa=this.a=this.na=this.A=this.V=this.i=this.O=this.l=null,this.Oa=this.R=0,this.La=Pn("failFast",!1,t),this.H=this.m=this.j=this.h=this.f=null,this.S=!0,this.I=this.oa=this.P=-1,this.T=this.o=this.u=0,this.Ha=Pn("baseRetryDelayMs",5e3,t),this.Ra=Pn("retryDelaySeedMs",1e4,t),this.Ma=Pn("forwardChannelMaxRetries",2,t),this.ma=Pn("forwardChannelRequestTimeoutMs",2e4,t),this.Na=t&&t.g||void 0,this.D=void 0,this.C=t&&t.supportsCrossDomainXhr||!1,this.J="",this.b=new rn(t&&t.concurrentRequestLimit),this.ka=new pn,this.da=t&&t.fastHandshake||!1,this.Ia=t&&t.b||!1,t&&t.f&&(this.c.a=!1),t&&t.forceLongPolling&&(this.S=!1),this.U=!this.da&&this.S&&t&&t.detectBufferingProxy||!1,this.ea=void 0,this.N=0,this.F=!1,this.s=null,(this.Ka=t&&t.c||!1)&&this.c.info("Opt-in to enable Chrome Origin Trials.")}function Nn(t){if(jn(t),3==t.v){var e=t.R++,n=De(t.B);Ve(n,"SID",t.J),Ve(n,"RID",e),Ve(n,"TYPE","terminate"),Mn(t,n),(e=new ve(t,t.c,e,void 0)).H=2,e.i=qe(De(n)),n=!1,u.navigator&&u.navigator.sendBeacon&&(n=u.navigator.sendBeacon(e.i.toString(),"")),!n&&u.Image&&((new Image).src=e.i,n=!0),n||(e.a=$n(e.g,null),e.a.ba(e.i)),e.u=m(),Oe(e)}Gn(t)}function xn(t){t.a&&(qn(t),t.a.cancel(),t.a=null)}function jn(t){xn(t),t.j&&(u.clearTimeout(t.j),t.j=null),Hn(t),t.b.cancel(),t.h&&("number"===typeof t.h&&u.clearTimeout(t.h),t.h=null)}function Rn(t,e){t.g.push(new nn(t.Oa++,e)),3==t.v&&Dn(t)}function Dn(t){an(t.b)||t.h||(t.h=!0,Dt(t.Ba,t),t.u=0)}function Ln(t,e){var n;n=e?e.f:t.R++;var r=De(t.B);Ve(r,"SID",t.J),Ve(r,"RID",n),Ve(r,"AID",t.P),Mn(t,r),t.i&&t.l&&kn(r,t.i,t.l),n=new ve(t,t.c,n,t.u+1),null===t.i&&(n.B=t.l),e&&(t.g=e.s.concat(t.g)),e=Fn(t,n,1e3),n.setTimeout(Math.round(.5*t.ma)+Math.round(.5*t.ma*Math.random())),cn(t.b,n),be(n,r,e)}function Mn(t,e){t.f&&Pe({},(function(t,n){Ve(e,n,t)}))}function Fn(t,e,n){n=Math.min(t.g.length,n);var r=t.f?g(t.f.Ja,t.f,t):null;t:for(var i=t.g,o=-1;;){var a=["count="+n];-1==o?0<n?(o=i[0].b,a.push("ofs="+o)):o=0:a.push("ofs="+o);for(var s=!0,u=0;u<n;u++){var c=i[u].b,l=i[u].a;if(0>(c-=o))o=Math.max(0,i[u].b-100),s=!1;else try{dn(l,a,"req"+c+"_")}catch(f){r&&r(l)}}if(s){r=a.join("&");break t}}return t=t.g.splice(0,n),e.s=t,r}function Un(t){t.a||t.j||(t.T=1,Dt(t.Aa,t),t.o=0)}function Vn(t){return!(t.a||t.j||3<=t.o)&&(t.T++,t.j=ie(g(t.Aa,t),Kn(t,t.o)),t.o++,!0)}function qn(t){null!=t.s&&(u.clearTimeout(t.s),t.s=null)}function Bn(t){t.a=new ve(t,t.c,"rpc",t.T),null===t.i&&(t.a.B=t.l),t.a.O=0;var e=De(t.la);Ve(e,"RID","rpc"),Ve(e,"SID",t.J),Ve(e,"CI",t.H?"0":"1"),Ve(e,"AID",t.P),Mn(t,e),Ve(e,"TYPE","xmlhttp"),t.i&&t.l&&kn(e,t.i,t.l),t.D&&t.a.setTimeout(t.D);var n=t.a;t=t.ga,n.H=1,n.i=qe(De(e)),n.j=null,n.I=!0,we(n,t)}function Hn(t){null!=t.m&&(u.clearTimeout(t.m),t.m=null)}function zn(t,e){var n=null;if(t.a==e){Hn(t),qn(t),t.a=null;var r=2}else{if(!un(t.b,e))return;n=e.s,ln(t.b,e),r=1}if(t.I=e.N,0!=t.v)if(e.b)if(1==r){n=e.j?e.j.length:0,e=m()-e.u;var i=t.u;It(r=Xt(),new re(r,n,e,i)),Dn(t)}else Un(t);else if(3==(i=e.h)||0==i&&0<t.I||!(1==r&&function(t,e){return!(sn(t.b)>=t.b.f-(t.h?1:0))&&(t.h?(t.g=e.s.concat(t.g),!0):!(1==t.v||2==t.v||t.u>=(t.La?0:t.Ma))&&(t.h=ie(g(t.Ba,t,e),Kn(t,t.u)),t.u++,!0))}(t,e)||2==r&&Vn(t)))switch(n&&0<n.length&&(e=t.b,e.c=e.c.concat(n)),i){case 1:Wn(t,5);break;case 4:Wn(t,10);break;case 3:Wn(t,6);break;default:Wn(t,2)}}function Kn(t,e){var n=t.Ha+Math.floor(Math.random()*t.Ra);return t.f||(n*=2),n*e}function Wn(t,e){if(t.c.info("Error code "+e),2==e){var n=null;t.f&&(n=null);var r=g(t.Ya,t);n||(n=new Re("//www.google.com/images/cleardot.gif"),u.location&&"http"==u.location.protocol||Le(n,"https"),qe(n)),function(t,e){var n=new Qt;if(u.Image){var r=new Image;r.onload=y(vn,n,r,"TestLoadImage: loaded",!0,e),r.onerror=y(vn,n,r,"TestLoadImage: error",!1,e),r.onabort=y(vn,n,r,"TestLoadImage: abort",!1,e),r.ontimeout=y(vn,n,r,"TestLoadImage: timeout",!1,e),u.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=t}else e(!1)}(n.toString(),r)}else ne(2);t.v=0,t.f&&t.f.ra(e),Gn(t),jn(t)}function Gn(t){t.v=0,t.I=-1,t.f&&(0==fn(t.b).length&&0==t.g.length||(t.b.c.length=0,S(t.g),t.g.length=0),t.f.qa())}function Qn(t,e,n){var r=function(t){return t instanceof Re?De(t):new Re(t,void 0)}(n);if(""!=r.c)e&&Me(r,e+"."+r.c),Fe(r,r.h);else{var i=u.location;r=function(t,e,n,r){var i=new Re(null,void 0);return t&&Le(i,t),e&&Me(i,e),n&&Fe(i,n),r&&(i.g=r),i}(i.protocol,e?e+"."+i.hostname:i.hostname,+i.port,n)}return t.V&&x(t.V,(function(t,e){Ve(r,e,t)})),e=t.A,n=t.na,e&&n&&Ve(r,e,n),Ve(r,"VER",t.ha),Mn(t,r),r}function $n(t,e){if(e&&!t.C)throw Error("Can't create secondary domain capable XhrIo object.");return(e=new yn(t.Na)).F=t.C,e}function Yn(){}function Jn(){if(U&&!(10<=Number(X)))throw Error("Environmental error: no available transport.")}function Xn(t,e){Tt.call(this),this.a=new An(e),this.o=t,this.b=e&&e.messageUrlParams||null,t=e&&e.messageHeaders||null,e&&e.clientProtocolHeaderRequired&&(t?t["X-Client-Protocol"]="webchannel":t={"X-Client-Protocol":"webchannel"}),this.a.l=t,t=e&&e.initMessageHeaders||null,e&&e.messageContentType&&(t?t["X-WebChannel-Content-Type"]=e.messageContentType:t={"X-WebChannel-Content-Type":e.messageContentType}),e&&e.a&&(t?t["X-WebChannel-Client-Profile"]=e.a:t={"X-WebChannel-Client-Profile":e.a}),this.a.O=t,(t=e&&e.httpHeadersOverwriteParam)&&!T(t)&&(this.a.i=t),this.m=e&&e.supportsCrossDomainXhr||!1,this.l=e&&e.sendRawJson||!1,(e=e&&e.httpSessionIdParam)&&!T(e)&&(this.a.A=e,null!==(t=this.b)&&e in t&&(e in(t=this.b)&&delete t[e])),this.f=new er(this)}function Zn(t){he.call(this);var e=t.__sm__;if(e){t:{for(var n in e){t=n;break t}t=void 0}(this.c=t)?(t=this.c,this.data=null!==e&&t in e?e[t]:void 0):this.data=e}else this.data=t}function tr(){pe.call(this),this.status=1}function er(t){this.a=t}(o=yn.prototype).ba=function(t,e,n,r){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.B+"; newUri="+t);e=e?e.toUpperCase():"GET",this.B=t,this.f="",this.h=0,this.u=!1,this.b=!0,this.a=new XMLHttpRequest,this.s=this.H?ue(this.H):ue(le),this.a.onreadystatechange=g(this.za,this);try{this.A=!0,this.a.open(e,String(t),!0),this.A=!1}catch(o){return void En(this,o)}t=n||"";var i=new Ae(this.headers);r&&Pe(r,(function(t,e){i.set(e,t)})),r=function(t){t:{for(var e=_n,n=t.length,r="string"===typeof t?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0>e?null:"string"===typeof t?t.charAt(e):t[e]}(i.L()),n=u.FormData&&t instanceof u.FormData,!(0<=_(wn,e))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;
2charset=utf-8"),i.forEach((function(t,e){this.a.setRequestHeader(e,t)}),this),this.I&&(this.a.responseType=this.I),"withCredentials"in this.a&&this.a.withCredentials!==this.F&&(this.a.withCredentials=this.F);try{In(this),0<this.o&&((this.D=function(t){return U&&Y(9)&&"number"===typeof t.timeout&&void 0!==t.ontimeout}(this.a))?(this.a.timeout=this.o,this.a.ontimeout=g(this.xa,this)):this.m=qt(this.xa,this.o,this)),this.l=!0,this.a.send(t),this.l=!1}catch(o){En(this,o)}},o.xa=function(){"undefined"!=typeof s&&this.a&&(this.f="Timed out after "+this.o+"ms, aborting",this.h=8,It(this,"timeout"),this.abort(8))},o.abort=function(t){this.a&&this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.h=t||7,It(this,"complete"),It(this,"abort"),Tn(this))},o.G=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),Tn(this,!0)),yn.X.G.call(this)},o.za=function(){this.j||(this.A||this.l||this.g?Sn(this):this.Ua())},o.Ua=function(){Sn(this)},o.W=function(){try{return 2<Cn(this)?this.a.status:-1}catch(t){return-1}},o.$=function(){try{return this.a?this.a.responseText:""}catch(t){return""}},o.Pa=function(t){if(this.a){var e=this.a.responseText;return t&&0==e.indexOf(t)&&(e=e.substring(t.length)),gn(e)}},o.ua=function(){return this.h},o.Qa=function(){return"string"===typeof this.f?this.f:String(this.f)},(o=An.prototype).ha=8,o.v=1,o.Ba=function(t){if(this.h)if(this.h=null,1==this.v){if(!t){this.R=Math.floor(1e5*Math.random()),t=this.R++;var e,n=new ve(this,this.c,t,void 0),r=this.l;if(this.O&&(r?D(r=j(r),this.O):r=this.O),null===this.i&&(n.B=r),this.da)t:{for(var i=e=0;i<this.g.length;i++){var o=this.g[i];if(void 0===(o="__data__"in o.a&&"string"===typeof(o=o.a.__data__)?o.length:void 0))break;if(4096<(e+=o)){e=i;break t}if(4096===e||i===this.g.length-1){e=i+1;break t}}e=1e3}else e=1e3;e=Fn(this,n,e),Ve(i=De(this.B),"RID",t),Ve(i,"CVER",22),this.A&&Ve(i,"X-HTTP-Session-Id",this.A),Mn(this,i),this.i&&r&&kn(i,this.i,r),cn(this.b,n),this.Ia&&Ve(i,"TYPE","init"),this.da?(Ve(i,"$req",e),Ve(i,"SID","null"),n.U=!0,be(n,i,null)):be(n,i,e),this.v=2}}else 3==this.v&&(t?Ln(this,t):0==this.g.length||an(this.b)||Ln(this))},o.Aa=function(){if(this.j=null,Bn(this),this.U&&!(this.F||null==this.a||0>=this.N)){var t=2*this.N;this.c.info("BP detection timer enabled: "+t),this.s=ie(g(this.Ta,this),t)}},o.Ta=function(){this.s&&(this.s=null,this.c.info("BP detection timeout reached."),this.c.info("Buffering proxy detected and switch to long-polling!"),this.H=!1,this.F=!0,ne(10),xn(this),Bn(this))},o.Sa=function(){null!=this.m&&(this.m=null,xn(this),Vn(this),ne(19))},o.Ya=function(t){t?(this.c.info("Successfully pinged google.com"),ne(2)):(this.c.info("Failed to ping google.com"),ne(1))},(o=Yn.prototype).ta=function(){},o.sa=function(){},o.ra=function(){},o.qa=function(){},o.Ja=function(){},Jn.prototype.a=function(t,e){return new Xn(t,e)},b(Xn,Tt),Xn.prototype.g=function(){this.a.f=this.f,this.m&&(this.a.C=!0);var t=this.a,e=this.o,n=this.b||void 0;ne(0),t.fa=e,t.V=n||{},t.H=t.S,t.B=Qn(t,null,t.fa),Dn(t)},Xn.prototype.close=function(){Nn(this.a)},Xn.prototype.h=function(t){if("string"===typeof t){var e={};e.__data__=t,Rn(this.a,e)}else this.l?((e={}).__data__=kt(t),Rn(this.a,e)):Rn(this.a,t)},Xn.prototype.G=function(){this.a.f=null,delete this.f,Nn(this.a),delete this.a,Xn.X.G.call(this)},b(Zn,he),b(tr,pe),b(er,Yn),er.prototype.ta=function(){It(this.a,"a")},er.prototype.sa=function(t){It(this.a,new Zn(t))},er.prototype.ra=function(t){It(this.a,new tr(t))},er.prototype.qa=function(){It(this.a,"b")},Jn.prototype.createWebChannel=Jn.prototype.a,Xn.prototype.send=Xn.prototype.h,Xn.prototype.open=Xn.prototype.g,Xn.prototype.close=Xn.prototype.close,oe.NO_ERROR=0,oe.TIMEOUT=8,oe.HTTP_ERROR=6,ae.COMPLETE="complete",ce.EventType=fe,fe.OPEN="a",fe.CLOSE="b",fe.ERROR="c",fe.MESSAGE="d",Tt.prototype.listen=Tt.prototype.va,yn.prototype.listenOnce=yn.prototype.wa,yn.prototype.getLastError=yn.prototype.Qa,yn.prototype.getLastErrorCode=yn.prototype.ua,yn.prototype.getStatus=yn.prototype.W,yn.prototype.getResponseJson=yn.prototype.Pa,yn.prototype.getResponseText=yn.prototype.$,yn.prototype.send=yn.prototype.ba;var nr=function(){return new Jn},rr=function(){return Xt()},ir=oe,or=ae,ar=Yt,sr={gb:0,jb:1,kb:2,Db:3,Ib:4,Fb:5,Gb:6,Eb:7,Cb:8,Hb:9,PROXY:10,NOPROXY:11,Ab:12,wb:13,xb:14,vb:15,yb:16,zb:17,bb:18,ab:19,cb:20},ur=ce,cr=yn}).call(this,n(34))},function(t,e,n){"use strict";function r(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function i(t){return!!t&&!!t[G]}function o(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return!e||e===Object.prototype}(t)||Array.isArray(t)||!!t[W]||!!t.constructor[W]||h(t)||p(t))}function a(t,e,n){void 0===n&&(n=!1),0===s(t)?(n?Object.keys:Q)(t).forEach((function(r){n&&"symbol"==typeof r||e(r,t[r],t)})):t.forEach((function(n,r){return e(r,n,t)}))}function s(t){var e=t[G];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:h(t)?2:p(t)?3:0}function u(t,e){return 2===s(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function c(t,e){return 2===s(t)?t.get(e):t[e]}function l(t,e,n){var r=s(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n}function f(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function h(t){return B&&t instanceof Map}function p(t){return H&&t instanceof Set}function d(t){return t.o||t.t}function v(t){if(Array.isArray(t))return Array.prototype.slice.call(t);
vendor: 5,237 bytes, line 2
2var e=$(t);delete e[G];for(var n=Q(e),r=0;r<n.length;r++){var i=n[r],o=e[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function g(t,e){return void 0===e&&(e=!1),m(t)||i(t)||!o(t)||(s(t)>1&&(t.set=t.add=t.clear=t.delete=y),Object.freeze(t),e&&a(t,(function(t,e){return g(e,!0)}),!0)),t}function y(){r(2)}function m(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function b(t){var e=Y[t];return e||r(18,t),e}function w(t,e){Y[t]||(Y[t]=e)}function _(){return V}function E(t,e){e&&(b("Patches"),t.u=[],t.s=[],t.v=e)}function O(t){S(t),t.p.forEach(I),t.p=null}function S(t){t===V&&(V=t.l)}function T(t){return V={p:[],l:V,h:t,m:!0,_:0}}function I(t){var e=t[G];0===e.i||1===e.i?e.j():e.g=!0}function C(t,e){e._=e.p.length;var n=e.p[0],i=void 0!==t&&t!==n;return e.h.O||b("ES5").S(e,t,i),i?(n[G].P&&(O(e),r(4)),o(t)&&(t=k(e,t),e.l||A(e,t)),e.u&&b("Patches").M(n[G],t,e.u,e.s)):t=k(e,n,[]),O(e),e.u&&e.v(e.u,e.s),t!==K?t:void 0}function k(t,e,n){if(m(e))return e;var r=e[G];if(!r)return a(e,(function(i,o){return P(t,r,e,i,o,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return A(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=v(r.k):r.o;a(3===r.i?new Set(i):i,(function(e,o){return P(t,r,i,e,o,n)})),A(t,i,!1),n&&t.u&&b("Patches").R(r,n,t.u,t.s)}return r.o}function P(t,e,n,r,a,s){if(i(a)){var c=k(t,a,s&&e&&3!==e.i&&!u(e.D,r)?s.concat(r):void 0);if(l(n,r,c),!i(c))return;t.m=!1}if(o(a)&&!m(a)){if(!t.h.N&&t._<1)return;k(t,a),e&&e.A.l||A(t,a)}}function A(t,e,n){void 0===n&&(n=!1),t.h.N&&t.m&&g(e,n)}function N(t,e){var n=t[G];return(n?d(n):t)[e]}function x(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function j(t){t.P||(t.P=!0,t.l&&j(t.l))}function R(t){t.o||(t.o=v(t.t))}function D(t,e,n){var r=h(e)?b("MapSet").T(e,n):p(e)?b("MapSet").F(e,n):t.O?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:_(),P:!1,I:!1,D:{},l:e,t:t,k:null,o:null,j:null,C:!1},i=r,o=J;n&&(i=[r],o=X);var a=Proxy.revocable(i,o),s=a.revoke,u=a.proxy;return r.k=u,r.j=s,u}(e,n):b("ES5").J(e,n);return(n?n.A:_()).p.push(r),r}function L(t){return i(t)||r(22,t),function t(e){if(!o(e))return e;var n,r=e[G],i=s(e);if(r){if(!r.P&&(r.i<4||!b("ES5").K(r)))return r.t;r.I=!0,n=M(e,i),r.I=!1}else n=M(e,i);return a(n,(function(e,i){r&&c(r.t,e)===i||l(n,e,t(i))})),3===i?new Set(n):n}(t)}function M(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return v(t)}function F(){function t(t,e){var n=o[t];return n?n.enumerable=e:o[t]=n={configurable:!0,enumerable:e,get:function(){var e=this[G];return J.get(e,t)},set:function(e){var n=this[G];J.set(n,t,e)}},n}function e(t){for(var e=t.length-1;e>=0;e--){var i=t[e][G];if(!i.P)switch(i.i){case 5:r(i)&&j(i);break;case 4:n(i)&&j(i)}}}function n(t){for(var e=t.t,n=t.k,r=Q(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==G){var a=e[o];if(void 0===a&&!u(e,o))return!0;var s=n[o],c=s&&s[G];if(c?c.t!==a:!f(s,a))return!0}}var l=!!e[G];return r.length!==Q(e).length+(l?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return!0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);return!(!n||n.get)}var o={};w("ES5",{J:function(e,n){var r=Array.isArray(e),i=function(e,n){if(e){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,t(i,!0));return r}var o=$(n);delete o[G];for(var a=Q(o),s=0;s<a.length;s++){var u=a[s];o[u]=t(u,e||!!o[u].enumerable)}return Object.create(Object.getPrototypeOf(n),o)}(r,e),o={i:r?5:4,A:n?n.A:_(),P:!1,I:!1,D:{},l:n,t:e,k:i,o:null,g:!1,C:!1};return Object.defineProperty(i,G,{value:o,writable:!0}),i},S:function(t,n,o){o?i(n)&&n[G].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var n=e[G];if(n){var i=n.t,o=n.k,s=n.D,c=n.i;if(4===c)a(o,(function(e){e!==G&&(void 0!==i[e]||u(i,e)?s[e]||t(o[e]):(s[e]=!0,j(n)))})),a(i,(function(t){void 0!==o[t]||u(o,t)||(s[t]=!1,j(n))}));else if(5===c){if(r(n)&&(j(n),s.length=!0),o.length<i.length)for(var l=o.length;l<i.length;l++)s[l]=!1;else for(var f=i.length;f<o.length;f++)s[f]=!0;for(var h=Math.min(o.length,i.length),p=0;p<h;p++)void 0===s[p]&&t(o[p])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?n(t):r(t)}})}n.d(e,"a",(function(){return gt})),n.d(e,"b",(function(){return Ot})),n.d(e,"c",(function(){return bt}));var U,V,q="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),B="undefined"!=typeof Map,H="undefined"!=typeof Set,z="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,K=q?Symbol.for("immer-nothing"):((U={})["immer-nothing"]=!0,U),W=q?Symbol.for("immer-draftable"):"__$immer_draftable",G=q?Symbol.for("immer-state"):"__$immer_state",Q=("undefined"!=typeof Symbol&&Symbol.iterator,"undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames),$=Object.getOwnPropertyDescriptors||function(t){var e={};return Q(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},Y={},J={get:function(t,e){if(e===G)return t;var n=d(t);
2if(!u(n,e))return function(t,e,n){var r,i=x(e,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(t.k):void 0}(t,n,e);var r=n[e];return t.I||!o(r)?r:r===N(t.t,e)?(R(t),t.o[e]=D(t.A.h,r,t)):r},has:function(t,e){return e in d(t)},ownKeys:function(t){return Reflect.ownKeys(d(t))},set:function(t,e,n){var r=x(d(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(!t.P){var i=N(d(t),e),o=null==i?void 0:i[G];if(o&&o.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(f(n,i)&&(void 0!==n||u(t.t,e)))return!0;R(t),j(t)}return t.o[e]=n,t.D[e]=!0,!0},deleteProperty:function(t,e){return void 0!==N(t.t,e)||e in t.t?(t.D[e]=!1,R(t),j(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=d(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){r(12)}},X={};a(J,(function(t,e){X[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),X.deleteProperty=function(t,e){return J.deleteProperty.call(this,t[0],e)},X.set=function(t,e,n){return J.set.call(this,t[0],e,n,t[0])};var Z=new(function(){function t(t){this.O=z,this.N=!0,"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var e=t.prototype;return e.produce=function(t,e,n){if("function"==typeof t&&"function"!=typeof e){var i=e;e=t;var a=this;return function(t){var n=this;void 0===t&&(t=i);for(var r=arguments.length,o=Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return a.produce(t,(function(t){var r;return(r=e).call.apply(r,[n,t].concat(o))}))}}var s;if("function"!=typeof e&&r(6),void 0!==n&&"function"!=typeof n&&r(7),o(t)){var u=T(this),c=D(this,t,void 0),l=!0;try{s=e(c),l=!1}finally{l?O(u):S(u)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return E(u,n),C(t,u)}),(function(t){throw O(u),t})):(E(u,n),C(s,u))}if(!t||"object"!=typeof t){if((s=e(t))===K)return;return void 0===s&&(s=t),this.N&&g(s,!0),s}r(21,t)},e.produceWithPatches=function(t,e){var n,r,i=this;return"function"==typeof t?function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return i.produceWithPatches(e,(function(e){return t.apply(void 0,[e].concat(r))}))}:[this.produce(t,e,(function(t,e){n=t,r=e})),n,r]},e.createDraft=function(t){o(t)||r(8),i(t)&&(t=L(t));var e=T(this),n=D(this,t,void 0);return n[G].C=!0,S(e),n},e.finishDraft=function(t,e){var n=(t&&t[G]).A;return E(n,e),C(void 0,n)},e.setAutoFreeze=function(t){this.N=t},e.setUseProxies=function(t){t&&!z&&r(20),this.O=t},e.applyPatches=function(t,e){var n;for(n=e.length-1;n>=0;n--){var r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}var o=b("Patches").$;return i(t)?o(t,e):this.produce(t,(function(t){return o(t,e.slice(n+1))}))},t}()),tt=Z.produce,et=(Z.produceWithPatches.bind(Z),Z.setAutoFreeze.bind(Z),Z.setUseProxies.bind(Z),Z.applyPatches.bind(Z),Z.createDraft.bind(Z),Z.finishDraft.bind(Z),tt),nt=n(20);n(40);function rt(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"===typeof i?i(n,r,t):e(i)}}}}var it=rt();it.withExtraArgument=rt;var ot=it;function at(){return(at=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function st(t){return(st=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ut(t,e){return(ut=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ct(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function lt(t,e,n){return(lt=ct()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&ut(i,n.prototype),i}).apply(null,arguments)}function ft(t){var e="function"===typeof Map?new Map:void 0;return(ft=function(t){if(null===t||!function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}(t))return t;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return lt(t,arguments,st(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ut(n,t)})(t)}var ht="undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"===typeof arguments[0]?nt.d:nt.d.apply(null,arguments)};function pt(t){if("object"!==typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}var dt=function(t){var e,n;function r(){return t.apply(this,arguments)||this}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=r.prototype;return i.concat=function(){for(var e,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return lt(r,(e=t.prototype.concat).call.apply(e,[this].concat(i)))},i.prepend=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?lt(r,e[0].concat(this)):lt(r,e.concat(this))},r}(ft(Array));function vt(){return function(t){return function(t){void 0===t&&(t={});var e=t,n=e.thunk,r=void 0===n||n,i=(e.immutableCheck,e.serializableCheck,new dt);r&&(!function(t){return"boolean"===typeof t}(r)?i.push(ot.withExtraArgument(r.extraArgument)):i.push(ot));0;return i}(t)}}function gt(t){var e,n=vt(),r=t||{},i=r.reducer,o=void 0===i?void 0:i,a=r.middleware,s=void 0===a?n():a,u=r.devTools,c=void 0===u||u,l=r.preloadedState,f=void 0===l?void 0:l,h=r.enhancers,p=void 0===h?void 0:h;if("function"===typeof o)e=o;else{if(!pt(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=Object(nt.c)(o)}var d=nt.a.apply(void 0,"function"===typeof s?s(n):s),v=nt.d;c&&(v=ht(at({trace:!1},"object"===typeof c&&c)));var g=[d];Array.isArray(p)?g=[d].concat(p):"function"===typeof p&&(g=p(g));var y=v.apply(void 0,g);return Object(nt.e)(e,f,y)}function yt(t,e){function n(){if(e){var n=e.apply(void 0,arguments);if(!n)throw new Error("prepareAction did not return an object");return at({type:t,payload:n.payload},"meta"in n&&{meta:n.meta},{},"error"in n&&{error:n.error})}return{type:t,payload:arguments.length<=0?void 0:arguments[0]}}return n.toString=function(){return""+t},n.type=t,n.match=function(e){return e.type===t},n}function mt(t){var e,n={},r=[],i={addCase:function(t,e){var r="string"===typeof t?t:t.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=e,i},addMatcher:function(t,e){return r.push({matcher:t,reducer:e}),i},addDefaultCase:function(t){return e=t,i}};return t(i),[n,r,e]}function bt(t){var e=t.name,n=t.initialState;if(!e)throw new Error("`name` is a required option for createSlice");var r=t.reducers||{},a="undefined"===typeof t.extraReducers?[]:"function"===typeof t.extraReducers?mt(t.extraReducers):[t.extraReducers],s=a[0],u=void 0===s?{}:s,c=a[1],l=void 0===c?[]:c,f=a[2],h=void 0===f?void 0:f,p=Object.keys(r),d={},v={},g={};p.forEach((function(t){var n,i,o=r[t],a=e+"/"+t;"reducer"in o?(n=o.reducer,i=o.prepare):n=o,d[t]=n,v[a]=n,g[t]=i?yt(a,i):yt(a)}));var y=function(t,e,n,r){void 0===n&&(n=[]);var a="function"===typeof e?mt(e):[e,n,r],s=a[0],u=a[1],c=a[2];return function(e,n){void 0===e&&(e=t);var r=[s[n.type]].concat(u.filter((function(t){return(0,t.matcher)(n)})).map((function(t){return t.reducer})));return 0===r.filter((function(t){return!!t})).length&&(r=[c]),r.reduce((function(t,e){if(e){if(i(t)){var r=e(t,n);return"undefined"===typeof r?t:r}if(o(t))return et(t,(function(t){return e(t,n)}));var a=e(t,n);if("undefined"===typeof a){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return a}return t}),e)}}(n,at({},u,{},v),l,h);return{name:e,reducer:y,actions:g,caseReducers:d}}"undefined"!==typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!==typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var wt=["name","message","stack","code"],_t=function(t){this.payload=t,this.name="RejectWithValue",this.message="Rejected"},Et=function(t){if("object"===typeof t&&null!==t){var e={},n=wt,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;"string"===typeof t[a]&&(e[a]=t[a])}return e}return{message:String(t)}};function Ot(t,e,n){var r=yt(t+"/fulfilled",(function(t,e,n){return{payload:t,meta:{arg:n,requestId:e,requestStatus:"fulfilled"}}})),i=yt(t+"/pending",(function(t,e){return{payload:void 0,meta:{arg:e,requestId:t,requestStatus:"pending"}}})),o=yt(t+"/rejected",(function(t,e,r){var i=t instanceof _t,o=!!t&&"AbortError"===t.name,a=!!t&&"ConditionError"===t.name;return{payload:t instanceof _t?t.payload:void 0,error:(n&&n.serializeError||Et)(t||"Rejected"),meta:{arg:r,requestId:e,rejectedWithValue:i,requestStatus:"rejected",aborted:o,condition:a}}})),a="undefined"!==typeof AbortController?AbortController:function(){function t(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){}}}return t.prototype.abort=function(){0},t}();return Object.assign((function(t){return function(s,u,c){var l,f=function(t){void 0===t&&(t=21);for(var e="",n=t;n--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return e}(),h=new a,p=new Promise((function(t,e){return h.signal.addEventListener("abort",(function(){return e({name:"AbortError",message:l||"Aborted"})}))})),d=!1;var v=function(){try{var a,l=function(t){return v?t:(n&&!n.dispatchConditionRejection&&o.match(a)&&a.meta.condition||s(a),a)},v=!1,g=function(t,e){try{var n=t()}catch(r){return e(r)}return n&&n.then?n.then(void 0,e):n}
2((function(){if(n&&n.condition&&!1===n.condition(t,{getState:u,extra:c}))throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return d=!0,s(i(f,t)),Promise.resolve(Promise.race([p,Promise.resolve(e(t,{dispatch:s,getState:u,extra:c,requestId:f,signal:h.signal,rejectWithValue:function(t){return new _t(t)}})).then((function(e){return e instanceof _t?o(e,f,t):r(e,f,t)}))])).then((function(t){a=t}))}),(function(e){a=o(e,f,t)}));return Promise.resolve(g&&g.then?g.then(l):l(g))}catch(y){return Promise.reject(y)}}();return Object.assign(v,{abort:function(t){d&&(l=t,h.abort())},requestId:f,arg:t})}}),{pending:i,rejected:o,fulfilled:r,typePrefix:t})}F()},function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(10);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){Object(r.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}},,function(t,e,n){"use strict";function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r="Invariant failed";e.a=function(t,e){if(!t)throw new Error(r)}},function(t,e,n){t.exports=n(65)},function(t,e,n){"use strict";n.d(e,"a",(function(){return O})),n.d(e,"b",(function(){return P})),n.d(e,"d",(function(){return N})),n.d(e,"c",(function(){return v})),n.d(e,"f",(function(){return g})),n.d(e,"e",(function(){return d}));var r=n(4);function i(t){return"/"===t.charAt(0)}function o(t,e){for(var n=e,r=n+1,i=t.length;r<i;n+=1,r+=1)t[n]=t[r];t.pop()}var a=function(t,e){void 0===e&&(e="");var n,r=t&&t.split("/")||[],a=e&&e.split("/")||[],s=t&&i(t),u=e&&i(e),c=s||u;if(t&&i(t)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var l=a[a.length-1];n="."===l||".."===l||""===l}else n=!1;for(var f=0,h=a.length;h>=0;h--){var p=a[h];"."===p?o(a,h):".."===p?(o(a,h),f++):f&&(o(a,h),f--)}if(!c)for(;f--;f)a.unshift("..");!c||""===a[0]||a[0]&&i(a[0])||a.unshift("");var d=a.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};function s(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}var u=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,r){return t(e,n[r])}));if("object"===typeof e||"object"===typeof n){var r=s(e),i=s(n);return r!==e||i!==n?t(r,i):Object.keys(Object.assign({},e,n)).every((function(r){return t(e[r],n[r])}))}return!1},c=n(17);function l(t){return"/"===t.charAt(0)?t:"/"+t}function f(t){return"/"===t.charAt(0)?t.substr(1):t}function h(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function p(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function d(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function v(t,e,n,i){var o;"string"===typeof t?(o=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(o=Object(r.a)({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invali
2d percent-encoding.'):s}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function g(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&u(t.state,e.state)}function y(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"===typeof t?t(e,n):t;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach((function(t){return t.apply(void 0,n)}))}}}var m=!("undefined"===typeof window||!window.document||!window.document.createElement);function b(t,e){e(window.confirm(t))}var w="popstate",_="hashchange";function E(){try{return window.history.state||{}}catch(t){return{}}}function O(t){void 0===t&&(t={}),m||Object(c.a)(!1);var e=window.history,n=function(){var t=window.navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history}(),i=!(-1===window.navigator.userAgent.indexOf("Trident")),o=t,a=o.forceRefresh,s=void 0!==a&&a,u=o.getUserConfirmation,f=void 0===u?b:u,g=o.keyLength,O=void 0===g?6:g,S=t.basename?p(l(t.basename)):"";function T(t){var e=t||{},n=e.key,r=e.state,i=window.location,o=i.pathname+i.search+i.hash;return S&&(o=h(o,S)),v(o,r,n)}function I(){return Math.random().toString(36).substr(2,O)}var C=y();function k(t){Object(r.a)(V,t),V.length=e.length,C.notifyListeners(V.location,V.action)}function P(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||x(T(t.state))}function A(){x(T(E()))}var N=!1;function x(t){if(N)N=!1,k();else{C.confirmTransitionTo(t,"POP",f,(function(e){e?k({action:"POP",location:t}):function(t){var e=V.location,n=R.indexOf(e.key);-1===n&&(n=0);var r=R.indexOf(t.key);-1===r&&(r=0);var i=n-r;i&&(N=!0,L(i))}(t)}))}}var j=T(E()),R=[j.key];function D(t){return S+d(t)}function L(t){e.go(t)}var M=0;function F(t){1===(M+=t)&&1===t?(window.addEventListener(w,P),i&&window.addEventListener(_,A)):0===M&&(window.removeEventListener(w,P),i&&window.removeEventListener(_,A))}var U=!1;var V={length:e.length,action:"POP",location:j,createHref:D,push:function(t,r){var i="PUSH",o=v(t,r,I(),V.location);C.confirmTransitionTo(o,i,f,(function(t){if(t){var r=D(o),a=o.key,u=o.state;if(n)if(e.pushState({key:a,state:u},null,r),s)window.location.href=r;else{var c=R.indexOf(V.location.key),l=R.slice(0,c+1);l.push(o.key),R=l,k({action:i,location:o})}else window.location.href=r}}))},replace:function(t,r){var i="REPLACE",o=v(t,r,I(),V.location);C.confirmTransitionTo(o,i,f,(function(t){if(t){var r=D(o),a=o.key,u=o.state;if(n)if(e.replaceState({key:a,state:u},null,r),s)window.location.replace(r);else{var c=R.indexOf(V.location.key);-1!==c&&(R[c]=o.key),k({action:i,location:o})}else window.location.replace(r)}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(t){void 0===t&&(t=!1);var e=C.setPrompt(t);return U||(F(1),U=!0),function(){return U&&(U=!1,F(-1)),e()}},listen:function(t){var e=C.appendListener(t);return F(1),function(){F(-1),e()}}};return V}var S="hashchange",T={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+f(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:f,decodePath:l},slash:{encodePath:l,decodePath:l}};function I(t){var e=t.indexOf("#");return-1===e?t:t.slice(0,e)}function C(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)}function k(t){window.location.replace(I(window.location.href)+"#"+t)}function P(t){void 0===t&&(t={}),m||Object(c.a)(!1);var e=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),t),i=n.getUserConfirmation,o=void 0===i?b:i,a=n.hashType,s=void 0===a?"slash":a,u=t.basename?p(l(t.basename)):"",f=T[s],g=f.encodePath,w=f.decodePath;function _(){var t=w(C());return u&&(t=h(t,u)),v(t)}var E=y();function O(t){Object(r.a)(V,t),V.length=e.length,E.notifyListeners(V.location,V.action)}var P=!1,A=null;function N(){var t,e,n=C(),r=g(n);if(n!==r)k(r);else{var i=_(),a=V.location;if(!P&&(e=i,(t=a).pathname===e.pathname&&t.search===e.search&&t.hash===e.hash))return;if(A===d(i))return;A=null,function(t){if(P)P=!1,O();else{var e="POP";E.confirmTransitionTo(t,e,o,(function(n){n?O({action:e,location:t}):function(t){var e=V.location,n=D.lastIndexOf(d(e));-1===n&&(n=0);var r=D.lastIndexOf(d(t));-1===r&&(r=0);var i=n-r;i&&(P=!0,L(i))}(t)}))}}(i)}}var x=C(),j=g(x);x!==j&&k(j);var R=_(),D=[d(R)];function L(t){e.go(t)}var M=0;function F(t){1===(M+=t)&&1===t?window.addEventListener(S,N):0===M&&window.removeEventListener(S,N)}var U=!1;var V={length:e.length,action:"POP",location:R,createHref:function(t){var e=document.querySelector("base"),n="";return e&&e.getAttribute("href")&&(n=I(window.location.href)),n+"#"+g(u+d(t))},push:function(t,e){var n="PUSH",r=v(t,void 0,void 0,V.location);E.confirmTransitionTo(r,n,o,(function(t){if(t){var e=d(r),i=g(u+e);if(C()!==i){A=e,function(t){window.location.hash=t}(i);var o=D.lastIndexOf(d(V.location)),a=D.slice(0,o+1);a.push(e),D=a,O({action:n,location:r})}else O()}}))},replace:function(t,e){var n="REPLACE",r=v(t,void 0,void 0,V.location);E.confirmTransitionTo(r,n,o,(function(t){if(t){var e=d(r),i=g(u+e);C()!==i&&(A=e,k(i));var o=D.indexOf(d(V.location));-1!==o&&(D[o]=e),O({action:n,location:r})}}))},go:L,goBack:function(){L(-1)},goForward:function(){L(1)},block:function(t){void 0===t&&(t=!1);var e=E.setPrompt(t);return U||(F(1),U=!0),function(){return U&&(U=!1,F(-1)),e()}},listen:function(t){var e=E.appendListener(t);return F(1),function(){F(-1),e()}}};return V}function A(t,e,n){return Math.min(Math.max(t,e),n)}function N(t){void 0===t&&(t={});var e=t,n=e.getUserConfirmation,i=e.initialEntries,o=void 0===i?["/"]:i,a=e.initialIndex,s=void 0===a?0:a,u=e.keyLength,c=void 0===u?6:u,l=y();function f(t){Object(r.a)(w,t),w.length=w.entries.length,l.notifyListeners(w.location,w.action)}function h(){return Math.random().toString(36).substr(2,c)}var p=A(s,0,o.length-1),g=o.map((function(t){return v(t,void 0,"string"===typeof t?h():t.key||h())})),m=d;function b(t){var e=A(w.index+t,0,w.entries.length-1),r=w.entries[e];l.confirmTransitionTo(r,"POP",n,(function(t){t?f({action:"POP",location:r,index:e}):f()}))}var w={length:g.length,action:"POP",location:g[p],index:p,entries:g,createHref:m,push:function(t,e){var r="PUSH",i=v(t,e,h(),w.location);l.confirmTransitionTo(i,r,n,(function(t){if(t){var e=w.index+1,n=w.entries.slice(0);n.length>e?n.splice(e,n.length-e,i):n.push(i),f({action:r,location:i,index:e,entries:n})}}))},replace:function(t,e){var r="REPLACE",i=v(t,e,h(),w.location);l.confirmTransitionTo(i,r,n,(function(t){t&&(w.entries[w.index]=i,f({action:r,location:i}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(t){var e=w.index+t;return e>=0&&e<w.entries.length},block:function(t){return void 0===t&&(t=!1),l.setPrompt(t)},listen:function(t){return l.appendListener(t)}};return w}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return v})),n.d(e,"e",(function(){return s}));var r=n(46),i=function(){return Math.random().toString(36).substring(7).split("").join(".")},o={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function a(t){if("object"!==typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function s(t,e,n){var i;if("function"===typeof e&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(
2). This is not supported. Instead, compose them together to a single function.");if("function"===typeof e&&"undefined"===typeof n&&(n=e,e=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error("Expected the enhancer to be a function.");return n(s)(t,e)}if("function"!==typeof t)throw new Error("Expected the reducer to be a function.");var u=t,c=e,l=[],f=l,h=!1;function p(){f===l&&(f=l.slice())}function d(){if(h)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return c}function v(t){if("function"!==typeof t)throw new Error("Expected the listener to be a function.");if(h)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var e=!0;return p(),f.push(t),function(){if(e){if(h)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");e=!1,p();var n=f.indexOf(t);f.splice(n,1),l=null}}}function g(t){if(!a(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"===typeof t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(h)throw new Error("Reducers may not dispatch actions.");try{h=!0,c=u(c,t)}finally{h=!1}for(var e=l=f,n=0;n<e.length;n++){(0,e[n])()}return t}function y(t){if("function"!==typeof t)throw new Error("Expected the nextReducer to be a function.");u=t,g({type:o.REPLACE})}function m(){var t,e=v;return(t={subscribe:function(t){if("object"!==typeof t||null===t)throw new TypeError("Expected the observer to be an object.");function n(){t.next&&t.next(d())}return n(),{unsubscribe:e(n)}}})[r.a]=function(){return this},t}return g({type:o.INIT}),(i={dispatch:g,subscribe:v,getState:d,replaceReducer:y})[r.a]=m,i}function u(t,e){var n=e&&e.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function c(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var i=e[r];0,"function"===typeof t[i]&&(n[i]=t[i])}var a,s=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if("undefined"===typeof n(void 0,{type:o.INIT}))throw new Error('Reducer "'+e+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if("undefined"===typeof n(void 0,{type:o.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+e+"\" returned undefined when probed with a random type. Don't try to handle "+o.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(c){a=c}return function(t,e){if(void 0===t&&(t={}),a)throw a;for(var r=!1,i={},o=0;o<s.length;o++){var c=s[o],l=n[c],f=t[c],h=l(f,e);if("undefined"===typeof h){var p=u(c,e);throw new Error(p)}i[c]=h,r=r||h!==f}return(r=r||s.length!==Object.keys(t).length)?i:t}}function l(t,e){return function(){return e(t.apply(this,arguments))}}function f(t,e){if("function"===typeof t)return l(t,e);if("object"!==typeof t||null===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in t){var i=t[r];"function"===typeof i&&(n[r]=l(i,e))}return n}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t,e){var n=Object.keys(t);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(t)),e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
2e%2?p(n,!0).forEach((function(e){h(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function v(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function g(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=e.map((function(t){return t(i)}));return d({},n,{dispatch:r=v.apply(void 0,o)(n.dispatch)})}}}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",(function(){return r}))},,function(t,e,n){"use strict";function r(t){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(30),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return r.isMemo(t)?a:s[t.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!==typeof n){if(d){var i=p(n);i&&i!==d&&t(e,i,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=u(e),v=u(n),g=0;g<a.length;++g){var y=a[g];if(!o[y]&&(!r||!r[y])&&(!v||!v[y])&&(!s||!s[y])){var m=h(n,y);try{c(e,y,m)}catch(b){}}}}return e}},,function(t,e,n){!function(t){"use strict";function e(t){return Array.prototype.slice.call(t)}function n(t){return new Promise((function(e,n){t.onsuccess=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function r(t,e,r){var i,o=new Promise((function(o,a){n(i=t[e].apply(t,r)).then(o,a)}));return o.request=i,o}function i(t,e,n){var i=r(t,e,n);return i.then((function(t){if(t)return new l(t,i.request)}))}function o(t,e,n){n.forEach((function(n){Object.defineProperty(t.prototype,n,{get:function(){return this[e][n]},set:function(t){this[e][n]=t}})}))}function a(t,e,n,i){i.forEach((function(i){i in n.prototype&&(t.prototype[i]=function(){return r(this[e],i,arguments)})}))}function s(t,e,n,r){r.forEach((function(r){r in n.prototype&&(t.prototype[r]=function(){return this[e][r].apply(this[e],arguments)})}))}function u(t,e,n,r){r.forEach((function(r){r in n.prototype&&(t.prototype[r]=function(){return i(this[e],r,arguments)})}))}function c(t){this._index=t}function l(t,e){this._cursor=t,this._request=e}function f(t){this._store=t}function h(t){this._tx=t,this.complete=new Promise((function(e,n){t.oncomplete=function(){e()},t.onerror=function(){n(t.error)},t.onabort=function(){n(t.error)}}))}function p(t,e,n){this._db=t,this.oldVersion=e,this.transaction=new h(n)}function d(t){this._db=t}function v(t,e,n){var i=r(indexedDB,"open",[t,e]),o=i.request;return o&&(o.onupgradeneeded=function(t){n&&n(new p(o.result,t.oldVersion,o.transaction))}),i.then((function(t){return new d(t)}))}function g(t){return r(indexedDB,"deleteDatabase",[t])}o(c,"_index",["name","keyPath","multiEntry","unique"]),a(c,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),u(c,"_index",IDBIndex,["openCursor","o
2penKeyCursor"]),o(l,"_cursor",["direction","key","primaryKey","value"]),a(l,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach((function(t){t in IDBCursor.prototype&&(l.prototype[t]=function(){var e=this,r=arguments;return Promise.resolve().then((function(){return e._cursor[t].apply(e._cursor,r),n(e._request).then((function(t){if(t)return new l(t,e._request)}))}))})})),f.prototype.createIndex=function(){return new c(this._store.createIndex.apply(this._store,arguments))},f.prototype.index=function(){return new c(this._store.index.apply(this._store,arguments))},o(f,"_store",["name","keyPath","indexNames","autoIncrement"]),a(f,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),u(f,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),s(f,"_store",IDBObjectStore,["deleteIndex"]),h.prototype.objectStore=function(){return new f(this._tx.objectStore.apply(this._tx,arguments))},o(h,"_tx",["objectStoreNames","mode"]),s(h,"_tx",IDBTransaction,["abort"]),p.prototype.createObjectStore=function(){return new f(this._db.createObjectStore.apply(this._db,arguments))},o(p,"_db",["name","version","objectStoreNames"]),s(p,"_db",IDBDatabase,["deleteObjectStore","close"]),d.prototype.transaction=function(){return new h(this._db.transaction.apply(this._db,arguments))},o(d,"_db",["name","version","objectStoreNames"]),s(d,"_db",IDBDatabase,["close"]),["openCursor","o
2penKeyCursor"].forEach((function(t){[f,c].forEach((function(n){t in n.prototype&&(n.prototype[t.replace("open","iterate")]=function(){var n=e(arguments),r=n[n.length-1],i=this._store||this._index,o=i[t].apply(i,n.slice(0,-1));o.onsuccess=function(){r(o.result)}})}))})),[c,f].forEach((function(t){t.prototype.getAll||(t.prototype.getAll=function(t,e){var n=this,r=[];return new Promise((function(i){n.iterateCursor(t,(function(t){t?(r.push(t.value),void 0===e||r.length!=e?t.continue():i(r)):i(r)}))}))})})),t.openDb=v,t.deleteDb=g,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,n){"use strict";function r(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(c){return void n(c)}s.done?e(u):Promise.resolve(u).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function s(t){r(a,i,o,s,u,"next",t)}function u(t){r(a,i,o,s,u,"throw",t)}s(void 0)}))}}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";t.exports=n(74)},function(t,e,n){t.exports=n(72)()},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(25),i=n(23);function o(t,e){return!e||"object"!==Object(r.a)(e)&&"function"!==typeof e?Object(i.a)(t):e}},function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}n.d(e,"a",(function(){return i}))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},,function(t,e,n){"use strict";function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return Pt})),n.d(e,"b",(function(){return Rt}));var r=n(30),i=n(2),o=n.n(i),a=n(56),s=n.n(a),u=n(61),c=n(62),l=n(50),f=n(26),h=n.n(f);function p(){return(p=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var d=function(t,e){for(var n=[t[0]],r=0,i=e.length;r<i;r+=1)n.push(e[r],t[r+1]);return n},v=function(t){return null!==t&&"object"==typeof t&&"[object Object]"===(t.toString?t.toString():Object.prototype.toString.call(t))&&!Object(r.typeOf)(t)},g=Object.freeze([]),y=Object.freeze({});function m(t){return"function"==typeof t}function b(t){return t.displayName||t.name||"Component"}function w(t){return t&&"string"==typeof t.styledComponentId}var _="undefined"!=typeof t&&(Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_KEY:"AIzaSyD-OS7MCa3p5VbOVoCPoBx2XfoHEhPoGeg",REACT_APP_API_AUTH_DOMAIN:"laravel-8c2d4.firebaseapp.com",REACT_APP_API_PROJECT_ID:"laravel-8c2d4",REACT_APP_API_STORAGE_BUCKET:"gs://laravel-8c2d4.appspot.com"}).REACT_APP_SC_ATTR||Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_KEY:"AIzaSyD-OS7MCa3p5VbOVoCPoBx2XfoHEhPoGeg",REACT_APP_API_AUTH_DOMAIN:"laravel-8c2d4.firebaseapp.com",REACT_APP_API_PROJECT_ID:"laravel-8c2d4",REACT_APP_API_STORAGE_BUCKET:"gs://laravel-8c2d4.appspot.com"}).SC_ATTR)||"data-styled",E="undefined"!=typeof window&&"HTMLElement"in window,O=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof t&&void 0!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_KEY:"AIzaSyD-OS7MCa3p5VbOVoCPoBx2XfoHEhPoGeg",REACT_APP_API_AUTH_DOMAIN:"laravel-8c2d4.firebaseapp.com",REACT_APP_API_PROJECT_ID:"laravel-8c2d4",REACT_APP_API_STORAGE_BUCKET:"gs://laravel-8c2d4.appspot.com"}).REACT_APP_SC_DISABLE_SPEEDY&&""!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_KEY:"AIzaSyD-OS7MCa3p5VbOVoCPoBx2XfoHEhPoGeg",REACT_APP_API_AUTH_DOMAIN:"laravel-8c2d4.firebaseapp.com",REACT_APP_API_PROJECT_ID:"laravel-8c2d4",REACT_APP_API_STORAGE_BUCKET:"gs://laravel-8c2d4.appspot.com"}).REACT_APP_SC_DISABLE_SPEEDY?"false"!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_KEY:"AIzaSyD-OS7MCa3p5VbOVoCPoBx2XfoHEhPoGeg",REACT_APP_API_AUTH_DOMAIN:"laravel-8c2d4.firebaseapp.com",REACT_APP_API_PROJECT_ID:"laravel-8c2d4",REACT_APP_API_STORAGE_BUCKET:"gs://laravel-8c2d4.appspot.com"}).REACT_APP_SC_DISABLE_SPEEDY&&Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_KEY:"AIzaSyD-OS7MCa3p5VbOVoCPoBx2XfoHEhPoGeg",REACT_APP_API_AUTH_DOMAIN:"laravel-8c2d4.firebaseapp.com",REACT_APP_API_PROJECT_ID:"laravel-8c2d4",REACT_APP_API_STORAGE_BUCKET:"gs://laravel-8c2d4.appspot.com"}).REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof t&&void 0!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_KEY:"AIzaSyD-OS7MCa3p5VbOVoCPoBx2XfoHEhPoGeg",REACT_APP_API_AUTH_DOMAIN:"laravel-8c2d4.firebaseapp.com",REACT_APP_API_PROJECT_ID:"laravel-8c2d4",REACT_APP_API_STORAGE_BUCKET:"gs://laravel-8c2d4.appspot.com"}).SC_DISABLE_SPEEDY&&""!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_KEY:"AIzaSyD-OS7MCa3p5VbOVoCPoBx2XfoHEhPoGeg",REACT_APP_API_AUTH_DOMAIN:"laravel-8c2d4.firebaseapp.com",REACT_APP_API_PROJECT_ID:"laravel-8c2d4",REACT_APP_API_STORAGE_BUCKET:"gs://laravel-8c2d4.appspot.com"}).SC_DISABLE_SPEEDY&&("false"!==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_KEY:"AIzaSyD-OS7MCa3p5VbOVoCPoBx2XfoHEhPoGeg",REACT_APP_API_AUTH_DOMAIN:"laravel-8c2d4.firebaseapp.com",REACT_APP_API_PROJECT_ID:"laravel-8c2d4",REACT_APP_API_STORAGE_BUCKET:"gs://laravel-8c2d4.appspot.com"}).SC_DISABLE_SPEEDY&&Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_KEY:"AIzaSyD-OS7MCa3p5VbOVoCPoBx2XfoHEhPoGeg",REACT_APP_API_AUTH_DOMAIN:"laravel-8c2d4.firebaseapp.com",REACT_APP_API_PROJECT_ID:"laravel-8c2d4",REACT_APP_API_STORAGE_BUCKET:"gs://laravel-8c2d4.appspot.com"}).SC_DISABLE_SPEEDY)),S={};function T(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+t+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var I=function(){function t(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}var e=t.prototype;return e.indexOfGroup=function(t){for(var e=0,n=0;n<t;n++)e+=this.groupSizes[n];return e},e.insertRules=function(t,e){if(t>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;t>=i;)(i<<=1)<0&&T(16,""+t);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o<i;o++)this.groupSizes[o]=0}for(var a=this.indexOfGroup(t+1),s=0,u=e.length;s<u;s++)this.tag.insertRule(a,e[s])&&(this.groupSizes[t]++,a++)},e.clearGroup=function(t){if(t<this.length){var e=this.groupSizes[t],n=this.indexOfGroup(t),r=n+e;this.groupSizes[t]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},e.getGroup=function(t){var e="";if(t>=this.length||0===this.groupSizes[t])return e;for(var n=this.groupSizes[t],r=this.indexOfGroup(t),i=r+n,o=r;o<i;o++)e+=this.tag.getRule(o)+"/*!sc*/\n";return e},t}(),C=new Map,k=new Map,P=1,A=function(t){if(C.has(t))return C.get(t);for(;k.has(P);)P++;var e=P++;return C.set(t,e),k.set(e,t),e},N=function(t){return k.get(t)},x=function(t,e){C.set(t,e),k.set(e,t)},j="style["+_+'][data-styled-version="5.2.1"]',R=new RegExp("^"+_+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),D=function(t,e,n){for(var r,i=n.split(","),o=0,a=i.length;o<a;o++)(r=i[o])&&t.registerName(e,r)},L=function(t,e){for(var n=e.innerHTML.split("/*!sc*/\n"),r=[],i=0,o=n.length;i<o;i++){var a=n[i].trim();if(a){var s=a.match(R);if(s){var u=0|parseInt(s[1],10),c=s[2];0!==u&&(x(c,u),D(t,c,s[3]),t.getTag().insertRules(u,r)),r.length=0}else r.push(a)}}},M=function(){return n.nc},F=function(t){var e=document.head,n=t||e,r=document.createElement("style"),i=function(t){for(var e=t.childNodes,n=e.length;n>=0;n--){var r=e[n];if(r&&1===r.nodeType&&r.hasAttribute(_))return r}}(n),o=void 0!==i?i.nextSibling:null;r.setAttribute(_,"active"),r.setAttribute("data-styled-version","5.2.1");var a=M();return a&&r.setAttribute("nonce",a),n.insertBefore(r,o),r},U=function(){function t(t){var e=this.element=F(t);e.appendChild(document.createTextNode("")),this.sheet=function(t){if(t.sheet)return t.sheet;for(var e=document.styleSheets,n=0,r=e.length;n<r;n++){var i=e[n];if(i.ownerNode===t)return i}T(17)}(e),this.length=0}var e=t.prototype;return e.insertRule=function(t,e){try{return this.sheet.insertRule(e,t),this.length++,!0}catch(t){return!1}},e.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.getRule=function(t){var e=this.sheet.cssRules[t];return void 0!==e&&"string"==typeof e.cssText?e.cssText:""},t}(),V=function(){function t(t){var e=this.element=F(t);this.nodes=e.childNodes,this.length=0}var e=t.prototype;return e.insertRule=function(t,e){if(t<=this.length&&t>=0){var n=document.createTextNode(e),r=this.nodes[t];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},e.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},t}(),q=function(){function t(t){this.rules=[],this.length=0}var e=t.prototype;return e.insertRule=function(t,e){return t<=this.length&&(this.rules.splice(t,0,e),this.length++,!0)},e.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.getRule=function(t){return t<this.length?this.rules[t]:""},t}(),B=E,H={isServer:!E,useCSSOMInjection:!O},z=function(){function t(t,e,n){void 0===t&&(t=y),void 0===e&&(e={}),this.options=p({},H,{},t),this.gs=e,this.names=new Map(n),!this.options.isServer&&E&&B&&(B=!1,function(t){for(var e=document.querySelectorAll(j),n=0,r=e.length;n<r;n++){var i=e[n];i&&"active"!==i.getAttribute(_)&&(L(t,i),i.parentNode&&i.parentNode.removeChild(i))}}(this))}t.registerId=function(t){return A(t)};var e=t.prototype;return e.reconstructWithOptions=function(e,n){return void 0===n&&(n=!0),new t(p({},this.options,{},e),this.gs,n&&this.names||void 0)},e.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.getTag=function(){return this.tag||(this.tag=(n=(e=this.options).isServer,r=e.useCSSOMInjection,i=e.target,t=n?new q(i):r?new U(i):new V(i),new I(t)));var t,e,n,r,i},e.hasNameForId=function(t,e){return this.names.has(t)&&this.names.get(t).has(e)},e.registerName=function(t,e){if(A(t),this.names.has(t))this.names.get(t).add(e);else{var n=new Set;n.add(e),this.names.set(t,n)}},e.insertRules=function(t,e,n){this.registerName(t,e),this.getTag().insertRules(A(t),n)},e.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.clearRules=function(t){this.getTag().clearGroup(A(t)),this.clearNames(t)},e.clearTag=function(){this.tag=void 0},e.toString=function(){return function(t){for(var e=t.getTag(),n=e.length,r="",i=0;i<n;i++){var o=N(i);if(void 0!==o){var a=t.names.get(o),s=e.getGroup(i);if(void 0!==a&&0!==s.length){var u=_+".g"+i+'[id="'+o+'"]',c="";void 0!==a&&a.forEach((function(t){t.length>0&&(c+=t+",")})),r+=""+s+u+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},t}(),K=/(a)(d)/gi,W=function(t){return String.fromCharCode(t+(t>25?39:97))};function G(t){var e,n="";for(e=Math.abs(t);e>52;e=e/52|0)n=W(e%52)+n;return(W(e%52)+n).replace(K,"$1-$2")}var Q=function(t,e){for(var n=e.length;n;)t=33*t^e.charCodeAt(--n);return t},$=function(t){return Q(5381,t)};function Y(t){for(var e=0;e<t.length;e+=1){var n=t[e];if(m(n)&&!w(n))return!1}return!0}var J=$("5.2.1"),X=function(){function t(t,e,n){this.rules=t,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&Y(t),this.componentId=e,this.baseHash=Q(J,e),this.baseStyle=n,z.registerId(e)}return t.prototype.generateAndInjectStyles=function(t,e,n){var r=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(t,e,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&e.hasNameForId(r,this.staticRulesId))i.push(this.staticRulesId);else{var o=gt(this.rules,t,e,n).join(""),a=G(Q(this.baseHash,o.length)>>>0);if(!e.hasNameForId(r,a)){var s=n(o,"."+a,void 0,r);e.insertRules(r,a,s)}i.push(a),this.staticRulesId=a}else{for(var u=this.rules.length,c=Q(this.baseHash,n.hash),l="",f=0;f<u;f++){var h=this.rules[f];if("string"==typeof h)l+=h;else if(h){var p=gt(h,t,e,n),d=Array.isArray(p)?p.join(""):p;c=Q(c,d+f),l+=d}}if(l){var v=G(c>>>0);if(!e.hasNameForId(r,v)){var g=n(l,"."+v,void 0,r);e.insertRules(r,v,g)}i.push(v)}}return i.join(" ")},t}(),Z=/^\s*\/\/.*$/gm,tt=[":","[",".","#"];function et(t){var e,n,r,i,o=void 0===t?y:t,a=o.options,s=void 0===a?y:a,c=o.plugins,l=void 0===c?g:c,f=new u.a(s),h=[],p=function(t){function e(e){if(e)try{t(e+"}")}catch(t){}}return function(n,r,i,o,a,s,u,c,l,f){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return t(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return t(i[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(e)}}}((function(t){h.push(t)})),d=function(t,r,o){return 0===r&&tt.includes(o[n.length])||o.match(i)?t
vendor: 4,305 bytes, line 2
2:"."+e};function v(t,o,a,s){void 0===s&&(s="&");var u=t.replace(Z,""),c=o&&a?a+" "+o+" { "+u+" }":u;return e=s,n=o,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),f(a||!o?"":o,c)}return f.use([].concat(l,[function(t,e,i){2===t&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,d))},p,function(t){if(-2===t){var e=h;return h=[],e}}])),v.hash=l.length?l.reduce((function(t,e){return e.name||T(15),Q(t,e.name)}),5381).toString():"",v}var nt=o.a.createContext(),rt=(nt.Consumer,o.a.createContext()),it=(rt.Consumer,new z),ot=et();function at(){return Object(i.useContext)(nt)||it}function st(){return Object(i.useContext)(rt)||ot}function ut(t){var e=Object(i.useState)(t.stylisPlugins),n=e[0],r=e[1],a=at(),u=Object(i.useMemo)((function(){var e=a;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e}),[t.disableCSSOMInjection,t.sheet,t.target]),c=Object(i.useMemo)((function(){return et({options:{prefix:!t.disableVendorPrefixes},plugins:n})}),[t.disableVendorPrefixes,n]);return Object(i.useEffect)((function(){s()(n,t.stylisPlugins)||r(t.stylisPlugins)}),[t.stylisPlugins]),o.a.createElement(nt.Provider,{value:u},o.a.createElement(rt.Provider,{value:c},t.children))}var ct=function(){function t(t,e){var n=this;this.inject=function(t,e){void 0===e&&(e=ot);var r=n.name+e.hash;t.hasNameForId(n.id,r)||t.insertRules(n.id,r,e(n.rules,r,"@keyframes"))},this.toString=function(){return T(12,String(n.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=e}return t.prototype.getName=function(t){return void 0===t&&(t=ot),this.name+t.hash},t}(),lt=/([A-Z])/,ft=/([A-Z])/g,ht=/^ms-/,pt=function(t){return"-"+t.toLowerCase()};function dt(t){return lt.test(t)?t.replace(ft,pt).replace(ht,"-ms-"):t}var vt=function(t){return null==t||!1===t||""===t};function gt(t,e,n,r){if(Array.isArray(t)){for(var i,o=[],a=0,s=t.length;a<s;a+=1)""!==(i=gt(t[a],e,n,r))&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}return vt(t)?"":w(t)?"."+t.styledComponentId:m(t)?"function"!=typeof(u=t)||u.prototype&&u.prototype.isReactComponent||!e?t:gt(t(e),e,n,r):t instanceof ct?n?(t.inject(n,r),t.getName(r)):t:v(t)?function t(e,n){var r,i,o=[];for(var a in e)e.hasOwnProperty(a)&&!vt(e[a])&&(v(e[a])?o.push.apply(o,t(e[a],a)):m(e[a])?o.push(dt(a)+":",e[a],";"):o.push(dt(a)+": "+(r=a,(null==(i=e[a])||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||r in c.a?String(i).trim():i+"px")+";")));return n?[n+" {"].concat(o,["}"]):o}(t):t.toString();var u}function yt(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return m(t)||v(t)?gt(d(g,[t].concat(n))):0===n.length&&1===t.length&&"string"==typeof t[0]?t:gt(d(t,n))}new Set;var mt=function(t,e,n){return void 0===n&&(n=y),t.theme!==n.theme&&t.theme||e||n.theme},bt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,wt=/(^-|-$)/g;function _t(t){return t.replace(bt,"-").replace(wt,"")}var Et=function(t){return G($(t)>>>0)};function Ot(t){return"string"==typeof t&&!0}var St=function(t){return"function"==typeof t||"object"==typeof t&&null!==t&&!Array.isArray(t)},Tt=function(t){return"__proto__"!==t&&"constructor"!==t&&"prototype"!==t};function It(t,e,n){var r=t[n];St(e)&&St(r)?Ct(r,e):t[n]=e}function Ct(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];if(St(a))for(var s in a)Tt(s)&&It(t,a[s],s)}return t}var kt=o.a.createContext();kt.Consumer;function Pt(t){var e=Object(i.useContext)(kt),n=Object(i.useMemo)((function(){return function(t,e){return t?m(t)?t(e):Array.isArray(t)||"object"!=typeof t?T(8):e?p({},e,{},t):t:T(14)}(t.theme,e)}),[t.theme,e]);return t.children?o.a.createElement(kt.Provider,{value:n},t.children):null}var At={};function Nt(t,e,n){var r=w(t),a=!Ot(t),s=e.attrs,u=void 0===s?g:s,c=e.componentId,f=void 0===c?function(t,e){var n="string"!=typeof t?"sc":_t(t);At[n]=(At[n]||0)+1;var r=n+"-"+Et("5.2.1"+n+At[n]);return e?e+"-"+r:r}(e.displayName,e.parentComponentId):c,d=e.displayName,v=void 0===d?function(t){return Ot(t)?"styled."+t:"Styled("+b(t)+")"}(t):d,_=e.displayName&&e.componentId?_t(e.displayName)+"-"+e.componentId:e.componentId||f,E=r&&t.attrs?Array.prototype.concat(t.attrs,u).filter(
2Boolean):u,O=e.shouldForwardProp;r&&t.shouldForwardProp&&(O=e.shouldForwardProp?function(n,r){return t.shouldForwardProp(n,r)&&e.shouldForwardProp(n,r)}:t.shouldForwardProp);var S,T=new X(n,_,r?t.componentStyle:void 0),I=T.isStatic&&0===u.length,C=function(t,e){return function(t,e,n,r){var o=t.attrs,a=t.componentStyle,s=t.defaultProps,u=t.foldedComponentIds,c=t.shouldForwardProp,f=t.styledComponentId,h=t.target,d=function(t,e,n){void 0===t&&(t=y);var r=p({},e,{theme:t}),i={};return n.forEach((function(t){var e,n,o,a=t;for(e in m(a)&&(a=a(r)),a)r[e]=i[e]="className"===e?(n=i[e],o=a[e],n&&o?n+" "+o:n||o):a[e]})),[r,i]}(mt(e,Object(i.useContext)(kt),s)||y,e,o),v=d[0],g=d[1],b=function(t,e,n,r){var i=at(),o=st();return e?t.generateAndInjectStyles(y,i,o):t.generateAndInjectStyles(n,i,o)}(a,r,v),w=n,_=g.$as||e.$as||g.as||e.as||h,E=Ot(_),O=g!==e?p({},e,{},g):e,S={};for(var T in O)"$"!==T[0]&&"as"!==T&&("forwardedAs"===T?S.as=O[T]:(c?c(T,l.a):!E||Object(l.a)(T))&&(S[T]=O[T]));return e.style&&g.style!==e.style&&(S.style=p({},e.style,{},g.style)),S.className=Array.prototype.concat(u,f,b!==f?b:null,e.className,g.className).filter(Boolean).join(" "),S.ref=w,Object(i.createElement)(_,S)}(S,t,e,I)};return C.displayName=v,(S=o.a.forwardRef(C)).attrs=E,S.componentStyle=T,S.displayName=v,S.shouldForwardProp=O,S.foldedComponentIds=r?Array.prototype.concat(t.foldedComponentIds,t.styledComponentId):g,S.styledComponentId=_,S.target=r?t.target:t,S.withComponent=function(t){var r=e.componentId,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(e,["componentId"]),o=r&&r+"-"+(Ot(t)?t:_t(b(t)));return Nt(t,p({},i,{attrs:E,componentId:o}),n)},Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=r?Ct({},t.defaultProps,e):e}}),S.toString=function(){return"."+S.styledComponentId},a&&h()(S,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),S}var xt=function(t){return function t(e,n,i){if(void 0===i&&(i=y),!Object(r.isValidElementType)(n))return T(1,String(n));var o=function(){return e(n,i,yt.apply(void 0,arguments))};return o.withConfig=function(r){return t(e,n,p({},i,{},r))},o.attrs=function(r){return t(e,n,p({},i,{attrs:Array.prototype.concat(i.attrs,r).filter(Boolean)}))},o}(Nt,t)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(t){xt[t]=xt(t)}));var jt=function(){function t(t,e){this.rules=t,this.componentId=e,this.isStatic=Y(t),z.registerId(this.componentId+1)}var e=t.prototype;return e.createStyles=function(t,e,n,r){var i=r(gt(this.rules,e,n,r).join(""),""),o=this.componentId+t;n.insertRules(o,o,i)},e.removeStyles=function(t,e){e.clearRules(this.componentId+t)},e.renderStyles=function(t,e,n,r){t>2&&z.registerId(this.componentId+t),this.removeStyles(t,n),this.createStyles(t,e,n,r)},t}();function Rt(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var a=yt.apply(void 0,[t].concat(n)),s="sc-global-"+Et(JSON.stringify(a)),u=new jt(a,s);function c(t){var e=at(),n=st(),r=Object(i.useContext)(kt),o=Object(i.useRef)(e.allocateGSInstance(s)).current;return Object(i.useLayoutEffect)((function(){return l(o,t,e,r,n),function(){return u.removeStyles(o,e)}}),[o,t,e,r,n]),null}function l(t,e,n,r,i){if(u.isStatic)u.renderStyles(t,S,n,i);else{var o=p({},e,{theme:mt(e,r,c.defaultProps)});
2u.renderStyles(t,o,n,i)}}return o.a.memo(c)}!function(){function t(){var t=this;this._emitSheetCSS=function(){var e=t.instance.toString(),n=M();return"<style "+[n&&'nonce="'+n+'"',_+'="true"','data-styled-version="5.2.1"'].filter(Boolean).join(" ")+">"+e+"</style>"},this.getStyleTags=function(){return t.sealed?T(2):t._emitSheetCSS()},this.getStyleElement=function(){var e;if(t.sealed)return T(2);var n=((e={})[_]="",e["data-styled-version"]="5.2.1",e.dangerouslySetInnerHTML={__html:t.instance.toString()},e),r=M();return r&&(n.nonce=r),[o.a.createElement("style",p({},n,{key:"sc-0-0"}))]},this.seal=function(){t.sealed=!0},this.instance=new z({isServer:!0}),this.sealed=!1}var e=t.prototype;e.collectStyles=function(t){return this.sealed?T(2):o.a.createElement(ut,{sheet:this.instance},t)},e.interleaveWithNodeStream=function(t){return T(3)}}();e.c=xt}).call(this,n(44))},function(t,e,n){"use strict";!function t(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}(),t.exports=n(68)},function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return g})),n.d(e,"c",(function(){return w}));var r=n(2),i=n.n(r),o=(n(31),i.a.createContext(null));var a=function(t){t()},s={notify:function(){}};function u(){var t=a,e=null,n=null;return{clear:function(){e=null,n=null},notify:function(){t((function(){for(var t=e;t;)t.callback(),t=t.next}))},get:function(){for(var t=[],n=e;n;)t.push(n),n=n.next;return t},subscribe:function(t){var r=!0,i=n={callback:t,next:null,prev:n};return i.prev?i.prev.next=i:e=i,function(){r&&null!==e&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var c=function(){function t(t,e){this.store=t,this.parentSub=e,this.unsubscribe=null,this.listeners=s,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var e=t.prototype;return e.addNestedSub=function(t){return this.trySubscribe(),this.listeners.subscribe(t)},e.notifyNestedSubs=function(){this.listeners.notify()},e.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},e.isSubscribed=function(){return Boolean(this.unsubscribe)},e.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=u())},e.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=s)},t}();var l=function(t){var e=t.store,n=t.context,a=t.children,s=Object(r.useMemo)((function(){var t=new c(e);return t.onStateChange=t.notifyNestedSubs,{store:e,subscription:t}}),[e]),u=Object(r.useMemo)((function(){return e.getState()}),[e]);Object(r.useEffect)((function(){var t=s.subscription;return t.trySubscribe(),u!==e.getState()&&t.notifyNestedSubs(),function(){t.tryUnsubscribe(),t.onStateChange=null}}),[s,u]);var l=n||o;return i.a.createElement(l.Provider,{value:s},a)},f=(n(4),n(13),n(26),n(30),"undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?r.useLayoutEffect:r.useEffect);n(20);function h(){return Object(r.useContext)(o)}function p(t){void 0===t&&(t=o);var e=t===o?h:function(){return Object(r.useContext)(t)};return function(){return e().store}}var d=p();function v(t){void 0===t&&(t=o);var e=t===o?d:p(t);return function(){return e().dispatch}}var g=v(),y=function(t,e){return t===e};function m(t){void 0===t&&(t=o);var e=t===o?h:function(){return Object(r.useContext)(t)};return function(t,n){void 0===n&&(n=y);var i=e(),o=function(t,e,n,i){var o,a=Object(r.useReducer)((function(t){return t+1}),0)[1],s=Object(r.useMemo)((function(){return new c(n,i)}),[n,i]),u=Object(r.useRef)(),l=Object(r.useRef)(),h=Object(r.useRef)(),p=Object(r.useRef)(),d=n.getState();try{o=t!==l.current||d!==h.current||u.current?t(d):p.current}catch(v){throw u.current&&(v.message+="\nThe error may be correlated with this previous error:\n"+u.current.stack+"\n\n"),v}return f((function(){l.current=t,h.current=d,p.current=o,u.current=void 0})),f((function(){function t(){try{var t=l.current(n.getState());if(e(t,p.current))return;p.current=t}catch(v){u.current=v}a()}return s.onStateChange=t,s.trySubscribe(),t(),function(){return s.tryUnsubscribe()}}),[n,s]),o}(t,n,i.store,i.subscription);return Object(r.useDebugValue)(o),o}}var b,w=m(),_=n(38);b=_.unstable_batchedUpdates,a=b},function(t,e,n){"use strict";function r(t,e){return t===e}function i(t,e,n){if(null===e||null===n||e.length!==n.length)return!1;for(var r=e.length,i=0;i<r;i++)if(!t(e[i],n[i]))return!1;return!0}function o(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every((function(t){return"function"===typeof t}))){var n=e.map((function(t){return typeof t})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return e}n.d(e,"a",(function(){return a}));var a=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function(){for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];var a=0,s=r.pop(),u=o(r),c=t.apply(void 0,[function(){return a++,s.apply(null,arguments)}].concat(n)),l=t((function(){for(var t=[],e=u.length,n=0;n<e;n++)t.push(u[n].apply(null,arguments));return c.apply(null,t)}));return l.resultFunc=s,l.dependencies=u,l.recomputations=function(){return a},l.resetRecomputations=function(){return a=0},l}}((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=null,o=null;return function(){return i(e,n,arguments)||(o=t.apply(null,arguments)),n=arguments,o}}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i.a}));var r,i=n(3),o=(n(75),n(76),n(5)),a=n(1),s=(n(11),n(7)),u=n(6),c={Firestore:s.d,GeoPoint:s.q,Timestamp:s.t,Blob:s.c,Transaction:s.e,WriteBatch:s.p,DocumentReference:s.a,DocumentSnapshot:s.g,Query:s.i,QueryDocumentSnapshot:s.f,QuerySnapsh
2ot:s.m,CollectionReference:s.j,FieldPath:s.o,FieldValue:s.s,setLogLevel:s.b,CACHE_SIZE_UNLIMITED:s.k};(function(t,e){t.INTERNAL.registerComponent(new u.a("firestore",(function(t){return function(t,e){return new s.d(t,new s.h(t,e),new s.r)}(t.getProvider("app").getImmediate(),t.getProvider("auth-internal"))}),"PUBLIC").setServiceProps(Object.assign({},c)))})(r=i.a),r.registerVersion("@firebase/firestore","2.1.1"),function(t){t.prototype.loadBundle=function(t){return Object(s.l)(this,t)},t.prototype.namedQuery=function(t){return Object(s.n)(this,t)}}(s.d);var l=n(0),f={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},h=function(t){function e(n,r,i){var o=t.call(this,r)||this;return Object.setPrototypeOf(o,e.prototype),o.code=n,o.details=i,o}return Object(l.c)(e,t),e}(Error);var p=function(){function t(t,e){var n=this;this.auth=null,this.messaging=null,this.auth=t.getImmediate({optional:!0}),this.messaging=e.getImmediate({optional:!0}),this.auth||t.get().then((function(t){return n.auth=t}),(function(){})),this.messaging||e.get().then((function(t){return n.messaging=t}),(function(){}))}return t.prototype.getAuthToken=function(){return Object(l.b)(this,void 0,void 0,(function(){var t;return Object(l.d)(this,(function(e){switch(e.label){case 0:if(!this.auth)return[2,void 0];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.auth.getToken()];case 2:return(t=e.sent())?[2,t.accessToken]:[2,void 0];case 3:return e.sent(),[2,void 0];case 4:return[2]}}
2))}))},t.prototype.getInstanceIdToken=function(){return Object(l.b)(this,void 0,void 0,(function(){return Object(l.d)(this,(function(t){if(!this.messaging||!("Notification"in self)||"granted"!==Notification.permission)return[2,void 0];try{return[2,this.messaging.getToken()]}catch(r){return[2,void 0]}return[2]}))}))},t.prototype.getContext=function(){return Object(l.b)(this,void 0,void 0,(function(){var t,e;return Object(l.d)(this,(function(n){switch(n.label){case 0:return[4,this.getAuthToken()];case 1:return t=n.sent(),[4,this.getInstanceIdToken()];case 2:return e=n.sent(),[2,{authToken:t,instanceIdToken:e}]}}))}))},t}();function d(t,e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}var v=function(){function t(){}return t.prototype.encode=function(t){var e=this;if(null==t)return null;if(t instanceof Number&&(t=t.valueOf()),"number"===typeof t&&isFinite(t))return t;if(!0===t||!1===t)return t;if("[object String]"===Object.prototype.toString.call(t))return t;if(Array.isArray(t))return t.map((function(t){return e.encode(t)}));if("function"===typeof t||"object"===typeof t)return d(t,(function(t){return e.encode(t)}));throw new Error("Data cannot be encoded in JSON: "+t)},t.prototype.decode=function(t){var e=this;if(null==t)return t;if(t["@type"])switch(t["@type"]){case"type.googleapis.com/google.protobuf.Int64Value":case"type.googleapis.com/google.protobuf.UInt64Value":var n=Number(t.value);if(isNaN(n))throw new Error("Data cannot be decoded from JSON: "+t);return n;default:throw new Error("Data cannot be decoded from JSON: "+t)}return Array.isArray(t)?t.map((function(t){return e.decode(t)})):"function"===typeof t||"object"===typeof t?d(t,(function(t){return e.decode(t)})):t},t}();var g=function(){function t(t,e,n,i,o){var a=this;void 0===i&&(i="us-central1"),this.app_=t,this.fetchImpl=o,this.serializer=new v,this.emulatorOrigin=null,this.INTERNAL={delete:function(){return Promise.resolve(a.deleteService())}},this.contextProvider=new p(e,n),this.cancelAllRequests=new Promise((function(t){a.deleteService=function(){return t()}}));try{var s=new URL(i);this.customDomain=s.origin,this.region="us-central1"}catch(r){this.customDomain=null,this.region=i}}return Object.defineProperty(t.prototype,"app",{get:function(){return this.app_},enumerable:!1,configurable:!0}),t.prototype._url=function(t){var e=this.app_.options.projectId;return null!==this.emulatorOrigin?this.emulatorOrigin+"/"+e+"/"+this.region+"/"+t:null!==this.customDomain?this.customDomain+"/"+t:"https://"+this.region+"-"+e+".cloudfunctions.net/"+t},t.prototype.useEmulator=function(t,e){this.emulatorOrigin="http://"+t+":"+e},t.prototype.useFunctionsEmulator=function(t){this.emulatorOrigin=t},t.prototype.httpsCallable=function(t,e){var n=this;return function(r){return n.call(t,r,e||{})}},t.prototype.postJSON=function(t,e,n){return Object(l.b)(this,void 0,void 0,(function(){var r,i;return Object(l.d)(this,(function(o){switch(o.label){case 0:n["Content-Type"]="application/json",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.fetchImpl(t,{method:"POST",body:JSON.stringify(e),headers:n})];case 2:return r=o.sent(),[3,4];case 3:return o.sent(),[2,{status:0,json:null}];case 4:i=null,o.label=5;case 5:return o.trys.push([5,7,,8]),[4,r.json()];case 6:return i=o.sent(),[3,8];case 7:return o.sent(),[3,8];case 8:return[2,{status:r.status,json:i}]}}))}))},t.prototype.call=function(t,e,n){return Object(l.b)(this,void 0,void 0,(function(){var i,o,a,s,u,c,p,d,v,g,m;return Object(l.d)(this,(function(l){switch(l.label){case 0:return i=this._url(t),e=this.serializer.encode(e),o={data:e},a={},[4,this.contextProvider.getContext()];case 1:return(s=l.sent()).authToken&&(a.Authorization="Bearer "+s.authToken),s.instanceIdToken&&(a["Firebase-Instance-ID-Token"]=s.instanceIdToken),u=n.timeout||7e4,c=function(t){var e,n=new Promise((function(n,r){e=setTimeout((function(){r(new h("deadline-exceeded","deadline-exceeded"))}),t)}));return{timer:e,promise:n}}(u),p=c.timer,d=c.promise,[4,Promise.race([y(p,this.postJSON(i,o,a)),d,y(p,this.cancelAllRequests)])];case 2:if(!(v=l.sent()))throw new h("cancelled","Firebase Functions instance was deleted.");
2if(g=function(t,e,n){var i=function(t){if(t>=200&&t<300)return"ok";switch(t){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}(t),o=i,a=void 0;try{var s=e&&e.error;if(s){var u=s.status;if("string"===typeof u){if(!f[u])return new h("internal","internal");i=f[u],o=u}var c=s.message;"string"===typeof c&&(o=c),void 0!==(a=s.details)&&(a=n.decode(a))}}catch(r){}return"ok"===i?null:new h(i,o,a)}(v.status,v.json,this.serializer))throw g;if(!v.json)throw new h("internal","Response is not valid JSON object.");if("undefined"===typeof(m=v.json.data)&&(m=v.json.result),"undefined"===typeof m)throw new h("internal","Response is missing data field.");return[2,{data:this.serializer.decode(m)}]}}))}))},t}();function y(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n;return Object(l.d)(this,(function(r){switch(r.label){case 0:return[4,e];case 1:return n=r.sent(),clearTimeout(t),[2,n]}}))}))}!function(t,e){var n={Functions:g};t.INTERNAL.registerComponent(new u.a("functions",(function(t,n){var r=t.getProvider("app").getImmediate(),i=t.getProvider("auth-internal"),o=t.getProvider("messaging");return new g(r,i,o,n,e)}),"PUBLIC").setServiceProps(n).setMultipleInstances(!0))}(i.a,fetch.bind(self)),i.a.registerVersion("@firebase/functions","0.6.1");var m,b=n(28),w="0.4.19",_=1e4,E="w:0.4.19",O="FIS_v2",S=36e5,T=((m={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',m["not-registered"]="Firebase Installation is not registered.",m["installation-not-found"]="Firebase Installation not found.",m["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',m["app-offline"]="Could not process request. Application offline.",m["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",m),I=new a.b("installations","Installations",T);function C(t){return t instanceof a.c&&t.code.includes("request-failed")}function k(t){return"https://firebaseinstallations.googleapis.com/v1/projects/"+t.projectId+"/installations"}function P(t){return{token:t.token,requestStatus:2,expiresIn:(e=t.expiresIn,Number(e.replace("s","000"))),creationTime:Date.now()};var e}function A(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r;return Object(l.d)(this,(function(i){switch(i.label){case 0:return[4,e.json()];case 1:return n=i.sent(),r=n.error,[2,I.create("request-failed",{requestName:t,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}}))}))}function N(t){var e=t.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function x(t,e){var n=e.refreshToken,r=N(t);return r.append("Authorization",function(t){return"FIS_v2 "+t}(n)),r}function j(t){return Object(l.b)(this,void 0,void 0,(function(){var e;return Object(l.d)(this,(function(n){switch(n.label){case 0:return[4,t()];case 1:return(e=n.sent()).status>=500&&e.status<600?[2,t()]:[2,e]}}))}))}function R(t,e){var n=e.fid;return Object(l.b)(this,void 0,void 0,(function(){var e,r,i,o,a,s;return Object(l.d)(this,(function(u){switch(u.label){case 0:return e=k(t),r=N(t),i={fid:n,authVersion:O,appId:t.appId,sdkVersion:E},o={method:"POST",headers:r,body:JSON.stringify(i)},[4,j((function(){return fetch(e,o)}))];case 1:return(a=u.sent()).ok?[4,a.json()]:[3,3];case 2:return s=u.sent(),[2,{fid:s.fid||n,registrationStatus:2,refreshToken:s.refreshToken,authToken:P(s.authToken)}];case 3:return[4,A("Create Installation",a)];case 4:throw u.sent()}}))}))}function D(t){return new Promise((function(e){setTimeout(e,t)}))}var L=/^[cdef][\w-]{21}$/;function M(){try{var t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;var e=function(t){return(e=t,btoa(String.fromCharCode.apply(String,Object(l.f)(e))).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22);var e}(t);return L.test(e)?e:""}catch(n){return""}}function F(t){return t.appName+"!"+t.appId}var U=new Map;function V(t,e){var n=F(t);q(n,e),function(t,e){var n=H();n&&n.postMessage({key:t,fid:e});z()}(n,e)}function q(t,e){var n,r,i=U.get(t);if(i)try{for(var o=Object(l.h)(i),a=o.next();!a.done;a=o.next()){(0,a.value)(e)}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}var B=null;function H(){return!B&&"BroadcastChannel"in self&&((B=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(t){q(t.data.key,t.data.fid)}),B}function z(){0===U.size&&B&&(B.close(),B=null)}var K,W,G="firebase-installations-store",Q=null;function $(){return Q||(Q=Object(b.openDb)("firebase-installations-database",1,(function(t){switch(t.oldVersion){case 0:t.createObjectStore(G)}}))),Q}function Y(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(l.d)(this,(function(s){switch(s.label){case 0:return n=F(t),[4,$()];case 1:return r=s.sent(),i=r.transaction(G,"readwrite"),[4,(o=i.objectStore(G)).get(n)];case 2:return a=s.sent(),[4,o.put(e,n)];case 3:return s.sent(),[4,i.complete];
2case 4:return s.sent(),a&&a.fid===e.fid||V(t,e.fid),[2,e]}}))}))}function J(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n,r;return Object(l.d)(this,(function(i){switch(i.label){case 0:return e=F(t),[4,$()];case 1:return n=i.sent(),[4,(r=n.transaction(G,"readwrite")).objectStore(G).delete(e)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function X(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(l.d)(this,(function(u){switch(u.label){case 0:return n=F(t),[4,$()];case 1:return r=u.sent(),i=r.transaction(G,"readwrite"),[4,(o=i.objectStore(G)).get(n)];case 2:return a=u.sent(),void 0!==(s=e(a))?[3,4]:[4,o.delete(n)];case 3:return u.sent(),[3,6];case 4:return[4,o.put(s,n)];case 5:u.sent(),u.label=6;case 6:return[4,i.complete];case 7:return u.sent(),!s||a&&a.fid===s.fid||V(t,s.fid),[2,s]}}))}))}function Z(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n,r;return Object(l.d)(this,(function(i){switch(i.label){case 0:return[4,X(t,(function(n){var r=function(t){return nt(t||{fid:M(),registrationStatus:0})}(n),i=function(t,e){if(0===e.registrationStatus){if(!navigator.onLine)return{installationEntry:e,registrationPromise:Promise.reject(I.create("app-offline"))};var n={fid:e.fid,registrationStatus:1,registrationTime:Date.now()};return{installationEntry:n,registrationPromise:function(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r;return Object(l.d)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,R(t,e)];case 1:return n=i.sent(),[2,Y(t,n)];case 2:return C(r=i.sent())&&409===r.customData.serverCode?[4,J(t)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,Y(t,{fid:e.fid,registrationStatus:0})];case 5:i.sent(),i.label=6;case 6:throw r;case 7:return[2]}}
2))}))}(t,n)}}return 1===e.registrationStatus?{installationEntry:e,registrationPromise:tt(t)}:{installationEntry:e}}(t,r);return e=i.registrationPromise,i.installationEntry}))];case 1:return""!==(n=i.sent()).fid?[3,3]:(r={},[4,e]);case 2:return[2,(r.installationEntry=i.sent(),r)];case 3:return[2,{installationEntry:n,registrationPromise:e}]}}))}))}function tt(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n,r,i;return Object(l.d)(this,(function(o){switch(o.label){case 0:return[4,et(t)];case 1:e=o.sent(),o.label=2;case 2:return 1!==e.registrationStatus?[3,5]:[4,D(100)];case 3:return o.sent(),[4,et(t)];case 4:return e=o.sent(),[3,2];case 5:return 0!==e.registrationStatus?[3,7]:[4,Z(t)];case 6:return n=o.sent(),r=n.installationEntry,(i=n.registrationPromise)?[2,i]:[2,r];case 7:return[2,e]}}))}))}function et(t){return X(t,(function(t){if(!t)throw I.create("installation-not-found");return nt(t)}))}function nt(t){return 1===(e=t).registrationStatus&&e.registrationTime+_<Date.now()?{fid:t.fid,registrationStatus:0}:t;var e}function rt(t,e){var n=t.appConfig,r=t.platformLoggerProvider;return Object(l.b)(this,void 0,void 0,(function(){var t,i,o,a,s,u,c;return Object(l.d)(this,(function(l){switch(l.label){case 0:return t=function(t,e){var n=e.fid;return k(t)+"/"+n+"/authTokens:generate"}(n,e),i=x(n,e),(o=r.getImmediate({optional:!0}))&&i.append("x-firebase-client",o.getPlatformInfoString()),a={installation:{sdkVersion:E}},s={method:"POST",headers:i,body:JSON.stringify(a)},[4,j((function(){return fetch(t,s)}))];case 1:return(u=l.sent()).ok?[4,u.json()]:[3,3];case 2:return c=l.sent(),[2,P(c)];case 3:return[4,A("Generate Auth Token",u)];case 4:throw l.sent()}}))}))}function it(t,e){return void 0===e&&(e=!1),Object(l.b)(this,void 0,void 0,(function(){var n,r,i;return Object(l.d)(this,(function(o){switch(o.label){case 0:return[4,X(t.appConfig,(function(r){if(!at(r))throw I.create("not-registered");var i=r.authToken;if(!e&&function(t){return 2===t.requestStatus&&!function(t){var e=Date.now();return e<t.creationTime||t.creationTime+t.expiresIn<e+S}(t)}(i))return r;if(1===i.requestStatus)return n=function(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r;return Object(l.d)(this,(function(i){switch(i.label){case 0:return[4,ot(t.appConfig)];case 1:n=i.sent(),i.label=2;case 2:return 1!==n.authToken.requestStatus?[3,5]:[4,D(100)];case 3:return i.sent(),[4,ot(t.appConfig)];case 4:return n=i.sent(),[3,2];case 5:return 0===(r=n.authToken).requestStatus?[2,it(t,e)]:[2,r]}}))}))}(t,e),r;if(!navigator.onLine)throw I.create("app-offline");var o=function(t){var e={requestStatus:1,requestTime:Date.now()};return Object(l.a)(Object(l.a)({},t),{authToken:e})}(r);return n=function(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r,i;return Object(l.d)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,8]),[4,rt(t,e)];case 1:return n=o.sent(),i=Object(l.a)(Object(l.a)({},e),{authToken:n}),[4,Y(t.appConfig,i)];case 2:return o.sent(),[2,n];case 3:return!C(r=o.sent())||401!==r.customData.serverCode&&404!==r.customData.serverCode?[3,5]:[4,J(t.appConfig)];case 4:return o.sent(),[3,7];case 5:return i=Object(l.a)(Object(l.a)({},e),{authToken:{requestStatus:0}}),[4,Y(t.appConfig,i)];case 6:o.sent(),o.label=7;case 7:throw r;case 8:return[2]}}
2))}))}(t,o),o}))];case 1:return r=o.sent(),n?[4,n]:[3,3];case 2:return i=o.sent(),[3,4];case 3:i=r.authToken,o.label=4;case 4:return[2,i]}}))}))}function ot(t){return X(t,(function(t){if(!at(t))throw I.create("not-registered");var e,n=t.authToken;return 1===(e=n).requestStatus&&e.requestTime+_<Date.now()?Object(l.a)(Object(l.a)({},t),{authToken:{requestStatus:0}}):t}))}function at(t){return void 0!==t&&2===t.registrationStatus}function st(t){return Object(l.b)(this,void 0,void 0,(function(){var e;return Object(l.d)(this,(function(n){switch(n.label){case 0:return[4,Z(t)];case 1:return(e=n.sent().registrationPromise)?[4,e]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}function ut(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r,i,o;return Object(l.d)(this,(function(a){switch(a.label){case 0:return n=function(t,e){var n=e.fid;return k(t)+"/"+n}(t,e),r=x(t,e),i={method:"DELETE",headers:r},[4,j((function(){return fetch(n,i)}))];case 1:return(o=a.sent()).ok?[3,3]:[4,A("Delete Installation",o)];case 2:throw a.sent();case 3:return[2]}}
2))}))}function ct(t,e){var n=t.appConfig;return function(t,e){H();var n=F(t),r=U.get(n);r||(r=new Set,U.set(n,r)),r.add(e)}(n,e),function(){!function(t,e){var n=F(t),r=U.get(n);r&&(r.delete(e),0===r.size&&U.delete(n),z())}(n,e)}}function lt(t){return I.create("missing-app-config-values",{valueName:t})}(K=i.a).INTERNAL.registerComponent(new u.a("installations",(function(t){var e=t.getProvider("app").getImmediate(),n={appConfig:function(t){var e,n;if(!t||!t.options)throw lt("App Configuration");if(!t.name)throw lt("App Name");try{for(var r=Object(l.h)(["projectId","apiKey","appId"]),i=r.next();!i.done;i=r.next()){var o=i.value;if(!t.options[o])throw lt(o)}}catch(a){e={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}(e),platformLoggerProvider:t.getProvider("platform-logger")};return{app:e,getId:function(){return function(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n,r;return Object(l.d)(this,(function(i){switch(i.label){case 0:return[4,Z(t.appConfig)];case 1:return e=i.sent(),n=e.installationEntry,(r=e.registrationPromise)?r.catch(console.error):it(t).catch(console.error),[2,n.fid]}}))}))}(n)},getToken:function(t){return function(t,e){return void 0===e&&(e=!1),Object(l.b)(this,void 0,void 0,(function(){return Object(l.d)(this,(function(n){switch(n.label){case 0:return[4,st(t.appConfig)];case 1:return n.sent(),[4,it(t,e)];case 2:return[2,n.sent().token]}}))}))}(n,t)},delete:function(){return function(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n;return Object(l.d)(this,(function(r){switch(r.label){case 0:return[4,X(e=t.appConfig,(function(t){if(!t||0!==t.registrationStatus)return t}))];case 1:if(!(n=r.sent()))return[3,6];if(1!==n.registrationStatus)return[3,2];throw I.create("delete-pending-registration");case 2:if(2!==n.registrationStatus)return[3,6];if(navigator.onLine)return[3,3];throw I.create("app-offline");case 3:return[4,ut(e,n)];case 4:return r.sent(),[4,J(e)];case 5:r.sent(),r.label=6;case 6:return[2]}}
2))}))}(n)},onIdChange:function(t){return ct(n,t)}}}),"PUBLIC")),K.registerVersion("@firebase/installations",w);var ft,ht=((W={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',W["only-available-in-window"]="This method is available in a Window context.",W["only-available-in-sw"]="This method is available in a service worker context.",W["permission-default"]="The notification permission was not granted and dismissed instead.",W["permission-blocked"]="The notification permission was not granted and blocked instead.",W["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",W["failed-service-worker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",W["token-subscribe-failed"]="A problem occurred while subscribing the user to FCM: {$errorInfo}",W["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",W["token-unsubscribe-failed"]="A problem occurred while unsubscribing the user from FCM: {$errorInfo}",W["token-update-failed"]="A problem occurred while updating the user from FCM: {$errorInfo}",W["token-update-no-token"]="FCM returned no token when updating the user to push.",W["use-sw-after-get-token"]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",W["invalid-sw-registration"]="The input to useServiceWorker() must be a ServiceWorkerRegistration.",W["invalid-bg-handler"]="The input to setBackgroundMessageHandler() must be a function.",W["invalid-vapid-key"]="The public VAPID key must be a string.",W["use-vapid-key-after-get-token"]="The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used.",W),pt=new a.b("messaging","Messaging",ht),dt="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",vt="google.c.a.c_id";function gt(t){var e=new Uint8Array(t);return btoa(String.fromCharCode.apply(String,Object(l.f)(e))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function yt(t){for(var e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(e),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}!function(t){t.PUSH_RECEIVED="push-received",t.NOTIFICATION_CLICKED="notification-clicked"}(ft||(ft={}));var mt="fcm_token_details_db",bt="fcm_token_object_Store";function wt(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n,r=this;return Object(l.d)(this,(function(i){switch(i.label){case 0:return"databases"in indexedDB?[4,indexedDB.databases()]:[3,2];case 1:if(e=i.sent(),!e.map((function(t){return t.name})).includes(mt))return[2,null];i.label=2;case 2:return n=null,[4,Object(b.openDb)(mt,5,(function(e){return Object(l.b)(r,void 0,void 0,(function(){var r,i,o,a;return Object(l.d)(this,(function(s){switch(s.label){case 0:return e.oldVersion<2?[2]:e.objectStoreNames.contains(bt)?[4,(r=e.transaction.objectStore(bt)).index("fcmSenderId").get(t)]:[2];case 1:return i=s.sent(),[4,r.clear()];case 2:if(s.sent(),!i)return[2];if(2===e.oldVersion){if(!(o=i).auth||!o.p256dh||!o.endpoint)return[2];n={token:o.fcmToken,createTime:null!==(a=o.createTime)&&void 0!==a?a:Date.now(),subscriptionOptions:{auth:o.auth,p256dh:o.p256dh,endpoint:o.endpoint,swScope:o.swScope,vapidKey:"string"===typeof o.vapidKey?o.vapidKey:gt(o.vapidKey)}}}else(3===e.oldVersion||4===e.oldVersion)&&(n={token:(o=i).fcmToken,createTime:o.createTime,subscriptionOptions:{auth:gt(o.auth),p256dh:gt(o.p256dh),endpoint:o.endpoint,swScope:o.swScope,vapidKey:gt(o.vapidKey)}});return[2]}}))}))}))];case 3:return i.sent().close(),[4,Object(b.deleteDb)(mt)];case 4:return i.sent(),[4,Object(b.deleteDb)("fcm_vapid_details_db")];case 5:return i.sent(),[4,Object(b.deleteDb)("undefined")];case 6:return i.sent(),[2,_t(n)?n:null]}}))}))}function _t(t){if(!t||!t.subscriptionOptions)return!1;var e=t.subscriptionOptions;return"number"===typeof t.createTime&&t.createTime>0&&"string"===typeof t.token&&t.token.length>0&&"string"===typeof e.auth&&e.auth.length>0&&"string"===typeof e.p256dh&&e.p256dh.length>0&&"string"===typeof e.endpoint&&e.endpoint.length>0&&"string"===typeof e.swScope&&e.swScope.length>0&&"string"===typeof e.vapidKey&&e.vapidKey.length>0}var Et="firebase-messaging-store",Ot=null;function St(){return Ot||(Ot=Object(b.openDb)("firebase-messaging-database",1,(function(t){switch(t.oldVersion){case 0:t.createObjectStore(Et)}}))),Ot}function Tt(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n,r;return Object(l.d)(this,(function(i){switch(i.label){case 0:return e=kt(t),[4,St()];case 1:return[4,i.sent().transaction(Et).objectStore(Et).get(e)];case 2:return(n=i.sent())?[2,n]:[3,3];case 3:return[4,wt(t.appConfig.senderId)];case 4:return(r=i.sent())?[4,It(t,r)]:[3,6];case 5:return i.sent(),[2,r];case 6:return[2]}}
2))}))}function It(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r,i;return Object(l.d)(this,(function(o){switch(o.label){case 0:return n=kt(t),[4,St()];case 1:return r=o.sent(),[4,(i=r.transaction(Et,"readwrite")).objectStore(Et).put(e,n)];case 2:return o.sent(),[4,i.complete];case 3:return o.sent(),[2,e]}}))}))}function Ct(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n,r;return Object(l.d)(this,(function(i){switch(i.label){case 0:return e=kt(t),[4,St()];case 1:return n=i.sent(),[4,(r=n.transaction(Et,"readwrite")).objectStore(Et).delete(e)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function kt(t){return t.appConfig.appId}function Pt(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(l.d)(this,(function(u){switch(u.label){case 0:return[4,jt(t)];case 1:n=u.sent(),r=Rt(e),i={method:"POST",headers:n,body:JSON.stringify(r)},u.label=2;case 2:return u.trys.push([2,5,,6]),[4,fetch(xt(t.appConfig),i)];case 3:return[4,u.sent().json()];case 4:return o=u.sent(),[3,6];case 5:throw a=u.sent(),pt.create("token-subscribe-failed",{errorInfo:a});case 6:if(o.error)throw s=o.error.message,pt.create("token-subscribe-failed",{errorInfo:s});if(!o.token)throw pt.create("token-subscribe-no-token");return[2,o.token]}}))}))}function At(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(l.d)(this,(function(u){switch(u.label){case 0:return[4,jt(t)];case 1:n=u.sent(),r=Rt(e.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)},u.label=2;case 2:return u.trys.push([2,5,,6]),[4,fetch(xt(t.appConfig)+"/"+e.token,i)];case 3:return[4,u.sent().json()];case 4:return o=u.sent(),[3,6];case 5:throw a=u.sent(),pt.create("token-update-failed",{errorInfo:a});case 6:if(o.error)throw s=o.error.message,pt.create("token-update-failed",{errorInfo:s});if(!o.token)throw pt.create("token-update-no-token");return[2,o.token]}}))}))}function Nt(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(l.d)(this,(function(s){switch(s.label){case 0:return[4,jt(t)];case 1:n=s.sent(),r={method:"DELETE",headers:n},s.label=2;case 2:return s.trys.push([2,5,,6]),[4,fetch(xt(t.appConfig)+"/"+e,r)];case 3:return[4,s.sent().json()];case 4:if((i=s.sent()).error)throw o=i.error.message,pt.create("token-unsubscribe-failed",{errorInfo:o});return[3,6];case 5:throw a=s.sent(),pt.create("token-unsubscribe-failed",{errorInfo:a});case 6:return[2]}}
2))}))}function xt(t){return"https://fcmregistrations.googleapis.com/v1/projects/"+t.projectId+"/registrations"}function jt(t){var e=t.appConfig,n=t.installations;return Object(l.b)(this,void 0,void 0,(function(){var t;return Object(l.d)(this,(function(r){switch(r.label){case 0:return[4,n.getToken()];case 1:return t=r.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":"FIS "+t})]}}))}))}function Rt(t){var e=t.p256dh,n=t.auth,r=t.endpoint,i=t.vapidKey,o={web:{endpoint:r,auth:n,p256dh:e}};return i!==dt&&(o.web.applicationPubKey=i),o}function Dt(t,e,n){return Object(l.b)(this,void 0,void 0,(function(){var r,i,o,a;return Object(l.d)(this,(function(s){switch(s.label){case 0:if("granted"!==Notification.permission)throw pt.create("permission-blocked");return[4,Ut(e,n)];case 1:return r=s.sent(),[4,Tt(t)];case 2:return i=s.sent(),o={vapidKey:n,swScope:e.scope,endpoint:r.endpoint,auth:gt(r.getKey("auth")),p256dh:gt(r.getKey("p256dh"))},i?[3,3]:[2,Ft(t,o)];case 3:if(function(t,e){var n=e.vapidKey===t.vapidKey,r=e.endpoint===t.endpoint,i=e.auth===t.auth,o=e.p256dh===t.p256dh;return n&&r&&i&&o}(i.subscriptionOptions,o))return[3,8];s.label=4;case 4:return s.trys.push([4,6,,7]),[4,Nt(t,i.token)];case 5:return s.sent(),[3,7];case 6:return a=s.sent(),console.warn(a),[3,7];case 7:return[2,Ft(t,o)];case 8:return Date.now()>=i.createTime+6048e5?[2,Mt({token:i.token,createTime:Date.now(),subscriptionOptions:o},t,e)]:[2,i.token];case 9:return[2]}}
2))}))}function Lt(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r;return Object(l.d)(this,(function(i){switch(i.label){case 0:return[4,Tt(t)];case 1:return(n=i.sent())?[4,Nt(t,n.token)]:[3,4];case 2:return i.sent(),[4,Ct(t)];case 3:i.sent(),i.label=4;case 4:return[4,e.pushManager.getSubscription()];case 5:return(r=i.sent())?[2,r.unsubscribe()]:[2,!0]}}))}))}function Mt(t,e,n){return Object(l.b)(this,void 0,void 0,(function(){var r,i,o;return Object(l.d)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,5]),[4,At(e,t)];case 1:return r=a.sent(),i=Object(l.a)(Object(l.a)({},t),{token:r,createTime:Date.now()}),[4,It(e,i)];case 2:return a.sent(),[2,r];case 3:return o=a.sent(),[4,Lt(e,n)];case 4:throw a.sent(),o;case 5:return[2]}}))}))}function Ft(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r;return Object(l.d)(this,(function(i){switch(i.label){case 0:return[4,Pt(t,e)];case 1:return n=i.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:e},[4,It(t,r)];case 2:return i.sent(),[2,r.token]}}))}))}function Ut(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n;return Object(l.d)(this,(function(r){switch(r.label){case 0:return[4,t.pushManager.getSubscription()];case 1:return(n=r.sent())?[2,n]:[2,t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:yt(e)})]}}))}))}function Vt(t){return"object"===typeof t&&!!t&&vt in t}function qt(t){return new Promise((function(e){setTimeout(e,t)}))}var Bt=function(){function t(t){var e=this;this.firebaseDependencies=t,this.isOnBackgroundMessageUsed=null,this.vapidKey=null,this.bgMessageHandler=null,self.addEventListener("push",(function(t){t.waitUntil(e.onPush(t))})),self.addEventListener("pushsubscriptionchange",(function(t){t.waitUntil(e.onSubChange(t))})),self.addEventListener("notificationclick",(function(t){t.waitUntil(e.onNotificationClick(t))}))}return Object.defineProperty(t.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),t.prototype.setBackgroundMessageHandler=function(t){if(this.isOnBackgroundMessageUsed=!1,!t||"function"!==typeof t)throw pt.create("invalid-bg-handler");this.bgMessageHandler=t},t.prototype.onBackgroundMessage=function(t){var e=this;return this.isOnBackgroundMessageUsed=!0,this.bgMessageHandler=t,function(){e.bgMessageHandler=null}},t.prototype.getToken=function(){var t,e;return Object(l.b)(this,void 0,void 0,(function(){var n;return Object(l.d)(this,(function(r){switch(r.label){case 0:return this.vapidKey?[3,2]:[4,Tt(this.firebaseDependencies)];case 1:n=r.sent(),this.vapidKey=null!==(e=null===(t=null===n||void 0===n?void 0:n.subscriptionOptions)||void 0===t?void 0:t.vapidKey)&&void 0!==e?e:dt,r.label=2;case 2:return[2,Dt(this.firebaseDependencies,self.registration,this.vapidKey)]}}))}))},t.prototype.deleteToken=function(){return Lt(this.firebaseDependencies,self.registration)},t.prototype.requestPermission=function(){throw pt.create("only-available-in-window")},t.prototype.usePublicVapidKey=function(t){if(null!==this.vapidKey)throw pt.create("use-vapid-key-after-get-token");if("string"!==typeof t||0===t.length)throw pt.create("invalid-vapid-key");this.vapidKey=t},t.prototype.useServiceWorker=function(){throw pt.create("only-available-in-window")},t.prototype.onMessage=function(){throw pt.create("only-available-in-window")},t.prototype.onTokenRefresh=function(){throw pt.create("only-available-in-window")},t.prototype.onPush=function(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n,r,i;return Object(l.d)(this,(function(o){switch(o.label){case 0:return(e=function(t){var e=t.data;if(!e)return null;try{return e.json()}catch(n){return null}}(t))?[4,Wt()]:(console.debug("FirebaseMessaging: failed to get parsed MessagePayload from the PushEvent. Skip handling the push."),[2]);case 1:return function(t){return t.some((function(t){return"visible"===t.visibilityState&&!t.url.startsWith("chrome-extension://")}))}(n=o.sent())?[2,Kt(n,e)]:(r=!1,e.notification?[4,Gt(Ht(e))]:[3,3]);case 2:o.sent(),r=!0,o.label=3;
2case 3:return!0===r&&!1===this.isOnBackgroundMessageUsed?[2]:(this.bgMessageHandler&&(i=function(t){var e={from:t.from,collapseKey:t.collapse_key};return function(t,e){if(e.notification){t.notification={};var n=e.notification.title;n&&(t.notification.title=n);var r=e.notification.body;r&&(t.notification.body=r);var i=e.notification.image;i&&(t.notification.image=i)}}(e,t),function(t,e){e.data&&(t.data=e.data)}(e,t),function(t,e){if(e.fcmOptions){t.fcmOptions={};var n=e.fcmOptions.link;n&&(t.fcmOptions.link=n);var r=e.fcmOptions.analytics_label;r&&(t.fcmOptions.analyticsLabel=r)}}(e,t),e}(e),"function"===typeof this.bgMessageHandler?this.bgMessageHandler(i):this.bgMessageHandler.next(i)),[4,qt(1e3)]);case 4:return o.sent(),[2]}}))}))},t.prototype.onSubChange=function(t){var e,n;return Object(l.b)(this,void 0,void 0,(function(){var r;return Object(l.d)(this,(function(i){switch(i.label){case 0:return t.newSubscription?[3,2]:[4,Lt(this.firebaseDependencies,self.registration)];case 1:return i.sent(),[2];case 2:return[4,Tt(this.firebaseDependencies)];case 3:return r=i.sent(),[4,Lt(this.firebaseDependencies,self.registration)];case 4:return i.sent(),[4,Dt(this.firebaseDependencies,self.registration,null!==(n=null===(e=null===r||void 0===r?void 0:r.subscriptionOptions)||void 0===e?void 0:e.vapidKey)&&void 0!==n?n:dt)];case 5:return i.sent(),[2]}}))}))},t.prototype.onNotificationClick=function(t){var e,n;return Object(l.b)(this,void 0,void 0,(function(){var r,i,o,a,s;return Object(l.d)(this,(function(u){switch(u.label){case 0:return(r=null===(n=null===(e=t.notification)||void 0===e?void 0:e.data)||void 0===n?void 0:n.FCM_MSG)?t.action?[2]:(t.stopImmediatePropagation(),t.notification.close(),(i=function(t){var e,n,r,i=null!==(n=null===(e=t.fcmOptions)||void 0===e?void 0:e.link)&&void 0!==n?n:null===(r=t.notification)||void 0===r?void 0:r.click_action;if(i)return i;return Vt(t.data)?self.location.origin:null}(r))?(o=new URL(i,self.location.href),a=new URL(self.location.origin),o.host!==a.host?[2]:[4,zt(o)]):[2]):[2];case 1:return(s=u.sent())?[3,4]:[4,self.clients.openWindow(i)];case 2:return s=u.sent(),[4,qt(3e3)];case 3:return u.sent(),[3,6];case 4:return[4,s.focus()];case 5:s=u.sent(),u.label=6;case 6:return s?(r.messageType=ft.NOTIFICATION_CLICKED,r.isFirebaseMessaging=!0,[2,s.postMessage(r)]):[2]}}))}))},t}();function Ht(t){var e,n=Object(l.a)({},t.notification);return n.data=((e={}).FCM_MSG=t,e),n}function zt(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n,r,i,o,a,s;return Object(l.d)(this,(function(u){switch(u.label){case 0:return[4,Wt()];case 1:e=u.sent();try{for(n=Object(l.h)(e),r=n.next();!r.done;r=n.next())if(i=r.value,o=new URL(i.url,self.location.href),t.host===o.host)return[2,i]}catch(c){a={error:c}}finally{try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}}return[2,null]}}))}))}function Kt(t,e){var n,r;e.isFirebaseMessaging=!0,e.messageType=ft.PUSH_RECEIVED;try{for(var i=Object(l.h)(t),o=i.next();!o.done;o=i.next()){o.value.postMessage(e)}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function Wt(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function Gt(t){var e,n=t.actions,r=Notification.maxActions;return n&&r&&n.length>r&&console.warn("This browser only supports "+r+" actions. The remaining actions will not be displayed."),self.registration.showNotification(null!==(e=t.title)&&void 0!==e?e:"",t)}var Qt=function(){function t(t){var e=this;this.firebaseDependencies=t,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",(function(t){return e.messageEventListener(t)}))}return Object.defineProperty(t.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),t.prototype.messageEventListener=function(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n;return Object(l.d)(this,(function(r){switch(r.label){case 0:return(e=t.data).isFirebaseMessaging?(this.onMessageCallback&&e.messageType===ft.PUSH_RECEIVED&&("function"===typeof this.onMessageCallback?this.onMessageCallback(function(t){return delete t.messageType,delete t.isFirebaseMessaging,t}(Object.assign({},e))):this.onMessageCallback.next(Object.assign({},e))),Vt(n=e.data)&&"1"===n["google.c.a.e"]?[4,this.logEvent(e.messageType,n)]:[3,2]):[2];case 1:r.sent(),r.label=2;case 2:return[2]}}
2))}))},t.prototype.getVapidKey=function(){return this.vapidKey},t.prototype.getSwReg=function(){return this.swRegistration},t.prototype.getToken=function(t){return Object(l.b)(this,void 0,void 0,(function(){return Object(l.d)(this,(function(e){switch(e.label){case 0:return"default"!==Notification.permission?[3,2]:[4,Notification.requestPermission()];case 1:e.sent(),e.label=2;case 2:if("granted"!==Notification.permission)throw pt.create("permission-blocked");return[4,this.updateVapidKey(null===t||void 0===t?void 0:t.vapidKey)];case 3:return e.sent(),[4,this.updateSwReg(null===t||void 0===t?void 0:t.serviceWorkerRegistration)];case 4:return e.sent(),[2,Dt(this.firebaseDependencies,this.swRegistration,this.vapidKey)]}}))}))},t.prototype.updateVapidKey=function(t){return Object(l.b)(this,void 0,void 0,(function(){return Object(l.d)(this,(function(e){return t?this.vapidKey=t:this.vapidKey||(this.vapidKey=dt),[2]}))}))},t.prototype.updateSwReg=function(t){return Object(l.b)(this,void 0,void 0,(function(){return Object(l.d)(this,(function(e){switch(e.label){case 0:return t||this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:e.sent(),e.label=2;case 2:if(!t&&this.swRegistration)return[2];if(!(t instanceof ServiceWorkerRegistration))throw pt.create("invalid-sw-registration");return this.swRegistration=t,[2]}}))}))},t.prototype.registerDefaultSw=function(){return Object(l.b)(this,void 0,void 0,(function(){var t,e;return Object(l.d)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=this,[4,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"})];case 1:return t.swRegistration=n.sent(),this.swRegistration.update().catch((function(){})),[3,3];case 2:throw e=n.sent(),pt.create("failed-service-worker-registration",{browserErrorMessage:e.message});case 3:return[2]}}
2))}))},t.prototype.deleteToken=function(){return Object(l.b)(this,void 0,void 0,(function(){return Object(l.d)(this,(function(t){switch(t.label){case 0:return this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:t.sent(),t.label=2;case 2:return[2,Lt(this.firebaseDependencies,this.swRegistration)]}}))}))},t.prototype.requestPermission=function(){return Object(l.b)(this,void 0,void 0,(function(){var t;return Object(l.d)(this,(function(e){switch(e.label){case 0:return"granted"===Notification.permission?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(t=e.sent()))return[2];throw"denied"===t?pt.create("permission-blocked"):pt.create("permission-default")}}))}))},t.prototype.usePublicVapidKey=function(t){if(null!==this.vapidKey)throw pt.create("use-vapid-key-after-get-token");if("string"!==typeof t||0===t.length)throw pt.create("invalid-vapid-key");this.vapidKey=t},t.prototype.useServiceWorker=function(t){if(!(t instanceof ServiceWorkerRegistration))throw pt.create("invalid-sw-registration");if(this.swRegistration)throw pt.create("use-sw-after-get-token");this.swRegistration=t},t.prototype.onMessage=function(t){var e=this;return this.onMessageCallback=t,function(){e.onMessageCallback=null}},t.prototype.setBackgroundMessageHandler=function(){throw pt.create("only-available-in-sw")},t.prototype.onBackgroundMessage=function(){throw pt.create("only-available-in-sw")},t.prototype.onTokenRefresh=function(){return function(){}},t.prototype.logEvent=function(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n;return Object(l.d)(this,(function(r){switch(r.label){case 0:return n=function(t){switch(t){case ft.NOTIFICATION_CLICKED:return"notification_open";case ft.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(t),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return r.sent().logEvent(n,{message_id:e["google.c.a.c_id"],message_name:e["google.c.a.c_l"],message_time:e["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)}),[2]}}))}))},t}();function $t(t){return pt.create("missing-app-config-values",{valueName:t})}var Yt={isSupported:Jt};function Jt(){return self&&"ServiceWorkerGlobalScope"in self?"indexedDB"in self&&null!==indexedDB&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):"indexedDB"in window&&null!==indexedDB&&navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}i.a.INTERNAL.registerComponent(new u.a("messaging",(function(t){var e=t.getProvider("app").getImmediate(),n={app:e,appConfig:function(t){var e,n;if(!t||!t.options)throw $t("App Configuration Object");if(!t.name)throw $t("App Name");var r=t.options;try{for(var i=Object(l.h)(["projectId","apiKey","appId","messagingSenderId"]),o=i.next();!o.done;o=i.next()){var a=o.value;if(!r[a])throw $t(a)}}catch(s){e={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return{appName:t.name,projectId:r.projectId,apiKey:r.apiKey,appId:r.appId,senderId:r.messagingSenderId}}(e),installations:t.getProvider("installations").getImmediate(),analyticsProvider:t.getProvider("analytics-internal")};if(!Jt())throw pt.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new Bt(n):new Qt(n)}),"PUBLIC").setServiceProps(Yt));var Xt="firebasestorage.googleapis.com",Zt=function(t){function e(n,r){var i=t.call(this,be(n),"Firebase Storage: "+r+" ("+be(n)+")")||this;return i.customData={serverResponse:null},Object.setPrototypeOf(i,e.prototype),i}return Object(l.c)(e,t),e.prototype.codeEquals=function(t){return be(t)===this.code},Object.defineProperty(e.prototype,"message",{get:function(){return this.customData.serverResponse?this.message+"\n"+this.customData.serverResponse:this.message},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"serverResponse",{get:function(){return this.customData.serverResponse},set:function(t){this.customData.serverResponse=t}
2,enumerable:!1,configurable:!0}),e}(a.c),te="unknown",ee="object-not-found",ne="quota-exceeded",re="unauthenticated",ie="unauthorized",oe="retry-limit-exceeded",ae="canceled",se="invalid-url",ue="invalid-default-bucket",ce="no-default-bucket",le="cannot-slice-blob",fe="server-file-wrong-size",he="no-download-url",pe="invalid-argument",de="app-deleted",ve="invalid-root-operation",ge="invalid-format",ye="internal-error",me="unsupported-environment";function be(t){return"storage/"+t}function we(){return new Zt(te,"An unknown error occurred, please check the error payload for server response.")}function _e(){return new Zt(ae,"User canceled the upload/download.")}function Ee(){return new Zt(le,"Cannot slice blob for upload. Please retry the upload.")}function Oe(t){return new Zt(pe,t)}function Se(){return new Zt(de,"The Firebase app was deleted.")}function Te(t){return new Zt(ve,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function Ie(t,e){return new Zt(ge,"String does not match format '"+t+"': "+e)}function Ce(t){throw new Zt(ye,"Internal error: "+t)}var ke={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},Pe=function(t,e){this.data=t,this.contentType=e||null};function Ae(t,e){switch(t){case ke.RAW:return new Pe(Ne(e));case ke.BASE64:case ke.BASE64URL:return new Pe(xe(t,e));case ke.DATA_URL:return new Pe(function(t){var e=new je(t);return e.base64?xe(ke.BASE64,e.rest):function(t){var e;try{e=decodeURIComponent(t)}catch(r){throw Ie(ke.DATA_URL,"Malformed data URL.")}return Ne(e)}(e.rest)}(e),new je(e).contentType)}throw we()}function Ne(t){for(var e=[],n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r<=127)e.push(r);else if(r<=2047)e.push(192|r>>6,128|63&r);else if(55296===(64512&r))if(n<t.length-1&&56320===(64512&t.charCodeAt(n+1)))r=65536|(1023&r)<<10|1023&t.charCodeAt(++n),e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r);else e.push(239,191,189);else 56320===(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function xe(t,e){switch(t){case ke.BASE64:var n=-1!==e.indexOf("-"),i=-1!==e.indexOf("_");if(n||i)throw Ie(t,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case ke.BASE64URL:var o=-1!==e.indexOf("+"),a=-1!==e.indexOf("/");if(o||a)throw Ie(t,"Invalid character '"+(o?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/")}var s;try{s=atob(e)}catch(r){throw Ie(t,"Invalid character found")}for(var u=new Uint8Array(s.length),c=0;c<s.length;c++)u[c]=s.charCodeAt(c);return u}var je=function(t){this.base64=!1,this.contentType=null;var e=t.match(/^data:([^,]+)?,/);if(null===e)throw Ie(ke.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");var n=e[1]||null;null!=n&&(this.base64=(r=n,i=";base64",r.length>=i.length&&r.substring(r.length-i.length)===i),this.contentType=this.base64?n.substring(0,n.length-";base64".length):n),this.rest=t.substring(t.indexOf(",")+1);var r,i};var Re,De={STATE_CHANGED:"state_changed"},Le="running",Me="pausing",Fe="paused",Ue="success",Ve="canceling",qe="canceled",Be="error",He={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function ze(t){switch(t){case Le:case Me:case Ve:return He.RUNNING;case Fe:return He.PAUSED;case Ue:return He.SUCCESS;case qe:return He.CANCELED;case Be:default:return He.ERROR}}!function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"}(Re||(Re={}));var Ke=function(){function t(){var t=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=Re.NO_ERROR,this.sendPromise_=new Promise((function(e){t.xhr_.addEventListener("abort",(function(){t.errorCode_=Re.ABORT,e(t)})),t.xhr_.addEventListener("error",(function(){t.errorCode_=Re.NETWORK_ERROR,e(t)})),t.xhr_.addEventListener("load",(function(){e(t)}))}))}return t.prototype.send=function(t,e,n,r){if(this.sent_)throw Ce("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(e,t,!0),void 0!==r)for(var i in r)r.hasOwnProperty(i)&&this.xhr_.setRequestHeader(i,r[i].toString());return void 0!==n?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_}
2,t.prototype.getErrorCode=function(){if(!this.sent_)throw Ce("cannot .getErrorCode() before sending");return this.errorCode_},t.prototype.getStatus=function(){if(!this.sent_)throw Ce("cannot .getStatus() before sending");try{return this.xhr_.status}catch(r){return-1}},t.prototype.getResponseText=function(){if(!this.sent_)throw Ce("cannot .getResponseText() before sending");return this.xhr_.responseText},t.prototype.abort=function(){this.xhr_.abort()},t.prototype.getResponseHeader=function(t){return this.xhr_.getResponseHeader(t)},t.prototype.addUploadProgressListener=function(t){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",t)},t.prototype.removeUploadProgressListener=function(t){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",t)},t}(),We=function(){function t(){}return t.prototype.createXhrIo=function(){return new Ke},t}();function Ge(t){return"string"===typeof t||t instanceof String}function Qe(t){return $e()&&t instanceof Blob}function $e(){return"undefined"!==typeof Blob}function Ye(t,e,n,r){if(r<e)throw new Zt(pe,"Invalid value for '"+t+"'. Expected "+e+" or greater.");if(r>n)throw new Zt(pe,"Invalid value for '"+t+"'. Expected "+n+" or less.")}function Je(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function Xe(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Je();if(void 0!==n){for(var r=new n,i=0;i<t.length;i++)r.append(t[i]);return r.getBlob()}if($e())return new Blob(t);throw new Zt(me,"This browser doesn't seem to support creating Blobs")}var Ze=function(){function t(t,e){var n=0,r="";Qe(t)?(this.data_=t,n=t.size,r=t.type):t instanceof ArrayBuffer?(e?this.data_=new Uint8Array(t):(this.data_=new Uint8Array(t.byteLength),this.data_.set(new Uint8Array(t))),n=this.data_.length):t instanceof Uint8Array&&(e?this.data_=t:(this.data_=new Uint8Array(t.length),this.data_.set(t)),n=t.length),this.size_=n,this.type_=r}return t.prototype.size=function(){return this.size_},t.prototype.type=function(){return this.type_},t.prototype.slice=function(e,n){if(Qe(this.data_)){var r=function(t,e,n){return t.webkitSlice?t.webkitSlice(e,n):t.mozSlice?t.mozSlice(e,n):t.slice?t.slice(e,n):null}(this.data_,e,n);return null===r?null:new t(r)}return new t(new Uint8Array(this.data_.buffer,e,n-e),!0)},t.getBlob=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if($e()){var r=e.map((function(e){return e instanceof t?e.data_:e}));return new t(Xe.apply(null,r))}var i=e.map((function(t){return Ge(t)?Ae(ke.RAW,t).data:t.data_})),o=0;i.forEach((function(t){o+=t.byteLength}));var a=new Uint8Array(o),s=0;return i.forEach((function(t){for(var e=0;e<t.length;e++)a[s++]=t[e]})),new t(a,!0)},t.prototype.uploadData=function(){return this.data_},t}(),tn=function(){function t(t,e){this.bucket=t,this.path_=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this.path_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRoot",{get:function(){return 0===this.path.length},enumerable:!1,configurable:!0}),t.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},t.prototype.bucketOnlyServerUrl=function(){return"/b/"+encodeURIComponent(this.bucket)+"/o"},t.makeFromBucketSpec=function(e){var n;try{n=t.makeFromUrl(e)}catch(r){return new t(e,"")}if(""===n.path)return n;throw new Zt(ue,"Invalid default bucket '"+e+"'.")},t.makeFromUrl=function(e){var n=null,r="([A-Za-z0-9.\\-_]+)";var i=new RegExp("^gs://"+r+"(/(.*))?$","i");function o(t){t.path_=decodeURIComponent(t.path)}for(var a=Xt.replace(/[.]/g,"\\."),s=[{regex:i,indices:{bucket:1,path:3},postModify:function(t){"/"===t.path.charAt(t.path.length-1)&&(t.path_=t.path_.slice(0,-1))}},{regex:new RegExp("^https?://"+a+"/v[A-Za-z0-9_]+/b/"+r+"/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:o},{regex:new RegExp("^https?://(?:storage.googleapis.com|storage.cloud.google.com)/"+r+"/([^?#]*)","i"),indices:{bucket:1,path:2},postModify:o}],u=0;u<s.length;u++){var c=s[u],l=c.regex.exec(e);if(l){var f=l[c.indices.bucket],h=l[c.indices.path];h||(h=""),n=new t(f,h),c.postModify(n);break}}if(null==n)throw function(t){return new Zt(se,"Invalid URL '"+t+"'.")}(e);return n},t}();function en(t){var e,n;try{e=JSON.parse(t)}catch(r){return null}return"object"!==typeof(n=e)||Array.isArray(n)?null:e}function nn(t){var e=t.lastIndexOf("/",t.length-2);return-1===e?t:t.slice(e+1)}function rn(t){return"https://"+Xt+"/v0"+t}function on(t){var e=encodeURIComponent,n="?";for(var r in t){if(t.hasOwnProperty(r))n=n+(e(r)+"="+e(t[r]))+"&"}return n=n.slice(0,-1)}function an(t,e){return e}var sn=function(t,e,n,r){this.server=t,this.local=e||t,this.writable=!!n,this.xform=r||an},un=null;function cn(){if(un)return un;var t=[];t.push(new sn("bucket")),t.push(new sn("generation")),t.push(new sn("metageneration")),t.push(new sn("name","fullPath",!0));var e=new sn("name");e.xform=function(t,e){return function(t){return!Ge(t)||t.length<2?t:nn(t)}(e)},t.push(e);var n=new sn("size");return n.xform=function(t,e){return void 0!==e?Number(e):e},t.push(n),t.push(new sn("timeCreated")),t.push(new sn("updated")),t.push(new sn("md5Hash",null,!0)),t.push(new sn("cacheControl",null,!0)),t.push(new sn("c
2ontentDisposition",null,!0)),t.push(new sn("contentEncoding",null,!0)),t.push(new sn("contentLanguage",null,!0)),t.push(new sn("contentType",null,!0)),t.push(new sn("metadata","customMetadata",!0)),un=t}function ln(t,e,n){for(var r={type:"file"},i=n.length,o=0;o<i;o++){var a=n[o];r[a.local]=a.xform(r,e[a.server])}return function(t,e){Object.defineProperty(t,"ref",{get:function(){var n=t.bucket,r=t.fullPath,i=new tn(n,r);return e.makeStorageReference(i)}})}(r,t),r}function fn(t,e,n){var r=en(e);return null===r?null:ln(t,r,n)}function hn(t,e){for(var n={},r=e.length,i=0;i<r;i++){var o=e[i];o.writable&&(n[o.server]=t[o.local])}return JSON.stringify(n)}function pn(t,e,n){var r=en(n);return null===r?null:function(t,e,n){var r={prefixes:[],items:[],nextPageToken:n.nextPageToken};if(n.prefixes)for(var i=0,o=n.prefixes;i<o.length;i++){var a=o[i].replace(/\/$/,""),s=t.makeStorageReference(new tn(e,a));r.prefixes.push(s)}if(n.items)for(var u=0,c=n.items;u<c.length;u++){var l=c[u];s=t.makeStorageReference(new tn(e,l.name)),r.items.push(s)}return r}(t,e,r)}var dn=function(t,e,n,r){this.url=t,this.method=e,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]};function vn(t){if(!t)throw we()}function gn(t,e){return function(n,r){var i=fn(t,r,e);return vn(null!==i),i}}function yn(t,e){return function(n,r){var i=fn(t,r,e);return vn(null!==i),function(t,e){var n=en(e);if(null===n)return null;if(!Ge(n.downloadTokens))return null;var r=n.downloadTokens;if(0===r.length)return null;var i=encodeURIComponent;return r.split(",").map((function(e){var n=t.bucket,r=t.fullPath;return rn("/b/"+i(n)+"/o/"+i(r))+on({alt:"media",token:e})}))[0]}(i,r)}}function mn(t){return function(e,n){var r,i,o;return 401===e.getStatus()?r=new Zt(re,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===e.getStatus()?(o=t.bucket,r=new Zt(ne,"Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===e.getStatus()?(i=t.path,r=new Zt(ie,"User does not have permission to access '"+i+"'.")):r=n,r.serverResponse=n.serverResponse,r}}function bn(t){var e=mn(t);return function(n,r){var i,o=e(n,r);return 404===n.getStatus()&&(i=t.path,o=new Zt(ee,"Object '"+i+"' does not exist.")),o.serverResponse=r.serverResponse,o}}function wn(t,e,n){var r=rn(e.fullServerUrl()),i=t.maxOperationRetryTime,o=new dn(r,"GET",gn(t,n),i);return o.errorHandler=bn(e),o}function _n(t,e,n,r,i){var o={};e.isRoot?o.prefix="":o.prefix=e.path+"/",n&&n.length>0&&(o.delimiter=n),r&&(o.pageToken=r),i&&(o.maxResults=i);var a=rn(e.bucketOnlyServerUrl()),s=t.maxOperationRetryTime,u=new dn(a,"GET",function(t,e){return function(n,r){var i=pn(t,e,r);return vn(null!==i),i}}(t,e.bucket),s);return u.urlParams=o,u.errorHandler=mn(e),u}function En(t,e,n){var r=Object.assign({},n);return r.fullPath=t.path,r.size=e.size(),r.contentType||(r.contentType=function(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}(null,e)),r}var On=function(t,e,n,r){this.current=t,this.total=e,this.finalized=!!n,this.metadata=r||null};function Sn(t,e){var n=null;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch(r){vn(!1)}return vn(!!n&&-1!==(e||["active"]).indexOf(n)),n}var Tn=262144;function In(t,e,n,r,i,o,a,s){var u=new On(0,0);if(a?(u.current=a.current,u.total=a.total):(u.current=0,u.total=r.size()),r.size()!==u.total)throw new Zt(fe,"Server recorded incorrect upload file size, please retry the upload.");var c=u.total-u.current,l=c;i>0&&(l=Math.min(l,i));var f=u.current,h=f+l,p={"X-Goog-Upload-Command":l===c?"upload, finalize":"upload","X-Goog-Upload-Offset":u.current},d=r.slice(f,h);if(null===d)throw Ee();var v=e.maxUploadRetryTime,g=new dn(n,"POST",(function(t,n){var i,a=Sn(t,["active","final"]),s=u.current+l,c=r.size();return i="final"===a?gn(e,o)(t,n):null,new On(s,c,"final"===a,i)}),v);return g.headers=p,g.body=d.uploadData(),g.progressCallback=s||null,g.errorHandler=mn(t),g}var Cn=function(t,e,n){if("function"===typeof t||null!=e||null!=n)this.next=t,this.error=e,this.complete=n;else{var r=t;this.next=r.next,this.error=r.error,this.complete=r.complete}},kn=function(t,e,n,r,i,o){this.bytesTransferred=t,this.totalBytes=e,this.state=n,this.metadata=r,this.task=i,this.ref=o};function Pn(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];Promise.resolve().then((function(){return t.apply(void 0,e)}))}}var An=function(){function t(t,e,n){var r=this;void 0===n&&(n=null),this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=t,this._blob=e,this._metadata=n,this._mappings=cn(),this._resumable=this._shouldDoResumable(this._blob),this._state=Le,this._errorHandler=function(t){r._request=void 0,r._chunkMultiplier=1,t.codeEquals(ae)?(r._needToFetchStatus=!0,r.completeTransitions_()):(r._error=t,r._transition(Be))},this._metadataErrorHandler=function(t){r._request=void 0,t.codeEquals(ae)?r.completeTransitions_():(r._error=t,r._transition(Be))},this._promise=new Promise((function(t,e){r._resolve=t,r._reject=e,r._start()})),this._promise.then(null,(function(){}))}return t.prototype._makeProgressCallback=function(){var t=this,e=this._transferred;return function(n){return t._updateProgress(e+n)}},t.prototype._shouldDoResumable=function(t){return t.size()>262144},t.prototype._start=function(){this._state===Le&&void 0===this._request&&(this._resumable?void 0===this._uploadUrl?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this._continueUpload():this._oneShotUpload())},t.prototype._resolveToken=function(t){var e=this;this._ref.storage.getAuthToken().then((function(n){switch(e._state){case Le:t(n);break;case Ve:e._transition(qe);break;case Me:e._transition(Fe)}}))},t.prototype._createResumable=function(){var t=this;this._resolveToken((function(e){var n=function(t,e,n,i,o){var a=e.bucketOnlyServerUrl(),s=En(e,i,o),u={name:s.fullPath},c=rn(a),l={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":i.size(),"X-Goog-Upload-Header-Content-Type":s.contentType,"Content-Type":"application/json; charset=utf-8"},f=hn(s,n),h=t.maxUploadRetryTime,p=new dn(c,"POST",(function(t){var e;Sn(t);try{e=t.getResponseHeader("X-Goog-Upload-URL")}catch(r){vn(!1)}return vn(Ge(e)),e}),h);
2return p.urlParams=u,p.headers=l,p.body=f,p.errorHandler=mn(e),p}(t._ref.storage,t._ref._location,t._mappings,t._blob,t._metadata),i=t._ref.storage.makeRequest(n,e);t._request=i,i.getPromise().then((function(e){t._request=void 0,t._uploadUrl=e,t._needToFetchStatus=!1,t.completeTransitions_()}),t._errorHandler)}))},t.prototype._fetchStatus=function(){var t=this,e=this._uploadUrl;this._resolveToken((function(n){var i=function(t,e,n,i){var o=t.maxUploadRetryTime,a=new dn(n,"POST",(function(t){var e=Sn(t,["active","final"]),n=null;try{n=t.getResponseHeader("X-Goog-Upload-Size-Received")}catch(r){vn(!1)}n||vn(!1);var o=Number(n);return vn(!isNaN(o)),new On(o,i.size(),"final"===e)}),o);return a.headers={"X-Goog-Upload-Command":"query"},a.errorHandler=mn(e),a}(t._ref.storage,t._ref._location,e,t._blob),o=t._ref.storage.makeRequest(i,n);t._request=o,o.getPromise().then((function(e){e=e,t._request=void 0,t._updateProgress(e.current),t._needToFetchStatus=!1,e.finalized&&(t._needToFetchMetadata=!0),t.completeTransitions_()}),t._errorHandler)}))},t.prototype._continueUpload=function(){var t=this,e=Tn*this._chunkMultiplier,n=new On(this._transferred,this._blob.size()),i=this._uploadUrl;this._resolveToken((function(o){var a;try{a=In(t._ref._location,t._ref.storage,i,t._blob,e,t._mappings,n,t._makeProgressCallback())}catch(r){return t._error=r,void t._transition(Be)}var s=t._ref.storage.makeRequest(a,o);t._request=s,s.getPromise().then((function(e){t._increaseMultiplier(),t._request=void 0,t._updateProgress(e.current),e.finalized?(t._metadata=e.metadata,t._transition(Ue)):t.completeTransitions_()}),t._errorHandler)}))},t.prototype._increaseMultiplier=function(){Tn*this._chunkMultiplier<33554432&&(this._chunkMultiplier*=2)},t.prototype._fetchMetadata=function(){var t=this;this._resolveToken((function(e){var n=wn(t._ref.storage,t._ref._location,t._mappings),r=t._ref.storage.makeRequest(n,e);t._request=r,r.getPromise().then((function(e){t._request=void 0,t._metadata=e,t._transition(Ue)}),t._metadataErrorHandler)}))},t.prototype._oneShotUpload=function(){var t=this;this._resolveToken((function(e){var n=function(t,e,n,r,i){var o=e.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"},s=function(){for(var t="",e=0;e<2;e++)t+=Math.random().toString().slice(2);return t}();a["Content-Type"]="multipart/related; boundary="+s;var u=En(e,r,i),c="--"+s+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+hn(u,n)+"\r\n--"+s+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",l="\r\n--"+s+"--",f=Ze.getBlob(c,r,l);if(null===f)throw Ee();var h={name:u.fullPath},p=rn(o),d=t.maxUploadRetryTime,v=new dn(p,"POST",gn(t,n),d);return v.urlParams=h,v.headers=a,v.body=f.uploadData(),v.errorHandler=mn(e),v}(t._ref.storage,t._ref._location,t._mappings,t._blob,t._metadata),r=t._ref.storage.makeRequest(n,e);t._request=r,r.getPromise().then((function(e){t._request=void 0,t._metadata=e,t._updateProgress(t._blob.size()),t._transition(Ue)}),t._errorHandler)}))},t.prototype._updateProgress=function(t){var e=this._transferred;this._transferred=t,this._transferred!==e&&this._notifyObservers()},t.prototype._transition=function(t){if(this._state!==t)switch(t){case Ve:case Me:this._state=t,void 0!==this._request&&this._request.cancel();break;case Le:var e=this._state===Fe;this._state=t,e&&(this._notifyObservers(),this._start());break;case Fe:this._state=t,this._notifyObservers();break;case qe:this._error=_e(),this._state=t,this._notifyObservers();break;case Be:case Ue:this._state=t,this._notifyObservers()}},t.prototype.completeTransitions_=function(){switch(this._state){case Me:this._transition(Fe);break;case Ve:this._transition(qe);break;case Le:this._start()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=ze(this._state);return new kn(this._transferred,this._blob.size(),t,this._metadata,this,this._ref)},enumerable:!1,configurable:!0}),t.prototype.on=function(t,e,n,r){var i=this,o=new Cn(e,n,r);return this._addObserver(o),function(){i._removeObserver(o)}},t.prototype.then=function(t,e){return this._promise.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype._addObserver=function(t){this._observers.push(t),this._notifyObserver(t)},t.prototype._removeObserver=function(t){var e=this._observers.indexOf(t);-1!==e&&this._observers.splice(e,1)},t.prototype._notifyObservers=function(){var t=this;
2this._finishPromise(),this._observers.slice().forEach((function(e){t._notifyObserver(e)}))},t.prototype._finishPromise=function(){if(void 0!==this._resolve){var t=!0;switch(ze(this._state)){case He.SUCCESS:Pn(this._resolve.bind(null,this.snapshot))();break;case He.CANCELED:case He.ERROR:Pn(this._reject.bind(null,this._error))();break;default:t=!1}t&&(this._resolve=void 0,this._reject=void 0)}},t.prototype._notifyObserver=function(t){switch(ze(this._state)){case He.RUNNING:case He.PAUSED:t.next&&Pn(t.next.bind(t,this.snapshot))();break;case He.SUCCESS:t.complete&&Pn(t.complete.bind(t))();break;case He.CANCELED:case He.ERROR:t.error&&Pn(t.error.bind(t,this._error))();break;default:t.error&&Pn(t.error.bind(t,this._error))()}},t.prototype.resume=function(){var t=this._state===Fe||this._state===Me;return t&&this._transition(Le),t},t.prototype.pause=function(){var t=this._state===Le;return t&&this._transition(Me),t},t.prototype.cancel=function(){var t=this._state===Le||this._state===Me;return t&&this._transition(Ve),t},t}(),Nn=function(){function t(t,e){this._service=t,this._location=e instanceof tn?e:tn.makeFromUrl(e)}return t.prototype.toString=function(){return"gs://"+this._location.bucket+"/"+this._location.path},t.prototype.newRef=function(e,n){return new t(e,n)},Object.defineProperty(t.prototype,"root",{get:function(){var t=new tn(this._location.bucket,"");return this.newRef(this._service,t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this._location.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this._location.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return nn(this._location.path)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"storage",{get:function(){return this._service},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=function(t){if(0===t.length)return null;var e=t.lastIndexOf("/");return-1===e?"":t.slice(0,e)}(this._location.path);if(null===e)return null;var n=new tn(this._location.bucket,e);return new t(this._service,n)},enumerable:!1,configurable:!0}),t.prototype._throwIfRoot=function(t){if(""===this._location.path)throw Te(t)},t}();function xn(t){var e={prefixes:[],items:[]};return jn(t,e).then((function(){return e}))}function jn(t,e,n){return Object(l.b)(this,void 0,void 0,(function(){var r,i,o;return Object(l.d)(this,(function(a){switch(a.label){case 0:return[4,Rn(t,{pageToken:n})];case 1:return r=a.sent(),(i=e.prefixes).push.apply(i,r.prefixes),(o=e.items).push.apply(o,r.items),null==r.nextPageToken?[3,3]:[4,jn(t,e,r.nextPageToken)];case 2:a.sent(),a.label=3;case 3:return[2]}}
2))}))}function Rn(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r,i;return Object(l.d)(this,(function(o){switch(o.label){case 0:return null!=e&&"number"===typeof e.maxResults&&Ye("options.maxResults",1,1e3,e.maxResults),[4,t.storage.getAuthToken()];case 1:return n=o.sent(),r=e||{},i=_n(t.storage,t._location,"/",r.pageToken,r.maxResults),[2,t.storage.makeRequest(i,n).getPromise()]}}))}))}function Dn(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,r;return Object(l.d)(this,(function(i){switch(i.label){case 0:return t._throwIfRoot("updateMetadata"),[4,t.storage.getAuthToken()];case 1:return n=i.sent(),r=function(t,e,n,r){var i=rn(e.fullServerUrl()),o=hn(n,r),a=t.maxOperationRetryTime,s=new dn(i,"PATCH",gn(t,r),a);return s.headers={"Content-Type":"application/json; charset=utf-8"},s.body=o,s.errorHandler=bn(e),s}(t.storage,t._location,e,cn()),[2,t.storage.makeRequest(r,n).getPromise()]}}))}))}function Ln(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n;return Object(l.d)(this,(function(r){switch(r.label){case 0:return t._throwIfRoot("getDownloadURL"),[4,t.storage.getAuthToken()];case 1:return e=r.sent(),n=function(t,e,n){var r=rn(e.fullServerUrl()),i=t.maxOperationRetryTime,o=new dn(r,"GET",yn(t,n),i);return o.errorHandler=bn(e),o}(t.storage,t._location,cn()),[2,t.storage.makeRequest(n,e).getPromise().then((function(t){if(null===t)throw new Zt(he,"The given file does not have any download URLs.");return t}))]}}))}))}function Mn(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n;return Object(l.d)(this,(function(r){switch(r.label){case 0:return t._throwIfRoot("deleteObject"),[4,t.storage.getAuthToken()];case 1:return e=r.sent(),n=function(t,e){var n=rn(e.fullServerUrl()),r=t.maxOperationRetryTime,i=new dn(n,"DELETE",(function(t,e){}),r);return i.successCodes=[200,204],i.errorHandler=bn(e),i}(t.storage,t._location),[2,t.storage.makeRequest(n,e).getPromise()]}}))}))}function Fn(t,e){var n=function(t,e){var n=e.split("/").filter((function(t){return t.length>0})).join("/");return 0===t.length?n:t+"/"+n}(t._location.path,e),r=new tn(t._location.bucket,n);return new Nn(t.storage,r)}var Un=function(){function t(t,e,n){this._delegate=t,this.task=e,this.ref=n}return Object.defineProperty(t.prototype,"bytesTransferred",{get:function(){return this._delegate.bytesTransferred},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"metadata",{get:function(){return this._delegate.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._delegate.state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalBytes",{get:function(){return this._delegate.totalBytes},enumerable:!1,configurable:!0}),t}(),Vn=function(){function t(t,e){this._delegate=t,this._ref=e,this.cancel=this._delegate.cancel.bind(this._delegate),this.catch=this._delegate.catch.bind(this._delegate),this.pause=this._delegate.pause.bind(this._delegate),this.resume=this._delegate.resume.bind(this._delegate),this._snapshot=new Un(this._delegate.snapshot,this,this._ref)}return Object.defineProperty(t.prototype,"snapshot",{get:function(){return this._snapshot},enumerable:!1,configurable:!0}),t.prototype.then=function(t,e){var n=this;return this._delegate.then((function(e){if(t)return t(new Un(e,n,n._ref))}),e)},t.prototype.on=function(t,e,n,r){var i=this,o=void 0;return e&&(o="function"===typeof e?function(t){return e(new Un(t,i,i._ref))}:{next:e.next?function(t){return e.next(new Un(t,i,i._ref))}:void 0,complete:e.complete||void 0,error:e.error||void 0}),this._delegate.on(t,o,n||void 0,r||void 0)},t}(),qn=function(){function t(t,e){this._delegate=t,this._service=e}return Object.defineProperty(t.prototype,"prefixes",{get:function(){var t=this;return this._delegate.prefixes.map((function(e){return new Bn(e,t._service)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){var t=this;return this._delegate.items.map((function(e){return new Bn(e,t._service)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextPageToken",{get:function(){return this._delegate.nextPageToken||null}
2,enumerable:!1,configurable:!0}),t}(),Bn=function(){function t(t,e){this._delegate=t,this.storage=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this._delegate.name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bucket",{get:function(){return this._delegate.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullPath",{get:function(){return this._delegate.fullPath},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this._delegate.toString()},t.prototype.child=function(e){return new t(Fn(this._delegate,e),this.storage)},Object.defineProperty(t.prototype,"root",{get:function(){return new t(this._delegate.root,this.storage)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this._delegate.parent;return null==e?null:new t(e,this.storage)},enumerable:!1,configurable:!0}),t.prototype.put=function(t,e){return this._throwIfRoot("put"),new Vn(function(t,e,n){return void 0===n&&(n=null),t._throwIfRoot("uploadBytesResumable"),new An(t,new Ze(e),n)}(this._delegate,t,e),this)},t.prototype.putString=function(t,e,n){return void 0===e&&(e=ke.RAW),this._throwIfRoot("putString"),new Vn(function(t,e,n,r){void 0===n&&(n=ke.RAW),t._throwIfRoot("putString");var i=Ae(n,e),o=Object(l.a)({},r);return null==o.contentType&&null!=i.contentType&&(o.contentType=i.contentType),new An(t,new Ze(i.data,!0),o)}(this._delegate,t,e,n),this)},t.prototype.listAll=function(){var t=this;return xn(this._delegate).then((function(e){return new qn(e,t.storage)}))},t.prototype.list=function(t){var e=this;return Rn(this._delegate,t).then((function(t){return new qn(t,e.storage)}))},t.prototype.getMetadata=function(){return function(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n;return Object(l.d)(this,(function(r){switch(r.label){case 0:return t._throwIfRoot("getMetadata"),[4,t.storage.getAuthToken()];case 1:return e=r.sent(),n=wn(t.storage,t._location,cn()),[2,t.storage.makeRequest(n,e).getPromise()]}}))}))}(this._delegate)},t.prototype.updateMetadata=function(t){return Dn(this._delegate,t)},t.prototype.getDownloadURL=function(){return Ln(this._delegate)},t.prototype.delete=function(){return this._throwIfRoot("delete"),Mn(this._delegate)},t.prototype._throwIfRoot=function(t){if(""===this._delegate._location.path)throw Te(t)},t}(),Hn=function(){function t(t){this.promise_=Promise.reject(t)}return t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){},t}();var zn=function(){function t(t,e,n,r,i,o,a,s,u,c,l){var f=this;this.pendingXhr_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=t,this.method_=e,this.headers_=n,this.body_=r,this.successCodes_=i.slice(),this.additionalRetryCodes_=o.slice(),this.callback_=a,this.errorCallback_=s,this.progressCallback_=c,this.timeout_=u,this.pool_=l,this.promise_=new Promise((function(t,e){f.resolve_=t,f.reject_=e,f.start_()}))}return t.prototype.start_=function(){var t=this;function e(e,n){var i,o=t.resolve_,a=t.reject_,s=n.xhr;if(n.wasSuccessCode)try{var u=t.callback_(s,s.getResponseText());void 0!==u?o(u):o()}catch(r){a(r)}else null!==s?((i=we()).serverResponse=s.getResponseText(),t.errorCallback_?a(t.errorCallback_(s,i)):a(i)):n.canceled?a(i=t.appDelete_?Se():_e()):a(i=new Zt(oe,"Max retry time for operation exceeded, please try again."))}this.canceled_?e(0,new Kn(!1,null,!0)):this.backoffId_=function(t,e,n){var r=1,i=null,o=!1,a=0;function s(){return 2===a}var u=!1;function c(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];u||(u=!0,e.apply(null,t))}function f(e){i=setTimeout((function(){i=null,t(h,s())}),e)}function h(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!u)if(t)c.call.apply(c,Object(l.g)([null,t],e));else{var i;s()||o?c.call.apply(c,Object(l.g)([null,t],e)):(r<64&&(r*=2),1===a?(a=2,i=0):i=1e3*(r+Math.random()),f(i))}}var p=!1;function d(t){p||(p=!0,u||(null!==i?(t||(a=2),clearTimeout(i),f(0)):t||(a=1)))}return f(0),setTimeout((function(){o=!0,d(!0)}),n),d}((function(e,n){if(n)e(!1,new Kn(!1,null,!0));else{var r=t.pool_.createXhrIo();t.pendingXhr_=r,null!==t.progressCallback_&&r.addUploadProgressListener(i),r.send(t.url_,t.method_,t.body_,t.headers_).then((function(n){null!==t.progressCallback_&&n.removeUploadProgressListener(i),t.pendingXhr_=null;
2var r=(n=n).getErrorCode()===Re.NO_ERROR,o=n.getStatus();if(r&&!t.isRetryStatusCode_(o)){var a=-1!==t.successCodes_.indexOf(o);e(!0,new Kn(a,n))}else{var s=n.getErrorCode()===Re.ABORT;e(!1,new Kn(!1,null,s))}}))}function i(e){var n=e.loaded,r=e.lengthComputable?e.total:-1;null!==t.progressCallback_&&t.progressCallback_(n,r)}}),e,this.timeout_)},t.prototype.getPromise=function(){return this.promise_},t.prototype.cancel=function(t){this.canceled_=!0,this.appDelete_=t||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingXhr_&&this.pendingXhr_.abort()},t.prototype.isRetryStatusCode_=function(t){var e=t>=500&&t<600,n=-1!==[408,429].indexOf(t),r=-1!==this.additionalRetryCodes_.indexOf(t);return e||n||r},t}(),Kn=function(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n};function Wn(t,e,n,r){var o=on(t.urlParams),a=t.url+o,s=Object.assign({},t.headers);return function(t,e){e&&(t["X-Firebase-GMPID"]=e)}(s,e),function(t,e){null!==e&&e.length>0&&(t.Authorization="Firebase "+e)}(s,n),function(t){var e="undefined"!==typeof i.a?i.a.SDK_VERSION:"AppManager";t["X-Firebase-Storage-Version"]="webjs/"+e}(s),new zn(a,t.method,s,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,r)}function Gn(t){return/^[A-Za-z]+:\/\//.test(t)}function Qn(t,e){if(t instanceof Yn){var n=t;if(null==n._bucket)throw new Zt(ce,"No default bucket found. Did you set the 'storageBucket' property when initializing the app?");var r=new Nn(n,n._bucket);return null!=e?Qn(r,e):r}if(void 0!==e){if(e.includes(".."))throw Oe('`path` param cannot contain ".."');return Fn(t,e)}return t}function $n(t,e){if(e&&Gn(e)){if(t instanceof Yn)return new Nn(t,e);throw Oe("To use ref(service, url), the first argument must be a Storage instance.")}return Qn(t,e)}var Yn=function(){function t(t,e,n,r){this.app=t,this._authProvider=e,this._pool=n,this._url=r,this._bucket=null,this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=r?tn.makeFromBucketSpec(r):function(t){var e=null===t||void 0===t?void 0:t.storageBucket;return null==e?null:tn.makeFromBucketSpec(e)}(this.app.options)}return Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this._maxUploadRetryTime},set:function(t){Ye("time",0,Number.POSITIVE_INFINITY,t),this._maxUploadRetryTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this._maxOperationRetryTime},set:function(t){Ye("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t},enumerable:!1,configurable:!0}),t.prototype.getAuthToken=function(){return Object(l.b)(this,void 0,void 0,(function(){var t,e;return Object(l.d)(this,(function(n){switch(n.label){case 0:return(t=this._authProvider.getImmediate({optional:!0}))?[4,t.getToken()]:[3,2];case 1:if(null!==(e=n.sent()))return[2,e.accessToken];n.label=2;case 2:return[2,null]}}))}))},t.prototype._delete=function(){return this._deleted=!0,this._requests.forEach((function(t){return t.cancel()})),this._requests.clear(),Promise.resolve()},t.prototype.makeStorageReference=function(t){return new Nn(this,t)},t.prototype.makeRequest=function(t,e){var n=this;if(this._deleted)return new Hn(Se());var r=Wn(t,this._appId,e,this._pool);return this._requests.add(r),r.getPromise().then((function(){return n._requests.delete(r)}),(function(){return n._requests.delete(r)})),r},t}(),Jn=function(){function t(t,e){var n=this;this.app=t,this._delegate=e,this.INTERNAL={delete:function(){return n._delegate._delete()}}}return Object.defineProperty(t.prototype,"maxOperationRetryTime",{get:function(){return this._delegate.maxOperationRetryTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this._delegate.maxUploadRetryTime},enumerable:!1,configurable:!0}),t.prototype.ref=function(t){if(Gn(t))throw Oe("ref() expected a child path but got a URL, use refFromURL instead.");return new Bn($n(this._delegate,t),this)},t.prototype.refFromURL=function(t){if(!Gn(t))throw Oe("refFromURL() expected a full URL but got a child path, use ref() instead.");try{tn.makeFromUrl(t)}catch(r){throw Oe("refFromUrl() expected a valid full URL but got an invali
2d one.")}return new Bn($n(this._delegate,t),this)},t.prototype.setMaxUploadRetryTime=function(t){this._delegate.maxUploadRetryTime=t},t.prototype.setMaxOperationRetryTime=function(t){this._delegate.maxOperationRetryTime=t},t}();function Xn(t,e){var n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal");return new Jn(n,new Yn(n,r,new We,e))}!function(t){var e={TaskState:He,TaskEvent:De,StringFormat:ke,Storage:Yn,Reference:Bn};t.INTERNAL.registerComponent(new u.a("storage",Xn,"PUBLIC").setServiceProps(e).setMultipleInstances(!0)),t.registerVersion("@firebase/storage","0.4.2")}(i.a);var Zn,tr,er,nr="0.4.5",rr=nr,ir="FB-PERF-TRACE-MEASURE",or="_wt_",ar="_fcp",sr="_fid",ur="@firebase/performance/config",cr="@firebase/performance/configexpire",lr="Performance",fr=((Zn={})["trace started"]="Trace {$traceName} was started before.",Zn["trace stopped"]="Trace {$traceName} is not running.",Zn["nonpositive trace startTime"]="Trace {$traceName} startTime should be positive.",Zn["nonpositive trace duration"]="Trace {$traceName} duration should be positive.",Zn["no window"]="Window is not available.",Zn["no app id"]="App id is not available.",Zn["no project id"]="Project id is not available.",Zn["no api key"]="Api key is not available.",Zn["invalid cc log"]="Attempted to queue invalid cc event",Zn["FB not default"]="Performance can only start when Firebase app instance is the default one.",Zn["RC response not ok"]="RC response is not ok",Zn["invalid attribute name"]="Attribute name {$attributeName} is invalid.",Zn["invalid attribute value"]="Attribute value {$attributeValue} is invalid.",Zn["invalid custom metric name"]="Custom metric name {$customMetricName} is invalid",Zn["invalid String merger input"]="Input for String merger is invalid, contact support team to resolve.",Zn),hr=new a.b("performance",lr,fr),pr=new o.b(lr);pr.logLevel=o.a.INFO;var dr,vr=function(){function t(t){if(this.window=t,!t)throw hr.create("no window");this.performance=t.performance,this.PerformanceObserver=t.PerformanceObserver,this.windowLocation=t.location,this.navigator=t.navigator,this.document=t.document,this.navigator&&this.navigator.cookieEnabled&&(this.localStorage=t.localStorage),t.perfMetrics&&t.perfMetrics.onFirstInputDelay&&(this.onFirstInputDelay=t.perfMetrics.onFirstInputDelay)}return t.prototype.getUrl=function(){return this.windowLocation.href.split("?")[0]},t.prototype.mark=function(t){this.performance&&this.performance.mark&&this.performance.mark(t)},t.prototype.measure=function(t,e,n){this.performance&&this.performance.measure&&this.performance.measure(t,e,n)},t.prototype.getEntriesByType=function(t){return this.performance&&this.performance.getEntriesByType?this.performance.getEntriesByType(t):[]},t.prototype.getEntriesByName=function(t){return this.performance&&this.performance.getEntriesByName?this.performance.getEntriesByName(t):[]},t.prototype.getTimeOrigin=function(){return this.performance&&(this.performance.timeOrigin||this.performance.timing.navigationStart)},t.prototype.requiredApisAvailable=function(){return fetch&&Promise&&this.navigator&&this.navigator.cookieEnabled?!!Object(a.w)()||(pr.info("IndexedDB is not supported by current browswer"),!1):(pr.info("Firebase Performance cannot start if browser does not support fetch and Promise or cookie is disabled."),!1)},t.prototype.setupObserver=function(t,e){this.PerformanceObserver&&new this.PerformanceObserver((function(t){for(var n=0,r=t.getEntries();n<r.length;n++){var i=r[n];e(i)}})).observe({entryTypes:[t]})},t.getInstance=function(){return void 0===tr&&(tr=new t(er)),tr},t}();function gr(t,e){var n=t.length-e.length;if(n<0||n>1)throw hr.create("invalid String merger input");for(var r=[],i=0;i<t.length;i++)r.push(t.charAt(i)),e.length>i&&r.push(e.charAt(i));return r.join("")}var yr,mr,br=function(){function t(){this.instrumentationEnabled=!0,this.dataCollectionEnabled=!0,this.loggingEnabled=!1,this.tracesSamplingRate=1,this.networkRequestsSamplingRate=1,this.logEndPointUrl="https://firebaselogging.googleapis.com/v0cc/log?format=json_proto",this.flTransportEndpointUrl=gr("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),this.transportKey=gr("AzSC8r6ReiGqFMyfvgow","Iayx0u-XT3vksVM-pIV"),this.logSource=462,this.logTraceAfterSampling=!1,this.logNetworkAfterSampling=!1,this.configTimeToLive=12}return t.prototype.getAppId=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.appId;if(!t)throw hr.create("no app id");return t},t.prototype.getProjectId=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.projectId;if(!t)throw hr.create("no project id");return t},t.prototype.getApiKey=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.apiKey;if(!t)throw hr.create("no api key");return t},t.prototype.getFlTransportFullUrl=function(){return this.flTrans
2portEndpointUrl.concat("?key=",this.transportKey)},t.getInstance=function(){return void 0===dr&&(dr=new t),dr},t}();function wr(){return yr}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.VISIBLE=1]="VISIBLE",t[t.HIDDEN=2]="HIDDEN"}(mr||(mr={}));var _r=["firebase_","google_","ga_"],Er=new RegExp("^[a-zA-Z]\\w*$");function Or(){var t=vr.getInstance().navigator;return"serviceWorker"in t?t.serviceWorker.controller?2:3:1}function Sr(){switch(vr.getInstance().document.visibilityState){case"visible":return mr.VISIBLE;case"hidden":return mr.HIDDEN;default:return mr.UNKNOWN}}function Tr(){var t=vr.getInstance().navigator.connection;switch(t&&t.effectiveType){case"slow-2g":return 1;case"2g":return 2;case"3g":return 3;case"4g":return 4;default:return 0}}var Ir="0.0.1",Cr=!0,kr="FIREBASE_INSTALLATIONS_AUTH";function Pr(t){var e=function(){var t=vr.getInstance().localStorage;if(!t)return;var e=t.getItem(cr);if(!e||(n=e,!(Number(n)>Date.now())))return;var n;var r=t.getItem(ur);if(!r)return;try{return JSON.parse(r)}catch(i){return}}();return e?(Nr(e),Promise.resolve()):function(t){return function(){var t=br.getInstance().installationsService.getToken();return t.then((function(t){})),t}().then((function(e){var n="https://firebaseremoteconfig.googleapis.com/v1/projects/"+br.getInstance().getProjectId()+"/namespaces/fireperf:fetch?key="+br.getInstance().getApiKey(),r=new Request(n,{method:"POST",headers:{Authorization:kr+" "+e},body:JSON.stringify({app_instance_id:t,app_instance_id_token:e,app_id:br.getInstance().getAppId(),app_version:rr,sdk_version:Ir})});return fetch(r).then((function(t){if(t.ok)return t.json();throw hr.create("RC response not ok")}))})).catch((function(){pr.info(Ar)}))}(t).then(Nr).then((function(t){return function(t){var e=vr.getInstance().localStorage;if(!t||!e)return;e.setItem(ur,JSON.stringify(t)),e.setItem(cr,String(Date.now()+60*br.getInstance().configTimeToLive*60*1e3))}(t)}),(function(){}))}var Ar="Could not fetch config, will use default configs";function Nr(t){if(!t)return t;var e=br.getInstance(),n=t.entries||{};return void 0!==n.fpr_enabled?e.loggingEnabled="true"===String(n.fpr_enabled):e.loggingEnabled=Cr,n.fpr_log_source&&(e.logSource=Number(n.fpr_log_source)),n.fpr_log_endpoint_url&&(e.logEndPointUrl=n.fpr_log_endpoint_url),n.fpr_log_transport_key&&(e.transportKey=n.fpr_log_transport_key),void 0!==n.fpr_vc_network_request_sampling_rate&&(e.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate)),void 0!==n.fpr_vc_trace_sampling_rate&&(e.tracesSamplingRate=Number(n.fpr_vc_trace_sampling_rate)),e.logTraceAfterSampling=xr(e.tracesSamplingRate),e.logNetworkAfterSampling=xr(e.networkRequestsSamplingRate),t}function xr(t){return Math.random()<=t}var jr,Rr=1;function Dr(){return Rr=2,jr=jr||function(){var t=vr.getInstance().document;return new Promise((function(e){if(t&&"complete"!==t.readyState){var n=function n(){"complete"===t.readyState&&(t.removeEventListener("readystatechange",n),e())};t.addEventListener("readystatechange",n)}else e()}))}().then((function(){return function(){var t=br.getInstance().installationsService.getId();return t.then((function(t){yr=t})),t}()})).then((function(t){return Pr(t)})).then((function(){return Lr()}),(function(){return Lr()}))}function Lr(){Rr=3}var Mr,Fr=1e4,Ur=3,Vr=[],qr=!1;function Br(t){setTimeout((function(){if(0!==Ur)return Vr.length?void function(){var t=Vr.splice(0,1e3),e=t.map((function(t){return{source_extension_json_proto3:t.message,event_time_ms:String(t.eventTime)}}));(function(t,e){return function(t){var e=br.getInstance().getFlTransportFullUrl();return fetch(e,{method:"POST",body:JSON.stringify(t)})}(t).then((function(t){return t.ok||pr.info("Call to Firebase backend failed."),t.json()})).then((function(t){var n=Number(t.nextRequestWaitMillis),r=Fr;isNaN(n)||(r=Math.max(n,r));var i=t.logResponseDetails;Array.isArray(i)&&i.length>0&&"RETRY_REQUEST_LATER"===i[0].responseAction&&(Vr=Object(l.g)(e,Vr),pr.info("Retry transport request later.")),Ur=3,Br(r)}))})({request_time_ms:String(Date.now()),client_info:{client_type:1,js_client_info:{}},log_source:br.getInstance().logSource,log_event:e},t).catch((function(){Vr=Object(l.g)(t,Vr),Ur--,pr.info("Tries left: "+Ur+"."),Br(Fr)}))}():Br(Fr)}),t)}function Hr(t){if(!t.eventTime||!t.message)throw hr.create("invalid cc log");Vr=Object(l.g)(Vr,[t])}function zr(t,e){Mr||(Mr=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];Hr({message:t.apply(void 0,e),eventTime:Date.now()})}}(Gr)),Mr(t,e)}function Kr(t){var e=br.getInstance();!e.instrumentationEnabled&&t.isAuto||(e.dataCollectionEnabled||t.isAuto)&&vr.getInstance().requiredApisAvailable()&&(t.isAuto&&Sr()!==mr.VISIBLE||(3===Rr?Wr(t):Dr().then((function(){return Wr(t)}),(function(){return Wr(t)}))))}function Wr(t){if(wr()){var e=br.getInstance();e.loggingEnabled&&e.logTraceAfterSampling&&setTimeout((function(){return zr(t,1)}),0)}}function Gr(t,e){return 0===e?function(t){var e={url:t.url,http_method:t.httpMethod||0,http_response_code:200,response_payload_bytes:t.responsePayloadBytes,client_start_time_us:t.startTimeUs,time_to_response_initiated_us:t.timeToResponseInitiatedUs,time_to_response_completed_us:t.timeToResponseCompletedUs},n={application_info:Qr(),network_request_metric:e};return JSON.stringify(n)}(t):function(t){var e={name:t.name,is_auto:t.isAuto,client_start_time_us:t.startTimeUs,duration_us:t.durationUs};0!==Object.keys(t.counters).length&&(e.counters=t.counters);var n=t.getAttributes();0!==Object.keys(n).length&&(e.custom_attributes=n);var r={application_info:Qr(),trace_metric:e};return JSON.stringify(r)}(t)}function Qr(){return{google_app_id:br.getInstance().getAppId(),app_instance_id:wr(),web_app_info:{sdk_version:rr,page_url:vr.getInstance().getUrl(),service_worker_status:Or(),visibility_state:Sr(),effective_connection_type:Tr()},application_process_state:0}}var $r=["_fp",ar,sr];var Yr=function(){function t(t,e,n){void 0===e&&(e=!1),this.name=t,this.isAuto=e,this.state=1,this.customAttributes={},this.counters={},this.api=vr.getInstance(),this.randomId=Math.floor(1e6*Math.random()),this.isAuto||(this.traceStartMark="FB-PERF-TRACE-START-"+this.randomId+"-"+this.name,this.traceStopMark="FB-PERF-TRACE-STOP-"+this.randomId+"-"+this.name,this.traceMeasure=n||"FB-PERF-TRACE-MEASURE-"+this.randomId+"-"+this.name,n&&this.calculateTraceMetrics())}return t.prototype.start=function(){if(1!==this.state)throw hr.create("trace started",{traceName:this.name});this.api.mark(this.traceStartMark),this.state=2},t.prototype.stop=function(){if(2!==this.state)throw hr.create("trace stopped",{traceName:this.name});this.state=3,this.api.mark(this.traceStopMark),this.api.measure(this.traceMeasure,this.traceStartMark,this.traceStopMark),this.calculateTraceMetrics(),Kr(this)},t.prototype.record=function(t,e,n){if(t<=0)throw hr.create("nonpositive trace startTime",{traceName:this.name});if(e<=0)throw hr.create("nonpositive trace duration",{traceName:this.name});if(this.durationUs=Math.floor(1e3*e),this.startTimeUs=Math.floor(1e3*t),n&&n.attributes&&(this.customAttributes=Object(l.a)({},n.attributes)),n&&n.metrics)for(var r=0,i=Object.keys(n.metrics);r<i.length;r++){var o=i[r];isNaN(Number(n.metrics[o]))||(this.counters[o]=Number(Math.floor(n.metrics[o])))}Kr(this)},t.prototype.incrementMetric=function(t,e){void 0===e&&(e=1),void 0===this.counters[t]?this.putMetric(t,e):this.putMetric(t,this.counters[t]+e)},t.prototype.putMetric=function(t,e){if(!function(t,e){return!(0===t.length||t.length>100)&&(e&&e.startsWith(or)&&$r.indexOf(t)>-1||!t.startsWith("_"))}(t,this.name))throw hr.create("invalid custom metric name",{customMetricName:t});this.counters[t]=function(t){var e=Math.floor(t);return e<t&&pr.info("Metric value should be an Integer, setting the value as : "+e+"."),e}(e)},t.prototype.getMetric=function(t){return this.counters[t]||0},t.prototype.putAttribute=function(t,e){var n=function(t){return!(0===t.length||t.length>40)&&!_r.some((function(e){return t.startsWith(e)}))&&!!t.match(Er)}(t),r=function(t){return 0!==t.length&&t.length<=100}(e);if(n&&r)this.customAttributes[t]=e;else{if(!n)throw hr.create("invalid attribute name",{attributeName:t});if(!r)throw hr.create("invalid attribute value",{attributeValue:e})}},t.prototype.getAttribute=function(t){return this.customAttributes[t]},t.prototype.removeAttribute=function(t){void 0!==this.customAttributes[t]&&delete this.customAttributes[t]},t.prototype.getAttributes=function(){return Object(l.a)({},this.customAttributes)},t.prototype.setStartTime=function(t){this.startTimeUs=t},t.prototype.setDuration=function(t){this.durationUs=t},t.prototype.calculateTraceMetrics=function(){var t=this.api.getEntriesByName(this.traceMeasure),e=t&&t[0];e&&(this.durationUs=Math.floor(1e3*e.duration),this.startTimeUs=Math.floor(1e3*(e.startTime+this.api.getTimeOrigin())))},t.createOobTrace=function(e,n,r){var i=vr.getInstance().getUrl();if(i){var o=new t(or+i,!0),a=Math.floor(1e3*vr.getInstance().getTimeOrigin());o.setStartTime(a),e&&e[0]&&(o.setDuration(Math.floor(1e3*e[0].duration)),o.putMetric("domInteractive",Math.floor(1e3*e[0].domInteractive)),o.putMetric("domContentLoadedEventEnd",Math.floor(1e3*e[0].domContentLoadedEventEnd)),o.putMetric("loadEventEnd",Math.floor(1e3*e[0].loadEventEnd)));if(n){var s=n.find((function(t){return"first-paint"===t.name}));s&&s.startTime&&o.putMetric("_fp",Math.floor(1e3*s.startTime));var u=n.find((function(t){return"first-contentful-paint"===t.name}));u&&u.startTime&&o.putMetric(ar,Math.floor(1e3*u.startTime)),r&&o.putMetric(sr,Math.floor(1e3*r))}Kr(o)}},t.createUserTimingTrace=function(e){Kr(new t(e,!1,e))},t}();function Jr(t){var e=t;if(e&&void 0!==e.responseStart){var n=vr.getInstance().getTimeOrigin(),r=Math.floor(1e3*(e.startTime+n)),i=e.responseStart?Math.floor(1e3*(e.responseStart-e.startTime)):void 0,o=Math.floor(1e3*(e.responseEnd-e.startTime));!function(t){var e=br.getInstance();if(e.instrumentationEnabled){var n=t.url,r=e.logEndPointUrl.split("?")[0],i=e.flTransportEndpointUrl.split("?")[0];n!==r&&n!==i&&e.loggingEnabled&&e.logNetworkAfterSampling&&setTimeout((function(){return zr(t,0)}),0)}}({url:e.name&&e.name.split("?")[0],responsePayloadBytes:e.transferSize,startTimeUs:r,timeToResponseInitiatedUs:i,timeToResponseCompletedUs:o})}}function Xr(){wr()&&(setTimeout((function(){return function(){var t=vr.getInstance(),e=t.getEntriesByType("navigation"),n=t.getEntriesByType("paint");if(t.onFirstInputDelay){var r=setTimeout((function(){Yr.createOobTrace(e,n),r=void 0}),5e3);t.onFirstInputDelay((function(t){r&&(clearTimeout(r),Yr.createOobTrace(e,n,t))}))}else Yr.createOobTrace(e,n)}()}),0),setTimeout((function(){return function(){for(var t=vr.getInstance(),e=t.getEntriesByType("resource"),n=0,r=e;n<r.length;n++){Jr(r[n])}t.setupObserver("resource",Jr)}()}),0),setTimeout((function(){return function(){for(var t=vr.getInstance(),e=t.getEntriesByType("measure"),n=0,r=e;n<r.length;n++){Zr(r[n])}t.setupObserver("measure",Zr)}()}),0))}function Zr(t){var e=t.name;e.substring(0,ir.length)!==ir&&Yr.createUserTimingTrace(e)}var ti=function(){function t(t){this.app=t,vr.getInstance().requiredApisAvailable()&&Object(a.N)().then((function(t){t&&(qr||(Br(5500),qr=!0),Dr().then(Xr,Xr))})).catch((function(t){pr.info("Environment doesn't support IndexedDB: "+t)}))}return t.prototype.trace=function(t){return new Yr(t)},Object.defineProperty(t.prototype,"instrumentationEnabled",{get:function(){return br.getInstance().instrumentationEnabled},set:function(t){br.getInstance().instrumentationEnabled=t}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataCollectionEnabled",{get:function(){return br.getInstance().dataCollectionEnabled},set:function(t){br.getInstance().dataCollectionEnabled=t},enumerable:!1,configurable:!0}),t}();!function(t){var e=function(t,e){if("[DEFAULT]"!==t.name)throw hr.create("FB not default");if("undefined"===typeof window)throw hr.create("no window");return function(t){er=t}(window),br.getInstance().firebaseAppInstance=t,br.getInstance().installationsService=e,new ti(t)};t.INTERNAL.registerComponent(new u.a("performance",(function(t){var n=t.getProvider("app").getImmediate(),r=t.getProvider("installations").getImmediate();return e(n,r)}),"PUBLIC")),t.registerVersion("@firebase/performance",nr)}(i.a);var ei,ni,ri="https://www.googletagmanager.com/gtag/js";!function(t){t.EVENT="event",t.SET="set",t.CONFIG="config"}(ei||(ei={})),function(t){t.ADD_SHIPPING_INFO="add_shipping_info",t.ADD_PAYMENT_INFO="add_payment_info",t.ADD_TO_CART="add_to_cart",t.ADD_TO_WISHLIST="add_to_wishlist",t.BEGIN_CHECKOUT="begin_checkout",t.CHECKOUT_PROGRESS="checkout_progress",t.EXCEPTION="exception",t.GENERATE_LEAD="generate_lead",t.LOGIN="login",t.PAGE_VIEW="page_view",t.PURCHASE="purchase",t.REFUND="refund",t.REMOVE_FROM_CART="remove_from_cart",t.SCREEN_VIEW="screen_view",t.SEARCH="search",t.SELECT_CONTENT="select_content",t.SELECT_ITEM="select_item",t.SELECT_PROMOTION="select_promotion",t.SET_CHECKOUT_OPTION="set_checkout_option",t.SHARE="share",t.SIGN_UP="sign_up",t.TIMING_COMPLETE="timing_complete",t.VIEW_CART="view_cart",t.VIEW_ITEM="view_item",t.VIEW_ITEM_LIST="view_item_list",t.VIEW_PROMOTION="view_promotion",t.VIEW_SEARCH_RESULTS="view_search_results"}(ni||(ni={}));var ii,oi=new o.b("@firebase/analytics");function ai(t,e,n,r,i,o){return Object(l.b)(this,void 0,void 0,(function(){var a,s,u,c;return Object(l.d)(this,(function(l){switch(l.label){case 0:a=r[i],l.label=1;case 1:return l.trys.push([1,7,,8]),a?[4,e[a]]:[3,3];case 2:return l.sent(),[3,6];case 3:return[4,Promise.all(n)];case 4:return s=l.sent(),(u=s.find((function(t){return t.measurementId===i})))?[4,e[u.appId]]:[3,6];case 5:l.sent(),l.label=6;case 6:return[3,8];case 7:return c=l.sent(),oi.error(c),[3,8];case 8:return t(ei.CONFIG,i,o),[2]}}))}))}function si(t,e,n,r,i){return Object(l.b)(this,void 0,void 0,(function(){var o,a,s,u,c,f,h,p;return Object(l.d)(this,(function(l){switch(l.label){case 0:return l.trys.push([0,4,,5]),o=[],i&&i.send_to?(a=i.send_to,Array.isArray(a)||(a=[a]),[4,Promise.all(n)]):[3,2];case 1:for(s=l.sent(),u=function(t){var n=s.find((function(e){return e.measurementId===t})),r=n&&e[n.appId];if(!r)return o=[],"break";o.push(r)},c=0,f=a;c<f.length&&(h=f[c],"break"!==u(h));c++);l.label=2;case 2:return 0===o.length&&(o=Object.values(e)),[4,Promise.all(o)];case 3:return l.sent(),t(ei.EVENT,r,i||{}),[3,5];case 4:return p=l.sent(),oi.error(p),[3,5];case 5:return[2]}}
2))}))}function ui(t,e,n,r,i){var o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];window[r].push(arguments)};return window[i]&&"function"===typeof window[i]&&(o=window[i]),window[i]=function(t,e,n,r){return function(i,o,a){return Object(l.b)(this,void 0,void 0,(function(){var s;return Object(l.d)(this,(function(u){switch(u.label){case 0:return u.trys.push([0,6,,7]),i!==ei.EVENT?[3,2]:[4,si(t,e,n,o,a)];case 1:return u.sent(),[3,5];case 2:return i!==ei.CONFIG?[3,4]:[4,ai(t,e,n,r,o,a)];case 3:return u.sent(),[3,5];case 4:t(ei.SET,o),u.label=5;case 5:return[3,7];case 6:return s=u.sent(),oi.error(s),[3,7];case 7:return[2]}}))}))}}(o,t,e,n),{gtagCore:o,wrappedGtag:window[i]}}var ci=((ii={})["already-exists"]="A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId.",ii["already-initialized"]="Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.",ii["interop-component-reg-failed"]="Firebase Analytics Interop Component failed to instantiate: {$reason}",ii["invalid-analytics-context"]="Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",ii["indexeddb-unavailable"]="IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",ii["fetch-throttle"]="The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.",ii["config-fetch-failed"]="Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}",ii["no-api-key"]='The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',ii["no-app-id"]='The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',ii),li=new a.b("analytics","Analytics",ci),fi=new(function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=1e3),this.throttleMetadata=t,this.intervalMillis=e}return t.prototype.getThrottleMetadata=function(t){return this.throttleMetadata[t]},t.prototype.setThrottleMetadata=function(t,e){this.throttleMetadata[t]=e},t.prototype.deleteThrottleMetadata=function(t){delete this.throttleMetadata[t]},t}());function hi(t){return new Headers({Accept:"application/json","x-goog-api-key":t})}function pi(t){var e;return Object(l.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s,u;return Object(l.d)(this,(function(c){switch(c.label){case 0:return n=t.appId,r=t.apiKey,i={method:"GET",headers:hi(r)},o="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",n),[4,fetch(o,i)];case 1:if(200===(a=c.sent()).status||304===a.status)return[3,6];s="",c.label=2;case 2:return c.trys.push([2,4,,5]),[4,a.json()];case 3:return u=c.sent(),(null===(e=u.error)||void 0===e?void 0:e.message)&&(s=u.error.message),[3,5];case 4:return c.sent(),[3,5];case 5:throw li.create("config-fetch-failed",{httpStatus:a.status,responseMessage:s});case 6:return[2,a.json()]}}))}))}function di(t,e,n,r){var i=e.throttleEndTimeMillis,o=e.backoffCount;return void 0===r&&(r=fi),Object(l.b)(this,void 0,void 0,(function(){var e,s,u,c,f,h,p;return Object(l.d)(this,(function(l){switch(l.label){case 0:e=t.appId,s=t.measurementId,l.label=1;case 1:return l.trys.push([1,3,,4]),[4,vi(n,i)];case 2:return l.sent(),[3,4];case 3:if(u=l.sent(),s)return oi.warn("Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID "+s+' provided in the "measurementId" field in the local Firebase config. ['+u.message+"]"),[2,{appId:e,measurementId:s}];throw u;case 4:return l.trys.push([4,6,,7]),[4,pi(t)];case 5:return c=l.sent(),r.deleteThrottleMetadata(e),[2,c];case 6:if(!function(t){if(!(t instanceof a.c)||!t.customData)return!1;var e=Number(t.customData.httpStatus);return 429===e||500===e||503===e||504===e}(f=l.sent())){if(r.deleteThrottleMetadata(e),s)return oi.warn("Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID "+s+' provided in the "measurementId" field in the local Firebase config. ['+f.message+"]"),[2,{appId:e,measurementId:s}];throw f}
2return h=503===Number(f.customData.httpStatus)?Object(a.j)(o,r.intervalMillis,30):Object(a.j)(o,r.intervalMillis),p={throttleEndTimeMillis:Date.now()+h,backoffCount:o+1},r.setThrottleMetadata(e,p),oi.debug("Calling attemptFetch again in "+h+" millis"),[2,di(t,p,n,r)];case 7:return[2]}}))}))}function vi(t,e){return new Promise((function(n,r){var i=Math.max(e-Date.now(),0),o=setTimeout(n,i);t.addEventListener((function(){clearTimeout(o),r(li.create("fetch-throttle",{throttleEndTimeMillis:e}))}))}))}var gi=function(){function t(){this.listeners=[]}return t.prototype.addEventListener=function(t){this.listeners.push(t)},t.prototype.abort=function(){this.listeners.forEach((function(t){return t()}))},t}();function yi(t,e,n,r,i){return Object(l.b)(this,void 0,void 0,(function(){var o,s,u,c,f,h,p;return Object(l.d)(this,(function(d){switch(d.label){case 0:return(o=function(t,e,n){return void 0===e&&(e=fi),Object(l.b)(this,void 0,void 0,(function(){var r,i,o,a,s,u,c=this;return Object(l.d)(this,(function(f){if(r=t.options,i=r.appId,o=r.apiKey,a=r.measurementId,!i)throw li.create("no-app-id");if(!o){if(a)return[2,{measurementId:a,appId:i}];throw li.create("no-api-key")}return s=e.getThrottleMetadata(i)||{backoffCount:0,throttleEndTimeMillis:Date.now()},u=new gi,setTimeout((function(){return Object(l.b)(c,void 0,void 0,(function(){return Object(l.d)(this,(function(t){return u.abort(),[2]}))}))}),void 0!==n?n:6e4),[2,di({appId:i,apiKey:o,measurementId:a},s,u,e)]}))}))}(t)).then((function(e){n[e.measurementId]=e.appId,t.options.measurementId&&e.measurementId!==t.options.measurementId&&oi.warn("The measurement ID in the local Firebase config ("+t.options.measurementId+") does not match the measurement ID fetched from the server ("+e.measurementId+"). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.")})).catch((function(t){return oi.error(t)})),e.push(o),s=function(){return Object(l.b)(this,void 0,void 0,(function(){var t;return Object(l.d)(this,(function(e){switch(e.label){case 0:return Object(a.w)()?[3,1]:(oi.warn(li.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),[2,!1]);case 1:return e.trys.push([1,3,,4]),[4,Object(a.N)()];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),oi.warn(li.create("indexeddb-unavailable",{errorInfo:t}).message),[2,!1];case 4:return[2,!0]}}))}))}().then((function(t){return t?r.getId():void 0})),[4,Promise.all([o,s])];case 1:return u=d.sent(),c=u[0],f=u[1],i("js",new Date),(p={}).origin="firebase",p.update=!0,h=p,null!=f&&(h.firebase_id=f),i(ei.CONFIG,c.measurementId,h),[2,c.measurementId]}}))}))}var mi,bi,wi={},_i=[],Ei={},Oi="dataLayer",Si="gtag",Ti=!1;function Ii(t){if(Ti)throw li.create("already-initialized");t.dataLayerName&&(Oi=t.dataLayerName),t.gtagName&&(Si=t.gtagName)}function Ci(t,e){!function(){var t=[];if(Object(a.s)()&&t.push("This is a browser extension environment."),Object(a.e)()||t.push("Cookies are not available."),t.length>0){var e=t.map((function(t,e){return"("+(e+1)+") "+t})).join(" "),n=li.create("invalid-analytics-context",{errorInfo:e});oi.warn(n.message)}}();var n=t.options.appId;if(!n)throw li.create("no-app-id");if(!t.options.apiKey){if(!t.options.measurementId)throw li.create("no-api-key");oi.warn('The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID '+t.options.measurementId+' provided in the "measurementId" field in the local Firebase config.')}if(null!=wi[n])throw li.create("already-exists",{id:n});if(!Ti){(function(){for(var t=window.document.getElementsByTagName("script"),e=0,n=Object.values(t);e<n.length;e++){var r=n[e];if(r.src&&r.src.includes(ri))return r}return null})()||function(t){var e=document.createElement("script");e.src=ri+"?l="+t,e.async=!0,document.head.appendChild(e)}(Oi),function(t){var e=[];Array.isArray(window[t])?e=window[t]:window[t]=e}(Oi);var r=ui(wi,_i,Ei,Oi,Si),i=r.wrappedGtag,o=r.gtagCore;bi=i,mi=o,Ti=!0}return wi[n]=yi(t,_i,Ei,e,mi),{app:t,logEvent:function(t,e,r){(function(t,e,n,r,i){return Object(l.b)(this,void 0,void 0,(function(){var o,a;return Object(l.d)(this,(function(s){switch(s.label){case 0:return i&&i.global?(t(ei.EVENT,n,r),[2]):[3,1];case 1:return[4,e];case 2:o=s.sent(),a=Object(l.a)(Object(l.a)({},r),{send_to:o}),t(ei.EVENT,n,a),s.label=3;case 3:return[2]}}
2))}))})(bi,wi[n],t,e,r).catch((function(t){return oi.error(t)}))},setCurrentScreen:function(t,e){(function(t,e,n,r){return Object(l.b)(this,void 0,void 0,(function(){var i;return Object(l.d)(this,(function(o){switch(o.label){case 0:return r&&r.global?(t(ei.SET,{screen_name:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,e];case 2:i=o.sent(),t(ei.CONFIG,i,{update:!0,screen_name:n}),o.label=3;case 3:return[2]}}))}))})(bi,wi[n],t,e).catch((function(t){return oi.error(t)}))},setUserId:function(t,e){(function(t,e,n,r){return Object(l.b)(this,void 0,void 0,(function(){var i;return Object(l.d)(this,(function(o){switch(o.label){case 0:return r&&r.global?(t(ei.SET,{user_id:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,e];case 2:i=o.sent(),t(ei.CONFIG,i,{update:!0,user_id:n}),o.label=3;case 3:return[2]}}))}))})(bi,wi[n],t,e).catch((function(t){return oi.error(t)}))},setUserProperties:function(t,e){(function(t,e,n,r){return Object(l.b)(this,void 0,void 0,(function(){var i,o,a,s,u;return Object(l.d)(this,(function(c){switch(c.label){case 0:if(!r||!r.global)return[3,1];for(i={},o=0,a=Object.keys(n);o<a.length;o++)s=a[o],i["user_properties."+s]=n[s];return t(ei.SET,i),[2,Promise.resolve()];case 1:return[4,e];case 2:u=c.sent(),t(ei.CONFIG,u,{update:!0,user_properties:n}),c.label=3;case 3:return[2]}}
2))}))})(bi,wi[n],t,e).catch((function(t){return oi.error(t)}))},setAnalyticsCollectionEnabled:function(t){(function(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n;return Object(l.d)(this,(function(r){switch(r.label){case 0:return[4,t];case 1:return n=r.sent(),window["ga-disable-"+n]=!e,[2]}}))}))})(wi[n],t).catch((function(t){return oi.error(t)}))},INTERNAL:{delete:function(){return delete wi[n],Promise.resolve()}}}}var ki="analytics";function Pi(){return Object(l.b)(this,void 0,void 0,(function(){return Object(l.d)(this,(function(t){switch(t.label){case 0:if(Object(a.s)())return[2,!1];if(!Object(a.e)())return[2,!1];if(!Object(a.w)())return[2,!1];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Object(a.N)()];case 2:return[2,t.sent()];case 3:return t.sent(),[2,!1];case 4:return[2]}}))}))}!function(t){t.INTERNAL.registerComponent(new u.a(ki,(function(t){return Ci(t.getProvider("app").getImmediate(),t.getProvider("installations").getImmediate())}),"PUBLIC").setServiceProps({settings:Ii,EventName:ni,isSupported:Pi})),t.INTERNAL.registerComponent(new u.a("analytics-internal",(function(t){try{return{logEvent:t.getProvider(ki).getImmediate().logEvent}}catch(r){throw li.create("interop-component-reg-failed",{reason:r})}}),"PRIVATE")),t.registerVersion("@firebase/analytics","0.6.2")}(i.a);var Ai,Ni=function(){function t(t,e,n,r){this.client=t,this.storage=e,this.storageCache=n,this.logger=r}return t.prototype.isCachedDataFresh=function(t,e){if(!e)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;var n=Date.now()-e,r=n<=t;return this.logger.debug("Config fetch cache check. Cache age millis: "+n+". Cache max age millis (minimumFetchIntervalMillis setting): "+t+". Is cache hit: "+r+"."),r},t.prototype.fetch=function(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n,r,i,o;return Object(l.d)(this,(function(a){switch(a.label){case 0:return[4,Promise.all([this.storage.getLastSuccessfulFetchTimestampMillis(),this.storage.getLastSuccessfulFetchResponse()])];case 1:return e=a.sent(),n=e[0],(r=e[1])&&this.isCachedDataFresh(t.cacheMaxAgeMillis,n)?[2,r]:(t.eTag=r&&r.eTag,[4,this.client.fetch(t)]);case 2:return i=a.sent(),o=[this.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())],200===i.status&&o.push(this.storage.setLastSuccessfulFetchResponse(i)),[4,Promise.all(o)];case 3:return a.sent(),[2,i]}}))}))},t}(),xi=((Ai={})["registration-window"]="Undefined window object. This SDK only supports usage in a browser environment.",Ai["registration-project-id"]="Undefined project identifier. Check Firebase app initialization.",Ai["registration-api-key"]="Undefined API key. Check Firebase app initialization.",Ai["registration-app-id"]="Undefined app identifier. Check Firebase app initialization.",Ai["storage-open"]="Error thrown when opening storage. Original error: {$originalErrorMessage}.",Ai["storage-get"]="Error thrown when reading from storage. Original error: {$originalErrorMessage}.",Ai["storage-set"]="Error thrown when writing to storage. Original error: {$originalErrorMessage}.",Ai["storage-delete"]="Error thrown when deleting from storage. Original error: {$originalErrorMessage}.",Ai["fetch-client-network"]="Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.",Ai["fetch-timeout"]='The config fetch request timed out.  Configure timeout using "fetchTimeoutMillis" SDK setting.',Ai["fetch-throttle"]='The config fetch request timed out while in an exponential backoff state. Configure timeout using "fetchTimeoutMillis" SDK setting. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.',Ai["fetch-client-parse"]="Fetch client could not parse response. Original error: {$originalErrorMessage}.",Ai["fetch-status"]="Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.",Ai),ji=new a.b("remoteconfig","Remote Config",xi);var Ri=function(){function t(t,e,n,r,i,o){this.firebaseInstallations=t,this.sdkVersion=e,this.namespace=n,this.projectId=r,this.apiKey=i,this.appId=o}return t.prototype.fetch=function(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n,r,i,o,a,s,u,c,f,h,p,d,v,g,y,m,b,w;return Object(l.d)(this,(function(l){switch(l.label){case 0:return[4,Promise.all([this.firebaseInstallations.getId(),this.firebaseInstallations.getToken()])];case 1:e=l.sent(),n=e[0],r=e[1],i=window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com",o=i+"/v1/projects/"+this.projectId+"/namespaces/"+this.namespace+":fetch?ke
2y="+this.apiKey,a={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":t.eTag||"*"},s={sdk_version:this.sdkVersion,app_instance_id:n,app_instance_id_token:r,app_id:this.appId,language_code:(void 0===_&&(_=navigator),_.languages&&_.languages[0]||_.language)},u={method:"POST",headers:a,body:JSON.stringify(s)},c=fetch(o,u),f=new Promise((function(e,n){t.signal.addEventListener((function(){var t=new Error("The operation was aborted.");t.name="AbortError",n(t)}))})),l.label=2;case 2:return l.trys.push([2,5,,6]),[4,Promise.race([c,f])];case 3:return l.sent(),[4,c];case 4:return h=l.sent(),[3,6];case 5:throw p=l.sent(),d="fetch-client-network","AbortError"===p.name&&(d="fetch-timeout"),ji.create(d,{originalErrorMessage:p.message});case 6:if(v=h.status,g=h.headers.get("ETag")||void 0,200!==h.status)return[3,11];b=void 0,l.label=7;case 7:return l.trys.push([7,9,,10]),[4,h.json()];case 8:return b=l.sent(),[3,10];case 9:throw w=l.sent(),ji.create("fetch-client-parse",{originalErrorMessage:w.message});case 10:y=b.entries,m=b.state,l.label=11;case 11:if("INSTANCE_STATE_UNSPECIFIED"===m?v=500:"NO_CHANGE"===m?v=304:"NO_TEMPLATE"!==m&&"EMPTY_CONFIG"!==m||(y={}),304!==v&&200!==v)throw ji.create("fetch-status",{httpStatus:v});return[2,{status:v,eTag:g,config:y}]}var _}))}))},t}(),Di=function(){function t(){this.listeners=[]}return t.prototype.addEventListener=function(t){this.listeners.push(t)},t.prototype.abort=function(){this.listeners.forEach((function(t){return t()}))},t}(),Li=["1","true","t","yes","y","on"],Mi=function(){function t(t,e){void 0===e&&(e=""),this._source=t,this._value=e}return t.prototype.asString=function(){return this._value},t.prototype.asBoolean=function(){return"static"!==this._source&&Li.indexOf(this._value.toLowerCase())>=0},t.prototype.asNumber=function(){if("static"===this._source)return 0;var t=Number(this._value);return isNaN(t)&&(t=0),t},t.prototype.getSource=function(){return this._source},t}(),Fi=function(){function t(t,e,n,r,i){this.app=t,this._client=e,this._storageCache=n,this._storage=r,this._logger=i,this._isInitializationComplete=!1,this.settings={fetchTimeoutMillis:6e4,minimumFetchIntervalMillis:432e5},this.defaultConfig={}}return t.prototype.setLogLevel=function(t){switch(t){case"debug":this._logger.logLevel=o.a.DEBUG;break;case"silent":this._logger.logLevel=o.a.SILENT;break;default:this._logger.logLevel=o.a.ERROR}},Object.defineProperty(t.prototype,"fetchTimeMillis",{get:function(){return this._storageCache.getLastSuccessfulFetchTimestampMillis()||-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastFetchStatus",{get:function(){return this._storageCache.getLastFetchStatus()||"no-fetch-yet"},enumerable:!1,configurable:!0}),t.prototype.activate=function(){return Object(l.b)(this,void 0,void 0,(function(){var t,e,n;return Object(l.d)(this,(function(r){switch(r.label){case 0:return[4,Promise.all([this._storage.getLastSuccessfulFetchResponse(),this._storage.getActiveConfigEtag()])];case 1:return t=r.sent(),e=t[0],n=t[1],e&&e.config&&e.eTag&&e.eTag!==n?[4,Promise.all([this._storageCache.setActiveConfig(e.config),this._storage.setActiveConfigEtag(e.eTag)])]:[2,!1];case 2:return r.sent(),[2,!0]}}))}))},t.prototype.ensureInitialized=function(){var t=this;return this._initializePromise||(this._initializePromise=this._storageCache.loadFromStorage().then((function(){t._isInitializationComplete=!0}))),this._initializePromise},t.prototype.fetch=function(){return Object(l.b)(this,void 0,void 0,(function(){var t,e,n,r=this;return Object(l.d)(this,(function(i){switch(i.label){case 0:t=new Di,setTimeout((function(){return Object(l.b)(r,void 0,void 0,(function(){return Object(l.d)(this,(function(e){return t.abort(),[2]}))}))}),this.settings.fetchTimeoutMillis),i.label=1;case 1:return i.trys.push([1,4,,6]),[4,this._client.fetch({cacheMaxAgeMillis:this.settings.minimumFetchIntervalMillis,signal:t})];case 2:return i.sent(),[4,this._storageCache.setLastFetchStatus("success")];case 3:return i.sent(),[3,6];case 4:return e=i.sent(),n=function(t,e){return t instanceof a.c&&-1!==t.code.indexOf(e)}(e,"fetch-throttle")?"throttle":"failure",[4,this._storageCache.setLastFetchStatus(n)];case 5:throw i.sent(),e;case 6:return[2]}}
2))}))},t.prototype.fetchAndActivate=function(){return Object(l.b)(this,void 0,void 0,(function(){return Object(l.d)(this,(function(t){switch(t.label){case 0:return[4,this.fetch()];case 1:return t.sent(),[2,this.activate()]}}))}))},t.prototype.getAll=function(){var t=this;return function(t,e){void 0===t&&(t={});void 0===e&&(e={});return Object.keys(Object(l.a)(Object(l.a)({},t),e))}(this._storageCache.getActiveConfig(),this.defaultConfig).reduce((function(e,n){return e[n]=t.getValue(n),e}),{})},t.prototype.getBoolean=function(t){return this.getValue(t).asBoolean()},t.prototype.getNumber=function(t){return this.getValue(t).asNumber()},t.prototype.getString=function(t){return this.getValue(t).asString()},t.prototype.getValue=function(t){this._isInitializationComplete||this._logger.debug('A value was requested for key "'+t+'" before SDK initialization completed. Await on ensureInitialized if the intent was to get a previously activated value.');var e=this._storageCache.getActiveConfig();return e&&void 0!==e[t]?new Mi("remote",e[t]):this.defaultConfig&&void 0!==this.defaultConfig[t]?new Mi("default",String(this.defaultConfig[t])):(this._logger.debug('Returning static value for key "'+t+'". Define a default or remote value if this is unintentional.'),new Mi("static"))},t}();function Ui(t,e){var n=t.target.error||void 0;return ji.create(e,{originalErrorMessage:n&&n.message})}var Vi="app_namespace_store";var qi=function(){function t(t,e,n,r){void 0===r&&(r=new Promise((function(t,e){var n=indexedDB.open("firebase_remote_config",1);n.onerror=function(t){e(Ui(t,"storage-open"))},n.onsuccess=function(e){t(e.target.result)},n.onupgradeneeded=function(t){var e=t.target.result;switch(t.oldVersion){case 0:e.createObjectStore(Vi,{keyPath:"compositeKey"})}}}))),this.appId=t,this.appName=e,this.namespace=n,this.openDbPromise=r}return t.prototype.getLastFetchStatus=function(){return this.get("last_fetch_status")},t.prototype.setLastFetchStatus=function(t){return this.set("last_fetch_status",t)},t.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.get("last_successful_fetch_timestamp_millis")},t.prototype.setLastSuccessfulFetchTimestampMillis=function(t){return this.set("last_successful_fetch_timestamp_millis",t)},t.prototype.getLastSuccessfulFetchResponse=function(){return this.get("last_successful_fetch_response")},t.prototype.setLastSuccessfulFetchResponse=function(t){return this.set("last_successful_fetch_response",t)},t.prototype.getActiveConfig=function(){return this.get("active_config")},t.prototype.setActiveConfig=function(t){return this.set("active_config",t)},t.prototype.getActiveConfigEtag=function(){return this.get("active_config_etag")},t.prototype.setActiveConfigEtag=function(t){return this.set("active_config_etag",t)},t.prototype.getThrottleMetadata=function(){return this.get("throttle_metadata")},t.prototype.setThrottleMetadata=function(t){return this.set("throttle_metadata",t)},t.prototype.deleteThrottleMetadata=function(){return this.delete("throttle_metadata")},t.prototype.get=function(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n=this;return Object(l.d)(this,(function(i){switch(i.label){case 0:return[4,this.openDbPromise];case 1:return e=i.sent(),[2,new Promise((function(i,o){var a=e.transaction([Vi],"readonly").objectStore(Vi),s=n.createCompositeKey(t);try{var u=a.get(s);u.onerror=function(t){o(Ui(t,"storage-get"))},u.onsuccess=function(t){var e=t.target.result;i(e?e.value:void 0)}}catch(r){o(ji.create("storage-get",{originalErrorMessage:r&&r.message}))}}))]}}))}))},t.prototype.set=function(t,e){return Object(l.b)(this,void 0,void 0,(function(){var n,i=this;return Object(l.d)(this,(function(o){switch(o.label){case 0:return[4,this.openDbPromise];case 1:return n=o.sent(),[2,new Promise((function(o,a){var s=n.transaction([Vi],"readwrite").objectStore(Vi),u=i.createCompositeKey(t);try{var c=s.put({compositeKey:u,value:e});c.onerror=function(t){a(Ui(t,"storage-set"))},c.onsuccess=function(){o()}}catch(r){a(ji.create("storage-set",{originalErrorMessage:r&&r.message}))}}))]}}))}))},t.prototype.delete=function(t){return Object(l.b)(this,void 0,void 0,(function(){var e,n=this;return Object(l.d)(this,(function(i){switch(i.label){case 0:return[4,this.openDbPromise];case 1:return e=i.sent(),[2,new Promise((function(i,o){var a=e.transaction([Vi],"readwrite").objectStore(Vi),s=n.createCompositeKey(t);try{var u=a.delete(s);u.onerror=function(t){o(Ui(t,"storage-delete"))},u.onsuccess=function(){i()}}catch(r){o(ji.create("storage-delete",{originalErrorMessage:r&&r.message}))}}))]}}))}))},t.prototype.createCompositeKey=function(t){return[this.appId,this.appName,this.namespace,t].join()},t}(),Bi=function(){function t(t){this.storage=t}return t.prototype.getLastFetchStatus=function(){return this.lastFetchStatus},t.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.lastSuccessfulFetchTimestampMillis},t.prototype.getActiveConfig=function(){return this.activeConfig},t.prototype.loadFromStorage=function(){return Object(l.b)(this,void 0,void 0,(function(){var t,e,n,r,i,o;return Object(l.d)(this,(function(a){switch(a.label){case 0:return t=this.storage.getLastFetchStatus(),e=this.storage.getLastSuccessfulFetchTimestampMillis(),n=this.storage.getActiveConfig(),[4,t];case 1:return(r=a.sent())&&(this.lastFetchStatus=r),[4,e];case 2:return(i=a.sent())&&(this.lastSuccessfulFetchTimestampMillis=i),[4,n];case 3:return(o=a.sent())&&(this.activeConfig=o),[2]}}))}))},t.prototype.setLastFetchStatus=function(t){return this.lastFetchStatus=t,this.storage.setLastFetchStatus(t)},t.prototype.setLastSuccessfulFetchTimestampMillis=function(t){return this.lastSuccessfulFetchTimestampMillis=t,this.storage.setLastSuccessfulFetchTimestampMillis(t)},t.prototype.setActiveConfig=function(t){return this.activeConfig=t,this.storage.setActiveConfig(t)},t}();function Hi(t,e){return new Promise((function(n,r){var i=Math.max(e-Date.now(),0),o=setTimeout(n,i);
2t.addEventListener((function(){clearTimeout(o),r(ji.create("fetch-throttle",{throttleEndTimeMillis:e}))}))}))}var zi,Ki=function(){function t(t,e){this.client=t,this.storage=e}return t.prototype.fetch=function(t){return Object(l.b)(this,void 0,void 0,(function(){var e;return Object(l.d)(this,(function(n){switch(n.label){case 0:return[4,this.storage.getThrottleMetadata()];case 1:return e=n.sent()||{backoffCount:0,throttleEndTimeMillis:Date.now()},[2,this.attemptFetch(t,e)]}}))}))},t.prototype.attemptFetch=function(t,e){var n=e.throttleEndTimeMillis,r=e.backoffCount;return Object(l.b)(this,void 0,void 0,(function(){var e,i,o;return Object(l.d)(this,(function(s){switch(s.label){case 0:return[4,Hi(t.signal,n)];case 1:s.sent(),s.label=2;case 2:return s.trys.push([2,5,,7]),[4,this.client.fetch(t)];case 3:return e=s.sent(),[4,this.storage.deleteThrottleMetadata()];case 4:return s.sent(),[2,e];case 5:if(!function(t){if(!(t instanceof a.c)||!t.customData)return!1;var e=Number(t.customData.httpStatus);return 429===e||500===e||503===e||504===e}(i=s.sent()))throw i;return o={throttleEndTimeMillis:Date.now()+Object(a.j)(r),backoffCount:r+1},[4,this.storage.setThrottleMetadata(o)];case 6:return s.sent(),[2,this.attemptFetch(t,o)];case 7:return[2]}}
2))}))},t}(),Wi="@firebase/remote-config";(zi=i.a).INTERNAL.registerComponent(new u.a("remoteConfig",(function(t,e){var n=t.getProvider("app").getImmediate(),r=t.getProvider("installations").getImmediate();if("undefined"===typeof window)throw ji.create("registration-window");var i=n.options,a=i.projectId,s=i.apiKey,u=i.appId;if(!a)throw ji.create("registration-project-id");if(!s)throw ji.create("registration-api-key");if(!u)throw ji.create("registration-app-id");e=e||"firebase";var c=new qi(u,n.name,e),l=new Bi(c),f=new o.b(Wi);f.logLevel=o.a.ERROR;var h=new Ri(r,zi.SDK_VERSION,e,a,s,u),p=new Ki(h,c),d=new Ni(p,c,l,f),v=new Fi(n,d,l,c,f);return v.ensureInitialized(),v}),"PUBLIC").setMultipleInstances(!0)),zi.registerVersion(Wi,"0.1.30");i.a.registerVersion("firebase","8.2.1","app");console.warn("\nIt looks like you're using the development build of the Firebase JS SDK.\nWhen deploying Firebase apps to production, it is advisable to only import\nthe individual SDK components you intend to use.\n\nFor the module builds, these are available in the following manner\n(replace <PACKAGE> with the name of a component - i.e. auth, database, etc):\n\nCommonJS Modules:\nconst firebase = require('firebase/app');\nrequire('firebase/<PACKAGE>');\n\nES Modules:\nimport firebase from 'firebase/app';\nimport 'firebase/<PACKAGE>';\n\nTypescript:\nimport firebase from 'firebase/app';\nimport 'firebase/<PACKAGE>';\n"),i.a.registerVersion("firebase","8.2.1")},function(t,e,n){"use strict";n.d(e,"a",(function(){return f})),n.d(e,"b",(function(){return y}));var r=n(8),i=n(16),o=n(2),a=n.n(o),s=n(19),u=(n(31),n(4)),c=n(13),l=n(17),f=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).history=Object(s.a)(e.props),e}return Object(i.a)(e,t),e.prototype.render=function(){return a.a.createElement(r.b,{history:this.history,children:this.props.children})},e}(a.a.Component);a.a.Component;var h=function(t,e){return"function"===typeof t?t(e):t},p=function(t,e){return"string"===typeof t?Object(s.c)(t,null,null,e):t},d=function(t){return t},v=a.a.forwardRef;"undefined"===typeof v&&(v=d);var g=v((function(t,e){var n=t.innerRef,r=t.navigate,i=t.onClick,o=Object(c.a)(t,["innerRef","navigate","onClick"]),s=o.target,l=Object(u.a)({},o,{onClick:function(t){try{i&&i(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||s&&"_self"!==s||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),r())}});return l.ref=d!==v&&e||n,a.a.createElement("a",l)}));var y=v((function(t,e){var n=t.component,i=void 0===n?g:n,o=t.replace,s=t.to,f=t.innerRef,y=Object(c.a)(t,["component","replace","to","innerRef"]);return a.a.createElement(r.d.Consumer,null,(function(t){t||Object(l.a)(!1);var n=t.history,r=p(h(s,t.location),t.location),c=r?n.createHref(r):"",g=Object(u.a)({},y,{href:c,navigate:function(){var e=h(s,t.location);(o?n.replace:n.push)(e)}});return d!==v?g.ref=e||f:g.innerRef=f,a.a.createElement(i,g)}))})),m=function(t){return t},b=a.a.forwardRef;"undefined"===typeof b&&(b=m);b((function(t,e){var n=t["aria-current"],i=void 0===n?"page":n,o=t.activeClassName,s=void 0===o?"active":o,f=t.activeStyle,d=t.className,v=t.exact,g=t.isActive,w=t.location,_=t.sensitive,E=t.strict,O=t.style,S=t.to,T=t.innerRef,I=Object(c.a)(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.a.createElement(r.d.Consumer,null,(function(t){t||Object(l.a)(!1);var n=w||t.location,o=p(h(S,n),n),c=o.pathname,C=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),k=C?Object(r.e)(n.pathname,{path:C,exact:v,sensitive:_,strict:E}):null,P=!!(g?g(k,n):k),A=P?function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.filter((function(t){return t})).join(" ")}(d,s):d,N=P?Object(u.a)({},O,{},f):O,x=Object(u.a)({"aria-current":P&&i||null,className:A,style:N,to:o},I);return m!==b?x.ref=e||T:x.innerRef=T,a.a.createElement(y,x)}))}))},function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;
2if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(t,e){for(var n,s,u=a(t),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))i.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)o.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var t=s(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},,function(t,e,n){"use strict";(function(t,r){var i,o=n(59);i="undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof t?t:r;var a=Object(o.a)(i);e.a=a}).call(this,n(34),n(58)(t))},function(t,e,n){"use strict";(function(t){var r=n(2),i=n.n(r),o=n(16),a=n(31),s=n.n(a),u=1073741823,c="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:{};function l(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,r){t=n,e.forEach((function(e){return e(t,r)}))}}}var f=i.a.createContext||function(t,e){var n,i,a="__create-react-context-"+function(){var t="__global_unique_id__";return c[t]=(c[t]||0)+1}()+"__",f=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).emitter=l(e.props.value),e}Object(o.a)(n,t);var r=n.prototype;return r.getChildContext=function(){var t;return(t={})[a]=this.emitter,t},r.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var n,r=this.props.value,i=t.value;((o=r)===(a=i)?0!==o||1/o===1/a:o!==o&&a!==a)?n=0:(n="function"===typeof e?e(r,i):u,0!==(n|=0)&&this.emitter.set(t.value,n))}var o,a},r.render=function(){return this.props.children},n}(r.Component);f.childContextTypes=((n={})[a]=s.a.object.isRequired,n);var h=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!==((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}Object(o.a)(n,e);var r=n.prototype;return r.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=void 0===e||null===e?u:e},r.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=void 0===t||null===t?u:t},r.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},r.getValue=function(){return this.context[a]?this.context[a].get():t},r.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(r.Component);return h.contextTypes=((i={})[a]=s.a.object,i),{Provider:f,Consumer:h}};e.a=f}).call(this,n(34))},function(t,e,n){var r=n(77);t.exports=p,t.exports.parse=o,t.exports.compile=function(t,e){return s(o(t,e),e)},t.exports.tokensToFunction=s,t.exports.tokensToRegExp=h;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(t,e){for(var n,r=[],o=0,a=0,s="",l=e&&e.delimiter||"/";null!=(n=i.exec(t));){var f=n[0],h=n[1],p=n.index;if(s+=t.slice(a,p),a=p+f.length,h)s+=h[1];else{var d=t[a],v=n[2],g=n[3],y=n[4],m=n[5],b=n[6],w=n[7];s&&(r.push(s),s="");var _=null!=v&&null!=d&&d!==v,E="+"===b||"*"===b,O="?"===b||"*"===b,S=n[2]||l,T=y||m;r.push({name:g||o++,prefix:v||"",delimiter:S,optional:O,repeat:E,partial:_,asterisk:!!w,pattern:T?c(T):w?".*":"[^"+u(S)+"]+?"})}}return a<t.length&&(s+=t.substr(a)),s&&r.push(s),r}function a(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function s(t,e){for(var n=new Array(t.length),i=0;i<t.length;i++)"object"===typeof t[i]&&(n[i]=new RegExp("^(?:"+t[i].pattern+")$",f(e)));return function(e,i){for(var o="",s=e||{},u=(i||{}).pretty?a:encodeURIComponent,c=0;c<t.length;c++){var l=t[c];if("string"!==typeof l){var f,h=s[l.name];if(null==h){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(h)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var p=0;p<h.length;p++){if(f=u(h[p]),!n[c].test(f))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(f)+"`");o+=(0===p?l.prefix:l.delimiter)+f}}else{if(f=l.asterisk?encodeURI(h).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):u(h),!n[c].test(f))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+f+'"');o+=l.prefix+f}}else o+=l}return o}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function l(t,e){return t.keys=e,t}function f(t){return t&&t.sensitive?"":"i"}function h(t,e,n){r(e)||(n=e||n,e=[]);for(var i=(n=n||{}).strict,o=!1!==n.end,a="",s=0;s<t.length;s++){var c=t[s];if("string"===typeof c)a+=u(c);else{var h=u(c.prefix),p="(?:"+c.pattern+")";e.push(c),c.repeat&&(p+="(?:"+h+p+")*"),a+=p=c.optional?c.partial?h+"("+p+")?":"(?:"+h+"("+p+"))?":h+"("+p+")"}}var d=u(n.delimiter||"/"),v=a.slice(-d.length)===d;
2return i||(a=(v?a.slice(0,-d.length):a)+"(?:"+d+"(?=$))?"),a+=o?"$":i&&v?"":"(?="+d+"|$)",l(new RegExp("^"+a,f(n)),e)}function p(t,e,n){return r(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(t,e)}(t,e):r(t)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(p(t[i],e,n).source);return l(new RegExp("(?:"+r.join("|")+")",f(n)),e)}(t,e,n):function(t,e,n){return h(o(t,n),e,n)}(t,e,n)}},function(t,e,n){"use strict";var r=n(25),i=n(53);function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?Object(arguments[e]):{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Object(i.a)(t,e,n[e])}))}return t}var a=n(21),s=n(22),u=n(32),c=n(36),l=n(23),f=n(33),h={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,e){console&&console[t]&&console[t].apply(console,e)}},p=new(function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,t),this.init(e,n)}return Object(s.a)(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||h,this.options=e,this.debug=e.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,e,n,r){return r&&!this.debug?null:("string"===typeof t[0]&&(t[0]="".concat(n).concat(this.prefix," ").concat(t[0])),this.logger[e](t))}},{key:"create",value:function(e){return new t(this.logger,o({},{prefix:"".concat(this.prefix,":").concat(e,":")},this.options))}}]),t}()),d=function(){function t(){Object(a.a)(this,t),this.observers={}}return Object(s.a)(t,[{key:"on",value:function(t,e){var n=this;return t.split(" ").forEach((function(t){n.observers[t]=n.observers[t]||[],n.observers[t].push(e)})),this}},{key:"off",value:function(t,e){this.observers[t]&&(e?this.observers[t]=this.observers[t].filter((function(t){return t!==e})):delete this.observers[t])}},{key:"emit",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(this.observers[t]){var i=[].concat(this.observers[t]);i.forEach((function(t){t.apply(void 0,n)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(e){e.apply(e,[t].concat(n))}))}}}]),t}();function v(){var t,e,n=new Promise((function(n,r){t=n,e=r}));return n.resolve=t,n.reject=e,n}function g(t){return null==t?"":""+t}function y(t,e,n){t.forEach((function(t){e[t]&&(n[t]=e[t])}))}function m(t,e,n){function r(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function i(){return!t||"string"===typeof t}for(var o="string"!==typeof e?[].concat(e):e.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!t[a]&&n&&(t[a]=new n),t=t[a]}return i()?{}:{obj:t,k:r(o.shift())}}function b(t,e,n){var r=m(t,e,Object);r.obj[r.k]=n}function w(t,e){var n=m(t,e),r=n.obj,i=n.k;if(r)return r[i]}function _(t,e,n){var r=w(t,n);return void 0!==r?r:w(e,n)}function E(t,e,n){for(var r in e)"__proto__"!==r&&"constructor"!==r&&(r in t?"string"===typeof t[r]||t[r]instanceof String||"string"===typeof e[r]||e[r]instanceof String?n&&(t[r]=e[r]):E(t[r],e[r],n):t[r]=e[r]);return t}function O(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var S={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function T(t){return"string"===typeof t?t.replace(/[&<>
2"'\/]/g,(function(t){return S[t]})):t}var I="undefined"!==typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,C=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Object(a.a)(this,e),n=Object(u.a)(this,Object(c.a)(e).call(this)),I&&d.call(Object(l.a)(n)),n.data=t||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return Object(f.a)(e,t),Object(s.a)(e,[{key:"addNamespaces",value:function(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}},{key:"getResource",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=[t,e];return n&&"string"!==typeof n&&(o=o.concat(n)),n&&"string"===typeof n&&(o=o.concat(i?n.split(i):n)),t.indexOf(".")>-1&&(o=t.split(".")),w(this.data,o)}},{key:"addResource",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[t,e];n&&(a=a.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(r=e,e=(a=t.split("."))[1]),this.addNamespaces(e),b(this.data,a,r),i.silent||this.emit("added",t,e,n,r)}},{key:"addResources",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!==typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(t,e,i,n[i],{silent:!0});r.silent||this.emit("added",t,e,n)}},{key:"addResourceBundle",value:function(t,e,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,e];t.indexOf(".")>-1&&(r=n,n=e,e=(s=t.split("."))[1]),this.addNamespaces(e);var u=w(this.data,s)||{};r?E(u,n,i):u=o({},u,n),b(this.data,s,u),a.silent||this.emit("added",t,e,n)}},{key:"removeResourceBundle",value:function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}},{key:"hasResourceBundle",value:function(t,e){return void 0!==this.getResource(t,e)}},{key:"getResourceBundle",value:function(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?o({},{},this.getResource(t,e)):this.getResource(t,e)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"toJSON",value:function(){return this.data}}]),e}(d),k={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,n,r,i){var o=this;return t.forEach((function(t){o.processors[t]&&(e=o.processors[t].process(e,n,r,i))})),e}},P={},A=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(a.a)(this,e),n=Object(u.a)(this,Object(c.a)(e).call(this)),I&&d.call(Object(l.a)(n)),y(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
2i18nFormat","utils"],t,Object(l.a)(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=p.create("translator"),n}return Object(f.a)(e,t),Object(s.a)(e,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(t,e);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(t,e){var n=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,i=e.ns||this.options.defaultNS;if(n&&t.indexOf(n)>-1){var o=t.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:t,namespaces:i};var a=t.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),t=a.join(r)}return"string"===typeof i&&(i=[i]),{key:t,namespaces:i}}},{key:"translate",value:function(t,e,n){var i=this;if("object"!==Object(r.a)(e)&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),e||(e={}),void 0===t||null===t)return"";Array.isArray(t)||(t=[String(t)]);
2var a=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,s=this.extractFromKey(t[t.length-1],e),u=s.key,c=s.namespaces,l=c[c.length-1],f=e.lng||this.language,h=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&"cimode"===f.toLowerCase()){if(h){var p=e.nsSeparator||this.options.nsSeparator;return l+p+u}return u}var d=this.resolve(t,e),v=d&&d.res,g=d&&d.usedKey||u,y=d&&d.exactUsedKey||u,m=Object.prototype.toString.apply(v),b=["[object Number]","[object Function]","[object RegExp]"],w=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject,E="string"!==typeof v&&"boolean"!==typeof v&&"number"!==typeof v;if(_&&v&&E&&b.indexOf(m)<0&&("string"!==typeof w||"[object Array]"!==m)){if(!e.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,v,e):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(a){var O="[object Array]"===m,S=O?[]:{},T=O?y:g;for(var I in v)if(Object.prototype.hasOwnProperty.call(v,I)){var C="".concat(T).concat(a).concat(I
vendor: 7,651 bytes, line 2
2);S[I]=this.translate(C,o({},e,{joinArrays:!1,ns:c})),S[I]===C&&(S[I]=v[I])}v=S}}else if(_&&"string"===typeof w&&"[object Array]"===m)(v=v.join(w))&&(v=this.extendTranslation(v,t,e,n));else{var k=!1,P=!1;if(!this.isValidLookup(v)&&void 0!==e.defaultValue){if(k=!0,void 0!==e.count){var A=this.pluralResolver.getSuffix(f,e.count);v=e["defaultValue".concat(A)]}v||(v=e.defaultValue)}this.isValidLookup(v)||(P=!0,v=u);var N=e.defaultValue&&e.defaultValue!==v&&this.options.updateMissing;if(P||k||N){if(this.logger.log(N?"updateKey":"missingKey",f,l,u,N?e.defaultValue:v),a){var x=this.resolve(u,o({},e,{keySeparator:!1}));x&&x.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var j=[],R=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&R&&R[0])for(var D=0;D<R.length;D++)j.push(R[D]);else"all"===this.options.saveMissingTo?j=this.languageUtils.toResolveHierarchy(e.lng||this.language):j.push(e.lng||this.language);var L=function(t,n){i.options.missingKeyHandler?i.options.missingKeyHandler(t,l,n,N?e.defaultValue:v,N,e):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(t,l,n,N?e.defaultValue:v,N,e),i.emit("missingKey",t,l,n,v)};if(this.options.saveMissing){var M=void 0!==e.count&&"string"!==typeof e.count;this.options.saveMissingPlurals&&M?j.forEach((function(t){i.pluralResolver.getPluralFormsOfKey(t,u).forEach((function(e){return L([t],e)}))})):L(j,u)}}v=this.extendTranslation(v,t,e,d,n),P&&v===u&&this.options.appendNamespaceToMissingKey&&(v="".concat(l,":").concat(u)),P&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(v))}return v}},{key:"extendTranslation",value:function(t,e,n,r,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(o({},n,{interpolation:o({},this.options.interpolation,n.interpolation)}));var s,u=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(u){var c=t.match(this.interpolator.nestingRegexp);s=c&&c.length}var l=n.replace&&"string"!==typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=o({},this.options.interpolation.defaultVariables,l)),t=this.interpolator.interpolate(t,l,n.lng||this.language,n),u){var f=t.match(this.interpolator.nestingRegexp);s<(f&&f.length)&&(n.nest=!1)}!1!==n.nest&&(t=this.interpolator.nest(t,(function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return i&&i[0]===r[0]&&!n.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(e[0])),null):a.translate.apply(a,r.concat([e]))}),n)),n.interpolation&&this.interpolator.reset()}var h=n.postProcess||this.options.postProcess,p="string"===typeof h?[h]:h;return void 0!==t&&null!==t&&p&&p.length&&!1!==n.applyPostProcessor&&(t=k.handle(p,t,e,this.options&&this.options.postProcessPassResolved?o({i18nResolved:r},n):n,this)),t}},{key:"resolve",value:function(t){var e,n,r,i,o,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"===typeof t&&(t=[t]),t.forEach((function(t){if(!a.isValidLookup(e)){var u=a.extractFromKey(t,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!==typeof s.count,h=void 0!==s.context&&"string"===typeof s.context&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(t){a.isValidLookup(e)||(o=t,!P["".concat(p[0],"-").concat(t)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(P["".concat(p[0],"-").concat(t)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(e)){i=n;var o,u,l=c,p=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(p,c,n,t,s);else f&&(o=a.pluralResolver.getSuffix(n,s.count)),f&&h&&p.push(l+o),h&&p.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&p.push(l+=o);for(;u=p.pop();)a.isValidLookup(e)||(r=u,e=a.getResource(n,t,u,s))}})))}))}})),{res:e,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(t){return void 0!==t&&!(!this.options.returnNull&&null===t)&&!(!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,n,r):this.resourceStore.getResource(t,e,n,r)}}]),e}(d);function N(t){return t.charAt(0).toUpperCase()+t.slice(1)}var x=function(){function t(e){Object(a.a)(this,t),this.options=e,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=p.create("languageUtils")}return Object(s.a)(t,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var e=t.split("-");return this.formatLanguageCode(e[0])}},{key:"formatLanguageCode",value:function(t){if("string"===typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map((function(t){return t.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=N(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=N(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=N(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function(t){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var e,n=this;return t?(t.forEach((function(t){if(!e){var r=n.formatLanguageCode(t);n.options.supportedLngs&&!n.isSupportedCode(r)||(e=r)}})),!e&&this.options.supportedLngs&&t.forEach((function(t){if(!e){var r=n.getLanguagePartFromCode(t);if(n.isSupportedCode(r))return e=r;e=n.options.supportedLngs.find((function(t){if(0===t.indexOf(r))return t}))}})),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e):null}},{key:"getFallbackCodes",value:function(t,e){if(!t)return[];if("function"===typeof t&&(t=t(e)),"string"===typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var n=t[e];
vendor: 10,126 bytes, line 2
2return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t[this.getLanguagePartFromCode(e)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function(t,e){var n=this,r=this.getFallbackCodes(e||this.options.fallbackLng||[],t),i=[],o=function(t){t&&(n.isSupportedCode(t)?i.push(t):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"===typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):"string"===typeof t&&o(this.formatLanguageCode(t)),r.forEach((function(t){i.indexOf(t)<0&&o(n.formatLanguageCode(t))})),i}}]),t}(),j=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],R={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};function D(){var t={};return j.forEach((function(e){e.lngs.forEach((function(n){t[n]={numbers:e.nr,plurals:R[e.fc]}}))})),t}var L=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,t),this.languageUtils=e,this.options=n,this.logger=p.create("pluralResolver"),this.rules=D()}return Object(s.a)(t,[{key:"addRule",value:function(t,e){this.rules[t]=e}},{key:"getRule",value:function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var e=this.getRule(t);return e&&e.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,e){var n=this,r=[],i=this.getRule(t);return i?(i.numbers.forEach((function(i){var o=n.getSuffix(t,i);r.push("".concat(e).concat(o))})),r):r}},{key:"getSuffix",value:function(t,e){var n=this,r=this.getRule(t);if(r){var i=r.noAbs?r.plurals(e):r.plurals(Math.abs(e)),o=r.numbers[i];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"===typeof o?"_plural_".concat(o.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),t}(),M=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this,t),this.logger=p.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(t){return t},this.init(e)}return Object(s.a)(t,[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var e=t.interpolation;this.escape=void 0!==e.escape?e.escape:T,this.escapeValue=void 0===e.escapeValue||e.escapeValue,this.useRawValueToEscape=void 0!==e.useRawValueToEscape&&e.useRawValueToEscape,this.prefix=e.prefix?O(e.prefix):e.prefixEscaped||"{{",this.suffix=e.suffix?O(e.suffix):e.suffixEscaped||"}}",this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||",",this.unescapePrefix=e.unescapeSuffix?"":e.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":e.unescapeSuffix||"",this.nestingPrefix=e.nestingPrefix?O(e.nestingPrefix):e.nestingPrefixEscaped||O("$t("),this.nestingSuffix=e.nestingSuffix?O(e.nestingSuffix):e.nestingSuffixEscaped||O(")"),this.nestingOptionsSeparator=e.nestingOptionsSeparator?e.nestingOptionsSeparator:e.nestingOptionsSeparator||",",this.maxReplaces=e.maxReplaces?e.maxReplaces:1e3,this.alwaysFormat=void 0!==e.alwaysFormat&&e.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var e="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(e,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(t,e,n,r){var i,o,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(t){return t.replace(/\$/g,"$$$$")}var l=function(t){if(t.indexOf(s.formatSeparator)<0){var i=_(e,u,t);return s.alwaysFormat?s.format(i,void 0,n):i}var o=t.split(s.formatSeparator),a=o.shift().trim(),c=o.join(s.formatSeparator).trim();return s.format(_(e,u,a),c,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(t){return c(t)}},{regex:this.regexp,safeValue:function(t){return s.escapeValue?c(s.escape(t)):c(t)}}].forEach((function(e){for(a=0;i=e.regex.exec(t);){if(void 0===(o=l(i[1].trim())))if("function"===typeof f){var n=f(t,i,r);o="string"===typeof n?n:""}else{if(h){o=i[0];continue}s.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(t)),o=""}else"string"===typeof o||s.useRawValueToEscape||(o=g(o));if(t=t.replace(i[0],e.safeValue(o)),e.regex.lastIndex=0,++a>=s.maxReplaces)break}})),t}},{key:"nest",value:function(t,e){var n,r,i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=o({},a);function u(t,e){var n=this.nestingOptionsSeparator;if(t.indexOf(n)<0)return t;var r=t.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);t=r[0],i=(i=this.interpolate(i,s)).replace(/'/g,'"');try{s=JSON.parse(i),e&&(s=o({},e,s))}catch(a){return this.logger.warn("failed parsing options string in nesting for key ".concat(t),a),"".concat(t).concat(n).concat(i)}return delete s.defaultValue,t}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(t);){var c=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var f=n[1].split(this.formatSeparator).map((function(t){return t.trim()}));n[1]=f.shift(),c=f,l=!0}if((r=e(u.call(this,n[1].trim(),s),s))&&n[0]===t&&"string"!==typeof r)return r;"string"!==typeof r&&(r=g(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(t)),r=""),l&&(r=c.reduce((function(t,e){return i.format(t,e,a.lng,a)}),r.trim())),t=t.replace(n[0],r),this.regexp.lastIndex=0}return t}}]),t}();var F=function(t){function e(t,n,r){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(a.a)(this,e),i=Object(u.a)(this,Object(c.a)(e).call(this)),I&&d.call(Object(l.a)(i)),i.backend=t,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=o,i.logger=p.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,o.backend,o),i}return Object(f.a)(e,t),Object(s.a)(e,[{key:"queueLoad",value:function(t,e,n,r){var i=this,o=[],a=[],s=[],u=[];return t.forEach((function(t){var r=!0;e.forEach((function(e){var s="".concat(t,"|").concat(e);!n.reload&&i.store.hasResourceBundle(t,e)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?a.indexOf(s)<0&&a.push(s):(i.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),o.indexOf(s)<0&&o.push(s),u.indexOf(e)<0&&u.push(e)))})),r||s.push(t)})),(o.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:o,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(t,e,n){var r=t.split("|"),i=r[0],o=r[1];
2e&&this.emit("failedLoading",i,o,e),n&&this.store.addResourceBundle(i,o,n),this.state[t]=e?-1:2;var a={};this.queue.forEach((function(n){!function(t,e,n,r){var i=m(t,e,Object),o=i.obj,a=i.k;o[a]=o[a]||[],r&&(o[a]=o[a].concat(n)),r||o[a].push(n)}(n.loaded,[i],o),function(t,e){for(var n=t.indexOf(e);-1!==n;)t.splice(n,1),n=t.indexOf(e)}(n.pending,t),e&&n.errors.push(e),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(t){a[t]||(a[t]=[]),n.loaded[t].length&&n.loaded[t].forEach((function(e){a[t].indexOf(e)<0&&a[t].push(e)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(t){return!t.done}))}},{key:"read",value:function(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[n](t,e,(function(s,u){s&&u&&i<5?setTimeout((function(){r.read.call(r,t,e,n,i+1,2*o,a)}),o):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"===typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"===typeof e&&(e=[e]);var o=this.queueLoad(t,e,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(t){n.loadOne(t)}))}},{key:"load",value:function(t,e,n){this.prepareLoading(t,e,{},n)}},{key:"reload",value:function(t,e,n){this.prepareLoading(t,e,{reload:!0},n)}},{key:"loadOne",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(function(r,a){r&&e.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&a&&e.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),a),e.loaded(t,r,a)}))}},{key:"saveMissing",value:function(t,e,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(e,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):void 0!==n&&null!==n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(t,e,n,r,null,o({},a,{isUpdate:i})),t&&t[0]&&this.store.addResource(t[0],e,n,r))}}]),e}(d);function U(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var e={};if("object"===Object(r.a)(t[1])&&(e=t[1]),"string"===typeof t[1]&&(e.defaultValue=t[1]),"string"===typeof t[2]&&(e.tDescription=t[2]),"object"===Object(r.a)(t[2])||"object"===Object(r.a)(t[3])){var n=t[3]||t[2];Object.keys(n).forEach((function(t){e[t]=n[t]}))}return e},interpolation:{escapeValue:!0,format:function(t,e,n,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function V(t){return"string"===typeof t.ns&&(t.ns=[t.ns]),"string"===typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"===typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&(t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t.supportedLngs=t.whitelist),t.nonExplicitWhitelist&&(t.nonExplicitSupportedLngs=t.nonExplicitWhitelist),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supp
2ortedLngs=t.supportedLngs.concat(["cimode"])),t}function q(){}var B=new(function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(Object(a.a)(this,e),t=Object(u.a)(this,Object(c.a)(e).call(this)),I&&d.call(Object(l.a)(t)),t.options=V(n),t.services={},t.logger=p,t.modules={external:[]},r&&!t.isInitialized&&!n.isClone){if(!t.options.initImmediate)return t.init(n,r),Object(u.a)(t,Object(l.a)(t));setTimeout((function(){t.init(n,r)}),0)}return t}return Object(f.a)(e,t),Object(s.a)(e,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(t){return t?"function"===typeof t?new t:t:null}if("function"===typeof e&&(n=e,e={}),e.whitelist&&!e.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),e.nonExplicitWhitelist&&!e.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=o({},U(),this.options,V(e)),this.format=this.options.interpolation.format,n||(n=q),!this.options.isClone){this.modules.logger?p.init(r(this.modules.logger),this.options):p.init(null,this.options);var i=new x(this.options);this.store=new C(this.options.resources,this.options);var a=this.services;a.logger=p,a.resourceStore=this.store,a.languageUtils=i,a.pluralResolver=new L(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new M(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new F(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e].concat(r))})),this.modules.languageDetector&&(a.languageDetector=r(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=r(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new A(this.services,this.options),this.translator.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e].concat(r))})),this.modules.external.forEach((function(e){e.init&&e.init(t)}))}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var s=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];s.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var c=v(),l=function(){t.changeLanguage(t.options.lng,(function(e,r){t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),c.resolve(r),n(e,r)}))};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),c}},{key:"loadResources",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q,r=n,i="string"===typeof t?t:this.language;if("function"===typeof t&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return r();var o=[],a=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(t){o.indexOf(t)<0&&o.push(t)}))};if(i)a(i);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(t){return a(t)}))}this.options.preload&&this.options.preload.forEach((function(t){return a(t)})),this.services.backendConnector.load(o,this.options.ns,r)}else r(null)}},{key:"reloadResources",value:function(t,e,n){var r=v();return t||(t=this.languages),e||(e=this.options.ns),n||(n=q),this.services.backendConnector.reload(t,e,(function(t){r.resolve(),n(t)})),r}},{key:"use",value:function(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&k.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function(t,e){var n=this;this.isLanguageChangingTo=t;var r=v();
2this.emit("languageChanging",t);var i=function(t){var i="string"===typeof t?t:n.services.languageUtils.getBestMatchFromCodes(t);i&&(n.language||(n.language=i,n.languages=n.services.languageUtils.toResolveHierarchy(i)),n.translator.language||n.translator.changeLanguage(i),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(i)),n.loadResources(i,(function(t){!function(t,i){i?(n.language=i,n.languages=n.services.languageUtils.toResolveHierarchy(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),e&&e(t,(function(){return n.t.apply(n,arguments)}))}(t,i)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(t):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(t,e){var n=this,i=function t(e,i){var a;if("object"!==Object(r.a)(i)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];a=n.options.overloadTranslationOptionHandler([e,i].concat(u))}else a=o({},i);return a.lng=a.lng||t.lng,a.lngs=a.lngs||t.lngs,a.ns=a.ns||t.ns,n.t(e,a)};return"string"===typeof t?i.lng=t:i.lngs=t,i.ns=e,i}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"hasLoadedNamespace",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
2if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(t,n){var r=e.services.backendConnector.state["".concat(t,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,t)||(!this.services.backendConnector.backend||!(!a(r,t)||i&&!a(o,t)))}},{key:"loadNamespaces",value:function(t,e){var n=this,r=v();return this.options.ns?("string"===typeof t&&(t=[t]),t.forEach((function(t){n.options.ns.indexOf(t)<0&&n.options.ns.push(t)})),this.loadResources((function(t){r.resolve(),e&&e(t)})),r):(e&&e(),Promise.resolve())}},{key:"loadLanguages",value:function(t,e){var n=v();"string"===typeof t&&(t=[t]);var r=this.options.preload||[],i=t.filter((function(t){return r.indexOf(t)<0}));return i.length?(this.options.preload=r.concat(i),this.loadResources((function(t){n.resolve(),e&&e(t)})),n):(e&&e(),Promise.resolve())}},{key:"dir",value:function(t){if(t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),!t)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new e(t,n)}},{key:"cloneInstance",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q,i=o({},this.options,n,{isClone:!0}),a=new e(i),s=["store","services","language"];return s.forEach((function(e){a[e]=t[e]})),a.services=o({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new A(a.services,a.options),a.translator.on("*",(function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];a.emit.apply(a,[t].concat(n))})),a.init(i,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}}]),e}(d));e.a=B},function(t,e,n){"use strict";var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRen
2dering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}((function(t){return r.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}));e.a=i},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";function r(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}))},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e){t.exports=function(t,e,n,r){var i=n?n.call(r,t,e):void 0;if(void 0!==i)return!!i;if(t===e)return!0;if("object"!==typeof t||!t||"object"!==typeof e||!e)return!1;var o=Object.keys(t),a=Object.keys(e);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(e),u=0;u<o.length;u++){var c=o[u];if(!s(c))return!1;var l=t[c],f=e[c];if(!1===(i=n?n.call(r,l,f,c):void 0)||void 0===i&&l!==f)return!1}return!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"c",(function(){return v})),n.d(e,"b",(function(){return g})),n.d(e,"d",(function(){return y})),n.d(e,"e",(function(){return m}));var r=n(54),i=n.n(r),o=n(55),a=n.n(o),s=n(51),u=n.n(s),c=n(2);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
vendor: 5,255 bytes, line 2
2e%2?l(Object(n),!0).forEach((function(e){u()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var h,p={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0},d=n.n(c).a.createContext();function v(){return p}var g=function(){function t(){i()(this,t),this.usedNamespaces={}}return a()(t,[{key:"addUsedNamespaces",value:function(t){var e=this;t.forEach((function(t){e.usedNamespaces[t]||(e.usedNamespaces[t]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),t}();function y(){return h}var m={type:"3rdParty",init:function(t){!function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p=f(f({},p),t)}(t.options.react),function(t){h=t}(t)}}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";function r(t){var e,n=t.Symbol;return"function"===typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}n.d(e,"a",(function(){return r}))},function(t,e,n){},function(t,e,n){"use strict";e.a=function(t){function e(t,r,u,c,h){for(var p,d,v,g,w,E=0,O=0,S=0,T=0,I=0,x=0,R=v=p=0,L=0,M=0,F=0,U=0,V=u.length,q=V-1,B="",H="",z="",K="";L<V;){if(d=u.charCodeAt(L),L===q&&0!==O+T+S+E&&(0!==O&&(d=47===O?10:47),T=S=E=0,V++,q++),0===O+T+S+E){if(L===q&&(0<M&&(B=B.replace(f,"")),0<B.trim().length)){switch(d){case 32:case 9:case 59:case 13:case 10:break;default:B+=u.charAt(L)}d=59}switch(d){case 123:for(p=(B=B.trim()).charCodeAt(0),v=1,U=++L;L<V;){switch(d=u.charCodeAt(L)){case 123:v++;break;case 125:v--;break;case 47:switch(d=u.charCodeAt(L+1)){case 42:case 47:t:{for(R=L+1;R<q;++R)switch(u.charCodeAt(R)){case 47:if(42===d&&42===u.charCodeAt(R-1)&&L+2!==R){L=R+1;break t}break;case 10:if(47===d){L=R+1;break t}}L=R}}break;case 91:d++;case 40:d++;case 34:case 39:for(;L++<q&&u.charCodeAt(L)!==d;);}if(0===v)break;L++}switch(v=u.substring(U,L),0===p&&(p=(B=B.replace(l,"").trim()).charCodeAt(0)),p){case 64:switch(0<M&&(B=B.replace(f,"")),d=B.charCodeAt(1)){case 100:case 109:case 115:case 45:M=r;break;default:M=N}if(U=(v=e(r,M,v,d,h+1)).length,0<j&&(w=s(3,v,M=n(N,B,F),r,k,C,U,d,h,c),B=M.join(""),void 0!==w&&0===(U=(v=w.trim()).length)&&(d=0,v="")),0<U)switch(d){case 115:B=B.replace(_,a);case 100:case 109:case 45:v=B+"{"+v+"}";break;case 107:v=(B=B.replace(y,"$1 $2"))+"{"+v+"}",v=1===A||2===A&&o("@"+v,3)?"@-webkit-"+v+"@"+v:"@"+v;break;default:v=B+v,112===c&&(H+=v,v="")}else v="";break;default:v=e(r,n(r,B,F),v,c,h+1)}z+=v,v=F=M=R=p=0,B="",d=u.charCodeAt(++L);break;case 125:case 59:if(1<(U=(B=(0<M?B.replace(f,""):B).trim()).length))switch(0===R&&(p=B.charCodeAt(0),45===p||96<p&&123>p)&&(U=(B=B.replace(" ",":")).length),0<j&&void 0!==(w=s(1,B,r,t,k,C,H.length,c,h,c))&&0===(U=(B=w.trim()).length)&&(B="\0\0"),p=B.charCodeAt(0),d=B.charCodeAt(1),p){case 0:break;case 64:if(105===d||99===d){K+=B+u.charAt(L);break}default:58!==B.charCodeAt(U-1)&&(H+=i(B,p,d,B.charCodeAt(2)))}F=M=R=p=0,B="",d=u.charCodeAt(++L)}}switch(d){case 13:case 10:47===O?O=0:0===1+p&&107!==c&&0<B.length&&(M=1,B+="\0"),0<j*D&&s(0,B,r,t,k,C,H.length,c,h,c),C=1,k++;break;case 59:case 125:if(0===O+T+S+E){C++;break}default:switch(C++,g=u.charAt(L),d){case 9:case 32:if(0===T+E+O)switch(I){case 44:case 58:case 9:case 32:g="";break;default:32!==d&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===T+O+E&&(M=F=1,g="\f"+g);break;case 108:if(0===T+O+E+P&&0<R)switch(L-R){case 2:112===I&&58===u.charCodeAt(L-3)&&(P=I);case 8:111===x&&(P=x)}break;case 58:0===T+O+E&&(R=L);break;case 44:0===O+S+T+E&&(M=1,g+="\r");break;case 34:case 39:0===O&&(T=T===d?0:0===T?d:T);break;case 91:0===T+O+S&&E++;break;case 93:0===T+O+S&&E--;break;case 41:0===T+O+E&&S--;break;case 40:if(0===T+O+E){if(0===p)switch(2*I+3*x){case 533:break;default:p=1}S++}break;case 64:0===O+S+T+E+R+v&&(v=1);break;case 42:case 47:if(!(0<T+E+S))switch(O){case 0:switch(2*d+3*u.charCodeAt(L+1)){case 235:O=47;break;case 220:U=L,O=42}break;case 42:47===d&&42===I&&U+2!==L&&(33===u.charCodeAt(U+2)&&(H+=u.substring(U,L+1)),g="",O=0)}}0===O&&(B+=g)}x=I,I=d,L++}if(0<(U=H.length)){if(M=r,0<j&&(void 0!==(w=s(2,H,M,t,k,C,U,c,h,c))&&0===(H=w).length))return K+H+z;if(H=M.join(",")+"{"+H+"}",0!==A*P){switch(2!==A||o(H,2)||(P=0),P){case 111:H=H.replace(b,":-moz-$1")+H;break;case 112:H=H.replace(m,"::-webkit-input-$1")+H.replace(m,"::-moz-$1")+H.replace(m,":-ms-input-$1")+H}P=0}}return K+H+z}function n(t,e,n){var i=e.trim().split(v);e=i;var o=i.length,a=t.length;switch(a){case 0:case 1:var s=0;for(t=0===a?"":t[0]+" ";s<o;++s)e[s]=r(t,e[s],n).trim();break;default:var u=s=0;for(e=[];s<o;++s)for(var c=0;c<a;++c)e[u++]=r(t[c]+" ",i[s],n).trim()}return e}function r(t,e,n){var r=e.charCodeAt(0);switch(33>
vendor: 4,496 bytes, line 2
2r&&(r=(e=e.trim()).charCodeAt(0)),r){case 38:return e.replace(g,"$1"+t.trim());case 58:return t.trim()+e.replace(g,"$1"+t.trim());default:if(0<1*n&&0<e.indexOf("\f"))return e.replace(g,(58===t.charCodeAt(0)?"":"$1")+t.trim())}return t+e}function i(t,e,n,r){var a=t+";",s=2*e+3*n+4*r;if(944===s){t=a.indexOf(":",9)+1;var u=a.substring(t,a.length-1).trim();return u=a.substring(0,t).trim()+u+";",1===A||2===A&&o(u,1)?"-webkit-"+u+u:u}if(0===A||2===A&&!o(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(I,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(u=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+u+a;case 1005:return p.test(a)?a.replace(h,":-webkit-")+a.replace(h,":-moz-")+a:a;case 1e3:switch(e=(u=a.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(e)){case 226:u=a.replace(w,"tb");break;case 232:u=a.replace(w,"tb-rl");break;case 220:u=a.replace(w,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+u+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(e=(a=t).length-10,s=(u=(33===a.charCodeAt(e)?a.substring(0,e):a).substring(t.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(111>u.charCodeAt(8))break;case 115:a=a.replace(u,"-webkit-"+u)+";"+a;break;case 207:case 102:a=a.replace(u,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(u,"-webkit-"+u)+";"+a.replace(u,"-ms-"+u+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return u=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+u+"-ms-flex-"+u+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(O,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(O,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===T.test(t))return 115===(u=t.substring(t.indexOf(":")+1)).charCodeAt(0)?i(t.replace("stretch","fill-available"),e,n,r).replace(":fill-available",":stretch"):a.replace(u,"-webkit-"+u)+a.replace(u,"-moz-"+u.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+r&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(d,"$1-webkit-$2")+a}return a}function o(t,e){var n=t.indexOf(1===e?":":"{"),r=t.substring(0,3!==e?n:10);return n=t.substring(n+1,t.length-1),R(2!==e?r:r.replace(S,"$1"),n,e)}function a(t,e){var n=i(e,e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2));return n!==e+";"?n.replace(E," or ($1)").substring(4):"("+e+")"}function s(t,e,n,r,i,o,a,s,u,l){for(var f,h=0,p=e;h<j;++h)switch(f=x[h].call(c,t,p,n,r,i,o,a,s,u,l)){case void 0:case!1:case!0:case null:break;default:p=f}if(p!==e)return p}function u(t){return void 0!==(t=t.prefix)&&(R=null,t?"function"!==typeof t?A=1:(A=2,R=t):A=0),u}function c(t,n){var r=t;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<j){var i=s(-1,n,r,r,k,C,0,0,0,0);void 0!==i&&"string"===typeof i&&(n=i)}var o=e(N,r,n,0,0);return 0<j&&(void 0!==(i=s(-2,o,r,r,k,C,o.length,0,0,0))&&(o=i)),"",P=0,C=k=1,o}var l=/^\0+/g,f=/[\0\r\f]/g,h=/: */g,p=/zoo|gra/,d=/([,: ])(transform)/g,v=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,y=/@(k\w+)\s*(\S*)\s*/,m=/::(place)/g,b=/:(read-only)/g,w=/[svh]\w+-[tblr]{2}/,_=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,O=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,I=/([^-])(image-set\()/,C=1,k=1,P=0,A=1,N=[],x=[],j=0,R=null,D=0;return c.use=function t(e){switch(e){case void 0:case null:j=x.length=0;break;default:if("function"===typeof e)x[j++]=e;else if("object"===typeof e)for(var n=0,r=e.length;n<r;++n)t(e[n]);else D=0|!!e}return t}
vendor: 5,084 bytes, line 2
2,c.set=u,void 0!==t&&u(t),c}},function(t,e,n){"use strict";e.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},,,function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"===typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(N){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof g?e:g,o=Object.create(i.prototype),a=new k(r||[]);return o._invoke=function(t,e,n){var r=f;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=l(t,e,n);if("normal"===u.type){if(r=n.done?d:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(N){return{type:"throw",arg:N}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function g(){}function y(){}function m(){}var b={};b[o]=function(){return this};var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,o)&&(b=_);var E=m.prototype=g.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function n(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"===typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=l(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(t){if(t){var n=t[o];if(n)return n.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:A}}function A(){return{value:e,done:!0}}return y.prototype=E.constructor=m,m.constructor=y,y.displayName=u(m,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,s,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},O(S.prototype),S.prototype[a]=function(){return this},t.AsyncIterator=S,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new S(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(E),u(E,s,"Generator"),E[o]=function(){return this},E.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=P,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEac
vendor: 2,422 bytes, line 2
2h(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=r}catch(i){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){"use strict";n(43);var r=n(2),i=60103;if(e.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),e.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var r,o={},c=null,l=null;
2for(r in void 0!==n&&(c=""+n),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(l=e.ref),e)s.call(e,r)&&!u.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps)void 0===o[r]&&(o[r]=e[r]);return{$$typeof:i,type:t,key:c,ref:l,props:o,_owner:a.current}}e.jsx=c,e.jsxs=c},function(t,e,n){"use strict";var r=n(43),i=60103,o=60106;e.Fragment=60107,e.StrictMode=60108,e.Profiler=60114;var a=60109,s=60110,u=60112;e.Suspense=60113;var c=60115,l=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;i=f("react.element"),o=f("react.portal"),e.Fragment=f("react.fragment"),e.StrictMode=f("react.strict_mode"),e.Profiler=f("react.profiler"),a=f("react.provider"),s=f("react.context"),u=f("react.forward_ref"),e.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var h="function"===typeof Symbol&&Symbol.iterator;function p(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function g(t,e,n){this.props=t,this.context=e,this.refs=v,this.updater=n||d}function y(){}function m(t,e,n){this.props=t,this.context=e,this.refs=v,this.updater=n||d}g.prototype.isReactComponent={},g.prototype.setState=function(t,e){if("object"!==typeof t&&"function"!==typeof t&&null!=t)throw Error(p(85));this.updater.enqueueSetState(this,t,e,"setState")},g.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},y.prototype=g.prototype;var b=m.prototype=new y;b.constructor=m,r(b,g.prototype),b.isPureReactComponent=!0;var w={current:null},_=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function O(t,e,n){var r,o={},a=null,s=null;
vendor: 12,380 bytes, line 2
2if(null!=e)for(r in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=""+e.key),e)_.call(e,r)&&!E.hasOwnProperty(r)&&(o[r]=e[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}if(t&&t.defaultProps)for(r in u=t.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:t,key:a,ref:s,props:o,_owner:w.current}}function S(t){return"object"===typeof t&&null!==t&&t.$$typeof===i}var T=/\/+/g;function I(t,e){return"object"===typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}(""+t.key):e.toString(36)}function C(t,e,n,r,a){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case o:u=!0}}if(u)return a=a(u=t),t=""===r?"."+I(u,0):r,Array.isArray(a)?(n="",null!=t&&(n=t.replace(T,"$&/")+"/"),C(a,e,n,"",(function(t){return t}))):null!=a&&(S(a)&&(a=function(t,e){return{$$typeof:i,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(T,"$&/")+"/")+t)),e.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(t))for(var c=0;c<t.length;c++){var l=r+I(s=t[c],c);u+=C(s,e,n,l,a)}else if("function"===typeof(l=function(t){return null===t||"object"!==typeof t?null:"function"===typeof(t=h&&t[h]||t["@@iterator"])?t:null}(t)))for(t=l.call(t),c=0;!(s=t.next()).done;)u+=C(s=s.value,e,n,l=r+I(s,c++),a);else if("object"===s)throw e=""+t,Error(p(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e));return u}function k(t,e,n){if(null==t)return t;var r=[],i=0;return C(t,r,"","",(function(t){return e.call(n,t,i++)})),r}function P(t){if(-1===t._status){var e=t._result;e=e(),t._status=0,t._result=e,e.then((function(e){0===t._status&&(e=e.default,t._status=1,t._result=e)}),(function(e){0===t._status&&(t._status=2,t._result=e)}))}if(1===t._status)return t._result;throw t._result}var A={current:null};function N(){var t=A.current;if(null===t)throw Error(p(321));return t}var x={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};e.Children={map:k,forEach:function(t,e,n){k(t,(function(){e.apply(this,arguments)}),n)},count:function(t){var e=0;return k(t,(function(){e++})),e},toArray:function(t){return k(t,(function(t){return t}))||[]},only:function(t){if(!S(t))throw Error(p(143));return t}},e.Component=g,e.PureComponent=m,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=x,e.cloneElement=function(t,e,n){if(null===t||void 0===t)throw Error(p(267,t));var o=r({},t.props),a=t.key,s=t.ref,u=t._owner;if(null!=e){if(void 0!==e.ref&&(s=e.ref,u=w.current),void 0!==e.key&&(a=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(l in e)_.call(e,l)&&!E.hasOwnProperty(l)&&(o[l]=void 0===e[l]&&void 0!==c?c[l]:e[l])}var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];o.children=c}return{$$typeof:i,type:t.type,key:a,ref:s,props:o,_owner:u}},e.createContext=function(t,e){return void 0===e&&(e=null),(t={$$typeof:s,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:t},t.Consumer=t},e.createElement=O,e.createFactory=function(t){var e=O.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:u,render:t}},e.isValidElement=S,e.lazy=function(t){return{$$typeof:l,_payload:{_status:-1,_result:t},_init:P}},e.memo=function(t,e){return{$$typeof:c,type:t,compare:void 0===e?null:e}},e.useCallback=function(t,e){return N().useCallback(t,e)},e.useContext=function(t,e){return N().useContext(t,e)},e.useDebugValue=function(){},e.useEffect=function(t,e){return N().useEffect(t,e)},e.useImperativeHandle=function(t,e,n){return N().useImperativeHandle(t,e,n)},e.useLayoutEffect=function(t,e){return N().useLayoutEffect(t,e)},e.useMemo=function(t,e){return N().useMemo(t,e)},e.useReducer=function(t,e,n){return N().useReducer(t,e,n)},e.useRef=function(t){return N().useRef(t)},e.useState=function(t){return N().useState(t)},e.version="17.0.1"},function(t,e,n){"use strict";var r=n(2),i=n(43),o=n(69);function a(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,u={};function c(t,e){l(t,e),l(t+"Capture",e)}function l(t,e){for(u[t]=e,t=0;t<e.length;t++)s.add(e[t])}var f=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,d={},v={};function g(t,e,n,r,i,o,a){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){y[t]=new g(t,0,!1,t,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];y[e]=new g(e,1,!1,t[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){y[t]=new g(t,2,!1,t.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){y[t]=new g(t,2,!1,t,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(t){y[t]=new g(t,3,!1,t.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(t){y[t]=new g(t,3,!0,t,null,!1,!1)})),["capture","download"].forEach((function(t){y[t]=new g(t,4,!1,t,null,!1,!1)})),["cols","rows","size","span"].forEach((function(t){y[t]=new g(t,6,!1,t,null,!1,!1)})),["rowSpan","start"].forEach((function(t){y[t]=new g(t,5,!1,t.toLowerCase(),null,!1,!1)}));var m=/[\-:]([a-z])/g;function b(t){return t[1].toUpperCase()}function w(t,e,n,r){var i=y.hasOwnProperty(e)?y[e]:null;(null!==i?0===i.type:!r&&(2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])))||(function(t,e,n,r){if(null===e||"undefined"===typeof e||function(t,e,n,r){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,n,i,r)&&(n=null),r||null===i?function(t){return!!p.call(v,t)||!p.call(d,t)&&(h.test(t)?v[t]=!0:(d[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(t){var e=t.replace(m,b);y[e]=new g(e,1,!1,t,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(m,b);y[e]=new g(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(m,b);y[e]=new g(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(t){y[t]=new g(t,1,!1,t.toLowerCase(),null,!1,!1)})),y.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(t){y[t]=new g(t,1,!1,t.toLowerCase(),null,!0,!0)}));var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,O=60106,S=60107,T=60108,I=60114,C=60109,k=60110,P=60112,A=60113,N=60120,x=60115,j=60116,R=60121,D=60128,L=60129,M=60130,F=60131;if("function"===typeof Symbol&&Symbol.for){var U=Symbol.for;E=U("react.element"),O=U("react.portal"),S=U("react.fragment"),T=U("react.strict_mode"),I=U("react.profiler"),C=U("react.provider"),k=U("react.context"),P=U("react.forward_ref"),A=U("react.suspense"),N=U("react.suspense_list"),x=U("react.memo"),j=U("react.lazy"),R=U("react.block"),U("react.scope"),D=U("react.opaque.id"),L=U("react.debug_trace_mode"),M=U("react.offscreen"),F=U("react.legacy_hidden")}var V,q="function"===typeof Symbol&&Symbol.iterator;function B(t){return null===t||"object"!==typeof t?null:"function"===typeof(t=q&&t[q]||t["@@iterator"])?t:null}function H(t){if(void 0===V)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);V=e&&e[1]||""}return"\n"+V+t}var z=!1;function K(t,e){if(!t||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var i=u.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{z=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?H(t):""}function W(t){switch(t.tag){case 5:return H(t.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return t=K(t.type,!1);case 11:return t=K(t.type.render,!1);case 22:return t=K(t.type._render,!1);case 1:return t=K(t.type,!0);default:return""}}function G(t){if(null==t)return null;if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t;switch(t){case S:return"Fragment";case O:return"Portal";case I:return"Profiler";case T:return"StrictMode";case A:return"Suspense";case N:return"SuspenseList"}if("object"===typeof t)switch(t.$$typeof){case k:return(t.displayName||"Context")+".Consumer";case C:return(t._context.displayName||"Context")+".Provider";case P:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case x:return G(t.type);case R:return G(t._render);case j:e=t._payload,t=t._init;
vendor: 5,895 bytes, line 2
2try{return G(t(e))}catch(n){}}return null}function Q(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function $(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function Y(t){t._valueTracker||(t._valueTracker=function(t){var e=$(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function J(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=$(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function X(t){if("undefined"===typeof(t=t||("undefined"!==typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function Z(t,e){var n=e.checked;return i({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function tt(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=Q(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function et(t,e){null!=(e=e.checked)&&w(t,"checked",e,!1)}function nt(t,e){et(t,e);var n=Q(e.value),r=e.type;if(null!=n)"number"===r?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===r||"reset"===r)return void t.removeAttribute("value");e.hasOwnProperty("value")?it(t,e.type,n):e.hasOwnProperty("defaultValue")&&it(t,e.type,Q(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function rt(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!("submit"!==r&&"reset"!==r||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function it(t,e,n){"number"===e&&X(t.ownerDocument)===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}function ot(t,e){return t=i({children:void 0},e),(e=function(t){var e="";return r.Children.forEach(t,(function(t){null!=t&&(e+=t)})),e}(e.children))&&(t.children=e),t}function at(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Q(n),e=null,i=0;i<t.length;i++){if(t[i].value===n)return t[i].selected=!0,void(r&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function st(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(a(91));return i({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function ut(t,e){var n=e.value;if(null==n){if(n=e.children,e=e.defaultValue,null!=n){if(null!=e)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}e=n}null==e&&(e=""),n=e}t._wrapperState={initialValue:Q(n)}}function ct(t,e){var n=Q(e.value),r=Q(e.defaultValue);null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&t.defaultValue!==n&&(t.defaultValue=n)),null!=r&&(t.defaultValue=""+r)}function lt(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}var ft="http://www.w3.org/1999/xhtml",ht="http://www.w3.org/2000/svg";function pt(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function dt(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?pt(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var vt,gt,yt=(gt=function(t,e){if(t.namespaceURI!==ht||"innerHTML"in t)t.innerHTML=e;else{for((vt=vt||document.createElement("div")).innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=vt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction((function(){return gt(t,e)}))}:gt);function mt(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}var bt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},wt=["Webkit","ms","Moz","O"];function _t(t,e,n){return null==e||"boolean"===typeof e||""===e?"":n||"number"!==typeof e||0===e||bt.hasOwnProperty(t)&&bt[t]?(""+e).trim():e+"px"}function Et(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=_t(n,e[n],r);"float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}Object.keys(bt).forEach((function(t){wt.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),bt[e]=bt[t]}))}
vendor: 4,785 bytes, line 2
2));var Ot=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function St(t,e){if(e){if(Ot[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(a(137,t));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(a(60));if("object"!==typeof e.dangerouslySetInnerHTML||!("__html"in e.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=e.style&&"object"!==typeof e.style)throw Error(a(62))}}function Tt(t,e){if(-1===t.indexOf("-"))return"string"===typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function It(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}var Ct=null,kt=null,Pt=null;function At(t){if(t=ti(t)){if("function"!==typeof Ct)throw Error(a(280));var e=t.stateNode;e&&(e=ni(e),Ct(t.stateNode,t.type,e))}}function Nt(t){kt?Pt?Pt.push(t):Pt=[t]:kt=t}function xt(){if(kt){var t=kt,e=Pt;if(Pt=kt=null,At(t),e)for(t=0;t<e.length;t++)At(e[t])}}function jt(t,e){return t(e)}function Rt(t,e,n,r,i){return t(e,n,r,i)}function Dt(){}var Lt=jt,Mt=!1,Ft=!1;function Ut(){null===kt&&null===Pt||(Dt(),xt())}function Vt(t,e){var n=t.stateNode;if(null===n)return null;var r=ni(n);if(null===r)return null;n=r[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!r;break t;default:t=!1}if(t)return null;if(n&&"function"!==typeof n)throw Error(a(231,e,typeof n));return n}var qt=!1;if(f)try{var Bt={};Object.defineProperty(Bt,"passive",{get:function(){qt=!0}}),window.addEventListener("test",Bt,Bt),window.removeEventListener("test",Bt,Bt)}catch(gt){qt=!1}function Ht(t,e,n,r,i,o,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(l){this.onError(l)}}var zt=!1,Kt=null,Wt=!1,Gt=null,Qt={onError:function(t){zt=!0,Kt=t}};function $t(t,e,n,r,i,o,a,s,u){zt=!1,Kt=null,Ht.apply(Qt,arguments)}function Yt(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!==(1026&(e=t).flags)&&(n=e.return),t=e.return}while(t)}return 3===e.tag?n:null}function Jt(t){if(13===t.tag){var e=t.memoizedState;if(null===e&&(null!==(t=t.alternate)&&(e=t.memoizedState)),null!==e)return e.dehydrated}return null}function Xt(t){if(Yt(t)!==t)throw Error(a(188))}function Zt(t){if(!(t=function(t){var e=t.alternate;if(!e){if(null===(e=Yt(t)))throw Error(a(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Xt(i),t;if(o===r)return Xt(i),e;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s){for(u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?t:e}(t)))return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function te(t,e){for(var n=t.alternate;null!==e;){if(e===t||e===n)return!0;e=e.return}return!1}var ee,ne,re,ie,oe=!1,ae=[],se=null,ue=null,ce=null,le=new Map,fe=new Map,he=[],pe="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function de(t,e,n,r,i){return{blockedOn:t,domEventName:e,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function ve(t,e){switch(t){case"focusin":case"focusout":se=null;break;case"dragenter":case"dragleave":ue=null;break;case"mouseover":case"mouseout":ce=null;break;case"pointerover":case"pointerout":le.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":fe.delete(e.pointerId)}}function ge(t,e,n,r,i,o){return null===t||t.nativeEvent!==o?(t=de(e,n,r,i,o),null!==e&&(null!==(e=ti(e))&&ne(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,null!==i&&-1===e.indexOf(i)&&e.push(i),t)}function ye(t){var e=Zr(t.target);if(null!==e){var n=Yt(e);
vendor: 8,994 bytes, line 2
2if(null!==n)if(13===(e=n.tag)){if(null!==(e=Jt(n)))return t.blockedOn=e,void ie(t.lanePriority,(function(){o.unstable_runWithPriority(t.priority,(function(){re(n)}))}))}else if(3===e&&n.stateNode.hydrate)return void(t.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}t.blockedOn=null}function me(t){if(null!==t.blockedOn)return!1;for(var e=t.targetContainers;0<e.length;){var n=Ze(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(null!==n)return null!==(e=ti(n))&&ne(e),t.blockedOn=n,!1;e.shift()}return!0}function be(t,e,n){me(t)&&n.delete(e)}function we(){for(oe=!1;0<ae.length;){var t=ae[0];if(null!==t.blockedOn){null!==(t=ti(t.blockedOn))&&ee(t);break}for(var e=t.targetContainers;0<e.length;){var n=Ze(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(null!==n){t.blockedOn=n;break}e.shift()}null===t.blockedOn&&ae.shift()}null!==se&&me(se)&&(se=null),null!==ue&&me(ue)&&(ue=null),null!==ce&&me(ce)&&(ce=null),le.forEach(be),fe.forEach(be)}function _e(t,e){t.blockedOn===e&&(t.blockedOn=null,oe||(oe=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,we)))}function Ee(t){function e(e){return _e(e,t)}if(0<ae.length){_e(ae[0],t);for(var n=1;n<ae.length;n++){var r=ae[n];r.blockedOn===t&&(r.blockedOn=null)}}for(null!==se&&_e(se,t),null!==ue&&_e(ue,t),null!==ce&&_e(ce,t),le.forEach(e),fe.forEach(e),n=0;n<he.length;n++)(r=he[n]).blockedOn===t&&(r.blockedOn=null);for(;0<he.length&&null===(n=he[0]).blockedOn;)ye(n),null===n.blockedOn&&he.shift()}function Oe(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Se={animationend:Oe("Animation","AnimationEnd"),animationiteration:Oe("Animation","AnimationIteration"),animationstart:Oe("Animation","AnimationStart"),transitionend:Oe("Transition","TransitionEnd")},Te={},Ie={};function Ce(t){if(Te[t])return Te[t];if(!Se[t])return t;var e,n=Se[t];for(e in n)if(n.hasOwnProperty(e)&&e in Ie)return Te[t]=n[e];return t}f&&(Ie=document.createElement("div").style,"AnimationEvent"in window||(delete Se.animationend.animation,delete Se.animationiteration.animation,delete Se.animationstart.animation),"TransitionEvent"in window||delete Se.transitionend.transition);var ke=Ce("animationend"),Pe=Ce("animationiteration"),Ae=Ce("animationstart"),Ne=Ce("transitionend"),xe=new Map,je=new Map,Re=["abort","abort",ke,"animationEnd",Pe,"animationIteration",Ae,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ne,"transitionEnd","waiting","waiting"];function De(t,e){for(var n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),je.set(r,e),xe.set(r,i),c(i,[r])}}(0,o.unstable_now)();var Le=8;function Me(t){if(0!==(1&t))return Le=15,1;if(0!==(2&t))return Le=14,2;if(0!==(4&t))return Le=13,4;var e=24&t;return 0!==e?(Le=12,e):0!==(32&t)?(Le=11,32):0!==(e=192&t)?(Le=10,e):0!==(256&t)?(Le=9,256):0!==(e=3584&t)?(Le=8,e):0!==(4096&t)?(Le=7,4096):0!==(e=4186112&t)?(Le=6,e):0!==(e=62914560&t)?(Le=5,e):67108864&t?(Le=4,67108864):0!==(134217728&t)?(Le=3,134217728):0!==(e=805306368&t)?(Le=2,e):0!==(1073741824&t)?(Le=1,1073741824):(Le=8,t)}function Fe(t,e){var n=t.pendingLanes;if(0===n)return Le=0;var r=0,i=0,o=t.expiredLanes,a=t.suspendedLanes,s=t.pingedLanes;if(0!==o)r=o,i=Le=15;else if(0!==(o=134217727&n)){var u=o&~a;0!==u?(r=Me(u),i=Le):0!==(s&=o)&&(r=Me(s),i=Le)}else 0!==(o=n&~a)?(r=Me(o),i=Le):0!==s&&(r=Me(s),i=Le);if(0===r)return 0;if(r=n&((0>(r=31-ze(r))?0:1<<r)<<1)-1,0!==e&&e!==r&&0===(e&a)){if(Me(e),i<=Le)return e;Le=i}if(0!==(e=t.entangledLanes))for(t=t.entanglements,e&=r;0<e;)i=1<<(n=31-ze(e)),r|=t[n],e&=~i;return r}function Ue(t){return 0!==(t=-1073741825&t.pendingLanes)?t:1073741824&t?1073741824:0}function Ve(t,e){switch(t){case 15:return 1;case 14:return 2;case 12:return 0===(t=qe(24&~e))?Ve(10,e):t;case 10:return 0===(t=qe(192&~e))?Ve(8,e):t;case 8:return 0===(t=qe(3584&~e))&&(0===(t=qe(4186112&~e))&&(t=512)),t;case 2:return 0===(e=qe(805306368&~e))&&(e=268435456),e}throw Error(a(358,t))}function qe(t){return t&-t}function Be(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function He(t,e,n){t.pendingLanes|=e;var r=e-1;t.suspendedLanes&=r,t.pingedLanes&=r,(t=t.eventTimes)[e=31-ze(e)]=n}var ze=Math.clz32?Math.clz32:function(t){return 0===t?32:31-(Ke(t)/We|0)|0},Ke=Math.log,We=Math.LN2;var Ge=o.unstable_UserBlockingPriority,Qe=o.unstable_runWithPriority,$e=!0;function Ye(t,e,n,r){Mt||Dt();var i=Xe,o=Mt;Mt=!0;try{Rt(i,t,e,n,r)}finally{(Mt=o)||Ut()}}function Je(t,e,n,r){Qe(Ge,Xe.bind(null,t,e,n,r))}function Xe(t,e,n,r){var i;if($e)if((i=0===(4&e))&&0<ae.length&&-1<pe.indexOf(t))t=de(null,t,e,n,r),ae.push(t);else{var o=Ze(t,e,n,r);if(null===o)i&&ve(t,r);else{if(i){if(-1<pe.indexOf(t))return t=de(o,t,e,n,r),void ae.push(t);if(function(t,e,n,r,i){switch(e){case"focusin":return se=ge(se,t,e,n,r,i),!0;case"dragenter":return ue=ge(ue,t,e,n,r,i),!0;case"mouseover":return ce=ge(ce,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return le.set(o,ge(le.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,fe.set(o,ge(fe.get(o)||null,t,e,n,r,i)),!0}return!1}(o,t,e,n,r))return;ve(t,r)}xr(t,e,r,null,n)}}}function Ze(t,e,n,r){var i=It(r);if(null!==(i=Zr(i))){var o=Yt(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=Jt(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return xr(t,e,r,i,n),null}var tn=null,en=null,nn=null;function rn(){if(nn)return nn;var t,e,n=en,r=n.length,i="value"in tn?tn.value:tn.textContent,o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===i[o-e];e++);return nn=i.slice(t,1<e?1-e:void 0)}function on(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}function an(){return!0}function sn(){return!1}function un(t){function e(e,n,r,i,o){for(var a in this._reactName=e,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,t)t.hasOwnProperty(a)&&(e=t[a],this[a]=e?e(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?an:sn,this.isPropagationStopped=sn,this}return i(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!==typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!==typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),e}var cn,ln,fn,hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=un(hn),dn=i({},hn,{view:0,detail:0}),vn=un(dn),gn=i({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(t){return void 0===t.relatedTarget?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==fn&&(fn&&"mousemove"===t.type?(cn=t.screenX-fn.screenX,ln=t.screenY-fn.screenY):ln=cn=0,fn=t),cn)},movementY:function(t){return"movementY"in t?t.movementY:ln}}),yn=un(gn),mn=un(i({},gn,{dataTransfer:0})),bn=un(i({},dn,{relatedTarget:0})),wn=un(i({},hn,{animationName:0,elapsedTime:0,pseudoElement:0})),_n=un(i({},hn,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}})),En=un(i({},hn,{data:0})),On={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Tn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function In(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=Tn[t])&&!!e[t]}function Cn(){return In}var kn=un(i({},dn,{key:function(t){if(t.key){var e=On[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=on(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"ke
2yup"===t.type?Sn[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(t){return"keypress"===t.type?on(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?on(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}})),Pn=un(i({},gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),An=un(i({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),Nn=un(i({},hn,{propertyName:0,elapsedTime:0,pseudoElement:0})),xn=un(i({},gn,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0})),jn=[9,13,27,32],Rn=f&&"CompositionEvent"in window,Dn=null;f&&"documentMode"in document&&(Dn=document.documentMode);var Ln=f&&"TextEvent"in window&&!Dn,Mn=f&&(!Rn||Dn&&8<Dn&&11>=Dn),Fn=String.fromCharCode(32),Un=!1;function Vn(t,e){switch(t){case"keyup":return-1!==jn.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qn(t){return"object"===typeof(t=t.detail)&&"data"in t?t.data:null}var Bn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function zn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!Hn[t.type]:"textarea"===e}function Kn(t,e,n,r){Nt(r),0<(e=Rr(e,"onChange")).length&&(n=new pn("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Wn=null,Gn=null;function Qn(t){Ir(t,0)}function $n(t){if(J(ei(t)))return t}function Yn(t,e){if("change"===t)return e}var Jn=!1;if(f){var Xn;if(f){var Zn="oninput"in document;if(!Zn){var tr=document.createElement("div");tr.setAttribute("oninput","return;"),Zn="function"===typeof tr.oninput}Xn=Zn}else Xn=!1;Jn=Xn&&(!document.documentMode||9<document.documentMode)}function er(){Wn&&(Wn.detachEvent("onpropertychange",nr),Gn=Wn=null)}function nr(t){if("value"===t.propertyName&&$n(Gn)){var e=[];if(Kn(e,Gn,t,It(t)),t=Qn,Mt)t(e);else{Mt=!0;try{jt(t,e)}finally{Mt=!1,Ut()}}}}function rr(t,e,n){"focusin"===t?(er(),Gn=n,(Wn=e).attachEvent("onpropertychange",nr)):"focusout"===t&&er()}function ir(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return $n(Gn)}function or(t,e){if("click"===t)return $n(e)}function ar(t,e){if("input"===t||"change"===t)return $n(e)}var sr="function"===typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t===1/e)||t!==t&&e!==e},ur=Object.prototype.hasOwnProperty;function cr(t,e){if(sr(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!ur.call(e,n[r])||!sr(t[n[r]],e[n[r]]))return!1;return!0}function lr(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function fr(t,e){var n,r=lr(t);for(t=0;r;){if(3===r.nodeType){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=lr(r)}}function hr(t,e){return!(!t||!e)&&(t===e||(!t||3!==t.nodeType)&&(e&&3===e.nodeType?hr(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}function pr(){for(var t=window,e=X();e instanceof t.HTMLIFrameElement;){try{var n="string"===typeof e.contentWindow.location.href}catch(r){n=!1}if(!n)break;e=X((t=e.contentWindow).document)}return e}function dr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}var vr=f&&"documentMode"in document&&11>=document.documentMode,gr=null,yr=null,mr=null,br=!1;function wr(t,e,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==gr||gr!==X(r)||("selectionStart"in(r=gr)&&dr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 13,313 bytes, line 2
2sNode:r.focusNode,focusOffset:r.focusOffset},mr&&cr(mr,r)||(mr=r,0<(r=Rr(yr,"onSelect")).length&&(e=new pn("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=gr)))}De("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),De("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),De(Re,2);for(var _r="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Er=0;Er<_r.length;Er++)je.set(_r[Er],0);l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Or="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Sr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Or));function Tr(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,function(t,e,n,r,i,o,s,u,c){if($t.apply(this,arguments),zt){if(!zt)throw Error(a(198));var l=Kt;zt=!1,Kt=null,Wt||(Wt=!0,Gt=l)}}(r,e,void 0,t),t.currentTarget=null}function Ir(t,e){e=0!==(4&e);for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;t:{var o=void 0;if(e)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,c=s.currentTarget;if(s=s.listener,u!==o&&i.isPropagationStopped())break t;Tr(i,s,c),o=u}else for(a=0;a<r.length;a++){if(u=(s=r[a]).instance,c=s.currentTarget,s=s.listener,u!==o&&i.isPropagationStopped())break t;Tr(i,s,c),o=u}}}if(Wt)throw t=Gt,Wt=!1,Gt=null,t}function Cr(t,e){var n=ri(e),r=t+"__bubble";n.has(r)||(Nr(e,t,2,!1),n.add(r))}var kr="_reactListening"+Math.random().toString(36).slice(2);function Pr(t){t[kr]||(t[kr]=!0,s.forEach((function(e){Sr.has(e)||Ar(e,!1,t,null),Ar(e,!0,t,null)})))}function Ar(t,e,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===t&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!e&&Sr.has(t)){if("scroll"!==t)return;i|=2,o=r}var a=ri(o),s=t+"__"+(e?"capture":"bubble");a.has(s)||(e&&(i|=4),Nr(o,t,i,e),a.add(s))}function Nr(t,e,n,r){var i=je.get(e);switch(void 0===i?2:i){case 0:i=Ye;break;case 1:i=Je;break;default:i=Xe}n=i.bind(null,e,n,t),i=void 0,!qt||"touchstart"!==e&&"touchmove"!==e&&"wheel"!==e||(i=!0),r?void 0!==i?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):void 0!==i?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function xr(t,e,n,r,i){var o=r;if(0===(1&e)&&0===(2&e)&&null!==r)t:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===i||8===u.nodeType&&u.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=Zr(s)))return;if(5===(u=a.tag)||6===u){r=o=a;continue t}s=s.parentNode}}r=r.return}!function(t,e,n){if(Ft)return t(e,n);Ft=!0;try{Lt(t,e,n)}finally{Ft=!1,Ut()}}((function(){var r=o,i=It(n),a=[];t:{var s=xe.get(t);if(void 0!==s){var u=pn,c=t;switch(t){case"keypress":if(0===on(n))break t;case"keydown":case"keyup":u=kn;break;case"focusin":c="focus",u=bn;break;case"focusout":c="blur",u=bn;break;case"beforeblur":case"afterblur":u=bn;break;case"click":if(2===n.button)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=yn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=An;break;case ke:case Pe:case Ae:u=wn;break;case Ne:u=Nn;break;case"scroll":u=vn;break;case"wheel":u=xn;break;case"copy":case"cut":case"paste":u=_n;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Pn}var l=0!==(4&e),f=!l&&"scroll"===t,h=l?null!==s?s+"Capture":null:s;l=[];for(var p,d=r;null!==d;){var v=(p=d).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==h&&(null!=(v=Vt(d,h))&&l.push(jr(d,v,p)))),f)break;d=d.return}0<l.length&&(s=new u(s,c,null,n,i),a.push({event:s,listeners:l}))}}if(0===(7&e)){if(u="mouseout"===t||"pointerout"===t,(!(s="mouseover"===t||"pointerover"===t)||0!==(16&e)||!(c=n.relatedTarget||n.fromElement)||!Zr(c)&&!c[Jr])&&(u||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(c=(c=n.relatedTarget||n.toElement)?Zr(c):null)&&(c!==(f=Yt(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(u=null,c=r),u!==c)){if(l=yn,v="onMouseLeave",h="onMouseEnter",d="mouse","pointerout"!==t&&"pointerover"!==t||(l=Pn,v="onPointerLeave",h="onPointerEnter",d="pointer"),f=null==u?s:ei(u),p=null==c?s:ei(c),(s=new l(v,d+"leave",u,n,i)).target=f,s.relatedTarget=p,v=null,Zr(i)===r&&((l=new l(h,d+"enter",c,n,i)).target=p,l.relatedTarget=f,v=l),f=v,u&&c)t:{for(h=c,d=0,p=l=u;p;p=Dr(p))d++;for(p=0,v=h;v;v=Dr(v))p++;for(;0<d-p;)l=Dr(l),d--;for(;0<p-d;)h=Dr(h),p--;for(;d--;){if(l===h||null!==h&&l===h.alternate)break t;l=Dr(l),h=Dr(h)}l=null}else l=null;null!==u&&Lr(a,s,u,l,!1),null!==c&&null!==f&&Lr(a,f,c,l,!0)}if("select"===(u=(s=r?ei(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var g=Yn;else if(zn(s))if(Jn)g=ar;else{g=ir;var y=rr}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=or);switch(g&&(g=g(t,r))?Kn(a,g,n,i):(y&&y(t,s,r),"focusout"===t&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&it(s,"number",s.value)),y=r?ei(r):window,t){case"focusin":(zn(y)||"true"===y.contentEditable)&&(gr=y,yr=r,mr=null);break;case"focusout":mr=yr=gr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,wr(a,n,i);break;case"selectionchange":if(vr)break;case"keydown":case"keyup":wr(a,n,i)}var m;if(Rn)t:{switch(t){case"compositionstart":var b="onCompositionStart";break t;case"compositionend":b="onCompositionEnd";break t;case"compositionupdate":b="onCompositionUpdate";break t}b=void 0}else Bn?Vn(t,n)&&(b="onCompositionEnd"):"keydown"===t&&229===n.keyCode&&(b="onCompositionStart");b&&(Mn&&"ko"!==n.locale&&(Bn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Bn&&(m=rn()):(en="value"in(tn=i)?tn.value:tn.textContent,Bn=!0)),0<(y=Rr(r,b)).length&&(b=new En(b,t,null,n,i),a.push({event:b,listeners:y}),m?b.data=m:null!==(m=qn(n))&&(b.data=m))),(m=Ln?function(t,e){switch(t){case"compositionend":return qn(e);case"keypress":return 32!==e.which?null:(Un=!0,Fn);case"textInput":return(t=e.data)===Fn&&Un?null:t;default:return null}}(t,n):function(t,e){if(Bn)return"compositionend"===t||!Rn&&Vn(t,e)?(t=rn(),nn=en=tn=null,Bn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Mn&&"ko"!==e.locale?null:e.data;default:return null}}(t,n))&&(0<(r=Rr(r,"onBeforeInput")).length&&(i=new En("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=m))}Ir(a,e)}))}function jr(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Rr(t,e){for(var n=e+"Capture",r=[];null!==t;){var i=t,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Vt(t,n))&&r.unshift(jr(t,o,i)),null!=(o=Vt(t,e))&&r.push(jr(t,o,i))),t=t.return}return r}function Dr(t){if(null===t)return null;do{t=t.return}while(t&&5!==t.tag);return t||null}function Lr(t,e,n,r,i){for(var o=e._reactName,a=[];null!==n&&n!==r;){var s=n,u=s.alternate,c=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(u=Vt(n,o))&&a.unshift(jr(n,u,s)):i||null!=(u=Vt(n,o))&&a.push(jr(n,u,s))),n=n.return}0!==a.length&&t.push({event:e,listeners:a})}function Mr(){}var Fr=null,Ur=null;function Vr(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function qr(t,e){return"textarea"===t||"option"===t||"noscript"===t||"string"===typeof e.children||"number"===typeof e.children||"object"===typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var Br="function"===typeof setTimeout?setTimeout:void 0,Hr="function"===typeof clearTimeout?clearTimeout:void 0;function zr(t){1===t.nodeType?t.textContent="":9===t.nodeType&&(null!=(t=t.body)&&(t.textContent=""))}function Kr(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break}return t}function Wr(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var n=t.data;if("$"===n||"$!"===n||"$?"===n){if(0===e)return t;e--}else"/$"===n&&e++}t=t.previousSibling}return null}var Gr=0;var Qr=Math.random().toString(36).slice(2),$r="__reactFiber$"+Qr,Yr="__reactProps$"+Qr,Jr="__reactContainer$"+Qr,Xr="__reactEvents$"+Qr;function Zr(t){var e=t[$r];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Jr]||n[$r]){if(n=e.alternate,null!==e.child||null!==n&&null!==n.child)for(t=Wr(t);null!==t;){if(n=t[$r])return n;t=Wr(t)}return e}n=(t=n).parentNode}return null}function ti(t){return!(t=t[$r]||t[Jr])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function ei(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(a(33))}function ni(t){return t[Yr]||null}function ri(t){var e=t[Xr];return void 0===e&&(e=t[Xr]=new Set),e}var ii=[],oi=-1;function ai(t){return{current:t}}function si(t){0>oi||(t.current=ii[oi],ii[oi]=null,oi--)}function ui(t,e){oi++,ii[oi]=t.current,t.current=e}var ci={},li=ai(ci),fi=ai(!1),hi=ci;function pi(t,e){var n=t.type.contextTypes;if(!n)return ci;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function di(t){return null!==(t=t.childContextTypes)&&void 0!==t}function vi(){si(fi),si(li)}function gi(t,e,n){if(li.current!==ci)throw Error(a(168));ui(li,e),ui(fi,n)}function yi(t,e,n){var r=t.stateNode;if(t=e.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(a(108,G(e)||"Unknown",o));return i({},n,r)}function mi(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ci,hi=li.current,ui(li,t),ui(fi,fi.current),!0}function bi(t,e,n){var r=t.stateNode;if(!r)throw Error(a(169));n?(t=yi(t,e,hi),r.__reactInternalMemoizedMergedChildContext=t,si(fi),si(li),ui(li,t)):si(fi),ui(fi,n)}var wi=null,_i=null,Ei=o.unstable_runWithPriority,Oi=o.unstable_scheduleCallback,Si=o.unstable_cancelCallback,Ti=o.unstable_shouldYield,Ii=o.unstable_requestPaint,Ci=o.unstable_now,ki=o.unstable_getCurrentPriorityLevel,Pi=o.unstable_ImmediatePriority,Ai=o.unstable_UserBlockingPriority,Ni=o.unstable_NormalPriority,xi=o.unstable_LowPriority,ji=o.unstable_IdlePriority,Ri={},Di=void 0!==Ii?Ii:function(){},Li=null,Mi=null,Fi=!1,Ui=Ci(),Vi=1e4>Ui?Ci:function(){return Ci()-Ui};function qi(){switch(ki()){case Pi:return 99;case Ai:return 98;case Ni:return 97;case xi:return 96;case ji:return 95;default:throw Error(a(332))}}function Bi(t){switch(t){case 99:return Pi;case 98:return Ai;case 97:return Ni;case 96:return xi;case 95:return ji;default:throw Error(a(332))}}function Hi(t,e){return t=Bi(t),Ei(t,e)}function zi(t,e,n){return t=Bi(t),Oi(t,e,n)}function Ki(){if(null!==Mi){var t=Mi;Mi=null,Si(t)}Wi()}function Wi(){if(!Fi&&null!==Li){Fi=!0;var t=0;try{var e=Li;Hi(99,(function(){for(;t<e.length;t++){var n=e[t];do{n=n(!0)}while(null!==n)}})),Li=null}catch(n){throw null!==Li&&(Li=Li.slice(t+1)),Oi(Pi,Ki),n}finally{Fi=!1}}}var Gi=_.ReactCurrentBatchConfig;function Qi(t,e){if(t&&t.defaultProps){for(var n in e=i({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}return e}var $i=ai(null),Yi=null,Ji=null,Xi=null;function Zi(){Xi=Ji=Yi=null}function to(t){var e=$i.current;
2si($i),t.type._context._currentValue=e}function eo(t,e){for(;null!==t;){var n=t.alternate;if((t.childLanes&e)===e){if(null===n||(n.childLanes&e)===e)break;n.childLanes|=e}else t.childLanes|=e,null!==n&&(n.childLanes|=e);t=t.return}}function no(t,e){Yi=t,Xi=Ji=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!==(t.lanes&e)&&(Ra=!0),t.firstContext=null)}function ro(t,e){if(Xi!==t&&!1!==e&&0!==e)if("number"===typeof e&&1073741823!==e||(Xi=t,e=1073741823),e={context:t,observedBits:e,next:null},null===Ji){if(null===Yi)throw Error(a(308));Ji=e,Yi.dependencies={lanes:0,firstContext:e,responders:null}}else Ji=Ji.next=e;return t._currentValue}var io=!1;function oo(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function ao(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function so(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function uo(t,e){if(null!==(t=t.updateQueue)){var n=(t=t.shared).pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}}function co(t,e){var n=t.updateQueue,r=t.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=e:o=o.next=e}else i=o=e;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(t.updateQueue=n)}null===(t=n.lastBaseUpdate)?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function lo(t,e,n,r){var o=t.updateQueue;io=!1;var a=o.firstBaseUpdate,s=o.lastBaseUpdate,u=o.shared.pending;if(null!==u){o.shared.pending=null;var c=u,l=c.next;c.next=null,null===s?a=l:s.next=l,s=c;var f=t.alternate;if(null!==f){var h=(f=f.updateQueue).lastBaseUpdate;h!==s&&(null===h?f.firstBaseUpdate=l:h.next=l,f.lastBaseUpdate=c)}}if(null!==a){for(h=o.baseState,s=0,f=l=c=null;;){u=a.lane;var p=a.eventTime;if((r&u)===u){null!==f&&(f=f.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});t:{var d=t,v=a;switch(u=e,p=n,v.tag){case 1:if("function"===typeof(d=v.payload)){h=d.call(p,h,u);break t}h=d;break t;case 3:d.flags=-4097&d.flags|64;case 0:if(null===(u="function"===typeof(d=v.payload)?d.call(p,h,u):d)||void 0===u)break t;h=i({},h,u);break t;case 2:io=!0}}null!==a.callback&&(t.flags|=32,null===(u=o.effects)?o.effects=[a]:u.push(a))}else p={eventTime:p,lane:u,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===f?(l=f=p,c=h):f=f.next=p,s|=u;if(null===(a=a.next)){if(null===(u=o.shared.pending))break;a=u.next,u.next=null,o.lastBaseUpdate=u,o.shared.pending=null}}null===f&&(c=h),o.baseState=c,o.firstBaseUpdate=l,o.lastBaseUpdate=f,Fs|=s,t.lanes=s,t.memoizedState=h}}function fo(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(a(191,i));i.call(r)}}}var ho=(new r.Component).refs;function po(t,e,n,r){n=null===(n=n(r,e=t.memoizedState))||void 0===n?e:i({},e,n),t.memoizedState=n,0===t.lanes&&(t.updateQueue.baseState=n)}var vo={isMounted:function(t){return!!(t=t._reactInternals)&&Yt(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=cu(),i=lu(t),o=so(r,i);o.payload=e,void 0!==n&&null!==n&&(o.callback=n),uo(t,o),fu(t,i,r)},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=cu(),i=lu(t),o=so(r,i);o.tag=1,o.payload=e,void 0!==n&&null!==n&&(o.callback=n),uo(t,o),fu(t,i,r)},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=cu(),r=lu(t),i=so(n,r);i.tag=2,void 0!==e&&null!==e&&(i.callback=e),uo(t,i),fu(t,r,n)}};function go(t,e,n,r,i,o,a){return"function"===typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,o,a):!e.prototype||!e.prototype.isPureReactComponent||(!cr(n,r)||!cr(i,o))}function yo(t,e,n){var r=!1,i=ci,o=e.contextType;return"object"===typeof o&&null!==o?o=ro(o):(i=di(e)?hi:li.current,o=(r=null!==(r=e.contextTypes)&&void 0!==r)?pi(t,i):ci),e=new e(n,o),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=vo,t.stateNode=e,e._reactInternals=t,r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function mo(t,e,n,r){t=e.state,"function"===typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"===typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&vo.enqueueReplaceState(e,e.state,null)}function bo(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=ho,oo(t);var o=e.contextType;"object"===typeof o&&null!==o?i.context=ro(o):(o=di(e)?hi:li.current,i.context=pi(t,o)),lo(t,n,i,r),i.state=t.memoizedState,"function"===typeof(o=e.getDerivedStateFromProps)&&(po(t,e,o,n),i.state=t.memoizedState),"function"===typeof e.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(e=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),e!==i.state&&vo.enqueueReplaceState(i,i.state,null),lo(t,n,i,r),i.state=t.memoizedState),"function"===typeof i.componentDidMount&&(t.flags|=4)}var wo=Array.isArray;function _o(t,e,n){if(null!==(t=n.ref)&&"function"!==typeof t&&"object"!==typeof t){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,t));var i=""+t;return null!==e&&null!==e.ref&&"function"===typeof e.ref&&e.ref._stringRef===i?e.ref:((e=function(t){var e=r.refs;e===ho&&(e=r.refs={}),null===t?delete e[i]:e[i]=t})._stringRef=i,e)}if("string"!==typeof t)throw Error(a(284));if(!n._owner)throw Error(a(290,t))}return t}function Eo(t,e){if("textarea"!==t.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e))}function Oo(t){function e(e,n){if(t){var r=e.lastEffect;null!==r?(r.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function r(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(t,e){return(t=Hu(t,e)).index=0,t.sibling=null,t}function o(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index)<n?(e.flags=2,n):r:(e.flags=2,n):n}function s(e){return t&&null===e.alternate&&(e.flags=2),e}function u(t,e,n,r){return null===e||6!==e.tag?((e=Gu(n,t.mode,r)).return=t,e):((e=i(e,n)).return=t,e)}function c(t,e,n,r){return null!==e&&e.elementType===n.type?((r=i(e,n.props)).ref=_o(t,e,n),r.return=t,r):((r=zu(n.type,n.key,n.props,null,t.mode,r)).ref=_o(t,e,n),r.return=t,r)}function l(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=Qu(n,t.mode,r)).return=t,e):((e=i(e,n.children||[])).return=t,e)}function f(t,e,n,r,o){return null===e||7!==e.tag?((e=Ku(n,t.mode,r,o)).return=t,e):((e=i(e,n)).return=t,e)}function h(t,e,n){if("string"===typeof e||"number"===typeof e)return(e=Gu(""+e,t.mode,n)).return=t,e;if("object"===typeof e&&null!==e){switch(e.$$typeof){case E:return(n=zu(e.type,e.key,e.props,null,t.mode,n)).ref=_o(t,null,e),n.return=t,n;case O:return(e=Qu(e,t.mode,n)).return=t,e}if(wo(e)||B(e))return(e=Ku(e,t.mode,n,null)).return=t,e;Eo(t,e)}return null}function p(t,e,n,r){var i=null!==e?e.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:u(t,e,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===i?n.type===S?f(t,e,n.props.children,r,i):c(t,e,n,r):null;case O:return n.key===i?l(t,e,n,r):null}if(wo(n)||B(n))return null!==i?null:f(t,e,n,r,null);Eo(t,n)}return null}function d(t,e,n,r,i){if("string"===typeof r||"number"===typeof r)return u(e,t=t.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case E:return t=t.get(null===r.key?n:r.key)||null,r.type===S?f(e,t,r.props.children,i,r.key):c(e,t,r,i);case O:return l(e,t=t.get(null===r.key?n:r.key)||null,r,i)}if(wo(r)||B(r))return f(e,t=t.get(n)||null,r,i,null);Eo(e,r)}return null}function v(i,a,s,u){for(var c=null,l=null,f=a,v=a=0,g=null;null!==f&&v<s.length;v++){f.index>
vendor: 4,132 bytes, line 2
2v?(g=f,f=null):g=f.sibling;var y=p(i,f,s[v],u);if(null===y){null===f&&(f=g);break}t&&f&&null===y.alternate&&e(i,f),a=o(y,a,v),null===l?c=y:l.sibling=y,l=y,f=g}if(v===s.length)return n(i,f),c;if(null===f){for(;v<s.length;v++)null!==(f=h(i,s[v],u))&&(a=o(f,a,v),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(i,f);v<s.length;v++)null!==(g=d(f,i,v,s[v],u))&&(t&&null!==g.alternate&&f.delete(null===g.key?v:g.key),a=o(g,a,v),null===l?c=g:l.sibling=g,l=g);return t&&f.forEach((function(t){return e(i,t)})),c}function g(i,s,u,c){var l=B(u);if("function"!==typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,v=s,g=s=0,y=null,m=u.next();null!==v&&!m.done;g++,m=u.next()){v.index>g?(y=v,v=null):y=v.sibling;var b=p(i,v,m.value,c);if(null===b){null===v&&(v=y);break}t&&v&&null===b.alternate&&e(i,v),s=o(b,s,g),null===f?l=b:f.sibling=b,f=b,v=y}if(m.done)return n(i,v),l;if(null===v){for(;!m.done;g++,m=u.next())null!==(m=h(i,m.value,c))&&(s=o(m,s,g),null===f?l=m:f.sibling=m,f=m);return l}for(v=r(i,v);!m.done;g++,m=u.next())null!==(m=d(v,i,g,m.value,c))&&(t&&null!==m.alternate&&v.delete(null===m.key?g:m.key),s=o(m,s,g),null===f?l=m:f.sibling=m,f=m);return t&&v.forEach((function(t){return e(i,t)})),l}return function(t,r,o,u){var c="object"===typeof o&&null!==o&&o.type===S&&null===o.key;c&&(o=o.props.children);var l="object"===typeof o&&null!==o;if(l)switch(o.$$typeof){case E:t:{for(l=o.key,c=r;null!==c;){if(c.key===l){switch(c.tag){case 7:if(o.type===S){n(t,c.sibling),(r=i(c,o.props.children)).return=t,t=r;break t}break;default:if(c.elementType===o.type){n(t,c.sibling),(r=i(c,o.props)).ref=_o(t,c,o),r.return=t,t=r;break t}}n(t,c);break}e(t,c),c=c.sibling}o.type===S?((r=Ku(o.props.children,t.mode,u,o.key)).return=t,t=r):((u=zu(o.type,o.key,o.props,null,t.mode,u)).ref=_o(t,r,o),u.return=t,t=u)}return s(t);case O:t:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(t,r.sibling),(r=i(r,o.children||[])).return=t,t=r;break t}n(t,r);break}e(t,r),r=r.sibling}(r=Qu(o,t.mode,u)).return=t,t=r}return s(t)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(t,r.sibling),(r=i(r,o)).return=t,t=r):(n(t,r),(r=Gu(o,t.mode,u)).return=t,t=r),s(t);if(wo(o))return v(t,r,o,u);if(B(o))return g(t,r,o,u);if(l&&Eo(t,o),"undefined"===typeof o&&!c)switch(t.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,G(t.type)||"Component"))}return n(t,r)}}var So=Oo(!0),To=Oo(!1),Io={},Co=ai(Io),ko=ai(Io),Po=ai(Io);function Ao(t){if(t===Io)throw Error(a(174));return t}function No(t,e){switch(ui(Po,e),ui(ko,t),ui(Co,Io),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:dt(null,"");break;default:e=dt(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}si(Co),ui(Co,e)}function xo(){si(Co),si(ko),si(Po)}function jo(t){Ao(Po.current);var e=Ao(Co.current),n=dt(e,t.type);e!==n&&(ui(ko,t),ui(Co,n))}function Ro(t){ko.current===t&&(si(Co),si(ko))}var Do=ai(0);function Lo(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!==(64&e.flags))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Mo=null,Fo=null,Uo=!1;function Vo(t,e){var n=qu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=e,n.return=t,n.flags=8,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function qo(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,!0);case 13:default:return!1}}function Bo(t){if(Uo){var e=Fo;if(e){var n=e;if(!qo(t,e)){if(!(e=Kr(n.nextSibling))||!qo(t,e))return t.flags=-1025&t.flags|2,Uo=!1,void(Mo=t);Vo(Mo,n)}
vendor: 8,833 bytes, line 2
2Mo=t,Fo=Kr(e.firstChild)}else t.flags=-1025&t.flags|2,Uo=!1,Mo=t}}function Ho(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;Mo=t}function zo(t){if(t!==Mo)return!1;if(!Uo)return Ho(t),Uo=!0,!1;var e=t.type;if(5!==t.tag||"head"!==e&&"body"!==e&&!qr(e,t.memoizedProps))for(e=Fo;e;)Vo(t,e),e=Kr(e.nextSibling);if(Ho(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(a(317));t:{for(t=t.nextSibling,e=0;t;){if(8===t.nodeType){var n=t.data;if("/$"===n){if(0===e){Fo=Kr(t.nextSibling);break t}e--}else"$"!==n&&"$!"!==n&&"$?"!==n||e++}t=t.nextSibling}Fo=null}}else Fo=Mo?Kr(t.stateNode.nextSibling):null;return!0}function Ko(){Fo=Mo=null,Uo=!1}var Wo=[];function Go(){for(var t=0;t<Wo.length;t++)Wo[t]._workInProgressVersionPrimary=null;Wo.length=0}var Qo=_.ReactCurrentDispatcher,$o=_.ReactCurrentBatchConfig,Yo=0,Jo=null,Xo=null,Zo=null,ta=!1,ea=!1;function na(){throw Error(a(321))}function ra(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!sr(t[n],e[n]))return!1;return!0}function ia(t,e,n,r,i,o){if(Yo=o,Jo=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Qo.current=null===t||null===t.memoizedState?Aa:Na,t=n(r,i),ea){o=0;do{if(ea=!1,!(25>o))throw Error(a(301));o+=1,Zo=Xo=null,e.updateQueue=null,Qo.current=xa,t=n(r,i)}while(ea)}if(Qo.current=Pa,e=null!==Xo&&null!==Xo.next,Yo=0,Zo=Xo=Jo=null,ta=!1,e)throw Error(a(300));return t}function oa(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Zo?Jo.memoizedState=Zo=t:Zo=Zo.next=t,Zo}function aa(){if(null===Xo){var t=Jo.alternate;t=null!==t?t.memoizedState:null}else t=Xo.next;var e=null===Zo?Jo.memoizedState:Zo.next;if(null!==e)Zo=e,Xo=t;else{if(null===t)throw Error(a(310));t={memoizedState:(Xo=t).memoizedState,baseState:Xo.baseState,baseQueue:Xo.baseQueue,queue:Xo.queue,next:null},null===Zo?Jo.memoizedState=Zo=t:Zo=Zo.next=t}return Zo}function sa(t,e){return"function"===typeof e?e(t):e}function ua(t){var e=aa(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=Xo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var u=s=o=null,c=i;do{var l=c.lane;if((Yo&l)===l)null!==u&&(u=u.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===t?c.eagerState:t(r,c.action);else{var f={lane:l,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=f,o=r):u=u.next=f,Jo.lanes|=l,Fs|=l}c=c.next}while(null!==c&&c!==i);null===u?o=r:u.next=s,sr(r,e.memoizedState)||(Ra=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=u,n.lastRenderedState=r}return[e.memoizedState,n.dispatch]}function ca(t){var e=aa(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=t(o,s.action),s=s.next}while(s!==i);sr(o,e.memoizedState)||(Ra=!0),e.memoizedState=o,null===e.baseQueue&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function la(t,e,n){var r=e._getVersion;r=r(e._source);var i=e._workInProgressVersionPrimary;if(null!==i?t=i===r:(t=t.mutableReadLanes,(t=(Yo&t)===t)&&(e._workInProgressVersionPrimary=r,Wo.push(e))),t)return n(e._source);throw Wo.push(e),Error(a(350))}function fa(t,e,n,r){var i=As;if(null===i)throw Error(a(349));var o=e._getVersion,s=o(e._source),u=Qo.current,c=u.useState((function(){return la(i,e,n)})),l=c[1],f=c[0];c=Zo;var h=t.memoizedState,p=h.refs,d=p.getSnapshot,v=h.source;h=h.subscribe;var g=Jo;return t.memoizedState={refs:p,source:e,subscribe:r},u.useEffect((function(){p.getSnapshot=n,p.setSnapshot=l;var t=o(e._source);if(!sr(s,t)){t=n(e._source),sr(f,t)||(l(t),t=lu(g),i.mutableReadLanes|=t&i.pendingLanes),t=i.mutableReadLanes,i.entangledLanes|=t;for(var r=i.entanglements,a=t;0<a;){var u=31-ze(a),c=1<<u;r[u]|=t,a&=~c}}}),[n,e,r]),u.useEffect((function(){return r(e._source,(function(){var t=p.getSnapshot,n=p.setSnapshot;try{n(t(e._source));var r=lu(g);i.mutableReadLanes|=r&i.pendingLanes}catch(o){n((function(){throw o}))}}))}),[e,r]),sr(d,n)&&sr(v,e)&&sr(h,r)||((t={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:f}).dispatch=l=ka.bind(null,Jo,t),c.queue=t,c.baseQueue=null,f=la(i,e,n),c.memoizedState=c.baseState=f),f}function ha(t,e,n){return fa(aa(),t,e,n)}function pa(t){var e=oa();return"function"===typeof t&&(t=t()),e.memoizedState=e.baseState=t,t=(t=e.queue={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:t}).dispatch=ka.bind(null,Jo,t),[e.memoizedState,t]}function da(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=Jo.updateQueue)?(e={lastEffect:null},Jo.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t),t}function va(t){return t={current:t},oa().memoizedState=t}function ga(){return aa().memoizedState}function ya(t,e,n,r){var i=oa();Jo.flags|=t,i.memoizedState=da(1|e,n,void 0,void 0===r?null:r)}function ma(t,e,n,r){var i=aa();r=void 0===r?null:r;var o=void 0;if(null!==Xo){var a=Xo.memoizedState;if(o=a.destroy,null!==r&&ra(r,a.deps))return void da(e,n,o,r)}Jo.flags|=t,i.memoizedState=da(1|e,n,o,r)}function ba(t,e){return ya(516,4,t,e)}function wa(t,e){return ma(516,4,t,e)}function _a(t,e){return ma(4,2,t,e)}function Ea(t,e){return"function"===typeof e?(t=t(),e(t),function(){e(null)}):null!==e&&void 0!==e?(t=t(),e.current=t,function(){e.current=null}):void 0}function Oa(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,ma(4,2,Ea.bind(null,e,t),n)}function Sa(){}function Ta(t,e){var n=aa();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&ra(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function Ia(t,e){var n=aa();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&ra(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function Ca(t,e){var n=qi();Hi(98>n?98:n,(function(){t(!0)})),Hi(97<n?97:n,(function(){var n=$o.transition;$o.transition=1;try{t(!1),e()}finally{$o.transition=n}}))}function ka(t,e,n){var r=cu(),i=lu(t),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=e.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),e.pending=o,a=t.alternate,t===Jo||null!==a&&a===Jo)ea=ta=!0;else{if(0===t.lanes&&(null===a||0===a.lanes)&&null!==(a=e.lastRenderedReducer))try{var s=e.lastRenderedState,u=a(s,n);if(o.eagerReducer=a,o.eagerState=u,sr(u,s))return}catch(c){}fu(t,i,r)}}var Pa={readContext:ro,useCallback:na,useContext:na,useEffect:na,useImperativeHandle:na,useLayoutEffect:na,useMemo:na,useReducer:na,useRef:na,useState:na,useDebugValue:na,useDeferredValue:na,useTransition:na,useMutableSource:na,useOpaqueIdentifier:na,unstable_isNewReconciler:!1},Aa={readContext:ro,useCallback:function(t,e){return oa().memoizedState=[t,void 0===e?null:e],t},useContext:ro,useEffect:ba,useImperativeHandle:function(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,ya(4,2,Ea.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ya(4,2,t,e)},useMemo:function(t,e){var n=oa();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=oa();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t=(t=r.queue={pending:null,dispatch:null,lastRenderedReducer:t,lastRenderedState:e}).dispatch=ka.bind(null,Jo,t),[r.memoizedState,t]},useRef:va,useState:pa,useDebugValue:Sa,useDeferredValue:function(t){var e=pa(t),n=e[0],r=e[1];return ba((function(){var e=$o.transition;$o.transition=1;try{r(t)}finally{$o.transition=e}}),[t]),n},useTransition:function(){var t=pa(!1),e=t[0];return va(t=Ca.bind(null,t[1])),[t,e]},useMutableSource:function(t,e,n){var r=oa();return r.memoizedState={refs:{getSnapshot:e,setSnapshot:null},source:t,subscribe:n},fa(r,t,e,n)},useOpaqueIdentifier:function(){if(Uo){var t=!1,e=function(t){return{$$typeof:D,toString:t,valueOf:t}}((function(){throw t||(t=!0,n("r:"+(Gr++).toString(36))),Error(a(355))})),n=pa(e)[1];return 0===(2&Jo.mode)&&(Jo.flags|=516,da(5,(function(){n("r:"+(Gr++).toString(36))}),void 0,null)),e}return pa(e="r:"+(Gr++).toString(36)),e},unstable_isNewReconciler:!1},Na={readContext:ro,useCallback:Ta,useContext:ro,useEffect:wa,useImperativeHandle:Oa,useLayoutEffect:_a,useMemo:Ia,useReducer:ua,useRef:ga,useState:function(){return ua(sa)},useDebugValue:Sa,useDeferredValue:function(t){var e=ua(sa),n=e[0],r=e[1];return wa((function(){var e=$o.transition;$o.transition=1;try{r(t)}finally{$o.transition=e}}),[t]),n},useTransition:function(){var t=ua(sa)[0];return[ga().current,t]},useMutableSource:ha,useOpaqueIdentifier:function(){return ua(sa)[0]},unstable_isNewReconciler:!1},xa={readContext:ro,useCallback:Ta,useContext:ro,useEffect:wa,useImperativeHandle:Oa,useLayoutEffect:_a,useMemo:Ia,useReducer:ca,useRef
2:ga,useState:function(){return ca(sa)},useDebugValue:Sa,useDeferredValue:function(t){var e=ca(sa),n=e[0],r=e[1];return wa((function(){var e=$o.transition;$o.transition=1;try{r(t)}finally{$o.transition=e}}),[t]),n},useTransition:function(){var t=ca(sa)[0];return[ga().current,t]},useMutableSource:ha,useOpaqueIdentifier:function(){return ca(sa)[0]},unstable_isNewReconciler:!1},ja=_.ReactCurrentOwner,Ra=!1;function Da(t,e,n,r){e.child=null===t?To(e,null,n,r):So(e,t.child,n,r)}function La(t,e,n,r,i){n=n.render;var o=e.ref;return no(e,i),r=ia(t,e,n,r,o,i),null===t||Ra?(e.flags|=1,Da(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,ns(t,e,i))}function Ma(t,e,n,r,i,o){if(null===t){var a=n.type;return"function"!==typeof a||Bu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=zu(n.type,null,r,e,e.mode,o)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=a,Fa(t,e,a,r,i,o))}return a=t.child,0===(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:cr)(i,r)&&t.ref===e.ref)?ns(t,e,o):(e.flags|=1,(t=Hu(a,r)).ref=e.ref,t.return=e,e.child=t)}function Fa(t,e,n,r,i,o){if(null!==t&&cr(t.memoizedProps,r)&&t.ref===e.ref){if(Ra=!1,0===(o&i))return e.lanes=t.lanes,ns(t,e,o);0!==(16384&t.flags)&&(Ra=!0)}return qa(t,e,n,r,o)}function Ua(t,e,n){var r=e.pendingProps,i=r.children,o=null!==t?t.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&e.mode))e.memoizedState={baseLanes:0},bu(e,n);else{if(0===(1073741824&n))return t=null!==o?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t},bu(e,t),null;e.memoizedState={baseLanes:0},bu(e,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,e.memoizedState=null):r=n,bu(e,r);return Da(t,e,i,n),e.child}function Va(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.flags|=128)}function qa(t,e,n,r,i){var o=di(n)?hi:li.current;return o=pi(e,o),no(e,i),n=ia(t,e,n,r,o,i),null===t||Ra?(e.flags|=1,Da(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-517,t.lanes&=~i,ns(t,e,i))}function Ba(t,e,n,r,i){if(di(n)){var o=!0;mi(e)}else o=!1;if(no(e,i),null===e.stateNode)null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),yo(e,n,r),bo(e,n,r,i),r=!0;else if(null===t){var a=e.stateNode,s=e.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=ro(c):c=pi(e,c=di(n)?hi:li.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==c)&&mo(e,a,r,c),io=!1;var h=e.memoizedState;a.state=h,lo(e,r,a,i),u=e.memoizedState,s!==r||h!==u||fi.current||io?("function"===typeof l&&(po(e,n,l,r),u=e.memoizedState),(s=io||go(e,n,s,r,h,u,c))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(e.flags|=4)):("function"===typeof a.componentDidMount&&(e.flags|=4),e.memoizedProps=r,e.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"===typeof a.componentDidMount&&(e.flags|=4),r=!1)}else{a=e.stateNode,ao(t,e),s=e.memoizedProps,c=e.type===e.elementType?s:Qi(e.type,s),a.props=c,f=e.pendingProps,h=a.context,"object"===typeof(u=n.contextType)&&null!==u?u=ro(u):u=pi(e,u=di(n)?hi:li.current);var p=n.getDerivedStateFromProps;(l="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==f||h!==u)&&mo(e,a,r,u),io=!1,h=e.memoizedState,a.state=h,lo(e,r,a,i);var d=e.memoizedState;s!==f||h!==d||fi.current||io?("function"===typeof p&&(po(e,n,p,r),d=e.memoizedState),(c=io||go(e,n,c,r,h,d,u))?(l||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,d,u),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,d,u)),"function"===typeof a.componentDidUpdate&&(e.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(e.flags|=256)):("function"!==typeof a.componentDidUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=256),e.memoizedProps=r,e.memoizedState=d),a.props=r,a.state=d,a.context=u,r=c):("function"!==typeof a.componentDidUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=256),r=!1)}return Ha(t,e,n,r,o,i)}function Ha(t,e,n,r,i,o){Va(t,e);var a=0!==(64&e.flags);if(!r&&!a)return i&&bi(e,n,!1),ns(t,e,o);r=e.stateNode,ja.current=e;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return e.flags|=1,null!==t&&a?(e.child=So(e,t.child,null,o),e.child=So(e,null,s,o)):Da(t,e,s,o),e.memoizedState=r.state,i&&bi(e,n,!0),e.child}function za(t){var e=t.stateNode;e.pendingContext?gi(0,e.pendingContext,e.pendingContext!==e.context):e.context&&gi(0,e.context,!1),No(t,e.containerInfo)}var Ka,Wa,Ga,Qa={dehydrated:null,retryLane:0};function $a(t,e,n){var r,i=e.pendingProps,o=Do.current,a=!1;return(r=0!==(64&e.flags))||(r=(null===t||null!==t.memoizedState)&&0!==(2&o)),r?
vendor: 4,221 bytes, line 2
2(a=!0,e.flags&=-65):null!==t&&null===t.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),ui(Do,1&o),null===t?(void 0!==i.fallback&&Bo(e),t=i.children,o=i.fallback,a?(t=Ya(e,t,o,n),e.child.memoizedState={baseLanes:n},e.memoizedState=Qa,t):"number"===typeof i.unstable_expectedLoadTime?(t=Ya(e,t,o,n),e.child.memoizedState={baseLanes:n},e.memoizedState=Qa,e.lanes=33554432,t):((n=Wu({mode:"visible",children:t},e.mode,n,null)).return=e,e.child=n)):(t.memoizedState,a?(i=Xa(t,e,i.children,i.fallback,n),a=e.child,o=t.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=t.childLanes&~n,e.memoizedState=Qa,i):(n=Ja(t,e,i.children,n),e.memoizedState=null,n))}function Ya(t,e,n,r){var i=t.mode,o=t.child;return e={mode:"hidden",children:e},0===(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=e):o=Wu(e,i,0,null),n=Ku(n,i,r,null),o.return=t,n.return=t,o.sibling=n,t.child=o,n}function Ja(t,e,n,r){var i=t.child;return t=i.sibling,n=Hu(i,{mode:"visible",children:n}),0===(2&e.mode)&&(n.lanes=r),n.return=e,n.sibling=null,null!==t&&(t.nextEffect=null,t.flags=8,e.firstEffect=e.lastEffect=t),e.child=n}function Xa(t,e,n,r,i){var o=e.mode,a=t.child;t=a.sibling;var s={mode:"hidden",children:n};return 0===(2&o)&&e.child!==a?((n=e.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(e.firstEffect=n.firstEffect,e.lastEffect=a,a.nextEffect=null):e.firstEffect=e.lastEffect=null):n=Hu(a,s),null!==t?r=Hu(t,r):(r=Ku(r,o,i,null)).flags|=2,r.return=e,n.return=e,n.sibling=r,e.child=n,r}function Za(t,e){t.lanes|=e;var n=t.alternate;null!==n&&(n.lanes|=e),eo(t.return,e)}function ts(t,e,n,r,i,o){var a=t.memoizedState;null===a?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function es(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(Da(t,e,r.children,n),0!==(2&(r=Do.current)))r=1&r|2,e.flags|=64;else{if(null!==t&&0!==(64&t.flags))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&Za(t,n);else if(19===t.tag)Za(t,n);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(ui(Do,r),0===(2&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;null!==n;)null!==(t=n.alternate)&&null===Lo(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),ts(e,!1,i,n,o,e.lastEffect);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===Lo(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}ts(e,!0,n,null,o,e.lastEffect);break;case"together":ts(e,!1,null,null,void 0,e.lastEffect);break;default:e.memoizedState=null}return e.child}function ns(t,e,n){if(null!==t&&(e.dependencies=t.dependencies),Fs|=e.lanes,0!==(n&e.childLanes)){if(null!==t&&e.child!==t.child)throw Error(a(153));if(null!==e.child){for(n=Hu(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=Hu(t,t.pendingProps)).return=e;n.sibling=null}return e.child}return null}function rs(t,e){if(!Uo)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e||null===t.tail?t.tail=null:t.tail.sibling=null:r.sibling=null}}function is(t,e,n){var r=e.pendingProps;switch(e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return di(e.type)&&vi(),null;case 3:return xo(),si(fi),si(li),Go(),(r=e.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==t&&null!==t.child||(zo(e)?e.flags|=4:r.hydrate||(e.flags|=256)),null;case 5:Ro(e);var o=Ao(Po.current);if(n=e.type,null!==t&&null!=e.stateNode)Wa(t,e,n,r),t.ref!==e.ref&&(e.flags|=128);else{if(!r){if(null===e.stateNode)throw Error(a(166));return null}if(t=Ao(Co.current),zo(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;
2switch(r[$r]=e,r[Yr]=s,n){case"dialog":Cr("cancel",r),Cr("close",r);break;case"iframe":case"object":case"embed":Cr("load",r);break;case"video":case"audio":for(t=0;t<Or.length;t++)Cr(Or[t],r);break;case"source":Cr("error",r);break;case"img":case"image":case"link":Cr("error",r),Cr("load",r);break;case"details":Cr("toggle",r);break;case"input":tt(r,s),Cr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Cr("invalid",r);break;case"textarea":ut(r,s),Cr("invalid",r)}for(var c in St(n,s),t=null,s)s.hasOwnProperty(c)&&(o=s[c],"children"===c?"string"===typeof o?r.textContent!==o&&(t=["children",o]):"number"===typeof o&&r.textContent!==""+o&&(t=["children",""+o]):u.hasOwnProperty(c)&&null!=o&&"onScroll"===c&&Cr("scroll",r));switch(n){case"input":Y(r),rt(r,s,!0);break;case"textarea":Y(r),lt(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=Mr)}r=t,e.updateQueue=r,null!==r&&(e.flags|=4)}else{switch(c=9===o.nodeType?o:o.ownerDocument,t===ft&&(t=pt(n)),t===ft?"script"===n?((t=c.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):"string"===typeof r.is?t=c.createElement(n,{is:r.is}):(t=c.createElement(n),"select"===n&&(c=t,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):t=c.createElementNS(t,n),t[$r]=e,t[Yr]=r,Ka(t,e),e.stateNode=t,c=Tt(n,r),n){case"dialog":Cr
vendor: 7,676 bytes, line 2
2("cancel",t),Cr("close",t),o=r;break;case"iframe":case"object":case"embed":Cr("load",t),o=r;break;case"video":case"audio":for(o=0;o<Or.length;o++)Cr(Or[o],t);o=r;break;case"source":Cr("error",t),o=r;break;case"img":case"image":case"link":Cr("error",t),Cr("load",t),o=r;break;case"details":Cr("toggle",t),o=r;break;case"input":tt(t,r),o=Z(t,r),Cr("invalid",t);break;case"option":o=ot(t,r);break;case"select":t._wrapperState={wasMultiple:!!r.multiple},o=i({},r,{value:void 0}),Cr("invalid",t);break;case"textarea":ut(t,r),o=st(t,r),Cr("invalid",t);break;default:o=r}St(n,o);var l=o;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?Et(t,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&yt(t,f):"children"===s?"string"===typeof f?("textarea"!==n||""!==f)&&mt(t,f):"number"===typeof f&&mt(t,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(u.hasOwnProperty(s)?null!=f&&"onScroll"===s&&Cr("scroll",t):null!=f&&w(t,s,f,c))}switch(n){case"input":Y(t),rt(t,r,!1);break;case"textarea":Y(t),lt(t);break;case"option":null!=r.value&&t.setAttribute("value",""+Q(r.value));break;case"select":t.multiple=!!r.multiple,null!=(s=r.value)?at(t,!!r.multiple,s,!1):null!=r.defaultValue&&at(t,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(t.onclick=Mr)}Vr(n,r)&&(e.flags|=4)}null!==e.ref&&(e.flags|=128)}return null;case 6:if(t&&null!=e.stateNode)Ga(0,e,t.memoizedProps,r);else{if("string"!==typeof r&&null===e.stateNode)throw Error(a(166));n=Ao(Po.current),Ao(Co.current),zo(e)?(r=e.stateNode,n=e.memoizedProps,r[$r]=e,r.nodeValue!==n&&(e.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[$r]=e,e.stateNode=r)}return null;case 13:return si(Do),r=e.memoizedState,0!==(64&e.flags)?(e.lanes=n,e):(r=null!==r,n=!1,null===t?void 0!==e.memoizedProps.fallback&&zo(e):n=null!==t.memoizedState,r&&!n&&0!==(2&e.mode)&&(null===t&&!0!==e.memoizedProps.unstable_avoidThisFallback||0!==(1&Do.current)?0===Ds&&(Ds=3):(0!==Ds&&3!==Ds||(Ds=4),null===As||0===(134217727&Fs)&&0===(134217727&Us)||vu(As,xs))),(r||n)&&(e.flags|=4),null);case 4:return xo(),null===t&&Pr(e.stateNode.containerInfo),null;case 10:return to(e),null;case 17:return di(e.type)&&vi(),null;case 19:if(si(Do),null===(r=e.memoizedState))return null;if(s=0!==(64&e.flags),null===(c=r.rendering))if(s)rs(r,!1);else{if(0!==Ds||null!==t&&0!==(64&t.flags))for(t=e.child;null!==t;){if(null!==(c=Lo(t))){for(e.flags|=64,rs(r,!1),null!==(s=c.updateQueue)&&(e.updateQueue=s,e.flags|=4),null===r.lastEffect&&(e.firstEffect=null),e.lastEffect=r.lastEffect,r=n,n=e.child;null!==n;)t=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=t,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,t=c.dependencies,s.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return ui(Do,1&Do.current|2),e.child}t=t.sibling}null!==r.tail&&Vi()>Hs&&(e.flags|=64,s=!0,rs(r,!1),e.lanes=33554432)}else{if(!s)if(null!==(t=Lo(c))){if(e.flags|=64,s=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.flags|=4),rs(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Uo)return null!==(e=e.lastEffect=r.lastEffect)&&(e.nextEffect=null),null}else 2*Vi()-r.renderingStartTime>Hs&&1073741824!==n&&(e.flags|=64,s=!0,rs(r,!1),e.lanes=33554432);r.isBackwards?(c.sibling=e.child,e.child=c):(null!==(n=r.last)?n.sibling=c:e.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=e.lastEffect,r.renderingStartTime=Vi(),n.sibling=null,e=Do.current,ui(Do,s?1&e|2:1&e),n):null;case 23:case 24:return wu(),null!==t&&null!==t.memoizedState!==(null!==e.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(e.flags|=4),null}throw Error(a(156,e.tag))}function os(t){switch(t.tag){case 1:di(t.type)&&vi();var e=t.flags;return 4096&e?(t.flags=-4097&e|64,t):null;case 3:if(xo(),si(fi),si(li),Go(),0!==(64&(e=t.flags)))throw Error(a(285));return t.flags=-4097&e|64,t;case 5:return Ro(t),null;case 13:return si(Do),4096&(e=t.flags)?(t.flags=-4097&e|64,t):null;case 19:return si(Do),null;case 4:return xo(),null;case 10:return to(t),null;case 23:case 24:return wu(),null;default:return null}}function as(t,e){try{var n="",r=e;do{n+=W(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:t,source:e,stack:i}}function ss(t,e){try{console.error(e.value)}catch(n){setTimeout((function(){throw n}))}}Ka=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)t.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Wa=function(t,e,n,r){var o=t.memoizedProps;if(o!==r){t=e.stateNode,Ao(Co.current);var a,s=null;switch(n){case"input":o=Z(t,o),r=Z(t,r),s=[];break;case"option":o=ot(t,o),r=ot(t,r),s=[];break;case"select":o=i({},o,{value:void 0}),r=i({},r,{value:void 0}),s=[];break;case"textarea":o=st(t,o),r=st(t,r),s=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(t.onclick=Mr)}for(f in St(n,r),n=null,o)if(!r.hasOwnProperty(f)&&o.hasOwnProperty(f)&&null!=o[f])if("style"===f){var c=o[f];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(u.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in r){var l=r[f];if(c=null!=o?o[f]:void 0,r.hasOwnProperty(f)&&l!==c&&(null!=l||null!=c))if("style"===f)if(c){for(a in c)!c.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&c[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(f,n)),n=l;else"dangerouslySetInnerHTML"===f?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(s=s||[]).push(f,l)):"children"===f?"string"!==typeof l&&"number"!==typeof l||(s=s||[]).push(f,""+l):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(u.hasOwnProperty(f)?(null!=l&&"onScroll"===f&&Cr("scroll",t),s||c===l||(s=[])):"object"===typeof l&&null!==l&&l.$$typeof===D?l.toString():(s=s||[]).push(f,l))}n&&(s=s||[]).push("style",n);var f=s;(e.updateQueue=f)&&(e.flags|=4)}},Ga=function(t,e,n,r){n!==r&&(e.flags|=4)};var us="function"===typeof WeakMap?WeakMap:Map;function cs(t,e,n){(n=so(-1,n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Gs||(Gs=!0,Qs=r),ss(0,e)},n}function ls(t,e,n){(n=so(-1,n)).tag=3;var r=t.type.getDerivedStateFromError;if("function"===typeof r){var i=e.value;n.payload=function(){return ss(0,e),r(i)}}var o=t.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===$s?$s=new Set([this]):$s.add(this),ss(0,e));var t=e.stack;this.componentDidCatch(e.value,{componentStack:null!==t?t:""})}),n}var fs="function"===typeof WeakSet?WeakSet:Set;function hs(t){var e=t.ref;if(null!==e)if("function"===typeof e)try{e(null)}catch(n){Mu(t,n)}else e.current=null}function ps(t,e){switch(e.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&e.flags&&null!==t){var n=t.memoizedProps,r=t.memoizedState;e=(t=e.stateNode).getSnapshotBeforeUpdate(e.elementType===e.type?n:Qi(e.type,n),r),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:return void(256&e.flags&&zr(e.stateNode.containerInfo));
vendor: 4,942 bytes, line 2
2case 5:case 6:case 4:case 17:return}throw Error(a(163))}function ds(t,e,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(e=null!==(e=n.updateQueue)?e.lastEffect:null)){t=e=e.next;do{if(3===(3&t.tag)){var r=t.create;t.destroy=r()}t=t.next}while(t!==e)}if(null!==(e=null!==(e=n.updateQueue)?e.lastEffect:null)){t=e=e.next;do{var i=t;r=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(Ru(n,t),ju(n,t)),t=r}while(t!==e)}return;case 1:return t=n.stateNode,4&n.flags&&(null===e?t.componentDidMount():(r=n.elementType===n.type?e.memoizedProps:Qi(n.type,e.memoizedProps),t.componentDidUpdate(r,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate))),void(null!==(e=n.updateQueue)&&fo(n,e,t));case 3:if(null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}fo(n,e,t)}return;case 5:return t=n.stateNode,void(null===e&&4&n.flags&&Vr(n.type,n.memoizedProps)&&t.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Ee(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(a(163))}function vs(t,e){for(var n=t;;){if(5===n.tag){var r=n.stateNode;if(e)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=void 0!==i&&null!==i&&i.hasOwnProperty("display")?i.display:null,r.style.display=_t("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=e?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===t)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function gs(t,e){if(_i&&"function"===typeof _i.onCommitFiberUnmount)try{_i.onCommitFiberUnmount(wi,e)}catch(o){}switch(e.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(t=e.updateQueue)&&null!==(t=t.lastEffect)){var n=t=t.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!==(4&r))Ru(e,n);else{r=e;try{i()}catch(o){Mu(r,o)}}n=n.next}while(n!==t)}break;case 1:if(hs(e),"function"===typeof(t=e.stateNode).componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(o){Mu(e,o)}break;case 5:hs(e);break;case 4:Es(t,e)}}function ys(t){t.alternate=null,t.child=null,t.dependencies=null,t.firstEffect=null,t.lastEffect=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.return=null,t.updateQueue=null}function ms(t){return 5===t.tag||3===t.tag||4===t.tag}function bs(t){t:{for(var e=t.return;null!==e;){if(ms(e))break t;e=e.return}throw Error(a(160))}var n=e;switch(e=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:e=e.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(mt(e,""),n.flags&=-17);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||ms(n.return)){n=null;break t}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue e;if(null===n.child||4===n.tag)continue e;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break t}}r?ws(t,n,e):_s(t,n,e)}function ws(t,e,n){var r=t.tag,i=5===r||6===r;if(i)t=i?t.stateNode:t.stateNode.instance,e?8===n.nodeType?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(8===n.nodeType?(e=n.parentNode).insertBefore(t,n):(e=n).appendChild(t),null!==(n=n._reactRootContainer)&&void 0!==n||null!==e.onclick||(e.onclick=Mr));else if(4!==r&&null!==(t=t.child))for(ws(t,e,n),t=t.sibling;null!==t;)ws(t,e,n),t=t.sibling}function _s(t,e,n){var r=t.tag,i=5===r||6===r;if(i)t=i?t.stateNode:t.stateNode.instance,e?n.insertBefore(t,e):n.appendChild(t);else if(4!==r&&null!==(t=t.child))for(_s(t,e,n),t=t.sibling;null!==t;)_s(t,e,n),t=t.sibling}function Es(t,e){for(var n,r,i=e,o=!1;;){if(!o){o=i.return;t:for(;;){if(null===o)throw Error(a(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break t;case 3:case 4:n=n.containerInfo,r=!0;break t}o=o.return}o=!0}if(5===i.tag||6===i.tag){t:for(var s=t,u=i,c=u;;)if(gs(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===u)break t;for(;null===c.sibling;){if(null===c.return||c.return===u)break t;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(s=n,u=i.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(gs(t,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function Os(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:var n=e.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(t=r.destroy,r.destroy=void 0,void 0!==t&&t()),r=r.next}
vendor: 7,797 bytes, line 2
2while(r!==n)}return;case 1:return;case 5:if(null!=(n=e.stateNode)){r=e.memoizedProps;var i=null!==t?t.memoizedProps:r;t=e.type;var o=e.updateQueue;if(e.updateQueue=null,null!==o){for(n[Yr]=r,"input"===t&&"radio"===r.type&&null!=r.name&&et(n,r),Tt(t,i),e=Tt(t,r),i=0;i<o.length;i+=2){var s=o[i],u=o[i+1];"style"===s?Et(n,u):"dangerouslySetInnerHTML"===s?yt(n,u):"children"===s?mt(n,u):w(n,s,u,e)}switch(t){case"input":nt(n,r);break;case"textarea":ct(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?at(n,!!r.multiple,o,!1):t!==!!r.multiple&&(null!=r.defaultValue?at(n,!!r.multiple,r.defaultValue,!0):at(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===e.stateNode)throw Error(a(162));return void(e.stateNode.nodeValue=e.memoizedProps);case 3:return void((n=e.stateNode).hydrate&&(n.hydrate=!1,Ee(n.containerInfo)));case 12:return;case 13:return null!==e.memoizedState&&(Bs=Vi(),vs(e.child,!0)),void Ss(e);case 19:return void Ss(e);case 17:return;case 23:case 24:return void vs(e,null!==e.memoizedState)}throw Error(a(163))}function Ss(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new fs),e.forEach((function(e){var r=Uu.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))}))}}function Ts(t,e){return null!==t&&(null===(t=t.memoizedState)||null!==t.dehydrated)&&(null!==(e=e.memoizedState)&&null===e.dehydrated)}var Is=Math.ceil,Cs=_.ReactCurrentDispatcher,ks=_.ReactCurrentOwner,Ps=0,As=null,Ns=null,xs=0,js=0,Rs=ai(0),Ds=0,Ls=null,Ms=0,Fs=0,Us=0,Vs=0,qs=null,Bs=0,Hs=1/0;function zs(){Hs=Vi()+500}var Ks,Ws=null,Gs=!1,Qs=null,$s=null,Ys=!1,Js=null,Xs=90,Zs=[],tu=[],eu=null,nu=0,ru=null,iu=-1,ou=0,au=0,su=null,uu=!1;function cu(){return 0!==(48&Ps)?Vi():-1!==iu?iu:iu=Vi()}function lu(t){if(0===(2&(t=t.mode)))return 1;if(0===(4&t))return 99===qi()?1:2;if(0===ou&&(ou=Ms),0!==Gi.transition){0!==au&&(au=null!==qs?qs.pendingLanes:0),t=ou;var e=4186112&~au;return 0===(e&=-e)&&(0===(e=(t=4186112&~t)&-t)&&(e=8192)),e}return t=qi(),0!==(4&Ps)&&98===t?t=Ve(12,ou):t=Ve(t=function(t){switch(t){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(t),ou),t}function fu(t,e,n){if(50<nu)throw nu=0,ru=null,Error(a(185));if(null===(t=hu(t,e)))return null;He(t,e,n),t===As&&(Us|=e,4===Ds&&vu(t,xs));var r=qi();1===e?0!==(8&Ps)&&0===(48&Ps)?gu(t):(pu(t,n),0===Ps&&(zs(),Ki())):(0===(4&Ps)||98!==r&&99!==r||(null===eu?eu=new Set([t]):eu.add(t)),pu(t,n)),qs=t}function hu(t,e){t.lanes|=e;var n=t.alternate;for(null!==n&&(n.lanes|=e),n=t,t=t.return;null!==t;)t.childLanes|=e,null!==(n=t.alternate)&&(n.childLanes|=e),n=t,t=t.return;return 3===n.tag?n.stateNode:null}function pu(t,e){for(var n=t.callbackNode,r=t.suspendedLanes,i=t.pingedLanes,o=t.expirationTimes,s=t.pendingLanes;0<s;){var u=31-ze(s),c=1<<u,l=o[u];if(-1===l){if(0===(c&r)||0!==(c&i)){l=e,Me(c);var f=Le;o[u]=10<=f?l+250:6<=f?l+5e3:-1}}else l<=e&&(t.expiredLanes|=c);s&=~c}if(r=Fe(t,t===As?xs:0),e=Le,0===r)null!==n&&(n!==Ri&&Si(n),t.callbackNode=null,t.callbackPriority=0);else{if(null!==n){if(t.callbackPriority===e)return;n!==Ri&&Si(n)}15===e?(n=gu.bind(null,t),null===Li?(Li=[n],Mi=Oi(Pi,Wi)):Li.push(n),n=Ri):14===e?n=zi(99,gu.bind(null,t)):n=zi(n=function(t){switch(t){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,t))}}(e),du.bind(null,t)),t.callbackPriority=e,t.callbackNode=n}}function du(t){if(iu=-1,au=ou=0,0!==(48&Ps))throw Error(a(327));var e=t.callbackNode;if(xu()&&t.callbackNode!==e)return null;var n=Fe(t,t===As?xs:0);if(0===n)return null;var r=n,i=Ps;Ps|=16;var o=Ou();for(As===t&&xs===r||(zs(),_u(t,r));;)try{Iu();break}catch(u){Eu(t,u)}if(Zi(),Cs.current=o,Ps=i,null!==Ns?r=0:(As=null,xs=0,r=Ds),0!==(Ms&Us))_u(t,0);else if(0!==r){if(2===r&&(Ps|=64,t.hydrate&&(t.hydrate=!1,zr(t.containerInfo)),0!==(n=Ue(t))&&(r=Su(t,n))),1===r)throw e=Ls,_u(t,0),vu(t,n),pu(t,Vi()),e;switch(t.finishedWork=t.current.alternate,t.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:Pu(t);break;case 3:if(vu(t,n),(62914560&n)===n&&10<(r=Bs+500-Vi())){if(0!==Fe(t,0))break;if(((i=t.suspendedLanes)&n)!==n){cu(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Br(Pu.bind(null,t),r);break}Pu(t);break;case 4:if(vu(t,n),(4186112&n)===n)break;for(r=t.eventTimes,i=-1;0<n;){var s=31-ze(n);o=1<<s,(s=r[s])>i&&(i=s),n&=~o}if(n=i,10<(n=(120>(n=Vi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Is(n/1960))-n)){t.timeoutHandle=Br(Pu.bind(null,t),n);break}Pu(t);break;case 5:Pu(t);break;default:throw Error(a(329))}}return pu(t,Vi()),t.callbackNode===e?du.bind(null,t):null}function vu(t,e){for(e&=~Vs,e&=~Us,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-ze(e),r=1<<n;t[n]=-1,e&=~r}}function gu(t){if(0!==(48&Ps))throw Error(a(327));if(xu(),t===As&&0!==(t.expiredLanes&xs)){var e=xs,n=Su(t,e);0!==(Ms&Us)&&(n=Su(t,e=Fe(t,e)))}else n=Su(t,e=Fe(t,0));if(0!==t.tag&&2===n&&(Ps|=64,t.hydrate&&(t.hydrate=!1,zr(t.containerInfo)),0!==(e=Ue(t))&&(n=Su(t,e))),1===n)throw n=Ls,_u(t,0),vu(t,e),pu(t,Vi()),n;return t.finishedWork=t.current.alternate,t.finishedLanes=e,Pu(t),pu(t,Vi()),null}function yu(t,e){var n=Ps;Ps|=1;try{return t(e)}finally{0===(Ps=n)&&(zs(),Ki())}}function mu(t,e){var n=Ps;Ps&=-2,Ps|=8;try{return t(e)}finally{0===(Ps=n)&&(zs(),Ki())}}function bu(t,e){ui(Rs,js),js|=e,Ms|=e}function wu(){js=Rs.current,si(Rs)}function _u(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(-1!==n&&(t.timeoutHandle=-1,Hr(n)),null!==Ns)for(n=Ns.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&vi();break;case 3:xo(),si(fi),si(li),Go();break;case 5:Ro(r);break;case 4:xo();break;case 13:case 19:si(Do);break;case 10:to(r);break;case 23:case 24:wu()}n=n.return}As=t,Ns=Hu(t.current,null),xs=js=Ms=e,Ds=0,Ls=null,Vs=Us=Fs=0}function Eu(t,e){for(;;){var n=Ns;try{if(Zi(),Qo.current=Pa,ta){for(var r=Jo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ta=!1}if(Yo=0,Zo=Xo=Jo=null,ea=!1,ks.current=null,null===n||null===n.return){Ds=1,Ls=e,Ns=null;break}t:{var o=t,a=n.return,s=n,u=e;if(e=xs,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u;if(0===(2&s.mode)){var l=s.alternate;l?(s.updateQueue=l.updateQueue,s.memoizedState=l.memoizedState,s.lanes=l.lanes):(s.updateQueue=null,s.memoizedState=null)}var f=0!==(1&Do.current),h=a;do{var p;if(p=13===h.tag){var d=h.memoizedState;if(null!==d)p=null!==d.dehydrated;else{var v=h.memoizedProps;p=void 0!==v.fallback&&(!0!==v.unstable_avoidThisFallback||!f)}}if(p){var g=h.updateQueue;if(null===g){var y=new Set;y.add(c),h.updateQueue=y}else g.add(c);if(0===(2&h.mode)){if(h.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var m=so(-1,1);m.tag=2,uo(s,m)}s.lanes|=1;break t}u=void 0,s=e;var b=o.pingCache;if(null===b?(b=o.pingCache=new us,u=new Set,b.set(c,u)):void 0===(u=b.get(c))&&(u=new Set,b.set(c,u)),!u.has(s)){u.add(s);var w=Fu.bind(null,o,c,s);c.then(w,w)}h.flags|=4096,h.lanes=e;break t}h=h.return}while(null!==h);u=Error((G(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ds&&(Ds=2),u=as(u,s),h=a;do{switch(h.tag){case 3:o=u,h.flags|=4096,e&=-e,h.lanes|=e,co(h,cs(0,o,e));break t;case 1:o=u;var _=h.type,E=h.stateNode;if(0===(64&h.flags)&&("function"===typeof _.getDerivedStateFromError||null!==E&&"function"===typeof E.componentDidCatch&&(null===$s||!$s.has(E))
vendor: 4,459 bytes, line 2
2)){h.flags|=4096,e&=-e,h.lanes|=e,co(h,ls(h,o,e));break t}}h=h.return}while(null!==h)}ku(n)}catch(O){e=O,Ns===n&&null!==n&&(Ns=n=n.return);continue}break}}function Ou(){var t=Cs.current;return Cs.current=Pa,null===t?Pa:t}function Su(t,e){var n=Ps;Ps|=16;var r=Ou();for(As===t&&xs===e||_u(t,e);;)try{Tu();break}catch(i){Eu(t,i)}if(Zi(),Ps=n,Cs.current=r,null!==Ns)throw Error(a(261));return As=null,xs=0,Ds}function Tu(){for(;null!==Ns;)Cu(Ns)}function Iu(){for(;null!==Ns&&!Ti();)Cu(Ns)}function Cu(t){var e=Ks(t.alternate,t,js);t.memoizedProps=t.pendingProps,null===e?ku(t):Ns=e,ks.current=null}function ku(t){var e=t;do{var n=e.alternate;if(t=e.return,0===(2048&e.flags)){if(null!==(n=is(n,e,js)))return void(Ns=n);if(24!==(n=e).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&js)||0===(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==t&&0===(2048&t.flags)&&(null===t.firstEffect&&(t.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==t.lastEffect&&(t.lastEffect.nextEffect=e.firstEffect),t.lastEffect=e.lastEffect),1<e.flags&&(null!==t.lastEffect?t.lastEffect.nextEffect=e:t.firstEffect=e,t.lastEffect=e))}else{if(null!==(n=os(e)))return n.flags&=2047,void(Ns=n);null!==t&&(t.firstEffect=t.lastEffect=null,t.flags|=2048)}if(null!==(e=e.sibling))return void(Ns=e);Ns=e=t}while(null!==e);0===Ds&&(Ds=5)}function Pu(t){var e=qi();return Hi(99,Au.bind(null,t,e)),null}function Au(t,e){do{xu()}while(null!==Js);if(0!==(48&Ps))throw Error(a(327));var n=t.finishedWork;if(null===n)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(a(177));t.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=t.pendingLanes&~i;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=i,t.mutableReadLanes&=i,t.entangledLanes&=i,i=t.entanglements;for(var s=t.eventTimes,u=t.expirationTimes;0<o;){var c=31-ze(o),l=1<<c;i[c]=0,s[c]=-1,u[c]=-1,o&=~l}if(null!==eu&&0===(24&r)&&eu.has(t)&&eu.delete(t),t===As&&(Ns=As=null,xs=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Ps,Ps|=32,ks.current=null,Fr=$e,dr(s=pr())){if("selectionStart"in s)u={start:s.selectionStart,end:s.selectionEnd};else t:if(u=(u=s.ownerDocument)&&u.defaultView||window,(l=u.getSelection&&u.getSelection())&&0!==l.rangeCount){u=l.anchorNode,o=l.anchorOffset,c=l.focusNode,l=l.focusOffset;try{u.nodeType,c.nodeType}catch(I){u=null;break t}var f=0,h=-1,p=-1,d=0,v=0,g=s,y=null;e:for(;;){for(var m;g!==u||0!==o&&3!==g.nodeType||(h=f+o),g!==c||0!==l&&3!==g.nodeType||(p=f+l),3===g.nodeType&&(f+=g.nodeValue.length),null!==(m=g.firstChild);)y=g,g=m;for(;;){if(g===s)break e;if(y===u&&++d===o&&(h=f),y===c&&++v===l&&(p=f),null!==(m=g.nextSibling))break;y=(g=y).parentNode}g=m}u=-1===h||-1===p?null:{start:h,end:p}}else u=null;u=u||{start:0,end:0}}else u=null;Ur={focusedElem:s,selectionRange:u},$e=!1,su=null,uu=!1,Ws=r;do{try{Nu()}catch(I){if(null===Ws)throw Error(a(330));Mu(Ws,I),Ws=Ws.nextEffect}}while(null!==Ws);su=null,Ws=r;do{try{for(s=t;null!==Ws;){var b=Ws.flags;if(16&b&&mt(Ws.stateNode,""),128&b){var w=Ws.alternate;if(null!==w){var _=w.ref;null!==_&&("function"===typeof _?_(null):_.current=null)}}switch(1038&b){case 2:bs(Ws),Ws.flags&=-3;break;case 6:bs(Ws),Ws.flags&=-3,Os(Ws.alternate,Ws);break;case 1024:Ws.flags&=-1025;break;case 1028:Ws.flags&=-1025,Os(Ws.alternate,Ws);break;case 4:Os(Ws.alternate,Ws);break;case 8:Es(s,u=Ws);var E=u.alternate;ys(u),null!==E&&ys(E)}Ws=Ws.nextEffect}}catch(I){if(null===Ws)throw Error(a(330));Mu(Ws,I),Ws=Ws.nextEffect}}while(null!==Ws);if(_=Ur,w=pr(),b=_.focusedElem,s=_.selectionRange,w!==b&&b&&b.ownerDocument&&hr(b.ownerDocument.documentElement,b)){null!==s&&dr(b)&&(w=s.start,void 0===(_=s.end)&&(_=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(_,b.value.length)):(_=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(_=_.getSelection(),u=b.textContent.length,E=Math.min(s.start,u),s=void 0===s.end?E:Math.min(s.end,u),!_.extend&&E>s&&(u=s,s=E,E=u),u=fr(b,E),o=fr(b,s),u&&o&&(1!==_.rangeCount||_.anchorNode!==u.node||_.anchorOffset!==u.offset||_.focusNode!==o.node||_.focusOffset!==o.offset)&&((w=w.createRange()).setStart(u.node,u.offset),_.removeAllRanges(),E>s?(_.addRange(w),_.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),_.addRange(w))))),w=[];for(_=b;_=_.parentNode;)1===_.nodeType&&w.push({element:_,left:_.scrollLeft,top:_.scrollTop});
2for("function"===typeof b.focus&&b.focus(),b=0;b<w.length;b++)(_=w[b]).element.scrollLeft=_.left,_.element.scrollTop=_.top}$e=!!Fr,Ur=Fr=null,t.current=n,Ws=r;do{try{for(b=t;null!==Ws;){var O=Ws.flags;if(36&O&&ds(b,Ws.alternate,Ws),128&O){w=void 0;var S=Ws.ref;if(null!==S){var T=Ws.stateNode;switch(Ws.tag){case 5:w=T;break;default:w=T}"function"===typeof S?S(w):S.current=w}}Ws=Ws.nextEffect}}catch(I){if(null===Ws)throw Error(a(330));Mu(Ws,I),Ws=Ws.nextEffect}}while(null!==Ws);Ws=null,Di(),Ps=i}else t.current=n;if(Ys)Ys=!1,Js=t,Xs=e;else for(Ws=r;null!==Ws;)e=Ws.nextEffect,Ws.nextEffect=null,8&Ws.flags&&((O=Ws).sibling=null,O.stateNode=null),Ws=e;if(0===(r=t.pendingLanes)&&($s=null),1===r?t===ru?nu++:(nu=0,ru=t):nu=0,n=n.stateNode,_i&&"function"===typeof _i.onCommitFiberRoot)try{_i.onCommitFiberRoot(wi,n,void 0,64===(64&n.current.flags))}catch(I){}if(pu(t,Vi()),Gs)throw Gs=!1,t=Qs,Qs=null,t;return 0!==(8&Ps)||Ki(),null}function Nu(){for(;null!==Ws;){var t=Ws.alternate;uu||null===su||(0!==(8&Ws.flags)?te(Ws,su)&&(uu=!0):13===Ws.tag&&Ts(t,Ws)&&te(Ws,su)&&(uu=!0));var e=Ws.flags;0!==(256&e)&&ps(t,Ws),0===(512&e)||Ys||(Ys=!0,zi(97,(function(){return xu(),null}))),Ws=Ws.nextEffect}}function xu(){if(90!==Xs){var t=97<Xs?97:Xs;return Xs=90,Hi(t,Du)}return!1}function ju(t,e){Zs.push(e,t),Ys||(Ys=!0,zi(97,(function(){return xu(),null})))}function Ru(t,e){tu.push(e,t),Ys||(Ys=!0,zi(97,(function(){return xu(),null})))}function Du(){if(null===Js)return!1;var t=Js;if(Js=null,0!==(48&Ps))throw Error(a(331));var e=Ps;Ps|=32;var n=tu;tu=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],s=i.destroy;if(i.destroy=void 0,"function"===typeof s)try{s()}catch(c){if(null===o)throw Error(a(330));Mu(o,c)}}for(n=Zs,Zs=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var u=i.create;i.destroy=u()}catch(c){if(null===o)throw Error(a(330));Mu(o,c)}}for(u=t.current.firstEffect;null!==u;)t=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=t;return Ps=e,Ki(),!0}function Lu(t,e,n){uo(t,e=cs(0,e=as(n,e),1)),e=cu(),null!==(t=hu(t,1))&&(He(t,1,e),pu(t,e))}function Mu(t,e){if(3===t.tag)Lu(t,t,e);else for(var n=t.return;null!==n;){if(3===n.tag){Lu(n,t,e);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===$s||!$s.has(r))){var i=ls(n,t=as(e,t),1);if(uo(n,i),i=cu(),null!==(n=hu(n,1)))He(n,1,i),pu(n,i);else if("function"===typeof r.componentDidCatch&&(null===$s||!$s.has(r)))try{r.componentDidCatch(e,t)}catch(o){}break}}n=n.return}}function Fu(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),e=cu(),t.pingedLanes|=t.suspendedLanes&n,As===t&&(xs&n)===n&&(4===Ds||3===Ds&&(62914560&xs)===xs&&500>Vi()-Bs?_u(t,0):Vs|=n),pu(t,e)}function Uu(t,e){var n=t.stateNode;null!==n&&n.delete(e),0===(e=0)&&(0===(2&(e=t.mode))?e=1:0===(4&e)?e=99===qi()?1:2:(0===ou&&(ou=Ms),0===(e=qe(62914560&~ou))&&(e=4194304))),n=cu(),null!==(t=hu(t,e))&&(He(t,e,n),pu(t,n))}function Vu(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function qu(t,e,n,r){return new Vu(t,e,n,r)}function Bu(t){return!(!(t=t.prototype)||!t.isReactComponent)}function Hu(t,e){var n=t.alternate;return null===n?((n=qu(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function zu(t,e,n,r,i,o){var s=2;if(r=t,"function"===typeof t)Bu(t)&&(s=1);else if("string"===typeof t)s=5;else t:switch(t){case S:return Ku(n.children,i,o,e);case L:s=8,i|=16;break;case T:s=8,i|=1;break;case I:return(t=qu(12,n,e,8|i)).elementType=I,t.type=I,t.lanes=o,t;
vendor: 6,809 bytes, line 2
2case A:return(t=qu(13,n,e,i)).type=A,t.elementType=A,t.lanes=o,t;case N:return(t=qu(19,n,e,i)).elementType=N,t.lanes=o,t;case M:return Wu(n,i,o,e);case F:return(t=qu(24,n,e,i)).elementType=F,t.lanes=o,t;default:if("object"===typeof t&&null!==t)switch(t.$$typeof){case C:s=10;break t;case k:s=9;break t;case P:s=11;break t;case x:s=14;break t;case j:s=16,r=null;break t;case R:s=22;break t}throw Error(a(130,null==t?t:typeof t,""))}return(e=qu(s,n,e,i)).elementType=t,e.type=r,e.lanes=o,e}function Ku(t,e,n,r){return(t=qu(7,t,r,e)).lanes=n,t}function Wu(t,e,n,r){return(t=qu(23,t,r,e)).elementType=M,t.lanes=n,t}function Gu(t,e,n){return(t=qu(6,t,null,e)).lanes=n,t}function Qu(t,e,n){return(e=qu(4,null!==t.children?t.children:[],t.key,e)).lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function $u(t,e,n){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Be(0),this.expirationTimes=Be(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Be(0),this.mutableSourceEagerHydrationData=null}function Yu(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:O,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}function Ju(t,e,n,r){var i=e.current,o=cu(),s=lu(i);t:if(n){e:{if(Yt(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(di(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(di(c)){n=yi(n,c,u);break t}}n=u}else n=ci;return null===e.context?e.context=n:e.pendingContext=n,(e=so(o,s)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),uo(i,e),fu(i,s,o),s}function Xu(t){if(!(t=t.current).child)return null;switch(t.child.tag){case 5:default:return t.child.stateNode}}function Zu(t,e){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var n=t.retryLane;t.retryLane=0!==n&&n<e?n:e}}function tc(t,e){Zu(t,e),(t=t.alternate)&&Zu(t,e)}function ec(t,e,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new $u(t,e,null!=n&&!0===n.hydrate),e=qu(3,null,null,2===e?7:1===e?3:0),n.current=e,e.stateNode=n,oo(e),t[Jr]=n.current,Pr(8===t.nodeType?t.parentNode:t),r)for(t=0;t<r.length;t++){var i=(e=r[t])._getVersion;i=i(e._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[e,i]:n.mutableSourceEagerHydrationData.push(e,i)}this._internalRoot=n}function nc(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function rc(t,e,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var t=Xu(a);s.call(t)}}Ju(e,a,t,i)}else{if(o=n._reactRootContainer=function(t,e){if(e||(e=!(!(e=t?9===t.nodeType?t.documentElement:t.firstChild:null)||1!==e.nodeType||!e.hasAttribute("data-reactroot"))),!e)for(var n;n=t.lastChild;)t.removeChild(n);return new ec(t,0,e?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var u=i;i=function(){var t=Xu(a);u.call(t)}}mu((function(){Ju(e,a,t,i)}))}return Xu(a)}function ic(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!nc(e))throw Error(a(200));return Yu(t,e,null,n)}Ks=function(t,e,n){var r=e.lanes;if(null!==t)if(t.memoizedProps!==e.pendingProps||fi.current)Ra=!0;else{if(0===(n&r)){switch(Ra=!1,e.tag){case 3:za(e),Ko();break;case 5:jo(e);break;case 1:di(e.type)&&mi(e);break;case 4:No(e,e.stateNode.containerInfo);break;case 10:r=e.memoizedProps.value;var i=e.type._context;ui($i,i._currentValue),i._currentValue=r;break;case 13:if(null!==e.memoizedState)return 0!==(n&e.child.childLanes)?$a(t,e,n):(ui(Do,1&Do.current),null!==(e=ns(t,e,n))?e.sibling:null);ui(Do,1&Do.current);break;case 19:if(r=0!==(n&e.childLanes),0!==(64&t.flags)){if(r)return es(t,e,n);e.flags|=64}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),ui(Do,Do.current),r)break;return null;case 23:case 24:return e.lanes=0,Ua(t,e,n)}return ns(t,e,n)}Ra=0!==(16384&t.flags)}else Ra=!1;switch(e.lanes=0,e.tag){case 2:if(r=e.type,null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=pi(e,li.current),no(e,n),i=ia(null,e,r,t,i,n),e.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,di(r)){var o=!0;mi(e)}else o=!1;e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,oo(e);var s=r.getDerivedStateFromProps;"function"===typeof s&&po(e,r,s,t),i.updater=vo,e.stateNode=i,i._reactInternals=e,bo(e,r,t,n),e=Ha(null,e,r,!0,o,n)}else e.tag=0,Da(null,e,i,n),e=e.child;return e;case 16:i=e.elementType;t:{switch(null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),t=e.pendingProps,i=(o=i._init)(i._payload),e.type=i,o=e.tag=function(t){if("function"===typeof t)return Bu(t)?1:0;if(void 0!==t&&null!==t){if((t=t.$$typeof)===P)return 11;if(t===x)return 14}return 2}(i),t=Qi(i,t),o){case 0:e=qa(null,e,i,t,n);break t;case 1:e=Ba(null,e,i,t,n);break t;case 11:e=La(null,e,i,t,n);break t;case 14:e=Ma(null,e,i,Qi(i.type,t),r,n);break t}throw Error(a(306,i,""))}return e;case 0:return r=e.type,i=e.pendingProps,qa(t,e,r,i=e.elementType===r?i:Qi(r,i),n);case 1:return r=e.type,i=e.pendingProps,Ba(t,e,r,i=e.elementType===r?i:Qi(r,i),n);case 3:if(za(e),r=e.updateQueue,null===t||null===r)throw Error(a(282));if(r=e.pendingProps,i=null!==(i=e.memoizedState)?i.element:null,ao(t,e),lo(e,r,null,n),(r=e.memoizedState.element)===i)Ko(),e=ns(t,e,n);else{if((o=(i=e.stateNode).hydrate)&&(Fo=Kr(e.stateNode.containerInfo.firstChild),Mo=e,o=Uo=!0),o){if(null!=(t=i.mutableSourceEagerHydrationData))for(i=0;i<t.length;i+=2)(o=t[i])._workInProgressVersionPrimary=t[i+1],Wo.push(o);for(n=To(e,null,r,n),e.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Da(t,e,r,n),Ko();e=e.child}return e;case 5:return jo(e),null===t&&Bo(e),r=e.type,i=e.pendingProps,o=null!==t?t.memoizedProps:null,s=i.children,qr(r,i)?s=null:null!==o&&qr(r,o)&&(e.flags|=16),Va(t,e),Da(t,e,s,n),e.child;case 6:return null===t&&Bo(e),null;case 13:return $a(t,e,n);case 4:return No(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=So(e,null,r,n):Da(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,La(t,e,r,i=e.elementType===r?i:Qi(r,i),n);case 7:return Da(t,e,e.pendingProps,n),e.child;case 8:case 12:return Da(t,e,e.pendingProps.children,n),e.child;
vendor: 4,695 bytes, line 2
2case 10:t:{r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value;var u=e.type._context;if(ui($i,u._currentValue),u._currentValue=o,null!==s)if(u=s.value,0===(o=sr(u,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(s.children===i.children&&!fi.current){e=ns(t,e,n);break t}}else for(null!==(u=e.child)&&(u.return=e);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&o)){1===u.tag&&((l=so(-1,n&-n)).tag=2,uo(u,l)),u.lanes|=n,null!==(l=u.alternate)&&(l.lanes|=n),eo(u.return,n),c.lanes|=n;break}l=l.next}}else s=10===u.tag&&u.type===e.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===e){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Da(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=(o=e.pendingProps).children,no(e,n),r=r(i=ro(i,o.unstable_observedBits)),e.flags|=1,Da(t,e,r,n),e.child;case 14:return o=Qi(i=e.type,e.pendingProps),Ma(t,e,i,o=Qi(i.type,o),r,n);case 15:return Fa(t,e,e.type,e.pendingProps,r,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Qi(r,i),null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2),e.tag=1,di(r)?(t=!0,mi(e)):t=!1,no(e,n),yo(e,r,i),bo(e,r,i,n),Ha(null,e,r,!0,t,n);case 19:return es(t,e,n);case 23:case 24:return Ua(t,e,n)}throw Error(a(156,e.tag))},ec.prototype.render=function(t){Ju(t,this._internalRoot,null,null)},ec.prototype.unmount=function(){var t=this._internalRoot,e=t.containerInfo;Ju(null,t,null,(function(){e[Jr]=null}))},ee=function(t){13===t.tag&&(fu(t,4,cu()),tc(t,4))},ne=function(t){13===t.tag&&(fu(t,67108864,cu()),tc(t,67108864))},re=function(t){if(13===t.tag){var e=cu(),n=lu(t);fu(t,n,e),tc(t,n)}},ie=function(t,e){return e()},Ct=function(t,e,n){switch(e){case"input":if(nt(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=ni(r);if(!i)throw Error(a(90));J(r),nt(r,i)}}}break;case"textarea":ct(t,n);break;case"select":null!=(e=n.value)&&at(t,!!n.multiple,e,!1)}},jt=yu,Rt=function(t,e,n,r,i){var o=Ps;Ps|=4;try{return Hi(98,t.bind(null,e,n,r,i))}finally{0===(Ps=o)&&(zs(),Ki())}},Dt=function(){0===(49&Ps)&&(function(){if(null!==eu){var t=eu;eu=null,t.forEach((function(t){t.expiredLanes|=24&t.pendingLanes,pu(t,Vi())}))}Ki()}(),xu())},Lt=function(t,e){var n=Ps;Ps|=2;try{return t(e)}finally{0===(Ps=n)&&(zs(),Ki())}};var oc={Events:[ti,ei,ni,Nt,xt,xu,{current:!1}]},ac={findFiberByHostInstance:Zr,bundleType:0,version:"17.0.1",rendererPackageName:"react-dom"},sc={bundleType:ac.bundleType,version:ac.version,rendererPackageName:ac.rendererPackageName,rendererConfig:ac.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=Zt(t))?null:t.stateNode},findFiberByHostInstance:ac.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{wi=uc.inject(sc),_i=uc}catch(gt){}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oc,e.createPortal=ic,e.findDOMNode=function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternals;if(void 0===e){if("function"===typeof t.render)throw Error(a(188));throw Error(a(268,Object.keys(t)))}return t=null===(t=Zt(e))?null:t.stateNode},e.flushSync=function(t,e){var n=Ps;if(0!==(48&n))return t(e);Ps|=1;try{if(t)return Hi(99,t.bind(null,e))}finally{Ps=n,Ki()}},e.hydrate=function(t,e,n){if(!nc(e))throw Error(a(200));return rc(null,t,e,!0,n)},e.render=function(t,e,n){if(!nc(e))throw Error(a(200));return rc(null,t,e,!1,n)},e.unmountComponentAtNode=function(t){if(!nc(t))throw Error(a(40));return!!t._reactRootContainer&&(mu((function(){rc(null,null,t,!1,(function(){t._reactRootContainer=null,t[Jr]=null}))})),!0)},e.unstable_batchedUpdates=yu,e.unstable_createPortal=function(t,e){return ic(t,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},e.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!nc(n))throw Error(a(200));if(null==t||void 0===t._reactInternals)throw Error(a(38));return rc(t,e,n,!1,r)},e.version="17.0.1"},function(t,e,n){"use strict";
vendor: 4,165 bytes, line 2
2t.exports=n(70)},function(t,e,n){"use strict";var r,i,o,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var l=null,f=null,h=function t(){if(null!==l)try{var n=e.unstable_now();l(!0,n),l=null}catch(r){throw setTimeout(t,0),r}};r=function(t){null!==l?setTimeout(r,0,t):(l=t,setTimeout(h,0))},i=function(t,e){f=setTimeout(t,e)},o=function(){clearTimeout(f)},e.unstable_shouldYield=function(){return!1},a=e.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,d=window.clearTimeout;if("undefined"!==typeof console){var v=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,y=null,m=-1,b=5,w=0;e.unstable_shouldYield=function(){return e.unstable_now()>=w},a=function(){},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<t?Math.floor(1e3/t):5};var _=new MessageChannel,E=_.port2;_.port1.onmessage=function(){if(null!==y){var t=e.unstable_now();w=t+b;try{y(!0,t)?E.postMessage(null):(g=!1,y=null)}catch(n){throw E.postMessage(null),n}}else g=!1},r=function(t){y=t,g||(g=!0,E.postMessage(null))},i=function(t,n){m=p((function(){t(e.unstable_now())}),n)},o=function(){d(m),m=-1}}function O(t,e){var n=t.length;t.push(e);t:for(;;){var r=n-1>>>1,i=t[r];if(!(void 0!==i&&0<I(i,e)))break t;t[r]=e,t[n]=i,n=r}}function S(t){return void 0===(t=t[0])?null:t}function T(t){var e=t[0];if(void 0!==e){var n=t.pop();if(n!==e){t[0]=n;t:for(var r=0,i=t.length;r<i;){var o=2*(r+1)-1,a=t[o],s=o+1,u=t[s];if(void 0!==a&&0>I(a,n))void 0!==u&&0>I(u,a)?(t[r]=u,t[s]=n,r=s):(t[r]=a,t[o]=n,r=o);else{if(!(void 0!==u&&0>I(u,n)))break t;t[r]=u,t[s]=n,r=s}}}return e}return null}function I(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}var C=[],k=[],P=1,A=null,N=3,x=!1,j=!1,R=!1;function D(t){for(var e=S(k);null!==e;){if(null===e.callback)T(k);else{if(!(e.startTime<=t))break;T(k),e.sortIndex=e.expirationTime,O(C,e)}e=S(k)}}function L(t){if(R=!1,D(t),!j)if(null!==S(C))j=!0,r(M);else{var e=S(k);null!==e&&i(L,e.startTime-t)}}function M(t,n){j=!1,R&&(R=!1,o()),x=!0;var r=N;try{for(D(n),A=S(C);null!==A&&(!(A.expirationTime>n)||t&&!e.unstable_shouldYield());){var a=A.callback;if("function"===typeof a){A.callback=null,N=A.priorityLevel;var s=a(A.expirationTime<=n);n=e.unstable_now(),"function"===typeof s?A.callback=s:A===S(C)&&T(C),D(n)}else T(C);A=S(C)}if(null!==A)var u=!0;else{var c=S(k);null!==c&&i(L,c.startTime-n),u=!1}return u}finally{A=null,N=r,x=!1}}var F=a;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){j||x||(j=!0,r(M))},e.unstable_getCurrentPriorityLevel=function(){return N},e.unstable_getFirstCallbackNode=function(){return S(C)},e.unstable_next=function(t){switch(N){case 1:case 2:case 3:var e=3;break;default:e=N}var n=N;N=e;try{return t()}finally{N=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=F,e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=N;N=t;try{return e()}finally{N=n}},e.unstable_scheduleCallback=function(t,n,a){var s=e.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,t){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return t={id:P++,callback:n,priorityLevel:t,startTime:a,expirationTime:u=
2a+u,sortIndex:-1},a>s?(t.sortIndex=a,O(k,t),null===S(C)&&t===S(k)&&(R?o():R=!0,i(L,a-s))):(t.sortIndex=u,O(C,t),j||x||(j=!0,r(M))),t},e.unstable_wrapCallback=function(t){var e=N;return function(){var n=N;N=e;try{return t.apply(this,arguments)}finally{N=n}}}},,function(t,e,n){"use strict";var r=n(73);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,m=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,_=r?Symbol.for("react.scope"):60119;function E(t){if("object"===typeof t&&null!==t){var e=t.$$typeof;switch(e){case i:switch(t=t.type){case f:case h:case a:case u:case s:case d:return t;default:switch(t=t&&t.$$typeof){case l:case p:case y:case g:case c:return t;default:return e}}case o:return e}}}function O(t){return E(t)===h}e.AsyncMode=f,e.ConcurrentMode=h,e.ContextConsumer=l,e.ContextProvider=c,e.Element=i,e.ForwardRef=p,e.Fragment=a,e.Lazy=y,e.Memo=g,e.Portal=o,e.Profiler=u,e.StrictMode=s,e.Suspense=d,e.isAsyncMode=function(t){return O(t)||E(t)===f},e.isConcurrentMode=O,e.isContextConsumer=function(t){return E(t)===l},e.isContextProvider=function(t){return E(t)===c},e.isElement=function(t){return"object"===typeof t&&null!==t&&t.$$typeof===i},e.isForwardRef=function(t){return E(t)===p},e.isFragment=function(t){return E(t)===a},e.isLazy=function(t){return E(t)===y},e.isMemo=function(t){return E(t)===g},e.isPortal=function(t){return E(t)===o},e.isProfiler=function(t){return E(t)===u},e.isStrictMode=function(t){return E(t)===s},e.isSuspense=function(t){return E(t)===d},e.isValidElementType=function(t){return"string"===typeof t||"function"===typeof t||t===a||t===h||t===u||t===s||t===d||t===v||"object"===typeof t&&null!==t&&(t.$$typeof===y||t.$$typeof===g||t.$$typeof===c||t.$$typeof===l||t.$$typeof===p||t.$$typeof===b||t.$$typeof===w||t.$$typeof===_||t.$$typeof===m)},e.typeOf=E},function(t,e,n){"use strict";(function(t){var e=n(3);(function(){var n,r="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)};var i=function(e){e=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof t&&t,e];for(var n=0;n<e.length;++n){var r=e[n];if(r&&r.Math==Math)return r}return globalThis}(this);function o(t){var e=0;return function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}}}function a(t){var e="undefined"!=typeof Symbol&&Symbol.iterator&&t[Symbol.iterator];return e?e.call(t):{next:o(t)}}!function(t,e){if(e){var n=i;t=t.split(".");for(var o=0;o<t.length-1;o++){var a=t[o];a in n||(n[a]={}),n=n[a]}(e=e(o=n[t=t[t.length-1]]))!=o&&null!=e&&r(n,t,{configurable:!0,writable:!0,value:e})}}("Promise",(function(t){function e(t){this.b=0,this.c=void 0,this.a=[];var e=this.f();try{t(e.resolve,e.reject)}catch(n){e.reject(n)}}function n(){this.a=null}function r(t){return t instanceof e?t:new e((function(e){e(t)}))}if(t)return t;n.prototype.b=function(t){if(null==this.a){this.a=[];var e=this;this.c((function(){e.g()}))}this.a.push(t)};var o=i.setTimeout;n.prototype.c=function(t){o(t,0)},n.prototype.g=function(){for(;this.a&&this.a.length;){var t=this.a;this.a=[];for(var e=0;e<t.length;++e){var n=t[e];t[e]=null;try{n()}catch(r){this.f(r)}}}this.a=null},n.prototype.f=function(t){this.c((function(){throw t}))},e.prototype.f=function(){function t(t){return function(r){n||(n=!0,t.call(e,r))}}var e=this,n=!1;return{resolve:t(this.v),reject:t(this.g)}}
vendor: 1,338 bytes, line 2
2,e.prototype.v=function(t){if(t===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(t instanceof e)this.s(t);else{t:switch(typeof t){case"object":var n=null!=t;break t;case"function":n=!0;break t;default:n=!1}n?this.m(t):this.i(t)}},e.prototype.m=function(t){var e=void 0;try{e=t.then}catch(n){return void this.g(n)}"function"==typeof e?this.u(e,t):this.i(t)},e.prototype.g=function(t){this.h(2,t)},e.prototype.i=function(t){this.h(1,t)},e.prototype.h=function(t,e){if(0!=this.b)throw Error("Cannot settle("+t+", "+e+"): Promise already settled in state"+this.b);this.b=t,this.c=e,this.l()},e.prototype.l=function(){if(null!=this.a){for(var t=0;t<this.a.length;++t)s.b(this.a[t]);this.a=null}};var s=new n;return e.prototype.s=function(t){var e=this.f();t.Pa(e.resolve,e.reject)},e.prototype.u=function(t,e){var n=this.f();try{t.call(e,n.resolve,n.reject)}catch(r){n.reject(r)}},e.prototype.then=function(t,n){function r(t,e){return"function"==typeof t?function(e){try{i(t(e))}catch(n){o(n)}}:e}var i,o,a=new e((function(t,e){i=t,o=e}));return this.Pa(r(t,i),r(n,o)),a},e.prototype.catch=function(t){return this.then(void 0,t)},e.prototype.Pa=function(t,e){function n(){switch(r.b){case 1:t(r.c);break;case 2:e(r.c);break;default:throw Error("Unexpected state: "+r.b)}}var r=this;null==this.a?s.b(n):this.a.push(n)}
2,e.resolve=r,e.reject=function(t){return new e((function(e,n){n(t)}))},e.race=function(t){return new e((function(e,n){for(var i=a(t),o=i.next();!o.done;o=i.next())r(o.value).Pa(e,n)}))},e.all=function(t){var n=a(t),i=n.next();return i.done?r([]):new e((function(t,e){function o(e){return function(n){a[e]=n,0==--s&&t(a)}}var a=[],s=0;do{a.push(void 0),s++,r(i.value).Pa(o(a.length-1),e),i=n.next()}while(!i.done)}))},e}));var s=s||{},u=this||self,c=/^[\w+/_-]+[=]{0,2}$/,l=null;function f(t){return(t=t.querySelector&&t.querySelector("script[nonce]"))&&(t=t.nonce||t.getAttribute("nonce"))&&c.test(t)?t:""}function h(){}function p(t){var e=typeof t;return"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}function d(t){var e=p(t);return"array"==e||"object"==e&&"number"==typeof t.length}function v(t){return"function"==p(t)}function g(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}function y(t){return Object.prototype.hasOwnProperty.call(t,m)&&t[m]||(t[m]=++b)}var m="closure_uid_"+(1e9*Math.random()>>>0),b=0;function w(t,e,n){return t.call.apply(t.bind,arguments)}function _(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function E(t,e,n){return(E=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?w:_).apply(null,arguments)}function O(t,e){var n=Array.prototype.slice.call(arguments,1);return function(){var e=n.slice();return e.push.apply(e,arguments),t.apply(this,e)}}var S=Date.now;function T(t,e){function n(){}n.prototype=e.prototype,t.$a=e.prototype,t.prototype=new n,t.prototype.constructor=t}function I(t){return t}
2function C(t,e,n){this.code=A+t,this.message=e||N[t]||"",this.a=n||null}function k(t){var e=t&&t.code;return e?new C(e.substring(A.length),t.message,t.serverResponse):null}T(C,Error),C.prototype.w=function(){var t={code:this.code,message:this.message};return this.a&&(t.serverResponse=this.a),t},C.prototype.toJSON=function(){return this.w()};var P,A="auth/",N={"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must al
2ways have a verified email.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invali
2d-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","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.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted.  Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."},x={kd:{Sa:"https://staging-identitytoolkit.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",Ya:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Va:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"b"},rd:{Sa:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",Ya:"https://securetoken.googleapis.com/v1/token",Va:"https://identitytoolkit.googleapis.com/v2/",id:"p"},td:{Sa:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",Ya:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Va:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"s"},ud:{Sa:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",Ya:"https://test-securetoken.sandbox.googleapis.com/v1/token",Va:"https://test-identitytoolkit.sandbox.googleapis.com/v2/",id:"t"}};function j(t){for(var e in x)if(x[e].id===t)return{firebaseEndpoint:(t=x[e]).Sa,secureTokenEndpoint:t.Ya,identityPlatformEndpoint:t.Va};return null}function R(t){if(!t)return!1;
2try{return!!t.$goog_Thenable}catch(e){return!1}}function D(t){if(Error.captureStackTrace)Error.captureStackTrace(this,D);else{var e=Error().stack;e&&(this.stack=e)}t&&(this.message=String(t))}function L(t,e){for(var n="",r=(t=t.split("%s")).length-1,i=0;i<r;i++)n+=t[i]+(i<e.length?e[i]:"%s");D.call(this,n+t[r])}function M(t,e){throw new L("Failure"+(t?": "+t:""),Array.prototype.slice.call(arguments,1))}function F(t,e){this.c=t,this.f=e,this.b=0,this.a=null}function U(t,e){t.f(e),100>t.b&&(t.b++,e.next=t.a,t.a=e)}function V(){this.b=this.a=null}P=j("__EID__")?"__EID__":void 0,T(D,Error),D.prototype.name="CustomError",T(L,D),L.prototype.name="AssertionError",F.prototype.get=function(){if(0<this.b){this.b--;var t=this.a;this.a=t.next,t.next=null}else t=this.c();return t};var q=new F((function(){return new H}),(function(t){t.reset()}));function B(){var t=we,e=null;return t.a&&(e=t.a,t.a=t.a.next,t.a||(t.b=null),e.next=null),e}function H(){this.next=this.b=this.a=null}V.prototype.add=function(t,e){var n=q.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},H.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},H.prototype.reset=function(){this.next=this.b=this.a=null};var z=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if("string"===typeof t)return"string"!==typeof e||1!=e.length?-1:t.indexOf(e,0);for(var n=0;n<t.length;n++)if(n in t&&t[n]===e)return n;return-1},K=Array.prototype.forEach?function(t,e,n){Array.prototype.forEach.call(t,e,n)}:function(t,e,n){for(var r=t.length,i="string"===typeof t?t.split(""):t,o=0;o<r;o++)o in i&&e.call(n,i[o],o,t)};var W=Array.prototype.filter?function(t,e){return Array.prototype.filter.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=[],i=0,o="string"===typeof t?t.split(""):t,a=0;a<n;a++)if(a in o){var s=o[a];e.call(void 0,s,a,t)&&(r[i++]=s)}return r},G=Array.prototype.map?function(t,e){return Array.prototype.map.call(t,e,void 0)}:function(t,e){for(var n=t.length,r=Array(n),i="string"===typeof t?t.split(""):t,o=0;o<n;o++)o in i&&(r[o]=e.call(void 0,i[o],o,t));return r},Q=Array.prototype.some?function(t,e){return Array.prototype.some.call(t,e,void 0)}:function(t,e){for(var n=t.length,r="string"===typeof t?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t))return!0;return!1};function $(t,e){return 0<=z(t,e)}function Y(t,e){var n;return(n=0<=(e=z(t,e)))&&Array.prototype.splice.call(t,e,1),n}function J(t,e){!function(t,e){for(var n="string"===typeof t?t.split(""):t,r=t.length-1;0<=r;--r)r in n&&e.call(void 0,n[r],r,t)}(t,(function(n,r){e.call(void 0,n,r,t)&&1==Array.prototype.splice.call(t,r,1).length&&0}))}function X(t){return Array.prototype.concat.apply([],arguments)}function Z(t){var e=t.length;if(0<e){for(var n=Array(e),r=0;r<e;r++)n[r]=t[r];return n}return[]}var tt,et=String.prototype.trim?function(t){return t.trim()}:function(t){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(t)[1]},nt=/&/g,rt=/</g,it=/>/g,ot=/"/g,at=/'/g,st=/\x00/g,ut=/[\x00&<>"']/;function ct(t,e){return-1!=t.indexOf(e)}function lt(t,e){return t<e?-1:t>e?1:0}t:{var ft=u.navigator;if(ft){var ht=ft.userAgent;if(ht){tt=ht;break t}}tt=""}function pt(t){return ct(tt,t)}function dt(t,e){for(var n in t)e.call(void 0,t[n],n,t)}function vt(t){for(var e in t)return!1;return!0}function gt(t){var e,n={};for(e in t)n[e]=t[e];return n}var yt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function mt(t,e){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])t[n]=r[n];for(var o=0;o<yt.length;o++)n=yt[o],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}function bt(t,e){t:{try{var n=t&&t.ownerDocument,r=n&&(n.defaultView||n.parentWindow);if((r=r||u).Element&&r.Location){var i=r;break t}}catch(a){}i=null}if(i&&"undefined"!=typeof i[e]&&(!t||!(t instanceof i[e])&&(t instanceof i.Location||t instanceof i.Element))){if(g(t))try{var o=t.constructor.displayName||t.constructor.name||Object.prototype.toString.call(t)}catch(a){o="<object could not be stringified>"}else o=void 0===t?"undefined":null===t?"null":typeof t;M("Argument is not a %s (or a non-Element, non-Location mock); got: %s",e,o)}}function wt(t,e){this.a=t===St&&e||"",this.b=Ot}function _t(t){return t instanceof wt&&t.constructor===wt&&t.b===Ot?t.a:(M("expected object of type Const, got '"+t+"'"),"type_error:Const")}wt.prototype.sa=!0,wt.prototype.ra=function(){return this.a},wt.prototype.toString=function(){return"Const{"+this.a+"}"};var Et,Ot={},St={};
2function Tt(){if(void 0===Et){var t=null,e=u.trustedTypes;if(e&&e.createPolicy){try{t=e.createPolicy("goog#html",{createHTML:I,createScript:I,createScriptURL:I})}catch(n){u.console&&u.console.error(n.message)}Et=t}else Et=t}return Et}function It(t,e){this.a=e===Nt?t:""}function Ct(t){return t instanceof It&&t.constructor===It?t.a:(M("expected object of type TrustedResourceUrl, got '"+t+"' of type "+p(t)),"type_error:TrustedResourceUrl")}function kt(t,e){var n=_t(t);if(!At.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return function(t){var e=Tt();return new It(t=e?e.createScriptURL(t):t,Nt)}(t=n.replace(Pt,(function(t,r){if(!Object.prototype.hasOwnProperty.call(e,r))throw Error('Found marker, "'+r+'", in format string, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(e));return(t=e[r])instanceof wt?_t(t):encodeURIComponent(String(t))})))}It.prototype.sa=!0,It.prototype.ra=function(){return this.a.toString()},It.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var Pt=/%{(\w+)}/g,At=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,Nt={};function xt(t,e){this.a=e===Ut?t:""}function jt(t){return t instanceof xt&&t.constructor===xt?t.a:(M("expected object of type SafeUrl, got '"+t+"' of type "+p(t)),"type_error:SafeUrl")}xt.prototype.sa=!0,xt.prototype.ra=function(){return this.a.toString()},xt.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Rt=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|font\/\w+|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i,Dt=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,Lt=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function Mt(t){if(t instanceof xt)return t;if(t="object"==typeof t&&t.sa?t.ra():String(t),Lt.test(t))t=new xt(t,Ut);else{var e=(t=(t=String(t)).replace(/(%0A|%0D)/g,"")).match(Dt);t=e&&Rt.test(e[1])?new xt(t,Ut):null}return t}function Ft(t){return t instanceof xt?t:(t="object"==typeof t&&t.sa?t.ra():String(t),Lt.test(t)||(t="about:invalid#zClosurez"),new xt(t,Ut))}var Ut={},Vt=new xt("about:invalid#zClosurez",Ut);function qt(t,e,n){this.a=n===Bt?t:""}qt.prototype.sa=!0,qt.prototype.ra=function(){return this.a.toString()},qt.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var Bt={};function Ht(t,e,n,r){return t=t instanceof xt?t:Ft(t),e=e||u,n=n instanceof wt?_t(n):n||"",e.open(jt(t),n,r,void 0)}function zt(t,e){for(var n=t.split("%s"),r="",i=Array.prototype.slice.call(arguments,1);i.length&&1<n.length;)r+=n.shift()+i.shift();return r+n.join("%s")}function Kt(t){return ut.test(t)&&(-1!=t.indexOf("&")&&(t=t.replace(nt,"&amp;")),-1!=t.indexOf("<")&&(t=t.replace(rt,"&lt;")),-1!=t.indexOf(">")&&(t=t.replace(it,"&gt;")),-1!=t.indexOf('"')&&(t=t.replace(ot,"&quot;")),-1!=t.indexOf("'")&&(t=t.replace(at,"&#39;")),-1!=t.indexOf("\0")&&(t=t.replace(st,"&#0;"))),t}function Wt(t){return Wt[" "](t),t}Wt[" "]=h;var Gt,Qt=pt("Opera"),$t=pt("Trident")||pt("MSIE"),Yt=pt("Edge"),Jt=Yt||$t,Xt=pt("Gecko")&&!(ct(tt.toLowerCase(),"webkit")&&!pt("Edge"))&&!(pt("Trident")||pt("MSIE"))&&!pt("Edge"),Zt=ct(tt.toLowerCase(),"webkit")&&!pt("Edge");function te(){var t=u.document;return t?t.documentMode:void 0}t:{var ee="",ne=function(){var t=tt;return Xt?/rv:([^\);]+)(\)|;)/.exec(t):Yt?/Edge\/([\d\.]+)/.exec(t):$t?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(t):Zt?/WebKit\/(\S+)/.exec(t):Qt?/(?:Version)[ \/]?(\S+)/.exec(t):void 0}();if(ne&&(ee=ne?ne[1]:""),$t){var re=te();if(null!=re&&re>parseFloat(ee)){Gt=String(re);break t}}Gt=ee}var ie,oe={};function ae(t){return function(t,e){var n=oe;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,(function(){for(var e=0,n=et(String(Gt)).split("."),r=et(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o<i;o++){var a=n[o]||"",s=r[o]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==a[0].length&&0==s[0].length)break;e=lt(0==a[1].length?0:parseInt(a[1],10),0==s[1].length?0:parseInt(s[1],10))||lt(0==a[2].length,0==s[2].length)||lt(a[2],s[2]),a=a[3],s=s[3]}while(0==e)}return 0<=e}))}if(u.document&&$t){var se=te();ie=se||(parseInt(Gt,10)||void 0)}else ie=void 0;var ue=ie;try{new self.OffscreenCanvas(0,0).getContext("2d")}catch(ha){}var ce=!$t||9<=Number(ue);function le(t){var e=document;return"string"===typeof t?e.getElementById(t):t}function fe(t,e){dt(e,(function(e,n){e&&"object"==typeof e&&e.sa&&(e=e.ra()),"style"==n?t.style.cssText=e:"class"==n?t.className=e:"for"==n?t.htmlFor=e:de.hasOwnProperty(n)?t.setAttribute(de[n],e):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?t.setAttribute(n,e):t[n]=e}))}var he,pe,de={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",
2nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function ve(t,e,n){function r(n){n&&e.appendChild("string"===typeof n?t.createTextNode(n):n)}for(var i=2;i<n.length;i++){var o=n[i];if(!d(o)||g(o)&&0<o.nodeType)r(o);else{t:{if(o&&"number"==typeof o.length){if(g(o)){var a="function"==typeof o.item||"string"==typeof o.item;break t}if(v(o)){a="function"==typeof o.item;break t}}a=!1}K(a?Z(o):o,r)}}}function ge(t,e){return e=String(e),"application/xhtml+xml"===t.contentType&&(e=e.toLowerCase()),t.createElement(e)}function ye(t){u.setTimeout((function(){throw t}),0)}function me(t,e){pe||function(){if(u.Promise&&u.Promise.resolve){var t=u.Promise.resolve(void 0);pe=function(){t.then(_e)}}else pe=function(){var t=_e;!v(u.setImmediate)||u.Window&&u.Window.prototype&&!pt("Edge")&&u.Window.prototype.setImmediate==u.setImmediate?(he||(he=function(){var t=u.MessageChannel;if("undefined"===typeof t&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!pt("Presto")&&(t=function(){var t=ge(document,"IFRAME");t.style.display="none",document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.close();var n="callImmediate"+Math.random(),r="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=E((function(t){"*"!=r&&t.origin!=r||t.data!=n||this.port1.onmessage()}),this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,r)}}}),"undefined"!==typeof t&&!pt("Trident")&&!pt("MSIE")){var e=new t,n={},r=n;return e.port1.onmessage=function(){if(void 0!==n.next){var t=(n=n.next).Fb;n.Fb=null,t()}},function(t){r.next={Fb:t},r=r.next,e.port2.postMessage(0)}}return function(t){u.setTimeout(t,0)}}()),he(t)):u.setImmediate(t)}}(),be||(pe(),be=!0),we.add(t,e)}var be=!1,we=new V;function _e(){for(var t;t=B();){try{t.a.call(t.b)}catch(e){ye(e)}U(q,t)}be=!1}function Ee(t,e){if(this.a=Oe,this.h=void 0,this.f=this.b=this.c=null,this.g=this.i=!1,t!=h)try{var n=this;t.call(e,(function(t){Le(n,Se,t)}),(function(t){if(!(t instanceof He))try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(e){}Le(n,Te,t)}))}catch(r){Le(this,Te,r)}}var Oe=0,Se=2,Te=3;function Ie(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}Ie.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Ce=new F((function(){return new Ie}),(function(t){t.reset()}));function ke(t,e,n){var r=Ce.get();return r.g=t,r.b=e,r.f=n,r}function Pe(t){if(t instanceof Ee)return t;var e=new Ee(h);return Le(e,Se,t),e}
2function Ae(t){return new Ee((function(e,n){n(t)}))}function Ne(t,e,n){Me(t,e,n,null)||me(O(e,t))}function xe(t){return new Ee((function(e){var n=t.length,r=[];if(n)for(var i=function(t,i,o){n--,r[t]=i?{Ob:!0,value:o}:{Ob:!1,reason:o},0==n&&e(r)},o=0;o<t.length;o++)Ne(t[o],O(i,o,!0),O(i,o,!1));else e(r)}))}function je(t,e){if(t.a==Oe)if(t.c){var n=t.c;if(n.b){for(var r=0,i=null,o=null,a=n.b;a&&(a.c||(r++,a.a==t&&(i=a),!(i&&1<r)));a=a.next)i||(o=a);i&&(n.a==Oe&&1==r?je(n,e):(o?((r=o).next==n.f&&(n.f=r),r.next=r.next.next):Ue(n),Ve(n,i,Te,e)))}t.c=null}else Le(t,Te,e)}function Re(t,e){t.b||t.a!=Se&&t.a!=Te||Fe(t),t.f?t.f.next=e:t.b=e,t.f=e}function De(t,e,n,r){var i=ke(null,null,null);return i.a=new Ee((function(t,o){i.g=e?function(n){try{var i=e.call(r,n);t(i)}catch(a){o(a)}}:t,i.b=n?function(e){try{var i=n.call(r,e);void 0===i&&e instanceof He?o(e):t(i)}catch(a){o(a)}}:o})),i.a.c=t,Re(t,i),i.a}function Le(t,e,n){t.a==Oe&&(t===n&&(e=Te,n=new TypeError("Promise cannot resolve to itself")),t.a=1,Me(n,t.Zc,t.$c,t)||(t.h=n,t.a=e,t.c=null,Fe(t),e!=Te||n instanceof He||function(t,e){t.g=!0,me((function(){t.g&&Be.call(null,e)}))}(t,n)))}function Me(t,e,n,r){if(t instanceof Ee)return Re(t,ke(e||h,n||null,r)),!0;if(R(t))return t.then(e,n,r),!0;if(g(t))try{var i=t.then;if(v(i))return function(t,e,n,r,i){function o(t){s||(s=!0,r.call(i,t))}function a(t){s||(s=!0,n.call(i,t))}var s=!1;try{e.call(t,a,o)}catch(u){o(u)}}(t,i,e,n,r),!0}catch(o){return n.call(r,o),!0}return!1}function Fe(t){t.i||(t.i=!0,me(t.fc,t))}function Ue(t){var e=null;return t.b&&(e=t.b,t.b=e.next,e.next=null),t.b||(t.f=null),e}function Ve(t,e,n,r){if(n==Te&&e.b&&!e.c)for(;t&&t.g;t=t.c)t.g=!1;if(e.a)e.a.c=null,qe(e,n,r);else try{e.c?e.g.call(e.f):qe(e,n,r)}catch(i){Be.call(null,i)}U(Ce,e)}function qe(t,e,n){e==Se?t.g.call(t.f,n):t.b&&t.b.call(t.f,n)}Ee.prototype.then=function(t,e,n){return De(this,v(t)?t:null,v(e)?e:null,n)},Ee.prototype.$goog_Thenable=!0,(n=Ee.prototype).na=function(t,e){return(t=ke(t,t,e)).c=!0,Re(this,t),this},n.o=function(t,e){return De(this,null,t,e)},n.cancel=function(t){if(this.a==Oe){var e=new He(t);me((function(){je(this,e)}),this)}},n.Zc=function(t){this.a=Oe,Le(this,Se,t)},n.$c=function(t){this.a=Oe,Le(this,Te,t)},n.fc=function(){for(var t;t=Ue(this);)Ve(this,t,this.a,this.h);this.i=!1};var Be=ye;function He(t){D.call(this,t)}function ze(){0!=Ke&&(We[y(this)]=this),this.xa=this.xa,this.oa=this.oa}T(He,D),He.prototype.name="cancel";var Ke=0,We={};function Ge(t){if(!t.xa&&(t.xa=!0,t.Da(),0!=Ke)){var e=y(t);if(0!=Ke&&t.oa&&0<t.oa.length)throw Error(t+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete We[e]}}ze.prototype.xa=!1,ze.prototype.Da=function(){if(this.oa)for(;this.oa.length;)this.oa.shift()()};var Qe=Object.freeze||function(t){return t},$e=!$t||9<=Number(ue),Ye=$t&&!ae("9"),Je=function(){if(!u.addEventListener||!Object.defineProperty)return!1;var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}});try{u.addEventListener("test",h,e),u.removeEventListener("test",h,e)}catch(n){}return t}();function Xe(t,e){this.type=t,this.b=this.target=e,this.defaultPrevented=!1}function Ze(t,e){if(Xe.call(this,t?t.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,t){var n=this.type=t.type,r=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:null;if(this.target=t.target||t.srcElement,this.b=e,e=t.relatedTarget){if(Xt){t:{try{Wt(e.nodeName);var i=!0;break t}catch(o){}i=!1}i||(e=null)}}else"mouseover"==n?e=t.fromElement:"mouseout"==n&&(e=t.toElement);this.relatedTarget=e,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0),this.button=t.button,this.key=t.key||"",this.ctrlKey=t.ctrlKey,this.altKey=t.altKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.pointerId=t.pointerId||0,this.pointerType="string"===typeof t.pointerType?t.pointerType:tn[t.pointerType]||"",this.a=t,t.defaultPrevented&&this.preventDefault()}}Xe.prototype.preventDefault=function(){this.defaultPrevented=!0},T(Ze,Xe);
2var tn=Qe({2:"touch",3:"pen",4:"mouse"});Ze.prototype.preventDefault=function(){Ze.$a.preventDefault.call(this);var t=this.a;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,Ye)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(e){}},Ze.prototype.g=function(){return this.a};var en="closure_listenable_"+(1e6*Math.random()|0),nn=0;function rn(t,e,n,r,i){this.listener=t,this.proxy=null,this.src=e,this.type=n,this.capture=!!r,this.Ua=i,this.key=++nn,this.va=this.Oa=!1}function on(t){t.va=!0,t.listener=null,t.proxy=null,t.src=null,t.Ua=null}function an(t){this.src=t,this.a={},this.b=0}function sn(t,e){var n=e.type;n in t.a&&Y(t.a[n],e)&&(on(e),0==t.a[n].length&&(delete t.a[n],t.b--))}function un(t,e,n,r){for(var i=0;i<t.length;++i){var o=t[i];if(!o.va&&o.listener==e&&o.capture==!!n&&o.Ua==r)return i}return-1}an.prototype.add=function(t,e,n,r,i){var o=t.toString();(t=this.a[o])||(t=this.a[o]=[],this.b++);var a=un(t,e,r,i);return-1<a?(e=t[a],n||(e.Oa=!1)):((e=new rn(e,this.src,o,!!r,i)).Oa=n,t.push(e)),e};var cn="closure_lm_"+(1e6*Math.random()|0),ln={};function fn(t,e,n,r,i){if(r&&r.once)pn(t,e,n,r,i);else if(Array.isArray(e))for(var o=0;o<e.length;o++)fn(t,e[o],n,r,i);else n=En(n),t&&t[en]?Sn(t,e,n,g(r)?!!r.capture:!!r,i):hn(t,e,n,!1,r,i)}function hn(t,e,n,r,i,o){if(!e)throw Error("Invalid event type");var a=g(i)?!!i.capture:!!i,s=wn(t);if(s||(t[cn]=s=new an(t)),!(n=s.add(e,n,r,a,o)).proxy){if(r=function(){var t=bn,e=$e?function(n){return t.call(e.src,e.listener,n)}:function(n){if(!(n=t.call(e.src,e.listener,n)))return n};return e}(),n.proxy=r,r.src=t,r.listener=n,t.addEventListener)Je||(i=a),void 0===i&&(i=!1),t.addEventListener(e.toString(),r,i);else if(t.attachEvent)t.attachEvent(gn(e.toString()),r);else{if(!t.addListener||!t.removeListener)throw Error("addEventListener and attachEvent are unavailable.");t.addListener(r)}0}}function pn(t,e,n,r,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)pn(t,e[o],n,r,i);else n=En(n),t&&t[en]?Tn(t,e,n,g(r)?!!r.capture:!!r,i):hn(t,e,n,!0,r,i)}function dn(t,e,n,r,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)dn(t,e[o],n,r,i);else r=g(r)?!!r.capture:!!r,n=En(n),t&&t[en]?(t=t.v,(e=String(e).toString())in t.a&&(-1<(n=un(o=t.a[e],n,r,i))&&(on(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete t.a[e],t.b--)))):t&&(t=wn(t))&&(e=t.a[e.toString()],t=-1,e&&(t=un(e,n,r,i)),(n=-1<t?e[t]:null)&&vn(n))}function vn(t){if("number"!==typeof t&&t&&!t.va){var e=t.src;if(e&&e[en])sn(e.v,t);else{var n=t.type,r=t.proxy;e.removeEventListener?e.removeEventListener(n,r,t.capture):e.detachEvent?e.detachEvent(gn(n),r):e.addListener&&e.removeListener&&e.removeListener(r),(n=wn(e))?(sn(n,t),0==n.b&&(n.src=null,e[cn]=null)):on(t)}}}function gn(t){return t in ln?ln[t]:ln[t]="on"+t}function yn(t,e,n,r){var i=!0;if((t=wn(t))&&(e=t.a[e.toString()]))for(e=e.concat(),t=0;t<e.length;t++){var o=e[t];o&&o.capture==n&&!o.va&&(o=mn(o,r),i=i&&!1!==o)}return i}function mn(t,e){var n=t.listener,r=t.Ua||t.src;return t.Oa&&vn(t),n.call(r,e)}function bn(t,e){if(t.va)return!0;if(!$e){if(!e)t:{e=["window","event"];for(var n=u,r=0;r<e.length;r++)if(null==(n=n[e[r]])){e=null;break t}e=n}if(e=new Ze(r=e,this),n=!0,!(0>r.keyCode||void 0!=r.returnValue)){t:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break t}catch(a){i=!0}(i||void 0==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=e.b;i;i=i.parentNode)r.push(i);for(t=t.type,i=r.length-1;0<=i;i--){e.b=r[i];var o=yn(r[i],t,!0,e);n=n&&o}for(i=0;i<r.length;i++)e.b=r[i],o=yn(r[i],t,!1,e),n=n&&o}return n}return mn(t,new Ze(e,this))}function wn(t){return(t=t[cn])instanceof an?t:null}var _n="__closure_events_fn_"+(1e9*Math.random()>>>0);function En(t){return v(t)?t:(t[_n]||(t[_n]=function(e){return t.handleEvent(e)}),t[_n])}function On(){ze.call(this),this.v=new an(this),this.$b=this,this.fb=null}function Sn(t,e,n,r,i){t.v.add(String(e),n,!1,r,i)}function Tn(t,e,n,r,i){t.v.add(String(e),n,!0,r,i)}function In(t,e,n,r){if(!(e=t.v.a[String(e)]))return!0;e=e.concat();for(var i=!0,o=0;o<e.length;++o){var a=e[o];if(a&&!a.va&&a.capture==n){var s=a.listener,u=a.Ua||a.src;a.Oa&&sn(t.v,a),i=!1!==s.call(u,r)&&i}}return i&&!r.defaultPrevented}function Cn(t,e,n){if(v(t))n&&(t=E(t,n));else{if(!t||"function"!=typeof t.handleEvent)throw Error("Invalid listener argument");t=E(t.handleEvent,t)}return 2147483647<Number(e)?-1:u.setTimeout(t,e||0)}function kn(t){var e=null;return new Ee((function(n,r){-1==(e=Cn((function(){n(void 0)}),t))&&r(Error("Failed to schedule timer."))})).o((function(t){throw u.clearTimeout(e),t}))}function Pn(t){if(t.V&&"function"==typeof t.V)return t.V();if("string"===typeof t)return t.split("");
2if(d(t)){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e}for(r in e=[],n=0,t)e[n++]=t[r];return e}function An(t){if(t.Y&&"function"==typeof t.Y)return t.Y();if(!t.V||"function"!=typeof t.V){if(d(t)||"string"===typeof t){var e=[];t=t.length;for(var n=0;n<t;n++)e.push(n);return e}for(var r in e=[],n=0,t)e[n++]=r;return e}}function Nn(t,e){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(t)if(t instanceof Nn)for(n=t.Y(),r=0;r<n.length;r++)this.set(n[r],t.get(n[r]));else for(r in t)this.set(r,t[r])}function xn(t){if(t.c!=t.a.length){for(var e=0,n=0;e<t.a.length;){var r=t.a[e];jn(t.b,r)&&(t.a[n++]=r),e++}t.a.length=n}if(t.c!=t.a.length){var i={};for(n=e=0;e<t.a.length;)jn(i,r=t.a[e])||(t.a[n++]=r,i[r]=1),e++;t.a.length=n}}function jn(t,e){return Object.prototype.hasOwnProperty.call(t,e)}T(On,ze),On.prototype[en]=!0,On.prototype.addEventListener=function(t,e,n,r){fn(this,t,e,n,r)},On.prototype.removeEventListener=function(t,e,n,r){dn(this,t,e,n,r)},On.prototype.dispatchEvent=function(t){var e,n=this.fb;if(n)for(e=[];n;n=n.fb)e.push(n);n=this.$b;var r=t.type||t;if("string"===typeof t)t=new Xe(t,n);else if(t instanceof Xe)t.target=t.target||n;else{var i=t;mt(t=new Xe(r,n),i)}if(i=!0,e)for(var o=e.length-1;0<=o;o--){var a=t.b=e[o];i=In(a,r,!0,t)&&i}if(i=In(a=t.b=n,r,!0,t)&&i,i=In(a,r,!1,t)&&i,e)for(o=0;o<e.length;o++)i=In(a=t.b=e[o],r,!1,t)&&i;return i},On.prototype.Da=function(){if(On.$a.Da.call(this),this.v){var t,e=this.v;for(t in e.a){for(var n=e.a[t],r=0;r<n.length;r++)on(n[r]);delete e.a[t],e.b--}}this.fb=null},(n=Nn.prototype).V=function(){xn(this);for(var t=[],e=0;e<this.a.length;e++)t.push(this.b[this.a[e]]);return t},n.Y=function(){return xn(this),this.a.concat()},n.clear=function(){this.b={},this.c=this.a.length=0},n.get=function(t,e){return jn(this.b,t)?this.b[t]:e},n.set=function(t,e){jn(this.b,t)||(this.c++,this.a.push(t)),this.b[t]=e},n.forEach=function(t,e){for(var n=this.Y(),r=0;r<n.length;r++){var i=n[r],o=this.get(i);t.call(e,o,i,this)}};var Rn=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Dn(t,e){var n;this.a=this.l=this.f="",this.g=null,this.i=this.c="",this.h=!1,t instanceof Dn?(this.h=void 0!==e?e:t.h,Ln(this,t.f),this.l=t.l,this.a=t.a,Mn(this,t.g),this.c=t.c,Fn(this,rr(t.b)),this.i=t.i):t&&(n=String(t).match(Rn))?(this.h=!!e,Ln(this,n[1]||"",!0),this.l=Hn(n[2]||""),this.a=Hn(n[3]||"",!0),Mn(this,n[4]),this.c=Hn(n[5]||"",!0),Fn(this,n[6]||"",!0),this.i=Hn(n[7]||"")):(this.h=!!e,this.b=new Jn(null,this.h))}function Ln(t,e,n){t.f=n?Hn(e,!0):e,t.f&&(t.f=t.f.replace(/:$/,""))}function Mn(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.g=e}else t.g=null}function Fn(t,e,n){e instanceof Jn?(t.b=e,function(t,e){e&&!t.f&&(Xn(t),t.c=null,t.a.forEach((function(t,e){var n=e.toLowerCase();e!=n&&(tr(this,e),nr(this,n,t))}),t)),t.f=e}(t.b,t.h)):(n||(e=zn(e,$n)),t.b=new Jn(e,t.h))}function Un(t,e,n){t.b.set(e,n)}function Vn(t,e){return t.b.get(e)}function qn(t){return t instanceof Dn?new Dn(t):new Dn(t,void 0)}function Bn(t,e,n,r){var i=new Dn(null,void 0);return t&&Ln(i,t),e&&(i.a=e),n&&Mn(i,n),r&&(i.c=r),i}function Hn(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function zn(t,e,n){return"string"===typeof t?(t=encodeURI(t).replace(e,Kn),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function Kn(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Dn.prototype.toString=function(){var t=[],e=this.f;e&&t.push(zn(e,Wn,!0),":");var n=this.a;return(n||"file"==e)&&(t.push("//"),(e=this.l)&&t.push(zn(e,Wn,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.g)&&t.push(":",String(n))),(n=this.c)&&(this.a&&"/"!=n.charAt(0)&&t.push("/"),t.push(zn(n,"/"==n.charAt(0)?Qn:Gn,!0))),(n=this.b.toString())&&t.push("?",n),(n=this.i)&&t.push("#",zn(n,Yn)),t.join("")},Dn.prototype.resolve=function(t){var e=new Dn(this),n=!!t.f;n?Ln(e,t.f):n=!!t.l,n?e.l=t.l:n=!!t.a,n?e.a=t.a:n=null!=t.g;var r=t.c;if(n)Mn(e,t.g);else if(n=!!t.c){if("/"!=r.charAt(0))if(this.a&&!this.c)r="/"+r;else{var i=e.c.lastIndexOf("/");-1!=i&&(r=e.c.substr(0,i+1)+r)}if(".."==(i=r)||"."==i)r="";else if(ct(i,"./")||ct(i,"/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var o=[],a=0;a<i.length;){var s=i[a++];"."==s?r&&a==i.length&&o.push(""):".."==s?((1<o.length||1==o.length&&""!=o[0])&&o.pop(),r&&a==i.length&&o.push("")):(o.push(s),r=!0)}r=o.join("/")}else r=i}return n?e.c=r:n=""!==t.b.toString(),n?Fn(e,rr(t.b)):n=!!t.i,n&&(e.i=t.i),e};var Wn=/[#\/\?@]/g,Gn=/[#\?:]/g,Qn=/[#\?]/g,$n=/[#\?@]/g,Yn=/#/g;function Jn(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function Xn(t){t.a||(t.a=new Nn,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];e(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(t.c,(function(e,n){t.add(decodeURIComponent(e.replace(/\+/g," ")),n)})))}function Zn(t){var e=An(t);
2if("undefined"==typeof e)throw Error("Keys are undefined");var n=new Jn(null,void 0);t=Pn(t);for(var r=0;r<e.length;r++){var i=e[r],o=t[r];Array.isArray(o)?nr(n,i,o):n.add(i,o)}return n}function tr(t,e){Xn(t),e=ir(t,e),jn(t.a.b,e)&&(t.c=null,t.b-=t.a.get(e).length,jn((t=t.a).b,e)&&(delete t.b[e],t.c--,t.a.length>2*t.c&&xn(t)))}function er(t,e){return Xn(t),e=ir(t,e),jn(t.a.b,e)}function nr(t,e,n){tr(t,e),0<n.length&&(t.c=null,t.a.set(ir(t,e),Z(n)),t.b+=n.length)}function rr(t){var e=new Jn;return e.c=t.c,t.a&&(e.a=new Nn(t.a),e.b=t.b),e}function ir(t,e){return e=String(e),t.f&&(e=e.toLowerCase()),e}function or(t){var e=[];return sr(new ar,t,e),e.join("")}function ar(){}function sr(t,e,n){if(null==e)n.push("null");else{if("object"==typeof e){if(Array.isArray(e)){var r=e;e=r.length,n.push("[");for(var i="",o=0;o<e;o++)n.push(i),sr(t,r[o],n),i=",";return void n.push("]")}if(!(e instanceof String||e instanceof Number||e instanceof Boolean)){for(r in n.push("{"),i="",e)Object.prototype.hasOwnProperty.call(e,r)&&("function"!=typeof(o=e[r])&&(n.push(i),lr(r,n),n.push(":"),sr(t,o,n),i=","));return void n.push("}")}e=e.valueOf()}switch(typeof e){case"string":lr(e,n);break;case"number":n.push(isFinite(e)&&!isNaN(e)?String(e):"null");break;case"boolean":n.push(String(e));break;case"function":n.push("null");break;default:throw Error("Unknown type: "+typeof e)}}}(n=Jn.prototype).add=function(t,e){Xn(this),this.c=null,t=ir(this,t);var n=this.a.get(t);return n||this.a.set(t,n=[]),n.push(e),this.b+=1,this},n.clear=function(){this.a=this.c=null,this.b=0},n.forEach=function(t,e){Xn(this),this.a.forEach((function(n,r){K(n,(function(n){t.call(e,n,r,this)}),this)}),this)},n.Y=function(){Xn(this);for(var t=this.a.V(),e=this.a.Y(),n=[],r=0;r<e.length;r++)for(var i=t[r],o=0;o<i.length;o++)n.push(e[r]);return n},n.V=function(t){Xn(this);var e=[];if("string"===typeof t)er(this,t)&&(e=X(e,this.a.get(ir(this,t))));else{t=this.a.V();for(var n=0;n<t.length;n++)e=X(e,t[n])}return e},n.set=function(t,e){return Xn(this),this.c=null,er(this,t=ir(this,t))&&(this.b-=this.a.get(t).length),this.a.set(t,[e]),this.b+=1,this},n.get=function(t,e){return t&&0<(t=this.V(t)).length?String(t[0]):e},n.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var t=[],e=this.a.Y(),n=0;n<e.length;n++){var r=e[n],i=encodeURIComponent(String(r));r=this.V(r);for(var o=0;o<r.length;o++){var a=i;""!==r[o]&&(a+="="+encodeURIComponent(String(r[o]))),t.push(a)}}return this.c=t.join("&")};var ur={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},cr=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function lr(t,e){e.push('"',t.replace(cr,(function(t){var e=ur[t];return e||(e="\\u"+(65536|t.charCodeAt(0)).toString(16).substr(1),ur[t]=e),e})),'"')}function fr(){var t=Nr();return $t&&!!ue&&11==ue||/Edge\/\d+/.test(t)}function hr(){return u.window&&u.window.location.href||self&&self.location&&self.location.href||""}function pr(t,e){e=e||u.window;var n="about:blank";t&&(n=jt(Mt(t)||Vt)),e.location.href=n}function dr(t,e){var n,r=[];for(n in t)n in e?typeof t[n]!=typeof e[n]?r.push(n):"object"==typeof t[n]&&null!=t[n]&&null!=e[n]?0<dr(t[n],e[n]).length&&r.push(n):t[n]!==e[n]&&r.push(n):r.push(n);for(n in e)n in t||r.push(n);return r}function vr(t){return!!((t=(t||Nr()).toLowerCase()).match(/android/)||t.match(/webos/)||t.match(/iphone|ipad|ipod/)||t.match(/blackberry/)||t.match(/windows phone/)||t.match(/iemobile/))}function gr(t){t=t||u.window;try{t.close()}catch(e){}}function yr(t,e,n){var r=Math.floor(1e9*Math.random()).toString();e=e||500,n=n||600;var i=(window.screen.availHeight-n)/2,o=(window.screen.availWidth-e)/2;for(a in e={width:e,height:n,top:0<i?i:0,left:0<o?o:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=Nr().toLowerCase(),r&&(e.target=r,ct(n,"crios/")&&(e.target="_blank")),kr(Nr())==Ir&&(t=t||"http://localhost",e.scrollbars=!0),n=t||"",(t=e)||(t={}),r=window,e=n instanceof xt?n:Mt("undefined"!=typeof n.href?n.href:String(n))||Vt,n=t.target||n.target,i=[],t)switch(a){case"width":case"height":case"top":case"left":i.push(a+"="+t[a]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(a+"="+(t[a]?1:0))}var a=i.join(",");if((pt("iPhone")&&!pt("iPod")&&!pt("iPad")||pt("iPad")||pt("iPod"))&&r.navigator&&r.navigator.standalone&&n&&"_self"!=n?(bt(a=ge(document,"A"),"HTMLAnchorElement"),e=e instanceof xt?e:Ft(e),a.href=jt(e),a.setAttribute("target",n),t.noreferrer&&a.setAttribute("rel","noreferrer"),(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,r,1),a.dispatchEvent(t),a={}):t.noreferrer?(a=Ht("",r,n,a),t=jt(e),a&&(Jt&&ct(t,";")&&(t="'"+t.replace(/'/g,"%27")+"'"),a.opener=null,t='<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+Kt(t)+'">
2',t=new qt(t=(r=Tt())?r.createHTML(t):t,null,Bt),r=a.document)&&(r.write(function(t){return t instanceof qt&&t.constructor===qt?t.a:(M("expected object of type SafeHtml, got '"+t+"' of type "+p(t)),"type_error:SafeHtml")}(t)),r.close())):(a=Ht(e,r,n,a))&&t.noopener&&(a.opener=null),a)try{a.focus()}catch(s){}return a}var mr=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,br=/^[^@]+@[^@]+$/;function wr(){var t=null;return new Ee((function(e){"complete"==u.document.readyState?e():(t=function(){e()},pn(window,"load",t))})).o((function(e){throw dn(window,"load",t),e}))}function _r(t){return t=t||Nr(),!("file:"!==Lr()&&"ionic:"!==Lr()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function Er(){var t=u.window;try{return!(!t||t==t.top)}catch(e){return!1}}function Or(){return"undefined"!==typeof u.WorkerGlobalScope&&"function"===typeof u.importScripts}function Sr(){return e.a.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":e.a.INTERNAL.hasOwnProperty("node")?"Node":Or()?"Worker":"Browser"}function Tr(){var t=Sr();return"ReactNative"===t||"Node"===t}var Ir="Firefox",Cr="Chrome";function kr(t){var e=t.toLowerCase();return ct(e,"opera/")||ct(e,"opr/")||ct(e,"opios/")?"Opera":ct(e,"iemobile")?"IEMobile":ct(e,"msie")||ct(e,"trident/")?"IE":ct(e,"edge/")?"Edge":ct(e,"firefox/")?Ir:ct(e,"silk/")?"Silk":ct(e,"blackberry")?"Blackberry":ct(e,"webos")?"Webos":!ct(e,"safari/")||ct(e,"chrome/")||ct(e,"crios/")||ct(e,"android")?!ct(e,"chrome/")&&!ct(e,"crios/")||ct(e,"edge/")?ct(e,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":Cr:"Safari"}var Pr={ld:"FirebaseCore-web",nd:"FirebaseUI-web"};function Ar(t,e){e=e||[];var n,r=[],i={};for(n in Pr)i[Pr[n]]=!0;for(n=0;n<e.length;n++)"undefined"!==typeof i[e[n]]&&(delete i[e[n]],r.push(e[n]));return r.sort(),(e=r).length||(e=["FirebaseCore-web"]),"Browser"===(r=Sr())?r=kr(i=Nr()):"Worker"===r&&(r=kr(i=Nr())+"-"+r),r+"/JsCore/"+t+"/"+e.join(",")}function Nr(){return u.navigator&&u.navigator.userAgent||""}function xr(t,e){t=t.split("."),e=e||u;for(var n=0;n<t.length&&"object"==typeof e&&null!=e;n++)e=e[t[n]];return n!=t.length&&(e=void 0),e}function jr(){try{var t=u.localStorage,e=qr();if(t)return t.setItem(e,"1"),t.removeItem(e),!fr()||!!u.indexedDB}catch(n){return Or()&&!!u.indexedDB}return!1}function Rr(){return(Dr()||"chrome-extension:"===Lr()||_r())&&!Tr()&&jr()&&!Or()}function Dr(){return"http:"===Lr()||"https:"===Lr()}function Lr(){return u.location&&u.location.protocol||null}function Mr(t){return!vr(t=t||Nr())&&kr(t)!=Ir}function Fr(t){return"undefined"===typeof t?null:or(t)}function Ur(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&null!==t[e]&&void 0!==t[e]&&(n[e]=t[e]);return n}function Vr(t){if(null!==t)return JSON.parse(t)}function qr(t){return t||Math.floor(1e9*Math.random()).toString()}function Br(t){return"Safari"!=kr(t=t||Nr())&&!t.toLowerCase().match(/iphone|ipad|ipod/)}function Hr(){var t=u.___jsl;if(t&&t.H)for(var e in t.H)if(t.H[e].r=t.H[e].r||[],t.H[e].L=t.H[e].L||[],t.H[e].r=t.H[e].L.concat(),t.CP)for(var n=0;n<t.CP.length;n++)t.CP[n]=null}function zr(t,e){if(t>e)throw Error("Short delay should be less than long delay!");this.a=t,this.c=e,t=Nr(),e=Sr(),this.b=vr(t)||"ReactNative"===e}function Kr(){var t=u.document;return!t||"undefined"===typeof t.visibilityState||"visible"==t.visibilityState}function Wr(t){try{var e=new Date(parseInt(t,10));if(!isNaN(e.getTime())&&!/[^0-9]/.test(t))return e.toUTCString()}catch(n){}return null}function Gr(){return!(!xr("fireauth.oauthhelper",u)&&!xr("fireauth.iframe",u))}zr.prototype.get=function(){var t=u.navigator;return!t||"boolean"!==typeof t.onLine||!Dr()&&"chrome-extension:"!==Lr()&&"undefined"===typeof t.connection||t.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};var Qr,$r={};function Yr(t){$r[t]||($r[t]=!0,"undefined"!==typeof console&&"function"===typeof console.warn&&console.warn(t))}try{var Jr={};Object.defineProperty(Jr,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Jr,"abcd",{configurable:!0,enumerable:!0,value:2}),Qr=2==Jr.abcd}catch(ha){Qr=!1}function Xr(t,e,n){Qr?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,value:n}):t[e]=n}function Zr(t,e){if(e)for(var n in e)e.hasOwnProperty(n)&&Xr(t,n,e[n])}function ti(t){var e={};return Zr(e,t),e}function ei(t){var e=t;if("object"==typeof t&&null!=t)for(var n in e="length"in t?[]:{},t)Xr(e,n,ei(t[n]));return e}function ni(t){var e=t&&(t[si]?"phone":null);if(!(e&&t&&t[ai]))throw new C("internal-error","Internal assert: invalid MultiFactorInfo object");Xr(this,"uid",t[ai]),Xr(this,"displayName",t[ii]||null);var n=null;t[oi]&&(n=new Date(t[oi]).toUTCString()),Xr(this,"enrollmentTime",n),Xr(this,"factorId",e)}function ri(t){try{var e=new ui(t)}catch(n){e=null}return e}ni.prototype.w=function(){return{uid:this.uid,displayName:this.displayName,factorId:this.factorId,enrollmentTime:this.enrollmentTime}};var ii="displayName",oi="enrolledAt",ai="mfaEnrollmentId",si="phoneInfo";function ui(t){ni.call(this,t),Xr(this,"phoneNumber",t[si])}function ci(t){var e={},n=t[pi],r=t[vi],i=t[gi];if(t=ri(t[di]),!i||i!=fi&&i!=hi&&!n||i==hi&&!r||i==li&&!t)throw Error("Invalid checkActionCode response!");
2i==hi?(e[mi]=n||null,e[wi]=n||null,e[yi]=r):(e[mi]=r||null,e[wi]=r||null,e[yi]=n||null),e[bi]=t||null,Xr(this,Ei,i),Xr(this,_i,ei(e))}T(ui,ni),ui.prototype.w=function(){var t=ui.$a.w.call(this);return t.phoneNumber=this.phoneNumber,t};var li="REVERT_SECOND_FACTOR_ADDITION",fi="EMAIL_SIGNIN",hi="VERIFY_AND_CHANGE_EMAIL",pi="email",di="mfaInfo",vi="newEmail",gi="requestType",yi="email",mi="fromEmail",bi="multiFactorInfo",wi="previousEmail",_i="data",Ei="operation";function Oi(t){var e=Vn(t=qn(t),Si)||null,n=Vn(t,Ti)||null,r=Vn(t,ki)||null;if(r=r&&Ai[r]||null,!e||!n||!r)throw new C("argument-error",Si+", "+Ti+"and "+ki+" are required in a valid action code URL.");Zr(this,{apiKey:e,operation:r,code:n,continueUrl:Vn(t,Ii)||null,languageCode:Vn(t,Ci)||null,tenantId:Vn(t,Pi)||null})}var Si="apiKey",Ti="oobCode",Ii="continueUrl",Ci="languageCode",ki="mode",Pi="tenantId",Ai={recoverEmail:"RECOVER_EMAIL",resetPassword:"PASSWORD_RESET",revertSecondFactorAddition:li,signIn:fi,verifyAndChangeEmail:hi,verifyEmail:"VERIFY_EMAIL"};function Ni(t){try{return new Oi(t)}catch(e){return null}}function xi(t){var e=t[Mi];if("undefined"===typeof e)throw new C("missing-continue-uri");if("string"!==typeof e||"string"===typeof e&&!e.length)throw new C("invalid-continue-uri");this.i=e,this.b=this.a=null,this.g=!1;var n=t[ji];if(n&&"object"===typeof n){e=n[Vi];var r=n[Fi];if(n=n[Ui],"string"===typeof e&&e.length){if(this.a=e,"undefined"!==typeof r&&"boolean"!==typeof r)throw new C("argument-error",Fi+" property must be a boolean when specified.");if(this.g=!!r,"undefined"!==typeof n&&("string"!==typeof n||"string"===typeof n&&!n.length))throw new C("argument-error",Ui+" property must be a non empty string when specified.");this.b=n||null}else{if("undefined"!==typeof e)throw new C("argument-error",Vi+" property must be a non empty string when specified.");if("undefined"!==typeof r||"undefined"!==typeof n)throw new C("missing-android-pkg-name")}}else if("undefined"!==typeof n)throw new C("argument-error",ji+" property must be a non null object when specified.");if(this.f=null,(e=t[Li])&&"object"===typeof e){if("string"===typeof(e=e[qi])&&e.length)this.f=e;else if("undefined"!==typeof e)throw new C("argument-error",qi+" property must be a non empty string when specified.")}else if("undefined"!==typeof e)throw new C("argument-error",Li+" property must be a non null object when specified.");if("undefined"!==typeof(e=t[Di])&&"boolean"!==typeof e)throw new C("argument-error",Di+" property must be a boolean when specified.");if(this.c=!!e,"undefined"!==typeof(t=t[Ri])&&("string"!==typeof t||"string"===typeof t&&!t.length))throw new C("argument-error",Ri+" property must be a non empty string when specified.");this.h=t||null}var ji="android",Ri="dynamicLinkDomain",Di="handleCodeInApp",Li="iOS",Mi="url",Fi="installApp",Ui="minimumVersion",Vi="packageName",qi="bundleId";function Bi(t){var e={};for(var n in e.continueUrl=t.i,e.canHandleCodeInApp=t.c,(e.androidPackageName=t.a)&&(e.androidMinimumVersion=t.b,e.androidInstallApp=t.g),e.iOSBundleId=t.f,e.dynamicLinkDomain=t.h,e)null===e[n]&&delete e[n];return e}var Hi=null;function zi(t){var e="";return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=Hi[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}!function(){if(!Hi){Hi={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++)for(var r=t.concat(e[n].split("")),i=0;i<r.length;i++){var o=r[i];void 0===Hi[o]&&(Hi[o]=i)}}}();for(var r=0;;){var i=n(-1),o=n(0),a=n(64),s=n(64);if(64===s&&-1===i)break;e(i<<2|o>>4),64!=a&&(e(o<<4&240|a>>2),64!=s&&e(a<<6&192|s))}}(t,(function(t){e+=String.fromCharCode(t)})),e}function Ki(t){var e=Gi(t);if(!(e&&e.sub&&e.iss&&e.aud&&e.exp))throw Error("Invalid JWT");this.i=t,this.a=e.exp,this.h=e.sub,t=Date.now()/1e3,this.g=e.iat||(t>this.a?this.a:t),this.b=e.provider_id||e.firebase&&e.firebase.sign_in_provider||null,this.f=e.firebase&&e.firebase.tenant||null,this.c=!!e.is_anonymous||"anonymous"==this.b}function Wi(t){try{return new Ki(t)}catch(e){return null}}function Gi(t){if(!t)return null;if(3!=(t=t.split(".")).length)return null;for(var e=(4-(t=t[1]).length%4)%4,n=0;n<e;n++)t+=".";try{return JSON.parse(zi(t))}catch(r){}return null}Ki.prototype.S=function(){return this.f},Ki.prototype.l=function(){return this.c},Ki.prototype.toString=function(){return this.i};var Qi="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),$i=["client_id","response_type","scope","redirect_uri","state"],Yi={md:{Ja:"locale",ua:700,ta:600,fa:"facebook.com",Wa:$i},od:{Ja:null,ua:500,ta:750,fa:"github.com",Wa:$i},pd:{Ja:"hl",ua:515,ta:680,fa:"google.com",Wa:$i},vd:{Ja:"lang",ua:485,ta:705,fa:"twitter.com",Wa:Qi},jd:{Ja:"locale",ua:640,ta:600,fa:"apple.com",Wa:[]}};function Ji(t){for(var e in Yi)if(Yi[e].fa==t)return Yi[e];return null}function Xi(t){var e={};e["facebook.com"]=ro,e["google.com"]=oo,e["github.com"]=io,e["twitter.com"]=ao;var n=t&&t[to];try{if(n)return e[n]?new e[n](t):new no(t);if("undefined"!==typeof t[Zi])return new eo(t)}catch(r){}return null}var Zi="idToken",to="providerId";function eo(t){var e=t[to];if(!e&&t[Zi]){var n=Wi(t[Zi]);n&&n.b&&(e=n.b)}if(!e)throw Error("Invalid additional user info!");"anonymous"!=e&&"custom"!=e||(e=null),n=!1,"undefined"!==typeof t.isNewUser?n=!!t.
2isNewUser:"identitytoolkit#SignupNewUserResponse"===t.kind&&(n=!0),Xr(this,"providerId",e),Xr(this,"isNewUser",n)}function no(t){eo.call(this,t),Xr(this,"profile",ei((t=Vr(t.rawUserInfo||"{}"))||{}))}function ro(t){if(no.call(this,t),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function io(t){if(no.call(this,t),"github.com"!=this.providerId)throw Error("Invalid provider ID!");Xr(this,"username",this.profile&&this.profile.login||null)}function oo(t){if(no.call(this,t),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function ao(t){if(no.call(this,t),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");Xr(this,"username",t.screenName||null)}function so(t){var e=qn(t),n=Vn(e,"link"),r=Vn(qn(n),"link");return e=Vn(e,"deep_link_id"),Vn(qn(e),"link")||e||r||n||t}function uo(t,e){if(!t&&!e)throw new C("internal-error","Internal assert: no raw session string available");if(t&&e)throw new C("internal-error","Internal assert: unable to determine the session type");this.a=t||null,this.b=e||null,this.type=this.a?co:lo}T(no,eo),T(ro,no),T(io,no),T(oo,no),T(ao,no);var co="enroll",lo="signin";function fo(){}function ho(t,e){return t.then((function(t){if(t[ns]){var n=Wi(t[ns]);if(!n||e!=n.h)throw new C("user-mismatch");return t}throw new C("user-mismatch")})).o((function(t){throw t&&t.code&&t.code==A+"user-not-found"?new C("user-mismatch"):t}))}function po(t,e){if(!e)throw new C("internal-error","failed to construct a credential");this.a=e,Xr(this,"providerId",t),Xr(this,"signInMethod",t)}function vo(t){return{pendingToken:t.a,requestUri:"http://localhost"}}function go(t){if(t&&t.providerId&&t.signInMethod&&0==t.providerId.indexOf("saml.")&&t.pendingToken)try{return new po(t.providerId,t.pendingToken)}catch(e){}return null}function yo(t,e,n){if(this.a=null,e.idToken||e.accessToken)e.idToken&&Xr(this,"idToken",e.idToken),e.accessToken&&Xr(this,"accessToken",e.accessToken),e.nonce&&!e.pendingToken&&Xr(this,"nonce",e.nonce),e.pendingToken&&(this.a=e.pendingToken);else{if(!e.oauthToken||!e.oauthTokenSecret)throw new C("internal-error","failed to construct a credential");Xr(this,"accessToken",e.oauthToken),Xr(this,"secret",e.oauthTokenSecret)}Xr(this,"providerId",t),Xr(this,"signInMethod",n)}function mo(t){var e={};return t.idToken&&(e.id_token=t.idToken),t.accessToken&&(e.access_token=t.accessToken),t.secret&&(e.oauth_token_secret=t.secret),e.providerId=t.providerId,t.nonce&&!t.a&&(e.nonce=t.nonce),e={postBody:Zn(e).toString(),requestUri:"http://localhost"},t.a&&(delete e.postBody,e.pendingToken=t.a),e}function bo(t){if(t&&t.providerId&&t.signInMethod){var e={idToken:t.oauthIdToken,accessToken:t.oauthTokenSecret?null:t.oauthAccessToken,oauthTokenSecret:t.oauthTokenSecret,oauthToken:t.oauthTokenSecret&&t.oauthAccessToken,nonce:t.nonce,pendingToken:t.pendingToken};try{return new yo(t.providerId,e,t.signInMethod)}catch(n){}}return null}function wo(t,e){this.Pc=e||[],Zr(this,{providerId:t,isOAuthProvider:!0}),this.Hb={},this.ob=(Ji(t)||{}).Ja||null,this.nb=null}function _o(t){if("string"!==typeof t||0!=t.indexOf("saml."))throw new C("argument-error",'SAML provider IDs must be prefixed with "saml."');wo.call(this,t,[])}function Eo(t){wo.call(this,t,$i),this.a=[]}function Oo(){Eo.call(this,"facebook.com")}function So(t){if(!t)throw new C("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return g(t)&&(e=t.accessToken),(new Oo).credential({accessToken:e})}function To(){Eo.call(this,"github.com")}function Io(t){if(!t)throw new C("argument-error","credential failed: expected 1 argument (the OAuth access token).");var e=t;return g(t)&&(e=t.accessToken),(new To).credential({accessToken:e})}function Co(){Eo.call(this,"google.com"),this.Ca("profile")}function ko(t,e){var n=t;return g(t)&&(n=t.idToken,e=t.accessToken),(new Co).credential({idToken:n,accessToken:e})}function Po(){wo.call(this,"twitter.com",Qi)}function Ao(t,e){var n=t;if(g(n)||(n={oauthToken:t,oauthTokenSecret:e}),!n.oauthToken||!n.oauthTokenSecret)throw new C("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new yo("twitter.com",n,"twitter.com")}function No(t,e,n){this.a=t,this.f=e,Xr(this,"providerId","password"),Xr(this,"signInMethod",n===jo.EMAIL_LINK_SIGN_IN_METHOD?jo.EMAIL_LINK_SIGN_IN_METHOD:jo.EMAIL_PASSWORD_SIGN_IN_METHOD)}function xo(t){return t&&t.email&&t.password?new No(t.email,t.password,t.signInMethod):null}function jo(){Zr(this,{providerId:"password",isOAuthProvider:!1})}function Ro(t,e){if(!(e=Do(e)))throw new C("argument-error","Invalid email link!");return new No(t,e.code,jo.EMAIL_LINK_SIGN_IN_METHOD)}function Do(t){return(t=Ni(t=so(t)))&&t.operation===fi?t:null}function Lo(t){if(!(t.cb&&t.bb||t.La&&t.ea))throw new C("internal-error");this.a=t,Xr(this,"providerId","phone"),this.fa="phone",Xr(this,"signInMethod","phone")}function Mo(t){if(t&&"phone"===t.providerId&&(t.verificationId&&t.verificationCode||t.temporaryProof&&t.phoneNumber)){var e={};return K(["verificationId","verificationCode","temporaryProof","phoneNumber"],(function(n){t[n]&&(e[n]=t[n])})),new Lo(e)}return null}function Fo(t){return t.a.La&&t.a.ea?{temporaryProof:t.a.La,phoneNumber:t.a.ea}:{sessionInfo:t.a.cb,code:t.a.bb}}function Uo(t){try{this.a=t||e.a.auth()}catch(n){throw new C("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Zr(this,{providerId:"phone",isOAuthProvider:!1})}function Vo(t,e){if(!t)throw new C("missing-verification-id");if(!e)throw new C("missing-verification-code");return new Lo({cb:t,bb:e})}function qo(t){if(t.temporaryProof&&t.phoneNumber)return new Lo({La:t.temporaryProof,ea:t.phoneNumber});var e=t&&t.providerId;if(!e||"password"===e)return null;var n=t&&t.oauthAccessToken,r=t&&t.oauthTokenSecret,i=t&&t.nonce,o=t&&t.oauthIdToken,a=t&&t.pendingToken;try{switch(e){case"google.com":return ko(o,n);case"facebook.com":return So(n);case"github.com":return Io(n);case"twitter.com":return Ao(n,r);default:return n||r||o||a?a?0==e.indexOf("saml.")?new po(e,a):new yo(e,{pendingToken:a,idToken:t.oauthIdToken,accessToken:t.oauthAccessToken},e):new Eo(e).credential({idToken:o,accessToken:n,rawNonce:i}):null}}catch(s){return null}}function Bo(t){if(!t.isOAuthProvider)throw new C("invalid-oauth-provider")}function Ho(t,e,n,r,i,o,a){if(this.c=t,this.b=e||null,this.g=n||null,this.f=r||null,this.h=o||null,this.i=a||null,this.a=i||null,!this.g&&!this.a)throw new C("invalid-auth-event");
2if(this.g&&this.a)throw new C("invalid-auth-event");if(this.g&&!this.f)throw new C("invalid-auth-event")}function zo(t){return(t=t||{}).type?new Ho(t.type,t.eventId,t.urlResponse,t.sessionId,t.error&&k(t.error),t.postBody,t.tenantId):null}function Ko(){this.b=null,this.a=[]}uo.prototype.Ha=function(){return this.a?Pe(this.a):Pe(this.b)},uo.prototype.w=function(){return this.type==co?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}},fo.prototype.ja=function(){},fo.prototype.b=function(){},fo.prototype.c=function(){},fo.prototype.w=function(){},po.prototype.ja=function(t){return Ss(t,vo(this))},po.prototype.b=function(t,e){var n=vo(this);return n.idToken=e,Ts(t,n)},po.prototype.c=function(t,e){return ho(Is(t,vo(this)),e)},po.prototype.w=function(){return{providerId:this.providerId,signInMethod:this.signInMethod,pendingToken:this.a}},yo.prototype.ja=function(t){return Ss(t,mo(this))},yo.prototype.b=function(t,e){var n=mo(this);return n.idToken=e,Ts(t,n)},yo.prototype.c=function(t,e){return ho(Is(t,mo(this)),e)},yo.prototype.w=function(){var t={providerId:this.providerId,sign
2InMethod:this.signInMethod};return this.idToken&&(t.oauthIdToken=this.idToken),this.accessToken&&(t.oauthAccessToken=this.accessToken),this.secret&&(t.oauthTokenSecret=this.secret),this.nonce&&(t.nonce=this.nonce),this.a&&(t.pendingToken=this.a),t},wo.prototype.Ka=function(t){return this.Hb=gt(t),this},T(_o,wo),T(Eo,wo),Eo.prototype.Ca=function(t){return $(this.a,t)||this.a.push(t),this},Eo.prototype.Pb=function(){return Z(this.a)},Eo.prototype.credential=function(t,e){var n;if(!(n=g(t)?{idToken:t.idToken||null,accessToken:t.accessToken||null,nonce:t.rawNonce||null}:{idToken:t||null,accessToken:e||null}).idToken&&!n.accessToken)throw new C("argument-error","credential failed: must provide the ID token and/or the access token.");return new yo(this.providerId,n,this.providerId)},T(Oo,Eo),Xr(Oo,"PROVIDER_ID","facebook.com"),Xr(Oo,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),T(To,Eo),Xr(To,"PROVIDER_ID","github.com"),Xr(To,"GITHUB_SIGN_IN_METHOD","github.com"),T(Co,Eo),Xr(Co,"PROVIDER_ID","google.com"),Xr(Co,"GOOGLE_SIGN_IN_METHOD","google.com"),T(Po,wo),Xr(Po,"PROVIDER_ID","twitter.com"),Xr(Po,"TWITTER_SIGN_IN_METHOD","twitter.com"),No.prototype.ja=function(t){return this.signInMethod==jo.EMAIL_LINK_SIGN_IN_METHOD?su(t,Rs,{email:this.a,oobCode:this.f}):su(t,nu,{email:this.a,password:this.f})},No.prototype.b=function(t,e){return this.signInMethod==jo.EMAIL_LINK_SIGN_IN_METHOD?su(t,Ds,{idToken:e,email:this.a,oobCode:this.f}):su(t,Qs,{idToken:e,email:this.a,password:this.f})},No.prototype.c=function(t,e){return ho(this.ja(t),e)},No.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}},Zr(jo,{PROVIDER_ID:"password"}),Zr(jo,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Zr(jo,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Lo.prototype.ja=function(t){return t.eb(Fo(this))},Lo.prototype.b=function(t,e){var n=Fo(this);return n.idToken=e,su(t,iu,n)},Lo.prototype.c=function(t,e){var n=Fo(this);return n.operation="REAUTH",ho(t=su(t,ou,n),e)},Lo.prototype.w=function(){var t={providerId:"phone"};return this.a.cb&&(t.verificationId=this.a.cb),this.a.bb&&(t.verificationCode=this.a.bb),this.a.La&&(t.temporaryProof=this.a.La),this.a.ea&&(t.phoneNumber=this.a.ea),t},Uo.prototype.eb=function(t,e){var n=this.a.a;return Pe(e.verify()).then((function(r){if("string"!==typeof r)throw new C("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(e.type){case"recaptcha":var i=g(t)?t.session:null,o=g(t)?t.phoneNumber:t;return(i&&i.type==co?i.Ha().then((function(t){return function(t,e){return su(t,Ys,e).then((function(t){return t.phoneSessionInfo.sessionInfo}))}(n,{idToken:t,phoneEnrollmentInfo:{phoneNumber:o,recaptchaToken:r}})})):i&&i.type==lo?i.Ha().then((function(e){return function(t,e){return su(t,Js,e).then((function(t){return t.phoneResponseInfo.sessionInfo}))}(n,{mfaPendingCredential:e,mfaEnrollmentId:t.multiFactorHint&&t.multiFactorHint.uid||t.multiFactorUid,phoneSignInInfo:{recaptchaToken:r}})})):function(t,e){return su(t,Ws,e)}(n,{phoneNumber:o,recaptchaToken:r})).then((function(t){return"function"===typeof e.reset&&e.reset(),t}),(function(t){throw"function"===typeof e.reset&&e.reset(),t}));default:throw new C("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}}))},Zr(Uo,{PROVIDER_ID:"phone"}),Zr(Uo,{PHONE_SIGN_IN_METHOD:"phone"}),Ho.prototype.getUid=function(){var t=[];return t.push(this.c),this.b&&t.push(this.b),this.f&&t.push(this.f),this.i&&t.push(this.i),t.join("-")},Ho.prototype.S=function(){return this.i},Ho.prototype.w=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.h,tenantId:this.i,error:this.a&&this.a.w()}};var Wo,Go=null;function Qo(t){var e="unauthorized-domain",n=void 0,r=qn(t);t=r.a,"chrome-extension"==(r=r.f)?n=zt("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):"http"==r||"https"==r?n=zt("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):e="operation-not-supported-in-this-environment",C.call(this,e,n)}function $o(t,e,n){C.call(this,t,n),(t=e||{}).Ib&&Xr(this,"email",t.Ib),t.ea&&Xr(this,"phoneNumber",t.ea),t.credential&&Xr(this,"credential",t.credential),t.Yb&&Xr(this,"tenantId",t.Yb)}function Yo(t){if(t.code){var e=t.code||"";0==e.indexOf(A)&&(e=e.substring(A.length));var n={credential:qo(t),Yb:t.tenantId};if(t.email)n.Ib=t.email;else if(t.phoneNumber)n.ea=t.phoneNumber;else if(!n.credential)return new C(e,t.message||void 0);return new $o(e,n,t.message)}return null}function Jo(){}function Xo(t){return t.c||(t.c=t.b())}function Zo(){}function ta(t){if(!t.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<e.length;n++){var r=e[n];try{return new ActiveXObject(r),t.f=r}catch(i){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return t.f}function ea(){}function na(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseType=this.responseText=this.response="",this.status=-1,this.statusText="",this.a.onload=E(this.pc,this),this.a.onerror=E(this.Rb,this),this.a.onprogress=E(this.qc,this),this.a.ontimeout=E(this.uc,this)}function ra(t,e){t.readyState=e,t.onreadystatechange&&t.onreadystatechange()}function ia(t,e,n){this.reset(t,e,n,void 0,void 0)}T(Qo,C),T($o,C),$o.prototype.w=function(){var t={code:this.code,message:this.message};this.email&&(t.email=this.email),this.phoneNumber&&(t.phoneNumber=this.phoneNumber),this.tenantId&&(t.tenantId=this.tenantId);var e=this.credential&&this.credential.w();return e&&mt(t,e),t},$o.prototype.toJSON=function(){return this.w()},Jo.prototype.c=null,T(Zo,Jo),Zo.prototype.a=function(){var t=ta(this);return t?new ActiveXObject(t):new XMLHttpRequest},Zo.prototype.b=function(){var t={};return ta(this)&&(t[0]=!0,t[1]=!0),t},Wo=new Zo,T(ea,Jo),ea.prototype.a=function(){var t=new XMLHttpRequest;if("withCredentials"in t)return t;if("undefined"!=typeof XDomainRequest)return new na;throw Error("Unsupported browser")},ea.prototype.b=function(){return{}},(n=na.prototype).open=function(t,e,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(t,e)},n.send=function(t){if(t){if("string"!=typeof t)throw Error("Only string data is supported");this.a.send(t)}else this.a.send()},n.abort=function(){this.a.abort()},n.setRequestHeader=function(){},n.getResponseHeader=function(t){return"content-type"==t.toLowerCase()?this.a.contentType:""},n.pc=function(){this.status=200,this.response=this.responseText=this.a.responseText,ra(this,4)},n.Rb=function(){this.status=500,this.response=this.responseText="",ra(this,4)},n.uc=function(){this.Rb()},n.qc=function(){this.status=200,ra(this,1)},n.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},ia.prototype.a=null;function oa(t){this.f=t,this.b=this.c=this.a=null}function aa(t,e){this.name=t,this.value=e}ia.prototype.reset=function(t,e,n,r,i){"number"==typeof i||0,r||S(),delete this.a},aa.prototype.toString=function(){return this.name};var sa=new aa("SEVERE",1e3),ua=new aa("WARNING",900),ca=new aa("CONFIG",700),la=new aa("FINE",500);function fa(t){return t.c?t.c:t.a?fa(t.a):(M("Root logger has no level set."),null)}oa.prototype.log=function(t,e,n){if(t.value>=fa(this).value)for(v(e)&&(e=e()),t=new ia(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var ha,pa={},da=null;function va(t){var e;if(da||(da=new oa(""),pa[""]=da,da.c=ca),!(e=pa[t])){e=new oa(t);var n=t.lastIndexOf("."),r=t.substr(n+1);(n=va(t.substr(0,n))).b||(n.b={}),n.b[r]=e,e.a=n,pa[t]=e}return e}function ga(t,e){t&&t.log(la,e,void 0)}function ya(t){this.f=t}function ma(t){On.call(this),this.u=t,this.i=void 0,this.readyState=ba,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.l=new Headers,this.b=null,this.s="GET",this.f="",this.a=!1,this.h=va("goog.net.FetchXmlHttp"),this.m=this.c=this.g=null}T(ya,Jo),ya.prototype.a=function(){return new ma(this.f)},ya.prototype.b=(ha={},function(){return ha}),T(ma,On);var ba=0;function wa(t){t.c.read().then(t.oc.bind(t)).catch(t.Ta.bind(t))}function _a(t){t.readyState=4,t.g=null,t.c=null,t.m=null,Ea(t)}function Ea(t){t.onreadystatechange&&t.onreadystatechange.call(t)}function Oa(t){On.call(this),this.headers=new Nn,this.O=t||null,this.c=!1,this.A=this.a=null,this.i=this.P=this.l="",this.f=this.N=this.h=this.G=!1,this.g=0,this.s=null,this.m=Sa,this.u=this.R=!1}(n=ma.prototype).open=function(t,e){if(this.readyState!=ba)throw this.abort(),Error("Error reopening a connection");this.s=t,this.f=e,this.readyState=1,Ea(this)},n.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var e={headers:this.l,method:this.s,credentials:this.i,cache:void 0};
2t&&(e.body=t),this.u.fetch(new Request(this.f,e)).then(this.tc.bind(this),this.Ta.bind(this))},n.abort=function(){this.response=this.responseText="",this.l=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&4!=this.readyState&&(this.a=!1,_a(this)),this.readyState=ba},n.tc=function(t){this.a&&(this.g=t,this.b||(this.status=this.g.status,this.statusText=this.g.statusText,this.b=t.headers,this.readyState=2,Ea(this)),this.a&&(this.readyState=3,Ea(this),this.a&&("arraybuffer"===this.responseType?t.arrayBuffer().then(this.rc.bind(this),this.Ta.bind(this)):"undefined"!==typeof u.ReadableStream&&"body"in t?(this.response=this.responseText="",this.c=t.body.getReader(),this.m=new TextDecoder,wa(this)):t.text().then(this.sc.bind(this),this.Ta.bind(this)))))},n.oc=function(t){if(this.a){var e=this.m.decode(t.value?t.value:new Uint8Array(0),{stream:!t.done});e&&(this.response=this.responseText+=e),t.done?_a(this):Ea(this),3==this.readyState&&wa(this)}},n.sc=function(t){this.a&&(this.response=this.responseText=t,_a(this))},n.rc=function(t){this.a&&(this.response=t,_a(this))},n.Ta=function(t){var e=this.h;e&&e.log(ua,"Failed to fetch url "+this.f,t instanceof Error?t:Error(t)),this.a&&_a(this)},n.setRequestHeader=function(t,e){this.l.append(t,e)},n.getResponseHeader=function(t){return this.b?this.b.get(t.toLowerCase())||"":((t=this.h)&&t.log(ua,"Attempting to get response header but no headers have been received for url: "+this.f,void 0),"")},n.getAllResponseHeaders=function(){if(!this.b){var t=this.h;return t&&t.log(ua,"Attempting to get all response headers but no headers have been received for url: "+this.f,void 0),""}t=[];for(var e=this.b.entries(),n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join("\r\n")},Object.defineProperty(ma.prototype,"withCredentials",{get:function(){return"include"===this.i},set:function(t){this.i=t?"include":"same-origin"}}),T(Oa,On);var Sa="";Oa.prototype.b=va("goog.net.XhrIo");var Ta=/^https?$/i,Ia=["POST","PUT"];function Ca(t,e,n,r,i){if(t.a)throw Error("[goog.net.XhrIo] Object is active with another request="+t.l+"; newUri="+e);n=n?n.toUpperCase():"GET",t.l=e,t.i="",t.P=n,t.G=!1,t.c=!0,t.a=t.O?t.O.a():Wo.a(),t.A=t.O?Xo(t.O):Xo(Wo),t.a.onreadystatechange=E(t.Ub,t);try{ga(t.b,La(t,"Opening Xhr")),t.N=!0,t.a.open(n,String(e),!0),t.N=!1}catch(a){return ga(t.b,La(t,"Error opening Xhr: "+a.message)),void Pa(t,a)}e=r||"";var o=new Nn(t.headers);i&&function(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(d(t)||"string"===typeof t)K(t,e,void 0);else for(var n=An(t),r=Pn(t),i=r.length,o=0;o<i;o++)e.call(void 0,r[o],n&&n[o],t)}(i,(function(t,e){o.set(e,t)})),i=function(t){t:{for(var e=ka,n=t.length,r="string"===typeof t?t.split(""):t,i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t)){e=i;break t}e=-1}return 0>e?null:"string"===typeof t?t.charAt(e):t[e]}(o.Y()),r=u.FormData&&e instanceof u.FormData,!$(Ia,n)||i||r||o.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),o.forEach((function(t,e){this.a.setRequestHeader(e,t)}),t),t.m&&(t.a.responseType=t.m),"withCredentials"in t.a&&t.a.withCredentials!==t.R&&(t.a.withCredentials=t.R);try{ja(t),0<t.g&&(t.u=function(t){return $t&&ae(9)&&"number"===typeof t.timeout&&void 0!==t.ontimeout}(t.a),ga(t.b,La(t,"Will abort after "+t.g+"ms if incomplete, xhr2 "+t.u)),t.u?(t.a.timeout=t.g,t.a.ontimeout=E(t.Ma,t)):t.s=Cn(t.Ma,t.g,t)),ga(t.b,La(t,"Sending request")),t.h=!0,t.a.send(e),t.h=!1}catch(a){ga(t.b,La(t,"Send error: "+a.message)),Pa(t,a)}}function ka(t){return"content-type"==t.toLowerCase()}function Pa(t,e){t.c=!1,t.a&&(t.f=!0,t.a.abort(),t.f=!1),t.i=e,Aa(t),xa(t)}function Aa(t){t.G||(t.G=!0,t.dispatchEvent("complete"),t.dispatchEvent("error"))}function Na(t){if(t.c&&"undefined"!=typeof s)if(t.A[1]&&4==Ra(t)&&2==Da(t))ga(t.b,La(t,"Local request error detected and ignored"));else if(t.h&&4==Ra(t))Cn(t.Ub,0,t);else if(t.dispatchEvent("readystatechange"),4==Ra(t)){ga(t.b,La(t,"Request complete")),t.c=!1;try{var e,n=Da(t);t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r
2=!0;break t;default:r=!1}if(!(e=r)){var i;if(i=0===n){var o=String(t.l).match(Rn)[1]||null;if(!o&&u.self&&u.self.location){var a=u.self.location.protocol;o=a.substr(0,a.length-1)}i=!Ta.test(o?o.toLowerCase():"")}e=i}if(e)t.dispatchEvent("complete"),t.dispatchEvent("success");else{try{var c=2<Ra(t)?t.a.statusText:""}catch(l){ga(t.b,"Can not get status: "+l.message),c=""}t.i=c+" ["+Da(t)+"]",Aa(t)}}finally{xa(t)}}}function xa(t,e){if(t.a){ja(t);var n=t.a,r=t.A[0]?h:null;t.a=null,t.A=null,e||t.dispatchEvent("ready");try{n.onreadystatechange=r}catch(i){(t=t.b)&&t.log(sa,"Problem encountered resetting onreadystatechange: "+i.message,void 0)}}}function ja(t){t.a&&t.u&&(t.a.ontimeout=null),t.s&&(u.clearTimeout(t.s),t.s=null)}function Ra(t){return t.a?t.a.readyState:0}function Da(t){try{return 2<Ra(t)?t.a.status:-1}catch(e){return-1}}function La(t,e){return e+" ["+t.P+" "+t.l+" "+Da(t)+"]"}function Ma(t){var e=Qa;this.g=[],this.u=e,this.s=t||null,this.f=this.a=!1,this.c=void 0,this.m=this.A=this.h=!1,this.i=0,this.b=null,this.l=0}function Fa(t,e,n){t.a=!0,t.c=n,t.f=!e,Ba(t)}function Ua(t){if(t.a){if(!t.m)throw new Ha(t);t.m=!1}}function Va(t,e,n,r){t.g.push([e,n,r]),t.a&&Ba(t)}function qa(t){return Q(t.g,(function(t){return v(t[1])}))}function Ba(t){if(t.i&&t.a&&qa(t)){var e=t.i,n=Wa[e];n&&(u.clearTimeout(n.a),delete Wa[e]),t.i=0}t.b&&(t.b.l--,delete t.b),e=t.c;for(var r=n=!1;t.g.length&&!t.h;){var i=t.g.shift(),o=i[0],a=i[1];if(i=i[2],o=t.f?a:o)try{var s=o.call(i||t.s,e);void 0!==s&&(t.f=t.f&&(s==e||s instanceof Error),t.c=e=s),(R(e)||"function"===typeof u.Promise&&e instanceof u.Promise)&&(r=!0,t.h=!0)}catch(c){e=c,t.f=!0,qa(t)||(n=!0)}}t.c=e,r&&(s=E(t.v,t,!0),r=E(t.v,t,!1),e instanceof Ma?(Va(e,s,r),e.A=!0):e.then(s,r)),n&&(e=new Ka(e),Wa[e.a]=e,t.i=e.a)}function Ha(){D.call(this)}function za(){D.call(this)}function Ka(t){this.a=u.setTimeout(E(this.c,this),0),this.b=t}(n=Oa.prototype).Ma=function(){"undefined"!=typeof s&&this.a&&(this.i="Timed out after "+this.g+"ms, aborting",ga(this.b,La(this,this.i)),this.dispatchEvent("timeout"),this.abort(8))},n.abort=function(){this.a&&this.c&&(ga(this.b,La(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),xa(this))},n.Da=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),xa(this,!0)),Oa.$a.Da.call(this)},n.Ub=function(){this.xa||(this.N||this.h||this.f?Na(this):this.Ic())},n.Ic=function(){Na(this)},n.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.m){case Sa:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var t=this.b;return t&&t.log(sa,"Response type "+this.m+" is not supported on this browser",void 0),null}catch(e){return ga(this.b,"Can not get response: "+e.message),null}},Ma.prototype.cancel=function(t){if(this.a)this.c instanceof Ma&&this.c.cancel();else{if(this.b){var e=this.b;delete this.b,t?e.cancel(t):(e.l--,0>=e.l&&e.cancel())}this.u?this.u.call(this.s,this):this.m=!0,this.a||(t=new za(this),Ua(this),Fa(this,!1,t))}},Ma.prototype.v=function(t,e){this.h=!1,Fa(this,t,e)},Ma.prototype.then=function(t,e,n){var r,i,o=new Ee((function(t,e){r=t,i=e}));return Va(this,r,(function(t){t instanceof za?o.cancel():i(t)})),o.then(t,e,n)},Ma.prototype.$goog_Thenable=!0,T(Ha,D),Ha.prototype.message="Deferred has already fired",Ha.prototype.name="AlreadyCalledError",T(za,D),za.prototype.message="Deferred was canceled",za.prototype.name="CanceledError",Ka.prototype.c=function(){throw delete Wa[this.a],this.b};var Wa={};function Ga(t){var e={},n=e.document||document,r=Ct(t).toString(),i=ge(document,"SCRIPT"),o={Vb:i,Ma:void 0},a=new Ma(o),s=null,c=null!=e.timeout?e.timeout:5e3;return 0<c&&(s=window.setTimeout((function(){$a(i,!0);var t=new Xa(Ja,"Timeout reached for loading script "+r);Ua(a),Fa(a,!1,t)}),c),o.Ma=s),i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||($a(i,e.wd||!1,s),Ua(a),Fa(a,!0,null))},i.onerror=function(){$a(i,!0,s);var t=new Xa(Ya,"Error while loading script "+r);Ua(a),Fa(a,!1,t)},mt(o=e.attributes||{}
2,{type:"text/javascript",charset:"UTF-8"}),fe(i,o),function(t,e){bt(t,"HTMLScriptElement"),t.src=Ct(e),(e=t.ownerDocument&&t.ownerDocument.defaultView)&&e!=u?e=f(e.document):(null===l&&(l=f(u.document)),e=l),e&&t.setAttribute("nonce",e)}(i,t),function(t){var e;return(e=(t||document).getElementsByTagName("HEAD"))&&0!=e.length?e[0]:t.documentElement}(n).appendChild(i),a}function Qa(){if(this&&this.Vb){var t=this.Vb;t&&"SCRIPT"==t.tagName&&$a(t,!0,this.Ma)}}function $a(t,e,n){null!=n&&u.clearTimeout(n),t.onload=h,t.onerror=h,t.onreadystatechange=h,e&&window.setTimeout((function(){t&&t.parentNode&&t.parentNode.removeChild(t)}),0)}var Ya=0,Ja=1;function Xa(t,e){var n="Jsloader error (code #"+t+")";e&&(n+=": "+e),D.call(this,n),this.code=t}function Za(t){this.f=t}function ts(t,n,r){if(this.c=t,t=n||{},this.l=t.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.v=t.secureTokenTimeout||rs,this.g=gt(t.secureTokenHeaders||is),this.i=t.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.h=t.identityPlatformEndpoint||"https://identitytoolkit.googleapis.com/v2/",this.m=t.firebaseTimeout||os,this.a=gt(t.firebaseHeaders||as),r&&(this.a["X-Client-Version"]=r,this.g["X-Client-Version"]=r),r="Node"==Sr(),!(r=u.XMLHttpRequest||r&&e.a.INTERNAL.node&&e.a.INTERNAL.node.XMLHttpRequest)&&!Or())throw new C("internal-error","The XMLHttpRequest compatibility library was not found.");this.f=void 0,Or()?this.f=new ya(self):Tr()?this.f=new Za(r):this.f=new ea,this.b=null}T(Xa,D),T(Za,Jo),Za.prototype.a=function(){return new this.f},Za.prototype.b=function(){return{}};var es,ns="idToken",rs=new zr(3e4,6e4),is={"Content-Type":"application/x-www-form-urlencoded"},os=new zr(3e4,6e4),as={"Content-Type":"application/json"};function ss(t,e){e?t.a["X-Firebase-Locale"]=e:delete t.a["X-Firebase-Locale"]}function us(t,e){e&&(t.l=cs("https://securetoken.googleapis.com/v1/token",e),t.i=cs("https://www.googleapis.com/identitytoolkit/v3/relyingparty/",e),t.h=cs("https://identitytoolkit.googleapis.com/v2/",e))}function cs(t,e){return t=qn(t),e=qn(e.url),t.c=t.a+t.c,Ln(t,e.f),t.a=e.a,Mn(t,e.g),t.toString()}function ls(t,e){e?(t.a["X-Client-Version"]=e,t.g["X-Client-Version"]=e):(delete t.a["X-Client-Version"],delete t.g["X-Client-Version"])}function fs(t,e,n,r,i,o,a){(function(){var t=Nr();return!((t=kr(t)!=Cr?null:(t=t.match(/\sChrome\/(\d+)/i))&&2==t.length?parseInt(t[1],10):null)&&30>t)&&(!$t||!ue||9<ue)})()||Or()?t=E(t.u,t):(es||(es=new Ee((function(t,e){!function(t,e){if(((window.gapi||{}).client||{}).request)t();else{u[ps]=function(){((window.gapi||{}).client||{}).request?t():e(Error("CORS_UNSUPPORTED"))},function(t,e){Va(t,null,e,void 0)}(Ga(kt(hs,{onload:ps})),(function(){e(Error("CORS_UNSUPPORTED"))}))}}(t,e)}))),t=E(t.s,t)),t(e,n,r,i,o,a)}ts.prototype.S=function(){return this.b},ts.prototype.u=function(t,e,n,r,i,o){if(Or()&&("undefined"===typeof u.fetch||"undefined"===typeof u.Headers||"undefined"===typeof u.Request))throw new C("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var a=new Oa(this.f);if(o){a.g=Math.max(0,o);var s=setTimeout((function(){a.dispatchEvent("timeout")}),o)}Sn(a,"complete",(function(){s&&clearTimeout(s);var t=null;try{t=JSON.parse(function(t){try{return t.a?t.a.responseText:""}catch(e){return ga(t.b,"Can not get responseText: "+e.message),""}}(this))||null}catch(n){t=null}e&&e(t)})),Tn(a,"ready",(function(){s&&clearTimeout(s),Ge(this)})),Tn(a,"timeout",(function(){s&&clearTimeout(s),Ge(this),e&&e(null)})),Ca(a,t,n,r,i)};var hs=new wt(St,"https://apis.google.com/js/client.js?onload=%{onload}"),ps="__fcb"+Math.floor(1e6*Math.random()).toString();function ds(t,e,n,r,i,o,a){var s=qn(e+n);Un(s,"key",t.c),a&&Un(s,"cb",S().toString());var u="GET"==r;if(u)for(var c in i)i.hasOwnProperty(c)&&Un(s,c,i[c]);return new Ee((function(e,n){fs(t,s.toString(),(function(t){t?t.error?n(cu(t,o||{})):e(t):n(new C("network-request-failed"))}),r,u?void 0:or(Ur(i)),t.a,t.m.get())}))}function vs(t){if("string"!==typeof(t=t.email)||!br.test(t))throw new C("invalid-email")}function gs(t){"email"in t&&vs(t)}function ys(t){if(!t[ns]){if(t.mfaPendingCredential)throw new C("multi-factor-auth-required",null,gt(t));throw new C("internal-error")}}function ms(t){if(t.phoneNumber||t.temporaryProof){if(!t.phoneNumber||!t.temporaryProof)throw new C("internal-error")}else{if(!t.sessionInfo)throw new C("missing-verification-id");if(!t.code)throw new C("missing-verification-code")}}ts.prototype.s=function(t,e,n,r,i){var o=this;es.then((function(){window.gapi.client.setApiKey(o.c);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:n,body:r,headers:i,authType:"none",callback:function(t){window.gapi.auth.setToken(a),e&&e(t)}})})).o((function(t){e&&e({error:{message:t&&t.message||"CORS_UNSUPPORTED"}})}))},ts.prototype.yb=function(){return su(this,$s,{})},ts.prototype.Ab=function(t,e){return su(this,Gs,{idToken:t,email:e})},ts.prototype.Bb=function(t,e){return su(this,Qs,{idToken:t,password:e})};
2var bs={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};function ws(t){if(!t.phoneVerificationInfo)throw new C("internal-error");if(!t.phoneVerificationInfo.sessionInfo)throw new C("missing-verification-id");if(!t.phoneVerificationInfo.code)throw new C("missing-verification-code")}function _s(t){if(!t.requestUri||!t.sessionId&&!t.postBody&&!t.pendingToken)throw new C("internal-error")}function Es(t,e){return e.oauthIdToken&&e.providerId&&0==e.providerId.indexOf("oidc.")&&!e.pendingToken&&(t.sessionId?e.nonce=t.sessionId:t.postBody&&(er(t=new Jn(t.postBody),"nonce")&&(e.nonce=t.get("nonce")))),e}function Os(t){var e=null;if(t.needConfirmation?(t.code="account-exists-with-different-credential",e=Yo(t)):"FEDERATED_USER_ID_ALREADY_LINKED"==t.errorMessage?(t.code="credential-already-in-use",e=Yo(t)):"EMAIL_EXISTS"==t.errorMessage?(t.code="email-already-in-use",e=Yo(t)):t.errorMessage&&(e=uu(t.errorMessage)),e)throw e;ys(t)}function Ss(t,e){return e.returnIdpCredential=!0,su(t,Xs,e)}function Ts(t,e){return e.returnIdpCredential=!0,su(t,tu,e)}function Is(t,e){return e.returnIdpCredential=!0,e.autoCreate=!1,su(t,Zs,e)}function Cs(t){if(!t.oobCode)throw new C("invalid-action-code")}(n=ts.prototype).Cb=function(t,e){var n={idToken:t},r=[];return dt(bs,(function(t,i){var o=e[i];null===o?r.push(t):i in e&&(n[i]=o)})),r.length&&(n.deleteAttribute=r),su(this,Gs,n)},n.ub=function(t,e){return mt(t={requestType:"PASSWORD_RESET",email:t},e),su(this,Bs,t)},n.vb=function(t,e){return mt(t={requestType:"EMAIL_SIGNIN",email:t},e),su(this,Us,t)},n.tb=function(t,e){return mt(t={requestType:"VERIFY_EMAIL",idToken:t},e),su(this,Vs,t)},n.Db=function(t,e,n){return mt(t={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:t,newEmail:e},n),su(this,qs,t)},n.eb=function(t){return su(this,ru,t)},n.mb=function(t,e){return su(this,Ks,{oobCode:t,newPassword:e})},n.Qa=function(t){return su(this,Ps,{oobCode:t})},n.ib=function(t){return su(this,ks,{oobCode:t})};var ks={endpoint:"setAccountInfo",B:Cs,Z:"email",C:!0},Ps={endpoint:"resetPassword",B:Cs,F:function(t){var e=t.requestType;if(!e||!t.email&&"EMAIL_SIGNIN"!=e&&"VERIFY_AND_CHANGE_EMAIL"!=e)throw new C("internal-error")},C:!0},As={endpoint:"signupNewUser",B:function(t){if(vs(t),!t.password)throw new C("weak-password")},F:ys,U:!0,C:!0},Ns={endpoint:"createAuthUri",C:!0},xs={endpoint:"deleteAccount",M:["idToken"]},js={endpoint:"setAccountInfo",M:["idToken","deleteProvider"],B:function(t){if(!Array.isArray(t.deleteProvider))throw new C("internal-error")}},Rs={endpoint:"emailLinkSignin",M:["email","oobCode"],B:vs,F:ys,U:!0,C:!0},Ds={endpoint:"emailLinkSignin",M:["idToken","email","oobCode"],B:vs,F:ys,U:!0},Ls={endpoint:"accounts/mfaEnrollment:finalize",M:["idToken","phoneVerificationInfo"],B:ws,F:ys,C:!0,Na:!0},Ms={endpoint:"accounts/mfaSignIn:finalize",M:["mfaPendingCredential","phoneVerificationInfo"],B:ws,F:ys,C:!0,Na:!0},Fs={endpoint:"getAccountInfo"},Us={endpoint:"getOobConfirmationCode",M:["requestType"],B:function(t){if("EMAIL_SIGNIN"!=t.requestType)throw new C("internal-error");vs(t)},Z:"email",C:!0},Vs={endpoint:"getOobConfirmationCode",M:["idToken","requestType"],B:function(t){if("VERIFY_EMAIL"!=t.requestType)throw new C("internal-error")},Z:"email",C:!0},qs={endpoint:"getOobConfirmationCode",M:["idToken","newEmail","requestType"],B:function(t){if("VERIFY_AND_CHANGE_EMAIL"!=t.requestType)throw new C("internal-error")},Z:"email",C:!0},Bs={endpoint:"getOobConfirmationCode",M:["requestType"],B:function(t){if("PASSWORD_RESET"!=t.requestType)throw new C("internal-error");vs(t)},Z:"email",C:!0},Hs={kb:!0,endpoint:"getProjectConfig",Tb:"GET"},zs={kb:!0,endpoint:"getRecaptchaParam",Tb:"GET",F:function(t){if(!t.recaptchaSiteKey)throw new C("internal-error")}},Ks={endpoint:"resetPassword",B:Cs,Z:"email",C:!0},Ws={endpoint:"sendVerificationCode",M:["phoneNumber","recaptchaToken"],Z:"sessionInfo",C:!0},Gs={endpoint:"setAccountInfo",M:["idToken"],B:gs,U:!0},Qs={endpoint:"setAccountInfo",M:["idToken"],B:function(t){if(gs(t),!t.password)throw new C("weak-password")},F:ys,U:!0},$s={endpoint:"signupNewUser",F:ys,U:!0,C:!0},Ys={endpoint:"accounts/mfaEnrollment:start",M:["idToken","phoneEnrollmentInfo"],B:function(t){if(!t.phone
2EnrollmentInfo)throw new C("internal-error");if(!t.phoneEnrollmentInfo.phoneNumber)throw new C("missing-phone-number");if(!t.phoneEnrollmentInfo.recaptchaToken)throw new C("missing-app-credential")},F:function(t){if(!t.phoneSessionInfo||!t.phoneSessionInfo.sessionInfo)throw new C("internal-error")},C:!0,Na:!0},Js={endpoint:"accounts/mfaSignIn:start",M:["mfaPendingCredential","mfaEnrollmentId","phoneSignInInfo"],B:function(t){if(!t.phoneSignInInfo||!t.phoneSignInInfo.recaptchaToken)throw new C("missing-app-credential")},F:function(t){if(!t.phoneResponseInfo||!t.phoneResponseInfo.sessionInfo)throw new C("internal-error")},C:!0,Na:!0},Xs={endpoint:"verifyAssertion",B:_s,Xa:Es,F:Os,U:!0,C:!0},Zs={endpoint:"verifyAssertion",B:_s,Xa:Es,F:function(t){if(t.errorMessage&&"USER_NOT_FOUND"==t.errorMessage)throw new C("user-not-found");if(t.errorMessage)throw uu(t.errorMessage);ys(t)},U:!0,C:!0},tu={endpoint:"verifyAssertion",B:function(t){if(_s(t),!t.idToken)throw new C("internal-error")},Xa:Es,F:Os,U:!0},eu={endpoint:"verifyCustomToken",B:function(t){if(!t.token)throw new C("invalid-custom-token")},F:ys,U:!0,C:!0},nu={endpoint:"verifyPassword",B:function(t){if(vs(t),!t.password)throw new C("wrong-password")},F:ys,U:!0,C:!0},ru={endpoint:"verifyPhoneNumber",B:ms,F:ys,C:!0},iu={endpoint:"verifyPhoneNumber",B:function(t){if(!t.idToken)throw new C("internal-error");ms(t)},F:function(t){if(t.temporaryProof)throw t.code="credential-already-in-use",Yo(t);ys(t)}},ou={Gb:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",B:ms,F:ys,C:!0},au={endpoint:"accounts/mfaEnrollment:withdraw",M:["idToken","mfaEnrollmentId"],F:function(t){if(!!t[ns]^!!t.refreshToken)throw new C("internal-error")},C:!0,Na:!0};function su(t,e,n){if(!function(t,e){if(!e||!e.length)return!0;if(!t)return!1;for(var n=0;n<e.length;n++){var r=t[e[n]];if(void 0===r||null===r||""===r)return!1}return!0}(n,e.M))return Ae(new C("internal-error"));var r,i=!!e.Na,o=e.Tb||"POST";return Pe(n).then(e.B).then((function(){return e.U&&(n.returnSecureToken=!0),e.C&&t.b&&"undefined"===typeof n.tenantId&&(n.tenantId=t.b),ds(t,i?t.h:t.i,e.endpoint,o,n,e.Gb,e.kb||!1)})).then((function(t){return r=t,e.Xa?e.Xa(n,r):r})).then(e.F).then((function(){if(!e.Z)return r;if(!(e.Z in r))throw new C("internal-error");return r[e.Z]}))}function uu(t){return cu({error:{errors:[{message:t}],code:400,message:t}})}function cu(t,e){var n=(t.error&&t.error.errors&&t.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new C(r[n]):null)return n;for(var i in n=t.error&&t.error.message||"",mt(r={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_OR_INVALID_
2NONCE:"missing-or-invalid-nonce",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",INVALID_PROVIDER_ID:"invalid-provider-id",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",REJECTED_CREDENTIAL:"rejected-credential",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_DYNAMIC_LINK_DOMAIN:"invalid-dynamic-link-domain",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash",UNSUPPORTED_TENANT_OPERATION:"unsupported-tenant-operation",INVALID_TENANT_ID:"invalid-tenant-id",TENANT_ID_MISMATCH:"tenant-id-mismatch",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",EMAIL_CHANGE_NEEDS_VERIFICATION:"email-change-needs-verification",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",UNSUPPORTED_FIRST_FACTOR:"unsupported-first-factor",UNVERIFIED_EMAIL:"unverified-email"},e||{}),e=(e=n.match(/^[^\s]+\s*:\s*([\s\S]*)$/))&&1<e.length?e[1]:void 0,r)if(0===n.indexOf(i))return new C(r[i],e);return!e&&t&&(e=Fr(t)),new C("internal-error",e)}function lu(t){this.b=t,this.a=null,this.qb=function(t){return(du||(du=new Ee((function(t,e){function n(){Hr(),xr("gapi.load")("gapi.iframes",{callback:t,ontimeout:function(){Hr(),e(Error("Network Error"))},timeout:hu.get()})}if(xr("gapi.iframes.Iframe"))t();else if(xr("gapi.load"))n();else{var r="__iframefcb"+Math.floor(1e6*Math.random()).toString();u[r]=function(){xr("gapi.load")?n():e(Error("Network Error"))},Pe(Ga(r=kt(fu,{onload:r}))).o((function(){e(Error("Network Error"))}))}})).o((function(t){throw du=null,t})))).then((function(){return new Ee((function(e,n){xr("gapi.iframes.getContext")().open({where:document.body,url:t.b,messageHandlersFilter:xr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},(function(r){function i(){clearTimeout(o),e()}t.a=r,t.a.restyle({setHideOnLeave:!1});var o=setTimeout((function(){n(Error("Network Error"))}),pu.get());r.ping(i).then(i,(function(){n(Error("Network Error"))}))}))}))}))}(this)}var fu=new wt(St,"https://apis.google.com/js/api.js?onload=%{onload}"),hu=new zr(3e4,6e4),pu=new zr(5e3,15e3),du=null;function vu(t,e,n,r){this.l=t,this.i=e,this.h=n,this.g=r,this.f=null,this.g?t=Bn((t=qn(this.g.url)).f,t.a,t.g,"/emulator/auth/iframe"):t=Bn("https",this.l,null,"/__/auth/iframe"),this.a=t,Un(this.a,"apiKey",this.i),Un(this.a,"appName",this.h),this.b=null,this.c=[]}function gu(t,e,n,r,i,o){this.u=t,this.s=e,this.c=n,this.v=r,this.m=o,this.h=this.g=this.l=null,this.a=i,this.i=this.f=null}function yu(t){try{return e.a.app(t).auth().Ga()}catch(n){return[]}}function mu(t,e,n,r,i,o){this.s=t,this.g=e,this.b=n,this.f=o,this.c=r||null,this.h=i||null,this.l=this.u=this.A=null,this.i=[],this.v=this.a=null}function bu(t){var e=hr();return function(t){return su(t,Hs,{}).then((function(t){return t.authorizedDomains||[]}))}(t).then((function(t){t:{var n=qn(e),r=n.f;n=n.a;for(var i=0;i<t.length;i++){var o=t[i],a=n,s=r;if(0==o.indexOf("chrome-extension://")?a=qn(o).a==a&&"chrome-extension"==s:"http"!=s&&"https"!=s?a=!1:mr.test(o)?a=a==o:(o=o.split(".").join("\\."),a=new RegExp("^(.+\\."+o+"|"+o+")$","i").test(a)),a){t=!0;break t}}t=!1}if(!t)throw new Qo(hr())}))}function wu(t){return t.v||(t.v=wr().then((function(){if(!t.u){var e=t.c,n=t.h,r=yu(t.b),i=new vu(t.s,t.g,t.b,t.f);i.f=e,i.b=n,i.c=Z(r||[]),t.u=i.toString()}t.m=new lu(t.u),function(t){if(!t.m)throw Error("IfcHandler must be initialized!");!function(t,e){t.qb.then((function(){t.a.register("authEvent",e,xr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}(t.m,(function(e){var n={};if(e&&e.authEvent){var r=!1;for(e=zo(e.authEvent),n=0;n<t.i.length;n++)r=t.i[n](e)||r;return(n={}).status=r?"ACK":"ERROR",Pe(n)}return n.status="ERROR",Pe(n)}))}(t)}))),t.v}function _u(t){return t.l||(t.A=t.c?Ar(t.c,yu(t.b)):null,t.l=new ts(t.g,j(t.h),t.A),t.f&&us(t.l,t.f)),t.l}function Eu(t,e,n,r,i,o,a,s,u,c,l,f){return(t=new gu(t,e,n,r,i,f)).l=o,t.g=a,t.h=s,t.b=gt(u||null),t.f=c,t.xb(l).toString()}function Ou(t){if(this.a=t||e.a.INTERNAL.reactNative&&e.a.INTERNAL.reactNative.AsyncStorage,!this.a)throw new C("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function Su(t){this.b=t,this.a={},this.f=E(this.c,this)}vu.prototype.toString=function(){return this.f?Un(this.a,"v",this.f):tr(this.a.b,"v"),this.b?Un(this.a,"eid",this.b):tr(this.a.b,"eid"),this.c.length?Un(this.a,"fw",this.c.join(",")):tr(this.a.b,"fw"),this.a.toString()},gu.prototype.xb=function(t){return this.i=t,this},gu.prototype.toString=function(){if(this.m){var t=qn(this.m.url);t=Bn(t.f,t.a,t.g,"/emulator/auth/handler")}else t=Bn("https",this.u,null,"/__/auth/handler");if(Un(t,"apiKey",this.s),Un(t,"appName",this.c),Un(t,"authType",this.v),this.a.isOAuthProvider){var n=this.a;try{var r=e.a.app(this.c).auth().ka()}catch(u){r=null}for(var i in n.nb=r,Un(t,"providerId",this.a.providerId),n=Ur((r=this.a).Hb))n[i]=n[i].toString();i=r.Pc,n=gt(n);for(var o=0;o<i.length;o++){var a=i[o];a in n&&delete n[a]}r.ob&&r.nb&&!n[r.ob]&&(n[r.ob]=r.nb),vt(n)||Un(t,"customParameters",Fr(n))}if("function"===typeof this.a.Pb&&((r=this.a.Pb()).length&&Un(t,"scopes",r.join(","))),this.l?Un(t,"redirectUrl",this.l):tr(t.b,"redirectUrl"),this.g?Un(t,"eventId",this.g):tr(t.b,"eventId"),this.h?Un(t,"v",this.h):tr(t.b,"v"),this.b)for(var s in this.b)this.b.hasOwnProperty(s)&&!Vn(t,s)&&Un(t,s,this.b[s]);return this.i?Un(t,"tid",this.i):tr(t.b,"tid"),this.f?Un(t,"eid",this.f):tr(t.b,"eid"),(s=yu(this.c)).length&&Un(t,"fw",s.join(",")),t.toString()},(n=mu.prototype).Nb=function(t,e,n){var r=new C("popup-closed-by-user"),i=new C("web-storage-unsupported"),o=this,a=!1;return this.la().then((function(){(function(t){var e={type:"webStorageSupport"};return wu(t).then((function(){return function(t,e){return t.qb.then((function(){return new Ee((function(n){t.a.send(e.type,e,n,xr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}))}(t.m,e)})).then((function(t){if(t&&t.length&&"undefined"!==typeof t[0].webStorageSupport)return t[0].webStorageSupport;throw Error()}))})(o).then((function(n){n||(t&&gr(t),e(i),a=!0)}))})).o((function(){})).then((function(){if(!a)return function(t){return new Ee((function(e){return function n(){kn(2e3).then((function(){if(t&&!t.closed)return n();e()}
2))}()}))}(t)})).then((function(){if(!a)return kn(n).then((function(){e(r)}))}))},n.Wb=function(){var t=Nr();return!Mr(t)&&!Br(t)},n.Sb=function(){return!1},n.Lb=function(t,e,n,r,i,o,a,s){if(!t)return Ae(new C("popup-blocked"));if(a&&!Mr())return this.la().o((function(e){gr(t),i(e)})),r(),Pe();this.a||(this.a=bu(_u(this)));var u=this;return this.a.then((function(){var e=u.la().o((function(e){throw gr(t),i(e),e}));return r(),e})).then((function(){(Bo(n),a)||pr(Eu(u.s,u.g,u.b,e,n,null,o,u.c,void 0,u.h,s,u.f),t)})).o((function(t){throw"auth/network-request-failed"==t.code&&(u.a=null),t}))},n.Mb=function(t,e,n,r){this.a||(this.a=bu(_u(this)));var i=this;return this.a.then((function(){Bo(e),pr(Eu(i.s,i.g,i.b,t,e,hr(),n,i.c,void 0,i.h,r,i.f))})).o((function(t){throw"auth/network-request-failed"==t.code&&(i.a=null),t}))},n.la=function(){var t=this;return wu(this).then((function(){return t.m.qb})).o((function(){throw t.a=null,new C("network-request-failed")}))},n.Zb=function(){return!0},n.Ea=function(t){this.i.push(t)},n.Ra=function(t){J(this.i,(function(e){return e==t}))},(n=Ou.prototype).get=function(t){return Pe(this.a.getItem(t)).then((function(t){return t&&Vr(t)}))},n.set=function(t,e){return Pe(this.a.setItem(t,Fr(e)))},n.T=function(t){return Pe(this.a.removeItem(t))},n.ca=function(){},n.ia=function(){};var Tu,Iu=[];function Cu(t,e,n){vt(t.a)&&t.b.addEventListener("message",t.f),"undefined"===typeof t.a[e]&&(t.a[e]=[]),t.a[e].push(n)}function ku(t){this.a=t}function Pu(t){this.c=t,this.b=!1,this.a=[]}function Au(t,e,n,r){var i,o,a,s,u=n||{},c=null;if(t.b)return Ae(Error("connection_unavailable"));var l=r?800:50,f="undefined"!==typeof MessageChannel?new MessageChannel:null;return new Ee((function(n,r){f?(i=Math.floor(Math.random()*Math.pow(10,20)).toString(),f.port1.start(),a=setTimeout((function(){r(Error("unsupported_event"))}),l),c={messageChannel:f,onMessage:o=function(t){t.data.eventId===i&&("ack"===t.data.status?(clearTimeout(a),s=setTimeout((function(){r(Error("timeout"))}),3e3)):"done"===t.data.status?(clearTimeout(s),"undefined"!==typeof t.data.response?n(t.data.response):r(Error("unknown_error"))):(clearTimeout(a),clearTimeout(s),r(Error("invalid_response"))))}},t.a.push(c),f.port1.addEventListener("message",o),t.c.postMessage({eventType:e,eventId:i,data:u},[f.port2])):r(Error("connection_unavailable"))})).then((function(e){return Nu(t,c),e})).o((function(e){throw Nu(t,c),e}))}function Nu(t,e){if(e){var n=e.messageChannel,r=e.onMessage;n&&(n.port1.removeEventListener("message",r),n.port1.close()),J(t.a,(function(t){return t==e}))}}function xu(){if(!Lu())throw new C("web-storage-unsupported");this.c={},this.a=[],this.b=0,this.v=u.indexedDB,this.type="indexedDB",this.g=this.m=this.f=this.l=null,this.s=!1,this.i=null;var t=this;Or()&&self?(this.m=function(){var t=Or()?self:null;if(K(Iu,(function(n){n.b==t&&(e=n)})),!e){var e=new Su(t);Iu.push(e)}return e}(),Cu(this.m,"keyChanged",(function(e,n){return qu(t).then((function(e){return 0<e.length&&K(t.a,(function(t){t(e)})),{keyProcessed:$(e,n.key)}}))})),Cu(this.m,"ping",(function(){return Pe(["keyChanged"])}))):function(){var t=u.navigator;return t&&t.serviceWorker?Pe().then((function(){return t.serviceWorker.ready})).then((function(t){return t.active||null})).o((function(){return null})):Pe(null)}().then((function(e){(t.i=e)&&(t.g=new Pu(new ku(e)),Au(t.g,"ping",null,!0).then((function(e){e[0].fulfilled&&$(e[0].value,"keyChanged")&&(t.s=!0)})).o((function(){})))}))}function ju(t){return new Ee((function(e,n){var r=t.v.open("firebaseLocalStorageDb",1);r.onerror=function(t){try{t.preventDefault()}catch(e){}n(Error(t.target.error))},r.onupgradeneeded=function(t){t=t.target.result;try{t.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(e){n(e)}},r.onsuccess=function(r){(r=r.target.result).objectStoreNames.contains("firebaseLocalStorage")?e(r):function(t){return new Ee((function(e,n){var r=t.v.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){e()},r.onerror=function(t){n(Error(t.target.error))}}))}(t).then((function(){return ju(t)})).then((function(t){e(t)})).o((function(t){n(t)}))}}))}function Ru(t){return t.h||(t.h=ju(t)),t.h}function Du(t,e){var n=0;return new Ee((function r(i,o){Ru(t).then(e).then(i).o((function(e){if(!(3<++n))return Ru(t).then((function(e){return e.close(),t.h=void 0,r(i,o)})).o((function(t){o(t)}));o(e)}))}))}function Lu(){try{return!!u.indexedDB}catch(ha){return!1}}function Mu(t){return t.objectStore("firebaseLocalStorage")}function Fu(t,e){return t.transaction(["firebaseLocalStorage"],e?"readwrite":"readonly")}function Uu(t){return new Ee((function(e,n){t.onsuccess=function(t){t&&t.target?e(t.target.result):e()},t.onerror=function(t){n(t.target.error)}}))}function Vu(t,e){return t.g&&t.i&&function(){var t=u.navigator;return t&&t.serviceWorker&&t.serviceWorker.controller||null}()===t.i?Au(t.g,"keyChanged",{key:e},t.s).then((function(){})).o((function(){})):Pe()}function qu(t){return Ru(t).then((function(t){var e=Mu(Fu(t,!1));return e.getAll?Uu(e.getAll()):new Ee((function(t,n){var r=[],i=e.openCursor();i.onsuccess=function(e){(e=e.target.result)?(r.push(e.value),e.continue()):t(r)},i.onerror=function(t){n(t.target.error)}}))})).then((function(e){var n={},r=[];if(0==t.b){for(r=0;r<e.length;r++)n[e[r].fbase_key]=e[r].value;r=dr(t.c,n),t.c=n}return r}))}function Bu(t){t.l&&t.l.cancel("STOP_EVENT"),t.f&&(clearTimeout(t.f),t.f=null)}function Hu(t){var e=this,n=null;this.a=[],this.type="indexedDB",this.c=t,this.b=Pe().then((function(){if(Lu()
2){var t=qr(),r="__sak"+t;return Tu||(Tu=new xu),(n=Tu).set(r,t).then((function(){return n.get(r)})).then((function(e){if(e!==t)throw Error("indexedDB not supported!");return n.T(r)})).then((function(){return n})).o((function(){return e.c}))}return e.c})).then((function(t){return e.type=t.type,t.ca((function(t){K(e.a,(function(e){e(t)}))})),t}))}function zu(){this.a={},this.type="inMemory"}function Ku(){if(!function(){var t="Node"==Sr();if(!(t=Wu()||t&&e.a.INTERNAL.node&&e.a.INTERNAL.node.localStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(n){return!1}}()){if("Node"==Sr())throw new C("internal-error","The LocalStorage compatibility library was not found.");throw new C("web-storage-unsupported")}this.a=Wu()||e.a.INTERNAL.node.localStorage,this.type="localStorage"}function Wu(){try{var t=u.localStorage,e=qr();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(n){return null}}function Gu(){this.type="nullStorage"}function Qu(){if(!function(){var t="Node"==Sr();if(!(t=$u()||t&&e.a.INTERNAL.node&&e.a.INTERNAL.node.sessionStorage))return!1;try{return t.setItem("__sak","1"),t.removeItem("__sak"),!0}catch(n){return!1}}()){if("Node"==Sr())throw new C("internal-error","The SessionStorage compatibility library was not found.");throw new C("web-storage-unsupported")}this.a=$u()||e.a.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function $u(){try{var t=u.sessionStorage,e=qr();return t&&(t.setItem(e,"1"),t.removeItem(e)),t}catch(n){return null}}function Yu(){var t={};t.Browser=Zu,t.Node=tc,t.ReactNative=ec,t.Worker=nc,this.a=t[Sr()]}Su.prototype.c=function(t){var e=t.data.eventType,n=t.data.eventId,r=this.a[e];if(r&&0<r.length){t.ports[0].postMessage({status:"ack",eventId:n,eventType:e,response:null});var i=[];K(r,(function(e){i.push(Pe().then((function(){return e(t.origin,t.data.data)})))})),xe(i).then((function(r){var i=[];K(r,(function(t){i.push({fulfilled:t.Ob,value:t.value,reason:t.reason?t.reason.message:void 0})})),K(i,(function(t){for(var e in t)"undefined"===typeof t[e]&&delete t[e]})),t.ports[0].postMessage({status:"done",eventId:n,eventType:e,response:i})}))}},ku.prototype.postMessage=function(t,e){this.a.postMessage(t,e)},Pu.prototype.close=function(){for(;0<this.a.length;)Nu(this,this.a[0]);this.b=!0},(n=xu.prototype).set=function(t,e){var n=this,r=!1;return Du(this,(function(e){return Uu((e=Mu(Fu(e,!0))).get(t))})).then((function(i){return Du(n,(function(o){if(o=Mu(Fu(o,!0)),i)return i.value=e,Uu(o.put(i));n.b++,r=!0;var a={};return a.fbase_key=t,a.value=e,Uu(o.add(a))}))})).then((function(){return n.c[t]=e,Vu(n,t)})).na((function(){r&&n.b--}))},n.get=function(t){return Du(this,(function(e){return Uu(Mu(Fu(e,!1)).get(t))})).then((function(t){return t&&t.value}))},n.T=function(t){var e=this,n=!1;return Du(this,(function(r){return n=!0,e.b++,Uu(Mu(Fu(r,!0)).delete(t))})).then((function(){return delete e.c[t],Vu(e,t)})).na((function(){n&&e.b--}))},n.ca=function(t){0==this.a.length&&function(t){function e(){t.f=setTimeout((function(){t.l=qu(t).then((function(e){0<e.length&&K(t.a,(function(t){t(e)}))})).then((function(){e()})).o((function(t){"STOP_EVENT"!=t.message&&e()}))}),800)}Bu(t),e()}(this),this.a.push(t)},n.ia=function(t){J(this.a,(function(e){return e==t})),0==this.a.length&&Bu(this)},(n=Hu.prototype).get=function(t){return this.b.then((function(e){return e.get(t)}))},n.set=function(t,e){return this.b.then((function(n){return n.set(t,e)}))},n.T=function(t){return this.b.then((function(e){return e.T(t)}))},n.ca=function(t){this.a.push(t)},n.ia=function(t){J(this.a,(function(e){return e==t}))},(n=zu.prototype).get=function(t){return Pe(this.a[t])},n.set=function(t,e){return this.a[t]=e,Pe()},n.T=function(t){return delete this.a[t],Pe()},n.ca=function(){},n.ia=function(){},(n=Ku.prototype).get=function(t){var e=this;return Pe().then((function(){return Vr(e.a.getItem(t))}))},n.set=function(t,e){var n=this;return Pe().then((function(){var r=Fr(e);null===r?n.T(t):n.a.setItem(t,r)}))},n.T=function(t){var e=this;return Pe().then((function(){e.a.removeItem(t)}))},n.ca=function(t){u.window&&fn(u.window,"storage",t)},n.ia=function(t){u.window&&dn(u.window,"storage",t)},(n=Gu.prototype).get=function(){return Pe(null)},n.set=function(){return Pe()},n.T=function(){return Pe()},n.ca=function(){},n.ia=function(){},(n=Qu.prototype).get=function(t){var e=this;return Pe().then((function(){return Vr(e.a.getItem(t))}))},n.set=function(t,e){var n=this;return Pe().then((function(){var r=Fr(e);null===r?n.T(t):n.a.setItem(t,r)}))},n.T=function(t){var e=this;return Pe().then((function(){e.a.removeItem(t)}))},n.ca=function(){},n.ia=function(){};var Ju,Xu,Zu={D:Ku,ab:Qu},tc={D:Ku,ab:Qu},ec={D:Ou,ab:Gu},nc={D:Ku,ab:Gu},rc={qd:"local",NONE:"none",sd:"session"};function ic(){var t=!(Br(Nr())||!Er()),e=Mr(),n=jr();this.v=t,this.i=e,this.l=n,this.a={},Ju||(Ju=new Yu),t=Ju;try{this.g=!fr()&&Gr()||!u.indexedDB?new t.a.D:new Hu(Or()?new zu:new t.a.D)}catch(r){this.g=new zu,this.i=!0}try{this.h=new t.a.ab}catch(r){this.h=new zu}this.m=new zu,this.f=E(this.Xb,this),this.b={}}function oc(){return Xu||(Xu=new ic),Xu}function ac(t,e){switch(e){case"session":return t.h;case"none":return t.m;default:return t.g}}function sc(t,e){return"firebase:"+t.name+(e?":"+e:"")}function uc(t,e,n){return n=sc(e,n),"local"==e.D&&(t.b[n]=null),ac(t,e.D).T(n)}function cc(t){t.c&&(clearInterval(t.c),t.c=null)}function lc(t){this.a=t,this.b=oc()}(n=ic.prototype).get=function(t,e){return ac(this,t.D).get(sc(t,e))},n.set=function(t,e,n){var r=sc(t,n),i=this,o=ac(this,t.D);return o.set(r,e).then((function(){return o.get(r)})).then((function(e){"local"==t.D&&(i.b[r]=e)}))},n.addListener=function(t,e,n){t=sc(t,e),this.l&&(this.b[t]=u.localStorage.getItem(t)),vt(this.a)&&(ac(this,"local").ca(this.f),this.i||(fr()||!Gr())&&u.indexedDB||!this.l||function(t){cc(t),t.c=setInterval((function(){for(var e in t.a){var n=u.localStorage.getItem(e),r=t.b[e];n!=r&&(t.b[e]=n,n=new Ze({type:"storage",key:e,target:window,oldValue:r,newValue:n,a:!0}),t.Xb(n))}}),1e3)}(this)),this.a[t]||(this.a[t]=[]),this.a[t].push(n)},n.removeListener=function(t,e,n){t=sc(t,e),this.a[t]&&(J(this.a[t],(function(t){return t==n})),0==this.a[t].length&&delete this.a[t]),vt(this.a)&&(ac(this,"local").ia(this.f),cc(this))},n.Xb=function(t){if(t&&t.g){var e=t.a.key;if(null==e)for(var n in this.a){var r=this.b[n];"undefined"===typeof r&&(r=null);var i=u.localStorage.getItem(n);i!==r&&(this.b[n]=i,this.lb(n))}else if(0==e.indexOf("firebase:")&&this.a[e]){if("undefined"!==typeof t.a.a?ac(this,"local").ia(this.f):cc(this),this.v)if(n=u.localStorage.getItem(e),(r=t.a.newValue)!==n)null!==r?u.localStorage.setItem(e,r):u.localStorage.removeItem(e);else if(this.b[e]===r&&"undefined"===typeof t.a.a)return;var o=this;n=function(){"undefined"===typeof t.a.a&&o.b[e]===u.localStorage.getItem(e)||(o.b[e]=u.localStorage.getItem(e),o.lb(e))},$t&&ue&&10==ue&&u.localStorage.getItem(e)!==t.a.newValue&&t.a.newValue!==t.a.oldValue?setTimeout(n,10):n()}}else K(t,E(this.lb,this))},n.lb=function(t){this.a[t]&&K(this.a[t],(function(t){t()}))};var fc,hc={name:"authEvent",D:"local"};function pc(){this.a=oc()}function dc(t,e){this.b=vc,this.f=u.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.h=t,this.i=e,this.l=u.Int32Array?new Int32Array(64):Array(64),void 0===fc&&(fc=u.Int32Array?new Int32Array(Ec):Ec),this.reset()}T(dc,(function(){this.b=-1}));for(var vc=64,gc=vc-1,yc=[],mc=0;
2mc<gc;mc++)yc[mc]=0;var bc=X(128,yc);function wc(t){for(var e=t.f,n=t.l,r=0,i=0;i<e.length;)n[r++]=e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3],i=4*r;for(e=16;64>e;e++){i=0|n[e-15],r=0|n[e-2];var o=(0|n[e-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,a=(0|n[e-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)|0;n[e]=o+a|0}r=0|t.a[0],i=0|t.a[1];var s=0|t.a[2],u=0|t.a[3],c=0|t.a[4],l=0|t.a[5],f=0|t.a[6];for(o=0|t.a[7],e=0;64>e;e++){var h=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&s^i&s)|0;a=(o=o+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0)+((a=(a=c&l^~c&f)+(0|fc[e])|0)+(0|n[e])|0)|0,o=f,f=l,l=c,c=u+a|0,u=s,s=i,i=r,r=a+h|0}t.a[0]=t.a[0]+r|0,t.a[1]=t.a[1]+i|0,t.a[2]=t.a[2]+s|0,t.a[3]=t.a[3]+u|0,t.a[4]=t.a[4]+c|0,t.a[5]=t.a[5]+l|0,t.a[6]=t.a[6]+f|0,t.a[7]=t.a[7]+o|0}function _c(t,e,n){void 0===n&&(n=e.length);var r=0,i=t.c;if("string"===typeof e)for(;r<n;)t.f[i++]=e.charCodeAt(r++),i==t.b&&(wc(t),i=0);else{if(!d(e))throw Error("message must be string or array");for(;r<n;){var o=e[r++];if(!("number"==typeof o&&0<=o&&255>=o&&o==(0|o)))throw Error("message must be a byte array");t.f[i++]=o,i==t.b&&(wc(t),i=0)}}t.c=i,t.g+=n}dc.prototype.reset=function(){this.g=this.c=0,this.a=u.Int32Array?new Int32Array(this.i):Z(this.i)};var Ec=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Oc(){dc.call(this,8,Sc)}T(Oc,dc);var Sc=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function Tc(t,e,n,r,i,o){this.m=t,this.h=e,this.l=n,this.v=r||null,this.u=i||null,this.s=o,this.i=e+":"+n,this.A=new pc,this.g=new lc(this.i),this.f=null,this.b=[],this.a=this.c=null}function Ic(t){return new C("invalid-cordova-configuration",t)}function Cc(t){var e=new Oc;_c(e,t),t=[];var n=8*e.g;56>e.c?_c(e,bc,56-e.c):_c(e,bc,e.b-(e.c-56));for(var r=63;56<=r;r--)e.f[r]=255&n,n/=256;for(wc(e),r=n=0;r<e.h;r++)for(var i=24;0<=i;i-=8)t[n++]=e.a[r]>>i&255;return function(t){return G(t,(function(t){return 1<(t=t.toString(16)).length?t:"0"+t})).join("")}(t)}function kc(t,e){for(var n=0;n<t.b.length;n++)try{t.b[n](e)}catch(r){}}function Pc(t){return t.f||(t.f=t.la().then((function(){return new Ee((function(e){t.Ea((function n(r){return e(r),t.Ra(n),!1})),function(t){function e(e){r=!0,i&&i.cancel(),Ac(t).then((function(r){var i=n;if(r&&e&&e.url){var o=null;-1!=(i=so(e.url)).indexOf("/__/auth/callback")&&(o=(o="object"===typeof(o=Vr(Vn(o=qn(i),"firebaseError")||null))?k(o):null)?new Ho(r.c,r.b,null,null,o,null,r.S()):new Ho(r.c,r.b,i,r.f,null,null,r.S())),i=o||n}kc(t,i)}))}var n=new Ho("unknown",null,null,null,new C("no-auth-event")),r=!1,i=kn(500).then((function(){return Ac(t).then((function(){r||kc(t,n)}))})),o=u.handleOpenURL;u.handleOpenURL=function(t){if(0==t.toLowerCase().indexOf(xr("BuildInfo.packageName",u).toLowerCase()+"://")&&e({url:t}),"function"===typeof o)try{o(t)}catch(n){console.error(n)}},Go||(Go=new Ko),function(t){var e=Go;e.a.push(t),e.b||(e.b=function(t){for(var n=0;n<e.a.length;n++)e.a[n](t)},"function"===typeof(t=xr("universalLinks.subscribe",u))&&t(null,e.b))}(e)}(t)}))}))),t.f}function Ac(t){var e=null;return function(t){return t.b.get(hc,t.a).then((function(t){return zo(t)}))}(t.g).then((function(n){return e=n,uc((n=t.g).b,hc,n.a)})).then((function(){return e}))}function Nc(t){this.a=t,this.b=oc()}(n=Tc.prototype).la=function(){return this.Ia?this.Ia:this.Ia=(_r(void 0)?wr().then((function(){return new Ee((function(t,e){var n=u.document,r=setTimeout((function(){e(Error("Cordova framework is not ready."))}),1e3);n.addEventListener("deviceready",(function(){clearTimeout(r),t()}),!1)}))})):Ae(Error("Cordova must run in an Android or iOS file scheme."))).then((function(){if("function"!==typeof xr("universalLinks.subscribe",u))throw Ic("cordova-universal-links-plugin-fix is not installed");if("undefined"===typeof xr("BuildInfo.packageName",u))throw Ic("cordova-plugin-buildinfo is not installed");if("function"!==typeof xr("cordova.plugins.browsertab.openUrl",u))throw Ic("cordova-plugin-browsertab is not installed");if("function"!==typeof xr("cordova.InAppBrowser.open",u))throw Ic("cordova-plugin-inappbrowser is not installed")}),(function(){throw new C("cordova-not-ready")}))},n.Nb=function(t,e){return e(new C("operation-not-supported-in-this-environment")),Pe()},n.Lb=function(){return Ae(new C("operation-not-supported-in-this-environment"))},n.Zb=function(){return!1},n.Wb=function(){return!0},n.Sb=function(){return!0},n.Mb=function(t,e,n,r){if(this.c)return Ae(new C("redirect-operation-pending"));var i=this,o=u.document,a=null,s=null,c=null,l=null;return this.c=Pe().then((function(){return Bo(e),Pc(i)})).then((function(){return function(t,e,n,r,i){var o=function(){for(var t=20,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}(),a=new Ho(e,r,null,o,new C("no-auth-event"),null,i),s=xr("BuildInfo.packageName",u);if("string"!==typeof s)throw new C("invalid-cordova-configuration");var c=xr("BuildInfo.displayName",u),l={};if(Nr().toLowerCase().match(/iphone|ipad|ipod/))l.ibi=s;else{if(!Nr().toLowerCase().match(/android/))return Ae(new C("operation-not-supported-in-this-environment"));l.apn=s}c&&(l.appDisplayName=c),o=Cc(o),l.sessionId=o;var f=Eu(t.m,t.h,t.l,e,n,null,r,t.v,l,t.u,i,t.s);return t.la().then((function(){var e=t.i;return t.A.a.set(hc,a.w(),e)})).then((function(){var e=xr("cordova.plugins.browsertab.isAvailable",u);if("function"!==typeof e)throw new C("invalid-cordova-configuration");var n=null;e((function(e){if(e){if("function"!==typeof(n=xr("cordova.plugins.browsertab.openUrl",u)))throw new C("invalid-cordova-configuration");n(f)}else{if("function"!==typeof(n=xr("cordova.InAppBrowser.open",u)))throw new C("invalid-cordova-configuration");e=Nr(),t.a=n(f,e.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||e.match(/(iPad|iPhone|iPod).*OS 8_\d/i)?"_blank":"_system","location=yes")}}))}))}(i,t,e,n,r)})).then((function(){return new Ee((function(t,e){s=function(){var e=xr("cordova.plugins.browsertab.close",u);return t(),"function"===typeof e&&e(),i.a&&"function"===typeof i.a.close&&(i.a.close(),i.a=null),!1},i.Ea(s),c=function(){a||(a=kn(2e3).then((function(){e(new C("redirect-cancelled-by-user"))})))},l=function(){Kr()&&c()},o.addEventListener("resume",c,!1),Nr().toLowerCase().match(/android/)||o.addEventListener("visibilitychange",l,!1)})).o((function(t){return Ac(i).then((function(){throw t}))}))})).na((function(){c&&o.removeEventListener("resume",c,!1),l&&o.removeEventListener("visibilitychange",l,!1),a&&a.cancel(),s&&i.Ra(s),i.c=null}))},n.Ea=function(t){this.b.push(t),Pc(this).o((function(e){"auth/invalid-cordova-configuration"===e.code&&(e=new Ho("unknown",null,null,null,new C("no-auth-event")),t(e))}))},n.Ra=function(t){J(this.b,(function(e){return e==t}))};var xc={name:"pendingRedirect",D:"session"};function jc(t){return uc(t.b,xc,t.a)}function Rc(t,e,n,r){this.h={},this.u=0,this.O=t,this.m=e,this.v=n,this.G=r,this.i=[],this.f=!1,this.l=E(this.s,this),this.b=new $c,this.A=new tl,this.g=new Nc(Gc(this.m,this.v)),this.c={},this.c.unknown=this.b,this.c.signInViaRedirect=this.b,this.c.linkViaRedirect=this.b,this.c.reauthViaRedirect=this.b,this.c.signInViaPopup=this.A,this.c.linkViaPopup=this.A,this.c.reauthViaPopup=this.A,this.a=Dc(this.O,this.m,this.v,P,this.G)}function Dc(t,n,r,i,o){var a=e.a.SDK_VERSION||null;return _r()?new Tc(t,n,r,a,i,o):new mu(t,n,r,a,i,o)}
2function Lc(t){t.f||(t.f=!0,t.a.Ea(t.l));var e=t.a;return t.a.la().o((function(n){throw t.a==e&&t.reset(),n}))}function Mc(t){t.a.Wb()&&Lc(t).o((function(e){var n=new Ho("unknown",null,null,null,new C("operation-not-supported-in-this-environment"));Hc(e)&&t.s(n)})),t.a.Sb()||Yc(t.b)}function Fc(t,e){$(t.i,e)||t.i.push(e),t.f||function(t){return t.b.get(xc,t.a).then((function(t){return"pending"==t}))}(t.g).then((function(e){e?jc(t.g).then((function(){Lc(t).o((function(e){var n=new Ho("unknown",null,null,null,new C("operation-not-supported-in-this-environment"));Hc(e)&&t.s(n)}))})):Mc(t)})).o((function(){Mc(t)}))}function Uc(t,e){J(t.i,(function(t){return t==e}))}Rc.prototype.reset=function(){this.f=!1,this.a.Ra(this.l),this.a=Dc(this.O,this.m,this.v,null,this.G),this.h={}},Rc.prototype.s=function(t){if(!t)throw new C("invalid-auth-event");if(6e5<=S()-this.u&&(this.h={},this.u=0),t&&t.getUid()&&this.h.hasOwnProperty(t.getUid()))return!1;for(var e=!1,n=0;n<this.i.length;n++){var r=this.i[n];if(r.Eb(t.c,t.b)){(e=this.c[t.c])&&(e.i(t,r),t&&(t.f||t.b)&&(this.h[t.getUid()]=!0,this.u=S())),e=!0;break}}return Yc(this.b),e};var Vc=new zr(2e3,1e4),qc=new zr(3e4,6e4);function Bc(t,e,n,r,i,o,a){return t.a.Lb(e,n,r,(function(){t.f||(t.f=!0,t.a.Ea(t.l))}),(function(){t.reset()}),i,o,a)}function Hc(t){return!(!t||"auth/cordova-not-ready"!=t.code)}function zc(t,e,n,r,i){var o;return function(t){return t.b.set(xc,"pending",t.a)}(t.g).then((function(){return t.a.Mb(e,n,r,i).o((function(e){if(Hc(e))throw new C("operation-not-supported-in-this-environment");return o=e,jc(t.g).then((function(){throw o}))})).then((function(){return t.a.Zb()?new Ee((function(){})):jc(t.g).then((function(){return t.qa()})).then((function(){})).o((function(){}))}))}))}function Kc(t,e,n,r,i){return t.a.Nb(r,(function(t){e.ma(n,null,t,i)}),Vc.get())}Rc.prototype.qa=function(){return this.b.qa()};var Wc={};function Gc(t,e,n){return t=t+":"+e,n&&(t=t+":"+n.url),t}function Qc(t,e,n,r){var i=Gc(e,n,r);return Wc[i]||(Wc[i]=new Rc(t,e,n,r)),Wc[i]}function $c(){this.b=null,this.f=[],this.c=[],this.a=null,this.h=this.g=!1}function Yc(t){t.g||(t.g=!0,Zc(t,!1,null,null))}function Jc(t){t.g&&!t.h&&Zc(t,!1,null,null)}function Xc(t,e){if(t.b=function(){return Pe(e)},t.f.length)for(var n=0;n<t.f.length;n++)t.f[n](e)}function Zc(t,e,n,r){e?r?function(t,e){if(t.b=function(){return Ae(e)},t.c.length)for(var n=0;n<t.c.length;n++)t.c[n](e)}(t,r):Xc(t,n):Xc(t,{user:null}),t.f=[],t.c=[]}function tl(){}function el(){this.hb=!1,Object.defineProperty(this,"appVerificationDisabled",{get:function(){return this.hb},set:function(t){this.hb=t},enumerable:!1})}function nl(t,e){this.a=e,Xr(this,"verificationId",t)}function rl(t,e,n,r){return new Uo(t).eb(e,n).then((function(t){return new nl(t,r)}))}function il(t){var e=Gi(t);if(!(e&&e.exp&&e.auth_time&&e.iat))throw new C("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");Zr(this,{token:t,expirationTime:Wr(1e3*e.exp),authTime:Wr(1e3*e.auth_time),issuedAtTime:Wr(1e3*e.iat),signInProvider:e.firebase&&e.firebase.sign_in_provider?e.firebase.sign_in_provider:null,signInSecondFactor:e.firebase&&e.firebase.sign_in_second_factor?e.firebase.sign_in_second_factor:null,claims:e})}function ol(t,e,n){var r=e&&e[sl];if(!r)throw new C("argument-error","Internal assert: Invalid MultiFactorResolver");this.a=t,this.f=gt(e),this.g=n,this.c=new uo(null,r),this.b=[];var i=this;K(e[al]||[],(function(t){(t=ri(t))&&i.b.push(t)})),Xr(this,"auth",this.a),Xr(this,"session",this.c),Xr(this,"hints",this.b)}$c.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},$c.prototype.i=function(t,e){if(t){this.reset(),this.g=!0;var n=t.c,r=t.b,i=t.a&&"auth/web-storage-unsupported"==t.a.code,o=t.a&&"auth/operation-not-supported-in-this-environment"==t.a.code;this.h=!(!i&&!o),"unknown"!=n||i||o?t.a?(Zc(this,!0,null,t.a),Pe()):e.Fa(n,r)?function(t,e,n){n=n.Fa(e.c,e.b);var r=e.g,i=e.f,o=e.h,a=e.S(),s=!!e.c.match(/Redirect$/);n(r,i,a,o).then((function(e){Zc(t,s,e,null)})).o((function(e){Zc(t,s,null,e)}))}(this,t,e):Ae(new C("invalid-auth-event")):(Zc(this,!1,null,null),Pe())}else Ae(new C("invalid-auth-event"))},$c.prototype.qa=function(){var t=this;return new Ee((function(e,n){t.b?t.b().then(e,n):(t.f.push(e),t.c.push(n),function(t){var e=new C("timeout");t.a&&t.a.cancel(),t.a=kn(qc.get()).then((function(){t.b||(t.g=!0,Zc(t,!0,null,e))}))}(t))}))},tl.prototype.i=function(t,e){if(t){var n=t.c,r=t.b;t.a?(e.ma(t.c,null,t.a,t.b),Pe()):e.Fa(n,r)?function(t,e){var n=t.b,r=t.c;e.Fa(r,n)(t.g,t.f,t.S(),t.h).then((function(t){e.ma(r,t,null,n)})).o((function(t){e.ma(r,null,t,n)}))}(t,e):Ae(new C("invalid-auth-event"))}else Ae(new C("invalid-auth-event"))},nl.prototype.confirm=function(t){return t=Vo(this.verificationId,t),this.a(t)};var al="mfaInfo",sl="mfaPendingCredential";function ul(t,e,n,r){C.call(this,"multi-factor-auth-required",r,e),this.b=new ol(t,e,n),Xr(this,"resolver",this.b)}function cl(t,e,n){if(t&&g(t.serverResponse)&&"auth/multi-factor-auth-required"===t.code)try{return new ul(e,t.serverResponse,n,t.message)}catch(r){}return null}function ll(){}function fl(t){Xr(this,"factorId",t.fa),this.a=t}function hl(t){if(fl.call(this,t),this.a.fa!=Uo.PROVIDER_ID)throw new C("argument-error","firebase.auth.PhoneMultiFactorAssertion requires a valid firebase.auth.PhoneAuthCredential")}function pl(t,e){for(var n in Xe.call(this,t),e)this[n]=e[n]}function dl(t,e){this.a=t,this.b=[],this.c=E(this.xc,this),fn(this.a,"userReloaded",this.c);var n=[];e&&e.multiFactor&&e.multiFactor.enrolledFactors&&K(e.multiFactor.enrolledFactors,(function(t){var e=null,r={};
2if(t){t.uid&&(r[ai]=t.uid),t.displayName&&(r[ii]=t.displayName),t.enrollmentTime&&(r[oi]=new Date(t.enrollmentTime).toISOString()),t.phoneNumber&&(r[si]=t.phoneNumber);try{e=new ui(r)}catch(i){}t=e}else t=null;t&&n.push(t)})),vl(this,n)}function vl(t,e){t.b=e,Xr(t,"enrolledFactors",e)}function gl(t,e,n){if(this.i=t,this.h=e,this.g=n,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function yl(t,e){t.stop(),t.b=kn(function(t,e){return e?(t.a=t.c,t.g()):(e=t.a,t.a*=2,t.a>t.f&&(t.a=t.f),e)}(t,e)).then((function(){return function(){var t=u.document,e=null;return Kr()||!t?Pe():new Ee((function(n){e=function(){Kr()&&(t.removeEventListener("visibilitychange",e,!1),n())},t.addEventListener("visibilitychange",e,!1)})).o((function(n){throw t.removeEventListener("visibilitychange",e,!1),n}))}()})).then((function(){return t.i()})).then((function(){yl(t,!0)})).o((function(e){t.h(e)&&yl(t,!1)}))}function ml(t){this.f=t,this.b=this.a=null,this.c=Date.now()}function bl(t,e){"undefined"===typeof e&&(t.b?e=(e=t.b).a-e.g:e=0),t.c=Date.now()+1e3*e}function wl(t,e){t.b=Wi(e[ns]||""),t.a=e.refreshToken,bl(t,"undefined"!==typeof(e=e.expiresIn)?Number(e):void 0)}function _l(t,e){return function(t,e){return new Ee((function(n,r){"refresh_token"==e.grant_type&&e.refresh_token||"authorization_code"==e.grant_type&&e.code?fs(t,t.l+"?key="+encodeURIComponent(t.c),(function(t){t?t.error?r(cu(t)):t.access_token&&t.refresh_token?n(t):r(new C("internal-error")):r(new C("network-request-failed"))}),"POST",Zn(e).toString(),t.g,t.v.get()):r(new C("internal-error"))}))}(t.f,e).then((function(e){return t.b=Wi(e.access_token),t.a=e.refresh_token,bl(t,e.expires_in),{accessToken:t.b.toString(),refreshToken:t.a}})).o((function(e){throw"auth/user-token-expired"==e.code&&(t.a=null),e}))}function El(t,e){this.a=t||null,this.b=e||null,Zr(this,{lastSignInTime:Wr(e||null),creationTime:Wr(t||null)})}function Ol(t,e,n,r,i,o){Zr(this,{uid:t,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:o||null,providerId:e})}function Sl(t,n,r){this.G=[],this.l=t.apiKey,this.m=t.appName,this.s=t.authDomain||null;var i=e.a.SDK_VERSION?Ar(e.a.SDK_VERSION):null;this.a=new ts(this.l,j(P),i),t.emulatorConfig&&us(this.a,t.emulatorConfig),this.b=new ml(this.a),xl(this,n[ns]),wl(this.b,n),Xr(this,"refreshToken",this.b.a),Dl(this,r||{}),On.call(this),this.P=!1,this.s&&Rr()&&(this.h=Qc(this.s,this.l,this.m)),this.R=[],this.f=null,this.u=function(t){return new gl((function(){return t.I(!0)}),(function(t){return!(!t||"auth/network-request-failed"!=t.code)}),(function(){var e=t.b.c-Date.now()-3e5;return 0<e?e:0}))}(this),this.$=E(this.gb,this);var o=this;this.pa=null,this.Ba=function(t){o.wa(t.i)},this.ba=null,this.za=function(t){us(o.a,t.c)},this.W=null,this.X=[],this.Aa=function(t){Cl(o,t.f)},this.aa=null,this.N=new dl(this,r),Xr(this,"multiFactor",this.N)}function Tl(t,e){t.ba&&dn(t.ba,"languageCodeChanged",t.Ba),(t.ba=e)&&fn(e,"languageCodeChanged",t.Ba)}function Il(t,e){t.W&&dn(t.W,"emulatorConfigChanged",t.za),(t.W=e)&&fn(e,"emulatorConfigChanged",t.za)}function Cl(t,n){t.X=n,ls(t.a,e.a.SDK_VERSION?Ar(e.a.SDK_VERSION,t.X):null)}function kl(t,e){t.aa&&dn(t.aa,"frameworkChanged",t.Aa),(t.aa=e)&&fn(e,"frameworkChanged",t.Aa)}function Pl(t){try{return e.a.app(t.m).auth()}catch(n){throw new C("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+t.m+"'!")}}function Al(t){t.A||t.u.b||(t.u.start(),dn(t,"tokenChanged",t.$),fn(t,"tokenChanged",t.$))}function Nl(t){dn(t,"tokenChanged",t.$),t.u.stop()}function xl(t,e){t.ya=e,Xr(t,"_lat",e)}function jl(t){for(var e=[],n=0;n<t.R.length;n++)e.push(t.R[n](t));return xe(e).then((function(){return t}))}function Rl(t){t.h&&!t.P&&(t.P=!0,Fc(t.h,t))}function Dl(t,e){Zr(t,{uid:e.uid,displayName:e.displayName||null,photoURL:e.photoURL||null,email:e.email||null,emailVerified:e.emailVerified||!1,phoneNumber:e.phoneNumber||null,isAnonymous:e.isAnonymous||!1,tenantId:e.tenantId||null,metadata:new El(e.createdAt,e.lastLoginAt),providerData:[]}),t.a.b=t.tenantId}function Ll(){}function Ml(t){return Pe().then((function(){if(t.A)throw new C("app-deleted")}))}function Fl(t){return G(t.providerData,(function(t){return t.providerId}))}function Ul(t,e){e&&(Vl(t,e.providerId),t.providerData.push(e))}function Vl(t,e){J(t.providerData,(function(t){return t.providerId==e}))}function ql(t,e,n){("uid"!=e||n)&&t.hasOwnProperty(e)&&Xr(t,e,n)}function Bl(t,e){t!=e&&(Zr(t,{uid:e.uid,displayName:e.displayName,photoURL:e.ph
2otoURL,email:e.email,emailVerified:e.emailVerified,phoneNumber:e.phoneNumber,isAnonymous:e.isAnonymous,tenantId:e.tenantId,providerData:[]}),e.metadata?Xr(t,"metadata",function(t){return new El(t.a,t.b)}(e.metadata)):Xr(t,"metadata",new El),K(e.providerData,(function(e){Ul(t,e)})),function(t,e){t.b=e.b,t.a=e.a,t.c=e.c}(t.b,e.b),Xr(t,"refreshToken",t.b.a),vl(t.N,e.N.b))}function Hl(t){return t.I().then((function(e){var n=t.isAnonymous;return function(t,e){return su(t.a,Fs,{idToken:e}).then(E(t.Jc,t))}(t,e).then((function(){return n||ql(t,"isAnonymous",!1),e}))}))}function zl(t,e){e[ns]&&t.ya!=e[ns]&&(wl(t.b,e),t.dispatchEvent(new pl("tokenChanged")),xl(t,e[ns]),ql(t,"refreshToken",t.b.a))}function Kl(t,e){return Hl(t).then((function(){if($(Fl(t),e))return jl(t).then((function(){throw new C("provider-already-linked")}))}))}function Wl(t,e,n){return ti({user:t,credential:qo(e),additionalUserInfo:e=Xi(e),operationType:n})}function Gl(t,e){return zl(t,e),t.reload().then((function(){return t}))}function Ql(t,n,r,i,o){if(!Rr())return Ae(new C("operation-not-supported-in-this-environment"));if(t.f&&!o)return Ae(t.f);var a=Ji(r.providerId),s=qr(t.uid+":::"),u=null;(!Mr()||Er())&&t.s&&r.isOAuthProvider&&(u=Eu(t.s,t.l,t.m,n,r,null,s,e.a.SDK_VERSION||null,null,null,t.tenantId));var c=yr(u,a&&a.ua,a&&a.ta);return i=i().then((function(){if(Yl(t),!o)return t.I().then((function(){}))})).then((function(){return Bc(t.h,c,n,r,s,!!u,t.tenantId)})).then((function(){return new Ee((function(e,r){t.ma(n,null,new C("cancelled-popup-request"),t.i||null),t.g=e,t.O=r,t.i=s,t.c=Kc(t.h,t,n,c,s)}))})).then((function(t){return c&&gr(c),t?ti(t):null})).o((function(t){throw c&&gr(c),t})),Jl(t,i,o)}function $l(t,e,n,r,i){if(!Rr())return Ae(new C("operation-not-supported-in-this-environment"));if(t.f&&!i)return Ae(t.f);var o=null,a=qr(t.uid+":::");return r=r().then((function(){if(Yl(t),!i)return t.I().then((function(){}))})).then((function(){return t.ga=a,jl(t)})).then((function(e){return t.ha&&(e=(e=t.ha).b.set(tf,t.w(),e.a)),e})).then((function(){return zc(t.h,e,n,a,t.tenantId)})).o((function(e){if(o=e,t.ha)return ef(t.ha);throw o})).then((function(){if(o)throw o})),Jl(t,r,i)}function Yl(t){if(!t.h||!t.P){if(t.h&&!t.P)throw new C("internal-error");throw new C("auth-domain-config-required")}}function Jl(t,e,n){var r=function(t,e,n){return t.f&&!n?(e.cancel(),Ae(t.f)):e.o((function(e){throw!e||"auth/user-disabled"!=e.code&&"auth/user-token-expired"!=e.code||(t.f||t.dispatchEvent(new pl("userInvalidated")),t.f=e),e}))}(t,e,n);return t.G.push(r),r.na((function(){Y(t.G,r)})),r.o((function(e){var n=null;throw e&&"auth/multi-factor-auth-required"===e.code&&(n=cl(e.w(),Pl(t),E(t.ic,t))),n||e}))}function Xl(t){if(!t.apiKey)return null;var e={apiKey:t.apiKey,authDomain:t.authDomain,appName:t.appName,emulatorConfig:t.emulatorConfig},n={};if(!t.stsTokenManager||!t.stsTokenManager.accessToken)return null;n[ns]=t.stsTokenManager.accessToken,n.refreshToken=t.stsTokenManager.refreshToken||null;var r=t.stsTokenManager.expirationTime;r&&(n.expiresIn=(r-Date.now())/1e3);var i=new Sl(e,n,t);return t.providerData&&K(t.providerData,(function(t){t&&Ul(i,ti(t))})),t.redirectEventId&&(i.ga=t.redirectEventId),i}function Zl(t){this.a=t,this.b=oc()}ol.prototype.Qc=function(t){var e=this;return t.rb(this.a.a,this.c).then((function(t){var n=gt(e.f);return delete n[al],delete n[sl],mt(n,t),e.g(n)}))},T(ul,C),ll.prototype.rb=function(t,e,n){return e.type==co?function(t,e,n,r){return n.Ha().then((function(n){return n={idToken:n},"undefined"!==typeof r&&(n.displayName=r),mt(n,{phoneVerificationInfo:Fo(t.a)}),su(e,Ls,n)}))}(this,t,e,n):function(t,e,n){return n.Ha().then((function(n){return mt(n={mfaPendingCredential:n},{phoneVerificationInfo:Fo(t.a)}),su(e,Ms,n)}))}(this,t,e)},T(fl,ll),T(hl,fl),T(pl,Xe),(n=dl.prototype).xc=function(t){vl(this,function(t){var e=[];return K(t.mfaInfo||[],(function(t){(t=ri(t))&&e.push(t)})),e}(t.gd))},n.Qb=function(){return this.a.I().then((function(t){return new uo(t,null)}))},n.ec=function(t,e){var n=this,r=this.a.a;return this.Qb().then((function(n){return t.rb(r,n,e)})).then((function(t){return zl(n.a,t),n.a.reload()}))},n.ad=function(t){var e=this,n="string"===typeof t?t:t.uid,r=this.a.a;return this.a.I().then((function(t){return su(r,au,{idToken:t,mfaEnrollmentId:n})})).then((function(t){var r=W(e.b,(function(t){return t.uid!=n}));return vl(e,r),zl(e.a,t),e.a.reload().o((function(t){if("auth/user-token-expired"!=t.code)throw t}))}))},n.w=function(){return{multiFactor:{enrolledFactors:G(this.b,(function(t){return t.w()}))}}},gl.prototype.start=function(){this.a=this.c,yl(this,!0)},gl.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},ml.prototype.w=function(){return{apiKey:this.f.c,refreshToken:this.a,accessToken:this.b&&this.b.toString(),expirationTime:this.c}},ml.prototype.getToken=function(t){return t=!!t,this.b&&!this.a?Ae(new C("user-token-expired")):t||!this.b||Date.now()>this.c-3e4?this.a?_l(this,{grant_type:"refresh_token",refresh_token:this.a}):Pe(null):Pe({accessToken:this.b.toString(),refreshToken:this.a})},El.prototype.w=function(){return{lastLoginAt:this.b,createdAt:this.a}},T(Sl,On),Sl.prototype.wa=function(t){this.pa=t,ss(this.a,t)},Sl.prototype.ka=function(){return this.pa},Sl.prototype.Ga=function(){return Z(this.X)},Sl.prototype.gb=function(){this.u.b&&(this.u.stop(),this.u.start())},Xr(Sl.prototype,"providerId","firebase"),(n=Sl.prototype).reload=function(){var t=this;return Jl(this,Ml(this).then((function(){return Hl(t).then((function(){return jl(t)})).then(Ll)})))},n.nc=function(t){return this.I(t).then((function(t){return new il(t)}))},n.I=function(t){var e=this;return Jl(this,Ml(this).then((function(){return e.b.getToken(t)})).then((function(t){if(!t)throw new C("internal-error");
2return t.accessToken!=e.ya&&(xl(e,t.accessToken),e.dispatchEvent(new pl("tokenChanged"))),ql(e,"refreshToken",t.refreshToken),t.accessToken})))},n.Jc=function(t){if(!(t=t.users)||!t.length)throw new C("internal-error");Dl(this,{uid:(t=t[0]).localId,displayName:t.displayName,photoURL:t.photoUrl,email:t.email,emailVerified:!!t.emailVerified,phoneNumber:t.phoneNumber,lastLoginAt:t.lastLoginAt,createdAt:t.createdAt,tenantId:t.tenantId});for(var e=function(t){return(t=t.providerUserInfo)&&t.length?G(t,(function(t){return new Ol(t.rawId,t.providerId,t.email,t.displayName,t.photoUrl,t.phoneNumber)})):[]}(t),n=0;n<e.length;n++)Ul(this,e[n]);ql(this,"isAnonymous",!(this.email&&t.passwordHash)&&!(this.providerData&&this.providerData.length)),this.dispatchEvent(new pl("userReloaded",{gd:t}))},n.Kc=function(t){return Yr("firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateWithCredential instead."),this.sb(t)},n.sb=function(t){var e=this,n=null;return Jl(this,t.c(this.a,this.uid).then((function(t){return zl(e,t),n=Wl(e,t,"reauthenticate"),e.f=null,e.reload()})).then((function(){return n})),!0)},n.Bc=function(t){return Yr("firebase.User.prototype.linkAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.linkWithCredential instead."),this.pb(t)},n.pb=function(t){var e=this,n=null;return Jl(this,Kl(this,t.providerId).then((function(){return e.I()})).then((function(n){return t.b(e.a,n)})).then((function(t){return n=Wl(e,t,"link"),Gl(e,t)})).then((function(){return n})))},n.Cc=function(t,e){var n=this;return Jl(this,Kl(this,"phone").then((function(){return rl(Pl(n),t,e,E(n.pb,n))})))},n.Lc=function(t,e){var n=this;return Jl(this,Pe().then((function(){return rl(Pl(n),t,e,E(n.sb,n))})),!0)},n.Ab=function(t){var e=this;return Jl(this,this.I().then((function(n){return e.a.Ab(n,t)})).then((function(t){return zl(e,t),e.reload()})))},n.dd=function(t){var e=this;return Jl(this,this.I().then((function(n){return t.b(e.a,n)})).then((function(t){return zl(e,t),e.reload()})))},n.Bb=function(t){var e=this;return Jl(this,this.I().then((function(n){return e.a.Bb(n,t)})).then((function(t){return zl(e,t),e.reload()})))},n.Cb=function(t){if(void 0===t.displayName&&void 0===t.photoURL)return Ml(this);var e=this;return Jl(this,this.I().then((function(n){return e.a.Cb(n,{displayName:t.displayName,photoUrl:t.photoURL})})).then((function(t){return zl(e,t),ql(e,"displayName",t.displayName||null),ql(e,"photoURL",t.photoUrl||null),K(e.providerData,(function(t){"password"===t.providerId&&(Xr(t,"displayName",e.displayName),Xr(t,"photoURL",e.photoURL))})),jl(e)})).then(Ll))},n.bd=function(t){var e=this;return Jl(this,Hl(this).then((function(n){return $(Fl(e),t)?function(t,e,n){return su(t,js,{idToken:e,deleteProvider:n})}(e.a,n,[t]).then((function(t){var n={};return K(t.providerUserInfo||[],(function(t){n[t.providerId]=!0})),K(Fl(e),(function(t){n[t]||Vl(e,t)})),n[Uo.PROVIDER_ID]||Xr(e,"phoneNumber",null),jl(e)})):jl(e).then((function(){throw new C("no-such-provider")}))})))},n.delete=function(){var t=this;return Jl(this,this.I().then((function(e){return su(t.a,xs,{idToken:e})})).then((function(){t.dispatchEvent(new pl("userDeleted"))}))).then((function(){for(var e=0;e<t.G.length;e++)t.G[e].cancel("app-deleted");Tl(t,null),Il(t,null),kl(t,null),t.G=[],t.A=!0,Nl(t),Xr(t,"refreshToken",null),t.h&&Uc(t.h,t)}))},n.Eb=function(t,e){return!!("linkViaPopup"==t&&(this.i||null)==e&&this.g||"reauthViaPopup"==t&&(this.i||null)==e&&this.g||"linkViaRedirect"==t&&(this.ga||null)==e||"reauthViaRedirect"==t&&(this.ga||null)==e)},n.ma=function(t,e,n,r){"linkViaPopup"!=t&&"reauthViaPopup"!=t||r!=(this.i||null)||(n&&this.O?this.O(n):e&&!n&&this.g&&this.g(e),this.c&&(this.c.cancel(),this.c=null),delete this.g,delete this.O)},n.Fa=function(t,e){return"linkViaPopup"==t&&e==(this.i||null)?E(this.Jb,this):"reauthViaPopup"==t&&e==(this.i||null)?E(this.Kb,this):"linkViaRedirect"==t&&(this.ga||null)==e?E(this.Jb,this):"reauthViaRedirect"==t&&(this.ga||null)==e?E(this.Kb,this):null},n.Dc=function(t){var e=this;return Ql(this,"linkViaPopup",t,(function(){return Kl(e,t.providerId).then((function(){return jl(e)}))}),!1)},n.Mc=function(t){return Ql(this,"reauthViaPopup",t,(function(){return Pe()}),!0)},n.Ec=function(t){var e=this;
2return $l(this,"linkViaRedirect",t,(function(){return Kl(e,t.providerId)}),!1)},n.Nc=function(t){return $l(this,"reauthViaRedirect",t,(function(){return Pe()}),!0)},n.Jb=function(t,e,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var o=null;return Jl(this,this.I().then((function(n){return Ts(i.a,{requestUri:t,postBody:r,sessionId:e,idToken:n})})).then((function(t){return o=Wl(i,t,"link"),Gl(i,t)})).then((function(){return o})))},n.Kb=function(t,e,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var o=null;return Jl(this,Pe().then((function(){return ho(Is(i.a,{requestUri:t,sessionId:e,postBody:r,tenantId:n}),i.uid)})).then((function(t){return o=Wl(i,t,"reauthenticate"),zl(i,t),i.f=null,i.reload()})).then((function(){return o})),!0)},n.tb=function(t){var e=this,n=null;return Jl(this,this.I().then((function(e){return n=e,"undefined"===typeof t||vt(t)?{}:Bi(new xi(t))})).then((function(t){return e.a.tb(n,t)})).then((function(t){if(e.email!=t)return e.reload()})).then((function(){})))},n.Db=function(t,e){var n=this,r=null;return Jl(this,this.I().then((function(t){return r=t,"undefined"===typeof e||vt(e)?{}:Bi(new xi(e))})).then((function(e){return n.a.Db(r,t,e)})).then((function(t){if(n.email!=t)return n.reload()})).then((function(){})))},n.ic=function(t){var e=null,n=this;return Jl(this,t=ho(Pe(t),n.uid).then((function(t){return e=Wl(n,t,"reauthenticate"),zl(n,t),n.f=null,n.reload()})).then((function(){return e})),!0)},n.toJSON=function(){return this.w()},n.w=function(){var t={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,tenantId:this.tenantId,providerData:[],apiKey:this.l,appName:this.m,authDomain:this.s,stsTokenManager:this.b.w(),redirectEventId:this.ga||null};return this.metadata&&mt(t,this.metadata.w()),K(this.providerData,(function(e){t.providerData.push(function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}(e))})),mt(t,this.N.w()),t};var tf={name:"redirectUser",D:"session"};function ef(t){return uc(t.b,tf,t.a)}function nf(t){this.a=t,this.b=oc(),this.c=null,this.f=function(t){var e=af("local"),n=af("session"),r=af("none");return function(t,e,n){var r=sc(e,n),i=ac(t,e.D);return t.get(e,n).then((function(o){var a=null;try{a=Vr(u.localStorage.getItem(r))}catch(s){}if(a&&!o)return u.localStorage.removeItem(r),t.set(e,a,n);a&&o&&"localStorage"!=i.type&&u.localStorage.removeItem(r)}))}(t.b,e,t.a).then((function(){return t.b.get(n,t.a)})).then((function(i){return i?n:t.b.get(r,t.a).then((function(n){return n?r:t.b.get(e,t.a).then((function(n){return n?e:t.b.get(of,t.a).then((function(t){return t?af(t):e}))}))}))})).then((function(e){return t.c=e,rf(t,e.D)})).o((function(){t.c||(t.c=e)}))}(this),this.b.addListener(af("local"),this.a,E(this.g,this))}function rf(t,e){var n,r=[];for(n in rc)rc[n]!==e&&r.push(uc(t.b,af(rc[n]),t.a));return r.push(uc(t.b,of,t.a)),function(t){return new Ee((function(e,n){var r=t.length,i=[];if(r)for(var o=function(t,n){r--,i[t]=n,0==r&&e(i)},a=function(t){n(t)},s=0;s<t.length;s++)Ne(t[s],O(o,s),a);else e(i)}))}(r)}nf.prototype.g=function(){var t=this,e=af("local");lf(this,(function(){return Pe().then((function(){return t.c&&"local"!=t.c.D?t.b.get(e,t.a):null})).then((function(n){if(n)return rf(t,"local").then((function(){t.c=e}))}))}))};var of={name:"persistence",D:"session"};function af(t){return{name:"authUser",D:t}}function sf(t,e){return lf(t,(function(){return t.b.set(t.c,e.w(),t.a)}))}function uf(t){return lf(t,(function(){return uc(t.b,t.c,t.a)}))}function cf(t,e,n){return lf(t,(function(){return t.b.get(t.c,t.a).then((function(t){return t&&e&&(t.authDomain=e),t&&n&&(t.emulatorConfig=n),Xl(t||{})}))}))}function lf(t,e){return t.f=t.f.then(e,e),t.f}function ff(t){if(this.m=!1,Xr(this,"settings",new el),Xr(this,"app",t),!wf(this).options||!wf(this).options.apiKey)throw new C("invalid-api-key");t=e.a.SDK_VERSION?Ar(e.a.SDK_VERSION):null,this.a=new ts(wf(this).options&&wf(this).options.apiKey,j(P),t),this.R=[],this.u=[],this.P=[],this.ac=e.a.INTERNAL.createSubscribe(E(this.yc,this)),this.X=void 0,this.bc=e.a.INTERNAL.createSubscribe(E(this.zc,this)),mf(this,null),this.l=new nf(wf(this).options.apiKey+":"+wf(this).name),this.G=new Zl(wf(this).options.apiKey+":"+wf(this).name),this.$=Sf(this,function(t){var e=wf(t).options.authDomain,n=function(t){var e=function(t,e){return t.b.get(tf,t.a).then((function(t){return t&&e&&(t.authDomain=e),Xl(t||{})}))}(t.G,wf(t).options.authDomain).then((function(e){return(t.s=e)&&(e.ha=t.G),ef(t.G)}));return Sf(t,e)}(t).then((function(){return cf(t.l,e,t.f)})).then((function(e){return e?(e.ha=t.G,t.s&&(t.s.ga||null)==(e.ga||null)?e:e.reload().then((function(){return sf(t.l,e).then((function(){return e}))})).o((function(n){return"auth/network-request-failed"==n.code?e:uf(t.l)}))):null})).then((function(e){mf(t,e||null)}));return Sf(t,n)}(this)),this.h=Sf(this,function(t){return t.$.then((function(){return gf(t)})).o((function(){})).then((function(){if(!t.m)return t.pa()})).o((function(){})).then((function(){if(!t.m){t.ba=!0;var e=t.l;e.b.addListener(af("local"),e.a,t.pa)}}))}(this)),this.ba=!1,this.pa=E(this.Yc,this),this.Ba=E(this.da,this),this.ya=E(this.kc,this),this.za=E(this.vc,this),this.Aa=E(this.wc,this),this.b=null,function(t){var e=wf(t).options.authDomain,n=wf(t).options.apiKey;e&&Rr()&&(t.gb=t.$.then((function(){if(!t.m){if(t.b=Qc(e,n,wf(t).name,t.f),Fc(t.b,t),_f(t)&&Rl(_f(t)),t.s){Rl(t.s);var r=t.s;r.wa(t.ka()),Tl(r,t),Cl(r=t.s,t.N),kl(r,t),us((r=t.s).a,t.f),Il(r,t),t.s=null}return t.b}})))}(this),this.INTERNAL={},this.INTERNAL.delete=E(this.delete,this),this.INTERNAL.logFramework=E(this.Fc,this),this.A=0,On.call(this),function(t){Object.defineProperty(t,"lc",{get:function(){return this.ka()},set:function(t){this.wa(t)},enumerable:!1}),t.aa=null,Object.defineProperty(t,"ti",{get:function(){return this.S()},set:function(t){this.xb(t)},enumerable:!1}),t.W=null}(this),this.N=[],this.f=null}function hf(t){Xe.call(this,"languageCodeChanged"),this.i=t}function pf(t){Xe.call(this,"emulatorConfigChanged"),this.c=t}function df(t){Xe.call(this,"frameworkChanged"),this.f=t}function vf(t){return t.gb||Ae(new C("auth-domain-config-required"))}function gf(t){if(!Rr())return Ae(new C("operation-not-supported-in-this-environment"));var e=vf(t).then((function(){return t.b.qa()})).then((function(t){return t?ti(t):null}));return Sf(t,e)}function yf(t,e){var n={};return n.apiKey=wf(t).options.apiKey,n.authDomain=wf(t).options.authDomain,n.appName=wf(t).name,t.f&&(n.emulatorConfig=t.f),t.$.then((function(){return function(t,e,n,r){var i=new Sl(t,e);return n&&(i.ha=n),r&&Cl(i,r),i.reload().then((function(){return i}))}(n,e,t.G,t.Ga())})).then((function(e){return _f(t)&&e.uid==_f(t).uid?(Bl(_f(t),e),t.da(e)):(mf(t,e),Rl(e),t.da(e))})).then((function(){Of(t)}))}function mf(t,e){_f(t)&&(function(t,e){J(t.R,(function(t){return t==e}))}(_f(t),t.Ba),dn(_f(t),"tokenChanged",t.ya),dn(_f(t),"userDeleted",t.za),dn(_f(t),"userInvalidated",t.Aa),Nl(_f(t))),e&&(e.R.push(t.Ba),fn(e,"tokenChanged",t.ya),fn(e,"userDeleted",t.za),fn(e,"userInvalidated",t.Aa),0<t.A&&Al(e)),Xr(t,"currentUser",e),e&&(e.wa(t.ka()),Tl(e,t),Cl(e,t.N),kl(e,t),us(e.a,t.f),Il(e,t))}function bf(t,e){var n=null,r=null;return Sf(t,e.then((function(e){return n=qo(e),r=Xi(e),yf(t,e)}),(function(e){var n=null;throw e&&"auth/multi-factor-auth-required"===e.code&&(n=cl(e.w(),t,E(t.jc,t))),n||e})).then((function(){return ti({user:_f(t),credential:n,additionalUserInfo:r,operationType:"signIn"})})))}function wf(t){return t.app}function _f(t){return t.currentUser}function Ef(t){return _f(t)&&_f(t)._lat||null}function Of(t){if(t.ba){for(var e=0;e<t.u.length;e++)t.u[e]&&t.u[e](Ef(t));if(t.X!==t.getUid()&&t.P.length)for(t.X=t.getUid(),e=0;e<t.P.length;e++)t.P[e]&&t.P[e](Ef(t))}}function Sf(t,e){return t.R.push(e),e.na((function(){Y(t.R,e)})),e}function Tf(){}function If(){this.a={},this.b=1e12}nf.prototype.wb=function(t){var e=null,n=this;return function(t){var e=new C("invalid-persistence-type"),n=new C("unsupported-persistence-type");t:{for(r in rc)if(rc[r]==t){var r=!0;break t}r=!1}if(!r||"string"!==typeof t)throw e;switch(Sr()){case"ReactNative":if("session"===t)throw n;break;case"Node":if("none"!==t)throw n;break;case"Worker":if("session"===t||!Lu()&&"none"!==t)throw n;break;default:if(!jr()&&"none"!==t)throw n}}(t),lf(this,(function(){return t!=n.c.D?n.b.get(n.c,n.a).then((function(r){return e=r,rf(n,t)})).then((function(){if(n.c=af(t),e)return n.b.set(n.c,e,n.a)})):Pe()}))},T(ff,On),T(hf,Xe),T(pf,Xe),T(df,Xe),(n=ff.prototype).wb=function(t){return Sf(this,t=this.l.wb(t))},n.wa=function(t){this.aa===t||this.m||(this.aa=t,ss(this.a,this.aa),this.dispatchEvent(new hf(this.ka())))},n.ka=function(){return this.aa},n.ed=function(){var t=u.navigator;this.wa(t&&(t.languages&&t.languages[0]||t.language||t.userLanguage)||null)},n.fd=function(t,e){if(!this.f){if(!/^https?:\/\//.test(t))throw new C("argument-error","Emulator URL must start with a valid scheme (http:// or https://).");!function(t){"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."),u.document&&!t&&wr().then((function(){var t=u.document.createElement("div");t.innerText="Running in emulator mode. Do not use with production credentials.",t.style.position="fixed",t.style.width="100%",t.style.backgroundColor="#ffffff",t.style.border=".1em solid #000000",t.style.color="#ff0000",t.style.bottom="0px",t.style.left="0px",t.style.margin="0px",t.style.zIndex=1e4,t.style.textAlign="center",t.classList.add("firebase-emulator-warning"),u.document.body.appendChild(t)}))}(!!e&&!!e.disableWarnings),this.f={url:t},this.settings.hb=!0,us(this.a,this.f),this.dispatchEvent(new pf(this.f))}},n.Fc=function(t){this.N.push(t),ls(this.a,e.a.SDK_VERSION?Ar(e.a.SDK_VERSION,this.N):null),this.dispatchEvent(new df(this.N))},n.Ga=function(){return Z(this.N)},n.xb=function(t){this.W===t||this.m||(this.W=t,this.a.b=this.W)},n.S=function(){return this.W},n.toJSON=function(){return{apiKey:wf(this).options.apiKey,authDomain:wf(this).options.authDomain,appName:wf(this).name,currentUser:_f(this)&&_f(this).w()}},n.Eb=function(t,e){switch(t){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.i==e&&!!this.g;default:return!1}},n.ma=function(t,e,n,r){"signInViaPopup"==t&&this.i==r&&(n&&this.O?this.O(n):e&&!n&&this.g&&this.g(e),this.c&&(this.c.cancel(),this.c=null),delete this.g,delete this.O)},n.Fa=function(t,e){return"signInViaRedirect"==t||"signInViaPopup"==t&&this.i==e&&this.g?E(this.hc,this):null},n.hc=function(t,e,n,r){var i=this,o={requestUri:t,postBody:r,sessionId:e,tenantId:n};return this.c&&(this.c.cancel(),this.c=null),i.$.then((function(){return bf(i,Ss(i.a,o))}))},n.Wc=function(t){if(!Rr())return Ae(new C("operation-not-supported-in-this-environment"));var n=this,r=Ji(t.providerId),i=qr(),o=null;(!Mr()||Er())&&wf(this).options.authDomain&&t.isOAuthProvider&&(o=Eu(wf(this).options.authDomain,wf(this).options.apiKey,wf(this).name,"signInViaPopup",t,null,i,e.a.SDK_VERSION||null,null,null,this.S(),this.f));var a=yr(o,r&&r.ua,r&&r.ta);return Sf(this,r=vf(this).then((function(e){return Bc(e,a,"signInViaPopup",t,i,!!o,n.S())})).then((function(){return new Ee((function(t,e){n.ma("signInViaPopup",null,new C("cancelled-popup-request"),n.i),n.g=t,n.O=e,n.i=i,n.c=Kc(n.b,n,"signInViaPopup",a,i)}))})).then((function(t){return a&&gr(a),t?ti(t):null})).o((function(t){throw a&&gr(a),t})))},n.Xc=function(t){if(!Rr())return Ae(new C("operation-not-supported-in-this-environment"));var e=this;return Sf(this,vf(this).then((function(){return function(t){return lf(t,(function(){return t.b.set(of,t.c.D,t.a)}))}(e.l)})).then((function(){return zc(e.b,"signInViaRedirect",t,void 0,e.S())})))},n.qa=function(){var t=this;return gf(this).then((function(e){return t.b&&Jc(t.b.b),e})).o((function(e){throw t.b&&Jc(t.b.b),e}))},n.cd=function(t){if(!t)return Ae(new C("null-user"));if(this.W!=t.tenantId)return Ae(new C("tenant-id-mismatch"));var e=this,n={};n.apiKey=wf(this).options.apiKey,n.authDomain=wf(this).options.authDomain,n.appName=wf(this).name;var r=function(t,e,n,r){var i=t.b,o={};return o[ns]=i.b&&i.b.toString(),o.refreshToken=i.a,e=new Sl(e||{apiKey:t.l,authDomain:t.s,appName:t.m},o),n&&(e.ha=n),r&&Cl(e,r),Bl(e,t),e}(t,n,e.G,e.Ga());return Sf(this,this.h.then((function(){if(wf(e).options.apiKey!=t.l)return r.reload()})).then((function(){return _f(e)&&t.uid==_f(e).uid?(Bl(_f(e),t),e.da(t)):(mf(e,r),Rl(r),e.da(r))})).then((function(){Of(e)})))},n.zb=function(){var t=this;return Sf(this,this.h.then((function(){return t.b&&Jc(t.b.b),_f(t)?(mf(t,null),uf(t.l).then((function(){Of(t)}))):Pe()})))},n.Yc=function(){var t=this;return cf(this.l,wf(this).options.authDomain).then((function(e){if(!t.m){var n;if(n=_f(t)&&e){n=_f(t).uid;var r=e.uid;n=void 0!==n&&null!==n&&""!==n&&void 0!==r&&null!==r&&""!==r&&n==r}if(n)return Bl(_f(t),e),_f(t).I();(_f(t)||e)&&(mf(t,e),e&&(Rl(e),e.ha=t.G),t.b&&Fc(t.b,t),Of(t))}}))},n.da=function(t){return sf(this.l,t)},n.kc=function(){Of(this),this.da(_f(this))},n.vc=function(){this.zb()},n.wc=function(){this.zb()},n.jc=function(t){var e=this;return this.h.then((function(){return bf(e,Pe(t))}))},n.yc=function(t){var e=this;this.addAuthTokenListener((function(){t.next(_f(e))}))},n.zc=function(t){var e=this;!function(t,e){t.P.push(e),Sf(t,t.h.then((function(){!t.m&&$(t.P,e)&&t.X!==t.getUid()&&(t.X=t.getUid(),e(Ef(t)))})))}(this,(function(){t.next(_f(e))}))},n.Hc=function(t,e,n){var r=this;return this.ba&&Promise.resolve().then((function(){"function"===typeof t?t(_f(r)):"function"===typeof t.next&&t.next(_f(r))})),this.ac(t,e,n)},n.Gc=function(t,e,n){var r=this;return this.ba&&Promise.resolve().then((function(){r.X=r.getUid(),"function"===typeof t?t(_f(r)):"function"===typeof t.next&&t.next(_f(r))})),this.bc(t,e,n)},n.mc=function(t){var e=this;return Sf(this,this.h.then((function(){return _f(e)?_f(e).I(t).then((function(t){return{accessToken:t}})):null})))},n.Sc=function(t){var e=this;return this.h.then((function(){return bf(e,su(e.a,eu,{token:t}))})).then((function(t){var n=t.user;return ql(n,"isAnonymous",!1),e.da(n),t}))},n.Tc=function(t,e){var n=this;return this.h.then((function(){return bf(n,su(n.a,nu,{email:t,password:e}))}))},n.dc=function(t,e){var n=this;return this.h.then((function(){return bf(n,su(n.a,As,{email:t,password:e}))}))},n.Za=function(t){var e=this;return this.h.then((function(){return bf(e,t.ja(e.a))}))},n.Rc=function(t){return Yr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInWithCredential instead."),this.Za(t)},n.yb=function(){var t=this;return this.h.then((function(){var e=_f(t);if(e&&e.isAnonymous){var n=ti({providerId:null,isNewUser:!1});return ti({user:e,credential:null,additionalUserInfo:n,operationType:"signIn"})}return bf(t,t.a.yb()).then((function(e){var n=e.user;return ql(n,"isAnonymous",!0),t.da(n),e}))}))},n.getUid=function(){return _f(this)&&_f(this).uid||null},n.cc=function(t){this.addAuthTokenListener(t),this.A++,0<this.A&&_f(this)&&Al(_f(this))},n.Oc=function(t){var e=this;K(this.u,(function(n){n==t&&e.A--})),0>this.A&&(this.A=0),0==this.A&&_f(this)&&Nl(_f(this)),this.removeAuthTokenListener(t)},n.addAuthTokenListener=function(t){var e=this;this.u.push(t),Sf(this,this.h.then((function(){e.m||$(e.u,t)&&t(Ef(e))})))},n.removeAuthTokenListener=function(t){J(this.u,(function(e){return e==t}))},n.delete=function(){this.m=!0;for(var t=0;t<this.R.length;t++)this.R[t].cancel("app-deleted");return this.R=[],this.l&&(t=this.l).b.removeListener(af("local"),t.a,this.pa),this.b&&(Uc(this.b,this),Jc(this.b.b)),Promise.resolve()},n.gc=function(t){return Sf(this,function(t,e){return su(t,Ns,{identifier:e,continueUri:Dr()?hr():"http://localhost"}).then((function(t){return t.signinMethods||[]}))}(this.a,t))},n.Ac=function(t){return!!Do(t)},n.vb=function(t,e){var n=this;return Sf(this,Pe().then((function(){var t=new xi(e);if(!t.c)throw new C("argument-error",Di+" must be true when sending sign in link to email");return Bi(t)})).then((function(e){return n.a.vb(t,e)})).then((function(){})))},n.hd=function(t){return this.Qa(t).the
2n((function(t){return t.data.email}))},n.mb=function(t,e){return Sf(this,this.a.mb(t,e).then((function(){})))},n.Qa=function(t){return Sf(this,this.a.Qa(t).then((function(t){return new ci(t)})))},n.ib=function(t){return Sf(this,this.a.ib(t).then((function(){})))},n.ub=function(t,e){var n=this;return Sf(this,Pe().then((function(){return"undefined"===typeof e||vt(e)?{}:Bi(new xi(e))})).then((function(e){return n.a.ub(t,e)})).then((function(){})))},n.Vc=function(t,e){return Sf(this,rl(this,t,e,E(this.Za,this)))},n.Uc=function(t,e){var n=this;return Sf(this,Pe().then((function(){var r=e||hr(),i=Ro(t,r);if(!(r=Do(r)))throw new C("argument-error","Invalid email link!");if(r.tenantId!==n.S())throw new C("tenant-id-mismatch");return n.Za(i)})))},Tf.prototype.render=function(){},Tf.prototype.reset=function(){},Tf.prototype.getResponse=function(){},Tf.prototype.execute=function(){};var Cf=null;function kf(t,e){return(e=Pf(e))&&t.a[e]||null}function Pf(t){return(t="undefined"===typeof t?1e12:t)?t.toString():null}function Af(t,e){this.g=!1,this.c=e,this.a=this.b=null,this.i="invisible"!==this.c.size,this.f=le(t);var n=this;this.h=function(){n.execute()},this.i?this.execute():fn(this.f,"click",this.h)}function Nf(t){if(t.g)throw Error("reCAPTCHA mock was already deleted!")}function xf(){}function jf(){}If.prototype.render=function(t,e){return this.a[this.b.toString()]=new Af(t,e),this.b++},If.prototype.reset=function(t){var e=kf(this,t);t=Pf(t),e&&t&&(e.delete(),delete this.a[t])},If.prototype.getResponse=function(t){return(t=kf(this,t))?t.getResponse():null},If.prototype.execute=function(t){(t=kf(this,t))&&t.execute()},Af.prototype.getResponse=function(){return Nf(this),this.b},Af.prototype.execute=function(){Nf(this);var t=this;this.a||(this.a=setTimeout((function(){t.b=function(){for(var t=50,e=[];0<t;)e.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),t--;return e.join("")}();var e=t.c.callback,n=t.c["expired-callback"];if(e)try{e(t.b)}catch(r){}t.a=setTimeout((function(){if(t.a=null,t.b=null,n)try{n()}catch(r){}t.i&&t.execute()}),6e4)}),500))},Af.prototype.delete=function(){Nf(this),this.g=!0,clearTimeout(this.a),this.a=null,dn(this.f,"click",this.h)},Xr(xf,"FACTOR_ID","phone"),jf.prototype.g=function(){return Cf||(Cf=new If),Pe(Cf)},jf.prototype.c=function(){};var Rf=null;function Df(){this.b=u.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var Lf=new wt(St,"https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),Mf=new zr(3e4,6e4);Df.prototype.g=function(t){var e=this;return new Ee((function(n,r){var i=setTimeout((function(){r(new C("network-request-failed"))}),Mf.get());!u.grecaptcha||t!==e.f&&!e.b?(u[e.a]=function(){if(u.grecaptcha){e.f=t;var o=u.grecaptcha.render;u.grecaptcha.render=function(t,n){return t=o(t,n),e.b++,t},clearTimeout(i),n(u.grecaptcha)}else clearTimeout(i),r(new C("internal-error"));delete u[e.a]},Pe(Ga(kt(Lf,{onload:e.a,hl:t||""}))).o((function(){clearTimeout(i),r(new C("internal-error","Unable to load external reCAPTCHA dependencies!"))}))):(clearTimeout(i),n(u.grecaptcha))}))},Df.prototype.c=function(){this.b--};var Ff=null;function Uf(t,e,n,r,i,o,a){if(Xr(this,"type","recaptcha"),this.c=this.f=null,this.A=!1,this.m=e,this.g=null,a?(Rf||(Rf=new jf),a=Rf):(Ff||(Ff=new Df),a=Ff),this.v=a,this.a=n||{theme:"light",type:"image"},this.i=[],this.a[Bf])throw new C("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.h="invisible"===this.a[Hf],!u.document)throw new C("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!le(e)||!this.h&&le(e).hasChildNodes())throw new C("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.s=new ts(t,o||null,i||null),this.u=r||function(){return null};var s=this;this.l=[];var c=this.a[Vf];this.a[Vf]=function(t){if(zf(s,t),"function"===typeof c)c(t);else if("string"===typeof c){var e=xr(c,u);"function"===typeof e&&e(t)}};var l=this.a[qf];this.a[qf]=function(){if(zf(s,null),"function"===typeof l)l();else if("string"===typeof l){var t=xr(l,u);"function"===typeof t&&t()}}}var Vf="callback",qf="expired-callback",Bf="sitekey",Hf="size";function zf(t,e){for(var n=0;n<t.l.length;n++)try{t.l[n](e)}catch(r){}}function Kf(t,e){return t.i.push(e),e.na((function(){Y(t.i,e)})),e}function Wf(t){if(t.A)throw new C("internal-error","RecaptchaVerifier instance has been destroyed.")}function Gf(t,n,r){var i=!1;try{this.b=r||e.a.app()}catch(s){throw new C("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.b.options||!this.b.options.apiKey)throw new C("invalid-api-key");r=this.b.options.apiKey;var o=this,a=null;try{a=this.b.auth().Ga()}catch(s){}try{i=this.b.auth().settings.appVerificationDisabledForTesting}catch(s){}a=e.a.SDK_VERSION?Ar(e.a.SDK_VERSION,a):null,Uf.call(this,r,t,n,(function(){try{var t=o.b.auth().ka()}catch(e){t=null}return t}),a,j(P),i)}function Qf(t,e,n,r){t:{n=Array.prototype.slice.call(n);for(var i=0,o=!1,a=0;a<e.length;a++)if(e[a].optional)o=!0;else{if(o)throw new C("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(o=e.length,n.length<i||o<n.length)r="Expected "+(i==o?1==i?"1 argument":i+" arguments":i+"-"+o+" arguments")+" but got "+n.length+".";else{for(i=0;i<n.length;i++)if(o=e[i].optional&&void 0===n[i],!e[i].K(n[i])&&!o){if(e=e[i],0>i||i>=$f.length)throw new C("internal-error","Argument validator received an unsupported number of arguments.");
2n=$f[i],r=(r?"":n+" argument ")+(e.name?'"'+e.name+'" ':"")+"must be "+e.J+".";break t}r=null}}if(r)throw new C("argument-error",t+" failed: "+r)}(n=Uf.prototype).Ia=function(){var t=this;return this.f?this.f:this.f=Kf(this,Pe().then((function(){if(Dr()&&!Or())return wr();throw new C("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")})).then((function(){return t.v.g(t.u())})).then((function(e){return t.g=e,su(t.s,zs,{})})).then((function(e){t.a[Bf]=e.recaptchaSiteKey})).o((function(e){throw t.f=null,e})))},n.render=function(){Wf(this);var t=this;return Kf(this,this.Ia().then((function(){if(null===t.c){var e=t.m;if(!t.h){var n=le(e);e=function(t,e,n){var r=arguments,i=document,o=String(r[0]),a=r[1];if(!ce&&a&&(a.name||a.type)){if(o=["<",o],a.name&&o.push(' name="',Kt(a.name),'"'),a.type){o.push(' type="',Kt(a.type),'"');var s={};mt(s,a),delete s.type,a=s}o.push(">"),o=o.join("")}return o=ge(i,o),a&&("string"===typeof a?o.className=a:Array.isArray(a)?o.className=a.join(" "):fe(o,a)),2<r.length&&ve(i,o,r),o}("DIV"),n.appendChild(e)}t.c=t.g.render(e,t.a)}return t.c})))},n.verify=function(){Wf(this);var t=this;return Kf(this,this.render().then((function(e){return new Ee((function(n){var r=t.g.getResponse(e);if(r)n(r);else{t.l.push((function e(r){r&&(function(t,e){J(t.l,(function(t){return t==e}))}(t,e),n(r))})),t.h&&t.g.execute(t.c)}}))})))},n.reset=function(){Wf(this),null!==this.c&&this.g.reset(this.c)},n.clear=function(){Wf(this),this.A=!0,this.v.c();for(var t=0;t<this.i.length;t++)this.i[t].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.h){t=le(this.m);for(var e;e=t.firstChild;)t.removeChild(e)}},T(Gf,Uf);var $f="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function Yf(t,e){return{name:t||"",J:"a valid string",optional:!!e,K:function(t){return"string"===typeof t}}}function Jf(t,e){return{name:t||"",J:"a boolean",optional:!!e,K:function(t){return"boolean"===typeof t}}}function Xf(t,e){return{name:t||"",J:"a valid object",optional:!!e,K:g}}function Zf(t,e){return{name:t||"",J:"a function",optional:!!e,K:function(t){return"function"===typeof t}}}function th(t,e){return{name:t||"",J:"null",optional:!!e,K:function(t){return null===t}}}function eh(t){return{name:t?t+"Credential":"credential",J:t?"a valid "+t+" credential":"a valid credential",optional:!1,K:function(e){if(!e)return!1;var n=!t||e.providerId===t;return!(!e.ja||!n)}}}function nh(t,e){return g(t)&&"string"===typeof t.type&&t.type===e&&"function"===typeof t.Ha}function rh(t){return g(t)&&"string"===typeof t.uid}function ih(t,e,n,r){return{name:n||"",J:t.J+" or "+e.J,optional:!!r,K:function(n){return t.K(n)||e.K(n)}}}function oh(t,e){for(var n in e){var r=e[n].name;t[r]=uh(r,t[n],e[n].j)}}function ah(t,e){for(var n in e){var r=e[n].name;r!==n&&Object.defineProperty(t,r,{get:O((function(t){return this[t]}),n),set:O((function(t,e,n,r){Qf(t,[n],[r],!0),this[e]=r}),r,n,e[n].jb),enumerable:!0})}}function sh(t,e,n,r){t[e]=uh(e,n,r)}function uh(t,e,n){function r(){var t=Array.prototype.slice.call(arguments);return Qf(o,n,t),e.apply(this,t)}if(!n)return e;var i,o=function(t){return(t=t.split("."))[t.length-1]}(t);for(i in e)r[i]=e[i];for(i in e.prototype)r.prototype[i]=e.prototype[i];return r}oh(ff.prototype,{ib:{name:"applyActionCode",j:[Yf("code")]},Qa:{name:"checkActionCode",j:[Yf("code")]},mb:{name:"confirmPasswordReset",j:[Yf("code"),Yf("newPassword")]},dc:{name:"createUserWithEmailAndPassword",j:[Yf("email"),Yf("password")]},gc:{name:"fetchSignInMethodsForEmail",j:[Yf("email")]},qa:{name:"getRedirectResult",j:[]},Ac:{name:"isSignInWithEmailLink",j:[Yf("emailLink")]},Gc:{name:"onAuthStateChanged",j:[ih(Xf(),Zf(),"nextOrObserver"),Zf("opt_error",!0),Zf("opt_completed",!0)]},Hc:{name:"onIdTokenChanged",j:[ih(Xf(),Zf(),"nextOrObserver"),Zf("opt_error",!0),Zf("opt_completed",!0)]},ub:{name:"sendPasswordResetEmail",j:[Yf("email"),ih(Xf("opt_actionCodeSettings",!0),th(null,!0),"opt_actionCodeSettings",!0)]},vb:{name:"sendSignInLinkToEmail",j:[Yf("email"),Xf("actionCodeSettings")]},wb:{name:"setPersistence",j:[Yf("persistence")]},Rc:{name:"signInAndRetrieveDataWithCredential",j:[eh()]},yb:{name:"signInAnonymously",j:[]},Za:{name:"signInWithCredential",j:[eh()]},Sc:{name:"signInWithCustomToken",j:[Yf("token")]},Tc:{name:"signInWithEmailAndPassword",j:[Yf("email"),Yf("password")]},Uc:{name:"signInWithEmailLink",j:[Yf("email"),Yf("emailLink",!0)]},Vc:{name:"signInWithPhoneNumber",j:[Yf("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]}
2,Wc:{name:"signInWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Xc:{name:"signInWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},cd:{name:"updateCurrentUser",j:[ih({name:"user",J:"an instance of Firebase User",optional:!1,K:function(t){return!!(t&&t instanceof Sl)}},th(),"user")]},zb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[Yf(null,!0)]},ed:{name:"useDeviceLanguage",j:[]},fd:{name:"useEmulator",j:[Yf("url"),Xf("options",!0)]},hd:{name:"verifyPasswordResetCode",j:[Yf("code")]}}),ah(ff.prototype,{lc:{name:"languageCode",jb:ih(Yf(),th(),"languageCode")},ti:{name:"tenantId",jb:ih(Yf(),th(),"tenantId")}}),ff.Persistence=rc,ff.Persistence.LOCAL="local",ff.Persistence.SESSION="session",ff.Persistence.NONE="none",oh(Sl.prototype,{delete:{name:"delete",j:[]},nc:{name:"getIdTokenResult",j:[Jf("opt_forceRefresh",!0)]},I:{name:"getIdToken",j:[Jf("opt_forceRefresh",!0)]},Bc:{name:"linkAndRetrieveDataWithCredential",j:[eh()]},pb:{name:"linkWithCredential",j:[eh()]},Cc:{name:"linkWithPhoneNumber",j:[Yf("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]},Dc:{name:"linkWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Ec:{name:"linkWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Kc:{name:"reauthenticateAndRetrieveDataWithCredential",j:[eh()]},sb:{name:"reauthenticateWithCredential",j:[eh()]},Lc:{name:"reauthenticateWithPhoneNumber",j:[Yf("phoneNumber"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]},Mc:{name:"reauthenticateWithPopup",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},Nc:{name:"reauthenticateWithRedirect",j:[{name:"authProvider",J:"a valid Auth provider",optional:!1,K:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty("isOAuthProvider"))}}]},reload:{name:"reload",j:[]},tb:{name:"sendEmailVerification",j:[ih(Xf("opt_actionCodeSettings",!0),th(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[Yf(null,!0)]},bd:{name:"unlink",j:[Yf("provider")]},Ab:{name:"updateEmail",j:[Yf("email")]},Bb:{name:"updatePassword",j:[Yf("password")]},dd:{name:"updatePhoneNumber",j:[eh("phone")]},Cb:{name:"updateProfile",j:[Xf("profile")]},Db:{name:"verifyBeforeUpdateEmail",j:[Yf("email"),ih(Xf("opt_actionCodeSettings",!0),th(null,!0),"opt_actionCodeSettings",!0)]}}),oh(If.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),oh(Tf.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),oh(Ee.prototype,{na:{name:"finally"},o:{name:"catch"},then:{name:"then"}}),ah(el.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",jb:Jf("appVerificationDisabledForTesting")}}),oh(nl.prototype,{confirm:{name:"confirm",j:[Yf("verificationCode")]}}),sh(fo,"fromJSON",(function(t){t="string"===typeof t?JSON.parse(t):t;for(var e,n=[bo,xo,Mo,go],r=0;r<n.length;r++)if(e=n[r](t))return e;return null}),[ih(Yf(),Xf(),"json")]),sh(jo,"credential",(function(t,e){return new No(t,e)}),[Yf("email"),Yf("password")]),oh(No.prototype,{w:{name:"toJSON",j:[Yf(null,!0)]}}),oh(Oo.prototype,{Ca:{name:"addScope",j:[Yf("scope")]},Ka:{name:"setCustomParameters",j:[Xf("customOAuthParameters")]}}),sh(Oo,"credential",So,[ih(Yf(),Xf(),"token")]),sh(jo,"credentialWithLink",Ro,[Yf("email"),Yf("emailLink")]),oh(To.prototype,{Ca:{name:"addScope",j:[Yf("scope")]},Ka:{name:"setCustomParameters",j:[Xf("customOAuthParameters")]}}),sh(To,"credential",Io,[ih(Yf(),Xf(),"token")]),oh(Co.prototype,{Ca:{name:"addScope",j:[Yf("scope")]},Ka:{name:"setCustomParameters",j:[Xf("customOAuthParameters")]}}),sh(Co,"credential",ko,[ih(Yf(),ih(Xf(),th()),"idToken"),ih(Yf(),th(),"accessToken",!0)]),oh(Po.prototype,{Ka:{name:"setCustomParameters",j:[Xf("customOAuthParameters")]}}),sh(Po,"credential",Ao,[ih(Yf(),Xf(),"token"),Yf("secret",!0)]),oh(Eo.prototype,{Ca:{name:"addScope",j:[Yf("scope")]},credential:{name:"credential",j:[ih(Yf(),ih(Xf(),th()),"optionsOrIdToken"),ih(Yf(),th(),"accessToken",!0)]},Ka:{name:"setCustomParameters",j:[Xf("customOAuthParameters")]}}),oh(yo.prototype,{w:{name:"toJSON",j:[Yf(null,!0)]}}),oh(po.prototype,{w:{name:"toJSON",j:[Yf(null,!0)]}}),sh(Uo,"credential",Vo,[Yf("verificationId"),Yf("verificationCode")]),oh(Uo.prototype,{eb:{name:"verifyPhoneNumber",j:[ih(Yf(),{name:"phoneInfoOptions",J:"valid phone info o
2ptions",optional:!1,K:function(t){return!!t&&(t.session&&t.phoneNumber?nh(t.session,co)&&"string"===typeof t.phoneNumber:t.session&&t.multiFactorHint?nh(t.session,lo)&&rh(t.multiFactorHint):t.session&&t.multiFactorUid?nh(t.session,lo)&&"string"===typeof t.multiFactorUid:!!t.phoneNumber&&"string"===typeof t.phoneNumber)}},"phoneInfoOptions"),{name:"applicationVerifier",J:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,K:function(t){return!(!t||"string"!==typeof t.type||"function"!==typeof t.verify)}}]}}),oh(Lo.prototype,{w:{name:"toJSON",j:[Yf(null,!0)]}}),oh(C.prototype,{toJSON:{name:"toJSON",j:[Yf(null,!0)]}}),oh($o.prototype,{toJSON:{name:"toJSON",j:[Yf(null,!0)]}}),oh(Qo.prototype,{toJSON:{name:"toJSON",j:[Yf(null,!0)]}}),oh(ul.prototype,{toJSON:{name:"toJSON",j:[Yf(null,!0)]}}),oh(ol.prototype,{Qc:{name:"resolveSignIn",j:[{name:"multiFactorAssertion",J:"a valid multiFactorAssertion",optional:!1,K:function(t){return!!t&&!!t.rb}}]}}),oh(dl.prototype,{Qb:{name:"getSession",j:[]},ec:{name:"enroll",j:[{name:"multiFactorAssertion",J:"a valid multiFactorAssertion",optional:!1,K:function(t){return!!t&&!!t.rb}},Yf("displayName",!0)]},ad:{name:"unenroll",j:[ih({name:"multiFactorInfo",J:"a valid multiFactorInfo",optional:!1,K:rh},Yf(),"multiFactorInfoIdentifier")]}}),oh(Gf.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),sh(Oi,"parseLink",Ni,[Yf("link")]),sh(xf,"assertion",(function(t){return new hl(t)}),[eh("phone")]),function(){if("undefined"===typeof e.a||!e.a.INTERNAL||!e.a.INTERNAL.registerComponent)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var t={ActionCodeInfo:{Operation:{EMAIL_SIGNIN:fi,PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:li,VERIFY_AND_CHANGE_EMAIL:hi,VERIFY_EMAIL:"VERIFY_EMAIL"}},Auth:ff,AuthCredential:fo,Error:C};sh(t,"EmailAuthProvider",jo,[]),sh(t,"FacebookAuthProvider",Oo,[]),sh(t,"GithubAuthProvider",To,[]),sh(t,"GoogleAuthProvider",Co,[]),sh(t,"TwitterAuthProvider",Po,[]),sh(t,"OAuthProvider",Eo,[Yf("providerId")]),sh(t,"SAMLAuthProvider",_o,[Yf("providerId")]),sh(t,"PhoneAuthProvider",Uo,[{name:"auth",J:"an instance of Firebase Auth",optional:!0,K:function(t){return!!(t&&t instanceof ff)}}]),sh(t,"RecaptchaVerifier",Gf,[ih(Yf(),{name:"",J:"an HTML element",optional:!1,K:function(t){return!!(t&&t instanceof Element)}},"recaptchaContainer"),Xf("recaptchaParameters",!0),{name:"app",J:"an instance of Firebase App",optional:!0,K:function(t){return!!(t&&t instanceof e.a.app.App)}}]),sh(t,"ActionCodeURL",Oi,[]),sh(t,"PhoneMultiFactorGenerator",xf,[]),e.a.INTERNAL.registerComponent({name:"auth",instanceFactory:function(t){return new ff(t=t.getProvider("app").getImmediate())},multipleInstances:!1,serviceProps:t,instantiationMode:"LAZY",type:"PUBLIC"}),e.a.INTERNAL.registerComponent({name:"auth-internal",instanceFactory:function(t){return{getUid:E((t=t.getProvider("auth").getImmediate()).getUid,t),getToken:E(t.mc,t),addAuthTokenListener:E(t.cc,t),removeAuthTokenListener:E(t.Oc,t)}},multipleInstances:!1,instantiationMode:"LAZY",type:"PRIVATE"}),e.a.registerVersion("@firebase/auth","0.16.1"),e.a.INTERNAL.extendNamespace({User:Sl})}()}).apply("undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})}).call(this,n(34))},function(t,e,n){"use strict";(function(t,e){var r=n(3),i=n(0),o=n(1),a=n(5),s=n(6),u=function(){function t(t){this.domStorage_=t,this.prefix_="firebase:"}return t.prototype.set=function(t,e){null==e?this.domStorage_.removeItem(this.prefixedName_(t)):this.domStorage_.setItem(this.prefixedName_(t),Object(o.J)(e))},t.prototype.get=function(t){var e=this.domStorage_.getItem(this.prefixedName_(t));return null==e?null:Object(o.D)(e)},t.prototype.remove=function(t){this.domStorage_.removeItem(this.prefixedName_(t))},t.prototype.prefixedName_=function(t){return this.prefix_+t},t.prototype.toString=function(){return this.domStorage_.toString()},t}(),c=function(){function t(){this.cache_={},this.isInMemoryStorage=!0}return t.prototype.set=function(t,e){null==e?delete this.cache_[t]:this.cache_[t]=e},t.prototype.get=function(t){return Object(o.k)(this.cache_,t)?this.cache_[t]:null},t.prototype.remove=function(t){delete this.cache_[t]},t}(),l=function(t){try{if("undefined"!==typeof window&&"undefined"!==typeof window[t]){var e=window[t];return e.setItem("firebase:sentinel","cache"),e.removeItem("firebase:sentinel"),new u(e)}}catch(n){}return new c},f=l("localStorage"),h=l("sessionStorage"),p=new a.b("@firebase/database"),d=function(){var t=1;return function(){return t++}}(),v=function(t){var e=Object(o.I)(t),n=new o.d;n.update(e);var r=n.digest();return o.h.encodeByteArray(r)},g=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var r="",i=0;i<e.length;i++){var a=e[i];Array.isArray(a)||a&&"object"===typeof a&&"number"===typeof a.length?r+=t.apply(null,a):r+="object"===typeof a?Object(o.J)(a):a,r+=" "}return r},y=null,m=!0,b=function(t,e){Object(o.f)(!e||!0===t||!1===t,"Can't turn on custom loggers persistently."),!0===t?(p.logLevel=a.a.VERBOSE,y=p.log.bind(p),e&&h.set("logging_enabled",!0)):"function"===typeof t?y=t:(y=null,h.remove("logging_enabled"))},w=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!0===m&&(m=!1,null===y&&!0===h.get("logging_enabled")&&b(!0)),y){var n=g.a
2pply(null,t);y(n)}},_=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];w.apply(void 0,Object(i.f)([t],e))}},E=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE INTERNAL ERROR: "+g.apply(void 0,Object(i.f)(t));p.error(n)},O=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE FATAL ERROR: "+g.apply(void 0,Object(i.f)(t));throw p.error(n),new Error(n)},S=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE WARNING: "+g.apply(void 0,Object(i.f)(t));p.warn(n)},T=function(t){return"number"===typeof t&&(t!==t||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY)},I="[MIN_NAME]",C="[MAX_NAME]",k=function(t,e){if(t===e)return 0;if(t===I||e===C)return-1;if(e===I||t===C)return 1;var n=L(t),r=L(e);return null!==n?null!==r?n-r===0?t.length-e.length:n-r:-1:null!==r?1:t<e?-1:1},P=function(t,e){return t===e?0:t<e?-1:1},A=function(t,e){if(e&&t in e)return e[t];throw new Error("Missing required key ("+t+") in object: "+Object(o.J)(e))},N=function t(e){if("object"!==typeof e||null===e)return Object(o.J)(e);var n=[];for(var r in e)n.push(r);n.sort();for(var i="{",a=0;a<n.length;a++)0!==a&&(i+=","),i+=Object(o.J)(n[a]),i+=":",i+=t(e[n[a]]);return i+="}"},x=function(t,e){var n=t.length;if(n<=e)return[t];for(var r=[],i=0;i<n;i+=e)i+e>n?r.push(t.substring(i,n)):r.push(t.substring(i,i+e));return r};function j(t,e){for(var n in t)t.hasOwnProperty(n)&&e(n,t[n])}var R=function(t){Object(o.f)(!T(t),"Invalid JSON number");var e,n,r,i,a,s=1023;0===t?(n=0,r=0,e=1/t===-1/0?1:0):(e=t<0,(t=Math.abs(t))>=Math.pow(2,-1022)?(n=(i=Math.min(Math.floor(Math.log(t)/Math.LN2),s))+s,r=Math.round(t*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,r=Math.round(t/Math.pow(2,-1074))));var u=[];for(a=52;a;a-=1)u.push(r%2?1:0),r=Math.floor(r/2);for(a=11;a;a-=1)u.push(n%2?1:0),n=Math.floor(n/2);u.push(e?1:0),u.reverse();var c=u.join(""),l="";for(a=0;a<64;a+=8){var f=parseInt(c.substr(a,8),2).toString(16);1===f.length&&(f="0"+f),l+=f}return l.toLowerCase()},D=new RegExp("^-?(0*)\\d{1,10}$"),L=function(t){if(D.test(t)){var e=Number(t);if(e>=-2147483648&&e<=2147483647)return e}return null},M=function(t){try{t()}catch(e){setTimeout((function(){var t=e.stack||"";throw S("Exception was thrown by user callback.",t),e}),Math.floor(0))}},F=function(t,e){var n=setTimeout(t,e);return"object"===typeof n&&n.unref&&n.unref(),n},U=function(){function t(t,e){if(void 0===e){this.pieces_=t.split("/");for(var n=0,r=0;r<this.pieces_.length;r++)this.pieces_[r].length>0&&(this.pieces_[n]=this.pieces_[r],n++);this.pieces_.length=n,this.pieceNum_=0}else this.pieces_=t,this.pieceNum_=e}return Object.defineProperty(t,"Empty",{get:function(){return new t("")},enumerable:!1,configurable:!0}),t.prototype.getFront=function(){return this.pieceNum_>=this.pieces_.length?null:this.pieces_[this.pieceNum_]},t.prototype.getLength=function(){return this.pieces_.length-this.pieceNum_},t.prototype.popFront=function(){var e=this.pieceNum_;return e<this.pieces_.length&&e++,new t(this.pieces_,e)},t.prototype.getBack=function(){return this.pieceNum_<this.pieces_.length?this.pieces_[this.pieces_.length-1]:null},t.prototype.toString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+this.pieces_[e]);return t||"/"},t.prototype.toUrlEncodedString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+encodeURIComponent(String(this.pieces_[e])));return t||"/"},t.prototype.slice=function(t){return void 0===t&&(t=0),this.pieces_.slice(this.pieceNum_+t)},t.prototype.parent=function(){if(this.pieceNum_>=this.pieces_.length)return null;for(var e=[],n=this.pieceNum_;n<this.pieces_.length-1;n++)e.push(this.pieces_[n]);return new t(e,0)},t.prototype.child=function(e){for(var n=[],r=this.pieceNum_;r<this.pieces_.length;r++)n.push(this.pieces_[r]);if(e instanceof t)for(r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);else{var i=e.split("/");for(r=0;r<i.length;r++)i[r].length>0&&n.push(i[r])}return new t(n,0)},t.prototype.isEmpty=function(){return this.pieceNum_>=this.pieces_.length},t.relativePath=function(e,n){var r=e.getFront(),i=n.getFront();if(null===r)return n;if(r===i)return t.relativePath(e.popFront(),n.popFront());
2throw new Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+e+")")},t.comparePaths=function(t,e){for(var n=t.slice(),r=e.slice(),i=0;i<n.length&&i<r.length;i++){var o=k(n[i],r[i]);if(0!==o)return o}return n.length===r.length?0:n.length<r.length?-1:1},t.prototype.equals=function(t){if(this.getLength()!==t.getLength())return!1;for(var e=this.pieceNum_,n=t.pieceNum_;e<=this.pieces_.length;e++,n++)if(this.pieces_[e]!==t.pieces_[n])return!1;return!0},t.prototype.contains=function(t){var e=this.pieceNum_,n=t.pieceNum_;if(this.getLength()>t.getLength())return!1;for(;e<this.pieces_.length;){if(this.pieces_[e]!==t.pieces_[n])return!1;++e,++n}return!0},t}(),V=function(){function t(t,e){this.errorPrefix_=e,this.parts_=t.slice(),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n<this.parts_.length;n++)this.byteLength_+=Object(o.H)(this.parts_[n]);this.checkValid_()}return Object.defineProperty(t,"MAX_PATH_DEPTH",{get:function(){return 32},enumerable:!1,configurable:!0}),Object.defineProperty(t,"MAX_PATH_LENGTH_BYTES",{get:function(){return 768},enumerable:!1,configurable:!0}),t.prototype.push=function(t){this.parts_.length>0&&(this.byteLength_+=1),this.parts_.push(t),this.byteLength_+=Object(o.H)(t),this.checkValid_()},t.prototype.pop=function(){var t=this.parts_.pop();this.byteLength_-=Object(o.H)(t),this.parts_.length>0&&(this.byteLength_-=1)},t.prototype.checkValid_=function(){if(this.byteLength_>t.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+t.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");if(this.parts_.length>t.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+t.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},t.prototype.toErrorString=function(){return 0===this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},t}(),q="5",B="firebaseio.com",H="websocket",z="long_polling",K=function(){function t(t,e,n,r,i,o,a){void 0===i&&(i=!1),void 0===o&&(o=""),void 0===a&&(a=!1),this.secure=e,this.namespace=n,this.webSocketOnly=r,this.nodeAdmin=i,this.persistenceKey=o,this.includeNamespaceInQueryParams=a,this.host=t.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=f.get("host:"+t)||this.host}return t.prototype.needsQueryParam=function(){return this.host!==this.internalHost||this.isCustomHost()||this.includeNamespaceInQueryParams},t.prototype.isCacheableHost=function(){return"s-"===this.internalHost.substr(0,2)},t.prototype.isDemoHost=function(){return"firebaseio-demo.com"===this.domain},t.prototype.isCustomHost=function(){return"firebaseio.com"!==this.domain&&"firebaseio-demo.com"!==this.domain},t.prototype.updateHost=function(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&f.set("host:"+this.host,this.internalHost))},t.prototype.connectionURL=function(t,e){var n;if(Object(o.f)("string"===typeof t,"typeof type must == string"),Object(o.f)("object"===typeof e,"typeof params must == object"),t===H)n=(this.secure?"wss://":"ws://")+this.internalHost+"/.ws?";else{if(t!==z)throw new Error("Unknown connection type: "+t);n=(this.secure?"https://":"http://")+this.internalHost+"/.lp?"}this.needsQueryParam()&&(e.ns=this.namespace);var r=[];return j(e,(function(t,e){r.push(t+"="+e)})),n+r.join("&")},t.prototype.toString=function(){var t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t},t.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},t}();var W,G,Q=function(t,e){var n=$(t),r=n.namespace;"firebase.com"===n.domain&&O(n.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),r&&"undefined"!==r||"localhost"===n.domain||O("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),n.secure||"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&S("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");var i="ws"===n.scheme||"wss"===n.scheme;return{repoInfo:new K(n.host,n.secure,r,e,i,"",r!==n.subdomain),path:new U(n.pathString)}},$=function(t){var e="",n="",r="",o="",a="",s=!0,u="https",c=443;if("string"===typeof t){var l=t.indexOf("//");l>=0&&(u=t.substring(0,l-1),t=t.substring(l+2));var f=t.indexOf("/");-1===f&&(f=t.length);var h=t.indexOf("?");-1===h&&(h=t.length),e=t.substring(0,Math.min(f,h)),f<h&&(o=function(t){for(var e="",n=t.split("/"),r=0;r<n.length;r++)if(n[r].length>0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch(o){}e+="/"+i}return e}(t.substring(f,h)));var p=function(t){var e,n,r={};"?"===t.charAt(0)&&(t=t.substring(1));try{for(var o=Object(i.h)(t.split("&")),a=o.next();!a.done;a=o.next()){var s=a.value;if(0!==s.length){var u=s.split("=");
22===u.length?r[decodeURIComponent(u[0])]=decodeURIComponent(u[1]):S("Invalid query segment '"+s+"' in query '"+t+"'")}}}catch(c){e={error:c}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r}(t.substring(Math.min(t.length,h)));(l=e.indexOf(":"))>=0?(s="https"===u||"wss"===u,c=parseInt(e.substring(l+1),10)):l=e.length;var d=e.slice(0,l);if("localhost"===d.toLowerCase())n="localhost";else if(d.split(".").length<=2)n=d;else{var v=e.indexOf(".");r=e.substring(0,v).toLowerCase(),n=e.substring(v+1),a=r}"ns"in p&&(a=p.ns)}return{host:e,port:c,domain:n,subdomain:r,secure:s,scheme:u,pathString:o,namespace:a}},Y=/[\[\].#$\/\u0000-\u001F\u007F]/,J=/[\[\].#$\u0000-\u001F\u007F]/,X=10485760,Z=function(t){return"string"===typeof t&&0!==t.length&&!Y.test(t)},tt=function(t){return"string"===typeof t&&0!==t.length&&!J.test(t)},et=function(t){return null===t||"string"===typeof t||"number"===typeof t&&!T(t)||t&&"object"===typeof t&&Object(o.k)(t,".sv")},nt=function(t,e,n,r,i){i&&void 0===n||rt(Object(o.o)(t,e,i),n,r)},rt=function t(e,n,r){var i=r instanceof U?new V(r,e):r;if(void 0===n)throw new Error(e+"contains undefined "+i.toErrorString());if("function"===typeof n)throw new Error(e+"contains a function "+i.toErrorString()+" with contents = "+n.toString());if(T(n))throw new Error(e+"contains "+n.toString()+" "+i.toErrorString());if("string"===typeof n&&n.length>X/3&&Object(o.H)(n)>X)throw new Error(e+"contains a string greater than "+"10485760 utf8 bytes "+i.toErrorString()+" ('"+n.substring(0,50)+"...')");if(n&&"object"===typeof n){var a=!1,s=!1;if(j(n,(function(n,r){if(".value"===n)a=!0;else if(".priority"!==n&&".sv"!==n&&(s=!0,!Z(n)))throw new Error(e+" contains an invalid key ("+n+") "+i.toErrorString()+'.  Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');i.push(n),t(e,r,i),i.pop()})),a&&s)throw new Error(e+' contains ".value" child '+i.toErrorString()+" in addition to actual children.")}},it=function(t,e,n,r,i){if(!i||void 0!==n){var a=Object(o.o)(t,e,i);if(!n||"object"!==typeof n||Array.isArray(n))throw new Error(a+" must be an object containing the children to replace.");var s=[];j(n,(function(t,e){var n=new U(t);if(rt(a,e,r.child(n)),".priority"===n.getBack()&&!et(e))throw new Error(a+"contains an invalid value for '"+n.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");s.push(n)})),function(t,e){var n,r;for(n=0;n<e.length;n++)for(var i=(r=e[n]).slice(),o=0;o<i.length;o++)if(".priority"===i[o]&&o===i.length-1);else if(!Z(i[o]))throw new Error(t+"contains an invalid key ("+i[o]+") in path "+r.toString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');e.sort(U.comparePaths);var a=null;for(n=0;n<e.length;n++){if(r=e[n],null!==a&&a.contains(r))throw new Error(t+"contains a path "+a.toString()+" that is ancestor of another path "+r.toString());a=r}}(a,s)}},ot=function(t,e,n,r){if(!r||void 0!==n){if(T(n))throw new Error(Object(o.o)(t,e,r)+"is "+n.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!et(n))throw new Error(Object(o.o)(t,e,r)+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},at=function(t,e,n,r){if(!r||void 0!==n)switch(n){case"value":case"child_added":case"child_removed":case"child_changed":case"child_moved":break;default:throw new Error(Object(o.o)(t,e,r)+'must be a valid event type = "value", "child_added", "child_removed", "child_changed", or "child_moved".')}},st=function(t,e,n,r){if((!r||void 0!==n)&&!Z(n))throw new Error(Object(o.o)(t,e,r)+'was an invalid key = "'+n+'".  Firebase keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]").')},ut=function(t,e,n,r){if((!r||void 0!==n)&&!tt(n))throw new Error(Object(o.o)(t,e,r)+'was an invalid path = "'+n+'". Paths must be non-empty strings and can\'t contain ".", "#", "$", "[", or "]"')},ct=function(t,e,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),ut(t,e,n,r)},lt=function(t,e){if(".info"===e.getFront())throw new Error(t+" failed = Can't modify data under /.info/")},ft=function(t,e,n){var r=n.path.toString();if("string"!==typeof n.repoInfo.host||0===n.repoInfo.host.length||!Z(n.repoInfo.namespace)&&"localhost"!==n.repoInfo.host.split(":")[0]||0!==r.length&&!function(t){return t&&(t=t.replace(/^\/*\.info(\/|$)/,"/")),tt(t)}(r))throw new Error(Object(o.o)(t,e,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".')},ht=function(t,e,n,r){if((!r||void 0!==n)&&"boolean"!==typeof n)throw new Error(Object(o.o)(t,e,r)+"must be a boolean.")},pt=function(){function t(t,e){this.repo_=t,this.path_=e}return t.prototype.cancel=function(t){Object(o.K)("OnDisconnect.cancel",0,1,arguments.length),Object(o.L)("OnDisconnect.cancel",1,t,!0);var e=new o.a;return this.repo_.onDisconnectCancel(this.path_,e.wrapCallback(t)),e.promise},t.prototype.remove=function(t){Object(o.K)("OnDisconnect.remove",0,1,arguments.length),lt("OnDisconnect.remove",this.path_),Object(o.L)("OnDisconnect.remove",1,t,!0);var e=new o.a;return this.repo_.onDisconnectSet(this.path_,null,e.wrapCallback(t)),e.promise},t.prototype.set=function(t,e){Object(o.K)("OnDisconnect.set",1,2,arguments.length),lt("OnDisconnect.set",this.path_),nt("OnDisconnect.set",1,t,this.path_,!1),Object(o.L)("OnDisconnect.set",2,e,!0);var n=new o.a;return this.repo_.onDisconnectSet(this.path_,t,n.wrapCallback(e)),n.promise},t.prototype.setWithPriority=function(t,e,n){Object(o.K)("OnDisconnect.setWithPriority",2,3,arguments.length),lt("OnDisconnect.setWithPriority",this.path_),nt("OnDisconnect.setWithPriority",1,t,this.path_,!1),ot("OnDisconnect.setWithPriority",2,e,!1),Object(o.L)("OnDisconnect.setWithPriority",3,n,!0);var r=new o.a;return this.repo_.onDisconnectSetWithPriority(this.path_,t,e,r.wrapCallback(n)),r.promise},t.prototype.update=function(t,e){if(Object(o.K)("OnDisconnect.update",1,2,arguments.length),lt("OnDisconnect.update",this.path_),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];t=n,S("Passing an Array to firebase.database.onDisconnect().update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}it("OnDisconnect.update",1,t,this.path_,!1),Object(o.L)("OnDisconnect.update",2,e,!0);var i=new o.a;return this.repo_.onDisconnectUpdate(this.path_,t,i.wrapCallback(e)),i.promise},t}(),dt=function(){function t(t,e){this.committed=t,this.snapshot=e}return t.prototype.toJSON=function(){return Object(o.K)("TransactionResult.toJSON",0,1,arguments.length),{committed:this.committed,snapshot:this.snapshot.toJSON()}},t}(),vt=function(){var t="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",e=0,n=[];return function(r){var i,a=r===e;e=r;var s=new Array(8);for(i=7;i>=0;i--)s[i]=t.charAt(r%64),r=Math.floor(r/64);Object(o.f)(0===r,"Cannot push at time == 0");var u=s.join("");if(a){for(i=11;i>=0&&63===n[i];i--)n[i]=0;n[i]++}else for(i=0;i<12;i++)n[i]=Math.floor(64*Math.random());for(i=0;i<12;i++)u+=t.charAt(n[i]);return Object(o.f)(20===u.length,"nextPushId: Length should be 20."),u}}(),gt=function(){function t(t,e){this.name=t,this.node=e}return t.Wrap=function(e,n){return new t(e,n)},t}(),yt=function(){function t(){}return t.prototype.getCompare=function(){return this.compare.bind(this)},t.prototype.indexedValueChanged=function(t,e){var n=new gt(I,t),r=new gt(I,e);return 0!==this.compare(n,r)},t.prototype.minPost=function(){return gt.MIN},t}(),mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.c)(e,t),Object.defineProperty(e,"__EMPTY_NODE",{get:function(){return W},set:function(t){W=t}
2,enumerable:!1,configurable:!0}),e.prototype.compare=function(t,e){return k(t.name,e.name)},e.prototype.isDefinedOn=function(t){throw Object(o.g)("KeyIndex.isDefinedOn not expected to be called.")},e.prototype.indexedValueChanged=function(t,e){return!1},e.prototype.minPost=function(){return gt.MIN},e.prototype.maxPost=function(){return new gt(C,W)},e.prototype.makePost=function(t,e){return Object(o.f)("string"===typeof t,"KeyIndex indexValue must always be a string."),new gt(t,W)},e.prototype.toString=function(){return".key"},e}(yt),bt=new mt;var wt,_t,Et,Ot=function(t){return"number"===typeof t?"number:"+R(t):"string:"+t},St=function(t){if(t.isLeafNode()){var e=t.val();Object(o.f)("string"===typeof e||"number"===typeof e||"object"===typeof e&&Object(o.k)(e,".sv"),"Priority must be a string or number.")}else Object(o.f)(t===G||t.isEmpty(),"priority of unexpected type.");Object(o.f)(t===G||t.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")},Tt=function(){function t(e,n){void 0===n&&(n=t.__childrenNodeConstructor.EMPTY_NODE),this.value_=e,this.priorityNode_=n,this.lazyHash_=null,Object(o.f)(void 0!==this.value_&&null!==this.value_,"LeafNode shouldn't be created with null/undefined value."),St(this.priorityNode_)}return Object.defineProperty(t,"__childrenNodeConstructor",{get:function(){return wt},set:function(t){wt=t},enumerable:!1,configurable:!0}),t.prototype.isLeafNode=function(){return!0},t.prototype.getPriority=function(){return this.priorityNode_},t.prototype.updatePriority=function(e){return new t(this.value_,e)},t.prototype.getImmediateChild=function(e){return".priority"===e?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.getChild=function(e){return e.isEmpty()?this:".priority"===e.getFront()?this.priorityNode_:t.__childrenNodeConstructor.EMPTY_NODE},t.prototype.hasChild=function(){return!1},t.prototype.getPredecessorChildName=function(t,e){return null},t.prototype.updateImmediateChild=function(e,n){return".priority"===e?this.updatePriority(n):n.isEmpty()&&".priority"!==e?this:t.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(e,n).updatePriority(this.priorityNode_)},t.prototype.updateChild=function(e,n){var r=e.getFront();return null===r?n:n.isEmpty()&&".priority"!==r?this:(Object(o.f)(".priority"!==r||1===e.getLength(),".priority must be the last token in a path"),this.updateImmediateChild(r,t.__childrenNodeConstructor.EMPTY_NODE.updateChild(e.popFront(),n)))},t.prototype.isEmpty=function(){return!1},t.prototype.numChildren=function(){return 0},t.prototype.forEachChild=function(t,e){return!1},t.prototype.val=function(t){return t&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.priorityNode_.isEmpty()||(t+="priority:"+Ot(this.priorityNode_.val())+":");var e=typeof this.value_;t+=e+":",t+="number"===e?R(this.value_):this.value_,this.lazyHash_=v(t)}return this.lazyHash_},t.prototype.getValue=function(){return this.value_},t.prototype.compareTo=function(e){return e===t.__childrenNodeConstructor.EMPTY_NODE?1:e instanceof t.__childrenNodeConstructor?-1:(Object(o.f)(e.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(e))},t.prototype.compareToLeafNode_=function(e){var n=typeof e.value_,r=typeof this.value_,i=t.VALUE_TYPE_ORDER.indexOf(n),a=t.VALUE_TYPE_ORDER.indexOf(r);return Object(o.f)(i>=0,"Unknown leaf type: "+n),Object(o.f)(a>=0,"Unknown leaf type: "+r),i===a?"object"===r?0:this.value_<e.value_?-1:this.value_===e.value_?0:1:a-i},t.prototype.withIndex=function(){return this},t.prototype.isIndexed=function(){return!0},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode()){var e=t;return this.value_===e.value_&&this.priorityNode_.equals(e.priorityNode_)}return!1},t.VALUE_TYPE_ORDER=["object","boolean","number","string"],t}();var It,Ct,kt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.c)(e,t),e.prototype.compare=function(t,e){var n=t.node.getPriority(),r=e.node.getPriority(),i=n.compareTo(r);return 0===i?k(t.name,e.name):i},e.prototype.isDefinedOn=function(t){return!t.getPriority().isEmpty()},e.prototype.indexedValueChanged=function(t,e){return!t.getPriority().equals(e.getPriority())},e.prototype.minPost=function(){return gt.MIN},e.prototype.maxPost=function(){return new gt(C,new Tt("[PRIORITY-POST]",Et))},e.prototype.makePost=function(t,e){var n=_t(t);return new gt(e,new Tt("[PRIORITY-POST]",n))},e.prototype.toString=function(){return".priority"},e}(yt)),Pt=function(){function t(t,e,n,r,i){void 0===i&&(i=null),this.isReverse_=r,this.resultGenerator_=i,this.nodeStack_=[];for(var o=1;!t.isEmpty();)if(t=t,o=e?n(t.key,e):1,r&&(o*=-1),o<0)t=this.isReverse_?t.left:t.right;else{if(0===o){this.nodeStack_.push(t);break}this.nodeStack_.push(t),t=this.isReverse_?t.right:t.left}}return t.prototype.getNext=function(){if(0===this.nodeStack_.length)return null;var t,e=this.nodeStack_.pop();if(t=this.resultGenerator_?this.resultGenerator_(e.key,e.value):{key:e.key,value:e.value},this.isReverse_)for(e=e.left;!e.isEmpty();)this.nodeStack_.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack_.push(e),e=e.left;return t},t.prototype.hasNext=function(){return this.nodeStack_.length>0},t.prototype.peek=function(){if(0===this.nodeStack_.length)return null;var t=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value}},t}(),At=function(){function t(e,n,r,i,o){this.key=e,this.value=n,this.color=null!=r?r:t.RED,this.left=null!=i?i:xt.EMPTY_NODE,this.right=null!=o?o:xt.EMPTY_NODE}return t.prototype.copy=function(e,n,r,i,o){return new t(null!=e?e:this.key,null!=n?n:this.value,
2null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},t.prototype.count=function(){return this.left.count()+1+this.right.count()},t.prototype.isEmpty=function(){return!1},t.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||!!t(this.key,this.value)||this.right.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},t.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},t.prototype.minKey=function(){return this.min_().key},t.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},t.prototype.insert=function(t,e,n){var r=this,i=n(t,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(t,e,n),null):0===i?r.copy(null,e,null,null,null):r.copy(null,null,null,null,r.right.insert(t,e,n))).fixUp_()},t.prototype.removeMin_=function(){if(this.left.isEmpty())return xt.EMPTY_NODE;var t=this;return t.left.isRed_()||t.left.left.isRed_()||(t=t.moveRedLeft_()),(t=t.copy(null,null,null,t.left.removeMin_(),null)).fixUp_()},t.prototype.remove=function(t,e){var n,r;if(e(t,(n=this).key)<0)n.left.isEmpty()||n.left.isRed_()||n.left.left.isRed_()||(n=n.moveRedLeft_()),n=n.copy(null,null,null,n.left.remove(t,e),null);else{if(n.left.isRed_()&&(n=n.rotateRight_()),n.right.isEmpty()||n.right.isRed_()||n.right.left.isRed_()||(n=n.moveRedRight_()),0===e(t,n.key)){if(n.right.isEmpty())return xt.EMPTY_NODE;r=n.right.min_(),n=n.copy(r.key,r.value,null,null,n.right.removeMin_())}n=n.copy(null,null,null,null,n.right.remove(t,e))}return n.fixUp_()},t.prototype.isRed_=function(){return this.color},t.prototype.fixUp_=function(){var t=this;return t.right.isRed_()&&!t.left.isRed_()&&(t=t.rotateLeft_()),t.left.isRed_()&&t.left.left.isRed_()&&(t=t.rotateRight_()),t.left.isRed_()&&t.right.isRed_()&&(t=t.colorFlip_()),t},t.prototype.moveRedLeft_=function(){var t=this.colorFlip_();return t.right.left.isRed_()&&(t=(t=(t=t.copy(null,null,null,null,t.right.rotateRight_())).rotateLeft_()).colorFlip_()),t},t.prototype.moveRedRight_=function(){var t=this.colorFlip_();return t.left.left.isRed_()&&(t=(t=t.rotateRight_()).colorFlip_()),t},t.prototype.rotateLeft_=function(){var e=this.copy(null,null,t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)},t.prototype.rotateRight_=function(){var e=this.copy(null,null,t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)},t.prototype.colorFlip_=function(){var t=this.left.copy(null,null,!this.left.color,null,null),e=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,e)},t.prototype.checkMaxDepth_=function(){var t=this.check_();return Math.pow(2,t)<=this.count()+1},t.prototype.check_=function(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");
2if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");var t=this.left.check_();if(t!==this.right.check_())throw new Error("Black depths differ");return t+(this.isRed_()?0:1)},t.RED=!0,t.BLACK=!1,t}(),Nt=function(){function t(){}return t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new At(t,e,null)},t.prototype.remove=function(t,e){return this},t.prototype.count=function(){return 0},t.prototype.isEmpty=function(){return!0},t.prototype.inorderTraversal=function(t){return!1},t.prototype.reverseTraversal=function(t){return!1},t.prototype.minKey=function(){return null},t.prototype.maxKey=function(){return null},t.prototype.check_=function(){return 0},t.prototype.isRed_=function(){return!1},t}(),xt=function(){function t(e,n){void 0===n&&(n=t.EMPTY_NODE),this.comparator_=e,this.root_=n}return t.prototype.insert=function(e,n){return new t(this.comparator_,this.root_.insert(e,n,this.comparator_).copy(null,null,At.BLACK,null,null))},t.prototype.remove=function(e){return new t(this.comparator_,this.root_.remove(e,this.comparator_).copy(null,null,At.BLACK,null,null))},t.prototype.get=function(t){for(var e,n=this.root_;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key)))return n.value;e<0?n=n.left:e>0&&(n=n.right)}return null},t.prototype.getPredecessorKey=function(t){for(var e,n=this.root_,r=null;!n.isEmpty();){if(0===(e=this.comparator_(t,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}e<0?n=n.left:e>0&&(r=n,n=n.right)}throw new Error("Attempted to find predecessor key for a nonexistent key.  What gives?")},t.prototype.isEmpty=function(){return this.root_.isEmpty()},t.prototype.count=function(){return this.root_.count()},t.prototype.minKey=function(){return this.root_.minKey()},t.prototype.maxKey=function(){return this.root_.maxKey()},t.prototype.inorderTraversal=function(t){return this.root_.inorderTraversal(t)},t.prototype.reverseTraversal=function(t){return this.root_.reverseTraversal(t)},t.prototype.getIterator=function(t){return new Pt(this.root_,null,this.comparator_,!1,t)},t.prototype.getIteratorFrom=function(t,e){return new Pt(this.root_,t,this.comparator_,!1,e)},t.prototype.getReverseIteratorFrom=function(t,e){return new Pt(this.root_,t,this.comparator_,!0,e)},t.prototype.getReverseIterator=function(t){return new Pt(this.root_,null,this.comparator_,!0,t)},t.EMPTY_NODE=new Nt,t}(),jt=Math.log(2),Rt=function(){function t(t){var e;this.count=(e=t+1,parseInt(Math.log(e)/jt,10)),this.current_=this.count-1;var n,r=(n=this.count,parseInt(Array(n+1).join("1"),2));this.bits_=t+1&r}return t.prototype.nextBitIsOne=function(){var t=!(this.bits_&1<<this.current_);return this.current_--,t},t}(),Dt=function(t,e,n,r){t.sort(e);var i=function e(r,i){var o,a,s=i-r;if(0===s)return null;if(1===s)return o=t[r],a=n?n(o):o,new At(a,o.node,At.BLACK,null,null);var u=parseInt(s/2,10)+r,c=e(r,u),l=e(u+1,i);return o=t[u],a=n?n(o):o,new At(a,o.node,At.BLACK,c,l)},o=function(e){for(var r=null,o=null,a=t.length,s=function(e,r){var o=a-e,s=a;a-=e;var c=i(o+1,s),l=t[o],f=n?n(l):l;u(new At(f,l.node,r,null,c))},u=function(t){r?(r.left=t,r=t):(o=t,r=t)},c=0;c<e.count;++c){var l=e.nextBitIsOne(),f=Math.pow(2,e.count-(c+1));l?s(f,At.BLACK):(s(f,At.BLACK),s(f,At.RED))}return o}(new Rt(t.length));return new xt(r||e,o)},Lt={},Mt=function(){function t(t,e){this.indexes_=t,this.indexSet_=e}return Object.defineProperty(t,"Default",{get:function(){return Object(o.f)(Lt&&kt,"ChildrenNode.ts has not been loaded"),It=It||new t({".priority":Lt},{".priority":kt})},enumerable:!1,configurable:!0}),t.prototype.get=function(t){var e=Object(o.G)(this.indexes_,t);if(!e)throw new Error("No index defined for "+t);return e instanceof xt?e:null},t.prototype.hasIndex=function(t){return Object(o.k)(this.indexSet_,t.toString())},t.prototype.addIndex=function(e,n){Object(o.f)(e!==bt,"KeyIndex always exists and isn't meant to be added to the IndexMap.");for(var r,a=[],s=!1,u=n.getIterator(gt.Wrap),c=u.getNext();c;)s=s||e.isDefinedOn(c.node),a.push(c),c=u.getNext();
2r=s?Dt(a,e.getCompare()):Lt;var l=e.toString(),f=Object(i.a)({},this.indexSet_);f[l]=e;var h=Object(i.a)({},this.indexes_);return h[l]=r,new t(h,f)},t.prototype.addToIndexes=function(e,n){var r=this;return new t(Object(o.E)(this.indexes_,(function(t,i){var a=Object(o.G)(r.indexSet_,i);if(Object(o.f)(a,"Missing index implementation for "+i),t===Lt){if(a.isDefinedOn(e.node)){for(var s=[],u=n.getIterator(gt.Wrap),c=u.getNext();c;)c.name!==e.name&&s.push(c),c=u.getNext();return s.push(e),Dt(s,a.getCompare())}return Lt}var l=n.get(e.name),f=t;return l&&(f=f.remove(new gt(e.name,l))),f.insert(e,e.node)})),this.indexSet_)},t.prototype.removeFromIndexes=function(e,n){return new t(Object(o.E)(this.indexes_,(function(t){if(t===Lt)return t;var r=n.get(e.name);return r?t.remove(new gt(e.name,r)):t})),this.indexSet_)},t}();function Ft(t,e){return k(t.name,e.name)}function Ut(t,e){return k(t,e)}var Vt=function(){function t(t,e,n){this.children_=t,this.priorityNode_=e,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&St(this.priorityNode_),this.children_.isEmpty()&&Object(o.f)(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(t,"EMPTY_NODE",{get:function(){return Ct||(Ct=new t(new xt(Ut),null,Mt.Default))},enumerable:!1,configurable:!0}),t.prototype.isLeafNode=function(){return!1},t.prototype.getPriority=function(){return this.priorityNode_||Ct},t.prototype.updatePriority=function(e){return this.children_.isEmpty()?this:new t(this.children_,e,this.indexMap_)},t.prototype.getImmediateChild=function(t){if(".priority"===t)return this.getPriority();var e=this.children_.get(t);return null===e?Ct:e},t.prototype.getChild=function(t){var e=t.getFront();return null===e?this:this.getImmediateChild(e).getChild(t.popFront())},t.prototype.hasChild=function(t){return null!==this.children_.get(t)},t.prototype.updateImmediateChild=function(e,n){if(Object(o.f)(n,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(n);var r=new gt(e,n),i=void 0,a=void 0;n.isEmpty()?(i=this.children_.remove(e),a=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(e,n),a=this.indexMap_.addToIndexes(r,this.children_));var s=i.isEmpty()?Ct:this.priorityNode_;return new t(i,s,a)},t.prototype.updateChild=function(t,e){var n=t.getFront();if(null===n)return e;Object(o.f)(".priority"!==t.getFront()||1===t.getLength(),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(t.popFront(),e);return this.updateImmediateChild(n,r)},t.prototype.isEmpty=function(){return this.children_.isEmpty()},t.prototype.numChildren=function(){return this.children_.count()},t.prototype.val=function(e){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(kt,(function(a,s){n[a]=s.val(e),r++,o&&t.INTEGER_REGEXP_.test(a)?i=Math.max(i,Number(a)):o=!1})),!e&&o&&i<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return e&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.getPriority().isEmpty()||(t+="priority:"+Ot(this.getPriority().val())+":"),this.forEachChild(kt,(function(e,n){var r=n.hash();""!==r&&(t+=":"+e+":"+r)})),this.lazyHash_=""===t?"":v(t)}return this.lazyHash_},t.prototype.getPredecessorChildName=function(t,e,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new gt(t,e));return i?i.name:null}return this.children_.getPredecessorKey(t)},t.prototype.getFirstChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.minKey();return n&&n.name}return this.children_.minKey()},t.prototype.getFirstChild=function(t){var e=this.getFirstChildName(t);return e?new gt(e,this.children_.get(e)):null},t.prototype.getLastChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.maxKey();return n&&n.name}return this.children_.maxKey()},t.prototype.getLastChild=function(t){var e=this.getLastChildName(t);return e?new gt(e,this.children_.get(e)):null},t.prototype.forEachChild=function(t,e){var n=this.resolveIndex_(t);return n?n.inorderTraversal((function(t){return e(t.name,t.node)})):this.children_.inorderTraversal(e)},t.prototype.getIterator=function(t){return this.getIteratorFrom(t.minPost(),t)}
2,t.prototype.getIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getIteratorFrom(t,(function(t){return t}));for(var r=this.children_.getIteratorFrom(t.name,gt.Wrap),i=r.peek();null!=i&&e.compare(i,t)<0;)r.getNext(),i=r.peek();return r},t.prototype.getReverseIterator=function(t){return this.getReverseIteratorFrom(t.maxPost(),t)},t.prototype.getReverseIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getReverseIteratorFrom(t,(function(t){return t}));for(var r=this.children_.getReverseIteratorFrom(t.name,gt.Wrap),i=r.peek();null!=i&&e.compare(i,t)>0;)r.getNext(),i=r.peek();return r},t.prototype.compareTo=function(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===qt?-1:0},t.prototype.withIndex=function(e){if(e===bt||this.indexMap_.hasIndex(e))return this;var n=this.indexMap_.addIndex(e,this.children_);return new t(this.children_,this.priorityNode_,n)},t.prototype.isIndexed=function(t){return t===bt||this.indexMap_.hasIndex(t)},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode())return!1;var e=t;if(this.getPriority().equals(e.getPriority())){if(this.children_.count()===e.children_.count()){for(var n=this.getIterator(kt),r=e.getIterator(kt),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},t.prototype.resolveIndex_=function(t){return t===bt?null:this.indexMap_.get(t.toString())},t.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,t}(),qt=new(function(t){function e(){return t.call(this,new xt(Ut),Vt.EMPTY_NODE,Mt.Default)||this}return Object(i.c)(e,t),e.prototype.compareTo=function(t){return t===this?0:1},e.prototype.equals=function(t){return t===this},e.prototype.getPriority=function(){return this},e.prototype.getImmediateChild=function(t){return Vt.EMPTY_NODE},e.prototype.isEmpty=function(){return!1},e}(Vt));Object.defineProperties(gt,{MIN:{value:new gt(I,Vt.EMPTY_NODE)},MAX:{value:new gt(C,qt)}}),mt.__EMPTY_NODE=Vt.EMPTY_NODE,Tt.__childrenNodeConstructor=Vt,G=qt,function(t){Et=t}(qt);function Bt(t,e){if(void 0===e&&(e=null),null===t)return Vt.EMPTY_NODE;if("object"===typeof t&&".priority"in t&&(e=t[".priority"]),Object(o.f)(null===e||"string"===typeof e||"number"===typeof e||"object"===typeof e&&".sv"in e,"Invalid priority type found: "+typeof e),"object"===typeof t&&".value"in t&&null!==t[".value"]&&(t=t[".value"]),"object"!==typeof t||".sv"in t)return new Tt(t,Bt(e));if(t instanceof Array){var n=Vt.EMPTY_NODE;return j(t,(function(e,r){if(Object(o.k)(t,e)&&"."!==e.substring(0,1)){var i=Bt(r);!i.isLeafNode()&&i.isEmpty()||(n=n.updateImmediateChild(e,i))}})),n.updatePriority(Bt(e))}var r=[],i=!1;if(j(t,(function(t,e){if("."!==t.substring(0,1)){var n=Bt(e);n.isEmpty()||(i=i||!n.getPriority().isEmpty(),r.push(new gt(t,n)))}})),0===r.length)return Vt.EMPTY_NODE;var a=Dt(r,Ft,(function(t){return t.name}),Ut);if(i){var s=Dt(r,kt.getCompare());return new Vt(a,Bt(e),new Mt({".priority":s},{".priority":kt}))}return new Vt(a,Bt(e),Mt.Default)}!function(t){_t=t}(Bt);var Ht,zt=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(i.c)(e,t),e.prototype.compare=function(t,e){var n=t.node.compareTo(e.node);return 0===n?k(t.name,e.name):n},e.prototype.isDefinedOn=function(t){return!0},e.prototype.indexedValueChanged=function(t,e){return!t.equals(e)},e.prototype.minPost=function(){return gt.MIN},e.prototype.maxPost=function(){return gt.MAX},e.prototype.makePost=function(t,e){var n=Bt(t);return new gt(e,n)},e.prototype.toString=function(){return".value"},e}(yt)),Kt=function(t){function e(e){var n=t.call(this)||this;return n.indexPath_=e,Object(o.f)(!e.isEmpty()&&".priority"!==e.getFront(),"Can't create PathIndex with empty path or .priority key"),n}return Object(i.c)(e,t),e.prototype.extractChild=function(t){return t.getChild(this.indexPath_)},e.prototype.isDefinedOn=function(t){return!t.getChild(this.indexPath_).isEmpty()},e.prototype.compare=function(t,e){var n=this.extractChild(t.node),r=this.extractChild(e.node),i=n.compareTo(r);return 0===i?k(t.name,e.name):i},e.prototype.makePost=function(t,e){var n=Bt(t),r=Vt.EMPTY_NODE.updateChild(this.indexPath_,n);return new gt(e,r)},e.prototype.maxPost=function(){var t=Vt.EMPTY_NODE.updateChild(this.indexPath_,qt);return new gt(C,t)},e.prototype.toString=function(){return this.indexPath_.slice().join("/")},e}(yt),Wt=function(){function t(t,e,n){this.node_=t,this.ref_=e,this.index_=n}return t.prototype.val=function(){return Object(o.K)("DataSnapshot.val",0,0,arguments.length),this.node_.val()}
2,t.prototype.exportVal=function(){return Object(o.K)("DataSnapshot.exportVal",0,0,arguments.length),this.node_.val(!0)},t.prototype.toJSON=function(){return Object(o.K)("DataSnapshot.toJSON",0,1,arguments.length),this.exportVal()},t.prototype.exists=function(){return Object(o.K)("DataSnapshot.exists",0,0,arguments.length),!this.node_.isEmpty()},t.prototype.child=function(e){Object(o.K)("DataSnapshot.child",0,1,arguments.length),e=String(e),ut("DataSnapshot.child",1,e,!1);var n=new U(e),r=this.ref_.child(n);return new t(this.node_.getChild(n),r,kt)},t.prototype.hasChild=function(t){Object(o.K)("DataSnapshot.hasChild",1,1,arguments.length),ut("DataSnapshot.hasChild",1,t,!1);var e=new U(t);return!this.node_.getChild(e).isEmpty()},t.prototype.getPriority=function(){return Object(o.K)("DataSnapshot.getPriority",0,0,arguments.length),this.node_.getPriority().val()},t.prototype.forEach=function(e){var n=this;if(Object(o.K)("DataSnapshot.forEach",1,1,arguments.length),Object(o.L)("DataSnapshot.forEach",1,e,!1),this.node_.isLeafNode())return!1;var r=this.node_;return!!r.forEachChild(this.index_,(function(r,i){return e(new t(i,n.ref_.child(r),kt))}))},t.prototype.hasChildren=function(){return Object(o.K)("DataSnapshot.hasChildren",0,0,arguments.length),!this.node_.isLeafNode()&&!this.node_.isEmpty()},Object.defineProperty(t.prototype,"key",{get:function(){return this.ref_.getKey()},enumerable:!1,configurable:!0}),t.prototype.numChildren=function(){return Object(o.K)("DataSnapshot.numChildren",0,0,arguments.length),this.node_.numChildren()},t.prototype.getRef=function(){return Object(o.K)("DataSnapshot.ref",0,0,arguments.length),this.ref_},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!1,configurable:!0}),t}(),Gt=function(){function t(t,e,n,r){this.eventType=t,this.eventRegistration=e,this.snapshot=n,this.prevName=r}return t.prototype.getPath=function(){var t=this.snapshot.getRef();return"value"===this.eventType?t.path:t.getParent().path},t.prototype.getEventType=function(){return this.eventType},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.getPath().toString()+":"+this.eventType+":"+Object(o.J)(this.snapshot.exportVal())},t}(),Qt=function(){function t(t,e,n){this.eventRegistration=t,this.error=e,this.path=n}return t.prototype.getPath=function(){return this.path},t.prototype.getEventType=function(){return"cancel"},t.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},t.prototype.toString=function(){return this.path.toString()+":cancel"},t}(),$t=function(){function t(t,e,n){this.callback_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){return"value"===t},t.prototype.createEvent=function(t,e){var n=e.getQueryParams().getIndex();return new Gt("value",this,new Wt(t.snapshotNode,e.getRef(),n))},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){Object(o.f)(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callback_;return function(){r.call(e,t.snapshot)}},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new Qt(this,t,e):null},t.prototype.matches=function(e){return e instanceof t&&(!e.callback_||!this.callback_||e.callback_===this.callback_&&e.context_===this.context_)},t.prototype.hasAnyCallback=function(){return null!==this.callback_},t}(),Yt=function(){function t(t,e,n){this.callbacks_=t,this.cancelCallback_=e,this.context_=n}return t.prototype.respondsTo=function(t){var e="children_added"===t?"child_added":t;return e="children_removed"===e?"child_removed":e,Object(o.k)(this.callbacks_,e)},t.prototype.createCancelEvent=function(t,e){return this.cancelCallback_?new Qt(this,t,e):null},t.prototype.createEvent=function(t,e){Object(o.f)(null!=t.childName,"Child events should have a childName.");var n=e.getRef().child(t.childName),r=e.getQueryParams().getIndex();return new Gt(t.type,this,new Wt(t.snapshotNode,n,r),t.prevName)},t.prototype.getEventRunner=function(t){var e=this.context_;if("cancel"===t.getEventType()){Object(o.f)(this.cancelCallback_,"Raising a cancel event on a listener with no cancel callback");var n=this.cancelCallback_;return function(){n.call(e,t.error)}}var r=this.callbacks_[t.eventType];return function(){r.call(e,t.snapshot,t.prevName)}},t.prototype.matches=function(e){var n=this;if(e instanceof t){if(!this.callbacks_||!e.callbacks_)return!0;
2if(this.context_===e.context_){var r=Object.keys(e.callbacks_),i=Object.keys(this.callbacks_),o=r.length;if(o===i.length){if(1===o){var a=r[0],s=i[0];return s===a&&(!e.callbacks_[a]||!this.callbacks_[s]||e.callbacks_[a]===this.callbacks_[s])}return i.every((function(t){return e.callbacks_[t]===n.callbacks_[t]}))}}}return!1},t.prototype.hasAnyCallback=function(){return null!==this.callbacks_},t}(),Jt=function(){function t(t,e,n,r){this.repo=t,this.path=e,this.queryParams_=n,this.orderByCalled_=r}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return Object(o.f)(Ht,"Reference.ts has not been loaded"),Ht},set:function(t){Ht=t},enumerable:!1,configurable:!0}),t.validateQueryEndpoints_=function(t){var e=null,n=null;if(t.hasStart()&&(e=t.getIndexStartValue()),t.hasEnd()&&(n=t.getIndexEndValue()),t.getIndex()===bt){var r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), endAt(),or equalTo() must be a string.";if(t.hasStart()){if(t.getIndexStartName()!==I)throw new Error(r);if("string"!==typeof e)throw new Error(i)}if(t.hasEnd()){if(t.getIndexEndName()!==C)throw new Error(r);if("string"!==typeof n)throw new Error(i)}}else if(t.getIndex()===kt){if(null!=e&&!et(e)||null!=n&&!et(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), endAt(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(Object(o.f)(t.getIndex()instanceof Kt||t.getIndex()===zt,"unknown index type."),null!=e&&"object"===typeof e||null!=n&&"object"===typeof n)throw new Error("Query: First argument passed to startAt(), endAt(), or equalTo() cannot be an object.")},t.validateLimit_=function(t){if(t.hasStart()&&t.hasEnd()&&t.hasLimit()&&!t.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), endAt(), and limit(). Use limitToFirst() or limitToLast() instead.")},t.prototype.validateNoPreviousOrderByCall_=function(t){if(!0===this.orderByCalled_)throw new Error(t+": You can't combine multiple orderBy calls.")},t.prototype.getQueryParams=function(){return this.queryParams_},t.prototype.getRef=function(){return Object(o.K)("Query.ref",0,0,arguments.length),new t.__referenceConstructor(this.repo,this.path)},t.prototype.on=function(e,n,r,i){Object(o.K)("Query.on",2,4,arguments.length),at("Query.on",1,e,!1),Object(o.L)("Query.on",2,n,!1);var a=t.getCancelAndContextArgs_("Query.on",r,i);if("value"===e)this.onValueEvent(n,a.cancel,a.context);else{var s={};s[e]=n,this.onChildEvent(s,a.cancel,a.context)}return n},t.prototype.onValueEvent=function(t,e,n){var r=new $t(t,e||null,n||null);this.repo.addEventCallbackForQuery(this,r)},t.prototype.onChildEvent=function(t,e,n){var r=new Yt(t,e,n);this.repo.addEventCallbackForQuery(this,r)},t.prototype.off=function(t,e,n){Object(o.K)("Query.off",0,3,arguments.length),at("Query.off",1,t,!0),Object(o.L)("Query.off",2,e,!0),Object(o.M)("Query.off",3,n,!0);var r=null,i=null;if("value"===t){var a=e||null;r=new $t(a,null,n||null)}else t&&(e&&((i={})[t]=e),r=new Yt(i,null,n||null));this.repo.removeEventCallbackForQuery(this,r)},t.prototype.get=function(){return this.repo.getValue(this)},t.prototype.once=function(e,n,r,i){var a=this;Object(o.K)("Query.once",1,4,arguments.length),at("Query.once",1,e,!1),Object(o.L)("Query.once",2,n,!0);var s=t.getCancelAndContextArgs_("Query.once",r,i),u=!0,c=new o.a;c.promise.catch((function(){}));var l=function t(r){u&&(u=!1,a.off(e,t),n&&n.bind(s.context)(r),c.resolve(r))};return this.on(e,l,(function(t){a.off(e,l),s.cancel&&s.cancel.bind(s.context)(t),c.reject(t)})),c.promise},t.prototype.limitToFirst=function(e){if(Object(o.K)("Query.limitToFirst",1,1,arguments.length),"number"!==typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToFirst: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToFirst: Limit was already set (by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.queryParams_.limitToFirst(e),this.orderByCalled_)},t.prototype.limitToLast=function(e){if(Object(o.K)("Query.limitToLast",1,1,arguments.length),"number"!==typeof e||Math.floor(e)!==e||e<=0)throw new Error("Query.limitToLast: First argument must be a positive integer.");if(this.queryParams_.hasLimit())throw new Error("Query.limitToLast: Limit was already set 
2(by another call to limit, limitToFirst, or limitToLast).");return new t(this.repo,this.path,this.queryParams_.limitToLast(e),this.orderByCalled_)},t.prototype.orderByChild=function(e){if(Object(o.K)("Query.orderByChild",1,1,arguments.length),"$key"===e)throw new Error('Query.orderByChild: "$key" is invalid.  Use Query.orderByKey() instead.');if("$priority"===e)throw new Error('Query.orderByChild: "$priority" is invalid.  Use Query.orderByPriority() instead.');if("$value"===e)throw new Error('Query.orderByChild: "$value" is invalid.  Use Query.orderByValue() instead.');ut("Query.orderByChild",1,e,!1),this.validateNoPreviousOrderByCall_("Query.orderByChild");var n=new U(e);if(n.isEmpty())throw new Error("Query.orderByChild: cannot pass in empty path.  Use Query.orderByValue() instead.");var r=new Kt(n),i=this.queryParams_.orderBy(r);return t.validateQueryEndpoints_(i),new t(this.repo,this.path,i,!0)},t.prototype.orderByKey=function(){Object(o.K)("Query.orderByKey",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByKey");var e=this.queryParams_.orderBy(bt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByPriority=function(){Object(o.K)("Query.orderByPriority",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByPriority");var e=this.queryParams_.orderBy(kt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.orderByValue=function(){Object(o.K)("Query.orderByValue",0,0,arguments.length),this.validateNoPreviousOrderByCall_("Query.orderByValue");var e=this.queryParams_.orderBy(zt);return t.validateQueryEndpoints_(e),new t(this.repo,this.path,e,!0)},t.prototype.startAt=function(e,n){void 0===e&&(e=null),Object(o.K)("Query.startAt",0,2,arguments.length),nt("Query.startAt",1,e,this.path,!0),st("Query.startAt",2,n,!0);var r=this.queryParams_.startAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasStart())throw new Error("Query.startAt: Starting point was already set (by another call to startAt or equalTo).");return void 0===e&&(e=null,n=null),new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.endAt=function(e,n){void 0===e&&(e=null),Object(o.K)("Query.endAt",0,2,arguments.length),nt("Query.endAt",1,e,this.path,!0),st("Query.endAt",2,n,!0);var r=this.queryParams_.endAt(e,n);if(t.validateLimit_(r),t.validateQueryEndpoints_(r),this.queryParams_.hasEnd())throw new Error("Query.endAt: Ending point was already set (by another call to endAt or equalTo).");return new t(this.repo,this.path,r,this.orderByCalled_)},t.prototype.equalTo=function(t,e){if(Object(o.K)("Query.equalTo",1,2,arguments.length),nt("Query.equalTo",1,t,this.path,!1),st("Query.equalTo",2,e,!0),this.queryParams_.hasStart())throw new Error("Query.equalTo: Starting point was already set (by another call to startAt or equalTo).");if(this.queryParams_.hasEnd())throw new Error("Query.equalTo: Ending point was already set (by another call to endAt or equalTo).");return this.startAt(t,e).endAt(t,e)},t.prototype.toString=function(){return Object(o.K)("Query.toString",0,0,arguments.length),this.repo.toString()+this.path.toUrlEncodedString()},t.prototype.toJSON=function(){return Object(o.K)("Query.toJSON",0,1,arguments.length),this.toString()},t.prototype.queryObject=function(){return this.queryParams_.getQueryObject()},t.prototype.queryIdentifier=function(){var t=this.queryObject(),e=N(t);return"{}"===e?"default":e},t.prototype.isEqual=function(e){if(Object(o.K)("Query.isEqual",1,1,arguments.length),!(e instanceof t)){var n="Query.isEqual failed: First argument must be an instance of firebase.database.Query.";throw new Error(n)}
2var r=this.repo===e.repo,i=this.path.equals(e.path),a=this.queryIdentifier()===e.queryIdentifier();return r&&i&&a},t.getCancelAndContextArgs_=function(t,e,n){var r={cancel:null,context:null};if(e&&n)r.cancel=e,Object(o.L)(t,3,r.cancel,!0),r.context=n,Object(o.M)(t,4,r.context,!0);else if(e)if("object"===typeof e&&null!==e)r.context=e;else{if("function"!==typeof e)throw new Error(Object(o.o)(t,3,!0)+" must either be a cancel callback or a context object.");r.cancel=e}return r},Object.defineProperty(t.prototype,"ref",{get:function(){return this.getRef()},enumerable:!1,configurable:!0}),t}(),Xt=function(){function t(t){this.node_=t}return t.prototype.getImmediateChild=function(e){return new t(this.node_.getImmediateChild(e))},t.prototype.node=function(){return this.node_},t}(),Zt=function(){function t(t,e){this.syncTree_=t,this.path_=e}return t.prototype.getImmediateChild=function(e){var n=this.path_.child(e);return new t(this.syncTree_,n)},t.prototype.node=function(){return this.syncTree_.calcCompleteEventCache(this.path_)},t}(),te=function(t,e,n){return t&&"object"===typeof t?(Object(o.f)(".sv"in t,"Unexpected leaf node or priority contents"),"string"===typeof t[".sv"]?ee(t[".sv"],e,n):"object"===typeof t[".sv"]?ne(t[".sv"],e):void Object(o.f)(!1,"Unexpected server value: "+JSON.stringify(t,null,2))):t},ee=function(t,e,n){switch(t){case"timestamp":return n.timestamp;default:Object(o.f)(!1,"Unexpected server value: "+t)}},ne=function(t,e,n){t.hasOwnProperty("increment")||Object(o.f)(!1,"Unexpected server value: "+JSON.stringify(t,null,2));var r=t.increment;"number"!==typeof r&&Object(o.f)(!1,"Unexpected increment value: "+r);var i=e.node();if(Object(o.f)(null!==i&&"undefined"!==typeof i,"Expected ChildrenNode.EMPTY_NODE for nulls"),!i.isLeafNode())return r;var a=i.getValue();return"number"!==typeof a?r:a+r},re=function(t,e,n,r){return oe(e,new Zt(n,t),r)},ie=function(t,e,n){return oe(t,new Xt(e),n)};function oe(t,e,n){var r,i=t.getPriority().val(),o=te(i,e.getImmediateChild(".priority"),n);if(t.isLeafNode()){var a=t,s=te(a.getValue(),e,n);return s!==a.getValue()||o!==a.getPriority().val()?new Tt(s,Bt(o)):t}var u=t;return r=u,o!==u.getPriority().val()&&(r=r.updatePriority(new Tt(o))),u.forEachChild(kt,(function(t,i){var o=oe(i,e.getImmediateChild(t),n);o!==i&&(r=r.updateImmediateChild(t,o))})),r}var ae,se=function(){function t(){this.value=null,this.children=new Map}return t.prototype.find=function(t){if(null!=this.value)return this.value.getChild(t);if(!t.isEmpty()&&this.children.size>0){var e=t.getFront();return t=t.popFront(),this.children.has(e)?this.children.get(e).find(t):null}return null},t.prototype.remember=function(e,n){if(e.isEmpty())this.value=n,this.children.clear();else if(null!==this.value)this.value=this.value.updateChild(e,n);else{var r=e.getFront();this.children.has(r)||this.children.set(r,new t);var i=this.children.get(r);e=e.popFront(),i.remember(e,n)}},t.prototype.forget=function(t){if(t.isEmpty())return this.value=null,this.children.clear(),!0;if(null!==this.value){if(this.value.isLeafNode())return!1;var e=this.value;this.value=null;var n=this;return e.forEachChild(kt,(function(t,e){n.remember(new U(t),e)})),this.forget(t)}if(this.children.size>0){var r=t.getFront();if(t=t.popFront(),this.children.has(r))this.children.get(r).forget(t)&&this.children.delete(r);return 0===this.children.size}return!0},t.prototype.forEachTree=function(t,e){null!==this.value?e(t,this.value):this.forEachChild((function(n,r){var i=new U(t.toString()+"/"+n);r.forEachTree(i,e)}))},t.prototype.forEachChild=function(t){this.children.forEach((function(e,n){t(n,e)}))},t}();!function(t){t[t.OVERWRITE=0]="OVERWRITE",t[t.MERGE=1]="MERGE",t[t.ACK_USER_WRITE=2]="ACK_USER_WRITE",t[t.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"}(ae||(ae={}));var ue,ce,le=function(){function t(t,e,n,r){this.fromUser=t,this.fromServer=e,this.queryId=n,this.tagged=r,Object(o.f)(!r||e,"Tagged queries must be from server.")}return t.User=new t(!0,!1,null,!1),t.Server=new t(!1,!0,null,!1),t.forServerTaggedQuery=function(e){return new t(!1,!0,e,!0)},t}(),fe=function(){function t(t,e,n){this.path=t,this.affectedTree=e,this.revert=n,this.type=ae.ACK_USER_WRITE,this.source=le.User}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return Object(o.f)(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new U(e));return new t(U.Empty,n,this.revert)}return Object(o.f)(this.path.getFront()===e,"operationForChild called for unrelated child."),new t(this.path.popFront(),this.affectedTree,this.revert)},t}(),he=function(){function t(t,e){void 0===e&&(ue||(ue=new xt(P)),e=ue),this.value=t,this.children=e}return t.fromObject=function(e){var n=t.Empty;return j(e,(function(t,e){n=n.set(new U(t),e)})),n},t.prototype.isEmpty=function(){return null===this.value&&this.children.isEmpty()},t.prototype.findRootMostMatchingPathAndValue=function(t,e){if(null!=this.value&&e(this.value))return{path:U.Empty,value:this.value};if(t.isEmpty())return null;var n=t.getFront(),r=this.children.get(n);if(null!==r){var i=r.findRootMostMatchingPathAndValue(t.popFront(),e);return null!=i?{path:new U(n).child(i.path),value:i.value}:null}return null},t.prototype.findRootMostValueAndPath=function(t){return this.findRootMostMatchingPathAndValue(t,(function(){return!0}))},t.prototype.subtree=function(e){if(e.isEmpty())return this;var n=e.getFront(),r=this.children.get(n);return null!==r?r.subtree(e.popFront()):t.Empty},t.prototype.set=function(e,n){if(e.isEmpty())return new t(n,this.children);var r=e.getFront(),i=(this.children.get(r)||t.Empty).set(e.popFront(),n),o=this.children.insert(r,i);return new t(this.value,o)},t.prototype.remove=function(e){if(e.isEmpty())return this.children.isEmpty()?t.Empty:new t(null,this.children);var n=e.getFront(),r=this.children.get(n);if(r){var i=r.remove(e.popFront()),o=void 0;return o=i.isEmpty()?this.children.remove(n):this.children.insert(n,i),null===this.value&&o.isEmpty()?t.Empty:new t(this.value,o)}return this},t.prototype.get=function(t){if(t.isEmpty())return this.value;var e=t.getFront(),n=this.children.get(e);return n?n.get(t.popFront()):null},t.prototype.setTree=function(e,n){if(e.isEmpty())return n;var r=e.getFront(),i=(this.children.get(r)||t.Empty).setTree(e.popFront(),n),o=void 0;return o=i.isEmpty()?this.children.remove(r):this.children.insert(r,i),new t(this.value,o)},t.prototype.fold=function(t){return this.fold_(U.Empty,t)}
2,t.prototype.fold_=function(t,e){var n={};return this.children.inorderTraversal((function(r,i){n[r]=i.fold_(t.child(r),e)})),e(t,this.value,n)},t.prototype.findOnPath=function(t,e){return this.findOnPath_(t,U.Empty,e)},t.prototype.findOnPath_=function(t,e,n){var r=!!this.value&&n(e,this.value);if(r)return r;if(t.isEmpty())return null;var i=t.getFront(),o=this.children.get(i);return o?o.findOnPath_(t.popFront(),e.child(i),n):null},t.prototype.foreachOnPath=function(t,e){return this.foreachOnPath_(t,U.Empty,e)},t.prototype.foreachOnPath_=function(e,n,r){if(e.isEmpty())return this;this.value&&r(n,this.value);var i=e.getFront(),o=this.children.get(i);return o?o.foreachOnPath_(e.popFront(),n.child(i),r):t.Empty},t.prototype.foreach=function(t){this.foreach_(U.Empty,t)},t.prototype.foreach_=function(t,e){this.children.inorderTraversal((function(n,r){r.foreach_(t.child(n),e)})),this.value&&e(t,this.value)},t.prototype.foreachChild=function(t){this.children.inorderTraversal((function(e,n){n.value&&t(e,n.value)}))},t.Empty=new t(null),t}(),pe=function(){function t(t,e){this.source=t,this.path=e,this.type=ae.LISTEN_COMPLETE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,U.Empty):new t(this.source,this.path.popFront())},t}(),de=function(){function t(t,e,n){this.source=t,this.path=e,this.snap=n,this.type=ae.OVERWRITE}return t.prototype.operationForChild=function(e){return this.path.isEmpty()?new t(this.source,U.Empty,this.snap.getImmediateChild(e)):new t(this.source,this.path.popFront(),this.snap)},t}(),ve=function(){function t(t,e,n){this.source=t,this.path=e,this.children=n,this.type=ae.MERGE}return t.prototype.operationForChild=function(e){if(this.path.isEmpty()){var n=this.children.subtree(new U(e));return n.isEmpty()?null:n.value?new de(this.source,U.Empty,n.value):new t(this.source,U.Empty,n)}return Object(o.f)(this.path.getFront()===e,"Can't get a merge for a child not on the path of the operation"),new t(this.source,this.path.popFront(),this.children)},t.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},t}(),ge=function(){function t(t,e,n){this.node_=t,this.fullyInitialized_=e,this.filtered_=n}return t.prototype.isFullyInitialized=function(){return this.fullyInitialized_},t.prototype.isFiltered=function(){return this.filtered_},t.prototype.isCompleteForPath=function(t){if(t.isEmpty())return this.isFullyInitialized()&&!this.filtered_;var e=t.getFront();return this.isCompleteForChild(e)},t.prototype.isCompleteForChild=function(t){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(t)},t.prototype.getNode=function(){return this.node_},t}(),ye=function(){function t(t,e){this.eventCache_=t,this.serverCache_=e}return t.prototype.updateEventSnap=function(e,n,r){return new t(new ge(e,n,r),this.serverCache_)},t.prototype.updateServerSnap=function(e,n,r){return new t(this.eventCache_,new ge(e,n,r))},t.prototype.getEventCache=function(){return this.eventCache_},t.prototype.getCompleteEventSnap=function(){return this.eventCache_.isFullyInitialized()?this.eventCache_.getNode():null},t.prototype.getServerCache=function(){return this.serverCache_},t.prototype.getCompleteServerSnap=function(){return this.serverCache_.isFullyInitialized()?this.serverCache_.getNode():null},t.Empty=new t(new ge(Vt.EMPTY_NODE,!1,!1),new ge(Vt.EMPTY_NODE,!1,!1)),t}(),me=function(){function t(t,e,n,r,i){this.type=t,this.snapshotNode=e,this.childName=n,this.oldSnap=r,this.prevName=i}return t.valueChange=function(e){return new t(t.VALUE,e)},t.childAddedChange=function(e,n){return new t(t.CHILD_ADDED,n,e)},t.childRemovedChange=function(e,n){return new t(t.CHILD_REMOVED,n,e)},t.childChangedChange=function(e,n,r){return new t(t.CHILD_CHANGED,n,e,r)},t.childMovedChange=function(e,n){return new t(t.CHILD_MOVED,n,e)},t.CHILD_ADDED="child_added",t.CHILD_REMOVED="child_removed",t.CHILD_CHANGED="child_changed",t.CHILD_MOVED="child_moved",t.VALUE="value",t}(),be=function(){function t(t){this.index_=t}return t.prototype.updateChild=function(t,e,n,r,i,a){Object(o.f)(t.isIndexed(this.index_),"A node must be indexed if only a child is updated");var s=t.getImmediateChild(e);return s.getChild(r).equals(n.getChild(r))&&s.isEmpty()===n.isEmpty()?t:(null!=a&&(n.isEmpty()?t.hasChild(e)?a.trackChildChange(me.childRemovedChange(e,s)):Object(o.f)(t.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):s.isEmpty()?a.trackChildChange(me.childAddedChange(e,n)):a.trackChildChange(me.childChangedChange(e,n,s))),t.isLeafNode()&&n.isEmpty()?t:t.updateImmediateChild(e,n).withIndex(this.index_))},t.prototype.updateFullNode=function(t,e,n){return null!=n&&(t.isLeafNode()||t.forEachChild(kt,(function(t,r){e.hasChild(t)||n.trackChildChange(me.childRemovedChange(t,r))})),e.isLeafNode()||e.forEachChild(kt,(function(e,r){if(t.hasChild(e)){var i=t.getImmediateChild(e);i.equals(r)||n.trackChildChange(me.childChangedChange(e,r,i))}else n.trackChildChange(me.childAddedChange(e,r))}))),e.withIndex(this.index_)},t.prototype.updatePriority=function(t,e){return t.isEmpty()?Vt.EMPTY_NODE:t.updatePriority(e)},t.prototype.filtersNodes=function(){return!1},t.prototype.getIndexedFilter=function(){return this},t.prototype.getIndex=function(){return this.index_},t}(),we=function(){function t(){this.changeMap=new Map}return t.prototype.trackChildChange=function(t){var e=t.type,n=t.childName;Object(o.f)(e===me.CHILD_ADDED||e===me.CHILD_CHANGED||e===me.CHILD_REMOVED,"Only child changes supported for tracking"),Object(o.f)(".priority"!==n,"Only non-priority child changes can be tracked.");var r=this.changeMap.get(n);if(r){var i=r.type;if(e===me.CHILD_ADDED&&i===me.CHILD_REMOVED)this.changeMap.set(n,me.childChangedChange(n,t.snapshotNode,r.snapshotNode));else if(e===me.CHILD_REMOVED&&i===me.CHILD_ADDED)this.changeMap.delete(n);else if(e===me.CHILD_REMOVED&&i===me.CHILD_CHANGED)this.changeMap.set(n,me.childRemovedChange(n,r.oldSnap));else if(e===me.CHILD_CHANGED&&i===me.CHILD_ADDED)this.changeMap.set(n,me.childAddedChange(n,t.snapshotNode));else{if(e!==me.CHILD_CHANGED||i!==me.CHILD_CHANGED)throw Object(o.g)("Illegal combination of changes: "+t+" occurred after "+r);this.changeMap.set(n,me.childChangedChange(n,t.snapshotNode,r.oldSnap))}}else this.changeMap.set(n,t)},t.prototype.getChanges=function(){return Array.from(this.changeMap.values())},t}(),_e=new(function(){function t(){}return t.prototype.getCompleteChild=function(t){return null},t.prototype.getChildAfterChild=function(t,e,n){return null},t}()),Ee=function(){function t(t,e,n){void 0===n&&(n=null),this.writes_=t,this.viewCache_=e,this.optCompleteServerCache_=n}return t.prototype.getCompleteChild=function(t){var e=this.viewCache_.getEventCache();if(e.isCompleteForChild(t))return e.getNode().getImmediateChild(t);var n=null!=this.optCompleteServerCache_?new ge(this.optCompleteServerCache_,!0,!1):this.viewCache_.getServerCache();return this.writes_.calcCompleteChild(t,n)},t.prototype.getChildAfterChild=function(t,e,n){var r=null!=this.optCompleteServerCache_?this.optCompleteServerCache_:this.viewCache_.getCompleteServerSnap(),i=this.writes_.calcIndexedSlice(r,e,1,n,t);return 0===i.length?null:i[0]},t}(),Oe=function(t,e){this.viewCache=t,this.changes=e},Se=function(){function t(t){this.filter_=t}return t.prototype.assertIndexed=function(t){Object(o.f)(t.getEventCache().getNode().isIndexed(this.filter_.getIndex()),"Event snap not indexed"),Object(o.f)(t.getServerCache().getNode().isIndexed(this.filter_.getIndex()),"Server snap not indexed")},t.prototype.applyOperation=function(e,n,r,i){var a,s,u=new we;if(n.type===ae.OVERWRITE){var c=n;c.source.fromUser?a=this.applyUserOverwrite_(e,c.path,c.snap,r,i,u):(Object(o.f)(c.source.fromServer,"Unknown source."),s=c.source.tagged||e.getServerCache().isFiltered()&&!c.path.isEmpty(),a=this.applyServerOverwrite_(e,c.path,c.snap,r,i,s,u))}else if(n.type===ae.MERGE){var l=n;l.source.fromUser?a=this.applyUserMerge_(e,l.path,l.children,r,i,u):(Object(o.f)(l.source.fromServer,"Unknown source."),s=l.source.tagged||e.getServerCache().isFiltered(),a=this.applyServerMerge_(e,l.path,l.children,r,i,s,u))}else if(n.type===ae.ACK_USER_WRITE){var f=n;a=f.revert?this.revertUserWrite_(e,f.path,r,i,u):this.ackUserWrite_(e,f.path,f.affectedTree,r,i,u)}else{if(n.type!==ae.LISTEN_COMPLETE)throw Object(o.g)("Unknown operation type: "+n.type);a=this.listenComplete_(e,n.path,r,u)}var h=u.getChanges();return t.maybeAddValueEvent_(e,a,h),new Oe(a,h)},t.maybeAddValueEvent_=function(t,e,n){var r=e.getEventCache();if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=t.getCompleteEventSnap();(n.length>
20||!t.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(me.valueChange(e.getCompleteEventSnap()))}},t.prototype.generateEventCacheAfterServerEvent_=function(t,e,n,r,i){var a=t.getEventCache();if(null!=n.shadowingWrite(e))return t;var s=void 0,u=void 0;if(e.isEmpty())if(Object(o.f)(t.getServerCache().isFullyInitialized(),"If change path is empty, we must have complete server data"),t.getServerCache().isFiltered()){var c=t.getCompleteServerSnap(),l=c instanceof Vt?c:Vt.EMPTY_NODE,f=n.calcCompleteEventChildren(l);s=this.filter_.updateFullNode(t.getEventCache().getNode(),f,i)}else{var h=n.calcCompleteEventCache(t.getCompleteServerSnap());s=this.filter_.updateFullNode(t.getEventCache().getNode(),h,i)}else{var p=e.getFront();if(".priority"===p){Object(o.f)(1===e.getLength(),"Can't have a priority with additional path components");var d=a.getNode();u=t.getServerCache().getNode();var v=n.calcEventCacheAfterServerOverwrite(e,d,u);s=null!=v?this.filter_.updatePriority(d,v):a.getNode()}else{var g=e.popFront(),y=void 0;if(a.isCompleteForChild(p)){u=t.getServerCache().getNode();var m=n.calcEventCacheAfterServerOverwrite(e,a.getNode(),u);y=null!=m?a.getNode().getImmediateChild(p).updateChild(g,m):a.getNode().getImmediateChild(p)}else y=n.calcCompleteChild(p,t.getServerCache());s=null!=y?this.filter_.updateChild(a.getNode(),p,y,g,r,i):a.getNode()}}return t.updateEventSnap(s,a.isFullyInitialized()||e.isEmpty(),this.filter_.filtersNodes())},t.prototype.applyServerOverwrite_=function(t,e,n,r,i,o,a){var s,u=t.getServerCache(),c=o?this.filter_:this.filter_.getIndexedFilter();if(e.isEmpty())s=c.updateFullNode(u.getNode(),n,null);else if(c.filtersNodes()&&!u.isFiltered()){var l=u.getNode().updateChild(e,n);s=c.updateFullNode(u.getNode(),l,null)}else{var f=e.getFront();if(!u.isCompleteForPath(e)&&e.getLength()>1)return t;var h=e.popFront(),p=u.getNode().getImmediateChild(f).updateChild(h,n);s=".priority"===f?c.updatePriority(u.getNode(),p):c.updateChild(u.getNode(),f,p,h,_e,null)}var d=t.updateServerSnap(s,u.isFullyInitialized()||e.isEmpty(),c.filtersNodes()),v=new Ee(r,d,i);return this.generateEventCacheAfterServerEvent_(d,e,r,v,a)},t.prototype.applyUserOverwrite_=function(t,e,n,r,i,o){var a,s,u=t.getEventCache(),c=new Ee(r,t,i);if(e.isEmpty())s=this.filter_.updateFullNode(t.getEventCache().getNode(),n,o),a=t.updateEventSnap(s,!0,this.filter_.filtersNodes());else{var l=e.getFront();if(".priority"===l)s=this.filter_.updatePriority(t.getEventCache().getNode(),n),a=t.updateEventSnap(s,u.isFullyInitialized(),u.isFiltered());else{var f=e.popFront(),h=u.getNode().getImmediateChild(l),p=void 0;if(f.isEmpty())p=n;else{var d=c.getCompleteChild(l);p=null!=d?".priority"===f.getBack()&&d.getChild(f.parent()).isEmpty()?d:d.updateChild(f,n):Vt.EMPTY_NODE}if(h.equals(p))a=t;else{var v=this.filter_.updateChild(u.getNode(),l,p,f,c,o);a=t.updateEventSnap(v,u.isFullyInitialized(),this.filter_.filtersNodes())}}}return a},t.cacheHasChild_=function(t,e){return t.getEventCache().isCompleteForChild(e)},t.prototype.applyUserMerge_=function(e,n,r,i,o,a){var s=this,u=e;return r.foreach((function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())&&(u=s.applyUserOverwrite_(u,l,c,i,o,a))})),r.foreach((function(r,c){var l=n.child(r);t.cacheHasChild_(e,l.getFront())||(u=s.applyUserOverwrite_(u,l,c,i,o,a))})),u},t.prototype.applyMerge_=function(t,e){return e.foreach((function(e,n){t=t.updateChild(e,n)})),t},t.prototype.applyServerMerge_=function(t,e,n,r,i,o,a){var s=this;if(t.getServerCache().getNode().isEmpty()&&!t.getServerCache().isFullyInitialized())return t;var u,c=t;u=e.isEmpty()?n:he.Empty.setTree(e,n);var l=t.getServerCache().getNode();return u.children.inorderTraversal((function(e,n){if(l.hasChild(e)){var u=t.getServerCache().getNode().getImmediateChild(e),f=s.applyMerge_(u,n);c=s.applyServerOverwrite_(c,new U(e),f,r,i,o,a)}})),u.children.inorderTraversal((function(e,n){var u=!t.getServerCache().isCompleteForChild(e)&&null==n.value;if(!l.hasChild(e)&&!u){var f=t.getServerCache().getNode().getImmediateChild(e),h=s.applyMerge_(f,n);c=s.applyServerOverwrite_(c,new U(e),h,r,i,o,a)}})),c},t.prototype.ackUserWrite_=function(t,e,n,r,i,o){if(null!=r.shadowingWrite(e))return t;var a=t.getServerCache().isFiltered(),s=t.getServerCache();if(null!=n.value){if(e.isEmpty()&&s.isFullyInitialized()||s.isCompleteForPath(e))return this.applyServerOverwrite_(t,e,s.getNode().getChild(e),r,i,a,o);if(e.isEmpty()){var u=he.Empty;
2return s.getNode().forEachChild(bt,(function(t,e){u=u.set(new U(t),e)})),this.applyServerMerge_(t,e,u,r,i,a,o)}return t}var c=he.Empty;return n.foreach((function(t,n){var r=e.child(t);s.isCompleteForPath(r)&&(c=c.set(t,s.getNode().getChild(r)))})),this.applyServerMerge_(t,e,c,r,i,a,o)},t.prototype.listenComplete_=function(t,e,n,r){var i=t.getServerCache(),o=t.updateServerSnap(i.getNode(),i.isFullyInitialized()||e.isEmpty(),i.isFiltered());return this.generateEventCacheAfterServerEvent_(o,e,n,_e,r)},t.prototype.revertUserWrite_=function(t,e,n,r,i){var a;if(null!=n.shadowingWrite(e))return t;var s=new Ee(n,t,r),u=t.getEventCache().getNode(),c=void 0;if(e.isEmpty()||".priority"===e.getFront()){var l=void 0;if(t.getServerCache().isFullyInitialized())l=n.calcCompleteEventCache(t.getCompleteServerSnap());else{var f=t.getServerCache().getNode();Object(o.f)(f instanceof Vt,"serverChildren would be complete if leaf node"),l=n.calcCompleteEventChildren(f)}l=l,c=this.filter_.updateFullNode(u,l,i)}else{var h=e.getFront(),p=n.calcCompleteChild(h,t.getServerCache());null==p&&t.getServerCache().isCompleteForChild(h)&&(p=u.getImmediateChild(h)),(c=null!=p?this.filter_.updateChild(u,h,p,e.popFront(),s,i):t.getEventCache().getNode().hasChild(h)?this.filter_.updateChild(u,h,Vt.EMPTY_NODE,e.popFront(),s,i):u).isEmpty()&&t.getServerCache().isFullyInitialized()&&(a=n.calcCompleteEventCache(t.getCompleteServerSnap())).isLeafNode()&&(c=this.filter_.updateFullNode(c,a,i))}return a=t.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(U.Empty),t.updateEventSnap(c,a,this.filter_.filtersNodes())},t}(),Te=function(){function t(t){this.query_=t,this.index_=this.query_.getQueryParams().getIndex()}return t.prototype.generateEventsForChanges=function(t,e,n){var r=this,i=[],o=[];return t.forEach((function(t){t.type===me.CHILD_CHANGED&&r.index_.indexedValueChanged(t.oldSnap,t.snapshotNode)&&o.push(me.childMovedChange(t.childName,t.snapshotNode))})),this.generateEventsForType_(i,me.CHILD_REMOVED,t,n,e),this.generateEventsForType_(i,me.CHILD_ADDED,t,n,e),this.generateEventsForType_(i,me.CHILD_MOVED,o,n,e),this.generateEventsForType_(i,me.CHILD_CHANGED,t,n,e),this.generateEventsForType_(i,me.VALUE,t,n,e),i},t.prototype.generateEventsForType_=function(t,e,n,r,i){var o=this,a=n.filter((function(t){return t.type===e}));a.sort(this.compareChanges_.bind(this)),a.forEach((function(e){var n=o.materializeSingleChange_(e,i);r.forEach((function(r){r.respondsTo(e.type)&&t.push(r.createEvent(n,o.query_))}))}))},t.prototype.materializeSingleChange_=function(t,e){return"value"===t.type||"child_removed"===t.type||(t.prevName=e.getPredecessorChildName(t.childName,t.snapshotNode,this.index_)),t},t.prototype.compareChanges_=function(t,e){if(null==t.childName||null==e.childName)throw Object(o.g)("Should only compare child_ events.");var n=new gt(t.childName,t.snapshotNode),r=new gt(e.childName,e.snapshotNode);return this.index_.compare(n,r)},t}(),Ie=function(){function t(t,e){this.query_=t,this.eventRegistrations_=[];var n=this.query_.getQueryParams(),r=new be(n.getIndex()),i=n.getNodeFilter();this.processor_=new Se(i);var o=e.getServerCache(),a=e.getEventCache(),s=r.updateFullNode(Vt.EMPTY_NODE,o.getNode(),null),u=i.updateFullNode(Vt.EMPTY_NODE,a.getNode(),null),c=new ge(s,o.isFullyInitialized(),r.filtersNodes()),l=new ge(u,a.isFullyInitialized(),i.filtersNodes());this.viewCache_=new ye(l,c),this.eventGenerator_=new Te(this.query_)}return t.prototype.getQuery=function(){return this.query_},t.prototype.getServerCache=function(){return this.viewCache_.getServerCache().getNode()},t.prototype.getCompleteServerCache=function(t){var e=this.viewCache_.getCompleteServerSnap();return e&&(this.query_.getQueryParams().loadsAllData()||!t.isEmpty()&&!e.getImmediateChild(t.getFront()).isEmpty())?e.getChild(t):null},t.prototype.isEmpty=function(){return 0===this.eventRegistrations_.length},t.prototype.addEventRegistration=function(t){this.eventRegistrations_.push(t)},t.prototype.removeEventRegistration=function(t,e){var n=[];if(e){Object(o.f)(null==t,"A cancel should cancel all event registrations.");var r=this.query_.path;this.eventRegistrations_.forEach((function(t){e=e;var i=t.createCancelEvent(e,r);i&&n.push(i)}))}if(t){for(var i=[],a=0;a<this.eventRegistrations_.length;++a){var s=this.eventRegistrations_[a];if(s.matches(t)){if(t.hasAnyCallback()){i=i.concat(this.eventRegistrations_.slice(a+1));break}}else i.push(s)}this.eventRegistrations_=i}else this.eventRegistrations_=[];return n},t.prototype.applyOperation=function(t,e,n){t.type===ae.MERGE&&null!==t.source.queryId&&(Object(o.f)(this.viewCache_.getCompleteServerSnap(),"We should always have a full c
2ache before handling merges"),Object(o.f)(this.viewCache_.getCompleteEventSnap(),"Missing event cache, even though we have a server cache"));var r=this.viewCache_,i=this.processor_.applyOperation(r,t,e,n);return this.processor_.assertIndexed(i.viewCache),Object(o.f)(i.viewCache.getServerCache().isFullyInitialized()||!r.getServerCache().isFullyInitialized(),"Once a server snap is complete, it should never go back"),this.viewCache_=i.viewCache,this.generateEventsForChanges_(i.changes,i.viewCache.getEventCache().getNode(),null)},t.prototype.getInitialEvents=function(t){var e=this.viewCache_.getEventCache(),n=[];e.getNode().isLeafNode()||e.getNode().forEachChild(kt,(function(t,e){n.push(me.childAddedChange(t,e))}));return e.isFullyInitialized()&&n.push(me.valueChange(e.getNode())),this.generateEventsForChanges_(n,e.getNode(),t)},t.prototype.generateEventsForChanges_=function(t,e,n){var r=n?[n]:this.eventRegistrations_;return this.eventGenerator_.generateEventsForChanges(t,e,r)},t}(),Ce=function(){function t(){this.views=new Map}return Object.defineProperty(t,"__referenceConstructor",{get:function(){return Object(o.f)(ce,"Reference.ts has not been loaded"),ce},set:function(t){Object(o.f)(!ce,"__referenceConstructor has already been defined"),ce=t},enumerable:!1,configurable:!0}),t.prototype.isEmpty=function(){return 0===this.views.size},t.prototype.applyOperation=function(t,e,n){var r,a,s=t.source.queryId;if(null!==s){var u=this.views.get(s);return Object(o.f)(null!=u,"SyncTree gave us an op for an invalid query."),u.applyOperation(t,e,n)}var c=[];try{for(var l=Object(i.h)(this.views.values()),f=l.next();!f.done;f=l.next()){u=f.value;c=c.concat(u.applyOperation(t,e,n))}}catch(h){r={error:h}}finally{try{f&&!f.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}return c},t.prototype.addEventRegistration=function(t,e,n,r,i){var o=t.queryIdentifier(),a=this.views.get(o);if(!a){var s=n.calcCompleteEventCache(i?r:null),u=!1;s?u=!0:r instanceof Vt?(s=n.calcCompleteEventChildren(r),u=!1):(s=Vt.EMPTY_NODE,u=!1);var c=new ye(new ge(s,u,!1),new ge(r,i,!1));a=new Ie(t,c),this.views.set(o,a)}return a.addEventRegistration(e),a.getInitialEvents(e)},t.prototype.removeEventRegistration=function(e,n,r){var o,a,s=e.queryIdentifier(),u=[],c=[],l=this.hasCompleteView();if("default"===s)try{for(var f=Object(i.h)(this.views.entries()),h=f.next();!h.done;h=f.next()){var p=Object(i.e)(h.value,2),d=p[0],v=p[1];c=c.concat(v.removeEventRegistration(n,r)),v.isEmpty()&&(this.views.delete(d),v.getQuery().getQueryParams().loadsAllData()||u.push(v.getQuery()))}}catch(g){o={error:g}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}else(v=this.views.get(s))&&(c=c.concat(v.removeEventRegistration(n,r)),v.isEmpty()&&(this.views.delete(s),v.getQuery().getQueryParams().loadsAllData()||u.push(v.getQuery())));return l&&!this.hasCompleteView()&&u.push(new t.__referenceConstructor(e.repo,e.path)),{removed:u,events:c}},t.prototype.getQueryViews=function(){var t,e,n=[];try{for(var r=Object(i.h)(this.views.values()),o=r.next();!o.done;o=r.next()){var a=o.value;a.getQuery().getQueryParams().loadsAllData()||n.push(a)}}catch(s){t={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},t.prototype.getCompleteServerCache=function(t){var e,n,r=null;try{for(var o=Object(i.h)(this.views.values()),a=o.next();!a.done;a=o.next()){var s=a.value;r=r||s.getCompleteServerCache(t)}}catch(u){e={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return r},t.prototype.viewForQuery=function(t){if(t.getQueryParams().loadsAllData())return this.getCompleteView();var e=t.queryIdentifier();return this.views.get(e)},t.prototype.viewExistsForQuery=function(t){return null!=this.viewForQuery(t)},t.prototype.hasCompleteView=function(){return null!=this.getCompleteView()},t.prototype.getCompleteView=function(){var t,e;try{for(var n=Object(i.h)(this.views.values()),r=n.next();!r.done;r=n.next()){var o=r.value;if(o.getQuery().getQueryParams().loadsAllData())return o}}catch(a){t={error:a}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return null},t}(),ke=function(){function t(t){this.writeTree_=t}return t.prototype.addWrite=function(e,n){if(e.isEmpty())return new t(new he(n));var r=this.writeTree_.findRootMostValueAndPath(e);if(null!=r){var i=r.path,o=r.value,a=U.relativePath(i,e);return o=o.updateChild(a,n),new t(this.writeTree_.set(i,o))}var s=new he(n);return new t(this.writeTree_.setTree(e,s))},t.prototype.addWrites=function(t,e){var n=this;return j(e,(function(e,r){n=n.addWrite(t.child(e),r)})),n},t.prototype.removeWrite=function(e){return e.isEmpty()?t.Empty:new t(this.writeTree_.setTree(e,he.Empty))},t.prototype.hasCompleteWrite=function(t){return null!=this.getCompleteNode(t)},t.prototype.getCompleteNode=function(t){var e=this.writeTree_.findRootMostValueAndPath(t);return null!=e?this.writeTree_.get(e.path).getChild(U.relativePath(e.path,t)):null},t.prototype.getCompleteChildren=function(){var t=[],e=this.writeTree_.value;return null!=e?e.isLeafNode()||e.forEachChild(kt,(function(e,n){t.push(new gt(e,n))}
2)):this.writeTree_.children.inorderTraversal((function(e,n){null!=n.value&&t.push(new gt(e,n.value))})),t},t.prototype.childCompoundWrite=function(e){if(e.isEmpty())return this;var n=this.getCompleteNode(e);return new t(null!=n?new he(n):this.writeTree_.subtree(e))},t.prototype.isEmpty=function(){return this.writeTree_.isEmpty()},t.prototype.apply=function(t){return Pe(U.Empty,this.writeTree_,t)},t.Empty=new t(new he(null)),t}();function Pe(t,e,n){if(null!=e.value)return n.updateChild(t,e.value);var r=null;return e.children.inorderTraversal((function(e,i){".priority"===e?(Object(o.f)(null!==i.value,"Priority writes must always be leaf nodes"),r=i.value):n=Pe(t.child(e),i,n)})),n.getChild(t).isEmpty()||null===r||(n=n.updateChild(t.child(".priority"),r)),n}var Ae=function(){function t(){this.visibleWrites_=ke.Empty,this.allWrites_=[],this.lastWriteId_=-1}return t.prototype.childWrites=function(t){return new Ne(t,this)},t.prototype.addOverwrite=function(t,e,n,r){Object(o.f)(n>this.lastWriteId_,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.allWrites_.push({path:t,snap:e,writeId:n,visible:r}),r&&(this.visibleWrites_=this.visibleWrites_.addWrite(t,e)),this.lastWriteId_=n},t.prototype.addMerge=function(t,e,n){Object(o.f)(n>this.lastWriteId_,"Stacking an older merge on top of newer ones"),this.allWrites_.push({path:t,children:e,writeId:n,visible:!0}),this.visibleWrites_=this.visibleWrites_.addWrites(t,e),this.lastWriteId_=n},t.prototype.getWrite=function(t){for(var e=0;e<this.allWrites_.length;e++){var n=this.allWrites_[e];if(n.writeId===t)return n}return null},t.prototype.removeWrite=function(t){var e=this,n=this.allWrites_.findIndex((function(e){return e.writeId===t}));Object(o.f)(n>=0,"removeWrite called with nonexistent writeId.");var r=this.allWrites_[n];this.allWrites_.splice(n,1);for(var i=r.visible,a=!1,s=this.allWrites_.length-1;i&&s>=0;){var u=this.allWrites_[s];u.visible&&(s>=n&&this.recordContainsPath_(u,r.path)?i=!1:r.path.contains(u.path)&&(a=!0)),s--}if(i){if(a)return this.resetTree_(),!0;r.snap?this.visibleWrites_=this.visibleWrites_.removeWrite(r.path):j(r.children,(function(t){e.visibleWrites_=e.visibleWrites_.removeWrite(r.path.child(t))}));return!0}return!1},t.prototype.getCompleteWriteData=function(t){return this.visibleWrites_.getCompleteNode(t)},t.prototype.calcCompleteEventCache=function(e,n,r,i){if(r||i){var o=this.visibleWrites_.childCompoundWrite(e);if(!i&&o.isEmpty())return n;if(i||null!=n||o.hasCompleteWrite(U.Empty)){var a=t.layerTree_(this.allWrites_,(function(t){return(t.visible||i)&&(!r||!~r.indexOf(t.writeId))&&(t.path.contains(e)||e.contains(t.path))}),e);c=n||Vt.EMPTY_NODE;return a.apply(c)}return null}var s=this.visibleWrites_.getCompleteNode(e);if(null!=s)return s;var u=this.visibleWrites_.childCompoundWrite(e);if(u.isEmpty())return n;if(null!=n||u.hasCompleteWrite(U.Empty)){var c=n||Vt.EMPTY_NODE;return u.apply(c)}return null},t.prototype.calcCompleteEventChildren=function(t,e){var n=Vt.EMPTY_NODE,r=this.visibleWrites_.getCompleteNode(t);if(r)return r.isLeafNode()||r.forEachChild(kt,(function(t,e){n=n.updateImmediateChild(t,e)})),n;if(e){var i=this.visibleWrites_.childCompoundWrite(t);return e.forEachChild(kt,(function(t,e){var r=i.childCompoundWrite(new U(t)).apply(e);n=n.updateImmediateChild(t,r)}
2)),i.getCompleteChildren().forEach((function(t){n=n.updateImmediateChild(t.name,t.node)})),n}return this.visibleWrites_.childCompoundWrite(t).getCompleteChildren().forEach((function(t){n=n.updateImmediateChild(t.name,t.node)})),n},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n,r){Object(o.f)(n||r,"Either existingEventSnap or existingServerSnap must exist");var i=t.child(e);if(this.visibleWrites_.hasCompleteWrite(i))return null;var a=this.visibleWrites_.childCompoundWrite(i);return a.isEmpty()?r.getChild(e):a.apply(r.getChild(e))},t.prototype.calcCompleteChild=function(t,e,n){var r=t.child(e),i=this.visibleWrites_.getCompleteNode(r);return null!=i?i:n.isCompleteForChild(e)?this.visibleWrites_.childCompoundWrite(r).apply(n.getNode().getImmediateChild(e)):null},t.prototype.shadowingWrite=function(t){return this.visibleWrites_.getCompleteNode(t)},t.prototype.calcIndexedSlice=function(t,e,n,r,i,o){var a,s=this.visibleWrites_.childCompoundWrite(t),u=s.getCompleteNode(U.Empty);if(null!=u)a=u;else{if(null==e)return[];a=s.apply(e)}if((a=a.withIndex(o)).isEmpty()||a.isLeafNode())return[];for(var c=[],l=o.getCompare(),f=i?a.getReverseIteratorFrom(n,o):a.getIteratorFrom(n,o),h=f.getNext();h&&c.length<r;)0!==l(h,n)&&c.push(h),h=f.getNext();return c},t.prototype.recordContainsPath_=function(t,e){if(t.snap)return t.path.contains(e);for(var n in t.children)if(t.children.hasOwnProperty(n)&&t.path.child(n).contains(e))return!0;return!1},t.prototype.resetTree_=function(){this.visibleWrites_=t.layerTree_(this.allWrites_,t.DefaultFilter_,U.Empty),this.allWrites_.length>0?this.lastWriteId_=this.allWrites_[this.allWrites_.length-1].writeId:this.lastWriteId_=-1},t.DefaultFilter_=function(t){return t.visible},t.layerTree_=function(t,e,n){for(var r=ke.Empty,i=0;i<t.length;++i){var a=t[i];if(e(a)){var s=a.path,u=void 0;if(a.snap)n.contains(s)?(u=U.relativePath(n,s),r=r.addWrite(u,a.snap)):s.contains(n)&&(u=U.relativePath(s,n),r=r.addWrite(U.Empty,a.snap.getChild(u)));else{if(!a.children)throw Object(o.g)("WriteRecord should have .snap or .children");if(n.contains(s))u=U.relativePath(n,s),r=r.addWrites(u,a.children);else if(s.contains(n))if((u=U.relativePath(s,n)).isEmpty())r=r.addWrites(U.Empty,a.children);else{var c=Object(o.G)(a.children,u.getFront());if(c){var l=c.getChild(u.popFront());r=r.addWrite(U.Empty,l)}}}}}return r},t}(),Ne=function(){function t(t,e){this.treePath_=t,this.writeTree_=e}return t.prototype.calcCompleteEventCache=function(t,e,n){return this.writeTree_.calcCompleteEventCache(this.treePath_,t,e,n)},t.prototype.calcCompleteEventChildren=function(t){return this.writeTree_.calcCompleteEventChildren(this.treePath_,t)},t.prototype.calcEventCacheAfterServerOverwrite=function(t,e,n){return this.writeTree_.calcEventCacheAfterServerOverwrite(this.treePath_,t,e,n)},t.prototype.shadowingWrite=function(t){return this.writeTree_.shadowingWrite(this.treePath_.child(t))},t.prototype.calcIndexedSlice=function(t,e,n,r,i){return this.writeTree_.calcIndexedSlice(this.treePath_,t,e,n,r,i)},t.prototype.calcCompleteChild=function(t,e){return this.writeTree_.calcCompleteChild(this.treePath_,t,e)},t.prototype.child=function(e){return new t(this.treePath_.child(e),this.writeTree_)},t}(),xe=function(){function t(t){this.listenProvider_=t,this.syncPointTree_=he.Empty,this.pendingWriteTree_=new Ae,this.tagToQueryMap=new Map,this.queryToTagMap=new Map}return t.prototype.applyUserOverwrite=function(t,e,n,r){return this.pendingWriteTree_.addOverwrite(t,e,n,r),r?this.applyOperationToSyncPoints_(new de(le.User,t,e)):[]},t.prototype.applyUserMerge=function(t,e,n){this.pendingWriteTree_.addMerge(t,e,n);var r=he.fromObject(e);return this.applyOperationToSyncPoints_(new ve(le.User,t,r))},t.prototype.ackUserWrite=function(t,e){void 0===e&&(e=!1);var n=this.pendingWriteTree_.getWrite(t);if(this.pendingWriteTree_.removeWrite(t)){var r=he.Empty;return null!=n.snap?r=r.set(U.Empty,!0):j(n.children,(function(t,e){r=r.set(new U(t),e)})),this.applyOperationToSyncPoints_(new fe(n.path,r,e))}return[]},t.prototype.applyServerOverwrite=function(t,e){return this.applyOperationToSyncPoints_(new de(le.Server,t,e))},t.prototype.applyServerMerge=function(t,e){var n=he.fromObject(e);return this.applyOperationToSyncPoints_(new ve(le.Server,t,n))},t.prototype.applyListenComplete=function(t){return this.applyOperationToSyncPoints_(new pe(le.Server,t))},t.prototype.applyTaggedQueryOverwrite=function(e,n,r){var i=this.queryKeyForTag_(r);if(null!=i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=U.relativePath(a,e),c=new de(le.forServerTaggedQuery(s),u,n);return this.applyTaggedOperation_(a,c)}return[]},t.prototype.applyTaggedQueryMerge=function(e,n,r){var i=this.queryKeyForTag_(r);if(i){var o=t.parseQueryKey_(i),a=o.path,s=o.queryId,u=U.relativePath(a,e),c=he.fromObject(n),l=new ve(le.forServerTaggedQuery(s),u,c);return this.applyTaggedOperation_(a,l)}return[]},t.prototype.applyTaggedListenComplete=function(e,n){var r=this.queryKeyForTag_(n);if(r){var i=t.parseQueryKey_(r),o=i.path,a=i.queryId,s=U.relativePath(o,e),u=new pe(le.forServerTaggedQuery(a),s);return this.applyTaggedOperation_(o,u)}return[]},t.prototype.addEventRegistration=function(e,n){var r=e.path,i=null,a=!1;this.syncPointTree_.foreachOnPath(r,(function(t,e){var n=U.relativePath(t,r);i=i||e.getCompleteServerCache(n),a=a||e.hasCompleteView()}));var s,u=this.syncPointTree_.get(r);(u?(a=a||u.hasCompleteView(),i=i||u.getCompleteServerCache(U.Empty)):(u=new Ce,this.syncPointTree_=this.syncPointTree_.set(r,u)),null!=i)?s=!0:(s=!1,i=Vt.EMPTY_NODE,this.syncPointTree_.subtree(r).foreachChild((function(t,e){var n=e.getCompleteServerCache(U.Empty);n&&(i=i.updateImmediateChild(t,n))}
2)));var c=u.viewExistsForQuery(e);if(!c&&!e.getQueryParams().loadsAllData()){var l=t.makeQueryKey_(e);Object(o.f)(!this.queryToTagMap.has(l),"View does not exist, but we have a tag");var f=t.getNextQueryTag_();this.queryToTagMap.set(l,f),this.tagToQueryMap.set(f,l)}var h=this.pendingWriteTree_.childWrites(r),p=u.addEventRegistration(e,n,h,i,s);if(!c&&!a){var d=u.viewForQuery(e);p=p.concat(this.setupListener_(e,d))}return p},t.prototype.removeEventRegistration=function(e,n,r){var i=this,o=e.path,a=this.syncPointTree_.get(o),s=[];if(a&&("default"===e.queryIdentifier()||a.viewExistsForQuery(e))){var u=a.removeEventRegistration(e,n,r);a.isEmpty()&&(this.syncPointTree_=this.syncPointTree_.remove(o));var c=u.removed;s=u.events;var l=-1!==c.findIndex((function(t){return t.getQueryParams().loadsAllData()})),f=this.syncPointTree_.findOnPath(o,(function(t,e){return e.hasCompleteView()}));if(l&&!f){var h=this.syncPointTree_.subtree(o);if(!h.isEmpty())for(var p=this.collectDistinctViewsForSubTree_(h),d=0;d<p.length;++d){var v=p[d],g=v.getQuery(),y=this.createListenerForView_(v);this.listenProvider_.startListening(t.queryForListening_(g),this.tagForQuery_(g),y.hashFn,y.onComplete)}}if(!f&&c.length>0&&!r)if(l){this.listenProvider_.stopListening(t.queryForListening_(e),null)}else c.forEach((function(e){var n=i.queryToTagMap.get(t.makeQueryKey_(e));i.listenProvider_.stopListening(t.queryForListening_(e),n)}));this.removeTags_(c)}return s},t.prototype.calcCompleteEventCache=function(t,e){var n=this.pendingWriteTree_,r=this.syncPointTree_.findOnPath(t,(function(e,n){var r=U.relativePath(e,t),i=n.getCompleteServerCache(r);if(i)return i}));return n.calcCompleteEventCache(t,r,e,!0)},t.prototype.collectDistinctViewsForSubTree_=function(t){return t.fold((function(t,e,n){if(e&&e.hasCompleteView())return[e.getCompleteView()];var r=[];return e&&(r=e.getQueryViews()),j(n,(function(t,e){r=r.concat(e)})),r}))},t.prototype.removeTags_=function(e){for(var n=0;n<e.length;++n){var r=e[n];if(!r.getQueryParams().loadsAllData()){var i=t.makeQueryKey_(r),o=this.queryToTagMap.get(i);this.queryToTagMap.delete(i),this.tagToQueryMap.delete(o)}}},t.queryForListening_=function(t){return t.getQueryParams().loadsAllData()&&
2!t.getQueryParams().isDefault()?t.getRef():t},t.prototype.setupListener_=function(e,n){var r=e.path,i=this.tagForQuery_(e),a=this.createListenerForView_(n),s=this.listenProvider_.startListening(t.queryForListening_(e),i,a.hashFn,a.onComplete),u=this.syncPointTree_.subtree(r);if(i)Object(o.f)(!u.value.hasCompleteView(),"If we're adding a query, it shouldn't be shadowed");else for(var c=u.fold((function(t,e,n){if(!t.isEmpty()&&e&&e.hasCompleteView())return[e.getCompleteView().getQuery()];var r=[];return e&&(r=r.concat(e.getQueryViews().map((function(t){return t.getQuery()})))),j(n,(function(t,e){r=r.concat(e)})),r})),l=0;l<c.length;++l){var f=c[l];this.listenProvider_.stopListening(t.queryForListening_(f),this.tagForQuery_(f))}return s},t.prototype.createListenerForView_=function(t){var e=this,n=t.getQuery(),r=this.tagForQuery_(n);return{hashFn:function(){return(t.getServerCache()||Vt.EMPTY_NODE).hash()},onComplete:function(t){if("ok"===t)return r?e.applyTaggedListenComplete(n.path,r):e.applyListenComplete(n.path);var i=function(t,e){var n="Unknown Error";"too_big"===t?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"===t?n="Client doesn't have permission to access the desired data.":"unavailable"===t&&(n="The service is unavailable");var r=new Error(t+" at "+e.path.toString()+": "+n);return r.code=t.toUpperCase(),r}(t,n);return e.removeEventRegistration(n,null,i)}}},t.makeQueryKey_=function(t){return t.path.toString()+"$"+t.queryIdentifier()},t.parseQueryKey_=function(t){var e=t.indexOf("$");return Object(o.f)(-1!==e&&e<t.length-1,"Bad queryKey."),{queryId:t.substr(e+1),path:new U(t.substr(0,e))}},t.prototype.queryKeyForTag_=function(t){return this.tagToQueryMap.get(t)},t.prototype.tagForQuery_=function(e){var n=t.makeQueryKey_(e);return this.queryToTagMap.get(n)},t.getNextQueryTag_=function(){return t.nextQueryTag_++},t.prototype.applyTaggedOperation_=function(t,e){var n=this.syncPointTree_.get(t);Object(o.f)(n,"Missing sync point for query tag that we're tracking");var r=this.pendingWriteTree_.childWrites(t);return n.applyOperation(e,r,null)},t.prototype.applyOperationToSyncPoints_=function(t){return this.applyOperationHelper_(t,this.syncPointTree_,null,this.pendingWriteTree_.childWrites(U.Empty))},t.prototype.applyOperationHelper_=function(t,e,n,r){if(t.path.isEmpty())return this.applyOperationDescendantsHelper_(t,e,n,r);var i=e.get(U.Empty);null==n&&null!=i&&(n=i.getCompleteServerCache(U.Empty));var o=[],a=t.path.getFront(),s=t.operationForChild(a),u=e.children.get(a);if(u&&s){var c=n?n.getImmediateChild(a):null,l=r.child(a);o=o.concat(this.applyOperationHelper_(s,u,c,l))}return i&&(o=o.concat(i.applyOperation(t,r,n))),o},t.prototype.applyOperationDescendantsHelper_=function(t,e,n,r){var i=this,o=e.get(U.Empty);null==n&&null!=o&&(n=o.getCompleteServerCache(U.Empty));var a=[];return e.children.inorderTraversal((function(e,o){var s=n?n.getImmediateChild(e):null,u=r.child(e),c=t.operationForChild(e);c&&(a=a.concat(i.applyOperationDescendantsHelper_(c,o,s,u)))})),o&&(a=a.concat(o.applyOperation(t,r,n))),a},t.nextQueryTag_=1,t}(),je=function(){function t(){this.rootNode_=Vt.EMPTY_NODE}return t.prototype.getNode=function(t){return this.rootNode_.getChild(t)},t.prototype.updateSnapshot=function(t,e){this.rootNode_=this.rootNode_.updateChild(t,e)},t}(),Re=function(){function t(){this.counters_={}}return t.prototype.incrementCounter=function(t,e){void 0===e&&(e=1),Object(o.k)(this.counters_,t)||(this.counters_[t]=0),this.counters_[t]+=e},t.prototype.get=function(){return Object(o.m)(this.counters_)},t}(),De=function(){function t(){}return t.getCollection=function(t){var e=t.toString();return this.collections_[e]||(this.collections_[e]=new Re),this.collections_[e]},t.getOrCreateReporter=function(t,e){var n=t.toString();return this.reporters_[n]||(this.reporters_[n]=e()),this.reporters_[n]},t.collections_={},t.reporters_={},t}(),Le=function(){function t(t){this.collection_=t,this.last_=null}return t.prototype.get=function(){var t=this.collection_.get(),e=Object(i.a)({},t);return this.last_&&j(this.last_,(function(t,n){e[t]=e[t]-n})),this.last_=t,e},t}(),Me=function(){function t(t,e){this.server_=e,this.statsToReport_={},this.statsListener_=new Le(t);var n=1e4+2e4*Math.random();F(this.reportStats_.bind(this),Math.floor(n))}return t.prototype.includeStat=function(t){this.statsToReport_[t]=!0},t.prototype.reportStats_=function(){var t=this,e=this.statsListener_.get(),n={},r=!1;j(e,(function(e,i){i>0&&Object(o.k)(t.statsToReport_,e)&&(n[e]=i,r=!0)})),r&&this.server_.reportStats(n),F(this.reportStats_.bind(this),Math.floor(2*Math.random()*3e5))},t}(),Fe=function(){function t(){this.eventLists_=[],this.recursionDepth_=0}return t.prototype.queueEvents=function(t){for(var e=null,n=0;n<t.length;n++){var r=t[n],i=r.getPath();null===e||i.equals(e.getPath())||(this.eventLists_.push(e),e=null),null===e&&(e=new Ue(i)),e.add(r)}e&&this.eventLists_.push(e)},t.prototype.raiseEventsAtPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_((function(e){return e.equals(t)}))},t.prototype.raiseEventsForChangedPath=function(t,e){this.queueEvents(e),this.raiseQueuedEventsMatchingPredicate_((function(e){return e.contains(t)||t.contains(e)}))},t.prototype.raiseQueuedEventsMatchingPredicate_=function(t){this.recursionDepth_++;for(var e=!0,n=0;n<this.eventLists_.length;n++){var r=this.eventLists_[n];if(r)t(r.getPath())?(this.eventLists_[n].raise(),this.eventLists_[n]=null):e=!1}e&&(this.eventLists_=[]),this.recursionDepth_--},t}(),Ue=function(){function t(t){this.path_=t,this.events_=[]}
2return t.prototype.add=function(t){this.events_.push(t)},t.prototype.raise=function(){for(var t=0;t<this.events_.length;t++){var e=this.events_[t];if(null!==e){this.events_[t]=null;var n=e.getEventRunner();y&&w("event: "+e.toString()),M(n)}}},t.prototype.getPath=function(){return this.path_},t}(),Ve=function(){function t(t){this.allowedEvents_=t,this.listeners_={},Object(o.f)(Array.isArray(t)&&t.length>0,"Requires a non-empty array")}return t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(Array.isArray(this.listeners_[t]))for(var r=Object(i.f)(this.listeners_[t]),o=0;o<r.length;o++)r[o].callback.apply(r[o].context,e)},t.prototype.on=function(t,e,n){this.validateEventType_(t),this.listeners_[t]=this.listeners_[t]||[],this.listeners_[t].push({callback:e,context:n});var r=this.getInitialEvent(t);r&&e.apply(n,r)},t.prototype.off=function(t,e,n){this.validateEventType_(t);for(var r=this.listeners_[t]||[],i=0;i<r.length;i++)if(r[i].callback===e&&(!n||n===r[i].context))return void r.splice(i,1)},t.prototype.validateEventType_=function(t){Object(o.f)(this.allowedEvents_.find((function(e){return e===t})),"Unknown event: "+t)},t}(),qe=function(t){function e(){var e,n,r=t.call(this,["visible"])||this;return"undefined"!==typeof document&&"undefined"!==typeof document.addEventListener&&("undefined"!==typeof document.hidden?(n="visibilitychange",e="hidden"):"undefined"!==typeof document.mozHidden?(n="mozvisibilitychange",e="mozHidden"):"undefined"!==typeof document.msHidden?(n="msvisibilitychange",e="msHidden"):"undefined"!==typeof document.webkitHidden&&(n="webkitvisibilitychange",e="webkitHidden")),r.visible_=!0,n&&document.addEventListener(n,(function(){var t=!document[e];t!==r.visible_&&(r.visible_=t,r.trigger("visible",t))}),!1),r}return Object(i.c)(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return Object(o.f)("visible"===t,"Unknown event type: "+t),[this.visible_]},e}(Ve),Be=function(t){function e(){var e=t.call(this,["online"])||this;return e.online_=!0,"undefined"===typeof window||"undefined"===typeof window.addEventListener||Object(o.x)()||(window.addEventListener("online",(function(){e.online_||(e.online_=!0,e.trigger("online",!0))}),!1),window.addEventListener("offline",(function(){e.online_&&(e.online_=!1,e.trigger("online",!1))}),!1)),e}return Object(i.c)(e,t),e.getInstance=function(){return new e},e.prototype.getInitialEvent=function(t){return Object(o.f)("online"===t,"Unknown event type: "+t),[this.online_]},e.prototype.currentlyOnline=function(){return this.online_},e}(Ve),He=function(){function t(t){this.onMessage_=t,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return t.prototype.closeAfter=function(t,e){this.closeAfterResponse=t,this.onClose=e,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},t.prototype.handleResponse=function(t,e){var n=this;this.pendingResponses[t]=e;for(var r=function(){var t=i.pendingResponses[i.currentResponseNum];delete i.pendingResponses[i.currentResponseNum];for(var e=function(e){t[e]&&M((function(){n.onMessage_(t[e])}))},r=0;r<t.length;++r)e(r);if(i.currentResponseNum===i.closeAfterResponse)return i.onClose&&(i.onClose(),i.onClose=null),"break";i.currentResponseNum++},i=this;this.pendingResponses[this.currentResponseNum];){if("break"===r())break}},t}(),ze="start",Ke="close",We=function(){function t(t,e,n,r,i){this.connId=t,this.repoInfo=e,this.applicationId=n,this.transportSessionId=r,this.lastSessionId=i,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=_(t),this.stats_=De.getCollection(e),this.urlFn=function(t){return e.connectionURL(z,t)}}return t.prototype.open=function(t,e){var n=this;this.curSegmentNum=0,this.onDisconnect_=e,this.myPacketOrderer=new He(t),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout((function(){n.log_("Timed out trying to connect."),n.onClosed_(),n.connectTimeoutTimer_=null}),Math.floor(3e4)),function(t){if(Object(o.z)()||"complete"===document.readyState)t();else{var e=!1,n=function n(){document.body?e||(e=!0,t()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&n()})),window.attachEvent("onload",n))}}((function(){if(!n.isClosed_){n.scriptTagHolder=new Ge((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Object(i.e)(t,5),o=r[0],a=r[1],s=r[2];r[3],r[4];if(n.incrementIncomingBytes_(t),n.scriptTagHolder)if(n.connectTimeoutTimer_&&(clearTimeout(n.connectTimeoutTimer_),n.connectTimeoutTimer_=null),n.everConnected_=!0,o===ze)n.id=a,n.password=s;else{if(o!==Ke)throw new Error("Unrecognized command received: "+o);a?(n.scriptTagHolder.sendNewPolls=!1,n.myPacketOrderer.closeAfter(a,(function(){n.onClosed_()}))):n.onClosed_()}}),(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Object(i.e)(t,2),o=r[0],a=r[1];n.incrementIncomingBytes_(t),n.myPacketOrderer.handleResponse(o,a)}),(function(){n.onClosed_()}),n.urlFn);var t={start:"t"};t.ser=Math.floor(1e8*Math.random()),n.scriptTagHolder.uniqueCallbackIdentifier&&(t.cb=n.scriptTagHolder.uniqueCallbackIdentifier),t.v=q,n.transportSessionId&&(t.s=n.transportSessionId),n.lastSessionId&&(t.ls=n.lastSessionId),n.applicationId&&(t.p=n.applicationId),"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf(B)&&(t.r="f");var e=n.urlFn(t);n.log_("Connecting via long-poll to "+e),n.scriptTagHolder.addTag(e,(function(){}))}}))},t.prototype.start=function(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)},t.forceAllow=function(){t.forceAllow_=!0},t.forceDisallow=function(){t.forceDisallow_=!0},t.isAvailable=function(){return!Object(o.z)()&&(!!t.forceAllow_||!t.forceDisallow_&&"undefined"!==typeof document&&null!=document.createElement&&!("object"===typeof window&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))&&!("object"===typeof Windows&&"object"===typeof Windows.UI))},t.prototype.markConnectionHealthy=function(){},t.prototype.shutdown_=function(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)},t.prototype.onClosed_=function(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))},t.prototype.close=function(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())},t.prototype.send=function(t){var e=Object(o.J)(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);for(var n=Object(o.i)(e),r=x(n,1840),i=0;i<r.length;i++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,r.length,r[i]),this.curSegmentNum++},t.prototype.addDisconnectPingFrame=function(t,e){if(!Object(o.z)()){this.myDisconnFrame=document.createElement("iframe");var n={dframe:"t"};n.id=t,n.pw=e,this.myDisconnFrame.src=this.urlFn(n),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}},t.prototype.incrementIncomingBytes_=function(t){var e=Object(o.J)(t).length;this.bytesReceived+=e,this.stats_.incrementCounter("bytes_received",e)},t}(),Ge=function(){function t(e,n,r,i){if(this.onDisconnect=r,this.urlFn=i,this.outstandingRequests=new Set,this.pendingSegs=[],this.currentSerial=Math.floor(1e8*Math.random()),this.sendNewPolls=!0,Object(o.z)())this.commandCB=e,this.onMessageCB=n;else{this.uniqueCallbackIdentifier=d(),window["pLPCommand"+this.uniqueCallbackIdentifier]=e,window["pRTLPCB"+this.uniqueCallbackIdentifier]=n,this.myIFrame=t.createI
2Frame_();var a="";if(this.myIFrame.src&&"javascript:"===this.myIFrame.src.substr(0,"javascript:".length))a='<script>document.domain="'+document.domain+'";<\/script>';var s="<html><body>"+a+"</body></html>";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(s),this.myIFrame.doc.close()}catch(u){w("frame writing exception"),u.stack&&w(u.stack),w(u)}}}return t.createIFrame_=function(){var t=document.createElement("iframe");if(t.style.display="none",!document.body)throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";document.body.appendChild(t);try{t.contentWindow.document||w("No IE domain setting required")}catch(n){var e=document.domain;t.src="javascript:void((function(){document.open();document.domain='"+e+"';document.close();})())"}return t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document),t},t.prototype.close=function(){var t=this;this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout((function(){null!==t.myIFrame&&(document.body.removeChild(t.myIFrame),t.myIFrame=null)}),Math.floor(0)));var e=this.onDisconnect;e&&(this.onDisconnect=null,e())},t.prototype.startLongPoll=function(t,e){for(this.myID=t,this.myPW=e,this.alive=!0;this.newRequest_(););},t.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var t={};t.id=this.myID,t.pw=this.myPW,t.ser=this.currentSerial;for(var e=this.urlFn(t),n="",r=0;this.pendingSegs.length>0;){if(!(this.pendingSegs[0].d.length+30+n.length<=1870))break;var i=this.pendingSegs.shift();n=n+"&seg"+r+"="+i.seg+"&ts"+r+"="+i.ts+"&d"+r+"="+i.d,r++}return e+=n,this.addLongPollTag_(e,this.currentSerial),!0}return!1},t.prototype.enqueueSegment=function(t,e,n){this.pendingSegs.push({seg:t,ts:e,d:n}),this.alive&&this.newRequest_()},t.prototype.addLongPollTag_=function(t,e){var n=this;this.outstandingRequests.add(e);var r=function(){n.outstandingRequests.delete(e),n.newRequest_()},i=setTimeout(r,Math.floor(25e3));this.addTag(t,(function(){clearTimeout(i),r()}))},t.prototype.addTag=function(t,e){var n=this;Object(o.z)()?this.doNodeLongPoll(t,e):setTimeout((function(){try{if(!n.sendNewPolls)return;var r=n.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=t,r.onload=r.onreadystatechange=function(){var t=r.readyState;t&&"loaded"!==t&&"complete"!==t||(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),e())},r.onerror=function(){w("Long-poll script failed to load: "+t),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(r)}catch(i){}}),Math.floor(1))},t}(),Qe="";function $e(t){Qe=t}var Ye=null;"undefined"!==typeof MozWebSocket?Ye=MozWebSocket:"undefined"!==typeof WebSocket&&(Ye=WebSocket);var Je=function(){function e(t,n,r,i,o){this.connId=t,this.applicationId=r,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=_(this.connId),this.stats_=De.getCollection(n),this.connURL=e.connectionURL_(n,i,o),this.nodeAdmin=n.nodeAdmin}return e.connectionURL_=function(t,e,n){var r={};return r.v=q,!Object(o.z)()&&"undefined"!==typeof location&&location.href&&-1!==location.href.indexOf(B)&&(r.r="f"),e&&(r.s=e),n&&(r.ls=n),t.connectionURL(H,r)},e.prototype.open=function(e,n){var r=this;this.onDisconnect=n,this.onMessage=e,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,f.set("previous_websocket_failure",!0);try{if(Object(o.z)()){var i=this.nodeAdmin?"AdminNode":"Node",a={headers:{"User-Agent":"Firebase/5/"+Qe+"/"+t.platform+"/"+i,"X-Firebase-GMPID":this.applicationId||""}},s=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_KEY:"AIzaSyD-OS7MCa3p5VbOVoCPoBx2XfoHEhPoGeg",REACT_APP_API_AUTH_DOMAIN:"laravel-8c2d4.firebaseapp.com",REACT_APP_API_PROJECT_ID:"laravel-8c2d4",REACT_APP_API_STORAGE_BUCKET:"gs://laravel-8c2d4.appspot.com"}),u=0===this.connURL.indexOf("wss://")?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;u&&(a.proxy={origin:u}),this.mySock=new Ye(this.connURL,[],a)}else{a={headers:{"X-Firebase-GMPID":this.applicationId||""}};this.mySock=new Ye(this.connURL,[],a)}}catch(l){this.log_("Error instantiating WebSocket.");var c=l.message||l.data;return c&&this.log_(c),void this.onClosed_()}this.mySock.onopen=function(){r.log_("Websocket connected."),r.everConnected_=!0}
2,this.mySock.onclose=function(){r.log_("Websocket connection was disconnected."),r.mySock=null,r.onClosed_()},this.mySock.onmessage=function(t){r.handleIncomingFrame(t)},this.mySock.onerror=function(t){r.log_("WebSocket error.  Closing connection.");var e=t.message||t.data;e&&r.log_(e),r.onClosed_()}},e.prototype.start=function(){},e.forceDisallow=function(){e.forceDisallow_=!0},e.isAvailable=function(){var t=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var n=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);n&&n.length>1&&parseFloat(n[1])<4.4&&(t=!0)}return!t&&null!==Ye&&!e.forceDisallow_},e.previouslyFailed=function(){return f.isInMemoryStorage||!0===f.get("previous_websocket_failure")},e.prototype.markConnectionHealthy=function(){f.remove("previous_websocket_failure")},e.prototype.appendFrame_=function(t){if(this.frames.push(t),this.frames.length===this.totalFrames){var e=this.frames.join("");this.frames=null;var n=Object(o.D)(e);this.onMessage(n)}},e.prototype.handleNewFrameCount_=function(t){this.totalFrames=t,this.frames=[]},e.prototype.extractFrameCount_=function(t){if(Object(o.f)(null===this.frames,"We already have a frame buffer"),t.length<=6){var e=Number(t);if(!isNaN(e))return this.handleNewFrameCount_(e),null}return this.handleNewFrameCount_(1),t},e.prototype.handleIncomingFrame=function(t){if(null!==this.mySock){var e=t.data;if(this.bytesReceived+=e.length,this.stats_.incrementCounter("bytes_received",e.length),this.resetKeepAlive(),null!==this.frames)this.appendFrame_(e);else{var n=this.extractFrameCount_(e);null!==n&&this.appendFrame_(n)}}},e.prototype.send=function(t){this.resetKeepAlive();var e=Object(o.J)(t);this.bytesSent+=e.length,this.stats_.incrementCounter("bytes_sent",e.length);var n=x(e,16384);n.length>1&&this.sendString_(String(n.length));for(var r=0;r<n.length;r++)this.sendString_(n[r])},e.prototype.shutdown_=function(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)},e.prototype.onClosed_=function(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))},e.prototype.close=function(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())},e.prototype.resetKeepAlive=function(){var t=this;clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval((function(){t.mySock&&t.sendString_("0"),t.resetKeepAlive()}),Math.floor(45e3))},e.prototype.sendString_=function(t){try{this.mySock.send(t)}catch(e){this.log_("Exception thrown from WebSocket.send():",e.message||e.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}},e.responsesRequiredToBeHealthy=2,e.healthyTimeout=3e4,e}(),Xe=function(){function t(t){this.initTransports_(t)}return Object.defineProperty(t,"ALL_TRANSPORTS",{get:function(){return[We,Je]},enumerable:!1,configurable:!0}),t.prototype.initTransports_=function(e){var n,r,o=Je&&Je.isAvailable(),a=o&&!Je.previouslyFailed();if(e.webSocketOnly&&(o||S("wss:// URL used, but browser isn't known to support websockets.  Trying anyway."),a=!0),a)this.transports_=[Je];else{var s=this.transports_=[];try{for(var u=Object(i.h)(t.ALL_TRANSPORTS),c=u.next();!c.done;c=u.next()){var l=c.value;l&&l.isAvailable()&&s.push(l)}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}},t.prototype.initialTransport=function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")},t.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},t}(),Ze=function(){function t(t,e,n,r,i,o,a,s){this.id=t,this.repoInfo_=e,this.applicationId_=n,this.onMessage_=r,this.onReady_=i,this.onDisconnect_=o,this.onKill_=a,this.lastSessionId=s,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=_("c:"+this.id+":"),this.transportManager_=new Xe(e),this.log_("Connection created"),this.start_()}return t.prototype.start_=function(){var t=this,e=this.transportManager_.initialTransport();this.conn_=new e(this.nextTransportId_(),this.repoInfo_,this.applicationId_,void 0,this.lastSessionId),this.primaryResponsesRequired_=e.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout((function(){t.conn_&&t.conn_.open(n,r)}),Math.floor(0));var i=e.healthyTimeout||0;i>0&&(this.healthyTimeout_=F((function(){t.healthyTimeout_=null,t.isHealthy_||(t.conn_&&t.conn_.bytesReceived>
2102400?(t.log_("Connection exceeded healthy timeout but has received "+t.conn_.bytesReceived+" bytes.  Marking connection healthy."),t.isHealthy_=!0,t.conn_.markConnectionHealthy()):t.conn_&&t.conn_.bytesSent>10240?t.log_("Connection exceeded healthy timeout but has sent "+t.conn_.bytesSent+" bytes.  Leaving connection alive."):(t.log_("Closing unhealthy connection after timeout."),t.close()))}),Math.floor(i)))},t.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},t.prototype.disconnReceiver_=function(t){var e=this;return function(n){t===e.conn_?e.onConnectionLost_(n):t===e.secondaryConn_?(e.log_("Secondary connection lost."),e.onSecondaryConnectionLost_()):e.log_("closing an old connection")}},t.prototype.connReceiver_=function(t){var e=this;return function(n){2!==e.state_&&(t===e.rx_?e.onPrimaryMessageReceived_(n):t===e.secondaryConn_?e.onSecondaryMessageReceived_(n):e.log_("message on old connection"))}},t.prototype.sendRequest=function(t){var e={t:"d",d:t};this.sendData_(e)},t.prototype.tryCleanupConnection=function(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)},t.prototype.onSecondaryControl_=function(t){if("t"in t){var e=t.t;"a"===e?this.upgradeIfSecondaryHealthy_():"r"===e?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),this.tx_!==this.secondaryConn_&&this.rx_!==this.secondaryConn_||this.close()):"o"===e&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},t.prototype.onSecondaryMessageReceived_=function(t){var e=A("t",t),n=A("d",t);if("c"===e)this.onSecondaryControl_(n);else{if("d"!==e)throw new Error("Unknown protocol layer: "+e);this.pendingDataMessages.push(n)}},t.prototype.upgradeIfSecondaryHealthy_=function(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:"p",d:{}}}))},t.prototype.proceedWithUpgrade_=function(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:"a",d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:"n",d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()},t.prototype.onPrimaryMessageReceived_=function(t){var e=A("t",t),n=A("d",t);"c"===e?this.onControl_(n):"d"===e&&this.onDataMessage_(n)},t.prototype.onDataMessage_=function(t){this.onPrimaryResponse_(),this.onMessage_(t)},t.prototype.onPrimaryResponse_=function(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))},t.prototype.onControl_=function(t){var e=A("t",t);if("d"in t){var n=t.d;if("h"===e)this.onHandshake_(n);else if("n"===e){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var r=0;r<this.pendingDataMessages.length;++r)this.onDataMessage_(this.pendingDataMessages[r]);this.pendingDataMessages=[],this.tryCleanupConnection()}else"s"===e?this.onConnectionShutdown_(n):"r"===e?this.onReset_(n):"e"===e?E("Server Error: "+n):"o"===e?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):E("Unknown control packet command: "+e)}},t.prototype.onHandshake_=function(t){var e=t.ts,n=t.v,r=t.h;this.sessionId=t.s,this.repoInfo_.updateHost(r),0===this.state_&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,e),q!==n&&S("Protocol version mismatch detected"),this.tryStartUpgrade_())},t.prototype.tryStartUpgrade_=function(){var t=this.transportManager_.upgradeTransport();t&&this.startUpgrade_(t)},t.prototype.startUpgrade_=function(t){var e=this;this.secondaryConn_=new t(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.sessionId),this.secondaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;var n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),F((function(){e.secondaryConn_&&(e.log_("Timed out trying to upgrade."),e.secondaryConn_.close())}),Math.floor(6e4))},t.prototype.onReset_=function(t){this.log_("Reset packet received.  New host: "+t),this.repoInfo_.updateHost(t),1===this.state_?this.close():(this.closeConnections_(),this.start_())},t.prototype.onConnectionEstablished_=function(t,e){var n=this;this.log_("Realtime connection established."),this.conn_=t,this.state_=1,this.onReady_&&(this.onReady_(e,this.sessionId),this.onReady_=null),0===this.primaryResponsesRequired_?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):F((function(){n.sendPingOnPrimaryIfNecessary_()}),Math.floor(5e3))},t.prototype.sendPingOnPrimaryIfNecessary_=function(){this.isHealthy_||1!==this.state_||(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:"p",d:{}}}))},t.prototype.onSecondaryConnectionLost_=function(){var t=this.secondaryConn_;this.secondaryConn_=null,this.tx_!==t&&this.rx_!==t||this.close()},t.prototype.onConnectionLost_=function(t){this.conn_=null,t||0!==this.state_?1===this.state_&&this.log_("Realtime connection lost."):(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(f.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)),this.close()},t.prototype.onConnectionShutdown_=function(t){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(t),this.onKill_=null),this.onDisconnect_=null,this.close()},t.prototype.sendData_=function(t){if(1!==this.state_)throw"Connection is not connected";this.tx_.send(t)},t.prototype.close=function(){2!==this.state_&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))},t.prototype.closeConnections_=function(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)},t}(),tn=function(){function t(){}return t.prototype.put=function(t,e,n,r){},t.prototype.merge=function(t,e,n,r){},t.prototype.refreshAuthToken=function(t){},t.prototype.onDisconnectPut=function(t,e,n){},t.prototype.onDisconnectMerge=function(t,e,n){},t.prototype.onDisconnectCancel=function(t,e){},t.prototype.reportStats=function(t){},t}(),en=1e3,nn=function(t){function e(n,r,i,a,s,u,c){var l=t.call(this)||this;if(l.repoInfo_=n,l.applicationId_=r,l.onDataUpdate_=i,l.onConnectStatus_=a,l.onServerInfoUpdate_=s,l.authTokenProvider_=u,l.authOverride_=c,l.id=e.nextPersistentConnectionId_++,l.log_=_("p:"+l.id+":"),l.interruptReasons_={},l.listens=new Map,l.outstandingPuts_=[],l.outstandingGets_=[],l.outstandingPutCount_=0,l.outstandingGetCount_=0,l.onDisconnectRequestQueue_=[],l.connected_=!1,l.reconnectDelay_=en,l.maxReconnectDelay_=3e5,l.securityDebugCallback_=null,l.lastSessionId=null,l.establishConnectionTimer_=null,l.visible_=!1,l.requestCBHash_={},l.requestNumber_=0,l.realtime_=null,l.authToken_=null,l.forceTokenRefresh_=!1,l.invali
2dAuthTokenCount_=0,l.firstConnection_=!0,l.lastConnectionAttemptTime_=null,l.lastConnectionEstablishedTime_=null,c&&!Object(o.z)())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return l.scheduleConnect_(0),qe.getInstance().on("visible",l.onVisible_,l),-1===n.host.indexOf("fblocal")&&Be.getInstance().on("online",l.onOnline_,l),l}return Object(i.c)(e,t),e.prototype.sendRequest=function(t,e,n){var r=++this.requestNumber_,i={r:r,a:t,b:e};this.log_(Object(o.J)(i)),Object(o.f)(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(i),n&&(this.requestCBHash_[r]=n)},e.prototype.get=function(t){var e=this,n=new o.a,r={p:t.path.toString(),q:t.queryObject()},i={action:"g",request:r,onComplete:function(t){var i=t.d;"ok"===t.s?(e.onDataUpdate_(r.p,i,!1,null),n.resolve(i)):n.reject(i)}};this.outstandingGets_.push(i),this.outstandingGetCount_++;var a=this.outstandingGets_.length-1;return this.connected_||setTimeout((function(){var t=e.outstandingGets_[a];void 0!==t&&i===t&&(delete e.outstandingGets_[a],e.outstandingGetCount_--,0===e.outstandingGetCount_&&(e.outstandingGets_=[]),e.log_("get "+a+" timed out on connection"),n.reject(new Error("Client is offline.")))}),3e3),this.connected_&&this.sendGet_(a),n.promise},e.prototype.listen=function(t,e,n,r){var i=t.queryIdentifier(),a=t.path.toString();this.log_("Listen called for "+a+" "+i),this.listens.has(a)||this.listens.set(a,new Map),Object(o.f)(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"listen() called for non-default but complete query"),Object(o.f)(!this.listens.get(a).has(i),"listen() called twice for same path/queryId.");var s={onComplete:r,hashFn:e,query:t,tag:n};this.listens.get(a).set(i,s),this.connected_&&this.sendListen_(s)},e.prototype.sendGet_=function(t){var e=this,n=this.outstandingGets_[t];this.sendRequest("g",n.request,(function(r){delete e.outstandingGets_[t],e.outstandingGetCount_--,0===e.outstandingGetCount_&&(e.outstandingGets_=[]),n.onComplete&&n.onComplete(r)}))},e.prototype.sendListen_=function(t){var n=this,r=t.query,i=r.path.toString(),o=r.queryIdentifier();this.log_("Listen on "+i+" for "+o);var a={p:i};t.tag&&(a.q=r.queryObject(),a.t=t.tag),a.h=t.hashFn(),this.sendRequest("q",a,(function(a){var s=a.d,u=a.s;e.warnOnListenWarnings_(s,r),(n.listens.get(i)&&n.listens.get(i).get(o))===t&&(n.log_("listen response",a),"ok"!==u&&n.removeListen_(i,o),t.onComplete&&t.onComplete(u,s))}))},e.warnOnListenWarnings_=function(t,e){if(t&&"object"===typeof t&&Object(o.k)(t,"w")){var n=Object(o.G)(t,"w");if(Array.isArray(n)&&~n.indexOf("no_index")){var r='".indexOn": "'+e.getQueryParams().getIndex().toString()+'"',i=e.path.toString();S("Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding "+r+" at "+i+" to your security rules for better performance.")}}},e.prototype.refreshAuthToken=function(t){this.authToken_=t,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},(function(){})),this.reduceReconnectDelayIfAdminCredential_(t)},e.prototype.reduceReconnectDelayIfAdminCredential_=function(t){(t&&40===t.length||Object(o.q)(t))&&(this.log_("Admin auth credential detected.  Reducing max reconnect time."),this.maxReconnectDelay_=3e4)},e.prototype.tryAuth=function(){var t=this;if(this.connected_&&this.authToken_){var e=this.authToken_,n=Object(o.C)(e)?"auth":"gauth",r={cred:e};null===this.authOverride_?r.noauth=!0:"object"===typeof this.authOverride_&&(r.authvar=this.authOverride_),this.sendRequest(n,r,(function(n){var r=n.s,i=n.d||"error";t.authToken_===e&&("ok"===r?t.invalidAuthTokenCount_=0:t.onAuthRevoked_(r,i))}))}},e.prototype.unlisten=function(t,e){var n=t.path.toString(),r=t.queryIdentifier();this.log_("Unlisten called for "+n+" "+r),Object(o.f)(t.getQueryParams().isDefault()||!t.getQueryParams().loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(n,r)&&this.connected_&&this.sendUnlisten_(n,r,t.queryObject(),e)},e.prototype.sendUnlisten_=function(t,e,n,r){this.log_("Unlisten on "+t+" for "+e);var i={p:t};r&&(i.q=n,i.t=r),this.sendRequest("n",i)},e.prototype.onDisconnectPut=function(t,e,n){this.connected_?this.sendOnDisconnect_("o",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"o",data:e,onComplete:n})},e.prototype.onDisconnectMerge=function(t,e,n){this.connected_?this.sendOnDisconnect_("om",t,e,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"om",data:e,onComplete:n})},e.prototype.onDisconnectCancel=function(t,e){this.connected_?this.sendOnDisconnect_("oc",t,null,e):this.onDisconnectRequestQueue_.push({pathString:t,action:"oc",data:null,onComplete:e})},e.prototype.sendOnDisconnect_=function(t,e,n,r){var i={p:e,d:n};this.log_("onDisconnect "+t,i),this.sendRequest(t,i,(function(t){r&&setTimeout((function(){r(t.s,t.d)}),Math.floor(0))}))},e.prototype.put=function(t,e,n,r){this.putInternal("p",t,e,n,r)},e.prototype.merge=function(t,e,n,r){this.putInternal("m",t,e,n,r)},e.prototype.putInternal=function(t,e,n,r,i){var o={p:e,d:n};void 0!==i&&(o.h=i),this.outstandingPuts_.push({action:t,request:o,onComplete:r}),this.outstandingPutCount_++;var a=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(a):this.log_("Buffering put: "+e)},e.prototype.sendPut_=function(t){var e=this,n=this.outstandingPuts_[t].action,r=this.outstandingPuts_[t].request,i=this.outstandingPuts_[t].onComplete;this.outstandingPuts_[t].queued=this.connected_,this.sendRequest(n,r,(function(r){e.log_(n+" response",r),delete e.outstandingPuts_[t],e.outstandingPutCount_--,0===e.outstandingPutCount_&&(e.outstandingPuts_=[]),i&&i(r.s,r.d)}))},e.prototype.reportStats=function(t){var e=this;if(this.connected_){var n={c:t};this.log_("reportStats",n),this.sendRequest("s",n,(function(t){if("ok"!==t.s){var n=t.d;e.log_("reportStats","Error sending stats: "+n)}}))}},e.prototype.onDataMessage_=function(t){if("r"in t){this.log_("from server: "+Object(o.J)(t));var e=t.r,n=this.requestCBHash_[e];n&&(delete this.requestCBHash_[e],n(t.b))}else{if("error"in t)throw"A server-side error has occurred: "+t.error;"a"in t&&this.onDataPush_(t.a,t.b)}},e.prototype.onDataPush_=function(t,e){this.log_("handleServerMessage",t,e),"d"===t?this.onDataUpdate_(e.p,e.d,!1,e.t):"m"===t?this.onDataUpdate_(e.p,e.d,!0,e.t):"c"===t?this.onListenRevoked_(e.p,e.q):"ac"===t?this.onAuthRevoked_(e.s,e.d):"sd"===t?this.onSecurityDebugPacket_(e):E("Unrecognized action received from server: "+Object(o.J)(t)+"\nAre you using the latest client?")},e.prototype.onReady_=function(t,e){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=(new Date).getTime(),this.handleTimestamp_(t),this.lastSessionId=e,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},e.prototype.scheduleConnect_=function(t){var e=this;Object(o.f)(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout((function(){e.establishConnectionTimer_=null,e.establishConnection_()}),Math.floor(t))},e.prototype.onVisible_=function(t){t&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible.  Reducing delay."),this.reconnectDelay_=en,this.realtime_||this.scheduleConnect_(0)),this.visible_=t},e.prototype.onOnline_=function(t){t?(this.log_("Browser went online."),this.reconnectDelay_=en,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline.  Killing connection."),this.realtime_&&this.realtime_.close())},e.prototype.onRealtimeDisconnect_=function(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(this.visible_){if(this.lastConnectionEstablishedTime_){(new Date).getTime()-this.lastConnectionEstablishedTime_>3e4&&(this.reconnectDelay_=en),this.lastConnectionEstablishedTime_=null}}else this.log_("Window isn't visible.  Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=(new Date).getTime();var t=(new Date).getTime()-this.lastConnectionAttemptTime_,e=Math.max(0,this.reconnectDelay_-t);
2e=Math.random()*e,this.log_("Trying to reconnect in "+e+"ms"),this.scheduleConnect_(e),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,1.3*this.reconnectDelay_)}this.onConnectStatus_(!1)},e.prototype.establishConnection_=function(){var t=this;if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=(new Date).getTime(),this.lastConnectionEstablishedTime_=null;var n=this.onDataMessage_.bind(this),r=this.onReady_.bind(this),i=this.onRealtimeDisconnect_.bind(this),a=this.id+":"+e.nextConnectionId_++,s=this,u=this.lastSessionId,c=!1,l=null,f=function(){l?l.close():(c=!0,i())};this.realtime_={close:f,sendRequest:function(t){Object(o.f)(l,"sendRequest call when we're not connected not allowed."),l.sendRequest(t)}};var h=this.forceTokenRefresh_;this.forceTokenRefresh_=!1,this.authTokenProvider_.getToken(h).then((function(t){c?w("getToken() completed but was canceled"):(w("getToken() completed. Creating connection."),s.authToken_=t&&t.accessToken,l=new Ze(a,s.repoInfo_,s.applicationId_,n,r,i,(function(t){S(t+" ("+s.repoInfo_.toString()+")"),s.interrupt("server_kill")}),u))})).then(null,(function(e){s.log_("Failed to get token: "+e),c||(t.repoInfo_.nodeAdmin&&S(e),f())}))}},e.prototype.interrupt=function(t){w("Interrupting connection for reason: "+t),this.interruptReasons_[t]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},e.prototype.resume=function(t){w("Resuming connection for reason: "+t),delete this.interruptReasons_[t],Object(o.u)(this.interruptReasons_)&&(this.reconnectDelay_=en,this.realtime_||this.scheduleConnect_(0))},e.prototype.handleTimestamp_=function(t){var e=t-(new Date).getTime();this.onServerInfoUpdate_({serverTimeOffset:e})},e.prototype.cancelSentTransactions_=function(){for(var t=0;t<this.outstandingPuts_.length;t++){var e=this.outstandingPuts_[t];e&&"h"in e.request&&e.queued&&(e.onComplete&&e.onComplete("disconnect"),delete this.outstandingPuts_[t],this.outstandingPutCount_--)}0===this.outstandingPutCount_&&(this.outstandingPuts_=[])},e.prototype.onListenRevoked_=function(t,e){var n;n=e?e.map((function(t){return N(t)})).join("$"):"default";var r=this.removeListen_(t,n);r&&r.onComplete&&r.onComplete("permission_denied")},e.prototype.removeListen_=function(t,e){var n,r=new U(t).toString();if(this.listens.has(r)){var i=this.listens.get(r);n=i.get(e),i.delete(e),0===i.size&&this.listens.delete(r)}else n=void 0;return n},e.prototype.onAuthRevoked_=function(t,e){w("Auth token revoked: "+t+"/"+e),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),"invalid_token"!==t&&"permission_denied"!==t||(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=3&&(this.reconnectDelay_=3e4,this.authTokenProvider_.notifyForInvalidToken()))},e.prototype.onSecurityDebugPacket_=function(t){this.securityDebugCallback_?this.securityDebugCallback_(t):"msg"in t&&console.log("FIREBASE: "+t.msg.replace("\n","\nFIREBASE: "))},e.prototype.restoreState_=function(){var t,e,n,r;this.tryAuth();try{for(var o=Object(i.h)(this.listens.values()),a=o.next();!a.done;a=o.next()){var s=a.value;try{for(var u=(n=void 0,Object(i.h)(s.values())),c=u.next();!c.done;c=u.next()){var l=c.value;this.sendListen_(l)}}catch(p){n={error:p}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(d){t={error:d}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}for(var f=0;f<this.outstandingPuts_.length;f++)this.outstandingPuts_[f]&&this.sendPut_(f);for(;this.onDisconnectRequestQueue_.length;){var h=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(h.action,h.pathString,h.data,h.onComplete)}for(f=0;f<this.outstandingGets_.length;f++)this.outstandingGets_[f]&&this.sendGet_(f)},e.prototype.sendConnectStats_=function(){var t={},e="js";Object(o.z)()&&(e=this.repoInfo_.nodeAdmin?"admin_node":"node"),t["sdk."+e+"."+Qe.replace(/\./g,"-")]=1,Object(o.x)()?t["framework.cordova"]=1:Object(o.A)()&&(t["framework.reactnative"]=1),this.reportStats(t)},e.prototype.shouldReconnect_=function(){var t=Be.getInstance().currentlyOnline();return Object(o.u)(this.interruptReasons_)&&t},e.nextPersistentConnectionId_=0,e.nextConnectionId_=0,e}(tn),rn=function(t){function e(e,n,r){var i=t.call(this)||this;return i.repoInfo_=e,i.onDataUpdate_=n,i.authTokenProvider_=r,i.log_=_("p:rest:"),i.listens_={},i}return Object(i.c)(e,t),e.prototype.reportStats=function(t){throw new Error("Method not implemented.")},e.getListenId_=function(t,e){return void 0!==e?"tag$"+e:(Object(o.f)(t.getQueryParams().isDefault(),"should have a tag if it's not a default query."),t.path.toString())},e.prototype.listen=function(t,n,r,i){var a=this,s=t.path.toString();this.log_("Listen called for "+s+" "+t.queryIdentifier());var u=e.getListenId_(t,r),c={};this.listens_[u]=c;var l=t.getQueryParams().toRestQueryStringParameters();this.restRequest_(s+".json",l,(function(t,e){var n=e;(404===t&&(n=null,t=null),null===t&&a.onDataUpdate_(s,n,!1,r),Object(o.G)(a.listens_,u)===c)&&i(t?401===t?"permission_denied":"rest_error:"+t:"ok",null)}))},e.prototype.unlisten=function(t,n){var r=e.getListenId_(t,n);delete this.listens_[r]},e.prototype.get=function(t){var e=this,n=t.getQueryParams().toRestQueryStringParameters(),r=t.path.toString(),i=new o.a;return this.restRequest_(r+".json",n,(function(t,n){var o=n;404===t&&(o=null,t=null),null===t?(e.onDataUpdate_(r,o,!1,null),i.resolve(o)):i.reject(new Error(o))})),i.promise},e.prototype.refreshAuthToken=function(t){},e.prototype.restRequest_=function(t,e,n){var r=this;void 0===e&&(e={}),e.format="export",this.authTokenProvider_.getToken(!1).then((function(i){var a=i&&i.accessToken;a&&(e.auth=a);var s=(r.repoInfo_.secure?"https://":"http://")+r.repoInfo_.host+t+"?ns="+r.repoInfo_.namespace+Object(o.F)(e);r.log_("Sending REST request for "+s);var u=new XMLHttpRequest;u.onreadystatechange=function(){if(n&&4===u.readyState){r.log_("REST Response for "+s+" received. status:",u.status,"response:",u.responseText);var t=null;if(u.status>=200&&u.status<300){try{t=Object(o.D)(u.responseText)}catch(e){S("Failed to parse JSON response for "+s+": "+u.responseText)}n(null,t)}else 401!==u.status&&404!==u.status&&S("Got unsuccessful REST response for "+s+" Status: "+u.status),n(u.status);n=null}},u.open("GET",s,!0),u.send()}))},e}(tn),on="repo_interrupt",an=function(){function t(t,e,n,r){this.repoInfo_=t,this.forceRestClient_=e,this.app=n,this.authTokenProvider_=r,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new Fe,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=new se,this.persistentConnection_=null,this.key=this.repoInfo_.toURLString()}return t.prototype.start=function(){var t=this;if(this.stats_=De.getCollection(this.repoInfo_),this.forceRestClient_||("object"===typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0)this.server_=new rn(this.repoInfo_,this.onDataUpdate_.bind(this),this.authTokenProvider_),setTimeout(this.onConnectStatus_.bind(this,!0),0);else{var e=this.app.options.databaseAuthVariableOverride;if("undefined"!==typeof e&&null!==e){if("object"!==typeof e)throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{Object(o.J)(e)}catch(n){throw new Error("Invalid authOverride provided: "+n)}}this.persistentConnection_=new nn(this.repoInfo_,this.app.options.appId,this.onDataUpdate_.bind(this),this.onConnectStatus_.bind(this),this.onServerInfoUpdate_.bind(this),this.authTokenProvider_,e),this.server_=this.persistentConnection_}this.authTokenProvider_.addTokenChangeListener((function(e){t.server_.refreshAuthToken(e)})),this.statsReporter_=De.getOrCreateReporter(this.repoInfo_,(function(){return new Me(t.stats_,t.server_)})),this.transactionsInit_(),this.infoData_=new je,this.infoSyncTree_=new xe({startListening:function(e,n,r,i){var o=[],a=t.infoData_.getNode(e.path);return a.isEmpty()||(o=t.infoSyncTree_.applyServerOverwrite(e.path,a),setTimeout((function(){i("ok")}),0)),o},stopListening:function(){}}),this.updateInfo_("connected",!1),this.serverSyncTree_=new xe({startListening:function(e,n,r,i){return t.server_.listen(e,r,n,(function(n,r){var o=i(n,r);t.eventQueue_.raiseEventsForChangedPath(e.path,o)})),[]},stopListening:function(e,n){t.server_.unlisten(e,n)}})},t.prototype.toString=function(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host},t.prototype.name=function(){return this.repoInfo_.namespace},t.prototype.serverTime=function(){var t=this.infoData_.getNode(new U(".info/serverTimeOffset")).val()||0;return(new Date).getTime()+t},t.prototype.generateServerValues=function(){return(t=(t={timestamp:this.serverTime()})||{}).timestamp=t.timestamp||(new Date).getTime(),t;var t},t.prototype.onDataUpdate_=function(t,e,n,r){this.dataUpdateCount++;var i=new U(t);e=this.interceptServerDataCallback_?this.interceptServerDataCallback_(t,e):e;var a=[];if(r)if(n){var s=Object(o.E)(e,(function(t){return Bt(t)}));a=this.serverSyncTree_.applyTaggedQueryMerge(i,s,r)}else{var u=Bt(e);a=this.serverSyncTree_.applyTaggedQueryOverwrite(i,u,r)}else if(n){var c=Object(o.E)(e,(function(t){return Bt(t)}));a=this.serverSyncTree_.applyServerMerge(i,c)}else{var l=Bt(e);a=this.serverSyncTree_.applyServerOverwrite(i,l)}var f=i;a.length>0&&(f=this.rerunTransactions_(i)),this.eventQueue_.raiseEventsForChangedPath(f,a)},t.prototype.interceptServerData_=function(t){this.interceptServerDataCallback_=t},t.prototype.onConnectStatus_=function(t){this.updateInfo_("connected",t),!1===t&&this.runOnDisconnectEvents_()},t.prototype.onServerInfoUpdate_=function(t){var e=this;j(t,(function(t,n){e.updateInfo_(t,n)}
2))},t.prototype.updateInfo_=function(t,e){var n=new U("/.info/"+t),r=Bt(e);this.infoData_.updateSnapshot(n,r);var i=this.infoSyncTree_.applyServerOverwrite(n,r);this.eventQueue_.raiseEventsForChangedPath(n,i)},t.prototype.getNextWriteId_=function(){return this.nextWriteId_++},t.prototype.getValue=function(t){var e=this;return this.server_.get(t).then((function(n){var r=Bt(n),i=e.serverSyncTree_.applyServerOverwrite(t.path,r);return e.eventQueue_.raiseEventsAtPath(t.path,i),Promise.resolve(new Wt(r,t.getRef(),t.getQueryParams().getIndex()))}),(function(n){e.log_("get for query "+Object(o.J)(t)+" falling back to cache after error: "+n);var r=e.serverSyncTree_.calcCompleteEventCache(t.path);return r.isEmpty()?Promise.reject(new Error(n)):Promise.resolve(new Wt(r,t.getRef(),t.getQueryParams().getIndex()))}))},t.prototype.setWithPriority=function(t,e,n,r){var i=this;this.log_("set",{path:t.toString(),value:e,priority:n});var o=this.generateServerValues(),a=Bt(e,n),s=this.serverSyncTree_.calcCompleteEventCache(t),u=ie(a,s,o),c=this.getNextWriteId_(),l=this.serverSyncTree_.applyUserOverwrite(t,u,c,!0);this.eventQueue_.queueEvents(l),this.server_.put(t.toString(),a.val(!0),(function(e,n){var o="ok"===e;o||S("set at "+t+" failed: "+e);var a=i.serverSyncTree_.ackUserWrite(c,!o);i.eventQueue_.raiseEventsForChangedPath(t,a),i.callOnCompleteCallback(r,e,n)}));var f=this.abortTransactions_(t);this.rerunTransactions_(f),this.eventQueue_.raiseEventsForChangedPath(f,[])},t.prototype.update=function(t,e,n){var r=this;this.log_("update",{path:t.toString(),value:e});var i=!0,o=this.generateServerValues(),a={};if(j(e,(function(e,n){i=!1,a[e]=re(t.child(e),Bt(n),r.serverSyncTree_,o)})),i)w("update() called with empty data.  Don't do anything."),this.callOnCompleteCallback(n,"ok");else{var s=this.getNextWriteId_(),u=this.serverSyncTree_.applyUserMerge(t,a,s);this.eventQueue_.queueEvents(u),this.server_.merge(t.toString(),e,(function(e,i){var o="ok"===e;o||S("update at "+t+" failed: "+e);var a=r.serverSyncTree_.ackUserWrite(s,!o),u=a.length>0?r.rerunTransactions_(t):t;r.eventQueue_.raiseEventsForChangedPath(u,a),r.callOnCompleteCallback(n,e,i)})),j(e,(function(e){var n=r.abortTransactions_(t.child(e));r.rerunTransactions_(n)})),this.eventQueue_.raiseEventsForChangedPath(t,[])}},t.prototype.runOnDisconnectEvents_=function(){var t=this;this.log_("onDisconnectEvents");var e=this.generateServerValues(),n=new se;this.onDisconnect_.forEachTree(U.Empty,(function(r,i){var o=re(r,i,t.serverSyncTree_,e);n.remember(r,o)}));var r=[];n.forEachTree(U.Empty,(function(e,n){r=r.concat(t.serverSyncTree_.applyServerOverwrite(e,n));var i=t.abortTransactions_(e);t.rerunTransactions_(i)})),this.onDisconnect_=new se,this.eventQueue_.raiseEventsForChangedPath(U.Empty,r)},t.prototype.onDisconnectCancel=function(t,e){var n=this;this.server_.onDisconnectCancel(t.toString(),(function(r,i){"ok"===r&&n.onDisconnect_.forget(t),n.callOnCompleteCallback(e,r,i)}))},t.prototype.onDisconnectSet=function(t,e,n){var r=this,i=Bt(e);this.server_.onDisconnectPut(t.toString(),i.val(!0),(function(e,o){"ok"===e&&r.onDisconnect_.remember(t,i),r.callOnCompleteCallback(n,e,o)}))},t.prototype.onDisconnectSetWithPriority=function(t,e,n,r){var i=this,o=Bt(e,n);this.server_.onDisconnectPut(t.toString(),o.val(!0),(function(e,n){"ok"===e&&i.onDisconnect_.remember(t,o),i.callOnCompleteCallback(r,e,n)}))},t.prototype.onDisconnectUpdate=function(t,e,n){var r=this;if(Object(o.u)(e))return w("onDisconnect().update() called with empty data.  Don't do anything."),void this.callOnCompleteCallback(n,"ok");this.server_.onDisconnectMerge(t.toString(),e,(function(i,o){"ok"===i&&j(e,(function(e,n){var i=Bt(n);r.onDisconnect_.remember(t.child(e),i)})),r.callOnCompleteCallback(n,i,o)}))},t.prototype.addEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.addEventRegistration(t,e):this.serverSyncTree_.addEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.removeEventCallbackForQuery=function(t,e){var n;n=".info"===t.path.getFront()?this.infoSyncTree_.removeEventRegistration(t,e):this.serverSyncTree_.removeEventRegistration(t,e),this.eventQueue_.raiseEventsAtPath(t.path,n)},t.prototype.interrupt=function(){this.persistentConnection_&&this.persistentConnection_.interrupt(on)},t.prototype.resume=function(){this.persistentConnection_&&this.persistentConnection_.resume(on)},t.prototype.stats=function(t){if(void 0===t&&(t=!1),"undefined"!==typeof console){var e;t?(this.statsListener_||(this.statsListener_=new Le(this.stats_)),e=this.statsListener_.get()):e=this.stats_.get();var n=Object.keys(e).reduce((function(t,e){return Math.max(e.length,t)}),0);j(e,(function(t,e){for(var r=t,i=t.length;i<n+2;i++)r+=" ";console.log(r+e)}))}},t.prototype.statsIncrementCounter=function(t){this.stats_.incrementCounter(t),this.statsReporter_.includeStat(t)}
2,t.prototype.log_=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="";this.persistentConnection_&&(n=this.persistentConnection_.id+":"),w.apply(void 0,Object(i.f)([n],t))},t.prototype.callOnCompleteCallback=function(t,e,n){t&&M((function(){if("ok"===e)t(null);else{var r=(e||"error").toUpperCase(),i=r;n&&(i+=": "+n);var o=new Error(i);o.code=r,t(o)}}))},Object.defineProperty(t.prototype,"database",{get:function(){return this.__database||(this.__database=new mn(this))},enumerable:!1,configurable:!0}),t}(),sn=function(){function t(e){this.indexedFilter_=new be(e.getIndex()),this.index_=e.getIndex(),this.startPost_=t.getStartPost_(e),this.endPost_=t.getEndPost_(e)}return t.prototype.getStartPost=function(){return this.startPost_},t.prototype.getEndPost=function(){return this.endPost_},t.prototype.matches=function(t){return this.index_.compare(this.getStartPost(),t)<=0&&this.index_.compare(t,this.getEndPost())<=0},t.prototype.updateChild=function(t,e,n,r,i,o){return this.matches(new gt(e,n))||(n=Vt.EMPTY_NODE),this.indexedFilter_.updateChild(t,e,n,r,i,o)},t.prototype.updateFullNode=function(t,e,n){e.isLeafNode()&&(e=Vt.EMPTY_NODE);var r=e.withIndex(this.index_);r=r.updatePriority(Vt.EMPTY_NODE);var i=this;return e.forEachChild(kt,(function(t,e){i.matches(new gt(t,e))||(r=r.updateImmediateChild(t,Vt.EMPTY_NODE))})),this.indexedFilter_.updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.indexedFilter_},t.prototype.getIndex=function(){return this.index_},t.getStartPost_=function(t){if(t.hasStart()){var e=t.getIndexStartName();return t.getIndex().makePost(t.getIndexStartValue(),e)}return t.getIndex().minPost()},t.getEndPost_=function(t){if(t.hasEnd()){var e=t.getIndexEndName();return t.getIndex().makePost(t.getIndexEndValue(),e)}return t.getIndex().maxPost()},t}(),un=function(){function t(t){this.rangedFilter_=new sn(t),this.index_=t.getIndex(),this.limit_=t.getLimit(),this.reverse_=!t.isViewFromLeft()}return t.prototype.updateChild=function(t,e,n,r,i,o){return this.rangedFilter_.matches(new gt(e,n))||(n=Vt.EMPTY_NODE),t.getImmediateChild(e).equals(n)?t:t.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(t,e,n,r,i,o):this.fullLimitUpdateChild_(t,e,n,i,o)},t.prototype.updateFullNode=function(t,e,n){var r;if(e.isLeafNode()||e.isEmpty())r=Vt.EMPTY_NODE.withIndex(this.index_);else if(2*this.limit_<e.numChildren()&&e.isIndexed(this.index_)){r=Vt.EMPTY_NODE.withIndex(this.index_);var i=void 0;i=this.reverse_?e.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):e.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);for(var o=0;i.hasNext()&&o<this.limit_;){var a=i.getNext();if(!(this.reverse_?this.index_.compare(this.rangedFilter_.getStartPost(),a)<=0:this.index_.compare(a,this.rangedFilter_.getEndPost())<=0))break;r=r.updateImmediateChild(a.name,a.node),o++}}else{r=(r=e.withIndex(this.index_)).updatePriority(Vt.EMPTY_NODE);var s=void 0,u=void 0,c=void 0;i=void 0;if(this.reverse_){i=r.getReverseIterator(this.index_),s=this.rangedFilter_.getEndPost(),u=this.rangedFilter_.getStartPost();var l=this.index_.getCompare();c=function(t,e){return l(e,t)}}else i=r.getIterator(this.index_),s=this.rangedFilter_.getStartPost(),u=this.rangedFilter_.getEndPost(),c=this.index_.getCompare();o=0;for(var f=!1;i.hasNext();){a=i.getNext();!f&&c(s,a)<=0&&(f=!0),f&&o<this.limit_&&c(a,u)<=0?o++:r=r.updateImmediateChild(a.name,Vt.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(t,r,n)},t.prototype.updatePriority=function(t,e){return t},t.prototype.filtersNodes=function(){return!0},t.prototype.getIndexedFilter=function(){return this.rangedFilter_.getIndexedFilter()},t.prototype.getIndex=function(){return this.index_},t.prototype.fullLimitUpdateChild_=function(t,e,n,r,i){var a;if(this.reverse_){var s=this.index_.getCompare();a=function(t,e){return s(e,t)}}else a=this.index_.getCompare();var u=t;Object(o.f)(u.numChildren()===this.limit_,"");var c=new gt(e,n),l=this.reverse_?u.getFirstChild(this.index_):u.getLastChild(this.index_),f=this.rangedFilter_.matches(c);if(u.hasChild(e)){for(var h=u.getImmediateChild(e),p=r.getChildAfterChild(this.index_,l,this.reverse_);null!=p&&(p.name===e||u.hasChild(p.name));)p=r.getChildAfterChild(this.index_,p,this.reverse_);var d=null==p?1:a(p,c);if(f&&!n.isEmpty()&&d>=0)return null!=i&&i.trackChildChange(me.childChangedChange(e,n,h)),u.updateImmediateChild(e,n);null!=i&&i.trackChildChange(me.childRemovedChange(e,h));var v=u.updateImmediateChild(e,Vt.EMPTY_NODE);return null!=p&&this.rangedFilter_.matches(p)?(null!=i&&i.trackChildChange(me.childAddedChange(p.name,p.node)),v.updateImmediateChild(p.name,p.node)):v}return n.isEmpty()?t:f&&a(l,c)>=0?(null!=i&&(i.trackChildChange(me.childRemovedChange(l.name,l.node)),i.trackChildChange(me.childAddedChange(e,n))),u.updateImmediateChild(e,n).updateImmediateChild(l.name,Vt.EMPTY_NODE)):t},t}(),cn=function(){function t(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=kt}return t.prototype.hasStart=function(){return this.startSet_},t.prototype.isViewFromLeft=function(){return""===this.viewFrom_?this.startSet_:this.viewFrom_===t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT},t.prototype.getIndexStartValue=function(){return Object(o.f)(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},t.prototype.getIndexStartName=function(){return Object(o.f)(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:
2I},t.prototype.hasEnd=function(){return this.endSet_},t.prototype.getIndexEndValue=function(){return Object(o.f)(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},t.prototype.getIndexEndName=function(){return Object(o.f)(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:C},t.prototype.hasLimit=function(){return this.limitSet_},t.prototype.hasAnchoredLimit=function(){return this.limitSet_&&""!==this.viewFrom_},t.prototype.getLimit=function(){return Object(o.f)(this.limitSet_,"Only valid if limit has been set"),this.limit_},t.prototype.getIndex=function(){return this.index_},t.prototype.copy_=function(){var e=new t;return e.limitSet_=this.limitSet_,e.limit_=this.limit_,e.startSet_=this.startSet_,e.indexStartValue_=this.indexStartValue_,e.startNameSet_=this.startNameSet_,e.indexStartName_=this.indexStartName_,e.endSet_=this.endSet_,e.indexEndValue_=this.indexEndValue_,e.endNameSet_=this.endNameSet_,e.indexEndName_=this.indexEndName_,e.index_=this.index_,e.viewFrom_=this.viewFrom_,e},t.prototype.limit=function(t){var e=this.copy_();return e.limitSet_=!0,e.limit_=t,e.viewFrom_="",e},t.prototype.limitToFirst=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_LEFT,n},t.prototype.limitToLast=function(e){var n=this.copy_();return n.limitSet_=!0,n.limit_=e,n.viewFrom_=t.WIRE_PROTOCOL_CONSTANTS_.VIEW_FROM_RIGHT,n},t.prototype.startAt=function(t,e){var n=this.copy_();return n.startSet_=!0,void 0===t&&(t=null),n.indexStartValue_=t,null!=e?(n.startNameSet_=!0,n.indexStartName_=e):(n.startNameSet_=!1,n.indexStartName_=""),n},t.prototype.endAt=function(t,e){var n=this.copy_();return n.endSet_=!0,void 0===t&&(t=null),n.indexEndValue_=t,void 0!==e?(n.endNameSet_=!0,n.indexEndName_=e):(n.endNameSet_=!1,n.indexEndName_=""),n},t.prototype.orderBy=function(t){var e=this.copy_();return e.index_=t,e},t.prototype.getQueryObject=function(){var e=t.WIRE_PROTOCOL_CONSTANTS_,n={};if(this.startSet_&&(n[e.INDEX_START_VALUE]=this.indexStartValue_,this.startNameSet_&&(n[e.INDEX_START_NAME]=this.indexStartName_)),this.endSet_&&(n[e.INDEX_END_VALUE]=this.indexEndValue_,this.endNameSet_&&(n[e.INDEX_END_NAME]=this.indexEndName_)),this.limitSet_){n[e.LIMIT]=this.limit_;var r=this.viewFrom_;""===r&&(r=this.isViewFromLeft()?e.VIEW_FROM_LEFT:e.VIEW_FROM_RIGHT),n[e.VIEW_FROM]=r}return this.index_!==kt&&(n[e.INDEX]=this.index_.toString()),n},t.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},t.prototype.isDefault=function(){return this.loadsAllData()&&this.index_===kt},t.prototype.getNodeFilter=function(){return this.loadsAllData()?new be(this.getIndex()):this.hasLimit()?new un(this):new sn(this)},t.prototype.toRestQueryStringParameters=function(){var e,n=t.REST_QUERY_CONSTANTS_,r={};return this.isDefault()||(this.index_===kt?e=n.PRIORITY_INDEX:this.index_===zt?e=n.VALUE_INDEX:this.index_===bt?e=n.KEY_INDEX:(Object(o.f)(this.index_ instanceof Kt,"Unrecognized index type!"),e=this.index_.toString()),r[n.ORDER_BY]=Object(o.J)(e),this.startSet_&&(r[n.START_AT]=Object(o.J)(this.indexStartValue_),this.startNameSet_&&(r[n.START_AT]+=","+Object(o.J)(this.indexStartName_))),this.endSet_&&(r[n.END_AT]=Object(o.J)(this.indexEndValue_),this.endNameSet_&&(r[n.END_AT]+=","+Object(o.J)(this.indexEndName_))),this.limitSet_&&(this.isViewFromLeft()?r[n.LIMIT_TO_FIRST]=this.limit_:r[n.LIMIT_TO_LAST]=this.limit_)),r},t.WIRE_PROTOCOL_CONSTANTS_={INDEX_START_VALUE:"sp",INDEX_START_NAME:"sn",INDEX_END_VALUE:"ep",INDEX_END_NAME:"en",LIMIT:"l",VIEW_FROM:"vf",VIEW_FROM_LEFT:"l",VIEW_FROM_RIGHT:"r",INDEX:"i"},t.REST_QUERY_CONSTANTS_={ORDER_BY:"orderBy",PRIORITY_INDEX:"$priority",VALUE_INDEX:"$value",KEY_INDEX:"$key",START_AT:"startAt",END_AT:"endAt",LIMIT_TO_FIRST:"limitToFirst",LIMIT_TO_LAST:"limitToLast"},t.DEFAULT=new t,t}(),ln=function(t){function e(e,n){if(!(e instanceof an))throw new Error("new Reference() no longer supported - use app.database().");return t.call(this,e,n,cn.DEFAULT,!1)||this}return Object(i.c)(e,t),e.prototype.getKey=function(){return Object(o.K)("Reference.key",0,0,arguments.length),this.path.isEmpty()?null:this.path.getBack()},e.prototype.child=function(t){return Object(o.K)("Reference.child",1,1,arguments.length),"number"===typeof t?t=String(t):t instanceof U||(null===this.path.getFront()?ct("Reference.child",1,t,!1):ut("Reference.child",1,t,!1)),new e(this.repo,this.path.child(t))},e.prototype.getParent=function(){Object(o.K)("Reference.parent",0,0,arguments.length);var t=this.path.parent();return null===t?null:new e(this.repo,t)},e.prototype.getRoot=function(){Object(o.K)("Reference.root",0,0,arguments.length);for(var t=this;null!==t.getParent();)t=t.getParent();return t},e.prototype.databaseProp=function(){return this.repo.database},e.prototype.set=function(t,e){Object(o.K)("Reference.set",1,2,arguments.length),lt("Reference.set",this.path),nt("Reference.set",1,t,this.path,!1),Object(o.L)("Reference.set",2,e,!0);var n=new o.a;return this.repo.setWithPriority(this.path,t,null,n.wrapCallback(e)),n.promise},e.prototype.update=function(t,e){if(Object(o.K)("Reference.update",1,2,arguments.length),lt("Reference.update",this.path),Array.isArray(t)){for(var n={},r=0;r<t.length;++r)n[""+r]=t[r];
2t=n,S("Passing an Array to Firebase.update() is deprecated. Use set() if you want to overwrite the existing data, or an Object with integer keys if you really do want to only update some of the children.")}it("Reference.update",1,t,this.path,!1),Object(o.L)("Reference.update",2,e,!0);var i=new o.a;return this.repo.update(this.path,t,i.wrapCallback(e)),i.promise},e.prototype.setWithPriority=function(t,e,n){if(Object(o.K)("Reference.setWithPriority",2,3,arguments.length),lt("Reference.setWithPriority",this.path),nt("Reference.setWithPriority",1,t,this.path,!1),ot("Reference.setWithPriority",2,e,!1),Object(o.L)("Reference.setWithPriority",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.setWithPriority failed: "+this.getKey()+" is a read-only object.";var r=new o.a;return this.repo.setWithPriority(this.path,t,e,r.wrapCallback(n)),r.promise},e.prototype.remove=function(t){return Object(o.K)("Reference.remove",0,1,arguments.length),lt("Reference.remove",this.path),Object(o.L)("Reference.remove",1,t,!0),this.set(null,t)},e.prototype.transaction=function(t,e,n){if(Object(o.K)("Reference.transaction",1,3,arguments.length),lt("Reference.transaction",this.path),Object(o.L)("Reference.transaction",1,t,!1),Object(o.L)("Reference.transaction",2,e,!0),ht("Reference.transaction",3,n,!0),".length"===this.getKey()||".keys"===this.getKey())throw"Reference.transaction failed: "+this.getKey()+" is a read-only object.";void 0===n&&(n=!0);var r=new o.a;"function"===typeof e&&r.promise.catch((function(){}));var i=function(t,n,i){t?r.reject(t):r.resolve(new dt(n,i)),"function"===typeof e&&e(t,n,i)};return this.repo.startTransaction(this.path,t,i,n),r.promise},e.prototype.setPriority=function(t,e){Object(o.K)("Reference.setPriority",1,2,arguments.length),lt("Reference.setPriority",this.path),ot("Reference.setPriority",1,t,!1),Object(o.L)("Reference.setPriority",2,e,!0);var n=new o.a;return this.repo.setWithPriority(this.path.child(".priority"),t,null,n.wrapCallback(e)),n.promise},e.prototype.push=function(t,e){Object(o.K)("Reference.push",0,2,arguments.length),lt("Reference.push",this.path),nt("Reference.push",1,t,this.path,!0),Object(o.L)("Reference.push",2,e,!0);var n,r=this.repo.serverTime(),i=vt(r),a=this.child(i),s=this.child(i);return n=null!=t?a.set(t,e).then((function(){return s})):Promise.resolve(s),a.then=n.then.bind(n),a.catch=n.then.bind(n,void 0),"function"===typeof e&&n.catch((function(){})),a},e.prototype.onDisconnect=function(){return lt("Reference.onDisconnect",this.path),new pt(this.repo,this.path)},Object.defineProperty(e.prototype,"database",{get:function(){return this.databaseProp()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this.getKey()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this.getParent()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this.getRoot()},enumerable:!1,configurable:!0}),e}(Jt);Jt.__referenceConstructor=ln,Ce.__referenceConstructor=ln;var fn,hn=function(){this.children={},this.childCount=0,this.value=null},pn=function(){function t(t,e,n){void 0===t&&(t=""),void 0===e&&(e=null),void 0===n&&(n=new hn),this.name_=t,this.parent_=e,this.node_=n}return t.prototype.subTree=function(e){for(var n=e instanceof U?e:new U(e),r=this,i=n.getFront();null!==i;){r=new t(i,r,Object(o.G)(r.node_.children,i)||new hn),i=(n=n.popFront()).getFront()}return r},t.prototype.getValue=function(){return this.node_.value},t.prototype.setValue=function(t){Object(o.f)("undefined"!==typeof t,"Cannot set value to undefined"),this.node_.value=t,this.updateParents_()},t.prototype.clear=function(){this.node_.value=null,this.node_.children={},this.node_.childCount=0,this.updateParents_()},t.prototype.hasChildren=function(){return this.node_.childCount>0},t.prototype.isEmpty=function(){return null===this.getValue()&&!this.hasChildren()},t.prototype.forEachChild=function(e){var n=this;j(this.node_.children,(function(r,i){e(new t(r,n,i))}))},t.prototype.forEachDescendant=function(t,e,n){e&&!n&&t(this),this.forEachChild((function(e){e.forEachDescendant(t,!0,n)})),e&&n&&t(this)},t.prototype.forEachAncestor=function(t,e){for(var n=e?this:this.parent();null!==n;){if(t(n))return!0;n=n.parent()}return!1},t.prototype.forEachImmediateDescendantWithValue=function(t){this.forEachChild((function(e){null!==e.getValue()?t(e):e.forEachImmediateDescendantWithValue(t)}))},t.prototype.path=function(){return new U(null===this.parent_?this.name_:this.parent_.path()+"/"+this.name_)},t.prototype.name=function(){return this.name_},t.prototype.parent=function(){return this.parent_},t.prototype.updateParents_=function(){null!==this.parent_&&this.parent_.updateChild_(this.name_,this)},t.prototype.updateChild_=function(t,e){var n=e.isEmpty(),r=Object(o.k)(this.node_.children,t);n&&r?(delete this.node_.children[t],this.node_.childCount--,this.updateParents_()):n||r||(this.node_.children[t]=e.node_,this.node_.childCount++,this.updateParents_())},t}();!function(t){t[t.RUN=0]="RUN",t[t.SENT=1]="SENT",t[t.COMPLETED=2]="COMPLETED",t[t.SENT_NEEDS_ABORT=3]="SENT_NEEDS_ABORT",t[t.NEEDS_ABORT=4]="NEEDS_ABORT"}(fn||(fn={})),an.MAX_TRANSACTION_RETRIES_=25,an.prototype.transactionsInit_=function(){this.transactionQueueTree_=new pn},an.prototype.startTransaction=function(t,e,n,r){this.log_("transaction on "+t);var i=function(){},a=new ln(this,t);a.on("value",i);var s={path:t,update:e,onComplete:n,status:null,order:d(),applyLocally:r,retryCount:0,unwatcher:function(){a.off("value",i)},abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},u=this.getLatestState_(t);s.currentInputSnapshot=u;var c=s.update(u.val());if(void 0===c){if(s.unwatcher(),s.currentOutputSnapshotRaw=null,s.currentOutputSnapshotResolved=null,s.onComplete){var l=new Wt(s.currentInputSnapshot,new ln(this,s.path),kt);s.onComplete(null,!1,l)}}else{rt("transaction failed: Data returned ",c,s.path),s.status=fn.RUN;var f=this.transactionQueueTree_.subTree(t),h=f.getValue()||[];h.push(s),f.setValue(h);var p=void 0;if("object"===typeof c&&null!==c&&Object(o.k)(c,".priority"))p=Object(o.G)(c,".priority"),Object(o.f)(et(p),"Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.");else p=(this.serverSyncTree_.calcCompleteEventCache(t)||Vt.EMPTY_NODE).getPriority().val();p=p;var v=this.generateServerValues(),g=Bt(c,p),y=ie(g,u,v);s.currentOutputSnapshotRaw=g,s.currentOutputSnapshotResolved=y,s.currentWriteId=this.getNextWriteId_();var m=this.serverSyncTree_.applyUserOverwrite(t,y,s.currentWriteId,s.applyLocally);this.eventQueue_.raiseEventsForChangedPath(t,m),this.sendReadyTransactions_()}},an.prototype.getLatestState_=function(t,e){return this.serverSyncTree_.calcCompleteEventCache(t,e)||Vt.EMPTY_NODE},an.prototype.sendReadyTransactions_=function(t){var e=this;if(void 0===t&&(t=this.transactionQueueTree_),t||this.pruneCompletedTransactionsBelowNode_(t),null!==t.getValue()){var n=this.buildTransactionQueue_(t);Object(o.f)(n.length>0,"Sending zero length transaction queue"),n.every((function(t){return t.status===fn.RUN}))&&this.sendTransactionQueue_(t.path(),n)}else t.hasChildren()&&t.forEachChild((function(t){e.sendReadyTransactions_(t)}))},an.prototype.sendTransactionQueue_=function(t,e){for(var n=this,r=e.map((function(t){return t.currentWriteId})),i=this.getLatestState_(t,r),a=i,s=i.hash(),u=0;u<e.length;u++){var c=e[u];Object(o.f)(c.status===fn.RUN,"tryToSendTransactionQueue_: items in queue should all be run."),c.status=fn.SENT,c.retryCount++;var l=U.relativePath(t,c.path);a=a.updateChild(l,c.currentOutputSnapshotRaw)}var f=a.val(!0),h=t;this.server_.put(h.toString(),f,(function(r){n.log_("transaction put response",{path:h.toString(),status:r});var i=[];if("ok"===r){for(var o=[],a=0;a<e.length;
2a++){if(e[a].status=fn.COMPLETED,i=i.concat(n.serverSyncTree_.ackUserWrite(e[a].currentWriteId)),e[a].onComplete){var s=e[a].currentOutputSnapshotResolved,u=new ln(n,e[a].path),c=new Wt(s,u,kt);o.push(e[a].onComplete.bind(null,null,!0,c))}e[a].unwatcher()}n.pruneCompletedTransactionsBelowNode_(n.transactionQueueTree_.subTree(t)),n.sendReadyTransactions_(),n.eventQueue_.raiseEventsForChangedPath(t,i);for(a=0;a<o.length;a++)M(o[a])}else{if("datastale"===r)for(a=0;a<e.length;a++)e[a].status===fn.SENT_NEEDS_ABORT?e[a].status=fn.NEEDS_ABORT:e[a].status=fn.RUN;else{S("transaction at "+h.toString()+" failed: "+r);for(a=0;a<e.length;a++)e[a].status=fn.NEEDS_ABORT,e[a].abortReason=r}n.rerunTransactions_(t)}}),s)},an.prototype.rerunTransactions_=function(t){var e=this.getAncestorTransactionNode_(t),n=e.path(),r=this.buildTransactionQueue_(e);return this.rerunTransactionQueue_(r,n),n},an.prototype.rerunTransactionQueue_=function(t,e){if(0!==t.length){for(var n,r=[],i=[],a=t.filter((function(t){return t.status===fn.RUN})).map((function(t){return t.currentWriteId})),s=0;s<t.length;s++){var u=t[s],c=U.relativePath(e,u.path),l=!1,f=void 0;if(Object(o.f)(null!==c,"rerunTransactionsUnderNode_: relativePath should not be null."),u.status===fn.NEEDS_ABORT)l=!0,f=u.abortReason,i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else if(u.status===fn.RUN)if(u.retryCount>=an.MAX_TRANSACTION_RETRIES_)l=!0,f="maxretry",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0));else{var h=this.getLatestState_(u.path,a);u.currentInputSnapshot=h;var p=t[s].update(h.val());if(void 0!==p){rt("transaction failed: Data returned ",p,u.path);var d=Bt(p);"object"===typeof p&&null!=p&&Object(o.k)(p,".priority")||(d=d.updatePriority(h.getPriority()));var v=u.currentWriteId,g=this.generateServerValues(),y=ie(d,h,g);u.currentOutputSnapshotRaw=d,u.currentOutputSnapshotResolved=y,u.currentWriteId=this.getNextWriteId_(),a.splice(a.indexOf(v),1),i=(i=i.concat(this.serverSyncTree_.applyUserOverwrite(u.path,y,u.currentWriteId,u.applyLocally))).concat(this.serverSyncTree_.ackUserWrite(v,!0))}else l=!0,f="nodata",i=i.concat(this.serverSyncTree_.ackUserWrite(u.currentWriteId,!0))}if(this.eventQueue_.raiseEventsForChangedPath(e,i),i=[],l&&(t[s].status=fn.COMPLETED,n=t[s].unwatcher,setTimeout(n,Math.floor(0)),t[s].onComplete))if("nodata"===f){var m=new ln(this,t[s].path),b=t[s].currentInputSnapshot,w=new Wt(b,m,kt);r.push(t[s].onComplete.bind(null,null,!1,w))}else r.push(t[s].onComplete.bind(null,new Error(f),!1,null))}this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);for(s=0;s<r.length;s++)M(r[s]);this.sendReadyTransactions_()}},an.prototype.getAncestorTransactionNode_=function(t){var e,n=this.transactionQueueTree_;for(e=t.getFront();null!==e&&null===n.getValue();)n=n.subTree(e),e=(t=t.popFront()).getFront();return n},an.prototype.buildTransactionQueue_=function(t){var e=[];return this.aggregateTransactionQueuesForNode_(t,e),e.sort((function(t,e){return t.order-e.order})),e},an.prototype.aggregateTransactionQueuesForNode_=function(t,e){var n=this,r=t.getValue();if(null!==r)for(var i=0;i<r.length;i++)e.push(r[i]);t.forEachChild((function(t){n.aggregateTransactionQueuesForNode_(t,e)}))},an.prototype.pruneCompletedTransactionsBelowNode_=function(t){var e=this,n=t.getValue();if(n){for(var r=0,i=0;i<n.length;i++)n[i].status!==fn.COMPLETED&&(n[r]=n[i],r++);n.length=r,t.setValue(n.length>0?n:null)}t.forEachChild((function(t){e.pruneCompletedTransactionsBelowNode_(t)}))},an.prototype.abortTransactions_=function(t){var e=this,n=this.getAncestorTransactionNode_(t).path(),r=this.transactionQueueTree_.subTree(t);return r.forEachAncestor((function(t){e.abortTransactionsOnNode_(t)})),this.abortTransactionsOnNode_(r),r.forEachDescendant((function(t){e.abortTransactionsOnNode_(t)})),n},an.prototype.abortTransactionsOnNode_=function(t){var e=t.getValue();if(null!==e){for(var n=[],r=[],i=-1,a=0;a<e.length;a++)if(e[a].status===fn.SENT_NEEDS_ABORT);else if(e[a].status===fn.SENT)Object(o.f)(i===a-1,"All SENT items should be at beginning of queue."),i=a,e[a].status=fn.SENT_NEEDS_ABORT,e[a].abortReason="set";else if(Object(o.f)(e[a].status===fn.RUN,"Unexpected transaction status in abort"),e[a].unwatcher(),r
2=r.concat(this.serverSyncTree_.ackUserWrite(e[a].currentWriteId,!0)),e[a].onComplete){n.push(e[a].onComplete.bind(null,new Error("set"),!1,null))}-1===i?t.setValue(null):e.length=i+1,this.eventQueue_.raiseEventsForChangedPath(t.path(),r);for(a=0;a<n.length;a++)M(n[a])}};var dn,vn=function(){function t(t,e){var n=this;this.app_=t,this.authProvider_=e,this.auth_=null,this.auth_=e.getImmediate({optional:!0}),this.auth_||e.get().then((function(t){return n.auth_=t}))}return t.prototype.getToken=function(t){return this.auth_?this.auth_.getToken(t).catch((function(t){return t&&"auth/token-not-initialized"===t.code?(w("Got auth/token-not-initialized error.  Treating as null token."),null):Promise.reject(t)})):Promise.resolve(null)},t.prototype.addTokenChangeListener=function(t){this.auth_?this.auth_.addAuthTokenListener(t):(setTimeout((function(){return t(null)}),0),this.authProvider_.get().then((function(e){return e.addAuthTokenListener(t)})))},t.prototype.removeTokenChangeListener=function(t){this.authProvider_.get().then((function(e){return e.removeAuthTokenListener(t)}))},t.prototype.notifyForInvalidToken=function(){var t='Provided authentication credentials for the app named "'+this.app_.name+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.app_.options?t+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.app_.options?t+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':t+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',S(t)},t}(),gn=function(){function t(){}return t.prototype.getToken=function(e){return Promise.resolve({accessToken:t.EMULATOR_AUTH_TOKEN})},t.prototype.addTokenChangeListener=function(e){e(t.EMULATOR_AUTH_TOKEN)},t.prototype.removeTokenChangeListener=function(t){},t.prototype.notifyForInvalidToken=function(){},t.EMULATOR_AUTH_TOKEN="owner",t}(),yn=function(){function e(){this.repos_={},this.useRestClient_=!1}return e.getInstance=function(){return dn||(dn=new e),dn},e.prototype.interrupt=function(){var t,e,n,r;try{for(var o=Object(i.h)(Object.keys(this.repos_)),a=o.next();!a.done;a=o.next()){var s=a.value;try{for(var u=(n=void 0,Object(i.h)(Object.keys(this.repos_[s]))),c=u.next();!c.done;c=u.next()){var l=c.value;this.repos_[s][l].interrupt()}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(h){t={error:h}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},e.prototype.resume=function(){var t,e,n,r;try{for(var o=Object(i.h)(Object.keys(this.repos_)),a=o.next();!a.done;a=o.next()){var s=a.value;try{for(var u=(n=void 0,Object(i.h)(Object.keys(this.repos_[s]))),c=u.next();!c.done;c=u.next()){var l=c.value;this.repos_[s][l].resume()}}catch(f){n={error:f}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(h){t={error:h}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}},e.prototype.applyEmulatorSettings=function(t,e,n){t.repoInfo_=new K(e+":"+n,!1,t.repoInfo_.namespace,t.repoInfo_.webSocketOnly,t.repoInfo_.nodeAdmin,t.repoInfo_.persistenceKey,t.repoInfo_.includeNamespaceInQueryParams),t.repoInfo_.nodeAdmin&&(t.authTokenProvider_=new gn)},e.prototype.databaseFromApp=function(e,n,r,i){var o=r||e.options.databaseURL;void 0===o&&(e.options.projectId||O("Can't determine Firebase Database URL. Be sure to include  a Project ID when calling firebase.initializeApp()."),w("Using default host for project ",e.options.projectId),o=e.options.projectId+"-default-rtdb.firebaseio.com");var a,s=Q(o,i),u=s.repoInfo,c=void 0;"undefined"!==typeof t&&(c=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_KEY:"AIzaSyD-OS7MCa3p5VbOVoCPoBx2XfoHEhPoGeg",REACT_APP_API_AUTH_DOMAIN:"laravel-8c2d4.firebaseapp.com",REACT_APP_API_PROJECT_ID:"laravel-8c2d4",REACT_APP_API_STORAGE_BUCKET:"gs://laravel-8c2d4.appspot.com"}).FIREBASE_DATABASE_EMULATOR_HOST),c?(a=!0,o="http://"+c+"?ns="+u.namespace,u=(s=Q(o,i)).repoInfo):a=!s.repoInfo.secure;var l=i&&a?new gn:new vn(e,n);return ft("Invalid Firebase Database URL",1,s),s.path.isEmpty()||O("Database URL must point to the root of a Firebase Database (not including a child path)."),this.createRepo(u,e,l).database},e.prototype.deleteRepo=function(t){var e=Object(o.G)(this.repos_,t.app.name);e&&Object(o.G)(e,t.key)===t||O("Database "+t.app.name+"("+t.repoInfo_+") has already been deleted."),t.interrupt(),delete e[t.key]},e.prototype.createRepo=function(t,e,n){var r=Object(o.G)(this.repos_,e.name);r||(r={},this.repos_[e.name]=r);var i=Object(o.G)(r,t.toURLString());return i&&O("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),i=new an(t,this.useRestClient_,e,n),r[t.toURLString()]=i,i},e.prototype.forceRestClient=function(t){this.useRestClient_=t},e}(),mn=function(){function t(t){var e=this;this.repoInternal_=t,this.instanceStarted_=!1,this.INTERNAL={delete:function(){return Object(i.b)(e,void 0,void 0,(function(){return Object(i.d)(this,(function(t){return this.checkDeleted_("delete"),yn.getInstance().deleteRepo(this.repo_),this.repoInternal_=null,this.rootInternal_=null,[2]}))}
2))}},t instanceof an||O("Don't call new Database() directly - please use firebase.database().")}return Object.defineProperty(t.prototype,"repo_",{get:function(){return this.instanceStarted_||(this.repoInternal_.start(),this.instanceStarted_=!0),this.repoInternal_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root_",{get:function(){return this.rootInternal_||(this.rootInternal_=new ln(this.repo_,U.Empty)),this.rootInternal_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"app",{get:function(){return this.repo_.app},enumerable:!1,configurable:!0}),t.prototype.useEmulator=function(t,e){this.checkDeleted_("useEmulator"),this.instanceStarted_?O("Cannot call useEmulator() after instance has already been initialized."):yn.getInstance().applyEmulatorSettings(this.repoInternal_,t,e)},t.prototype.ref=function(t){return this.checkDeleted_("ref"),Object(o.K)("database.ref",0,1,arguments.length),t instanceof ln?this.refFromURL(t.toString()):void 0!==t?this.root_.child(t):this.root_},t.prototype.refFromURL=function(t){var e="database.refFromURL";this.checkDeleted_(e),Object(o.K)(e,1,1,arguments.length);var n=Q(t,this.repo_.repoInfo_.nodeAdmin);ft(e,1,n);var r=n.repoInfo;return r.isCustomHost()||r.host===this.repo_.repoInfo_.host||O(e+": Host name does not match the current database: (found "+r.host+" but expected "+this.repo_.repoInfo_.host+")"),this.ref(n.path.toString())},t.prototype.checkDeleted_=function(t){null===this.repoInternal_&&O("Cannot call "+t+" on a deleted database.")},t.prototype.goOffline=function(){Object(o.K)("database.goOffline",0,0,arguments.length),this.checkDeleted_("goOffline"),this.repo_.interrupt()},t.prototype.goOnline=function(){Object(o.K)("database.goOnline",0,0,arguments.length),this.checkDeleted_("goOnline"),this.repo_.resume()},t.ServerValue={TIMESTAMP:{".sv":"timestamp"},increment:function(t){return{".sv":{increment:t}}}},t}();var bn=Object.freeze({__proto__:null,forceLongPolling:function(){Je.forceDisallow(),We.forceAllow()},forceWebSockets:function(){We.forceDisallow()},isWebSocketsAvailable:function(){return Je.isAvailable()},setSecurityDebugCallback:function(t,e){t.repo.persistentConnection_.securityDebugCallback_=e},stats:function(t,e){t.repo.stats(e)},statsIncrementCounter:function(t,e){t.repo.statsIncrementCounter(e)},dataUpdateCount:function(t){return t.repo.dataUpdateCount},interceptServerData:function(t,e){return t.repo.interceptServerData_(e)},initStandalone:function(t){var e=t.app,n=t.url,r=t.version,i=t.customAuthImpl,o=t.namespace,a=t.nodeAdmin,u=void 0!==a&&a;$e(r);var c=new s.c("auth-internal",new s.b("database-standalone"));return c.setComponent(new s.a("auth-internal",(function(){return i}),"PRIVATE")),{instance:yn.getInstance().databaseFromApp(e,c,n,u),namespace:o}}}),wn=nn;nn.prototype.simpleListen=function(t,e){this.sendRequest("q",{p:t},e)},nn.prototype.echo=function(t,e){this.sendRequest("echo",{d:t},e)};var _n=Ze,En=K,On=Object.freeze({__proto__:null,DataConnection:wn,RealTimeConnection:_n,hijackHash:function(t){var e=nn.prototype.put;return nn.prototype.put=function(n,r,i,o){void 0!==o&&(o=t()),e.call(this,n,r,i,o)},function(){nn.prototype.put=e}},ConnectionTarget:En,queryIdentifier:function(t){return t.queryIdentifier()},forceRestClient:function(t){yn.getInstance().forceRestClient(t)}}),Sn=mn.ServerValue;!function(t){$e(t.SDK_VERSION);var n=t.INTERNAL.registerComponent(new s.a("database",(function(t,e){var n=t.getProvider("app").getImmediate(),r=t.getProvider("auth-internal");return yn.getInstance().databaseFromApp(n,r,e)}),"PUBLIC").setServiceProps({Reference:ln,Query:Jt,Database:mn,DataSnapshot:Wt,enableLogging:b,INTERNAL:bn,ServerValue:Sn,TEST_ACCESS:On}).setMultipleInstances(!0));t.registerVersion("@firebase/database","0.8.1"),Object(o.z)()&&(e.exports=n)}(r.a)}).call(this,n(44),n(58)(t))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(2),i=n(57);function o(t){var e=t.i18n,n=t.defaultNS,o=t.children,a=Object(r.useMemo)((function(){return{i18n:e,defaultNS:n}}),[e,n]);return Object(r.createElement)(i.a.Provider,{value:a},o)}}]]);
3//# sourceMappingURL=6.a4d7ce28.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.