1import{gM as a,gT as o,gU as s,gV as d,gW as p,gX as f}from"./index-69969a08.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="d1f4963e-1137-4b2f-a487-c734e406474b",n._sentryDebugIdIdentifier="sentry-dbid-d1f4963e-1137-4b2f-a487-c734e406474b")}catch{}})();class c extends a{constructor(){super(),o().then(e=>{if(!e)return;const i=s();d(i,t=>this.handleNotificationReceived(t))})}async checkPermissions(){return await o()?{receive:this.convertNotificationPermissionToPermissionState(Notification.permission)}:{receive:"denied"}}async requestPermissions(){if(!await o())return{receive:"denied"};const i=await Notification.requestPermission();return{receive:this.convertNotificationPermissionToPermissionState(i)}}async isSupported(){return{isSupported:await o()}}async getToken(e){const i=s();return{token:await p(i,{vapidKey:e.vapidKey,serviceWorkerRegistration:e.serviceWorkerRegistration})}}async deleteToken(){const e=s();await f(e)}async getDeliveredNotifications(){this.throwUnimplementedError()}async removeDeliveredNotifications(e){this.throwUnimplementedError()}async removeAllDeliveredNotifications(){this.throwUnimplementedError()}async subscribeToTopic(e){this.throwUnimplementedError()}async unsubscribeFromTopic(e){this.throwUnimplementedError()}async createChannel(e){this.throwUnimplementedError()}async deleteChannel(e){this.throwUnimplementedError()}async listChannels(){this.throwUnimplementedError()}handleNotificationReceived(e){const t={notification:this.createNotificationResult(e)};this.notifyListeners(c.notificationReceivedEvent,t)}createNotificationResult(e){var i,t,r;return{body:(i=e.notification)===null||i===void 0?void 0:i.body,data:e.data,id:e.messageId,image:(t=e.notification)===null||t===void 0?void 0:t.image,title:(r=e.notification)===null||r===void 0?void 0:r.title}}convertNotificationPermissionToPermissionState(e){let i="prompt";switch(e){case"granted":i="granted";break;case"denied":i="denied";break}return i}throwUnimplementedError(){throw this.unimplemented("Not implemented on web.")}}c.notificationReceivedEvent="notificationReceived";export{c as FirebaseMessagingWeb}; 2//# sourceMappingURL=web-8ed99890.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.