You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ge...@apache.org on 2020/04/16 14:59:06 UTC
[incubator-annotator-website] 01/02: Update demo
This is an automated email from the ASF dual-hosted git repository.
gerben pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-annotator-website.git
commit b0daedaa7f4d1822965b8bec7ac5b63101dd352c
Author: Gerben <ge...@treora.com>
AuthorDate: Thu Apr 16 16:57:50 2020 +0200
Update demo
---
annotator | 2 +-
content/demo/index.html | 46 +-
content/demo/index.js | 7319 +++++++++++++++--------------------------------
content/style.css | 20 +
4 files changed, 2267 insertions(+), 5120 deletions(-)
diff --git a/annotator b/annotator
index c8d1324..4d356e5 160000
--- a/annotator
+++ b/annotator
@@ -1 +1 @@
-Subproject commit c8d1324d0884053d3e9e32213bf63929448c737b
+Subproject commit 4d356e533008f767cb3b698ff6b284f598d84aee
diff --git a/content/demo/index.html b/content/demo/index.html
index f941ffb..a74d369 100644
--- a/content/demo/index.html
+++ b/content/demo/index.html
@@ -25,17 +25,17 @@ under the License.
<title>Apache Annotator (incubating) demo</title>
<link rel="stylesheet" href="../style.css"/>
<style>
- a[href^="#selector"]:before {
+ a[data-run-example]:before {
content: '📌 ';
}
- #selectable, #corpus {
+ #source, #target {
padding: 1em;
border: 1px solid lightgrey;
background: white;
}
- #parsed {
+ #info {
height: 15em;
overflow: scroll;
background: white;
@@ -59,53 +59,39 @@ under the License.
<main>
<h1>Selector Demonstration</h1>
- <p>
- This page demonstrates Web Annotation
+ <p>This page demonstrates Web Annotation
<a href="https://www.w3.org/TR/2017/REC-annotation-model-20170223/#selectors" target="_blank">Selectors</a>,
- standardised JSON objects that describe a selection inside a document with sufficient information to find it back.
- </p>
+ standardised JSON objects that describe a selection inside a document with sufficient information to find it back.</p>
<div class="columns full-width">
<div class="column">
<h2>Select text here</h2>
- <p id="selectable">Hello, annotated world! To annotate, or not to annotate, that is the question.</p>
- <p>
- Try selecting some text in this paragraph above.
+ <p id="source">Hello, annotated world! To annotate, or not to annotate, that is the question.</p>
+ <p>Try selecting some text in this paragraph above.
Upon a change of selection, a
<a rel="external" href="https://www.w3.org/TR/2017/REC-annotation-model-20170223/#text-quote-selector" target="_blank">TextQuoteSelector</a>
- will be created, that describes what was selected.
- </p>
+ will be created, that describes what was selected.</p>
</div>
<div class="column">
<h2>Text is found here</h2>
- <p id="corpus" contenteditable>Hello, annotated world! To annotate, or not to annotate, that is the question.</p>
- <p>
- The selector is ‘anchored’ here: the segment it describes is found and highlighted.
- </p>
+ <p id="target" contenteditable>Hello, annotated world! To annotate, or not to annotate, that is the question.</p>
+ <p>The selector is ‘anchored’ here: the segment it describes is found and highlighted.</p>
</div>
<div class="column" style="min-width: 20em;">
<h2>The selector as JSON:</h2>
- <pre id="parsed"></pre>
+ <pre id="info"></pre>
</div>
</div>
- <p>
- Note that the selector is also serialised and shown in the window location, as the fragment identifier
- (following <a rel="external" href="https://www.w3.org/TR/2017/NOTE-selectors-states-20170223/#frags" target="_blank">this specification</a>).
- In fact, it is this fragment identifier that is parsed back into JSON and then anchored in the text above.
- </p>
- <p>
- Here are other selectors you can anchor in the text above:
- </p>
+ <p>Here are other selectors you can anchor in the text above:</p>
<ul>
- <li><a href="#selector(type=TextQuoteSelector,exact=not)">An ambiguous selector (i.e. with multiple matches)</a>
+ <li><a href="#" data-run-example="0">An ambiguous selector (i.e. with multiple matches)</a>
<li>
- <a href="#selector(type=RangeSelector,startSelector=selector(type=TextQuoteSelector,exact=ann),endSelector=selector(type=TextQuoteSelector,exact=!))">RangeSelector</a>
+ <a href="#" data-run-example="1">RangeSelector</a>
(<a href="https://www.w3.org/TR/2017/REC-annotation-model-20170223/#range-selector" target="_blank">spec</a>)
<li>
- <a href="#selector(type=TextQuoteSelector,exact=annotated%20world,refinedBy=selector(type=TextQuoteSelector,exact=tat))">Refining
- a selector using another selector</a>
+ <a href="#" data-run-example="2">Refining a selector using another selector</a>
(<a href="https://www.w3.org/TR/2017/REC-annotation-model-20170223/#refinement-of-selection" target="blank">spec</a>)
- <li><a href="#selector(type=TextQuoteSelector,exact=To%20annotate%2C%20or%20not%20to%20annotate%2C,refinedBy=selector(type=RangeSelector,startSelector=selector(type=TextQuoteSelector,exact=To%20annotate,refinedBy=selector(type=TextQuoteSelector,exact=annotate)),endSelector=selector(type=TextQuoteSelector,exact=not%20to%20annotate,refinedBy=selector(type=TextQuoteSelector,exact=%20to)),refinedBy=selector(type=TextQuoteSelector,exact=o)))">Any deeper nesting of the above</a>
+ <li><a href="#" data-run-example="3">Any deeper nesting of the above</a>
</ul>
</main>
</body>
diff --git a/content/demo/index.js b/content/demo/index.js
index f092e12..ce875b7 100644
--- a/content/demo/index.js
+++ b/content/demo/index.js
@@ -86,17 +86,6 @@
/************************************************************************/
/******/ ({
-/***/ "../node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js":
-/*!*******************************************************************************!*\
- !*** ../node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js ***!
- \*******************************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(/*! core-js-pure/stable/array/is-array */ "../node_modules/core-js-pure/stable/array/is-array.js");
-
-/***/ }),
-
/***/ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js":
/*!********************************************************************************!*\
!*** ../node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js ***!
@@ -174,17 +163,6 @@ module.exports = __webpack_require__(/*! core-js-pure/stable/instance/map */ "..
/***/ }),
-/***/ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js":
-/*!*******************************************************************************!*\
- !*** ../node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js ***!
- \*******************************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(/*! core-js-pure/stable/instance/slice */ "../node_modules/core-js-pure/stable/instance/slice.js");
-
-/***/ }),
-
/***/ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/some.js":
/*!******************************************************************************!*\
!*** ../node_modules/@babel/runtime-corejs3/core-js-stable/instance/some.js ***!
@@ -251,17 +229,6 @@ module.exports = __webpack_require__(/*! core-js-pure/stable/symbol/async-iterat
/***/ }),
-/***/ "../node_modules/@babel/runtime-corejs3/core-js-stable/url.js":
-/*!********************************************************************!*\
- !*** ../node_modules/@babel/runtime-corejs3/core-js-stable/url.js ***!
- \********************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(/*! core-js-pure/stable/url */ "../node_modules/core-js-pure/stable/url/index.js");
-
-/***/ }),
-
/***/ "../node_modules/@babel/runtime-corejs3/core-js/array/from.js":
/*!********************************************************************!*\
!*** ../node_modules/@babel/runtime-corejs3/core-js/array/from.js ***!
@@ -1205,21 +1172,6 @@ module.exports = entryVirtual('Array').map;
/***/ }),
-/***/ "../node_modules/core-js-pure/es/array/virtual/slice.js":
-/*!**************************************************************!*\
- !*** ../node_modules/core-js-pure/es/array/virtual/slice.js ***!
- \**************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-__webpack_require__(/*! ../../../modules/es.array.slice */ "../node_modules/core-js-pure/modules/es.array.slice.js");
-var entryVirtual = __webpack_require__(/*! ../../../internals/entry-virtual */ "../node_modules/core-js-pure/internals/entry-virtual.js");
-
-module.exports = entryVirtual('Array').slice;
-
-
-/***/ }),
-
/***/ "../node_modules/core-js-pure/es/array/virtual/some.js":
/*!*************************************************************!*\
!*** ../node_modules/core-js-pure/es/array/virtual/some.js ***!
@@ -1364,25 +1316,6 @@ module.exports = function (it) {
/***/ }),
-/***/ "../node_modules/core-js-pure/es/instance/slice.js":
-/*!*********************************************************!*\
- !*** ../node_modules/core-js-pure/es/instance/slice.js ***!
- \*********************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var slice = __webpack_require__(/*! ../array/virtual/slice */ "../node_modules/core-js-pure/es/array/virtual/slice.js");
-
-var ArrayPrototype = Array.prototype;
-
-module.exports = function (it) {
- var own = it.slice;
- return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.slice) ? slice : own;
-};
-
-
-/***/ }),
-
/***/ "../node_modules/core-js-pure/es/instance/some.js":
/*!********************************************************!*\
!*** ../node_modules/core-js-pure/es/instance/some.js ***!
@@ -3325,50 +3258,6 @@ module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
/***/ }),
-/***/ "../node_modules/core-js-pure/internals/native-url.js":
-/*!************************************************************!*\
- !*** ../node_modules/core-js-pure/internals/native-url.js ***!
- \************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-var fails = __webpack_require__(/*! ../internals/fails */ "../node_modules/core-js-pure/internals/fails.js");
-var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "../node_modules/core-js-pure/internals/well-known-symbol.js");
-var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "../node_modules/core-js-pure/internals/is-pure.js");
-
-var ITERATOR = wellKnownSymbol('iterator');
-
-module.exports = !fails(function () {
- var url = new URL('b?a=1&b=2&c=3', 'http://a');
- var searchParams = url.searchParams;
- var result = '';
- url.pathname = 'c%20d';
- searchParams.forEach(function (value, key) {
- searchParams['delete']('b');
- result += key + value;
- });
- return (IS_PURE && !url.toJSON)
- || !searchParams.sort
- || url.href !== 'http://a/c%20d?a=1&c=3'
- || searchParams.get('c') !== '3'
- || String(new URLSearchParams('?a=1')) !== 'a=1'
- || !searchParams[ITERATOR]
- // throws in Edge
- || new URL('https://a@b').username !== 'a'
- || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
- // not punycoded in Edge
- || new URL('http://тест').host !== 'xn--e1aybc'
- // not escaped in Chrome 62-
- || new URL('http://a#б').hash !== '#%D0%B1'
- // fails in Chrome 66-
- || result !== 'a1c3'
- // throws in Safari
- || new URL('http://x', undefined).host !== 'x';
-});
-
-
-/***/ }),
-
/***/ "../node_modules/core-js-pure/internals/native-weak-map.js":
/*!*****************************************************************!*\
!*** ../node_modules/core-js-pure/internals/native-weak-map.js ***!
@@ -3416,59 +3305,6 @@ module.exports.f = function (C) {
/***/ }),
-/***/ "../node_modules/core-js-pure/internals/object-assign.js":
-/*!***************************************************************!*\
- !*** ../node_modules/core-js-pure/internals/object-assign.js ***!
- \***************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "../node_modules/core-js-pure/internals/descriptors.js");
-var fails = __webpack_require__(/*! ../internals/fails */ "../node_modules/core-js-pure/internals/fails.js");
-var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "../node_modules/core-js-pure/internals/object-keys.js");
-var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "../node_modules/core-js-pure/internals/object-get-own-property-symbols.js");
-var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "../node_modules/core-js-pure/internals/object-property-is-enumerable.js");
-var toObject = __webpack_require__(/*! ../internals/to-object */ "../node_modules/core-js-pure/internals/to-object.js");
-var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "../node_modules/core-js-pure/internals/indexed-object.js");
-
-var nativeAssign = Object.assign;
-
-// `Object.assign` method
-// https://tc39.github.io/ecma262/#sec-object.assign
-// should work with symbols and should have deterministic property order (V8 bug)
-module.exports = !nativeAssign || fails(function () {
- var A = {};
- var B = {};
- // eslint-disable-next-line no-undef
- var symbol = Symbol();
- var alphabet = 'abcdefghijklmnopqrst';
- A[symbol] = 7;
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
- return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
-}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
- var T = toObject(target);
- var argumentsLength = arguments.length;
- var index = 1;
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
- while (argumentsLength > index) {
- var S = IndexedObject(arguments[index++]);
- var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
- var length = keys.length;
- var j = 0;
- var key;
- while (length > j) {
- key = keys[j++];
- if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
- }
- } return T;
-} : nativeAssign;
-
-
-/***/ }),
-
/***/ "../node_modules/core-js-pure/internals/object-create.js":
/*!***************************************************************!*\
!*** ../node_modules/core-js-pure/internals/object-create.js ***!
@@ -3898,186 +3734,6 @@ module.exports = function (C, x) {
/***/ }),
-/***/ "../node_modules/core-js-pure/internals/punycode-to-ascii.js":
-/*!*******************************************************************!*\
- !*** ../node_modules/core-js-pure/internals/punycode-to-ascii.js ***!
- \*******************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
-var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
-var base = 36;
-var tMin = 1;
-var tMax = 26;
-var skew = 38;
-var damp = 700;
-var initialBias = 72;
-var initialN = 128; // 0x80
-var delimiter = '-'; // '\x2D'
-var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
-var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
-var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
-var baseMinusTMin = base - tMin;
-var floor = Math.floor;
-var stringFromCharCode = String.fromCharCode;
-
-/**
- * Creates an array containing the numeric code points of each Unicode
- * character in the string. While JavaScript uses UCS-2 internally,
- * this function will convert a pair of surrogate halves (each of which
- * UCS-2 exposes as separate characters) into a single code point,
- * matching UTF-16.
- */
-var ucs2decode = function (string) {
- var output = [];
- var counter = 0;
- var length = string.length;
- while (counter < length) {
- var value = string.charCodeAt(counter++);
- if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
- // It's a high surrogate, and there is a next character.
- var extra = string.charCodeAt(counter++);
- if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
- output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
- } else {
- // It's an unmatched surrogate; only append this code unit, in case the
- // next code unit is the high surrogate of a surrogate pair.
- output.push(value);
- counter--;
- }
- } else {
- output.push(value);
- }
- }
- return output;
-};
-
-/**
- * Converts a digit/integer into a basic code point.
- */
-var digitToBasic = function (digit) {
- // 0..25 map to ASCII a..z or A..Z
- // 26..35 map to ASCII 0..9
- return digit + 22 + 75 * (digit < 26);
-};
-
-/**
- * Bias adaptation function as per section 3.4 of RFC 3492.
- * https://tools.ietf.org/html/rfc3492#section-3.4
- */
-var adapt = function (delta, numPoints, firstTime) {
- var k = 0;
- delta = firstTime ? floor(delta / damp) : delta >> 1;
- delta += floor(delta / numPoints);
- for (; delta > baseMinusTMin * tMax >> 1; k += base) {
- delta = floor(delta / baseMinusTMin);
- }
- return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
-};
-
-/**
- * Converts a string of Unicode symbols (e.g. a domain name label) to a
- * Punycode string of ASCII-only symbols.
- */
-// eslint-disable-next-line max-statements
-var encode = function (input) {
- var output = [];
-
- // Convert the input in UCS-2 to an array of Unicode code points.
- input = ucs2decode(input);
-
- // Cache the length.
- var inputLength = input.length;
-
- // Initialize the state.
- var n = initialN;
- var delta = 0;
- var bias = initialBias;
- var i, currentValue;
-
- // Handle the basic code points.
- for (i = 0; i < input.length; i++) {
- currentValue = input[i];
- if (currentValue < 0x80) {
- output.push(stringFromCharCode(currentValue));
- }
- }
-
- var basicLength = output.length; // number of basic code points.
- var handledCPCount = basicLength; // number of code points that have been handled;
-
- // Finish the basic string with a delimiter unless it's empty.
- if (basicLength) {
- output.push(delimiter);
- }
-
- // Main encoding loop:
- while (handledCPCount < inputLength) {
- // All non-basic code points < n have been handled already. Find the next larger one:
- var m = maxInt;
- for (i = 0; i < input.length; i++) {
- currentValue = input[i];
- if (currentValue >= n && currentValue < m) {
- m = currentValue;
- }
- }
-
- // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
- var handledCPCountPlusOne = handledCPCount + 1;
- if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
- throw RangeError(OVERFLOW_ERROR);
- }
-
- delta += (m - n) * handledCPCountPlusOne;
- n = m;
-
- for (i = 0; i < input.length; i++) {
- currentValue = input[i];
- if (currentValue < n && ++delta > maxInt) {
- throw RangeError(OVERFLOW_ERROR);
- }
- if (currentValue == n) {
- // Represent delta as a generalized variable-length integer.
- var q = delta;
- for (var k = base; /* no condition */; k += base) {
- var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
- if (q < t) break;
- var qMinusT = q - t;
- var baseMinusT = base - t;
- output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
- q = floor(qMinusT / baseMinusT);
- }
-
- output.push(stringFromCharCode(digitToBasic(q)));
- bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
- delta = 0;
- ++handledCPCount;
- }
- }
-
- ++delta;
- ++n;
- }
- return output.join('');
-};
-
-module.exports = function (input) {
- var encoded = [];
- var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.');
- var i, label;
- for (i = 0; i < labels.length; i++) {
- label = labels[i];
- encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);
- }
- return encoded.join('.');
-};
-
-
-/***/ }),
-
/***/ "../node_modules/core-js-pure/internals/redefine-all.js":
/*!**************************************************************!*\
!*** ../node_modules/core-js-pure/internals/redefine-all.js ***!
@@ -5021,63 +4677,6 @@ $({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('map') }
/***/ }),
-/***/ "../node_modules/core-js-pure/modules/es.array.slice.js":
-/*!**************************************************************!*\
- !*** ../node_modules/core-js-pure/modules/es.array.slice.js ***!
- \**************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var $ = __webpack_require__(/*! ../internals/export */ "../node_modules/core-js-pure/internals/export.js");
-var isObject = __webpack_require__(/*! ../internals/is-object */ "../node_modules/core-js-pure/internals/is-object.js");
-var isArray = __webpack_require__(/*! ../internals/is-array */ "../node_modules/core-js-pure/internals/is-array.js");
-var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "../node_modules/core-js-pure/internals/to-absolute-index.js");
-var toLength = __webpack_require__(/*! ../internals/to-length */ "../node_modules/core-js-pure/internals/to-length.js");
-var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "../node_modules/core-js-pure/internals/to-indexed-object.js");
-var createProperty = __webpack_require__(/*! ../internals/create-property */ "../node_modules/core-js-pure/internals/create-property.js");
-var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "../node_modules/core-js-pure/internals/array-method-has-species-support.js");
-var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "../node_modules/core-js-pure/internals/well-known-symbol.js");
-
-var SPECIES = wellKnownSymbol('species');
-var nativeSlice = [].slice;
-var max = Math.max;
-
-// `Array.prototype.slice` method
-// https://tc39.github.io/ecma262/#sec-array.prototype.slice
-// fallback for not array-like ES3 strings and DOM objects
-$({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') }, {
- slice: function slice(start, end) {
- var O = toIndexedObject(this);
- var length = toLength(O.length);
- var k = toAbsoluteIndex(start, length);
- var fin = toAbsoluteIndex(end === undefined ? length : end, length);
- // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
- var Constructor, result, n;
- if (isArray(O)) {
- Constructor = O.constructor;
- // cross-realm fallback
- if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
- Constructor = undefined;
- } else if (isObject(Constructor)) {
- Constructor = Constructor[SPECIES];
- if (Constructor === null) Constructor = undefined;
- }
- if (Constructor === Array || Constructor === undefined) {
- return nativeSlice.call(O, k, fin);
- }
- }
- result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
- for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
- result.length = n;
- return result;
- }
-});
-
-
-/***/ }),
-
/***/ "../node_modules/core-js-pure/modules/es.array.some.js":
/*!*************************************************************!*\
!*** ../node_modules/core-js-pure/modules/es.array.some.js ***!
@@ -6553,1663 +6152,558 @@ for (var COLLECTION_NAME in DOMIterables) {
/***/ }),
-/***/ "../node_modules/core-js-pure/modules/web.url-search-params.js":
+/***/ "../node_modules/core-js-pure/stable/array/virtual/for-each.js":
/*!*********************************************************************!*\
- !*** ../node_modules/core-js-pure/modules/web.url-search-params.js ***!
+ !*** ../node_modules/core-js-pure/stable/array/virtual/for-each.js ***!
\*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-
-// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
-__webpack_require__(/*! ../modules/es.array.iterator */ "../node_modules/core-js-pure/modules/es.array.iterator.js");
-var $ = __webpack_require__(/*! ../internals/export */ "../node_modules/core-js-pure/internals/export.js");
-var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "../node_modules/core-js-pure/internals/get-built-in.js");
-var USE_NATIVE_URL = __webpack_require__(/*! ../internals/native-url */ "../node_modules/core-js-pure/internals/native-url.js");
-var redefine = __webpack_require__(/*! ../internals/redefine */ "../node_modules/core-js-pure/internals/redefine.js");
-var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "../node_modules/core-js-pure/internals/redefine-all.js");
-var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "../node_modules/core-js-pure/internals/set-to-string-tag.js");
-var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "../node_modules/core-js-pure/internals/create-iterator-constructor.js");
-var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "../node_modules/core-js-pure/internals/internal-state.js");
-var anInstance = __webpack_require__(/*! ../internals/an-instance */ "../node_modules/core-js-pure/internals/an-instance.js");
-var hasOwn = __webpack_require__(/*! ../internals/has */ "../node_modules/core-js-pure/internals/has.js");
-var bind = __webpack_require__(/*! ../internals/bind-context */ "../node_modules/core-js-pure/internals/bind-context.js");
-var classof = __webpack_require__(/*! ../internals/classof */ "../node_modules/core-js-pure/internals/classof.js");
-var anObject = __webpack_require__(/*! ../internals/an-object */ "../node_modules/core-js-pure/internals/an-object.js");
-var isObject = __webpack_require__(/*! ../internals/is-object */ "../node_modules/core-js-pure/internals/is-object.js");
-var create = __webpack_require__(/*! ../internals/object-create */ "../node_modules/core-js-pure/internals/object-create.js");
-var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "../node_modules/core-js-pure/internals/create-property-descriptor.js");
-var getIterator = __webpack_require__(/*! ../internals/get-iterator */ "../node_modules/core-js-pure/internals/get-iterator.js");
-var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "../node_modules/core-js-pure/internals/get-iterator-method.js");
-var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "../node_modules/core-js-pure/internals/well-known-symbol.js");
+module.exports = __webpack_require__(/*! ../../../es/array/virtual/for-each */ "../node_modules/core-js-pure/es/array/virtual/for-each.js");
-var $fetch = getBuiltIn('fetch');
-var Headers = getBuiltIn('Headers');
-var ITERATOR = wellKnownSymbol('iterator');
-var URL_SEARCH_PARAMS = 'URLSearchParams';
-var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
-var setInternalState = InternalStateModule.set;
-var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
-var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);
-var plus = /\+/g;
-var sequences = Array(4);
+/***/ }),
-var percentSequence = function (bytes) {
- return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
-};
+/***/ "../node_modules/core-js-pure/stable/instance/concat.js":
+/*!**************************************************************!*\
+ !*** ../node_modules/core-js-pure/stable/instance/concat.js ***!
+ \**************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
-var percentDecode = function (sequence) {
- try {
- return decodeURIComponent(sequence);
- } catch (error) {
- return sequence;
- }
-};
+module.exports = __webpack_require__(/*! ../../es/instance/concat */ "../node_modules/core-js-pure/es/instance/concat.js");
-var deserialize = function (it) {
- var result = it.replace(plus, ' ');
- var bytes = 4;
- try {
- return decodeURIComponent(result);
- } catch (error) {
- while (bytes) {
- result = result.replace(percentSequence(bytes--), percentDecode);
- }
- return result;
- }
-};
-var find = /[!'()~]|%20/g;
+/***/ }),
-var replace = {
- '!': '%21',
- "'": '%27',
- '(': '%28',
- ')': '%29',
- '~': '%7E',
- '%20': '+'
-};
+/***/ "../node_modules/core-js-pure/stable/instance/every.js":
+/*!*************************************************************!*\
+ !*** ../node_modules/core-js-pure/stable/instance/every.js ***!
+ \*************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
-var replacer = function (match) {
- return replace[match];
-};
+module.exports = __webpack_require__(/*! ../../es/instance/every */ "../node_modules/core-js-pure/es/instance/every.js");
-var serialize = function (it) {
- return encodeURIComponent(it).replace(find, replacer);
-};
-var parseSearchParams = function (result, query) {
- if (query) {
- var attributes = query.split('&');
- var index = 0;
- var attribute, entry;
- while (index < attributes.length) {
- attribute = attributes[index++];
- if (attribute.length) {
- entry = attribute.split('=');
- result.push({
- key: deserialize(entry.shift()),
- value: deserialize(entry.join('='))
- });
- }
- }
- }
-};
+/***/ }),
-var updateSearchParams = function (query) {
- this.entries.length = 0;
- parseSearchParams(this.entries, query);
-};
+/***/ "../node_modules/core-js-pure/stable/instance/filter.js":
+/*!**************************************************************!*\
+ !*** ../node_modules/core-js-pure/stable/instance/filter.js ***!
+ \**************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
-var validateArgumentsLength = function (passed, required) {
- if (passed < required) throw TypeError('Not enough arguments');
-};
+module.exports = __webpack_require__(/*! ../../es/instance/filter */ "../node_modules/core-js-pure/es/instance/filter.js");
-var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
- setInternalState(this, {
- type: URL_SEARCH_PARAMS_ITERATOR,
- iterator: getIterator(getInternalParamsState(params).entries),
- kind: kind
- });
-}, 'Iterator', function next() {
- var state = getInternalIteratorState(this);
- var kind = state.kind;
- var step = state.iterator.next();
- var entry = step.value;
- if (!step.done) {
- step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
- } return step;
-});
-// `URLSearchParams` constructor
-// https://url.spec.whatwg.org/#interface-urlsearchparams
-var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
- anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);
- var init = arguments.length > 0 ? arguments[0] : undefined;
- var that = this;
- var entries = [];
- var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;
-
- setInternalState(that, {
- type: URL_SEARCH_PARAMS,
- entries: entries,
- updateURL: function () { /* empty */ },
- updateSearchParams: updateSearchParams
- });
+/***/ }),
- if (init !== undefined) {
- if (isObject(init)) {
- iteratorMethod = getIteratorMethod(init);
- if (typeof iteratorMethod === 'function') {
- iterator = iteratorMethod.call(init);
- next = iterator.next;
- while (!(step = next.call(iterator)).done) {
- entryIterator = getIterator(anObject(step.value));
- entryNext = entryIterator.next;
- if (
- (first = entryNext.call(entryIterator)).done ||
- (second = entryNext.call(entryIterator)).done ||
- !entryNext.call(entryIterator).done
- ) throw TypeError('Expected sequence with length 2');
- entries.push({ key: first.value + '', value: second.value + '' });
- }
- } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });
- } else {
- parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');
- }
- }
-};
-
-var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
+/***/ "../node_modules/core-js-pure/stable/instance/flat-map.js":
+/*!****************************************************************!*\
+ !*** ../node_modules/core-js-pure/stable/instance/flat-map.js ***!
+ \****************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
-redefineAll(URLSearchParamsPrototype, {
- // `URLSearchParams.prototype.appent` method
- // https://url.spec.whatwg.org/#dom-urlsearchparams-append
- append: function append(name, value) {
- validateArgumentsLength(arguments.length, 2);
- var state = getInternalParamsState(this);
- state.entries.push({ key: name + '', value: value + '' });
- state.updateURL();
- },
- // `URLSearchParams.prototype.delete` method
- // https://url.spec.whatwg.org/#dom-urlsearchparams-delete
- 'delete': function (name) {
- validateArgumentsLength(arguments.length, 1);
- var state = getInternalParamsState(this);
- var entries = state.entries;
- var key = name + '';
- var index = 0;
- while (index < entries.length) {
- if (entries[index].key === key) entries.splice(index, 1);
- else index++;
- }
- state.updateURL();
- },
- // `URLSearchParams.prototype.get` method
- // https://url.spec.whatwg.org/#dom-urlsearchparams-get
- get: function get(name) {
- validateArgumentsLength(arguments.length, 1);
- var entries = getInternalParamsState(this).entries;
- var key = name + '';
- var index = 0;
- for (; index < entries.length; index++) {
- if (entries[index].key === key) return entries[index].value;
- }
- return null;
- },
- // `URLSearchParams.prototype.getAll` method
- // https://url.spec.whatwg.org/#dom-urlsearchparams-getall
- getAll: function getAll(name) {
- validateArgumentsLength(arguments.length, 1);
- var entries = getInternalParamsState(this).entries;
- var key = name + '';
- var result = [];
- var index = 0;
- for (; index < entries.length; index++) {
- if (entries[index].key === key) result.push(entries[index].value);
- }
- return result;
- },
- // `URLSearchParams.prototype.has` method
- // https://url.spec.whatwg.org/#dom-urlsearchparams-has
- has: function has(name) {
- validateArgumentsLength(arguments.length, 1);
- var entries = getInternalParamsState(this).entries;
- var key = name + '';
- var index = 0;
- while (index < entries.length) {
- if (entries[index++].key === key) return true;
- }
- return false;
- },
- // `URLSearchParams.prototype.set` method
- // https://url.spec.whatwg.org/#dom-urlsearchparams-set
- set: function set(name, value) {
- validateArgumentsLength(arguments.length, 1);
- var state = getInternalParamsState(this);
- var entries = state.entries;
- var found = false;
- var key = name + '';
- var val = value + '';
- var index = 0;
- var entry;
- for (; index < entries.length; index++) {
- entry = entries[index];
- if (entry.key === key) {
- if (found) entries.splice(index--, 1);
- else {
- found = true;
- entry.value = val;
- }
- }
- }
- if (!found) entries.push({ key: key, value: val });
- state.updateURL();
- },
- // `URLSearchParams.prototype.sort` method
- // https://url.spec.whatwg.org/#dom-urlsearchparams-sort
- sort: function sort() {
- var state = getInternalParamsState(this);
- var entries = state.entries;
- // Array#sort is not stable in some engines
- var slice = entries.slice();
- var entry, entriesIndex, sliceIndex;
- entries.length = 0;
- for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {
- entry = slice[sliceIndex];
- for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {
- if (entries[entriesIndex].key > entry.key) {
- entries.splice(entriesIndex, 0, entry);
- break;
- }
- }
- if (entriesIndex === sliceIndex) entries.push(entry);
- }
- state.updateURL();
- },
- // `URLSearchParams.prototype.forEach` method
- forEach: function forEach(callback /* , thisArg */) {
- var entries = getInternalParamsState(this).entries;
- var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
- var index = 0;
- var entry;
- while (index < entries.length) {
- entry = entries[index++];
- boundFunction(entry.value, entry.key, this);
- }
- },
- // `URLSearchParams.prototype.keys` method
- keys: function keys() {
- return new URLSearchParamsIterator(this, 'keys');
- },
- // `URLSearchParams.prototype.values` method
- values: function values() {
- return new URLSearchParamsIterator(this, 'values');
- },
- // `URLSearchParams.prototype.entries` method
- entries: function entries() {
- return new URLSearchParamsIterator(this, 'entries');
- }
-}, { enumerable: true });
+module.exports = __webpack_require__(/*! ../../es/instance/flat-map */ "../node_modules/core-js-pure/es/instance/flat-map.js");
-// `URLSearchParams.prototype[@@iterator]` method
-redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);
-// `URLSearchParams.prototype.toString` method
-// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
-redefine(URLSearchParamsPrototype, 'toString', function toString() {
- var entries = getInternalParamsState(this).entries;
- var result = [];
- var index = 0;
- var entry;
- while (index < entries.length) {
- entry = entries[index++];
- result.push(serialize(entry.key) + '=' + serialize(entry.value));
- } return result.join('&');
-}, { enumerable: true });
+/***/ }),
-setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
+/***/ "../node_modules/core-js-pure/stable/instance/for-each.js":
+/*!****************************************************************!*\
+ !*** ../node_modules/core-js-pure/stable/instance/for-each.js ***!
+ \****************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
-$({ global: true, forced: !USE_NATIVE_URL }, {
- URLSearchParams: URLSearchParamsConstructor
-});
+__webpack_require__(/*! ../../modules/web.dom-collections.iterator */ "../node_modules/core-js-pure/modules/web.dom-collections.iterator.js");
+var forEach = __webpack_require__(/*! ../array/virtual/for-each */ "../node_modules/core-js-pure/stable/array/virtual/for-each.js");
+var classof = __webpack_require__(/*! ../../internals/classof */ "../node_modules/core-js-pure/internals/classof.js");
+var ArrayPrototype = Array.prototype;
-// Wrap `fetch` for correct work with polyfilled `URLSearchParams`
-// https://github.com/zloirock/core-js/issues/674
-if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {
- $({ global: true, enumerable: true, forced: true }, {
- fetch: function fetch(input /* , init */) {
- var args = [input];
- var init, body, headers;
- if (arguments.length > 1) {
- init = arguments[1];
- if (isObject(init)) {
- body = init.body;
- if (classof(body) === URL_SEARCH_PARAMS) {
- headers = new Headers(init.headers);
- if (!headers.has('content-type')) {
- headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
- }
- init = create(init, {
- body: createPropertyDescriptor(0, String(body)),
- headers: createPropertyDescriptor(0, headers)
- });
- }
- }
- args.push(init);
- } return $fetch.apply(this, args);
- }
- });
-}
+var DOMIterables = {
+ DOMTokenList: true,
+ NodeList: true
+};
-module.exports = {
- URLSearchParams: URLSearchParamsConstructor,
- getState: getInternalParamsState
+module.exports = function (it) {
+ var own = it.forEach;
+ return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.forEach)
+ // eslint-disable-next-line no-prototype-builtins
+ || DOMIterables.hasOwnProperty(classof(it)) ? forEach : own;
};
/***/ }),
-/***/ "../node_modules/core-js-pure/modules/web.url.js":
-/*!*******************************************************!*\
- !*** ../node_modules/core-js-pure/modules/web.url.js ***!
- \*******************************************************/
+/***/ "../node_modules/core-js-pure/stable/instance/index-of.js":
+/*!****************************************************************!*\
+ !*** ../node_modules/core-js-pure/stable/instance/index-of.js ***!
+ \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-
-// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
-__webpack_require__(/*! ../modules/es.string.iterator */ "../node_modules/core-js-pure/modules/es.string.iterator.js");
-var $ = __webpack_require__(/*! ../internals/export */ "../node_modules/core-js-pure/internals/export.js");
-var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "../node_modules/core-js-pure/internals/descriptors.js");
-var USE_NATIVE_URL = __webpack_require__(/*! ../internals/native-url */ "../node_modules/core-js-pure/internals/native-url.js");
-var global = __webpack_require__(/*! ../internals/global */ "../node_modules/core-js-pure/internals/global.js");
-var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "../node_modules/core-js-pure/internals/object-define-properties.js");
-var redefine = __webpack_require__(/*! ../internals/redefine */ "../node_modules/core-js-pure/internals/redefine.js");
-var anInstance = __webpack_require__(/*! ../internals/an-instance */ "../node_modules/core-js-pure/internals/an-instance.js");
-var has = __webpack_require__(/*! ../internals/has */ "../node_modules/core-js-pure/internals/has.js");
-var assign = __webpack_require__(/*! ../internals/object-assign */ "../node_modules/core-js-pure/internals/object-assign.js");
-var arrayFrom = __webpack_require__(/*! ../internals/array-from */ "../node_modules/core-js-pure/internals/array-from.js");
-var codeAt = __webpack_require__(/*! ../internals/string-multibyte */ "../node_modules/core-js-pure/internals/string-multibyte.js").codeAt;
-var toASCII = __webpack_require__(/*! ../internals/punycode-to-ascii */ "../node_modules/core-js-pure/internals/punycode-to-ascii.js");
-var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "../node_modules/core-js-pure/internals/set-to-string-tag.js");
-var URLSearchParamsModule = __webpack_require__(/*! ../modules/web.url-search-params */ "../node_modules/core-js-pure/modules/web.url-search-params.js");
-var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "../node_modules/core-js-pure/internals/internal-state.js");
-
-var NativeURL = global.URL;
-var URLSearchParams = URLSearchParamsModule.URLSearchParams;
-var getInternalSearchParamsState = URLSearchParamsModule.getState;
-var setInternalState = InternalStateModule.set;
-var getInternalURLState = InternalStateModule.getterFor('URL');
-var floor = Math.floor;
-var pow = Math.pow;
-
-var INVALID_AUTHORITY = 'Invalid authority';
-var INVALID_SCHEME = 'Invalid scheme';
-var INVALID_HOST = 'Invalid host';
-var INVALID_PORT = 'Invalid port';
-
-var ALPHA = /[A-Za-z]/;
-var ALPHANUMERIC = /[\d+\-.A-Za-z]/;
-var DIGIT = /\d/;
-var HEX_START = /^(0x|0X)/;
-var OCT = /^[0-7]+$/;
-var DEC = /^\d+$/;
-var HEX = /^[\dA-Fa-f]+$/;
-// eslint-disable-next-line no-control-regex
-var FORBIDDEN_HOST_CODE_POINT = /[\u0000\u0009\u000A\u000D #%/:?@[\\]]/;
-// eslint-disable-next-line no-control-regex
-var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\u0009\u000A\u000D #/:?@[\\]]/;
-// eslint-disable-next-line no-control-regex
-var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;
-// eslint-disable-next-line no-control-regex
-var TAB_AND_NEW_LINE = /[\u0009\u000A\u000D]/g;
-var EOF;
-
-var parseHost = function (url, input) {
- var result, codePoints, index;
- if (input.charAt(0) == '[') {
- if (input.charAt(input.length - 1) != ']') return INVALID_HOST;
- result = parseIPv6(input.slice(1, -1));
- if (!result) return INVALID_HOST;
- url.host = result;
- // opaque host
- } else if (!isSpecial(url)) {
- if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;
- result = '';
- codePoints = arrayFrom(input);
- for (index = 0; index < codePoints.length; index++) {
- result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
- }
- url.host = result;
- } else {
- input = toASCII(input);
- if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;
- result = parseIPv4(input);
- if (result === null) return INVALID_HOST;
- url.host = result;
- }
-};
+module.exports = __webpack_require__(/*! ../../es/instance/index-of */ "../node_modules/core-js-pure/es/instance/index-of.js");
-var parseIPv4 = function (input) {
- var parts = input.split('.');
- var partsLength, numbers, index, part, radix, number, ipv4;
- if (parts.length && parts[parts.length - 1] == '') {
- parts.pop();
- }
- partsLength = parts.length;
- if (partsLength > 4) return input;
- numbers = [];
- for (index = 0; index < partsLength; index++) {
- part = parts[index];
- if (part == '') return input;
- radix = 10;
- if (part.length > 1 && part.charAt(0) == '0') {
- radix = HEX_START.test(part) ? 16 : 8;
- part = part.slice(radix == 8 ? 1 : 2);
- }
- if (part === '') {
- number = 0;
- } else {
- if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;
- number = parseInt(part, radix);
- }
- numbers.push(number);
- }
- for (index = 0; index < partsLength; index++) {
- number = numbers[index];
- if (index == partsLength - 1) {
- if (number >= pow(256, 5 - partsLength)) return null;
- } else if (number > 255) return null;
- }
- ipv4 = numbers.pop();
- for (index = 0; index < numbers.length; index++) {
- ipv4 += numbers[index] * pow(256, 3 - index);
- }
- return ipv4;
-};
-// eslint-disable-next-line max-statements
-var parseIPv6 = function (input) {
- var address = [0, 0, 0, 0, 0, 0, 0, 0];
- var pieceIndex = 0;
- var compress = null;
- var pointer = 0;
- var value, length, numbersSeen, ipv4Piece, number, swaps, swap;
+/***/ }),
- var char = function () {
- return input.charAt(pointer);
- };
+/***/ "../node_modules/core-js-pure/stable/instance/map.js":
+/*!***********************************************************!*\
+ !*** ../node_modules/core-js-pure/stable/instance/map.js ***!
+ \***********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
- if (char() == ':') {
- if (input.charAt(1) != ':') return;
- pointer += 2;
- pieceIndex++;
- compress = pieceIndex;
- }
- while (char()) {
- if (pieceIndex == 8) return;
- if (char() == ':') {
- if (compress !== null) return;
- pointer++;
- pieceIndex++;
- compress = pieceIndex;
- continue;
- }
- value = length = 0;
- while (length < 4 && HEX.test(char())) {
- value = value * 16 + parseInt(char(), 16);
- pointer++;
- length++;
- }
- if (char() == '.') {
- if (length == 0) return;
- pointer -= length;
- if (pieceIndex > 6) return;
- numbersSeen = 0;
- while (char()) {
- ipv4Piece = null;
- if (numbersSeen > 0) {
- if (char() == '.' && numbersSeen < 4) pointer++;
- else return;
- }
- if (!DIGIT.test(char())) return;
- while (DIGIT.test(char())) {
- number = parseInt(char(), 10);
- if (ipv4Piece === null) ipv4Piece = number;
- else if (ipv4Piece == 0) return;
- else ipv4Piece = ipv4Piece * 10 + number;
- if (ipv4Piece > 255) return;
- pointer++;
- }
- address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
- numbersSeen++;
- if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
- }
- if (numbersSeen != 4) return;
- break;
- } else if (char() == ':') {
- pointer++;
- if (!char()) return;
- } else if (char()) return;
- address[pieceIndex++] = value;
- }
- if (compress !== null) {
- swaps = pieceIndex - compress;
- pieceIndex = 7;
- while (pieceIndex != 0 && swaps > 0) {
- swap = address[pieceIndex];
- address[pieceIndex--] = address[compress + swaps - 1];
- address[compress + --swaps] = swap;
- }
- } else if (pieceIndex != 8) return;
- return address;
-};
+module.exports = __webpack_require__(/*! ../../es/instance/map */ "../node_modules/core-js-pure/es/instance/map.js");
-var findLongestZeroSequence = function (ipv6) {
- var maxIndex = null;
- var maxLength = 1;
- var currStart = null;
- var currLength = 0;
- var index = 0;
- for (; index < 8; index++) {
- if (ipv6[index] !== 0) {
- if (currLength > maxLength) {
- maxIndex = currStart;
- maxLength = currLength;
- }
- currStart = null;
- currLength = 0;
- } else {
- if (currStart === null) currStart = index;
- ++currLength;
- }
- }
- if (currLength > maxLength) {
- maxIndex = currStart;
- maxLength = currLength;
- }
- return maxIndex;
-};
-var serializeHost = function (host) {
- var result, index, compress, ignore0;
- // ipv4
- if (typeof host == 'number') {
- result = [];
- for (index = 0; index < 4; index++) {
- result.unshift(host % 256);
- host = floor(host / 256);
- } return result.join('.');
- // ipv6
- } else if (typeof host == 'object') {
- result = '';
- compress = findLongestZeroSequence(host);
- for (index = 0; index < 8; index++) {
- if (ignore0 && host[index] === 0) continue;
- if (ignore0) ignore0 = false;
- if (compress === index) {
- result += index ? ':' : '::';
- ignore0 = true;
- } else {
- result += host[index].toString(16);
- if (index < 7) result += ':';
- }
- }
- return '[' + result + ']';
- } return host;
-};
+/***/ }),
-var C0ControlPercentEncodeSet = {};
-var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
- ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
-});
-var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
- '#': 1, '?': 1, '{': 1, '}': 1
-});
-var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
- '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
-});
+/***/ "../node_modules/core-js-pure/stable/instance/some.js":
+/*!************************************************************!*\
+ !*** ../node_modules/core-js-pure/stable/instance/some.js ***!
+ \************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
-var percentEncode = function (char, set) {
- var code = codeAt(char, 0);
- return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);
-};
+module.exports = __webpack_require__(/*! ../../es/instance/some */ "../node_modules/core-js-pure/es/instance/some.js");
-var specialSchemes = {
- ftp: 21,
- file: null,
- http: 80,
- https: 443,
- ws: 80,
- wss: 443
-};
-var isSpecial = function (url) {
- return has(specialSchemes, url.scheme);
-};
+/***/ }),
-var includesCredentials = function (url) {
- return url.username != '' || url.password != '';
-};
+/***/ "../node_modules/core-js-pure/stable/instance/sort.js":
+/*!************************************************************!*\
+ !*** ../node_modules/core-js-pure/stable/instance/sort.js ***!
+ \************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
-var cannotHaveUsernamePasswordPort = function (url) {
- return !url.host || url.cannotBeABaseURL || url.scheme == 'file';
-};
+module.exports = __webpack_require__(/*! ../../es/instance/sort */ "../node_modules/core-js-pure/es/instance/sort.js");
-var isWindowsDriveLetter = function (string, normalized) {
- var second;
- return string.length == 2 && ALPHA.test(string.charAt(0))
- && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));
-};
-var startsWithWindowsDriveLetter = function (string) {
- var third;
- return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (
- string.length == 2 ||
- ((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#')
- );
-};
+/***/ }),
-var shortenURLsPath = function (url) {
- var path = url.path;
- var pathSize = path.length;
- if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
- path.pop();
- }
-};
+/***/ "../node_modules/core-js-pure/stable/json/stringify.js":
+/*!*************************************************************!*\
+ !*** ../node_modules/core-js-pure/stable/json/stringify.js ***!
+ \*************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
-var isSingleDot = function (segment) {
- return segment === '.' || segment.toLowerCase() === '%2e';
-};
+module.exports = __webpack_require__(/*! ../../es/json/stringify */ "../node_modules/core-js-pure/es/json/stringify.js");
-var isDoubleDot = function (segment) {
- segment = segment.toLowerCase();
- return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
-};
-// States:
-var SCHEME_START = {};
-var SCHEME = {};
-var NO_SCHEME = {};
-var SPECIAL_RELATIVE_OR_AUTHORITY = {};
-var PATH_OR_AUTHORITY = {};
-var RELATIVE = {};
-var RELATIVE_SLASH = {};
-var SPECIAL_AUTHORITY_SLASHES = {};
-var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
-var AUTHORITY = {};
-var HOST = {};
-var HOSTNAME = {};
-var PORT = {};
-var FILE = {};
-var FILE_SLASH = {};
-var FILE_HOST = {};
-var PATH_START = {};
-var PATH = {};
-var CANNOT_BE_A_BASE_URL_PATH = {};
-var QUERY = {};
-var FRAGMENT = {};
-
-// eslint-disable-next-line max-statements
-var parseURL = function (url, input, stateOverride, base) {
- var state = stateOverride || SCHEME_START;
- var pointer = 0;
- var buffer = '';
- var seenAt = false;
- var seenBracket = false;
- var seenPasswordToken = false;
- var codePoints, char, bufferCodePoints, failure;
-
- if (!stateOverride) {
- url.scheme = '';
- url.username = '';
- url.password = '';
- url.host = null;
- url.port = null;
- url.path = [];
- url.query = null;
- url.fragment = null;
- url.cannotBeABaseURL = false;
- input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
- }
+/***/ }),
- input = input.replace(TAB_AND_NEW_LINE, '');
-
- codePoints = arrayFrom(input);
-
- while (pointer <= codePoints.length) {
- char = codePoints[pointer];
- switch (state) {
- case SCHEME_START:
- if (char && ALPHA.test(char)) {
- buffer += char.toLowerCase();
- state = SCHEME;
- } else if (!stateOverride) {
- state = NO_SCHEME;
- continue;
- } else return INVALID_SCHEME;
- break;
+/***/ "../node_modules/core-js-pure/stable/object/keys.js":
+/*!**********************************************************!*\
+ !*** ../node_modules/core-js-pure/stable/object/keys.js ***!
+ \**********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
- case SCHEME:
- if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {
- buffer += char.toLowerCase();
- } else if (char == ':') {
- if (stateOverride && (
- (isSpecial(url) != has(specialSchemes, buffer)) ||
- (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||
- (url.scheme == 'file' && !url.host)
- )) return;
- url.scheme = buffer;
- if (stateOverride) {
- if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;
- return;
- }
- buffer = '';
- if (url.scheme == 'file') {
- state = FILE;
- } else if (isSpecial(url) && base && base.scheme == url.scheme) {
- state = SPECIAL_RELATIVE_OR_AUTHORITY;
- } else if (isSpecial(url)) {
- state = SPECIAL_AUTHORITY_SLASHES;
- } else if (codePoints[pointer + 1] == '/') {
- state = PATH_OR_AUTHORITY;
- pointer++;
- } else {
- url.cannotBeABaseURL = true;
- url.path.push('');
- state = CANNOT_BE_A_BASE_URL_PATH;
- }
- } else if (!stateOverride) {
- buffer = '';
- state = NO_SCHEME;
- pointer = 0;
- continue;
- } else return INVALID_SCHEME;
- break;
+module.exports = __webpack_require__(/*! ../../es/object/keys */ "../node_modules/core-js-pure/es/object/keys.js");
- case NO_SCHEME:
- if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;
- if (base.cannotBeABaseURL && char == '#') {
- url.scheme = base.scheme;
- url.path = base.path.slice();
- url.query = base.query;
- url.fragment = '';
- url.cannotBeABaseURL = true;
- state = FRAGMENT;
- break;
- }
- state = base.scheme == 'file' ? FILE : RELATIVE;
- continue;
- case SPECIAL_RELATIVE_OR_AUTHORITY:
- if (char == '/' && codePoints[pointer + 1] == '/') {
- state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
- pointer++;
- } else {
- state = RELATIVE;
- continue;
- } break;
-
- case PATH_OR_AUTHORITY:
- if (char == '/') {
- state = AUTHORITY;
- break;
- } else {
- state = PATH;
- continue;
- }
+/***/ }),
- case RELATIVE:
- url.scheme = base.scheme;
- if (char == EOF) {
- url.username = base.username;
- url.password = base.password;
- url.host = base.host;
- url.port = base.port;
- url.path = base.path.slice();
- url.query = base.query;
- } else if (char == '/' || (char == '\\' && isSpecial(url))) {
- state = RELATIVE_SLASH;
- } else if (char == '?') {
- url.username = base.username;
- url.password = base.password;
- url.host = base.host;
- url.port = base.port;
- url.path = base.path.slice();
- url.query = '';
- state = QUERY;
- } else if (char == '#') {
- url.username = base.username;
- url.password = base.password;
- url.host = base.host;
- url.port = base.port;
- url.path = base.path.slice();
- url.query = base.query;
- url.fragment = '';
- state = FRAGMENT;
- } else {
- url.username = base.username;
- url.password = base.password;
- url.host = base.host;
- url.port = base.port;
- url.path = base.path.slice();
- url.path.pop();
- state = PATH;
- continue;
- } break;
-
- case RELATIVE_SLASH:
- if (isSpecial(url) && (char == '/' || char == '\\')) {
- state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
- } else if (char == '/') {
- state = AUTHORITY;
- } else {
- url.username = base.username;
- url.password = base.password;
- url.host = base.host;
- url.port = base.port;
- state = PATH;
- continue;
- } break;
-
- case SPECIAL_AUTHORITY_SLASHES:
- state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
- if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;
- pointer++;
- break;
+/***/ "../node_modules/core-js-pure/stable/promise/index.js":
+/*!************************************************************!*\
+ !*** ../node_modules/core-js-pure/stable/promise/index.js ***!
+ \************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
- case SPECIAL_AUTHORITY_IGNORE_SLASHES:
- if (char != '/' && char != '\\') {
- state = AUTHORITY;
- continue;
- } break;
-
- case AUTHORITY:
- if (char == '@') {
- if (seenAt) buffer = '%40' + buffer;
- seenAt = true;
- bufferCodePoints = arrayFrom(buffer);
- for (var i = 0; i < bufferCodePoints.length; i++) {
- var codePoint = bufferCodePoints[i];
- if (codePoint == ':' && !seenPasswordToken) {
- seenPasswordToken = true;
- continue;
- }
- var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
- if (seenPasswordToken) url.password += encodedCodePoints;
- else url.username += encodedCodePoints;
- }
- buffer = '';
- } else if (
- char == EOF || char == '/' || char == '?' || char == '#' ||
- (char == '\\' && isSpecial(url))
- ) {
- if (seenAt && buffer == '') return INVALID_AUTHORITY;
- pointer -= arrayFrom(buffer).length + 1;
- buffer = '';
- state = HOST;
- } else buffer += char;
- break;
+module.exports = __webpack_require__(/*! ../../es/promise */ "../node_modules/core-js-pure/es/promise/index.js");
- case HOST:
- case HOSTNAME:
- if (stateOverride && url.scheme == 'file') {
- state = FILE_HOST;
- continue;
- } else if (char == ':' && !seenBracket) {
- if (buffer == '') return INVALID_HOST;
- failure = parseHost(url, buffer);
- if (failure) return failure;
- buffer = '';
- state = PORT;
- if (stateOverride == HOSTNAME) return;
- } else if (
- char == EOF || char == '/' || char == '?' || char == '#' ||
- (char == '\\' && isSpecial(url))
- ) {
- if (isSpecial(url) && buffer == '') return INVALID_HOST;
- if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;
- failure = parseHost(url, buffer);
- if (failure) return failure;
- buffer = '';
- state = PATH_START;
- if (stateOverride) return;
- continue;
- } else {
- if (char == '[') seenBracket = true;
- else if (char == ']') seenBracket = false;
- buffer += char;
- } break;
-
- case PORT:
- if (DIGIT.test(char)) {
- buffer += char;
- } else if (
- char == EOF || char == '/' || char == '?' || char == '#' ||
- (char == '\\' && isSpecial(url)) ||
- stateOverride
- ) {
- if (buffer != '') {
- var port = parseInt(buffer, 10);
- if (port > 0xFFFF) return INVALID_PORT;
- url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;
- buffer = '';
- }
- if (stateOverride) return;
- state = PATH_START;
- continue;
- } else return INVALID_PORT;
- break;
- case FILE:
- url.scheme = 'file';
- if (char == '/' || char == '\\') state = FILE_SLASH;
- else if (base && base.scheme == 'file') {
- if (char == EOF) {
- url.host = base.host;
- url.path = base.path.slice();
- url.query = base.query;
- } else if (char == '?') {
- url.host = base.host;
- url.path = base.path.slice();
- url.query = '';
- state = QUERY;
- } else if (char == '#') {
- url.host = base.host;
- url.path = base.path.slice();
- url.query = base.query;
- url.fragment = '';
- state = FRAGMENT;
- } else {
- if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
- url.host = base.host;
- url.path = base.path.slice();
- shortenURLsPath(url);
- }
- state = PATH;
- continue;
- }
- } else {
- state = PATH;
- continue;
- } break;
-
- case FILE_SLASH:
- if (char == '/' || char == '\\') {
- state = FILE_HOST;
- break;
- }
- if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
- if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);
- else url.host = base.host;
- }
- state = PATH;
- continue;
+/***/ }),
- case FILE_HOST:
- if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') {
- if (!stateOverride && isWindowsDriveLetter(buffer)) {
- state = PATH;
- } else if (buffer == '') {
- url.host = '';
- if (stateOverride) return;
- state = PATH_START;
- } else {
- failure = parseHost(url, buffer);
- if (failure) return failure;
- if (url.host == 'localhost') url.host = '';
- if (stateOverride) return;
- buffer = '';
- state = PATH_START;
- } continue;
- } else buffer += char;
- break;
+/***/ "../node_modules/core-js-pure/stable/symbol/async-iterator.js":
+/*!********************************************************************!*\
+ !*** ../node_modules/core-js-pure/stable/symbol/async-iterator.js ***!
+ \********************************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
- case PATH_START:
- if (isSpecial(url)) {
- state = PATH;
- if (char != '/' && char != '\\') continue;
- } else if (!stateOverride && char == '?') {
- url.query = '';
- state = QUERY;
- } else if (!stateOverride && char == '#') {
- url.fragment = '';
- state = FRAGMENT;
- } else if (char != EOF) {
- state = PATH;
- if (char != '/') continue;
- } break;
-
- case PATH:
- if (
- char == EOF || char == '/' ||
- (char == '\\' && isSpecial(url)) ||
- (!stateOverride && (char == '?' || char == '#'))
- ) {
- if (isDoubleDot(buffer)) {
- shortenURLsPath(url);
- if (char != '/' && !(char == '\\' && isSpecial(url))) {
- url.path.push('');
- }
- } else if (isSingleDot(buffer)) {
- if (char != '/' && !(char == '\\' && isSpecial(url))) {
- url.path.push('');
- }
- } else {
- if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
- if (url.host) url.host = '';
- buffer = buffer.charAt(0) + ':'; // normalize windows drive letter
- }
- url.path.push(buffer);
- }
- buffer = '';
- if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {
- while (url.path.length > 1 && url.path[0] === '') {
- url.path.shift();
- }
- }
- if (char == '?') {
- url.query = '';
- state = QUERY;
- } else if (char == '#') {
- url.fragment = '';
- state = FRAGMENT;
- }
- } else {
- buffer += percentEncode(char, pathPercentEncodeSet);
- } break;
-
- case CANNOT_BE_A_BASE_URL_PATH:
- if (char == '?') {
- url.query = '';
- state = QUERY;
- } else if (char == '#') {
- url.fragment = '';
- state = FRAGMENT;
- } else if (char != EOF) {
- url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);
- } break;
-
- case QUERY:
- if (!stateOverride && char == '#') {
- url.fragment = '';
- state = FRAGMENT;
- } else if (char != EOF) {
- if (char == "'" && isSpecial(url)) url.query += '%27';
- else if (char == '#') url.query += '%23';
- else url.query += percentEncode(char, C0ControlPercentEncodeSet);
- } break;
-
- case FRAGMENT:
- if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);
- break;
- }
+module.exports = __webpack_require__(/*! ../../es/symbol/async-iterator */ "../node_modules/core-js-pure/es/symbol/async-iterator.js");
- pointer++;
- }
-};
-// `URL` constructor
-// https://url.spec.whatwg.org/#url-class
-var URLConstructor = function URL(url /* , base */) {
- var that = anInstance(this, URLConstructor, 'URL');
- var base = arguments.length > 1 ? arguments[1] : undefined;
- var urlString = String(url);
- var state = setInternalState(that, { type: 'URL' });
- var baseState, failure;
- if (base !== undefined) {
- if (base instanceof URLConstructor) baseState = getInternalURLState(base);
- else {
- failure = parseURL(baseState = {}, String(base));
- if (failure) throw TypeError(failure);
- }
- }
- failure = parseURL(state, urlString, null, baseState);
- if (failure) throw TypeError(failure);
- var searchParams = state.searchParams = new URLSearchParams();
- var searchParamsState = getInternalSearchParamsState(searchParams);
- searchParamsState.updateSearchParams(state.query);
- searchParamsState.updateURL = function () {
- state.query = String(searchParams) || null;
- };
- if (!DESCRIPTORS) {
- that.href = serializeURL.call(that);
- that.origin = getOrigin.call(that);
- that.protocol = getProtocol.call(that);
- that.username = getUsername.call(that);
- that.password = getPassword.call(that);
- that.host = getHost.call(that);
- that.hostname = getHostname.call(that);
- that.port = getPort.call(that);
- that.pathname = getPathname.call(that);
- that.search = getSearch.call(that);
- that.searchParams = getSearchParams.call(that);
- that.hash = getHash.call(that);
- }
-};
+/***/ }),
-var URLPrototype = URLConstructor.prototype;
-
-var serializeURL = function () {
- var url = getInternalURLState(this);
- var scheme = url.scheme;
- var username = url.username;
- var password = url.password;
- var host = url.host;
- var port = url.port;
- var path = url.path;
- var query = url.query;
- var fragment = url.fragment;
- var output = scheme + ':';
- if (host !== null) {
- output += '//';
- if (includesCredentials(url)) {
- output += username + (password ? ':' + password : '') + '@';
- }
- output += serializeHost(host);
- if (port !== null) output += ':' + port;
- } else if (scheme == 'file') output += '//';
- output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
- if (query !== null) output += '?' + query;
- if (fragment !== null) output += '#' + fragment;
- return output;
-};
+/***/ "../node_modules/dom-node-iterator/implementation.js":
+/*!***********************************************************!*\
+ !*** ../node_modules/dom-node-iterator/implementation.js ***!
+ \***********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
-var getOrigin = function () {
- var url = getInternalURLState(this);
- var scheme = url.scheme;
- var port = url.port;
- if (scheme == 'blob') try {
- return new URL(scheme.path[0]).origin;
- } catch (error) {
- return 'null';
- }
- if (scheme == 'file' || !isSpecial(url)) return 'null';
- return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');
-};
+module.exports = __webpack_require__(/*! ./lib/implementation */ "../node_modules/dom-node-iterator/lib/implementation.js")['default'];
-var getProtocol = function () {
- return getInternalURLState(this).scheme + ':';
-};
-var getUsername = function () {
- return getInternalURLState(this).username;
-};
+/***/ }),
-var getPassword = function () {
- return getInternalURLState(this).password;
-};
+/***/ "../node_modules/dom-node-iterator/index.js":
+/*!**************************************************!*\
+ !*** ../node_modules/dom-node-iterator/index.js ***!
+ \**************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
-var getHost = function () {
- var url = getInternalURLState(this);
- var host = url.host;
- var port = url.port;
- return host === null ? ''
- : port === null ? serializeHost(host)
- : serializeHost(host) + ':' + port;
-};
+module.exports = __webpack_require__(/*! ./lib */ "../node_modules/dom-node-iterator/lib/index.js")['default'];
+module.exports.getPolyfill = __webpack_require__(/*! ./polyfill */ "../node_modules/dom-node-iterator/polyfill.js");
+module.exports.implementation = __webpack_require__(/*! ./implementation */ "../node_modules/dom-node-iterator/implementation.js");
+module.exports.shim = __webpack_require__(/*! ./shim */ "../node_modules/dom-node-iterator/shim.js");
-var getHostname = function () {
- var host = getInternalURLState(this).host;
- return host === null ? '' : serializeHost(host);
-};
-var getPort = function () {
- var port = getInternalURLState(this).port;
- return port === null ? '' : String(port);
-};
+/***/ }),
-var getPathname = function () {
- var url = getInternalURLState(this);
- var path = url.path;
- return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
-};
+/***/ "../node_modules/dom-node-iterator/lib/adapter.js":
+/*!********************************************************!*\
+ !*** ../node_modules/dom-node-iterator/lib/adapter.js ***!
+ \********************************************************/
+/*! no static exports found */
+/***/ (function(module, exports, __webpack_require__) {
-var getSearch = function () {
- var query = getInternalURLState(this).query;
- return query ? '?' + query : '';
-};
+"use strict";
-var getSearchParams = function () {
- return getInternalURLState(this).searchParams;
-};
-var getHash = function () {
- var fragment = getInternalURLState(this).fragment;
- return fragment ? '#' + fragment : '';
-};
+exports.__esModule = true;
-var accessorDescriptor = function (getter, setter) {
- return { get: getter, set: setter, configurable: true, enumerable: true };
-};
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-if (DESCRIPTORS) {
- defineProperties(URLPrototype, {
- // `URL.prototype.href` accessors pair
- // https://url.spec.whatwg.org/#dom-url-href
- href: accessorDescriptor(serializeURL, function (href) {
- var url = getInternalURLState(this);
- var urlString = String(href);
- var failure = parseURL(url, urlString);
- if (failure) throw TypeError(failure);
- getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
- }),
- // `URL.prototype.origin` getter
- // https://url.spec.whatwg.org/#dom-url-origin
- origin: accessorDescriptor(getOrigin),
- // `URL.prototype.protocol` accessors pair
- // https://url.spec.whatwg.org/#dom-url-protocol
- protocol: accessorDescriptor(getProtocol, function (protocol) {
- var url = getInternalURLState(this);
- parseURL(url, String(protocol) + ':', SCHEME_START);
- }),
- // `URL.prototype.username` accessors pair
- // https://url.spec.whatwg.org/#dom-url-username
- username: accessorDescriptor(getUsername, function (username) {
- var url = getInternalURLState(this);
- var codePoints = arrayFrom(String(username));
- if (cannotHaveUsernamePasswordPort(url)) return;
- url.username = '';
- for (var i = 0; i < codePoints.length; i++) {
- url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
- }
- }),
- // `URL.prototype.password` accessors pair
- // https://url.spec.whatwg.org/#dom-url-password
- password: accessorDescriptor(getPassword, function (password) {
- var url = getInternalURLState(this);
- var codePoints = arrayFrom(String(password));
- if (cannotHaveUsernamePasswordPort(url)) return;
- url.password = '';
- for (var i = 0; i < codePoints.length; i++) {
- url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
- }
- }),
- // `URL.prototype.host` accessors pair
- // https://url.spec.whatwg.org/#dom-url-host
- host: accessorDescriptor(getHost, function (host) {
- var url = getInternalURLState(this);
- if (url.cannotBeABaseURL) return;
- parseURL(url, String(host), HOST);
- }),
- // `URL.prototype.hostname` accessors pair
- // https://url.spec.whatwg.org/#dom-url-hostname
- hostname: accessorDescriptor(getHostname, function (hostname) {
- var url = getInternalURLState(this);
- if (url.cannotBeABaseURL) return;
- parseURL(url, String(hostname), HOSTNAME);
- }),
- // `URL.prototype.port` accessors pair
- // https://url.spec.whatwg.org/#dom-url-port
- port: accessorDescriptor(getPort, function (port) {
- var url = getInternalURLState(this);
- if (cannotHaveUsernamePasswordPort(url)) return;
- port = String(port);
- if (port == '') url.port = null;
- else parseURL(url, port, PORT);
- }),
- // `URL.prototype.pathname` accessors pair
- // https://url.spec.whatwg.org/#dom-url-pathname
- pathname: accessorDescriptor(getPathname, function (pathname) {
- var url = getInternalURLState(this);
- if (url.cannotBeABaseURL) return;
- url.path = [];
- parseURL(url, pathname + '', PATH_START);
- }),
- // `URL.prototype.search` accessors pair
- // https://url.spec.whatwg.org/#dom-url-search
- search: accessorDescriptor(getSearch, function (search) {
- var url = getInternalURLState(this);
- search = String(search);
- if (search == '') {
- url.query = null;
- } else {
- if ('?' == search.charAt(0)) search = search.slice(1);
- url.query = '';
- parseURL(url, search, QUERY);
- }
- getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
- }),
- // `URL.prototype.searchParams` getter
- // https://url.spec.whatwg.org/#dom-url-searchparams
- searchParams: accessorDescriptor(getSearchParams),
- // `URL.prototype.hash` accessors pair
- // https://url.spec.whatwg.org/#dom-url-hash
- hash: accessorDescriptor(getHash, function (hash) {
- var url = getInternalURLState(this);
- hash = String(hash);
- if (hash == '') {
- url.fragment = null;
- return;
- }
- if ('#' == hash.charAt(0)) hash = hash.slice(1);
- url.fragment = '';
- parseURL(url, hash, FRAGMENT);
- })
- });
-}
+exports['default'] = createNodeIterator;
-// `URL.prototype.toJSON` method
-// https://url.spec.whatwg.org/#dom-url-tojson
-redefine(URLPrototype, 'toJSON', function toJSON() {
- return serializeURL.call(this);
-}, { enumerable: true });
-
-// `URL.prototype.toString` method
-// https://url.spec.whatwg.org/#URL-stringification-behavior
-redefine(URLPrototype, 'toString', function toString() {
- return serializeURL.call(this);
-}, { enumerable: true });
-
-if (NativeURL) {
- var nativeCreateObjectURL = NativeURL.createObjectURL;
- var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
- // `URL.createObjectURL` method
- // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
- // eslint-disable-next-line no-unused-vars
- if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {
- return nativeCreateObjectURL.apply(NativeURL, arguments);
- });
- // `URL.revokeObjectURL` method
- // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
- // eslint-disable-next-line no-unused-vars
- if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {
- return nativeRevokeObjectURL.apply(NativeURL, arguments);
- });
-}
-setToStringTag(URLConstructor, 'URL');
+function createNodeIterator(root) {
+ var whatToShow = arguments.length <= 1 || arguments[1] === undefined ? 0xFFFFFFFF : arguments[1];
+ var filter = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];
-$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
- URL: URLConstructor
-});
+ var doc = root.nodeType == 9 || root.ownerDocument;
+ var iter = doc.createNodeIterator(root, whatToShow, filter, false);
+ return new NodeIterator(iter, root, whatToShow, filter);
+}
+var NodeIterator = function () {
+ function NodeIterator(iter, root, whatToShow, filter) {
+ _classCallCheck(this, NodeIterator);
-/***/ }),
+ this.root = root;
+ this.whatToShow = whatToShow;
+ this.filter = filter;
+ this.referenceNode = root;
+ this.pointerBeforeReferenceNode = true;
+ this._iter = iter;
+ }
-/***/ "../node_modules/core-js-pure/modules/web.url.to-json.js":
-/*!***************************************************************!*\
- !*** ../node_modules/core-js-pure/modules/web.url.to-json.js ***!
- \***************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports) {
+ NodeIterator.prototype.nextNode = function nextNode() {
+ var result = this._iter.nextNode();
+ this.pointerBeforeReferenceNode = false;
+ if (result === null) return null;
+ this.referenceNode = result;
+ return this.referenceNode;
+ };
-// empty
+ NodeIterator.prototype.previousNode = function previousNode() {
+ var result = this._iter.previousNode();
+ this.pointerBeforeReferenceNode = true;
+ if (result === null) return null;
+ this.referenceNode = result;
+ return this.referenceNode;
+ };
+
+ NodeIterator.prototype.toString = function toString() {
+ return '[object NodeIterator]';
+ };
+ return NodeIterator;
+}();
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9hZGFwdGVyLmpzIl0sIm5hbWVzIjpbImNyZWF0ZU5vZGVJdGVyYXRvciIsInJvb3QiLCJ3aGF0VG9TaG93IiwiZmlsdGVyIiwiZG9jIiwibm9kZVR5cGUiLCJvd25lckRvY3VtZW50IiwiaXRlciIsIk5vZGVJdGVyYXRvciIsInJlZmVyZW5jZU5vZGUiLCJwb2ludGVyQmVmb3JlUmVmZXJlbmNlTm9kZSIsIl9pdGVyIiwibmV4dE5vZGUiLCJyZXN1bHQiLCJwcmV2aW91c05vZGUiLCJ0b1N0cmluZyJdLCJtYXBwaW5ncyI6Ijs7Ozs7O3FCQUFlQSxrQjs7O0FBR2YsU0FBU0Esa0JBQVQsQ0FBNEJDLElBQTVCLEVBQTBFO0FBQUEsTU [...]
/***/ }),
-/***/ "../node_modules/core-js-pure/stable/array/is-array.js":
-/*!*************************************************************!*\
- !*** ../node_modules/core-js-pure/stable/array/is-array.js ***!
- \*************************************************************/
+/***/ "../node_modules/dom-node-iterator/lib/builtin.js":
+/*!********************************************************!*\
+ !*** ../node_modules/dom-node-iterator/lib/builtin.js ***!
+ \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = __webpack_require__(/*! ../../es/array/is-array */ "../node_modules/core-js-pure/es/array/is-array.js");
+"use strict";
-/***/ }),
+exports.__esModule = true;
+exports["default"] = createNodeIterator;
-/***/ "../node_modules/core-js-pure/stable/array/virtual/for-each.js":
-/*!*********************************************************************!*\
- !*** ../node_modules/core-js-pure/stable/array/virtual/for-each.js ***!
- \*********************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-module.exports = __webpack_require__(/*! ../../../es/array/virtual/for-each */ "../node_modules/core-js-pure/es/array/virtual/for-each.js");
+function createNodeIterator(root) {
+ var whatToShow = arguments.length <= 1 || arguments[1] === undefined ? 0xFFFFFFFF : arguments[1];
+ var filter = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];
+ var doc = root.ownerDocument;
+ return doc.createNodeIterator.call(doc, root, whatToShow, filter);
+}
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9idWlsdGluLmpzIl0sIm5hbWVzIjpbImNyZWF0ZU5vZGVJdGVyYXRvciIsInJvb3QiLCJ3aGF0VG9TaG93IiwiZmlsdGVyIiwiZG9jIiwib3duZXJEb2N1bWVudCIsImNhbGwiXSwibWFwcGluZ3MiOiI7OztxQkFBZUEsa0I7OztBQUdmLFNBQVNBLGtCQUFULENBQTRCQyxJQUE1QixFQUEwRTtBQUFBLE1BQXhDQyxVQUF3Qyx5REFBM0IsVUFBMkI7QUFBQSxNQUFmQyxNQUFlLHlEQUFOLElBQU07O0FBQ3hFLE1BQU1DLE1BQU1ILEtBQUtJLGFBQWpCO0FBQ0EsU0FBT0QsSUFBSUosa0JBQUosQ0FBdUJNLElBQXZCLENBQTRCRixHQU [...]
/***/ }),
-/***/ "../node_modules/core-js-pure/stable/instance/concat.js":
-/*!**************************************************************!*\
- !*** ../node_modules/core-js-pure/stable/instance/concat.js ***!
- \**************************************************************/
+/***/ "../node_modules/dom-node-iterator/lib/implementation.js":
+/*!***************************************************************!*\
+ !*** ../node_modules/dom-node-iterator/lib/implementation.js ***!
+ \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = __webpack_require__(/*! ../../es/instance/concat */ "../node_modules/core-js-pure/es/instance/concat.js");
+"use strict";
-/***/ }),
+exports.__esModule = true;
-/***/ "../node_modules/core-js-pure/stable/instance/every.js":
-/*!*************************************************************!*\
- !*** ../node_modules/core-js-pure/stable/instance/every.js ***!
- \*************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-module.exports = __webpack_require__(/*! ../../es/instance/every */ "../node_modules/core-js-pure/es/instance/every.js");
+exports['default'] = createNodeIterator;
-/***/ }),
+function createNodeIterator(root) {
+ var whatToShow = arguments.length <= 1 || arguments[1] === undefined ? 0xFFFFFFFF : arguments[1];
+ var filter = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];
-/***/ "../node_modules/core-js-pure/stable/instance/filter.js":
-/*!**************************************************************!*\
- !*** ../node_modules/core-js-pure/stable/instance/filter.js ***!
- \**************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+ return new NodeIterator(root, whatToShow, filter);
+}
-module.exports = __webpack_require__(/*! ../../es/instance/filter */ "../node_modules/core-js-pure/es/instance/filter.js");
+var NodeIterator = function () {
+ function NodeIterator(root, whatToShow, filter) {
+ _classCallCheck(this, NodeIterator);
+ this.root = root;
+ this.whatToShow = whatToShow;
+ this.filter = filter;
+ this.referenceNode = root;
+ this.pointerBeforeReferenceNode = true;
+ this._filter = function (node) {
+ return filter ? filter(node) === 1 : true;
+ };
+ this._show = function (node) {
+ return whatToShow >> node.nodeType - 1 & 1 === 1;
+ };
+ }
-/***/ }),
+ NodeIterator.prototype.nextNode = function nextNode() {
+ var before = this.pointerBeforeReferenceNode;
+ this.pointerBeforeReferenceNode = false;
-/***/ "../node_modules/core-js-pure/stable/instance/flat-map.js":
-/*!****************************************************************!*\
- !*** ../node_modules/core-js-pure/stable/instance/flat-map.js ***!
- \****************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+ var node = this.referenceNode;
+ if (before && this._show(node) && this._filter(node)) return node;
-module.exports = __webpack_require__(/*! ../../es/instance/flat-map */ "../node_modules/core-js-pure/es/instance/flat-map.js");
+ do {
+ if (node.firstChild) {
+ node = node.firstChild;
+ continue;
+ }
+ do {
+ if (node === this.root) return null;
+ if (node.nextSibling) break;
+ node = node.parentNode;
+ } while (node);
-/***/ }),
+ node = node.nextSibling;
+ } while (!this._show(node) || !this._filter(node));
-/***/ "../node_modules/core-js-pure/stable/instance/for-each.js":
-/*!****************************************************************!*\
- !*** ../node_modules/core-js-pure/stable/instance/for-each.js ***!
- \****************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+ this.referenceNode = node;
+ this.pointerBeforeReferenceNode = false;
+ return node;
+ };
-__webpack_require__(/*! ../../modules/web.dom-collections.iterator */ "../node_modules/core-js-pure/modules/web.dom-collections.iterator.js");
-var forEach = __webpack_require__(/*! ../array/virtual/for-each */ "../node_modules/core-js-pure/stable/array/virtual/for-each.js");
-var classof = __webpack_require__(/*! ../../internals/classof */ "../node_modules/core-js-pure/internals/classof.js");
-var ArrayPrototype = Array.prototype;
+ NodeIterator.prototype.previousNode = function previousNode() {
+ var before = this.pointerBeforeReferenceNode;
+ this.pointerBeforeReferenceNode = true;
-var DOMIterables = {
- DOMTokenList: true,
- NodeList: true
-};
+ var node = this.referenceNode;
+ if (!before && this._show(node) && this._filter(node)) return node;
-module.exports = function (it) {
- var own = it.forEach;
- return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.forEach)
- // eslint-disable-next-line no-prototype-builtins
- || DOMIterables.hasOwnProperty(classof(it)) ? forEach : own;
-};
+ do {
+ if (node === this.root) return null;
+ if (node.previousSibling) {
+ node = node.previousSibling;
+ while (node.lastChild) {
+ node = node.lastChild;
+ }continue;
+ }
-/***/ }),
+ node = node.parentNode;
+ } while (!this._show(node) || !this._filter(node));
-/***/ "../node_modules/core-js-pure/stable/instance/index-of.js":
-/*!****************************************************************!*\
- !*** ../node_modules/core-js-pure/stable/instance/index-of.js ***!
- \****************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+ this.referenceNode = node;
+ this.pointerBeforeReferenceNode = true;
+ return node;
+ };
-module.exports = __webpack_require__(/*! ../../es/instance/index-of */ "../node_modules/core-js-pure/es/instance/index-of.js");
+ NodeIterator.prototype.toString = function toString() {
+ return '[object NodeIterator]';
+ };
+ return NodeIterator;
+}();
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbXBsZW1lbnRhdGlvbi5qcyJdLCJuYW1lcyI6WyJjcmVhdGVOb2RlSXRlcmF0b3IiLCJyb290Iiwid2hhdFRvU2hvdyIsImZpbHRlciIsIk5vZGVJdGVyYXRvciIsInJlZmVyZW5jZU5vZGUiLCJwb2ludGVyQmVmb3JlUmVmZXJlbmNlTm9kZSIsIl9maWx0ZXIiLCJub2RlIiwiX3Nob3ciLCJub2RlVHlwZSIsIm5leHROb2RlIiwiYmVmb3JlIiwiZmlyc3RDaGlsZCIsIm5leHRTaWJsaW5nIiwicGFyZW50Tm9kZSIsInByZXZpb3VzTm9kZSIsInByZXZpb3VzU2libGluZyIsImxhc3RDaGlsZCIsInRvU3RyaW5nIl0sIm1hcHBpbm [...]
/***/ }),
-/***/ "../node_modules/core-js-pure/stable/instance/map.js":
-/*!***********************************************************!*\
- !*** ../node_modules/core-js-pure/stable/instance/map.js ***!
- \***********************************************************/
+/***/ "../node_modules/dom-node-iterator/lib/index.js":
+/*!******************************************************!*\
+ !*** ../node_modules/dom-node-iterator/lib/index.js ***!
+ \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = __webpack_require__(/*! ../../es/instance/map */ "../node_modules/core-js-pure/es/instance/map.js");
+"use strict";
-/***/ }),
+exports.__esModule = true;
-/***/ "../node_modules/core-js-pure/stable/instance/slice.js":
-/*!*************************************************************!*\
- !*** ../node_modules/core-js-pure/stable/instance/slice.js ***!
- \*************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+var _polyfill = __webpack_require__(/*! ./polyfill */ "../node_modules/dom-node-iterator/lib/polyfill.js");
-module.exports = __webpack_require__(/*! ../../es/instance/slice */ "../node_modules/core-js-pure/es/instance/slice.js");
+var _polyfill2 = _interopRequireDefault(_polyfill);
+var _implementation = __webpack_require__(/*! ./implementation */ "../node_modules/dom-node-iterator/lib/implementation.js");
-/***/ }),
+var _implementation2 = _interopRequireDefault(_implementation);
-/***/ "../node_modules/core-js-pure/stable/instance/some.js":
-/*!************************************************************!*\
- !*** ../node_modules/core-js-pure/stable/instance/some.js ***!
- \************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+var _shim = __webpack_require__(/*! ./shim */ "../node_modules/dom-node-iterator/lib/shim.js");
-module.exports = __webpack_require__(/*! ../../es/instance/some */ "../node_modules/core-js-pure/es/instance/some.js");
+var _shim2 = _interopRequireDefault(_shim);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+
+var polyfill = (0, _polyfill2['default'])();
+polyfill.implementation = _implementation2['default'];
+polyfill.shim = _shim2['default'];
+exports['default'] = polyfill;
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJwb2x5ZmlsbCIsImltcGxlbWVudGF0aW9uIiwic2hpbSJdLCJtYXBwaW5ncyI6Ijs7OztBQUFBOzs7O0FBQ0E7Ozs7QUFDQTs7Ozs7O0FBRUEsSUFBTUEsV0FBVyw0QkFBakI7QUFDQUEsU0FBU0MsY0FBVDtBQUNBRCxTQUFTRSxJQUFUOztxQkFFZUYsUSIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGRlZmF1bHQgYXMgZ2V0UG9seWZpbGwgfSBmcm9tICcuL3BvbHlmaWxsJ1xuaW1wb3J0IHsgZGVmYXVsdCBhcyBpbXBsZW1lbnRhdGlvbiB9IGZyb20gJy [...]
/***/ }),
-/***/ "../node_modules/core-js-pure/stable/instance/sort.js":
-/*!************************************************************!*\
- !*** ../node_modules/core-js-pure/stable/instance/sort.js ***!
- \************************************************************/
+/***/ "../node_modules/dom-node-iterator/lib/polyfill.js":
+/*!*********************************************************!*\
+ !*** ../node_modules/dom-node-iterator/lib/polyfill.js ***!
+ \*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = __webpack_require__(/*! ../../es/instance/sort */ "../node_modules/core-js-pure/es/instance/sort.js");
+"use strict";
-/***/ }),
+exports.__esModule = true;
+exports['default'] = getPolyfill;
-/***/ "../node_modules/core-js-pure/stable/json/stringify.js":
-/*!*************************************************************!*\
- !*** ../node_modules/core-js-pure/stable/json/stringify.js ***!
- \*************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+var _adapter = __webpack_require__(/*! ./adapter */ "../node_modules/dom-node-iterator/lib/adapter.js");
-module.exports = __webpack_require__(/*! ../../es/json/stringify */ "../node_modules/core-js-pure/es/json/stringify.js");
+var _adapter2 = _interopRequireDefault(_adapter);
+
+var _builtin = __webpack_require__(/*! ./builtin */ "../node_modules/dom-node-iterator/lib/builtin.js");
+var _builtin2 = _interopRequireDefault(_builtin);
-/***/ }),
+var _implementation = __webpack_require__(/*! ./implementation */ "../node_modules/dom-node-iterator/lib/implementation.js");
-/***/ "../node_modules/core-js-pure/stable/object/keys.js":
-/*!**********************************************************!*\
- !*** ../node_modules/core-js-pure/stable/object/keys.js ***!
- \**********************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+var _implementation2 = _interopRequireDefault(_implementation);
-module.exports = __webpack_require__(/*! ../../es/object/keys */ "../node_modules/core-js-pure/es/object/keys.js");
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+function getPolyfill() {
+ try {
+ var doc = typeof document === 'undefined' ? {} : document;
+ var iter = (0, _builtin2['default'])(doc, 0xFFFFFFFF, null, false);
+ if (iter.referenceNode === doc) return _builtin2['default'];
+ return _adapter2['default'];
+ } catch (_) {
+ return _implementation2['default'];
+ }
+} /*global document*/
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wb2x5ZmlsbC5qcyJdLCJuYW1lcyI6WyJnZXRQb2x5ZmlsbCIsImRvYyIsImRvY3VtZW50IiwiaXRlciIsInJlZmVyZW5jZU5vZGUiLCJfIl0sIm1hcHBpbmdzIjoiOzs7cUJBTXdCQSxXOztBQUx4Qjs7OztBQUNBOzs7O0FBQ0E7Ozs7OztBQUdlLFNBQVNBLFdBQVQsR0FBdUI7QUFDcEMsTUFBSTtBQUNGLFFBQU1DLE1BQU0sT0FBT0MsUUFBUCxLQUFxQixXQUFyQixHQUFtQyxFQUFuQyxHQUF3Q0EsUUFBcEQ7QUFDQSxRQUFNQyxPQUFPLDBCQUFRRixHQUFSLEVBQWEsVUFBYixFQUF5QixJQUF6QixFQUErQixLQUEvQixDQUFiO0 [...]
/***/ }),
-/***/ "../node_modules/core-js-pure/stable/promise/index.js":
-/*!************************************************************!*\
- !*** ../node_modules/core-js-pure/stable/promise/index.js ***!
- \************************************************************/
+/***/ "../node_modules/dom-node-iterator/lib/shim.js":
+/*!*****************************************************!*\
+ !*** ../node_modules/dom-node-iterator/lib/shim.js ***!
+ \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = __webpack_require__(/*! ../../es/promise */ "../node_modules/core-js-pure/es/promise/index.js");
-
+"use strict";
-/***/ }),
-/***/ "../node_modules/core-js-pure/stable/symbol/async-iterator.js":
-/*!********************************************************************!*\
- !*** ../node_modules/core-js-pure/stable/symbol/async-iterator.js ***!
- \********************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+exports.__esModule = true;
+exports['default'] = shim;
-module.exports = __webpack_require__(/*! ../../es/symbol/async-iterator */ "../node_modules/core-js-pure/es/symbol/async-iterator.js");
+var _builtin = __webpack_require__(/*! ./builtin */ "../node_modules/dom-node-iterator/lib/builtin.js");
+var _builtin2 = _interopRequireDefault(_builtin);
-/***/ }),
+var _polyfill = __webpack_require__(/*! ./polyfill */ "../node_modules/dom-node-iterator/lib/polyfill.js");
-/***/ "../node_modules/core-js-pure/stable/url/index.js":
-/*!********************************************************!*\
- !*** ../node_modules/core-js-pure/stable/url/index.js ***!
- \********************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+var _polyfill2 = _interopRequireDefault(_polyfill);
-module.exports = __webpack_require__(/*! ../../web/url */ "../node_modules/core-js-pure/web/url.js");
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+/*global document*/
+function shim() {
+ var doc = typeof document === 'undefined' ? {} : document;
+ var polyfill = (0, _polyfill2['default'])();
+ if (polyfill !== _builtin2['default']) doc.createNodeIterator = polyfill;
+ return polyfill;
+}
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9zaGltLmpzIl0sIm5hbWVzIjpbInNoaW0iLCJkb2MiLCJkb2N1bWVudCIsInBvbHlmaWxsIiwiY3JlYXRlTm9kZUl0ZXJhdG9yIl0sIm1hcHBpbmdzIjoiOzs7cUJBS3dCQSxJOztBQUp4Qjs7OztBQUNBOzs7Ozs7QUFGQTtBQUtlLFNBQVNBLElBQVQsR0FBZ0I7QUFDN0IsTUFBTUMsTUFBTSxPQUFPQyxRQUFQLEtBQXFCLFdBQXJCLEdBQW1DLEVBQW5DLEdBQXdDQSxRQUFwRDtBQUNBLE1BQU1DLFdBQVcsNEJBQWpCO0FBQ0EsTUFBSUEsaUNBQUosRUFBMEJGLElBQUlHLGtCQUFKLEdBQXlCRCxRQUF6QjtBQUMxQixTQUFPQSxRQU [...]
/***/ }),
-/***/ "../node_modules/core-js-pure/web/url.js":
-/*!***********************************************!*\
- !*** ../node_modules/core-js-pure/web/url.js ***!
- \***********************************************/
+/***/ "../node_modules/dom-node-iterator/polyfill.js":
+/*!*****************************************************!*\
+ !*** ../node_modules/dom-node-iterator/polyfill.js ***!
+ \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-__webpack_require__(/*! ../modules/web.url */ "../node_modules/core-js-pure/modules/web.url.js");
-__webpack_require__(/*! ../modules/web.url.to-json */ "../node_modules/core-js-pure/modules/web.url.to-json.js");
-__webpack_require__(/*! ../modules/web.url-search-params */ "../node_modules/core-js-pure/modules/web.url-search-params.js");
-var path = __webpack_require__(/*! ../internals/path */ "../node_modules/core-js-pure/internals/path.js");
-
-module.exports = path.URL;
+module.exports = __webpack_require__(/*! ./lib/polyfill */ "../node_modules/dom-node-iterator/lib/polyfill.js")['default'];
/***/ }),
-/***/ "../node_modules/dom-node-iterator/implementation.js":
-/*!***********************************************************!*\
- !*** ../node_modules/dom-node-iterator/implementation.js ***!
- \***********************************************************/
+/***/ "../node_modules/dom-node-iterator/shim.js":
+/*!*************************************************!*\
+ !*** ../node_modules/dom-node-iterator/shim.js ***!
+ \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = __webpack_require__(/*! ./lib/implementation */ "../node_modules/dom-node-iterator/lib/implementation.js")['default'];
+module.exports = __webpack_require__(/*! ./lib/shim */ "../node_modules/dom-node-iterator/lib/shim.js")['default'];
/***/ }),
-/***/ "../node_modules/dom-node-iterator/index.js":
-/*!**************************************************!*\
- !*** ../node_modules/dom-node-iterator/index.js ***!
- \**************************************************/
+/***/ "../node_modules/dom-seek/index.js":
+/*!*****************************************!*\
+ !*** ../node_modules/dom-seek/index.js ***!
+ \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = __webpack_require__(/*! ./lib */ "../node_modules/dom-node-iterator/lib/index.js")['default'];
-module.exports.getPolyfill = __webpack_require__(/*! ./polyfill */ "../node_modules/dom-node-iterator/polyfill.js");
-module.exports.implementation = __webpack_require__(/*! ./implementation */ "../node_modules/dom-node-iterator/implementation.js");
-module.exports.shim = __webpack_require__(/*! ./shim */ "../node_modules/dom-node-iterator/shim.js");
+module.exports = __webpack_require__(/*! ./lib */ "../node_modules/dom-seek/lib/index.js")['default'];
/***/ }),
-/***/ "../node_modules/dom-node-iterator/lib/adapter.js":
-/*!********************************************************!*\
- !*** ../node_modules/dom-node-iterator/lib/adapter.js ***!
- \********************************************************/
+/***/ "../node_modules/dom-seek/lib/index.js":
+/*!*********************************************!*\
+ !*** ../node_modules/dom-seek/lib/index.js ***!
+ \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
@@ -8217,3547 +6711,2161 @@ module.exports.shim = __webpack_require__(/*! ./shim */ "../node_modules/dom-nod
exports.__esModule = true;
+exports['default'] = seek;
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-exports['default'] = createNodeIterator;
+var _ancestors = __webpack_require__(/*! ancestors */ "../node_modules/ancestors/index.js");
+var _ancestors2 = _interopRequireDefault(_ancestors);
-function createNodeIterator(root) {
- var whatToShow = arguments.length <= 1 || arguments[1] === undefined ? 0xFFFFFFFF : arguments[1];
- var filter = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];
+var _indexOf = __webpack_require__(/*! index-of */ "../node_modules/index-of/index.js");
- var doc = root.nodeType == 9 || root.ownerDocument;
- var iter = doc.createNodeIterator(root, whatToShow, filter, false);
- return new NodeIterator(iter, root, whatToShow, filter);
-}
+var _indexOf2 = _interopRequireDefault(_indexOf);
-var NodeIterator = function () {
- function NodeIterator(iter, root, whatToShow, filter) {
- _classCallCheck(this, NodeIterator);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- this.root = root;
- this.whatToShow = whatToShow;
- this.filter = filter;
- this.referenceNode = root;
- this.pointerBeforeReferenceNode = true;
- this._iter = iter;
- }
+var E_SHOW = 'Argument 1 of seek must use filter NodeFilter.SHOW_TEXT.';
+var E_WHERE = 'Argument 2 of seek must be a number or a Text Node.';
- NodeIterator.prototype.nextNode = function nextNode() {
- var result = this._iter.nextNode();
- this.pointerBeforeReferenceNode = false;
- if (result === null) return null;
- this.referenceNode = result;
- return this.referenceNode;
- };
+var SHOW_TEXT = 4;
+var TEXT_NODE = 3;
- NodeIterator.prototype.previousNode = function previousNode() {
- var result = this._iter.previousNode();
- this.pointerBeforeReferenceNode = true;
- if (result === null) return null;
- this.referenceNode = result;
- return this.referenceNode;
- };
+function seek(iter, where) {
+ if (iter.whatToShow !== SHOW_TEXT) {
+ throw new Error(E_SHOW);
+ }
- NodeIterator.prototype.toString = function toString() {
- return '[object NodeIterator]';
- };
+ var count = 0;
+ var node = iter.referenceNode;
+ var predicates = null;
- return NodeIterator;
-}();
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9hZGFwdGVyLmpzIl0sIm5hbWVzIjpbImNyZWF0ZU5vZGVJdGVyYXRvciIsInJvb3QiLCJ3aGF0VG9TaG93IiwiZmlsdGVyIiwiZG9jIiwibm9kZVR5cGUiLCJvd25lckRvY3VtZW50IiwiaXRlciIsIk5vZGVJdGVyYXRvciIsInJlZmVyZW5jZU5vZGUiLCJwb2ludGVyQmVmb3JlUmVmZXJlbmNlTm9kZSIsIl9pdGVyIiwibmV4dE5vZGUiLCJyZXN1bHQiLCJwcmV2aW91c05vZGUiLCJ0b1N0cmluZyJdLCJtYXBwaW5ncyI6Ijs7Ozs7O3FCQUFlQSxrQjs7O0FBR2YsU0FBU0Esa0JBQVQsQ0FBNEJDLElBQTVCLEVBQTBFO0FBQUEsTU [...]
+ if (isNumber(where)) {
+ predicates = {
+ forward: function forward() {
+ return count < where;
+ },
+ backward: function backward() {
+ return count > where;
+ }
+ };
+ } else if (isText(where)) {
+ var forward = before(node, where) ? function () {
+ return false;
+ } : function () {
+ return node !== where;
+ };
+ var backward = function backward() {
+ return node != where || !iter.pointerBeforeReferenceNode;
+ };
+ predicates = { forward: forward, backward: backward };
+ } else {
+ throw new Error(E_WHERE);
+ }
-/***/ }),
+ while (predicates.forward() && (node = iter.nextNode()) !== null) {
+ count += node.nodeValue.length;
+ }
-/***/ "../node_modules/dom-node-iterator/lib/builtin.js":
-/*!********************************************************!*\
- !*** ../node_modules/dom-node-iterator/lib/builtin.js ***!
- \********************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+ while (predicates.backward() && (node = iter.previousNode()) !== null) {
+ count -= node.nodeValue.length;
+ }
-"use strict";
+ return count;
+}
+function isNumber(n) {
+ return !isNaN(parseInt(n)) && isFinite(n);
+}
-exports.__esModule = true;
-exports["default"] = createNodeIterator;
+function isText(node) {
+ return node.nodeType === TEXT_NODE;
+}
+function before(ref, node) {
+ if (ref === node) return false;
-function createNodeIterator(root) {
- var whatToShow = arguments.length <= 1 || arguments[1] === undefined ? 0xFFFFFFFF : arguments[1];
- var filter = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];
+ var common = null;
+ var left = [ref].concat((0, _ancestors2['default'])(ref)).reverse();
+ var right = [node].concat((0, _ancestors2['default'])(node)).reverse();
- var doc = root.ownerDocument;
- return doc.createNodeIterator.call(doc, root, whatToShow, filter);
+ while (left[0] === right[0]) {
+ common = left.shift();
+ right.shift();
+ }
+
+ left = left[0];
+ right = right[0];
+
+ var l = (0, _indexOf2['default'])(common.childNodes, left);
+ var r = (0, _indexOf2['default'])(common.childNodes, right);
+
+ return l > r;
}
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9idWlsdGluLmpzIl0sIm5hbWVzIjpbImNyZWF0ZU5vZGVJdGVyYXRvciIsInJvb3QiLCJ3aGF0VG9TaG93IiwiZmlsdGVyIiwiZG9jIiwib3duZXJEb2N1bWVudCIsImNhbGwiXSwibWFwcGluZ3MiOiI7OztxQkFBZUEsa0I7OztBQUdmLFNBQVNBLGtCQUFULENBQTRCQyxJQUE1QixFQUEwRTtBQUFBLE1BQXhDQyxVQUF3Qyx5REFBM0IsVUFBMkI7QUFBQSxNQUFmQyxNQUFlLHlEQUFOLElBQU07O0FBQ3hFLE1BQU1DLE1BQU1ILEtBQUtJLGFBQWpCO0FBQ0EsU0FBT0QsSUFBSUosa0JBQUosQ0FBdUJNLElBQXZCLENBQTRCRixHQU [...]
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJzZWVrIiwiRV9TSE9XIiwiRV9XSEVSRSIsIlNIT1dfVEVYVCIsIlRFWFRfTk9ERSIsIml0ZXIiLCJ3aGVyZSIsIndoYXRUb1Nob3ciLCJFcnJvciIsImNvdW50Iiwibm9kZSIsInJlZmVyZW5jZU5vZGUiLCJwcmVkaWNhdGVzIiwiaXNOdW1iZXIiLCJmb3J3YXJkIiwiYmFja3dhcmQiLCJpc1RleHQiLCJiZWZvcmUiLCJwb2ludGVyQmVmb3JlUmVmZXJlbmNlTm9kZSIsIm5leHROb2RlIiwibm9kZVZhbHVlIiwibGVuZ3RoIiwicHJldmlvdXNOb2RlIiwibiIsImlzTmFOIiwicGFyc2VJbnQiLC [...]
/***/ }),
-/***/ "../node_modules/dom-node-iterator/lib/implementation.js":
-/*!***************************************************************!*\
- !*** ../node_modules/dom-node-iterator/lib/implementation.js ***!
- \***************************************************************/
+/***/ "../node_modules/index-of/index.js":
+/*!*****************************************!*\
+ !*** ../node_modules/index-of/index.js ***!
+ \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+/*!
+ * index-of <https://github.com/jonschlinkert/index-of>
+ *
+ * Copyright (c) 2014-2015 Jon Schlinkert.
+ * Licensed under the MIT license.
+ */
-exports.__esModule = true;
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-exports['default'] = createNodeIterator;
-
-
-function createNodeIterator(root) {
- var whatToShow = arguments.length <= 1 || arguments[1] === undefined ? 0xFFFFFFFF : arguments[1];
- var filter = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];
- return new NodeIterator(root, whatToShow, filter);
-}
+module.exports = function indexOf(arr, ele, start) {
+ start = start || 0;
+ var idx = -1;
-var NodeIterator = function () {
- function NodeIterator(root, whatToShow, filter) {
- _classCallCheck(this, NodeIterator);
+ if (arr == null) return idx;
+ var len = arr.length;
+ var i = start < 0
+ ? (len + start)
+ : start;
- this.root = root;
- this.whatToShow = whatToShow;
- this.filter = filter;
- this.referenceNode = root;
- this.pointerBeforeReferenceNode = true;
- this._filter = function (node) {
- return filter ? filter(node) === 1 : true;
- };
- this._show = function (node) {
- return whatToShow >> node.nodeType - 1 & 1 === 1;
- };
+ if (i >= arr.length) {
+ return -1;
}
- NodeIterator.prototype.nextNode = function nextNode() {
- var before = this.pointerBeforeReferenceNode;
- this.pointerBeforeReferenceNode = false;
-
- var node = this.referenceNode;
- if (before && this._show(node) && this._filter(node)) return node;
-
- do {
- if (node.firstChild) {
- node = node.firstChild;
- continue;
- }
-
- do {
- if (node === this.root) return null;
- if (node.nextSibling) break;
- node = node.parentNode;
- } while (node);
-
- node = node.nextSibling;
- } while (!this._show(node) || !this._filter(node));
-
- this.referenceNode = node;
- this.pointerBeforeReferenceNode = false;
- return node;
- };
-
- NodeIterator.prototype.previousNode = function previousNode() {
- var before = this.pointerBeforeReferenceNode;
- this.pointerBeforeReferenceNode = true;
-
- var node = this.referenceNode;
- if (!before && this._show(node) && this._filter(node)) return node;
-
- do {
- if (node === this.root) return null;
-
- if (node.previousSibling) {
- node = node.previousSibling;
- while (node.lastChild) {
- node = node.lastChild;
- }continue;
- }
-
- node = node.parentNode;
- } while (!this._show(node) || !this._filter(node));
-
- this.referenceNode = node;
- this.pointerBeforeReferenceNode = true;
- return node;
- };
+ while (i < len) {
+ if (arr[i] === ele) {
+ return i;
+ }
+ i++;
+ }
- NodeIterator.prototype.toString = function toString() {
- return '[object NodeIterator]';
- };
+ return -1;
+};
- return NodeIterator;
-}();
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbXBsZW1lbnRhdGlvbi5qcyJdLCJuYW1lcyI6WyJjcmVhdGVOb2RlSXRlcmF0b3IiLCJyb290Iiwid2hhdFRvU2hvdyIsImZpbHRlciIsIk5vZGVJdGVyYXRvciIsInJlZmVyZW5jZU5vZGUiLCJwb2ludGVyQmVmb3JlUmVmZXJlbmNlTm9kZSIsIl9maWx0ZXIiLCJub2RlIiwiX3Nob3ciLCJub2RlVHlwZSIsIm5leHROb2RlIiwiYmVmb3JlIiwiZmlyc3RDaGlsZCIsIm5leHRTaWJsaW5nIiwicGFyZW50Tm9kZSIsInByZXZpb3VzTm9kZSIsInByZXZpb3VzU2libGluZyIsImxhc3RDaGlsZCIsInRvU3RyaW5nIl0sIm1hcHBpbm [...]
/***/ }),
-/***/ "../node_modules/dom-node-iterator/lib/index.js":
+/***/ "../node_modules/regenerator-runtime/runtime.js":
/*!******************************************************!*\
- !*** ../node_modules/dom-node-iterator/lib/index.js ***!
+ !*** ../node_modules/regenerator-runtime/runtime.js ***!
\******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-
-
-exports.__esModule = true;
-
-var _polyfill = __webpack_require__(/*! ./polyfill */ "../node_modules/dom-node-iterator/lib/polyfill.js");
+/**
+ * Copyright (c) 2014-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
-var _polyfill2 = _interopRequireDefault(_polyfill);
+var runtime = (function (exports) {
+ "use strict";
-var _implementation = __webpack_require__(/*! ./implementation */ "../node_modules/dom-node-iterator/lib/implementation.js");
+ var Op = Object.prototype;
+ var hasOwn = Op.hasOwnProperty;
+ var undefined; // More compressible than void 0.
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
-var _implementation2 = _interopRequireDefault(_implementation);
+ function wrap(innerFn, outerFn, self, tryLocsList) {
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
+ var generator = Object.create(protoGenerator.prototype);
+ var context = new Context(tryLocsList || []);
-var _shim = __webpack_require__(/*! ./shim */ "../node_modules/dom-node-iterator/lib/shim.js");
+ // The ._invoke method unifies the implementations of the .next,
+ // .throw, and .return methods.
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
-var _shim2 = _interopRequireDefault(_shim);
+ return generator;
+ }
+ exports.wrap = wrap;
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ // Try/catch helper to minimize deoptimizations. Returns a completion
+ // record like context.tryEntries[i].completion. This interface could
+ // have been (and was previously) designed to take a closure to be
+ // invoked without arguments, but in all the cases we care about we
+ // already have an existing method we want to call, so there's no need
+ // to create a new function object. We can even get away with assuming
+ // the method takes exactly one argument, since that happens to be true
+ // in every case, so we don't have to touch the arguments object. The
+ // only additional allocation required is the completion record, which
+ // has a stable shape and so hopefully should be cheap to allocate.
+ function tryCatch(fn, obj, arg) {
+ try {
+ return { type: "normal", arg: fn.call(obj, arg) };
+ } catch (err) {
+ return { type: "throw", arg: err };
+ }
+ }
-var polyfill = (0, _polyfill2['default'])();
-polyfill.implementation = _implementation2['default'];
-polyfill.shim = _shim2['default'];
+ var GenStateSuspendedStart = "suspendedStart";
+ var GenStateSuspendedYield = "suspendedYield";
+ var GenStateExecuting = "executing";
+ var GenStateCompleted = "completed";
-exports['default'] = polyfill;
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJwb2x5ZmlsbCIsImltcGxlbWVudGF0aW9uIiwic2hpbSJdLCJtYXBwaW5ncyI6Ijs7OztBQUFBOzs7O0FBQ0E7Ozs7QUFDQTs7Ozs7O0FBRUEsSUFBTUEsV0FBVyw0QkFBakI7QUFDQUEsU0FBU0MsY0FBVDtBQUNBRCxTQUFTRSxJQUFUOztxQkFFZUYsUSIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGRlZmF1bHQgYXMgZ2V0UG9seWZpbGwgfSBmcm9tICcuL3BvbHlmaWxsJ1xuaW1wb3J0IHsgZGVmYXVsdCBhcyBpbXBsZW1lbnRhdGlvbiB9IGZyb20gJy [...]
+ // Returning this object from the innerFn has the same effect as
+ // breaking out of the dispatch switch statement.
+ var ContinueSentinel = {};
-/***/ }),
+ // Dummy constructor functions that we use as the .constructor and
+ // .constructor.prototype properties for functions that return Generator
+ // objects. For full spec compliance, you may wish to configure your
+ // minifier not to mangle the names of these two functions.
+ function Generator() {}
+ function GeneratorFunction() {}
+ function GeneratorFunctionPrototype() {}
-/***/ "../node_modules/dom-node-iterator/lib/polyfill.js":
-/*!*********************************************************!*\
- !*** ../node_modules/dom-node-iterator/lib/polyfill.js ***!
- \*********************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+ // This is a polyfill for %IteratorPrototype% for environments that
+ // don't natively support it.
+ var IteratorPrototype = {};
+ IteratorPrototype[iteratorSymbol] = function () {
+ return this;
+ };
-"use strict";
+ var getProto = Object.getPrototypeOf;
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
+ if (NativeIteratorPrototype &&
+ NativeIteratorPrototype !== Op &&
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
+ // This environment has a native %IteratorPrototype%; use it instead
+ // of the polyfill.
+ IteratorPrototype = NativeIteratorPrototype;
+ }
+ var Gp = GeneratorFunctionPrototype.prototype =
+ Generator.prototype = Object.create(IteratorPrototype);
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
+ GeneratorFunctionPrototype[toStringTagSymbol] =
+ GeneratorFunction.displayName = "GeneratorFunction";
-exports.__esModule = true;
-exports['default'] = getPolyfill;
+ // Helper for defining the .next, .throw, and .return methods of the
+ // Iterator interface in terms of a single ._invoke method.
+ function defineIteratorMethods(prototype) {
+ ["next", "throw", "return"].forEach(function(method) {
+ prototype[method] = function(arg) {
+ return this._invoke(method, arg);
+ };
+ });
+ }
-var _adapter = __webpack_require__(/*! ./adapter */ "../node_modules/dom-node-iterator/lib/adapter.js");
-
-var _adapter2 = _interopRequireDefault(_adapter);
+ exports.isGeneratorFunction = function(genFun) {
+ var ctor = typeof genFun === "function" && genFun.constructor;
+ return ctor
+ ? ctor === GeneratorFunction ||
+ // For the native GeneratorFunction constructor, the best we can
+ // do is to check its .name property.
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
+ : false;
+ };
-var _builtin = __webpack_require__(/*! ./builtin */ "../node_modules/dom-node-iterator/lib/builtin.js");
+ exports.mark = function(genFun) {
+ if (Object.setPrototypeOf) {
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
+ } else {
+ genFun.__proto__ = GeneratorFunctionPrototype;
+ if (!(toStringTagSymbol in genFun)) {
+ genFun[toStringTagSymbol] = "GeneratorFunction";
+ }
+ }
+ genFun.prototype = Object.create(Gp);
+ return genFun;
+ };
-var _builtin2 = _interopRequireDefault(_builtin);
+ // Within the body of any async function, `await x` is transformed to
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
+ // meant to be awaited.
+ exports.awrap = function(arg) {
+ return { __await: arg };
+ };
-var _implementation = __webpack_require__(/*! ./implementation */ "../node_modules/dom-node-iterator/lib/implementation.js");
+ function AsyncIterator(generator, PromiseImpl) {
+ function invoke(method, arg, resolve, reject) {
+ var record = tryCatch(generator[method], generator, arg);
+ if (record.type === "throw") {
+ reject(record.arg);
+ } else {
+ var result = record.arg;
+ var value = result.value;
+ if (value &&
+ typeof value === "object" &&
+ hasOwn.call(value, "__await")) {
+ return PromiseImpl.resolve(value.__await).then(function(value) {
+ invoke("next", value, resolve, reject);
+ }, function(err) {
+ invoke("throw", err, resolve, reject);
+ });
+ }
-var _implementation2 = _interopRequireDefault(_implementation);
+ return PromiseImpl.resolve(value).then(function(unwrapped) {
+ // When a yielded Promise is resolved, its final value becomes
+ // the .value of the Promise<{value,done}> result for the
+ // current iteration.
+ result.value = unwrapped;
+ resolve(result);
+ }, function(error) {
+ // If a rejected Promise was yielded, throw the rejection back
+ // into the async generator function so it can be handled there.
+ return invoke("throw", error, resolve, reject);
+ });
+ }
+ }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ var previousPromise;
-function getPolyfill() {
- try {
- var doc = typeof document === 'undefined' ? {} : document;
- var iter = (0, _builtin2['default'])(doc, 0xFFFFFFFF, null, false);
- if (iter.referenceNode === doc) return _builtin2['default'];
- return _adapter2['default'];
- } catch (_) {
- return _implementation2['default'];
- }
-} /*global document*/
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wb2x5ZmlsbC5qcyJdLCJuYW1lcyI6WyJnZXRQb2x5ZmlsbCIsImRvYyIsImRvY3VtZW50IiwiaXRlciIsInJlZmVyZW5jZU5vZGUiLCJfIl0sIm1hcHBpbmdzIjoiOzs7cUJBTXdCQSxXOztBQUx4Qjs7OztBQUNBOzs7O0FBQ0E7Ozs7OztBQUdlLFNBQVNBLFdBQVQsR0FBdUI7QUFDcEMsTUFBSTtBQUNGLFFBQU1DLE1BQU0sT0FBT0MsUUFBUCxLQUFxQixXQUFyQixHQUFtQyxFQUFuQyxHQUF3Q0EsUUFBcEQ7QUFDQSxRQUFNQyxPQUFPLDBCQUFRRixHQUFSLEVBQWEsVUFBYixFQUF5QixJQUF6QixFQUErQixLQUEvQixDQUFiO0 [...]
+ function enqueue(method, arg) {
+ function callInvokeWithMethodAndArg() {
+ return new PromiseImpl(function(resolve, reject) {
+ invoke(method, arg, resolve, reject);
+ });
+ }
-/***/ }),
+ return previousPromise =
+ // If enqueue has been called before, then we want to wait until
+ // all previous Promises have been resolved before calling invoke,
+ // so that results are always delivered in the correct order. If
+ // enqueue has not been called before, then it is important to
+ // call invoke immediately, without waiting on a callback to fire,
+ // so that the async generator function has the opportunity to do
+ // any necessary setup in a predictable way. This predictability
+ // is why the Promise constructor synchronously invokes its
+ // executor callback, and why async functions synchronously
+ // execute code before the first await. Since we implement simple
+ // async functions in terms of async generators, it is especially
+ // important to get this right, even though it requires care.
+ previousPromise ? previousPromise.then(
+ callInvokeWithMethodAndArg,
+ // Avoid propagating failures to Promises returned by later
+ // invocations of the iterator.
+ callInvokeWithMethodAndArg
+ ) : callInvokeWithMethodAndArg();
+ }
-/***/ "../node_modules/dom-node-iterator/lib/shim.js":
-/*!*****************************************************!*\
- !*** ../node_modules/dom-node-iterator/lib/shim.js ***!
- \*****************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+ // Define the unified helper method that is used to implement .next,
+ // .throw, and .return (see defineIteratorMethods).
+ this._invoke = enqueue;
+ }
-"use strict";
+ defineIteratorMethods(AsyncIterator.prototype);
+ AsyncIterator.prototype[asyncIteratorSymbol] = function () {
+ return this;
+ };
+ exports.AsyncIterator = AsyncIterator;
+ // Note that simple async functions are implemented on top of
+ // AsyncIterator objects; they just return a Promise for the value of
+ // the final result produced by the iterator.
+ exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
-exports.__esModule = true;
-exports['default'] = shim;
+ var iter = new AsyncIterator(
+ wrap(innerFn, outerFn, self, tryLocsList),
+ PromiseImpl
+ );
-var _builtin = __webpack_require__(/*! ./builtin */ "../node_modules/dom-node-iterator/lib/builtin.js");
+ return exports.isGeneratorFunction(outerFn)
+ ? iter // If outerFn is a generator, return the full iterator.
+ : iter.next().then(function(result) {
+ return result.done ? result.value : iter.next();
+ });
+ };
-var _builtin2 = _interopRequireDefault(_builtin);
+ function makeInvokeMethod(innerFn, self, context) {
+ var state = GenStateSuspendedStart;
-var _polyfill = __webpack_require__(/*! ./polyfill */ "../node_modules/dom-node-iterator/lib/polyfill.js");
+ return function invoke(method, arg) {
+ if (state === GenStateExecuting) {
+ throw new Error("Generator is already running");
+ }
-var _polyfill2 = _interopRequireDefault(_polyfill);
+ if (state === GenStateCompleted) {
+ if (method === "throw") {
+ throw arg;
+ }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ // Be forgiving, per 25.3.3.3.3 of the spec:
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
+ return doneResult();
+ }
-/*global document*/
-function shim() {
- var doc = typeof document === 'undefined' ? {} : document;
- var polyfill = (0, _polyfill2['default'])();
- if (polyfill !== _builtin2['default']) doc.createNodeIterator = polyfill;
- return polyfill;
-}
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9zaGltLmpzIl0sIm5hbWVzIjpbInNoaW0iLCJkb2MiLCJkb2N1bWVudCIsInBvbHlmaWxsIiwiY3JlYXRlTm9kZUl0ZXJhdG9yIl0sIm1hcHBpbmdzIjoiOzs7cUJBS3dCQSxJOztBQUp4Qjs7OztBQUNBOzs7Ozs7QUFGQTtBQUtlLFNBQVNBLElBQVQsR0FBZ0I7QUFDN0IsTUFBTUMsTUFBTSxPQUFPQyxRQUFQLEtBQXFCLFdBQXJCLEdBQW1DLEVBQW5DLEdBQXdDQSxRQUFwRDtBQUNBLE1BQU1DLFdBQVcsNEJBQWpCO0FBQ0EsTUFBSUEsaUNBQUosRUFBMEJGLElBQUlHLGtCQUFKLEdBQXlCRCxRQUF6QjtBQUMxQixTQUFPQSxRQU [...]
+ context.method = method;
+ context.arg = arg;
-/***/ }),
+ while (true) {
+ var delegate = context.delegate;
+ if (delegate) {
+ var delegateResult = maybeInvokeDelegate(delegate, context);
+ if (delegateResult) {
+ if (delegateResult === ContinueSentinel) continue;
+ return delegateResult;
+ }
+ }
-/***/ "../node_modules/dom-node-iterator/polyfill.js":
-/*!*****************************************************!*\
- !*** ../node_modules/dom-node-iterator/polyfill.js ***!
- \*****************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+ if (context.method === "next") {
+ // Setting context._sent for legacy support of Babel's
+ // function.sent implementation.
+ context.sent = context._sent = context.arg;
-module.exports = __webpack_require__(/*! ./lib/polyfill */ "../node_modules/dom-node-iterator/lib/polyfill.js")['default'];
+ } else if (context.method === "throw") {
+ if (state === GenStateSuspendedStart) {
+ state = GenStateCompleted;
+ throw context.arg;
+ }
+ context.dispatchException(context.arg);
-/***/ }),
+ } else if (context.method === "return") {
+ context.abrupt("return", context.arg);
+ }
-/***/ "../node_modules/dom-node-iterator/shim.js":
-/*!*************************************************!*\
- !*** ../node_modules/dom-node-iterator/shim.js ***!
- \*************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+ state = GenStateExecuting;
-module.exports = __webpack_require__(/*! ./lib/shim */ "../node_modules/dom-node-iterator/lib/shim.js")['default'];
+ var record = tryCatch(innerFn, self, context);
+ if (record.type === "normal") {
+ // If an exception is thrown from innerFn, we leave state ===
+ // GenStateExecuting and loop back for another invocation.
+ state = context.done
+ ? GenStateCompleted
+ : GenStateSuspendedYield;
+ if (record.arg === ContinueSentinel) {
+ continue;
+ }
-/***/ }),
+ return {
+ value: record.arg,
+ done: context.done
+ };
-/***/ "../node_modules/dom-seek/index.js":
-/*!*****************************************!*\
- !*** ../node_modules/dom-seek/index.js ***!
- \*****************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+ } else if (record.type === "throw") {
+ state = GenStateCompleted;
+ // Dispatch the exception by looping back around to the
+ // context.dispatchException(context.arg) call above.
+ context.method = "throw";
+ context.arg = record.arg;
+ }
+ }
+ };
+ }
-module.exports = __webpack_require__(/*! ./lib */ "../node_modules/dom-seek/lib/index.js")['default'];
+ // Call delegate.iterator[context.method](context.arg) and handle the
+ // result, either by returning a { value, done } result from the
+ // delegate iterator, or by modifying context.method and context.arg,
+ // setting context.delegate to null, and returning the ContinueSentinel.
+ function maybeInvokeDelegate(delegate, context) {
+ var method = delegate.iterator[context.method];
+ if (method === undefined) {
+ // A .throw or .return when the delegate iterator has no .throw
+ // method always terminates the yield* loop.
+ context.delegate = null;
+ if (context.method === "throw") {
+ // Note: ["return"] must be used for ES3 parsing compatibility.
+ if (delegate.iterator["return"]) {
+ // If the delegate iterator has a return method, give it a
+ // chance to clean up.
+ context.method = "return";
+ context.arg = undefined;
+ maybeInvokeDelegate(delegate, context);
-/***/ }),
-
-/***/ "../node_modules/dom-seek/lib/index.js":
-/*!*********************************************!*\
- !*** ../node_modules/dom-seek/lib/index.js ***!
- \*********************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+ if (context.method === "throw") {
+ // If maybeInvokeDelegate(context) changed context.method from
+ // "return" to "throw", let that override the TypeError below.
+ return ContinueSentinel;
+ }
+ }
-"use strict";
+ context.method = "throw";
+ context.arg = new TypeError(
+ "The iterator does not provide a 'throw' method");
+ }
+ return ContinueSentinel;
+ }
-exports.__esModule = true;
-exports['default'] = seek;
+ var record = tryCatch(method, delegate.iterator, context.arg);
-var _ancestors = __webpack_require__(/*! ancestors */ "../node_modules/ancestors/index.js");
+ if (record.type === "throw") {
+ context.method = "throw";
+ context.arg = record.arg;
+ context.delegate = null;
+ return ContinueSentinel;
+ }
-var _ancestors2 = _interopRequireDefault(_ancestors);
+ var info = record.arg;
-var _indexOf = __webpack_require__(/*! index-of */ "../node_modules/index-of/index.js");
+ if (! info) {
+ context.method = "throw";
+ context.arg = new TypeError("iterator result is not an object");
+ context.delegate = null;
+ return ContinueSentinel;
+ }
-var _indexOf2 = _interopRequireDefault(_indexOf);
+ if (info.done) {
+ // Assign the result of the finished delegate to the temporary
+ // variable specified by delegate.resultName (see delegateYield).
+ context[delegate.resultName] = info.value;
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ // Resume execution at the desired location (see delegateYield).
+ context.next = delegate.nextLoc;
-var E_SHOW = 'Argument 1 of seek must use filter NodeFilter.SHOW_TEXT.';
-var E_WHERE = 'Argument 2 of seek must be a number or a Text Node.';
+ // If context.method was "throw" but the delegate handled the
+ // exception, let the outer generator proceed normally. If
+ // context.method was "next", forget context.arg since it has been
+ // "consumed" by the delegate iterator. If context.method was
+ // "return", allow the original .return call to continue in the
+ // outer generator.
+ if (context.method !== "return") {
+ context.method = "next";
+ context.arg = undefined;
+ }
-var SHOW_TEXT = 4;
-var TEXT_NODE = 3;
+ } else {
+ // Re-yield the result returned by the delegate method.
+ return info;
+ }
-function seek(iter, where) {
- if (iter.whatToShow !== SHOW_TEXT) {
- throw new Error(E_SHOW);
+ // The delegate iterator is finished, so forget it and continue with
+ // the outer generator.
+ context.delegate = null;
+ return ContinueSentinel;
}
- var count = 0;
- var node = iter.referenceNode;
- var predicates = null;
-
- if (isNumber(where)) {
- predicates = {
- forward: function forward() {
- return count < where;
- },
- backward: function backward() {
- return count > where;
- }
- };
- } else if (isText(where)) {
- var forward = before(node, where) ? function () {
- return false;
- } : function () {
- return node !== where;
- };
- var backward = function backward() {
- return node != where || !iter.pointerBeforeReferenceNode;
- };
- predicates = { forward: forward, backward: backward };
- } else {
- throw new Error(E_WHERE);
- }
+ // Define Generator.prototype.{next,throw,return} in terms of the
+ // unified ._invoke helper method.
+ defineIteratorMethods(Gp);
- while (predicates.forward() && (node = iter.nextNode()) !== null) {
- count += node.nodeValue.length;
- }
+ Gp[toStringTagSymbol] = "Generator";
- while (predicates.backward() && (node = iter.previousNode()) !== null) {
- count -= node.nodeValue.length;
- }
+ // A Generator should always return itself as the iterator object when the
+ // @@iterator function is called on it. Some browsers' implementations of the
+ // iterator prototype chain incorrectly implement this, causing the Generator
+ // object to not be returned from this call. This ensures that doesn't happen.
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
+ Gp[iteratorSymbol] = function() {
+ return this;
+ };
- return count;
-}
+ Gp.toString = function() {
+ return "[object Generator]";
+ };
-function isNumber(n) {
- return !isNaN(parseInt(n)) && isFinite(n);
-}
+ function pushTryEntry(locs) {
+ var entry = { tryLoc: locs[0] };
-function isText(node) {
- return node.nodeType === TEXT_NODE;
-}
+ if (1 in locs) {
+ entry.catchLoc = locs[1];
+ }
-function before(ref, node) {
- if (ref === node) return false;
+ if (2 in locs) {
+ entry.finallyLoc = locs[2];
+ entry.afterLoc = locs[3];
+ }
- var common = null;
- var left = [ref].concat((0, _ancestors2['default'])(ref)).reverse();
- var right = [node].concat((0, _ancestors2['default'])(node)).reverse();
+ this.tryEntries.push(entry);
+ }
- while (left[0] === right[0]) {
- common = left.shift();
- right.shift();
+ function resetTryEntry(entry) {
+ var record = entry.completion || {};
+ record.type = "normal";
+ delete record.arg;
+ entry.completion = record;
}
- left = left[0];
- right = right[0];
+ function Context(tryLocsList) {
+ // The root entry object (effectively a try statement without a catch
+ // or a finally block) gives us a place to store values thrown from
+ // locations where there is no enclosing try statement.
+ this.tryEntries = [{ tryLoc: "root" }];
+ tryLocsList.forEach(pushTryEntry, this);
+ this.reset(true);
+ }
- var l = (0, _indexOf2['default'])(common.childNodes, left);
- var r = (0, _indexOf2['default'])(common.childNodes, right);
+ exports.keys = function(object) {
+ var keys = [];
+ for (var key in object) {
+ keys.push(key);
+ }
+ keys.reverse();
- return l > r;
-}
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJzZWVrIiwiRV9TSE9XIiwiRV9XSEVSRSIsIlNIT1dfVEVYVCIsIlRFWFRfTk9ERSIsIml0ZXIiLCJ3aGVyZSIsIndoYXRUb1Nob3ciLCJFcnJvciIsImNvdW50Iiwibm9kZSIsInJlZmVyZW5jZU5vZGUiLCJwcmVkaWNhdGVzIiwiaXNOdW1iZXIiLCJmb3J3YXJkIiwiYmFja3dhcmQiLCJpc1RleHQiLCJiZWZvcmUiLCJwb2ludGVyQmVmb3JlUmVmZXJlbmNlTm9kZSIsIm5leHROb2RlIiwibm9kZVZhbHVlIiwibGVuZ3RoIiwicHJldmlvdXNOb2RlIiwibiIsImlzTmFOIiwicGFyc2VJbnQiLC [...]
+ // Rather than returning an object with a next method, we keep
+ // things simple and return the next function itself.
+ return function next() {
+ while (keys.length) {
+ var key = keys.pop();
+ if (key in object) {
+ next.value = key;
+ next.done = false;
+ return next;
+ }
+ }
-/***/ }),
+ // To avoid creating an additional object, we just hang the .value
+ // and .done properties off the next function object itself. This
+ // also ensures that the minifier will not anonymize the function.
+ next.done = true;
+ return next;
+ };
+ };
-/***/ "../node_modules/index-of/index.js":
-/*!*****************************************!*\
- !*** ../node_modules/index-of/index.js ***!
- \*****************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
+ function values(iterable) {
+ if (iterable) {
+ var iteratorMethod = iterable[iteratorSymbol];
+ if (iteratorMethod) {
+ return iteratorMethod.call(iterable);
+ }
-"use strict";
-/*!
- * index-of <https://github.com/jonschlinkert/index-of>
- *
- * Copyright (c) 2014-2015 Jon Schlinkert.
- * Licensed under the MIT license.
- */
+ if (typeof iterable.next === "function") {
+ return iterable;
+ }
+ if (!isNaN(iterable.length)) {
+ var i = -1, next = function next() {
+ while (++i < iterable.length) {
+ if (hasOwn.call(iterable, i)) {
+ next.value = iterable[i];
+ next.done = false;
+ return next;
+ }
+ }
+ next.value = undefined;
+ next.done = true;
-module.exports = function indexOf(arr, ele, start) {
- start = start || 0;
- var idx = -1;
+ return next;
+ };
- if (arr == null) return idx;
- var len = arr.length;
- var i = start < 0
- ? (len + start)
- : start;
+ return next.next = next;
+ }
+ }
- if (i >= arr.length) {
- return -1;
+ // Return an iterator with no values.
+ return { next: doneResult };
}
+ exports.values = values;
- while (i < len) {
- if (arr[i] === ele) {
- return i;
- }
- i++;
+ function doneResult() {
+ return { value: undefined, done: true };
}
- return -1;
-};
-
-
-/***/ }),
+ Context.prototype = {
+ constructor: Context,
-/***/ "../node_modules/regenerator-runtime/runtime.js":
-/*!******************************************************!*\
- !*** ../node_modules/regenerator-runtime/runtime.js ***!
- \******************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * Copyright (c) 2014-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-var runtime = (function (exports) {
- "use strict";
-
- var Op = Object.prototype;
- var hasOwn = Op.hasOwnProperty;
- var undefined; // More compressible than void 0.
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
-
- function wrap(innerFn, outerFn, self, tryLocsList) {
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
- var generator = Object.create(protoGenerator.prototype);
- var context = new Context(tryLocsList || []);
-
- // The ._invoke method unifies the implementations of the .next,
- // .throw, and .return methods.
- generator._invoke = makeInvokeMethod(innerFn, self, context);
-
- return generator;
- }
- exports.wrap = wrap;
-
- // Try/catch helper to minimize deoptimizations. Returns a completion
- // record like context.tryEntries[i].completion. This interface could
- // have been (and was previously) designed to take a closure to be
- // invoked without arguments, but in all the cases we care about we
- // already have an existing method we want to call, so there's no need
- // to create a new function object. We can even get away with assuming
- // the method takes exactly one argument, since that happens to be true
- // in every case, so we don't have to touch the arguments object. The
- // only additional allocation required is the completion record, which
- // has a stable shape and so hopefully should be cheap to allocate.
- function tryCatch(fn, obj, arg) {
- try {
- return { type: "normal", arg: fn.call(obj, arg) };
- } catch (err) {
- return { type: "throw", arg: err };
- }
- }
-
- var GenStateSuspendedStart = "suspendedStart";
- var GenStateSuspendedYield = "suspendedYield";
- var GenStateExecuting = "executing";
- var GenStateCompleted = "completed";
-
- // Returning this object from the innerFn has the same effect as
- // breaking out of the dispatch switch statement.
- var ContinueSentinel = {};
-
- // Dummy constructor functions that we use as the .constructor and
- // .constructor.prototype properties for functions that return Generator
- // objects. For full spec compliance, you may wish to configure your
- // minifier not to mangle the names of these two functions.
- function Generator() {}
- function GeneratorFunction() {}
- function GeneratorFunctionPrototype() {}
-
- // This is a polyfill for %IteratorPrototype% for environments that
- // don't natively support it.
- var IteratorPrototype = {};
- IteratorPrototype[iteratorSymbol] = function () {
- return this;
- };
-
- var getProto = Object.getPrototypeOf;
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
- if (NativeIteratorPrototype &&
- NativeIteratorPrototype !== Op &&
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
- // This environment has a native %IteratorPrototype%; use it instead
- // of the polyfill.
- IteratorPrototype = NativeIteratorPrototype;
- }
-
- var Gp = GeneratorFunctionPrototype.prototype =
- Generator.prototype = Object.create(IteratorPrototype);
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
- GeneratorFunctionPrototype[toStringTagSymbol] =
- GeneratorFunction.displayName = "GeneratorFunction";
-
- // Helper for defining the .next, .throw, and .return methods of the
- // Iterator interface in terms of a single ._invoke method.
- function defineIteratorMethods(prototype) {
- ["next", "throw", "return"].forEach(function(method) {
- prototype[method] = function(arg) {
- return this._invoke(method, arg);
- };
- });
- }
-
- exports.isGeneratorFunction = function(genFun) {
- var ctor = typeof genFun === "function" && genFun.constructor;
- return ctor
- ? ctor === GeneratorFunction ||
- // For the native GeneratorFunction constructor, the best we can
- // do is to check its .name property.
- (ctor.displayName || ctor.name) === "GeneratorFunction"
- : false;
- };
-
- exports.mark = function(genFun) {
- if (Object.setPrototypeOf) {
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
- } else {
- genFun.__proto__ = GeneratorFunctionPrototype;
- if (!(toStringTagSymbol in genFun)) {
- genFun[toStringTagSymbol] = "GeneratorFunction";
- }
- }
- genFun.prototype = Object.create(Gp);
- return genFun;
- };
-
- // Within the body of any async function, `await x` is transformed to
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
- // meant to be awaited.
- exports.awrap = function(arg) {
- return { __await: arg };
- };
-
- function AsyncIterator(generator, PromiseImpl) {
- function invoke(method, arg, resolve, reject) {
- var record = tryCatch(generator[method], generator, arg);
- if (record.type === "throw") {
- reject(record.arg);
- } else {
- var result = record.arg;
- var value = result.value;
- if (value &&
- typeof value === "object" &&
- hasOwn.call(value, "__await")) {
- return PromiseImpl.resolve(value.__await).then(function(value) {
- invoke("next", value, resolve, reject);
- }, function(err) {
- invoke("throw", err, resolve, reject);
- });
- }
-
- return PromiseImpl.resolve(value).then(function(unwrapped) {
- // When a yielded Promise is resolved, its final value becomes
- // the .value of the Promise<{value,done}> result for the
- // current iteration.
- result.value = unwrapped;
- resolve(result);
- }, function(error) {
- // If a rejected Promise was yielded, throw the rejection back
- // into the async generator function so it can be handled there.
- return invoke("throw", error, resolve, reject);
- });
- }
- }
-
- var previousPromise;
-
- function enqueue(method, arg) {
- function callInvokeWithMethodAndArg() {
- return new PromiseImpl(function(resolve, reject) {
- invoke(method, arg, resolve, reject);
- });
- }
-
- return previousPromise =
- // If enqueue has been called before, then we want to wait until
- // all previous Promises have been resolved before calling invoke,
- // so that results are always delivered in the correct order. If
- // enqueue has not been called before, then it is important to
- // call invoke immediately, without waiting on a callback to fire,
- // so that the async generator function has the opportunity to do
- // any necessary setup in a predictable way. This predictability
- // is why the Promise constructor synchronously invokes its
- // executor callback, and why async functions synchronously
- // execute code before the first await. Since we implement simple
- // async functions in terms of async generators, it is especially
- // important to get this right, even though it requires care.
- previousPromise ? previousPromise.then(
- callInvokeWithMethodAndArg,
- // Avoid propagating failures to Promises returned by later
- // invocations of the iterator.
- callInvokeWithMethodAndArg
- ) : callInvokeWithMethodAndArg();
- }
-
- // Define the unified helper method that is used to implement .next,
- // .throw, and .return (see defineIteratorMethods).
- this._invoke = enqueue;
- }
-
- defineIteratorMethods(AsyncIterator.prototype);
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
- return this;
- };
- exports.AsyncIterator = AsyncIterator;
-
- // Note that simple async functions are implemented on top of
- // AsyncIterator objects; they just return a Promise for the value of
- // the final result produced by the iterator.
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
- if (PromiseImpl === void 0) PromiseImpl = Promise;
-
- var iter = new AsyncIterator(
- wrap(innerFn, outerFn, self, tryLocsList),
- PromiseImpl
- );
-
- return exports.isGeneratorFunction(outerFn)
- ? iter // If outerFn is a generator, return the full iterator.
- : iter.next().then(function(result) {
- return result.done ? result.value : iter.next();
- });
- };
-
- function makeInvokeMethod(innerFn, self, context) {
- var state = GenStateSuspendedStart;
-
- return function invoke(method, arg) {
- if (state === GenStateExecuting) {
- throw new Error("Generator is already running");
- }
-
- if (state === GenStateCompleted) {
- if (method === "throw") {
- throw arg;
- }
-
- // Be forgiving, per 25.3.3.3.3 of the spec:
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
- return doneResult();
- }
-
- context.method = method;
- context.arg = arg;
-
- while (true) {
- var delegate = context.delegate;
- if (delegate) {
- var delegateResult = maybeInvokeDelegate(delegate, context);
- if (delegateResult) {
- if (delegateResult === ContinueSentinel) continue;
- return delegateResult;
- }
- }
-
- if (context.method === "next") {
- // Setting context._sent for legacy support of Babel's
- // function.sent implementation.
- context.sent = context._sent = context.arg;
-
- } else if (context.method === "throw") {
- if (state === GenStateSuspendedStart) {
- state = GenStateCompleted;
- throw context.arg;
- }
-
- context.dispatchException(context.arg);
-
- } else if (context.method === "return") {
- context.abrupt("return", context.arg);
- }
-
- state = GenStateExecuting;
-
- var record = tryCatch(innerFn, self, context);
- if (record.type === "normal") {
- // If an exception is thrown from innerFn, we leave state ===
- // GenStateExecuting and loop back for another invocation.
- state = context.done
- ? GenStateCompleted
- : GenStateSuspendedYield;
-
- if (record.arg === ContinueSentinel) {
- continue;
- }
-
- return {
- value: record.arg,
- done: context.done
- };
-
- } else if (record.type === "throw") {
- state = GenStateCompleted;
- // Dispatch the exception by looping back around to the
- // context.dispatchException(context.arg) call above.
- context.method = "throw";
- context.arg = record.arg;
- }
- }
- };
- }
-
- // Call delegate.iterator[context.method](context.arg) and handle the
- // result, either by returning a { value, done } result from the
- // delegate iterator, or by modifying context.method and context.arg,
- // setting context.delegate to null, and returning the ContinueSentinel.
- function maybeInvokeDelegate(delegate, context) {
- var method = delegate.iterator[context.method];
- if (method === undefined) {
- // A .throw or .return when the delegate iterator has no .throw
- // method always terminates the yield* loop.
- context.delegate = null;
-
- if (context.method === "throw") {
- // Note: ["return"] must be used for ES3 parsing compatibility.
- if (delegate.iterator["return"]) {
- // If the delegate iterator has a return method, give it a
- // chance to clean up.
- context.method = "return";
- context.arg = undefined;
- maybeInvokeDelegate(delegate, context);
-
- if (context.method === "throw") {
- // If maybeInvokeDelegate(context) changed context.method from
- // "return" to "throw", let that override the TypeError below.
- return ContinueSentinel;
- }
- }
-
- context.method = "throw";
- context.arg = new TypeError(
- "The iterator does not provide a 'throw' method");
- }
-
- return ContinueSentinel;
- }
-
- var record = tryCatch(method, delegate.iterator, context.arg);
-
- if (record.type === "throw") {
- context.method = "throw";
- context.arg = record.arg;
- context.delegate = null;
- return ContinueSentinel;
- }
-
- var info = record.arg;
-
- if (! info) {
- context.method = "throw";
- context.arg = new TypeError("iterator result is not an object");
- context.delegate = null;
- return ContinueSentinel;
- }
-
- if (info.done) {
- // Assign the result of the finished delegate to the temporary
- // variable specified by delegate.resultName (see delegateYield).
- context[delegate.resultName] = info.value;
-
- // Resume execution at the desired location (see delegateYield).
- context.next = delegate.nextLoc;
-
- // If context.method was "throw" but the delegate handled the
- // exception, let the outer generator proceed normally. If
- // context.method was "next", forget context.arg since it has been
- // "consumed" by the delegate iterator. If context.method was
- // "return", allow the original .return call to continue in the
- // outer generator.
- if (context.method !== "return") {
- context.method = "next";
- context.arg = undefined;
- }
-
- } else {
- // Re-yield the result returned by the delegate method.
- return info;
- }
-
- // The delegate iterator is finished, so forget it and continue with
- // the outer generator.
- context.delegate = null;
- return ContinueSentinel;
- }
-
- // Define Generator.prototype.{next,throw,return} in terms of the
- // unified ._invoke helper method.
- defineIteratorMethods(Gp);
-
- Gp[toStringTagSymbol] = "Generator";
-
- // A Generator should always return itself as the iterator object when the
- // @@iterator function is called on it. Some browsers' implementations of the
- // iterator prototype chain incorrectly implement this, causing the Generator
- // object to not be returned from this call. This ensures that doesn't happen.
- // See https://github.com/facebook/regenerator/issues/274 for more details.
- Gp[iteratorSymbol] = function() {
- return this;
- };
-
- Gp.toString = function() {
- return "[object Generator]";
- };
-
- function pushTryEntry(locs) {
- var entry = { tryLoc: locs[0] };
-
- if (1 in locs) {
- entry.catchLoc = locs[1];
- }
-
- if (2 in locs) {
- entry.finallyLoc = locs[2];
- entry.afterLoc = locs[3];
- }
-
- this.tryEntries.push(entry);
- }
-
- function resetTryEntry(entry) {
- var record = entry.completion || {};
- record.type = "normal";
- delete record.arg;
- entry.completion = record;
- }
-
- function Context(tryLocsList) {
- // The root entry object (effectively a try statement without a catch
- // or a finally block) gives us a place to store values thrown from
- // locations where there is no enclosing try statement.
- this.tryEntries = [{ tryLoc: "root" }];
- tryLocsList.forEach(pushTryEntry, this);
- this.reset(true);
- }
-
- exports.keys = function(object) {
- var keys = [];
- for (var key in object) {
- keys.push(key);
- }
- keys.reverse();
-
- // Rather than returning an object with a next method, we keep
- // things simple and return the next function itself.
- return function next() {
- while (keys.length) {
- var key = keys.pop();
- if (key in object) {
- next.value = key;
- next.done = false;
- return next;
- }
- }
-
- // To avoid creating an additional object, we just hang the .value
- // and .done properties off the next function object itself. This
- // also ensures that the minifier will not anonymize the function.
- next.done = true;
- return next;
- };
- };
-
- function values(iterable) {
- if (iterable) {
- var iteratorMethod = iterable[iteratorSymbol];
- if (iteratorMethod) {
- return iteratorMethod.call(iterable);
- }
-
- if (typeof iterable.next === "function") {
- return iterable;
- }
-
- if (!isNaN(iterable.length)) {
- var i = -1, next = function next() {
- while (++i < iterable.length) {
- if (hasOwn.call(iterable, i)) {
- next.value = iterable[i];
- next.done = false;
- return next;
- }
- }
-
- next.value = undefined;
- next.done = true;
-
- return next;
- };
-
- return next.next = next;
- }
- }
-
- // Return an iterator with no values.
- return { next: doneResult };
- }
- exports.values = values;
-
- function doneResult() {
- return { value: undefined, done: true };
- }
-
- Context.prototype = {
- constructor: Context,
-
- reset: function(skipTempReset) {
- this.prev = 0;
- this.next = 0;
- // Resetting context._sent for legacy support of Babel's
- // function.sent implementation.
- this.sent = this._sent = undefined;
- this.done = false;
- this.delegate = null;
-
- this.method = "next";
- this.arg = undefined;
-
- this.tryEntries.forEach(resetTryEntry);
-
- if (!skipTempReset) {
- for (var name in this) {
- // Not sure about the optimal order of these conditions:
- if (name.charAt(0) === "t" &&
- hasOwn.call(this, name) &&
- !isNaN(+name.slice(1))) {
- this[name] = undefined;
- }
- }
- }
- },
-
- stop: function() {
- this.done = true;
-
- var rootEntry = this.tryEntries[0];
- var rootRecord = rootEntry.completion;
- if (rootRecord.type === "throw") {
- throw rootRecord.arg;
- }
-
- return this.rval;
- },
-
- dispatchException: function(exception) {
- if (this.done) {
- throw exception;
- }
-
- var context = this;
- function handle(loc, caught) {
- record.type = "throw";
- record.arg = exception;
- context.next = loc;
-
- if (caught) {
- // If the dispatched exception was caught by a catch block,
- // then let that catch block handle the exception normally.
- context.method = "next";
- context.arg = undefined;
- }
-
- return !! caught;
- }
-
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- var record = entry.completion;
-
- if (entry.tryLoc === "root") {
- // Exception thrown outside of any try block that could handle
- // it, so set the completion value of the entire function to
- // throw the exception.
- return handle("end");
- }
-
- if (entry.tryLoc <= this.prev) {
- var hasCatch = hasOwn.call(entry, "catchLoc");
- var hasFinally = hasOwn.call(entry, "finallyLoc");
-
- if (hasCatch && hasFinally) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- } else if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
-
- } else if (hasCatch) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- }
-
- } else if (hasFinally) {
- if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
-
- } else {
- throw new Error("try statement without catch or finally");
- }
- }
- }
- },
-
- abrupt: function(type, arg) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.tryLoc <= this.prev &&
- hasOwn.call(entry, "finallyLoc") &&
- this.prev < entry.finallyLoc) {
- var finallyEntry = entry;
- break;
- }
- }
-
- if (finallyEntry &&
- (type === "break" ||
- type === "continue") &&
- finallyEntry.tryLoc <= arg &&
- arg <= finallyEntry.finallyLoc) {
- // Ignore the finally entry if control is not jumping to a
- // location outside the try/catch block.
- finallyEntry = null;
- }
-
- var record = finallyEntry ? finallyEntry.completion : {};
- record.type = type;
- record.arg = arg;
-
- if (finallyEntry) {
- this.method = "next";
- this.next = finallyEntry.finallyLoc;
- return ContinueSentinel;
- }
-
- return this.complete(record);
- },
-
- complete: function(record, afterLoc) {
- if (record.type === "throw") {
- throw record.arg;
- }
-
- if (record.type === "break" ||
- record.type === "continue") {
- this.next = record.arg;
- } else if (record.type === "return") {
- this.rval = this.arg = record.arg;
- this.method = "return";
- this.next = "end";
- } else if (record.type === "normal" && afterLoc) {
- this.next = afterLoc;
- }
-
- return ContinueSentinel;
- },
-
- finish: function(finallyLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.finallyLoc === finallyLoc) {
- this.complete(entry.completion, entry.afterLoc);
- resetTryEntry(entry);
- return ContinueSentinel;
- }
- }
- },
-
- "catch": function(tryLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.tryLoc === tryLoc) {
- var record = entry.completion;
- if (record.type === "throw") {
- var thrown = record.arg;
- resetTryEntry(entry);
- }
- return thrown;
- }
- }
-
- // The context.catch method must only be called with a location
- // argument that corresponds to a known catch block.
- throw new Error("illegal catch attempt");
- },
-
- delegateYield: function(iterable, resultName, nextLoc) {
- this.delegate = {
- iterator: values(iterable),
- resultName: resultName,
- nextLoc: nextLoc
- };
-
- if (this.method === "next") {
- // Deliberately forget the last sent value so that we don't
- // accidentally pass it on to the delegate.
- this.arg = undefined;
- }
-
- return ContinueSentinel;
- }
- };
-
- // Regardless of whether this script is executing as a CommonJS module
- // or not, return the runtime object so that we can declare the variable
- // regeneratorRuntime in the outer scope, which allows this module to be
- // injected easily by `bin/regenerator --include-runtime script.js`.
- return exports;
-
-}(
- // If this script is executing as a CommonJS module, use module.exports
- // as the regeneratorRuntime namespace. Otherwise create a new empty
- // object. Either way, the resulting object will be used to initialize
- // the regeneratorRuntime variable at the top of this file.
- true ? module.exports : undefined
-));
-
-try {
- regeneratorRuntime = runtime;
-} catch (accidentalStrictMode) {
- // This module should not be running in strict mode, so the above
- // assignment should always work unless something is misconfigured. Just
- // in case runtime.js accidentally runs in strict mode, we can escape
- // strict mode using a global Function call. This could conceivably fail
- // if a Content Security Policy forbids using Function, but in that case
- // the proper solution is to fix the accidental strict mode problem. If
- // you've misconfigured your bundler to force strict mode and applied a
- // CSP to forbid Function, and you're not willing to fix either of those
- // problems, please detail your unique predicament in a GitHub issue.
- Function("r", "regeneratorRuntime = r")(runtime);
-}
-
-
-/***/ }),
-
-/***/ "../node_modules/webpack/buildin/global.js":
-/*!*************************************************!*\
- !*** ../node_modules/webpack/buildin/global.js ***!
- \*************************************************/
-/*! no static exports found */
-/***/ (function(module, exports) {
-
-var g;
-
-// This works in non-strict mode
-g = (function() {
- return this;
-})();
-
-try {
- // This works if eval is allowed (see CSP)
- g = g || new Function("return this")();
-} catch (e) {
- // This works if the window reference is available
- if (typeof window === "object") g = window;
-}
-
-// g can still be undefined, but nothing to do about it...
-// We return undefined, instead of nothing here, so it's
-// easier to handle this case. if(!global) { ...}
-
-module.exports = g;
-
-
-/***/ }),
-
-/***/ "../node_modules/xtend/immutable.js":
-/*!******************************************!*\
- !*** ../node_modules/xtend/immutable.js ***!
- \******************************************/
-/*! no static exports found */
-/***/ (function(module, exports) {
-
-module.exports = extend
-
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-
-function extend() {
- var target = {}
-
- for (var i = 0; i < arguments.length; i++) {
- var source = arguments[i]
-
- for (var key in source) {
- if (hasOwnProperty.call(source, key)) {
- target[key] = source[key]
- }
- }
- }
-
- return target
-}
-
-
-/***/ }),
-
-/***/ "../packages/dom/src/cartesian.js":
-/*!****************************************!*\
- !*** ../packages/dom/src/cartesian.js ***!
- \****************************************/
-/*! exports provided: product */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "product", function() { return product; });
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/concat */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0__);
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/toConsumableArray */ "../node_modules/@babel/runtime-corejs3/helpers/esm/toConsumableArray.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/promise */ "../node_modules/@babel/runtime-corejs3/core-js-stable/promise.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/some */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/some.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_4__);
-/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/regenerator */ "../node_modules/@babel/runtime-corejs3/regenerator/index.js");
-/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5__);
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncToGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncToGenerator.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/symbol/async-iterator */ "../node_modules/@babel/runtime-corejs3/core-js-stable/symbol/async-iterator.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_7__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8__);
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator.js");
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator.js");
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncIterator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncIterator.js");
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncGeneratorDelegate__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncGeneratorDelegate */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncGeneratorDelegate.js");
-/* harmony import */ var cartesian__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! cartesian */ "../node_modules/cartesian/index.js");
-/* harmony import */ var cartesian__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(cartesian__WEBPACK_IMPORTED_MODULE_13__);
-/**
- * @license
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-function product() {
- return _product.apply(this, arguments);
-}
-
-function _product() {
- _product = Object(_babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_9__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee3() {
- var _len,
- iterables,
- _key,
- iterators,
- logs,
- nextValuePromises,
- _loop,
- _ret,
- _args4 = arguments;
-
- return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee3$(_context5) {
- while (1) {
- switch (_context5.prev = _context5.next) {
- case 0:
- for (_len = _args4.length, iterables = new Array(_len), _key = 0; _key < _len; _key++) {
- iterables[_key] = _args4[_key];
- }
-
- // We listen to all iterators in parallel, while logging all the values they
- // produce. Whenever an iterator produces a value, we produce and yield all
- // combinations of that value with the logged values from other iterators.
- // Every combination is thus made exactly once, and as soon as it is known.
- iterators = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()(iterables).call(iterables, function (iterable) {
- return iterable[_babel_runtime_corejs3_core_js_stable_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_7___default.a]();
- }); // Initialise an empty log for each iterable.
-
- logs = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()(iterables).call(iterables, function () {
- return [];
- });
- nextValuePromises = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()(iterators).call(iterators, function (iterator, iterableNr) {
- return iterator.next().then( /*#__PURE__*/function () {
- var _ref = Object(_babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee(_ref2) {
- var value, done;
- return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- value = _ref2.value, done = _ref2.done;
- _context.next = 3;
- return value;
-
- case 3:
- _context.t0 = _context.sent;
- _context.t1 = done;
- return _context.abrupt("return", {
- value: _context.t0,
- done: _context.t1
- });
-
- case 6:
- case "end":
- return _context.stop();
- }
- }
- }, _callee);
- }));
-
- return function (_x) {
- return _ref.apply(this, arguments);
- };
- }()).then( // Label the result with iterableNr, to know which iterable produced
- // this value after Promise.race below.
- function (_ref3) {
- var value = _ref3.value,
- done = _ref3.done;
- return {
- value: value,
- done: done,
- iterableNr: iterableNr
- };
- });
- }); // Keep listening as long as any of the iterables is not yet exhausted.
-
- _loop = /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _loop() {
- var _context2;
-
- var _ref4, value, done, iterableNr, arrays, combinations;
-
- return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _loop$(_context4) {
- while (1) {
- switch (_context4.prev = _context4.next) {
- case 0:
- _context4.next = 2;
- return Object(_babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_10__["default"])(_babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3___default.a.race(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(nextValuePromises).call(nextValuePromises, function (p) {
- return p !== null;
- })));
-
- case 2:
- _ref4 = _context4.sent;
- value = _ref4.value;
- done = _ref4.done;
- iterableNr = _ref4.iterableNr;
-
- if (!done) {
- _context4.next = 9;
- break;
- }
-
- nextValuePromises[iterableNr] = null;
- return _context4.abrupt("return", "continue");
-
- case 9:
- // Produce all combinations of the received value with the logged values
- // from the other iterables.
- arrays = Object(_babel_runtime_corejs3_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__["default"])(logs);
- arrays[iterableNr] = [value];
- combinations = cartesian__WEBPACK_IMPORTED_MODULE_13___default()(arrays); // Append the received value to the right log.
-
- logs[iterableNr] = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0___default()(_context2 = []).call(_context2, Object(_babel_runtime_corejs3_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__["default"])(logs[iterableNr]), [value]); // Start listening for the next value of this iterable.
-
- nextValuePromises[iterableNr] = iterators[iterableNr].next().then( /*#__PURE__*/function () {
- var _ref5 = Object(_babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee2(_ref6) {
- var value, done;
- return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee2$(_context3) {
- while (1) {
- switch (_context3.prev = _context3.next) {
- case 0:
- value = _ref6.value, done = _ref6.done;
- _context3.next = 3;
- return value;
-
- case 3:
- _context3.t0 = _context3.sent;
- _context3.t1 = done;
- return _context3.abrupt("return", {
- value: _context3.t0,
- done: _context3.t1
- });
-
- case 6:
- case "end":
- return _context3.stop();
- }
- }
- }, _callee2);
- }));
-
- return function (_x2) {
- return _ref5.apply(this, arguments);
- };
- }()).then(function (_ref7) {
- var value = _ref7.value,
- done = _ref7.done;
- return {
- value: value,
- done: done,
- iterableNr: iterableNr
- };
- }); // Yield each of the produced combinations separately.
-
- return _context4.delegateYield(Object(_babel_runtime_corejs3_helpers_esm_asyncGeneratorDelegate__WEBPACK_IMPORTED_MODULE_12__["default"])(Object(_babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_11__["default"])(combinations), _babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_10__["default"]), "t0", 15);
-
- case 15:
- case "end":
- return _context4.stop();
- }
- }
- }, _loop);
- });
-
- case 5:
- if (!_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_4___default()(nextValuePromises).call(nextValuePromises, function (p) {
- return p !== null;
- })) {
- _context5.next = 12;
- break;
- }
-
- return _context5.delegateYield(_loop(), "t0", 7);
-
- case 7:
- _ret = _context5.t0;
-
- if (!(_ret === "continue")) {
- _context5.next = 10;
- break;
- }
-
- return _context5.abrupt("continue", 5);
-
- case 10:
- _context5.next = 5;
- break;
-
- case 12:
- case "end":
- return _context5.stop();
- }
- }
- }, _callee3);
- }));
- return _product.apply(this, arguments);
-}
-
-/***/ }),
-
-/***/ "../packages/dom/src/css.js":
-/*!**********************************!*\
- !*** ../packages/dom/src/css.js ***!
- \**********************************/
-/*! exports provided: createCssSelector */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createCssSelector", function() { return createCssSelector; });
-/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/regenerator */ "../node_modules/@babel/runtime-corejs3/regenerator/index.js");
-/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0__);
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator.js");
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator.js");
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncIterator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncIterator.js");
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncGeneratorDelegate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncGeneratorDelegate */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncGeneratorDelegate.js");
-/**
- * @license
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-
-
-function createCssSelector(selector) {
- return (/*#__PURE__*/function () {
- var _matchAll = Object(_babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(scope) {
- return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- return _context.delegateYield(Object(_babel_runtime_corejs3_helpers_esm_asyncGeneratorDelegate__WEBPACK_IMPORTED_MODULE_4__["default"])(Object(_babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_3__["default"])(scope.querySelectorAll(selector.value)), _babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_2__["default"]), "t0", 1);
-
- case 1:
- case "end":
- return _context.stop();
- }
- }
- }, _callee);
- }));
-
- function matchAll(_x) {
- return _matchAll.apply(this, arguments);
- }
-
- return matchAll;
- }()
- );
-}
-
-/***/ }),
-
-/***/ "../packages/dom/src/highlight-range.js":
-/*!**********************************************!*\
- !*** ../packages/dom/src/highlight-range.js ***!
- \**********************************************/
-/*! exports provided: highlightRange */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "highlightRange", function() { return highlightRange; });
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ "../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/for-each */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/for-each.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js/get-iterator */ "../node_modules/@babel/runtime-corejs3/core-js/get-iterator.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_2__);
-/**
- * @license
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-// Wrap each text node in a given DOM Range with a <mark> or other element.
-// Breaks start and/or end node if needed.
-// Returns a function that cleans up the created highlight (not a perfect undo: split text nodes are
-// not merged again).
-//
-// Parameters:
-// - range: a DOM Range object. Note that as highlighting modifies the DOM, the range may be
-// unusable afterwards
-// - tagName: the element used to wrap text nodes. Defaults to 'mark'.
-// - attributes: an Object defining any attributes to be set on the wrapper elements.
-function highlightRange(range) {
- var tagName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'mark';
- var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- if (range.collapsed) return; // First put all nodes in an array (splits start and end nodes if needed)
-
- var nodes = textNodesInRange(range); // Highlight each node
-
- var highlightElements = [];
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
-
- try {
- for (var _iterator = _babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_2___default()(nodes), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var node = _step.value;
- var highlightElement = wrapNodeInHighlight(node, tagName, attributes);
- highlightElements.push(highlightElement);
- } // Return a function that cleans up the highlightElements.
-
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return != null) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
- }
- }
-
- function removeHighlights() {
- // Remove each of the created highlightElements.
- for (var highlightIdx in highlightElements) {
- removeHighlight(highlightElements[highlightIdx]);
- }
- }
-
- return removeHighlights;
-} // Return an array of the text nodes in the range. Split the start and end nodes if required.
-
-function textNodesInRange(range) {
- // If the start or end node is a text node and only partly in the range, split it.
- if (range.startContainer.nodeType === Node.TEXT_NODE && range.startOffset > 0) {
- var endOffset = range.endOffset; // (this may get lost when the splitting the node)
-
- var createdNode = range.startContainer.splitText(range.startOffset);
-
- if (range.endContainer === range.startContainer) {
- // If the end was in the same container, it will now be in the newly created node.
- range.setEnd(createdNode, endOffset - range.startOffset);
- }
-
- range.setStart(createdNode, 0);
- }
-
- if (range.endContainer.nodeType === Node.TEXT_NODE && range.endOffset < range.endContainer.length) {
- range.endContainer.splitText(range.endOffset);
- } // Collect the text nodes.
-
-
- var walker = range.startContainer.ownerDocument.createTreeWalker(range.commonAncestorContainer, NodeFilter.SHOW_TEXT, function (node) {
- return range.intersectsNode(node) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
- });
- walker.currentNode = range.startContainer; // // Optimise by skipping nodes that are explicitly outside the range.
- // const NodeTypesWithCharacterOffset = [
- // Node.TEXT_NODE,
- // Node.PROCESSING_INSTRUCTION_NODE,
- // Node.COMMENT_NODE,
- // ];
- // if (!NodeTypesWithCharacterOffset.includes(range.startContainer.nodeType)) {
- // if (range.startOffset < range.startContainer.childNodes.length) {
- // walker.currentNode = range.startContainer.childNodes[range.startOffset];
- // } else {
- // walker.nextSibling(); // TODO verify this is correct.
- // }
- // }
-
- var nodes = [];
- if (walker.currentNode.nodeType === Node.TEXT_NODE) nodes.push(walker.currentNode);
-
- while (walker.nextNode() && range.comparePoint(walker.currentNode, 0) !== 1) {
- nodes.push(walker.currentNode);
- }
-
- return nodes;
-} // Replace [node] with <tagName ...attributes>[node]</tagName>
-
-
-function wrapNodeInHighlight(node, tagName, attributes) {
- var _context;
-
- var highlightElement = node.ownerDocument.createElement(tagName);
-
- _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default()(_context = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(attributes)).call(_context, function (key) {
- highlightElement.setAttribute(key, attributes[key]);
- });
-
- var tempRange = node.ownerDocument.createRange();
- tempRange.selectNode(node);
- tempRange.surroundContents(highlightElement);
- return highlightElement;
-} // Remove a highlight element created with wrapNodeInHighlight.
-
-
-function removeHighlight(highlightElement) {
- if (highlightElement.childNodes.length === 1) {
- highlightElement.parentNode.replaceChild(highlightElement.firstChild, highlightElement);
- } else {
- // If the highlight somehow contains multiple nodes now, move them all.
- while (highlightElement.firstChild) {
- highlightElement.parentNode.insertBefore(highlightElement.firstChild, highlightElement);
- }
-
- highlightElement.remove();
- }
-}
-
-/***/ }),
-
-/***/ "../packages/dom/src/index.js":
-/*!************************************!*\
- !*** ../packages/dom/src/index.js ***!
- \************************************/
-/*! exports provided: createCssSelector, createRangeSelectorCreator, createTextQuoteSelector, describeTextQuote, highlightRange */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony import */ var _css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css */ "../packages/dom/src/css.js");
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createCssSelector", function() { return _css__WEBPACK_IMPORTED_MODULE_0__["createCssSelector"]; });
-
-/* harmony import */ var _range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./range */ "../packages/dom/src/range.js");
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createRangeSelectorCreator", function() { return _range__WEBPACK_IMPORTED_MODULE_1__["createRangeSelectorCreator"]; });
-
-/* harmony import */ var _text_quote__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./text-quote */ "../packages/dom/src/text-quote.js");
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTextQuoteSelector", function() { return _text_quote__WEBPACK_IMPORTED_MODULE_2__["createTextQuoteSelector"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "describeTextQuote", function() { return _text_quote__WEBPACK_IMPORTED_MODULE_2__["describeTextQuote"]; });
-
-/* harmony import */ var _highlight_range__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./highlight-range */ "../packages/dom/src/highlight-range.js");
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "highlightRange", function() { return _highlight_range__WEBPACK_IMPORTED_MODULE_3__["highlightRange"]; });
-
-/**
- * @license
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-
-
-/***/ }),
-
-/***/ "../packages/dom/src/range.js":
-/*!************************************!*\
- !*** ../packages/dom/src/range.js ***!
- \************************************/
-/*! exports provided: createRangeSelectorCreator */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createRangeSelectorCreator", function() { return createRangeSelectorCreator; });
-/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/regenerator */ "../node_modules/@babel/runtime-corejs3/regenerator/index.js");
-/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0__);
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/slicedToArray */ "../node_modules/@babel/runtime-corejs3/helpers/esm/slicedToArray.js");
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator.js");
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator.js");
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncIterator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncIterator.js");
-/* harmony import */ var _scope_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./scope.js */ "../packages/dom/src/scope.js");
-/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cartesian.js */ "../packages/dom/src/cartesian.js");
-/**
- * @license
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-
-
-
-
-
-function createRangeSelectorCreator(createSelector) {
- return function createRangeSelector(selector) {
- var startSelector = createSelector(selector.startSelector);
- var endSelector = createSelector(selector.endSelector);
- return (/*#__PURE__*/function () {
- var _matchAll = Object(_babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_3__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(scope) {
- var document, startMatches, endMatches, pairs, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, _value2, _value3, start, end, result;
-
- return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- document = Object(_scope_js__WEBPACK_IMPORTED_MODULE_5__["ownerDocument"])(scope);
- startMatches = startSelector(scope);
- endMatches = endSelector(scope);
- pairs = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_6__["product"])(startMatches, endMatches);
- _iteratorNormalCompletion = true;
- _didIteratorError = false;
- _context.prev = 6;
- _iterator = Object(_babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_4__["default"])(pairs);
-
- case 8:
- _context.next = 10;
- return Object(_babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_2__["default"])(_iterator.next());
-
- case 10:
- _step = _context.sent;
- _iteratorNormalCompletion = _step.done;
- _context.next = 14;
- return Object(_babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_2__["default"])(_step.value);
-
- case 14:
- _value = _context.sent;
+ reset: function(skipTempReset) {
+ this.prev = 0;
+ this.next = 0;
+ // Resetting context._sent for legacy support of Babel's
+ // function.sent implementation.
+ this.sent = this._sent = undefined;
+ this.done = false;
+ this.delegate = null;
- if (_iteratorNormalCompletion) {
- _context.next = 26;
- break;
- }
+ this.method = "next";
+ this.arg = undefined;
- _value2 = _value, _value3 = Object(_babel_runtime_corejs3_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_value2, 2), start = _value3[0], end = _value3[1];
- result = document.createRange();
- result.setStart(start.endContainer, start.endOffset);
- result.setEnd(end.startContainer, end.startOffset);
+ this.tryEntries.forEach(resetTryEntry);
- if (result.collapsed) {
- _context.next = 23;
- break;
- }
+ if (!skipTempReset) {
+ for (var name in this) {
+ // Not sure about the optimal order of these conditions:
+ if (name.charAt(0) === "t" &&
+ hasOwn.call(this, name) &&
+ !isNaN(+name.slice(1))) {
+ this[name] = undefined;
+ }
+ }
+ }
+ },
- _context.next = 23;
- return result;
+ stop: function() {
+ this.done = true;
- case 23:
- _iteratorNormalCompletion = true;
- _context.next = 8;
- break;
+ var rootEntry = this.tryEntries[0];
+ var rootRecord = rootEntry.completion;
+ if (rootRecord.type === "throw") {
+ throw rootRecord.arg;
+ }
- case 26:
- _context.next = 32;
- break;
+ return this.rval;
+ },
- case 28:
- _context.prev = 28;
- _context.t0 = _context["catch"](6);
- _didIteratorError = true;
- _iteratorError = _context.t0;
+ dispatchException: function(exception) {
+ if (this.done) {
+ throw exception;
+ }
- case 32:
- _context.prev = 32;
- _context.prev = 33;
+ var context = this;
+ function handle(loc, caught) {
+ record.type = "throw";
+ record.arg = exception;
+ context.next = loc;
- if (!(!_iteratorNormalCompletion && _iterator.return != null)) {
- _context.next = 37;
- break;
- }
+ if (caught) {
+ // If the dispatched exception was caught by a catch block,
+ // then let that catch block handle the exception normally.
+ context.method = "next";
+ context.arg = undefined;
+ }
- _context.next = 37;
- return Object(_babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_2__["default"])(_iterator.return());
+ return !! caught;
+ }
- case 37:
- _context.prev = 37;
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ var record = entry.completion;
- if (!_didIteratorError) {
- _context.next = 40;
- break;
- }
+ if (entry.tryLoc === "root") {
+ // Exception thrown outside of any try block that could handle
+ // it, so set the completion value of the entire function to
+ // throw the exception.
+ return handle("end");
+ }
- throw _iteratorError;
+ if (entry.tryLoc <= this.prev) {
+ var hasCatch = hasOwn.call(entry, "catchLoc");
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
- case 40:
- return _context.finish(37);
+ if (hasCatch && hasFinally) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ } else if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
- case 41:
- return _context.finish(32);
+ } else if (hasCatch) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ }
- case 42:
- case "end":
- return _context.stop();
- }
+ } else if (hasFinally) {
+ if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
}
- }, _callee, null, [[6, 28, 32, 42], [33,, 37, 41]]);
- }));
- function matchAll(_x) {
- return _matchAll.apply(this, arguments);
+ } else {
+ throw new Error("try statement without catch or finally");
+ }
}
+ }
+ },
- return matchAll;
- }()
- );
- };
-}
-
-/***/ }),
-
-/***/ "../packages/dom/src/scope.js":
-/*!************************************!*\
- !*** ../packages/dom/src/scope.js ***!
- \************************************/
-/*! exports provided: ownerDocument, rangeFromScope */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ownerDocument", function() { return ownerDocument; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rangeFromScope", function() { return rangeFromScope; });
-/**
- * @license
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-function ownerDocument(scope) {
- if ('commonAncestorContainer' in scope) {
- return scope.commonAncestorContainer.ownerDocument;
- }
-
- return scope.ownerDocument;
-}
-function rangeFromScope(scope) {
- if ('commonAncestorContainer' in scope) {
- return scope;
- }
-
- var document = scope.ownerDocument;
- var range = document.createRange();
- range.selectNodeContents(scope);
- return range;
-}
+ abrupt: function(type, arg) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc <= this.prev &&
+ hasOwn.call(entry, "finallyLoc") &&
+ this.prev < entry.finallyLoc) {
+ var finallyEntry = entry;
+ break;
+ }
+ }
-/***/ }),
+ if (finallyEntry &&
+ (type === "break" ||
+ type === "continue") &&
+ finallyEntry.tryLoc <= arg &&
+ arg <= finallyEntry.finallyLoc) {
+ // Ignore the finally entry if control is not jumping to a
+ // location outside the try/catch block.
+ finallyEntry = null;
+ }
-/***/ "../packages/dom/src/text-quote.js":
-/*!*****************************************!*\
- !*** ../packages/dom/src/text-quote.js ***!
- \*****************************************/
-/*! exports provided: createTextQuoteSelector, describeTextQuote */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var record = finallyEntry ? finallyEntry.completion : {};
+ record.type = type;
+ record.arg = arg;
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createTextQuoteSelector", function() { return createTextQuoteSelector; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "describeTextQuote", function() { return describeTextQuote; });
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/every */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/every.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_0__);
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/slicedToArray */ "../node_modules/@babel/runtime-corejs3/helpers/esm/slicedToArray.js");
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/typeof */ "../node_modules/@babel/runtime-corejs3/helpers/esm/typeof.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js/get-iterator */ "../node_modules/@babel/runtime-corejs3/core-js/get-iterator.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_3__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/sort */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/sort.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_4__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_flat_map__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/flat-map */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/flat-map.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_flat_map__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_flat_map__WEBPACK_IMPORTED_MODULE_6__);
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncToGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncToGenerator.js");
-/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime-corejs3/regenerator */ "../node_modules/@babel/runtime-corejs3/regenerator/index.js");
-/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_8__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_9__);
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncIterator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncIterator.js");
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator.js");
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator.js");
-/* harmony import */ var dom_node_iterator__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! dom-node-iterator */ "../node_modules/dom-node-iterator/index.js");
-/* harmony import */ var dom_node_iterator__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(dom_node_iterator__WEBPACK_IMPORTED_MODULE_13__);
-/* harmony import */ var dom_seek__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! dom-seek */ "../node_modules/dom-seek/index.js");
-/* harmony import */ var dom_seek__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(dom_seek__WEBPACK_IMPORTED_MODULE_14__);
-/* harmony import */ var _scope_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./scope.js */ "../packages/dom/src/scope.js");
-/**
- * @license
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
+ if (finallyEntry) {
+ this.method = "next";
+ this.next = finallyEntry.finallyLoc;
+ return ContinueSentinel;
+ }
+
+ return this.complete(record);
+ },
+ complete: function(record, afterLoc) {
+ if (record.type === "throw") {
+ throw record.arg;
+ }
+ if (record.type === "break" ||
+ record.type === "continue") {
+ this.next = record.arg;
+ } else if (record.type === "return") {
+ this.rval = this.arg = record.arg;
+ this.method = "return";
+ this.next = "end";
+ } else if (record.type === "normal" && afterLoc) {
+ this.next = afterLoc;
+ }
+ return ContinueSentinel;
+ },
+ finish: function(finallyLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.finallyLoc === finallyLoc) {
+ this.complete(entry.completion, entry.afterLoc);
+ resetTryEntry(entry);
+ return ContinueSentinel;
+ }
+ }
+ },
+ "catch": function(tryLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc === tryLoc) {
+ var record = entry.completion;
+ if (record.type === "throw") {
+ var thrown = record.arg;
+ resetTryEntry(entry);
+ }
+ return thrown;
+ }
+ }
+ // The context.catch method must only be called with a location
+ // argument that corresponds to a known catch block.
+ throw new Error("illegal catch attempt");
+ },
+ delegateYield: function(iterable, resultName, nextLoc) {
+ this.delegate = {
+ iterator: values(iterable),
+ resultName: resultName,
+ nextLoc: nextLoc
+ };
+ if (this.method === "next") {
+ // Deliberately forget the last sent value so that we don't
+ // accidentally pass it on to the delegate.
+ this.arg = undefined;
+ }
+ return ContinueSentinel;
+ }
+ };
+ // Regardless of whether this script is executing as a CommonJS module
+ // or not, return the runtime object so that we can declare the variable
+ // regeneratorRuntime in the outer scope, which allows this module to be
+ // injected easily by `bin/regenerator --include-runtime script.js`.
+ return exports;
+}(
+ // If this script is executing as a CommonJS module, use module.exports
+ // as the regeneratorRuntime namespace. Otherwise create a new empty
+ // object. Either way, the resulting object will be used to initialize
+ // the regeneratorRuntime variable at the top of this file.
+ true ? module.exports : undefined
+));
+try {
+ regeneratorRuntime = runtime;
+} catch (accidentalStrictMode) {
+ // This module should not be running in strict mode, so the above
+ // assignment should always work unless something is misconfigured. Just
+ // in case runtime.js accidentally runs in strict mode, we can escape
+ // strict mode using a global Function call. This could conceivably fail
+ // if a Content Security Policy forbids using Function, but in that case
+ // the proper solution is to fix the accidental strict mode problem. If
+ // you've misconfigured your bundler to force strict mode and applied a
+ // CSP to forbid Function, and you're not willing to fix either of those
+ // problems, please detail your unique predicament in a GitHub issue.
+ Function("r", "regeneratorRuntime = r")(runtime);
+}
+/***/ }),
- // Node constants
+/***/ "../node_modules/webpack/buildin/global.js":
+/*!*************************************************!*\
+ !*** ../node_modules/webpack/buildin/global.js ***!
+ \*************************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
-var TEXT_NODE = 3; // NodeFilter constants
+var g;
-var SHOW_TEXT = 4;
+// This works in non-strict mode
+g = (function() {
+ return this;
+})();
-function firstTextNodeInRange(range) {
- var startContainer = range.startContainer;
- if (startContainer.nodeType === TEXT_NODE) return startContainer;
- var root = range.commonAncestorContainer;
- var iter = dom_node_iterator__WEBPACK_IMPORTED_MODULE_13___default()(root, SHOW_TEXT);
- return iter.nextNode();
+try {
+ // This works if eval is allowed (see CSP)
+ g = g || new Function("return this")();
+} catch (e) {
+ // This works if the window reference is available
+ if (typeof window === "object") g = window;
}
-function createTextQuoteSelector(selector) {
- return (/*#__PURE__*/function () {
- var _matchAll = Object(_babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_12__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_8___default.a.mark(function _callee(scope) {
- var document, range, root, text, exact, prefix, suffix, pattern, iter, fromIndex, referenceNodeIndex, patternStartIndex, match, matchStartIndex, matchEndIndex;
- return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_8___default.a.wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- document = Object(_scope_js__WEBPACK_IMPORTED_MODULE_15__["ownerDocument"])(scope);
- range = Object(_scope_js__WEBPACK_IMPORTED_MODULE_15__["rangeFromScope"])(scope);
- root = range.commonAncestorContainer;
- text = range.toString();
- exact = selector.exact;
- prefix = selector.prefix || '';
- suffix = selector.suffix || '';
- pattern = prefix + exact + suffix;
- iter = dom_node_iterator__WEBPACK_IMPORTED_MODULE_13___default()(root, SHOW_TEXT);
- fromIndex = 0;
- referenceNodeIndex = 0;
+// g can still be undefined, but nothing to do about it...
+// We return undefined, instead of nothing here, so it's
+// easier to handle this case. if(!global) { ...}
- if (range.startContainer.nodeType === TEXT_NODE) {
- referenceNodeIndex -= range.startOffset;
- }
+module.exports = g;
- case 12:
- if (!(fromIndex < text.length)) {
- _context.next = 31;
- break;
- }
- patternStartIndex = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_9___default()(text).call(text, pattern, fromIndex);
+/***/ }),
- if (!(patternStartIndex === -1)) {
- _context.next = 16;
- break;
- }
+/***/ "../node_modules/xtend/immutable.js":
+/*!******************************************!*\
+ !*** ../node_modules/xtend/immutable.js ***!
+ \******************************************/
+/*! no static exports found */
+/***/ (function(module, exports) {
- return _context.abrupt("return");
+module.exports = extend
- case 16:
- match = document.createRange();
- matchStartIndex = patternStartIndex + prefix.length;
- matchEndIndex = matchStartIndex + exact.length; // Seek to the start of the match.
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+function extend() {
+ var target = {}
+
+ for (var i = 0; i < arguments.length; i++) {
+ var source = arguments[i]
+
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ target[key] = source[key]
+ }
+ }
+ }
- referenceNodeIndex += dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(iter, matchStartIndex - referenceNodeIndex); // Normalize the reference to the start of the match.
+ return target
+}
- if (!iter.pointerBeforeReferenceNode) {
- // Peek forward and skip over any empty nodes.
- if (iter.nextNode()) {
- while (iter.referenceNode.nodeValue.length === 0) {
- iter.nextNode();
- } // The iterator now points to the end of the reference node.
- // Move the iterator back to the start of the reference node.
+/***/ }),
- iter.previousNode();
- }
- } // Record the start container and offset.
+/***/ "../packages/dom/src/cartesian.js":
+/*!****************************************!*\
+ !*** ../packages/dom/src/cartesian.js ***!
+ \****************************************/
+/*! exports provided: product */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "product", function() { return product; });
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/concat */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/toConsumableArray */ "../node_modules/@babel/runtime-corejs3/helpers/esm/toConsumableArray.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/promise */ "../node_modules/@babel/runtime-corejs3/core-js-stable/promise.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3__);
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/some */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/some.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_4__);
+/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/regenerator */ "../node_modules/@babel/runtime-corejs3/regenerator/index.js");
+/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5__);
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncToGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncToGenerator.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/symbol/async-iterator */ "../node_modules/@babel/runtime-corejs3/core-js-stable/symbol/async-iterator.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_7__);
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8__);
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator.js");
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator.js");
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncIterator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncIterator.js");
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncGeneratorDelegate__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncGeneratorDelegate */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncGeneratorDelegate.js");
+/* harmony import */ var cartesian__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! cartesian */ "../node_modules/cartesian/index.js");
+/* harmony import */ var cartesian__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(cartesian__WEBPACK_IMPORTED_MODULE_13__);
+/**
+ * @license
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
- match.setStart(iter.referenceNode, matchStartIndex - referenceNodeIndex); // Seek to the end of the match.
- referenceNodeIndex += dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(iter, matchEndIndex - referenceNodeIndex); // Normalize the reference to the end of the match.
- if (!iter.pointerBeforeReferenceNode) {
- // Peek forward and skip over any empty nodes.
- if (iter.nextNode()) {
- while (iter.referenceNode.nodeValue.length === 0) {
- iter.nextNode();
- } // The iterator now points to the end of the reference node.
- // Move the iterator back to the start of the reference node.
- iter.previousNode();
- } // Maybe seek backwards to the start of the node.
- referenceNodeIndex += dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(iter, iter.referenceNode);
- } // Record the end container and offset.
- match.setEnd(iter.referenceNode, matchEndIndex - referenceNodeIndex); // Yield the match.
- _context.next = 27;
- return match;
- case 27:
- // Advance the search forward.
- fromIndex = matchStartIndex + 1;
- referenceNodeIndex += dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(iter, fromIndex - referenceNodeIndex);
- _context.next = 12;
- break;
- case 31:
- case "end":
- return _context.stop();
- }
- }
- }, _callee);
- }));
- function matchAll(_x) {
- return _matchAll.apply(this, arguments);
- }
- return matchAll;
- }()
- );
-}
-function describeTextQuote(_x2) {
- return _describeTextQuote.apply(this, arguments);
+function product() {
+ return _product.apply(this, arguments);
}
-function _describeTextQuote() {
- _describeTextQuote = Object(_babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_7__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_8___default.a.mark(function _callee2(range) {
- var scope,
- root,
- text,
- exact,
- selector,
- iter,
- startNode,
- startIndex,
- endIndex,
- affixLengthPairs,
- _iteratorNormalCompletion,
- _didIteratorError,
- _iteratorError,
- _iterator,
- _step,
- _value,
- match,
- matchIter,
- matchStartNode,
- matchStartIndex,
- matchEndIndex,
- prefixLength,
- suffixLength,
- result,
- _minimalSolution,
- _minimalSolution2,
- _prefixLength,
- _suffixLength,
- _args2 = arguments;
+function _product() {
+ _product = Object(_babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_9__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee3() {
+ var _len,
+ iterables,
+ _key,
+ iterators,
+ logs,
+ nextValuePromises,
+ _loop,
+ _ret,
+ _args4 = arguments;
- return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_8___default.a.wrap(function _callee2$(_context2) {
+ return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee3$(_context5) {
while (1) {
- switch (_context2.prev = _context2.next) {
+ switch (_context5.prev = _context5.next) {
case 0:
- scope = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : null;
- scope = Object(_scope_js__WEBPACK_IMPORTED_MODULE_15__["rangeFromScope"])(scope || Object(_scope_js__WEBPACK_IMPORTED_MODULE_15__["ownerDocument"])(range).documentElement);
- root = scope.commonAncestorContainer;
- text = scope.toString();
- exact = range.toString();
- selector = createTextQuoteSelector({
- exact: exact
+ for (_len = _args4.length, iterables = new Array(_len), _key = 0; _key < _len; _key++) {
+ iterables[_key] = _args4[_key];
+ }
+
+ // We listen to all iterators in parallel, while logging all the values they
+ // produce. Whenever an iterator produces a value, we produce and yield all
+ // combinations of that value with the logged values from other iterators.
+ // Every combination is thus made exactly once, and as soon as it is known.
+ iterators = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()(iterables).call(iterables, function (iterable) {
+ return iterable[_babel_runtime_corejs3_core_js_stable_symbol_async_iterator__WEBPACK_IMPORTED_MODULE_7___default.a]();
+ }); // Initialise an empty log for each iterable.
+
+ logs = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()(iterables).call(iterables, function () {
+ return [];
});
- iter = dom_node_iterator__WEBPACK_IMPORTED_MODULE_13___default()(root, SHOW_TEXT);
- startNode = firstTextNodeInRange(range);
- startIndex = range.startContainer.nodeType === TEXT_NODE ? dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(iter, startNode) + range.startOffset : dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(iter, startNode);
- endIndex = startIndex + exact.length;
- affixLengthPairs = [];
- _iteratorNormalCompletion = true;
- _didIteratorError = false;
- _context2.prev = 13;
- _iterator = Object(_babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_10__["default"])(selector(scope));
+ nextValuePromises = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()(iterators).call(iterators, function (iterator, iterableNr) {
+ return iterator.next().then( /*#__PURE__*/function () {
+ var _ref = Object(_babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee(_ref2) {
+ var value, done;
+ return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee$(_context) {
+ while (1) {
+ switch (_context.prev = _context.next) {
+ case 0:
+ value = _ref2.value, done = _ref2.done;
+ _context.next = 3;
+ return value;
- case 15:
- _context2.next = 17;
- return _iterator.next();
+ case 3:
+ _context.t0 = _context.sent;
+ _context.t1 = done;
+ return _context.abrupt("return", {
+ value: _context.t0,
+ done: _context.t1
+ });
- case 17:
- _step = _context2.sent;
- _iteratorNormalCompletion = _step.done;
- _context2.next = 21;
- return _step.value;
+ case 6:
+ case "end":
+ return _context.stop();
+ }
+ }
+ }, _callee);
+ }));
- case 21:
- _value = _context2.sent;
+ return function (_x) {
+ return _ref.apply(this, arguments);
+ };
+ }()).then( // Label the result with iterableNr, to know which iterable produced
+ // this value after Promise.race below.
+ function (_ref3) {
+ var value = _ref3.value,
+ done = _ref3.done;
+ return {
+ value: value,
+ done: done,
+ iterableNr: iterableNr
+ };
+ });
+ }); // Keep listening as long as any of the iterables is not yet exhausted.
- if (_iteratorNormalCompletion) {
- _context2.next = 36;
- break;
- }
+ _loop = /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _loop() {
+ var _context2;
+
+ var _ref4, value, done, iterableNr, arrays, combinations;
+
+ return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _loop$(_context4) {
+ while (1) {
+ switch (_context4.prev = _context4.next) {
+ case 0:
+ _context4.next = 2;
+ return Object(_babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_10__["default"])(_babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3___default.a.race(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(nextValuePromises).call(nextValuePromises, function (p) {
+ return p !== null;
+ })));
+
+ case 2:
+ _ref4 = _context4.sent;
+ value = _ref4.value;
+ done = _ref4.done;
+ iterableNr = _ref4.iterableNr;
- match = _value;
- matchIter = dom_node_iterator__WEBPACK_IMPORTED_MODULE_13___default()(root, SHOW_TEXT);
- matchStartNode = firstTextNodeInRange(match);
- matchStartIndex = match.startContainer.nodeType === TEXT_NODE ? dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(matchIter, matchStartNode) + match.startOffset : dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(matchIter, matchStartNode);
- matchEndIndex = matchStartIndex + match.toString().length; // If the match is the same as the input range, continue.
+ if (!done) {
+ _context4.next = 9;
+ break;
+ }
- if (!(matchStartIndex === startIndex || matchEndIndex === endIndex)) {
- _context2.next = 30;
- break;
- }
+ nextValuePromises[iterableNr] = null;
+ return _context4.abrupt("return", "continue");
- return _context2.abrupt("continue", 33);
+ case 9:
+ // Produce all combinations of the received value with the logged values
+ // from the other iterables.
+ arrays = Object(_babel_runtime_corejs3_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__["default"])(logs);
+ arrays[iterableNr] = [value];
+ combinations = cartesian__WEBPACK_IMPORTED_MODULE_13___default()(arrays); // Append the received value to the right log.
- case 30:
- // Determine how many prefix characters are shared.
- prefixLength = overlapRight(text.substring(0, matchStartIndex), text.substring(0, startIndex)); // Determine how many suffix characters are shared.
+ logs[iterableNr] = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0___default()(_context2 = []).call(_context2, Object(_babel_runtime_corejs3_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__["default"])(logs[iterableNr]), [value]); // Start listening for the next value of this iterable.
- suffixLength = overlap(text.substring(matchEndIndex), text.substring(endIndex)); // Record the affix lengths that would have precluded this match.
+ nextValuePromises[iterableNr] = iterators[iterableNr].next().then( /*#__PURE__*/function () {
+ var _ref5 = Object(_babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_6__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee2(_ref6) {
+ var value, done;
+ return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee2$(_context3) {
+ while (1) {
+ switch (_context3.prev = _context3.next) {
+ case 0:
+ value = _ref6.value, done = _ref6.done;
+ _context3.next = 3;
+ return value;
- affixLengthPairs.push([prefixLength + 1, suffixLength + 1]);
+ case 3:
+ _context3.t0 = _context3.sent;
+ _context3.t1 = done;
+ return _context3.abrupt("return", {
+ value: _context3.t0,
+ done: _context3.t1
+ });
- case 33:
- _iteratorNormalCompletion = true;
- _context2.next = 15;
- break;
+ case 6:
+ case "end":
+ return _context3.stop();
+ }
+ }
+ }, _callee2);
+ }));
- case 36:
- _context2.next = 42;
- break;
+ return function (_x2) {
+ return _ref5.apply(this, arguments);
+ };
+ }()).then(function (_ref7) {
+ var value = _ref7.value,
+ done = _ref7.done;
+ return {
+ value: value,
+ done: done,
+ iterableNr: iterableNr
+ };
+ }); // Yield each of the produced combinations separately.
- case 38:
- _context2.prev = 38;
- _context2.t0 = _context2["catch"](13);
- _didIteratorError = true;
- _iteratorError = _context2.t0;
+ return _context4.delegateYield(Object(_babel_runtime_corejs3_helpers_esm_asyncGeneratorDelegate__WEBPACK_IMPORTED_MODULE_12__["default"])(Object(_babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_11__["default"])(combinations), _babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_10__["default"]), "t0", 15);
- case 42:
- _context2.prev = 42;
- _context2.prev = 43;
+ case 15:
+ case "end":
+ return _context4.stop();
+ }
+ }
+ }, _loop);
+ });
- if (!(!_iteratorNormalCompletion && _iterator.return != null)) {
- _context2.next = 47;
+ case 5:
+ if (!_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_4___default()(nextValuePromises).call(nextValuePromises, function (p) {
+ return p !== null;
+ })) {
+ _context5.next = 12;
break;
}
- _context2.next = 47;
- return _iterator.return();
+ return _context5.delegateYield(_loop(), "t0", 7);
- case 47:
- _context2.prev = 47;
+ case 7:
+ _ret = _context5.t0;
- if (!_didIteratorError) {
- _context2.next = 50;
+ if (!(_ret === "continue")) {
+ _context5.next = 10;
break;
}
- throw _iteratorError;
+ return _context5.abrupt("continue", 5);
- case 50:
- return _context2.finish(47);
+ case 10:
+ _context5.next = 5;
+ break;
- case 51:
- return _context2.finish(42);
+ case 12:
+ case "end":
+ return _context5.stop();
+ }
+ }
+ }, _callee3);
+ }));
+ return _product.apply(this, arguments);
+}
- case 52:
- // Construct and return an unambiguous selector.
- result = {
- type: 'TextQuoteSelector',
- exact: exact
- };
+/***/ }),
- if (affixLengthPairs.length) {
- _minimalSolution = minimalSolution(affixLengthPairs), _minimalSolution2 = Object(_babel_runtime_corejs3_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_minimalSolution, 2), _prefixLength = _minimalSolution2[0], _suffixLength = _minimalSolution2[1];
+/***/ "../packages/dom/src/css.js":
+/*!**********************************!*\
+ !*** ../packages/dom/src/css.js ***!
+ \**********************************/
+/*! exports provided: createCssSelector */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- if (_prefixLength > 0 && startIndex > 0) {
- result.prefix = text.substring(startIndex - _prefixLength, startIndex);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createCssSelector", function() { return createCssSelector; });
+/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/regenerator */ "../node_modules/@babel/runtime-corejs3/regenerator/index.js");
+/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator.js");
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator.js");
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncIterator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncIterator.js");
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncGeneratorDelegate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncGeneratorDelegate */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncGeneratorDelegate.js");
+/**
+ * @license
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
- if (_suffixLength > 0 && endIndex < text.length) {
- result.suffix = text.substring(endIndex, endIndex + _suffixLength);
- }
- }
- return _context2.abrupt("return", result);
- case 55:
- case "end":
- return _context2.stop();
- }
- }
- }, _callee2, null, [[13, 38, 42, 52], [43,, 47, 51]]);
- }));
- return _describeTextQuote.apply(this, arguments);
-}
-function overlap(text1, text2) {
- var count = 0;
- while (count < text1.length && count < text2.length) {
- var c1 = text1[count];
- var c2 = text2[count];
- if (c1 !== c2) break;
- count++;
- }
+function createCssSelector(selector) {
+ return (/*#__PURE__*/function () {
+ var _matchAll = Object(_babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(scope) {
+ return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
+ while (1) {
+ switch (_context.prev = _context.next) {
+ case 0:
+ return _context.delegateYield(Object(_babel_runtime_corejs3_helpers_esm_asyncGeneratorDelegate__WEBPACK_IMPORTED_MODULE_4__["default"])(Object(_babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_3__["default"])(scope.querySelectorAll(selector.value)), _babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_2__["default"]), "t0", 1);
- return count;
+ case 1:
+ case "end":
+ return _context.stop();
+ }
+ }
+ }, _callee);
+ }));
+
+ function matchAll(_x) {
+ return _matchAll.apply(this, arguments);
+ }
+
+ return matchAll;
+ }()
+ );
}
-function overlapRight(text1, text2) {
- var count = 0;
+/***/ }),
- while (count < text1.length && count < text2.length) {
- var c1 = text1[text1.length - 1 - count];
- var c2 = text2[text2.length - 1 - count];
- if (c1 !== c2) break;
- count++;
- }
+/***/ "../packages/dom/src/highlight-range.js":
+/*!**********************************************!*\
+ !*** ../packages/dom/src/highlight-range.js ***!
+ \**********************************************/
+/*! exports provided: highlightRange */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "highlightRange", function() { return highlightRange; });
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ "../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/for-each */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/for-each.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js/get-iterator */ "../node_modules/@babel/runtime-corejs3/core-js/get-iterator.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_2__);
+/**
+ * @license
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
- return count;
-}
-function minimalSolution(requirements) {
- // Build all the pairs and order them by their sums.
- var pairs = _babel_runtime_corejs3_core_js_stable_instance_flat_map__WEBPACK_IMPORTED_MODULE_6___default()(requirements).call(requirements, function (l) {
- return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(requirements).call(requirements, function (r) {
- return [l[0], r[1]];
- });
- });
- _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_4___default()(pairs).call(pairs, function (a, b) {
- return a[0] + a[1] - (b[0] + b[1]);
- }); // Find the first pair that satisfies every requirement.
+// Wrap each text node in a given DOM Range with a <mark> or other element.
+// Breaks start and/or end node if needed.
+// Returns a function that cleans up the created highlight (not a perfect undo: split text nodes are
+// not merged again).
+//
+// Parameters:
+// - range: a DOM Range object. Note that as highlighting modifies the DOM, the range may be
+// unusable afterwards
+// - tagName: the element used to wrap text nodes. Defaults to 'mark'.
+// - attributes: an Object defining any attributes to be set on the wrapper elements.
+function highlightRange(range) {
+ var tagName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'mark';
+ var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+ if (range.collapsed) return; // First put all nodes in an array (splits start and end nodes if needed)
+ var nodes = textNodesInRange(range); // Highlight each node
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
+ var highlightElements = [];
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
try {
- var _loop = function _loop() {
- var pair = _step2.value;
-
- var _pair = Object(_babel_runtime_corejs3_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(pair, 2),
- p0 = _pair[0],
- p1 = _pair[1];
-
- if (_babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_0___default()(requirements).call(requirements, function (_ref) {
- var _ref2 = Object(_babel_runtime_corejs3_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, 2),
- r0 = _ref2[0],
- r1 = _ref2[1];
-
- return r0 <= p0 || r1 <= p1;
- })) {
- return {
- v: pair
- };
- }
- };
-
- for (var _iterator2 = _babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_3___default()(pairs), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var _ret = _loop();
-
- if (Object(_babel_runtime_corejs3_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__["default"])(_ret) === "object") return _ret.v;
- } // Return the largest pairing (unreachable).
+ for (var _iterator = _babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_2___default()(nodes), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var node = _step.value;
+ var highlightElement = wrapNodeInHighlight(node, tagName, attributes);
+ highlightElements.push(highlightElement);
+ } // Return a function that cleans up the highlightElements.
} catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
+ _didIteratorError = true;
+ _iteratorError = err;
} finally {
try {
- if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
- _iterator2.return();
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
}
} finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
+ if (_didIteratorError) {
+ throw _iteratorError;
}
}
}
- return pairs[pairs.length - 1];
-}
+ function removeHighlights() {
+ // Remove each of the created highlightElements.
+ for (var highlightIdx in highlightElements) {
+ removeHighlight(highlightElements[highlightIdx]);
+ }
+ }
-/***/ }),
+ return removeHighlights;
+} // Return an array of the text nodes in the range. Split the start and end nodes if required.
-/***/ "../packages/fragment-identifier/src/fragment.js":
-/*!*******************************************************!*\
- !*** ../packages/fragment-identifier/src/fragment.js ***!
- \*******************************************************/
-/*! exports provided: SyntaxError, parse, default */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+function textNodesInRange(range) {
+ // If the start or end node is a text node and only partly in the range, split it.
+ if (range.startContainer.nodeType === Node.TEXT_NODE && range.startOffset > 0) {
+ var endOffset = range.endOffset; // (this may get lost when the splitting the node)
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SyntaxError", function() { return peg$SyntaxError; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parse", function() { return peg$parse; });
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/slice */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_0__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/sort */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/sort.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_1__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/array/is-array */ "../node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_2__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3__);
+ var createdNode = range.startContainer.splitText(range.startOffset);
+
+ if (range.endContainer === range.startContainer) {
+ // If the end was in the same container, it will now be in the newly created node.
+ range.setEnd(createdNode, endOffset - range.startOffset);
+ }
+ range.setStart(createdNode, 0);
+ }
+
+ if (range.endContainer.nodeType === Node.TEXT_NODE && range.endOffset < range.endContainer.length) {
+ range.endContainer.splitText(range.endOffset);
+ } // Collect the text nodes.
+ var walker = range.startContainer.ownerDocument.createTreeWalker(range.commonAncestorContainer, NodeFilter.SHOW_TEXT, function (node) {
+ return range.intersectsNode(node) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
+ });
+ walker.currentNode = range.startContainer; // // Optimise by skipping nodes that are explicitly outside the range.
+ // const NodeTypesWithCharacterOffset = [
+ // Node.TEXT_NODE,
+ // Node.PROCESSING_INSTRUCTION_NODE,
+ // Node.COMMENT_NODE,
+ // ];
+ // if (!NodeTypesWithCharacterOffset.includes(range.startContainer.nodeType)) {
+ // if (range.startOffset < range.startContainer.childNodes.length) {
+ // walker.currentNode = range.startContainer.childNodes[range.startOffset];
+ // } else {
+ // walker.nextSibling(); // TODO verify this is correct.
+ // }
+ // }
+ var nodes = [];
+ if (walker.currentNode.nodeType === Node.TEXT_NODE) nodes.push(walker.currentNode);
-// Generated by PEG.js v0.11.0-master.f69239d, https://pegjs.org/
-function peg$subclass(child, parent) {
- function C() {
- this.constructor = child;
+ while (walker.nextNode() && range.comparePoint(walker.currentNode, 0) !== 1) {
+ nodes.push(walker.currentNode);
}
- C.prototype = parent.prototype;
- child.prototype = new C();
-}
+ return nodes;
+} // Replace [node] with <tagName ...attributes>[node]</tagName>
-function peg$SyntaxError(message, expected, found, location) {
- this.message = message;
- this.expected = expected;
- this.found = found;
- this.location = location;
- this.name = "SyntaxError"; // istanbul ignore next
- if (typeof Error.captureStackTrace === "function") {
- Error.captureStackTrace(this, peg$SyntaxError);
- }
-}
+function wrapNodeInHighlight(node, tagName, attributes) {
+ var _context;
-peg$subclass(peg$SyntaxError, Error);
+ var highlightElement = node.ownerDocument.createElement(tagName);
-peg$SyntaxError.buildMessage = function (expected, found) {
- var DESCRIBE_EXPECTATION_FNS = {
- literal: function literal(expectation) {
- return "\"" + literalEscape(expectation.text) + "\"";
- },
- class: function _class(expectation) {
- var _context;
+ _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default()(_context = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(attributes)).call(_context, function (key) {
+ highlightElement.setAttribute(key, attributes[key]);
+ });
- var escapedParts = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default()(_context = expectation.parts).call(_context, function (part) {
- return _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_2___default()(part) ? classEscape(part[0]) + "-" + classEscape(part[1]) : classEscape(part);
- });
+ var tempRange = node.ownerDocument.createRange();
+ tempRange.selectNode(node);
+ tempRange.surroundContents(highlightElement);
+ return highlightElement;
+} // Remove a highlight element created with wrapNodeInHighlight.
- return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
- },
- any: function any() {
- return "any character";
- },
- end: function end() {
- return "end of input";
- },
- other: function other(expectation) {
- return expectation.description;
- },
- not: function not(expectation) {
- return "not " + describeExpectation(expectation.expected);
+
+function removeHighlight(highlightElement) {
+ // If it has somehow been removed already, there is nothing to be done.
+ if (!highlightElement.parentNode) return;
+
+ if (highlightElement.childNodes.length === 1) {
+ highlightElement.parentNode.replaceChild(highlightElement.firstChild, highlightElement);
+ } else {
+ // If the highlight somehow contains multiple nodes now, move them all.
+ while (highlightElement.firstChild) {
+ highlightElement.parentNode.insertBefore(highlightElement.firstChild, highlightElement);
}
- };
- function hex(ch) {
- return ch.charCodeAt(0).toString(16).toUpperCase();
+ highlightElement.remove();
}
+}
- function literalEscape(s) {
- return s.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function (ch) {
- return "\\x0" + hex(ch);
- }).replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) {
- return "\\x" + hex(ch);
- });
- }
+/***/ }),
- function classEscape(s) {
- return s.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function (ch) {
- return "\\x0" + hex(ch);
- }).replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) {
- return "\\x" + hex(ch);
- });
- }
+/***/ "../packages/dom/src/index.js":
+/*!************************************!*\
+ !*** ../packages/dom/src/index.js ***!
+ \************************************/
+/*! exports provided: createCssSelector, createRangeSelectorCreator, createTextQuoteSelector, describeTextQuote, highlightRange */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- function describeExpectation(expectation) {
- return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony import */ var _css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css */ "../packages/dom/src/css.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createCssSelector", function() { return _css__WEBPACK_IMPORTED_MODULE_0__["createCssSelector"]; });
- function describeExpected(expected) {
- var descriptions = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default()(expected).call(expected, describeExpectation);
+/* harmony import */ var _range__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./range */ "../packages/dom/src/range.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createRangeSelectorCreator", function() { return _range__WEBPACK_IMPORTED_MODULE_1__["createRangeSelectorCreator"]; });
- var i, j;
+/* harmony import */ var _text_quote__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./text-quote */ "../packages/dom/src/text-quote.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTextQuoteSelector", function() { return _text_quote__WEBPACK_IMPORTED_MODULE_2__["createTextQuoteSelector"]; });
- _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_1___default()(descriptions).call(descriptions);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "describeTextQuote", function() { return _text_quote__WEBPACK_IMPORTED_MODULE_2__["describeTextQuote"]; });
- if (descriptions.length > 0) {
- for (i = 1, j = 1; i < descriptions.length; i++) {
- if (descriptions[i - 1] !== descriptions[i]) {
- descriptions[j] = descriptions[i];
- j++;
- }
- }
+/* harmony import */ var _highlight_range__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./highlight-range */ "../packages/dom/src/highlight-range.js");
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "highlightRange", function() { return _highlight_range__WEBPACK_IMPORTED_MODULE_3__["highlightRange"]; });
- descriptions.length = j;
- }
+/**
+ * @license
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
- switch (descriptions.length) {
- case 1:
- return descriptions[0];
- case 2:
- return descriptions[0] + " or " + descriptions[1];
- default:
- return _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_0___default()(descriptions).call(descriptions, 0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1];
- }
- }
- function describeFound(found) {
- return found ? "\"" + literalEscape(found) + "\"" : "end of input";
- }
- return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
-};
+/***/ }),
-function peg$parse(input, options) {
- options = options !== undefined ? options : {};
- var peg$FAILED = {};
- var peg$startRuleFunctions = {
- start: peg$parsestart
- };
- var peg$startRuleFunction = peg$parsestart;
- var peg$c0 = "state";
- var peg$c1 = "(";
- var peg$c2 = ")";
- var peg$c3 = "selector";
- var peg$c4 = "state=";
- var peg$c5 = "selector=";
- var peg$c6 = ",";
- var peg$c7 = "refinedBy=selector(";
- var peg$c8 = "refinedBy=state(";
- var peg$c9 = "startSelector=selector(";
- var peg$c10 = "endSelector=selector(";
- var peg$c11 = "=";
- var peg$r0 = /^[a-zA-Z0-9<>\/[\]:%+@.\-!$&;*_]/;
- var peg$e0 = peg$literalExpectation("state", false);
- var peg$e1 = peg$literalExpectation("(", false);
- var peg$e2 = peg$literalExpectation(")", false);
- var peg$e3 = peg$literalExpectation("selector", false);
- var peg$e4 = peg$literalExpectation("state=", false);
- var peg$e5 = peg$literalExpectation("selector=", false);
- var peg$e6 = peg$literalExpectation(",", false);
- var peg$e7 = peg$literalExpectation("refinedBy=selector(", false);
- var peg$e8 = peg$literalExpectation("refinedBy=state(", false);
- var peg$e9 = peg$literalExpectation("startSelector=selector(", false);
- var peg$e10 = peg$literalExpectation("endSelector=selector(", false);
- var peg$e11 = peg$literalExpectation("=", false);
- var peg$e12 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "<", ">", "/", "[", "]", ":", "%", "+", "@", ".", "-", "!", "$", "&", ";", "*", "_"], false, false);
-
- var peg$f0 = function peg$f0(p) {
- return {
- state: p
- };
- };
+/***/ "../packages/dom/src/range.js":
+/*!************************************!*\
+ !*** ../packages/dom/src/range.js ***!
+ \************************************/
+/*! exports provided: createRangeSelectorCreator */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- var peg$f1 = function peg$f1(p) {
- return {
- selector: p
- };
- };
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createRangeSelectorCreator", function() { return createRangeSelectorCreator; });
+/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/regenerator */ "../node_modules/@babel/runtime-corejs3/regenerator/index.js");
+/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/slicedToArray */ "../node_modules/@babel/runtime-corejs3/helpers/esm/slicedToArray.js");
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator.js");
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator.js");
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncIterator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncIterator.js");
+/* harmony import */ var _scope_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./scope.js */ "../packages/dom/src/scope.js");
+/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cartesian.js */ "../packages/dom/src/cartesian.js");
+/**
+ * @license
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
- var peg$f2 = function peg$f2(v) {
- return {
- state: v
- };
- };
- var peg$f3 = function peg$f3(v) {
- return {
- selector: v
- };
- };
- var peg$f4 = function peg$f4(k1, k2) {
- var f = k1;
- for (var i = 0; i < k2.length; i++) {
- f = collect(f, k2[i][1]);
- }
- return f;
- };
- var peg$f5 = function peg$f5(p) {
- return {
- refinedBy: p
- };
- };
- var peg$f6 = function peg$f6(p) {
- return {
- startSelector: p
- };
- };
+function createRangeSelectorCreator(createSelector) {
+ return function createRangeSelector(selector) {
+ var startSelector = createSelector(selector.startSelector);
+ var endSelector = createSelector(selector.endSelector);
+ return (/*#__PURE__*/function () {
+ var _matchAll = Object(_babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_3__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(scope) {
+ var document, startMatches, endMatches, pairs, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, _value2, _value3, start, end, result;
- var peg$f7 = function peg$f7(p) {
- return {
- endSelector: p
- };
- };
+ return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
+ while (1) {
+ switch (_context.prev = _context.next) {
+ case 0:
+ document = Object(_scope_js__WEBPACK_IMPORTED_MODULE_5__["ownerDocument"])(scope);
+ startMatches = startSelector(scope);
+ endMatches = endSelector(scope);
+ pairs = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_6__["product"])(startMatches, endMatches);
+ _iteratorNormalCompletion = true;
+ _didIteratorError = false;
+ _context.prev = 6;
+ _iterator = Object(_babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_4__["default"])(pairs);
- var peg$f8 = function peg$f8(key, value) {
- var f = {};
- var num = Number(value);
- f[key] = isNaN(num) ? decodeURIComponent(value) : num;
- return f;
- };
+ case 8:
+ _context.next = 10;
+ return Object(_babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_2__["default"])(_iterator.next());
- var peg$f9 = function peg$f9(chars) {
- return chars.join("");
- };
+ case 10:
+ _step = _context.sent;
+ _iteratorNormalCompletion = _step.done;
+ _context.next = 14;
+ return Object(_babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_2__["default"])(_step.value);
- var peg$currPos = 0;
- var peg$savedPos = 0;
- var peg$posDetailsCache = [{
- line: 1,
- column: 1
- }];
- var peg$expected = [];
- var peg$silentFails = 0;
- var peg$result;
-
- if ("startRule" in options) {
- if (!(options.startRule in peg$startRuleFunctions)) {
- throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
- }
+ case 14:
+ _value = _context.sent;
- peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
- }
+ if (_iteratorNormalCompletion) {
+ _context.next = 26;
+ break;
+ }
- function text() {
- return input.substring(peg$savedPos, peg$currPos);
- }
+ _value2 = _value, _value3 = Object(_babel_runtime_corejs3_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_value2, 2), start = _value3[0], end = _value3[1];
+ result = document.createRange();
+ result.setStart(start.endContainer, start.endOffset);
+ result.setEnd(end.startContainer, end.startOffset);
- function offset() {
- return peg$savedPos;
- }
+ if (result.collapsed) {
+ _context.next = 23;
+ break;
+ }
- function range() {
- return [peg$savedPos, peg$currPos];
- }
+ _context.next = 23;
+ return result;
- function location() {
- return peg$computeLocation(peg$savedPos, peg$currPos);
- }
+ case 23:
+ _iteratorNormalCompletion = true;
+ _context.next = 8;
+ break;
- function expected(description, location) {
- location = location !== undefined ? location : peg$computeLocation(peg$savedPos, peg$currPos);
- throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location);
- }
+ case 26:
+ _context.next = 32;
+ break;
- function error(message, location) {
- location = location !== undefined ? location : peg$computeLocation(peg$savedPos, peg$currPos);
- throw peg$buildSimpleError(message, location);
- }
+ case 28:
+ _context.prev = 28;
+ _context.t0 = _context["catch"](6);
+ _didIteratorError = true;
+ _iteratorError = _context.t0;
- function peg$literalExpectation(text, ignoreCase) {
- return {
- type: "literal",
- text: text,
- ignoreCase: ignoreCase
- };
- }
+ case 32:
+ _context.prev = 32;
+ _context.prev = 33;
- function peg$classExpectation(parts, inverted, ignoreCase) {
- return {
- type: "class",
- parts: parts,
- inverted: inverted,
- ignoreCase: ignoreCase
- };
- }
+ if (!(!_iteratorNormalCompletion && _iterator.return != null)) {
+ _context.next = 37;
+ break;
+ }
- function peg$anyExpectation() {
- return {
- type: "any"
- };
- }
+ _context.next = 37;
+ return Object(_babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_2__["default"])(_iterator.return());
- function peg$endExpectation() {
- return {
- type: "end"
- };
- }
+ case 37:
+ _context.prev = 37;
- function peg$otherExpectation(description) {
- return {
- type: "other",
- description: description
- };
- }
+ if (!_didIteratorError) {
+ _context.next = 40;
+ break;
+ }
- function peg$computePosDetails(pos) {
- var details = peg$posDetailsCache[pos];
- var p;
+ throw _iteratorError;
- if (details) {
- return details;
- } else {
- p = pos - 1;
+ case 40:
+ return _context.finish(37);
- while (!peg$posDetailsCache[p]) {
- p--;
- }
+ case 41:
+ return _context.finish(32);
- details = peg$posDetailsCache[p];
- details = {
- line: details.line,
- column: details.column
- };
+ case 42:
+ case "end":
+ return _context.stop();
+ }
+ }
+ }, _callee, null, [[6, 28, 32, 42], [33,, 37, 41]]);
+ }));
- while (p < pos) {
- if (input.charCodeAt(p) === 10) {
- details.line++;
- details.column = 1;
- } else {
- details.column++;
+ function matchAll(_x) {
+ return _matchAll.apply(this, arguments);
}
- p++;
- }
-
- peg$posDetailsCache[pos] = details;
- return details;
- }
- }
+ return matchAll;
+ }()
+ );
+ };
+}
- var peg$VALIDFILENAME = typeof options.filename === "string" && options.filename.length > 0;
+/***/ }),
- function peg$computeLocation(startPos, endPos) {
- var loc = {};
- if (peg$VALIDFILENAME) loc.filename = options.filename;
- var startPosDetails = peg$computePosDetails(startPos);
- loc.start = {
- offset: startPos,
- line: startPosDetails.line,
- column: startPosDetails.column
- };
- var endPosDetails = peg$computePosDetails(endPos);
- loc.end = {
- offset: endPos,
- line: endPosDetails.line,
- column: endPosDetails.column
- };
- return loc;
- }
+/***/ "../packages/dom/src/scope.js":
+/*!************************************!*\
+ !*** ../packages/dom/src/scope.js ***!
+ \************************************/
+/*! exports provided: ownerDocument, rangeFromScope */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- function peg$begin() {
- peg$expected.push({
- pos: peg$currPos,
- variants: []
- });
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ownerDocument", function() { return ownerDocument; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rangeFromScope", function() { return rangeFromScope; });
+/**
+ * @license
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+function ownerDocument(scope) {
+ if ('commonAncestorContainer' in scope) {
+ return scope.commonAncestorContainer.ownerDocument;
}
- function peg$expect(expected) {
- var top = peg$expected[peg$expected.length - 1];
-
- if (peg$currPos < top.pos) {
- return;
- }
-
- if (peg$currPos > top.pos) {
- top.pos = peg$currPos;
- top.variants = [];
- }
-
- top.variants.push(expected);
+ return scope.ownerDocument;
+}
+function rangeFromScope(scope) {
+ if ('commonAncestorContainer' in scope) {
+ return scope;
}
- function peg$end(invert) {
- var expected = peg$expected.pop();
- var top = peg$expected[peg$expected.length - 1];
- var variants = expected.variants;
-
- if (top.pos !== expected.pos) {
- return;
- }
-
- if (invert) {
- variants = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default()(variants).call(variants, function (e) {
- return e.type === "not" ? e.expected : {
- type: "not",
- expected: e
- };
- });
- }
+ var document = scope.ownerDocument;
+ var range = document.createRange();
+ range.selectNodeContents(scope);
+ return range;
+}
- Array.prototype.push.apply(top.variants, variants);
- }
+/***/ }),
- function peg$buildSimpleError(message, location) {
- return new peg$SyntaxError(message, null, null, location);
- }
+/***/ "../packages/dom/src/text-quote.js":
+/*!*****************************************!*\
+ !*** ../packages/dom/src/text-quote.js ***!
+ \*****************************************/
+/*! exports provided: createTextQuoteSelector, describeTextQuote */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- function peg$buildStructuredError(expected, found, location) {
- return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location);
- }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createTextQuoteSelector", function() { return createTextQuoteSelector; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "describeTextQuote", function() { return describeTextQuote; });
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/every */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/every.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/slicedToArray */ "../node_modules/@babel/runtime-corejs3/helpers/esm/slicedToArray.js");
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/typeof */ "../node_modules/@babel/runtime-corejs3/helpers/esm/typeof.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js/get-iterator */ "../node_modules/@babel/runtime-corejs3/core-js/get-iterator.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_3__);
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/sort */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/sort.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_4__);
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5__);
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_flat_map__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/flat-map */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/flat-map.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_flat_map__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_flat_map__WEBPACK_IMPORTED_MODULE_6__);
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncToGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncToGenerator.js");
+/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime-corejs3/regenerator */ "../node_modules/@babel/runtime-corejs3/regenerator/index.js");
+/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_8__);
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_9__);
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncIterator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncIterator.js");
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_awaitAsyncGenerator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/awaitAsyncGenerator.js");
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/wrapAsyncGenerator.js");
+/* harmony import */ var dom_node_iterator__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! dom-node-iterator */ "../node_modules/dom-node-iterator/index.js");
+/* harmony import */ var dom_node_iterator__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(dom_node_iterator__WEBPACK_IMPORTED_MODULE_13__);
+/* harmony import */ var dom_seek__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! dom-seek */ "../node_modules/dom-seek/index.js");
+/* harmony import */ var dom_seek__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(dom_seek__WEBPACK_IMPORTED_MODULE_14__);
+/* harmony import */ var _scope_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./scope.js */ "../packages/dom/src/scope.js");
+/**
+ * @license
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
- function peg$buildError() {
- var expected = peg$expected[0];
- var failPos = expected.pos;
- return peg$buildStructuredError(expected.variants, failPos < input.length ? input.charAt(failPos) : null, failPos < input.length ? peg$computeLocation(failPos, failPos + 1) : peg$computeLocation(failPos, failPos));
- }
- function peg$parsestart() {
- var s0;
- var rule$expects = function rule$expects(expected) {
- if (peg$silentFails === 0) peg$expect(expected);
- };
- s0 = peg$parsetop();
- return s0;
- }
- function peg$parsetop() {
- var s0, s1, s2, s3, s4;
- var rule$expects = function rule$expects(expected) {
- if (peg$silentFails === 0) peg$expect(expected);
- };
- s0 = peg$currPos;
- rule$expects(peg$e0);
- if (input.substr(peg$currPos, 5) === peg$c0) {
- s1 = peg$c0;
- peg$currPos += 5;
- } else {
- s1 = peg$FAILED;
- }
- if (s1 !== peg$FAILED) {
- rule$expects(peg$e1);
- if (input.charCodeAt(peg$currPos) === 40) {
- s2 = peg$c1;
- peg$currPos++;
- } else {
- s2 = peg$FAILED;
- }
- if (s2 !== peg$FAILED) {
- s3 = peg$parseparams();
- if (s3 !== peg$FAILED) {
- rule$expects(peg$e2);
- if (input.charCodeAt(peg$currPos) === 41) {
- s4 = peg$c2;
- peg$currPos++;
- } else {
- s4 = peg$FAILED;
- }
- if (s4 !== peg$FAILED) {
- peg$savedPos = s0;
- s0 = peg$f0(s3);
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- if (s0 === peg$FAILED) {
- s0 = peg$currPos;
- rule$expects(peg$e3);
+ // Node constants
- if (input.substr(peg$currPos, 8) === peg$c3) {
- s1 = peg$c3;
- peg$currPos += 8;
- } else {
- s1 = peg$FAILED;
- }
+var TEXT_NODE = 3; // NodeFilter constants
- if (s1 !== peg$FAILED) {
- rule$expects(peg$e1);
+var SHOW_TEXT = 4;
- if (input.charCodeAt(peg$currPos) === 40) {
- s2 = peg$c1;
- peg$currPos++;
- } else {
- s2 = peg$FAILED;
- }
+function firstTextNodeInRange(range) {
+ var startContainer = range.startContainer;
+ if (startContainer.nodeType === TEXT_NODE) return startContainer;
+ var root = range.commonAncestorContainer;
+ var iter = dom_node_iterator__WEBPACK_IMPORTED_MODULE_13___default()(root, SHOW_TEXT);
+ return iter.nextNode();
+}
- if (s2 !== peg$FAILED) {
- s3 = peg$parseparams();
+function createTextQuoteSelector(selector) {
+ return (/*#__PURE__*/function () {
+ var _matchAll = Object(_babel_runtime_corejs3_helpers_esm_wrapAsyncGenerator__WEBPACK_IMPORTED_MODULE_12__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_8___default.a.mark(function _callee(scope) {
+ var document, range, root, text, exact, prefix, suffix, pattern, iter, fromIndex, referenceNodeIndex, patternStartIndex, match, matchStartIndex, matchEndIndex;
+ return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_8___default.a.wrap(function _callee$(_context) {
+ while (1) {
+ switch (_context.prev = _context.next) {
+ case 0:
+ document = Object(_scope_js__WEBPACK_IMPORTED_MODULE_15__["ownerDocument"])(scope);
+ range = Object(_scope_js__WEBPACK_IMPORTED_MODULE_15__["rangeFromScope"])(scope);
+ root = range.commonAncestorContainer;
+ text = range.toString();
+ exact = selector.exact;
+ prefix = selector.prefix || '';
+ suffix = selector.suffix || '';
+ pattern = prefix + exact + suffix;
+ iter = dom_node_iterator__WEBPACK_IMPORTED_MODULE_13___default()(root, SHOW_TEXT);
+ fromIndex = 0;
+ referenceNodeIndex = 0;
- if (s3 !== peg$FAILED) {
- rule$expects(peg$e2);
+ if (range.startContainer.nodeType === TEXT_NODE) {
+ referenceNodeIndex -= range.startOffset;
+ }
- if (input.charCodeAt(peg$currPos) === 41) {
- s4 = peg$c2;
- peg$currPos++;
- } else {
- s4 = peg$FAILED;
- }
+ case 12:
+ if (!(fromIndex < text.length)) {
+ _context.next = 31;
+ break;
+ }
- if (s4 !== peg$FAILED) {
- peg$savedPos = s0;
- s0 = peg$f1(s3);
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
+ patternStartIndex = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_9___default()(text).call(text, pattern, fromIndex);
- if (s0 === peg$FAILED) {
- s0 = peg$currPos;
- rule$expects(peg$e4);
+ if (!(patternStartIndex === -1)) {
+ _context.next = 16;
+ break;
+ }
- if (input.substr(peg$currPos, 6) === peg$c4) {
- s1 = peg$c4;
- peg$currPos += 6;
- } else {
- s1 = peg$FAILED;
- }
+ return _context.abrupt("return");
- if (s1 !== peg$FAILED) {
- s2 = peg$parseatom();
+ case 16:
+ match = document.createRange();
+ matchStartIndex = patternStartIndex + prefix.length;
+ matchEndIndex = matchStartIndex + exact.length; // Seek to the start of the match.
- if (s2 !== peg$FAILED) {
- peg$savedPos = s0;
- s0 = peg$f2(s2);
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
+ referenceNodeIndex += dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(iter, matchStartIndex - referenceNodeIndex); // Normalize the reference to the start of the match.
- if (s0 === peg$FAILED) {
- s0 = peg$currPos;
- rule$expects(peg$e5);
+ if (!iter.pointerBeforeReferenceNode) {
+ // Peek forward and skip over any empty nodes.
+ if (iter.nextNode()) {
+ while (iter.referenceNode.nodeValue.length === 0) {
+ iter.nextNode();
+ } // The iterator now points to the end of the reference node.
+ // Move the iterator back to the start of the reference node.
- if (input.substr(peg$currPos, 9) === peg$c5) {
- s1 = peg$c5;
- peg$currPos += 9;
- } else {
- s1 = peg$FAILED;
- }
- if (s1 !== peg$FAILED) {
- s2 = peg$parseatom();
+ iter.previousNode();
+ }
+ } // Record the start container and offset.
- if (s2 !== peg$FAILED) {
- peg$savedPos = s0;
- s0 = peg$f3(s2);
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- }
- }
- }
- return s0;
- }
+ match.setStart(iter.referenceNode, matchStartIndex - referenceNodeIndex); // Seek to the end of the match.
- function peg$parseparams() {
- var s0, s1, s2, s3, s4, s5;
+ referenceNodeIndex += dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(iter, matchEndIndex - referenceNodeIndex); // Normalize the reference to the end of the match.
- var rule$expects = function rule$expects(expected) {
- if (peg$silentFails === 0) peg$expect(expected);
- };
+ if (!iter.pointerBeforeReferenceNode) {
+ // Peek forward and skip over any empty nodes.
+ if (iter.nextNode()) {
+ while (iter.referenceNode.nodeValue.length === 0) {
+ iter.nextNode();
+ } // The iterator now points to the end of the reference node.
+ // Move the iterator back to the start of the reference node.
- s0 = peg$currPos;
- s1 = peg$parsekey_value_pair();
- if (s1 !== peg$FAILED) {
- s2 = [];
- s3 = peg$currPos;
- rule$expects(peg$e6);
+ iter.previousNode();
+ } // Maybe seek backwards to the start of the node.
- if (input.charCodeAt(peg$currPos) === 44) {
- s4 = peg$c6;
- peg$currPos++;
- } else {
- s4 = peg$FAILED;
- }
- if (s4 !== peg$FAILED) {
- s5 = peg$parsekey_value_pair();
+ referenceNodeIndex += dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(iter, iter.referenceNode);
+ } // Record the end container and offset.
- if (s5 !== peg$FAILED) {
- s4 = [s4, s5];
- s3 = s4;
- } else {
- peg$currPos = s3;
- s3 = peg$FAILED;
- }
- } else {
- peg$currPos = s3;
- s3 = peg$FAILED;
- }
- while (s3 !== peg$FAILED) {
- s2.push(s3);
- s3 = peg$currPos;
- rule$expects(peg$e6);
+ match.setEnd(iter.referenceNode, matchEndIndex - referenceNodeIndex); // Yield the match.
- if (input.charCodeAt(peg$currPos) === 44) {
- s4 = peg$c6;
- peg$currPos++;
- } else {
- s4 = peg$FAILED;
- }
+ _context.next = 27;
+ return match;
- if (s4 !== peg$FAILED) {
- s5 = peg$parsekey_value_pair();
+ case 27:
+ // Advance the search forward.
+ fromIndex = matchStartIndex + 1;
+ referenceNodeIndex += dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(iter, fromIndex - referenceNodeIndex);
+ _context.next = 12;
+ break;
- if (s5 !== peg$FAILED) {
- s4 = [s4, s5];
- s3 = s4;
- } else {
- peg$currPos = s3;
- s3 = peg$FAILED;
+ case 31:
+ case "end":
+ return _context.stop();
+ }
}
- } else {
- peg$currPos = s3;
- s3 = peg$FAILED;
- }
- }
-
- peg$savedPos = s0;
- s0 = peg$f4(s1, s2);
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
-
- return s0;
- }
-
- function peg$parsekey_value_pair() {
- var s0, s1, s2, s3;
-
- var rule$expects = function rule$expects(expected) {
- if (peg$silentFails === 0) peg$expect(expected);
- };
-
- s0 = peg$currPos;
- rule$expects(peg$e7);
-
- if (input.substr(peg$currPos, 19) === peg$c7) {
- s1 = peg$c7;
- peg$currPos += 19;
- } else {
- s1 = peg$FAILED;
- }
-
- if (s1 !== peg$FAILED) {
- s2 = peg$parseparams();
-
- if (s2 !== peg$FAILED) {
- rule$expects(peg$e2);
-
- if (input.charCodeAt(peg$currPos) === 41) {
- s3 = peg$c2;
- peg$currPos++;
- } else {
- s3 = peg$FAILED;
- }
-
- if (s3 !== peg$FAILED) {
- peg$savedPos = s0;
- s0 = peg$f5(s2);
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
-
- if (s0 === peg$FAILED) {
- s0 = peg$currPos;
- rule$expects(peg$e8);
+ }, _callee);
+ }));
- if (input.substr(peg$currPos, 16) === peg$c8) {
- s1 = peg$c8;
- peg$currPos += 16;
- } else {
- s1 = peg$FAILED;
+ function matchAll(_x) {
+ return _matchAll.apply(this, arguments);
}
- if (s1 !== peg$FAILED) {
- s2 = peg$parseparams();
-
- if (s2 !== peg$FAILED) {
- rule$expects(peg$e2);
-
- if (input.charCodeAt(peg$currPos) === 41) {
- s3 = peg$c2;
- peg$currPos++;
- } else {
- s3 = peg$FAILED;
- }
-
- if (s3 !== peg$FAILED) {
- peg$savedPos = s0;
- s0 = peg$f5(s2);
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
+ return matchAll;
+ }()
+ );
+}
+function describeTextQuote(_x2) {
+ return _describeTextQuote.apply(this, arguments);
+}
- if (s0 === peg$FAILED) {
- s0 = peg$currPos;
- rule$expects(peg$e9);
+function _describeTextQuote() {
+ _describeTextQuote = Object(_babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_7__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_8___default.a.mark(function _callee2(range) {
+ var scope,
+ root,
+ text,
+ exact,
+ selector,
+ iter,
+ startNode,
+ startIndex,
+ endIndex,
+ affixLengthPairs,
+ _iteratorNormalCompletion,
+ _didIteratorError,
+ _iteratorError,
+ _iterator,
+ _step,
+ _value,
+ match,
+ matchIter,
+ matchStartNode,
+ matchStartIndex,
+ matchEndIndex,
+ prefixLength,
+ suffixLength,
+ result,
+ _minimalSolution,
+ _minimalSolution2,
+ _prefixLength,
+ _suffixLength,
+ _args2 = arguments;
- if (input.substr(peg$currPos, 23) === peg$c9) {
- s1 = peg$c9;
- peg$currPos += 23;
- } else {
- s1 = peg$FAILED;
- }
+ return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_8___default.a.wrap(function _callee2$(_context2) {
+ while (1) {
+ switch (_context2.prev = _context2.next) {
+ case 0:
+ scope = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : null;
+ scope = Object(_scope_js__WEBPACK_IMPORTED_MODULE_15__["rangeFromScope"])(scope || Object(_scope_js__WEBPACK_IMPORTED_MODULE_15__["ownerDocument"])(range).documentElement);
+ root = scope.commonAncestorContainer;
+ text = scope.toString();
+ exact = range.toString();
+ selector = createTextQuoteSelector({
+ exact: exact
+ });
+ iter = dom_node_iterator__WEBPACK_IMPORTED_MODULE_13___default()(root, SHOW_TEXT);
+ startNode = firstTextNodeInRange(range);
+ startIndex = range.startContainer.nodeType === TEXT_NODE ? dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(iter, startNode) + range.startOffset : dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(iter, startNode);
+ endIndex = startIndex + exact.length;
+ affixLengthPairs = [];
+ _iteratorNormalCompletion = true;
+ _didIteratorError = false;
+ _context2.prev = 13;
+ _iterator = Object(_babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_10__["default"])(selector(scope));
- if (s1 !== peg$FAILED) {
- s2 = peg$parseparams();
+ case 15:
+ _context2.next = 17;
+ return _iterator.next();
- if (s2 !== peg$FAILED) {
- rule$expects(peg$e2);
+ case 17:
+ _step = _context2.sent;
+ _iteratorNormalCompletion = _step.done;
+ _context2.next = 21;
+ return _step.value;
- if (input.charCodeAt(peg$currPos) === 41) {
- s3 = peg$c2;
- peg$currPos++;
- } else {
- s3 = peg$FAILED;
- }
+ case 21:
+ _value = _context2.sent;
- if (s3 !== peg$FAILED) {
- peg$savedPos = s0;
- s0 = peg$f6(s2);
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
+ if (_iteratorNormalCompletion) {
+ _context2.next = 36;
+ break;
}
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- if (s0 === peg$FAILED) {
- s0 = peg$currPos;
- rule$expects(peg$e10);
+ match = _value;
+ matchIter = dom_node_iterator__WEBPACK_IMPORTED_MODULE_13___default()(root, SHOW_TEXT);
+ matchStartNode = firstTextNodeInRange(match);
+ matchStartIndex = match.startContainer.nodeType === TEXT_NODE ? dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(matchIter, matchStartNode) + match.startOffset : dom_seek__WEBPACK_IMPORTED_MODULE_14___default()(matchIter, matchStartNode);
+ matchEndIndex = matchStartIndex + match.toString().length; // If the match is the same as the input range, continue.
- if (input.substr(peg$currPos, 21) === peg$c10) {
- s1 = peg$c10;
- peg$currPos += 21;
- } else {
- s1 = peg$FAILED;
- }
+ if (!(matchStartIndex === startIndex || matchEndIndex === endIndex)) {
+ _context2.next = 30;
+ break;
+ }
- if (s1 !== peg$FAILED) {
- s2 = peg$parseparams();
+ return _context2.abrupt("continue", 33);
- if (s2 !== peg$FAILED) {
- rule$expects(peg$e2);
+ case 30:
+ // Determine how many prefix characters are shared.
+ prefixLength = overlapRight(text.substring(0, matchStartIndex), text.substring(0, startIndex)); // Determine how many suffix characters are shared.
- if (input.charCodeAt(peg$currPos) === 41) {
- s3 = peg$c2;
- peg$currPos++;
- } else {
- s3 = peg$FAILED;
- }
+ suffixLength = overlap(text.substring(matchEndIndex), text.substring(endIndex)); // Record the affix lengths that would have precluded this match.
- if (s3 !== peg$FAILED) {
- peg$savedPos = s0;
- s0 = peg$f7(s2);
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
+ affixLengthPairs.push([prefixLength + 1, suffixLength + 1]);
- if (s0 === peg$FAILED) {
- s0 = peg$currPos;
- s1 = peg$parseatom();
+ case 33:
+ _iteratorNormalCompletion = true;
+ _context2.next = 15;
+ break;
- if (s1 !== peg$FAILED) {
- rule$expects(peg$e11);
+ case 36:
+ _context2.next = 42;
+ break;
- if (input.charCodeAt(peg$currPos) === 61) {
- s2 = peg$c11;
- peg$currPos++;
- } else {
- s2 = peg$FAILED;
- }
+ case 38:
+ _context2.prev = 38;
+ _context2.t0 = _context2["catch"](13);
+ _didIteratorError = true;
+ _iteratorError = _context2.t0;
- if (s2 !== peg$FAILED) {
- s3 = peg$parseatom();
+ case 42:
+ _context2.prev = 42;
+ _context2.prev = 43;
- if (s3 !== peg$FAILED) {
- peg$savedPos = s0;
- s0 = peg$f8(s1, s3);
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
+ if (!(!_iteratorNormalCompletion && _iterator.return != null)) {
+ _context2.next = 47;
+ break;
}
- }
- }
- }
- }
- return s0;
- }
-
- function peg$parseatom() {
- var s0, s1, s2;
-
- var rule$expects = function rule$expects(expected) {
- if (peg$silentFails === 0) peg$expect(expected);
- };
+ _context2.next = 47;
+ return _iterator.return();
- s0 = peg$currPos;
- s1 = [];
- s2 = peg$parsevalidchar();
+ case 47:
+ _context2.prev = 47;
- if (s2 !== peg$FAILED) {
- while (s2 !== peg$FAILED) {
- s1.push(s2);
- s2 = peg$parsevalidchar();
- }
- } else {
- s1 = peg$FAILED;
- }
+ if (!_didIteratorError) {
+ _context2.next = 50;
+ break;
+ }
- if (s1 !== peg$FAILED) {
- peg$savedPos = s0;
- s1 = peg$f9(s1);
- }
+ throw _iteratorError;
- s0 = s1;
- return s0;
- }
+ case 50:
+ return _context2.finish(47);
- function peg$parsevalidchar() {
- var s0;
+ case 51:
+ return _context2.finish(42);
- var rule$expects = function rule$expects(expected) {
- if (peg$silentFails === 0) peg$expect(expected);
- };
+ case 52:
+ // Construct and return an unambiguous selector.
+ result = {
+ type: 'TextQuoteSelector',
+ exact: exact
+ };
- rule$expects(peg$e12);
+ if (affixLengthPairs.length) {
+ _minimalSolution = minimalSolution(affixLengthPairs), _minimalSolution2 = Object(_babel_runtime_corejs3_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_minimalSolution, 2), _prefixLength = _minimalSolution2[0], _suffixLength = _minimalSolution2[1];
- if (peg$r0.test(input.charAt(peg$currPos))) {
- s0 = input.charAt(peg$currPos);
- peg$currPos++;
- } else {
- s0 = peg$FAILED;
- }
+ if (_prefixLength > 0 && startIndex > 0) {
+ result.prefix = text.substring(startIndex - _prefixLength, startIndex);
+ }
- return s0;
- }
+ if (_suffixLength > 0 && endIndex < text.length) {
+ result.suffix = text.substring(endIndex, endIndex + _suffixLength);
+ }
+ }
- function collect() {
- var ret = {};
- var len = arguments.length;
+ return _context2.abrupt("return", result);
- for (var i = 0; i < len; i++) {
- for (var p in arguments[i]) {
- if (arguments[i].hasOwnProperty(p)) {
- ret[p] = arguments[i][p];
+ case 55:
+ case "end":
+ return _context2.stop();
}
}
- }
-
- return ret;
- }
-
- peg$begin();
- peg$result = peg$startRuleFunction();
+ }, _callee2, null, [[13, 38, 42, 52], [43,, 47, 51]]);
+ }));
+ return _describeTextQuote.apply(this, arguments);
+}
- if (peg$result !== peg$FAILED && peg$currPos === input.length) {
- return peg$result;
- } else {
- if (peg$result !== peg$FAILED && peg$currPos < input.length) {
- peg$expect(peg$endExpectation());
- }
+function overlap(text1, text2) {
+ var count = 0;
- throw peg$buildError();
+ while (count < text1.length && count < text2.length) {
+ var c1 = text1[count];
+ var c2 = text2[count];
+ if (c1 !== c2) break;
+ count++;
}
-}
-
-/* harmony default export */ __webpack_exports__["default"] = ({
- SyntaxError: peg$SyntaxError,
- parse: peg$parse
-});
+ return count;
+}
-/***/ }),
+function overlapRight(text1, text2) {
+ var count = 0;
-/***/ "../packages/fragment-identifier/src/index.js":
-/*!****************************************************!*\
- !*** ../packages/fragment-identifier/src/index.js ***!
- \****************************************************/
-/*! exports provided: SyntaxError, parse, stringify */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ while (count < text1.length && count < text2.length) {
+ var c1 = text1[text1.length - 1 - count];
+ var c2 = text2[text2.length - 1 - count];
+ if (c1 !== c2) break;
+ count++;
+ }
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringify", function() { return stringify; });
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/concat */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ "../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_1__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/map */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/map.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2__);
-/* harmony import */ var _fragment_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fragment.js */ "../packages/fragment-identifier/src/fragment.js");
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SyntaxError", function() { return _fragment_js__WEBPACK_IMPORTED_MODULE_3__["SyntaxError"]; });
+ return count;
+}
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parse", function() { return _fragment_js__WEBPACK_IMPORTED_MODULE_3__["parse"]; });
+function minimalSolution(requirements) {
+ // Build all the pairs and order them by their sums.
+ var pairs = _babel_runtime_corejs3_core_js_stable_instance_flat_map__WEBPACK_IMPORTED_MODULE_6___default()(requirements).call(requirements, function (l) {
+ return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(requirements).call(requirements, function (r) {
+ return [l[0], r[1]];
+ });
+ });
-/**
- * @license
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
+ _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_4___default()(pairs).call(pairs, function (a, b) {
+ return a[0] + a[1] - (b[0] + b[1]);
+ }); // Find the first pair that satisfies every requirement.
+ var _iteratorNormalCompletion2 = true;
+ var _didIteratorError2 = false;
+ var _iteratorError2 = undefined;
+ try {
+ var _loop = function _loop() {
+ var pair = _step2.value;
-/**
- * Convert a Selector or State into a fragment identifier string.
- * @param {(Selector|State)} resource
- * @return {string}
- */
+ var _pair = Object(_babel_runtime_corejs3_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(pair, 2),
+ p0 = _pair[0],
+ p1 = _pair[1];
-function stringify(resource) {
- var _context;
+ if (_babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_0___default()(requirements).call(requirements, function (_ref) {
+ var _ref2 = Object(_babel_runtime_corejs3_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, 2),
+ r0 = _ref2[0],
+ r1 = _ref2[1];
- var data = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2___default()(_context = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_1___default()(resource)).call(_context, function (key) {
- var _context3;
+ return r0 <= p0 || r1 <= p1;
+ })) {
+ return {
+ v: pair
+ };
+ }
+ };
- var value = resource[key];
- if (value instanceof Object) value = value.valueOf();
+ for (var _iterator2 = _babel_runtime_corejs3_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_3___default()(pairs), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
+ var _ret = _loop();
- if (value instanceof Object) {
- var _context2;
+ if (Object(_babel_runtime_corejs3_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__["default"])(_ret) === "object") return _ret.v;
+ } // Return the largest pairing (unreachable).
- value = stringify(value);
- return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0___default()(_context2 = "".concat(encodeURIComponent(key), "=")).call(_context2, value);
+ } catch (err) {
+ _didIteratorError2 = true;
+ _iteratorError2 = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
+ _iterator2.return();
+ }
+ } finally {
+ if (_didIteratorError2) {
+ throw _iteratorError2;
+ }
}
+ }
- return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2___default()(_context3 = [key, value]).call(_context3, encodeURIComponent).join('=');
- }).join(',');
-
- if (/Selector$/.test(resource.type)) return "selector(".concat(data, ")");
- if (/State$/.test(resource.type)) return "state(".concat(data, ")");
- throw new TypeError('Resource must be a Selector or State');
+ return pairs[pairs.length - 1];
}
/***/ }),
@@ -11930,19 +9038,14 @@ __webpack_require__.r(__webpack_exports__);
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/url */ "../node_modules/@babel/runtime-corejs3/core-js-stable/url.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_url__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_url__WEBPACK_IMPORTED_MODULE_0__);
-/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/regenerator */ "../node_modules/@babel/runtime-corejs3/regenerator/index.js");
-/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_1__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/json/stringify */ "../node_modules/@babel/runtime-corejs3/core-js-stable/json/stringify.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_2__);
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/slice */ "../node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js");
-/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_3__);
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncToGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncToGenerator.js");
-/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncIterator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncIterator.js");
-/* harmony import */ var _annotator_fragment_identifier_src_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @annotator/fragment-identifier/src/index.js */ "../packages/fragment-identifier/src/index.js");
-/* harmony import */ var _annotator_dom_src_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @annotator/dom/src/index.js */ "../packages/dom/src/index.js");
-/* harmony import */ var _annotator_selector_src_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @annotator/selector/src/index.js */ "../packages/selector/src/index.js");
+/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/regenerator */ "../node_modules/@babel/runtime-corejs3/regenerator/index.js");
+/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/json/stringify */ "../node_modules/@babel/runtime-corejs3/core-js-stable/json/stringify.js");
+/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncToGenerator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncToGenerator.js");
+/* harmony import */ var _babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/esm/asyncIterator */ "../node_modules/@babel/runtime-corejs3/helpers/esm/asyncIterator.js");
+/* harmony import */ var _annotator_dom_src_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @annotator/dom/src/index.js */ "../packages/dom/src/index.js");
+/* harmony import */ var _annotator_selector_src_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @annotator/selector/src/index.js */ "../packages/selector/src/index.js");
/**
* @license
* Licensed to the Apache Software Foundation (ASF) under one
@@ -11967,12 +9070,56 @@ __webpack_require__.r(__webpack_exports__);
+/* global info, module, source, target */
-/* global corpus, module, parsed, selectable */
-
-
-
+var EXAMPLE_SELECTORS = [{
+ type: 'TextQuoteSelector',
+ exact: 'not'
+}, {
+ type: 'RangeSelector',
+ startSelector: {
+ type: 'TextQuoteSelector',
+ exact: 'ann'
+ },
+ endSelector: {
+ type: 'TextQuoteSelector',
+ exact: '!'
+ }
+}, {
+ type: 'TextQuoteSelector',
+ exact: 'annotated world',
+ refinedBy: {
+ type: 'TextQuoteSelector',
+ exact: 'tat'
+ }
+}, {
+ type: 'TextQuoteSelector',
+ exact: 'To annotate, or not to annotate,',
+ refinedBy: {
+ type: 'RangeSelector',
+ startSelector: {
+ type: 'TextQuoteSelector',
+ exact: 'To annotate',
+ refinedBy: {
+ type: 'TextQuoteSelector',
+ exact: 'annotate'
+ }
+ },
+ endSelector: {
+ type: 'TextQuoteSelector',
+ exact: 'not to annotate',
+ refinedBy: {
+ type: 'TextQuoteSelector',
+ exact: ' to'
+ }
+ },
+ refinedBy: {
+ type: 'TextQuoteSelector',
+ exact: 'o'
+ }
+ }
+}];
var cleanupFunctions = [];
function cleanup() {
@@ -11982,13 +9129,13 @@ function cleanup() {
removeHighlight();
}
- corpus.normalize();
+ target.normalize();
}
-var createSelector = Object(_annotator_selector_src_index_js__WEBPACK_IMPORTED_MODULE_8__["makeRefinable"])(function (selector) {
+var createSelector = Object(_annotator_selector_src_index_js__WEBPACK_IMPORTED_MODULE_5__["makeRefinable"])(function (selector) {
var selectorCreator = {
- TextQuoteSelector: _annotator_dom_src_index_js__WEBPACK_IMPORTED_MODULE_7__["createTextQuoteSelector"],
- RangeSelector: Object(_annotator_dom_src_index_js__WEBPACK_IMPORTED_MODULE_7__["createRangeSelectorCreator"])(createSelector)
+ TextQuoteSelector: _annotator_dom_src_index_js__WEBPACK_IMPORTED_MODULE_4__["createTextQuoteSelector"],
+ RangeSelector: Object(_annotator_dom_src_index_js__WEBPACK_IMPORTED_MODULE_4__["createRangeSelectorCreator"])(createSelector)
}[selector.type];
if (selectorCreator == null) {
@@ -11998,176 +9145,165 @@ var createSelector = Object(_annotator_selector_src_index_js__WEBPACK_IMPORTED_M
return selectorCreator(selector);
});
-var refresh = /*#__PURE__*/function () {
- var _ref = Object(_babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_4__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee() {
- var _context;
+function anchor(_x) {
+ return _anchor.apply(this, arguments);
+}
- var fragment, _parseFragment, selector, matchAll, ranges, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, range, _i, _ranges, _range, removeHighlight;
+function _anchor() {
+ _anchor = Object(_babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(selector) {
+ var matchAll, ranges, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, range, _i, _ranges, _range, removeHighlight;
- return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context2) {
+ return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
while (1) {
- switch (_context2.prev = _context2.next) {
+ switch (_context.prev = _context.next) {
case 0:
- cleanup();
- fragment = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_3___default()(_context = window.location.hash).call(_context, 1);
-
- if (fragment) {
- _context2.next = 4;
- break;
- }
-
- return _context2.abrupt("return");
-
- case 4:
- _parseFragment = Object(_annotator_fragment_identifier_src_index_js__WEBPACK_IMPORTED_MODULE_6__["parse"])(fragment), selector = _parseFragment.selector;
matchAll = createSelector(selector);
ranges = [];
_iteratorNormalCompletion = true;
_didIteratorError = false;
- _context2.prev = 9;
- _iterator = Object(_babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_5__["default"])(matchAll(corpus));
+ _context.prev = 4;
+ _iterator = Object(_babel_runtime_corejs3_helpers_esm_asyncIterator__WEBPACK_IMPORTED_MODULE_3__["default"])(matchAll(target));
- case 11:
- _context2.next = 13;
+ case 6:
+ _context.next = 8;
return _iterator.next();
- case 13:
- _step = _context2.sent;
+ case 8:
+ _step = _context.sent;
_iteratorNormalCompletion = _step.done;
- _context2.next = 17;
+ _context.next = 12;
return _step.value;
- case 17:
- _value = _context2.sent;
+ case 12:
+ _value = _context.sent;
if (_iteratorNormalCompletion) {
- _context2.next = 24;
+ _context.next = 19;
break;
}
range = _value;
ranges.push(range);
- case 21:
+ case 16:
_iteratorNormalCompletion = true;
- _context2.next = 11;
+ _context.next = 6;
break;
- case 24:
- _context2.next = 30;
+ case 19:
+ _context.next = 25;
break;
- case 26:
- _context2.prev = 26;
- _context2.t0 = _context2["catch"](9);
+ case 21:
+ _context.prev = 21;
+ _context.t0 = _context["catch"](4);
_didIteratorError = true;
- _iteratorError = _context2.t0;
+ _iteratorError = _context.t0;
- case 30:
- _context2.prev = 30;
- _context2.prev = 31;
+ case 25:
+ _context.prev = 25;
+ _context.prev = 26;
if (!(!_iteratorNormalCompletion && _iterator.return != null)) {
- _context2.next = 35;
+ _context.next = 30;
break;
}
- _context2.next = 35;
+ _context.next = 30;
return _iterator.return();
- case 35:
- _context2.prev = 35;
+ case 30:
+ _context.prev = 30;
if (!_didIteratorError) {
- _context2.next = 38;
+ _context.next = 33;
break;
}
throw _iteratorError;
- case 38:
- return _context2.finish(35);
+ case 33:
+ return _context.finish(30);
- case 39:
- return _context2.finish(30);
+ case 34:
+ return _context.finish(25);
- case 40:
+ case 35:
for (_i = 0, _ranges = ranges; _i < _ranges.length; _i++) {
_range = _ranges[_i];
- removeHighlight = Object(_annotator_dom_src_index_js__WEBPACK_IMPORTED_MODULE_7__["highlightRange"])(_range);
+ removeHighlight = Object(_annotator_dom_src_index_js__WEBPACK_IMPORTED_MODULE_4__["highlightRange"])(_range);
cleanupFunctions.push(removeHighlight);
}
- parsed.innerText = _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_2___default()(selector, null, 2);
+ info.innerText = _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_1___default()(selector, null, 2);
- case 42:
+ case 37:
case "end":
- return _context2.stop();
+ return _context.stop();
}
}
- }, _callee, null, [[9, 26, 30, 40], [31,, 35, 39]]);
+ }, _callee, null, [[4, 21, 25, 35], [26,, 30, 34]]);
}));
+ return _anchor.apply(this, arguments);
+}
- return function refresh() {
- return _ref.apply(this, arguments);
- };
-}();
+;
function describeSelection() {
return _describeSelection.apply(this, arguments);
}
function _describeSelection() {
- _describeSelection = Object(_babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_4__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2() {
+ _describeSelection = Object(_babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2() {
var selection, range, scope;
- return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context3) {
+ return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) {
while (1) {
- switch (_context3.prev = _context3.next) {
+ switch (_context2.prev = _context2.next) {
case 0:
selection = document.getSelection();
if (!(selection.type !== 'Range')) {
- _context3.next = 3;
+ _context2.next = 3;
break;
}
- return _context3.abrupt("return");
+ return _context2.abrupt("return");
case 3:
range = selection.getRangeAt(0);
if (!range.collapsed) {
- _context3.next = 6;
+ _context2.next = 6;
break;
}
- return _context3.abrupt("return");
+ return _context2.abrupt("return");
case 6:
scope = document.createRange();
- scope.selectNodeContents(selectable);
+ scope.selectNodeContents(source);
if (scope.isPointInRange(range.startContainer, range.startOffset)) {
- _context3.next = 10;
+ _context2.next = 10;
break;
}
- return _context3.abrupt("return");
+ return _context2.abrupt("return");
case 10:
if (scope.isPointInRange(range.endContainer, range.endOffset)) {
- _context3.next = 12;
+ _context2.next = 12;
break;
}
- return _context3.abrupt("return");
+ return _context2.abrupt("return");
case 12:
- return _context3.abrupt("return", Object(_annotator_dom_src_index_js__WEBPACK_IMPORTED_MODULE_7__["describeTextQuote"])(range, scope));
+ return _context2.abrupt("return", Object(_annotator_dom_src_index_js__WEBPACK_IMPORTED_MODULE_4__["describeTextQuote"])(range, scope));
case 13:
case "end":
- return _context3.stop();
+ return _context2.stop();
}
}
}, _callee2);
@@ -12180,29 +9316,26 @@ function onSelectionChange() {
}
function _onSelectionChange() {
- _onSelectionChange = Object(_babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_4__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee3() {
- var selector, fragment, url;
- return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee3$(_context4) {
+ _onSelectionChange = Object(_babel_runtime_corejs3_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__["default"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee3() {
+ var selector;
+ return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee3$(_context3) {
while (1) {
- switch (_context4.prev = _context4.next) {
+ switch (_context3.prev = _context3.next) {
case 0:
- _context4.next = 2;
+ _context3.next = 2;
return describeSelection();
case 2:
- selector = _context4.sent;
- fragment = selector ? Object(_annotator_fragment_identifier_src_index_js__WEBPACK_IMPORTED_MODULE_6__["stringify"])(selector) : '';
- url = new _babel_runtime_corejs3_core_js_stable_url__WEBPACK_IMPORTED_MODULE_0___default.a(window.location.href);
- url.hash = fragment ? "#".concat(fragment) : '';
-
- if (url.href !== window.location.href) {
- window.history.replaceState(selector, null, url.href);
- refresh();
+ selector = _context3.sent;
+
+ if (selector) {
+ cleanup();
+ anchor(selector);
}
- case 7:
+ case 4:
case "end":
- return _context4.stop();
+ return _context3.stop();
}
}
}, _callee3);
@@ -12210,9 +9343,17 @@ function _onSelectionChange() {
return _onSelectionChange.apply(this, arguments);
}
-window.addEventListener('popstate', refresh);
-document.addEventListener('DOMContentLoaded', refresh);
+function onSelectorExampleClick(event) {
+ var exampleNumber = event.target.dataset.runExample;
+ if (!exampleNumber) return;
+ var selector = EXAMPLE_SELECTORS[exampleNumber];
+ cleanup();
+ anchor(selector);
+ event.preventDefault();
+}
+
document.addEventListener('selectionchange', onSelectionChange);
+document.addEventListener('click', onSelectorExampleClick);
if (false) {}
@@ -12232,4 +9373,4 @@ module.exports = __webpack_require__(/*! ./demo/index.js */"./demo/index.js");
/***/ })
/******/ });
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4uL25vZGVfbW9kdWxlcy9AYmFiZWwvcnVudGltZS1jb3JlanMzL2NvcmUtanMtc3RhYmxlL2FycmF5L2lzLWFycmF5LmpzIiwid2VicGFjazovLy8uLi9ub2RlX21vZHVsZXMvQGJhYmVsL3J1bnRpbWUtY29yZWpzMy9jb3JlLWpzLXN0YWJsZS9pbnN0YW5jZS9jb25jYXQuanMiLCJ3ZWJwYWNrOi8vLy4uL25vZGVfbW9kdWxlcy9AYmFiZWwvcnVudGltZS1jb3JlanMzL2NvcmUtanMtc3RhYmxlL2luc3RhbmNlL2V2ZXJ5LmpzIiwid2VicGFjazov [...]
\ No newline at end of file
+//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4uL25vZGVfbW9kdWxlcy9AYmFiZWwvcnVudGltZS1jb3JlanMzL2NvcmUtanMtc3RhYmxlL2luc3RhbmNlL2NvbmNhdC5qcyIsIndlYnBhY2s6Ly8vLi4vbm9kZV9tb2R1bGVzL0BiYWJlbC9ydW50aW1lLWNvcmVqczMvY29yZS1qcy1zdGFibGUvaW5zdGFuY2UvZXZlcnkuanMiLCJ3ZWJwYWNrOi8vLy4uL25vZGVfbW9kdWxlcy9AYmFiZWwvcnVudGltZS1jb3JlanMzL2NvcmUtanMtc3RhYmxlL2luc3RhbmNlL2ZpbHRlci5qcyIsIndlYnBhY2s6 [...]
\ No newline at end of file
diff --git a/content/style.css b/content/style.css
index 8b241e8..29fef4d 100644
--- a/content/style.css
+++ b/content/style.css
@@ -1,3 +1,23 @@
+/**
+ * @license
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
body {
font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
line-height: 1.5;