1(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{dB9c:function(e,t,n){"use strict";n.r(t);var r=n("wj3C"),o=n.n(r),i=n("S+S0"),s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(s,a)}c((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(a){i=[6,a],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}var f,l=n("zVF4"),d=n("nbvr"),p=((f={})["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',f["not-registered"]="Firebase Installation is not registered.",f["installation-not-found"]="Firebase Installation not found.",f["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',f["app-offline"]="Could not process request. Application offline.",f["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",f),h=new l.ErrorFactory("installations","Installations",p);function g(e){return e instanceof l.FirebaseError&&e.code.includes("request-failed")}function b(e){return"https://firebaseinstallations.googleapis.com/v1/projects/"+e.projectId+"/installations"}function v(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}function y(e,t){return a(this,void 0,void 0,(function(){var n,r;return c(this,(function(o){switch(o.label){case 0:return[4,t.json()];case 1:return n=o.sent(),[2,h.create("request-failed",{requestName:e,serverCode:(r=n.error).code,serverMessage:r.message,serverStatus:r.status})]}}))}))}function w(e){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey})}function m(e,t){var n=t.refreshToken,r=w(e);return r.append("Authorization",function(e){return"FIS_v2 "+e}(n)),r}function k(e){return a(this,void 0,void 0,(function(){var t;return c(this,(function(n){switch(n.label){case 0:return[4,e()];case 1:return(t=n.sent()).status>=500&&t.status<600?[2,e()]:[2,t]}}))}))}function S(e,t){var n=t.fid;return a(this,void 0,void 0,(function(){var t,r,o,i,s;return c(this,(function(a){switch(a.label){case 0:return t=b(e),r=w(e),o={method:"POST",headers:r,body:JSON.stringify({fid:n,authVersion:"FIS_v2",appId:e.appId,sdkVersion:"w:0.3.8"})},[4,k((function(){return fetch(t,o)}))];case 1:return(i=a.sent()).ok?[4,i.json()]:[3,3];case 2:return[2,{fid:(s=a.sent()).fid||n,registrationStatus:2,refreshToken:s.refreshToken,authToken:v(s.authToken)}];case 3:return[4,y("Create Installation",i)];case 4:throw a.sent()}}))}))}function T(e){return new Promise((function(t){setTimeout(t,e)}))}var _=/^[cdef][\w-]{21}$/;function P(){try{var e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;var t=function(e){return(t=e,btoa(String.fromCharCode.apply(String,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e}(t))).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22);var t}(e);return _.test(t)?t:""}catch(n){return""}}var I,D="firebase-installations-store",C=null;function M(){return C||(C=Object(d.openDb)("firebase-installations-database",1,(function(e){switch(e.oldVersion){case 0:e.createObjectStore(D)}}))),C}function j(e,t){return a(this,void 0,void 0,(function(){var n,r,o;return c(this,(function(i){switch(i.label){case 0:return n=E(e),[4,M()];case 1:return r=i.sent(),[4,(o=r.transaction(D,"readwrite")).objectStore(D).put(t,n)];case 2:return i.sent(),[4,o.complete];case 3:return i.sent(),[2,t]}}))}))}function x(e){return a(this,void 0,void 0,(function(){var t,n,r;return c(this,(function(o){switch(o.label){case 0:return t=E(e),[4,M()];case 1:return n=o.sent(),[4,(r=n.transaction(D,"readwrite")).objectStore(D).delete(t)];case 2:return o.sent(),[4,r.complete];case 3:return o.sent(),[2]}}))}))}function N(e,t){return a(this,void 0,void 0,(function(){var n,r,o,i,s,a;return c(this,(function(c){switch(c.label){case 0:return n=E(e),[4,M()];case 1:return r=c.sent(),o=r.transaction(D,"readwrite"),[4,(i=o.objectStore(D)).get(n)];case 2:return s=c.sent(),void 0!==(a=t(s))?[3,4]:[4,i.delete(n)];case 3:return c.sent(),[3,6];case 4:return[4,i.put(a,n)];case 5:c.sent(),c.label=6;case 6:return[4,o.complete];case 7:return c.sent(),[2,a]}}))}))}function E(e){return e.appName+"!"+e.appId}function K(e){return a(this,void 0,void 0,(function(){var t,n,r;return c(this,(function(o){switch(o.label){case 0:return[4,N(e,(function(n){var r=function(e){return V(e||{fid:P(),registrationStatus:0})}(n),o=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine)return{installationEntry:t,registrationPromise:Promise.reject(h.create("app-offline"))};var n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()};return{installationEntry:n,registrationPromise:function(e,t){return a(this,void 0,void 0,(function(){var n,r;return c(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,7]),[4,S(e,t)];case 1:return n=o.sent(),[2,j(e,n)];case 2:return g(r=o.sent())&&409===r.serverCode?[4,x(e)]:[3,4];case 3:return o.sent(),[3,6];case 4:return[4,j(e,{fid:t.fid,registrationStatus:0})];case 5:o.sent(),o.label=6;case 6:throw r;case 7:return[2]}}
1))}))}(e,n)}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:O(e)}:{installationEntry:t}}(e,r);return t=o.registrationPromise,o.installationEntry}))];case 1:return""!==(n=o.sent()).fid?[3,3]:(r={},[4,t]);case 2:return[2,(r.installationEntry=o.sent(),r)];case 3:return[2,{installationEntry:n,registrationPromise:t}]}}))}))}function O(e){return a(this,void 0,void 0,(function(){var t,n,r,o;return c(this,(function(i){switch(i.label){case 0:return[4,A(e)];case 1:t=i.sent(),i.label=2;case 2:return 1!==t.registrationStatus?[3,5]:[4,T(100)];case 3:return i.sent(),[4,A(e)];case 4:return t=i.sent(),[3,2];case 5:return 0!==t.registrationStatus?[3,7]:[4,K(e)];case 6:return n=i.sent(),r=n.installationEntry,(o=n.registrationPromise)?[2,o]:[2,r];case 7:return[2,t]}}))}))}function A(e){return N(e,(function(e){if(!e)throw h.create("installation-not-found");return V(e)}))}function V(e){return 1===(t=e).registrationStatus&&t.registrationTime+1e4<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}function q(e,t){var n=e.appConfig,r=e.platformLoggerProvider;return a(this,void 0,void 0,(function(){var e,o,i,s,a;return c(this,(function(c){switch(c.label){case 0:return e=function(e,t){var n=t.fid;return b(e)+"/"+n+"/authTokens:generate"}(n,t),o=m(n,t),(i=r.getImmediate({optional:!0}))&&o.append("x-firebase-client",i.getPlatformInfoString()),s={method:"POST",headers:o,body:JSON.stringify({installation:{sdkVersion:"w:0.3.8"}})},[4,k((function(){return fetch(e,s)}))];case 1:return(a=c.sent()).ok?[4,a.json()]:[3,3];case 2:return[2,v(c.sent())];case 3:return[4,y("Generate Auth Token",a)];case 4:throw c.sent()}}))}))}function F(e,t){return void 0===t&&(t=!1),a(this,void 0,void 0,(function(){var n,r,o;return c(this,(function(i){switch(i.label){case 0:return[4,N(e.appConfig,(function(r){if(!W(r))throw h.create("not-registered");var o,i=r.authToken;if(!t&&2===(o=i).requestStatus&&!function(e){var t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+36e5}(o))return r;if(1===i.requestStatus)return n=function(e,t){return a(this,void 0,void 0,(function(){var n,r;return c(this,(function(o){switch(o.label){case 0:return[4,U(e.appConfig)];case 1:n=o.sent(),o.label=2;case 2:return 1!==n.authToken.requestStatus?[3,5]:[4,T(100)];case 3:return o.sent(),[4,U(e.appConfig)];case 4:return n=o.sent(),[3,2];case 5:return 0===(r=n.authToken).requestStatus?[2,F(e,t)]:[2,r]}}))}))}(e,t),r;if(!navigator.onLine)throw h.create("app-offline");var u=function(e){var t={requestStatus:1,requestTime:Date.now()};return s(s({},e),{authToken:t})}(r);return n=function(e,t){return a(this,void 0,void 0,(function(){var n,r,o;return c(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,8]),[4,q(e,t)];case 1:return n=i.sent(),o=s(s({},t),{authToken:n}),[4,j(e.appConfig,o)];case 2:return i.sent(),[2,n];case 3:return!g(r=i.sent())||401!==r.serverCode&&404!==r.serverCode?[3,5]:[4,x(e.appConfig)];case 4:return i.sent(),[3,7];case 5:return o=s(s({},t),{authToken:{requestStatus:0}}),[4,j(e.appConfig,o)];case 6:i.sent(),i.label=7;case 7:throw r;case 8:return[2]}}
1))}))}(e,u),u}))];case 1:return r=i.sent(),n?[4,n]:[3,3];case 2:return o=i.sent(),[3,4];case 3:o=r.authToken,i.label=4;case 4:return[2,o]}}))}))}function U(e){return N(e,(function(e){if(!W(e))throw h.create("not-registered");var t;return 1===(t=e.authToken).requestStatus&&t.requestTime+1e4<Date.now()?s(s({},e),{authToken:{requestStatus:0}}):e}))}function W(e){return void 0!==e&&2===e.registrationStatus}function R(e){return a(this,void 0,void 0,(function(){var t;return c(this,(function(n){switch(n.label){case 0:return[4,K(e)];case 1:return(t=n.sent().registrationPromise)?[4,t]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}function L(e,t){return a(this,void 0,void 0,(function(){var n,r,o,i;return c(this,(function(s){switch(s.label){case 0:return n=function(e,t){var n=t.fid;return b(e)+"/"+n}(e,t),r=m(e,t),o={method:"DELETE",headers:r},[4,k((function(){return fetch(n,o)}))];case 1:return(i=s.sent()).ok?[3,3]:[4,y("Delete Installation",i)];case 2:throw s.sent();case 3:return[2]}}))}))}function B(e){return h.create("missing-app-config-values",{valueName:e})}(I=o.a).INTERNAL.registerComponent(new i.Component("installations",(function(e){var t=e.getProvider("app").getImmediate(),n={appConfig:function(e){var t,n;if(!e||!e.options)throw B("App Configuration");if(!e.name)throw B("App Name");try{for(var r=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(["projectId","apiKey","appId"]),o=r.next();!o.done;o=r.next()){var i=o.value;if(!e.options[i])throw B(i)}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t),platformLoggerProvider:e.getProvider("platform-logger")};return{app:t,getId:function(){return function(e){return a(this,void 0,void 0,(function(){var t,n,r;return c(this,(function(o){switch(o.label){case 0:return[4,K(e.appConfig)];case 1:return t=o.sent(),n=t.installationEntry,(r=t.registrationPromise)?r.catch(console.error):F(e).catch(console.error),[2,n.fid]}}))}))}(n)},getToken:function(e){return function(e,t){return void 0===t&&(t=!1),a(this,void 0,void 0,(function(){return c(this,(function(n){switch(n.label){case 0:return[4,R(e.appConfig)];case 1:return n.sent(),[4,F(e,t)];case 2:return[2,n.sent().token]}}))}))}(n,e)},delete:function(){return function(e){return a(this,void 0,void 0,(function(){var t,n;return c(this,(function(r){switch(r.label){case 0:return[4,N(t=e.appConfig,(function(e){if(!e||0!==e.registrationStatus)return e}))];case 1:if(!(n=r.sent()))return[3,6];if(1!==n.registrationStatus)return[3,2];throw h.create("delete-pending-registration");case 2:if(2!==n.registrationStatus)return[3,6];if(navigator.onLine)return[3,3];throw h.create("app-offline");case 3:return[4,L(t,n)];case 4:return r.sent(),[4,x(t)];case 5:r.sent(),r.label=6;case 6:return[2]}}
1))}))}(n)}}}),"PUBLIC")),I.registerVersion("@firebase/installations","0.3.8");var H=function(e,t){return(H=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function G(e,t){function n(){this.constructor=e}H(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var $,J=function(){return(J=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function z(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(t){i(t)}}function a(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(s,a)}c((r=r.apply(e,t||[])).next())}))}function Y(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(a){i=[6,a],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function Q(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}var X=(($={})["only-available-in-window"]="This method is available in a Window context.",$["only-available-in-sw"]="This method is available in a service worker context.",$["should-be-overriden"]="This method should be overriden by extended classes.",$["bad-sender-id"]="Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().",$["permission-default"]="The required permissions were not granted and dismissed instead.",$["permission-blocked"]="The required permissions were not granted and blocked instead.",$["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",$["notifications-blocked"]="Notifications have been blocked.",$["failed-serviceworker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",$["sw-registration-expected"]="A service worker registration was the expected input.",$["get-subscription-failed"]="There was an error when trying to get any existing Push Subscriptions.",$["invalid-saved-token"]="Unable to access details of the saved token.",$["sw-reg-redundant"]="The service worker being used for push was made redundant.",$["token-subscribe-failed"]="A problem occured while subscribing the user to FCM: {$errorInfo}",$["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",$["token-unsubscribe-failed"]="A problem occured while unsubscribing the user from FCM: {$errorInfo}",$["token-update-failed"]="A problem occured while updating the user from FCM: {$errorInfo}",$["token-update-no-token"]="FCM returned no token when updating the user to push.",$["use-sw-before-get-token"]="The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",$["invalid-delete-token"]="You must pass a valid token into deleteToken(), i.e. the token from getToken().",$["delete-token-not-found"]="The deletion attempt for token could not be performed as the token was not found.",$["delete-scope-not-found"]="The deletion attempt for service worker scope could not be performed as the scope was not found.",$["bg-handler-function-expected"]="The input to setBackgroun
1dMessageHandler() must be a function.",$["no-window-client-to-msg"]="An attempt was made to message a non-existant window client.",$["unable-to-resubscribe"]="There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$errorInfo}",$["no-fcm-token-for-resubscribe"]="Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.",$["failed-to-delete-token"]="Unable to delete the currently saved token.",$["no-sw-in-reg"]="Even though the service worker registration was successful, there was a problem accessing the service worker itself.",$["bad-scope"]="The service worker scope must be a string with at least one character.",$["bad-vapid-key"]="The public VAPID key is not a Uint8Array with 65 bytes.",$["bad-subscription"]="The subscription must be a valid PushSubscription.",$["bad-token"]="The FCM Token used for storage / lookup was not a valid token string.",$["failed-delete-vapid-key"]="The VAPID key could not be deleted.",$["invalid-public-vapid-key"]="The public VAPID key must be a string.",$["use-public-key-before-get-token"]="The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used.",$["public-vapid-key-decryption-failed"]="The public VAPID key did not equal 65 bytes when decrypted.",$),Z=new l.ErrorFactory("messaging","Messaging",X),ee=new Uint8Array([4,51,148,247,223,161,235,177,220,3,162,94,21,113,219,72,211,46,237,237,178,52,219,183,71,58,12,143,196,204,225,111,60,140,132,223,171,182,102,62,242,12,212,139,254,227,249,118,47,20,28,99,8,106,111,45,177,26,149,176,206,55,192,156,110]),te=function(e){return e.PUSH_MSG_RECEIVED="push-msg-received",e.NOTIFICATION_CLICKED="notification-clicked",e}({});function ne(e,t){if(null==e||null==t)return!1;if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(var n=new DataView(e),r=new DataView(t),o=0;o<e.byteLength;o++)if(n.getUint8(o)!==r.getUint8(o))return!1;return!0}function re(e){return function(e){var t=new Uint8Array(e);return btoa(String.fromCharCode.apply(String,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Q(arguments[t]));return e}(t)))}(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var oe=function(){function e(){}return e.prototype.getToken=function(e,t,n){return z(this,void 0,void 0,(function(){var r,o,i,s,a;return Y(this,(function(c){switch(c.label){case 0:return[4,se(e)];case 1:r=c.sent(),o=ae(t,n),i={method:"POST",headers:r,body:JSON.stringify(o)},c.label=2;case 2:return c.trys.push([2,5,,6]),[4,fetch(ie(e.app),i)];case 3:return[4,c.sent().json()];case 4:return s=c.sent(),[3,6];case 5:throw a=c.sent(),Z.create("token-subscribe-failed",{errorInfo:a});case 6:if(s.error)throw Z.create("token-subscribe-failed",{errorInfo:s.error.message});if(!s.token)throw Z.create("token-subscribe-no-token");return[2,s.token]}}))}))},e.prototype.updateToken=function(e,t,n,r){return z(this,void 0,void 0,(function(){var o,i,s,a,c;return Y(this,(function(u){switch(u.label){case 0:return[4,se(t)];case 1:o=u.sent(),i=ae(n,r),s={method:"PATCH",headers:o,body:JSON.stringify(i)},u.label=2;case 2:return u.trys.push([2,5,,6]),[4,fetch(ie(t.app)+"/"+e.fcmToken,s)];case 3:return[4,u.sent().json()];case 4:return a=u.sent(),[3,6];case 5:throw c=u.sent(),Z.create("token-update-failed",{errorInfo:c});case 6:if(a.error)throw Z.create("token-update-failed",{errorInfo:a.error.message});if(!a.token)throw Z.create("token-update-no-token");return[2,a.token]}}))}))},e.prototype.deleteToken=function(e,t){return z(this,void 0,void 0,(function(){var n,r,o,i;return Y(this,(function(s){switch(s.label){case 0:return[4,se(e)];case 1:n=s.sent(),r={method:"DELETE",headers:n},s.label=2;case 2:return s.trys.push([2,5,,6]),[4,fetch(ie(e.app)+"/"+t.fcmToken,r)];case 3:return[4,s.sent().json()];case 4:if((o=s.sent()).error)throw Z.create("token-unsubscribe-failed",{errorInfo:o.error.message});return[3,6];case 5:throw i=s.sent(),Z.create("token-unsubscribe-failed",{errorInfo:i});case 6:return[2]}}
1))}))},e}();function ie(e){return"https://fcmregistrations.googleapis.com/v1/projects/"+e.options.projectId+"/registrations"}function se(e){var t=e.app,n=e.installations;return z(this,void 0,void 0,(function(){var e;return Y(this,(function(r){switch(r.label){case 0:return[4,n.getToken()];case 1:return e=r.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t.options.apiKey,"x-goog-firebase-installations-auth":"FIS "+e})]}}))}))}function ae(e,t){var n=re(e.getKey("p256dh")),r=re(e.getKey("auth")),o={web:{endpoint:e.endpoint,p256dh:n,auth:r}};return ne(t.buffer,ee.buffer)||(o.web.applicationPubKey=re(t)),o}function ce(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),r=new Uint8Array(n.length),o=0;o<n.length;++o)r[o]=n.charCodeAt(o);return r}var ue=function(){function e(){this.dbPromise=null}return e.prototype.get=function(e){return this.createTransaction((function(t){return t.get(e)}))},e.prototype.getIndex=function(e,t){return this.createTransaction((function(n){return n.index(e).get(t)}))},e.prototype.put=function(e){return this.createTransaction((function(t){return t.put(e)}),"readwrite")},e.prototype.delete=function(e){return this.createTransaction((function(t){return t.delete(e)}),"readwrite")},e.prototype.closeDatabase=function(){return z(this,void 0,void 0,(function(){return Y(this,(function(e){switch(e.label){case 0:return this.dbPromise?[4,this.dbPromise]:[3,2];case 1:e.sent().close(),this.dbPromise=null,e.label=2;case 2:return[2]}}
1))}))},e.prototype.createTransaction=function(e,t){return void 0===t&&(t="readonly"),z(this,void 0,void 0,(function(){var n,r,o,i;return Y(this,(function(s){switch(s.label){case 0:return[4,this.getDb()];case 1:return n=s.sent(),r=n.transaction(this.objectStoreName,t),o=r.objectStore(this.objectStoreName),[4,fe(e(o))];case 2:return i=s.sent(),[2,new Promise((function(e,t){r.oncomplete=function(){e(i)},r.onerror=function(){t(r.error)}}))]}}))}))},e.prototype.getDb=function(){var e=this;return this.dbPromise||(this.dbPromise=new Promise((function(t,n){var r=indexedDB.open(e.dbName,e.dbVersion);r.onsuccess=function(){t(r.result)},r.onerror=function(){e.dbPromise=null,n(r.error)},r.onupgradeneeded=function(t){return e.onDbUpgrade(r,t)}}))),this.dbPromise},e}();function fe(e){return new Promise((function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}var le=function(e){function t(t){var n=e.call(this)||this;return n.services=t,n.dbName="fcm_token_details_db",n.dbVersion=4,n.objectStoreName="fcm_token_object_Store",n}return G(t,e),t.prototype.onDbUpgrade=function(e,t){var n=e.result;switch(t.oldVersion){case 0:(o=n.createObjectStore(this.objectStoreName,{keyPath:"swScope"})).createIndex("fcmSenderId","fcmSenderId",{unique:!1}),o.createIndex("fcmToken","fcmToken",{unique:!0});case 1:!function(e){var t=indexedDB.open("undefined");t.onerror=function(e){},t.onsuccess=function(n){!function(e,t){if(e.objectStoreNames.contains("fcm_token_object_Store")){var n=e.transaction("fcm_token_object_Store").objectStore("fcm_token_object_Store"),r=new oe,o=n.openCursor();o.onerror=function(e){console.warn("Unable to cleanup old IDB.",e)},o.onsuccess=function(){var n=o.result;n?(r.deleteToken(t,n.value),n.continue()):(e.close(),indexedDB.deleteDatabase("undefined"))}}}(t.result,e)}}(this.services);case 2:var r=(o=e.transaction.objectStore(this.objectStoreName)).openCursor();r.onsuccess=function(){var e=r.result;if(e){var t=e.value,n=J({},t);t.createTime||(n.createTime=Date.now()),"string"==typeof t.vapidKey&&(n.vapidKey=ce(t.vapidKey)),"string"==typeof t.auth&&(n.auth=ce(t.auth).buffer),"string"==typeof t.auth&&(n.p256dh=ce(t.p256dh).buffer),"string"==typeof t.fcmPushSet&&delete n.fcmPushSet,e.update(n),e.continue()}};break;case 3:var o,i=(o=e.transaction.objectStore(this.objectStoreName)).openCursor();i.onsuccess=function(){var e=i.result;if(e){var t=e.value,n=J({},t);"string"==typeof t.fcmPushSet&&delete n.fcmPushSet,e.update(n),e.continue()}}}},t.prototype.getTokenDetailsFromToken=function(e){return z(this,void 0,void 0,(function(){return Y(this,(function(t){if(!e)throw Z.create("bad-token");return de({fcmToken:e}),[2,this.getIndex("fcmToken",e)]}))}))},t.prototype.getTokenDetailsFromSWScope=function(e){return z(this,void 0,void 0,(function(){return Y(this,(function(t){if(!e)throw Z.create("bad-scope");return de({swScope:e}),[2,this.get(e)]}))}))},t.prototype.saveTokenDetails=function(e){return z(this,void 0,void 0,(function(){return Y(this,(function(t){if(!e.swScope)throw Z.create("bad-scope");if(!e.vapidKey)throw Z.create("bad-vapid-key");if(!e.endpoint||!e.auth||!e.p256dh)throw Z.create("bad-subscription");if(!e.fcmSenderId)throw Z.create("bad-sender-id");if(!e.fcmToken)throw Z.create("bad-token");return de(e),[2,this.put(e)]}))}))},t.prototype.deleteToken=function(e){return z(this,void 0,void 0,(function(){var t;return Y(this,(function(n){switch(n.label){case 0:return"string"!=typeof e||0===e.length?[2,Promise.reject(Z.create("invalid-delete-token"))]:[4,this.getTokenDetailsFromToken(e)];case 1:if(!(t=n.sent()))throw Z.create("delete-token-not-found");return[4,this.delete(t.swScope)];case 2:return n.sent(),[2,t]}}))}))},t}(ue);function de(e){if(e.fcmToken&&("string"!=typeof e.fcmToken||0===e.fcmToken.length))throw Z.create("bad-token");if(e.swScope&&("string"!=typeof e.swScope||0===e.swScope.length))throw Z.create("bad-scope");if(e.vapidKey&&(!(e.vapidKey instanceof Uint8Array)||65!==e.vapidKey.length))throw Z.create("bad-vapid-key");if(e.endpoint&&("string"!=typeof e.endpoint||0===e.endpoint.length))throw Z.create("bad-subscription");if(e.auth&&!(e.auth instanceof ArrayBuffer))throw Z.create("bad-subscription");if(e.p256dh&&!(e.p256dh instanceof ArrayBuffer))throw Z.create("bad-subscription");if(e.fcmSenderId&&("string"!=typeof e.fcmSenderId||0===e.fcmSenderId.length))throw Z.create("bad-sender-id")}var pe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dbName="fcm_vapid_details_db",t.dbVersion=1,t.objectStoreName="fcm_vapid_object_Store",t}return G(t,e),t.prototype.onDbUpgrade=function(e){e.result.createObjectStore(this.objectStoreName,{keyPath:"swScope"})},t.prototype.getVapidFromSWScope=function(e){return z(this,void 0,void 0,(function(){var t;return Y(this,(function(n){switch(n.label){case 0:if("string"!=typeof e||0===e.length)throw Z.create("bad-scope");return[4,this.get(e)];case 1:return[2,(t=n.sent())?t.vapidKey:void 0]}}))}))},t.prototype.saveVapidDetails=function(e,t){return z(this,void 0,void 0,(function(){return Y(this,(function(n){if("string"!=typeof e||0===e.length)throw Z.create("bad-scope");
1if(null===t||65!==t.length)throw Z.create("bad-vapid-key");return[2,this.put({swScope:e,vapidKey:t})]}))}))},t.prototype.deleteVapidDetails=function(e){return z(this,void 0,void 0,(function(){var t;return Y(this,(function(n){switch(n.label){case 0:return[4,this.getVapidFromSWScope(e)];case 1:if(!(t=n.sent()))throw Z.create("delete-scope-not-found");return[4,this.delete(e)];case 2:return n.sent(),[2,t]}}))}))},t}(ue),he=function(){function e(e){var t=this;this.services=e,this.vapidDetailsModel=new pe,this.subscriptionManager=new oe;var n=e.app;if(this.app=n,!n.options.messagingSenderId||"string"!=typeof n.options.messagingSenderId)throw Z.create("bad-sender-id");this.INTERNAL={delete:function(){return t.delete()}},this.tokenDetailsModel=new le(e)}return e.prototype.getToken=function(){return z(this,void 0,void 0,(function(){var e,t,n,r,o;return Y(this,(function(i){switch(i.label){case 0:return"default"!==(e=this.getNotificationPermission())?[3,2]:[4,this.requestNotificationPermission()];case 1:e=i.sent(),i.label=2;case 2:if("granted"!==e)throw Z.create("notifications-blocked");return[4,this.getSWRegistration_()];case 3:return t=i.sent(),[4,this.getPublicVapidKey_()];case 4:return n=i.sent(),[4,this.getPushSubscription(t,n)];case 5:return r=i.sent(),[4,this.tokenDetailsModel.getTokenDetailsFromSWScope(t.scope)];case 6:return(o=i.sent())?[2,this.manageExistingToken(t,r,n,o)]:[2,this.getNewToken(t,r,n)]}}))}))},e.prototype.manageExistingToken=function(e,t,n,r){return z(this,void 0,void 0,(function(){return Y(this,(function(o){switch(o.label){case 0:return function(e,t,n){if(!n.vapidKey||!ne(t.buffer,n.vapidKey.buffer))return!1;var r=e.endpoint===n.endpoint,o=ne(e.getKey("auth"),n.auth),i=ne(e.getKey("p256dh"),n.p256dh);return r&&o&&i}(t,n,r)?Date.now()<r.createTime+6048e5?[2,r.fcmToken]:[2,this.updateToken(e,t,n,r)]:[3,1];case 1:return[4,this.deleteTokenFromDB(r.fcmToken)];case 2:return o.sent(),[2,this.getNewToken(e,t,n)];case 3:return[2]}}
1))}))},e.prototype.updateToken=function(e,t,n,r){return z(this,void 0,void 0,(function(){var o,i,s;return Y(this,(function(a){switch(a.label){case 0:return a.trys.push([0,4,,6]),[4,this.subscriptionManager.updateToken(r,this.services,t,n)];case 1:return o=a.sent(),i={swScope:e.scope,vapidKey:n,fcmSenderId:this.services.app.options.messagingSenderId,fcmToken:o,createTime:Date.now(),endpoint:t.endpoint,auth:t.getKey("auth"),p256dh:t.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(i)];case 2:return a.sent(),[4,this.vapidDetailsModel.saveVapidDetails(e.scope,n)];case 3:return a.sent(),[2,o];case 4:return s=a.sent(),[4,this.deleteToken(r.fcmToken)];case 5:throw a.sent(),s;case 6:return[2]}}))}))},e.prototype.getNewToken=function(e,t,n){return z(this,void 0,void 0,(function(){var r,o;return Y(this,(function(i){switch(i.label){case 0:return[4,this.subscriptionManager.getToken(this.services,t,n)];case 1:return r=i.sent(),o={swScope:e.scope,vapidKey:n,fcmSenderId:this.app.options.messagingSenderId,fcmToken:r,createTime:Date.now(),endpoint:t.endpoint,auth:t.getKey("auth"),p256dh:t.getKey("p256dh")},[4,this.tokenDetailsModel.saveTokenDetails(o)];case 2:return i.sent(),[4,this.vapidDetailsModel.saveVapidDetails(e.scope,n)];case 3:return i.sent(),[2,r]}}))}))},e.prototype.deleteToken=function(e){return z(this,void 0,void 0,(function(){var t,n;return Y(this,(function(r){switch(r.label){case 0:return[4,this.deleteTokenFromDB(e)];case 1:return r.sent(),[4,this.getSWRegistration_()];case 2:return(t=r.sent())?[4,t.pushManager.getSubscription()]:[3,4];case 3:if(n=r.sent())return[2,n.unsubscribe()];r.label=4;case 4:return[2,!0]}}))}))},e.prototype.deleteTokenFromDB=function(e){return z(this,void 0,void 0,(function(){var t,n;return Y(this,(function(r){switch(r.label){case 0:return[4,this.tokenDetailsModel.deleteToken(e)];case 1:t=r.sent(),r.label=2;case 2:return r.trys.push([2,4,,5]),[4,this.subscriptionManager.deleteToken(this.services,t)];case 3:return r.sent(),[3,5];case 4:return n=r.sent(),console.error(n),[3,5];case 5:return[2]}}
1))}))},e.prototype.getPushSubscription=function(e,t){return z(this,void 0,void 0,(function(){var n;return Y(this,(function(r){switch(r.label){case 0:return[4,e.pushManager.getSubscription()];case 1:return(n=r.sent())?[2,n]:[2,e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t})]}}))}))},e.prototype.requestPermission=function(){throw Z.create("only-available-in-window")},e.prototype.useServiceWorker=function(e){throw Z.create("only-available-in-window")},e.prototype.usePublicVapidKey=function(e){throw Z.create("only-available-in-window")},e.prototype.onMessage=function(e,t,n){throw Z.create("only-available-in-window")},e.prototype.onTokenRefresh=function(e,t,n){throw Z.create("only-available-in-window")},e.prototype.setBackgroundMessageHandler=function(e){throw Z.create("only-available-in-sw")},e.prototype.delete=function(){return z(this,void 0,void 0,(function(){return Y(this,(function(e){switch(e.label){case 0:return[4,Promise.all([this.tokenDetailsModel.closeDatabase(),this.vapidDetailsModel.closeDatabase()])];case 1:return e.sent(),[2]}}))}))},e.prototype.getNotificationPermission=function(){return Notification.permission},e.prototype.requestNotificationPermission=function(){return z(this,void 0,void 0,(function(){return Y(this,(function(e){return Notification.requestPermission?[2,Notification.requestPermission()]:[2,Notification.permission]}))}))},e.prototype.getTokenDetailsModel=function(){return this.tokenDetailsModel},e.prototype.getVapidDetailsModel=function(){return this.vapidDetailsModel},e.prototype.getSubscriptionManager=function(){return this.subscriptionManager},e}(),ge=function(e){function t(t){var n=e.call(this,t)||this;return n.bgMessageHandler=null,self.addEventListener("push",(function(e){n.onPush(e)})),self.addEventListener("pushsubscriptionchange",(function(e){n.onSubChange(e)})),self.addEventListener("notificationclick",(function(e){n.onNotificationClick(e)})),n}return G(t,e),t.prototype.onPush=function(e){e.waitUntil(this.onPush_(e))},t.prototype.onSubChange=function(e){e.waitUntil(this.onSubChange_(e))},t.prototype.onNotificationClick=function(e){e.waitUntil(this.onNotificationClick_(e))},t.prototype.onPush_=function(e){return z(this,void 0,void 0,(function(){var t,n,r,o,i,s;return Y(this,(function(a){switch(a.label){case 0:if(!e.data)return[2];try{t=e.data.json()}catch(c){return[2]}return[4,this.hasVisibleClients_()];case 1:return a.sent()?[2,this.sendMessageToWindowClients_(t)]:(n=this.getNotificationData_(t))?(r=n.title||"",[4,this.getSWRegistration_()]):[3,3];case 2:return o=a.sent(),i=n.actions,s=Notification.maxActions,i&&s&&i.length>s&&console.warn("This browser only supports "+s+" actions.The remaining actions will not be displayed."),[2,o.showNotification(r,n)];case 3:return this.bgMessageHandler?[4,this.bgMessageHandler(t)]:[3,5];case 4:return a.sent(),[2];case 5:return[2]}}
1))}))},t.prototype.onSubChange_=function(e){return z(this,void 0,void 0,(function(){var e,t,n,r;return Y(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getSWRegistration_()];case 1:return e=o.sent(),[3,3];case 2:throw t=o.sent(),Z.create("unable-to-resubscribe",{errorInfo:t});case 3:return o.trys.push([3,5,,8]),[4,e.pushManager.getSubscription()];case 4:return o.sent(),[3,8];case 5:return n=o.sent(),[4,this.getTokenDetailsModel().getTokenDetailsFromSWScope(e.scope)];case 6:if(!(r=o.sent()))throw n;return[4,this.deleteToken(r.fcmToken)];case 7:throw o.sent(),n;case 8:return[2]}}))}))},t.prototype.onNotificationClick_=function(e){return z(this,void 0,void 0,(function(){var t,n,r,o;return Y(this,(function(i){switch(i.label){case 0:if(!(e.notification&&e.notification.data&&e.notification.data.FCM_MSG))return[2];if(e.action)return[2];if(e.stopImmediatePropagation(),e.notification.close(),!(t=e.notification.data.FCM_MSG).notification)return[2];if(!(n=t.fcmOptions&&t.fcmOptions.link||t.notification.click_action)){if(!(t.data&&"google.c.a.c_id"in t.data))return[2];n=self.location.origin}return[4,this.getWindowClient_(n)];case 1:return(r=i.sent())?[3,4]:[4,self.clients.openWindow(n)];case 2:return r=i.sent(),[4,new Promise((function(e){setTimeout(e,3e3)}))];case 3:return i.sent(),[3,6];case 4:return[4,r.focus()];case 5:r=i.sent(),i.label=6;case 6:return r?(delete t.notification,delete t.fcmOptions,o=ve(te.NOTIFICATION_CLICKED,t),[2,this.attemptToMessageClient_(r,o)]):[2]}}))}))},t.prototype.getNotificationData_=function(e){var t;if(e&&"object"==typeof e.notification){var n=J({},e.notification);return n.data=J(J({},e.notification.data),((t={}).FCM_MSG=e,t)),n}},t.prototype.setBackgroundMessageHandler=function(e){if(!e||"function"!=typeof e)throw Z.create("bg-handler-function-expected");this.bgMessageHandler=e},t.prototype.getWindowClient_=function(e){return z(this,void 0,void 0,(function(){var t,n,r,o;return Y(this,(function(i){switch(i.label){case 0:return t=new URL(e,self.location.href).href,[4,be()];case 1:for(n=i.sent(),r=null,o=0;o<n.length;o++)if(new URL(n[o].url,self.location.href).href===t){r=n[o];break}return[2,r]}}))}))},t.prototype.attemptToMessageClient_=function(e,t){return z(this,void 0,void 0,(function(){return Y(this,(function(n){if(!e)throw Z.create("no-window-client-to-msg");return e.postMessage(t),[2]}))}))},t.prototype.hasVisibleClients_=function(){return z(this,void 0,void 0,(function(){return Y(this,(function(e){switch(e.label){case 0:return[4,be()];case 1:return[2,e.sent().some((function(e){return"visible"===e.visibilityState&&!e.url.startsWith("chrome-extension://")}))]}}))}))},t.prototype.sendMessageToWindowClients_=function(e){return z(this,void 0,void 0,(function(){var t,n,r=this;return Y(this,(function(o){switch(o.label){case 0:return[4,be()];case 1:return t=o.sent(),n=ve(te.PUSH_MSG_RECEIVED,e),[4,Promise.all(t.map((function(e){return r.attemptToMessageClient_(e,n)})))];case 2:return o.sent(),[2]}}))}))},t.prototype.getSWRegistration_=function(){return z(this,void 0,void 0,(function(){return Y(this,(function(e){return[2,self.registration]}))}))},t.prototype.getPublicVapidKey_=function(){return z(this,void 0,void 0,(function(){var e,t;return Y(this,(function(n){switch(n.label){case 0:return[4,this.getSWRegistration_()];case 1:if(!(e=n.sent()))throw Z.create("sw-registration-expected");return[4,this.getVapidDetailsModel().getVapidFromSWScope(e.scope)];case 2:return null==(t=n.sent())?[2,ee]:[2,t]}}))}))},t}(he);function be(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function ve(e,t){return{firebaseMessagingType:e,firebaseMessagingData:t}}var ye=function(e){function t(t){var n=e.call(this,t)||this;return n.registrationToUse=null,n.publicVapidKeyToUse=null,n.messageObserver=null,n.tokenRefreshObserver=null,n.onMessageInternal=Object(l.createSubscribe)((function(e){n.messageObserver=e})),n.onTokenRefreshInternal=Object(l.createSubscribe)((function(e){n.tokenRefreshObserver=e})),n.setupSWMessageListener_(),n}return G(t,e),t.prototype.requestPermission=function(){return z(this,void 0,void 0,(function(){var e;return Y(this,(function(t){switch(t.label){case 0:return"granted"===Notification.permission?[2]:[4,Notification.requestPermission()];case 1:if("granted"===(e=t.sent()))return[2];throw Z.create("denied"===e?"permission-blocked":"permission-default")}}))}))},t.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw Z.create("sw-registration-expected");if(null!=this.registrationToUse)throw Z.create("use-sw-before-get-token");this.registrationToUse=e},t.prototype.usePublicVapidKey=function(e){if("string"!=typeof e)throw Z.create("invalid-public-vapid-key");if(null!=this.publicVapidKeyToUse)throw Z.create("use-public-key-before-get-token");var t=ce(e);if(65!==t.length)throw Z.create("public-vapid-key-decryption-failed");this.publicVapidKeyToUse=t},t.prototype.onMessage=function(e,t,n){return"function"==typeof e?this.onMessageInternal(e,t,n):this.onMessageInternal(e)},t.prototype.onTokenRefresh=function(e,t,n){return"function"==typeof e?this.onTokenRefreshInternal(e,t,n):this.onTokenRefreshInternal(e)},t.prototype.waitForRegistrationToActivate_=function(e){var t=e.installing||e.waiting||e.active;return new Promise((function(n,r){if(t)if("activated"!==t.state)if("redundant"!==t.state){var o=function(){if("activated"===t.state)n(e);else{if("redundant"!==t.state)return;r(Z.create("sw-reg-redundant"))}t.removeEventListener("statechange",o)};t.addEventListener("statechange",o)}else r(Z.create("sw-reg-redundant"));else n(e);else r(Z.create("no-sw-in-reg"))}))},t.prototype.getSWRegistration_=function(){var e=this;return this.registrationToUse?this.waitForRegistrationToActivate_(this.registrationToUse):(this.registrationToUse=null,navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}).catch((function(e){throw Z.create("failed-serviceworker-registration",{browserErrorMessage:e.message})})).then((function(t){return e.waitForRegistrationToActivate_(t).then((function(){return e.registrationToUse=t,t.update(
1),t}))})))},t.prototype.getPublicVapidKey_=function(){return z(this,void 0,void 0,(function(){return Y(this,(function(e){return this.publicVapidKeyToUse?[2,this.publicVapidKeyToUse]:[2,ee]}))}))},t.prototype.setupSWMessageListener_=function(){var e=this;navigator.serviceWorker.addEventListener("message",(function(t){return z(e,void 0,void 0,(function(){var e,n,r,o,i;return Y(this,(function(s){switch(s.label){case 0:return t.data&&t.data.firebaseMessagingType&&t.data.firebaseMessagingData?(n=(e=t.data).firebaseMessagingType,r=e.firebaseMessagingData,this.messageObserver&&this.messageObserver.next(r),(o=r.data)&&"google.c.a.c_id"in o&&"1"===o["google.c.a.e"]?(i=function(e){switch(e){case te.NOTIFICATION_CLICKED:return"notification_open";case te.PUSH_MSG_RECEIVED:return"notification_foreground";default:throw new Error}}(n),[4,this.services.analyticsProvider.get()]):[3,2]):[2];case 1:s.sent().logEvent(i,{message_name:o["google.c.a.c_l"],message_id:o["google.c.a.c_id"],message_time:o["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)}),s.label=2;case 2:return[2]}}
1))}))}),!1)},t}(he);function we(){return self&&"ServiceWorkerGlobalScope"in self?"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey"):navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}!function(e){var t={isSupported:we};e.INTERNAL.registerComponent(new i.Component("messaging",(function(e){var t={app:e.getProvider("app").getImmediate(),installations:e.getProvider("installations").getImmediate(),analyticsProvider:e.getProvider("analytics-internal")};if(!we())throw Z.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new ge(t):new ye(t)}),"PUBLIC").setServiceProps(t)),e.registerVersion("@firebase/messaging","0.6.0")}(o.a)},nbvr:function(e,t,n){!function(e){"use strict";function t(e){return Array.prototype.slice.call(e)}function n(e){return new Promise((function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function r(e,t,r){var o,i=new Promise((function(i,s){n(o=e[t].apply(e,r)).then(i,s)}));return i.request=o,i}function o(e,t,n){var o=r(e,t,n);return o.then((function(e){if(e)return new f(e,o.request)}))}function i(e,t,n){n.forEach((function(n){Object.defineProperty(e.prototype,n,{get:function(){return this[t][n]},set:function(e){this[t][n]=e}})}))}function s(e,t,n,o){o.forEach((function(o){o in n.prototype&&(e.prototype[o]=function(){return r(this[t],o,arguments)})}))}function a(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return this[t][r].apply(this[t],arguments)})}))}function c(e,t,n,r){r.forEach((function(r){r in n.prototype&&(e.prototype[r]=function(){return o(this[t],r,arguments)})}))}function u(e){this._index=e}function f(e,t){this._cursor=e,this._request=t}function l(e){this._store=e}function d(e){this._tx=e,this.complete=new Promise((function(t,n){e.oncomplete=function(){t()},e.onerror=function(){n(e.error)},e.onabort=function(){n(e.error)}}))}function p(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new d(n)}function h(e){this._db=e}i(u,"_index",["name","keyPath","multiEntry","unique"]),s(u,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]),c(u,"_index",IDBIndex,["openCursor","o
1penKeyCursor"]),i(f,"_cursor",["direction","key","primaryKey","value"]),s(f,"_cursor",IDBCursor,["update","delete"]),["advance","continue","continuePrimaryKey"].forEach((function(e){e in IDBCursor.prototype&&(f.prototype[e]=function(){var t=this,r=arguments;return Promise.resolve().then((function(){return t._cursor[e].apply(t._cursor,r),n(t._request).then((function(e){if(e)return new f(e,t._request)}))}))})})),l.prototype.createIndex=function(){return new u(this._store.createIndex.apply(this._store,arguments))},l.prototype.index=function(){return new u(this._store.index.apply(this._store,arguments))},i(l,"_store",["name","keyPath","indexNames","autoIncrement"]),s(l,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]),c(l,"_store",IDBObjectStore,["openCursor","openKeyCursor"]),a(l,"_store",IDBObjectStore,["deleteIndex"]),d.prototype.objectStore=function(){return new l(this._tx.objectStore.apply(this._tx,arguments))},i(d,"_tx",["objectStoreNames","mode"]),a(d,"_tx",IDBTransaction,["abort"]),p.prototype.createObjectStore=function(){return new l(this._db.createObjectStore.apply(this._db,arguments))},i(p,"_db",["name","version","objectStoreNames"]),a(p,"_db",IDBDatabase,["deleteObjectStore","close"]),h.prototype.transaction=function(){return new d(this._db.transaction.apply(this._db,arguments))},i(h,"_db",["name","version","objectStoreNames"]),a(h,"_db",IDBDatabase,["close"]),["openCursor","o
1penKeyCursor"].forEach((function(e){[l,u].forEach((function(n){e in n.prototype&&(n.prototype[e.replace("open","iterate")]=function(){var n=t(arguments),r=n[n.length-1],o=this._store||this._index,i=o[e].apply(o,n.slice(0,-1));i.onsuccess=function(){r(i.result)}})}))})),[u,l].forEach((function(e){e.prototype.getAll||(e.prototype.getAll=function(e,t){var n=this,r=[];return new Promise((function(o){n.iterateCursor(e,(function(e){e?(r.push(e.value),void 0===t||r.length!=t?e.continue():o(r)):o(r)}))}))})})),e.openDb=function(e,t,n){var o=r(indexedDB,"open",[e,t]),i=o.request;return i&&(i.onupgradeneeded=function(e){n&&n(new p(i.result,e.oldVersion,i.transaction))}),o.then((function(e){return new h(e)}))},e.deleteDb=function(e){return r(indexedDB,"deleteDatabase",[e])},Object.defineProperty(e,"__esModule",{value:!0})}(t)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.