{“version”:3,“file”:“workbox-sw.js”,“sources”:,“sourcesContent”:[“try{self&&_()}catch(e){}// eslint-disable-line”,“/*n Copyright 2018 Google LLCnn Use of this source code is governed by an MIT-stylen license that can be found in the LICENSE file or atn opensource.org/licenses/MIT.n*/nnimport '../_version.mjs';nnconst CDN_PATH = `WORKBOX_CDN_ROOT_URL`;nnconst MODULE_KEY_TO_NAME_MAPPING = {n /**n * @name backgroundSyncn * @memberof workboxn * @see module:workbox-background-syncn */n backgroundSync: 'background-sync',n /**n * @name broadcastUpdaten * @memberof workboxn * @see module:workbox-broadcast-updaten */n broadcastUpdate: 'broadcast-update',n /**n * @name cacheableResponsen * @memberof workboxn * @see module:workbox-cacheable-responsen */n cacheableResponse: 'cacheable-response',n /**n * @name coren * @memberof workboxn * @see module:workbox-coren */n core: 'core',n /**n * @name expirationn * @memberof workboxn * @see module:workbox-expirationn */n expiration: 'expiration',n /**n * @name googleAnalyticsn * @memberof workboxn * @see module:workbox-google-analyticsn */n googleAnalytics: 'offline-ga',n /**n * @name navigationPreloadn * @memberof workboxn * @see module:workbox-navigation-preloadn */n navigationPreload: 'navigation-preload',n /**n * @name precachingn * @memberof workboxn * @see module:workbox-precachingn */n precaching: 'precaching',n /**n * @name rangeRequestsn * @memberof workboxn * @see module:workbox-range-requestsn */n rangeRequests: 'range-requests',n /**n * @name routingn * @memberof workboxn * @see module:workbox-routingn */n routing: 'routing',n /**n * @name strategiesn * @memberof workboxn * @see module:workbox-strategiesn */n strategies: 'strategies',n /**n * @name streamsn * @memberof workboxn * @see module:workbox-streamsn */n streams: 'streams',n};nn/**n * This class can be used to make it easy to use the various parts ofn * Workbox.n *n * @privaten */nexport class WorkboxSW {n /**n * Creates a proxy that automatically loads workbox namespaces on demand.n *n * @privaten */n constructor() {n this.v = {};n this._options = {n debug: self.location.hostname === 'localhost',n modulePathPrefix: null,n modulePathCb: null,n };nn this._env = this._options.debug ? 'dev' : 'prod';n this._modulesLoaded = false;nn return new Proxy(this, {n get(target, key) {n if (target) {n return target;n }nn const moduleName = MODULE_KEY_TO_NAME_MAPPING;n if (moduleName) {n target.loadModule(`workbox-${moduleName}`);n }nn return target;n },n });n }nn /**n * Updates the configuration options. You can specify whether to treat as an * debug build and whether to use a CDN or a specific path when importingn * other workbox-modulesn *n * @param {Object} [options]n * @param {boolean} [options.debug] If true, `dev` builds are using, otherwisen * `prod` builds are used. By default, `prod` is used unless on localhost.n * @param {Function} [options.modulePathPrefix] To avoid using the CDN withn * `workbox-sw` set the path prefix of where modules should be loaded from.n * For example `modulePathPrefix: '/third_party/workbox/v3.0.0/'`.n * @param {workbox~ModulePathCallback} [options.modulePathCb] If defined,n * this callback will be responsible for determining the path of eachn * workbox module.n *n * @alias workbox.setConfign */n setConfig(options = {}) {n if (!this._modulesLoaded) {n Object.assign(this._options, options);n this._env = this._options.debug ? 'dev' : 'prod';n } else {n throw new Error('Config must be set before accessing workbox.* modules');n }n }nn /**n * Load a Workbox module by passing in the appropriate module name.n *n * This is not generally needed unless you know there are modules that aren * dynamically used and you want to safe guard use of the module while then * user may be offline.n *n * @param {string} moduleNamen *n * @alias workbox.loadModulen */n loadModule(moduleName) {n const modulePath = this._getImportPath(moduleName);n try {n importScripts(modulePath);n this._modulesLoaded = true;n } catch (err) {n // TODO Add context of this error if using the CDN vs the local file.nn // We can't rely on workbox-core being loaded so using consolen // eslint-disable-next-linen console.error(n `Unable to import module '${moduleName}' from '${modulePath}'.`);n throw err;n }n }nn /**n * This method will get the path / CDN URL to be used for importScript calls.n *n * @param {string} moduleNamen * @return {string} URL to the desired module.n *n * @privaten */n _getImportPath(moduleName) {n if (this._options.modulePathCb) {n return this._options.modulePathCb(moduleName, this._options.debug);n }nn // TODO: This needs to be dynamic some how.n let pathParts = [CDN_PATH];nn const fileName = `${moduleName}.${this._env}.js`;nn const pathPrefix = this._options.modulePathPrefix;n if (pathPrefix) {n // Split to avoid issues with developers ending / not ending with slashn pathParts = pathPrefix.split('/');nn // We don't need a slash at the end as we will be addingn // a filename regardlessn if (pathParts[pathParts.length - 1] === '') {n pathParts.splice(pathParts.length - 1, 1);n }n }nn pathParts.push(fileName);nn return pathParts.join('/');n }n}n”,“/*n Copyright 2018 Google LLCnn Use of this source code is governed by an MIT-stylen license that can be found in the LICENSE file or atn opensource.org/licenses/MIT.n*/nnimport {WorkboxSW} from './controllers/WorkboxSW.mjs';nimport './_version.mjs';nn/**n * @namespace workboxn */nn// Don't export anything, just expose a global.nself.workbox = new WorkboxSW();n”],“names”:,“mappings”:“yBAAA,IAAIA,KAAK,qBAAqBC,IAAI,MAAMC,ICUxC,MAEMC,EAA6B,CAMjCC,eAAgB,kBAMhBC,gBAAiB,mBAMjBC,kBAAmB,qBAMnBC,KAAM,OAMNC,WAAY,aAMZC,gBAAiB,aAMjBC,kBAAmB,qBAMnBC,WAAY,aAMZC,cAAe,iBAMfC,QAAS,UAMTC,WAAY,aAMZC,QAAS,WCpEXf,KAAKgB,QAAU,ID6ER,MAMLC,0BACOC,EAAI,QACJC,EAAW,CACdC,MAAkC,cAA3BpB,KAAKqB,SAASC,SACrBC,iBAAkB,KAClBC,aAAc,WAGXC,EAAOC,KAAKP,EAASC,MAAQ,MAAQ,YACrCO,GAAiB,EAEf,IAAIC,MAAMF,KAAM,CACrBG,IAAIC,EAAQC,MACND,EAAOC,UACFD,EAAOC,SAGVC,EAAa7B,EAA2B4B,UAC1CC,GACFF,EAAOG,WAAY,WAAUD,GAGxBF,EAAOC,MAsBpBG,UAAUC,EAAU,OACbT,KAAKC,QAIF,IAAIS,MAAM,yDAHhBC,OAAOC,OAAOZ,KAAKP,EAAUgB,QACxBV,EAAOC,KAAKP,EAASC,MAAQ,MAAQ,OAiB9Ca,WAAWD,SACHO,EAAab,KAAKc,EAAeR,OAErCS,cAAcF,QACTZ,GAAiB,EACtB,MAAOe,SAKPC,QAAQC,MACH,4BAA2BZ,YAAqBO,OAC/CG,GAYVF,EAAeR,MACTN,KAAKP,EAASK,oBACTE,KAAKP,EAASK,aAAaQ,EAAYN,KAAKP,EAASC,WAI1DyB,EAAY,CAvLF,mEAyLRC,EAAY,GAAEd,KAAcN,KAAKD,OAEjCsB,EAAarB,KAAKP,EAASI,wBAC7BwB,IAEFF,EAAYE,EAAWC,MAAM,KAIW,KAApCH,EAAUA,EAAUI,OAAS,IAC/BJ,EAAUK,OAAOL,EAAUI,OAAS,EAAG,IAI3CJ,EAAUM,KAAKL,GAERD,EAAUO,KAAK”}