From e49497fe19a8f9f8aaa96d1189e4f36a7cbf27b4 Mon Sep 17 00:00:00 2001 From: "Christopher L. Crutchfield" Date: Fri, 9 Aug 2024 15:30:24 -0700 Subject: [PATCH] Delete web/baboon-tracking-status directory --- web/baboon-tracking-status/.gitignore | 23 - web/baboon-tracking-status/README.md | 46 - .../build/asset-manifest.json | 22 - web/baboon-tracking-status/build/favicon.ico | Bin 3870 -> 0 bytes web/baboon-tracking-status/build/index.html | 1 - web/baboon-tracking-status/build/logo192.png | Bin 5347 -> 0 bytes web/baboon-tracking-status/build/logo512.png | Bin 9664 -> 0 bytes .../build/manifest.json | 25 - web/baboon-tracking-status/build/robots.txt | 3 - .../build/static/css/main.ea1455b2.chunk.css | 2 - .../static/css/main.ea1455b2.chunk.css.map | 1 - .../build/static/js/2.c36aebc9.chunk.js | 3 - .../static/js/2.c36aebc9.chunk.js.LICENSE.txt | 199 - .../build/static/js/2.c36aebc9.chunk.js.map | 1 - .../build/static/js/3.a8236aba.chunk.js | 2 - .../build/static/js/3.a8236aba.chunk.js.map | 1 - .../build/static/js/main.5fd0096f.chunk.js | 2 - .../static/js/main.5fd0096f.chunk.js.map | 1 - .../build/static/js/runtime-main.fe2ad639.js | 2 - .../static/js/runtime-main.fe2ad639.js.map | 1 - web/baboon-tracking-status/package-lock.json | 16383 ---------------- web/baboon-tracking-status/package.json | 47 - web/baboon-tracking-status/public/favicon.ico | Bin 3870 -> 0 bytes web/baboon-tracking-status/public/index.html | 43 - web/baboon-tracking-status/public/logo192.png | Bin 5347 -> 0 bytes web/baboon-tracking-status/public/logo512.png | Bin 9664 -> 0 bytes .../public/manifest.json | 25 - web/baboon-tracking-status/public/robots.txt | 3 - web/baboon-tracking-status/src/App.css | 0 web/baboon-tracking-status/src/App.test.tsx | 9 - web/baboon-tracking-status/src/App.tsx | 21 - web/baboon-tracking-status/src/Metrics.tsx | 255 - web/baboon-tracking-status/src/index.css | 13 - web/baboon-tracking-status/src/index.tsx | 17 - web/baboon-tracking-status/src/logo.svg | 1 - .../src/react-app-env.d.ts | 1 - .../src/reportWebVitals.ts | 15 - web/baboon-tracking-status/src/setupTests.ts | 5 - web/baboon-tracking-status/tsconfig.json | 26 - web/baboon-tracking-status/yarn.lock | 11979 ----------- 40 files changed, 29178 deletions(-) delete mode 100644 web/baboon-tracking-status/.gitignore delete mode 100644 web/baboon-tracking-status/README.md delete mode 100644 web/baboon-tracking-status/build/asset-manifest.json delete mode 100644 web/baboon-tracking-status/build/favicon.ico delete mode 100644 web/baboon-tracking-status/build/index.html delete mode 100644 web/baboon-tracking-status/build/logo192.png delete mode 100644 web/baboon-tracking-status/build/logo512.png delete mode 100644 web/baboon-tracking-status/build/manifest.json delete mode 100644 web/baboon-tracking-status/build/robots.txt delete mode 100644 web/baboon-tracking-status/build/static/css/main.ea1455b2.chunk.css delete mode 100644 web/baboon-tracking-status/build/static/css/main.ea1455b2.chunk.css.map delete mode 100644 web/baboon-tracking-status/build/static/js/2.c36aebc9.chunk.js delete mode 100644 web/baboon-tracking-status/build/static/js/2.c36aebc9.chunk.js.LICENSE.txt delete mode 100644 web/baboon-tracking-status/build/static/js/2.c36aebc9.chunk.js.map delete mode 100644 web/baboon-tracking-status/build/static/js/3.a8236aba.chunk.js delete mode 100644 web/baboon-tracking-status/build/static/js/3.a8236aba.chunk.js.map delete mode 100644 web/baboon-tracking-status/build/static/js/main.5fd0096f.chunk.js delete mode 100644 web/baboon-tracking-status/build/static/js/main.5fd0096f.chunk.js.map delete mode 100644 web/baboon-tracking-status/build/static/js/runtime-main.fe2ad639.js delete mode 100644 web/baboon-tracking-status/build/static/js/runtime-main.fe2ad639.js.map delete mode 100644 web/baboon-tracking-status/package-lock.json delete mode 100644 web/baboon-tracking-status/package.json delete mode 100644 web/baboon-tracking-status/public/favicon.ico delete mode 100644 web/baboon-tracking-status/public/index.html delete mode 100644 web/baboon-tracking-status/public/logo192.png delete mode 100644 web/baboon-tracking-status/public/logo512.png delete mode 100644 web/baboon-tracking-status/public/manifest.json delete mode 100644 web/baboon-tracking-status/public/robots.txt delete mode 100644 web/baboon-tracking-status/src/App.css delete mode 100644 web/baboon-tracking-status/src/App.test.tsx delete mode 100644 web/baboon-tracking-status/src/App.tsx delete mode 100644 web/baboon-tracking-status/src/Metrics.tsx delete mode 100644 web/baboon-tracking-status/src/index.css delete mode 100644 web/baboon-tracking-status/src/index.tsx delete mode 100644 web/baboon-tracking-status/src/logo.svg delete mode 100644 web/baboon-tracking-status/src/react-app-env.d.ts delete mode 100644 web/baboon-tracking-status/src/reportWebVitals.ts delete mode 100644 web/baboon-tracking-status/src/setupTests.ts delete mode 100644 web/baboon-tracking-status/tsconfig.json delete mode 100644 web/baboon-tracking-status/yarn.lock diff --git a/web/baboon-tracking-status/.gitignore b/web/baboon-tracking-status/.gitignore deleted file mode 100644 index 58b21fe5..00000000 --- a/web/baboon-tracking-status/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -# /build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/web/baboon-tracking-status/README.md b/web/baboon-tracking-status/README.md deleted file mode 100644 index b58e0af8..00000000 --- a/web/baboon-tracking-status/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Getting Started with Create React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `yarn start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. - -The page will reload if you make edits.\ -You will also see any lint errors in the console. - -### `yarn test` - -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. - -### `yarn build` - -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. - -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! - -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `yarn eject` - -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** - -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. - -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. - -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). diff --git a/web/baboon-tracking-status/build/asset-manifest.json b/web/baboon-tracking-status/build/asset-manifest.json deleted file mode 100644 index ed4336d3..00000000 --- a/web/baboon-tracking-status/build/asset-manifest.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "files": { - "main.css": "./static/css/main.ea1455b2.chunk.css", - "main.js": "./static/js/main.5fd0096f.chunk.js", - "main.js.map": "./static/js/main.5fd0096f.chunk.js.map", - "runtime-main.js": "./static/js/runtime-main.fe2ad639.js", - "runtime-main.js.map": "./static/js/runtime-main.fe2ad639.js.map", - "static/js/2.c36aebc9.chunk.js": "./static/js/2.c36aebc9.chunk.js", - "static/js/2.c36aebc9.chunk.js.map": "./static/js/2.c36aebc9.chunk.js.map", - "static/js/3.a8236aba.chunk.js": "./static/js/3.a8236aba.chunk.js", - "static/js/3.a8236aba.chunk.js.map": "./static/js/3.a8236aba.chunk.js.map", - "index.html": "./index.html", - "static/css/main.ea1455b2.chunk.css.map": "./static/css/main.ea1455b2.chunk.css.map", - "static/js/2.c36aebc9.chunk.js.LICENSE.txt": "./static/js/2.c36aebc9.chunk.js.LICENSE.txt" - }, - "entrypoints": [ - "static/js/runtime-main.fe2ad639.js", - "static/js/2.c36aebc9.chunk.js", - "static/css/main.ea1455b2.chunk.css", - "static/js/main.5fd0096f.chunk.js" - ] -} \ No newline at end of file diff --git a/web/baboon-tracking-status/build/favicon.ico b/web/baboon-tracking-status/build/favicon.ico deleted file mode 100644 index a11777cc471a4344702741ab1c8a588998b1311a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3870 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 baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ diff --git a/web/baboon-tracking-status/build/index.html b/web/baboon-tracking-status/build/index.html deleted file mode 100644 index 32965abf..00000000 --- a/web/baboon-tracking-status/build/index.html +++ /dev/null @@ -1 +0,0 @@ -React App
\ No newline at end of file diff --git a/web/baboon-tracking-status/build/logo192.png b/web/baboon-tracking-status/build/logo192.png deleted file mode 100644 index fc44b0a3796c0e0a64c3d858ca038bd4570465d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5347 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 b{|{}U^kRn2wo}j7|0ATu<;8xA7zX}7|B6mN diff --git a/web/baboon-tracking-status/build/manifest.json b/web/baboon-tracking-status/build/manifest.json deleted file mode 100644 index 080d6c77..00000000 --- a/web/baboon-tracking-status/build/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - }, - { - "src": "logo192.png", - "type": "image/png", - "sizes": "192x192" - }, - { - "src": "logo512.png", - "type": "image/png", - "sizes": "512x512" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/web/baboon-tracking-status/build/robots.txt b/web/baboon-tracking-status/build/robots.txt deleted file mode 100644 index e9e57dc4..00000000 --- a/web/baboon-tracking-status/build/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/web/baboon-tracking-status/build/static/css/main.ea1455b2.chunk.css b/web/baboon-tracking-status/build/static/css/main.ea1455b2.chunk.css deleted file mode 100644 index f82f7afe..00000000 --- a/web/baboon-tracking-status/build/static/css/main.ea1455b2.chunk.css +++ /dev/null @@ -1,2 +0,0 @@ -body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace} -/*# sourceMappingURL=main.ea1455b2.chunk.css.map */ \ No newline at end of file diff --git a/web/baboon-tracking-status/build/static/css/main.ea1455b2.chunk.css.map b/web/baboon-tracking-status/build/static/css/main.ea1455b2.chunk.css.map deleted file mode 100644 index 4620a76c..00000000 --- a/web/baboon-tracking-status/build/static/css/main.ea1455b2.chunk.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack://src/index.css"],"names":[],"mappings":"AAAA,KACE,QAAS,CACT,mJAEY,CACZ,kCAAmC,CACnC,iCACF,CAEA,KACE,yEAEF","file":"main.ea1455b2.chunk.css","sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n"]} \ No newline at end of file diff --git a/web/baboon-tracking-status/build/static/js/2.c36aebc9.chunk.js b/web/baboon-tracking-status/build/static/js/2.c36aebc9.chunk.js deleted file mode 100644 index bd56297f..00000000 --- a/web/baboon-tracking-status/build/static/js/2.c36aebc9.chunk.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 2.c36aebc9.chunk.js.LICENSE.txt */ -(this["webpackJsonpbaboon-tracking-status"]=this["webpackJsonpbaboon-tracking-status"]||[]).push([[2],[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,"g",(function(){return u})),n.d(e,"e",(function(){return c})),n.d(e,"f",(function(){return l}));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,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");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;n0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=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(t,e){for(var n=0,r=e.length,i=t.length;n>6|192,e[n++]=63&i|128):55296===(64512&i)&&r+1>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>2,h=(3&o)<<4|s>>4,f=(15&s)<<2|c>>6,d=63&c;u||(d=64,a||(f=64)),r.push(n[l],n[h],n[f],n[d])}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;n191&&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++];e[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>4;if(r.push(c),64!==s){var l=a<<4&240|s>>2;if(r.push(l),64!==u){var h=s<<6&192|u;r.push(h)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},h=function(t){var e=c(t);return l.encodeByteArray(e,!0)},f=function(t){try{return l.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function d(t){return p(void 0,t)}function p(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]=p(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(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');var n=e||"demo-project",i=t.iat||0,o=t.sub||t.user_id;if(!o)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");var a=Object(r.a)({iss:"https://securetoken.google.com/"+n,aud:n,iat:i,exp:i+3600,auth_time:i,sub:o,user_id:o,firebase:{sign_in_provider:"custom",identities:{}}},t);return[l.encodeString(JSON.stringify({alg:"none",type:"JWT"}),!1),l.encodeString(JSON.stringify(a),!1),""].join(".")}function m(){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(m())}function b(){try{return"[object process]"===Object.prototype.toString.call(t.process)}catch(e){return!1}}function _(){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 k(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function S(){return m().indexOf("Electron/")>=0}function T(){var t=m();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function I(){return m().indexOf("MSAppHost/")>=0}function x(){return!0===i||!0===o}function O(){return"indexedDB"in self&&null!=indexedDB}function E(){return new Promise((function(t,e){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||self.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 C(){return!(!navigator||!navigator.cookieEnabled)}var N=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,P.prototype.create),o}return Object(r.c)(e,t),e}(Error),P=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"}))}var D=/\{\$([^}]+)}/g;function M(t){return JSON.parse(t)}function R(t){return JSON.stringify(t)}var j=function(t){var e={},n={},r={},i="";try{var o=t.split(".");e=M(f(o[0])||""),n=M(f(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=j(t).claims;return!!e&&"object"===typeof e&&e.hasOwnProperty("iat")},F=function(t){var e=j(t).claims;return"object"===typeof e&&!0===e.admin};function U(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function V(t,e){return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0}function q(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function B(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 z(t){for(var e=[],n=function(t,n){Array.isArray(n)?n.forEach((function(n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))})):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))},r=0,i=Object.entries(t);r>>31)}var o,a,s=this.chain_[0],u=this.chain_[1],c=this.chain_[2],l=this.chain_[3],h=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+h+a+n[r]&4294967295;h=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]+h&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=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 H(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;nn&&(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){return t+" failed: "+e+" argument "}function $(t,e,n,r){if((!r||n)&&"function"!==typeof n)throw new Error(Q(t,e)+"must be a valid function.")}function X(t,e,n,r){if((!r||n)&&("object"!==typeof n||null===n))throw new Error(Q(t,e)+"must be a valid context object.")}var J=function(t){for(var e=[],n=0,r=0;r=55296&&i<=56319){var o=i-55296;r++,s(r>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},Z=function(t){for(var e=0,n=0;n=55296&&r<=56319?(e+=4,n++):e+=3}return e};function tt(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)}function et(t){return t&&t._delegate?t._delegate:t}}).call(this,n(21))},function(t,e,n){"use strict";var r,i,o=n(0),a=n(1),s=n(4),u=n(3),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),h="@firebase/app",f="[DEFAULT]",d=((i={})[h]="fire-core",i["@firebase/analytics"]="fire-analytics",i["@firebase/app-check"]="fire-app-check",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),p=new u.b("@firebase/app"),v=function(){function t(t,e,n){var r=this;this.firebase_=n,this.isDeleted_=!1,this.name_=e.name,this.automaticDataCollectionEnabled_=e.automaticDataCollectionEnabled||!1,this.options_=Object(a.n)(t),this.container=new s.b(e.name),this._addComponent(new s.a("app",(function(){return r}),"PUBLIC")),this.firebase_.INTERNAL.components.forEach((function(t){return r._addComponent(t)}))}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=f),this.checkDestroyed_(),this.container.getProvider(t).getImmediate({identifier:e})},t.prototype._removeServiceInstance=function(t,e){void 0===e&&(e=f),this.container.getProvider(t).clearInstance(e)},t.prototype._addComponent=function(t){try{this.container.addComponent(t)}catch(e){p.debug("Component "+t.name+" failed to register with FirebaseApp "+this.name,e)}},t.prototype._addOrOverwriteComponent=function(t){this.container.addOrOverwriteComponent(t)},t.prototype.toJSON=function(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}},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=f);var s=o.name;if("string"!==typeof s||!s)throw l.create("bad-app-name",{appName:String(s)});if(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=d[t])&&void 0!==r?r:t;n&&(i+="-"+n);var a=i.match(/\s|\//),u=e.match(/\s|\//);if(a||u){var c=['Unable to register library "'+i+'" with version "'+e+'":'];return a&&c.push('library name "'+i+'" contains illegal characters (whitespace or "/")'),a&&u&&c.push("and"),u&&c.push('version name "'+e+'" contains illegal characters (whitespace or "/")'),void p.warn(c.join(" "))}o(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");Object(u.d)(t,e)},apps:null,SDK_VERSION:"8.5.0",INTERNAL:{registerComponent:o,removeApp:function(t){delete e[t]},components:n,useAsService:function(t,e){return"serverAuth"===e?null:e}}};function i(t){if(t=t||f,!Object(a.k)(e,t))throw l.create("no-app",{appName:t});return e[t]}function o(o){var s=o.name;if(n.has(s))return p.debug("There were multiple attempts to register component "+s+"."),"PUBLIC"===o.type?r[s]:null;if(n.set(s,o),"PUBLIC"===o.type){var u=function(t){if(void 0===t&&(t=i()),"function"!==typeof t[s])throw l.create("invalid-app-argument",{appName:s});return t[s]()};void 0!==o.serviceProps&&Object(a.o)(u,o.serviceProps),r[s]=u,t.prototype[s]=function(){for(var t=[],e=0;e=0&&p.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=(null!==r&&void 0!==r?r:e.logLevel)&&t({level:o[n].toLowerCase(),message:s,args:i,type:e.name})}},r=0,i=a;re?1:0}function k(t,e,n){return t.length===e.length&&t.every((function(t,r){return n(t,e[r])}))}function S(t){return t+"\0"}var T=function(){function t(t,e){if(this.seconds=t,this.nanoseconds=e,e<0)throw new c(u.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(e>=1e9)throw new c(u.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+e);if(t<-62135596800)throw new c(u.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new c(u.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,Math.floor(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._compareTo=function(t){return this.seconds===t.seconds?w(this.nanoseconds,t.nanoseconds):w(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}(),I=function(){function t(t){this.timestamp=t}return t.fromTimestamp=function(e){return new t(e)},t.min=function(){return new t(new T(0,0))},t.prototype.compareTo=function(t){return this.timestamp._compareTo(t.timestamp)},t.prototype.isEqual=function(t){return this.timestamp.isEqual(t.timestamp)},t.prototype.toMicroseconds=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},t.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},t.prototype.toTimestamp=function(){return this.timestamp},t}();function x(t){var e=0;for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function O(t,e){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function E(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}var C=function(){function t(t,e,n){void 0===e?e=0:e>t.length&&g(),void 0===n?n=t.length-e:n>t.length-e&&g(),this.segments=t,this.offset=e,this.len=n}return Object.defineProperty(t.prototype,"length",{get:function(){return this.len},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(e){return 0===t.comparator(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.construct(n)},t.prototype.limit=function(){return this.offset+this.length},t.prototype.popFirst=function(t){return t=void 0===t?1:t,this.construct(this.segments,this.offset+t,this.length-t)},t.prototype.popLast=function(){return this.construct(this.segments,this.offset,this.length-1)},t.prototype.firstSegment=function(){return this.segments[this.offset]},t.prototype.lastSegment=function(){return this.get(this.length-1)},t.prototype.get=function(t){return this.segments[this.offset+t]},t.prototype.isEmpty=function(){return 0===this.length},t.prototype.isPrefixOf=function(t){if(t.lengtho)return 1}return t.lengthe.length?1:0},t}(),N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.construct=function(t,n,r){return new e(t,n,r)},e.prototype.canonicalString=function(){return this.toArray().join("/")},e.prototype.toString=function(){return this.canonicalString()},e.fromString=function(){for(var t=[],n=0;n=0)throw new c(u.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.emptyPath=function(){return new e([])},e}(C),P=/^[_a-zA-Z][_a-zA-Z0-9]*$/,A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.c)(e,t),e.prototype.construct=function(t,n,r){return new e(t,n,r)},e.isValidIdentifier=function(t){return P.test(t)},e.prototype.canonicalString=function(){return this.toArray().map((function(t){return t=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),e.isValidIdentifier(t)||(t="`"+t+"`"),t})).join(".")},e.prototype.toString=function(){return this.canonicalString()},e.prototype.isKeyField=function(){return 1===this.length&&"__name__"===this.get(0)},e.keyField=function(){return new e(["__name__"])},e.fromServerFormat=function(t){for(var n=[],r="",i=0,o=function(){if(0===r.length)throw new c(u.INVALID_ARGUMENT,"Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},a=!1;i=Number.MIN_SAFE_INTEGER}var H=function(){function t(t){this.path=t}return t.fromPath=function(e){return new t(N.fromString(e))},t.fromName=function(e){return new t(N.fromString(e).popFirst(5))},t.prototype.hasCollectionId=function(t){return this.path.length>=2&&this.path.get(this.path.length-2)===t},t.prototype.isEqual=function(t){return null!==t&&0===N.comparator(this.path,t.path)},t.prototype.toString=function(){return this.path.toString()},t.comparator=function(t,e){return N.comparator(t.path,e.path)},t.isDocumentKey=function(t){return t.length%2==0},t.fromSegments=function(e){return new t(new N(e.slice()))},t}();function K(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?U(t)?4:10:g()}function Y(t,e){var n=K(t);if(n!==K(e))return!1;switch(n){case 0:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return q(t).isEqual(q(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=j(t.timestampValue),r=j(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 F(t.bytesValue).isEqual(F(e.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(t,e){return L(t.geoPointValue.latitude)===L(e.geoPointValue.latitude)&&L(t.geoPointValue.longitude)===L(e.geoPointValue.longitude)}(t,e);case 2:return function(t,e){if("integerValue"in t&&"integerValue"in e)return L(t.integerValue)===L(e.integerValue);if("doubleValue"in t&&"doubleValue"in e){var n=L(t.doubleValue),r=L(e.doubleValue);return n===r?z(n)===z(r):isNaN(n)&&isNaN(r)}return!1}(t,e);case 9:return k(t.arrayValue.values||[],e.arrayValue.values||[],Y);case 10:return function(t,e){var n=t.mapValue.fields||{},r=e.mapValue.fields||{};if(x(n)!==x(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!Y(n[i],r[i])))return!1;return!0}(t,e);default:return g()}}function G(t,e){return void 0!==(t.values||[]).find((function(t){return Y(t,e)}))}function Q(t,e){var n=K(t),r=K(e);if(n!==r)return w(n,r);switch(n){case 0:return 0;case 1:return w(t.booleanValue,e.booleanValue);case 2:return function(t,e){var n=L(t.integerValue||t.doubleValue),r=L(e.integerValue||e.doubleValue);return nr?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(t,e);case 3:return $(t.timestampValue,e.timestampValue);case 4:return $(q(t),q(e));case 5:return w(t.stringValue,e.stringValue);case 6:return function(t,e){var n=F(t),r=F(e);return n.compareTo(r)}(t.bytesValue,e.bytesValue);case 7:return function(t,e){for(var n=t.split("/"),r=e.split("/"),i=0;i":return t>0;case">=":return t>=0;default:return g()}},e.prototype.g=function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0},e}((function(){})),pt=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n,r)||this).key=H.fromName(r.referenceValue),i}return Object(a.c)(e,t),e.prototype.matches=function(t){var e=H.comparator(t.key,this.key);return this.m(e)},e}(dt),vt=function(t){function e(e,n){var r=this;return(r=t.call(this,e,"in",n)||this).keys=mt("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}(dt),gt=function(t){function e(e,n){var r=this;return(r=t.call(this,e,"not-in",n)||this).keys=mt("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}(dt);function mt(t,e){var n;return((null===(n=e.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(t){return H.fromName(t.referenceValue)}))}var yt=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.data.field(this.field);return et(e)&&G(e.arrayValue,this.value)},e}(dt),bt=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.data.field(this.field);return null!==e&&G(this.value.arrayValue,e)},e}(dt),_t=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(G(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var e=t.data.field(this.field);return null!==e&&!G(this.value.arrayValue,e)},e}(dt),wt=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.data.field(this.field);return!(!et(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(t){return G(e.value.arrayValue,t)}))},e}(dt),kt=function(t,e){this.position=t,this.before=e};function St(t){return(t.before?"b":"a")+":"+t.position.map((function(t){return X(t)})).join(",")}var Tt=function(t,e){void 0===e&&(e="asc"),this.field=t,this.dir=e};function It(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}function xt(t,e,n){for(var r=0,i=0;i0?t.explicitOrderBy[0].field:null}function Mt(t){for(var e=0,n=t.filters;e0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";e.p.push(new Tt(A.keyField(),u))}}}return e.p}function Lt(t){var e=y(t);if(!e.T)if("F"===e.limitType)e.T=ct(e.path,e.collectionGroup,jt(e),e.filters,e.limit,e.startAt,e.endAt);else{for(var n=[],r=0,i=jt(e);r0&&(e+=", orderBy: ["+t.orderBy.map((function(t){return function(t){return t.field.canonicalString()+" ("+t.dir+")"}(t)})).join(", ")+"]"),t.startAt&&(e+=", startAt: "+St(t.startAt)),t.endAt&&(e+=", endAt: "+St(t.endAt)),"Target("+e+")"}(Lt(t))+"; limitType="+t.limitType+")"}function Bt(t,e){return e.isFoundDocument()&&function(t,e){var n=e.key.path;return null!==t.collectionGroup?e.key.hasCollectionId(t.collectionGroup)&&t.path.isPrefixOf(n):H.isDocumentKey(t.path)?t.path.isEqual(n):t.path.isImmediateParentOf(n)}(t,e)&&function(t,e){for(var n=0,r=t.explicitOrderBy;n0&&(e=e.right)}return null},t.prototype.indexOf=function(t){for(var e=0,n=this.root;!n.isEmpty();){var r=this.comparator(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.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(t.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),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.forEach=function(t){this.inorderTraversal((function(e,n){return t(e,n),!1}))},t.prototype.toString=function(){var t=[];return this.inorderTraversal((function(e,n){return t.push(e+":"+n),!1})),"{"+t.join(", ")+"}"},t.prototype.reverseTraversal=function(t){return this.root.reverseTraversal(t)},t.prototype.getIterator=function(){return new Ce(this.root,null,this.comparator,!1)},t.prototype.getIteratorFrom=function(t){return new Ce(this.root,t,this.comparator,!1)},t.prototype.getReverseIterator=function(){return new Ce(this.root,null,this.comparator,!0)},t.prototype.getReverseIteratorFrom=function(t){return new Ce(this.root,t,this.comparator,!0)},t}(),Ce=function(){function t(t,e,n,r){this.isReverse=r,this.nodeStack=[];for(var i=1;!t.isEmpty();)if(i=e?n(t.key,e):1,r&&(i*=-1),i<0)t=this.isReverse?t.left:t.right;else{if(0===i){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}return t.prototype.getNext=function(){var t=this.nodeStack.pop(),e={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return e},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{key:t.key,value:t.value}},t}(),Ne=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.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 t.EMPTY;var e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),(e=e.copy(null,null,null,e.left.removeMin(),null)).fixUp()},t.prototype.remove=function(e,n){var r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),0===n(e,i.key)){if(i.right.isEmpty())return t.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.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.size+1},t.prototype.check=function(){if(this.isRed()&&this.left.isRed())throw g();if(this.right.isRed())throw g();var t=this.left.check();if(t!==this.right.check())throw g();return t+(this.isRed()?0:1)},t}();Ne.EMPTY=null,Ne.RED=!0,Ne.BLACK=!1,Ne.EMPTY=new(function(){function t(){this.size=0}return Object.defineProperty(t.prototype,"key",{get:function(){throw g()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){throw g()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){throw g()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){throw g()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){throw g()},enumerable:!1,configurable:!0}),t.prototype.copy=function(t,e,n,r,i){return this},t.prototype.insert=function(t,e,n){return new Ne(t,e)},t.prototype.remove=function(t,e){return this},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.isRed=function(){return!1},t.prototype.checkMaxDepth=function(){return!0},t.prototype.check=function(){return 0},t}());var Pe=function(){function t(t){this.comparator=t,this.data=new Ee(this.comparator)}return t.prototype.has=function(t){return null!==this.data.get(t)},t.prototype.first=function(){return this.data.minKey()},t.prototype.last=function(){return this.data.maxKey()},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.inorderTraversal((function(e,n){return t(e),!1}))},t.prototype.forEachInRange=function(t,e){for(var n=this.data.getIteratorFrom(t[0]);n.hasNext();){var r=n.getNext();if(this.comparator(r.key,t[1])>=0)return;e(r.key)}},t.prototype.forEachWhile=function(t,e){var n;for(n=void 0!==e?this.data.getIteratorFrom(e):this.data.getIterator();n.hasNext();)if(!t(n.getNext().key))return},t.prototype.firstAfterOrEqual=function(t){var e=this.data.getIteratorFrom(t);return e.hasNext()?e.getNext().key:null},t.prototype.getIterator=function(){return new Ae(this.data.getIterator())},t.prototype.getIteratorFrom=function(t){return new Ae(this.data.getIteratorFrom(t))},t.prototype.add=function(t){return this.copy(this.data.remove(t).insert(t,!0))},t.prototype.delete=function(t){return this.has(t)?this.copy(this.data.remove(t)):this},t.prototype.isEmpty=function(){return this.data.isEmpty()},t.prototype.unionWith=function(t){var e=this;return e.size0&&(this.F=!0,this.C=t)},t.prototype.M=function(){var t=Ve(),e=Ve(),n=Ve();return this.D.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:g()}})),new We(this.C,this.N,t,e,n)},t.prototype.L=function(){this.F=!1,this.D=Xe()},t.prototype.B=function(t,e){this.F=!0,this.D=this.D.insert(t,e)},t.prototype.q=function(t){this.F=!0,this.D=this.D.remove(t)},t.prototype.U=function(){this.S+=1},t.prototype.K=function(){this.S-=1},t.prototype.j=function(){this.F=!0,this.N=!0},t}(),Qe=function(){function t(t){this.W=t,this.G=new Map,this.H=Me(),this.J=$e(),this.Y=new Pe(w)}return t.prototype.X=function(t){for(var e=0,n=t.v;e0?t.targetIds.forEach(e):this.G.forEach((function(t,r){n.st(r)&&e(r)}))},t.prototype.rt=function(t){var e=t.targetId,n=t.V.count,r=this.ot(e);if(r){var i=r.target;if(ft(i))if(0===n){var o=new H(i.path);this.tt(e,o,st.newNoDocument(o,I.min()))}else m(1===n);else this.ct(e)!==n&&(this.it(e),this.Y=this.Y.add(e))}},t.prototype.ut=function(t){var e=this,n=new Map;this.G.forEach((function(r,i){var o=e.ot(i);if(o){if(r.current&&ft(o.target)){var a=new H(o.target.path);null!==e.H.get(a)||e.at(i,a)||e.tt(i,a,st.newNoDocument(a,t))}r.O&&(n.set(i,r.M()),r.L())}}));var r=Ve();this.J.forEach((function(t,n){var i=!0;n.forEachWhile((function(t){var n=e.ot(t);return!n||2===n.purpose||(i=!1,!1)})),i&&(r=r.add(t))}));var i=new ze(t,n,this.Y,this.H,r);return this.H=Me(),this.J=$e(),this.Y=new Pe(w),i},t.prototype.Z=function(t,e){if(this.st(t)){var n=this.at(t,e.key)?2:0;this.nt(t).B(e.key,n),this.H=this.H.insert(e.key,e),this.J=this.J.insert(e.key,this.ht(e.key).add(t))}},t.prototype.tt=function(t,e,n){if(this.st(t)){var r=this.nt(t);this.at(t,e)?r.B(e,1):r.q(e),this.J=this.J.insert(e,this.ht(e).delete(t)),n&&(this.H=this.H.insert(e,n))}},t.prototype.removeTarget=function(t){this.G.delete(t)},t.prototype.ct=function(t){var e=this.nt(t).M();return this.W.getRemoteKeysForTarget(t).size+e.addedDocuments.size-e.removedDocuments.size},t.prototype.U=function(t){this.nt(t).U()},t.prototype.nt=function(t){var e=this.G.get(t);return e||(e=new Ge,this.G.set(t,e)),e},t.prototype.ht=function(t){var e=this.J.get(t);return e||(e=new Pe(w),this.J=this.J.insert(t,e)),e},t.prototype.st=function(t){var e=null!==this.ot(t);return e||f("WatchChangeAggregator","Detected inactive target",t),e},t.prototype.ot=function(t){var e=this.G.get(t);return e&&e.k?null:this.W.lt(t)},t.prototype.it=function(t){var e=this;this.G.set(t,new Ge),this.W.getRemoteKeysForTarget(t).forEach((function(n){e.tt(t,n,null)}))},t.prototype.at=function(t,e){return this.W.getRemoteKeysForTarget(t).has(e)},t}();function $e(){return new Ee(H.comparator)}function Xe(){return new Ee(H.comparator)}var Je={asc:"ASCENDING",desc:"DESCENDING"},Ze={"<":"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"},tn=function(t,e){this.databaseId=t,this.I=e};function en(t,e){return t.I?new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+e.nanoseconds).slice(-9)+"Z":{seconds:""+e.seconds,nanos:e.nanoseconds}}function nn(t,e){return t.I?e.toBase64():e.toUint8Array()}function rn(t,e){return en(t,e.toTimestamp())}function on(t){return m(!!t),I.fromTimestamp(function(t){var e=j(t);return new T(e.seconds,e.nanos)}(t))}function an(t,e){return function(t){return new N(["projects",t.projectId,"databases",t.database])}(t).child("documents").child(e).canonicalString()}function sn(t){var e=N.fromString(t);return m(Pn(e)),e}function un(t,e){return an(t.databaseId,e.path)}function cn(t,e){var n=sn(e);if(n.get(1)!==t.databaseId.projectId)throw new c(u.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new c(u.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new H(dn(n))}function ln(t,e){return an(t.databaseId,e)}function hn(t){var e=sn(t);return 4===e.length?N.emptyPath():dn(e)}function fn(t){return new N(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function dn(t){return m(t.length>4&&"documents"===t.get(4)),t.popFirst(5)}function pn(t,e,n){return{name:un(t,e),fields:n.toProto().mapValue.fields}}function vn(t,e,n){var r=cn(t,e.name),i=on(e.updateTime),o=new ot({mapValue:{fields:e.fields}}),a=st.newFoundDocument(r,i,o);return n&&a.setHasCommittedMutations(),n?a.setHasCommittedMutations():a}function gn(t,e){var n;if(e instanceof ge)n={update:pn(t,e.key,e.value)};else if(e instanceof Se)n={delete:un(t,e.key)};else if(e instanceof me)n={update:pn(t,e.key,e.data),updateMask:Nn(e.fieldMask)};else{if(!(e instanceof Te))return g();n={verify:un(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 Jt)return{fieldPath:e.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof Zt)return{fieldPath:e.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof ee)return{fieldPath:e.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof re)return{fieldPath:e.field.canonicalString(),increment:n.A};throw g()}(0,t)}))),e.precondition.isNone||(n.currentDocument=function(t,e){return void 0!==e.updateTime?{updateTime:rn(t,e.updateTime)}:void 0!==e.exists?{exists:e.exists}:g()}(t,e.precondition)),n}function mn(t,e){var n=e.currentDocument?function(t){return void 0!==t.updateTime?ue.updateTime(on(t.updateTime)):void 0!==t.exists?ue.exists(t.exists):ue.none()}(e.currentDocument):ue.none(),r=e.updateTransforms?e.updateTransforms.map((function(e){return function(t,e){var n=null;if("setToServerValue"in e)m("REQUEST_TIME"===e.setToServerValue),n=new Jt;else if("appendMissingElements"in e){var r=e.appendMissingElements.values||[];n=new Zt(r)}else if("removeAllFromArray"in e){var i=e.removeAllFromArray.values||[];n=new ee(i)}else"increment"in e?n=new re(t,e.increment):g();var o=A.fromServerFormat(e.fieldPath);return new ae(o,n)}(t,e)})):[];if(e.update){e.update.name;var i=cn(t,e.update.name),o=new ot({mapValue:{fields:e.update.fields}});if(e.updateMask){var a=function(t){var e=t.fieldPaths||[];return new D(e.map((function(t){return A.fromServerFormat(t)})))}(e.updateMask);return new me(i,o,a,n,r)}return new ge(i,o,n,r)}if(e.delete){var s=cn(t,e.delete);return new Se(s,n)}if(e.verify){var u=cn(t,e.verify);return new Te(u,n)}return g()}function yn(t,e){return{documents:[ln(t,e.path)]}}function bn(t,e){var n={structuredQuery:{}},r=e.path;null!==e.collectionGroup?(n.parent=ln(t,r),n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(n.parent=ln(t,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);var i=function(t){if(0!==t.length){var e=t.map((function(t){return function(t){if("=="===t.op){if(rt(t.value))return{unaryFilter:{field:xn(t.field),op:"IS_NAN"}};if(nt(t.value))return{unaryFilter:{field:xn(t.field),op:"IS_NULL"}}}else if("!="===t.op){if(rt(t.value))return{unaryFilter:{field:xn(t.field),op:"IS_NOT_NAN"}};if(nt(t.value))return{unaryFilter:{field:xn(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:xn(t.field),op:In(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:xn(t.field),direction:Tn(t.dir)}}(t)}))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);var a=function(t,e){return t.I||B(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 _n(t){var e=hn(t.parent),n=t.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){m(1===r);var o=n.from[0];o.allDescendants?i=o.collectionId:e=e.child(o.collectionId)}var a=[];n.where&&(a=wn(n.where));var s=[];n.orderBy&&(s=n.orderBy.map((function(t){return function(t){return new Tt(On(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 B(e="object"==typeof t?t.value:t)?null:e}(n.limit));var c=null;n.startAt&&(c=Sn(n.startAt));var l=null;return n.endAt&&(l=Sn(n.endAt)),Ct(e,i,s,a,u,"F",c,l)}function wn(t){return t?void 0!==t.unaryFilter?[Cn(t)]:void 0!==t.fieldFilter?[En(t)]:void 0!==t.compositeFilter?t.compositeFilter.filters.map((function(t){return wn(t)})).reduce((function(t,e){return t.concat(e)})):g():[]}function kn(t){return{before:t.before,values:t.position}}function Sn(t){var e=!!t.before,n=t.values||[];return new kt(n,e)}function Tn(t){return Je[t]}function In(t){return Ze[t]}function xn(t){return{fieldPath:t.canonicalString()}}function On(t){return A.fromServerFormat(t.fieldPath)}function En(t){return dt.create(On(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 g()}}(t.fieldFilter.op),t.fieldFilter.value)}function Cn(t){switch(t.unaryFilter.op){case"IS_NAN":var e=On(t.unaryFilter.field);return dt.create(e,"==",{doubleValue:NaN});case"IS_NULL":var n=On(t.unaryFilter.field);return dt.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=On(t.unaryFilter.field);return dt.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=On(t.unaryFilter.field);return dt.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return g()}}function Nn(t){var e=[];return t.fields.forEach((function(t){return e.push(t.canonicalString())})),{fieldPaths:e}}function Pn(t){return t.length>=4&&"projects"===t.get(0)&&"databases"===t.get(2)}function An(t){for(var e="",n=0;n0&&(e=Mn(e)),e=Dn(t.get(n),e);return Mn(e)}function Dn(t,e){for(var n=e,r=t.length,i=0;i=2),2===e)return m("\x01"===t.charAt(0)&&"\x01"===t.charAt(1)),N.emptyPath();for(var n=e-2,r=[],i="",o=0;on)&&g(),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:g()}o=a+2}return new N(r)}var jn=function(t,e){this.seconds=t,this.nanoseconds=e},Ln=function(t,e,n){this.ownerId=t,this.allowTabSynchronization=e,this.leaseTimestampMs=n};Ln.store="owner",Ln.key="owner";var Fn=function(t,e,n){this.userId=t,this.lastAcknowledgedBatchId=e,this.lastStreamToken=n};Fn.store="mutationQueues",Fn.keyPath="userId";var Un=function(t,e,n,r,i){this.userId=t,this.batchId=e,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=i};Un.store="mutations",Un.keyPath="batchId",Un.userMutationsIndex="userMutationsIndex",Un.userMutationsKeyPath=["userId","batchId"];var Vn=function(){function t(){}return t.prefixForUser=function(t){return[t]},t.prefixForPath=function(t,e){return[t,An(e)]},t.key=function(t,e,n){return[t,An(e),n]},t}();Vn.store="documentMutations",Vn.PLACEHOLDER=new Vn;var qn=function(t,e){this.path=t,this.readTime=e},Bn=function(t,e){this.path=t,this.version=e},zn=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};zn.store="remoteDocuments",zn.readTimeIndex="readTimeIndex",zn.readTimeIndexPath="readTime",zn.collectionReadTimeIndex="collectionReadTimeIndex",zn.collectionReadTimeIndexPath=["parentPath","readTime"];var Wn=function(t){this.byteSize=t};Wn.store="remoteDocumentGlobal",Wn.key="remoteDocumentGlobalKey";var Hn=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};Hn.store="targets",Hn.keyPath="targetId",Hn.queryTargetsIndexName="queryTargetsIndex",Hn.queryTargetsKeyPath=["canonicalId","targetId"];var Kn=function(t,e,n){this.targetId=t,this.path=e,this.sequenceNumber=n};Kn.store="targetDocuments",Kn.keyPath=["targetId","path"],Kn.documentTargetsIndex="documentTargetsIndex",Kn.documentTargetsKeyPath=["path","targetId"];var Yn=function(t,e,n,r){this.highestTargetId=t,this.highestListenSequenceNumber=e,this.lastRemoteSnapshotVersion=n,this.targetCount=r};Yn.key="targetGlobalKey",Yn.store="targetGlobal";var Gn=function(t,e){this.collectionId=t,this.parent=e};Gn.store="collectionParents",Gn.keyPath=["collectionId","parent"];var Qn=function(t,e,n,r){this.clientId=t,this.updateTimeMs=e,this.networkEnabled=n,this.inForeground=r};Qn.store="clientMetadata",Qn.keyPath="clientId";var $n=function(t,e,n){this.bundleId=t,this.createTime=e,this.version=n};$n.store="bundles",$n.keyPath="bundleId";var Xn=function(t,e,n){this.name=t,this.readTime=e,this.bundledQuery=n};Xn.store="namedQueries",Xn.keyPath="name";var Jn=Object(a.f)(Object(a.f)([],Object(a.f)(Object(a.f)([],Object(a.f)(Object(a.f)([],Object(a.f)(Object(a.f)([],[Fn.store,Un.store,Vn.store,zn.store,Hn.store,Ln.store,Yn.store,Kn.store]),[Qn.store])),[Wn.store])),[Gn.store])),[$n.store,Xn.store]),Zn="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",tr=function(){function t(){this.onCommittedListeners=[]}return t.prototype.addOnCommittedListener=function(t){this.onCommittedListeners.push(t)},t.prototype.raiseOnCommittedEvent=function(){this.onCommittedListeners.forEach((function(t){return t()}))},t}(),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.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t((function(t){e.isDone=!0,e.result=t,e.nextCallback&&e.nextCallback(t)}),(function(t){e.isDone=!0,e.error=t,e.catchCallback&&e.catchCallback(t)}))}return t.prototype.catch=function(t){return this.next(void 0,t)},t.prototype.next=function(e,n){var r=this;return this.callbackAttached&&g(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new t((function(t,i){r.nextCallback=function(n){r.wrapSuccess(e,n).next(t,i)},r.catchCallback=function(e){r.wrapFailure(n,e).next(t,i)}}))},t.prototype.toPromise=function(){var t=this;return new Promise((function(e,n){t.next(e,n)}))},t.prototype.wrapUserFunction=function(e){try{var n=e();return n instanceof t?n:t.resolve(n)}catch(e){return t.reject(e)}},t.prototype.wrapSuccess=function(e,n){return e?this.wrapUserFunction((function(){return e(n)})):t.resolve(n)},t.prototype.wrapFailure=function(e,n){return e?this.wrapUserFunction((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.waitFor=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.or=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;i0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||i||a)},e.gt=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}))||void 0===e?void 0:e.Tt)},e.It=function(t,e){return t.store(e)},e._t=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.Et=function(t){var e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)},e.prototype.At=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]:(f("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 c(u.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){f("SimpleDb",'Database "'+n.name+'" requires upgrade from version:',t.oldVersion);var e=t.target.result;n.wt.Rt(e,i.transaction,t.oldVersion,n.version).next((function(){f("SimpleDb","Database upgrade to version "+n.version+" complete")}))}}))]);case 1:e.db=r.sent(),r.label=2;case 2:return[2,(this.bt&&(this.db.onversionchange=function(t){return n.bt(t)}),this.db)]}}))}))},e.prototype.vt=function(t){this.bt=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,c;return Object(a.d)(this,(function(l){switch(l.label){case 0:i="readonly"===e,o=0,s=function(){var e,s,c,l,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.At(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)})).toPromise(),c={},s.catch((function(){})),[4,e.dt];case 3:return[2,(c.value=(a.sent(),s),c)];case 4:return l=a.sent(),h="FirebaseError"!==l.name&&o<3,f("SimpleDb","Transaction failed with error:",l.message,"Retrying:",h),u.close(),h?[3,5]:[2,{value:Promise.reject(l)}];case 5:return[2]}}))},u=this,l.label=1;case 1:return[5,s()];case 2:if("object"==typeof(c=l.sent()))return[2,c.value];l.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.Pt=t,this.Vt=!1,this.St=null}return Object.defineProperty(t.prototype,"isDone",{get:function(){return this.Vt},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Dt",{get:function(){return this.St},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursor",{set:function(t){this.Pt=t},enumerable:!1,configurable:!0}),t.prototype.done=function(){this.Vt=!0},t.prototype.Ct=function(t){this.St=t},t.prototype.delete=function(){return cr(this.Pt.delete())},t}(),ar=function(t){function e(e,n){var r=this;return(r=t.call(this,u.UNAVAILABLE,"IndexedDB transaction '"+e+"' failed: "+n)||this).name="IndexedDbTransactionError",r}return Object(a.c)(e,t),e}(c);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?(f("SimpleDb","PUT",this.store.name,t,e),n=this.store.put(e,t)):(f("SimpleDb","PUT",this.store.name,"",t),n=this.store.put(t)),cr(n)},t.prototype.add=function(t){return f("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),f("SimpleDb","GET",e.store.name,t,n),n}))},t.prototype.delete=function(t){return f("SimpleDb","DELETE",this.store.name,t),cr(this.store.delete(t))},t.prototype.count=function(){return f("SimpleDb","COUNT",this.store.name),cr(this.store.count())},t.prototype.Nt=function(t,e){var n=this.cursor(this.options(t,e)),r=[];return this.xt(n,(function(t,e){r.push(e)})).next((function(){return r}))},t.prototype.Ft=function(t,e){f("SimpleDb","DELETE ALL",this.store.name);var n=this.options(t,e);n.kt=!1;var r=this.cursor(n);return this.xt(r,(function(t,e,n){return n.delete()}))},t.prototype.Ot=function(t,e){var n;e?n=t:(n={},e=t);var r=this.cursor(n);return this.xt(r,e)},t.prototype.$t=function(t){var e=this.cursor({});return new nr((function(n,r){e.onerror=function(t){var e=hr(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.xt=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.isDone?r():null===o.Dt?i.continue():i.continue(o.Dt)}else r()}})).next((function(){return nr.waitFor(n)}))},t.prototype.options=function(t,e){var n;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.kt?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=hr(t.target.error);n(e)}}))}var lr=!1;function hr(t){var e=ir._t(Object(r.r)());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 i=new c("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 i}),0)),i}}return t}var fr=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).Mt=e,r.currentSequenceNumber=n,r}return Object(a.c)(e,t),e}(tr);function dr(t,e){var n=y(t);return ir.It(n.Mt,e)}var pr=function(){function t(t,e,n,r){this.batchId=t,this.localWriteTime=e,this.baseMutations=n,this.mutations=r}return t.prototype.applyToRemoteDocument=function(t,e){for(var n=e.mutationResults,r=0;r=r),o=Tr(n.R,e)),i.done()})).next((function(){return o}))},t.prototype.getHighestUnacknowledgedBatchId=function(t){var e=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return qr(t).Ot({index:Un.userMutationsIndex,range:e,reverse:!0},(function(t,e,r){n=e.batchId,r.done()})).next((function(){return n}))},t.prototype.getAllMutationBatches=function(t){var e=this,n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return qr(t).Nt(Un.userMutationsIndex,n).next((function(t){return t.map((function(t){return Tr(e.R,t)}))}))},t.prototype.getAllMutationBatchesAffectingDocumentKey=function(t,e){var n=this,r=Vn.prefixForPath(this.userId,e.path),i=IDBKeyRange.lowerBound(r),o=[];return Br(t).Ot({range:i},(function(r,i,a){var s=r[0],u=r[1],c=r[2],l=Rn(u);if(s===n.userId&&e.path.isEqual(l))return qr(t).get(c).next((function(t){if(!t)throw g();m(t.userId===n.userId),o.push(Tr(n.R,t))}));a.done()})).next((function(){return o}))},t.prototype.getAllMutationBatchesAffectingDocumentKeys=function(t,e){var n=this,r=new Pe(w),i=[];return e.forEach((function(e){var o=Vn.prefixForPath(n.userId,e.path),a=IDBKeyRange.lowerBound(o),s=Br(t).Ot({range:a},(function(t,i,o){var a=t[0],s=t[1],u=t[2],c=Rn(s);a===n.userId&&e.path.isEqual(c)?r=r.add(u):o.done()}));i.push(s)})),nr.waitFor(i).next((function(){return n.Wt(t,r)}))},t.prototype.getAllMutationBatchesAffectingQuery=function(t,e){var n=this,r=e.path,i=r.length+1,o=Vn.prefixForPath(this.userId,r),a=IDBKeyRange.lowerBound(o),s=new Pe(w);return Br(t).Ot({range:a},(function(t,e,o){var a=t[0],u=t[1],c=t[2],l=Rn(u);a===n.userId&&r.isPrefixOf(l)?l.length===i&&(s=s.add(c)):o.done()})).next((function(){return n.Wt(t,s)}))},t.prototype.Wt=function(t,e){var n=this,r=[],i=[];return e.forEach((function(e){i.push(qr(t).get(e).next((function(t){if(null===t)throw g();m(t.userId===n.userId),r.push(Tr(n.R,t))})))})),nr.waitFor(i).next((function(){return r}))},t.prototype.removeMutationBatch=function(t,e){var n=this;return Lr(t.Mt,this.userId,e).next((function(r){return t.addOnCommittedListener((function(){n.Gt(e.batchId)})),nr.forEach(r,(function(e){return n.referenceDelegate.markPotentiallyOrphaned(t,e)}))}))},t.prototype.Gt=function(t){delete this.Qt[t]},t.prototype.performConsistencyCheck=function(t){var e=this;return this.checkEmpty(t).next((function(n){if(!n)return nr.resolve();var r=IDBKeyRange.lowerBound(Vn.prefixForUser(e.userId)),i=[];return Br(t).Ot({range:r},(function(t,n,r){if(t[0]===e.userId){var o=Rn(t[1]);i.push(o)}else r.done()})).next((function(){m(0===i.length)}))}))},t.prototype.containsKey=function(t,e){return Vr(t,this.userId,e)},t.prototype.zt=function(t){var e=this;return zr(t).get(this.userId).next((function(t){return t||new Fn(e.userId,-1,"")}))},t}();function Vr(t,e,n){var r=Vn.prefixForPath(e,n.path),i=r[1],o=IDBKeyRange.lowerBound(r),a=!1;return Br(t).Ot({range:o,kt:!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 qr(t){return dr(t,Un.store)}function Br(t){return dr(t,Vn.store)}function zr(t){return dr(t,Fn.store)}var Wr=function(){function t(t){this.Ht=t}return t.prototype.next=function(){return this.Ht+=2,this.Ht},t.Jt=function(){return new t(0)},t.Yt=function(){return new t(-1)},t}(),Hr=function(){function t(t,e){this.referenceDelegate=t,this.R=e}return t.prototype.allocateTargetId=function(t){var e=this;return this.Xt(t).next((function(n){var r=new Wr(n.highestTargetId);return n.highestTargetId=r.next(),e.Zt(t,n).next((function(){return n.highestTargetId}))}))},t.prototype.getLastRemoteSnapshotVersion=function(t){return this.Xt(t).next((function(t){return I.fromTimestamp(new T(t.lastRemoteSnapshotVersion.seconds,t.lastRemoteSnapshotVersion.nanoseconds))}))},t.prototype.getHighestSequenceNumber=function(t){return this.Xt(t).next((function(t){return t.highestListenSequenceNumber}))},t.prototype.setTargetsMetadata=function(t,e,n){var r=this;return this.Xt(t).next((function(i){return i.highestListenSequenceNumber=e,n&&(i.lastRemoteSnapshotVersion=n.toTimestamp()),e>i.highestListenSequenceNumber&&(i.highestListenSequenceNumber=e),r.Zt(t,i)}))},t.prototype.addTargetData=function(t,e){var n=this;return this.te(t,e).next((function(){return n.Xt(t).next((function(r){return r.targetCount+=1,n.ee(e,r),n.Zt(t,r)}))}))},t.prototype.updateTargetData=function(t,e){return this.te(t,e)},t.prototype.removeTargetData=function(t,e){var n=this;return this.removeMatchingKeysForTargetId(t,e.targetId).next((function(){return Kr(t).delete(e.targetId)})).next((function(){return n.Xt(t)})).next((function(e){return m(e.targetCount>0),e.targetCount-=1,n.Zt(t,e)}))},t.prototype.removeTargets=function(t,e,n){var r=this,i=0,o=[];return Kr(t).Ot((function(a,s){var u=Ir(s);u.sequenceNumber<=e&&null===n.get(u.targetId)&&(i++,o.push(r.removeTargetData(t,u)))})).next((function(){return nr.waitFor(o)})).next((function(){return i}))},t.prototype.forEachTarget=function(t,e){return Kr(t).Ot((function(t,n){var r=Ir(n);e(r)}))},t.prototype.Xt=function(t){return Yr(t).get(Yn.key).next((function(t){return m(null!==t),t}))},t.prototype.Zt=function(t,e){return Yr(t).put(Yn.key,e)},t.prototype.te=function(t,e){return Kr(t).put(xr(this.R,e))},t.prototype.ee=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.getTargetCount=function(t){return this.Xt(t).next((function(t){return t.targetCount}))},t.prototype.getTargetData=function(t,e){var n=lt(e),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]),i=null;return Kr(t).Ot({range:r,index:Hn.queryTargetsIndexName},(function(t,n,r){var o=Ir(n);ht(e,o.target)&&(i=o,r.done())})).next((function(){return i}))},t.prototype.addMatchingKeys=function(t,e,n){var r=this,i=[],o=Gr(t);return e.forEach((function(e){var a=An(e.path);i.push(o.put(new Kn(n,a))),i.push(r.referenceDelegate.addReference(t,n,e))})),nr.waitFor(i)},t.prototype.removeMatchingKeys=function(t,e,n){var r=this,i=Gr(t);return nr.forEach(e,(function(e){var o=An(e.path);return nr.waitFor([i.delete([n,o]),r.referenceDelegate.removeReference(t,n,e)])}))},t.prototype.removeMatchingKeysForTargetId=function(t,e){var n=Gr(t),r=IDBKeyRange.bound([e],[e+1],!1,!0);return n.delete(r)},t.prototype.getMatchingKeysForTargetId=function(t,e){var n=IDBKeyRange.bound([e],[e+1],!1,!0),r=Gr(t),i=Ve();return r.Ot({range:n,kt:!0},(function(t,e,n){var r=Rn(t[1]),o=new H(r);i=i.add(o)})).next((function(){return i}))},t.prototype.containsKey=function(t,e){var n=An(e.path),r=IDBKeyRange.bound([n],[S(n)],!1,!0),i=0;return Gr(t).Ot({index:Kn.documentTargetsIndex,kt:!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.lt=function(t,e){return Kr(t).get(e).next((function(t){return t?Ir(t):null}))},t}();function Kr(t){return dr(t,Hn.store)}function Yr(t){return dr(t,Yn.store)}function Gr(t){return dr(t,Kn.store)}function Qr(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){if(t.code!==u.FAILED_PRECONDITION||t.message!==Zn)throw t;return f("LocalStore","Unexpectedly lost primary lease"),[2]}))}))}function $r(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=w(n,i);return 0===a?w(r,o):a}var Xr=function(){function t(t){this.ne=t,this.buffer=new Pe($r),this.se=0}return t.prototype.ie=function(){return++this.se},t.prototype.re=function(t){var e=[t,this.ie()];if(this.buffer.sizel.params.maximumSequenceNumbersToCollect?(f("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+l.params.maximumSequenceNumbersToCollect+" from "+e),r=l.params.maximumSequenceNumbersToCollect):r=e,a=Date.now(),l.nthSequenceNumber(t,r)})).next((function(r){return n=r,s=Date.now(),l.removeTargets(t,n,e)})).next((function(e){return o=e,u=Date.now(),l.removeOrphanedDocuments(t,n)})).next((function(t){return c=Date.now(),h()<=i.a.DEBUG&&f("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in "+(a-d)+"ms\n\tDetermined least recently used "+r+" in "+(s-a)+"ms\n\tRemoved "+o+" targets in "+(u-s)+"ms\n\tRemoved "+t+" documents in "+(c-u)+"ms\nTotal Duration: "+(c-d)+"ms"),nr.resolve({didRun:!0,sequenceNumbersCollected:r,targetsRemoved:o,documentsRemoved:t})}))},t}(),ti=function(){function t(t,e){this.db=t,this.garbageCollector=function(t,e){return new Zr(t,e)}(this,e)}return t.prototype.he=function(t){var e=this.de(t);return this.db.getTargetCache().getTargetCount(t).next((function(t){return e.next((function(e){return t+e}))}))},t.prototype.de=function(t){var e=0;return this.le(t,(function(t){e++})).next((function(){return e}))},t.prototype.forEachTarget=function(t,e){return this.db.getTargetCache().forEachTarget(t,e)},t.prototype.le=function(t,e){return this.we(t,(function(t,n){return e(n)}))},t.prototype.addReference=function(t,e,n){return ei(t,n)},t.prototype.removeReference=function(t,e,n){return ei(t,n)},t.prototype.removeTargets=function(t,e,n){return this.db.getTargetCache().removeTargets(t,e,n)},t.prototype.markPotentiallyOrphaned=function(t,e){return ei(t,e)},t.prototype._e=function(t,e){return function(t,e){var n=!1;return zr(t).$t((function(r){return Vr(t,r,e).next((function(t){return t&&(n=!0),nr.resolve(!t)}))})).next((function(){return n}))}(t,e)},t.prototype.removeOrphanedDocuments=function(t,e){var n=this,r=this.db.getRemoteDocumentCache().newChangeBuffer(),i=[],o=0;return this.we(t,(function(a,s){if(s<=e){var u=n._e(t,a).next((function(e){if(!e)return o++,r.getEntry(t,a).next((function(){return r.removeEntry(a),Gr(t).delete([0,An(a.path)])}))}));i.push(u)}})).next((function(){return nr.waitFor(i)})).next((function(){return r.apply(t)})).next((function(){return o}))},t.prototype.removeTarget=function(t,e){var n=e.withSequenceNumber(t.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(t,n)},t.prototype.updateLimboDocument=function(t,e){return ei(t,e)},t.prototype.we=function(t,e){var n,r=Gr(t),i=s.o;return r.Ot({index:Kn.documentTargetsIndex},(function(t,r){var o=t[0],a=(t[1],r.path),u=r.sequenceNumber;0===o?(i!==s.o&&e(new H(Rn(n)),i),i=u,n=a):i=s.o})).next((function(){i!==s.o&&e(new H(Rn(n)),i)}))},t.prototype.getCacheSize=function(t){return this.db.getRemoteDocumentCache().getSize(t)},t}();function ei(t,e){return Gr(t).put(function(t,e){return new Kn(0,An(t.path),e)}(e,t.currentSequenceNumber))}var ni=function(){function t(t,e){this.mapKeyFn=t,this.equalsFn=e,this.inner={}}return t.prototype.get=function(t){var e=this.mapKeyFn(t),n=this.inner[e];if(void 0!==n)for(var r=0,i=n;r=0&&r<=11);var o=new rr("createOrUpgrade",e);n<1&&r>=1&&(function(t){t.createObjectStore(Ln.store)}(t),function(t){t.createObjectStore(Fn.store,{keyPath:Fn.keyPath}),t.createObjectStore(Un.store,{keyPath:Un.keyPath,autoIncrement:!0}).createIndex(Un.userMutationsIndex,Un.userMutationsKeyPath,{unique:!0}),t.createObjectStore(Vn.store)}(t),li(t),function(t){t.createObjectStore(zn.store)}(t));var a=nr.resolve();return n<3&&r>=3&&(0!==n&&(function(t){t.deleteObjectStore(Kn.store),t.deleteObjectStore(Hn.store),t.deleteObjectStore(Yn.store)}(t),li(t)),a=a.next((function(){return function(t){var e=t.store(Yn.store),n=new Yn(0,0,I.min().toTimestamp(),0);return e.put(Yn.key,n)}(o)}))),n<4&&r>=4&&(0!==n&&(a=a.next((function(){return function(t,e){return e.store(Un.store).Nt().next((function(n){t.deleteObjectStore(Un.store),t.createObjectStore(Un.store,{keyPath:Un.keyPath,autoIncrement:!0}).createIndex(Un.userMutationsIndex,Un.userMutationsKeyPath,{unique:!0});var r=e.store(Un.store),i=n.map((function(t){return r.put(t)}));return nr.waitFor(i)}))}(t,o)}))),a=a.next((function(){!function(t){t.createObjectStore(Qn.store,{keyPath:Qn.keyPath})}(t)}))),n<5&&r>=5&&(a=a.next((function(){return i.Re(o)}))),n<6&&r>=6&&(a=a.next((function(){return function(t){t.createObjectStore(Wn.store)}(t),i.be(o)}))),n<7&&r>=7&&(a=a.next((function(){return i.ve(o)}))),n<8&&r>=8&&(a=a.next((function(){return i.Pe(t,o)}))),n<9&&r>=9&&(a=a.next((function(){!function(t){t.objectStoreNames.contains("remoteDocumentChanges")&&t.deleteObjectStore("remoteDocumentChanges")}(t),function(t){var e=t.objectStore(zn.store);e.createIndex(zn.readTimeIndex,zn.readTimeIndexPath,{unique:!1}),e.createIndex(zn.collectionReadTimeIndex,zn.collectionReadTimeIndexPath,{unique:!1})}(e)}))),n<10&&r>=10&&(a=a.next((function(){return i.Ve(o)}))),n<11&&r>=11&&(a=a.next((function(){!function(t){t.createObjectStore($n.store,{keyPath:$n.keyPath})}(t),function(t){t.createObjectStore(Xn.store,{keyPath:Xn.keyPath})}(t)}))),a},t.prototype.be=function(t){var e=0;return t.store(zn.store).Ot((function(t,n){e+=Fr(n)})).next((function(){var n=new Wn(e);return t.store(Wn.store).put(Wn.key,n)}))},t.prototype.Re=function(t){var e=this,n=t.store(Fn.store),r=t.store(Un.store);return n.Nt().next((function(n){return nr.forEach(n,(function(n){var i=IDBKeyRange.bound([n.userId,-1],[n.userId,n.lastAcknowledgedBatchId]);return r.Nt(Un.userMutationsIndex,i).next((function(r){return nr.forEach(r,(function(r){m(r.userId===n.userId);var i=Tr(e.R,r);return Lr(t,n.userId,i).next((function(){}))}))}))}))}))},t.prototype.ve=function(t){var e=t.store(Kn.store),n=t.store(zn.store);return t.store(Yn.store).get(Yn.key).next((function(t){var r=[];return n.Ot((function(n,i){var o=new N(n),a=function(t){return[0,An(t)]}(o);r.push(e.get(a).next((function(n){return n?nr.resolve():function(n){return e.put(new Kn(0,An(n),t.highestListenSequenceNumber))}(o)})))})).next((function(){return nr.waitFor(r)}))}))},t.prototype.Pe=function(t,e){t.createObjectStore(Gn.store,{keyPath:Gn.keyPath});var n=e.store(Gn.store),r=new Ar,i=function(t){if(r.add(t)){var e=t.lastSegment(),i=t.popLast();return n.put({collectionId:e,parent:An(i)})}};return e.store(zn.store).Ot({kt:!0},(function(t,e){var n=new N(t);return i(n.popLast())})).next((function(){return e.store(Vn.store).Ot({kt:!0},(function(t,e){t[0];var n=t[1],r=(t[2],Rn(n));return i(r.popLast())}))}))},t.prototype.Ve=function(t){var e=this,n=t.store(Hn.store);return n.Ot((function(t,r){var i=Ir(r),o=xr(e.R,i);return n.put(o)}))},t}();function li(t){t.createObjectStore(Kn.store,{keyPath:Kn.keyPath}).createIndex(Kn.documentTargetsIndex,Kn.documentTargetsKeyPath,{unique:!0}),t.createObjectStore(Hn.store,{keyPath:Hn.keyPath}).createIndex(Hn.queryTargetsIndexName,Hn.queryTargetsKeyPath,{unique:!0}),t.createObjectStore(Yn.store)}var hi="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.",fi=function(){function t(e,n,r,i,o,a,s,l,h,f){if(this.allowTabSynchronization=e,this.persistenceKey=n,this.clientId=r,this.Se=o,this.window=a,this.document=s,this.De=h,this.Ce=f,this.Ne=null,this.xe=!1,this.isPrimary=!1,this.networkEnabled=!0,this.Fe=null,this.inForeground=!1,this.ke=null,this.Oe=null,this.$e=Number.NEGATIVE_INFINITY,this.Me=function(t){return Promise.resolve()},!t.yt())throw new c(u.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new ti(this,i),this.Le=n+"main",this.R=new mr(l),this.Be=new ir(this.Le,11,new ci(this.R)),this.qe=new Hr(this.referenceDelegate,this.R),this.Ut=new Dr,this.Ue=function(t,e){return new ii(t,e)}(this.R,this.Ut),this.Qe=new Er,this.window&&this.window.localStorage?this.Ke=this.window.localStorage:(this.Ke=null,!1===f&&d("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.je().then((function(){if(!t.isPrimary&&!t.allowTabSynchronization)throw new c(u.FAILED_PRECONDITION,hi);return t.We(),t.Ge(),t.ze(),t.runTransaction("getHighestListenSequenceNumber","readonly",(function(e){return t.qe.getHighestSequenceNumber(e)}))})).then((function(e){t.Ne=new s(e,t.De)})).then((function(){t.xe=!0})).catch((function(e){return t.Be&&t.Be.close(),Promise.reject(e)}))},t.prototype.He=function(t){var e=this;return this.Me=function(n){return Object(a.b)(e,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return this.started?[2,t(n)]:[2]}))}))},t(this.isPrimary)},t.prototype.setDatabaseDeletedListener=function(t){var e=this;this.Be.vt((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]}}))}))}))},t.prototype.setNetworkEnabled=function(t){var e=this;this.networkEnabled!==t&&(this.networkEnabled=t,this.Se.enqueueAndForget((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.started?[4,this.je()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))})))},t.prototype.je=function(){var t=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(function(e){return pi(e).put(new Qn(t.clientId,Date.now(),t.networkEnabled,t.inForeground)).next((function(){if(t.isPrimary)return t.Je(e).next((function(e){e||(t.isPrimary=!1,t.Se.enqueueRetryable((function(){return t.Me(!1)})))}))})).next((function(){return t.Ye(e)})).next((function(n){return t.isPrimary&&!n?t.Xe(e).next((function(){return!1})):!!n&&t.Ze(e).next((function(){return!0}))}))})).catch((function(e){if(sr(e))return f("IndexedDbPersistence","Failed to extend owner lease: ",e),t.isPrimary;if(!t.allowTabSynchronization)throw e;return f("IndexedDbPersistence","Releasing owner lease after error during lease refresh",e),!1})).then((function(e){t.isPrimary!==e&&t.Se.enqueueRetryable((function(){return t.Me(e)})),t.isPrimary=e}))},t.prototype.Je=function(t){var e=this;return di(t).get(Ln.key).next((function(t){return nr.resolve(e.tn(t))}))},t.prototype.en=function(t){return pi(t).delete(this.clientId)},t.prototype.nn=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.sn(this.$e,18e5)?[3,2]:(this.$e=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(function(t){var e=dr(t,Qn.store);return e.Nt().next((function(t){var n=i.rn(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.Ke)for(e=0,n=t;en&&(d("Detected an update time that is in the future: "+t+" > "+n),1))},t.prototype.We=function(){var t=this;null!==this.document&&"function"==typeof this.document.addEventListener&&(this.ke=function(){t.Se.enqueueAndForget((function(){return t.inForeground="visible"===t.document.visibilityState,t.je()}))},this.document.addEventListener("visibilitychange",this.ke),this.inForeground="visible"===this.document.visibilityState)},t.prototype.an=function(){this.ke&&(this.document.removeEventListener("visibilitychange",this.ke),this.ke=null)},t.prototype.Ge=function(){var t,e=this;"function"==typeof(null===(t=this.window)||void 0===t?void 0:t.addEventListener)&&(this.Fe=function(){e.un(),e.Se.enqueueAndForget((function(){return e.shutdown()}))},this.window.addEventListener("unload",this.Fe))},t.prototype.hn=function(){this.Fe&&(this.window.removeEventListener("unload",this.Fe),this.Fe=null)},t.prototype.cn=function(t){var e;try{var n=null!==(null===(e=this.Ke)||void 0===e?void 0:e.getItem(this.on(t)));return f("IndexedDbPersistence","Client '"+t+"' "+(n?"is":"is not")+" zombied in LocalStorage"),n}catch(t){return d("IndexedDbPersistence","Failed to get zombied client id.",t),!1}},t.prototype.un=function(){if(this.Ke)try{this.Ke.setItem(this.on(this.clientId),String(Date.now()))}catch(t){d("Failed to set zombie client id.",t)}},t.prototype.ln=function(){if(this.Ke)try{this.Ke.removeItem(this.on(this.clientId))}catch(t){}},t.prototype.on=function(t){return"firestore_zombie_"+this.persistenceKey+"_"+t},t}();function di(t){return dr(t,Ln.store)}function pi(t){return dr(t,Qn.store)}function vi(t,e){var n=t.projectId;return t.isDefaultDatabase||(n+="."+t.database),"firestore/"+e+"/"+n+"/"}var gi=function(t,e){this.progress=t,this.wn=e},mi=function(){function t(t,e,n){this.Ue=t,this._n=e,this.Ut=n}return t.prototype.mn=function(t,e){var n=this;return this._n.getAllMutationBatchesAffectingDocumentKey(t,e).next((function(r){return n.yn(t,e,r)}))},t.prototype.yn=function(t,e,n){return this.Ue.getEntry(t,e).next((function(t){for(var e=0,r=n;e0)},t.prototype.Dn=function(t,e){return h()<=i.a.DEBUG&&f("QueryEngine","Using full collection scan to execute query:",qt(e)),this.Sn.getDocumentsMatchingQuery(t,e,I.min())},t}(),_i=function(){function t(t,e,n,r){this.persistence=t,this.xn=e,this.R=r,this.Fn=new Ee(w),this.kn=new ni((function(t){return lt(t)}),ht),this.On=I.min(),this._n=t.getMutationQueue(n),this.$n=t.getRemoteDocumentCache(),this.qe=t.getTargetCache(),this.Mn=new mi(this.$n,this._n,this.persistence.getIndexManager()),this.Qe=t.getBundleCache(),this.xn.Vn(this.Mn)}return t.prototype.collectGarbage=function(t){var e=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return t.collect(n,e.Fn)}))},t}();function wi(t,e,n,r){return new _i(t,e,n,r)}function ki(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=y(t),r=n._n,i=n.Mn,[4,n.persistence.runTransaction("Handle user change","readonly",(function(t){var o;return n._n.getAllMutationBatches(t).next((function(a){return o=a,r=n.persistence.getMutationQueue(e),i=new mi(n.$n,r,n.persistence.getIndexManager()),r.getAllMutationBatches(t)})).next((function(e){for(var n=[],r=[],a=Ve(),s=0,u=o;s0){var c=s.withResumeToken(u,r).withSequenceNumber(t.currentSequenceNumber);i=i.insert(o,c),function(t,e,n){return m(e.resumeToken.approximateByteSize()>0),0===t.resumeToken.approximateByteSize()||e.snapshotVersion.toMicroseconds()-t.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0}(s,c,e)&&a.push(n.qe.updateTargetData(t,c))}}}));var s=Me();if(e.documentUpdates.forEach((function(r,i){e.resolvedLimboDocuments.has(r)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(t,r))})),a.push(xi(t,o,e.documentUpdates,r,void 0).next((function(t){s=t}))),!r.isEqual(I.min())){var u=n.qe.getLastRemoteSnapshotVersion(t).next((function(e){return n.qe.setTargetsMetadata(t,t.currentSequenceNumber,r)}));a.push(u)}return nr.waitFor(a).next((function(){return o.apply(t)})).next((function(){return n.Mn.En(t,s)})).next((function(){return s}))})).then((function(t){return n.Fn=i,t}))}function xi(t,e,n,r,i){var o=Ve();return n.forEach((function(t){return o=o.add(t)})),e.getEntries(t,o).next((function(t){var o=Me();return n.forEach((function(n,a){var s=t.get(n),u=(null==i?void 0:i.get(n))||r;a.isNoDocument()&&a.version.isEqual(I.min())?(e.removeEntry(n,u),o=o.insert(n,a)):!s.isValidDocument()||a.version.compareTo(s.version)>0||0===a.version.compareTo(s.version)&&s.hasPendingWrites?(e.addEntry(a,u),o=o.insert(n,a)):f("LocalStore","Ignoring outdated watch update for ",n,". Current version:",s.version," Watch version:",a.version)})),o}))}function Oi(t,e){var n=y(t);return n.persistence.runTransaction("Get next mutation batch","readonly",(function(t){return void 0===e&&(e=-1),n._n.getNextMutationBatchAfterBatchId(t,e)}))}function Ei(t,e){var n=y(t);return n.persistence.runTransaction("Allocate target","readwrite",(function(t){var r;return n.qe.getTargetData(t,e).next((function(i){return i?(r=i,nr.resolve(r)):n.qe.allocateTargetId(t).next((function(i){return r=new gr(e,i,0,t.currentSequenceNumber),n.qe.addTargetData(t,r).next((function(){return r}))}))}))})).then((function(t){var r=n.Fn.get(t.targetId);return(null===r||t.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.Fn=n.Fn.insert(t.targetId,t),n.kn.set(e,t.targetId)),t}))}function Ci(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=y(t),i=r.Fn.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.referenceDelegate.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 f("LocalStore","Failed to update sequence numbers for target "+e+": "+s),[3,5];case 5:return r.Fn=r.Fn.remove(e),r.kn.delete(i.target),[2]}}))}))}function Ni(t,e,n){var r=y(t),i=I.min(),o=Ve();return r.persistence.runTransaction("Execute query","readonly",(function(t){return function(t,e,n){var r=y(t),i=r.kn.get(n);return void 0!==i?nr.resolve(r.Fn.get(i)):r.qe.getTargetData(e,n)}(r,t,Lt(e)).next((function(e){if(e)return i=e.lastLimboFreeSnapshotVersion,r.qe.getMatchingKeysForTargetId(t,e.targetId).next((function(t){o=t}))})).next((function(){return r.xn.getDocumentsMatchingQuery(t,e,n?i:I.min(),n?o:Ve())})).next((function(t){return{documents:t,Bn:o}}))}))}function Pi(t,e){var n=y(t),r=y(n.qe),i=n.Fn.get(e);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",(function(t){return r.lt(t,e).next((function(t){return t?t.target:null}))}))}function Ai(t){var e=y(t);return e.persistence.runTransaction("Get new document changes","readonly",(function(t){return function(t,e,n){var r=y(t),i=Me(),o=_r(n),a=si(e),s=IDBKeyRange.lowerBound(o,!0);return a.Ot({index:zn.readTimeIndex,range:s},(function(t,e){var n=yr(r.R,e);i=i.insert(n.key,n),o=e.readTime})).next((function(){return{wn:i,readTime:wr(o)}}))}(e.$n,t,e.On)})).then((function(t){var n=t.wn,r=t.readTime;return e.On=r,n}))}function Di(t){return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.d)(this,(function(n){return[2,(e=y(t)).persistence.runTransaction("Synchronize last document change read time","readonly",(function(t){return function(t){var e=si(t),n=I.min();return e.Ot({index:zn.readTimeIndex,reverse:!0},(function(t,e,r){e.readTime&&(n=wr(e.readTime)),r.done()})).next((function(){return n}))}(t)})).then((function(t){e.On=t}))]}))}))}function Mi(t,e,n,r){return Object(a.b)(this,void 0,void 0,(function(){var i,o,s,u,c,l,h,f,d,p;return Object(a.d)(this,(function(a){switch(a.label){case 0:for(i=y(t),o=Ve(),s=Me(),u=Fe(),c=0,l=n;c=0)return i.Qe.saveNamedQuery(t,e);var a=r.withResumeToken(M.EMPTY_BYTE_STRING,o);return i.Fn=i.Fn.insert(a.targetId,a),i.qe.updateTargetData(t,a).next((function(){return i.qe.removeMatchingKeysForTargetId(t,r.targetId)})).next((function(){return i.qe.addMatchingKeys(t,n,r.targetId)})).next((function(){return i.Qe.saveNamedQuery(t,e)}))}))]}}))}))}var ji=function(){function t(t){this.R=t,this.Kn=new Map,this.jn=new Map}return t.prototype.getBundleMetadata=function(t,e){return nr.resolve(this.Kn.get(e))},t.prototype.saveBundleMetadata=function(t,e){var n;return this.Kn.set(e.id,{id:(n=e).id,version:n.version,createTime:on(n.createTime)}),nr.resolve()},t.prototype.getNamedQuery=function(t,e){return nr.resolve(this.jn.get(e))},t.prototype.saveNamedQuery=function(t,e){return this.jn.set(e.name,function(t){return{name:t.name,query:Or(t.bundledQuery),readTime:on(t.readTime)}}(e)),nr.resolve()},t}(),Li=function(){function t(){this.Wn=new Pe(Fi.Gn),this.zn=new Pe(Fi.Hn)}return t.prototype.isEmpty=function(){return this.Wn.isEmpty()},t.prototype.addReference=function(t,e){var n=new Fi(t,e);this.Wn=this.Wn.add(n),this.zn=this.zn.add(n)},t.prototype.Jn=function(t,e){var n=this;t.forEach((function(t){return n.addReference(t,e)}))},t.prototype.removeReference=function(t,e){this.Yn(new Fi(t,e))},t.prototype.Xn=function(t,e){var n=this;t.forEach((function(t){return n.removeReference(t,e)}))},t.prototype.Zn=function(t){var e=this,n=new H(new N([])),r=new Fi(n,t),i=new Fi(n,t+1),o=[];return this.zn.forEachInRange([r,i],(function(t){e.Yn(t),o.push(t.key)})),o},t.prototype.ts=function(){var t=this;this.Wn.forEach((function(e){return t.Yn(e)}))},t.prototype.Yn=function(t){this.Wn=this.Wn.delete(t),this.zn=this.zn.delete(t)},t.prototype.es=function(t){var e=new H(new N([])),n=new Fi(e,t),r=new Fi(e,t+1),i=Ve();return this.zn.forEachInRange([n,r],(function(t){i=i.add(t.key)})),i},t.prototype.containsKey=function(t){var e=new Fi(t,0),n=this.Wn.firstAfterOrEqual(e);return null!==n&&t.isEqual(n.key)},t}(),Fi=function(){function t(t,e){this.key=t,this.ns=e}return t.Gn=function(t,e){return H.comparator(t.key,e.key)||w(t.ns,e.ns)},t.Hn=function(t,e){return w(t.ns,e.ns)||H.comparator(t.key,e.key)},t}(),Ui=function(){function t(t,e){this.Ut=t,this.referenceDelegate=e,this._n=[],this.ss=1,this.rs=new Pe(Fi.Gn)}return t.prototype.checkEmpty=function(t){return nr.resolve(0===this._n.length)},t.prototype.addMutationBatch=function(t,e,n,r){var i=this.ss;this.ss++,this._n.length>0&&this._n[this._n.length-1];var o=new pr(i,e,n,r);this._n.push(o);for(var a=0,s=r;ai?this._n[i]:null)},t.prototype.getHighestUnacknowledgedBatchId=function(){return nr.resolve(0===this._n.length?-1:this.ss-1)},t.prototype.getAllMutationBatches=function(t){return nr.resolve(this._n.slice())},t.prototype.getAllMutationBatchesAffectingDocumentKey=function(t,e){var n=this,r=new Fi(e,0),i=new Fi(e,Number.POSITIVE_INFINITY),o=[];return this.rs.forEachInRange([r,i],(function(t){var e=n.os(t.ns);o.push(e)})),nr.resolve(o)},t.prototype.getAllMutationBatchesAffectingDocumentKeys=function(t,e){var n=this,r=new Pe(w);return e.forEach((function(t){var e=new Fi(t,0),i=new Fi(t,Number.POSITIVE_INFINITY);n.rs.forEachInRange([e,i],(function(t){r=r.add(t.ns)}))})),nr.resolve(this.us(r))},t.prototype.getAllMutationBatchesAffectingQuery=function(t,e){var n=e.path,r=n.length+1,i=n;H.isDocumentKey(i)||(i=i.child(""));var o=new Fi(new H(i),0),a=new Pe(w);return this.rs.forEachWhile((function(t){var e=t.key.path;return!!n.isPrefixOf(e)&&(e.length===r&&(a=a.add(t.ns)),!0)}),o),nr.resolve(this.us(a))},t.prototype.us=function(t){var e=this,n=[];return t.forEach((function(t){var r=e.os(t);null!==r&&n.push(r)})),n},t.prototype.removeMutationBatch=function(t,e){var n=this;m(0===this.hs(e.batchId,"removed")),this._n.shift();var r=this.rs;return nr.forEach(e.mutations,(function(i){var o=new Fi(i.key,e.batchId);return r=r.delete(o),n.referenceDelegate.markPotentiallyOrphaned(t,i.key)})).next((function(){n.rs=r}))},t.prototype.Gt=function(t){},t.prototype.containsKey=function(t,e){var n=new Fi(e,0),r=this.rs.firstAfterOrEqual(n);return nr.resolve(e.isEqual(r&&r.key))},t.prototype.performConsistencyCheck=function(t){return this._n.length,nr.resolve()},t.prototype.hs=function(t,e){return this.cs(t)},t.prototype.cs=function(t){return 0===this._n.length?0:t-this._n[0].batchId},t.prototype.os=function(t){var e=this.cs(t);return e<0||e>=this._n.length?null:this._n[e]},t}(),Vi=function(){function t(t,e){this.Ut=t,this.ls=e,this.docs=new Ee(H.comparator),this.size=0}return t.prototype.addEntry=function(t,e,n){var r=e.key,i=this.docs.get(r),o=i?i.size:0,a=this.ls(e);return this.docs=this.docs.insert(r,{document:e.clone(),size:a,readTime:n}),this.size+=a-o,this.Ut.addToCollectionParentIndex(t,r.path.popLast())},t.prototype.removeEntry=function(t){var e=this.docs.get(t);e&&(this.docs=this.docs.remove(t),this.size-=e.size)},t.prototype.getEntry=function(t,e){var n=this.docs.get(e);return nr.resolve(n?n.document.clone():st.newInvalidDocument(e))},t.prototype.getEntries=function(t,e){var n=this,r=Me();return e.forEach((function(t){var e=n.docs.get(t);r=r.insert(t,e?e.document.clone():st.newInvalidDocument(t))})),nr.resolve(r)},t.prototype.getDocumentsMatchingQuery=function(t,e,n){for(var r=Me(),i=new H(e.path.child("")),o=this.docs.getIteratorFrom(i);o.hasNext();){var a=o.getNext(),s=a.key,u=a.value,c=u.document,l=u.readTime;if(!e.path.isPrefixOf(s.path))break;l.compareTo(n)<=0||Bt(e,c)&&(r=r.insert(c.key,c.clone()))}return nr.resolve(r)},t.prototype.fs=function(t,e){return nr.forEach(this.docs,(function(t){return e(t)}))},t.prototype.newChangeBuffer=function(t){return new qi(this)},t.prototype.getSize=function(t){return nr.resolve(this.size)},t}(),qi=function(t){function e(e){var n=this;return(n=t.call(this)||this).Ie=e,n}return Object(a.c)(e,t),e.prototype.applyChanges=function(t){var e=this,n=[];return this.changes.forEach((function(r,i){i.document.isValidDocument()?n.push(e.Ie.addEntry(t,i.document,e.getReadTime(r))):e.Ie.removeEntry(r)})),nr.waitFor(n)},e.prototype.getFromCache=function(t,e){return this.Ie.getEntry(t,e)},e.prototype.getAllFromCache=function(t,e){return this.Ie.getEntries(t,e)},e}(ri),Bi=function(){function t(t){this.persistence=t,this.ds=new ni((function(t){return lt(t)}),ht),this.lastRemoteSnapshotVersion=I.min(),this.highestTargetId=0,this.ws=0,this._s=new Li,this.targetCount=0,this.ys=Wr.Jt()}return t.prototype.forEachTarget=function(t,e){return this.ds.forEach((function(t,n){return e(n)})),nr.resolve()},t.prototype.getLastRemoteSnapshotVersion=function(t){return nr.resolve(this.lastRemoteSnapshotVersion)},t.prototype.getHighestSequenceNumber=function(t){return nr.resolve(this.ws)},t.prototype.allocateTargetId=function(t){return this.highestTargetId=this.ys.next(),nr.resolve(this.highestTargetId)},t.prototype.setTargetsMetadata=function(t,e,n){return n&&(this.lastRemoteSnapshotVersion=n),e>this.ws&&(this.ws=e),nr.resolve()},t.prototype.te=function(t){this.ds.set(t.target,t);var e=t.targetId;e>this.highestTargetId&&(this.ys=new Wr(e),this.highestTargetId=e),t.sequenceNumber>this.ws&&(this.ws=t.sequenceNumber)},t.prototype.addTargetData=function(t,e){return this.te(e),this.targetCount+=1,nr.resolve()},t.prototype.updateTargetData=function(t,e){return this.te(e),nr.resolve()},t.prototype.removeTargetData=function(t,e){return this.ds.delete(e.target),this._s.Zn(e.targetId),this.targetCount-=1,nr.resolve()},t.prototype.removeTargets=function(t,e,n){var r=this,i=0,o=[];return this.ds.forEach((function(a,s){s.sequenceNumber<=e&&null===n.get(s.targetId)&&(r.ds.delete(a),o.push(r.removeMatchingKeysForTargetId(t,s.targetId)),i++)})),nr.waitFor(o).next((function(){return i}))},t.prototype.getTargetCount=function(t){return nr.resolve(this.targetCount)},t.prototype.getTargetData=function(t,e){var n=this.ds.get(e)||null;return nr.resolve(n)},t.prototype.addMatchingKeys=function(t,e,n){return this._s.Jn(e,n),nr.resolve()},t.prototype.removeMatchingKeys=function(t,e,n){this._s.Xn(e,n);var r=this.persistence.referenceDelegate,i=[];return r&&e.forEach((function(e){i.push(r.markPotentiallyOrphaned(t,e))})),nr.waitFor(i)},t.prototype.removeMatchingKeysForTargetId=function(t,e){return this._s.Zn(e),nr.resolve()},t.prototype.getMatchingKeysForTargetId=function(t,e){var n=this._s.es(e);return nr.resolve(n)},t.prototype.containsKey=function(t,e){return nr.resolve(this._s.containsKey(e))},t}(),zi=function(){function t(t,e){var n=this;this.gs={},this.Ne=new s(0),this.xe=!1,this.xe=!0,this.referenceDelegate=t(this),this.qe=new Bi(this),this.Ut=new Pr,this.Ue=function(t,e){return new Vi(t,(function(t){return n.referenceDelegate.ps(t)}))}(this.Ut),this.R=new mr(e),this.Qe=new ji(this.R)}return t.prototype.start=function(){return Promise.resolve()},t.prototype.shutdown=function(){return this.xe=!1,Promise.resolve()},Object.defineProperty(t.prototype,"started",{get:function(){return this.xe},enumerable:!1,configurable:!0}),t.prototype.setDatabaseDeletedListener=function(){},t.prototype.setNetworkEnabled=function(){},t.prototype.getIndexManager=function(){return this.Ut},t.prototype.getMutationQueue=function(t){var e=this.gs[t.toKey()];return e||(e=new Ui(this.Ut,this.referenceDelegate),this.gs[t.toKey()]=e),e},t.prototype.getTargetCache=function(){return this.qe},t.prototype.getRemoteDocumentCache=function(){return this.Ue},t.prototype.getBundleCache=function(){return this.Qe},t.prototype.runTransaction=function(t,e,n){var r=this;f("MemoryPersistence","Starting transaction:",t);var i=new Wi(this.Ne.next());return this.referenceDelegate.Es(),n(i).next((function(t){return r.referenceDelegate.Ts(i).next((function(){return t}))})).toPromise().then((function(t){return i.raiseOnCommittedEvent(),t}))},t.prototype.Is=function(t,e){return nr.or(Object.values(this.gs).map((function(n){return function(){return n.containsKey(t,e)}})))},t}(),Wi=function(t){function e(e){var n=this;return(n=t.call(this)||this).currentSequenceNumber=e,n}return Object(a.c)(e,t),e}(tr),Hi=function(){function t(t){this.persistence=t,this.As=new Li,this.Rs=null}return t.bs=function(e){return new t(e)},Object.defineProperty(t.prototype,"vs",{get:function(){if(this.Rs)return this.Rs;throw g()},enumerable:!1,configurable:!0}),t.prototype.addReference=function(t,e,n){return this.As.addReference(n,e),this.vs.delete(n.toString()),nr.resolve()},t.prototype.removeReference=function(t,e,n){return this.As.removeReference(n,e),this.vs.add(n.toString()),nr.resolve()},t.prototype.markPotentiallyOrphaned=function(t,e){return this.vs.add(e.toString()),nr.resolve()},t.prototype.removeTarget=function(t,e){var n=this;this.As.Zn(e.targetId).forEach((function(t){return n.vs.add(t.toString())}));var r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(t,e.targetId).next((function(t){t.forEach((function(t){return n.vs.add(t.toString())}))})).next((function(){return r.removeTargetData(t,e)}))},t.prototype.Es=function(){this.Rs=new Set},t.prototype.Ts=function(t){var e=this,n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return nr.forEach(this.vs,(function(r){var i=H.fromPath(r);return e.Ps(t,i).next((function(t){t||n.removeEntry(i)}))})).next((function(){return e.Rs=null,n.apply(t)}))},t.prototype.updateLimboDocument=function(t,e){var n=this;return this.Ps(t,e).next((function(t){t?n.vs.delete(e.toString()):n.vs.add(e.toString())}))},t.prototype.ps=function(t){return 0},t.prototype.Ps=function(t,e){var n=this;return nr.or([function(){return nr.resolve(n.As.containsKey(e))},function(){return n.persistence.getTargetCache().containsKey(t,e)},function(){return n.persistence.Is(t,e)}])},t}(),Ki=function(){function t(t){this.uid=t}return t.prototype.isAuthenticated=function(){return null!=this.uid},t.prototype.toKey=function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"},t.prototype.isEqual=function(t){return t.uid===this.uid},t}();function Yi(t,e){return"firestore_clients_"+t+"_"+e}function Gi(t,e,n){var r="firestore_mutations_"+t+"_"+n;return e.isAuthenticated()&&(r+="_"+e.uid),r}function Qi(t,e){return"firestore_targets_"+t+"_"+e}Ki.UNAUTHENTICATED=new Ki(null),Ki.GOOGLE_CREDENTIALS=new Ki("google-credentials-uid"),Ki.FIRST_PARTY=new Ki("first-party-uid");var $i=function(){function t(t,e,n,r){this.user=t,this.batchId=e,this.state=n,this.error=r}return t.Vs=function(e,n,r){var i,o=JSON.parse(r),a="object"==typeof o&&-1!==["pending","acknowledged","rejected"].indexOf(o.state)&&(void 0===o.error||"object"==typeof o.error);return a&&o.error&&(a="string"==typeof o.error.message&&"string"==typeof o.error.code)&&(i=new c(o.error.code,o.error.message)),a?new t(e,n,o.state,i):(d("SharedClientState","Failed to parse mutation state for ID '"+n+"': "+r),null)},t.prototype.Ss=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}(),Xi=function(){function t(t,e,n){this.targetId=t,this.state=e,this.error=n}return t.Vs=function(e,n){var r,i=JSON.parse(n),o="object"==typeof i&&-1!==["not-current","current","rejected"].indexOf(i.state)&&(void 0===i.error||"object"==typeof i.error);return o&&i.error&&(o="string"==typeof i.error.message&&"string"==typeof i.error.code)&&(r=new c(i.error.code,i.error.message)),o?new t(e,i.state,r):(d("SharedClientState","Failed to parse target state for ID '"+e+"': "+n),null)},t.prototype.Ss=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}(),Ji=function(){function t(t,e){this.clientId=t,this.activeTargetIds=e}return t.Vs=function(e,n){for(var r=JSON.parse(n),i="object"==typeof r&&r.activeTargetIds instanceof Array,o=Be(),a=0;i&&a0){var r=s.getResponseJson().error;if(r&&r.status&&r.message){var l=function(t){var e=t.toLowerCase().replace(/_/g,"-");return Object.values(u).indexOf(e)>=0?e:u.UNKNOWN}(r.status);a(new c(l,r.message))}else a(new c(u.UNKNOWN,"Server responded with status "+s.getStatus()))}else a(new c(u.UNAVAILABLE,"Connection failed."));break;default:g()}}finally{f("Connection",'RPC "'+t+'" completed.')}}));var l=JSON.stringify(r);s.send(e,"POST",l,n,15)}))},e.prototype.$i=function(t,e){var n=[this.Di,"/","google.firestore.v1.Firestore","/",t,"/channel"],i=Object(o.g)(),a=Object(o.h)(),s={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.Fi(s.initMessageHeaders,e),Object(r.z)()||Object(r.C)()||Object(r.v)()||Object(r.x)()||Object(r.D)()||Object(r.u)()||(s.httpHeadersOverwriteParam="$httpHeaders");var l=n.join("");f("Connection","Creating WebChannel: "+l,s);var h=i.createWebChannel(l,s),d=!1,v=!1,g=new ao({Ei:function(t){v?f("Connection","Not sending because WebChannel is closed:",t):(d||(f("Connection","Opening WebChannel transport."),h.open(),d=!0),f("Connection","WebChannel sending:",t),h.send(t))},Ti:function(){return h.close()}}),y=function(t,e,n){t.listen(e,(function(t){try{n(t)}catch(t){setTimeout((function(){throw t}),0)}}))};return y(h,o.e.EventType.OPEN,(function(){v||f("Connection","WebChannel transport opened.")})),y(h,o.e.EventType.CLOSE,(function(){v||(v=!0,f("Connection","WebChannel transport closed"),g.Vi())})),y(h,o.e.EventType.ERROR,(function(t){v||(v=!0,p("Connection","WebChannel transport errored:",t),g.Vi(new c(u.UNAVAILABLE,"The operation could not be completed")))})),y(h,o.e.EventType.MESSAGE,(function(t){var e;if(!v){var n=t.data[0];m(!!n);var r=n,i=r.error||(null===(e=r[0])||void 0===e?void 0:e.error);if(i){f("Connection","WebChannel received error:",i);var o=i.status,a=function(t){var e=we[t];if(void 0!==e)return Oe(e)}(o),s=i.message;void 0===a&&(a=u.INTERNAL,s="Unknown error status: "+o+" with message "+i.message),v=!0,g.Vi(new c(a,s)),h.close()}else f("Connection","WebChannel received:",n),g.Si(n)}})),y(a,o.b.STAT_EVENT,(function(t){t.stat===o.d.PROXY?f("Connection","Detected buffering proxy"):t.stat===o.d.NOPROXY&&f("Connection","Detected no buffering proxy")})),setTimeout((function(){g.Pi()}),0),g},e}(function(){function t(t){this.databaseInfo=t,this.databaseId=t.databaseId;var e=t.ssl?"https":"http";this.Di=e+"://"+t.host,this.Ci="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}return t.prototype.Ni=function(t,e,n,r){var i=this.xi(t,e);f("RestConnection","Sending: ",i,n);var o={};return this.Fi(o,r),this.ki(t,i,o,n).then((function(t){return f("RestConnection","Received: ",t),t}),(function(e){throw p("RestConnection",t+" failed with error: ",e,"url: ",i,"request:",n),e}))},t.prototype.Oi=function(t,e,n,r){return this.Ni(t,e,n,r)},t.prototype.Fi=function(t,e){if(t["X-Goog-Api-Client"]="gl-js/ fire/8.5.0",t["Content-Type"]="text/plain",this.databaseInfo.appId&&(t["X-Firebase-GMPID"]=this.databaseInfo.appId),e)for(var n in e.authHeaders)e.authHeaders.hasOwnProperty(n)&&(t[n]=e.authHeaders[n])},t.prototype.xi=function(t,e){var n=oo[t];return this.Di+"/v1/"+e+":"+n},t}());function uo(){return"undefined"!=typeof window?window:null}function co(){return"undefined"!=typeof document?document:null}function lo(t){return new tn(t,!0)}var ho=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.Se=t,this.timerId=e,this.Mi=n,this.Li=r,this.Bi=i,this.qi=0,this.Ui=null,this.Qi=Date.now(),this.reset()}return t.prototype.reset=function(){this.qi=0},t.prototype.Ki=function(){this.qi=this.Bi},t.prototype.ji=function(t){var e=this;this.cancel();var n=Math.floor(this.qi+this.Wi()),r=Math.max(0,Date.now()-this.Qi),i=Math.max(0,n-r);i>0&&f("ExponentialBackoff","Backing off for "+i+" ms (base delay: "+this.qi+" ms, delay with jitter: "+n+" ms, last attempt: "+r+" ms ago)"),this.Ui=this.Se.enqueueAfterDelay(this.timerId,i,(function(){return e.Qi=Date.now(),t()})),this.qi*=this.Li,this.qithis.Bi&&(this.qi=this.Bi)},t.prototype.Gi=function(){null!==this.Ui&&(this.Ui.skipDelay(),this.Ui=null)},t.prototype.cancel=function(){null!==this.Ui&&(this.Ui.cancel(),this.Ui=null)},t.prototype.Wi=function(){return(Math.random()-.5)*this.qi},t}(),fo=function(){function t(t,e,n,r,i,o){this.Se=t,this.zi=n,this.Hi=r,this.Ji=i,this.listener=o,this.state=0,this.Yi=0,this.Xi=null,this.stream=null,this.Zi=new ho(t,e)}return t.prototype.tr=function(){return 1===this.state||2===this.state||4===this.state},t.prototype.er=function(){return 2===this.state},t.prototype.start=function(){3!==this.state?this.auth():this.nr()},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.tr()?[4,this.close(0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.sr=function(){this.state=0,this.Zi.reset()},t.prototype.ir=function(){var t=this;this.er()&&null===this.Xi&&(this.Xi=this.Se.enqueueAfterDelay(this.zi,6e4,(function(){return t.rr()})))},t.prototype.cr=function(t){this.ur(),this.stream.send(t)},t.prototype.rr=function(){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(t){return this.er()?[2,this.close(0)]:[2]}))}))},t.prototype.ur=function(){this.Xi&&(this.Xi.cancel(),this.Xi=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.ur(),this.Zi.cancel(),this.Yi++,3!==t?this.Zi.reset():e&&e.code===u.RESOURCE_EXHAUSTED?(d(e.toString()),d("Using maximum backoff delay to prevent overloading the backend."),this.Zi.Ki()):e&&e.code===u.UNAUTHENTICATED&&this.Ji.invalidateToken(),null!==this.stream&&(this.ar(),this.stream.close(),this.stream=null),this.state=t,[4,this.listener.Ri(e)];case 1:return n.sent(),[2]}}))}))},t.prototype.ar=function(){},t.prototype.auth=function(){var t=this;this.state=1;var e=this.hr(this.Yi),n=this.Yi;this.Ji.getToken().then((function(e){t.Yi===n&&t.lr(e)}),(function(n){e((function(){var e=new c(u.UNKNOWN,"Fetching auth token failed: "+n.message);return t.dr(e)}))}))},t.prototype.lr=function(t){var e=this,n=this.hr(this.Yi);this.stream=this.wr(t),this.stream.Ii((function(){n((function(){return e.state=2,e.listener.Ii()}))})),this.stream.Ri((function(t){n((function(){return e.dr(t)}))})),this.stream.onMessage((function(t){n((function(){return e.onMessage(t)}))}))},t.prototype.nr=function(){var t=this;this.state=4,this.Zi.ji((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.dr=function(t){return f("PersistentStream","close with error: "+t),this.stream=null,this.close(3,t)},t.prototype.hr=function(t){var e=this;return function(n){e.Se.enqueueAndForget((function(){return e.Yi===t?n():(f("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}},t}(),po=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).R=i,a}return Object(a.c)(e,t),e.prototype.wr=function(t){return this.Hi.$i("Listen",t)},e.prototype.onMessage=function(t){this.Zi.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:g()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],o=function(t,e){return t.I?(m(void 0===e||"string"==typeof e),M.fromBase64String(e||"")):(m(void 0===e||e instanceof Uint8Array),M.fromUint8Array(e||new Uint8Array))}(t,e.targetChange.resumeToken),a=(s=e.targetChange.cause)&&function(t){var e=void 0===t.code?u.UNKNOWN:Oe(t.code);return new c(e,t.message||"")}(s);n=new Ye(r,i,o,a||null)}else if("documentChange"in e){e.documentChange,(r=e.documentChange).document,r.document.name,r.document.updateTime,i=cn(t,r.document.name),o=on(r.document.updateTime);var s=new ot({mapValue:{fields:r.document.fields}}),l=(a=st.newFoundDocument(i,o,s),r.targetIds||[]),h=r.removedTargetIds||[];n=new He(l,h,a.key,a)}else if("documentDelete"in e)e.documentDelete,(r=e.documentDelete).document,i=cn(t,r.document),o=r.readTime?on(r.readTime):I.min(),s=st.newNoDocument(i,o),a=r.removedTargetIds||[],n=new He([],a,s.key,s);else if("documentRemove"in e)e.documentRemove,(r=e.documentRemove).document,i=cn(t,r.document),o=r.removedTargetIds||[],n=new He([],o,i,null);else{if(!("filter"in e))return g();e.filter;var f=e.filter;f.targetId,r=f.count||0,i=new Ie(r),o=f.targetId,n=new Ke(o,i)}return n}(this.R,t),n=function(t){if(!("targetChange"in t))return I.min();var e=t.targetChange;return e.targetIds&&e.targetIds.length?I.min():e.readTime?on(e.readTime):I.min()}(t);return this.listener._r(e,n)},e.prototype.mr=function(t){var e={};e.database=fn(this.R),e.addTarget=function(t,e){var n,r=e.target;return(n=ft(r)?{documents:yn(t,r)}:{query:bn(t,r)}).targetId=e.targetId,e.resumeToken.approximateByteSize()>0?n.resumeToken=nn(t,e.resumeToken):e.snapshotVersion.compareTo(I.min())>0&&(n.readTime=en(t,e.snapshotVersion.toTimestamp())),n}(this.R,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 g()}}(0,e.purpose);return null==n?null:{"goog-listen-tags":n}}(this.R,t);n&&(e.labels=n),this.cr(e)},e.prototype.yr=function(t){var e={};e.database=fn(this.R),e.removeTarget=t,this.cr(e)},e}(fo),vo=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).R=i,a.gr=!1,a}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"pr",{get:function(){return this.gr},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.gr=!1,this.lastStreamToken=void 0,t.prototype.start.call(this)},e.prototype.ar=function(){this.gr&&this.Er([])},e.prototype.wr=function(t){return this.Hi.$i("Write",t)},e.prototype.onMessage=function(t){if(m(!!t.streamToken),this.lastStreamToken=t.streamToken,this.gr){this.Zi.reset();var e=function(t,e){return t&&t.length>0?(m(void 0!==e),t.map((function(t){return function(t,e){var n=t.updateTime?on(t.updateTime):on(e);return n.isEqual(I.min())&&(n=on(e)),new se(n,t.transformResults||[])}(t,e)}))):[]}(t.writeResults,t.commitTime),n=on(t.commitTime);return this.listener.Tr(n,e)}return m(!t.writeResults||0===t.writeResults.length),this.gr=!0,this.listener.Ir()},e.prototype.Ar=function(){var t={};t.database=fn(this.R),this.cr(t)},e.prototype.Er=function(t){var e=this,n={streamToken:this.lastStreamToken,writes:t.map((function(t){return gn(e.R,t)}))};this.cr(n)},e}(fo),go=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).credentials=e,i.Hi=n,i.R=r,i.Rr=!1,i}return Object(a.c)(e,t),e.prototype.br=function(){if(this.Rr)throw new c(u.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.Ni=function(t,e,n){var r=this;return this.br(),this.credentials.getToken().then((function(i){return r.Hi.Ni(t,e,n,i)})).catch((function(t){throw"FirebaseError"===t.name?(t.code===u.UNAUTHENTICATED&&r.credentials.invalidateToken(),t):new c(u.UNKNOWN,t.toString())}))},e.prototype.Oi=function(t,e,n){var r=this;return this.br(),this.credentials.getToken().then((function(i){return r.Hi.Oi(t,e,n,i)})).catch((function(t){throw"FirebaseError"===t.name?(t.code===u.UNAUTHENTICATED&&r.credentials.invalidateToken(),t):new c(u.UNKNOWN,t.toString())}))},e.prototype.terminate=function(){this.Rr=!0},e}((function(){})),mo=function(){function t(t,e){this.asyncQueue=t,this.onlineStateHandler=e,this.state="Unknown",this.vr=0,this.Pr=null,this.Vr=!0}return t.prototype.Sr=function(){var t=this;0===this.vr&&(this.Dr("Unknown"),this.Pr=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(function(){return t.Pr=null,t.Cr("Backend didn't respond within 10 seconds."),t.Dr("Offline"),Promise.resolve()})))},t.prototype.Nr=function(t){"Online"===this.state?this.Dr("Unknown"):(this.vr++,this.vr>=1&&(this.Fr(),this.Cr("Connection failed 1 times. Most recent error: "+t.toString()),this.Dr("Offline")))},t.prototype.set=function(t){this.Fr(),this.vr=0,"Online"===t&&(this.Vr=!1),this.Dr(t)},t.prototype.Dr=function(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))},t.prototype.Cr=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.Vr?(d(e),this.Vr=!1):f("OnlineStateTracker",e)},t.prototype.Fr=function(){null!==this.Pr&&(this.Pr.cancel(),this.Pr=null)},t}(),yo=function(t,e,n,r,i){var o=this;this.localStore=t,this.datastore=e,this.asyncQueue=n,this.remoteSyncer={},this.kr=[],this.Or=new Map,this.$r=new Set,this.Mr=[],this.Lr=i,this.Lr.di((function(t){n.enqueueAndForget((function(){return Object(a.b)(o,void 0,void 0,(function(){return Object(a.d)(this,(function(t){switch(t.label){case 0:return Oo(this)?(f("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=y(t)).$r.add(4),[4,_o(e)];case 1:return n.sent(),e.Br.set("Unknown"),e.$r.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]}}))}))}))})),this.Br=new mo(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(!Oo(t))return[3,4];e=0,n=t.Mr,r.label=1;case 1:return e0}function Oo(t){return 0===y(t).$r.size}function Eo(t){t.qr=void 0}function Co(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return t.Or.forEach((function(e,n){So(t,e)})),[2]}))}))}function No(t,e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(n){return Eo(t),xo(t)?(t.Br.Nr(e),Io(t)):t.Br.set("Unknown"),[2]}))}))}function Po(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.Br.set("Online"),!(e instanceof Ye&&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=0?[4,function(t,e){var n=t.qr.ut(e);return n.targetChanges.forEach((function(n,r){if(n.resumeToken.approximateByteSize()>0){var i=t.Or.get(r);i&&t.Or.set(r,i.withResumeToken(n.resumeToken,e))}})),n.targetMismatches.forEach((function(e){var n=t.Or.get(e);if(n){t.Or.set(e,n.withResumeToken(M.EMPTY_BYTE_STRING,n.snapshotVersion)),To(t,e);var r=new gr(n.target,e,1,n.sequenceNumber);So(t,r)}})),t.remoteSyncer.applyRemoteEvent(n)}(t,n)]:[3,10];case 9:s.sent(),s.label=10;case 10:return[3,13];case 11:return f("RemoteStore","Failed to raise snapshot:",o=s.sent()),[4,Ao(t,o)];case 12:return s.sent(),[3,13];case 13:return[2]}}))}))}function Ao(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.$r.add(1),[4,_o(t)];case 1:return i.sent(),t.Br.set("Offline"),n||(n=function(){return Ti(t.localStore)}),t.asyncQueue.enqueueRetryable((function(){return Object(a.b)(r,void 0,void 0,(function(){return Object(a.d)(this,(function(e){switch(e.label){case 0:return f("RemoteStore","Retrying IndexedDB access"),[4,n()];case 1:return e.sent(),t.$r.delete(1),[4,bo(t)];case 2:return e.sent(),[2]}}))}))})),[2]}}))}))}function Do(t,e){return e().catch((function(n){return Ao(t,n,e)}))}function Mo(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=y(t),n=zo(e),r=e.kr.length>0?e.kr[e.kr.length-1].batchId:-1,a.label=1;case 1:if(!function(t){return Oo(t)&&t.kr.length<10}(e))return[3,7];a.label=2;case 2:return a.trys.push([2,4,,6]),[4,Oi(e.localStore,r)];case 3:return null===(i=a.sent())?(0===e.kr.length&&n.ir(),[3,7]):(r=i.batchId,function(t,e){t.kr.push(e);var n=zo(t);n.er()&&n.pr&&n.Er(e.mutations)}(e,i),[3,6]);case 4:return o=a.sent(),[4,Ao(e,o)];case 5:return a.sent(),[3,6];case 6:return[3,1];case 7:return Ro(e)&&jo(e),[2]}}))}))}function Ro(t){return Oo(t)&&!zo(t).tr()&&t.kr.length>0}function jo(t){zo(t).start()}function Lo(t){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.d)(this,(function(e){return zo(t).Ar(),[2]}))}))}function Fo(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=zo(t),n=0,r=t.kr;n0&&(f("RemoteStore","Stopping write stream with "+t.kr.length+" pending writes"),t.kr=[]),e.label=4;case 4:return[2]}}))}))}))),t.Qr}var Wo=function(){function t(t,e,n,r,i){this.asyncQueue=t,this.timerId=e,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new er,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((function(t){}))}return t.createAndSchedule=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.timerHandle=setTimeout((function(){return e.handleDelayElapsed()}),t)},t.prototype.skipDelay=function(){return this.handleDelayElapsed()},t.prototype.cancel=function(t){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new c(u.CANCELLED,"Operation cancelled"+(t?": "+t:""))))},t.prototype.handleDelayElapsed=function(){var t=this;this.asyncQueue.enqueueAndForget((function(){return null!==t.timerHandle?(t.clearTimeout(),t.op().then((function(e){return t.deferred.resolve(e)}))):Promise.resolve()}))},t.prototype.clearTimeout=function(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)},t}();function Ho(t,e){if(d("AsyncQueue",e+": "+t),sr(t))return new c(u.UNAVAILABLE,e+": "+t);throw t}var Ko=function(){function t(t){this.comparator=t?function(e,n){return t(e,n)||H.comparator(e.key,n.key)}:function(t,e){return H.comparator(t.key,e.key)},this.keyedMap=je(),this.sortedSet=new Ee(this.comparator)}return t.emptySet=function(e){return new t(e.comparator)},t.prototype.has=function(t){return null!=this.keyedMap.get(t)},t.prototype.get=function(t){return this.keyedMap.get(t)},t.prototype.first=function(){return this.sortedSet.minKey()},t.prototype.last=function(){return this.sortedSet.maxKey()},t.prototype.isEmpty=function(){return this.sortedSet.isEmpty()},t.prototype.indexOf=function(t){var e=this.keyedMap.get(t);return e?this.sortedSet.indexOf(e):-1},Object.defineProperty(t.prototype,"size",{get:function(){return this.sortedSet.size},enumerable:!1,configurable:!0}),t.prototype.forEach=function(t){this.sortedSet.inorderTraversal((function(e,n){return t(e),!1}))},t.prototype.add=function(t){var e=this.delete(t.key);return e.copy(e.keyedMap.insert(t.key,t),e.sortedSet.insert(t,null))},t.prototype.delete=function(t){var e=this.get(t);return e?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(e)):this},t.prototype.isEqual=function(e){if(!(e instanceof t))return!1;if(this.size!==e.size)return!1;for(var n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();n.hasNext();){var i=n.getNext().key,o=r.getNext().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.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r},t}(),Yo=function(){function t(){this.Kr=new Ee(H.comparator)}return t.prototype.track=function(t){var e=t.doc.key,n=this.Kr.get(e);n?0!==t.type&&3===n.type?this.Kr=this.Kr.insert(e,t):3===t.type&&1!==n.type?this.Kr=this.Kr.insert(e,{type:n.type,doc:t.doc}):2===t.type&&2===n.type?this.Kr=this.Kr.insert(e,{type:2,doc:t.doc}):2===t.type&&0===n.type?this.Kr=this.Kr.insert(e,{type:0,doc:t.doc}):1===t.type&&0===n.type?this.Kr=this.Kr.remove(e):1===t.type&&2===n.type?this.Kr=this.Kr.insert(e,{type:1,doc:n.doc}):0===t.type&&1===n.type?this.Kr=this.Kr.insert(e,{type:2,doc:t.doc}):g():this.Kr=this.Kr.insert(e,t)},t.prototype.jr=function(){var t=[];return this.Kr.inorderTraversal((function(e,n){t.push(n)})),t},t}(),Go=function(){function t(t,e,n,r,i,o,a,s){this.query=t,this.docs=e,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=i,this.fromCache=o,this.syncStateChanged=a,this.excludesMetadataChanges=s}return t.fromInitialDocuments=function(e,n,r,i){var o=[];return n.forEach((function(t){o.push({type:0,doc:t})})),new t(e,n,Ko.emptySet(n),o,r,i,!0,!1)},Object.defineProperty(t.prototype,"hasPendingWrites",{get:function(){return!this.mutatedKeys.isEmpty()},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){if(!(this.fromCache===t.fromCache&&this.syncStateChanged===t.syncStateChanged&&this.mutatedKeys.isEqual(t.mutatedKeys)&&Ut(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.oldDocs.isEqual(t.oldDocs)))return!1;var e=this.docChanges,n=t.docChanges;if(e.length!==n.length)return!1;for(var r=0;r=0&&(o.listeners.splice(s,1),i=0===o.listeners.length),i?[2,(n.queries.delete(r),n.onUnlisten(r))]:[2]}))}))}function Zo(t,e){for(var n=y(t),r=!1,i=0,o=e;i0)return!0;var e=this.Xr&&this.Xr.hasPendingWrites!==t.hasPendingWrites;return!(!t.syncStateChanged&&!e)&&!0===this.options.includeMetadataChanges},t.prototype.no=function(t){t=Go.fromInitialDocuments(t.query,t.docs,t.mutatedKeys,t.fromCache),this.Yr=!0,this.Jr.next(t)},t}(),ra=function(){function t(t,e){this.payload=t,this.byteLength=e}return t.prototype.io=function(){return"metadata"in this.payload},t}(),ia=function(){function t(t){this.R=t}return t.prototype.qn=function(t){return cn(this.R,t)},t.prototype.Un=function(t){return t.metadata.exists?vn(this.R,t.document,!1):st.newNoDocument(this.qn(t.metadata.name),this.Qn(t.metadata.readTime))},t.prototype.Qn=function(t){return on(t)},t}(),oa=function(){function t(t,e,n){this.ro=t,this.localStore=e,this.R=n,this.queries=[],this.documents=[],this.progress=aa(t)}return t.prototype.oo=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.co=function(t){for(var e=new Map,n=new ia(this.R),r=0,i=t;r0||c&&n.lo(h,c)<0)&&(s=!0)):!l&&h?(r.track({type:0,doc:h}),p=!0):l&&!h&&(r.track({type:1,doc:l}),p=!0,(u||c)&&(s=!0)),p&&(h?(a=a.add(h),o=d?o.add(t):o.delete(t)):(a=a.delete(t),o=o.delete(t)))})),Pt(this.query)||At(this.query))for(;a.size>this.query.limit;){var l=Pt(this.query)?a.last():a.first();a=a.delete(l.key),o=o.delete(l.key),r.track({type:1,doc:l})}return{fo:a,mo:r,Nn:s,mutatedKeys:o}},t.prototype.yo=function(t,e){return t.hasLocalMutations&&e.hasCommittedMutations&&!e.hasLocalMutations},t.prototype.applyChanges=function(t,e,n){var r=this,i=this.fo;this.fo=t.fo,this.mutatedKeys=t.mutatedKeys;var o=t.mo.jr();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 g()}};return n(t)-n(e)}(t.type,e.type)||r.lo(t.doc,e.doc)})),this.po(n);var a=e?this.Eo():[],s=0===this.ho.size&&this.current?1:0,u=s!==this.ao;return this.ao=s,0!==o.length||u?{snapshot:new Go(this.query,t.fo,i,o,t.mutatedKeys,0===s,u,!1),To:a}:{To:a}},t.prototype.zr=function(t){return this.current&&"Offline"===t?(this.current=!1,this.applyChanges({fo:this.fo,mo:new Yo,mutatedKeys:this.mutatedKeys,Nn:!1},!1)):{To:[]}},t.prototype.Io=function(t){return!this.uo.has(t)&&!!this.fo.has(t)&&!this.fo.get(t).hasLocalMutations},t.prototype.po=function(t){var e=this;t&&(t.addedDocuments.forEach((function(t){return e.uo=e.uo.add(t)})),t.modifiedDocuments.forEach((function(t){})),t.removedDocuments.forEach((function(t){return e.uo=e.uo.delete(t)})),this.current=t.current)},t.prototype.Eo=function(){var t=this;if(!this.current)return[];var e=this.ho;this.ho=Ve(),this.fo.forEach((function(e){t.Io(e.key)&&(t.ho=t.ho.add(e.key))}));var n=[];return e.forEach((function(e){t.ho.has(e)||n.push(new ua(e))})),this.ho.forEach((function(t){e.has(t)||n.push(new sa(t))})),n},t.prototype.Ao=function(t){this.uo=t.Bn,this.ho=Ve();var e=this._o(t.documents);return this.applyChanges(e,!0)},t.prototype.Ro=function(){return Go.fromInitialDocuments(this.query,this.fo,this.mutatedKeys,0===this.ao)},t}(),la=function(t,e,n){this.query=t,this.targetId=e,this.view=n},ha=function(t){this.key=t,this.bo=!1},fa=function(){function t(t,e,n,r,i,o){this.localStore=t,this.remoteStore=e,this.eventManager=n,this.sharedClientState=r,this.currentUser=i,this.maxConcurrentLimboResolutions=o,this.vo={},this.Po=new ni((function(t){return Vt(t)}),Ut),this.Vo=new Map,this.So=new Set,this.Do=new Ee(H.comparator),this.Co=new Map,this.No=new Li,this.xo={},this.Fo=new Map,this.ko=Wr.Yt(),this.onlineState="Unknown",this.Oo=void 0}return Object.defineProperty(t.prototype,"isPrimaryClient",{get:function(){return!0===this.Oo},enumerable:!1,configurable:!0}),t}();function da(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=Ba(t),(o=n.Po.get(e))?(r=o.targetId,n.sharedClientState.addLocalQueryTarget(r),i=o.view.Ro(),[3,4]):[3,1];case 1:return[4,Ei(n.localStore,Lt(e))];case 2:return s=a.sent(),u=n.sharedClientState.addLocalQueryTarget(s.targetId),r=s.targetId,[4,pa(n,e,r,"current"===u)];case 3:i=a.sent(),n.isPrimaryClient&&wo(n.remoteStore,s),a.label=4;case 4:return[2,i]}}))}))}function pa(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(h){switch(h.label){case 0:return t.$o=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._o(n)).Nn?[4,Ni(t.localStore,e.query,!1).then((function(t){var n=t.documents;return e.view._o(n,i)}))]:[3,2];case 1:i=a.sent(),a.label=2;case 2:return o=r&&r.targetChanges.get(e.targetId),s=e.view.applyChanges(i,t.isPrimaryClient,o),[2,(Oa(t,e.targetId,s.To),s.snapshot)]}}))}))}(t,e,n,r)},[4,Ni(t.localStore,e,!0)];case 1:return i=h.sent(),o=new ca(e,i.Bn),s=o._o(i.documents),u=We.createSynthesizedTargetChangeForCurrentChange(n,r&&"Offline"!==t.onlineState),c=o.applyChanges(s,t.isPrimaryClient,u),Oa(t,n,c.To),l=new la(e,n,o),[2,(t.Po.set(e,l),t.Vo.has(n)?t.Vo.get(n).push(e):t.Vo.set(n,[e]),c.snapshot)]}}))}))}function va(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=y(t),r=n.Po.get(e),(i=n.Vo.get(r.targetId)).length>1?[2,(n.Vo.set(r.targetId,i.filter((function(t){return!Ut(t,e)}))),void n.Po.delete(e))]:n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)?[3,2]:[4,Ci(n.localStore,r.targetId,!1).then((function(){n.sharedClientState.clearQueryState(r.targetId),ko(n.remoteStore,r.targetId),Ia(n,r.targetId)})).catch(Qr)]):[3,3];case 1:o.sent(),o.label=2;case 2:return[3,5];case 3:return Ia(n,r.targetId),[4,Ci(n.localStore,r.targetId,!0)];case 4:o.sent(),o.label=5;case 5:return[2]}}))}))}function ga(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=za(t),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,function(t,e){var n,r=y(t),i=T.now(),o=e.reduce((function(t,e){return t.add(e.key)}),Ve());return r.persistence.runTransaction("Locally write mutations","readwrite",(function(t){return r.Mn.pn(t,o).next((function(o){n=o;for(var a=[],s=0,u=e;s0?r.bo=!0:t.modifiedDocuments.size>0?m(r.bo):t.removedDocuments.size>0&&(m(r.bo),r.bo=!1))})),[4,Na(n,r,e)];case 3:return i.sent(),[3,6];case 4:return[4,Qr(i.sent())];case 5:return i.sent(),[3,6];case 6:return[2]}}))}))}function ya(t,e,n){var r=y(t);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){var i=[];r.Po.forEach((function(t,n){var r=n.view.zr(e);r.snapshot&&i.push(r.snapshot)})),function(t,e){var n=y(t);n.onlineState=e;var r=!1;n.queries.forEach((function(t,n){for(var i=0,o=n.listeners;i0&&t.Do.size=0}))}(t.localStore,r)];case 2:return a.sent()?[4,e.close()]:[3,4];case 3:return[2,(a.sent(),void n._completeWith(function(t){return{taskState:"Success",documentsLoaded:t.totalDocuments,bytesLoaded:t.totalBytes,totalDocuments:t.totalDocuments,totalBytes:t.totalBytes}}(r)))];case 4:return n._updateProgress(aa(r)),i=new oa(r,t.localStore,e.R),[4,e.Lo()];case 5:o=a.sent(),a.label=6;case 6:return o?[4,i.oo(o)]:[3,10];case 7:return(s=a.sent())&&n._updateProgress(s),[4,e.Lo()];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,Na(t,u.wn,void 0)];case 12:return a.sent(),[4,function(t,e){var n=y(t);return n.persistence.runTransaction("Save bundle","readwrite",(function(t){return n.Qe.saveBundleMetadata(t,e)}))}(t.localStore,r)];case 13:return a.sent(),n._completeWith(u.progress),[3,15];case 14:return p("SyncEngine","Loading bundle failed with "+(c=a.sent())),n._failWith(c),[3,15];case 15:return[2]}}))}))})(r,e,n).then((function(){r.sharedClientState.notifyBundleLoaded()}))}var Ha=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.R=lo(t.databaseInfo.databaseId),this.sharedClientState=this.Bo(t),this.persistence=this.qo(t),[4,this.persistence.start()];case 1:return e.sent(),this.gcScheduler=this.Uo(t),this.localStore=this.Qo(t),[2]}}))}))},t.prototype.Uo=function(t){return null},t.prototype.Qo=function(t){return wi(this.persistence,new bi,t.initialUser,this.R)},t.prototype.qo=function(t){return new zi(Hi.bs,this.R)},t.prototype.Bo=function(t){return new no},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.gcScheduler&&this.gcScheduler.stop(),[4,this.sharedClientState.shutdown()];case 1:return t.sent(),[4,this.persistence.shutdown()];case 2:return t.sent(),[2]}}))}))},t}(),Ka=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).Ko=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,Di(this.localStore)];case 2:return n.sent(),[4,this.Ko.initialize(this,e)];case 3:return n.sent(),[4,za(this.Ko.syncEngine)];case 4:return n.sent(),[4,Mo(this.Ko.remoteStore)];case 5:return n.sent(),[2]}}))}))},e.prototype.Qo=function(t){return wi(this.persistence,new bi,t.initialUser,this.R)},e.prototype.Uo=function(t){var e=this.persistence.referenceDelegate.garbageCollector;return new Jr(e,t.asyncQueue)},e.prototype.qo=function(t){var e=vi(t.databaseInfo.databaseId,t.databaseInfo.persistenceKey),n=void 0!==this.cacheSizeBytes?jr.withCacheSize(this.cacheSizeBytes):jr.DEFAULT;return new fi(this.synchronizeTabs,e,t.clientId,n,t.asyncQueue,uo(),co(),this.R,this.sharedClientState,!!this.forceOwnership)},e.prototype.Bo=function(t){return new no},e}(Ha),Ya=function(t){function e(e,n){var r=this;return(r=t.call(this,e,n,!1)||this).Ko=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.Ko.syncEngine,this.sharedClientState instanceof eo?(this.sharedClientState.syncEngine={ui:Ra.bind(null,n),ai:Va.bind(null,n),hi:qa.bind(null,n),fn:Ua.bind(null,n),ci:Ma.bind(null,n)},[4,this.sharedClientState.start()]):[3,3];case 2:i.sent(),i.label=3;case 3:return[4,this.persistence.He((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,ja(this.Ko.syncEngine,t)];case 1:return e.sent(),this.gcScheduler&&(t&&!this.gcScheduler.started?this.gcScheduler.start(this.localStore):t||this.gcScheduler.stop()),[2]}}))}))}))];case 4:return i.sent(),[2]}}))}))},e.prototype.Bo=function(t){var e=uo();if(!eo.yt(e))throw new c(u.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var n=vi(t.databaseInfo.databaseId,t.databaseInfo.persistenceKey);return new eo(e,t.asyncQueue,n,t.clientId,t.initialUser)},e}(Ka),Ga=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.localStore?[3,2]:(this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(e),this.remoteStore=this.createRemoteStore(e),this.eventManager=this.createEventManager(e),this.syncEngine=this.createSyncEngine(e,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=function(t){return ya(n.syncEngine,t,1)},this.remoteStore.remoteSyncer.handleCredentialChange=Pa.bind(null,this.syncEngine),[4,qo(this.remoteStore,this.syncEngine.isPrimaryClient)]);case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},t.prototype.createEventManager=function(t){return new $o},t.prototype.createDatastore=function(t){var e,n=lo(t.databaseInfo.databaseId),r=(e=t.databaseInfo,new so(e));return function(t,e,n){return new go(t,e,n)}(t.credentials,r,n)},t.prototype.createRemoteStore=function(t){var e,n,r,i,o,a=this;return e=this.localStore,n=this.datastore,r=t.asyncQueue,i=function(t){return ya(a.syncEngine,t,0)},o=io.yt()?new io:new ro,new yo(e,n,r,i,o)},t.prototype.createSyncEngine=function(t,e){return function(t,e,n,r,i,o,a){var s=new fa(t,e,n,r,i,o);return a&&(s.Oo=!0),s}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,t.initialUser,t.maxConcurrentLimboResolutions,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=y(t),f("RemoteStore","RemoteStore shutting down."),e.$r.add(5),[4,_o(e)];case 1:return n.sent(),e.Lr.shutdown(),e.Br.set("Unknown"),[2]}}))}))}(this.remoteStore)},t}();function Qa(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 n0)throw new c(u.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=y(t),r=fn(n.R)+"/documents",i={documents:e.map((function(t){return un(n.R,t)}))},[4,n.Oi("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){m(!!e.found),e.found.name,e.found.updateTime;var n=cn(t,e.found.name),r=on(e.found.updateTime),i=new ot({mapValue:{fields:e.found.fields}});return st.newFoundDocument(n,r,i)}(t,e):"missing"in e?function(t,e){m(!!e.missing),m(!!e.readTime);var n=cn(t,e.missing),r=on(e.readTime);return st.newNoDocument(n,r)}(t,e):g()}(n.R,t);s.set(e.key.toString(),e)})),u=[],[2,(e.forEach((function(t){var e=s.get(t.toString());m(!!e),u.push(e)})),u)]}}))}))}(this.datastore,t)];case 1:return[2,((e=r.sent()).forEach((function(t){return n.recordVersion(t)})),e)]}}))}))},t.prototype.set=function(t,e){this.write(e.toMutation(t,this.precondition(t))),this.writtenDocs.add(t.toString())},t.prototype.update=function(t,e){try{this.write(e.toMutation(t,this.preconditionForUpdate(t)))}catch(t){this.lastWriteError=t}this.writtenDocs.add(t.toString())},t.prototype.delete=function(t){this.write(new Se(t,this.precondition(t))),this.writtenDocs.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.ensureCommitNotCalled(),this.lastWriteError)throw this.lastWriteError;return t=this.readVersions,this.mutations.forEach((function(e){t.delete(e.key.toString())})),t.forEach((function(t,n){var r=H.fromPath(n);e.mutations.push(new Te(r,e.precondition(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=y(t),r=fn(n.R)+"/documents",i={writes:e.map((function(t){return gn(n.R,t)}))},[4,n.Ni("Commit",r,i)];case 1:return o.sent(),[2]}}))}))}(this.datastore,this.mutations)];case 1:return n.sent(),this.committed=!0,[2]}}))}))},t.prototype.recordVersion=function(t){var e;if(t.isFoundDocument())e=t.version;else{if(!t.isNoDocument())throw g();e=I.min()}var n=this.readVersions.get(t.key.toString());if(n){if(!e.isEqual(n))throw new c(u.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(t.key.toString(),e)},t.prototype.precondition=function(t){var e=this.readVersions.get(t.toString());return!this.writtenDocs.has(t.toString())&&e?ue.updateTime(e):ue.none()},t.prototype.preconditionForUpdate=function(t){var e=this.readVersions.get(t.toString());if(!this.writtenDocs.has(t.toString())&&e){if(e.isEqual(I.min()))throw new c(u.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return ue.updateTime(e)}return ue.exists(!0)},t.prototype.write=function(t){this.ensureCommitNotCalled(),this.mutations.push(t)},t.prototype.ensureCommitNotCalled=function(){},t}(),Za=function(){function t(t,e,n,r){this.asyncQueue=t,this.datastore=e,this.updateFunction=n,this.deferred=r,this.ec=5,this.Zi=new ho(this.asyncQueue,"transaction_retry")}return t.prototype.run=function(){this.nc()},t.prototype.nc=function(){var t=this;this.Zi.ji((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 Ja(this.datastore),(e=this.sc(t))&&e.then((function(e){n.asyncQueue.enqueueAndForget((function(){return t.commit().then((function(){n.deferred.resolve(e)})).catch((function(t){n.ic(t)}))}))})).catch((function(t){n.ic(t)})),[2]}))}))}))},t.prototype.sc=function(t){try{var e=this.updateFunction(t);return!B(e)&&e.catch&&e.then?e:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(t){return this.deferred.reject(t),null}},t.prototype.ic=function(t){var e=this;this.ec>0&&this.rc(t)?(this.ec-=1,this.asyncQueue.enqueueAndForget((function(){return e.nc(),Promise.resolve()}))):this.deferred.reject(t)},t.prototype.rc=function(t){if("FirebaseError"===t.name){var e=t.code;return"aborted"===e||"failed-precondition"===e||!xe(e)}return!1},t}(),ts=function(){function t(t,e,n){var r=this;this.credentials=t,this.asyncQueue=e,this.databaseInfo=n,this.user=Ki.UNAUTHENTICATED,this.clientId=_.u(),this.credentialListener=function(){},this.receivedInitialUser=new er,this.credentials.setChangeListener((function(t){f("FirestoreClient","Received user=",t.uid),r.user=t,r.credentialListener(t),r.receivedInitialUser.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.receivedInitialUser.promise];case 1:return[2,(t.sent(),{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,credentials:this.credentials,initialUser:this.user,maxConcurrentLimboResolutions:100})]}}))}))},t.prototype.setCredentialChangeListener=function(t){var e=this;this.credentialListener=t,this.receivedInitialUser.promise.then((function(){return e.credentialListener(e.user)}))},t.prototype.verifyNotTerminated=function(){if(this.asyncQueue.isShuttingDown)throw new c(u.FAILED_PRECONDITION,"The client has already been terminated.")},t.prototype.terminate=function(){var t=this;this.asyncQueue.enterRestrictedMode();var e=new er;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((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.onlineComponents?[4,this.onlineComponents.terminate()]:[3,2];case 1:r.sent(),r.label=2;case 2:return this.offlineComponents?[4,this.offlineComponents.terminate()]:[3,4];case 3:r.sent(),r.label=4;case 4:return this.credentials.removeChangeListener(),e.resolve(),[3,6];case 5:return t=r.sent(),n=Ho(t,"Failed to shutdown persistence"),e.reject(n),[3,6];case 6:return[2]}}))}))})),e.promise},t}();function es(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.asyncQueue.verifyOperationInProgress(),f("FirestoreClient","Initializing OfflineComponentProvider"),[4,t.getConfiguration()];case 1:return n=o.sent(),[4,e.initialize(n)];case 2:return o.sent(),r=n.initialUser,t.setCredentialChangeListener((function(n){r.isEqual(n)||(r=n,t.asyncQueue.enqueueRetryable((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,ki(e.localStore,n)];case 1:return t.sent(),[2]}}))}))})))})),e.persistence.setDatabaseDeletedListener((function(){return t.terminate()})),t.offlineComponents=e,[2]}}))}))}function ns(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.asyncQueue.verifyOperationInProgress(),[4,rs(t)];case 1:return n=i.sent(),f("FirestoreClient","Initializing OnlineComponentProvider"),[4,t.getConfiguration()];case 2:return r=i.sent(),[4,e.initialize(n,r)];case 3:return i.sent(),t.setCredentialChangeListener((function(n){return t.asyncQueue.enqueueRetryable((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=y(t)).asyncQueue.verifyOperationInProgress(),f("RemoteStore","RemoteStore received new credentials"),r=Oo(n),n.$r.add(3),[4,_o(n)];case 1:return i.sent(),r&&n.Br.set("Unknown"),[4,n.remoteSyncer.handleCredentialChange(e)];case 2:return i.sent(),n.$r.delete(3),[4,bo(n)];case 3:return i.sent(),[2]}}))}))}(e.remoteStore,n)}))})),t.onlineComponents=e,[2]}}))}))}function rs(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.offlineComponents?[3,2]:(f("FirestoreClient","Using default OfflineComponentProvider"),[4,es(t,new Ha)]);case 1:e.sent(),e.label=2;case 2:return[2,t.offlineComponents]}}))}))}function is(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.onlineComponents?[3,2]:(f("FirestoreClient","Using default OnlineComponentProvider"),[4,ns(t,new Ga)]);case 1:e.sent(),e.label=2;case 2:return[2,t.onlineComponents]}}))}))}function os(t){return rs(t).then((function(t){return t.persistence}))}function as(t){return rs(t).then((function(t){return t.localStore}))}function ss(t){return is(t).then((function(t){return t.remoteStore}))}function us(t){return is(t).then((function(t){return t.syncEngine}))}function cs(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,is(t)];case 1:return e=r.sent(),[2,((n=e.eventManager).onListen=da.bind(null,e.syncEngine),n.onUnlisten=va.bind(null,e.syncEngine),n)]}}))}))}function ls(t,e,n){var r=this;void 0===n&&(n={});var i=new er;return t.asyncQueue.enqueueAndForget((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 $a({next:function(o){e.enqueueAndForget((function(){return Jo(t,a)}));var s=o.docs.has(n);!s&&o.fromCache?i.reject(new c(u.UNAVAILABLE,"Failed to get document because the client is offline.")):s&&o.fromCache&&r&&"server"===r.source?i.reject(new c(u.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 na(Nt(n.path),o,{includeMetadataChanges:!0,so:!0});return Xo(t,a)},[4,cs(t)];case 1:return[2,r.apply(void 0,[o.sent(),t.asyncQueue,e,n,i])]}}))}))})),i.promise}function hs(t,e,n){var r=this;void 0===n&&(n={});var i=new er;return t.asyncQueue.enqueueAndForget((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 $a({next:function(n){e.enqueueAndForget((function(){return Jo(t,a)})),n.fromCache&&"server"===r.source?i.reject(new c(u.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 na(n,o,{includeMetadataChanges:!0,so:!0});return Xo(t,a)},[4,cs(t)];case 1:return[2,r.apply(void 0,[o.sent(),t.asyncQueue,e,n,i])]}}))}))})),i.promise}var fs=function(t,e,n,r,i,o,a){this.databaseId=t,this.appId=e,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=o,this.autoDetectLongPolling=a},ds=function(){function t(t,e){this.projectId=t,this.database=e||"(default)"}return Object.defineProperty(t.prototype,"isDefaultDatabase",{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}(),ps=new Map,vs=function(t,e){this.user=e,this.type="OAuth",this.authHeaders={},this.authHeaders.Authorization="Bearer "+t},gs=function(){function t(){this.changeListener=null}return t.prototype.getToken=function(){return Promise.resolve(null)},t.prototype.invalidateToken=function(){},t.prototype.setChangeListener=function(t){this.changeListener=t,t(Ki.UNAUTHENTICATED)},t.prototype.removeChangeListener=function(){this.changeListener=null},t}(),ms=function(){function t(t){this.token=t,this.changeListener=null}return t.prototype.getToken=function(){return Promise.resolve(this.token)},t.prototype.invalidateToken=function(){},t.prototype.setChangeListener=function(t){this.changeListener=t,t(this.token.user)},t.prototype.removeChangeListener=function(){this.changeListener=null},t}(),ys=function(){function t(t){var e=this;this.oc=null,this.currentUser=Ki.UNAUTHENTICATED,this.receivedInitialUser=!1,this.cc=0,this.changeListener=null,this.forceRefresh=!1,this.oc=function(){e.cc++,e.currentUser=e.uc(),e.receivedInitialUser=!0,e.changeListener&&e.changeListener(e.currentUser)},this.cc=0,this.auth=t.getImmediate({optional:!0}),this.auth?this.auth.addAuthTokenListener(this.oc):(this.oc(null),t.get().then((function(t){e.auth=t,e.oc&&e.auth.addAuthTokenListener(e.oc)}),(function(){})))}return t.prototype.getToken=function(){var t=this,e=this.cc,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return t.cc!==e?(f("FirebaseCredentialsProvider","getToken aborted due to token change."),t.getToken()):n?(m("string"==typeof n.accessToken),new vs(n.accessToken,t.currentUser)):null})):Promise.resolve(null)},t.prototype.invalidateToken=function(){this.forceRefresh=!0},t.prototype.setChangeListener=function(t){this.changeListener=t,this.receivedInitialUser&&t(this.currentUser)},t.prototype.removeChangeListener=function(){this.auth&&this.auth.removeAuthTokenListener(this.oc),this.oc=null,this.changeListener=null},t.prototype.uc=function(){var t=this.auth&&this.auth.getUid();return m(null===t||"string"==typeof t),new Ki(t)},t}(),bs=function(){function t(t,e,n){this.ac=t,this.hc=e,this.lc=n,this.type="FirstParty",this.user=Ki.FIRST_PARTY}return Object.defineProperty(t.prototype,"authHeaders",{get:function(){var t={"X-Goog-AuthUser":this.hc},e=this.ac.auth.getAuthHeaderValueForFirstParty([]);return e&&(t.Authorization=e),this.lc&&(t["X-Goog-Iam-Authorization-Token"]=this.lc),t},enumerable:!1,configurable:!0}),t}(),_s=function(){function t(t,e,n){this.ac=t,this.hc=e,this.lc=n}return t.prototype.getToken=function(){return Promise.resolve(new bs(this.ac,this.hc,this.lc))},t.prototype.setChangeListener=function(t){t(Ki.FIRST_PARTY)},t.prototype.removeChangeListener=function(){},t.prototype.invalidateToken=function(){},t}();function ws(t,e,n){if(!n)throw new c(u.INVALID_ARGUMENT,"Function "+t+"() cannot be called with an empty "+e+".")}function ks(t,e){if(void 0===e)return{merge:!1};if(void 0!==e.mergeFields&&void 0!==e.merge)throw new c(u.INVALID_ARGUMENT,"Invalid options passed to function "+t+'(): You cannot specify both "merge" and "mergeFields".');return e}function Ss(t,e,n,r){if(!0===e&&!0===r)throw new c(u.INVALID_ARGUMENT,t+" and "+n+" cannot be used together.")}function Ts(t){if(!H.isDocumentKey(t))throw new c(u.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t+" has "+t.length+".")}function Is(t){if(H.isDocumentKey(t))throw new c(u.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+t+" has "+t.length+".")}function xs(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":g()}function Os(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new c(u.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=xs(t);throw new c(u.INVALID_ARGUMENT,"Expected type '"+e.name+"', but it was: "+n)}return t}function Es(t,e){if(e<=0)throw new c(u.INVALID_ARGUMENT,"Function "+t+"() requires a positive number, but it was: "+e+".")}var Cs=function(){function t(t){var e;if(void 0===t.host){if(void 0!==t.ssl)throw new c(u.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 c(u.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,Ss("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}(),Ns=function(){function t(t,e){this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Cs({}),this._settingsFrozen=!1,t instanceof ds?(this._databaseId=t,this._credentials=new gs):(this._app=t,this._databaseId=function(t){if(!Object.prototype.hasOwnProperty.apply(t.options,["projectId"]))throw new c(u.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new ds(t.options.projectId)}(t),this._credentials=new ys(e))}return Object.defineProperty(t.prototype,"app",{get:function(){if(!this._app)throw new c(u.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_initialized",{get:function(){return this._settingsFrozen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_terminated",{get:function(){return void 0!==this._terminateTask},enumerable:!1,configurable:!0}),t.prototype._setSettings=function(t){if(this._settingsFrozen)throw new c(u.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._settings=new Cs(t),void 0!==t.credentials&&(this._credentials=function(t){if(!t)return new gs;switch(t.type){case"gapi":var e=t.client;return m(!("object"!=typeof e||null===e||!e.auth||!e.auth.getAuthHeaderValueForFirstParty)),new _s(e,t.sessionIndex||"0",t.iamToken||null);case"provider":return t.client;default:throw new c(u.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(t.credentials))},t.prototype._getSettings=function(){return this._settings},t.prototype._freezeSettings=function(){return this._settingsFrozen=!0,this._settings},t.prototype._delete=function(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask},t.prototype.toJSON=function(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}},t.prototype._terminate=function(){return this,(t=ps.get(this))&&(f("ComponentProvider","Removing Datastore"),ps.delete(this),t.terminate()),Promise.resolve();var t},t}(),Ps=function(){function t(t,e,n){this.converter=e,this._key=n,this.type="document",this.firestore=t}return Object.defineProperty(t.prototype,"_path",{get:function(){return this._key.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._key.path.canonicalString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return new Ds(this.firestore,this.converter,this._key.path.popLast())},enumerable:!1,configurable:!0}),t.prototype.withConverter=function(e){return new t(this.firestore,e,this._key)},t}(),As=function(){function t(t,e,n){this.converter=e,this._query=n,this.type="query",this.firestore=t}return t.prototype.withConverter=function(e){return new t(this.firestore,e,this._query)},t}(),Ds=function(t){function e(e,n,r){var i=this;return(i=t.call(this,e,n,Nt(r))||this)._path=r,i.type="collection",i}return Object(a.c)(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this._path.popLast();return t.isEmpty()?null:new Ps(this.firestore,null,new H(t))},enumerable:!1,configurable:!0}),e.prototype.withConverter=function(t){return new e(this.firestore,t,this._path)},e}(As);function Ms(t,e){for(var n,i=[],o=2;o0&&this.Zi.ji((function(){return e.Ac()})),n.label=5;case 5:return[2]}}))}))},t.prototype.Ic=function(t){var e=this,n=this.fc.then((function(){return e.yc=!0,t().catch((function(t){throw e.mc=t,e.yc=!1,d("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.yc=!1,t}))}));return this.fc=n,n},t.prototype.enqueueAfterDelay=function(t,e,n){var r=this;this.Tc(),this.gc.indexOf(t)>-1&&(e=0);var i=Wo.createAndSchedule(this,t,e,n,(function(t){return r.Rc(t)}));return this._c.push(i),i},t.prototype.Tc=function(){this.mc&&g()},t.prototype.verifyOperationInProgress=function(){},t.prototype.bc=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.fc];case 1:e.sent(),e.label=2;case 2:if(t!==this.fc)return[3,0];e.label=3;case 3:return[2]}}))}))},t.prototype.vc=function(t){for(var e=0,n=this._c;e90)throw new c(u.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(e)||e<-180||e>180)throw new c(u.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+e);this._lat=t,this._long=e}return Object.defineProperty(t.prototype,"latitude",{get:function(){return this._lat},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"longitude",{get:function(){return this._long},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this._lat===t._lat&&this._long===t._long},t.prototype.toJSON=function(){return{latitude:this._lat,longitude:this._long}},t.prototype._compareTo=function(t){return w(this._lat,t._lat)||w(this._long,t._long)},t}(),Xs=/^__.*__$/,Js=function(){function t(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}return t.prototype.toMutation=function(t,e){return null!==this.fieldMask?new me(t,this.data,this.fieldMask,e,this.fieldTransforms):new ge(t,this.data,e,this.fieldTransforms)},t}(),Zs=function(){function t(t,e,n){this.data=t,this.fieldMask=e,this.fieldTransforms=n}return t.prototype.toMutation=function(t,e){return new me(t,this.data,this.fieldMask,e,this.fieldTransforms)},t}();function tu(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw g()}}var eu=function(){function t(t,e,n,r,i,o){this.settings=t,this.databaseId=e,this.R=n,this.ignoreUndefinedProperties=r,void 0===i&&this.Sc(),this.fieldTransforms=i||[],this.fieldMask=o||[]}return Object.defineProperty(t.prototype,"path",{get:function(){return this.settings.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Dc",{get:function(){return this.settings.Dc},enumerable:!1,configurable:!0}),t.prototype.Cc=function(e){return new t(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.R,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)},t.prototype.Nc=function(t){var e,n=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.Cc({path:n,xc:!1});return r.Fc(t),r},t.prototype.kc=function(t){var e,n=null===(e=this.path)||void 0===e?void 0:e.child(t),r=this.Cc({path:n,xc:!1});return r.Sc(),r},t.prototype.Oc=function(t){return this.Cc({path:void 0,xc:!0})},t.prototype.$c=function(t){return wu(t,this.settings.methodName,this.settings.Mc||!1,this.path,this.settings.Lc)},t.prototype.contains=function(t){return void 0!==this.fieldMask.find((function(e){return t.isPrefixOf(e)}))||void 0!==this.fieldTransforms.find((function(e){return t.isPrefixOf(e.field)}))},t.prototype.Sc=function(){if(this.path)for(var t=0;t=0;--v)if(!ku(d,l[v])){var g=l[v],m=h[v];m=Object(r.q)(m);var y=s.kc(g);if(m instanceof ou)d.push(g);else{var b=pu(m,y);null!=b&&(d.push(g),p.set(g,b))}}var _=new D(d);return new Zs(p,_,s.fieldTransforms)}function du(t,e,n,r){return void 0===r&&(r=!1),pu(n,t.Bc(r?4:3,e))}function pu(t,e){if(gu(t=Object(r.q)(t)))return mu("Unsupported field value:",e,t),vu(t,e);if(t instanceof Qs)return function(t,e){if(!tu(e.Dc))throw e.$c(t._methodName+"() can only be used with update() and set()");if(!e.path)throw e.$c(t._methodName+"() is not currently supported inside arrays");var n=t._toFieldTransform(e);n&&e.fieldTransforms.push(n)}(t,e),null;if(void 0===t&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.xc&&4!==e.Dc)throw e.$c("Nested arrays are not supported");return function(t,e){for(var n=[],r=0,i=0,o=t;i0&&e.fieldMask.push(e.path):O(t,(function(t,r){var i=pu(r,e.Nc(t));null!=i&&(n[t]=i)})),{mapValue:{fields:n}}}function gu(t){return!("object"!=typeof t||null===t||t instanceof Array||t instanceof Date||t instanceof T||t instanceof $s||t instanceof Gs||t instanceof Ps||t instanceof Qs)}function mu(t,e,n){if(!gu(n)||!function(t){return"object"==typeof t&&null!==t&&(Object.getPrototypeOf(t)===Object.prototype||null===Object.getPrototypeOf(t))}(n)){var r=xs(n);throw"an object"===r?e.$c(t+" a custom object"):e.$c(t+" "+r)}}function yu(t,e,n){if((e=Object(r.q)(e))instanceof Ys)return e._internalPath;if("string"==typeof e)return _u(t,e);throw wu("Field path arguments must be of type string or FieldPath.",t,!1,void 0,n)}var bu=new RegExp("[~\\*/\\[\\]]");function _u(t,e,n){if(e.search(bu)>=0)throw wu("Invalid field path ("+e+"). Paths must not contain '~', '*', '/', '[', or ']'",t,!1,void 0,n);try{return(new(Ys.bind.apply(Ys,Object(a.f)([void 0],e.split(".")))))._internalPath}catch(r){throw wu("Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'",t,!1,void 0,n)}}function wu(t,e,n,r,i){var o=r&&!r.isEmpty(),a=void 0!==i,s="Function "+e+"() called with invalid data";n&&(s+=" (via `toFirestore()`)");var l="";return(o||a)&&(l+=" (found",o&&(l+=" in field "+r),a&&(l+=" in document "+i),l+=")"),new c(u.INVALID_ARGUMENT,(s+=". ")+t+l)}function ku(t,e){return t.some((function(t){return t.isEqual(e)}))}var Su=function(){function t(t,e,n,r,i){this._firestore=t,this._userDataWriter=e,this._key=n,this._document=r,this._converter=i}return Object.defineProperty(t.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ref",{get:function(){return new Ps(this._firestore,this._converter,this._key)},enumerable:!1,configurable:!0}),t.prototype.exists=function(){return null!==this._document},t.prototype.data=function(){if(this._document){if(this._converter){var t=new Tu(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(t)}return this._userDataWriter.convertValue(this._document.data.toProto())}},t.prototype.get=function(t){if(this._document){var e=this._document.data.field(Iu("DocumentSnapshot.get",t));if(null!==e)return this._userDataWriter.convertValue(e)}},t}(),Tu=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}(Su);function Iu(t,e){return"string"==typeof e?_u(t,e):e instanceof Ys?e._internalPath:e._delegate._internalPath}var xu=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}(),Ou=function(t){function e(e,n,r,i,o,a){var s=this;return(s=t.call(this,e,n,r,i,a)||this)._firestore=e,s._firestoreImpl=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._document){if(this._converter){var e=new Eu(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(e,t)}return this._userDataWriter.convertValue(this._document.data.toProto(),t.serverTimestamps)}},e.prototype.get=function(t,e){if(void 0===e&&(e={}),this._document){var n=this._document.data.field(Iu("DocumentSnapshot.get",t));if(null!==n)return this._userDataWriter.convertValue(n,e.serverTimestamps)}},e}(Su),Eu=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}(Ou),Cu=function(){function t(t,e,n,r){this._firestore=t,this._userDataWriter=e,this._snapshot=r,this.metadata=new xu(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._snapshot.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._snapshot.docs.forEach((function(r){t.call(e,new Eu(n._firestore,n._userDataWriter,r.key,r,new xu(n._snapshot.mutatedKeys.has(r.key),n._snapshot.fromCache),n.query.converter))}))},t.prototype.docChanges=function(t){void 0===t&&(t={});var e=!!t.includeMetadataChanges;if(e&&this._snapshot.excludesMetadataChanges)throw new c(u.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===e||(this._cachedChanges=function(t,e){if(t._snapshot.oldDocs.isEmpty()){var n=0;return t._snapshot.docChanges.map((function(e){var r=new Eu(t._firestore,t._userDataWriter,e.doc.key,e.doc,new xu(t._snapshot.mutatedKeys.has(e.doc.key),t._snapshot.fromCache),t.query.converter);return e.doc,{type:"added",doc:r,oldIndex:-1,newIndex:n++}}))}var r=t._snapshot.oldDocs;return t._snapshot.docChanges.filter((function(t){return e||3!==t.type})).map((function(e){var n=new Eu(t._firestore,t._userDataWriter,e.doc.key,e.doc,new xu(t._snapshot.mutatedKeys.has(e.doc.key),t._snapshot.fromCache),t.query.converter),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:Nu(e.type),doc:n,oldIndex:i,newIndex:o}}))}(this,e),this._cachedChangesIncludeMetadataChanges=e),this._cachedChanges},t}();function Nu(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return g()}}function Pu(t,e){return t instanceof Ou&&e instanceof Ou?t._firestore===e._firestore&&t._key.isEqual(e._key)&&(null===t._document?null===e._document:t._document.isEqual(e._document))&&t._converter===e._converter:t instanceof Cu&&e instanceof Cu&&t._firestore===e._firestore&&Ls(t.query,e.query)&&t.metadata.isEqual(e.metadata)&&t._snapshot.isEqual(e._snapshot)}function Au(t){if(At(t)&&0===t.explicitOrderBy.length)throw new c(u.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var Du=function(){};function Mu(t){for(var e=[],n=1;n, or >=) must be on the same field. But you have inequality filters on '"+n.toString()+"' and '"+e.field.toString()+"'");var r=Dt(t);null!==r&&zu(t,e.field,r)}var i=function(t,e){for(var n=0,r=t.filters;n=0)return i.op}return null}(t,function(t){switch(t){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-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 c(u.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+e.op.toString()+"' filter."):new c(u.INVALID_ARGUMENT,"Invalid query. You cannot use '"+e.op.toString()+"' filters with '"+i.toString()+"' filters.")}(t,p),p}(t._query,0,e,t.firestore._databaseId,this.Qc,this.Kc,this.jc);return new As(t.firestore,t.converter,function(t,e){var n=t.filters.concat([e]);return new Et(t.path,t.collectionGroup,t.explicitOrderBy.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}(t._query,n))},e}(Du),ju=function(t){function e(e,n){var r=this;return(r=t.call(this)||this).Qc=e,r.Wc=n,r.type="orderBy",r}return Object(a.c)(e,t),e.prototype._apply=function(t){var e=function(t,e,n){if(null!==t.startAt)throw new c(u.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==t.endAt)throw new c(u.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var r=new Tt(e,n);return function(t,e){if(null===Dt(t)){var n=Mt(t);null!==n&&zu(t,n,e.field)}}(t,r),r}(t._query,this.Qc,this.Wc);return new As(t.firestore,t.converter,function(t,e){var n=t.explicitOrderBy.concat([e]);return new Et(t.path,t.collectionGroup,n,t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt)}(t._query,e))},e}(Du),Lu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).type=e,i.Gc=n,i.zc=r,i}return Object(a.c)(e,t),e.prototype._apply=function(t){return new As(t.firestore,t.converter,Ft(t._query,this.Gc,this.zc))},e}(Du),Fu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).type=e,i.Hc=n,i.Jc=r,i}return Object(a.c)(e,t),e.prototype._apply=function(t){var e=Vu(t,this.type,this.Hc,this.Jc);return new As(t.firestore,t.converter,function(t,e){return new Et(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,e,t.endAt)}(t._query,e))},e}(Du),Uu=function(t){function e(e,n,r){var i=this;return(i=t.call(this)||this).type=e,i.Hc=n,i.Jc=r,i}return Object(a.c)(e,t),e.prototype._apply=function(t){var e=Vu(t,this.type,this.Hc,this.Jc);return new As(t.firestore,t.converter,function(t,e){return new Et(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,e)}(t._query,e))},e}(Du);function Vu(t,e,n,i){if(n[0]=Object(r.q)(n[0]),n[0]instanceof Su)return function(t,e,n,r,i){if(!r)throw new c(u.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+n+"().");for(var o=[],a=0,s=jt(t);aa.length)throw new c(u.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=[],l=0;l10)throw new c(u.INVALID_ARGUMENT,"Invalid Query. '"+e.toString()+"' filters support a maximum of 10 elements in the value array.")}function zu(t,e,n){if(!n.isEqual(e))throw new c(u.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, 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.")}var Wu=function(){function t(){}return t.prototype.convertValue=function(t,e){switch(void 0===e&&(e="none"),K(t)){case 0:return null;case 1:return t.booleanValue;case 2:return L(t.integerValue||t.doubleValue);case 3:return this.convertTimestamp(t.timestampValue);case 4:return this.convertServerTimestamp(t,e);case 5:return t.stringValue;case 6:return this.convertBytes(F(t.bytesValue));case 7:return this.convertReference(t.referenceValue);case 8:return this.convertGeoPoint(t.geoPointValue);case 9:return this.convertArray(t.arrayValue,e);case 10:return this.convertObject(t.mapValue,e);default:throw g()}},t.prototype.convertObject=function(t,e){var n=this,r={};return O(t.fields||{},(function(t,i){r[t]=n.convertValue(i,e)})),r},t.prototype.convertGeoPoint=function(t){return new $s(L(t.latitude),L(t.longitude))},t.prototype.convertArray=function(t,e){var n=this;return(t.values||[]).map((function(t){return n.convertValue(t,e)}))},t.prototype.convertServerTimestamp=function(t,e){switch(e){case"previous":var n=V(t);return null==n?null:this.convertValue(n,e);case"estimate":return this.convertTimestamp(q(t));default:return null}},t.prototype.convertTimestamp=function(t){var e=j(t);return new T(e.seconds,e.nanos)},t.prototype.convertDocumentKey=function(t,e){var n=N.fromString(t);m(Pn(n));var r=new ds(n.get(1),n.get(3)),i=new H(n.popFirst(5));return r.isEqual(e)||d("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}();function Hu(t,e,n){return t?n&&(n.merge||n.mergeFields)?t.toFirestore(e,n):t.toFirestore(e):e}var Ku=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.convertBytes=function(t){return new Gs(t)},e.prototype.convertReference=function(t){var e=this.convertDocumentKey(t,this.firestore._databaseId);return new Ps(this.firestore,null,e)},e}(Wu),Yu=function(){function t(t,e){this._firestore=t,this._commitHandler=e,this._mutations=[],this._committed=!1,this._dataReader=ru(t)}return t.prototype.set=function(t,e,n){this._verifyNotCommitted();var r=Gu(t,this._firestore),i=Hu(r.converter,e,n),o=iu(this._dataReader,"WriteBatch.set",r._key,i,null!==r.converter,n);return this._mutations.push(o.toMutation(r._key,ue.none())),this},t.prototype.update=function(t,e,n){for(var i=[],o=3;o0?this._commitHandler(this._mutations):Promise.resolve()},t.prototype._verifyNotCommitted=function(){if(this._committed)throw new c(u.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},t}();function Gu(t,e){if((t=Object(r.q)(t)).firestore!==e)throw new c(u.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return t}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.convertBytes=function(t){return new Gs(t)},e.prototype.convertReference=function(t){var e=this.convertDocumentKey(t,this.firestore._databaseId);return new Ps(this.firestore,null,e)},e}(Wu);function $u(t,e,n){for(var i=[],o=3;o=0)throw new c(u.INVALID_ARGUMENT,"Invalid collection ID '"+e+"' passed to function collectionGroup(). Collection IDs must not contain '/'.");return new As(t,null,function(t){return new Et(N.emptyPath(),t)}(e))}(this._delegate,t))}catch(t){throw fc(t,"collectionGroup()","Firestore.collectionGroup()")}},t.prototype.runTransaction=function(t){var e=this;return function(t,e){return function(t,e){var n=this,r=new er;return t.asyncQueue.enqueueAndForget((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 is(t).then((function(t){return t.datastore}))}(t)];case 1:return n=i.sent(),new Za(t.asyncQueue,n,e,r).run(),[2]}}))}))})),r.promise}(zs(t),(function(n){return e(new tc(t,n))}))}(this._delegate,(function(n){return t(new uc(e,n))}))},t.prototype.batch=function(){var t=this;return zs(this._delegate),new cc(new Yu(this._delegate,(function(e){return Ju(t._delegate,e)})))},t.prototype.loadBundle=function(t){throw new c(u.FAILED_PRECONDITION,'"loadBundle()" does not exist, have you imported "firebase/firestore/bundle"?')},t.prototype.namedQuery=function(t){throw new c(u.FAILED_PRECONDITION,'"namedQuery()" does not exist, have you imported "firebase/firestore/bundle"?')},t}(),ac=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.convertBytes=function(t){return new rc(new Gs(t))},e.prototype.convertReference=function(t){var e=this.convertDocumentKey(t,this.firestore._databaseId);return hc.Zc(e,this.firestore,null)},e}(Wu);function sc(t){var e;e=t,l.setLogLevel(e)}var uc=function(){function t(t,e){this._firestore=t,this._delegate=e,this._userDataWriter=new ac(t)}return t.prototype.get=function(t){var e=this,n=wc(t);return this._delegate.get(n).then((function(t){return new vc(e._firestore,new Ou(e._firestore._delegate,e._userDataWriter,t._key,t._document,t.metadata,n.converter))}))},t.prototype.set=function(t,e,n){var r=wc(t);return n?(ks("Transaction.set",n),this._delegate.set(r,e,n)):this._delegate.set(r,e),this},t.prototype.update=function(t,e,n){for(var r,i=[],o=3;o=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 h(t){var e=typeof t;return"object"==e&&null!=t||"function"==e}var f="closure_uid_"+(1e9*Math.random()>>>0),d=0;function p(t,e,n){return t.call.apply(t.bind,arguments)}function v(t,e,n){if(!t)throw Error();if(2e?1:0}t:{var N=u.navigator;if(N){var P=N.userAgent;if(P){x=P;break t}}x=""}function A(t,e,n){for(var r in t)e.call(n,t[r],r,t)}function D(t){var e={};for(var n in t)e[n]=t[n];return e}var M="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function R(t,e){for(var n,r,i=1;iparseFloat(H)){L=String(Y);break t}}L=H}var G,Q={};function $(t){return function(t,e){var n=Q;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(t,(function(){for(var e=0,n=O(String(L)).split("."),r=O(String(t)).split("."),i=Math.max(n.length,r.length),o=0;0==e&&o=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=w(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 ht(t,e,n,r){for(var i=0;i>>0);function Tt(t){return"function"===typeof t?t:(t[St]||(t[St]=function(e){return t.handleEvent(e)}),t[St])}function It(){_.call(this),this.c=new ct(this),this.J=this,this.C=null}function xt(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;R(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=Ot(a,r,!0,e)&&i}if(i=Ot(a=e.a=t,r,!0,e)&&i,i=Ot(a,r,!1,e)&&i,n)for(o=0;oe.b&&(e.b++,t.next=e.a,e.a=t)}jt=!1}function Ut(t,e){It.call(this),this.b=t||1,this.a=e||u,this.f=g(this.Za,this),this.g=y()}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 2147483647r.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;ae.length?ye:(e=e.substr(r,n),t.D=r+n,e))}function Se(t){t.T=y()+t.P,Te(t,t.P)}function Te(t,e){if(null!=t.o)throw Error("WatchDog timer not null");t.o=ie(g(t.Va,t),e)}function Ie(t){t.o&&(u.clearTimeout(t.o),t.o=null)}function xe(t){0==t.g.v||t.A||Wn(t.g,t)}function Oe(t){Ie(t);var e=t.F;e&&"function"==typeof e.ja&&e.ja(),t.F=null,Vt(t.R),Yt(t.J),t.a&&(e=t.a,t.a=null,e.abort(),e.ja())}function Ee(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(m){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){t:if(!n.j){if(n.a){if(!(n.a.u+3e3i[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(m){}n.ea=void 0}}else Kn(n,11)}else if((t.C||n.a==t)&&zn(n),!I(e))for(e=r=n.ka.a.parse(e),r=0;re||3==e&&!q&&!this.a.$())){this.A||4!=e||7==n||te(8==n||0>=r?3:2),Ie(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)&&!I(a)){var u=a;break e}}u=null}if(!u){this.b=!1,this.h=3,ne(12),Oe(this),xe(this);break t}Qt(this.c,this.f,u,"Initial handshake response via X-HTTP-Initial-Response"),this.C=!0,Ee(this,u)}this.I?(we(this,e,o),q&&this.b&&3==e&&(Kt(this.J,this.R,"tick",this.Wa),this.R.start())):(Qt(this.c,this.f,o,null),Ee(this,o)),4==e&&Oe(this),this.b&&!this.A&&(4==e?Wn(this.g,this):(this.b=!1,Se(this)))}else 400==i&&0e)throw Error("Bad port number "+e);t.h=e}else t.h=null}function Ue(t,e,n){e instanceof $e?(t.b=e,function(t,e){e&&!t.f&&(Xe(t),t.c=null,t.a.forEach((function(t,e){var n=e.toLowerCase();e!=n&&(Je(this,e),tn(this,n,t))}),t)),t.f=e}(t.b,t.a)):(n||(e=ze(e,Ge)),t.b=new $e(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())^y()).toString(36)),t}function Be(t,e){return t?e?decodeURI(t.replace(/%25/g,"%2525")):decodeURIComponent(t):""}function ze(t,e,n){return"string"===typeof t?(t=encodeURI(t).replace(e,We),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function We(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}Me.prototype.toString=function(){var t=[],e=this.f;e&&t.push(ze(e,He,!0),":");var n=this.c;return(n||"file"==e)&&(t.push("//"),(e=this.j)&&t.push(ze(e,He,!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(ze(n,"/"==n.charAt(0)?Ye:Ke,!0))),(n=this.b.toString())&&t.push("?",n),(n=this.i)&&t.push("#",ze(n,Qe)),t.join("")};var He=/[#\/\?@]/g,Ke=/[#\?:]/g,Ye=/[#\?]/g,Ge=/[#\?@]/g,Qe=/#/g;function $e(t,e){this.b=this.a=null,this.c=t||null,this.f=!!e}function Xe(t){t.a||(t.a=new Ne,t.b=0,t.c&&function(t,e){if(t){t=t.split("&");for(var n=0;n2*t.c&&Pe(t)))}function Ze(t,e){return Xe(t),e=en(t,e),Ae(t.a.b,e)}function tn(t,e,n){Je(t,e),0=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 hn(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 T(t.c)}function fn(){}function dn(){this.a=new fn}function pn(t,e,n){var r=n||"";try{Ce(t,(function(t,n){var i=t;h(t)&&(i=Et(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=hn(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()}},fn.prototype.stringify=function(t){return u.JSON.stringify(t,void 0)},fn.prototype.parse=function(t){return u.JSON.parse(t,void 0)};var gn=u.JSON.parse;function mn(t){It.call(this),this.headers=new Ne,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=yn,this.D=this.F=!1}b(mn,It);var yn="",bn=/^https?$/i,_n=["POST","PUT"];function wn(t){return"content-type"==t.toLowerCase()}function kn(t,e){t.b=!1,t.a&&(t.g=!0,t.a.abort(),t.g=!1),t.f=e,t.h=5,Sn(t),In(t)}function Sn(t){t.u||(t.u=!0,xt(t,"complete"),xt(t,"error"))}function Tn(t){if(t.b&&"undefined"!=typeof s&&(!t.s[1]||4!=On(t)||2!=t.W()))if(t.l&&4==On(t))qt(t.za,0,t);else if(xt(t,"readystatechange"),4==On(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(De)[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)xt(t,"complete"),xt(t,"success");else{t.h=6;try{var c=2(c-=o))o=Math.max(0,i[u].b-100),s=!1;else try{pn(l,a,"req"+c+"_")}catch(h){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,Rt(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),Hn(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=Re(t.la);Ve(e,"RID","rpc"),Ve(e,"SID",t.J),Ve(e,"CI",t.H?"0":"1"),Ve(e,"AID",t.P),Ln(t,e),Ve(e,"TYPE","xmlhttp"),t.i&&t.l&&En(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(Re(e)),n.j=null,n.I=!0,_e(n,t)}function zn(t){null!=t.m&&(u.clearTimeout(t.m),t.m=null)}function Wn(t,e){var n=null;if(t.a==e){zn(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=y()-e.u;var i=t.u;xt(r=Jt(),new re(r,n,e,i)),Rn(t)}else Un(t);else if(3==(i=e.h)||0==i&&0=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),Hn(t,t.u)),t.u++,!0))}(t,e)||2==r&&Vn(t)))switch(n&&0e?null:"string"===typeof t?t.charAt(e):t[e]}(i.L()),n=u.FormData&&t instanceof u.FormData,!(0<=w(_n,e))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;charset=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{xn(this),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),An(this),Bn(this))},o.Sa=function(){null!=this.m&&(this.m=null,An(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=$n.prototype).ta=function(){},o.sa=function(){},o.ra=function(){},o.qa=function(){},o.Ja=function(){},Xn.prototype.a=function(t,e){return new Jn(t,e)},b(Jn,It),Jn.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=Gn(t,null,t.fa),Rn(t)},Jn.prototype.close=function(){Pn(this.a)},Jn.prototype.h=function(t){if("string"===typeof t){var e={};e.__data__=t,Mn(this.a,e)}else this.l?((e={}).__data__=Et(t),Mn(this.a,e)):Mn(this.a,t)},Jn.prototype.G=function(){this.a.f=null,delete this.f,Pn(this.a),delete this.a,Jn.X.G.call(this)},b(Zn,fe),b(tr,de),b(er,$n),er.prototype.ta=function(){xt(this.a,"a")},er.prototype.sa=function(t){xt(this.a,new Zn(t))},er.prototype.ra=function(t){xt(this.a,new tr(t))},er.prototype.qa=function(){xt(this.a,"b")},Xn.prototype.createWebChannel=Xn.prototype.a,Jn.prototype.send=Jn.prototype.h,Jn.prototype.open=Jn.prototype.g,Jn.prototype.close=Jn.prototype.close,oe.NO_ERROR=0,oe.TIMEOUT=8,oe.HTTP_ERROR=6,ae.COMPLETE="complete",ce.EventType=he,he.OPEN="a",he.CLOSE="b",he.ERROR="c",he.MESSAGE="d",It.prototype.listen=It.prototype.va,mn.prototype.listenOnce=mn.prototype.wa,mn.prototype.getLastError=mn.prototype.Qa,mn.prototype.getLastErrorCode=mn.prototype.ua,mn.prototype.getStatus=mn.prototype.W,mn.prototype.getResponseJson=mn.prototype.Pa,mn.prototype.getResponseText=mn.prototype.$,mn.prototype.send=mn.prototype.ba;var nr=function(){return new Xn},rr=function(){return Jt()},ir=oe,or=ae,ar=$t,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=mn}).call(this,n(21))},function(t,e,n){var r=n(45),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){"use strict";t.exports=n(58)},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 h(t){this._store=t}function f(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 d(t,e,n){this._db=t,this.oldVersion=e,this.transaction=new f(n)}function p(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 d(o.result,t.oldVersion,o.transaction))}),i.then((function(t){return new p(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","openKeyCursor"]),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)}))}))})})),h.prototype.createIndex=function(){return new c(this._store.createIndex.apply(this._store,arguments))},h.prototype.index=function(){return new c(this._store.index.apply(this._store,arguments))},o(h,"_store",["name","keyPath","indexNames","autoIncrement"]),a(h,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),u(h,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),s(h,"_store",IDBObjectStore,["deleteIndex"]),f.prototype.objectStore=function(){return new h(this._tx.objectStore.apply(this._tx,arguments))},o(f,"_tx",["objectStoreNames","mode"]),s(f,"_tx",IDBTransaction,["abort"]),d.prototype.createObjectStore=function(){return new h(this._db.createObjectStore.apply(this._db,arguments))},o(d,"_db",["name","version","objectStoreNames"]),s(d,"_db",IDBDatabase,["deleteObjectStore","close"]),p.prototype.transaction=function(){return new f(this._db.transaction.apply(this._db,arguments))},o(p,"_db",["name","version","objectStoreNames"]),s(p,"_db",IDBDatabase,["close"]),["openCursor","openKeyCursor"].forEach((function(t){[h,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,h].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){var r=n(82),i=n(87);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){t.exports=n(64)},function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=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 d("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 d(i,o,a)}(v.status,v.json,this.serializer))throw g;if(!v.json)throw new d("internal","Response is not valid JSON object.");if("undefined"===typeof(m=v.json.data)&&(m=v.json.result),"undefined"===typeof m)throw new d("internal","Response is missing data field.");return[2,{data:this.serializer.decode(m)}]}}))}))},t}();function y(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n;return Object(h.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:m};t.INTERNAL.registerComponent(new c.a("functions",(function(t,n){var r=n.instanceIdentifier,i=t.getProvider("app").getImmediate(),o=t.getProvider("auth-internal"),a=t.getProvider("app-check-internal"),s=t.getProvider("messaging");return new m(i,o,s,a,r,e)}),"PUBLIC").setServiceProps(n).setMultipleInstances(!0))}(o.a,fetch.bind(self)),o.a.registerVersion("@firebase/functions","0.6.8");var b,_=n(11),w="0.4.26",k=1e4,S="w:0.4.26",T="FIS_v2",I=36e5,x=((b={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',b["not-registered"]="Firebase Installation is not registered.",b["installation-not-found"]="Firebase Installation not found.",b["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',b["app-offline"]="Could not process request. Application offline.",b["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",b),O=new a.b("installations","Installations",x);function E(t){return t instanceof a.c&&t.code.includes("request-failed")}function C(t){return"https://firebaseinstallations.googleapis.com/v1/projects/"+t.projectId+"/installations"}function N(t){return{token:t.token,requestStatus:2,expiresIn:(e=t.expiresIn,Number(e.replace("s","000"))),creationTime:Date.now()};var e}function P(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n,r;return Object(h.d)(this,(function(i){switch(i.label){case 0:return[4,e.json()];case 1:return n=i.sent(),r=n.error,[2,O.create("request-failed",{requestName:t,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}}))}))}function A(t){var e=t.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function D(t,e){var n=e.refreshToken,r=A(t);return r.append("Authorization",function(t){return"FIS_v2 "+t}(n)),r}function M(t){return Object(h.b)(this,void 0,void 0,(function(){var e;return Object(h.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(h.b)(this,void 0,void 0,(function(){var e,r,i,o,a,s;return Object(h.d)(this,(function(u){switch(u.label){case 0:return e=C(t),r=A(t),i={fid:n,authVersion:T,appId:t.appId,sdkVersion:S},o={method:"POST",headers:r,body:JSON.stringify(i)},[4,M((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:N(s.authToken)}];case 3:return[4,P("Create Installation",a)];case 4:throw u.sent()}}))}))}function j(t){return new Promise((function(e){setTimeout(e,t)}))}var L=/^[cdef][\w-]{21}$/;function F(){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(h.f)([],Object(h.e)(e)))).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22);var e}(t);return L.test(e)?e:""}catch(n){return""}}function U(t){return t.appName+"!"+t.appId}var V=new Map;function q(t,e){var n=U(t);B(n,e),function(t,e){var n=W();n&&n.postMessage({key:t,fid:e});H()}(n,e)}function B(t,e){var n,r,i=V.get(t);if(i)try{for(var o=Object(h.g)(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 z=null;function W(){return!z&&"BroadcastChannel"in self&&((z=new BroadcastChannel("[Firebase] FID Change")).onmessage=function(t){B(t.data.key,t.data.fid)}),z}function H(){0===V.size&&z&&(z.close(),z=null)}var K,Y,G="firebase-installations-store",Q=null;function $(){return Q||(Q=Object(_.openDb)("firebase-installations-database",1,(function(t){switch(t.oldVersion){case 0:t.createObjectStore(G)}}))),Q}function X(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(h.d)(this,(function(s){switch(s.label){case 0:return n=U(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];case 4:return s.sent(),a&&a.fid===e.fid||q(t,e.fid),[2,e]}}))}))}function J(t){return Object(h.b)(this,void 0,void 0,(function(){var e,n,r;return Object(h.d)(this,(function(i){switch(i.label){case 0:return e=U(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 Z(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(h.d)(this,(function(u){switch(u.label){case 0:return n=U(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||q(t,s.fid),[2,s]}}))}))}function tt(t){return Object(h.b)(this,void 0,void 0,(function(){var e,n,r;return Object(h.d)(this,(function(i){switch(i.label){case 0:return[4,Z(t,(function(n){var r=function(t){return rt(t||{fid:F(),registrationStatus:0})}(n),i=function(t,e){if(0===e.registrationStatus){if(!navigator.onLine)return{installationEntry:e,registrationPromise:Promise.reject(O.create("app-offline"))};var n={fid:e.fid,registrationStatus:1,registrationTime:Date.now()};return{installationEntry:n,registrationPromise:function(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n,r;return Object(h.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,X(t,n)];case 2:return E(r=i.sent())&&409===r.customData.serverCode?[4,J(t)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,X(t,{fid:e.fid,registrationStatus:0})];case 5:i.sent(),i.label=6;case 6:throw r;case 7:return[2]}}))}))}(t,n)}}return 1===e.registrationStatus?{installationEntry:e,registrationPromise:et(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 et(t){return Object(h.b)(this,void 0,void 0,(function(){var e,n,r,i;return Object(h.d)(this,(function(o){switch(o.label){case 0:return[4,nt(t)];case 1:e=o.sent(),o.label=2;case 2:return 1!==e.registrationStatus?[3,5]:[4,j(100)];case 3:return o.sent(),[4,nt(t)];case 4:return e=o.sent(),[3,2];case 5:return 0!==e.registrationStatus?[3,7]:[4,tt(t)];case 6:return n=o.sent(),r=n.installationEntry,(i=n.registrationPromise)?[2,i]:[2,r];case 7:return[2,e]}}))}))}function nt(t){return Z(t,(function(t){if(!t)throw O.create("installation-not-found");return rt(t)}))}function rt(t){return 1===(e=t).registrationStatus&&e.registrationTime+k0&&"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 St="firebase-messaging-store",Tt=null;function It(){return Tt||(Tt=Object(_.openDb)("firebase-messaging-database",1,(function(t){switch(t.oldVersion){case 0:t.createObjectStore(St)}}))),Tt}function xt(t){return Object(h.b)(this,void 0,void 0,(function(){var e,n,r;return Object(h.d)(this,(function(i){switch(i.label){case 0:return e=Ct(t),[4,It()];case 1:return[4,i.sent().transaction(St).objectStore(St).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,Ot(t,r)]:[3,6];case 5:return i.sent(),[2,r];case 6:return[2]}}))}))}function Ot(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n,r,i;return Object(h.d)(this,(function(o){switch(o.label){case 0:return n=Ct(t),[4,It()];case 1:return r=o.sent(),[4,(i=r.transaction(St,"readwrite")).objectStore(St).put(e,n)];case 2:return o.sent(),[4,i.complete];case 3:return o.sent(),[2,e]}}))}))}function Et(t){return Object(h.b)(this,void 0,void 0,(function(){var e,n,r;return Object(h.d)(this,(function(i){switch(i.label){case 0:return e=Ct(t),[4,It()];case 1:return n=i.sent(),[4,(r=n.transaction(St,"readwrite")).objectStore(St).delete(e)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}}))}))}function Ct(t){return t.appConfig.appId}function Nt(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(h.d)(this,(function(u){switch(u.label){case 0:return[4,Mt(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(Dt(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 Pt(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n,r,i,o,a,s;return Object(h.d)(this,(function(u){switch(u.label){case 0:return[4,Mt(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(Dt(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 At(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n,r,i,o,a;return Object(h.d)(this,(function(s){switch(s.label){case 0:return[4,Mt(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(Dt(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]}}))}))}function Dt(t){return"https://fcmregistrations.googleapis.com/v1/projects/"+t.projectId+"/registrations"}function Mt(t){var e=t.appConfig,n=t.installations;return Object(h.b)(this,void 0,void 0,(function(){var t;return Object(h.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!==vt&&(o.web.applicationPubKey=i),o}function jt(t,e,n){return Object(h.b)(this,void 0,void 0,(function(){var r,i,o,a;return Object(h.d)(this,(function(s){switch(s.label){case 0:if("granted"!==Notification.permission)throw pt.create("permission-blocked");return[4,Vt(e,n)];case 1:return r=s.sent(),[4,xt(t)];case 2:return i=s.sent(),o={vapidKey:n,swScope:e.scope,endpoint:r.endpoint,auth:mt(r.getKey("auth")),p256dh:mt(r.getKey("p256dh"))},i?[3,3]:[2,Ut(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,At(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,Ut(t,o)];case 8:return Date.now()>=i.createTime+6048e5?[2,Ft({token:i.token,createTime:Date.now(),subscriptionOptions:o},t,e)]:[2,i.token];case 9:return[2]}}))}))}function Lt(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n,r;return Object(h.d)(this,(function(i){switch(i.label){case 0:return[4,xt(t)];case 1:return(n=i.sent())?[4,At(t,n.token)]:[3,4];case 2:return i.sent(),[4,Et(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 Ft(t,e,n){return Object(h.b)(this,void 0,void 0,(function(){var r,i,o;return Object(h.d)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,5]),[4,Pt(e,t)];case 1:return r=a.sent(),i=Object(h.a)(Object(h.a)({},t),{token:r,createTime:Date.now()}),[4,Ot(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 Ut(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n,r;return Object(h.d)(this,(function(i){switch(i.label){case 0:return[4,Nt(t,e)];case 1:return n=i.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:e},[4,Ot(t,r)];case 2:return i.sent(),[2,r.token]}}))}))}function Vt(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n;return Object(h.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 qt(t){return"object"===typeof t&&!!t&> in t}function Bt(t){return new Promise((function(e){setTimeout(e,t)}))}var zt=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(h.b)(this,void 0,void 0,(function(){var n;return Object(h.d)(this,(function(r){switch(r.label){case 0:return this.vapidKey?[3,2]:[4,xt(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:vt,r.label=2;case 2:return[2,jt(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(h.b)(this,void 0,void 0,(function(){var e,n,r,i;return Object(h.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,Yt()]:(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(Wt(e))]:[3,3]);case 2:o.sent(),r=!0,o.label=3;case 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,Bt(1e3)]);case 4:return o.sent(),[2]}}))}))},t.prototype.onSubChange=function(t){var e,n;return Object(h.b)(this,void 0,void 0,(function(){var r;return Object(h.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,xt(this.firebaseDependencies)];case 3:return r=i.sent(),[4,Lt(this.firebaseDependencies,self.registration)];case 4:return i.sent(),[4,jt(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:vt)];case 5:return i.sent(),[2]}}))}))},t.prototype.onNotificationClick=function(t){var e,n;return Object(h.b)(this,void 0,void 0,(function(){var r,i,o,a,s;return Object(h.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 qt(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,Ht(o)]):[2]):[2];case 1:return(s=u.sent())?[3,4]:[4,self.clients.openWindow(i)];case 2:return s=u.sent(),[4,Bt(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 Wt(t){var e,n=Object(h.a)({},t.notification);return n.data=((e={}).FCM_MSG=t,e),n}function Ht(t){return Object(h.b)(this,void 0,void 0,(function(){var e,n,r,i,o,a,s;return Object(h.d)(this,(function(u){switch(u.label){case 0:return[4,Yt()];case 1:e=u.sent();try{for(n=Object(h.g)(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(h.g)(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 Yt(){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(h.b)(this,void 0,void 0,(function(){var e,n;return Object(h.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))),qt(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]}}))}))},t.prototype.getVapidKey=function(){return this.vapidKey},t.prototype.getSwReg=function(){return this.swRegistration},t.prototype.getToken=function(t){return Object(h.b)(this,void 0,void 0,(function(){return Object(h.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,jt(this.firebaseDependencies,this.swRegistration,this.vapidKey)]}}))}))},t.prototype.updateVapidKey=function(t){return Object(h.b)(this,void 0,void 0,(function(){return Object(h.d)(this,(function(e){return t?this.vapidKey=t:this.vapidKey||(this.vapidKey=vt),[2]}))}))},t.prototype.updateSwReg=function(t){return Object(h.b)(this,void 0,void 0,(function(){return Object(h.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(h.b)(this,void 0,void 0,(function(){var t,e;return Object(h.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]}}))}))},t.prototype.deleteToken=function(){return Object(h.b)(this,void 0,void 0,(function(){return Object(h.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(h.b)(this,void 0,void 0,(function(){var t;return Object(h.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(h.b)(this,void 0,void 0,(function(){var n;return Object(h.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 Xt={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")}o.a.INTERNAL.registerComponent(new c.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(h.g)(["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 zt(n):new Qt(n)}),"PUBLIC").setServiceProps(Xt));var Zt="firebasestorage.googleapis.com",te=function(t){function e(n,r){var i=t.call(this,ee(n),"Firebase Storage: "+r+" ("+ee(n)+")")||this;return i.customData={serverResponse:null},i._baseMessage=i.message,Object.setPrototypeOf(i,e.prototype),i}return Object(h.c)(e,t),e.prototype._codeEquals=function(t){return ee(t)===this.code},Object.defineProperty(e.prototype,"serverResponse",{get:function(){return this.customData.serverResponse},set:function(t){this.customData.serverResponse=t,this.customData.serverResponse?this.message=this._baseMessage+"\n"+this.customData.serverResponse:this.message=this._baseMessage},enumerable:!1,configurable:!0}),e}(a.c);function ee(t){return"storage/"+t}function ne(){return new te("unknown","An unknown error occurred, please check the error payload for server response.")}function re(){return new te("canceled","User canceled the upload/download.")}function ie(){return new te("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.")}function oe(t){return new te("invalid-argument",t)}function ae(){return new te("app-deleted","The Firebase app was deleted.")}function se(t){return new te("invalid-root-operation","The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function ue(t,e){return new te("invalid-format","String does not match format '"+t+"': "+e)}function ce(t){throw new te("internal-error","Internal error: "+t)}var le={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},he=function(t,e){this.data=t,this.contentType=e||null};function fe(t,e){switch(t){case le.RAW:return new he(de(e));case le.BASE64:case le.BASE64URL:return new he(pe(t,e));case le.DATA_URL:return new he(function(t){var e=new ve(t);return e.base64?pe(le.BASE64,e.rest):function(t){var e;try{e=decodeURIComponent(t)}catch(r){throw ue(le.DATA_URL,"Malformed data URL.")}return de(e)}(e.rest)}(e),new ve(e).contentType)}throw ne()}function de(t){for(var e=[],n=0;n>6,128|63&r);else if(55296===(64512&r))if(n>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 pe(t,e){switch(t){case le.BASE64:var n=-1!==e.indexOf("-"),i=-1!==e.indexOf("_");if(n||i)throw ue(t,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break;case le.BASE64URL:var o=-1!==e.indexOf("+"),a=-1!==e.indexOf("/");if(o||a)throw ue(t,"Invalid character '"+(o?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/")}var s;try{s=atob(e)}catch(r){throw ue(t,"Invalid character found")}for(var u=new Uint8Array(s.length),c=0;c][;base64],");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 ge,me={STATE_CHANGED:"state_changed"},ye={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function be(t){switch(t){case"running":case"pausing":case"canceling":return ye.RUNNING;case"paused":return ye.PAUSED;case"success":return ye.SUCCESS;case"canceled":return ye.CANCELED;case"error":default:return ye.ERROR}}!function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"}(ge||(ge={}));var _e=function(){function t(){var t=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=ge.NO_ERROR,this.sendPromise_=new Promise((function(e){t.xhr_.addEventListener("abort",(function(){t.errorCode_=ge.ABORT,e(t)})),t.xhr_.addEventListener("error",(function(){t.errorCode_=ge.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_},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 _e},t}(),ke=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,n){var i;try{i=t.makeFromUrl(e,n)}catch(r){return new t(e,"")}if(""===i.path)return i;throw new te("invalid-default-bucket","Invalid default bucket '"+e+"'.")},t.makeFromUrl=function(e,n){var r=null,i="([A-Za-z0-9.\\-_]+)";var o=new RegExp("^gs://"+i+"(/(.*))?$","i");function a(t){t.path_=decodeURIComponent(t.path)}for(var s=n.replace(/[.]/g,"\\."),u=[{regex:o,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?://"+s+"/v[A-Za-z0-9_]+/b/"+i+"/o(/([^?#]*).*)?$","i"),indices:{bucket:1,path:3},postModify:a},{regex:new RegExp("^https?://"+(n===Zt?"(?:storage.googleapis.com|storage.cloud.google.com)":n)+"/"+i+"/([^?#]*)","i"),indices:{bucket:1,path:2},postModify:a}],c=0;cn)throw oe("Invalid value for '"+t+"'. Expected "+n+" or less.")}function Ee(t,e){var n=e.match(/^(\w+):\/\/.+/),r=e;return null==(null===n||void 0===n?void 0:n[1])&&(r="https://"+e),r+"/v0"+t}function Ce(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)}var Ne=function(){function t(t,e,n,r,i,o,a,s,u,c,l){var h=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){h.resolve_=t,h.reject_=e,h.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=ne()).serverResponse=s.getResponseText(),t.errorCallback_?a(t.errorCallback_(s,i)):a(i)):n.canceled?a(i=t.appDelete_?ae():re()):a(i=new te("retry-limit-exceeded","Max retry time for operation exceeded, please try again."))}this.canceled_?e(0,new Pe(!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=500&&t<600,n=-1!==[408,429].indexOf(t),r=-1!==this.additionalRetryCodes_.indexOf(t);return e||n||r},t}(),Pe=function(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n};function Ae(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0}function De(){for(var t=[],e=0;e0&&(o.delimiter=n),r&&(o.pageToken=r),i&&(o.maxResults=i);var a=Ee(e.bucketOnlyServerUrl(),t.host),s=t.maxOperationRetryTime,u=new He(a,"GET",function(t,e){return function(n,r){var i=We(t,e,r);return Ke(null!==i),i}}(t,e.bucket),s);return u.urlParams=o,u.errorHandler=Qe(e),u}function Ze(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 tn=function(t,e,n,r){this.current=t,this.total=e,this.finalized=!!n,this.metadata=r||null};function en(t,e){var n=null;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch(r){Ke(!1)}return Ke(!!n&&-1!==(e||["active"]).indexOf(n)),n}var nn=262144;function rn(t,e,n,r,i,o,a,s){var u=new tn(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 te("server-file-wrong-size","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 h=u.current,f=h+l,d={"X-Goog-Upload-Command":l===c?"upload, finalize":"upload","X-Goog-Upload-Offset":u.current},p=r.slice(h,f);if(null===p)throw ie();var v=e.maxUploadRetryTime,g=new He(n,"POST",(function(t,n){var i,a=en(t,["active","final"]),s=u.current+l,c=r.size();return i="final"===a?Ye(e,o)(t,n):null,new tn(s,c,"final"===a,i)}),v);return g.headers=d,g.body=p.uploadData(),g.progressCallback=s||null,g.errorHandler=Qe(t),g}var on=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}};function an(t){return function(){for(var e=[],n=0;n262144},t.prototype._start=function(){"running"===this._state&&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;Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then((function(n){var r=n[0],i=n[1];switch(e._state){case"running":t(r,i);break;case"canceling":e._transition("canceled");break;case"pausing":e._transition("paused")}}))},t.prototype._createResumable=function(){var t=this;this._resolveToken((function(e,n){var i=function(t,e,n,i,o){var a=e.bucketOnlyServerUrl(),s=Ze(e,i,o),u={name:s.fullPath},c=Ee(a,t.host),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"},h=ze(s,n),f=t.maxUploadRetryTime,d=new He(c,"POST",(function(t){var e;en(t);try{e=t.getResponseHeader("X-Goog-Upload-URL")}catch(r){Ke(!1)}return Ke(Te(e)),e}),f);return d.urlParams=u,d.headers=l,d.body=h,d.errorHandler=Qe(e),d}(t._ref.storage,t._ref._location,t._mappings,t._blob,t._metadata),o=t._ref.storage._makeRequest(i,e,n);t._request=o,o.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,i){var o=function(t,e,n,i){var o=t.maxUploadRetryTime,a=new He(n,"POST",(function(t){var e=en(t,["active","final"]),n=null;try{n=t.getResponseHeader("X-Goog-Upload-Size-Received")}catch(r){Ke(!1)}n||Ke(!1);var o=Number(n);return Ke(!isNaN(o)),new tn(o,i.size(),"final"===e)}),o);return a.headers={"X-Goog-Upload-Command":"query"},a.errorHandler=Qe(e),a}(t._ref.storage,t._ref._location,e,t._blob),a=t._ref.storage._makeRequest(o,n,i);t._request=a,a.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=nn*this._chunkMultiplier,n=new tn(this._transferred,this._blob.size()),i=this._uploadUrl;this._resolveToken((function(o,a){var s;try{s=rn(t._ref._location,t._ref.storage,i,t._blob,e,t._mappings,n,t._makeProgressCallback())}catch(r){return t._error=r,void t._transition("error")}var u=t._ref.storage._makeRequest(s,o,a);t._request=u,u.getPromise().then((function(e){t._increaseMultiplier(),t._request=void 0,t._updateProgress(e.current),e.finalized?(t._metadata=e.metadata,t._transition("success")):t.completeTransitions_()}),t._errorHandler)}))},t.prototype._increaseMultiplier=function(){nn*this._chunkMultiplier<33554432&&(this._chunkMultiplier*=2)},t.prototype._fetchMetadata=function(){var t=this;this._resolveToken((function(e,n){var r=Xe(t._ref.storage,t._ref._location,t._mappings),i=t._ref.storage._makeRequest(r,e,n);t._request=i,i.getPromise().then((function(e){t._request=void 0,t._metadata=e,t._transition("success")}),t._metadataErrorHandler)}))},t.prototype._oneShotUpload=function(){var t=this;this._resolveToken((function(e,n){var r=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=Ze(e,r,i),c="--"+s+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+ze(u,n)+"\r\n--"+s+"\r\nContent-Type: "+u.contentType+"\r\n\r\n",l="\r\n--"+s+"--",h=Me.getBlob(c,r,l);if(null===h)throw ie();var f={name:u.fullPath},d=Ee(o,t.host),p=t.maxUploadRetryTime,v=new He(d,"POST",Ye(t,n),p);return v.urlParams=f,v.headers=a,v.body=h.uploadData(),v.errorHandler=Qe(e),v}(t._ref.storage,t._ref._location,t._mappings,t._blob,t._metadata),i=t._ref.storage._makeRequest(r,e,n);t._request=i,i.getPromise().then((function(e){t._request=void 0,t._metadata=e,t._updateProgress(t._blob.size()),t._transition("success")}),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"canceling":case"pausing":this._state=t,void 0!==this._request&&this._request.cancel();break;case"running":var e="paused"===this._state;this._state=t,e&&(this._notifyObservers(),this._start());break;case"paused":this._state=t,this._notifyObservers();break;case"canceled":this._error=re(),this._state=t,this._notifyObservers();break;case"error":case"success":this._state=t,this._notifyObservers()}},t.prototype.completeTransitions_=function(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start()}},Object.defineProperty(t.prototype,"snapshot",{get:function(){var t=be(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:t,metadata:this._metadata,task:this,ref:this._ref}},enumerable:!1,configurable:!0}),t.prototype.on=function(t,e,n,r){var i=this,o=new on(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;this._finishPromise(),this._observers.slice().forEach((function(e){t._notifyObserver(e)}))},t.prototype._finishPromise=function(){if(void 0!==this._resolve){var t=!0;switch(be(this._state)){case ye.SUCCESS:an(this._resolve.bind(null,this.snapshot))();break;case ye.CANCELED:case ye.ERROR:an(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(be(this._state)){case ye.RUNNING:case ye.PAUSED:t.next&&an(t.next.bind(t,this.snapshot))();break;case ye.SUCCESS:t.complete&&an(t.complete.bind(t))();break;case ye.CANCELED:case ye.ERROR:t.error&&an(t.error.bind(t,this._error))();break;default:t.error&&an(t.error.bind(t,this._error))()}},t.prototype.resume=function(){var t="paused"===this._state||"pausing"===this._state;return t&&this._transition("running"),t},t.prototype.pause=function(){var t="running"===this._state;return t&&this._transition("pausing"),t},t.prototype.cancel=function(){var t="running"===this._state||"pausing"===this._state;return t&&this._transition("canceling"),t},t}(),un=function(){function t(t,e){this._service=t,this._location=e instanceof ke?e:ke.makeFromUrl(e,t.host)}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 ke(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 je(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 ke(this._location.bucket,e);return new t(this._service,n)},enumerable:!1,configurable:!0}),t.prototype._throwIfRoot=function(t){if(""===this._location.path)throw se(t)},t}();function cn(t){var e={prefixes:[],items:[]};return ln(t,e).then((function(){return e}))}function ln(t,e,n){return Object(h.b)(this,void 0,void 0,(function(){var r,i,o;return Object(h.d)(this,(function(a){switch(a.label){case 0:return[4,hn(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,ln(t,e,r.nextPageToken)];case 2:a.sent(),a.label=3;case 3:return[2]}}))}))}function hn(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n,r;return Object(h.d)(this,(function(i){switch(i.label){case 0:return null!=e&&"number"===typeof e.maxResults&&Oe("options.maxResults",1,1e3,e.maxResults),n=e||{},r=Je(t.storage,t._location,"/",n.pageToken,n.maxResults),[4,t.storage.makeRequestWithTokens(r)];case 1:return[2,i.sent().getPromise()]}}))}))}function fn(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n;return Object(h.d)(this,(function(r){switch(r.label){case 0:return t._throwIfRoot("updateMetadata"),n=function(t,e,n,r){var i=Ee(e.fullServerUrl(),t.host),o=ze(n,r),a=t.maxOperationRetryTime,s=new He(i,"PATCH",Ye(t,r),a);return s.headers={"Content-Type":"application/json; charset=utf-8"},s.body=o,s.errorHandler=$e(e),s}(t.storage,t._location,e,Ve()),[4,t.storage.makeRequestWithTokens(n)];case 1:return[2,r.sent().getPromise()]}}))}))}function dn(t){return Object(h.b)(this,void 0,void 0,(function(){var e;return Object(h.d)(this,(function(n){switch(n.label){case 0:return t._throwIfRoot("getDownloadURL"),e=function(t,e,n){var r=Ee(e.fullServerUrl(),t.host),i=t.maxOperationRetryTime,o=new He(r,"GET",Ge(t,n),i);return o.errorHandler=$e(e),o}(t.storage,t._location,Ve()),[4,t.storage.makeRequestWithTokens(e)];case 1:return[2,n.sent().getPromise().then((function(t){if(null===t)throw new te("no-download-url","The given file does not have any download URLs.");return t}))]}}))}))}function pn(t){return Object(h.b)(this,void 0,void 0,(function(){var e;return Object(h.d)(this,(function(n){switch(n.label){case 0:return t._throwIfRoot("deleteObject"),e=function(t,e){var n=Ee(e.fullServerUrl(),t.host),r=t.maxOperationRetryTime,i=new He(n,"DELETE",(function(t,e){}),r);return i.successCodes=[200,204],i.errorHandler=$e(e),i}(t.storage,t._location),[4,t.storage.makeRequestWithTokens(e)];case 1:return[2,n.sent().getPromise()]}}))}))}function vn(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 ke(t._location.bucket,n);return new un(t.storage,r)}function gn(t){return/^[A-Za-z]+:\/\//.test(t)}function mn(t,e){if(t instanceof _n){var n=t;if(null==n._bucket)throw new te("no-default-bucket","No default bucket found. Did you set the 'storageBucket' property when initializing the app?");var r=new un(n,n._bucket);return null!=e?mn(r,e):r}if(void 0!==e){if(e.includes(".."))throw oe('`path` param cannot contain ".."');return vn(t,e)}return t}function yn(t,e){if(e&&gn(e)){if(t instanceof _n)return new un(t,e);throw oe("To use ref(service, url), the first argument must be a Storage instance.")}return mn(t,e)}function bn(t,e){var n=null===e||void 0===e?void 0:e.storageBucket;return null==n?null:ke.makeFromBucketSpec(n,t)}var _n=function(){function t(t,e,n,r,i,o){this.app=t,this._authProvider=e,this._appCheckProvider=n,this._pool=r,this._url=i,this._firebaseVersion=o,this._bucket=null,this._host=Zt,this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=i?ke.makeFromBucketSpec(i,this._host):bn(this._host,this.app.options)}return Object.defineProperty(t.prototype,"host",{get:function(){return this._host},set:function(t){this._host=t,null!=this._url?this._bucket=ke.makeFromBucketSpec(this._url,t):this._bucket=bn(t,this.app.options)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxUploadRetryTime",{get:function(){return this._maxUploadRetryTime},set:function(t){Oe("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){Oe("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t},enumerable:!1,configurable:!0}),t.prototype._getAuthToken=function(){return Object(h.b)(this,void 0,void 0,(function(){var t,e;return Object(h.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._getAppCheckToken=function(){return Object(h.b)(this,void 0,void 0,(function(){var t;return Object(h.d)(this,(function(e){switch(e.label){case 0:return(t=this._appCheckProvider.getImmediate({optional:!0}))?[4,t.getToken()]:[3,2];case 1:return[2,e.sent().token];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 un(this,t)},t.prototype._makeRequest=function(t,e,n){var r=this;if(this._deleted)return new Se(ae());var i=function(t,e,n,r,i,o){var a=Ce(t.urlParams),s=t.url+a,u=Object.assign({},t.headers);return function(t,e){e&&(t["X-Firebase-GMPID"]=e)}(u,e),function(t,e){null!==e&&e.length>0&&(t.Authorization="Firebase "+e)}(u,n),function(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(null!==e&&void 0!==e?e:"AppManager")}(u,o),function(t,e){null!==e&&(t["X-Firebase-AppCheck"]=e)}(u,r),new Ne(s,t.method,u,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,i)}(t,this._appId,e,n,this._pool,this._firebaseVersion);return this._requests.add(i),i.getPromise().then((function(){return r._requests.delete(i)}),(function(){return r._requests.delete(i)})),i},t.prototype.makeRequestWithTokens=function(t){return Object(h.b)(this,void 0,void 0,(function(){var e,n,r;return Object(h.d)(this,(function(i){switch(i.label){case 0:return[4,Promise.all([this._getAuthToken(),this._getAppCheckToken()])];case 1:return e=i.sent(),n=e[0],r=e[1],[2,this._makeRequest(t,n,r)]}}))}))},t}();function wn(t,e,n){return function(t,e,n){return t._throwIfRoot("uploadBytesResumable"),new sn(t,new Me(e),n)}(t=Object(a.q)(t),e,n)}function kn(t){return function(t){return Object(h.b)(this,void 0,void 0,(function(){var e;return Object(h.d)(this,(function(n){switch(n.label){case 0:return t._throwIfRoot("getMetadata"),e=Xe(t.storage,t._location,Ve()),[4,t.storage.makeRequestWithTokens(e)];case 1:return[2,n.sent().getPromise()]}}))}))}(t=Object(a.q)(t))}function Sn(t,e){return yn(t=Object(a.q)(t),e)}var Tn=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}(),In=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)}return Object.defineProperty(t.prototype,"snapshot",{get:function(){return new Tn(this._delegate.snapshot,this,this._ref)},enumerable:!1,configurable:!0}),t.prototype.then=function(t,e){var n=this;return this._delegate.then((function(e){if(t)return t(new Tn(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 Tn(t,i,i._ref))}:{next:e.next?function(t){return e.next(new Tn(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}(),xn=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 On(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 On(e,t._service)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextPageToken",{get:function(){return this._delegate.nextPageToken||null},enumerable:!1,configurable:!0}),t}(),On=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(function(t,e){return vn(t,e)}(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 In(wn(this._delegate,t,e),this)},t.prototype.putString=function(t,e,n){void 0===e&&(e=le.RAW),this._throwIfRoot("putString");var r=fe(e,t),i=Object(h.a)({},n);return null==i.contentType&&null!=r.contentType&&(i.contentType=r.contentType),new In(new sn(this._delegate,new Me(r.data,!0),i),this)},t.prototype.listAll=function(){var t,e=this;return(t=this._delegate,cn(t=Object(a.q)(t))).then((function(t){return new xn(t,e.storage)}))},t.prototype.list=function(t){var e=this;return function(t,e){return hn(t=Object(a.q)(t),e)}(this._delegate,t||void 0).then((function(t){return new xn(t,e.storage)}))},t.prototype.getMetadata=function(){return kn(this._delegate)},t.prototype.updateMetadata=function(t){return function(t,e){return fn(t=Object(a.q)(t),e)}(this._delegate,t)},t.prototype.getDownloadURL=function(){return t=this._delegate,dn(t=Object(a.q)(t));var t},t.prototype.delete=function(){return this._throwIfRoot("delete"),t=this._delegate,pn(t=Object(a.q)(t));var t},t.prototype._throwIfRoot=function(t){if(""===this._delegate._location.path)throw se(t)},t}(),En=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 On(Sn(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{ke.makeFromUrl(t,this._delegate.host)}catch(r){throw oe("refFromUrl() expected a valid full URL but got an invalid one.")}return new On(Sn(this._delegate,t),this)},t.prototype.setMaxUploadRetryTime=function(t){this._delegate.maxUploadRetryTime=t},t.prototype.setMaxOperationRetryTime=function(t){this._delegate.maxOperationRetryTime=t},t.prototype.useEmulator=function(t,e){!function(t,e,n){t.host="http://"+e+":"+n}(this._delegate,t,e)},t}();function Cn(t,e){var n=e.instanceIdentifier,r=t.getProvider("app").getImmediate(),i=t.getProvider("auth-internal"),a=t.getProvider("app-check-internal");return new En(r,new _n(r,i,a,new we,n,o.a.SDK_VERSION))}!function(t){var e={TaskState:ye,TaskEvent:me,StringFormat:le,Storage:_n,Reference:On};t.INTERNAL.registerComponent(new c.a("storage",Cn,"PUBLIC").setServiceProps(e).setMultipleInstances(!0)),t.registerVersion("@firebase/storage","0.5.2")}(o.a);var Nn,Pn,An,Dn="0.4.12",Mn=Dn,Rn="FB-PERF-TRACE-MEASURE",jn="_wt_",Ln="_fcp",Fn="_fid",Un="@firebase/performance/config",Vn="@firebase/performance/configexpire",qn="Performance",Bn=((Nn={})["trace started"]="Trace {$traceName} was started before.",Nn["trace stopped"]="Trace {$traceName} is not running.",Nn["nonpositive trace startTime"]="Trace {$traceName} startTime should be positive.",Nn["nonpositive trace duration"]="Trace {$traceName} duration should be positive.",Nn["no window"]="Window is not available.",Nn["no app id"]="App id is not available.",Nn["no project id"]="Project id is not available.",Nn["no api key"]="Api key is not available.",Nn["invalid cc log"]="Attempted to queue invalid cc event",Nn["FB not default"]="Performance can only start when Firebase app instance is the default one.",Nn["RC response not ok"]="RC response is not ok",Nn["invalid attribute name"]="Attribute name {$attributeName} is invalid.",Nn["invalid attribute value"]="Attribute value {$attributeValue} is invalid.",Nn["invalid custom metric name"]="Custom metric name {$customMetricName} is invalid",Nn["invalid String merger input"]="Input for String merger is invalid, contact support team to resolve.",Nn),zn=new a.b("performance",qn,Bn),Wn=new s.b(qn);Wn.logLevel=s.a.INFO;var Hn,Kn=function(){function t(t){if(this.window=t,!t)throw zn.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.y)()||(Wn.info("IndexedDB is not supported by current browswer"),!1):(Wn.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();n1)throw zn.create("invalid String merger input");for(var r=[],i=0;ii&&r.push(e.charAt(i));return r.join("")}var Gn,Qn,$n=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=Yn("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),this.transportKey=Yn("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 zn.create("no app id");return t},t.prototype.getProjectId=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.projectId;if(!t)throw zn.create("no project id");return t},t.prototype.getApiKey=function(){var t=this.firebaseAppInstance&&this.firebaseAppInstance.options&&this.firebaseAppInstance.options.apiKey;if(!t)throw zn.create("no api key");return t},t.prototype.getFlTransportFullUrl=function(){return this.flTransportEndpointUrl.concat("?key=",this.transportKey)},t.getInstance=function(){return void 0===Hn&&(Hn=new t),Hn},t}();function Xn(){return Gn}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.VISIBLE=1]="VISIBLE",t[t.HIDDEN=2]="HIDDEN"}(Qn||(Qn={}));var Jn=["firebase_","google_","ga_"],Zn=new RegExp("^[a-zA-Z]\\w*$");function tr(){var t=Kn.getInstance().navigator;return"serviceWorker"in t?t.serviceWorker.controller?2:3:1}function er(){switch(Kn.getInstance().document.visibilityState){case"visible":return Qn.VISIBLE;case"hidden":return Qn.HIDDEN;default:return Qn.UNKNOWN}}function nr(){var t=Kn.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 rr="0.0.1",ir=!0,or="FIREBASE_INSTALLATIONS_AUTH";function ar(t){var e=function(){var t=Kn.getInstance().localStorage;if(!t)return;var e=t.getItem(Vn);if(!e||(n=e,!(Number(n)>Date.now())))return;var n;var r=t.getItem(Un);if(!r)return;try{return JSON.parse(r)}catch(i){return}}();return e?(ur(e),Promise.resolve()):function(t){return function(){var t=$n.getInstance().installationsService.getToken();return t.then((function(t){})),t}().then((function(e){var n="https://firebaseremoteconfig.googleapis.com/v1/projects/"+$n.getInstance().getProjectId()+"/namespaces/fireperf:fetch?key="+$n.getInstance().getApiKey(),r=new Request(n,{method:"POST",headers:{Authorization:or+" "+e},body:JSON.stringify({app_instance_id:t,app_instance_id_token:e,app_id:$n.getInstance().getAppId(),app_version:Mn,sdk_version:rr})});return fetch(r).then((function(t){if(t.ok)return t.json();throw zn.create("RC response not ok")}))})).catch((function(){Wn.info(sr)}))}(t).then(ur).then((function(t){return function(t){var e=Kn.getInstance().localStorage;if(!t||!e)return;e.setItem(Un,JSON.stringify(t)),e.setItem(Vn,String(Date.now()+60*$n.getInstance().configTimeToLive*60*1e3))}(t)}),(function(){}))}var sr="Could not fetch config, will use default configs";function ur(t){if(!t)return t;var e=$n.getInstance(),n=t.entries||{};return void 0!==n.fpr_enabled?e.loggingEnabled="true"===String(n.fpr_enabled):e.loggingEnabled=ir,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=cr(e.tracesSamplingRate),e.logNetworkAfterSampling=cr(e.networkRequestsSamplingRate),t}function cr(t){return Math.random()<=t}var lr,hr=1;function fr(){return hr=2,lr=lr||function(){var t=Kn.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=$n.getInstance().installationsService.getId();return t.then((function(t){Gn=t})),t}()})).then((function(t){return ar(t)})).then((function(){return dr()}),(function(){return dr()}))}function dr(){hr=3}var pr,vr=1e4,gr=3,mr=[],yr=!1;function br(t){setTimeout((function(){if(0!==gr)return mr.length?void function(){var t=mr.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=$n.getInstance().getFlTransportFullUrl();return fetch(e,{method:"POST",body:JSON.stringify(t)})}(t).then((function(t){return t.ok||Wn.info("Call to Firebase backend failed."),t.json()})).then((function(t){var n=Number(t.nextRequestWaitMillis),r=vr;isNaN(n)||(r=Math.max(n,r));var i=t.logResponseDetails;Array.isArray(i)&&i.length>0&&"RETRY_REQUEST_LATER"===i[0].responseAction&&(mr=Object(h.f)(Object(h.f)([],e),mr),Wn.info("Retry transport request later.")),gr=3,br(r)}))})({request_time_ms:String(Date.now()),client_info:{client_type:1,js_client_info:{}},log_source:$n.getInstance().logSource,log_event:e},t).catch((function(){mr=Object(h.f)(Object(h.f)([],t),mr),gr--,Wn.info("Tries left: "+gr+"."),br(vr)}))}():br(vr)}),t)}function _r(t){if(!t.eventTime||!t.message)throw zn.create("invalid cc log");mr=Object(h.f)(Object(h.f)([],mr),[t])}function wr(t,e){pr||(pr=function(t){return function(){for(var e=[],n=0;n100||!(r&&r.startsWith(jn)&&xr.indexOf(n)>-1)&&n.startsWith("_"))throw zn.create("invalid custom metric name",{customMetricName:t});var n,r;this.counters[t]=function(t){var e=Math.floor(t);return e40)&&!Jn.some((function(t){return n.startsWith(t)}))&&!!n.match(Zn),i=function(t){return 0!==t.length&&t.length<=100}(e);if(r&&i)this.customAttributes[t]=e;else{if(!r)throw zn.create("invalid attribute name",{attributeName:t});if(!i)throw zn.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(h.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=Kn.getInstance().getUrl();if(i){var o=new t(jn+i,!0),a=Math.floor(1e3*Kn.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(Ln,Math.floor(1e3*u.startTime)),r&&o.putMetric(Fn,Math.floor(1e3*r))}kr(o)}},t.createUserTimingTrace=function(e){kr(new t(e,!1,e))},t}();function Er(t){var e=t;if(e&&void 0!==e.responseStart){var n=Kn.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=$n.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 wr(t,0)}),0)}}({url:e.name&&e.name.split("?")[0],responsePayloadBytes:e.transferSize,startTimeUs:r,timeToResponseInitiatedUs:i,timeToResponseCompletedUs:o})}}function Cr(){Xn()&&(setTimeout((function(){return function(){var t=Kn.getInstance(),e=t.getEntriesByType("navigation"),n=t.getEntriesByType("paint");if(t.onFirstInputDelay){var r=setTimeout((function(){Or.createOobTrace(e,n),r=void 0}),5e3);t.onFirstInputDelay((function(t){r&&(clearTimeout(r),Or.createOobTrace(e,n,t))}))}else Or.createOobTrace(e,n)}()}),0),setTimeout((function(){return function(){for(var t=Kn.getInstance(),e=t.getEntriesByType("resource"),n=0,r=e;n0){var e=t.map((function(t,e){return"("+(e+1)+") "+t})).join(" "),n=qr.create("invalid-analytics-context",{errorInfo:e});jr.warn(n.message)}}();var n=t.options.appId;if(!n)throw qr.create("no-app-id");if(!t.options.apiKey){if(!t.options.measurementId)throw qr.create("no-api-key");jr.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!=Xr[n])throw qr.create("already-exists",{id:n});if(!ni){!function(t){var e=[];Array.isArray(window[t])?e=window[t]:window[t]=e}(ti);var r=Ur(Xr,Jr,Zr,ti,ei),i=r.wrappedGtag,o=r.gtagCore;$r=i,Qr=o,ni=!0}return Xr[n]=Gr(t,Jr,Zr,e,Qr,ti),{app:t,logEvent:function(t,e,r){(function(t,e,n,r,i){return Object(h.b)(this,void 0,void 0,(function(){var o,a;return Object(h.d)(this,(function(s){switch(s.label){case 0:return i&&i.global?(t(Ar.EVENT,n,r),[2]):[3,1];case 1:return[4,e];case 2:o=s.sent(),a=Object(h.a)(Object(h.a)({},r),{send_to:o}),t(Ar.EVENT,n,a),s.label=3;case 3:return[2]}}))}))})($r,Xr[n],t,e,r).catch((function(t){return jr.error(t)}))},setCurrentScreen:function(t,e){(function(t,e,n,r){return Object(h.b)(this,void 0,void 0,(function(){var i;return Object(h.d)(this,(function(o){switch(o.label){case 0:return r&&r.global?(t(Ar.SET,{screen_name:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,e];case 2:i=o.sent(),t(Ar.CONFIG,i,{update:!0,screen_name:n}),o.label=3;case 3:return[2]}}))}))})($r,Xr[n],t,e).catch((function(t){return jr.error(t)}))},setUserId:function(t,e){(function(t,e,n,r){return Object(h.b)(this,void 0,void 0,(function(){var i;return Object(h.d)(this,(function(o){switch(o.label){case 0:return r&&r.global?(t(Ar.SET,{user_id:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,e];case 2:i=o.sent(),t(Ar.CONFIG,i,{update:!0,user_id:n}),o.label=3;case 3:return[2]}}))}))})($r,Xr[n],t,e).catch((function(t){return jr.error(t)}))},setUserProperties:function(t,e){(function(t,e,n,r){return Object(h.b)(this,void 0,void 0,(function(){var i,o,a,s,u;return Object(h.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=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}(),vi=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=s.a.DEBUG;break;case"silent":this._logger.logLevel=s.a.SILENT;break;default:this._logger.logLevel=s.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(h.b)(this,void 0,void 0,(function(){var t,e,n;return Object(h.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(h.b)(this,void 0,void 0,(function(){var t,e,n,r=this;return Object(h.d)(this,(function(i){switch(i.label){case 0:t=new fi,setTimeout((function(){return Object(h.b)(r,void 0,void 0,(function(){return Object(h.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]}}))}))},t.prototype.fetchAndActivate=function(){return Object(h.b)(this,void 0,void 0,(function(){return Object(h.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(h.a)(Object(h.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 pi("remote",e[t]):this.defaultConfig&&void 0!==this.defaultConfig[t]?new pi("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 pi("static"))},t}();function gi(t,e){var n=t.target.error||void 0;return li.create(e,{originalErrorMessage:n&&n.message})}var mi="app_namespace_store";var yi=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(gi(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(mi,{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(h.b)(this,void 0,void 0,(function(){var e,n=this;return Object(h.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([mi],"readonly").objectStore(mi),s=n.createCompositeKey(t);try{var u=a.get(s);u.onerror=function(t){o(gi(t,"storage-get"))},u.onsuccess=function(t){var e=t.target.result;i(e?e.value:void 0)}}catch(r){o(li.create("storage-get",{originalErrorMessage:r&&r.message}))}}))]}}))}))},t.prototype.set=function(t,e){return Object(h.b)(this,void 0,void 0,(function(){var n,i=this;return Object(h.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([mi],"readwrite").objectStore(mi),u=i.createCompositeKey(t);try{var c=s.put({compositeKey:u,value:e});c.onerror=function(t){a(gi(t,"storage-set"))},c.onsuccess=function(){o()}}catch(r){a(li.create("storage-set",{originalErrorMessage:r&&r.message}))}}))]}}))}))},t.prototype.delete=function(t){return Object(h.b)(this,void 0,void 0,(function(){var e,n=this;return Object(h.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([mi],"readwrite").objectStore(mi),s=n.createCompositeKey(t);try{var u=a.delete(s);u.onerror=function(t){o(gi(t,"storage-delete"))},u.onsuccess=function(){i()}}catch(r){o(li.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(h.b)(this,void 0,void 0,(function(){var t,e,n,r,i,o;return Object(h.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 _i(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 wi,ki=function(){function t(t,e){this.client=t,this.storage=e}return t.prototype.fetch=function(t){return Object(h.b)(this,void 0,void 0,(function(){var e;return Object(h.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(h.b)(this,void 0,void 0,(function(){var e,i,o;return Object(h.d)(this,(function(s){switch(s.label){case 0:return[4,_i(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]}}))}))},t}(),Si="@firebase/remote-config";(wi=o.a).INTERNAL.registerComponent(new c.a("remoteConfig",(function(t,e){var n=e.instanceIdentifier,r=t.getProvider("app").getImmediate(),i=t.getProvider("installations").getImmediate();if("undefined"===typeof window)throw li.create("registration-window");var o=r.options,a=o.projectId,u=o.apiKey,c=o.appId;if(!a)throw li.create("registration-project-id");if(!u)throw li.create("registration-api-key");if(!c)throw li.create("registration-app-id");n=n||"firebase";var l=new yi(c,r.name,n),h=new bi(l),f=new s.b(Si);f.logLevel=s.a.ERROR;var d=new hi(i,wi.SDK_VERSION,n,a,u,c),p=new ki(d,l),v=new ui(p,l,h,f),g=new vi(r,v,h,l,f);return g.ensureInitialized(),g}),"PUBLIC").setMultipleInstances(!0)),wi.registerVersion(Si,"0.1.37");o.a.registerVersion("firebase","8.5.0","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 with the name of a component - i.e. auth, database, etc):\n\nCommonJS Modules:\nconst firebase = require('firebase/app');\nrequire('firebase/');\n\nES Modules:\nimport firebase from 'firebase/app';\nimport 'firebase/';\n\nTypescript:\nimport firebase from 'firebase/app';\nimport 'firebase/';\n"),o.a.registerVersion("firebase","8.5.0")},function(t,e,n){var r=n(72),i=n(73),o=n(74),a=n(75),s=n(76);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e1)for(var n=1;n-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(9),i=n(40),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||(a.test(t)||!o.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(15),i=n(16);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Chart",{enumerable:!0,get:function(){return o.default}}),e.defaults=e.Scatter=e.Bubble=e.Polar=e.Radar=e.HorizontalBar=e.Bar=e.Line=e.Pie=e.Doughnut=e.default=void 0;var r=u(n(10)),i=u(n(65)),o=u(n(68)),a=u(n(70)),s=u(n(132));function u(t){return t&&t.__esModule?t:{default:t}}function c(){return(c=Object.assign||function(t){for(var e=1;e=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function f(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 d(t){for(var e=1;e1;if(e&&i&&!r){var o=!1;t.forEach((function(t){t.label||(o=!0)})),o&&console.error('[react-chartjs-2] Warning: Each dataset needs a unique key. By default, the "label" property on each dataset is used. Alternatively, you may provide a "datasetKeyProvider" as a prop that returns a unique key.')}}},{key:"getCurrentDatasets",value:function(){return this.chartInstance&&this.chartInstance.config.data&&this.chartInstance.config.data.datasets||[]}},{key:"saveCurrentDatasets",value:function(){var t=this;this.datasets=this.datasets||{},this.getCurrentDatasets().forEach((function(e){t.datasets[t.props.datasetKeyProvider(e)]=e}))}},{key:"updateChart",value:function(){var t=this,e=this.props.options,n=this.memoizeDataProps(this.props);if(this.chartInstance){e&&(this.chartInstance.options=o.default.helpers.configMerge(this.chartInstance.options,e));var r=this.getCurrentDatasets(),i=n.datasets||[];this.checkDatasets(r);var a=(0,s.default)(r,this.props.datasetKeyProvider);this.chartInstance.config.data.datasets=i.map((function(e){var n=a[t.props.datasetKeyProvider(e)];if(n&&n.type===e.type&&e.data){n.data.splice(e.data.length),e.data.forEach((function(t,r){n.data[r]=e.data[r]}));e.data;var r=h(e,["data"]);return d(d({},n),r)}return e}));n.datasets;var u=h(n,["datasets"]);this.chartInstance.config.data=d(d({},this.chartInstance.config.data),u),this.chartInstance.update()}}},{key:"renderChart",value:function(){var t=this.props,e=t.options,r=t.legend,i=t.type,s=t.plugins,u=this.element,c=this.memoizeDataProps();"undefined"===typeof r||(0,a.default)(n.defaultProps.legend,r)||(e.legend=r),this.chartInstance=new o.default(u,{type:i,data:c,options:e,plugins:s})}},{key:"destroyChart",value:function(){if(this.chartInstance){this.saveCurrentDatasets();var t=Object.values(this.datasets);this.chartInstance.config.data.datasets=t,this.chartInstance.destroy()}}},{key:"render",value:function(){var t=this.props,e=t.height,n=t.width,i=t.id;return r.default.createElement("canvas",{ref:this.ref,height:e,width:n,id:i,onClick:this.handleOnClick})}}]),n}(r.default.Component);S(I,"getLabelAsKey",(function(t){return t.label})),S(I,"propTypes",{data:i.default.oneOfType([i.default.object,i.default.func]).isRequired,getDatasetAtEvent:i.default.func,getElementAtEvent:i.default.func,getElementsAtEvent:i.default.func,height:i.default.number,legend:i.default.object,onElementsClick:i.default.func,options:i.default.object,plugins:i.default.arrayOf(i.default.object),redraw:i.default.bool,type:function(t,e,n){if(!o.default.controllers[t[e]])return new Error("Invalid chart type `"+t[e]+"` supplied to `"+n+"`.")},width:i.default.number,datasetKeyProvider:i.default.func}),S(I,"defaultProps",{legend:{display:!0,position:"bottom"},type:"doughnut",height:150,width:300,redraw:!1,options:{},datasetKeyProvider:I.getLabelAsKey});var x=I;e.default=x;var O=function(t){m(n,t);var e=b(n);function n(){return p(this,n),e.apply(this,arguments)}return g(n,[{key:"render",value:function(){var t=this;return r.default.createElement(I,c({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"doughnut"}))}}]),n}(r.default.Component);e.Doughnut=O;var E=function(t){m(n,t);var e=b(n);function n(){return p(this,n),e.apply(this,arguments)}return g(n,[{key:"render",value:function(){var t=this;return r.default.createElement(I,c({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"pie"}))}}]),n}(r.default.Component);e.Pie=E;var C=function(t){m(n,t);var e=b(n);function n(){return p(this,n),e.apply(this,arguments)}return g(n,[{key:"render",value:function(){var t=this;return r.default.createElement(I,c({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"line"}))}}]),n}(r.default.Component);e.Line=C;var N=function(t){m(n,t);var e=b(n);function n(){return p(this,n),e.apply(this,arguments)}return g(n,[{key:"render",value:function(){var t=this;return r.default.createElement(I,c({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"bar"}))}}]),n}(r.default.Component);e.Bar=N;var P=function(t){m(n,t);var e=b(n);function n(){return p(this,n),e.apply(this,arguments)}return g(n,[{key:"render",value:function(){var t=this;return r.default.createElement(I,c({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"horizontalBar"}))}}]),n}(r.default.Component);e.HorizontalBar=P;var A=function(t){m(n,t);var e=b(n);function n(){return p(this,n),e.apply(this,arguments)}return g(n,[{key:"render",value:function(){var t=this;return r.default.createElement(I,c({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"radar"}))}}]),n}(r.default.Component);e.Radar=A;var D=function(t){m(n,t);var e=b(n);function n(){return p(this,n),e.apply(this,arguments)}return g(n,[{key:"render",value:function(){var t=this;return r.default.createElement(I,c({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"polarArea"}))}}]),n}(r.default.Component);e.Polar=D;var M=function(t){m(n,t);var e=b(n);function n(){return p(this,n),e.apply(this,arguments)}return g(n,[{key:"render",value:function(){var t=this;return r.default.createElement(I,c({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"bubble"}))}}]),n}(r.default.Component);e.Bubble=M;var R=function(t){m(n,t);var e=b(n);function n(){return p(this,n),e.apply(this,arguments)}return g(n,[{key:"render",value:function(){var t=this;return r.default.createElement(I,c({},this.props,{ref:function(e){return t.chartInstance=e&&e.chartInstance},type:"scatter"}))}}]),n}(r.default.Component);e.Scatter=R;var j=o.default.defaults;e.defaults=j}).call(this,n(31))},function(t,e,n){var r=n(18),i=n(77),o=n(78),a=n(79),s=n(80),u=n(81);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},function(t,e){t.exports=function(t,e){return t===e||t!==t&&e!==e}},function(t,e,n){var r=n(15),i=n(35);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(21))},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},function(t,e,n){var r=n(100),i=n(103),o=n(104);t.exports=function(t,e,n,a,s,u){var c=1&n,l=t.length,h=e.length;if(l!=h&&!(c&&h>l))return!1;var f=u.get(t),d=u.get(e);if(f&&d)return f==e&&d==t;var p=-1,v=!0,g=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++p-1&&t%1==0&&t