From 57dd7b50a4062361d6cf41f987245ee469130d07 Mon Sep 17 00:00:00 2001 From: Jessica White Date: Sun, 7 Mar 2021 13:50:50 +0000 Subject: [PATCH] Enhancement: Add dependabot yml (#200) --- .github/dependabot.yml | 13 + public/sw.js | 840 +++++++++++++-- public/sw.js.map | 1 - public/workbox-c2b5e142.js | 1132 +++++++++++++++++++++ public/workbox-f88dbe3b.js | 1743 -------------------------------- public/workbox-f88dbe3b.js.map | 1 - 6 files changed, 1880 insertions(+), 1850 deletions(-) create mode 100644 .github/dependabot.yml delete mode 100644 public/sw.js.map create mode 100644 public/workbox-c2b5e142.js delete mode 100644 public/workbox-f88dbe3b.js delete mode 100644 public/workbox-f88dbe3b.js.map diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..32f52f4e7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + # Enable version updates for npm + - package-ecosystem: 'npm' + directory: '/' + schedule: + interval: 'daily' + + # Enable version updates for Docker + - package-ecosystem: 'docker' + directory: '/' + schedule: + interval: 'weekly' diff --git a/public/sw.js b/public/sw.js index cdfa7a604..dffa11572 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1,110 +1,740 @@ -/** - * Copyright 2018 Google Inc. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// If the loader is already loaded, just stop. if (!self.define) { - const singleRequire = (name) => { - if (name !== 'require') { - name = name + '.js'; - } - let promise = Promise.resolve(); - if (!registry[name]) { - promise = new Promise(async (resolve) => { - if ('document' in self) { - const script = document.createElement('script'); - script.src = name; - document.head.appendChild(script); - script.onload = resolve; - } else { - importScripts(name); - resolve(); - } - }); - } - return promise.then(() => { - if (!registry[name]) { - throw new Error(`Module ${name} didn’t register its module`); - } - return registry[name]; - }); - }; - - const require = (names, resolve) => { - Promise.all(names.map(singleRequire)).then((modules) => - resolve(modules.length === 1 ? modules[0] : modules), - ); - }; - - const registry = { - require: Promise.resolve(require), - }; - - self.define = (moduleName, depsNames, factory) => { - if (registry[moduleName]) { - // Module is already loading or loaded. - return; - } - registry[moduleName] = Promise.resolve().then(() => { - let exports = {}; - const module = { - uri: location.origin + moduleName.slice(1), - }; - return Promise.all( - depsNames.map((depName) => { - switch (depName) { - case 'exports': - return exports; - case 'module': - return module; - default: - return singleRequire(depName); - } - }), - ).then((deps) => { - const facValue = factory(...deps); - if (!exports.default) { - exports.default = facValue; - } - return exports; - }); - }); + const e = (e) => { + 'require' !== e && (e += '.js'); + let a = Promise.resolve(); + return ( + c[e] || + (a = new Promise(async (a) => { + if ('document' in self) { + const c = document.createElement('script'); + (c.src = e), + document.head.appendChild(c), + (c.onload = a); + } else importScripts(e), a(); + })), + a.then(() => { + if (!c[e]) + throw new Error(`Module ${e} didn’t register its module`); + return c[e]; + }) + ); + }, + a = (a, c) => { + Promise.all(a.map(e)).then((e) => c(1 === e.length ? e[0] : e)); + }, + c = { require: Promise.resolve(a) }; + self.define = (a, i, n) => { + c[a] || + (c[a] = Promise.resolve().then(() => { + let c = {}; + const s = { uri: location.origin + a.slice(1) }; + return Promise.all( + i.map((a) => { + switch (a) { + case 'exports': + return c; + case 'module': + return s; + default: + return e(a); + } + }), + ).then((e) => { + const a = n(...e); + return c.default || (c.default = a), c; + }); + })); }; } -define('./sw.js', ['./workbox-f88dbe3b'], function (workbox) { +define('./sw.js', ['./workbox-c2b5e142'], function (e) { 'use strict'; - - /** - * Welcome to your Workbox-powered service worker! - * - * You'll need to register this file in your web app. - * See https://goo.gl/nhQhGp - * - * The rest of the code is auto-generated. Please don't update this file - * directly; instead, make changes to your Workbox build configuration - * and re-run your build process. - * See https://goo.gl/2aRDsh - */ - - importScripts(); - workbox.skipWaiting(); - workbox.clientsClaim(); - workbox.registerRoute( - /.*/i, - new workbox.NetworkOnly({ - cacheName: 'dev', - plugins: [], - }), - 'GET', - ); + importScripts(), + e.skipWaiting(), + e.clientsClaim(), + e.precacheAndRoute( + [ + { + url: + '/_next/static/8QaQENjFOpWTU3ZhklzHc/_buildManifest.js', + revision: '4be84a70663f4f8bb841e792b53f6e0d', + }, + { + url: '/_next/static/8QaQENjFOpWTU3ZhklzHc/_ssgManifest.js', + revision: 'abee47769bf307639ace4945f9cfd4ff', + }, + { + url: '/_next/static/chunks/33.4952e9d9c51bcdd57703.js', + revision: 'a6f360e306472097137786d3ae99a27f', + }, + { + url: + '/_next/static/chunks/5ca5c56f799d13b4e8f9bf82275cbe0d6bf0524b.b59041517ee1123b4f5b.js', + revision: '27e9c49106f6b36ec7521b9bf7ed0ed3', + }, + { + url: + '/_next/static/chunks/641b24d28a4683a1a06449b26862f883fca9cf14.4ff82ebeef35c1f3fba9.js', + revision: 'd9de5cf41ddbcf298670f51db838cefd', + }, + { + url: + '/_next/static/chunks/a9a7754c.38e58b1eb1981260f1c6.js', + revision: '1f233bce8433948b246443da0e4bc1f1', + }, + { + url: + '/_next/static/chunks/cb1608f2.f647b6287f4880b306fb.js', + revision: '6b36e7ade17da86ed569a83ff4643414', + }, + { + url: '/_next/static/chunks/commons.7726cd762eacbba73350.js', + revision: 'af0769387b87d5cd61999bd3342c4801', + }, + { + url: + '/_next/static/chunks/dc84b7dc.4d62413f4da81be1e932.js', + revision: '99e6d6dc6704694222e663251c1f8deb', + }, + { + url: + '/_next/static/chunks/framework.3e75d4130136e9c8f6f1.js', + revision: 'e3f6316885b0193818e61e632ae01b10', + }, + { + url: '/_next/static/chunks/main-2951cff5cbdf06c85739.js', + revision: '8cc41dd81c2a8d0790e5ddf0de45f56d', + }, + { + url: + '/_next/static/chunks/pages/2019/album-4b8c74566c5cfc0848b6.js', + revision: '16fbdd9f241594606dc42cc8e9e2b489', + }, + { + url: + '/_next/static/chunks/pages/2019/speakers-26b348f74b90123e2e2c.js', + revision: '9eb00f8eacb33541ed64bbe0dc9b52f6', + }, + { + url: + '/_next/static/chunks/pages/2020/hacktober-812f6e8f98f6066062be.js', + revision: '7ffc5fb51f450d53e2fd141daa19ca19', + }, + { + url: + '/_next/static/chunks/pages/2020/notable-companies-7fec0a402f9dbd8fac2c.js', + revision: '74c6aa6283db6c8ff971b90343bf6a87', + }, + { + url: + '/_next/static/chunks/pages/2020/sponsor-a2f6291ef0c1b5290c0b.js', + revision: 'd5e9c98bc7019e81654661c516b89435', + }, + { + url: + '/_next/static/chunks/pages/_app-5c186207cacc4534772a.js', + revision: 'c2662fbd31b09de214a5bf5aa9bc6798', + }, + { + url: + '/_next/static/chunks/pages/_error-4c1aaf617c9ee361bffb.js', + revision: '6ab2b4fc089b27901db6c0da75f3e756', + }, + { + url: + '/_next/static/chunks/pages/agenda-629dc21c20cfa1d46a9c.js', + revision: '5e122f4f921469fc280c5596057b3db8', + }, + { + url: + '/_next/static/chunks/pages/code-of-conduct-56c84a2d9fbf04a280ed.js', + revision: 'e988b40a9d26a0852dc6f121c060c49c', + }, + { + url: + '/_next/static/chunks/pages/contact-9c63477e14589ba8b259.js', + revision: 'e621628b5f94114babb8aa960dd0beb0', + }, + { + url: + '/_next/static/chunks/pages/index-6b91219ae7a457635d13.js', + revision: 'e9c45fc43468d496b184db42caf6c45c', + }, + { + url: + '/_next/static/chunks/pages/information/accessibility-information-ef8033b6c1a84a9a6c7e.js', + revision: '5be2d19f50cfaf0dbe68ed739b49ed4c', + }, + { + url: + '/_next/static/chunks/pages/information/application-information-617bbe0149a82571ac60.js', + revision: '1cb63ea4c5f8f3f868cb9eb8acd0fbc7', + }, + { + url: + '/_next/static/chunks/pages/information/attendee-information-f4633241de1be9c25231.js', + revision: 'bbc466d00aff5e6c2257ec7ea299ac97', + }, + { + url: + '/_next/static/chunks/pages/information/conference-information-278d7fb4471d85d99ac1.js', + revision: 'a8607233822a263f9807ec8ed3e2266b', + }, + { + url: + '/_next/static/chunks/pages/information/crew-information-b9a40ad4de9b4af91315.js', + revision: '75cc95c0fdb79d804cecca3556a81b31', + }, + { + url: + '/_next/static/chunks/pages/information/hacktoberfest-information-db2b21e772779096aa29.js', + revision: 'f89f745681d9eb629584d43adedb803d', + }, + { + url: + '/_next/static/chunks/pages/information/main-page-69d86c4077e854f9e3c6.js', + revision: 'd09cc3deb0f0af22b9f42160a12414bb', + }, + { + url: + '/_next/static/chunks/pages/information/speaker-information-fe9fe1cd0bb4b60c748b.js', + revision: 'c2328e8961777337c83d71610d77fcba', + }, + { + url: + '/_next/static/chunks/pages/information/sponsor-information-583dc6ab6820945b99a1.js', + revision: '6f635ee68ce7b568d5ca187eb4e3886e', + }, + { + url: + '/_next/static/chunks/pages/information/ticket-information-46c5da0df06ceb630256.js', + revision: '3e5a4c0583668c9ad2f498bc8669445c', + }, + { + url: + '/_next/static/chunks/pages/information/venue-information-dfd3298871d4422f4919.js', + revision: '0d0bf4086869b2920790d0963297559d', + }, + { + url: + '/_next/static/chunks/pages/talks-de19650dc9e3bceffc5e.js', + revision: '5c80e22943758edd0f7e9c4854612813', + }, + { + url: + '/_next/static/chunks/polyfills-16a647303b65c72e1931.js', + revision: '5605f30be9368237f961753a11cb3e0e', + }, + { + url: '/_next/static/chunks/webpack-9fbdbae62a0a63c14841.js', + revision: 'bae5d55bc1f3e8faac58714544805c61', + }, + { + url: '/_next/static/css/dc84b7dc.3af9dcad.chunk.css', + revision: 'f5e056a337f3e5d446b6560ec8713acf', + }, + { + url: + '/icons/android-icon-192x192-dunplab-manifest-20421.jpg', + revision: 'eb164e10f2869767e94f1425d2c7e919', + }, + { + url: '/icons/apple-icon-114x114-dunplab-manifest-20421.jpg', + revision: '925c7fd02f1d1234ed8c07931bb8ac98', + }, + { + url: '/icons/apple-icon-120x120-dunplab-manifest-20421.jpg', + revision: '9a33be577a8ee1326eb4ad25c457f05d', + }, + { + url: '/icons/apple-icon-144x144-dunplab-manifest-20421.jpg', + revision: 'e45c0f0cc7a75845c8980033ac7d8dc9', + }, + { + url: '/icons/apple-icon-152x152-dunplab-manifest-20421.jpg', + revision: 'f46dcaa7423efdbb36d2c1f8da5d81e9', + }, + { + url: '/icons/apple-icon-180x180-dunplab-manifest-20421.jpg', + revision: '7a90a997edc3a049fafaab391554cd22', + }, + { + url: '/icons/apple-icon-57x57-dunplab-manifest-20421.jpg', + revision: '04275ecd370621240d92aa22808f1123', + }, + { + url: '/icons/apple-icon-60x60-dunplab-manifest-20421.jpg', + revision: '5fad6f002e0a6f43a979eafa1aa8238c', + }, + { + url: '/icons/apple-icon-72x72-dunplab-manifest-20421.jpg', + revision: '0d9a8e92963f5e7764201e7832c76e64', + }, + { + url: '/icons/apple-icon-76x76-dunplab-manifest-20421.jpg', + revision: 'ca0b323da808cff29e1ecb2c0c102706', + }, + { + url: '/icons/favicon-16x16-dunplab-manifest-20421.jpg', + revision: '1f2f57b64eb5afad75e3fb4924aeb99f', + }, + { + url: '/icons/favicon-32x32-dunplab-manifest-20421.jpg', + revision: '3d4938b52b1f3587f4ef2a165fc98bfb', + }, + { + url: '/icons/favicon-96x96-dunplab-manifest-20421.jpg', + revision: '2b35afc5edb6a7c156222584a8dd9001', + }, + { + url: '/manifest.json', + revision: '6f7a87c0996ba0750b3268156ffdf897', + }, + { + url: '/static/banners/album.jpg', + revision: '0fa0546804846429c4784ece97fbf444', + }, + { + url: '/static/banners/autumn-header.jpg', + revision: 'b2cdda3e0e830a4b82b9a869c455c34e', + }, + { + url: '/static/banners/christmas-header.jpg', + revision: 'aefe32e5b8cc4ebd2ed941338bd4b23c', + }, + { + url: '/static/banners/christmas-header.png', + revision: '3e6ce748e0a60b7600e5e1b25eecbacf', + }, + { + url: '/static/banners/coc.jpg', + revision: '06d70df1d227f04eb130e3cb1013d921', + }, + { + url: '/static/banners/contact.jpg', + revision: '2005311ca148d0dab06b0528366c8aa3', + }, + { + url: '/static/banners/home.jpg', + revision: '4e12cff4b48c50eebee4cdf43f05d4e1', + }, + { + url: '/static/banners/information/accessibility.jpg', + revision: '964cfa726ecea3fbc05a249e68ca50f6', + }, + { + url: '/static/banners/information/apply.jpg', + revision: '1d94a35add27b8918aa5a730a663afbf', + }, + { + url: '/static/banners/information/attendee.jpg', + revision: 'a3f596387ddd8a0f7c5c1f1b8a968406', + }, + { + url: '/static/banners/information/crew.jpg', + revision: '255ddcaceb0bb5a1c2049c384a7bd326', + }, + { + url: '/static/banners/information/hacktober.jpg', + revision: '473ed91210a1a14cf2d939f287dfb293', + }, + { + url: '/static/banners/information/header.jpg', + revision: '60471d0076cd1a847705f3c0aec16e66', + }, + { + url: '/static/banners/information/organisers.jpg', + revision: 'bc2d5326c33462af29a92296243d1224', + }, + { + url: '/static/banners/information/speakers.jpg', + revision: 'bcca87831ed5b041a24719f6f1506ff1', + }, + { + url: '/static/banners/information/sponsor.jpg', + revision: '49789b6802474c0c009a24d7acff5ca3', + }, + { + url: '/static/banners/information/swagbag.jpg', + revision: '59072f490336584982a3d698fffc2cdf', + }, + { + url: '/static/banners/information/thencc.jpg', + revision: 'c92f03efab4dab403dbc1d897f1c1982', + }, + { + url: '/static/banners/notable.jpg', + revision: '8f0cd2d315c86617b0977653c2f11293', + }, + { + url: '/static/banners/pride-header.jpg', + revision: '951bcfa52658e5cfecb3e8fc081d800a', + }, + { + url: '/static/banners/pride-header.png', + revision: '58e403d3278ccfc8778ba72c0946399b', + }, + { + url: '/static/banners/pubconf.jpg', + revision: '81f9e1b72be662358071b4ab962a22c3', + }, + { + url: '/static/banners/pubconf.png', + revision: '739209dc5e592ba7f0375416c8be174a', + }, + { + url: '/static/banners/sponsor.jpg', + revision: 'fd7eedbbf937675ff81b83ab2b33b57b', + }, + { + url: '/static/banners/talks.jpg', + revision: '99a731bf536e501912266215342d4a9f', + }, + { + url: '/static/client/object-assign-auto.min.js', + revision: '3bddb8b52a177c246d12eadec8728688', + }, + { + url: '/static/client/sessionize.css', + revision: '8fcd72ec7b91a0e1f444fa4b61fd3cc1', + }, + { + url: '/static/client/sessionize.js', + revision: '3270900301c2f7ed1d04fe5de60357ef', + }, + { + url: '/static/ddd_avatar_300.jpg', + revision: '7fd3ee7ef153f4de6c1ab0c08816a9e5', + }, + { + url: '/static/ddd_avatar_400x400.jpg', + revision: '3870bc09feb731805cd3fa700ad1ff3e', + }, + { + url: '/static/favicon/android-icon-144x144.png', + revision: '977c3fc692f196f11cb817a8716a6c8a', + }, + { + url: '/static/favicon/android-icon-192x192.png', + revision: 'e8de5dd1ee9443fb0c1cf156c22e9bca', + }, + { + url: '/static/favicon/android-icon-36x36.png', + revision: '4e2b8f703e1816cd34026fbf98eeed66', + }, + { + url: '/static/favicon/android-icon-48x48.png', + revision: '18d7e980ed26ab9ca92868392814fe04', + }, + { + url: '/static/favicon/android-icon-72x72.png', + revision: '6d903f6a9881a66419855a453bcbcc3e', + }, + { + url: '/static/favicon/android-icon-96x96.png', + revision: 'df7df7836ef02bcda240cc8479bff849', + }, + { + url: '/static/favicon/apple-icon-114x114.png', + revision: '34a5c2cfffe9260c65faaa70017afd5e', + }, + { + url: '/static/favicon/apple-icon-120x120.png', + revision: 'e72c068fe41a6be9c6617534a86d075d', + }, + { + url: '/static/favicon/apple-icon-144x144.png', + revision: '977c3fc692f196f11cb817a8716a6c8a', + }, + { + url: '/static/favicon/apple-icon-152x152.png', + revision: 'd37ae8818ffad2fa798c1ce7ae3cbb08', + }, + { + url: '/static/favicon/apple-icon-180x180.png', + revision: '010c25ed2003c0741a1509bc4bad8327', + }, + { + url: '/static/favicon/apple-icon-57x57.png', + revision: 'a554531bf21758e4b9551443f23d4651', + }, + { + url: '/static/favicon/apple-icon-60x60.png', + revision: 'c9a31345a96bf99db75c7ee65173f45d', + }, + { + url: '/static/favicon/apple-icon-72x72.png', + revision: '6d903f6a9881a66419855a453bcbcc3e', + }, + { + url: '/static/favicon/apple-icon-76x76.png', + revision: '90196e6c0b67e4dfc3faad47143bca2e', + }, + { + url: '/static/favicon/apple-icon-precomposed.png', + revision: 'a98cdcfb2caaeaa8fc972bfe40f4a97f', + }, + { + url: '/static/favicon/apple-icon.png', + revision: 'a98cdcfb2caaeaa8fc972bfe40f4a97f', + }, + { + url: '/static/favicon/browserconfig.xml', + revision: '653d077300a12f09a69caeea7a8947f8', + }, + { + url: '/static/favicon/favicon-16x16.png', + revision: 'dc07f821fc9c0596d98ac8ae2d998fa8', + }, + { + url: '/static/favicon/favicon-32x32.png', + revision: 'eec482697f77dc4e9b942f96d587e771', + }, + { + url: '/static/favicon/favicon-96x96.png', + revision: 'df7df7836ef02bcda240cc8479bff849', + }, + { + url: '/static/favicon/favicon.ico', + revision: '7279ed3ca87d28e3a53f5e07b4ead74f', + }, + { + url: '/static/favicon/manifest.json', + revision: 'f92495f5c65456e414d93695b52ed231', + }, + { + url: '/static/favicon/ms-icon-144x144.png', + revision: '977c3fc692f196f11cb817a8716a6c8a', + }, + { + url: '/static/favicon/ms-icon-150x150.png', + revision: '675e9eeb4a9164e983ea7d928b5ad2ec', + }, + { + url: '/static/favicon/ms-icon-310x310.png', + revision: '33083e2f487e529e2e99ac8dc65ecb8d', + }, + { + url: '/static/favicon/ms-icon-70x70.png', + revision: 'fedfdf5460d6f26ad592b9c9f8b68522', + }, + { + url: '/static/hacktoberfest.svg', + revision: '00a9aabe6a0e7b20783f41819ee131d3', + }, + { + url: '/static/hacktoberfest/hacktoberfest.png', + revision: 'f43a931c14a6c7de1993f535f5e83f46', + }, + { + url: '/static/hacktoberfest/screenshot.png', + revision: '7c2cf79fc44edc264207bffd3b0d2212', + }, + { + url: '/static/info/sponsors/promo.png', + revision: '5b154d1fdc101670388c527c0c4ec552', + }, + { + url: '/static/organisers/jess.jpg', + revision: 'd32899f87de9713971f4226590bb0e8a', + }, + { + url: '/static/organisers/mort.jpg', + revision: '3cdf9199bbcfb5e7b46d3c5b76ea06a5', + }, + { + url: '/static/organisers/rachel.jpg', + revision: '0dcc860cd4540329ff7e6b4377768268', + }, + { + url: '/static/rooms/LT2.jpg', + revision: '700e611df21f01c719b202d4e2bd7ce3', + }, + { + url: '/static/rooms/LT2.png', + revision: '68231b81e8e60475ac7a5da2b6a94352', + }, + { + url: '/static/rooms/LT4.jpg', + revision: '71de93fa61af7f2265cbd74d0d5b464c', + }, + { + url: '/static/rooms/LT4.png', + revision: '07bf80cb74474f45e5f9ca135bc75af3', + }, + { + url: '/static/rooms/LT4_Back.jpg', + revision: '8d563e3054f5c34e433efe340c6c49d2', + }, + { + url: '/static/rooms/LT5.jpg', + revision: '27934ce26dd805e8b276eedd96984ce4', + }, + { + url: '/static/rooms/LT5.png', + revision: '5de6a1d524ef1255963f3f3c67e76610', + }, + { + url: '/static/rooms/LT5_Back.jpg', + revision: '78c437336caf647b0775416bc3949447', + }, + { + url: '/static/sponsors/20i.png', + revision: 'd4a0f1709979cdb8e83de3bcf218963e', + }, + { + url: '/static/sponsors/DistinctRec.png', + revision: '1acdc5553f757e587f380b22dad2f1fd', + }, + { + url: '/static/sponsors/ERT.png', + revision: 'df6ff7c5e9838f1ea3063c85a92162bd', + }, + { + url: '/static/sponsors/Experian.png', + revision: '86ad081752f750f62471e6a4167118df', + }, + { + url: '/static/sponsors/Mindera.png', + revision: '8547be6d62dfc0ab865fe8a73d9f2eeb', + }, + { + url: '/static/sponsors/NDC_Conferences.png', + revision: '848e275a79b51443f881e9399a52fa4b', + }, + { + url: '/static/sponsors/Razor.png', + revision: 'ab52396695e430a173516dfe71414799', + }, + ], + { ignoreURLParametersMatching: [] }, + ), + e.cleanupOutdatedCaches(), + e.registerRoute( + '/', + new e.NetworkFirst({ + cacheName: 'start-url', + plugins: [ + new e.ExpirationPlugin({ + maxEntries: 1, + maxAgeSeconds: 86400, + purgeOnQuotaError: !0, + }), + ], + }), + 'GET', + ), + e.registerRoute( + /^https:\/\/fonts\.(?:googleapis|gstatic)\.com\/.*/i, + new e.CacheFirst({ + cacheName: 'google-fonts', + plugins: [ + new e.ExpirationPlugin({ + maxEntries: 4, + maxAgeSeconds: 31536e3, + purgeOnQuotaError: !0, + }), + ], + }), + '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, + purgeOnQuotaError: !0, + }), + ], + }), + '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, + purgeOnQuotaError: !0, + }), + ], + }), + 'GET', + ), + e.registerRoute( + /\.(?:js)$/i, + new e.StaleWhileRevalidate({ + cacheName: 'static-js-assets', + plugins: [ + new e.ExpirationPlugin({ + maxEntries: 32, + maxAgeSeconds: 86400, + purgeOnQuotaError: !0, + }), + ], + }), + 'GET', + ), + e.registerRoute( + /\.(?:css|less)$/i, + new e.StaleWhileRevalidate({ + cacheName: 'static-style-assets', + plugins: [ + new e.ExpirationPlugin({ + maxEntries: 32, + maxAgeSeconds: 86400, + purgeOnQuotaError: !0, + }), + ], + }), + 'GET', + ), + e.registerRoute( + /\.(?:json|xml|csv)$/i, + new e.NetworkFirst({ + cacheName: 'static-data-assets', + plugins: [ + new e.ExpirationPlugin({ + maxEntries: 32, + maxAgeSeconds: 86400, + purgeOnQuotaError: !0, + }), + ], + }), + 'GET', + ), + e.registerRoute( + /\/api\/.*$/i, + new e.NetworkFirst({ + cacheName: 'apis', + networkTimeoutSeconds: 10, + plugins: [ + new e.ExpirationPlugin({ + maxEntries: 16, + maxAgeSeconds: 86400, + purgeOnQuotaError: !0, + }), + ], + }), + 'GET', + ), + e.registerRoute( + /.*/i, + new e.NetworkFirst({ + cacheName: 'others', + networkTimeoutSeconds: 10, + plugins: [ + new e.ExpirationPlugin({ + maxEntries: 32, + maxAgeSeconds: 86400, + purgeOnQuotaError: !0, + }), + ], + }), + 'GET', + ); }); -//# sourceMappingURL=sw.js.map diff --git a/public/sw.js.map b/public/sw.js.map deleted file mode 100644 index f28f37ab9..000000000 --- a/public/sw.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sw.js","sources":["../../../../private/var/folders/5n/dczw3dyd1kx7dbqdj1rq7hdw0000gn/T/f31ac6d8eeab95614d4968f4e09d24d5/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/Users/johnnolan/git/dddem-web/node_modules/workbox-routing/registerRoute.mjs';\nimport {NetworkOnly as workbox_strategies_NetworkOnly} from '/Users/johnnolan/git/dddem-web/node_modules/workbox-strategies/NetworkOnly.mjs';\nimport {skipWaiting as workbox_core_skipWaiting} from '/Users/johnnolan/git/dddem-web/node_modules/workbox-core/skipWaiting.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/Users/johnnolan/git/dddem-web/node_modules/workbox-core/clientsClaim.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\nimportScripts(\n \n);\n\n\n\n\n\n\n\nworkbox_core_skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n\nworkbox_routing_registerRoute(/.*/i, new workbox_strategies_NetworkOnly({ \"cacheName\":\"dev\", plugins: [] }), 'GET');\n\n\n\n\n"],"names":["importScripts","workbox_core_skipWaiting","workbox_core_clientsClaim","workbox_routing_registerRoute","workbox_strategies_NetworkOnly","plugins"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGoI;;;;;;;;;;;;EAapIA,aAAa;AAUbC,qBAAwB;AAExBC,sBAAyB;AAIzBC,uBAA6B,CAAC,KAAD,EAAQ,IAAIC,mBAAJ,CAAmC;EAAE,eAAY,KAAd;EAAqBC,EAAAA,OAAO,EAAE;EAA9B,CAAnC,CAAR,EAAgF,KAAhF,CAA7B;;"} \ No newline at end of file diff --git a/public/workbox-c2b5e142.js b/public/workbox-c2b5e142.js new file mode 100644 index 000000000..8a776d7f3 --- /dev/null +++ b/public/workbox-c2b5e142.js @@ -0,0 +1,1132 @@ +define('./workbox-c2b5e142.js', ['exports'], function (t) { + 'use strict'; + try { + self['workbox:core:5.1.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:5.1.4'] && _(); + } catch (t) {} + const n = (t) => (t && 'object' == typeof t ? t : { handle: t }); + class i { + constructor(t, e, s = 'GET') { + (this.handler = n(e)), (this.match = t), (this.method = s); + } + } + class r extends i { + 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, + ); + } + } + const a = (t) => + new URL(String(t), location.href).href.replace( + new RegExp('^' + location.origin), + '', + ); + class c { + constructor() { + this.t = 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((t) => { + 'string' == typeof t && (t = [t]); + const e = new Request(...t); + return this.handleRequest({ request: e }); + }), + ); + 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 { params: n, route: i } = this.findMatchingRoute({ + url: s, + request: t, + event: e, + }); + let r, + a = i && i.handler; + if ((!a && this.s && (a = this.s), a)) { + try { + r = a.handle({ url: s, request: t, event: e, params: n }); + } catch (t) { + r = Promise.reject(t); + } + return ( + r instanceof Promise && + this.i && + (r = r.catch((n) => + this.i.handle({ url: s, request: t, event: e }), + )), + r + ); + } + } + findMatchingRoute({ url: t, request: e, event: s }) { + const n = this.t.get(e.method) || []; + for (const i of n) { + let n; + const r = i.match({ url: t, request: e, event: s }); + if (r) + return ( + (n = r), + ((Array.isArray(r) && 0 === r.length) || + (r.constructor === Object && + 0 === Object.keys(r).length) || + 'boolean' == typeof r) && + (n = void 0), + { route: i, params: n } + ); + } + return {}; + } + setDefaultHandler(t) { + this.s = n(t); + } + setCatchHandler(t) { + this.i = 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 h = () => ( + o || ((o = new c()), o.addFetchListener(), o.addCacheListener()), + o + ); + const u = { + googleAnalytics: 'googleAnalytics', + precache: 'precache-v2', + prefix: 'workbox', + runtime: 'runtime', + suffix: + 'undefined' != typeof registration ? registration.scope : '', + }, + l = (t) => + [u.prefix, t, u.suffix] + .filter((t) => t && t.length > 0) + .join('-'), + f = (t) => t || l(u.precache), + w = (t) => t || l(u.runtime); + function p(t) { + t.then(() => {}); + } + const d = new Set(); + class y { + constructor( + t, + e, + { onupgradeneeded: s, onversionchange: n } = {}, + ) { + (this.o = null), + (this.h = t), + (this.u = e), + (this.l = s), + (this.p = n || (() => this.close())); + } + get db() { + return this.o; + } + async open() { + if (!this.o) + return ( + (this.o = await new Promise((t, e) => { + let s = !1; + setTimeout(() => { + (s = !0), + e( + new Error( + 'The open request was blocked and timed out', + ), + ); + }, this.OPEN_TIMEOUT); + const n = indexedDB.open(this.h, this.u); + (n.onerror = () => e(n.error)), + (n.onupgradeneeded = (t) => { + s + ? (n.transaction.abort(), n.result.close()) + : 'function' == typeof this.l && this.l(t); + }), + (n.onsuccess = () => { + const e = n.result; + s + ? e.close() + : ((e.onversionchange = this.p.bind(this)), t(e)); + }); + })), + this + ); + } + async getKey(t, e) { + return (await this.getAllKeys(t, e, 1))[0]; + } + async getAll(t, e, s) { + return await this.getAllMatching(t, { query: e, count: s }); + } + async getAllKeys(t, e, s) { + return ( + await this.getAllMatching(t, { + query: e, + count: s, + includeKeys: !0, + }) + ).map((t) => t.key); + } + async getAllMatching( + t, + { + index: e, + query: s = null, + direction: n = 'next', + count: i, + includeKeys: r = !1, + } = {}, + ) { + return await this.transaction([t], 'readonly', (a, c) => { + const o = a.objectStore(t), + h = e ? o.index(e) : o, + u = [], + l = h.openCursor(s, n); + l.onsuccess = () => { + const t = l.result; + t + ? (u.push(r ? t : t.value), + i && u.length >= i ? c(u) : t.continue()) + : c(u); + }; + }); + } + async transaction(t, e, s) { + return ( + await this.open(), + await new Promise((n, i) => { + const r = this.o.transaction(t, e); + (r.onabort = () => i(r.error)), + (r.oncomplete = () => n()), + s(r, (t) => n(t)); + }) + ); + } + async g(t, e, s, ...n) { + return await this.transaction([e], s, (s, i) => { + const r = s.objectStore(e), + a = r[t].apply(r, n); + a.onsuccess = () => i(a.result); + }); + } + close() { + this.o && (this.o.close(), (this.o = null)); + } + } + y.prototype.OPEN_TIMEOUT = 2e3; + const g = { + readonly: ['get', 'count', 'getKey', 'getAll', 'getAllKeys'], + readwrite: ['add', 'put', 'clear', 'delete'], + }; + for (const [t, e] of Object.entries(g)) + for (const s of e) + s in IDBObjectStore.prototype && + (y.prototype[s] = async function (e, ...n) { + return await this.g(s, e, t, ...n); + }); + try { + self['workbox:expiration:5.1.4'] && _(); + } catch (t) {} + const m = (t) => { + const e = new URL(t, location.href); + return (e.hash = ''), e.href; + }; + class q { + constructor(t) { + (this.m = t), + (this.o = new y('workbox-expiration', 1, { + onupgradeneeded: (t) => this.q(t), + })); + } + q(t) { + const e = t.target.result.createObjectStore('cache-entries', { + keyPath: 'id', + }); + e.createIndex('cacheName', 'cacheName', { unique: !1 }), + e.createIndex('timestamp', 'timestamp', { unique: !1 }), + (async (t) => { + await new Promise((e, s) => { + const n = indexedDB.deleteDatabase(t); + (n.onerror = () => { + s(n.error); + }), + (n.onblocked = () => { + s(new Error('Delete blocked')); + }), + (n.onsuccess = () => { + e(); + }); + }); + })(this.m); + } + async setTimestamp(t, e) { + const s = { + url: (t = m(t)), + timestamp: e, + cacheName: this.m, + id: this.v(t), + }; + await this.o.put('cache-entries', s); + } + async getTimestamp(t) { + return (await this.o.get('cache-entries', this.v(t))).timestamp; + } + async expireEntries(t, e) { + const s = await this.o.transaction( + 'cache-entries', + 'readwrite', + (s, n) => { + const i = s + .objectStore('cache-entries') + .index('timestamp') + .openCursor(null, 'prev'), + r = []; + let a = 0; + i.onsuccess = () => { + const s = i.result; + if (s) { + const n = s.value; + n.cacheName === this.m && + ((t && n.timestamp < t) || (e && a >= e) + ? r.push(s.value) + : a++), + s.continue(); + } else n(r); + }; + }, + ), + n = []; + for (const t of s) + await this.o.delete('cache-entries', t.id), n.push(t.url); + return n; + } + v(t) { + return this.m + '|' + m(t); + } + } + class v { + constructor(t, e = {}) { + (this.R = !1), + (this.U = !1), + (this.L = e.maxEntries), + (this.N = e.maxAgeSeconds), + (this.m = t), + (this._ = new q(t)); + } + async expireEntries() { + if (this.R) return void (this.U = !0); + this.R = !0; + const t = this.N ? Date.now() - 1e3 * this.N : 0, + e = await this._.expireEntries(t, this.L), + s = await self.caches.open(this.m); + for (const t of e) await s.delete(t); + (this.R = !1), + this.U && ((this.U = !1), p(this.expireEntries())); + } + async updateTimestamp(t) { + await this._.setTimestamp(t, Date.now()); + } + async isURLExpired(t) { + if (this.N) { + return ( + (await this._.getTimestamp(t)) < Date.now() - 1e3 * this.N + ); + } + return !1; + } + async delete() { + (this.U = !1), await this._.expireEntries(1 / 0); + } + } + const R = (t, e) => t.filter((t) => e in t), + U = async ({ request: t, mode: e, plugins: s = [] }) => { + const n = R(s, 'cacheKeyWillBeUsed'); + let i = t; + for (const t of n) + (i = await t.cacheKeyWillBeUsed.call(t, { + mode: e, + request: i, + })), + 'string' == typeof i && (i = new Request(i)); + return i; + }, + L = async ({ + cacheName: t, + request: e, + event: s, + matchOptions: n, + plugins: i = [], + }) => { + const r = await self.caches.open(t), + a = await U({ plugins: i, request: e, mode: 'read' }); + let c = await r.match(a, n); + for (const e of i) + if ('cachedResponseWillBeUsed' in e) { + const i = e.cachedResponseWillBeUsed; + c = await i.call(e, { + cacheName: t, + event: s, + matchOptions: n, + cachedResponse: c, + request: a, + }); + } + return c; + }, + x = async ({ + cacheName: t, + request: e, + response: n, + event: i, + plugins: r = [], + matchOptions: c, + }) => { + const o = await U({ plugins: r, request: e, mode: 'write' }); + if (!n) + throw new s('cache-put-with-no-response', { url: a(o.url) }); + const h = await (async ({ + request: t, + response: e, + event: s, + plugins: n = [], + }) => { + let i = e, + r = !1; + for (const e of n) + if ('cacheWillUpdate' in e) { + r = !0; + const n = e.cacheWillUpdate; + if ( + ((i = await n.call(e, { + request: t, + response: i, + event: s, + })), + !i) + ) + break; + } + return ( + r || (i = i && 200 === i.status ? i : void 0), i || null + ); + })({ event: i, plugins: r, response: n, request: o }); + if (!h) return; + const u = await self.caches.open(t), + l = R(r, 'cacheDidUpdate'), + f = + l.length > 0 + ? await L({ cacheName: t, matchOptions: c, request: o }) + : null; + try { + await u.put(o, h); + } catch (t) { + throw ( + ('QuotaExceededError' === t.name && + (await (async function () { + for (const t of d) await t(); + })()), + t) + ); + } + for (const e of l) + await e.cacheDidUpdate.call(e, { + cacheName: t, + event: i, + oldResponse: f, + newResponse: h, + request: o, + }); + }, + N = L, + b = async ({ + request: t, + fetchOptions: e, + event: n, + plugins: i = [], + }) => { + if ( + ('string' == typeof t && (t = new Request(t)), + n instanceof FetchEvent && n.preloadResponse) + ) { + const t = await n.preloadResponse; + if (t) return t; + } + const r = R(i, 'fetchDidFail'), + a = r.length > 0 ? t.clone() : null; + try { + for (const e of i) + if ('requestWillFetch' in e) { + const s = e.requestWillFetch, + i = t.clone(); + t = await s.call(e, { request: i, event: n }); + } + } catch (t) { + throw new s('plugin-error-request-will-fetch', { + thrownError: t, + }); + } + const c = t.clone(); + try { + let s; + s = + 'navigate' === t.mode ? await fetch(t) : await fetch(t, e); + for (const t of i) + 'fetchDidSucceed' in t && + (s = await t.fetchDidSucceed.call(t, { + event: n, + request: c, + response: s, + })); + return s; + } catch (t) { + for (const e of r) + await e.fetchDidFail.call(e, { + error: t, + event: n, + originalRequest: a.clone(), + request: c.clone(), + }); + throw t; + } + }; + try { + self['workbox:strategies:5.1.4'] && _(); + } catch (t) {} + const O = { + cacheWillUpdate: async ({ response: t }) => + 200 === t.status || 0 === t.status ? t : null, + }; + let E; + async function K(t, e) { + const s = t.clone(), + n = { + headers: new Headers(s.headers), + status: s.status, + statusText: s.statusText, + }, + i = e ? e(n) : n, + r = (function () { + if (void 0 === E) { + const t = new Response(''); + if ('body' in t) + try { + new Response(t.body), (E = !0); + } catch (t) { + E = !1; + } + E = !1; + } + return E; + })() + ? s.body + : await s.blob(); + return new Response(r, i); + } + try { + self['workbox:precaching:5.1.4'] && _(); + } catch (t) {} + function M(t) { + if (!t) + throw new s('add-to-cache-list-unexpected-type', { entry: t }); + if ('string' == typeof t) { + const e = new URL(t, location.href); + return { cacheKey: e.href, url: e.href }; + } + const { revision: e, url: n } = t; + if (!n) + throw new s('add-to-cache-list-unexpected-type', { entry: t }); + if (!e) { + const t = new URL(n, location.href); + return { cacheKey: t.href, url: t.href }; + } + const i = new URL(n, location.href), + r = new URL(n, location.href); + return ( + i.searchParams.set('__WB_REVISION__', e), + { cacheKey: i.href, url: r.href } + ); + } + class P { + constructor(t) { + (this.m = f(t)), + (this.O = new Map()), + (this.K = new Map()), + (this.M = new Map()); + } + addToCacheList(t) { + const e = []; + for (const n of t) { + 'string' == typeof n + ? e.push(n) + : n && void 0 === n.revision && e.push(n.url); + const { cacheKey: t, url: i } = M(n), + r = + 'string' != typeof n && n.revision ? 'reload' : 'default'; + if (this.O.has(i) && this.O.get(i) !== t) + throw new s('add-to-cache-list-conflicting-entries', { + firstEntry: this.O.get(i), + secondEntry: t, + }); + if ('string' != typeof n && n.integrity) { + if (this.M.has(t) && this.M.get(t) !== n.integrity) + throw new s('add-to-cache-list-conflicting-integrities', { + url: i, + }); + this.M.set(t, n.integrity); + } + if ((this.O.set(i, t), this.K.set(i, r), e.length > 0)) { + const t = `Workbox is precaching URLs without revision info: ${e.join( + ', ', + )}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`; + console.warn(t); + } + } + } + async install({ event: t, plugins: e } = {}) { + const s = [], + n = [], + i = await self.caches.open(this.m), + r = await i.keys(), + a = new Set(r.map((t) => t.url)); + for (const [t, e] of this.O) + a.has(e) ? n.push(t) : s.push({ cacheKey: e, url: t }); + const c = s.map(({ cacheKey: s, url: n }) => { + const i = this.M.get(s), + r = this.K.get(n); + return this.P({ + cacheKey: s, + cacheMode: r, + event: t, + integrity: i, + plugins: e, + url: n, + }); + }); + await Promise.all(c); + return { updatedURLs: s.map((t) => t.url), notUpdatedURLs: n }; + } + async activate() { + const t = await self.caches.open(this.m), + e = await t.keys(), + s = new Set(this.O.values()), + n = []; + for (const i of e) + s.has(i.url) || (await t.delete(i), n.push(i.url)); + return { deletedURLs: n }; + } + async P({ + cacheKey: t, + url: e, + cacheMode: n, + event: i, + plugins: r, + integrity: a, + }) { + const c = new Request(e, { + integrity: a, + cache: n, + credentials: 'same-origin', + }); + let o, + h = await b({ event: i, plugins: r, request: c }); + for (const t of r || []) 'cacheWillUpdate' in t && (o = t); + if ( + !(o + ? await o.cacheWillUpdate({ + event: i, + request: c, + response: h, + }) + : h.status < 400) + ) + throw new s('bad-precaching-response', { + url: e, + status: h.status, + }); + h.redirected && (h = await K(h)), + await x({ + event: i, + plugins: r, + response: h, + request: t === e ? c : new Request(t), + cacheName: this.m, + matchOptions: { ignoreSearch: !0 }, + }); + } + getURLsToCacheKeys() { + return this.O; + } + getCachedURLs() { + return [...this.O.keys()]; + } + getCacheKeyForURL(t) { + const e = new URL(t, location.href); + return this.O.get(e.href); + } + async matchPrecache(t) { + const e = t instanceof Request ? t.url : t, + s = this.getCacheKeyForURL(e); + if (s) { + return (await self.caches.open(this.m)).match(s); + } + } + createHandler(t = !0) { + return async ({ request: e }) => { + try { + const t = await this.matchPrecache(e); + if (t) return t; + throw new s('missing-precache-entry', { + cacheName: this.m, + url: e instanceof Request ? e.url : e, + }); + } catch (s) { + if (t) return fetch(e); + throw s; + } + }; + } + createHandlerBoundToURL(t, e = !0) { + if (!this.getCacheKeyForURL(t)) + throw new s('non-precached-url', { url: t }); + const n = this.createHandler(e), + i = new Request(t); + return () => n({ request: i }); + } + } + let T; + const D = () => (T || (T = new P()), T); + const k = (t, e) => { + const s = D().getURLsToCacheKeys(); + for (const n of (function* ( + t, + { + ignoreURLParametersMatching: e, + directoryIndex: s, + cleanURLs: n, + urlManipulation: i, + } = {}, + ) { + const r = new URL(t, location.href); + (r.hash = ''), yield r.href; + const a = (function (t, e = []) { + for (const s of [...t.searchParams.keys()]) + e.some((t) => t.test(s)) && t.searchParams.delete(s); + return t; + })(r, e); + if ((yield a.href, s && a.pathname.endsWith('/'))) { + const t = new URL(a.href); + (t.pathname += s), yield t.href; + } + if (n) { + const t = new URL(a.href); + (t.pathname += '.html'), yield t.href; + } + if (i) { + const t = i({ url: r }); + for (const e of t) yield e.href; + } + })(t, e)) { + const t = s.get(n); + if (t) return t; + } + }; + let C = !1; + function A(t) { + C || + ((({ + ignoreURLParametersMatching: t = [/^utm_/], + directoryIndex: e = 'index.html', + cleanURLs: s = !0, + urlManipulation: n, + } = {}) => { + const i = f(); + self.addEventListener('fetch', (r) => { + const a = k(r.request.url, { + cleanURLs: s, + directoryIndex: e, + ignoreURLParametersMatching: t, + urlManipulation: n, + }); + if (!a) return; + let c = self.caches + .open(i) + .then((t) => t.match(a)) + .then((t) => t || fetch(a)); + r.respondWith(c); + }); + })(t), + (C = !0)); + } + const S = [], + F = { + get: () => S, + add(t) { + S.push(...t); + }, + }, + I = (t) => { + const e = D(), + s = F.get(); + t.waitUntil( + e.install({ event: t, plugins: s }).catch((t) => { + throw t; + }), + ); + }, + W = (t) => { + const e = D(); + t.waitUntil(e.activate()); + }; + (t.CacheFirst = class { + constructor(t = {}) { + (this.m = w(t.cacheName)), + (this.T = t.plugins || []), + (this.D = t.fetchOptions), + (this.k = t.matchOptions); + } + async handle({ event: t, request: e }) { + 'string' == typeof e && (e = new Request(e)); + let n, + i = await N({ + cacheName: this.m, + request: e, + event: t, + matchOptions: this.k, + plugins: this.T, + }); + if (!i) + try { + i = await this.C(e, t); + } catch (t) { + n = t; + } + if (!i) throw new s('no-response', { url: e.url, error: n }); + return i; + } + async C(t, e) { + const s = await b({ + request: t, + event: e, + fetchOptions: this.D, + plugins: this.T, + }), + n = s.clone(), + i = x({ + cacheName: this.m, + request: t, + response: n, + event: e, + plugins: this.T, + }); + if (e) + try { + e.waitUntil(i); + } catch (t) {} + return s; + } + }), + (t.ExpirationPlugin = class { + constructor(t = {}) { + var e; + (this.cachedResponseWillBeUsed = async ({ + event: t, + request: e, + cacheName: s, + cachedResponse: n, + }) => { + if (!n) return null; + const i = this.A(n), + r = this.S(s); + p(r.expireEntries()); + const a = r.updateTimestamp(e.url); + if (t) + try { + t.waitUntil(a); + } catch (t) {} + return i ? n : null; + }), + (this.cacheDidUpdate = async ({ + cacheName: t, + request: e, + }) => { + const s = this.S(t); + await s.updateTimestamp(e.url), await s.expireEntries(); + }), + (this.F = t), + (this.N = t.maxAgeSeconds), + (this.I = new Map()), + t.purgeOnQuotaError && + ((e = () => this.deleteCacheAndMetadata()), d.add(e)); + } + S(t) { + if (t === w()) throw new s('expire-custom-caches-only'); + let e = this.I.get(t); + return e || ((e = new v(t, this.F)), this.I.set(t, e)), e; + } + A(t) { + if (!this.N) return !0; + const e = this.W(t); + if (null === e) return !0; + return e >= Date.now() - 1e3 * this.N; + } + W(t) { + if (!t.headers.has('date')) return null; + const e = t.headers.get('date'), + s = new Date(e).getTime(); + return isNaN(s) ? null : s; + } + async deleteCacheAndMetadata() { + for (const [t, e] of this.I) + await self.caches.delete(t), await e.delete(); + this.I = new Map(); + } + }), + (t.NetworkFirst = class { + constructor(t = {}) { + if (((this.m = w(t.cacheName)), t.plugins)) { + const e = t.plugins.some((t) => !!t.cacheWillUpdate); + this.T = e ? t.plugins : [O, ...t.plugins]; + } else this.T = [O]; + (this.B = t.networkTimeoutSeconds || 0), + (this.D = t.fetchOptions), + (this.k = t.matchOptions); + } + async handle({ event: t, request: e }) { + const n = []; + 'string' == typeof e && (e = new Request(e)); + const i = []; + let r; + if (this.B) { + const { id: s, promise: a } = this.H({ + request: e, + event: t, + logs: n, + }); + (r = s), i.push(a); + } + const a = this.j({ + timeoutId: r, + request: e, + event: t, + logs: n, + }); + i.push(a); + let c = await Promise.race(i); + if ((c || (c = await a), !c)) + throw new s('no-response', { url: e.url }); + return c; + } + H({ request: t, logs: e, event: s }) { + let n; + return { + promise: new Promise((e) => { + n = setTimeout(async () => { + e(await this.G({ request: t, event: s })); + }, 1e3 * this.B); + }), + id: n, + }; + } + async j({ timeoutId: t, request: e, logs: s, event: n }) { + let i, r; + try { + r = await b({ + request: e, + event: n, + fetchOptions: this.D, + plugins: this.T, + }); + } catch (t) { + i = t; + } + if ((t && clearTimeout(t), i || !r)) + r = await this.G({ request: e, event: n }); + else { + const t = r.clone(), + s = x({ + cacheName: this.m, + request: e, + response: t, + event: n, + plugins: this.T, + }); + if (n) + try { + n.waitUntil(s); + } catch (t) {} + } + return r; + } + G({ event: t, request: e }) { + return N({ + cacheName: this.m, + request: e, + event: t, + matchOptions: this.k, + plugins: this.T, + }); + } + }), + (t.StaleWhileRevalidate = class { + constructor(t = {}) { + if ( + ((this.m = w(t.cacheName)), + (this.T = t.plugins || []), + t.plugins) + ) { + const e = t.plugins.some((t) => !!t.cacheWillUpdate); + this.T = e ? t.plugins : [O, ...t.plugins]; + } else this.T = [O]; + (this.D = t.fetchOptions), (this.k = t.matchOptions); + } + async handle({ event: t, request: e }) { + 'string' == typeof e && (e = new Request(e)); + const n = this.C({ request: e, event: t }); + let i, + r = await N({ + cacheName: this.m, + request: e, + event: t, + matchOptions: this.k, + plugins: this.T, + }); + if (r) { + if (t) + try { + t.waitUntil(n); + } catch (i) {} + } else + try { + r = await n; + } catch (t) { + i = t; + } + if (!r) throw new s('no-response', { url: e.url, error: i }); + return r; + } + async C({ request: t, event: e }) { + const s = await b({ + request: t, + event: e, + fetchOptions: this.D, + plugins: this.T, + }), + n = x({ + cacheName: this.m, + request: t, + response: s.clone(), + event: e, + plugins: this.T, + }); + if (e) + try { + e.waitUntil(n); + } catch (t) {} + return s; + } + }), + (t.cleanupOutdatedCaches = function () { + self.addEventListener('activate', (t) => { + const e = f(); + t.waitUntil( + (async (t, e = '-precache-') => { + const s = (await self.caches.keys()).filter( + (s) => + s.includes(e) && + s.includes(self.registration.scope) && + s !== t, + ); + return ( + await Promise.all(s.map((t) => self.caches.delete(t))), + s + ); + })(e).then((t) => {}), + ); + }); + }), + (t.clientsClaim = function () { + self.addEventListener('activate', () => self.clients.claim()); + }), + (t.precacheAndRoute = function (t, e) { + !(function (t) { + D().addToCacheList(t), + t.length > 0 && + (self.addEventListener('install', I), + self.addEventListener('activate', W)); + })(t), + A(e); + }), + (t.registerRoute = function (t, e, n) { + let a; + if ('string' == typeof t) { + const s = new URL(t, location.href); + a = new i(({ url: t }) => t.href === s.href, e, n); + } else if (t instanceof RegExp) a = new r(t, e, n); + else if ('function' == typeof t) a = new i(t, e, n); + else { + if (!(t instanceof i)) + throw new s('unsupported-route-type', { + moduleName: 'workbox-routing', + funcName: 'registerRoute', + paramName: 'capture', + }); + a = t; + } + return h().registerRoute(a), a; + }), + (t.skipWaiting = function () { + self.addEventListener('install', () => self.skipWaiting()); + }); +}); diff --git a/public/workbox-f88dbe3b.js b/public/workbox-f88dbe3b.js deleted file mode 100644 index e6cca5630..000000000 --- a/public/workbox-f88dbe3b.js +++ /dev/null @@ -1,1743 +0,0 @@ -define('./workbox-f88dbe3b.js', ['exports'], function (exports) { - 'use strict'; - - try { - self['workbox:core:5.1.4'] && _(); - } catch (e) {} - - /* - Copyright 2019 Google LLC - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const logger = (() => { - // Don't overwrite this value if it's already set. - // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923 - if (!('__WB_DISABLE_DEV_LOGS' in self)) { - self.__WB_DISABLE_DEV_LOGS = false; - } - - let inGroup = false; - const methodToColorMap = { - debug: `#7f8c8d`, - log: `#2ecc71`, - warn: `#f39c12`, - error: `#c0392b`, - groupCollapsed: `#3498db`, - groupEnd: null, - }; - - const print = function (method, args) { - if (self.__WB_DISABLE_DEV_LOGS) { - return; - } - - if (method === 'groupCollapsed') { - // Safari doesn't print all console.groupCollapsed() arguments: - // https://bugs.webkit.org/show_bug.cgi?id=182754 - if ( - /^((?!chrome|android).)*safari/i.test(navigator.userAgent) - ) { - console[method](...args); - return; - } - } - - const styles = [ - `background: ${methodToColorMap[method]}`, - `border-radius: 0.5em`, - `color: white`, - `font-weight: bold`, - `padding: 2px 0.5em`, - ]; // When in a group, the workbox prefix is not displayed. - - const logPrefix = inGroup - ? [] - : ['%cworkbox', styles.join(';')]; - console[method](...logPrefix, ...args); - - if (method === 'groupCollapsed') { - inGroup = true; - } - - if (method === 'groupEnd') { - inGroup = false; - } - }; - - const api = {}; - const loggerMethods = Object.keys(methodToColorMap); - - for (const key of loggerMethods) { - const method = key; - - api[method] = (...args) => { - print(method, args); - }; - } - - return api; - })(); - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const messages = { - 'invalid-value': ({ - paramName, - validValueDescription, - value, - }) => { - if (!paramName || !validValueDescription) { - throw new Error(`Unexpected input to 'invalid-value' error.`); - } - - return ( - `The '${paramName}' parameter was given a value with an ` + - `unexpected value. ${validValueDescription} Received a value of ` + - `${JSON.stringify(value)}.` - ); - }, - 'not-an-array': ({ - moduleName, - className, - funcName, - paramName, - }) => { - if (!moduleName || !className || !funcName || !paramName) { - throw new Error(`Unexpected input to 'not-an-array' error.`); - } - - return ( - `The parameter '${paramName}' passed into ` + - `'${moduleName}.${className}.${funcName}()' must be an array.` - ); - }, - 'incorrect-type': ({ - expectedType, - paramName, - moduleName, - className, - funcName, - }) => { - if (!expectedType || !paramName || !moduleName || !funcName) { - throw new Error( - `Unexpected input to 'incorrect-type' error.`, - ); - } - - return ( - `The parameter '${paramName}' passed into ` + - `'${moduleName}.${className ? className + '.' : ''}` + - `${funcName}()' must be of type ${expectedType}.` - ); - }, - 'incorrect-class': ({ - expectedClass, - paramName, - moduleName, - className, - funcName, - isReturnValueProblem, - }) => { - if (!expectedClass || !moduleName || !funcName) { - throw new Error( - `Unexpected input to 'incorrect-class' error.`, - ); - } - - if (isReturnValueProblem) { - return ( - `The return value from ` + - `'${moduleName}.${ - className ? className + '.' : '' - }${funcName}()' ` + - `must be an instance of class ${expectedClass.name}.` - ); - } - - return ( - `The parameter '${paramName}' passed into ` + - `'${moduleName}.${ - className ? className + '.' : '' - }${funcName}()' ` + - `must be an instance of class ${expectedClass.name}.` - ); - }, - 'missing-a-method': ({ - expectedMethod, - paramName, - moduleName, - className, - funcName, - }) => { - if ( - !expectedMethod || - !paramName || - !moduleName || - !className || - !funcName - ) { - throw new Error( - `Unexpected input to 'missing-a-method' error.`, - ); - } - - return ( - `${moduleName}.${className}.${funcName}() expected the ` + - `'${paramName}' parameter to expose a '${expectedMethod}' method.` - ); - }, - 'add-to-cache-list-unexpected-type': ({ entry }) => { - return ( - `An unexpected entry was passed to ` + - `'workbox-precaching.PrecacheController.addToCacheList()' The entry ` + - `'${JSON.stringify( - entry, - )}' isn't supported. You must supply an array of ` + - `strings with one or more characters, objects with a url property or ` + - `Request objects.` - ); - }, - 'add-to-cache-list-conflicting-entries': ({ - firstEntry, - secondEntry, - }) => { - if (!firstEntry || !secondEntry) { - throw new Error( - `Unexpected input to ` + - `'add-to-cache-list-duplicate-entries' error.`, - ); - } - - return ( - `Two of the entries passed to ` + - `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` + - `${firstEntry._entryId} but different revision details. Workbox is ` + - `unable to cache and version the asset correctly. Please remove one ` + - `of the entries.` - ); - }, - 'plugin-error-request-will-fetch': ({ thrownError }) => { - if (!thrownError) { - throw new Error( - `Unexpected input to ` + - `'plugin-error-request-will-fetch', error.`, - ); - } - - return ( - `An error was thrown by a plugins 'requestWillFetch()' method. ` + - `The thrown error message was: '${thrownError.message}'.` - ); - }, - 'invalid-cache-name': ({ cacheNameId, value }) => { - if (!cacheNameId) { - throw new Error( - `Expected a 'cacheNameId' for error 'invalid-cache-name'`, - ); - } - - return ( - `You must provide a name containing at least one character for ` + - `setCacheDetails({${cacheNameId}: '...'}). Received a value of ` + - `'${JSON.stringify(value)}'` - ); - }, - 'unregister-route-but-not-found-with-method': ({ method }) => { - if (!method) { - throw new Error( - `Unexpected input to ` + - `'unregister-route-but-not-found-with-method' error.`, - ); - } - - return ( - `The route you're trying to unregister was not previously ` + - `registered for the method type '${method}'.` - ); - }, - 'unregister-route-route-not-registered': () => { - return ( - `The route you're trying to unregister was not previously ` + - `registered.` - ); - }, - 'queue-replay-failed': ({ name }) => { - return `Replaying the background sync queue '${name}' failed.`; - }, - 'duplicate-queue-name': ({ name }) => { - return ( - `The Queue name '${name}' is already being used. ` + - `All instances of backgroundSync.Queue must be given unique names.` - ); - }, - 'expired-test-without-max-age': ({ methodName, paramName }) => { - return ( - `The '${methodName}()' method can only be used when the ` + - `'${paramName}' is used in the constructor.` - ); - }, - 'unsupported-route-type': ({ - moduleName, - className, - funcName, - paramName, - }) => { - return ( - `The supplied '${paramName}' parameter was an unsupported type. ` + - `Please check the docs for ${moduleName}.${className}.${funcName} for ` + - `valid input types.` - ); - }, - 'not-array-of-class': ({ - value, - expectedClass, - moduleName, - className, - funcName, - paramName, - }) => { - return ( - `The supplied '${paramName}' parameter must be an array of ` + - `'${expectedClass}' objects. Received '${JSON.stringify( - value, - )},'. ` + - `Please check the call to ${moduleName}.${className}.${funcName}() ` + - `to fix the issue.` - ); - }, - 'max-entries-or-age-required': ({ - moduleName, - className, - funcName, - }) => { - return ( - `You must define either config.maxEntries or config.maxAgeSeconds` + - `in ${moduleName}.${className}.${funcName}` - ); - }, - 'statuses-or-headers-required': ({ - moduleName, - className, - funcName, - }) => { - return ( - `You must define either config.statuses or config.headers` + - `in ${moduleName}.${className}.${funcName}` - ); - }, - 'invalid-string': ({ moduleName, funcName, paramName }) => { - if (!paramName || !moduleName || !funcName) { - throw new Error( - `Unexpected input to 'invalid-string' error.`, - ); - } - - return ( - `When using strings, the '${paramName}' parameter must start with ` + - `'http' (for cross-origin matches) or '/' (for same-origin matches). ` + - `Please see the docs for ${moduleName}.${funcName}() for ` + - `more info.` - ); - }, - 'channel-name-required': () => { - return ( - `You must provide a channelName to construct a ` + - `BroadcastCacheUpdate instance.` - ); - }, - 'invalid-responses-are-same-args': () => { - return ( - `The arguments passed into responsesAreSame() appear to be ` + - `invalid. Please ensure valid Responses are used.` - ); - }, - 'expire-custom-caches-only': () => { - return ( - `You must provide a 'cacheName' property when using the ` + - `expiration plugin with a runtime caching strategy.` - ); - }, - 'unit-must-be-bytes': ({ normalizedRangeHeader }) => { - if (!normalizedRangeHeader) { - throw new Error( - `Unexpected input to 'unit-must-be-bytes' error.`, - ); - } - - return ( - `The 'unit' portion of the Range header must be set to 'bytes'. ` + - `The Range header provided was "${normalizedRangeHeader}"` - ); - }, - 'single-range-only': ({ normalizedRangeHeader }) => { - if (!normalizedRangeHeader) { - throw new Error( - `Unexpected input to 'single-range-only' error.`, - ); - } - - return ( - `Multiple ranges are not supported. Please use a single start ` + - `value, and optional end value. The Range header provided was ` + - `"${normalizedRangeHeader}"` - ); - }, - 'invalid-range-values': ({ normalizedRangeHeader }) => { - if (!normalizedRangeHeader) { - throw new Error( - `Unexpected input to 'invalid-range-values' error.`, - ); - } - - return ( - `The Range header is missing both start and end values. At least ` + - `one of those values is needed. The Range header provided was ` + - `"${normalizedRangeHeader}"` - ); - }, - 'no-range-header': () => { - return `No Range header was found in the Request provided.`; - }, - 'range-not-satisfiable': ({ size, start, end }) => { - return ( - `The start (${start}) and end (${end}) values in the Range are ` + - `not satisfiable by the cached response, which is ${size} bytes.` - ); - }, - 'attempt-to-cache-non-get-request': ({ url, method }) => { - return ( - `Unable to cache '${url}' because it is a '${method}' request and ` + - `only 'GET' requests can be cached.` - ); - }, - 'cache-put-with-no-response': ({ url }) => { - return ( - `There was an attempt to cache '${url}' but the response was not ` + - `defined.` - ); - }, - 'no-response': ({ url, error }) => { - let message = `The strategy could not generate a response for '${url}'.`; - - if (error) { - message += ` The underlying error is ${error}.`; - } - - return message; - }, - 'bad-precaching-response': ({ url, status }) => { - return ( - `The precaching request for '${url}' failed with an HTTP ` + - `status of ${status}.` - ); - }, - 'non-precached-url': ({ url }) => { - return ( - `createHandlerBoundToURL('${url}') was called, but that URL is ` + - `not precached. Please pass in a URL that is precached instead.` - ); - }, - 'add-to-cache-list-conflicting-integrities': ({ url }) => { - return ( - `Two of the entries passed to ` + - `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` + - `${url} with different integrity values. Please remove one of them.` - ); - }, - 'missing-precache-entry': ({ cacheName, url }) => { - return `Unable to find a precached response in ${cacheName} for ${url}.`; - }, - }; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - - const generatorFunction = (code, details = {}) => { - const message = messages[code]; - - if (!message) { - throw new Error(`Unable to find message for code '${code}'.`); - } - - return message(details); - }; - - const messageGenerator = generatorFunction; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Workbox errors should be thrown with this class. - * This allows use to ensure the type easily in tests, - * helps developers identify errors from workbox - * easily and allows use to optimise error - * messages correctly. - * - * @private - */ - - class WorkboxError extends Error { - /** - * - * @param {string} errorCode The error code that - * identifies this particular error. - * @param {Object=} details Any relevant arguments - * that will help developers identify issues should - * be added as a key on the context object. - */ - constructor(errorCode, details) { - const message = messageGenerator(errorCode, details); - super(message); - this.name = errorCode; - this.details = details; - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /* - * This method throws if the supplied value is not an array. - * The destructed values are required to produce a meaningful error for users. - * The destructed and restructured object is so it's clear what is - * needed. - */ - - const isArray = (value, details) => { - if (!Array.isArray(value)) { - throw new WorkboxError('not-an-array', details); - } - }; - - const hasMethod = (object, expectedMethod, details) => { - const type = typeof object[expectedMethod]; - - if (type !== 'function') { - details['expectedMethod'] = expectedMethod; - throw new WorkboxError('missing-a-method', details); - } - }; - - const isType = (object, expectedType, details) => { - if (typeof object !== expectedType) { - details['expectedType'] = expectedType; - throw new WorkboxError('incorrect-type', details); - } - }; - - const isInstance = (object, expectedClass, details) => { - if (!(object instanceof expectedClass)) { - details['expectedClass'] = expectedClass; - throw new WorkboxError('incorrect-class', details); - } - }; - - const isOneOf = (value, validValues, details) => { - if (!validValues.includes(value)) { - details[ - 'validValueDescription' - ] = `Valid values are ${JSON.stringify(validValues)}.`; - throw new WorkboxError('invalid-value', details); - } - }; - - const isArrayOfClass = (value, expectedClass, details) => { - const error = new WorkboxError('not-array-of-class', details); - - if (!Array.isArray(value)) { - throw error; - } - - for (const item of value) { - if (!(item instanceof expectedClass)) { - throw error; - } - } - }; - - const finalAssertExports = { - hasMethod, - isArray, - isInstance, - isOneOf, - isType, - isArrayOfClass, - }; - - try { - self['workbox:routing:5.1.4'] && _(); - } catch (e) {} - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * The default HTTP method, 'GET', used when there's no specific method - * configured for a route. - * - * @type {string} - * - * @private - */ - - const defaultMethod = 'GET'; - /** - * The list of valid HTTP methods associated with requests that could be routed. - * - * @type {Array} - * - * @private - */ - - const validMethods = [ - 'DELETE', - 'GET', - 'HEAD', - 'PATCH', - 'POST', - 'PUT', - ]; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * @param {function()|Object} handler Either a function, or an object with a - * 'handle' method. - * @return {Object} An object with a handle method. - * - * @private - */ - - const normalizeHandler = (handler) => { - if (handler && typeof handler === 'object') { - { - finalAssertExports.hasMethod(handler, 'handle', { - moduleName: 'workbox-routing', - className: 'Route', - funcName: 'constructor', - paramName: 'handler', - }); - } - - return handler; - } else { - { - finalAssertExports.isType(handler, 'function', { - moduleName: 'workbox-routing', - className: 'Route', - funcName: 'constructor', - paramName: 'handler', - }); - } - - return { - handle: handler, - }; - } - }; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * A `Route` consists of a pair of callback functions, "match" and "handler". - * The "match" callback determine if a route should be used to "handle" a - * request by returning a non-falsy value if it can. The "handler" callback - * is called when there is a match and should return a Promise that resolves - * to a `Response`. - * - * @memberof module:workbox-routing - */ - - class Route { - /** - * Constructor for Route class. - * - * @param {module:workbox-routing~matchCallback} match - * A callback function that determines whether the route matches a given - * `fetch` event by returning a non-falsy value. - * @param {module:workbox-routing~handlerCallback} handler A callback - * function that returns a Promise resolving to a Response. - * @param {string} [method='GET'] The HTTP method to match the Route - * against. - */ - constructor(match, handler, method = defaultMethod) { - { - finalAssertExports.isType(match, 'function', { - moduleName: 'workbox-routing', - className: 'Route', - funcName: 'constructor', - paramName: 'match', - }); - - if (method) { - finalAssertExports.isOneOf(method, validMethods, { - paramName: 'method', - }); - } - } // These values are referenced directly by Router so cannot be - // altered by minificaton. - - this.handler = normalizeHandler(handler); - this.match = match; - this.method = method; - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * RegExpRoute makes it easy to create a regular expression based - * [Route]{@link module:workbox-routing.Route}. - * - * For same-origin requests the RegExp only needs to match part of the URL. For - * requests against third-party servers, you must define a RegExp that matches - * the start of the URL. - * - * [See the module docs for info.]{@link https://developers.google.com/web/tools/workbox/modules/workbox-routing} - * - * @memberof module:workbox-routing - * @extends module:workbox-routing.Route - */ - - class RegExpRoute extends Route { - /** - * If the regular expression contains - * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references}, - * the captured values will be passed to the - * [handler's]{@link module:workbox-routing~handlerCallback} `params` - * argument. - * - * @param {RegExp} regExp The regular expression to match against URLs. - * @param {module:workbox-routing~handlerCallback} handler A callback - * function that returns a Promise resulting in a Response. - * @param {string} [method='GET'] The HTTP method to match the Route - * against. - */ - constructor(regExp, handler, method) { - { - finalAssertExports.isInstance(regExp, RegExp, { - moduleName: 'workbox-routing', - className: 'RegExpRoute', - funcName: 'constructor', - paramName: 'pattern', - }); - } - - const match = ({ url }) => { - const result = regExp.exec(url.href); // Return immediately if there's no match. - - if (!result) { - return; - } // Require that the match start at the first character in the URL string - // if it's a cross-origin request. - // See https://github.com/GoogleChrome/workbox/issues/281 for the context - // behind this behavior. - - if (url.origin !== location.origin && result.index !== 0) { - { - logger.debug( - `The regular expression '${regExp}' only partially matched ` + - `against the cross-origin URL '${url}'. RegExpRoute's will only ` + - `handle cross-origin requests if they match the entire URL.`, - ); - } - - return; - } // If the route matches, but there aren't any capture groups defined, then - // this will return [], which is truthy and therefore sufficient to - // indicate a match. - // If there are capture groups, then it will return their values. - - return result.slice(1); - }; - - super(match, handler, method); - } - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - - const getFriendlyURL = (url) => { - const urlObj = new URL(String(url), location.href); // See https://github.com/GoogleChrome/workbox/issues/2323 - // We want to include everything, except for the origin if it's same-origin. - - return urlObj.href.replace(new RegExp(`^${location.origin}`), ''); - }; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * The Router can be used to process a FetchEvent through one or more - * [Routes]{@link module:workbox-routing.Route} responding with a Request if - * a matching route exists. - * - * If no route matches a given a request, the Router will use a "default" - * handler if one is defined. - * - * Should the matching Route throw an error, the Router will use a "catch" - * handler if one is defined to gracefully deal with issues and respond with a - * Request. - * - * If a request matches multiple routes, the **earliest** registered route will - * be used to respond to the request. - * - * @memberof module:workbox-routing - */ - - class Router { - /** - * Initializes a new Router. - */ - constructor() { - this._routes = new Map(); - } - /** - * @return {Map>} routes A `Map` of HTTP - * method name ('GET', etc.) to an array of all the corresponding `Route` - * instances that are registered. - */ - - get routes() { - return this._routes; - } - /** - * Adds a fetch event listener to respond to events when a route matches - * the event's request. - */ - - addFetchListener() { - // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705 - self.addEventListener('fetch', (event) => { - const { request } = event; - const responsePromise = this.handleRequest({ - request, - event, - }); - - if (responsePromise) { - event.respondWith(responsePromise); - } - }); - } - /** - * Adds a message event listener for URLs to cache from the window. - * This is useful to cache resources loaded on the page prior to when the - * service worker started controlling it. - * - * The format of the message data sent from the window should be as follows. - * Where the `urlsToCache` array may consist of URL strings or an array of - * URL string + `requestInit` object (the same as you'd pass to `fetch()`). - * - * ``` - * { - * type: 'CACHE_URLS', - * payload: { - * urlsToCache: [ - * './script1.js', - * './script2.js', - * ['./script3.js', {mode: 'no-cors'}], - * ], - * }, - * } - * ``` - */ - - addCacheListener() { - // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705 - self.addEventListener('message', (event) => { - if (event.data && event.data.type === 'CACHE_URLS') { - const { payload } = event.data; - - { - logger.debug( - `Caching URLs from the window`, - payload.urlsToCache, - ); - } - - const requestPromises = Promise.all( - payload.urlsToCache.map((entry) => { - if (typeof entry === 'string') { - entry = [entry]; - } - - const request = new Request(...entry); - return this.handleRequest({ - request, - }); // TODO(philipwalton): TypeScript errors without this typecast for - // some reason (probably a bug). The real type here should work but - // doesn't: `Array | undefined>`. - }), - ); // TypeScript - - event.waitUntil(requestPromises); // If a MessageChannel was used, reply to the message on success. - - if (event.ports && event.ports[0]) { - requestPromises.then(() => - event.ports[0].postMessage(true), - ); - } - } - }); - } - /** - * Apply the routing rules to a FetchEvent object to get a Response from an - * appropriate Route's handler. - * - * @param {Object} options - * @param {Request} options.request The request to handle (this is usually - * from a fetch event, but it does not have to be). - * @param {FetchEvent} [options.event] The event that triggered the request, - * if applicable. - * @return {Promise|undefined} A promise is returned if a - * registered route can handle the request. If there is no matching - * route and there's no `defaultHandler`, `undefined` is returned. - */ - - handleRequest({ request, event }) { - { - finalAssertExports.isInstance(request, Request, { - moduleName: 'workbox-routing', - className: 'Router', - funcName: 'handleRequest', - paramName: 'options.request', - }); - } - - const url = new URL(request.url, location.href); - - if (!url.protocol.startsWith('http')) { - { - logger.debug( - `Workbox Router only supports URLs that start with 'http'.`, - ); - } - - return; - } - - const { params, route } = this.findMatchingRoute({ - url, - request, - event, - }); - let handler = route && route.handler; - const debugMessages = []; - - { - if (handler) { - debugMessages.push([ - `Found a route to handle this request:`, - route, - ]); - - if (params) { - debugMessages.push([ - `Passing the following params to the route's handler:`, - params, - ]); - } - } - } // If we don't have a handler because there was no matching route, then - // fall back to defaultHandler if that's defined. - - if (!handler && this._defaultHandler) { - { - debugMessages.push( - `Failed to find a matching route. Falling ` + - `back to the default handler.`, - ); - } - - handler = this._defaultHandler; - } - - if (!handler) { - { - // No handler so Workbox will do nothing. If logs is set of debug - // i.e. verbose, we should print out this information. - logger.debug(`No route found for: ${getFriendlyURL(url)}`); - } - - return; - } - - { - // We have a handler, meaning Workbox is going to handle the route. - // print the routing details to the console. - logger.groupCollapsed( - `Router is responding to: ${getFriendlyURL(url)}`, - ); - debugMessages.forEach((msg) => { - if (Array.isArray(msg)) { - logger.log(...msg); - } else { - logger.log(msg); - } - }); - logger.groupEnd(); - } // Wrap in try and catch in case the handle method throws a synchronous - // error. It should still callback to the catch handler. - - let responsePromise; - - try { - responsePromise = handler.handle({ - url, - request, - event, - params, - }); - } catch (err) { - responsePromise = Promise.reject(err); - } - - if (responsePromise instanceof Promise && this._catchHandler) { - responsePromise = responsePromise.catch((err) => { - { - // Still include URL here as it will be async from the console group - // and may not make sense without the URL - logger.groupCollapsed( - `Error thrown when responding to: ` + - ` ${getFriendlyURL( - url, - )}. Falling back to Catch Handler.`, - ); - logger.error(`Error thrown by:`, route); - logger.error(err); - logger.groupEnd(); - } - - return this._catchHandler.handle({ - url, - request, - event, - }); - }); - } - - return responsePromise; - } - /** - * Checks a request and URL (and optionally an event) against the list of - * registered routes, and if there's a match, returns the corresponding - * route along with any params generated by the match. - * - * @param {Object} options - * @param {URL} options.url - * @param {Request} options.request The request to match. - * @param {Event} [options.event] The corresponding event (unless N/A). - * @return {Object} An object with `route` and `params` properties. - * They are populated if a matching route was found or `undefined` - * otherwise. - */ - - findMatchingRoute({ url, request, event }) { - { - finalAssertExports.isInstance(url, URL, { - moduleName: 'workbox-routing', - className: 'Router', - funcName: 'findMatchingRoute', - paramName: 'options.url', - }); - finalAssertExports.isInstance(request, Request, { - moduleName: 'workbox-routing', - className: 'Router', - funcName: 'findMatchingRoute', - paramName: 'options.request', - }); - } - - const routes = this._routes.get(request.method) || []; - - for (const route of routes) { - let params; - const matchResult = route.match({ - url, - request, - event, - }); - - if (matchResult) { - // See https://github.com/GoogleChrome/workbox/issues/2079 - params = matchResult; - - if ( - Array.isArray(matchResult) && - matchResult.length === 0 - ) { - // Instead of passing an empty array in as params, use undefined. - params = undefined; - } else if ( - matchResult.constructor === Object && - Object.keys(matchResult).length === 0 - ) { - // Instead of passing an empty object in as params, use undefined. - params = undefined; - } else if (typeof matchResult === 'boolean') { - // For the boolean value true (rather than just something truth-y), - // don't set params. - // See https://github.com/GoogleChrome/workbox/pull/2134#issuecomment-513924353 - params = undefined; - } // Return early if have a match. - - return { - route, - params, - }; - } - } // If no match was found above, return and empty object. - - return {}; - } - /** - * Define a default `handler` that's called when no routes explicitly - * match the incoming request. - * - * Without a default handler, unmatched requests will go against the - * network as if there were no service worker present. - * - * @param {module:workbox-routing~handlerCallback} handler A callback - * function that returns a Promise resulting in a Response. - */ - - setDefaultHandler(handler) { - this._defaultHandler = normalizeHandler(handler); - } - /** - * If a Route throws an error while handling a request, this `handler` - * will be called and given a chance to provide a response. - * - * @param {module:workbox-routing~handlerCallback} handler A callback - * function that returns a Promise resulting in a Response. - */ - - setCatchHandler(handler) { - this._catchHandler = normalizeHandler(handler); - } - /** - * Registers a route with the router. - * - * @param {module:workbox-routing.Route} route The route to register. - */ - - registerRoute(route) { - { - finalAssertExports.isType(route, 'object', { - moduleName: 'workbox-routing', - className: 'Router', - funcName: 'registerRoute', - paramName: 'route', - }); - finalAssertExports.hasMethod(route, 'match', { - moduleName: 'workbox-routing', - className: 'Router', - funcName: 'registerRoute', - paramName: 'route', - }); - finalAssertExports.isType(route.handler, 'object', { - moduleName: 'workbox-routing', - className: 'Router', - funcName: 'registerRoute', - paramName: 'route', - }); - finalAssertExports.hasMethod(route.handler, 'handle', { - moduleName: 'workbox-routing', - className: 'Router', - funcName: 'registerRoute', - paramName: 'route.handler', - }); - finalAssertExports.isType(route.method, 'string', { - moduleName: 'workbox-routing', - className: 'Router', - funcName: 'registerRoute', - paramName: 'route.method', - }); - } - - if (!this._routes.has(route.method)) { - this._routes.set(route.method, []); - } // Give precedence to all of the earlier routes by adding this additional - // route to the end of the array. - - this._routes.get(route.method).push(route); - } - /** - * Unregisters a route with the router. - * - * @param {module:workbox-routing.Route} route The route to unregister. - */ - - unregisterRoute(route) { - if (!this._routes.has(route.method)) { - throw new WorkboxError( - 'unregister-route-but-not-found-with-method', - { - method: route.method, - }, - ); - } - - const routeIndex = this._routes - .get(route.method) - .indexOf(route); - - if (routeIndex > -1) { - this._routes.get(route.method).splice(routeIndex, 1); - } else { - throw new WorkboxError( - 'unregister-route-route-not-registered', - ); - } - } - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - let defaultRouter; - /** - * Creates a new, singleton Router instance if one does not exist. If one - * does already exist, that instance is returned. - * - * @private - * @return {Router} - */ - - const getOrCreateDefaultRouter = () => { - if (!defaultRouter) { - defaultRouter = new Router(); // The helpers that use the default Router assume these listeners exist. - - defaultRouter.addFetchListener(); - defaultRouter.addCacheListener(); - } - - return defaultRouter; - }; - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Easily register a RegExp, string, or function with a caching - * strategy to a singleton Router instance. - * - * This method will generate a Route for you if needed and - * call [registerRoute()]{@link module:workbox-routing.Router#registerRoute}. - * - * @param {RegExp|string|module:workbox-routing.Route~matchCallback|module:workbox-routing.Route} capture - * If the capture param is a `Route`, all other arguments will be ignored. - * @param {module:workbox-routing~handlerCallback} [handler] A callback - * function that returns a Promise resulting in a Response. This parameter - * is required if `capture` is not a `Route` object. - * @param {string} [method='GET'] The HTTP method to match the Route - * against. - * @return {module:workbox-routing.Route} The generated `Route`(Useful for - * unregistering). - * - * @memberof module:workbox-routing - */ - - function registerRoute(capture, handler, method) { - let route; - - if (typeof capture === 'string') { - const captureUrl = new URL(capture, location.href); - - { - if ( - !(capture.startsWith('/') || capture.startsWith('http')) - ) { - throw new WorkboxError('invalid-string', { - moduleName: 'workbox-routing', - funcName: 'registerRoute', - paramName: 'capture', - }); - } // We want to check if Express-style wildcards are in the pathname only. - // TODO: Remove this log message in v4. - - const valueToCheck = capture.startsWith('http') - ? captureUrl.pathname - : capture; // See https://github.com/pillarjs/path-to-regexp#parameters - - const wildcards = '[*:?+]'; - - if (new RegExp(`${wildcards}`).exec(valueToCheck)) { - logger.debug( - `The '$capture' parameter contains an Express-style wildcard ` + - `character (${wildcards}). Strings are now always interpreted as ` + - `exact matches; use a RegExp for partial or wildcard matches.`, - ); - } - } - - const matchCallback = ({ url }) => { - { - if ( - url.pathname === captureUrl.pathname && - url.origin !== captureUrl.origin - ) { - logger.debug( - `${capture} only partially matches the cross-origin URL ` + - `${url}. This route will only handle cross-origin requests ` + - `if they match the entire URL.`, - ); - } - } - - return url.href === captureUrl.href; - }; // If `capture` is a string then `handler` and `method` must be present. - - route = new Route(matchCallback, handler, method); - } else if (capture instanceof RegExp) { - // If `capture` is a `RegExp` then `handler` and `method` must be present. - route = new RegExpRoute(capture, handler, method); - } else if (typeof capture === 'function') { - // If `capture` is a function then `handler` and `method` must be present. - route = new Route(capture, handler, method); - } else if (capture instanceof Route) { - route = capture; - } else { - throw new WorkboxError('unsupported-route-type', { - moduleName: 'workbox-routing', - funcName: 'registerRoute', - paramName: 'capture', - }); - } - - const defaultRouter = getOrCreateDefaultRouter(); - defaultRouter.registerRoute(route); - return route; - } - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const pluginUtils = { - filter: (plugins, callbackName) => { - return plugins.filter((plugin) => callbackName in plugin); - }, - }; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Wrapper around the fetch API. - * - * Will call requestWillFetch on available plugins. - * - * @param {Object} options - * @param {Request|string} options.request - * @param {Object} [options.fetchOptions] - * @param {ExtendableEvent} [options.event] - * @param {Array} [options.plugins=[]] - * @return {Promise} - * - * @private - * @memberof module:workbox-core - */ - - const wrappedFetch = async ({ - request, - fetchOptions, - event, - plugins = [], - }) => { - if (typeof request === 'string') { - request = new Request(request); - } // We *should* be able to call `await event.preloadResponse` even if it's - // undefined, but for some reason, doing so leads to errors in our Node unit - // tests. To work around that, explicitly check preloadResponse's value first. - - if (event instanceof FetchEvent && event.preloadResponse) { - const possiblePreloadResponse = await event.preloadResponse; - - if (possiblePreloadResponse) { - { - logger.log( - `Using a preloaded navigation response for ` + - `'${getFriendlyURL(request.url)}'`, - ); - } - - return possiblePreloadResponse; - } - } - - { - finalAssertExports.isInstance(request, Request, { - paramName: 'request', - expectedClass: Request, - moduleName: 'workbox-core', - className: 'fetchWrapper', - funcName: 'wrappedFetch', - }); - } - - const failedFetchPlugins = pluginUtils.filter( - plugins, - 'fetchDidFail', - /* FETCH_DID_FAIL */ - ); // If there is a fetchDidFail plugin, we need to save a clone of the - // original request before it's either modified by a requestWillFetch - // plugin or before the original request's body is consumed via fetch(). - - const originalRequest = - failedFetchPlugins.length > 0 ? request.clone() : null; - - try { - for (const plugin of plugins) { - if ( - 'requestWillFetch' in - /* REQUEST_WILL_FETCH */ - plugin - ) { - const pluginMethod = - plugin[ - 'requestWillFetch' - /* REQUEST_WILL_FETCH */ - ]; - const requestClone = request.clone(); - request = await pluginMethod.call(plugin, { - request: requestClone, - event, - }); - - if ('development' !== 'production') { - if (request) { - finalAssertExports.isInstance(request, Request, { - moduleName: 'Plugin', - funcName: 'cachedResponseWillBeUsed', - /* CACHED_RESPONSE_WILL_BE_USED */ - isReturnValueProblem: true, - }); - } - } - } - } - } catch (err) { - throw new WorkboxError('plugin-error-request-will-fetch', { - thrownError: err, - }); - } // The request can be altered by plugins with `requestWillFetch` making - // the original request (Most likely from a `fetch` event) to be different - // to the Request we make. Pass both to `fetchDidFail` to aid debugging. - - const pluginFilteredRequest = request.clone(); - - try { - let fetchResponse; // See https://github.com/GoogleChrome/workbox/issues/1796 - - if (request.mode === 'navigate') { - fetchResponse = await fetch(request); - } else { - fetchResponse = await fetch(request, fetchOptions); - } - - if ('development' !== 'production') { - logger.debug( - `Network request for ` + - `'${getFriendlyURL( - request.url, - )}' returned a response with ` + - `status '${fetchResponse.status}'.`, - ); - } - - for (const plugin of plugins) { - if ( - 'fetchDidSucceed' in - /* FETCH_DID_SUCCEED */ - plugin - ) { - fetchResponse = await plugin[ - 'fetchDidSucceed' - /* FETCH_DID_SUCCEED */ - ].call(plugin, { - event, - request: pluginFilteredRequest, - response: fetchResponse, - }); - - if ('development' !== 'production') { - if (fetchResponse) { - finalAssertExports.isInstance(fetchResponse, Response, { - moduleName: 'Plugin', - funcName: 'fetchDidSucceed', - /* FETCH_DID_SUCCEED */ - isReturnValueProblem: true, - }); - } - } - } - } - - return fetchResponse; - } catch (error) { - { - logger.error( - `Network request for ` + - `'${getFriendlyURL(request.url)}' threw an error.`, - error, - ); - } - - for (const plugin of failedFetchPlugins) { - await plugin[ - 'fetchDidFail' - /* FETCH_DID_FAIL */ - ].call(plugin, { - error, - event, - originalRequest: originalRequest.clone(), - request: pluginFilteredRequest.clone(), - }); - } - - throw error; - } - }; - - const fetchWrapper = { - fetch: wrappedFetch, - }; - - try { - self['workbox:strategies:5.1.4'] && _(); - } catch (e) {} - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - const messages$1 = { - strategyStart: (strategyName, request) => - `Using ${strategyName} to respond to '${getFriendlyURL( - request.url, - )}'`, - printFinalResponse: (response) => { - if (response) { - logger.groupCollapsed(`View the final response here.`); - logger.log(response || '[No response returned]'); - logger.groupEnd(); - } - }, - }; - - /* - Copyright 2018 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * An implementation of a - * [network-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-only} - * request strategy. - * - * This class is useful if you want to take advantage of any - * [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}. - * - * If the network request fails, this will throw a `WorkboxError` exception. - * - * @memberof module:workbox-strategies - */ - - class NetworkOnly { - /** - * @param {Object} options - * @param {string} options.cacheName Cache name to store and retrieve - * requests. Defaults to cache names provided by - * [workbox-core]{@link module:workbox-core.cacheNames}. - * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins} - * to use in conjunction with this caching strategy. - * @param {Object} options.fetchOptions Values passed along to the - * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters) - * of all fetch() requests made by this strategy. - */ - constructor(options = {}) { - this._plugins = options.plugins || []; - this._fetchOptions = options.fetchOptions; - } - /** - * This method will perform a request strategy and follows an API that - * will work with the - * [Workbox Router]{@link module:workbox-routing.Router}. - * - * @param {Object} options - * @param {Request|string} options.request The request to run this strategy for. - * @param {Event} [options.event] The event that triggered the request. - * @return {Promise} - */ - - async handle({ event, request }) { - if (typeof request === 'string') { - request = new Request(request); - } - - { - finalAssertExports.isInstance(request, Request, { - moduleName: 'workbox-strategies', - className: 'NetworkOnly', - funcName: 'handle', - paramName: 'request', - }); - } - - let error; - let response; - - try { - response = await fetchWrapper.fetch({ - request, - event, - fetchOptions: this._fetchOptions, - plugins: this._plugins, - }); - } catch (err) { - error = err; - } - - { - logger.groupCollapsed( - messages$1.strategyStart('NetworkOnly', request), - ); - - if (response) { - logger.log(`Got response from network.`); - } else { - logger.log(`Unable to get a response from the network.`); - } - - messages$1.printFinalResponse(response); - logger.groupEnd(); - } - - if (!response) { - throw new WorkboxError('no-response', { - url: request.url, - error, - }); - } - - return response; - } - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Force a service worker to activate immediately, instead of - * [waiting](https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting) - * for existing clients to close. - * - * @memberof module:workbox-core - */ - - function skipWaiting() { - // We need to explicitly call `self.skipWaiting()` here because we're - // shadowing `skipWaiting` with this local function. - self.addEventListener('install', () => self.skipWaiting()); - } - - /* - Copyright 2019 Google LLC - - Use of this source code is governed by an MIT-style - license that can be found in the LICENSE file or at - https://opensource.org/licenses/MIT. - */ - /** - * Claim any currently available clients once the service worker - * becomes active. This is normally used in conjunction with `skipWaiting()`. - * - * @memberof module:workbox-core - */ - - function clientsClaim() { - self.addEventListener('activate', () => self.clients.claim()); - } - - exports.NetworkOnly = NetworkOnly; - exports.clientsClaim = clientsClaim; - exports.registerRoute = registerRoute; - exports.skipWaiting = skipWaiting; -}); -//# sourceMappingURL=workbox-f88dbe3b.js.map diff --git a/public/workbox-f88dbe3b.js.map b/public/workbox-f88dbe3b.js.map deleted file mode 100644 index 9fe3ae8df..000000000 --- a/public/workbox-f88dbe3b.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workbox-f88dbe3b.js","sources":["node_modules/workbox-core/_version.js","node_modules/workbox-core/_private/logger.js","node_modules/workbox-core/models/messages/messages.js","node_modules/workbox-core/models/messages/messageGenerator.js","node_modules/workbox-core/_private/WorkboxError.js","node_modules/workbox-core/_private/assert.js","node_modules/workbox-routing/_version.js","node_modules/workbox-routing/utils/constants.js","node_modules/workbox-routing/utils/normalizeHandler.js","node_modules/workbox-routing/Route.js","node_modules/workbox-routing/RegExpRoute.js","node_modules/workbox-core/_private/getFriendlyURL.js","node_modules/workbox-routing/Router.js","node_modules/workbox-routing/utils/getOrCreateDefaultRouter.js","node_modules/workbox-routing/registerRoute.js","node_modules/workbox-core/utils/pluginUtils.js","node_modules/workbox-core/_private/fetchWrapper.js","node_modules/workbox-strategies/_version.js","node_modules/workbox-strategies/utils/messages.js","node_modules/workbox-strategies/NetworkOnly.js","node_modules/workbox-core/skipWaiting.js","node_modules/workbox-core/clientsClaim.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:core:5.1.4'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst logger = (process.env.NODE_ENV === 'production' ? null : (() => {\n // Don't overwrite this value if it's already set.\n // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923\n if (!('__WB_DISABLE_DEV_LOGS' in self)) {\n self.__WB_DISABLE_DEV_LOGS = false;\n }\n let inGroup = false;\n const methodToColorMap = {\n debug: `#7f8c8d`,\n log: `#2ecc71`,\n warn: `#f39c12`,\n error: `#c0392b`,\n groupCollapsed: `#3498db`,\n groupEnd: null,\n };\n const print = function (method, args) {\n if (self.__WB_DISABLE_DEV_LOGS) {\n return;\n }\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n console[method](...logPrefix, ...args);\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n const api = {};\n const loggerMethods = Object.keys(methodToColorMap);\n for (const key of loggerMethods) {\n const method = key;\n api[method] = (...args) => {\n print(method, args);\n };\n }\n return api;\n})());\nexport { logger };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../../_version.js';\nexport const messages = {\n 'invalid-value': ({ paramName, validValueDescription, value }) => {\n if (!paramName || !validValueDescription) {\n throw new Error(`Unexpected input to 'invalid-value' error.`);\n }\n return `The '${paramName}' parameter was given a value with an ` +\n `unexpected value. ${validValueDescription} Received a value of ` +\n `${JSON.stringify(value)}.`;\n },\n 'not-an-array': ({ moduleName, className, funcName, paramName }) => {\n if (!moduleName || !className || !funcName || !paramName) {\n throw new Error(`Unexpected input to 'not-an-array' error.`);\n }\n return `The parameter '${paramName}' passed into ` +\n `'${moduleName}.${className}.${funcName}()' must be an array.`;\n },\n 'incorrect-type': ({ expectedType, paramName, moduleName, className, funcName }) => {\n if (!expectedType || !paramName || !moduleName || !funcName) {\n throw new Error(`Unexpected input to 'incorrect-type' error.`);\n }\n return `The parameter '${paramName}' passed into ` +\n `'${moduleName}.${className ? (className + '.') : ''}` +\n `${funcName}()' must be of type ${expectedType}.`;\n },\n 'incorrect-class': ({ expectedClass, paramName, moduleName, className, funcName, isReturnValueProblem }) => {\n if (!expectedClass || !moduleName || !funcName) {\n throw new Error(`Unexpected input to 'incorrect-class' error.`);\n }\n if (isReturnValueProblem) {\n return `The return value from ` +\n `'${moduleName}.${className ? (className + '.') : ''}${funcName}()' ` +\n `must be an instance of class ${expectedClass.name}.`;\n }\n return `The parameter '${paramName}' passed into ` +\n `'${moduleName}.${className ? (className + '.') : ''}${funcName}()' ` +\n `must be an instance of class ${expectedClass.name}.`;\n },\n 'missing-a-method': ({ expectedMethod, paramName, moduleName, className, funcName }) => {\n if (!expectedMethod || !paramName || !moduleName || !className\n || !funcName) {\n throw new Error(`Unexpected input to 'missing-a-method' error.`);\n }\n return `${moduleName}.${className}.${funcName}() expected the ` +\n `'${paramName}' parameter to expose a '${expectedMethod}' method.`;\n },\n 'add-to-cache-list-unexpected-type': ({ entry }) => {\n return `An unexpected entry was passed to ` +\n `'workbox-precaching.PrecacheController.addToCacheList()' The entry ` +\n `'${JSON.stringify(entry)}' isn't supported. You must supply an array of ` +\n `strings with one or more characters, objects with a url property or ` +\n `Request objects.`;\n },\n 'add-to-cache-list-conflicting-entries': ({ firstEntry, secondEntry }) => {\n if (!firstEntry || !secondEntry) {\n throw new Error(`Unexpected input to ` +\n `'add-to-cache-list-duplicate-entries' error.`);\n }\n return `Two of the entries passed to ` +\n `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` +\n `${firstEntry._entryId} but different revision details. Workbox is ` +\n `unable to cache and version the asset correctly. Please remove one ` +\n `of the entries.`;\n },\n 'plugin-error-request-will-fetch': ({ thrownError }) => {\n if (!thrownError) {\n throw new Error(`Unexpected input to ` +\n `'plugin-error-request-will-fetch', error.`);\n }\n return `An error was thrown by a plugins 'requestWillFetch()' method. ` +\n `The thrown error message was: '${thrownError.message}'.`;\n },\n 'invalid-cache-name': ({ cacheNameId, value }) => {\n if (!cacheNameId) {\n throw new Error(`Expected a 'cacheNameId' for error 'invalid-cache-name'`);\n }\n return `You must provide a name containing at least one character for ` +\n `setCacheDetails({${cacheNameId}: '...'}). Received a value of ` +\n `'${JSON.stringify(value)}'`;\n },\n 'unregister-route-but-not-found-with-method': ({ method }) => {\n if (!method) {\n throw new Error(`Unexpected input to ` +\n `'unregister-route-but-not-found-with-method' error.`);\n }\n return `The route you're trying to unregister was not previously ` +\n `registered for the method type '${method}'.`;\n },\n 'unregister-route-route-not-registered': () => {\n return `The route you're trying to unregister was not previously ` +\n `registered.`;\n },\n 'queue-replay-failed': ({ name }) => {\n return `Replaying the background sync queue '${name}' failed.`;\n },\n 'duplicate-queue-name': ({ name }) => {\n return `The Queue name '${name}' is already being used. ` +\n `All instances of backgroundSync.Queue must be given unique names.`;\n },\n 'expired-test-without-max-age': ({ methodName, paramName }) => {\n return `The '${methodName}()' method can only be used when the ` +\n `'${paramName}' is used in the constructor.`;\n },\n 'unsupported-route-type': ({ moduleName, className, funcName, paramName }) => {\n return `The supplied '${paramName}' parameter was an unsupported type. ` +\n `Please check the docs for ${moduleName}.${className}.${funcName} for ` +\n `valid input types.`;\n },\n 'not-array-of-class': ({ value, expectedClass, moduleName, className, funcName, paramName }) => {\n return `The supplied '${paramName}' parameter must be an array of ` +\n `'${expectedClass}' objects. Received '${JSON.stringify(value)},'. ` +\n `Please check the call to ${moduleName}.${className}.${funcName}() ` +\n `to fix the issue.`;\n },\n 'max-entries-or-age-required': ({ moduleName, className, funcName }) => {\n return `You must define either config.maxEntries or config.maxAgeSeconds` +\n `in ${moduleName}.${className}.${funcName}`;\n },\n 'statuses-or-headers-required': ({ moduleName, className, funcName }) => {\n return `You must define either config.statuses or config.headers` +\n `in ${moduleName}.${className}.${funcName}`;\n },\n 'invalid-string': ({ moduleName, funcName, paramName }) => {\n if (!paramName || !moduleName || !funcName) {\n throw new Error(`Unexpected input to 'invalid-string' error.`);\n }\n return `When using strings, the '${paramName}' parameter must start with ` +\n `'http' (for cross-origin matches) or '/' (for same-origin matches). ` +\n `Please see the docs for ${moduleName}.${funcName}() for ` +\n `more info.`;\n },\n 'channel-name-required': () => {\n return `You must provide a channelName to construct a ` +\n `BroadcastCacheUpdate instance.`;\n },\n 'invalid-responses-are-same-args': () => {\n return `The arguments passed into responsesAreSame() appear to be ` +\n `invalid. Please ensure valid Responses are used.`;\n },\n 'expire-custom-caches-only': () => {\n return `You must provide a 'cacheName' property when using the ` +\n `expiration plugin with a runtime caching strategy.`;\n },\n 'unit-must-be-bytes': ({ normalizedRangeHeader }) => {\n if (!normalizedRangeHeader) {\n throw new Error(`Unexpected input to 'unit-must-be-bytes' error.`);\n }\n return `The 'unit' portion of the Range header must be set to 'bytes'. ` +\n `The Range header provided was \"${normalizedRangeHeader}\"`;\n },\n 'single-range-only': ({ normalizedRangeHeader }) => {\n if (!normalizedRangeHeader) {\n throw new Error(`Unexpected input to 'single-range-only' error.`);\n }\n return `Multiple ranges are not supported. Please use a single start ` +\n `value, and optional end value. The Range header provided was ` +\n `\"${normalizedRangeHeader}\"`;\n },\n 'invalid-range-values': ({ normalizedRangeHeader }) => {\n if (!normalizedRangeHeader) {\n throw new Error(`Unexpected input to 'invalid-range-values' error.`);\n }\n return `The Range header is missing both start and end values. At least ` +\n `one of those values is needed. The Range header provided was ` +\n `\"${normalizedRangeHeader}\"`;\n },\n 'no-range-header': () => {\n return `No Range header was found in the Request provided.`;\n },\n 'range-not-satisfiable': ({ size, start, end }) => {\n return `The start (${start}) and end (${end}) values in the Range are ` +\n `not satisfiable by the cached response, which is ${size} bytes.`;\n },\n 'attempt-to-cache-non-get-request': ({ url, method }) => {\n return `Unable to cache '${url}' because it is a '${method}' request and ` +\n `only 'GET' requests can be cached.`;\n },\n 'cache-put-with-no-response': ({ url }) => {\n return `There was an attempt to cache '${url}' but the response was not ` +\n `defined.`;\n },\n 'no-response': ({ url, error }) => {\n let message = `The strategy could not generate a response for '${url}'.`;\n if (error) {\n message += ` The underlying error is ${error}.`;\n }\n return message;\n },\n 'bad-precaching-response': ({ url, status }) => {\n return `The precaching request for '${url}' failed with an HTTP ` +\n `status of ${status}.`;\n },\n 'non-precached-url': ({ url }) => {\n return `createHandlerBoundToURL('${url}') was called, but that URL is ` +\n `not precached. Please pass in a URL that is precached instead.`;\n },\n 'add-to-cache-list-conflicting-integrities': ({ url }) => {\n return `Two of the entries passed to ` +\n `'workbox-precaching.PrecacheController.addToCacheList()' had the URL ` +\n `${url} with different integrity values. Please remove one of them.`;\n },\n 'missing-precache-entry': ({ cacheName, url }) => {\n return `Unable to find a precached response in ${cacheName} for ${url}.`;\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { messages } from './messages.js';\nimport '../../_version.js';\nconst fallback = (code, ...args) => {\n let msg = code;\n if (args.length > 0) {\n msg += ` :: ${JSON.stringify(args)}`;\n }\n return msg;\n};\nconst generatorFunction = (code, details = {}) => {\n const message = messages[code];\n if (!message) {\n throw new Error(`Unable to find message for code '${code}'.`);\n }\n return message(details);\n};\nexport const messageGenerator = (process.env.NODE_ENV === 'production') ?\n fallback : generatorFunction;\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { messageGenerator } from '../models/messages/messageGenerator.js';\nimport '../_version.js';\n/**\n * Workbox errors should be thrown with this class.\n * This allows use to ensure the type easily in tests,\n * helps developers identify errors from workbox\n * easily and allows use to optimise error\n * messages correctly.\n *\n * @private\n */\nclass WorkboxError extends Error {\n /**\n *\n * @param {string} errorCode The error code that\n * identifies this particular error.\n * @param {Object=} details Any relevant arguments\n * that will help developers identify issues should\n * be added as a key on the context object.\n */\n constructor(errorCode, details) {\n const message = messageGenerator(errorCode, details);\n super(message);\n this.name = errorCode;\n this.details = details;\n }\n}\nexport { WorkboxError };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from '../_private/WorkboxError.js';\nimport '../_version.js';\n/*\n * This method throws if the supplied value is not an array.\n * The destructed values are required to produce a meaningful error for users.\n * The destructed and restructured object is so it's clear what is\n * needed.\n */\nconst isArray = (value, details) => {\n if (!Array.isArray(value)) {\n throw new WorkboxError('not-an-array', details);\n }\n};\nconst hasMethod = (object, expectedMethod, details) => {\n const type = typeof object[expectedMethod];\n if (type !== 'function') {\n details['expectedMethod'] = expectedMethod;\n throw new WorkboxError('missing-a-method', details);\n }\n};\nconst isType = (object, expectedType, details) => {\n if (typeof object !== expectedType) {\n details['expectedType'] = expectedType;\n throw new WorkboxError('incorrect-type', details);\n }\n};\nconst isInstance = (object, expectedClass, details) => {\n if (!(object instanceof expectedClass)) {\n details['expectedClass'] = expectedClass;\n throw new WorkboxError('incorrect-class', details);\n }\n};\nconst isOneOf = (value, validValues, details) => {\n if (!validValues.includes(value)) {\n details['validValueDescription'] =\n `Valid values are ${JSON.stringify(validValues)}.`;\n throw new WorkboxError('invalid-value', details);\n }\n};\nconst isArrayOfClass = (value, expectedClass, details) => {\n const error = new WorkboxError('not-array-of-class', details);\n if (!Array.isArray(value)) {\n throw error;\n }\n for (const item of value) {\n if (!(item instanceof expectedClass)) {\n throw error;\n }\n }\n};\nconst finalAssertExports = process.env.NODE_ENV === 'production' ? null : {\n hasMethod,\n isArray,\n isInstance,\n isOneOf,\n isType,\n isArrayOfClass,\n};\nexport { finalAssertExports as assert };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:routing:5.1.4'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The default HTTP method, 'GET', used when there's no specific method\n * configured for a route.\n *\n * @type {string}\n *\n * @private\n */\nexport const defaultMethod = 'GET';\n/**\n * The list of valid HTTP methods associated with requests that could be routed.\n *\n * @type {Array}\n *\n * @private\n */\nexport const validMethods = [\n 'DELETE',\n 'GET',\n 'HEAD',\n 'PATCH',\n 'POST',\n 'PUT',\n];\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport '../_version.js';\n/**\n * @param {function()|Object} handler Either a function, or an object with a\n * 'handle' method.\n * @return {Object} An object with a handle method.\n *\n * @private\n */\nexport const normalizeHandler = (handler) => {\n if (handler && typeof handler === 'object') {\n if (process.env.NODE_ENV !== 'production') {\n assert.hasMethod(handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return handler;\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(handler, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return { handle: handler };\n }\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { defaultMethod, validMethods } from './utils/constants.js';\nimport { normalizeHandler } from './utils/normalizeHandler.js';\nimport './_version.js';\n/**\n * A `Route` consists of a pair of callback functions, \"match\" and \"handler\".\n * The \"match\" callback determine if a route should be used to \"handle\" a\n * request by returning a non-falsy value if it can. The \"handler\" callback\n * is called when there is a match and should return a Promise that resolves\n * to a `Response`.\n *\n * @memberof module:workbox-routing\n */\nclass Route {\n /**\n * Constructor for Route class.\n *\n * @param {module:workbox-routing~matchCallback} match\n * A callback function that determines whether the route matches a given\n * `fetch` event by returning a non-falsy value.\n * @param {module:workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(match, handler, method = defaultMethod) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(match, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'match',\n });\n if (method) {\n assert.isOneOf(method, validMethods, { paramName: 'method' });\n }\n }\n // These values are referenced directly by Router so cannot be\n // altered by minificaton.\n this.handler = normalizeHandler(handler);\n this.match = match;\n this.method = method;\n }\n}\nexport { Route };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { Route } from './Route.js';\nimport './_version.js';\n/**\n * RegExpRoute makes it easy to create a regular expression based\n * [Route]{@link module:workbox-routing.Route}.\n *\n * For same-origin requests the RegExp only needs to match part of the URL. For\n * requests against third-party servers, you must define a RegExp that matches\n * the start of the URL.\n *\n * [See the module docs for info.]{@link https://developers.google.com/web/tools/workbox/modules/workbox-routing}\n *\n * @memberof module:workbox-routing\n * @extends module:workbox-routing.Route\n */\nclass RegExpRoute extends Route {\n /**\n * If the regular expression contains\n * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references},\n * the captured values will be passed to the\n * [handler's]{@link module:workbox-routing~handlerCallback} `params`\n * argument.\n *\n * @param {RegExp} regExp The regular expression to match against URLs.\n * @param {module:workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(regExp, handler, method) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(regExp, RegExp, {\n moduleName: 'workbox-routing',\n className: 'RegExpRoute',\n funcName: 'constructor',\n paramName: 'pattern',\n });\n }\n const match = ({ url }) => {\n const result = regExp.exec(url.href);\n // Return immediately if there's no match.\n if (!result) {\n return;\n }\n // Require that the match start at the first character in the URL string\n // if it's a cross-origin request.\n // See https://github.com/GoogleChrome/workbox/issues/281 for the context\n // behind this behavior.\n if ((url.origin !== location.origin) && (result.index !== 0)) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`The regular expression '${regExp}' only partially matched ` +\n `against the cross-origin URL '${url}'. RegExpRoute's will only ` +\n `handle cross-origin requests if they match the entire URL.`);\n }\n return;\n }\n // If the route matches, but there aren't any capture groups defined, then\n // this will return [], which is truthy and therefore sufficient to\n // indicate a match.\n // If there are capture groups, then it will return their values.\n return result.slice(1);\n };\n super(match, handler, method);\n }\n}\nexport { RegExpRoute };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst getFriendlyURL = (url) => {\n const urlObj = new URL(String(url), location.href);\n // See https://github.com/GoogleChrome/workbox/issues/2323\n // We want to include everything, except for the origin if it's same-origin.\n return urlObj.href.replace(new RegExp(`^${location.origin}`), '');\n};\nexport { getFriendlyURL };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { normalizeHandler } from './utils/normalizeHandler.js';\nimport './_version.js';\n/**\n * The Router can be used to process a FetchEvent through one or more\n * [Routes]{@link module:workbox-routing.Route} responding with a Request if\n * a matching route exists.\n *\n * If no route matches a given a request, the Router will use a \"default\"\n * handler if one is defined.\n *\n * Should the matching Route throw an error, the Router will use a \"catch\"\n * handler if one is defined to gracefully deal with issues and respond with a\n * Request.\n *\n * If a request matches multiple routes, the **earliest** registered route will\n * be used to respond to the request.\n *\n * @memberof module:workbox-routing\n */\nclass Router {\n /**\n * Initializes a new Router.\n */\n constructor() {\n this._routes = new Map();\n }\n /**\n * @return {Map>} routes A `Map` of HTTP\n * method name ('GET', etc.) to an array of all the corresponding `Route`\n * instances that are registered.\n */\n get routes() {\n return this._routes;\n }\n /**\n * Adds a fetch event listener to respond to events when a route matches\n * the event's request.\n */\n addFetchListener() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('fetch', ((event) => {\n const { request } = event;\n const responsePromise = this.handleRequest({ request, event });\n if (responsePromise) {\n event.respondWith(responsePromise);\n }\n }));\n }\n /**\n * Adds a message event listener for URLs to cache from the window.\n * This is useful to cache resources loaded on the page prior to when the\n * service worker started controlling it.\n *\n * The format of the message data sent from the window should be as follows.\n * Where the `urlsToCache` array may consist of URL strings or an array of\n * URL string + `requestInit` object (the same as you'd pass to `fetch()`).\n *\n * ```\n * {\n * type: 'CACHE_URLS',\n * payload: {\n * urlsToCache: [\n * './script1.js',\n * './script2.js',\n * ['./script3.js', {mode: 'no-cors'}],\n * ],\n * },\n * }\n * ```\n */\n addCacheListener() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('message', ((event) => {\n if (event.data && event.data.type === 'CACHE_URLS') {\n const { payload } = event.data;\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Caching URLs from the window`, payload.urlsToCache);\n }\n const requestPromises = Promise.all(payload.urlsToCache.map((entry) => {\n if (typeof entry === 'string') {\n entry = [entry];\n }\n const request = new Request(...entry);\n return this.handleRequest({ request });\n // TODO(philipwalton): TypeScript errors without this typecast for\n // some reason (probably a bug). The real type here should work but\n // doesn't: `Array | undefined>`.\n })); // TypeScript\n event.waitUntil(requestPromises);\n // If a MessageChannel was used, reply to the message on success.\n if (event.ports && event.ports[0]) {\n requestPromises.then(() => event.ports[0].postMessage(true));\n }\n }\n }));\n }\n /**\n * Apply the routing rules to a FetchEvent object to get a Response from an\n * appropriate Route's handler.\n *\n * @param {Object} options\n * @param {Request} options.request The request to handle (this is usually\n * from a fetch event, but it does not have to be).\n * @param {FetchEvent} [options.event] The event that triggered the request,\n * if applicable.\n * @return {Promise|undefined} A promise is returned if a\n * registered route can handle the request. If there is no matching\n * route and there's no `defaultHandler`, `undefined` is returned.\n */\n handleRequest({ request, event }) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'handleRequest',\n paramName: 'options.request',\n });\n }\n const url = new URL(request.url, location.href);\n if (!url.protocol.startsWith('http')) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Workbox Router only supports URLs that start with 'http'.`);\n }\n return;\n }\n const { params, route } = this.findMatchingRoute({ url, request, event });\n let handler = route && route.handler;\n const debugMessages = [];\n if (process.env.NODE_ENV !== 'production') {\n if (handler) {\n debugMessages.push([\n `Found a route to handle this request:`, route,\n ]);\n if (params) {\n debugMessages.push([\n `Passing the following params to the route's handler:`, params,\n ]);\n }\n }\n }\n // If we don't have a handler because there was no matching route, then\n // fall back to defaultHandler if that's defined.\n if (!handler && this._defaultHandler) {\n if (process.env.NODE_ENV !== 'production') {\n debugMessages.push(`Failed to find a matching route. Falling ` +\n `back to the default handler.`);\n }\n handler = this._defaultHandler;\n }\n if (!handler) {\n if (process.env.NODE_ENV !== 'production') {\n // No handler so Workbox will do nothing. If logs is set of debug\n // i.e. verbose, we should print out this information.\n logger.debug(`No route found for: ${getFriendlyURL(url)}`);\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // We have a handler, meaning Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Router is responding to: ${getFriendlyURL(url)}`);\n debugMessages.forEach((msg) => {\n if (Array.isArray(msg)) {\n logger.log(...msg);\n }\n else {\n logger.log(msg);\n }\n });\n logger.groupEnd();\n }\n // Wrap in try and catch in case the handle method throws a synchronous\n // error. It should still callback to the catch handler.\n let responsePromise;\n try {\n responsePromise = handler.handle({ url, request, event, params });\n }\n catch (err) {\n responsePromise = Promise.reject(err);\n }\n if (responsePromise instanceof Promise && this._catchHandler) {\n responsePromise = responsePromise.catch((err) => {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n return this._catchHandler.handle({ url, request, event });\n });\n }\n return responsePromise;\n }\n /**\n * Checks a request and URL (and optionally an event) against the list of\n * registered routes, and if there's a match, returns the corresponding\n * route along with any params generated by the match.\n *\n * @param {Object} options\n * @param {URL} options.url\n * @param {Request} options.request The request to match.\n * @param {Event} [options.event] The corresponding event (unless N/A).\n * @return {Object} An object with `route` and `params` properties.\n * They are populated if a matching route was found or `undefined`\n * otherwise.\n */\n findMatchingRoute({ url, request, event }) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(url, URL, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'findMatchingRoute',\n paramName: 'options.url',\n });\n assert.isInstance(request, Request, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'findMatchingRoute',\n paramName: 'options.request',\n });\n }\n const routes = this._routes.get(request.method) || [];\n for (const route of routes) {\n let params;\n const matchResult = route.match({ url, request, event });\n if (matchResult) {\n // See https://github.com/GoogleChrome/workbox/issues/2079\n params = matchResult;\n if (Array.isArray(matchResult) && matchResult.length === 0) {\n // Instead of passing an empty array in as params, use undefined.\n params = undefined;\n }\n else if ((matchResult.constructor === Object &&\n Object.keys(matchResult).length === 0)) {\n // Instead of passing an empty object in as params, use undefined.\n params = undefined;\n }\n else if (typeof matchResult === 'boolean') {\n // For the boolean value true (rather than just something truth-y),\n // don't set params.\n // See https://github.com/GoogleChrome/workbox/pull/2134#issuecomment-513924353\n params = undefined;\n }\n // Return early if have a match.\n return { route, params };\n }\n }\n // If no match was found above, return and empty object.\n return {};\n }\n /**\n * Define a default `handler` that's called when no routes explicitly\n * match the incoming request.\n *\n * Without a default handler, unmatched requests will go against the\n * network as if there were no service worker present.\n *\n * @param {module:workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n */\n setDefaultHandler(handler) {\n this._defaultHandler = normalizeHandler(handler);\n }\n /**\n * If a Route throws an error while handling a request, this `handler`\n * will be called and given a chance to provide a response.\n *\n * @param {module:workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n */\n setCatchHandler(handler) {\n this._catchHandler = normalizeHandler(handler);\n }\n /**\n * Registers a route with the router.\n *\n * @param {module:workbox-routing.Route} route The route to register.\n */\n registerRoute(route) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(route, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.hasMethod(route, 'match', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.isType(route.handler, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.hasMethod(route.handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.handler',\n });\n assert.isType(route.method, 'string', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.method',\n });\n }\n if (!this._routes.has(route.method)) {\n this._routes.set(route.method, []);\n }\n // Give precedence to all of the earlier routes by adding this additional\n // route to the end of the array.\n this._routes.get(route.method).push(route);\n }\n /**\n * Unregisters a route with the router.\n *\n * @param {module:workbox-routing.Route} route The route to unregister.\n */\n unregisterRoute(route) {\n if (!this._routes.has(route.method)) {\n throw new WorkboxError('unregister-route-but-not-found-with-method', {\n method: route.method,\n });\n }\n const routeIndex = this._routes.get(route.method).indexOf(route);\n if (routeIndex > -1) {\n this._routes.get(route.method).splice(routeIndex, 1);\n }\n else {\n throw new WorkboxError('unregister-route-route-not-registered');\n }\n }\n}\nexport { Router };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Router } from '../Router.js';\nimport '../_version.js';\nlet defaultRouter;\n/**\n * Creates a new, singleton Router instance if one does not exist. If one\n * does already exist, that instance is returned.\n *\n * @private\n * @return {Router}\n */\nexport const getOrCreateDefaultRouter = () => {\n if (!defaultRouter) {\n defaultRouter = new Router();\n // The helpers that use the default Router assume these listeners exist.\n defaultRouter.addFetchListener();\n defaultRouter.addCacheListener();\n }\n return defaultRouter;\n};\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Route } from './Route.js';\nimport { RegExpRoute } from './RegExpRoute.js';\nimport { getOrCreateDefaultRouter } from './utils/getOrCreateDefaultRouter.js';\nimport './_version.js';\n/**\n * Easily register a RegExp, string, or function with a caching\n * strategy to a singleton Router instance.\n *\n * This method will generate a Route for you if needed and\n * call [registerRoute()]{@link module:workbox-routing.Router#registerRoute}.\n *\n * @param {RegExp|string|module:workbox-routing.Route~matchCallback|module:workbox-routing.Route} capture\n * If the capture param is a `Route`, all other arguments will be ignored.\n * @param {module:workbox-routing~handlerCallback} [handler] A callback\n * function that returns a Promise resulting in a Response. This parameter\n * is required if `capture` is not a `Route` object.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n * @return {module:workbox-routing.Route} The generated `Route`(Useful for\n * unregistering).\n *\n * @memberof module:workbox-routing\n */\nfunction registerRoute(capture, handler, method) {\n let route;\n if (typeof capture === 'string') {\n const captureUrl = new URL(capture, location.href);\n if (process.env.NODE_ENV !== 'production') {\n if (!(capture.startsWith('/') || capture.startsWith('http'))) {\n throw new WorkboxError('invalid-string', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n // We want to check if Express-style wildcards are in the pathname only.\n // TODO: Remove this log message in v4.\n const valueToCheck = capture.startsWith('http') ?\n captureUrl.pathname : capture;\n // See https://github.com/pillarjs/path-to-regexp#parameters\n const wildcards = '[*:?+]';\n if ((new RegExp(`${wildcards}`)).exec(valueToCheck)) {\n logger.debug(`The '$capture' parameter contains an Express-style wildcard ` +\n `character (${wildcards}). Strings are now always interpreted as ` +\n `exact matches; use a RegExp for partial or wildcard matches.`);\n }\n }\n const matchCallback = ({ url }) => {\n if (process.env.NODE_ENV !== 'production') {\n if ((url.pathname === captureUrl.pathname) &&\n (url.origin !== captureUrl.origin)) {\n logger.debug(`${capture} only partially matches the cross-origin URL ` +\n `${url}. This route will only handle cross-origin requests ` +\n `if they match the entire URL.`);\n }\n }\n return url.href === captureUrl.href;\n };\n // If `capture` is a string then `handler` and `method` must be present.\n route = new Route(matchCallback, handler, method);\n }\n else if (capture instanceof RegExp) {\n // If `capture` is a `RegExp` then `handler` and `method` must be present.\n route = new RegExpRoute(capture, handler, method);\n }\n else if (typeof capture === 'function') {\n // If `capture` is a function then `handler` and `method` must be present.\n route = new Route(capture, handler, method);\n }\n else if (capture instanceof Route) {\n route = capture;\n }\n else {\n throw new WorkboxError('unsupported-route-type', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.registerRoute(route);\n return route;\n}\nexport { registerRoute };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nexport const pluginUtils = {\n filter: (plugins, callbackName) => {\n return plugins.filter((plugin) => callbackName in plugin);\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from './WorkboxError.js';\nimport { logger } from './logger.js';\nimport { assert } from './assert.js';\nimport { getFriendlyURL } from '../_private/getFriendlyURL.js';\nimport { pluginUtils } from '../utils/pluginUtils.js';\nimport '../_version.js';\n/**\n * Wrapper around the fetch API.\n *\n * Will call requestWillFetch on available plugins.\n *\n * @param {Object} options\n * @param {Request|string} options.request\n * @param {Object} [options.fetchOptions]\n * @param {ExtendableEvent} [options.event]\n * @param {Array} [options.plugins=[]]\n * @return {Promise}\n *\n * @private\n * @memberof module:workbox-core\n */\nconst wrappedFetch = async ({ request, fetchOptions, event, plugins = [], }) => {\n if (typeof request === 'string') {\n request = new Request(request);\n }\n // We *should* be able to call `await event.preloadResponse` even if it's\n // undefined, but for some reason, doing so leads to errors in our Node unit\n // tests. To work around that, explicitly check preloadResponse's value first.\n if (event instanceof FetchEvent && event.preloadResponse) {\n const possiblePreloadResponse = await event.preloadResponse;\n if (possiblePreloadResponse) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Using a preloaded navigation response for ` +\n `'${getFriendlyURL(request.url)}'`);\n }\n return possiblePreloadResponse;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n paramName: 'request',\n expectedClass: Request,\n moduleName: 'workbox-core',\n className: 'fetchWrapper',\n funcName: 'wrappedFetch',\n });\n }\n const failedFetchPlugins = pluginUtils.filter(plugins, \"fetchDidFail\" /* FETCH_DID_FAIL */);\n // If there is a fetchDidFail plugin, we need to save a clone of the\n // original request before it's either modified by a requestWillFetch\n // plugin or before the original request's body is consumed via fetch().\n const originalRequest = failedFetchPlugins.length > 0 ?\n request.clone() : null;\n try {\n for (const plugin of plugins) {\n if (\"requestWillFetch\" /* REQUEST_WILL_FETCH */ in plugin) {\n const pluginMethod = plugin[\"requestWillFetch\" /* REQUEST_WILL_FETCH */];\n const requestClone = request.clone();\n request = await pluginMethod.call(plugin, {\n request: requestClone,\n event,\n });\n if (process.env.NODE_ENV !== 'production') {\n if (request) {\n assert.isInstance(request, Request, {\n moduleName: 'Plugin',\n funcName: \"cachedResponseWillBeUsed\" /* CACHED_RESPONSE_WILL_BE_USED */,\n isReturnValueProblem: true,\n });\n }\n }\n }\n }\n }\n catch (err) {\n throw new WorkboxError('plugin-error-request-will-fetch', {\n thrownError: err,\n });\n }\n // The request can be altered by plugins with `requestWillFetch` making\n // the original request (Most likely from a `fetch` event) to be different\n // to the Request we make. Pass both to `fetchDidFail` to aid debugging.\n const pluginFilteredRequest = request.clone();\n try {\n let fetchResponse;\n // See https://github.com/GoogleChrome/workbox/issues/1796\n if (request.mode === 'navigate') {\n fetchResponse = await fetch(request);\n }\n else {\n fetchResponse = await fetch(request, fetchOptions);\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Network request for ` +\n `'${getFriendlyURL(request.url)}' returned a response with ` +\n `status '${fetchResponse.status}'.`);\n }\n for (const plugin of plugins) {\n if (\"fetchDidSucceed\" /* FETCH_DID_SUCCEED */ in plugin) {\n fetchResponse = await plugin[\"fetchDidSucceed\" /* FETCH_DID_SUCCEED */]\n .call(plugin, {\n event,\n request: pluginFilteredRequest,\n response: fetchResponse,\n });\n if (process.env.NODE_ENV !== 'production') {\n if (fetchResponse) {\n assert.isInstance(fetchResponse, Response, {\n moduleName: 'Plugin',\n funcName: \"fetchDidSucceed\" /* FETCH_DID_SUCCEED */,\n isReturnValueProblem: true,\n });\n }\n }\n }\n }\n return fetchResponse;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(`Network request for ` +\n `'${getFriendlyURL(request.url)}' threw an error.`, error);\n }\n for (const plugin of failedFetchPlugins) {\n await plugin[\"fetchDidFail\" /* FETCH_DID_FAIL */].call(plugin, {\n error,\n event,\n originalRequest: originalRequest.clone(),\n request: pluginFilteredRequest.clone(),\n });\n }\n throw error;\n }\n};\nconst fetchWrapper = {\n fetch: wrappedFetch,\n};\nexport { fetchWrapper };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:strategies:5.1.4'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport '../_version.js';\nexport const messages = {\n strategyStart: (strategyName, request) => `Using ${strategyName} to respond to '${getFriendlyURL(request.url)}'`,\n printFinalResponse: (response) => {\n if (response) {\n logger.groupCollapsed(`View the final response here.`);\n logger.log(response || '[No response returned]');\n logger.groupEnd();\n }\n },\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { fetchWrapper } from 'workbox-core/_private/fetchWrapper.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { messages } from './utils/messages.js';\nimport './_version.js';\n/**\n * An implementation of a\n * [network-only]{@link https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#network-only}\n * request strategy.\n *\n * This class is useful if you want to take advantage of any\n * [Workbox plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}.\n *\n * If the network request fails, this will throw a `WorkboxError` exception.\n *\n * @memberof module:workbox-strategies\n */\nclass NetworkOnly {\n /**\n * @param {Object} options\n * @param {string} options.cacheName Cache name to store and retrieve\n * requests. Defaults to cache names provided by\n * [workbox-core]{@link module:workbox-core.cacheNames}.\n * @param {Array} options.plugins [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} options.fetchOptions Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of all fetch() requests made by this strategy.\n */\n constructor(options = {}) {\n this._plugins = options.plugins || [];\n this._fetchOptions = options.fetchOptions;\n }\n /**\n * This method will perform a request strategy and follows an API that\n * will work with the\n * [Workbox Router]{@link module:workbox-routing.Router}.\n *\n * @param {Object} options\n * @param {Request|string} options.request The request to run this strategy for.\n * @param {Event} [options.event] The event that triggered the request.\n * @return {Promise}\n */\n async handle({ event, request }) {\n if (typeof request === 'string') {\n request = new Request(request);\n }\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-strategies',\n className: 'NetworkOnly',\n funcName: 'handle',\n paramName: 'request',\n });\n }\n let error;\n let response;\n try {\n response = await fetchWrapper.fetch({\n request,\n event,\n fetchOptions: this._fetchOptions,\n plugins: this._plugins,\n });\n }\n catch (err) {\n error = err;\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.groupCollapsed(messages.strategyStart('NetworkOnly', request));\n if (response) {\n logger.log(`Got response from network.`);\n }\n else {\n logger.log(`Unable to get a response from the network.`);\n }\n messages.printFinalResponse(response);\n logger.groupEnd();\n }\n if (!response) {\n throw new WorkboxError('no-response', { url: request.url, error });\n }\n return response;\n }\n}\nexport { NetworkOnly };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * Force a service worker to activate immediately, instead of\n * [waiting](https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#waiting)\n * for existing clients to close.\n *\n * @memberof module:workbox-core\n */\nfunction skipWaiting() {\n // We need to explicitly call `self.skipWaiting()` here because we're\n // shadowing `skipWaiting` with this local function.\n self.addEventListener('install', () => self.skipWaiting());\n}\nexport { skipWaiting };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport './_version.js';\n/**\n * Claim any currently available clients once the service worker\n * becomes active. This is normally used in conjunction with `skipWaiting()`.\n *\n * @memberof module:workbox-core\n */\nfunction clientsClaim() {\n self.addEventListener('activate', () => self.clients.claim());\n}\nexport { clientsClaim };\n"],"names":["self","_","e","logger","__WB_DISABLE_DEV_LOGS","inGroup","methodToColorMap","debug","log","warn","error","groupCollapsed","groupEnd","print","method","args","test","navigator","userAgent","console","styles","logPrefix","join","api","loggerMethods","Object","keys","key","messages","paramName","validValueDescription","value","Error","JSON","stringify","moduleName","className","funcName","expectedType","expectedClass","isReturnValueProblem","name","expectedMethod","entry","firstEntry","secondEntry","_entryId","thrownError","message","cacheNameId","methodName","normalizedRangeHeader","size","start","end","url","status","cacheName","generatorFunction","code","details","messageGenerator","WorkboxError","constructor","errorCode","isArray","Array","hasMethod","object","type","isType","isInstance","isOneOf","validValues","includes","isArrayOfClass","item","finalAssertExports","defaultMethod","validMethods","normalizeHandler","handler","assert","handle","Route","match","RegExpRoute","regExp","RegExp","result","exec","href","origin","location","index","slice","getFriendlyURL","urlObj","URL","String","replace","Router","_routes","Map","routes","addFetchListener","addEventListener","event","request","responsePromise","handleRequest","respondWith","addCacheListener","data","payload","urlsToCache","requestPromises","Promise","all","map","Request","waitUntil","ports","then","postMessage","protocol","startsWith","params","route","findMatchingRoute","debugMessages","push","_defaultHandler","forEach","msg","err","reject","_catchHandler","catch","get","matchResult","length","undefined","setDefaultHandler","setCatchHandler","registerRoute","has","set","unregisterRoute","routeIndex","indexOf","splice","defaultRouter","getOrCreateDefaultRouter","capture","captureUrl","valueToCheck","pathname","wildcards","matchCallback","pluginUtils","filter","plugins","callbackName","plugin","wrappedFetch","fetchOptions","FetchEvent","preloadResponse","possiblePreloadResponse","failedFetchPlugins","originalRequest","clone","pluginMethod","requestClone","call","pluginFilteredRequest","fetchResponse","mode","fetch","response","Response","fetchWrapper","strategyStart","strategyName","printFinalResponse","NetworkOnly","options","_plugins","_fetchOptions","skipWaiting","clientsClaim","clients","claim"],"mappings":";;IAEA,IAAI;IACAA,EAAAA,IAAI,CAAC,oBAAD,CAAJ,IAA8BC,CAAC,EAA/B;IACH,CAFD,CAGA,OAAOC,CAAP,EAAU;;ICLV;;;;;;AAMA,IACA,MAAMC,MAAM,GAAI,CAA+C,CAAC,MAAM;IAClE;IACA;IACA,MAAI,EAAE,2BAA2BH,IAA7B,CAAJ,EAAwC;IACpCA,IAAAA,IAAI,CAACI,qBAAL,GAA6B,KAA7B;IACH;;IACD,MAAIC,OAAO,GAAG,KAAd;IACA,QAAMC,gBAAgB,GAAG;IACrBC,IAAAA,KAAK,EAAG,SADa;IAErBC,IAAAA,GAAG,EAAG,SAFe;IAGrBC,IAAAA,IAAI,EAAG,SAHc;IAIrBC,IAAAA,KAAK,EAAG,SAJa;IAKrBC,IAAAA,cAAc,EAAG,SALI;IAMrBC,IAAAA,QAAQ,EAAE;IANW,GAAzB;;IAQA,QAAMC,KAAK,GAAG,UAAUC,MAAV,EAAkBC,IAAlB,EAAwB;IAClC,QAAIf,IAAI,CAACI,qBAAT,EAAgC;IAC5B;IACH;;IACD,QAAIU,MAAM,KAAK,gBAAf,EAAiC;IAC7B;IACA;IACA,UAAI,iCAAiCE,IAAjC,CAAsCC,SAAS,CAACC,SAAhD,CAAJ,EAAgE;IAC5DC,QAAAA,OAAO,CAACL,MAAD,CAAP,CAAgB,GAAGC,IAAnB;IACA;IACH;IACJ;;IACD,UAAMK,MAAM,GAAG,CACV,eAAcd,gBAAgB,CAACQ,MAAD,CAAS,EAD7B,EAEV,sBAFU,EAGV,cAHU,EAIV,mBAJU,EAKV,oBALU,CAAf,CAZkC;;IAoBl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