diff --git a/cdn/pwabuilder-serviceworkers/1.1.1/serviceWorker2/src/pwabuilder-sw.fixed.js b/cdn/pwabuilder-serviceworkers/1.1.1/serviceWorker2/src/pwabuilder-sw.fixed.js index e6aab06fa..e93a35cfe 100644 --- a/cdn/pwabuilder-serviceworkers/1.1.1/serviceWorker2/src/pwabuilder-sw.fixed.js +++ b/cdn/pwabuilder-serviceworkers/1.1.1/serviceWorker2/src/pwabuilder-sw.fixed.js @@ -1,66 +1,101 @@ /*global caches, self, Promise, */ /*! - * @see {@link https://github.com/pwa-builder/pwabuilder-serviceworkers/blob/master/serviceWorker2/pwabuilder-sw.js} - * @see {@link https://github.com/pwa-builder/serviceworkers/pull/28} + * https://github.com/meanbee/magento-meanbee-pwa/issues/20#issuecomment-497626347 + * This is a reworked code of the "Offline copy of pages" service worker */ -//This is the "Offline copy of pages" service worker var cacheName = "pwabuilder-offline"; -//Install stage sets up the index page (home page) in the cache and opens a new cache +var indexPage = "index.html"; +var offlinePages = [indexPage]; + +function updateStaticCache() { + return caches.open(cacheName).then(function (cache) { + console.log("[sw.js] Added to offline during install: " + offlinePages); + return cache.addAll(offlinePages); + }); +} + +function clearOldCaches() { + return caches.keys().then(function (keys) { + return Promise.all(keys.filter(function (key) { + return key.indexOf(cacheName) !== 0; + }).map(function (key) { + return caches.delete (key); + })); + }); +} + +function isHtmlRequest(request) { + return request.headers.get("Accept").indexOf("text/html") !== -1; +} + +function isCachableResponse(response) { + return (response && response.ok); +} + self.addEventListener("install", function (event) { - var indexPage = new Request("index.html"); - event.waitUntil( - fetch(indexPage).then(function (response) { - return caches.open(cacheName).then(function (cache) { - console.log("[sw.js] Cached index page during install: " + response.url); - return cache.put(indexPage, response); - }); + event.waitUntil(updateStaticCache().then(function () { + return self.skipWaiting(); + })); +}); + +self.addEventListener("activate", function (event) { + event.waitUntil(clearOldCaches().then(function () { + return self.clients.claim(); })); }); -//If any fetch fails, it will look for the request in the cache and serve it from there first self.addEventListener("fetch", function (event) { - var updateCache = function (request) { - return caches.open(cacheName).then(function (cache) { - /*! - * @see {@link https://github.com/pwa-builder/serviceworkers/issues/16#issuecomment-388215410} - * @see {@link https://github.com/icarito/serviceworkers/commit/f17f892ba9f2be057aeffa133f01f243604ddc0c} - */ - //return fetch(request).then(function(response) { - return fetch(request, { - credentials: "include", - redirect: "follow" - }).then(function (response) { - console.log("[sw.js] Add page to offline: " + response.url); - return cache.put(request, response); - }); - }); - }; - event.waitUntil(updateCache(event.request)); - - /*! - * https://github.com/meanbee/magento-meanbee-pwa/issues/20#issuecomment-497626347 - */ + var request = event.request; - if (event.request.cache === "only-if-cached" && event.request.mode !== "same-origin") { + if (request.method !== "GET") { + if (!navigator.onLine && isHtmlRequest(request)) { + return event.respondWith(caches.match(indexPage)); + } return; } - event.respondWith( - fetch(event.request).catch (function (error) { - console.log("[sw.js] Network request Failed. Serving content from cache: " + error); + if (isHtmlRequest(request)) { - //Check to see if you have it in the cache - //Return response - //If not in the cache, then return error page - return caches.open(cacheName).then(function (cache) { - return cache.match(event.request).then(function (matching) { - var report = !matching || matching.status == 404 ? Promise.reject("no-match") : matching; - return report; + event.respondWith(fetch(request).then(function (response) { + if (isCachableResponse(response)) { + var clonedResponse = response.clone(); + caches.open(cacheName).then(function (cache) { + console.log("[sw.js] Added to offline: " + clonedResponse.url); + return cache.put(request, clonedResponse); + }); + } + return response; + }).catch (function () { + return caches.match(request).then(function (response) { + if (!response && request.mode == "navigate") { + return caches.match(indexPage); + } + return response; }); - }); - }) - ); - }); + })); + } else { + + if (event.request.cache === "only-if-cached" && event.request.mode !== "same-origin") { + return; + } + + event.respondWith(caches.match(request).then(function (response) { + return response || fetch(request, { + credentials: "include", + redirect: "follow" + }).then(function (response) { + if (isCachableResponse(response)) { + var clonedResponse = response.clone(); + caches.open(cacheName).then(function (cache) { + console.log("[sw.js] Added to offline: " + clonedResponse.url); + return cache.put(request, clonedResponse); + }); + } + return response; + }); + })); + } +}); diff --git a/sw.js b/sw.js index f833cde93..1c311d92a 100644 --- a/sw.js +++ b/sw.js @@ -1,72 +1,101 @@ /*global caches, self, Promise, */ - /*! - * @see {@link https://github.com/pwa-builder/pwabuilder-serviceworkers/blob/master/serviceWorker2/pwabuilder-sw.js} - * @see {@link https://github.com/pwa-builder/serviceworkers/pull/28} + * https://github.com/meanbee/magento-meanbee-pwa/issues/20#issuecomment-497626347 + * This is a reworked code of the "Offline copy of pages" service worker */ -//This is the "Offline copy of pages" service worker -var cacheName = "englishextra.github.io-offline-v1548143182"; //Install stage sets up the index page (home page) in the cache and opens a new cache -self.addEventListener("install", function(event) { - var indexPage = new Request("index.html"); - event.waitUntil( - fetch(indexPage).then(function(response) { - return caches.open(cacheName).then(function(cache) { - console.log( - "[sw.js] Cached index page during install: " + response.url - ); - return cache.put(indexPage, response); - }); - }) - ); -}); //If any fetch fails, it will look for the request in the cache and serve it from there first +var cacheName = "englishextra.github.io-offline-v1548143182"; + +var indexPage = "index.html"; +var offlinePages = [indexPage]; + +function updateStaticCache() { + return caches.open(cacheName).then(function (cache) { + console.log("[sw.js] Added to offline during install: " + offlinePages); + return cache.addAll(offlinePages); + }); +} + +function clearOldCaches() { + return caches.keys().then(function (keys) { + return Promise.all(keys.filter(function (key) { + return key.indexOf(cacheName) !== 0; + }).map(function (key) { + return caches.delete (key); + })); + }); +} -self.addEventListener("fetch", function(event) { - var updateCache = function updateCache(request) { - return caches.open(cacheName).then(function(cache) { - /*! - * @see {@link https://github.com/pwa-builder/serviceworkers/issues/16#issuecomment-388215410} - * @see {@link https://github.com/icarito/serviceworkers/commit/f17f892ba9f2be057aeffa133f01f243604ddc0c} - */ - //return fetch(request).then(function(response) { - return fetch(request, { - credentials: "include", - redirect: "follow" - }).then(function(response) { - console.log("[sw.js] Add page to offline: " + response.url); - return cache.put(request, response); - }); - }); - }; +function isHtmlRequest(request) { + return request.headers.get("Accept").indexOf("text/html") !== -1; +} - event.waitUntil(updateCache(event.request)); - - /*! - * https://github.com/meanbee/magento-meanbee-pwa/issues/20#issuecomment-497626347 - */ +function isCachableResponse(response) { + return (response && response.ok); +} + +self.addEventListener("install", function (event) { + event.waitUntil(updateStaticCache().then(function () { + return self.skipWaiting(); + })); +}); + +self.addEventListener("activate", function (event) { + event.waitUntil(clearOldCaches().then(function () { + return self.clients.claim(); + })); +}); - if (event.request.cache === "only-if-cached" && event.request.mode !== "same-origin") { +self.addEventListener("fetch", function (event) { + + var request = event.request; + + if (request.method !== "GET") { + if (!navigator.onLine && isHtmlRequest(request)) { + return event.respondWith(caches.match(indexPage)); + } return; } - - event.respondWith( - fetch(event.request).catch(function(error) { - console.log( - "[sw.js] Network request Failed. Serving content from cache: " + - error - ); //Check to see if you have it in the cache - //Return response - //If not in the cache, then return error page - return caches.open(cacheName).then(function(cache) { - return cache.match(event.request).then(function(matching) { - var report = - !matching || matching.status == 404 - ? Promise.reject("no-match") - : matching; - return report; + if (isHtmlRequest(request)) { + + event.respondWith(fetch(request).then(function (response) { + if (isCachableResponse(response)) { + var clonedResponse = response.clone(); + caches.open(cacheName).then(function (cache) { + console.log("[sw.js] Added to offline: " + clonedResponse.url); + return cache.put(request, clonedResponse); + }); + } + return response; + }).catch (function () { + return caches.match(request).then(function (response) { + if (!response && request.mode == "navigate") { + return caches.match(indexPage); + } + return response; }); - }); - }) - ); + })); + } else { + + if (event.request.cache === "only-if-cached" && event.request.mode !== "same-origin") { + return; + } + + event.respondWith(caches.match(request).then(function (response) { + return response || fetch(request, { + credentials: "include", + redirect: "follow" + }).then(function (response) { + if (isCachableResponse(response)) { + var clonedResponse = response.clone(); + caches.open(cacheName).then(function (cache) { + console.log("[sw.js] Added to offline: " + clonedResponse.url); + return cache.put(request, clonedResponse); + }); + } + return response; + }); + })); + } }); diff --git a/sw.min.js b/sw.min.js index 0970434ef..2f5fc18e1 100644 --- a/sw.min.js +++ b/sw.min.js @@ -1 +1 @@ -var cacheName="englishextra.github.io-offline-v1548143182";self.addEventListener("install",function(e){var t=new Request("index.html");e.waitUntil(fetch(t).then(function(n){return caches.open(cacheName).then(function(e){return console.log("[sw.js] Cached index page during install: "+n.url),e.put(t,n)})}))}),self.addEventListener("fetch",function(n){var t;n.waitUntil((t=n.request,caches.open(cacheName).then(function(n){return fetch(t,{credentials:"include",redirect:"follow"}).then(function(e){return console.log("[sw.js] Add page to offline: "+e.url),n.put(t,e)})}))),"only-if-cached"===n.request.cache&&"same-origin"!==n.request.mode||n.respondWith(fetch(n.request).catch(function(e){return console.log("[sw.js] Network request Failed. Serving content from cache: "+e),caches.open(cacheName).then(function(e){return e.match(n.request).then(function(e){return e&&404!=e.status?e:Promise.reject("no-match")})})}))}); \ No newline at end of file +var cacheName="englishextra.github.io-offline-v1548143182",indexPage="index.html",offlinePages=[indexPage];function updateStaticCache(){return caches.open(cacheName).then(function(e){return console.log("[sw.js] Added to offline during install: "+offlinePages),e.addAll(offlinePages)})}function clearOldCaches(){return caches.keys().then(function(e){return Promise.all(e.filter(function(e){return 0!==e.indexOf(cacheName)}).map(function(e){return caches.delete(e)}))})}function isHtmlRequest(e){return-1!==e.headers.get("Accept").indexOf("text/html")}function isCachableResponse(e){return e&&e.ok}self.addEventListener("install",function(e){e.waitUntil(updateStaticCache().then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){e.waitUntil(clearOldCaches().then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(e){var t=e.request;if("GET"!==t.method)return!navigator.onLine&&isHtmlRequest(t)?e.respondWith(caches.match(indexPage)):void 0;if(isHtmlRequest(t))e.respondWith(fetch(t).then(function(e){var n;return isCachableResponse(e)&&(n=e.clone(),caches.open(cacheName).then(function(e){return console.log("[sw.js] Added to offline: "+n.url),e.put(t,n)})),e}).catch(function(){return caches.match(t).then(function(e){return e||"navigate"!=t.mode?e:caches.match(indexPage)})}));else{if("only-if-cached"===e.request.cache&&"same-origin"!==e.request.mode)return;e.respondWith(caches.match(t).then(function(e){return e||fetch(t,{credentials:"include",redirect:"follow"}).then(function(e){var n;return isCachableResponse(e)&&(n=e.clone(),caches.open(cacheName).then(function(e){return console.log("[sw.js] Added to offline: "+n.url),e.put(t,n)})),e})}))}}); \ No newline at end of file diff --git a/tools/quill/quill.core.js b/tools/quill/quill.core.js index a51d15c82..e2f7cd246 100644 --- a/tools/quill/quill.core.js +++ b/tools/quill/quill.core.js @@ -122,7 +122,6 @@ var Parchment = { }; exports.default = Parchment; - /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { @@ -277,7 +276,6 @@ function register() { } exports.register = register; - /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { @@ -287,10 +285,8 @@ var equal = __webpack_require__(11); var extend = __webpack_require__(3); var op = __webpack_require__(20); - var NULL_CHARACTER = String.fromCharCode(0); // Placeholder char for embed in diff() - var Delta = function (ops) { // Assume we are given a well formed ops if (Array.isArray(ops)) { @@ -302,7 +298,6 @@ var Delta = function (ops) { } }; - Delta.prototype.insert = function (text, attributes) { var newOp = {}; if (text.length === 0) return this; @@ -435,7 +430,6 @@ Delta.prototype.slice = function (start, end) { return new Delta(ops); }; - Delta.prototype.compose = function (other) { var thisIter = op.iterator(this.ops); var otherIter = op.iterator(other.ops); @@ -605,10 +599,8 @@ Delta.prototype.transformPosition = function (index, priority) { return index; }; - module.exports = Delta; - /***/ }), /* 3 */ /***/ (function(module, exports) { @@ -700,14 +692,12 @@ module.exports = function extend() { return target; }; - /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -803,7 +793,6 @@ var BlockEmbed = function (_Parchment$Embed) { BlockEmbed.scope = _parchment2.default.Scope.BLOCK_BLOT; // It is important for cursor behavior BlockEmbeds use tags that are block level elements - var Block = function (_Parchment$Block) { _inherits(Block, _Parchment$Block); @@ -965,7 +954,6 @@ exports.default = Block; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -1700,7 +1688,6 @@ exports.default = Quill; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -1790,7 +1777,6 @@ exports.default = Inline; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -1827,7 +1813,6 @@ exports.default = TextBlot; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -1943,7 +1928,6 @@ exports.default = Emitter; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -1969,7 +1953,6 @@ exports.default = Module; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -2100,7 +2083,6 @@ function objEquiv(a, b, opts) { return typeof a === typeof b; } - /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { @@ -2163,14 +2145,12 @@ var Attributor = /** @class */ (function () { }()); exports.default = Attributor; - /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -2372,7 +2352,6 @@ exports.default = CodeBlock; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -2740,7 +2719,6 @@ exports.default = Editor; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -3229,7 +3207,6 @@ exports.default = Selection; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -3558,7 +3535,6 @@ function makeBlot(node) { } exports.default = ContainerBlot; - /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { @@ -3640,7 +3616,6 @@ var FormatBlot = /** @class */ (function (_super) { }(container_1.default)); exports.default = FormatBlot; - /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { @@ -3690,7 +3665,6 @@ var LeafBlot = /** @class */ (function (_super) { }(shadow_1.default)); exports.default = LeafBlot; - /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { @@ -3698,7 +3672,6 @@ exports.default = LeafBlot; var equal = __webpack_require__(11); var extend = __webpack_require__(3); - var lib = { attributes: { compose: function (a, b, keepNull) { @@ -3760,7 +3733,6 @@ var lib = { } }; - function Iterator(ops) { this.ops = ops; this.index = 0; @@ -3832,10 +3804,8 @@ Iterator.prototype.peekType = function () { return 'retain'; }; - module.exports = lib; - /***/ }), /* 21 */ /***/ (function(module, exports) { @@ -4092,14 +4062,12 @@ if (typeof module === 'object' && module.exports) { module.exports = clone; } - /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -4352,7 +4320,6 @@ exports.default = Scroll; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -4958,7 +4925,6 @@ exports.SHORTKEY = SHORTKEY; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5132,7 +5098,6 @@ Cursor.className = 'ql-cursor'; Cursor.tagName = 'span'; Cursor.CONTENTS = '\uFEFF'; // Zero width no break space - exports.default = Cursor; /***/ }), @@ -5141,7 +5106,6 @@ exports.default = Cursor; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5184,7 +5148,6 @@ exports.default = Container; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5249,7 +5212,6 @@ exports.ColorStyle = ColorStyle; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5490,7 +5452,6 @@ var ShadowBlot = /** @class */ (function () { }()); exports.default = ShadowBlot; - /***/ }), /* 31 */ /***/ (function(module, exports, __webpack_require__) { @@ -5567,7 +5528,6 @@ var AttributorStore = /** @class */ (function () { }()); exports.default = AttributorStore; - /***/ }), /* 32 */ /***/ (function(module, exports, __webpack_require__) { @@ -5630,7 +5590,6 @@ var ClassAttributor = /** @class */ (function (_super) { }(attributor_1.default)); exports.default = ClassAttributor; - /***/ }), /* 33 */ /***/ (function(module, exports, __webpack_require__) { @@ -5693,14 +5652,12 @@ var StyleAttributor = /** @class */ (function (_super) { }(attributor_1.default)); exports.default = StyleAttributor; - /***/ }), /* 34 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5756,7 +5713,6 @@ exports.default = Theme; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5877,7 +5833,6 @@ exports.default = Embed; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5908,7 +5863,6 @@ exports.AlignStyle = AlignStyle; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5938,7 +5892,6 @@ exports.BackgroundStyle = BackgroundStyle; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5969,7 +5922,6 @@ exports.DirectionStyle = DirectionStyle; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -6028,7 +5980,6 @@ exports.FontClass = FontClass; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -6059,7 +6010,6 @@ exports.SizeStyle = SizeStyle; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -6362,7 +6312,6 @@ var LinkedList = /** @class */ (function () { }()); exports.default = LinkedList; - /***/ }), /* 45 */ /***/ (function(module, exports, __webpack_require__) { @@ -6546,7 +6495,6 @@ var ScrollBlot = /** @class */ (function (_super) { }(container_1.default)); exports.default = ScrollBlot; - /***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) { @@ -6631,7 +6579,6 @@ var InlineBlot = /** @class */ (function (_super) { }(format_1.default)); exports.default = InlineBlot; - /***/ }), /* 47 */ /***/ (function(module, exports, __webpack_require__) { @@ -6707,7 +6654,6 @@ var BlockBlot = /** @class */ (function (_super) { }(format_1.default)); exports.default = BlockBlot; - /***/ }), /* 48 */ /***/ (function(module, exports, __webpack_require__) { @@ -6755,7 +6701,6 @@ var EmbedBlot = /** @class */ (function (_super) { }(leaf_1.default)); exports.default = EmbedBlot; - /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { @@ -6858,14 +6803,12 @@ var TextBlot = /** @class */ (function (_super) { }(leaf_1.default)); exports.default = TextBlot; - /***/ }), /* 50 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - var elem = document.createElement('div'); elem.classList.toggle('test-class', false); if (elem.classList.contains('test-class')) { @@ -6959,7 +6902,6 @@ document.addEventListener("DOMContentLoaded", function () { * limitations under the License. */ - /** * The data structure representing a diff is an array of tuples: * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']] @@ -6969,7 +6911,6 @@ var DIFF_DELETE = -1; var DIFF_INSERT = 1; var DIFF_EQUAL = 0; - /** * Find the differences between two texts. Simplifies the problem by stripping * any common prefix or suffix off the texts before diffing. @@ -7022,7 +6963,6 @@ function diff_main(text1, text2, cursor_pos) { return diffs; }; - /** * Find the differences between two texts. Assumes that the texts do not * have any common prefix or suffix. @@ -7083,7 +7023,6 @@ function diff_compute_(text1, text2) { return diff_bisect_(text1, text2); }; - /** * Find the 'middle snake' of a diff, split the problem in two * and return the recursively constructed diff. @@ -7199,7 +7138,6 @@ function diff_bisect_(text1, text2) { return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]]; }; - /** * Given the location of the 'middle snake', split the diff in two parts * and recurse. @@ -7222,7 +7160,6 @@ function diff_bisectSplit_(text1, text2, x, y) { return diffs.concat(diffsb); }; - /** * Determine the common prefix of two strings. * @param {string} text1 First string. @@ -7254,7 +7191,6 @@ function diff_commonPrefix(text1, text2) { return pointermid; }; - /** * Determine the common suffix of two strings. * @param {string} text1 First string. @@ -7286,7 +7222,6 @@ function diff_commonSuffix(text1, text2) { return pointermid; }; - /** * Do the two texts share a substring which is at least half the length of the * longer text? @@ -7379,7 +7314,6 @@ function diff_halfMatch_(text1, text2) { return [text1_a, text1_b, text2_a, text2_b, mid_common]; }; - /** * Reorder and merge like edit sections. Merge equalities. * Any edit section can move as long as it doesn't cross an equality. @@ -7506,7 +7440,6 @@ function diff_cleanupMerge(diffs) { } }; - var diff = diff_main; diff.INSERT = DIFF_INSERT; diff.DELETE = DIFF_DELETE; @@ -7673,7 +7606,6 @@ function merge_tuples (diffs, start, length) { return diffs; } - /***/ }), /* 52 */ /***/ (function(module, exports) { @@ -7688,7 +7620,6 @@ function shim (obj) { return keys; } - /***/ }), /* 53 */ /***/ (function(module, exports) { @@ -7714,7 +7645,6 @@ function unsupported(object){ false; }; - /***/ }), /* 54 */ /***/ (function(module, exports) { @@ -8031,14 +7961,12 @@ if ('undefined' !== typeof module) { module.exports = EventEmitter; } - /***/ }), /* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -8516,7 +8444,6 @@ exports.matchText = matchText; module.exports = __webpack_require__(29); - /***/ }) /******/ ])["default"]; }); \ No newline at end of file diff --git a/tools/quill/quill.js b/tools/quill/quill.js index 5dc8fbe3c..54de768c9 100644 --- a/tools/quill/quill.js +++ b/tools/quill/quill.js @@ -122,7 +122,6 @@ var Parchment = { }; exports.default = Parchment; - /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { @@ -277,7 +276,6 @@ function register() { } exports.register = register; - /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { @@ -287,10 +285,8 @@ var equal = __webpack_require__(11); var extend = __webpack_require__(3); var op = __webpack_require__(20); - var NULL_CHARACTER = String.fromCharCode(0); // Placeholder char for embed in diff() - var Delta = function (ops) { // Assume we are given a well formed ops if (Array.isArray(ops)) { @@ -302,7 +298,6 @@ var Delta = function (ops) { } }; - Delta.prototype.insert = function (text, attributes) { var newOp = {}; if (text.length === 0) return this; @@ -435,7 +430,6 @@ Delta.prototype.slice = function (start, end) { return new Delta(ops); }; - Delta.prototype.compose = function (other) { var thisIter = op.iterator(this.ops); var otherIter = op.iterator(other.ops); @@ -605,10 +599,8 @@ Delta.prototype.transformPosition = function (index, priority) { return index; }; - module.exports = Delta; - /***/ }), /* 3 */ /***/ (function(module, exports) { @@ -700,14 +692,12 @@ module.exports = function extend() { return target; }; - /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -803,7 +793,6 @@ var BlockEmbed = function (_Parchment$Embed) { BlockEmbed.scope = _parchment2.default.Scope.BLOCK_BLOT; // It is important for cursor behavior BlockEmbeds use tags that are block level elements - var Block = function (_Parchment$Block) { _inherits(Block, _Parchment$Block); @@ -965,7 +954,6 @@ exports.default = Block; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -1700,7 +1688,6 @@ exports.default = Quill; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -1790,7 +1777,6 @@ exports.default = Inline; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -1827,7 +1813,6 @@ exports.default = TextBlot; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -1943,7 +1928,6 @@ exports.default = Emitter; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -1969,7 +1953,6 @@ exports.default = Module; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -2100,7 +2083,6 @@ function objEquiv(a, b, opts) { return typeof a === typeof b; } - /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { @@ -2163,14 +2145,12 @@ var Attributor = /** @class */ (function () { }()); exports.default = Attributor; - /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -2372,7 +2352,6 @@ exports.default = CodeBlock; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -2740,7 +2719,6 @@ exports.default = Editor; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -3229,7 +3207,6 @@ exports.default = Selection; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -3558,7 +3535,6 @@ function makeBlot(node) { } exports.default = ContainerBlot; - /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { @@ -3640,7 +3616,6 @@ var FormatBlot = /** @class */ (function (_super) { }(container_1.default)); exports.default = FormatBlot; - /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { @@ -3690,7 +3665,6 @@ var LeafBlot = /** @class */ (function (_super) { }(shadow_1.default)); exports.default = LeafBlot; - /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { @@ -3698,7 +3672,6 @@ exports.default = LeafBlot; var equal = __webpack_require__(11); var extend = __webpack_require__(3); - var lib = { attributes: { compose: function (a, b, keepNull) { @@ -3760,7 +3733,6 @@ var lib = { } }; - function Iterator(ops) { this.ops = ops; this.index = 0; @@ -3832,10 +3804,8 @@ Iterator.prototype.peekType = function () { return 'retain'; }; - module.exports = lib; - /***/ }), /* 21 */ /***/ (function(module, exports) { @@ -4092,14 +4062,12 @@ if (typeof module === 'object' && module.exports) { module.exports = clone; } - /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -4352,7 +4320,6 @@ exports.default = Scroll; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -4958,7 +4925,6 @@ exports.SHORTKEY = SHORTKEY; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5132,7 +5098,6 @@ Cursor.className = 'ql-cursor'; Cursor.tagName = 'span'; Cursor.CONTENTS = '\uFEFF'; // Zero width no break space - exports.default = Cursor; /***/ }), @@ -5141,7 +5106,6 @@ exports.default = Cursor; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5184,7 +5148,6 @@ exports.default = Container; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5247,7 +5210,6 @@ exports.ColorStyle = ColorStyle; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5330,7 +5292,6 @@ exports.sanitize = _sanitize; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5570,7 +5531,6 @@ exports.default = Picker; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -5811,7 +5771,6 @@ var ShadowBlot = /** @class */ (function () { }()); exports.default = ShadowBlot; - /***/ }), /* 31 */ /***/ (function(module, exports, __webpack_require__) { @@ -5888,7 +5847,6 @@ var AttributorStore = /** @class */ (function () { }()); exports.default = AttributorStore; - /***/ }), /* 32 */ /***/ (function(module, exports, __webpack_require__) { @@ -5951,7 +5909,6 @@ var ClassAttributor = /** @class */ (function (_super) { }(attributor_1.default)); exports.default = ClassAttributor; - /***/ }), /* 33 */ /***/ (function(module, exports, __webpack_require__) { @@ -6014,14 +5971,12 @@ var StyleAttributor = /** @class */ (function (_super) { }(attributor_1.default)); exports.default = StyleAttributor; - /***/ }), /* 34 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -6077,7 +6032,6 @@ exports.default = Theme; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -6198,7 +6152,6 @@ exports.default = Embed; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -6229,7 +6182,6 @@ exports.AlignStyle = AlignStyle; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -6259,7 +6211,6 @@ exports.BackgroundStyle = BackgroundStyle; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -6290,7 +6241,6 @@ exports.DirectionStyle = DirectionStyle; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -6349,7 +6299,6 @@ exports.FontClass = FontClass; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -6379,7 +6328,6 @@ exports.SizeStyle = SizeStyle; "use strict"; - module.exports = { 'align': { '': __webpack_require__(76), @@ -6436,7 +6384,6 @@ module.exports = { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -6604,7 +6551,6 @@ exports.getLastChangeIndex = getLastChangeIndex; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -7081,7 +7027,6 @@ var LinkedList = /** @class */ (function () { }()); exports.default = LinkedList; - /***/ }), /* 45 */ /***/ (function(module, exports, __webpack_require__) { @@ -7265,7 +7210,6 @@ var ScrollBlot = /** @class */ (function (_super) { }(container_1.default)); exports.default = ScrollBlot; - /***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) { @@ -7350,7 +7294,6 @@ var InlineBlot = /** @class */ (function (_super) { }(format_1.default)); exports.default = InlineBlot; - /***/ }), /* 47 */ /***/ (function(module, exports, __webpack_require__) { @@ -7426,7 +7369,6 @@ var BlockBlot = /** @class */ (function (_super) { }(format_1.default)); exports.default = BlockBlot; - /***/ }), /* 48 */ /***/ (function(module, exports, __webpack_require__) { @@ -7474,7 +7416,6 @@ var EmbedBlot = /** @class */ (function (_super) { }(leaf_1.default)); exports.default = EmbedBlot; - /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { @@ -7577,14 +7518,12 @@ var TextBlot = /** @class */ (function (_super) { }(leaf_1.default)); exports.default = TextBlot; - /***/ }), /* 50 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - var elem = document.createElement('div'); elem.classList.toggle('test-class', false); if (elem.classList.contains('test-class')) { @@ -7678,7 +7617,6 @@ document.addEventListener("DOMContentLoaded", function () { * limitations under the License. */ - /** * The data structure representing a diff is an array of tuples: * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']] @@ -7688,7 +7626,6 @@ var DIFF_DELETE = -1; var DIFF_INSERT = 1; var DIFF_EQUAL = 0; - /** * Find the differences between two texts. Simplifies the problem by stripping * any common prefix or suffix off the texts before diffing. @@ -7741,7 +7678,6 @@ function diff_main(text1, text2, cursor_pos) { return diffs; }; - /** * Find the differences between two texts. Assumes that the texts do not * have any common prefix or suffix. @@ -7802,7 +7738,6 @@ function diff_compute_(text1, text2) { return diff_bisect_(text1, text2); }; - /** * Find the 'middle snake' of a diff, split the problem in two * and return the recursively constructed diff. @@ -7918,7 +7853,6 @@ function diff_bisect_(text1, text2) { return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]]; }; - /** * Given the location of the 'middle snake', split the diff in two parts * and recurse. @@ -7941,7 +7875,6 @@ function diff_bisectSplit_(text1, text2, x, y) { return diffs.concat(diffsb); }; - /** * Determine the common prefix of two strings. * @param {string} text1 First string. @@ -7973,7 +7906,6 @@ function diff_commonPrefix(text1, text2) { return pointermid; }; - /** * Determine the common suffix of two strings. * @param {string} text1 First string. @@ -8005,7 +7937,6 @@ function diff_commonSuffix(text1, text2) { return pointermid; }; - /** * Do the two texts share a substring which is at least half the length of the * longer text? @@ -8098,7 +8029,6 @@ function diff_halfMatch_(text1, text2) { return [text1_a, text1_b, text2_a, text2_b, mid_common]; }; - /** * Reorder and merge like edit sections. Merge equalities. * Any edit section can move as long as it doesn't cross an equality. @@ -8225,7 +8155,6 @@ function diff_cleanupMerge(diffs) { } }; - var diff = diff_main; diff.INSERT = DIFF_INSERT; diff.DELETE = DIFF_DELETE; @@ -8392,7 +8321,6 @@ function merge_tuples (diffs, start, length) { return diffs; } - /***/ }), /* 52 */ /***/ (function(module, exports) { @@ -8407,7 +8335,6 @@ function shim (obj) { return keys; } - /***/ }), /* 53 */ /***/ (function(module, exports) { @@ -8433,7 +8360,6 @@ function unsupported(object){ false; }; - /***/ }), /* 54 */ /***/ (function(module, exports) { @@ -8750,14 +8676,12 @@ if ('undefined' !== typeof module) { module.exports = EventEmitter; } - /***/ }), /* 55 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -9181,7 +9105,6 @@ exports.matchText = matchText; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -9245,7 +9168,6 @@ exports.default = Bold; "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); @@ -9329,7 +9251,6 @@ var Toolbar = function (_Module) { _this$quill$selection2 = _slicedToArray(_this$quill$selection, 1), range = _this$quill$selection2[0]; // quill.getSelection triggers update - _this.update(range); }); return _this; @@ -9576,7 +9497,6 @@ module.exports = "