tldraw/packages/www/public/sw.js
2021-09-04 10:17:10 +01:00

2 lines
6.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let s=Promise.resolve();return n[e]||(s=new Promise((async s=>{if("document"in self){const n=document.createElement("script");n.src=e,document.head.appendChild(n),n.onload=s}else importScripts(e),s()}))),s.then((()=>{if(!n[e])throw new Error(`Module ${e} didnt register its module`);return n[e]}))},s=(s,n)=>{Promise.all(s.map(e)).then((e=>n(1===e.length?e[0]:e)))},n={require:Promise.resolve(s)};self.define=(s,r,t)=>{n[s]||(n[s]=Promise.resolve().then((()=>{let n={};const i={uri:location.origin+s.slice(1)};return Promise.all(r.map((s=>{switch(s){case"exports":return n;case"module":return i;default:return e(s)}}))).then((e=>{const s=t(...e);return n.default||(n.default=s),n}))})))}}define("./sw.js",["./workbox-e9cae24d"],(function(e){"use strict";importScripts("worker-9zorZIgg-EzXvsnHBrTO_.js"),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/VerveineRegular.woff",revision:"858cc7add1765cbcfb0439e275fd167b"},{url:"/_next/static/9zorZIgg-EzXvsnHBrTO_/_buildManifest.js",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/9zorZIgg-EzXvsnHBrTO_/_ssgManifest.js",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/946.be8034bb4741e645734d.js",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/946.be8034bb4741e645734d.js.map",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/framework-6904c37ecf5b200e4e2e.js",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/framework-6904c37ecf5b200e4e2e.js.map",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/main-1fd13886f63948e5452c.js",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/main-1fd13886f63948e5452c.js.map",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/pages/_app-af6e89c4dda7db409078.js",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/pages/_app-af6e89c4dda7db409078.js.map",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/pages/_error-1cd1e11cd5e9c8211770.js",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/pages/_error-1cd1e11cd5e9c8211770.js.map",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/pages/index-00f614c6be4abbf55d66.js",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/pages/index-00f614c6be4abbf55d66.js.map",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/pages/r/%5Bid%5D-22c98f064aaf55fccee2.js",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/pages/r/%5Bid%5D-22c98f064aaf55fccee2.js.map",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/pages/u/%5Bid%5D-3e3c5cc071f0a68d97b4.js",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/pages/u/%5Bid%5D-3e3c5cc071f0a68d97b4.js.map",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/polyfills-7510a95ef9a46fd369c3.js",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/polyfills-7510a95ef9a46fd369c3.js.map",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/webpack-9513ffb94df872a9a6d9.js",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/chunks/webpack-9513ffb94df872a9a6d9.js.map",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/css/2946e48fdf8b8c44ed3f.css",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/_next/static/css/2946e48fdf8b8c44ed3f.css.map",revision:"9zorZIgg-EzXvsnHBrTO_"},{url:"/favicon.ico",revision:"c30c7d42707a47a3f4591831641e50dc"},{url:"/vercel.svg",revision:"4b4f1876502eb6721764637fe5c41702"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:n,state:r})=>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})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")}),new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")}),new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute((({url:e})=>!(self.origin===e.origin)),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")}));
//# sourceMappingURL=sw.js.map