<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">import{a as j,b as p,d as I}from"./chunk-GL3ZTA54.js";import{b as k}from"./chunk-5ABMH6GS.js";import{l as P}from"./chunk-HR534QVL.js";import{a as f}from"./chunk-6L6OZCDH.js";import{c as u}from"./chunk-2CFKU7MG.js";import{h as U}from"./chunk-FFBRLYPN.js";import{$ as g,B as S,Fd as h,H as b,Na as n,Ta as w,Xa as r,h as d,oe as y,ua as v,va as D,vd as l}from"./chunk-X3GFYMIQ.js";v();D();h();var R=(()=&gt;{class i{constructor(t,e,o){this.updates=e,this.localStorageService=o;let s=t.isStable.pipe(g(m=&gt;m===!0)),a=b(3*60*60*1e3),c=S(s,a);this.everySixHoursOnceAppIsStable$=c}init(){this.everySixHoursOnceAppIsStable$.subscribe(()=&gt;{console.log("checking for update"),this.checkUpdate()})}checkUpdate(){let t=Date.now(),e=this.localStorageService.getItem("lastUpdateChecked",t+"");console.log(e);let o=new Date,s=new Date(+e);Math.abs(P(s,o))&gt;=3&amp;&amp;this.updates.checkForUpdate()}static{this.\u0275fac=function(e){return new(e||i)(r(l),r(p),r(u))}}static{this.\u0275prov=n({token:i,factory:i.\u0275fac})}}return i})();h();var T=(()=&gt;{class i{constructor(t){}static{this.\u0275fac=function(e){return new(e||i)(r(p))}}static{this.\u0275prov=n({token:i,factory:i.\u0275fac})}}return i})();h();v();h();var pt=(()=&gt;{class i{constructor(t,e,o,s,a,c,m,x,F,O){this.snackBarService=t,this.swPush=e,this.swUpdate=o,this.checkForUpdateService=s,this.logUpdateService=a,this.promptUpdateService=c,this.http=m,this.localStorageService=x,this.appRef=O,this.updateInfoDisplayed=!1,this.subscribed=!1,this.isRegisteredToPushObs=new d(!1),this.appUrl=f.appUrl,this.apiEndpoint=f.origin+"/api/webpush",this.applicationServerKey=f.vapidKey,this.platformId=F,this.isPushAvailable()&amp;&amp;(this.isRegisteredToPushObs.next(this.isRegistered()),this.isRegistered||this.registerToPush(),this.subscribeToNotificationClicks())}isPushAvailable(){return!!(y(this.platformId)&amp;&amp;(window.safari&amp;&amp;window.safari.pushNotification||"serviceWorker"in navigator))}isRegisteredToPush(){return this.isRegisteredToPushObs}showNotification(){navigator.serviceWorker.ready.then(t=&gt;{try{this.swPush.messages.subscribe(e=&gt;{let o=t.showNotification("Hello, World.")})}catch{}self.addEventListener("push",function(e){e.data})})}urlBase64ToUint8Array(t){let e="=".repeat((4-t.length%4)%4),o=(t+e).replace(/\-/g,"+").replace(/_/g,"/"),s=window.atob(o),a=new Uint8Array(s.length);for(let c=0;c&lt;s.length;++c)a[c]=s.charCodeAt(c);return a}registerToPush(){try{this.swPush.requestSubscription({serverPublicKey:this.applicationServerKey}).then(t=&gt;{this.updateSubscription(t)}).catch(t=&gt;console.error("Could not subscribe to notifications",t))}catch{}}updateSubscription(t){let e=t.getKey("p256dh"),o=t.getKey("auth"),s={endpoint:t.endpoint,key:e?btoa(String.fromCharCode.apply(null,new Uint8Array(e))):null,token:o?btoa(String.fromCharCode.apply(null,new Uint8Array(o))):null};this.http.post(this.apiEndpoint+"/vapid/subscribe",s).subscribe(a=&gt;{a.status==200&amp;&amp;(this.isRegisteredToPushObs.next(!0),this.localStorageService.setItem("subscription",JSON.stringify(t)),this.subscribeToNotificationClicks())},a=&gt;console.log("error!!!",a))}unregisterFromPush(){}isRegistered(){if(!this.isPushAvailable())return!1;if(!window.safari)return!!this.localStorageService.getItem("subscription")}subscribeToNotificationClicks(){}static{this.\u0275fac=function(e){return new(e||i)(r(k),r(j),r(p),r(R),r(T),r(I),r(U),r(u),r(w),r(l))}}static{this.\u0275prov=n({token:i,factory:i.\u0275fac})}}return i})();export{R as a,T as b,pt as c};
</pre></body></html>