added pwa support
This commit is contained in:
1 parent
b1823f5294
commit
f1ee071e62
17 files changed
+5206
-136
No files matched your search
@@ -0,0 +1 @@
|
||||
if(!self.define){let e,s={};const t=(t,a)=>(t=new URL(t+".js",a).href,s[t]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=t,e.onload=s,document.head.appendChild(e)}else e=t,importScripts(t),s()})).then((()=>{let e=s[t];if(!e)throw new Error(`Module ${t} didn’t register its module`);return e})));self.define=(a,n)=>{const i=e||("document"in self?document.currentScript.src:"")||location.href;if(s[i])return;let c={};const r=e=>t(e,i),w={module:{uri:i},exports:c,require:r};s[i]=Promise.all(a.map((e=>w[e]||r(e)))).then((e=>(n(...e),c)))}}define(["./workbox-e9849328"],(function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"9ddae6fb651604de7630293119506ed4"},{url:"/_next/static/D_QH_2w1wpvaQUPstb-Bw/_buildManifest.js",revision:"01b09b3e9dda7539be2313c35bd1b563"},{url:"/_next/static/D_QH_2w1wpvaQUPstb-Bw/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/1-af1f1e25dae140be.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/200-1def31964b2356b0.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/23-54b4ab21f3550ebc.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/283-d8ce32dab0aedc01.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/315-7943c6e46aec5d5e.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/323-cfe0cbab1e5ba15a.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/369-b616bc8f00fc0b77.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/427-8d8c459025f4dcb9.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/47edcb22-e33a29a5fce76af4.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/748-db3977eb7f9230bd.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/75-789b1b8b478cf3fd.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/app/(router)/add/page-a77d7554a2057d55.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/app/(router)/expense/page-ff0cf84c8ba67037.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/app/(router)/friend/page-0681de5cb14c92a3.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/app/(router)/group/page-9b31fbf8a9666021.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/app/(router)/layout-c185c2070dd928d9.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/app/(router)/page-644f0b4f976f6a09.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/app/_not-found/page-50a202315221fd62.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/app/api/auth/%5B...nextauth%5D/route-c76daf5c74849c0b.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/app/api/trpc/%5Btrpc%5D/route-3f6b1acc32fca989.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/app/layout-65f84582b7fce980.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/app/manifest.webmanifest/route-1cba1848fd15aa6a.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/framework-289b5a20f31bf2b1.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/main-094812ef791a00bb.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/main-app-da974a6306d5a606.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/pages/_app-7e5d4a60281b6427.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/pages/_error-77fa64d81664a8ec.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-69c67d16c363604a.js",revision:"D_QH_2w1wpvaQUPstb-Bw"},{url:"/_next/static/css/74d14436e2fb3a38.css",revision:"74d14436e2fb3a38"},{url:"/_next/static/media/569ce4b8f30dc480-s.p.woff2",revision:"ef6cefb32024deac234e82f932a95cbd"},{url:"/_next/static/media/ba015fad6dcf6784-s.woff2",revision:"8ea4f719af3312a055caf09f34c89a77"},{url:"/favicon.ico",revision:"7f98bbc43ba0d1dbf3564adf0821a304"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:t,state:a})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GETLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
define(["exports"],(function(t){"use strict";try{self["workbox:core:6.5.4"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:6.5.4"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class r{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class i extends r{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class a{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let a=i&&i.handler;const o=t.method;if(!a&&this.i.has(o)&&(a=this.i.get(o)),!a)return;let c;try{c=a.handle({url:s,request:t,event:e,params:r})}catch(t){c=Promise.reject(t)}const h=i&&i.catchHandler;return c instanceof Promise&&(this.o||h)&&(c=c.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:r})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),c}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const r=this.t.get(s.method)||[];for(const i of r){let r;const a=i.match({url:t,sameOrigin:e,request:s,event:n});if(a)return r=a,(Array.isArray(r)&&0===r.length||a.constructor===Object&&0===Object.keys(a).length||"boolean"==typeof a)&&(r=void 0),{route:i,params:r}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let o;const c=()=>(o||(o=new a,o.addFetchListener(),o.addCacheListener()),o);function h(t,e,n){let a;if("string"==typeof t){const s=new URL(t,location.href);a=new r((({url:t})=>t.href===s.href),e,n)}else if(t instanceof RegExp)a=new i(t,e,n);else if("function"==typeof t)a=new r(t,e,n);else{if(!(t instanceof r))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=t}return c().registerRoute(a),a}try{self["workbox:strategies:6.5.4"]&&_()}catch(t){}const u={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null},l={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},f=t=>[l.prefix,t,l.suffix].filter((t=>t&&t.length>0)).join("-"),w=t=>t||f(l.precache),d=t=>t||f(l.runtime);function p(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class y{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const g=new Set;function m(t){return"string"==typeof t?new Request(t):t}class v{constructor(t,e){this.h={},Object.assign(this,e),this.event=e.event,this.u=t,this.l=new y,this.p=[],this.m=[...t.plugins],this.v=new Map;for(const t of this.m)this.v.set(t,{});this.event.waitUntil(this.l.promise)}async fetch(t){const{event:e}=this;let n=m(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const r=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const i=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.u.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:i,response:t});return t}catch(t){throw r&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:r.clone(),request:i.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=m(t);let s;const{cacheName:n,matchOptions:r}=this.u,i=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},r),{cacheName:n});s=await caches.match(i,a);for(constLine truncated
|
||||
Reference in new issue
Block a user