setto.basspistol.com/assets/js/workbox-v3.6.3/workbox-background-sync.dev.js.map

1 line
20 KiB
Plaintext
Raw Normal View History

2020-08-05 19:06:38 +02:00
{"version":3,"names":[],"mappings":"","sources":["packages/workbox-background-sync/browser.mjs"],"sourcesContent":["this.workbox = this.workbox || {};\nthis.workbox.backgroundSync = (function (DBWrapper_mjs,WorkboxError_mjs,logger_mjs,assert_mjs,getFriendlyURL_mjs) {\n 'use strict';\n\n try {\n self.workbox.v['workbox:background-sync:3.6.3'] = 1;\n } catch (e) {} // eslint-disable-line\n\n /*\n Copyright 2017 Google Inc. All Rights Reserved.\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\n const serializableProperties = ['method', 'referrer', 'referrerPolicy', 'mode', 'credentials', 'cache', 'redirect', 'integrity', 'keepalive'];\n\n /**\n * A class to make it easier to serialize and de-serialize requests so they\n * can be stored in IndexedDB.\n *\n * @private\n */\n class StorableRequest {\n /**\n * Converts a Request object to a plain object that can be structured\n * cloned or JSON-stringified.\n *\n * @param {Request} request\n * @return {Promise<StorableRequest>}\n *\n * @private\n */\n static fromRequest(request) {\n return babelHelpers.asyncToGenerator(function* () {\n const requestInit = { headers: {} };\n\n // Set the body if present.\n if (request.method !== 'GET') {\n // Use blob to support non-text request bodies,\n // and clone first in case the caller still needs the request.\n requestInit.body = yield request.clone().blob();\n }\n\n // Convert the headers from an iterable to an object.\n for (const [key, value] of request.headers.entries()) {\n requestInit.headers[key] = value;\n }\n\n // Add all other serializable request properties\n for (const prop of serializableProperties) {\n if (request[prop] !== undefined) {\n requestInit[prop] = request[prop];\n }\n }\n\n return new StorableRequest({ url: request.url, requestInit });\n })();\n }\n\n /**\n * Accepts a URL and RequestInit dictionary that can be used to create a\n * new Request object. A timestamp is also generated so consumers can\n * reference when the object was created.\n *\n * @param {Object} param1\n * @param {string} param1.url\n * @param {Object} param1.requestInit\n * See: https://fetch.spec.whatwg.org/#requestinit\n * @param {number} param1.timestamp The time the request was created,\n * defaulting to the current time if not specified.\n *\n * @private\n */\n constructor({ url, requestInit, timestamp = Date.now() }) {\n this.url = url;\n this.requestInit = requestInit;\n\n // \"Private\"\n this._timestamp = timestamp;\n }\n\n /**\n * Gets the private _timestamp property.\n *\n * @return {number}\n *\n * @private\n */\n get timestamp() {\n return this._timestamp;\n }\n\n /**\n * Coverts this instance to a plain Object.\n *\n * @return {Object}\n *\n * @private\n */\n toObject() {\n return {\n url: this.url,\n timestamp: this.timestamp,\n requestInit: this.requestInit\n };\n }\n\n /**\n * Converts this instance to a Request.\n *\n * @return {Request}\n *\n * @private\n */\n toRequest() {\n return new Request(this.url, this.requestInit);\n }\n\n /**\n * Creates and returns a deep clone of the instance.\n *\n * @return {StorableRequest}\n *\n * @private\n */\n