v1.0 with SW PWA enabled
This commit is contained in:
19
frontend/node_modules/workbox-core/LICENSE
generated
vendored
Normal file
19
frontend/node_modules/workbox-core/LICENSE
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
Copyright 2018 Google LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
1
frontend/node_modules/workbox-core/README.md
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/README.md
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
This module's documentation can be found at https://developers.google.com/web/tools/workbox/modules/workbox-core
|
||||
16
frontend/node_modules/workbox-core/_private.d.ts
generated
vendored
Normal file
16
frontend/node_modules/workbox-core/_private.d.ts
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
import { assert } from './_private/assert.js';
|
||||
import { cacheNames } from './_private/cacheNames.js';
|
||||
import { cacheMatchIgnoreParams } from './_private/cacheMatchIgnoreParams.js';
|
||||
import { canConstructReadableStream } from './_private/canConstructReadableStream.js';
|
||||
import { canConstructResponseFromBodyStream } from './_private/canConstructResponseFromBodyStream.js';
|
||||
import { dontWaitFor } from './_private/dontWaitFor.js';
|
||||
import { Deferred } from './_private/Deferred.js';
|
||||
import { executeQuotaErrorCallbacks } from './_private/executeQuotaErrorCallbacks.js';
|
||||
import { getFriendlyURL } from './_private/getFriendlyURL.js';
|
||||
import { logger } from './_private/logger.js';
|
||||
import { resultingClientExists } from './_private/resultingClientExists.js';
|
||||
import { timeout } from './_private/timeout.js';
|
||||
import { waitUntil } from './_private/waitUntil.js';
|
||||
import { WorkboxError } from './_private/WorkboxError.js';
|
||||
import './_version.js';
|
||||
export { assert, cacheMatchIgnoreParams, cacheNames, canConstructReadableStream, canConstructResponseFromBodyStream, dontWaitFor, Deferred, executeQuotaErrorCallbacks, getFriendlyURL, logger, resultingClientExists, timeout, waitUntil, WorkboxError, };
|
||||
24
frontend/node_modules/workbox-core/_private.js
generated
vendored
Normal file
24
frontend/node_modules/workbox-core/_private.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
// We either expose defaults or we expose every named export.
|
||||
import { assert } from './_private/assert.js';
|
||||
import { cacheNames } from './_private/cacheNames.js';
|
||||
import { cacheMatchIgnoreParams } from './_private/cacheMatchIgnoreParams.js';
|
||||
import { canConstructReadableStream } from './_private/canConstructReadableStream.js';
|
||||
import { canConstructResponseFromBodyStream } from './_private/canConstructResponseFromBodyStream.js';
|
||||
import { dontWaitFor } from './_private/dontWaitFor.js';
|
||||
import { Deferred } from './_private/Deferred.js';
|
||||
import { executeQuotaErrorCallbacks } from './_private/executeQuotaErrorCallbacks.js';
|
||||
import { getFriendlyURL } from './_private/getFriendlyURL.js';
|
||||
import { logger } from './_private/logger.js';
|
||||
import { resultingClientExists } from './_private/resultingClientExists.js';
|
||||
import { timeout } from './_private/timeout.js';
|
||||
import { waitUntil } from './_private/waitUntil.js';
|
||||
import { WorkboxError } from './_private/WorkboxError.js';
|
||||
import './_version.js';
|
||||
export { assert, cacheMatchIgnoreParams, cacheNames, canConstructReadableStream, canConstructResponseFromBodyStream, dontWaitFor, Deferred, executeQuotaErrorCallbacks, getFriendlyURL, logger, resultingClientExists, timeout, waitUntil, WorkboxError, };
|
||||
1
frontend/node_modules/workbox-core/_private.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './_private.js';
|
||||
19
frontend/node_modules/workbox-core/_private/Deferred.d.ts
generated
vendored
Normal file
19
frontend/node_modules/workbox-core/_private/Deferred.d.ts
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
import '../_version.js';
|
||||
/**
|
||||
* The Deferred class composes Promises in a way that allows for them to be
|
||||
* resolved or rejected from outside the constructor. In most cases promises
|
||||
* should be used directly, but Deferreds can be necessary when the logic to
|
||||
* resolve a promise must be separate.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
declare class Deferred<T> {
|
||||
promise: Promise<T>;
|
||||
resolve: (value: T) => void;
|
||||
reject: (reason?: any) => void;
|
||||
/**
|
||||
* Creates a promise and exposes its resolve and reject functions as methods.
|
||||
*/
|
||||
constructor();
|
||||
}
|
||||
export { Deferred };
|
||||
28
frontend/node_modules/workbox-core/_private/Deferred.js
generated
vendored
Normal file
28
frontend/node_modules/workbox-core/_private/Deferred.js
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import '../_version.js';
|
||||
/**
|
||||
* The Deferred class composes Promises in a way that allows for them to be
|
||||
* resolved or rejected from outside the constructor. In most cases promises
|
||||
* should be used directly, but Deferreds can be necessary when the logic to
|
||||
* resolve a promise must be separate.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
class Deferred {
|
||||
/**
|
||||
* Creates a promise and exposes its resolve and reject functions as methods.
|
||||
*/
|
||||
constructor() {
|
||||
this.promise = new Promise((resolve, reject) => {
|
||||
this.resolve = resolve;
|
||||
this.reject = reject;
|
||||
});
|
||||
}
|
||||
}
|
||||
export { Deferred };
|
||||
1
frontend/node_modules/workbox-core/_private/Deferred.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private/Deferred.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './Deferred.js';
|
||||
24
frontend/node_modules/workbox-core/_private/WorkboxError.d.ts
generated
vendored
Normal file
24
frontend/node_modules/workbox-core/_private/WorkboxError.d.ts
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
import { MapLikeObject } from '../types.js';
|
||||
import '../_version.js';
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
declare class WorkboxError extends Error {
|
||||
details?: MapLikeObject;
|
||||
/**
|
||||
*
|
||||
* @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: string, details?: MapLikeObject);
|
||||
}
|
||||
export { WorkboxError };
|
||||
35
frontend/node_modules/workbox-core/_private/WorkboxError.js
generated
vendored
Normal file
35
frontend/node_modules/workbox-core/_private/WorkboxError.js
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import { messageGenerator } from '../models/messages/messageGenerator.js';
|
||||
import '../_version.js';
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
export { WorkboxError };
|
||||
1
frontend/node_modules/workbox-core/_private/WorkboxError.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private/WorkboxError.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './WorkboxError.js';
|
||||
11
frontend/node_modules/workbox-core/_private/assert.d.ts
generated
vendored
Normal file
11
frontend/node_modules/workbox-core/_private/assert.d.ts
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
import { MapLikeObject } from '../types.js';
|
||||
import '../_version.js';
|
||||
declare const finalAssertExports: {
|
||||
hasMethod: (object: MapLikeObject, expectedMethod: string, details: MapLikeObject) => void;
|
||||
isArray: (value: any[], details: MapLikeObject) => void;
|
||||
isInstance: (object: unknown, expectedClass: Function, details: MapLikeObject) => void;
|
||||
isOneOf: (value: any, validValues: any[], details: MapLikeObject) => void;
|
||||
isType: (object: unknown, expectedType: string, details: MapLikeObject) => void;
|
||||
isArrayOfClass: (value: any, expectedClass: Function, details: MapLikeObject) => void;
|
||||
} | null;
|
||||
export { finalAssertExports as assert };
|
||||
73
frontend/node_modules/workbox-core/_private/assert.js
generated
vendored
Normal file
73
frontend/node_modules/workbox-core/_private/assert.js
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import { WorkboxError } from '../_private/WorkboxError.js';
|
||||
import '../_version.js';
|
||||
/*
|
||||
* 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,
|
||||
// Need the general type to do the check later.
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
expectedClass, details) => {
|
||||
if (!(object instanceof expectedClass)) {
|
||||
details['expectedClassName'] = expectedClass.name;
|
||||
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,
|
||||
// Need general type to do check later.
|
||||
expectedClass, // eslint-disable-line
|
||||
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 = process.env.NODE_ENV === 'production'
|
||||
? null
|
||||
: {
|
||||
hasMethod,
|
||||
isArray,
|
||||
isInstance,
|
||||
isOneOf,
|
||||
isType,
|
||||
isArrayOfClass,
|
||||
};
|
||||
export { finalAssertExports as assert };
|
||||
1
frontend/node_modules/workbox-core/_private/assert.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private/assert.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './assert.js';
|
||||
15
frontend/node_modules/workbox-core/_private/cacheMatchIgnoreParams.d.ts
generated
vendored
Normal file
15
frontend/node_modules/workbox-core/_private/cacheMatchIgnoreParams.d.ts
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import '../_version.js';
|
||||
/**
|
||||
* Matches an item in the cache, ignoring specific URL params. This is similar
|
||||
* to the `ignoreSearch` option, but it allows you to ignore just specific
|
||||
* params (while continuing to match on the others).
|
||||
*
|
||||
* @private
|
||||
* @param {Cache} cache
|
||||
* @param {Request} request
|
||||
* @param {Object} matchOptions
|
||||
* @param {Array<string>} ignoreParams
|
||||
* @return {Promise<Response|undefined>}
|
||||
*/
|
||||
declare function cacheMatchIgnoreParams(cache: Cache, request: Request, ignoreParams: string[], matchOptions?: CacheQueryOptions): Promise<Response | undefined>;
|
||||
export { cacheMatchIgnoreParams };
|
||||
44
frontend/node_modules/workbox-core/_private/cacheMatchIgnoreParams.js
generated
vendored
Normal file
44
frontend/node_modules/workbox-core/_private/cacheMatchIgnoreParams.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
Copyright 2020 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.
|
||||
*/
|
||||
import '../_version.js';
|
||||
function stripParams(fullURL, ignoreParams) {
|
||||
const strippedURL = new URL(fullURL);
|
||||
for (const param of ignoreParams) {
|
||||
strippedURL.searchParams.delete(param);
|
||||
}
|
||||
return strippedURL.href;
|
||||
}
|
||||
/**
|
||||
* Matches an item in the cache, ignoring specific URL params. This is similar
|
||||
* to the `ignoreSearch` option, but it allows you to ignore just specific
|
||||
* params (while continuing to match on the others).
|
||||
*
|
||||
* @private
|
||||
* @param {Cache} cache
|
||||
* @param {Request} request
|
||||
* @param {Object} matchOptions
|
||||
* @param {Array<string>} ignoreParams
|
||||
* @return {Promise<Response|undefined>}
|
||||
*/
|
||||
async function cacheMatchIgnoreParams(cache, request, ignoreParams, matchOptions) {
|
||||
const strippedRequestURL = stripParams(request.url, ignoreParams);
|
||||
// If the request doesn't include any ignored params, match as normal.
|
||||
if (request.url === strippedRequestURL) {
|
||||
return cache.match(request, matchOptions);
|
||||
}
|
||||
// Otherwise, match by comparing keys
|
||||
const keysOptions = Object.assign(Object.assign({}, matchOptions), { ignoreSearch: true });
|
||||
const cacheKeys = await cache.keys(request, keysOptions);
|
||||
for (const cacheKey of cacheKeys) {
|
||||
const strippedCacheKeyURL = stripParams(cacheKey.url, ignoreParams);
|
||||
if (strippedRequestURL === strippedCacheKeyURL) {
|
||||
return cache.match(cacheKey, matchOptions);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
export { cacheMatchIgnoreParams };
|
||||
1
frontend/node_modules/workbox-core/_private/cacheMatchIgnoreParams.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private/cacheMatchIgnoreParams.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './cacheMatchIgnoreParams.js';
|
||||
20
frontend/node_modules/workbox-core/_private/cacheNames.d.ts
generated
vendored
Normal file
20
frontend/node_modules/workbox-core/_private/cacheNames.d.ts
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
import '../_version.js';
|
||||
export interface CacheNameDetails {
|
||||
googleAnalytics: string;
|
||||
precache: string;
|
||||
prefix: string;
|
||||
runtime: string;
|
||||
suffix: string;
|
||||
}
|
||||
export interface PartialCacheNameDetails {
|
||||
[propName: string]: string;
|
||||
}
|
||||
export type CacheNameDetailsProp = 'googleAnalytics' | 'precache' | 'prefix' | 'runtime' | 'suffix';
|
||||
export declare const cacheNames: {
|
||||
updateDetails: (details: PartialCacheNameDetails) => void;
|
||||
getGoogleAnalyticsName: (userCacheName?: string) => string;
|
||||
getPrecacheName: (userCacheName?: string) => string;
|
||||
getPrefix: () => string;
|
||||
getRuntimeName: (userCacheName?: string) => string;
|
||||
getSuffix: () => string;
|
||||
};
|
||||
49
frontend/node_modules/workbox-core/_private/cacheNames.js
generated
vendored
Normal file
49
frontend/node_modules/workbox-core/_private/cacheNames.js
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import '../_version.js';
|
||||
const _cacheNameDetails = {
|
||||
googleAnalytics: 'googleAnalytics',
|
||||
precache: 'precache-v2',
|
||||
prefix: 'workbox',
|
||||
runtime: 'runtime',
|
||||
suffix: typeof registration !== 'undefined' ? registration.scope : '',
|
||||
};
|
||||
const _createCacheName = (cacheName) => {
|
||||
return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix]
|
||||
.filter((value) => value && value.length > 0)
|
||||
.join('-');
|
||||
};
|
||||
const eachCacheNameDetail = (fn) => {
|
||||
for (const key of Object.keys(_cacheNameDetails)) {
|
||||
fn(key);
|
||||
}
|
||||
};
|
||||
export const cacheNames = {
|
||||
updateDetails: (details) => {
|
||||
eachCacheNameDetail((key) => {
|
||||
if (typeof details[key] === 'string') {
|
||||
_cacheNameDetails[key] = details[key];
|
||||
}
|
||||
});
|
||||
},
|
||||
getGoogleAnalyticsName: (userCacheName) => {
|
||||
return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);
|
||||
},
|
||||
getPrecacheName: (userCacheName) => {
|
||||
return userCacheName || _createCacheName(_cacheNameDetails.precache);
|
||||
},
|
||||
getPrefix: () => {
|
||||
return _cacheNameDetails.prefix;
|
||||
},
|
||||
getRuntimeName: (userCacheName) => {
|
||||
return userCacheName || _createCacheName(_cacheNameDetails.runtime);
|
||||
},
|
||||
getSuffix: () => {
|
||||
return _cacheNameDetails.suffix;
|
||||
},
|
||||
};
|
||||
1
frontend/node_modules/workbox-core/_private/cacheNames.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private/cacheNames.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './cacheNames.js';
|
||||
13
frontend/node_modules/workbox-core/_private/canConstructReadableStream.d.ts
generated
vendored
Normal file
13
frontend/node_modules/workbox-core/_private/canConstructReadableStream.d.ts
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
import '../_version.js';
|
||||
/**
|
||||
* A utility function that determines whether the current browser supports
|
||||
* constructing a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)
|
||||
* object.
|
||||
*
|
||||
* @return {boolean} `true`, if the current browser can successfully
|
||||
* construct a `ReadableStream`, `false` otherwise.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
declare function canConstructReadableStream(): boolean;
|
||||
export { canConstructReadableStream };
|
||||
33
frontend/node_modules/workbox-core/_private/canConstructReadableStream.js
generated
vendored
Normal file
33
frontend/node_modules/workbox-core/_private/canConstructReadableStream.js
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import '../_version.js';
|
||||
let supportStatus;
|
||||
/**
|
||||
* A utility function that determines whether the current browser supports
|
||||
* constructing a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)
|
||||
* object.
|
||||
*
|
||||
* @return {boolean} `true`, if the current browser can successfully
|
||||
* construct a `ReadableStream`, `false` otherwise.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function canConstructReadableStream() {
|
||||
if (supportStatus === undefined) {
|
||||
// See https://github.com/GoogleChrome/workbox/issues/1473
|
||||
try {
|
||||
new ReadableStream({ start() { } });
|
||||
supportStatus = true;
|
||||
}
|
||||
catch (error) {
|
||||
supportStatus = false;
|
||||
}
|
||||
}
|
||||
return supportStatus;
|
||||
}
|
||||
export { canConstructReadableStream };
|
||||
1
frontend/node_modules/workbox-core/_private/canConstructReadableStream.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private/canConstructReadableStream.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './canConstructReadableStream.js';
|
||||
12
frontend/node_modules/workbox-core/_private/canConstructResponseFromBodyStream.d.ts
generated
vendored
Normal file
12
frontend/node_modules/workbox-core/_private/canConstructResponseFromBodyStream.d.ts
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import '../_version.js';
|
||||
/**
|
||||
* A utility function that determines whether the current browser supports
|
||||
* constructing a new `Response` from a `response.body` stream.
|
||||
*
|
||||
* @return {boolean} `true`, if the current browser can successfully
|
||||
* construct a `Response` from a `response.body` stream, `false` otherwise.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
declare function canConstructResponseFromBodyStream(): boolean;
|
||||
export { canConstructResponseFromBodyStream };
|
||||
35
frontend/node_modules/workbox-core/_private/canConstructResponseFromBodyStream.js
generated
vendored
Normal file
35
frontend/node_modules/workbox-core/_private/canConstructResponseFromBodyStream.js
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import '../_version.js';
|
||||
let supportStatus;
|
||||
/**
|
||||
* A utility function that determines whether the current browser supports
|
||||
* constructing a new `Response` from a `response.body` stream.
|
||||
*
|
||||
* @return {boolean} `true`, if the current browser can successfully
|
||||
* construct a `Response` from a `response.body` stream, `false` otherwise.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function canConstructResponseFromBodyStream() {
|
||||
if (supportStatus === undefined) {
|
||||
const testResponse = new Response('');
|
||||
if ('body' in testResponse) {
|
||||
try {
|
||||
new Response(testResponse.body);
|
||||
supportStatus = true;
|
||||
}
|
||||
catch (error) {
|
||||
supportStatus = false;
|
||||
}
|
||||
}
|
||||
supportStatus = false;
|
||||
}
|
||||
return supportStatus;
|
||||
}
|
||||
export { canConstructResponseFromBodyStream };
|
||||
1
frontend/node_modules/workbox-core/_private/canConstructResponseFromBodyStream.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private/canConstructResponseFromBodyStream.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './canConstructResponseFromBodyStream.js';
|
||||
7
frontend/node_modules/workbox-core/_private/dontWaitFor.d.ts
generated
vendored
Normal file
7
frontend/node_modules/workbox-core/_private/dontWaitFor.d.ts
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
import '../_version.js';
|
||||
/**
|
||||
* A helper function that prevents a promise from being flagged as unused.
|
||||
*
|
||||
* @private
|
||||
**/
|
||||
export declare function dontWaitFor(promise: Promise<any>): void;
|
||||
16
frontend/node_modules/workbox-core/_private/dontWaitFor.js
generated
vendored
Normal file
16
frontend/node_modules/workbox-core/_private/dontWaitFor.js
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import '../_version.js';
|
||||
/**
|
||||
* A helper function that prevents a promise from being flagged as unused.
|
||||
*
|
||||
* @private
|
||||
**/
|
||||
export function dontWaitFor(promise) {
|
||||
// Effective no-op.
|
||||
void promise.then(() => { });
|
||||
}
|
||||
1
frontend/node_modules/workbox-core/_private/dontWaitFor.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private/dontWaitFor.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './dontWaitFor.js';
|
||||
10
frontend/node_modules/workbox-core/_private/executeQuotaErrorCallbacks.d.ts
generated
vendored
Normal file
10
frontend/node_modules/workbox-core/_private/executeQuotaErrorCallbacks.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import '../_version.js';
|
||||
/**
|
||||
* Runs all of the callback functions, one at a time sequentially, in the order
|
||||
* in which they were registered.
|
||||
*
|
||||
* @memberof workbox-core
|
||||
* @private
|
||||
*/
|
||||
declare function executeQuotaErrorCallbacks(): Promise<void>;
|
||||
export { executeQuotaErrorCallbacks };
|
||||
33
frontend/node_modules/workbox-core/_private/executeQuotaErrorCallbacks.js
generated
vendored
Normal file
33
frontend/node_modules/workbox-core/_private/executeQuotaErrorCallbacks.js
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import { logger } from '../_private/logger.js';
|
||||
import { quotaErrorCallbacks } from '../models/quotaErrorCallbacks.js';
|
||||
import '../_version.js';
|
||||
/**
|
||||
* Runs all of the callback functions, one at a time sequentially, in the order
|
||||
* in which they were registered.
|
||||
*
|
||||
* @memberof workbox-core
|
||||
* @private
|
||||
*/
|
||||
async function executeQuotaErrorCallbacks() {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log(`About to run ${quotaErrorCallbacks.size} ` +
|
||||
`callbacks to clean up caches.`);
|
||||
}
|
||||
for (const callback of quotaErrorCallbacks) {
|
||||
await callback();
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log(callback, 'is complete.');
|
||||
}
|
||||
}
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log('Finished running callbacks.');
|
||||
}
|
||||
}
|
||||
export { executeQuotaErrorCallbacks };
|
||||
1
frontend/node_modules/workbox-core/_private/executeQuotaErrorCallbacks.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private/executeQuotaErrorCallbacks.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './executeQuotaErrorCallbacks.js';
|
||||
3
frontend/node_modules/workbox-core/_private/getFriendlyURL.d.ts
generated
vendored
Normal file
3
frontend/node_modules/workbox-core/_private/getFriendlyURL.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import '../_version.js';
|
||||
declare const getFriendlyURL: (url: URL | string) => string;
|
||||
export { getFriendlyURL };
|
||||
15
frontend/node_modules/workbox-core/_private/getFriendlyURL.js
generated
vendored
Normal file
15
frontend/node_modules/workbox-core/_private/getFriendlyURL.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import '../_version.js';
|
||||
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}`), '');
|
||||
};
|
||||
export { getFriendlyURL };
|
||||
1
frontend/node_modules/workbox-core/_private/getFriendlyURL.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private/getFriendlyURL.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './getFriendlyURL.js';
|
||||
11
frontend/node_modules/workbox-core/_private/logger.d.ts
generated
vendored
Normal file
11
frontend/node_modules/workbox-core/_private/logger.d.ts
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
import '../_version.js';
|
||||
declare global {
|
||||
interface WorkerGlobalScope {
|
||||
__WB_DISABLE_DEV_LOGS: boolean;
|
||||
}
|
||||
interface Window {
|
||||
__WB_DISABLE_DEV_LOGS: boolean;
|
||||
}
|
||||
}
|
||||
declare const logger: Console;
|
||||
export { logger };
|
||||
65
frontend/node_modules/workbox-core/_private/logger.js
generated
vendored
Normal file
65
frontend/node_modules/workbox-core/_private/logger.js
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import '../_version.js';
|
||||
const logger = (process.env.NODE_ENV === 'production'
|
||||
? null
|
||||
: (() => {
|
||||
// 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 globalThis)) {
|
||||
self.__WB_DISABLE_DEV_LOGS = false;
|
||||
}
|
||||
let inGroup = false;
|
||||
const methodToColorMap = {
|
||||
debug: `#7f8c8d`,
|
||||
log: `#2ecc71`,
|
||||
warn: `#f39c12`,
|
||||
error: `#c0392b`,
|
||||
groupCollapsed: `#3498db`,
|
||||
groupEnd: null, // No colored prefix on groupEnd
|
||||
};
|
||||
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;
|
||||
}
|
||||
};
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
const api = {};
|
||||
const loggerMethods = Object.keys(methodToColorMap);
|
||||
for (const key of loggerMethods) {
|
||||
const method = key;
|
||||
api[method] = (...args) => {
|
||||
print(method, args);
|
||||
};
|
||||
}
|
||||
return api;
|
||||
})());
|
||||
export { logger };
|
||||
1
frontend/node_modules/workbox-core/_private/logger.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private/logger.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './logger.js';
|
||||
12
frontend/node_modules/workbox-core/_private/resultingClientExists.d.ts
generated
vendored
Normal file
12
frontend/node_modules/workbox-core/_private/resultingClientExists.d.ts
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import '../_version.js';
|
||||
/**
|
||||
* Returns a promise that resolves to a window client matching the passed
|
||||
* `resultingClientId`. For browsers that don't support `resultingClientId`
|
||||
* or if waiting for the resulting client to apper takes too long, resolve to
|
||||
* `undefined`.
|
||||
*
|
||||
* @param {string} [resultingClientId]
|
||||
* @return {Promise<Client|undefined>}
|
||||
* @private
|
||||
*/
|
||||
export declare function resultingClientExists(resultingClientId?: string): Promise<Client | undefined>;
|
||||
48
frontend/node_modules/workbox-core/_private/resultingClientExists.js
generated
vendored
Normal file
48
frontend/node_modules/workbox-core/_private/resultingClientExists.js
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import { timeout } from './timeout.js';
|
||||
import '../_version.js';
|
||||
const MAX_RETRY_TIME = 2000;
|
||||
/**
|
||||
* Returns a promise that resolves to a window client matching the passed
|
||||
* `resultingClientId`. For browsers that don't support `resultingClientId`
|
||||
* or if waiting for the resulting client to apper takes too long, resolve to
|
||||
* `undefined`.
|
||||
*
|
||||
* @param {string} [resultingClientId]
|
||||
* @return {Promise<Client|undefined>}
|
||||
* @private
|
||||
*/
|
||||
export async function resultingClientExists(resultingClientId) {
|
||||
if (!resultingClientId) {
|
||||
return;
|
||||
}
|
||||
let existingWindows = await self.clients.matchAll({ type: 'window' });
|
||||
const existingWindowIds = new Set(existingWindows.map((w) => w.id));
|
||||
let resultingWindow;
|
||||
const startTime = performance.now();
|
||||
// Only wait up to `MAX_RETRY_TIME` to find a matching client.
|
||||
while (performance.now() - startTime < MAX_RETRY_TIME) {
|
||||
existingWindows = await self.clients.matchAll({ type: 'window' });
|
||||
resultingWindow = existingWindows.find((w) => {
|
||||
if (resultingClientId) {
|
||||
// If we have a `resultingClientId`, we can match on that.
|
||||
return w.id === resultingClientId;
|
||||
}
|
||||
else {
|
||||
// Otherwise match on finding a window not in `existingWindowIds`.
|
||||
return !existingWindowIds.has(w.id);
|
||||
}
|
||||
});
|
||||
if (resultingWindow) {
|
||||
break;
|
||||
}
|
||||
// Sleep for 100ms and retry.
|
||||
await timeout(100);
|
||||
}
|
||||
return resultingWindow;
|
||||
}
|
||||
1
frontend/node_modules/workbox-core/_private/resultingClientExists.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private/resultingClientExists.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './resultingClientExists.js';
|
||||
10
frontend/node_modules/workbox-core/_private/timeout.d.ts
generated
vendored
Normal file
10
frontend/node_modules/workbox-core/_private/timeout.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import '../_version.js';
|
||||
/**
|
||||
* Returns a promise that resolves and the passed number of milliseconds.
|
||||
* This utility is an async/await-friendly version of `setTimeout`.
|
||||
*
|
||||
* @param {number} ms
|
||||
* @return {Promise}
|
||||
* @private
|
||||
*/
|
||||
export declare function timeout(ms: number): Promise<unknown>;
|
||||
18
frontend/node_modules/workbox-core/_private/timeout.js
generated
vendored
Normal file
18
frontend/node_modules/workbox-core/_private/timeout.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import '../_version.js';
|
||||
/**
|
||||
* Returns a promise that resolves and the passed number of milliseconds.
|
||||
* This utility is an async/await-friendly version of `setTimeout`.
|
||||
*
|
||||
* @param {number} ms
|
||||
* @return {Promise}
|
||||
* @private
|
||||
*/
|
||||
export function timeout(ms) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}
|
||||
1
frontend/node_modules/workbox-core/_private/timeout.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private/timeout.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './timeout.js';
|
||||
12
frontend/node_modules/workbox-core/_private/waitUntil.d.ts
generated
vendored
Normal file
12
frontend/node_modules/workbox-core/_private/waitUntil.d.ts
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import '../_version.js';
|
||||
/**
|
||||
* A utility method that makes it easier to use `event.waitUntil` with
|
||||
* async functions and return the result.
|
||||
*
|
||||
* @param {ExtendableEvent} event
|
||||
* @param {Function} asyncFn
|
||||
* @return {Function}
|
||||
* @private
|
||||
*/
|
||||
declare function waitUntil(event: ExtendableEvent, asyncFn: () => Promise<any>): Promise<any>;
|
||||
export { waitUntil };
|
||||
22
frontend/node_modules/workbox-core/_private/waitUntil.js
generated
vendored
Normal file
22
frontend/node_modules/workbox-core/_private/waitUntil.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
Copyright 2020 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.
|
||||
*/
|
||||
import '../_version.js';
|
||||
/**
|
||||
* A utility method that makes it easier to use `event.waitUntil` with
|
||||
* async functions and return the result.
|
||||
*
|
||||
* @param {ExtendableEvent} event
|
||||
* @param {Function} asyncFn
|
||||
* @return {Function}
|
||||
* @private
|
||||
*/
|
||||
function waitUntil(event, asyncFn) {
|
||||
const returnPromise = asyncFn();
|
||||
event.waitUntil(returnPromise);
|
||||
return returnPromise;
|
||||
}
|
||||
export { waitUntil };
|
||||
1
frontend/node_modules/workbox-core/_private/waitUntil.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_private/waitUntil.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './waitUntil.js';
|
||||
0
frontend/node_modules/workbox-core/_version.d.ts
generated
vendored
Normal file
0
frontend/node_modules/workbox-core/_version.d.ts
generated
vendored
Normal file
6
frontend/node_modules/workbox-core/_version.js
generated
vendored
Normal file
6
frontend/node_modules/workbox-core/_version.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
// @ts-ignore
|
||||
try {
|
||||
self['workbox:core:7.3.0'] && _();
|
||||
}
|
||||
catch (e) { }
|
||||
1
frontend/node_modules/workbox-core/_version.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/_version.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
try{self['workbox:core:7.4.0']&&_()}catch(e){}// eslint-disable-line
|
||||
1059
frontend/node_modules/workbox-core/build/workbox-core.dev.js
generated
vendored
Normal file
1059
frontend/node_modules/workbox-core/build/workbox-core.dev.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
frontend/node_modules/workbox-core/build/workbox-core.dev.js.map
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/build/workbox-core.dev.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
frontend/node_modules/workbox-core/build/workbox-core.prod.js
generated
vendored
Normal file
2
frontend/node_modules/workbox-core/build/workbox-core.prod.js
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
this.workbox=this.workbox||{},this.workbox.core=function(t){"use strict";try{self["workbox:core:7.3.0"]&&_()}catch(t){}const e=(t,...e)=>{let n=t;return e.length>0&&(n+=` :: ${JSON.stringify(e)}`),n};class n extends Error{constructor(t,n){super(e(t,n)),this.name=t,this.details=n}}const r=new Set;const o={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},s=t=>[o.prefix,t,o.suffix].filter((t=>t&&t.length>0)).join("-"),i={updateDetails:t=>{(t=>{for(const e of Object.keys(o))t(e)})((e=>{"string"==typeof t[e]&&(o[e]=t[e])}))},getGoogleAnalyticsName:t=>t||s(o.googleAnalytics),getPrecacheName:t=>t||s(o.precache),getPrefix:()=>o.prefix,getRuntimeName:t=>t||s(o.runtime),getSuffix:()=>o.suffix};function c(t,e){const n=new URL(t);for(const t of e)n.searchParams.delete(t);return n.href}let a,u;function f(){if(void 0===u){const t=new Response("");if("body"in t)try{new Response(t.body),u=!0}catch(t){u=!1}u=!1}return u}function l(t){return new Promise((e=>setTimeout(e,t)))}var g=Object.freeze({__proto__:null,assert:null,cacheMatchIgnoreParams:async function(t,e,n,r){const o=c(e.url,n);if(e.url===o)return t.match(e,r);const s=Object.assign(Object.assign({},r),{ignoreSearch:!0}),i=await t.keys(e,s);for(const e of i){if(o===c(e.url,n))return t.match(e,r)}},cacheNames:i,canConstructReadableStream:function(){if(void 0===a)try{new ReadableStream({start(){}}),a=!0}catch(t){a=!1}return a},canConstructResponseFromBodyStream:f,dontWaitFor:function(t){t.then((()=>{}))},Deferred:class{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}},executeQuotaErrorCallbacks:async function(){for(const t of r)await t()},getFriendlyURL:t=>new URL(String(t),location.href).href.replace(new RegExp(`^${location.origin}`),""),logger:null,resultingClientExists:async function(t){if(!t)return;let e=await self.clients.matchAll({type:"window"});const n=new Set(e.map((t=>t.id)));let r;const o=performance.now();for(;performance.now()-o<2e3&&(e=await self.clients.matchAll({type:"window"}),r=e.find((e=>t?e.id===t:!n.has(e.id))),!r);)await l(100);return r},timeout:l,waitUntil:function(t,e){const n=e();return t.waitUntil(n),n},WorkboxError:n});const w={get googleAnalytics(){return i.getGoogleAnalyticsName()},get precache(){return i.getPrecacheName()},get prefix(){return i.getPrefix()},get runtime(){return i.getRuntimeName()},get suffix(){return i.getSuffix()}};return t._private=g,t.cacheNames=w,t.clientsClaim=function(){self.addEventListener("activate",(()=>self.clients.claim()))},t.copyResponse=async function(t,e){let r=null;if(t.url){r=new URL(t.url).origin}if(r!==self.location.origin)throw new n("cross-origin-copy-response",{origin:r});const o=t.clone(),s={headers:new Headers(o.headers),status:o.status,statusText:o.statusText},i=e?e(s):s,c=f()?o.body:await o.blob();return new Response(c,i)},t.registerQuotaErrorCallback=function(t){r.add(t)},t.setCacheNameDetails=function(t){i.updateDetails(t)},t.skipWaiting=function(){self.skipWaiting()},t}({});
|
||||
//# sourceMappingURL=workbox-core.prod.js.map
|
||||
1
frontend/node_modules/workbox-core/build/workbox-core.prod.js.map
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/build/workbox-core.prod.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
24
frontend/node_modules/workbox-core/cacheNames.d.ts
generated
vendored
Normal file
24
frontend/node_modules/workbox-core/cacheNames.d.ts
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
import './_version.js';
|
||||
/**
|
||||
* Get the current cache names and prefix/suffix used by Workbox.
|
||||
*
|
||||
* `cacheNames.precache` is used for precached assets,
|
||||
* `cacheNames.googleAnalytics` is used by `workbox-google-analytics` to
|
||||
* store `analytics.js`, and `cacheNames.runtime` is used for everything else.
|
||||
*
|
||||
* `cacheNames.prefix` can be used to retrieve just the current prefix value.
|
||||
* `cacheNames.suffix` can be used to retrieve just the current suffix value.
|
||||
*
|
||||
* @return {Object} An object with `precache`, `runtime`, `prefix`, and
|
||||
* `googleAnalytics` properties.
|
||||
*
|
||||
* @memberof workbox-core
|
||||
*/
|
||||
declare const cacheNames: {
|
||||
readonly googleAnalytics: string;
|
||||
readonly precache: string;
|
||||
readonly prefix: string;
|
||||
readonly runtime: string;
|
||||
readonly suffix: string;
|
||||
};
|
||||
export { cacheNames };
|
||||
42
frontend/node_modules/workbox-core/cacheNames.js
generated
vendored
Normal file
42
frontend/node_modules/workbox-core/cacheNames.js
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import { cacheNames as _cacheNames } from './_private/cacheNames.js';
|
||||
import './_version.js';
|
||||
/**
|
||||
* Get the current cache names and prefix/suffix used by Workbox.
|
||||
*
|
||||
* `cacheNames.precache` is used for precached assets,
|
||||
* `cacheNames.googleAnalytics` is used by `workbox-google-analytics` to
|
||||
* store `analytics.js`, and `cacheNames.runtime` is used for everything else.
|
||||
*
|
||||
* `cacheNames.prefix` can be used to retrieve just the current prefix value.
|
||||
* `cacheNames.suffix` can be used to retrieve just the current suffix value.
|
||||
*
|
||||
* @return {Object} An object with `precache`, `runtime`, `prefix`, and
|
||||
* `googleAnalytics` properties.
|
||||
*
|
||||
* @memberof workbox-core
|
||||
*/
|
||||
const cacheNames = {
|
||||
get googleAnalytics() {
|
||||
return _cacheNames.getGoogleAnalyticsName();
|
||||
},
|
||||
get precache() {
|
||||
return _cacheNames.getPrecacheName();
|
||||
},
|
||||
get prefix() {
|
||||
return _cacheNames.getPrefix();
|
||||
},
|
||||
get runtime() {
|
||||
return _cacheNames.getRuntimeName();
|
||||
},
|
||||
get suffix() {
|
||||
return _cacheNames.getSuffix();
|
||||
},
|
||||
};
|
||||
export { cacheNames };
|
||||
1
frontend/node_modules/workbox-core/cacheNames.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/cacheNames.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './cacheNames.js';
|
||||
9
frontend/node_modules/workbox-core/clientsClaim.d.ts
generated
vendored
Normal file
9
frontend/node_modules/workbox-core/clientsClaim.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import './_version.js';
|
||||
/**
|
||||
* Claim any currently available clients once the service worker
|
||||
* becomes active. This is normally used in conjunction with `skipWaiting()`.
|
||||
*
|
||||
* @memberof workbox-core
|
||||
*/
|
||||
declare function clientsClaim(): void;
|
||||
export { clientsClaim };
|
||||
18
frontend/node_modules/workbox-core/clientsClaim.js
generated
vendored
Normal file
18
frontend/node_modules/workbox-core/clientsClaim.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import './_version.js';
|
||||
/**
|
||||
* Claim any currently available clients once the service worker
|
||||
* becomes active. This is normally used in conjunction with `skipWaiting()`.
|
||||
*
|
||||
* @memberof workbox-core
|
||||
*/
|
||||
function clientsClaim() {
|
||||
self.addEventListener('activate', () => self.clients.claim());
|
||||
}
|
||||
export { clientsClaim };
|
||||
1
frontend/node_modules/workbox-core/clientsClaim.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/clientsClaim.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './clientsClaim.js';
|
||||
22
frontend/node_modules/workbox-core/copyResponse.d.ts
generated
vendored
Normal file
22
frontend/node_modules/workbox-core/copyResponse.d.ts
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
import './_version.js';
|
||||
/**
|
||||
* Allows developers to copy a response and modify its `headers`, `status`,
|
||||
* or `statusText` values (the values settable via a
|
||||
* [`ResponseInit`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#Syntax}
|
||||
* object in the constructor).
|
||||
* To modify these values, pass a function as the second argument. That
|
||||
* function will be invoked with a single object with the response properties
|
||||
* `{headers, status, statusText}`. The return value of this function will
|
||||
* be used as the `ResponseInit` for the new `Response`. To change the values
|
||||
* either modify the passed parameter(s) and return it, or return a totally
|
||||
* new object.
|
||||
*
|
||||
* This method is intentionally limited to same-origin responses, regardless of
|
||||
* whether CORS was used or not.
|
||||
*
|
||||
* @param {Response} response
|
||||
* @param {Function} modifier
|
||||
* @memberof workbox-core
|
||||
*/
|
||||
declare function copyResponse(response: Response, modifier?: (responseInit: ResponseInit) => ResponseInit): Promise<Response>;
|
||||
export { copyResponse };
|
||||
57
frontend/node_modules/workbox-core/copyResponse.js
generated
vendored
Normal file
57
frontend/node_modules/workbox-core/copyResponse.js
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import { canConstructResponseFromBodyStream } from './_private/canConstructResponseFromBodyStream.js';
|
||||
import { WorkboxError } from './_private/WorkboxError.js';
|
||||
import './_version.js';
|
||||
/**
|
||||
* Allows developers to copy a response and modify its `headers`, `status`,
|
||||
* or `statusText` values (the values settable via a
|
||||
* [`ResponseInit`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#Syntax}
|
||||
* object in the constructor).
|
||||
* To modify these values, pass a function as the second argument. That
|
||||
* function will be invoked with a single object with the response properties
|
||||
* `{headers, status, statusText}`. The return value of this function will
|
||||
* be used as the `ResponseInit` for the new `Response`. To change the values
|
||||
* either modify the passed parameter(s) and return it, or return a totally
|
||||
* new object.
|
||||
*
|
||||
* This method is intentionally limited to same-origin responses, regardless of
|
||||
* whether CORS was used or not.
|
||||
*
|
||||
* @param {Response} response
|
||||
* @param {Function} modifier
|
||||
* @memberof workbox-core
|
||||
*/
|
||||
async function copyResponse(response, modifier) {
|
||||
let origin = null;
|
||||
// If response.url isn't set, assume it's cross-origin and keep origin null.
|
||||
if (response.url) {
|
||||
const responseURL = new URL(response.url);
|
||||
origin = responseURL.origin;
|
||||
}
|
||||
if (origin !== self.location.origin) {
|
||||
throw new WorkboxError('cross-origin-copy-response', { origin });
|
||||
}
|
||||
const clonedResponse = response.clone();
|
||||
// Create a fresh `ResponseInit` object by cloning the headers.
|
||||
const responseInit = {
|
||||
headers: new Headers(clonedResponse.headers),
|
||||
status: clonedResponse.status,
|
||||
statusText: clonedResponse.statusText,
|
||||
};
|
||||
// Apply any user modifications.
|
||||
const modifiedResponseInit = modifier ? modifier(responseInit) : responseInit;
|
||||
// Create the new response from the body stream and `ResponseInit`
|
||||
// modifications. Note: not all browsers support the Response.body stream,
|
||||
// so fall back to reading the entire body into memory as a blob.
|
||||
const body = canConstructResponseFromBodyStream()
|
||||
? clonedResponse.body
|
||||
: await clonedResponse.blob();
|
||||
return new Response(body, modifiedResponseInit);
|
||||
}
|
||||
export { copyResponse };
|
||||
1
frontend/node_modules/workbox-core/copyResponse.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/copyResponse.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './copyResponse.js';
|
||||
17
frontend/node_modules/workbox-core/index.d.ts
generated
vendored
Normal file
17
frontend/node_modules/workbox-core/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import { registerQuotaErrorCallback } from './registerQuotaErrorCallback.js';
|
||||
import * as _private from './_private.js';
|
||||
import { cacheNames } from './cacheNames.js';
|
||||
import { copyResponse } from './copyResponse.js';
|
||||
import { clientsClaim } from './clientsClaim.js';
|
||||
import { setCacheNameDetails } from './setCacheNameDetails.js';
|
||||
import { skipWaiting } from './skipWaiting.js';
|
||||
import './_version.js';
|
||||
/**
|
||||
* All of the Workbox service worker libraries use workbox-core for shared
|
||||
* code as well as setting default values that need to be shared (like cache
|
||||
* names).
|
||||
*
|
||||
* @module workbox-core
|
||||
*/
|
||||
export { _private, cacheNames, clientsClaim, copyResponse, registerQuotaErrorCallback, setCacheNameDetails, skipWaiting, };
|
||||
export * from './types.js';
|
||||
24
frontend/node_modules/workbox-core/index.js
generated
vendored
Normal file
24
frontend/node_modules/workbox-core/index.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import { registerQuotaErrorCallback } from './registerQuotaErrorCallback.js';
|
||||
import * as _private from './_private.js';
|
||||
import { cacheNames } from './cacheNames.js';
|
||||
import { copyResponse } from './copyResponse.js';
|
||||
import { clientsClaim } from './clientsClaim.js';
|
||||
import { setCacheNameDetails } from './setCacheNameDetails.js';
|
||||
import { skipWaiting } from './skipWaiting.js';
|
||||
import './_version.js';
|
||||
/**
|
||||
* All of the Workbox service worker libraries use workbox-core for shared
|
||||
* code as well as setting default values that need to be shared (like cache
|
||||
* names).
|
||||
*
|
||||
* @module workbox-core
|
||||
*/
|
||||
export { _private, cacheNames, clientsClaim, copyResponse, registerQuotaErrorCallback, setCacheNameDetails, skipWaiting, };
|
||||
export * from './types.js';
|
||||
1
frontend/node_modules/workbox-core/index.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/index.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './index.js';
|
||||
2
frontend/node_modules/workbox-core/models/messages/messageGenerator.d.ts
generated
vendored
Normal file
2
frontend/node_modules/workbox-core/models/messages/messageGenerator.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
import '../../_version.js';
|
||||
export declare const messageGenerator: ((code: string, ...args: any[]) => string) | ((code: string, details?: {}) => string);
|
||||
24
frontend/node_modules/workbox-core/models/messages/messageGenerator.js
generated
vendored
Normal file
24
frontend/node_modules/workbox-core/models/messages/messageGenerator.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import { messages } from './messages.js';
|
||||
import '../../_version.js';
|
||||
const fallback = (code, ...args) => {
|
||||
let msg = code;
|
||||
if (args.length > 0) {
|
||||
msg += ` :: ${JSON.stringify(args)}`;
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
const generatorFunction = (code, details = {}) => {
|
||||
const message = messages[code];
|
||||
if (!message) {
|
||||
throw new Error(`Unable to find message for code '${code}'.`);
|
||||
}
|
||||
return message(details);
|
||||
};
|
||||
export const messageGenerator = process.env.NODE_ENV === 'production' ? fallback : generatorFunction;
|
||||
1
frontend/node_modules/workbox-core/models/messages/messageGenerator.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/models/messages/messageGenerator.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './messageGenerator.js';
|
||||
9
frontend/node_modules/workbox-core/models/messages/messages.d.ts
generated
vendored
Normal file
9
frontend/node_modules/workbox-core/models/messages/messages.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import '../../_version.js';
|
||||
interface LoggableObject {
|
||||
[key: string]: string | number;
|
||||
}
|
||||
interface MessageMap {
|
||||
[messageID: string]: (param: LoggableObject) => string;
|
||||
}
|
||||
export declare const messages: MessageMap;
|
||||
export {};
|
||||
228
frontend/node_modules/workbox-core/models/messages/messages.js
generated
vendored
Normal file
228
frontend/node_modules/workbox-core/models/messages/messages.js
generated
vendored
Normal file
@ -0,0 +1,228 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import '../../_version.js';
|
||||
export 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.`);
|
||||
}
|
||||
const classNameStr = className ? `${className}.` : '';
|
||||
return (`The parameter '${paramName}' passed into ` +
|
||||
`'${moduleName}.${classNameStr}` +
|
||||
`${funcName}()' must be of type ${expectedType}.`);
|
||||
},
|
||||
'incorrect-class': ({ expectedClassName, paramName, moduleName, className, funcName, isReturnValueProblem, }) => {
|
||||
if (!expectedClassName || !moduleName || !funcName) {
|
||||
throw new Error(`Unexpected input to 'incorrect-class' error.`);
|
||||
}
|
||||
const classNameStr = className ? `${className}.` : '';
|
||||
if (isReturnValueProblem) {
|
||||
return (`The return value from ` +
|
||||
`'${moduleName}.${classNameStr}${funcName}()' ` +
|
||||
`must be an instance of class ${expectedClassName}.`);
|
||||
}
|
||||
return (`The parameter '${paramName}' passed into ` +
|
||||
`'${moduleName}.${classNameStr}${funcName}()' ` +
|
||||
`must be an instance of class ${expectedClassName}.`);
|
||||
},
|
||||
'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} 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': ({ thrownErrorMessage }) => {
|
||||
if (!thrownErrorMessage) {
|
||||
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: '${thrownErrorMessage}'.`);
|
||||
},
|
||||
'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` +
|
||||
(status ? ` 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}.`;
|
||||
},
|
||||
'cross-origin-copy-response': ({ origin }) => {
|
||||
return (`workbox-core.copyResponse() can only be used with same-origin ` +
|
||||
`responses. It was passed a response with origin ${origin}.`);
|
||||
},
|
||||
'opaque-streams-source': ({ type }) => {
|
||||
const message = `One of the workbox-streams sources resulted in an ` +
|
||||
`'${type}' response.`;
|
||||
if (type === 'opaqueredirect') {
|
||||
return (`${message} Please do not use a navigation request that results ` +
|
||||
`in a redirect as a source.`);
|
||||
}
|
||||
return `${message} Please ensure your sources are CORS-enabled.`;
|
||||
},
|
||||
};
|
||||
1
frontend/node_modules/workbox-core/models/messages/messages.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/models/messages/messages.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './messages.js';
|
||||
10
frontend/node_modules/workbox-core/models/pluginEvents.d.ts
generated
vendored
Normal file
10
frontend/node_modules/workbox-core/models/pluginEvents.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import '../_version.js';
|
||||
export declare const enum pluginEvents {
|
||||
CACHE_DID_UPDATE = "cacheDidUpdate",
|
||||
CACHE_KEY_WILL_BE_USED = "cacheKeyWillBeUsed",
|
||||
CACHE_WILL_UPDATE = "cacheWillUpdate",
|
||||
CACHED_RESPONSE_WILL_BE_USED = "cachedResponseWillBeUsed",
|
||||
FETCH_DID_FAIL = "fetchDidFail",
|
||||
FETCH_DID_SUCCEED = "fetchDidSucceed",
|
||||
REQUEST_WILL_FETCH = "requestWillFetch"
|
||||
}
|
||||
18
frontend/node_modules/workbox-core/models/pluginEvents.js
generated
vendored
Normal file
18
frontend/node_modules/workbox-core/models/pluginEvents.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import '../_version.js';
|
||||
export var pluginEvents;
|
||||
(function (pluginEvents) {
|
||||
pluginEvents["CACHE_DID_UPDATE"] = "cacheDidUpdate";
|
||||
pluginEvents["CACHE_KEY_WILL_BE_USED"] = "cacheKeyWillBeUsed";
|
||||
pluginEvents["CACHE_WILL_UPDATE"] = "cacheWillUpdate";
|
||||
pluginEvents["CACHED_RESPONSE_WILL_BE_USED"] = "cachedResponseWillBeUsed";
|
||||
pluginEvents["FETCH_DID_FAIL"] = "fetchDidFail";
|
||||
pluginEvents["FETCH_DID_SUCCEED"] = "fetchDidSucceed";
|
||||
pluginEvents["REQUEST_WILL_FETCH"] = "requestWillFetch";
|
||||
})(pluginEvents || (pluginEvents = {}));
|
||||
1
frontend/node_modules/workbox-core/models/pluginEvents.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/models/pluginEvents.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './pluginEvents.js';
|
||||
3
frontend/node_modules/workbox-core/models/quotaErrorCallbacks.d.ts
generated
vendored
Normal file
3
frontend/node_modules/workbox-core/models/quotaErrorCallbacks.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import '../_version.js';
|
||||
declare const quotaErrorCallbacks: Set<Function>;
|
||||
export { quotaErrorCallbacks };
|
||||
13
frontend/node_modules/workbox-core/models/quotaErrorCallbacks.js
generated
vendored
Normal file
13
frontend/node_modules/workbox-core/models/quotaErrorCallbacks.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import '../_version.js';
|
||||
// Callbacks to be executed whenever there's a quota error.
|
||||
// Can't change Function type right now.
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
const quotaErrorCallbacks = new Set();
|
||||
export { quotaErrorCallbacks };
|
||||
1
frontend/node_modules/workbox-core/models/quotaErrorCallbacks.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/models/quotaErrorCallbacks.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './quotaErrorCallbacks.js';
|
||||
27
frontend/node_modules/workbox-core/package.json
generated
vendored
Normal file
27
frontend/node_modules/workbox-core/package.json
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "workbox-core",
|
||||
"version": "7.4.0",
|
||||
"license": "MIT",
|
||||
"author": "Google's Web DevRel Team and Google's Aurora Team",
|
||||
"description": "This module is used by a number of the other Workbox modules to share common code.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/googlechrome/workbox.git"
|
||||
},
|
||||
"bugs": "https://github.com/googlechrome/workbox/issues",
|
||||
"homepage": "https://github.com/GoogleChrome/workbox",
|
||||
"keywords": [
|
||||
"workbox",
|
||||
"workboxjs",
|
||||
"service worker",
|
||||
"sw"
|
||||
],
|
||||
"workbox": {
|
||||
"browserNamespace": "workbox.core",
|
||||
"packageType": "sw"
|
||||
},
|
||||
"main": "index.js",
|
||||
"module": "index.mjs",
|
||||
"types": "index.d.ts",
|
||||
"gitHead": "fa702feeddd417fcdfa495cd9428fb4a28632e92"
|
||||
}
|
||||
10
frontend/node_modules/workbox-core/registerQuotaErrorCallback.d.ts
generated
vendored
Normal file
10
frontend/node_modules/workbox-core/registerQuotaErrorCallback.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import './_version.js';
|
||||
/**
|
||||
* Adds a function to the set of quotaErrorCallbacks that will be executed if
|
||||
* there's a quota error.
|
||||
*
|
||||
* @param {Function} callback
|
||||
* @memberof workbox-core
|
||||
*/
|
||||
declare function registerQuotaErrorCallback(callback: Function): void;
|
||||
export { registerQuotaErrorCallback };
|
||||
34
frontend/node_modules/workbox-core/registerQuotaErrorCallback.js
generated
vendored
Normal file
34
frontend/node_modules/workbox-core/registerQuotaErrorCallback.js
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import { logger } from './_private/logger.js';
|
||||
import { assert } from './_private/assert.js';
|
||||
import { quotaErrorCallbacks } from './models/quotaErrorCallbacks.js';
|
||||
import './_version.js';
|
||||
/**
|
||||
* Adds a function to the set of quotaErrorCallbacks that will be executed if
|
||||
* there's a quota error.
|
||||
*
|
||||
* @param {Function} callback
|
||||
* @memberof workbox-core
|
||||
*/
|
||||
// Can't change Function type
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
function registerQuotaErrorCallback(callback) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
assert.isType(callback, 'function', {
|
||||
moduleName: 'workbox-core',
|
||||
funcName: 'register',
|
||||
paramName: 'callback',
|
||||
});
|
||||
}
|
||||
quotaErrorCallbacks.add(callback);
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log('Registered a callback to respond to quota errors.', callback);
|
||||
}
|
||||
}
|
||||
export { registerQuotaErrorCallback };
|
||||
1
frontend/node_modules/workbox-core/registerQuotaErrorCallback.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/registerQuotaErrorCallback.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './registerQuotaErrorCallback.js';
|
||||
21
frontend/node_modules/workbox-core/setCacheNameDetails.d.ts
generated
vendored
Normal file
21
frontend/node_modules/workbox-core/setCacheNameDetails.d.ts
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
import { PartialCacheNameDetails } from './_private/cacheNames.js';
|
||||
import './_version.js';
|
||||
/**
|
||||
* Modifies the default cache names used by the Workbox packages.
|
||||
* Cache names are generated as `<prefix>-<Cache Name>-<suffix>`.
|
||||
*
|
||||
* @param {Object} details
|
||||
* @param {Object} [details.prefix] The string to add to the beginning of
|
||||
* the precache and runtime cache names.
|
||||
* @param {Object} [details.suffix] The string to add to the end of
|
||||
* the precache and runtime cache names.
|
||||
* @param {Object} [details.precache] The cache name to use for precache
|
||||
* caching.
|
||||
* @param {Object} [details.runtime] The cache name to use for runtime caching.
|
||||
* @param {Object} [details.googleAnalytics] The cache name to use for
|
||||
* `workbox-google-analytics` caching.
|
||||
*
|
||||
* @memberof workbox-core
|
||||
*/
|
||||
declare function setCacheNameDetails(details: PartialCacheNameDetails): void;
|
||||
export { setCacheNameDetails };
|
||||
60
frontend/node_modules/workbox-core/setCacheNameDetails.js
generated
vendored
Normal file
60
frontend/node_modules/workbox-core/setCacheNameDetails.js
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import { assert } from './_private/assert.js';
|
||||
import { cacheNames } from './_private/cacheNames.js';
|
||||
import { WorkboxError } from './_private/WorkboxError.js';
|
||||
import './_version.js';
|
||||
/**
|
||||
* Modifies the default cache names used by the Workbox packages.
|
||||
* Cache names are generated as `<prefix>-<Cache Name>-<suffix>`.
|
||||
*
|
||||
* @param {Object} details
|
||||
* @param {Object} [details.prefix] The string to add to the beginning of
|
||||
* the precache and runtime cache names.
|
||||
* @param {Object} [details.suffix] The string to add to the end of
|
||||
* the precache and runtime cache names.
|
||||
* @param {Object} [details.precache] The cache name to use for precache
|
||||
* caching.
|
||||
* @param {Object} [details.runtime] The cache name to use for runtime caching.
|
||||
* @param {Object} [details.googleAnalytics] The cache name to use for
|
||||
* `workbox-google-analytics` caching.
|
||||
*
|
||||
* @memberof workbox-core
|
||||
*/
|
||||
function setCacheNameDetails(details) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
Object.keys(details).forEach((key) => {
|
||||
assert.isType(details[key], 'string', {
|
||||
moduleName: 'workbox-core',
|
||||
funcName: 'setCacheNameDetails',
|
||||
paramName: `details.${key}`,
|
||||
});
|
||||
});
|
||||
if ('precache' in details && details['precache'].length === 0) {
|
||||
throw new WorkboxError('invalid-cache-name', {
|
||||
cacheNameId: 'precache',
|
||||
value: details['precache'],
|
||||
});
|
||||
}
|
||||
if ('runtime' in details && details['runtime'].length === 0) {
|
||||
throw new WorkboxError('invalid-cache-name', {
|
||||
cacheNameId: 'runtime',
|
||||
value: details['runtime'],
|
||||
});
|
||||
}
|
||||
if ('googleAnalytics' in details &&
|
||||
details['googleAnalytics'].length === 0) {
|
||||
throw new WorkboxError('invalid-cache-name', {
|
||||
cacheNameId: 'googleAnalytics',
|
||||
value: details['googleAnalytics'],
|
||||
});
|
||||
}
|
||||
}
|
||||
cacheNames.updateDetails(details);
|
||||
}
|
||||
export { setCacheNameDetails };
|
||||
1
frontend/node_modules/workbox-core/setCacheNameDetails.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/setCacheNameDetails.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './setCacheNameDetails.js';
|
||||
10
frontend/node_modules/workbox-core/skipWaiting.d.ts
generated
vendored
Normal file
10
frontend/node_modules/workbox-core/skipWaiting.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import './_version.js';
|
||||
/**
|
||||
* This method is deprecated, and will be removed in Workbox v7.
|
||||
*
|
||||
* Calling self.skipWaiting() is equivalent, and should be used instead.
|
||||
*
|
||||
* @memberof workbox-core
|
||||
*/
|
||||
declare function skipWaiting(): void;
|
||||
export { skipWaiting };
|
||||
27
frontend/node_modules/workbox-core/skipWaiting.js
generated
vendored
Normal file
27
frontend/node_modules/workbox-core/skipWaiting.js
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
import { logger } from './_private/logger.js';
|
||||
import './_version.js';
|
||||
/**
|
||||
* This method is deprecated, and will be removed in Workbox v7.
|
||||
*
|
||||
* Calling self.skipWaiting() is equivalent, and should be used instead.
|
||||
*
|
||||
* @memberof workbox-core
|
||||
*/
|
||||
function skipWaiting() {
|
||||
// Just call self.skipWaiting() directly.
|
||||
// See https://github.com/GoogleChrome/workbox/issues/2525
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.warn(`skipWaiting() from workbox-core is no longer recommended ` +
|
||||
`and will be removed in Workbox v7. Using self.skipWaiting() instead ` +
|
||||
`is equivalent.`);
|
||||
}
|
||||
void self.skipWaiting();
|
||||
}
|
||||
export { skipWaiting };
|
||||
1
frontend/node_modules/workbox-core/skipWaiting.mjs
generated
vendored
Normal file
1
frontend/node_modules/workbox-core/skipWaiting.mjs
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from './skipWaiting.js';
|
||||
42
frontend/node_modules/workbox-core/src/_private.ts
generated
vendored
Normal file
42
frontend/node_modules/workbox-core/src/_private.ts
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
// We either expose defaults or we expose every named export.
|
||||
import {assert} from './_private/assert.js';
|
||||
import {cacheNames} from './_private/cacheNames.js';
|
||||
import {cacheMatchIgnoreParams} from './_private/cacheMatchIgnoreParams.js';
|
||||
import {canConstructReadableStream} from './_private/canConstructReadableStream.js';
|
||||
import {canConstructResponseFromBodyStream} from './_private/canConstructResponseFromBodyStream.js';
|
||||
import {dontWaitFor} from './_private/dontWaitFor.js';
|
||||
import {Deferred} from './_private/Deferred.js';
|
||||
import {executeQuotaErrorCallbacks} from './_private/executeQuotaErrorCallbacks.js';
|
||||
import {getFriendlyURL} from './_private/getFriendlyURL.js';
|
||||
import {logger} from './_private/logger.js';
|
||||
import {resultingClientExists} from './_private/resultingClientExists.js';
|
||||
import {timeout} from './_private/timeout.js';
|
||||
import {waitUntil} from './_private/waitUntil.js';
|
||||
import {WorkboxError} from './_private/WorkboxError.js';
|
||||
|
||||
import './_version.js';
|
||||
|
||||
export {
|
||||
assert,
|
||||
cacheMatchIgnoreParams,
|
||||
cacheNames,
|
||||
canConstructReadableStream,
|
||||
canConstructResponseFromBodyStream,
|
||||
dontWaitFor,
|
||||
Deferred,
|
||||
executeQuotaErrorCallbacks,
|
||||
getFriendlyURL,
|
||||
logger,
|
||||
resultingClientExists,
|
||||
timeout,
|
||||
waitUntil,
|
||||
WorkboxError,
|
||||
};
|
||||
35
frontend/node_modules/workbox-core/src/_private/Deferred.ts
generated
vendored
Normal file
35
frontend/node_modules/workbox-core/src/_private/Deferred.ts
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
import '../_version.js';
|
||||
|
||||
/**
|
||||
* The Deferred class composes Promises in a way that allows for them to be
|
||||
* resolved or rejected from outside the constructor. In most cases promises
|
||||
* should be used directly, but Deferreds can be necessary when the logic to
|
||||
* resolve a promise must be separate.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
class Deferred<T> {
|
||||
promise: Promise<T>;
|
||||
resolve!: (value: T) => void;
|
||||
reject!: (reason?: any) => void;
|
||||
|
||||
/**
|
||||
* Creates a promise and exposes its resolve and reject functions as methods.
|
||||
*/
|
||||
constructor() {
|
||||
this.promise = new Promise((resolve, reject) => {
|
||||
this.resolve = resolve;
|
||||
this.reject = reject;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export {Deferred};
|
||||
43
frontend/node_modules/workbox-core/src/_private/WorkboxError.ts
generated
vendored
Normal file
43
frontend/node_modules/workbox-core/src/_private/WorkboxError.ts
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
import {messageGenerator} from '../models/messages/messageGenerator.js';
|
||||
import {MapLikeObject} from '../types.js';
|
||||
import '../_version.js';
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
details?: MapLikeObject;
|
||||
|
||||
/**
|
||||
*
|
||||
* @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: string, details?: MapLikeObject) {
|
||||
const message = messageGenerator(errorCode, details);
|
||||
|
||||
super(message);
|
||||
|
||||
this.name = errorCode;
|
||||
this.details = details;
|
||||
}
|
||||
}
|
||||
|
||||
export {WorkboxError};
|
||||
100
frontend/node_modules/workbox-core/src/_private/assert.ts
generated
vendored
Normal file
100
frontend/node_modules/workbox-core/src/_private/assert.ts
generated
vendored
Normal file
@ -0,0 +1,100 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
import {WorkboxError} from '../_private/WorkboxError.js';
|
||||
import {MapLikeObject} from '../types.js';
|
||||
import '../_version.js';
|
||||
|
||||
/*
|
||||
* 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: any[], details: MapLikeObject) => {
|
||||
if (!Array.isArray(value)) {
|
||||
throw new WorkboxError('not-an-array', details);
|
||||
}
|
||||
};
|
||||
|
||||
const hasMethod = (
|
||||
object: MapLikeObject,
|
||||
expectedMethod: string,
|
||||
details: MapLikeObject,
|
||||
) => {
|
||||
const type = typeof object[expectedMethod];
|
||||
if (type !== 'function') {
|
||||
details['expectedMethod'] = expectedMethod;
|
||||
throw new WorkboxError('missing-a-method', details);
|
||||
}
|
||||
};
|
||||
|
||||
const isType = (
|
||||
object: unknown,
|
||||
expectedType: string,
|
||||
details: MapLikeObject,
|
||||
) => {
|
||||
if (typeof object !== expectedType) {
|
||||
details['expectedType'] = expectedType;
|
||||
throw new WorkboxError('incorrect-type', details);
|
||||
}
|
||||
};
|
||||
|
||||
const isInstance = (
|
||||
object: unknown,
|
||||
// Need the general type to do the check later.
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
expectedClass: Function,
|
||||
details: MapLikeObject,
|
||||
) => {
|
||||
if (!(object instanceof expectedClass)) {
|
||||
details['expectedClassName'] = expectedClass.name;
|
||||
throw new WorkboxError('incorrect-class', details);
|
||||
}
|
||||
};
|
||||
|
||||
const isOneOf = (value: any, validValues: any[], details: MapLikeObject) => {
|
||||
if (!validValues.includes(value)) {
|
||||
details['validValueDescription'] = `Valid values are ${JSON.stringify(
|
||||
validValues,
|
||||
)}.`;
|
||||
throw new WorkboxError('invalid-value', details);
|
||||
}
|
||||
};
|
||||
|
||||
const isArrayOfClass = (
|
||||
value: any,
|
||||
// Need general type to do check later.
|
||||
expectedClass: Function, // eslint-disable-line
|
||||
details: MapLikeObject,
|
||||
) => {
|
||||
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 =
|
||||
process.env.NODE_ENV === 'production'
|
||||
? null
|
||||
: {
|
||||
hasMethod,
|
||||
isArray,
|
||||
isInstance,
|
||||
isOneOf,
|
||||
isType,
|
||||
isArrayOfClass,
|
||||
};
|
||||
|
||||
export {finalAssertExports as assert};
|
||||
56
frontend/node_modules/workbox-core/src/_private/cacheMatchIgnoreParams.ts
generated
vendored
Normal file
56
frontend/node_modules/workbox-core/src/_private/cacheMatchIgnoreParams.ts
generated
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
Copyright 2020 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.
|
||||
*/
|
||||
|
||||
import '../_version.js';
|
||||
|
||||
function stripParams(fullURL: string, ignoreParams: string[]) {
|
||||
const strippedURL = new URL(fullURL);
|
||||
for (const param of ignoreParams) {
|
||||
strippedURL.searchParams.delete(param);
|
||||
}
|
||||
return strippedURL.href;
|
||||
}
|
||||
|
||||
/**
|
||||
* Matches an item in the cache, ignoring specific URL params. This is similar
|
||||
* to the `ignoreSearch` option, but it allows you to ignore just specific
|
||||
* params (while continuing to match on the others).
|
||||
*
|
||||
* @private
|
||||
* @param {Cache} cache
|
||||
* @param {Request} request
|
||||
* @param {Object} matchOptions
|
||||
* @param {Array<string>} ignoreParams
|
||||
* @return {Promise<Response|undefined>}
|
||||
*/
|
||||
async function cacheMatchIgnoreParams(
|
||||
cache: Cache,
|
||||
request: Request,
|
||||
ignoreParams: string[],
|
||||
matchOptions?: CacheQueryOptions,
|
||||
): Promise<Response | undefined> {
|
||||
const strippedRequestURL = stripParams(request.url, ignoreParams);
|
||||
|
||||
// If the request doesn't include any ignored params, match as normal.
|
||||
if (request.url === strippedRequestURL) {
|
||||
return cache.match(request, matchOptions);
|
||||
}
|
||||
|
||||
// Otherwise, match by comparing keys
|
||||
const keysOptions = {...matchOptions, ignoreSearch: true};
|
||||
const cacheKeys = await cache.keys(request, keysOptions);
|
||||
|
||||
for (const cacheKey of cacheKeys) {
|
||||
const strippedCacheKeyURL = stripParams(cacheKey.url, ignoreParams);
|
||||
if (strippedRequestURL === strippedCacheKeyURL) {
|
||||
return cache.match(cacheKey, matchOptions);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
export {cacheMatchIgnoreParams};
|
||||
75
frontend/node_modules/workbox-core/src/_private/cacheNames.ts
generated
vendored
Normal file
75
frontend/node_modules/workbox-core/src/_private/cacheNames.ts
generated
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
import '../_version.js';
|
||||
|
||||
declare let registration: ServiceWorkerRegistration | undefined;
|
||||
|
||||
export interface CacheNameDetails {
|
||||
googleAnalytics: string;
|
||||
precache: string;
|
||||
prefix: string;
|
||||
runtime: string;
|
||||
suffix: string;
|
||||
}
|
||||
|
||||
export interface PartialCacheNameDetails {
|
||||
[propName: string]: string;
|
||||
}
|
||||
|
||||
export type CacheNameDetailsProp =
|
||||
| 'googleAnalytics'
|
||||
| 'precache'
|
||||
| 'prefix'
|
||||
| 'runtime'
|
||||
| 'suffix';
|
||||
|
||||
const _cacheNameDetails: CacheNameDetails = {
|
||||
googleAnalytics: 'googleAnalytics',
|
||||
precache: 'precache-v2',
|
||||
prefix: 'workbox',
|
||||
runtime: 'runtime',
|
||||
suffix: typeof registration !== 'undefined' ? registration.scope : '',
|
||||
};
|
||||
|
||||
const _createCacheName = (cacheName: string): string => {
|
||||
return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix]
|
||||
.filter((value) => value && value.length > 0)
|
||||
.join('-');
|
||||
};
|
||||
|
||||
const eachCacheNameDetail = (fn: (key: CacheNameDetailsProp) => void): void => {
|
||||
for (const key of Object.keys(_cacheNameDetails)) {
|
||||
fn(key as CacheNameDetailsProp);
|
||||
}
|
||||
};
|
||||
|
||||
export const cacheNames = {
|
||||
updateDetails: (details: PartialCacheNameDetails): void => {
|
||||
eachCacheNameDetail((key: CacheNameDetailsProp): void => {
|
||||
if (typeof details[key] === 'string') {
|
||||
_cacheNameDetails[key] = details[key];
|
||||
}
|
||||
});
|
||||
},
|
||||
getGoogleAnalyticsName: (userCacheName?: string): string => {
|
||||
return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);
|
||||
},
|
||||
getPrecacheName: (userCacheName?: string): string => {
|
||||
return userCacheName || _createCacheName(_cacheNameDetails.precache);
|
||||
},
|
||||
getPrefix: (): string => {
|
||||
return _cacheNameDetails.prefix;
|
||||
},
|
||||
getRuntimeName: (userCacheName?: string): string => {
|
||||
return userCacheName || _createCacheName(_cacheNameDetails.runtime);
|
||||
},
|
||||
getSuffix: (): string => {
|
||||
return _cacheNameDetails.suffix;
|
||||
},
|
||||
};
|
||||
37
frontend/node_modules/workbox-core/src/_private/canConstructReadableStream.ts
generated
vendored
Normal file
37
frontend/node_modules/workbox-core/src/_private/canConstructReadableStream.ts
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
import '../_version.js';
|
||||
|
||||
let supportStatus: boolean | undefined;
|
||||
|
||||
/**
|
||||
* A utility function that determines whether the current browser supports
|
||||
* constructing a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)
|
||||
* object.
|
||||
*
|
||||
* @return {boolean} `true`, if the current browser can successfully
|
||||
* construct a `ReadableStream`, `false` otherwise.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function canConstructReadableStream(): boolean {
|
||||
if (supportStatus === undefined) {
|
||||
// See https://github.com/GoogleChrome/workbox/issues/1473
|
||||
try {
|
||||
new ReadableStream({start() {}});
|
||||
supportStatus = true;
|
||||
} catch (error) {
|
||||
supportStatus = false;
|
||||
}
|
||||
}
|
||||
|
||||
return supportStatus;
|
||||
}
|
||||
|
||||
export {canConstructReadableStream};
|
||||
40
frontend/node_modules/workbox-core/src/_private/canConstructResponseFromBodyStream.ts
generated
vendored
Normal file
40
frontend/node_modules/workbox-core/src/_private/canConstructResponseFromBodyStream.ts
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
import '../_version.js';
|
||||
|
||||
let supportStatus: boolean | undefined;
|
||||
|
||||
/**
|
||||
* A utility function that determines whether the current browser supports
|
||||
* constructing a new `Response` from a `response.body` stream.
|
||||
*
|
||||
* @return {boolean} `true`, if the current browser can successfully
|
||||
* construct a `Response` from a `response.body` stream, `false` otherwise.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function canConstructResponseFromBodyStream(): boolean {
|
||||
if (supportStatus === undefined) {
|
||||
const testResponse = new Response('');
|
||||
|
||||
if ('body' in testResponse) {
|
||||
try {
|
||||
new Response(testResponse.body);
|
||||
supportStatus = true;
|
||||
} catch (error) {
|
||||
supportStatus = false;
|
||||
}
|
||||
}
|
||||
supportStatus = false;
|
||||
}
|
||||
|
||||
return supportStatus;
|
||||
}
|
||||
|
||||
export {canConstructResponseFromBodyStream};
|
||||
18
frontend/node_modules/workbox-core/src/_private/dontWaitFor.ts
generated
vendored
Normal file
18
frontend/node_modules/workbox-core/src/_private/dontWaitFor.ts
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
import '../_version.js';
|
||||
|
||||
/**
|
||||
* A helper function that prevents a promise from being flagged as unused.
|
||||
*
|
||||
* @private
|
||||
**/
|
||||
export function dontWaitFor(promise: Promise<any>): void {
|
||||
// Effective no-op.
|
||||
void promise.then(() => {});
|
||||
}
|
||||
40
frontend/node_modules/workbox-core/src/_private/executeQuotaErrorCallbacks.ts
generated
vendored
Normal file
40
frontend/node_modules/workbox-core/src/_private/executeQuotaErrorCallbacks.ts
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
import {logger} from '../_private/logger.js';
|
||||
import {quotaErrorCallbacks} from '../models/quotaErrorCallbacks.js';
|
||||
import '../_version.js';
|
||||
|
||||
/**
|
||||
* Runs all of the callback functions, one at a time sequentially, in the order
|
||||
* in which they were registered.
|
||||
*
|
||||
* @memberof workbox-core
|
||||
* @private
|
||||
*/
|
||||
async function executeQuotaErrorCallbacks(): Promise<void> {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log(
|
||||
`About to run ${quotaErrorCallbacks.size} ` +
|
||||
`callbacks to clean up caches.`,
|
||||
);
|
||||
}
|
||||
|
||||
for (const callback of quotaErrorCallbacks) {
|
||||
await callback();
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log(callback, 'is complete.');
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.log('Finished running callbacks.');
|
||||
}
|
||||
}
|
||||
|
||||
export {executeQuotaErrorCallbacks};
|
||||
18
frontend/node_modules/workbox-core/src/_private/getFriendlyURL.ts
generated
vendored
Normal file
18
frontend/node_modules/workbox-core/src/_private/getFriendlyURL.ts
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
import '../_version.js';
|
||||
|
||||
const getFriendlyURL = (url: URL | string): string => {
|
||||
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}`), '');
|
||||
};
|
||||
|
||||
export {getFriendlyURL};
|
||||
100
frontend/node_modules/workbox-core/src/_private/logger.ts
generated
vendored
Normal file
100
frontend/node_modules/workbox-core/src/_private/logger.ts
generated
vendored
Normal file
@ -0,0 +1,100 @@
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
import '../_version.js';
|
||||
|
||||
// logger is used inside of both service workers and the window global scope.
|
||||
declare global {
|
||||
interface WorkerGlobalScope {
|
||||
__WB_DISABLE_DEV_LOGS: boolean;
|
||||
}
|
||||
|
||||
interface Window {
|
||||
__WB_DISABLE_DEV_LOGS: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
type LoggerMethods =
|
||||
| 'debug'
|
||||
| 'log'
|
||||
| 'warn'
|
||||
| 'error'
|
||||
| 'groupCollapsed'
|
||||
| 'groupEnd';
|
||||
|
||||
const logger = (
|
||||
process.env.NODE_ENV === 'production'
|
||||
? null
|
||||
: (() => {
|
||||
// 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 globalThis)) {
|
||||
self.__WB_DISABLE_DEV_LOGS = false;
|
||||
}
|
||||
|
||||
let inGroup = false;
|
||||
|
||||
const methodToColorMap: {[methodName: string]: string | null} = {
|
||||
debug: `#7f8c8d`, // Gray
|
||||
log: `#2ecc71`, // Green
|
||||
warn: `#f39c12`, // Yellow
|
||||
error: `#c0392b`, // Red
|
||||
groupCollapsed: `#3498db`, // Blue
|
||||
groupEnd: null, // No colored prefix on groupEnd
|
||||
};
|
||||
|
||||
const print = function (method: LoggerMethods, args: any[]) {
|
||||
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;
|
||||
}
|
||||
};
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
const api: {[methodName: string]: Function} = {};
|
||||
const loggerMethods = Object.keys(methodToColorMap);
|
||||
|
||||
for (const key of loggerMethods) {
|
||||
const method = key as LoggerMethods;
|
||||
|
||||
api[method] = (...args: any[]) => {
|
||||
print(method, args);
|
||||
};
|
||||
}
|
||||
|
||||
return api as unknown;
|
||||
})()
|
||||
) as Console;
|
||||
|
||||
export {logger};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user