@wavemaker/angular-app 11.12.1-rc.221 → 11.13.0-2.647474
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/angular.json +62 -95
- package/build-scripts/index-html-transform-ng-serve.ts +20 -0
- package/build-scripts/post-build.js +2 -2
- package/dependencies/custom-widgets-bundle.cjs.js +43 -37
- package/dependencies/expression-parser.cjs.js +145 -89
- package/dependencies/pipe-provider.cjs.js +1448 -806
- package/dependencies/transpilation-web.cjs.js +748 -438
- package/dependency-report.html +1 -1
- package/npm-shrinkwrap.json +1711 -1243
- package/package-lock.json +1711 -1243
- package/package.json +8 -9
- package/proxy.conf.js +14 -0
|
@@ -124843,17 +124843,17 @@ var root$1 = freeGlobal$1 || freeSelf$1 || Function('return this')();
|
|
|
124843
124843
|
var Symbol$1$1 = root$1.Symbol;
|
|
124844
124844
|
|
|
124845
124845
|
/** Used for built-in method references. */
|
|
124846
|
-
var objectProto$
|
|
124846
|
+
var objectProto$t$1 = Object.prototype;
|
|
124847
124847
|
|
|
124848
124848
|
/** Used to check objects for own properties. */
|
|
124849
|
-
var hasOwnProperty$
|
|
124849
|
+
var hasOwnProperty$p$1 = objectProto$t$1.hasOwnProperty;
|
|
124850
124850
|
|
|
124851
124851
|
/**
|
|
124852
124852
|
* Used to resolve the
|
|
124853
124853
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
124854
124854
|
* of values.
|
|
124855
124855
|
*/
|
|
124856
|
-
var nativeObjectToString$3$1 = objectProto$
|
|
124856
|
+
var nativeObjectToString$3$1 = objectProto$t$1.toString;
|
|
124857
124857
|
|
|
124858
124858
|
/** Built-in value references. */
|
|
124859
124859
|
var symToStringTag$1$1 = Symbol$1$1 ? Symbol$1$1.toStringTag : undefined;
|
|
@@ -124866,7 +124866,7 @@ var symToStringTag$1$1 = Symbol$1$1 ? Symbol$1$1.toStringTag : undefined;
|
|
|
124866
124866
|
* @returns {string} Returns the raw `toStringTag`.
|
|
124867
124867
|
*/
|
|
124868
124868
|
function getRawTag$1(value) {
|
|
124869
|
-
var isOwn = hasOwnProperty$
|
|
124869
|
+
var isOwn = hasOwnProperty$p$1.call(value, symToStringTag$1$1),
|
|
124870
124870
|
tag = value[symToStringTag$1$1];
|
|
124871
124871
|
|
|
124872
124872
|
try {
|
|
@@ -124886,14 +124886,14 @@ function getRawTag$1(value) {
|
|
|
124886
124886
|
}
|
|
124887
124887
|
|
|
124888
124888
|
/** Used for built-in method references. */
|
|
124889
|
-
var objectProto$
|
|
124889
|
+
var objectProto$s$1 = Object.prototype;
|
|
124890
124890
|
|
|
124891
124891
|
/**
|
|
124892
124892
|
* Used to resolve the
|
|
124893
124893
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
124894
124894
|
* of values.
|
|
124895
124895
|
*/
|
|
124896
|
-
var nativeObjectToString$2$1 = objectProto$
|
|
124896
|
+
var nativeObjectToString$2$1 = objectProto$s$1.toString;
|
|
124897
124897
|
|
|
124898
124898
|
/**
|
|
124899
124899
|
* Converts `value` to a string using `Object.prototype.toString`.
|
|
@@ -125472,17 +125472,17 @@ var reIsHostCtor$1 = /^\[object .+?Constructor\]$/;
|
|
|
125472
125472
|
|
|
125473
125473
|
/** Used for built-in method references. */
|
|
125474
125474
|
var funcProto$1$1 = Function.prototype,
|
|
125475
|
-
objectProto$
|
|
125475
|
+
objectProto$r$1 = Object.prototype;
|
|
125476
125476
|
|
|
125477
125477
|
/** Used to resolve the decompiled source of functions. */
|
|
125478
125478
|
var funcToString$1$1 = funcProto$1$1.toString;
|
|
125479
125479
|
|
|
125480
125480
|
/** Used to check objects for own properties. */
|
|
125481
|
-
var hasOwnProperty$
|
|
125481
|
+
var hasOwnProperty$o$1 = objectProto$r$1.hasOwnProperty;
|
|
125482
125482
|
|
|
125483
125483
|
/** Used to detect if a method is native. */
|
|
125484
125484
|
var reIsNative$1 = RegExp('^' +
|
|
125485
|
-
funcToString$1$1.call(hasOwnProperty$
|
|
125485
|
+
funcToString$1$1.call(hasOwnProperty$o$1).replace(reRegExpChar$1$1, '\\$&')
|
|
125486
125486
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
125487
125487
|
);
|
|
125488
125488
|
|
|
@@ -125812,10 +125812,10 @@ var getData$1 = !metaMap$1 ? noop$3$1 : function(func) {
|
|
|
125812
125812
|
var realNames$1 = {};
|
|
125813
125813
|
|
|
125814
125814
|
/** Used for built-in method references. */
|
|
125815
|
-
var objectProto$
|
|
125815
|
+
var objectProto$q$1 = Object.prototype;
|
|
125816
125816
|
|
|
125817
125817
|
/** Used to check objects for own properties. */
|
|
125818
|
-
var hasOwnProperty$
|
|
125818
|
+
var hasOwnProperty$n$1 = objectProto$q$1.hasOwnProperty;
|
|
125819
125819
|
|
|
125820
125820
|
/**
|
|
125821
125821
|
* Gets the name of `func`.
|
|
@@ -125827,7 +125827,7 @@ var hasOwnProperty$m$1 = objectProto$p$1.hasOwnProperty;
|
|
|
125827
125827
|
function getFuncName$1(func) {
|
|
125828
125828
|
var result = (func.name + ''),
|
|
125829
125829
|
array = realNames$1[result],
|
|
125830
|
-
length = hasOwnProperty$
|
|
125830
|
+
length = hasOwnProperty$n$1.call(realNames$1, result) ? array.length : 0;
|
|
125831
125831
|
|
|
125832
125832
|
while (length--) {
|
|
125833
125833
|
var data = array[length],
|
|
@@ -125895,10 +125895,10 @@ function wrapperClone$1(wrapper) {
|
|
|
125895
125895
|
}
|
|
125896
125896
|
|
|
125897
125897
|
/** Used for built-in method references. */
|
|
125898
|
-
var objectProto$
|
|
125898
|
+
var objectProto$p$1 = Object.prototype;
|
|
125899
125899
|
|
|
125900
125900
|
/** Used to check objects for own properties. */
|
|
125901
|
-
var hasOwnProperty$
|
|
125901
|
+
var hasOwnProperty$m$1 = objectProto$p$1.hasOwnProperty;
|
|
125902
125902
|
|
|
125903
125903
|
/**
|
|
125904
125904
|
* Creates a `lodash` object which wraps `value` to enable implicit method
|
|
@@ -126022,7 +126022,7 @@ function lodash$1(value) {
|
|
|
126022
126022
|
if (value instanceof LodashWrapper$1) {
|
|
126023
126023
|
return value;
|
|
126024
126024
|
}
|
|
126025
|
-
if (hasOwnProperty$
|
|
126025
|
+
if (hasOwnProperty$m$1.call(value, '__wrapped__')) {
|
|
126026
126026
|
return wrapperClone$1(value);
|
|
126027
126027
|
}
|
|
126028
126028
|
}
|
|
@@ -126926,10 +126926,10 @@ function eq$1(value, other) {
|
|
|
126926
126926
|
}
|
|
126927
126927
|
|
|
126928
126928
|
/** Used for built-in method references. */
|
|
126929
|
-
var objectProto$
|
|
126929
|
+
var objectProto$o$1 = Object.prototype;
|
|
126930
126930
|
|
|
126931
126931
|
/** Used to check objects for own properties. */
|
|
126932
|
-
var hasOwnProperty$
|
|
126932
|
+
var hasOwnProperty$l$1 = objectProto$o$1.hasOwnProperty;
|
|
126933
126933
|
|
|
126934
126934
|
/**
|
|
126935
126935
|
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
@@ -126943,7 +126943,7 @@ var hasOwnProperty$k$1 = objectProto$n$1.hasOwnProperty;
|
|
|
126943
126943
|
*/
|
|
126944
126944
|
function assignValue$1(object, key, value) {
|
|
126945
126945
|
var objValue = object[key];
|
|
126946
|
-
if (!(hasOwnProperty$
|
|
126946
|
+
if (!(hasOwnProperty$l$1.call(object, key) && eq$1(objValue, value)) ||
|
|
126947
126947
|
(value === undefined && !(key in object))) {
|
|
126948
126948
|
baseAssignValue$1(object, key, value);
|
|
126949
126949
|
}
|
|
@@ -127151,7 +127151,7 @@ function createAssigner$1(assigner) {
|
|
|
127151
127151
|
}
|
|
127152
127152
|
|
|
127153
127153
|
/** Used for built-in method references. */
|
|
127154
|
-
var objectProto$
|
|
127154
|
+
var objectProto$n$1 = Object.prototype;
|
|
127155
127155
|
|
|
127156
127156
|
/**
|
|
127157
127157
|
* Checks if `value` is likely a prototype object.
|
|
@@ -127162,7 +127162,7 @@ var objectProto$m$1 = Object.prototype;
|
|
|
127162
127162
|
*/
|
|
127163
127163
|
function isPrototype$1(value) {
|
|
127164
127164
|
var Ctor = value && value.constructor,
|
|
127165
|
-
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$
|
|
127165
|
+
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$n$1;
|
|
127166
127166
|
|
|
127167
127167
|
return value === proto;
|
|
127168
127168
|
}
|
|
@@ -127201,13 +127201,13 @@ function baseIsArguments$1(value) {
|
|
|
127201
127201
|
}
|
|
127202
127202
|
|
|
127203
127203
|
/** Used for built-in method references. */
|
|
127204
|
-
var objectProto$
|
|
127204
|
+
var objectProto$m$1 = Object.prototype;
|
|
127205
127205
|
|
|
127206
127206
|
/** Used to check objects for own properties. */
|
|
127207
|
-
var hasOwnProperty$
|
|
127207
|
+
var hasOwnProperty$k$1 = objectProto$m$1.hasOwnProperty;
|
|
127208
127208
|
|
|
127209
127209
|
/** Built-in value references. */
|
|
127210
|
-
var propertyIsEnumerable$1$1 = objectProto$
|
|
127210
|
+
var propertyIsEnumerable$1$1 = objectProto$m$1.propertyIsEnumerable;
|
|
127211
127211
|
|
|
127212
127212
|
/**
|
|
127213
127213
|
* Checks if `value` is likely an `arguments` object.
|
|
@@ -127228,7 +127228,7 @@ var propertyIsEnumerable$1$1 = objectProto$l$1.propertyIsEnumerable;
|
|
|
127228
127228
|
* // => false
|
|
127229
127229
|
*/
|
|
127230
127230
|
var isArguments$1 = baseIsArguments$1(function() { return arguments; }()) ? baseIsArguments$1 : function(value) {
|
|
127231
|
-
return isObjectLike$1(value) && hasOwnProperty$
|
|
127231
|
+
return isObjectLike$1(value) && hasOwnProperty$k$1.call(value, 'callee') &&
|
|
127232
127232
|
!propertyIsEnumerable$1$1.call(value, 'callee');
|
|
127233
127233
|
};
|
|
127234
127234
|
|
|
@@ -127401,10 +127401,10 @@ var nodeIsTypedArray$1 = nodeUtil$1 && nodeUtil$1.isTypedArray;
|
|
|
127401
127401
|
var isTypedArray$1 = nodeIsTypedArray$1 ? baseUnary$1(nodeIsTypedArray$1) : baseIsTypedArray$1;
|
|
127402
127402
|
|
|
127403
127403
|
/** Used for built-in method references. */
|
|
127404
|
-
var objectProto$
|
|
127404
|
+
var objectProto$l$1 = Object.prototype;
|
|
127405
127405
|
|
|
127406
127406
|
/** Used to check objects for own properties. */
|
|
127407
|
-
var hasOwnProperty$
|
|
127407
|
+
var hasOwnProperty$j$1 = objectProto$l$1.hasOwnProperty;
|
|
127408
127408
|
|
|
127409
127409
|
/**
|
|
127410
127410
|
* Creates an array of the enumerable property names of the array-like `value`.
|
|
@@ -127424,7 +127424,7 @@ function arrayLikeKeys$1(value, inherited) {
|
|
|
127424
127424
|
length = result.length;
|
|
127425
127425
|
|
|
127426
127426
|
for (var key in value) {
|
|
127427
|
-
if ((inherited || hasOwnProperty$
|
|
127427
|
+
if ((inherited || hasOwnProperty$j$1.call(value, key)) &&
|
|
127428
127428
|
!(skipIndexes && (
|
|
127429
127429
|
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
127430
127430
|
key == 'length' ||
|
|
@@ -127459,10 +127459,10 @@ function overArg$1(func, transform) {
|
|
|
127459
127459
|
var nativeKeys$1 = overArg$1(Object.keys, Object);
|
|
127460
127460
|
|
|
127461
127461
|
/** Used for built-in method references. */
|
|
127462
|
-
var objectProto$
|
|
127462
|
+
var objectProto$k$1 = Object.prototype;
|
|
127463
127463
|
|
|
127464
127464
|
/** Used to check objects for own properties. */
|
|
127465
|
-
var hasOwnProperty$
|
|
127465
|
+
var hasOwnProperty$i$1 = objectProto$k$1.hasOwnProperty;
|
|
127466
127466
|
|
|
127467
127467
|
/**
|
|
127468
127468
|
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
@@ -127477,7 +127477,7 @@ function baseKeys$1(object) {
|
|
|
127477
127477
|
}
|
|
127478
127478
|
var result = [];
|
|
127479
127479
|
for (var key in Object(object)) {
|
|
127480
|
-
if (hasOwnProperty$
|
|
127480
|
+
if (hasOwnProperty$i$1.call(object, key) && key != 'constructor') {
|
|
127481
127481
|
result.push(key);
|
|
127482
127482
|
}
|
|
127483
127483
|
}
|
|
@@ -127517,10 +127517,10 @@ function keys$1(object) {
|
|
|
127517
127517
|
}
|
|
127518
127518
|
|
|
127519
127519
|
/** Used for built-in method references. */
|
|
127520
|
-
var objectProto$
|
|
127520
|
+
var objectProto$j$1 = Object.prototype;
|
|
127521
127521
|
|
|
127522
127522
|
/** Used to check objects for own properties. */
|
|
127523
|
-
var hasOwnProperty$
|
|
127523
|
+
var hasOwnProperty$h$1 = objectProto$j$1.hasOwnProperty;
|
|
127524
127524
|
|
|
127525
127525
|
/**
|
|
127526
127526
|
* Assigns own enumerable string keyed properties of source objects to the
|
|
@@ -127560,7 +127560,7 @@ var assign$1 = createAssigner$1(function(object, source) {
|
|
|
127560
127560
|
return;
|
|
127561
127561
|
}
|
|
127562
127562
|
for (var key in source) {
|
|
127563
|
-
if (hasOwnProperty$
|
|
127563
|
+
if (hasOwnProperty$h$1.call(source, key)) {
|
|
127564
127564
|
assignValue$1(object, key, source[key]);
|
|
127565
127565
|
}
|
|
127566
127566
|
}
|
|
@@ -127586,10 +127586,10 @@ function nativeKeysIn$1(object) {
|
|
|
127586
127586
|
}
|
|
127587
127587
|
|
|
127588
127588
|
/** Used for built-in method references. */
|
|
127589
|
-
var objectProto$
|
|
127589
|
+
var objectProto$i$1 = Object.prototype;
|
|
127590
127590
|
|
|
127591
127591
|
/** Used to check objects for own properties. */
|
|
127592
|
-
var hasOwnProperty$
|
|
127592
|
+
var hasOwnProperty$g$1 = objectProto$i$1.hasOwnProperty;
|
|
127593
127593
|
|
|
127594
127594
|
/**
|
|
127595
127595
|
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
@@ -127606,7 +127606,7 @@ function baseKeysIn$1(object) {
|
|
|
127606
127606
|
result = [];
|
|
127607
127607
|
|
|
127608
127608
|
for (var key in object) {
|
|
127609
|
-
if (!(key == 'constructor' && (isProto || !hasOwnProperty$
|
|
127609
|
+
if (!(key == 'constructor' && (isProto || !hasOwnProperty$g$1.call(object, key)))) {
|
|
127610
127610
|
result.push(key);
|
|
127611
127611
|
}
|
|
127612
127612
|
}
|
|
@@ -127800,10 +127800,10 @@ function hashDelete$1(key) {
|
|
|
127800
127800
|
var HASH_UNDEFINED$2$1 = '__lodash_hash_undefined__';
|
|
127801
127801
|
|
|
127802
127802
|
/** Used for built-in method references. */
|
|
127803
|
-
var objectProto$
|
|
127803
|
+
var objectProto$h$1 = Object.prototype;
|
|
127804
127804
|
|
|
127805
127805
|
/** Used to check objects for own properties. */
|
|
127806
|
-
var hasOwnProperty$
|
|
127806
|
+
var hasOwnProperty$f$1 = objectProto$h$1.hasOwnProperty;
|
|
127807
127807
|
|
|
127808
127808
|
/**
|
|
127809
127809
|
* Gets the hash value for `key`.
|
|
@@ -127820,14 +127820,14 @@ function hashGet$1(key) {
|
|
|
127820
127820
|
var result = data[key];
|
|
127821
127821
|
return result === HASH_UNDEFINED$2$1 ? undefined : result;
|
|
127822
127822
|
}
|
|
127823
|
-
return hasOwnProperty$
|
|
127823
|
+
return hasOwnProperty$f$1.call(data, key) ? data[key] : undefined;
|
|
127824
127824
|
}
|
|
127825
127825
|
|
|
127826
127826
|
/** Used for built-in method references. */
|
|
127827
|
-
var objectProto$
|
|
127827
|
+
var objectProto$g$1 = Object.prototype;
|
|
127828
127828
|
|
|
127829
127829
|
/** Used to check objects for own properties. */
|
|
127830
|
-
var hasOwnProperty$
|
|
127830
|
+
var hasOwnProperty$e$1 = objectProto$g$1.hasOwnProperty;
|
|
127831
127831
|
|
|
127832
127832
|
/**
|
|
127833
127833
|
* Checks if a hash value for `key` exists.
|
|
@@ -127840,7 +127840,7 @@ var hasOwnProperty$d$1 = objectProto$f$1.hasOwnProperty;
|
|
|
127840
127840
|
*/
|
|
127841
127841
|
function hashHas$1(key) {
|
|
127842
127842
|
var data = this.__data__;
|
|
127843
|
-
return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$
|
|
127843
|
+
return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$e$1.call(data, key);
|
|
127844
127844
|
}
|
|
127845
127845
|
|
|
127846
127846
|
/** Used to stand-in for `undefined` hash values. */
|
|
@@ -128527,13 +128527,13 @@ var objectTag$3$1 = '[object Object]';
|
|
|
128527
128527
|
|
|
128528
128528
|
/** Used for built-in method references. */
|
|
128529
128529
|
var funcProto$3 = Function.prototype,
|
|
128530
|
-
objectProto$
|
|
128530
|
+
objectProto$f$1 = Object.prototype;
|
|
128531
128531
|
|
|
128532
128532
|
/** Used to resolve the decompiled source of functions. */
|
|
128533
128533
|
var funcToString$3 = funcProto$3.toString;
|
|
128534
128534
|
|
|
128535
128535
|
/** Used to check objects for own properties. */
|
|
128536
|
-
var hasOwnProperty$
|
|
128536
|
+
var hasOwnProperty$d$1 = objectProto$f$1.hasOwnProperty;
|
|
128537
128537
|
|
|
128538
128538
|
/** Used to infer the `Object` constructor. */
|
|
128539
128539
|
var objectCtorString$1 = funcToString$3.call(Object);
|
|
@@ -128574,7 +128574,7 @@ function isPlainObject$1(value) {
|
|
|
128574
128574
|
if (proto === null) {
|
|
128575
128575
|
return true;
|
|
128576
128576
|
}
|
|
128577
|
-
var Ctor = hasOwnProperty$
|
|
128577
|
+
var Ctor = hasOwnProperty$d$1.call(proto, 'constructor') && proto.constructor;
|
|
128578
128578
|
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
|
128579
128579
|
funcToString$3.call(Ctor) == objectCtorString$1;
|
|
128580
128580
|
}
|
|
@@ -129775,10 +129775,10 @@ function stubArray$1() {
|
|
|
129775
129775
|
}
|
|
129776
129776
|
|
|
129777
129777
|
/** Used for built-in method references. */
|
|
129778
|
-
var objectProto$
|
|
129778
|
+
var objectProto$e$1 = Object.prototype;
|
|
129779
129779
|
|
|
129780
129780
|
/** Built-in value references. */
|
|
129781
|
-
var propertyIsEnumerable$2 = objectProto$
|
|
129781
|
+
var propertyIsEnumerable$2 = objectProto$e$1.propertyIsEnumerable;
|
|
129782
129782
|
|
|
129783
129783
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
129784
129784
|
var nativeGetSymbols$1$1 = Object.getOwnPropertySymbols;
|
|
@@ -129941,10 +129941,10 @@ if ((DataView$1$1 && getTag$2(new DataView$1$1(new ArrayBuffer(1))) != dataViewT
|
|
|
129941
129941
|
}
|
|
129942
129942
|
|
|
129943
129943
|
/** Used for built-in method references. */
|
|
129944
|
-
var objectProto$
|
|
129944
|
+
var objectProto$d$1 = Object.prototype;
|
|
129945
129945
|
|
|
129946
129946
|
/** Used to check objects for own properties. */
|
|
129947
|
-
var hasOwnProperty$
|
|
129947
|
+
var hasOwnProperty$c$1 = objectProto$d$1.hasOwnProperty;
|
|
129948
129948
|
|
|
129949
129949
|
/**
|
|
129950
129950
|
* Initializes an array clone.
|
|
@@ -129958,7 +129958,7 @@ function initCloneArray$1(array) {
|
|
|
129958
129958
|
result = new array.constructor(length);
|
|
129959
129959
|
|
|
129960
129960
|
// Add properties assigned by `RegExp#exec`.
|
|
129961
|
-
if (length && typeof array[0] == 'string' && hasOwnProperty$
|
|
129961
|
+
if (length && typeof array[0] == 'string' && hasOwnProperty$c$1.call(array, 'index')) {
|
|
129962
129962
|
result.index = array.index;
|
|
129963
129963
|
result.input = array.input;
|
|
129964
129964
|
}
|
|
@@ -130502,7 +130502,7 @@ function wrapperCommit$1() {
|
|
|
130502
130502
|
|
|
130503
130503
|
/**
|
|
130504
130504
|
* Creates an array with all falsey values removed. The values `false`, `null`,
|
|
130505
|
-
* `0`, `""`, `undefined`, and `NaN` are
|
|
130505
|
+
* `0`, `-0`, `0n`, `""`, `undefined`, and `NaN` are falsy.
|
|
130506
130506
|
*
|
|
130507
130507
|
* @static
|
|
130508
130508
|
* @memberOf _
|
|
@@ -130592,7 +130592,7 @@ function setCacheAdd$1(value) {
|
|
|
130592
130592
|
* @name has
|
|
130593
130593
|
* @memberOf SetCache
|
|
130594
130594
|
* @param {*} value The value to search for.
|
|
130595
|
-
* @returns {
|
|
130595
|
+
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
|
130596
130596
|
*/
|
|
130597
130597
|
function setCacheHas$1(value) {
|
|
130598
130598
|
return this.__data__.has(value);
|
|
@@ -130875,10 +130875,10 @@ function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack)
|
|
|
130875
130875
|
var COMPARE_PARTIAL_FLAG$3$1 = 1;
|
|
130876
130876
|
|
|
130877
130877
|
/** Used for built-in method references. */
|
|
130878
|
-
var objectProto$
|
|
130878
|
+
var objectProto$c$1 = Object.prototype;
|
|
130879
130879
|
|
|
130880
130880
|
/** Used to check objects for own properties. */
|
|
130881
|
-
var hasOwnProperty$
|
|
130881
|
+
var hasOwnProperty$b$1 = objectProto$c$1.hasOwnProperty;
|
|
130882
130882
|
|
|
130883
130883
|
/**
|
|
130884
130884
|
* A specialized version of `baseIsEqualDeep` for objects with support for
|
|
@@ -130906,7 +130906,7 @@ function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
|
|
|
130906
130906
|
var index = objLength;
|
|
130907
130907
|
while (index--) {
|
|
130908
130908
|
var key = objProps[index];
|
|
130909
|
-
if (!(isPartial ? key in other : hasOwnProperty$
|
|
130909
|
+
if (!(isPartial ? key in other : hasOwnProperty$b$1.call(other, key))) {
|
|
130910
130910
|
return false;
|
|
130911
130911
|
}
|
|
130912
130912
|
}
|
|
@@ -130967,10 +130967,10 @@ var argsTag$4 = '[object Arguments]',
|
|
|
130967
130967
|
objectTag$5 = '[object Object]';
|
|
130968
130968
|
|
|
130969
130969
|
/** Used for built-in method references. */
|
|
130970
|
-
var objectProto$
|
|
130970
|
+
var objectProto$b$1 = Object.prototype;
|
|
130971
130971
|
|
|
130972
130972
|
/** Used to check objects for own properties. */
|
|
130973
|
-
var hasOwnProperty$
|
|
130973
|
+
var hasOwnProperty$a$1 = objectProto$b$1.hasOwnProperty;
|
|
130974
130974
|
|
|
130975
130975
|
/**
|
|
130976
130976
|
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
|
@@ -131013,8 +131013,8 @@ function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack)
|
|
|
131013
131013
|
: equalByTag$1(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
131014
131014
|
}
|
|
131015
131015
|
if (!(bitmask & COMPARE_PARTIAL_FLAG$2$1)) {
|
|
131016
|
-
var objIsWrapped = objIsObj && hasOwnProperty$
|
|
131017
|
-
othIsWrapped = othIsObj && hasOwnProperty$
|
|
131016
|
+
var objIsWrapped = objIsObj && hasOwnProperty$a$1.call(object, '__wrapped__'),
|
|
131017
|
+
othIsWrapped = othIsObj && hasOwnProperty$a$1.call(other, '__wrapped__');
|
|
131018
131018
|
|
|
131019
131019
|
if (objIsWrapped || othIsWrapped) {
|
|
131020
131020
|
var objUnwrapped = objIsWrapped ? object.value() : object,
|
|
@@ -131652,10 +131652,10 @@ function createAggregator$1(setter, initializer) {
|
|
|
131652
131652
|
}
|
|
131653
131653
|
|
|
131654
131654
|
/** Used for built-in method references. */
|
|
131655
|
-
var objectProto$
|
|
131655
|
+
var objectProto$a$1 = Object.prototype;
|
|
131656
131656
|
|
|
131657
131657
|
/** Used to check objects for own properties. */
|
|
131658
|
-
var hasOwnProperty$
|
|
131658
|
+
var hasOwnProperty$9$1 = objectProto$a$1.hasOwnProperty;
|
|
131659
131659
|
|
|
131660
131660
|
/**
|
|
131661
131661
|
* Creates an object composed of keys generated from the results of running
|
|
@@ -131680,7 +131680,7 @@ var hasOwnProperty$8$1 = objectProto$9$1.hasOwnProperty;
|
|
|
131680
131680
|
* // => { '3': 2, '5': 1 }
|
|
131681
131681
|
*/
|
|
131682
131682
|
var countBy$1 = createAggregator$1(function(result, value, key) {
|
|
131683
|
-
if (hasOwnProperty$
|
|
131683
|
+
if (hasOwnProperty$9$1.call(result, key)) {
|
|
131684
131684
|
++result[key];
|
|
131685
131685
|
} else {
|
|
131686
131686
|
baseAssignValue$1(result, key, 1);
|
|
@@ -132062,10 +132062,10 @@ function defaultTo$1(value, defaultValue) {
|
|
|
132062
132062
|
}
|
|
132063
132063
|
|
|
132064
132064
|
/** Used for built-in method references. */
|
|
132065
|
-
var objectProto$
|
|
132065
|
+
var objectProto$9$1 = Object.prototype;
|
|
132066
132066
|
|
|
132067
132067
|
/** Used to check objects for own properties. */
|
|
132068
|
-
var hasOwnProperty$
|
|
132068
|
+
var hasOwnProperty$8$1 = objectProto$9$1.hasOwnProperty;
|
|
132069
132069
|
|
|
132070
132070
|
/**
|
|
132071
132071
|
* Assigns own and inherited enumerable string keyed properties of source
|
|
@@ -132110,7 +132110,7 @@ var defaults$1 = baseRest$1(function(object, sources) {
|
|
|
132110
132110
|
var value = object[key];
|
|
132111
132111
|
|
|
132112
132112
|
if (value === undefined ||
|
|
132113
|
-
(eq$1(value, objectProto$
|
|
132113
|
+
(eq$1(value, objectProto$9$1[key]) && !hasOwnProperty$8$1.call(object, key))) {
|
|
132114
132114
|
object[key] = source[key];
|
|
132115
132115
|
}
|
|
132116
132116
|
}
|
|
@@ -134284,7 +134284,7 @@ function fromPairs$1(pairs) {
|
|
|
134284
134284
|
|
|
134285
134285
|
while (++index < length) {
|
|
134286
134286
|
var pair = pairs[index];
|
|
134287
|
-
result
|
|
134287
|
+
baseAssignValue$1(result, pair[0], pair[1]);
|
|
134288
134288
|
}
|
|
134289
134289
|
return result;
|
|
134290
134290
|
}
|
|
@@ -134359,10 +134359,10 @@ function functionsIn$1(object) {
|
|
|
134359
134359
|
}
|
|
134360
134360
|
|
|
134361
134361
|
/** Used for built-in method references. */
|
|
134362
|
-
var objectProto$
|
|
134362
|
+
var objectProto$8$1 = Object.prototype;
|
|
134363
134363
|
|
|
134364
134364
|
/** Used to check objects for own properties. */
|
|
134365
|
-
var hasOwnProperty$
|
|
134365
|
+
var hasOwnProperty$7$1 = objectProto$8$1.hasOwnProperty;
|
|
134366
134366
|
|
|
134367
134367
|
/**
|
|
134368
134368
|
* Creates an object composed of keys generated from the results of running
|
|
@@ -134388,7 +134388,7 @@ var hasOwnProperty$6$1 = objectProto$7$1.hasOwnProperty;
|
|
|
134388
134388
|
* // => { '3': ['one', 'two'], '5': ['three'] }
|
|
134389
134389
|
*/
|
|
134390
134390
|
var groupBy$1 = createAggregator$1(function(result, value, key) {
|
|
134391
|
-
if (hasOwnProperty$
|
|
134391
|
+
if (hasOwnProperty$7$1.call(result, key)) {
|
|
134392
134392
|
result[key].push(value);
|
|
134393
134393
|
} else {
|
|
134394
134394
|
baseAssignValue$1(result, key, [value]);
|
|
@@ -134478,10 +134478,10 @@ var gte$1 = createRelationalOperation$1(function(value, other) {
|
|
|
134478
134478
|
});
|
|
134479
134479
|
|
|
134480
134480
|
/** Used for built-in method references. */
|
|
134481
|
-
var objectProto$
|
|
134481
|
+
var objectProto$7$1 = Object.prototype;
|
|
134482
134482
|
|
|
134483
134483
|
/** Used to check objects for own properties. */
|
|
134484
|
-
var hasOwnProperty$
|
|
134484
|
+
var hasOwnProperty$6$1 = objectProto$7$1.hasOwnProperty;
|
|
134485
134485
|
|
|
134486
134486
|
/**
|
|
134487
134487
|
* The base implementation of `_.has` without support for deep paths.
|
|
@@ -134492,7 +134492,7 @@ var hasOwnProperty$5$1 = objectProto$6$1.hasOwnProperty;
|
|
|
134492
134492
|
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
134493
134493
|
*/
|
|
134494
134494
|
function baseHas$1(object, key) {
|
|
134495
|
-
return object != null && hasOwnProperty$
|
|
134495
|
+
return object != null && hasOwnProperty$6$1.call(object, key);
|
|
134496
134496
|
}
|
|
134497
134497
|
|
|
134498
134498
|
/**
|
|
@@ -134972,14 +134972,14 @@ function createInverter$1(setter, toIteratee) {
|
|
|
134972
134972
|
}
|
|
134973
134973
|
|
|
134974
134974
|
/** Used for built-in method references. */
|
|
134975
|
-
var objectProto$
|
|
134975
|
+
var objectProto$6$1 = Object.prototype;
|
|
134976
134976
|
|
|
134977
134977
|
/**
|
|
134978
134978
|
* Used to resolve the
|
|
134979
134979
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
134980
134980
|
* of values.
|
|
134981
134981
|
*/
|
|
134982
|
-
var nativeObjectToString$1$1 = objectProto$
|
|
134982
|
+
var nativeObjectToString$1$1 = objectProto$6$1.toString;
|
|
134983
134983
|
|
|
134984
134984
|
/**
|
|
134985
134985
|
* Creates an object composed of the inverted keys and values of `object`.
|
|
@@ -135009,17 +135009,17 @@ var invert$1 = createInverter$1(function(result, value, key) {
|
|
|
135009
135009
|
}, constant$1(identity$2));
|
|
135010
135010
|
|
|
135011
135011
|
/** Used for built-in method references. */
|
|
135012
|
-
var objectProto$
|
|
135012
|
+
var objectProto$5$1 = Object.prototype;
|
|
135013
135013
|
|
|
135014
135014
|
/** Used to check objects for own properties. */
|
|
135015
|
-
var hasOwnProperty$
|
|
135015
|
+
var hasOwnProperty$5$1 = objectProto$5$1.hasOwnProperty;
|
|
135016
135016
|
|
|
135017
135017
|
/**
|
|
135018
135018
|
* Used to resolve the
|
|
135019
135019
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
135020
135020
|
* of values.
|
|
135021
135021
|
*/
|
|
135022
|
-
var nativeObjectToString$4 = objectProto$
|
|
135022
|
+
var nativeObjectToString$4 = objectProto$5$1.toString;
|
|
135023
135023
|
|
|
135024
135024
|
/**
|
|
135025
135025
|
* This method is like `_.invert` except that the inverted object is generated
|
|
@@ -135053,7 +135053,7 @@ var invertBy$1 = createInverter$1(function(result, value, key) {
|
|
|
135053
135053
|
value = nativeObjectToString$4.call(value);
|
|
135054
135054
|
}
|
|
135055
135055
|
|
|
135056
|
-
if (hasOwnProperty$
|
|
135056
|
+
if (hasOwnProperty$5$1.call(result, value)) {
|
|
135057
135057
|
result[value].push(key);
|
|
135058
135058
|
} else {
|
|
135059
135059
|
result[value] = [key];
|
|
@@ -135265,10 +135265,10 @@ var mapTag$2$1 = '[object Map]',
|
|
|
135265
135265
|
setTag$2$1 = '[object Set]';
|
|
135266
135266
|
|
|
135267
135267
|
/** Used for built-in method references. */
|
|
135268
|
-
var objectProto$
|
|
135268
|
+
var objectProto$4$1 = Object.prototype;
|
|
135269
135269
|
|
|
135270
135270
|
/** Used to check objects for own properties. */
|
|
135271
|
-
var hasOwnProperty$
|
|
135271
|
+
var hasOwnProperty$4$1 = objectProto$4$1.hasOwnProperty;
|
|
135272
135272
|
|
|
135273
135273
|
/**
|
|
135274
135274
|
* Checks if `value` is an empty object, collection, map, or set.
|
|
@@ -135320,7 +135320,7 @@ function isEmpty$1(value) {
|
|
|
135320
135320
|
return !baseKeys$1(value).length;
|
|
135321
135321
|
}
|
|
135322
135322
|
for (var key in value) {
|
|
135323
|
-
if (hasOwnProperty$
|
|
135323
|
+
if (hasOwnProperty$4$1.call(value, key)) {
|
|
135324
135324
|
return false;
|
|
135325
135325
|
}
|
|
135326
135326
|
}
|
|
@@ -136878,6 +136878,12 @@ function nthArg$1(n) {
|
|
|
136878
136878
|
});
|
|
136879
136879
|
}
|
|
136880
136880
|
|
|
136881
|
+
/** Used for built-in method references. */
|
|
136882
|
+
var objectProto$3$1 = Object.prototype;
|
|
136883
|
+
|
|
136884
|
+
/** Used to check objects for own properties. */
|
|
136885
|
+
var hasOwnProperty$3$1 = objectProto$3$1.hasOwnProperty;
|
|
136886
|
+
|
|
136881
136887
|
/**
|
|
136882
136888
|
* The base implementation of `_.unset`.
|
|
136883
136889
|
*
|
|
@@ -136888,8 +136894,34 @@ function nthArg$1(n) {
|
|
|
136888
136894
|
*/
|
|
136889
136895
|
function baseUnset$1(object, path) {
|
|
136890
136896
|
path = castPath$1(path, object);
|
|
136891
|
-
|
|
136892
|
-
|
|
136897
|
+
|
|
136898
|
+
// Prevent prototype pollution:
|
|
136899
|
+
// https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
|
|
136900
|
+
// https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh
|
|
136901
|
+
var index = -1,
|
|
136902
|
+
length = path.length;
|
|
136903
|
+
|
|
136904
|
+
if (!length) {
|
|
136905
|
+
return true;
|
|
136906
|
+
}
|
|
136907
|
+
|
|
136908
|
+
while (++index < length) {
|
|
136909
|
+
var key = toKey$1(path[index]);
|
|
136910
|
+
|
|
136911
|
+
// Always block "__proto__" anywhere in the path if it's not expected
|
|
136912
|
+
if (key === '__proto__' && !hasOwnProperty$3$1.call(object, '__proto__')) {
|
|
136913
|
+
return false;
|
|
136914
|
+
}
|
|
136915
|
+
|
|
136916
|
+
// Block constructor/prototype as non-terminal traversal keys to prevent
|
|
136917
|
+
// escaping the object graph into built-in constructors and prototypes.
|
|
136918
|
+
if ((key === 'constructor' || key === 'prototype') && index < length - 1) {
|
|
136919
|
+
return false;
|
|
136920
|
+
}
|
|
136921
|
+
}
|
|
136922
|
+
|
|
136923
|
+
var obj = parent$1$1(object, path);
|
|
136924
|
+
return obj == null || delete obj[toKey$1(last$1(path))];
|
|
136893
136925
|
}
|
|
136894
136926
|
|
|
136895
136927
|
/**
|
|
@@ -137212,7 +137244,7 @@ function baseOrderBy$1(collection, iteratees, orders) {
|
|
|
137212
137244
|
if (isArray$2(iteratee)) {
|
|
137213
137245
|
return function(value) {
|
|
137214
137246
|
return baseGet$1(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
137215
|
-
}
|
|
137247
|
+
};
|
|
137216
137248
|
}
|
|
137217
137249
|
return iteratee;
|
|
137218
137250
|
});
|
|
@@ -138224,6 +138256,8 @@ var nativeMin$5$1 = Math.min,
|
|
|
138224
138256
|
* **Note:** JavaScript follows the IEEE-754 standard for resolving
|
|
138225
138257
|
* floating-point values which can produce unexpected results.
|
|
138226
138258
|
*
|
|
138259
|
+
* **Note:** If `lower` is greater than `upper`, the values are swapped.
|
|
138260
|
+
*
|
|
138227
138261
|
* @static
|
|
138228
138262
|
* @memberOf _
|
|
138229
138263
|
* @since 0.7.0
|
|
@@ -138237,9 +138271,16 @@ var nativeMin$5$1 = Math.min,
|
|
|
138237
138271
|
* _.random(0, 5);
|
|
138238
138272
|
* // => an integer between 0 and 5
|
|
138239
138273
|
*
|
|
138274
|
+
* // when lower is greater than upper the values are swapped
|
|
138275
|
+
* _.random(5, 0);
|
|
138276
|
+
* // => an integer between 0 and 5
|
|
138277
|
+
*
|
|
138240
138278
|
* _.random(5);
|
|
138241
138279
|
* // => also an integer between 0 and 5
|
|
138242
138280
|
*
|
|
138281
|
+
* _.random(-5);
|
|
138282
|
+
* // => an integer between -5 and 0
|
|
138283
|
+
*
|
|
138243
138284
|
* _.random(5, true);
|
|
138244
138285
|
* // => a floating-point number between 0 and 5
|
|
138245
138286
|
*
|
|
@@ -140144,6 +140185,10 @@ var reEvaluate$1 = /<%([\s\S]+?)%>/g;
|
|
|
140144
140185
|
* embedded Ruby (ERB) as well as ES2015 template strings. Change the
|
|
140145
140186
|
* following template settings to use alternative delimiters.
|
|
140146
140187
|
*
|
|
140188
|
+
* **Security:** See
|
|
140189
|
+
* [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md)
|
|
140190
|
+
* — `_.template` is insecure and will be removed in v5.
|
|
140191
|
+
*
|
|
140147
140192
|
* @static
|
|
140148
140193
|
* @memberOf _
|
|
140149
140194
|
* @type {Object}
|
|
@@ -140201,7 +140246,8 @@ var templateSettings$1 = {
|
|
|
140201
140246
|
};
|
|
140202
140247
|
|
|
140203
140248
|
/** Error message constants. */
|
|
140204
|
-
var INVALID_TEMPL_VAR_ERROR_TEXT$1 = 'Invalid `variable` option passed into `_.template`'
|
|
140249
|
+
var INVALID_TEMPL_VAR_ERROR_TEXT$1 = 'Invalid `variable` option passed into `_.template`',
|
|
140250
|
+
INVALID_TEMPL_IMPORTS_ERROR_TEXT$1 = 'Invalid `imports` option passed into `_.template`';
|
|
140205
140251
|
|
|
140206
140252
|
/** Used to match empty string literals in compiled template source. */
|
|
140207
140253
|
var reEmptyStringLeading$1 = /\b__p \+= '';/g,
|
|
@@ -140245,6 +140291,10 @@ var hasOwnProperty$1$1 = objectProto$1$1.hasOwnProperty;
|
|
|
140245
140291
|
* properties may be accessed as free variables in the template. If a setting
|
|
140246
140292
|
* object is given, it takes precedence over `_.templateSettings` values.
|
|
140247
140293
|
*
|
|
140294
|
+
* **Security:** `_.template` is insecure and should not be used. It will be
|
|
140295
|
+
* removed in Lodash v5. Avoid untrusted input. See
|
|
140296
|
+
* [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md).
|
|
140297
|
+
*
|
|
140248
140298
|
* **Note:** In the development build `_.template` utilizes
|
|
140249
140299
|
* [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
|
|
140250
140300
|
* for easier debugging.
|
|
@@ -140352,12 +140402,18 @@ function template$2(string, options, guard) {
|
|
|
140352
140402
|
options = undefined;
|
|
140353
140403
|
}
|
|
140354
140404
|
string = toString$1(string);
|
|
140355
|
-
options =
|
|
140405
|
+
options = assignWith$1({}, options, settings, customDefaultsAssignIn$1);
|
|
140356
140406
|
|
|
140357
|
-
var imports =
|
|
140407
|
+
var imports = assignWith$1({}, options.imports, settings.imports, customDefaultsAssignIn$1),
|
|
140358
140408
|
importsKeys = keys$1(imports),
|
|
140359
140409
|
importsValues = baseValues$1(imports, importsKeys);
|
|
140360
140410
|
|
|
140411
|
+
arrayEach$1(importsKeys, function(key) {
|
|
140412
|
+
if (reForbiddenIdentifierChars$1.test(key)) {
|
|
140413
|
+
throw new Error(INVALID_TEMPL_IMPORTS_ERROR_TEXT$1);
|
|
140414
|
+
}
|
|
140415
|
+
});
|
|
140416
|
+
|
|
140361
140417
|
var isEscaping,
|
|
140362
140418
|
isEvaluating,
|
|
140363
140419
|
index = 0,
|
|
@@ -142223,7 +142279,7 @@ function lazyValue$1() {
|
|
|
142223
142279
|
/**
|
|
142224
142280
|
* @license
|
|
142225
142281
|
* Lodash (Custom Build) <https://lodash.com/>
|
|
142226
|
-
* Build: `lodash modularize exports="es" -o ./`
|
|
142282
|
+
* Build: `lodash modularize exports="es" --repo lodash/lodash#4.18.1 -o ./`
|
|
142227
142283
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
142228
142284
|
* Released under MIT license <https://lodash.com/license>
|
|
142229
142285
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
@@ -142231,7 +142287,7 @@ function lazyValue$1() {
|
|
|
142231
142287
|
*/
|
|
142232
142288
|
|
|
142233
142289
|
/** Used as the semantic version number. */
|
|
142234
|
-
var VERSION$3 = '4.
|
|
142290
|
+
var VERSION$3 = '4.18.1';
|
|
142235
142291
|
|
|
142236
142292
|
/** Used to compose bitmasks for function metadata. */
|
|
142237
142293
|
var WRAP_BIND_KEY_FLAG$6 = 2;
|
|
@@ -142245,10 +142301,10 @@ var MAX_ARRAY_LENGTH$7 = 4294967295;
|
|
|
142245
142301
|
|
|
142246
142302
|
/** Used for built-in method references. */
|
|
142247
142303
|
var arrayProto$6 = Array.prototype,
|
|
142248
|
-
objectProto$
|
|
142304
|
+
objectProto$u = Object.prototype;
|
|
142249
142305
|
|
|
142250
142306
|
/** Used to check objects for own properties. */
|
|
142251
|
-
var hasOwnProperty$
|
|
142307
|
+
var hasOwnProperty$q = objectProto$u.hasOwnProperty;
|
|
142252
142308
|
|
|
142253
142309
|
/** Built-in value references. */
|
|
142254
142310
|
var symIterator$2 = Symbol$1$1 ? Symbol$1$1.iterator : undefined;
|
|
@@ -142592,7 +142648,7 @@ lodash$1.first = array$1.head;
|
|
|
142592
142648
|
mixin$2(lodash$1, (function() {
|
|
142593
142649
|
var source = {};
|
|
142594
142650
|
baseForOwn$1(lodash$1, function(func, methodName) {
|
|
142595
|
-
if (!hasOwnProperty$
|
|
142651
|
+
if (!hasOwnProperty$q.call(lodash$1.prototype, methodName)) {
|
|
142596
142652
|
source[methodName] = func;
|
|
142597
142653
|
}
|
|
142598
142654
|
});
|
|
@@ -142793,7 +142849,7 @@ baseForOwn$1(LazyWrapper$1.prototype, function(func, methodName) {
|
|
|
142793
142849
|
var lodashFunc = lodash$1[methodName];
|
|
142794
142850
|
if (lodashFunc) {
|
|
142795
142851
|
var key = lodashFunc.name + '';
|
|
142796
|
-
if (!hasOwnProperty$
|
|
142852
|
+
if (!hasOwnProperty$q.call(realNames$1, key)) {
|
|
142797
142853
|
realNames$1[key] = [];
|
|
142798
142854
|
}
|
|
142799
142855
|
realNames$1[key].push({ 'name': methodName, 'func': lodashFunc });
|
|
@@ -143166,14 +143222,14 @@ function requireDom$1 () {
|
|
|
143166
143222
|
ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
|
|
143167
143223
|
var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
|
|
143168
143224
|
ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
|
|
143169
|
-
ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
|
|
143225
|
+
var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
|
|
143170
143226
|
ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
|
|
143171
143227
|
ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
|
|
143172
143228
|
var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
|
|
143173
143229
|
ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
|
|
143174
143230
|
var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
|
|
143175
143231
|
//level2
|
|
143176
|
-
ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
|
|
143232
|
+
var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
|
|
143177
143233
|
ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
|
|
143178
143234
|
ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
|
|
143179
143235
|
ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
|
|
@@ -143223,9 +143279,10 @@ function requireDom$1 () {
|
|
|
143223
143279
|
item: function(index) {
|
|
143224
143280
|
return index >= 0 && index < this.length ? this[index] : null;
|
|
143225
143281
|
},
|
|
143226
|
-
toString:function(isHTML,nodeFilter){
|
|
143282
|
+
toString:function(isHTML,nodeFilter,options){
|
|
143283
|
+
var requireWellFormed = !!options && !!options.requireWellFormed;
|
|
143227
143284
|
for(var buf = [], i = 0;i<this.length;i++){
|
|
143228
|
-
serializeToString(this[i],buf,isHTML,nodeFilter);
|
|
143285
|
+
serializeToString(this[i],buf,isHTML,nodeFilter,null,requireWellFormed);
|
|
143229
143286
|
}
|
|
143230
143287
|
return buf.join('');
|
|
143231
143288
|
},
|
|
@@ -143470,13 +143527,28 @@ function requireDom$1 () {
|
|
|
143470
143527
|
/**
|
|
143471
143528
|
* Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.
|
|
143472
143529
|
*
|
|
143473
|
-
* __This
|
|
143530
|
+
* __This implementation differs from the specification:__
|
|
143474
143531
|
* - this implementation is not validating names or qualified names
|
|
143475
143532
|
* (when parsing XML strings, the SAX parser takes care of that)
|
|
143476
143533
|
*
|
|
143534
|
+
* Note: `internalSubset` can only be introduced via a direct property write to `node.internalSubset` after creation.
|
|
143535
|
+
* Creation-time validation of `publicId`, `systemId` is not enforced.
|
|
143536
|
+
* The serializer-level check covers all mutation vectors, including direct property writes.
|
|
143537
|
+
* `internalSubset` is only serialized as `[ ... ]` when both `publicId` and `systemId` are
|
|
143538
|
+
* absent (empty or `'.'`) — if either external identifier is present, `internalSubset` is
|
|
143539
|
+
* silently omitted from the serialized output.
|
|
143540
|
+
*
|
|
143477
143541
|
* @param {string} qualifiedName
|
|
143478
143542
|
* @param {string} [publicId]
|
|
143543
|
+
* The external subset public identifier. Stored verbatim including surrounding quotes.
|
|
143544
|
+
* When serialized with `requireWellFormed: true` (via the 4th-parameter options object),
|
|
143545
|
+
* throws `DOMException` with code `INVALID_STATE_ERR` if the value is non-empty and does
|
|
143546
|
+
* not match the XML `PubidLiteral` production (W3C DOM Parsing §3.2.1.3; XML 1.0 [12]).
|
|
143479
143547
|
* @param {string} [systemId]
|
|
143548
|
+
* The external subset system identifier. Stored verbatim including surrounding quotes.
|
|
143549
|
+
* When serialized with `requireWellFormed: true`, throws `DOMException` with code
|
|
143550
|
+
* `INVALID_STATE_ERR` if the value is non-empty and does not match the XML `SystemLiteral`
|
|
143551
|
+
* production (W3C DOM Parsing §3.2.1.3; XML 1.0 [11]).
|
|
143480
143552
|
* @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation
|
|
143481
143553
|
* or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`
|
|
143482
143554
|
*
|
|
@@ -143542,18 +143614,44 @@ function requireDom$1 () {
|
|
|
143542
143614
|
return cloneNode(this.ownerDocument||this,this,deep);
|
|
143543
143615
|
},
|
|
143544
143616
|
// Modified in DOM Level 2:
|
|
143545
|
-
|
|
143546
|
-
|
|
143547
|
-
|
|
143548
|
-
|
|
143549
|
-
|
|
143550
|
-
|
|
143551
|
-
|
|
143552
|
-
|
|
143553
|
-
|
|
143554
|
-
|
|
143555
|
-
|
|
143556
|
-
|
|
143617
|
+
/**
|
|
143618
|
+
* Puts the specified node and all of its subtree into a "normalized" form. In a normalized
|
|
143619
|
+
* subtree, no text nodes in the subtree are empty and there are no adjacent text nodes.
|
|
143620
|
+
*
|
|
143621
|
+
* Specifically, this method merges any adjacent text nodes (i.e., nodes for which `nodeType`
|
|
143622
|
+
* is `TEXT_NODE`) into a single node with the combined data. It also removes any empty text
|
|
143623
|
+
* nodes.
|
|
143624
|
+
*
|
|
143625
|
+
* This method iteratively traverses all child nodes to normalize all descendant nodes within
|
|
143626
|
+
* the subtree.
|
|
143627
|
+
*
|
|
143628
|
+
* @throws {DOMException}
|
|
143629
|
+
* May throw a DOMException if operations within removeChild or appendData (which are
|
|
143630
|
+
* potentially invoked in this method) do not meet their specific constraints.
|
|
143631
|
+
* @see {@link Node.removeChild}
|
|
143632
|
+
* @see {@link CharacterData.appendData}
|
|
143633
|
+
* @see ../docs/walk-dom.md.
|
|
143634
|
+
*/
|
|
143635
|
+
normalize: function () {
|
|
143636
|
+
walkDOM(this, null, {
|
|
143637
|
+
enter: function (node) {
|
|
143638
|
+
// Merge adjacent text children of node before walkDOM schedules them.
|
|
143639
|
+
// walkDOM reads lastChild/previousSibling after enter returns, so the
|
|
143640
|
+
// surviving post-merge children are what it descends into.
|
|
143641
|
+
var child = node.firstChild;
|
|
143642
|
+
while (child) {
|
|
143643
|
+
var next = child.nextSibling;
|
|
143644
|
+
if (next !== null && next.nodeType === TEXT_NODE && child.nodeType === TEXT_NODE) {
|
|
143645
|
+
node.removeChild(next);
|
|
143646
|
+
child.appendData(next.data);
|
|
143647
|
+
// Do not advance child: re-check new nextSibling for another text run
|
|
143648
|
+
} else {
|
|
143649
|
+
child = next;
|
|
143650
|
+
}
|
|
143651
|
+
}
|
|
143652
|
+
return true; // descend into surviving children
|
|
143653
|
+
},
|
|
143654
|
+
});
|
|
143557
143655
|
},
|
|
143558
143656
|
// Introduced in DOM Level 2:
|
|
143559
143657
|
isSupported:function(feature, version){
|
|
@@ -143629,21 +143727,103 @@ function requireDom$1 () {
|
|
|
143629
143727
|
copy(NodeType,Node.prototype);
|
|
143630
143728
|
|
|
143631
143729
|
/**
|
|
143632
|
-
* @param
|
|
143633
|
-
*
|
|
143730
|
+
* @param {Node} node
|
|
143731
|
+
* Root of the subtree to visit.
|
|
143732
|
+
* @param {function(Node): boolean} callback
|
|
143733
|
+
* Called for each node in depth-first pre-order. Return a truthy value to stop traversal early.
|
|
143734
|
+
* @return {boolean} `true` if traversal was aborted by the callback, `false` otherwise.
|
|
143634
143735
|
*/
|
|
143635
|
-
function _visitNode(node,callback){
|
|
143636
|
-
|
|
143637
|
-
return true;
|
|
143638
|
-
}
|
|
143639
|
-
if(node = node.firstChild){
|
|
143640
|
-
do{
|
|
143641
|
-
if(_visitNode(node,callback)){return true}
|
|
143642
|
-
}while(node=node.nextSibling)
|
|
143643
|
-
}
|
|
143736
|
+
function _visitNode(node, callback) {
|
|
143737
|
+
return walkDOM(node, null, { enter: function (n) { return callback(n) ? walkDOM.STOP : true; } }) === walkDOM.STOP;
|
|
143644
143738
|
}
|
|
143645
143739
|
|
|
143740
|
+
/**
|
|
143741
|
+
* Depth-first pre/post-order DOM tree walker.
|
|
143742
|
+
*
|
|
143743
|
+
* Visits every node in the subtree rooted at `node`. For each node:
|
|
143744
|
+
*
|
|
143745
|
+
* 1. Calls `callbacks.enter(node, context)` before descending into the node's children. The
|
|
143746
|
+
* return value becomes the `context` passed to each child's `enter` call and to the matching
|
|
143747
|
+
* `exit` call.
|
|
143748
|
+
* 2. If `enter` returns `null` or `undefined`, the node's children are skipped;
|
|
143749
|
+
* sibling traversal continues normally.
|
|
143750
|
+
* 3. If `enter` returns `walkDOM.STOP`, the entire traversal is aborted immediately — no
|
|
143751
|
+
* further `enter` or `exit` calls are made.
|
|
143752
|
+
* 4. `lastChild` and `previousSibling` are read **after** `enter` returns, so `enter` may
|
|
143753
|
+
* safely modify the node's own child list before the walker descends. Modifying siblings of
|
|
143754
|
+
* the current node or any other part of the tree produces unpredictable results: nodes already
|
|
143755
|
+
* queued on the stack are visited regardless of DOM changes, and newly inserted nodes outside
|
|
143756
|
+
* the current child list are never visited.
|
|
143757
|
+
* 5. Calls `callbacks.exit(node, context)` (if provided) after all of a node's children have
|
|
143758
|
+
* been visited, passing the same `context` that `enter`
|
|
143759
|
+
* returned for that node.
|
|
143760
|
+
*
|
|
143761
|
+
* This implementation uses an explicit stack and does not recurse — it is safe on arbitrarily
|
|
143762
|
+
* deep trees.
|
|
143763
|
+
*
|
|
143764
|
+
* @param {Node} node
|
|
143765
|
+
* Root of the subtree to walk.
|
|
143766
|
+
* @param {*} context
|
|
143767
|
+
* Initial context value passed to the root node's `enter`.
|
|
143768
|
+
* @param {{ enter: function(Node, *): *, exit?: function(Node, *): void }} callbacks
|
|
143769
|
+
* @returns {void | walkDOM.STOP}
|
|
143770
|
+
* @see ../docs/walk-dom.md.
|
|
143771
|
+
*/
|
|
143772
|
+
function walkDOM(node, context, callbacks) {
|
|
143773
|
+
// Each stack frame is {node, context, phase}:
|
|
143774
|
+
// walkDOM.ENTER — call enter, then push children
|
|
143775
|
+
// walkDOM.EXIT — call exit
|
|
143776
|
+
var stack = [{ node: node, context: context, phase: walkDOM.ENTER }];
|
|
143777
|
+
while (stack.length > 0) {
|
|
143778
|
+
var frame = stack.pop();
|
|
143779
|
+
if (frame.phase === walkDOM.ENTER) {
|
|
143780
|
+
var childContext = callbacks.enter(frame.node, frame.context);
|
|
143781
|
+
if (childContext === walkDOM.STOP) {
|
|
143782
|
+
return walkDOM.STOP;
|
|
143783
|
+
}
|
|
143784
|
+
// Push exit frame before children so it fires after all children are processed (Last In First Out)
|
|
143785
|
+
stack.push({ node: frame.node, context: childContext, phase: walkDOM.EXIT });
|
|
143786
|
+
if (childContext === null || childContext === undefined) {
|
|
143787
|
+
continue; // skip children
|
|
143788
|
+
}
|
|
143789
|
+
// lastChild is read after enter returns, so enter may modify the child list.
|
|
143790
|
+
var child = frame.node.lastChild;
|
|
143791
|
+
// Traverse from lastChild backwards so that pushing onto the stack
|
|
143792
|
+
// naturally yields firstChild on top (processed first).
|
|
143793
|
+
while (child) {
|
|
143794
|
+
stack.push({ node: child, context: childContext, phase: walkDOM.ENTER });
|
|
143795
|
+
child = child.previousSibling;
|
|
143796
|
+
}
|
|
143797
|
+
} else {
|
|
143798
|
+
// frame.phase === walkDOM.EXIT
|
|
143799
|
+
if (callbacks.exit) {
|
|
143800
|
+
callbacks.exit(frame.node, frame.context);
|
|
143801
|
+
}
|
|
143802
|
+
}
|
|
143803
|
+
}
|
|
143804
|
+
}
|
|
143646
143805
|
|
|
143806
|
+
/**
|
|
143807
|
+
* Sentinel value returned from a `walkDOM` `enter` callback to abort the entire traversal
|
|
143808
|
+
* immediately.
|
|
143809
|
+
*
|
|
143810
|
+
* @type {symbol}
|
|
143811
|
+
*/
|
|
143812
|
+
walkDOM.STOP = Symbol('walkDOM.STOP');
|
|
143813
|
+
/**
|
|
143814
|
+
* Phase constant for a stack frame that has not yet been visited.
|
|
143815
|
+
* The `enter` callback is called and children are scheduled.
|
|
143816
|
+
*
|
|
143817
|
+
* @type {number}
|
|
143818
|
+
*/
|
|
143819
|
+
walkDOM.ENTER = 0;
|
|
143820
|
+
/**
|
|
143821
|
+
* Phase constant for a stack frame whose subtree has been fully visited.
|
|
143822
|
+
* The `exit` callback is called.
|
|
143823
|
+
*
|
|
143824
|
+
* @type {number}
|
|
143825
|
+
*/
|
|
143826
|
+
walkDOM.EXIT = 1;
|
|
143647
143827
|
|
|
143648
143828
|
function Document(){
|
|
143649
143829
|
this.ownerDocument = this;
|
|
@@ -144247,12 +144427,44 @@ function requireDom$1 () {
|
|
|
144247
144427
|
node.appendData(data);
|
|
144248
144428
|
return node;
|
|
144249
144429
|
},
|
|
144430
|
+
/**
|
|
144431
|
+
* Returns a new CDATASection node whose data is `data`.
|
|
144432
|
+
*
|
|
144433
|
+
* __This implementation differs from the specification:__
|
|
144434
|
+
* - calling this method on an HTML document does not throw `NotSupportedError`.
|
|
144435
|
+
*
|
|
144436
|
+
* @param {string} data
|
|
144437
|
+
* @returns {CDATASection}
|
|
144438
|
+
* @throws DOMException with code `INVALID_CHARACTER_ERR` if `data` contains `"]]>"`.
|
|
144439
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createCDATASection
|
|
144440
|
+
* @see https://dom.spec.whatwg.org/#dom-document-createcdatasection
|
|
144441
|
+
*/
|
|
144250
144442
|
createCDATASection : function(data){
|
|
144443
|
+
if (data.indexOf(']]>') !== -1) {
|
|
144444
|
+
throw new DOMException(INVALID_CHARACTER_ERR, 'data contains "]]>"');
|
|
144445
|
+
}
|
|
144251
144446
|
var node = new CDATASection();
|
|
144252
144447
|
node.ownerDocument = this;
|
|
144253
144448
|
node.appendData(data);
|
|
144254
144449
|
return node;
|
|
144255
144450
|
},
|
|
144451
|
+
/**
|
|
144452
|
+
* Returns a ProcessingInstruction node whose target is target and data is data.
|
|
144453
|
+
*
|
|
144454
|
+
* __This implementation differs from the specification:__
|
|
144455
|
+
* - it does not do any input validation on the arguments and doesn't throw "InvalidCharacterError".
|
|
144456
|
+
*
|
|
144457
|
+
* Note: When the resulting document is serialized with `requireWellFormed: true`, the
|
|
144458
|
+
* serializer throws with code `INVALID_STATE_ERR` if `.data` contains `?>` (W3C DOM Parsing
|
|
144459
|
+
* §3.2.1.7). Without that option the data is emitted verbatim.
|
|
144460
|
+
*
|
|
144461
|
+
* @param {string} target
|
|
144462
|
+
* @param {string} data
|
|
144463
|
+
* @returns {ProcessingInstruction}
|
|
144464
|
+
* @see https://developer.mozilla.org/docs/Web/API/Document/createProcessingInstruction
|
|
144465
|
+
* @see https://dom.spec.whatwg.org/#dom-document-createprocessinginstruction
|
|
144466
|
+
* @see https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml §3.2.1.7
|
|
144467
|
+
*/
|
|
144256
144468
|
createProcessingInstruction : function(target,data){
|
|
144257
144469
|
var node = new ProcessingInstruction();
|
|
144258
144470
|
node.ownerDocument = this;
|
|
@@ -144478,6 +144690,19 @@ function requireDom$1 () {
|
|
|
144478
144690
|
_extends(CDATASection,CharacterData);
|
|
144479
144691
|
|
|
144480
144692
|
|
|
144693
|
+
/**
|
|
144694
|
+
* Represents a DocumentType node (the `<!DOCTYPE ...>` declaration).
|
|
144695
|
+
*
|
|
144696
|
+
* `publicId`, `systemId`, and `internalSubset` are plain own-property assignments.
|
|
144697
|
+
* xmldom does not enforce the `readonly` constraint declared by the WHATWG DOM spec —
|
|
144698
|
+
* direct property writes succeed silently. Values are serialized verbatim when
|
|
144699
|
+
* `requireWellFormed` is false (the default). When the serializer is invoked with
|
|
144700
|
+
* `requireWellFormed: true` (via the 4th-parameter options object), it validates each
|
|
144701
|
+
* field and throws `DOMException` with code `INVALID_STATE_ERR` on invalid values.
|
|
144702
|
+
*
|
|
144703
|
+
* @class
|
|
144704
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/DocumentType MDN
|
|
144705
|
+
*/
|
|
144481
144706
|
function DocumentType() {
|
|
144482
144707
|
} DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
|
|
144483
144708
|
_extends(DocumentType,Node);
|
|
@@ -144505,11 +144730,48 @@ function requireDom$1 () {
|
|
|
144505
144730
|
ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
|
|
144506
144731
|
_extends(ProcessingInstruction,Node);
|
|
144507
144732
|
function XMLSerializer(){}
|
|
144508
|
-
|
|
144509
|
-
|
|
144733
|
+
/**
|
|
144734
|
+
* Returns the result of serializing `node` to XML.
|
|
144735
|
+
*
|
|
144736
|
+
* When `options.requireWellFormed` is `true`, the serializer throws for content that would
|
|
144737
|
+
* produce ill-formed XML.
|
|
144738
|
+
*
|
|
144739
|
+
* __This implementation differs from the specification:__
|
|
144740
|
+
* - CDATASection nodes whose data contains `]]>` are serialized by splitting the section
|
|
144741
|
+
* at each `]]>` occurrence (following W3C DOM Level 3 Core `split-cdata-sections`
|
|
144742
|
+
* default behaviour) unless `requireWellFormed` is `true`.
|
|
144743
|
+
* - when `requireWellFormed` is `true`, `DOMException` with code `INVALID_STATE_ERR`
|
|
144744
|
+
* is only thrown to prevent injection vectors, not for all the spec mandated checks.
|
|
144745
|
+
*
|
|
144746
|
+
* @param {Node} node
|
|
144747
|
+
* @param {boolean} [isHtml]
|
|
144748
|
+
* @param {function} [nodeFilter]
|
|
144749
|
+
* @param {Object} [options]
|
|
144750
|
+
* @param {boolean} [options.requireWellFormed=false]
|
|
144751
|
+
* When `true`, throws for content that would produce ill-formed XML.
|
|
144752
|
+
* @returns {string}
|
|
144753
|
+
* @throws {DOMException}
|
|
144754
|
+
* With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
|
|
144755
|
+
* - a CDATASection node's data contains `"]]>"`,
|
|
144756
|
+
* - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
|
|
144757
|
+
* - a ProcessingInstruction's data contains `"?>"`,
|
|
144758
|
+
* - a DocumentType's `publicId` is non-empty and does not match the XML `PubidLiteral`
|
|
144759
|
+
* production,
|
|
144760
|
+
* - a DocumentType's `systemId` is non-empty and does not match the XML `SystemLiteral`
|
|
144761
|
+
* production, or
|
|
144762
|
+
* - a DocumentType's `internalSubset` contains `"]>"`.
|
|
144763
|
+
* Note: xmldom does not enforce `readonly` on DocumentType fields — direct property
|
|
144764
|
+
* writes succeed and are covered by the serializer-level checks above.
|
|
144765
|
+
* @see https://html.spec.whatwg.org/#dom-xmlserializer-serializetostring
|
|
144766
|
+
* @see https://w3c.github.io/DOM-Parsing/#xml-serialization
|
|
144767
|
+
* @see https://github.com/w3c/DOM-Parsing/issues/84
|
|
144768
|
+
*/
|
|
144769
|
+
XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter,options){
|
|
144770
|
+
return nodeSerializeToString.call(node,isHtml,nodeFilter,options);
|
|
144510
144771
|
};
|
|
144511
144772
|
Node.prototype.toString = nodeSerializeToString;
|
|
144512
|
-
function nodeSerializeToString(isHtml,nodeFilter){
|
|
144773
|
+
function nodeSerializeToString(isHtml,nodeFilter,options){
|
|
144774
|
+
var requireWellFormed = !!options && !!options.requireWellFormed;
|
|
144513
144775
|
var buf = [];
|
|
144514
144776
|
var refNode = this.nodeType == 9 && this.documentElement || this;
|
|
144515
144777
|
var prefix = refNode.prefix;
|
|
@@ -144526,7 +144788,7 @@ function requireDom$1 () {
|
|
|
144526
144788
|
];
|
|
144527
144789
|
}
|
|
144528
144790
|
}
|
|
144529
|
-
serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);
|
|
144791
|
+
serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces,requireWellFormed);
|
|
144530
144792
|
//console.log('###',this.nodeType,uri,prefix,buf.join(''))
|
|
144531
144793
|
return buf.join('');
|
|
144532
144794
|
}
|
|
@@ -144575,271 +144837,323 @@ function requireDom$1 () {
|
|
|
144575
144837
|
buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
|
|
144576
144838
|
}
|
|
144577
144839
|
|
|
144578
|
-
function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
|
|
144840
|
+
function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces, requireWellFormed) {
|
|
144579
144841
|
if (!visibleNamespaces) {
|
|
144580
144842
|
visibleNamespaces = [];
|
|
144581
144843
|
}
|
|
144582
|
-
|
|
144583
|
-
|
|
144584
|
-
|
|
144585
|
-
|
|
144586
|
-
|
|
144587
|
-
|
|
144588
|
-
|
|
144589
|
-
|
|
144590
|
-
|
|
144591
|
-
|
|
144592
|
-
|
|
144593
|
-
//buf.sort.apply(attrs, attributeSorter);
|
|
144594
|
-
}
|
|
144595
|
-
|
|
144596
|
-
switch(node.nodeType){
|
|
144597
|
-
case ELEMENT_NODE:
|
|
144598
|
-
var attrs = node.attributes;
|
|
144599
|
-
var len = attrs.length;
|
|
144600
|
-
var child = node.firstChild;
|
|
144601
|
-
var nodeName = node.tagName;
|
|
144602
|
-
|
|
144603
|
-
isHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML;
|
|
144604
|
-
|
|
144605
|
-
var prefixedNodeName = nodeName;
|
|
144606
|
-
if (!isHTML && !node.prefix && node.namespaceURI) {
|
|
144607
|
-
var defaultNS;
|
|
144608
|
-
// lookup current default ns from `xmlns` attribute
|
|
144609
|
-
for (var ai = 0; ai < attrs.length; ai++) {
|
|
144610
|
-
if (attrs.item(ai).name === 'xmlns') {
|
|
144611
|
-
defaultNS = attrs.item(ai).value;
|
|
144612
|
-
break
|
|
144613
|
-
}
|
|
144614
|
-
}
|
|
144615
|
-
if (!defaultNS) {
|
|
144616
|
-
// lookup current default ns in visibleNamespaces
|
|
144617
|
-
for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {
|
|
144618
|
-
var namespace = visibleNamespaces[nsi];
|
|
144619
|
-
if (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {
|
|
144620
|
-
defaultNS = namespace.namespace;
|
|
144621
|
-
break
|
|
144844
|
+
walkDOM(node, { ns: visibleNamespaces, isHTML: isHTML }, {
|
|
144845
|
+
enter: function (n, ctx) {
|
|
144846
|
+
var ns = ctx.ns;
|
|
144847
|
+
var html = ctx.isHTML;
|
|
144848
|
+
|
|
144849
|
+
if (nodeFilter) {
|
|
144850
|
+
n = nodeFilter(n);
|
|
144851
|
+
if (n) {
|
|
144852
|
+
if (typeof n == 'string') {
|
|
144853
|
+
buf.push(n);
|
|
144854
|
+
return null;
|
|
144622
144855
|
}
|
|
144856
|
+
} else {
|
|
144857
|
+
return null;
|
|
144623
144858
|
}
|
|
144624
144859
|
}
|
|
144625
|
-
|
|
144626
|
-
|
|
144627
|
-
|
|
144628
|
-
|
|
144629
|
-
|
|
144630
|
-
|
|
144860
|
+
|
|
144861
|
+
switch (n.nodeType) {
|
|
144862
|
+
case ELEMENT_NODE:
|
|
144863
|
+
var attrs = n.attributes;
|
|
144864
|
+
var len = attrs.length;
|
|
144865
|
+
var nodeName = n.tagName;
|
|
144866
|
+
|
|
144867
|
+
html = NAMESPACE.isHTML(n.namespaceURI) || html;
|
|
144868
|
+
|
|
144869
|
+
var prefixedNodeName = nodeName;
|
|
144870
|
+
if (!html && !n.prefix && n.namespaceURI) {
|
|
144871
|
+
var defaultNS;
|
|
144872
|
+
// lookup current default ns from `xmlns` attribute
|
|
144873
|
+
for (var ai = 0; ai < attrs.length; ai++) {
|
|
144874
|
+
if (attrs.item(ai).name === 'xmlns') {
|
|
144875
|
+
defaultNS = attrs.item(ai).value;
|
|
144876
|
+
break;
|
|
144877
|
+
}
|
|
144878
|
+
}
|
|
144879
|
+
if (!defaultNS) {
|
|
144880
|
+
// lookup current default ns in visibleNamespaces
|
|
144881
|
+
for (var nsi = ns.length - 1; nsi >= 0; nsi--) {
|
|
144882
|
+
var nsEntry = ns[nsi];
|
|
144883
|
+
if (nsEntry.prefix === '' && nsEntry.namespace === n.namespaceURI) {
|
|
144884
|
+
defaultNS = nsEntry.namespace;
|
|
144885
|
+
break;
|
|
144886
|
+
}
|
|
144887
|
+
}
|
|
144888
|
+
}
|
|
144889
|
+
if (defaultNS !== n.namespaceURI) {
|
|
144890
|
+
for (var nsi = ns.length - 1; nsi >= 0; nsi--) {
|
|
144891
|
+
var nsEntry = ns[nsi];
|
|
144892
|
+
if (nsEntry.namespace === n.namespaceURI) {
|
|
144893
|
+
if (nsEntry.prefix) {
|
|
144894
|
+
prefixedNodeName = nsEntry.prefix + ':' + nodeName;
|
|
144895
|
+
}
|
|
144896
|
+
break;
|
|
144897
|
+
}
|
|
144898
|
+
}
|
|
144631
144899
|
}
|
|
144632
|
-
break
|
|
144633
144900
|
}
|
|
144634
|
-
}
|
|
144635
|
-
}
|
|
144636
|
-
}
|
|
144637
144901
|
|
|
144638
|
-
|
|
144902
|
+
buf.push('<', prefixedNodeName);
|
|
144903
|
+
|
|
144904
|
+
// Build a fresh namespace snapshot for this element's children.
|
|
144905
|
+
// The slice prevents sibling elements from inheriting each other's declarations.
|
|
144906
|
+
var childNs = ns.slice();
|
|
144907
|
+
for (var i = 0; i < len; i++) {
|
|
144908
|
+
var attr = attrs.item(i);
|
|
144909
|
+
if (attr.prefix == 'xmlns') {
|
|
144910
|
+
childNs.push({ prefix: attr.localName, namespace: attr.value });
|
|
144911
|
+
} else if (attr.nodeName == 'xmlns') {
|
|
144912
|
+
childNs.push({ prefix: '', namespace: attr.value });
|
|
144913
|
+
}
|
|
144914
|
+
}
|
|
144639
144915
|
|
|
144640
|
-
|
|
144641
|
-
|
|
144642
|
-
|
|
144643
|
-
|
|
144644
|
-
|
|
144645
|
-
|
|
144646
|
-
|
|
144647
|
-
|
|
144648
|
-
|
|
144916
|
+
for (var i = 0; i < len; i++) {
|
|
144917
|
+
var attr = attrs.item(i);
|
|
144918
|
+
if (needNamespaceDefine(attr, html, childNs)) {
|
|
144919
|
+
var attrPrefix = attr.prefix || '';
|
|
144920
|
+
var uri = attr.namespaceURI;
|
|
144921
|
+
addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri);
|
|
144922
|
+
childNs.push({ prefix: attrPrefix, namespace: uri });
|
|
144923
|
+
}
|
|
144924
|
+
// Apply nodeFilter and serialize the attribute.
|
|
144925
|
+
var filteredAttr = nodeFilter ? nodeFilter(attr) : attr;
|
|
144926
|
+
if (filteredAttr) {
|
|
144927
|
+
if (typeof filteredAttr === 'string') {
|
|
144928
|
+
buf.push(filteredAttr);
|
|
144929
|
+
} else {
|
|
144930
|
+
addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
|
|
144931
|
+
}
|
|
144932
|
+
}
|
|
144933
|
+
}
|
|
144649
144934
|
|
|
144650
|
-
|
|
144651
|
-
|
|
144652
|
-
|
|
144653
|
-
|
|
144654
|
-
|
|
144655
|
-
|
|
144656
|
-
|
|
144657
|
-
}
|
|
144658
|
-
serializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);
|
|
144659
|
-
}
|
|
144935
|
+
// add namespace for current node
|
|
144936
|
+
if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
|
|
144937
|
+
var nodePrefix = n.prefix || '';
|
|
144938
|
+
var uri = n.namespaceURI;
|
|
144939
|
+
addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri);
|
|
144940
|
+
childNs.push({ prefix: nodePrefix, namespace: uri });
|
|
144941
|
+
}
|
|
144660
144942
|
|
|
144661
|
-
|
|
144662
|
-
|
|
144663
|
-
|
|
144664
|
-
|
|
144665
|
-
|
|
144666
|
-
|
|
144667
|
-
|
|
144943
|
+
var child = n.firstChild;
|
|
144944
|
+
if (child || html && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) {
|
|
144945
|
+
buf.push('>');
|
|
144946
|
+
if (html && /^script$/i.test(nodeName)) {
|
|
144947
|
+
// Inline serialization for <script> children; return null to skip walkDOM descent.
|
|
144948
|
+
while (child) {
|
|
144949
|
+
if (child.data) {
|
|
144950
|
+
buf.push(child.data);
|
|
144951
|
+
} else {
|
|
144952
|
+
serializeToString(child, buf, html, nodeFilter, childNs.slice(), requireWellFormed);
|
|
144953
|
+
}
|
|
144954
|
+
child = child.nextSibling;
|
|
144955
|
+
}
|
|
144956
|
+
buf.push('</', nodeName, '>');
|
|
144957
|
+
return null;
|
|
144958
|
+
}
|
|
144959
|
+
// Return child context; walkDOM descends and exit emits the closing tag.
|
|
144960
|
+
return { ns: childNs, isHTML: html, tag: prefixedNodeName };
|
|
144961
|
+
} else {
|
|
144962
|
+
buf.push('/>');
|
|
144963
|
+
return null;
|
|
144964
|
+
}
|
|
144668
144965
|
|
|
144669
|
-
|
|
144670
|
-
|
|
144671
|
-
|
|
144672
|
-
|
|
144673
|
-
|
|
144674
|
-
|
|
144675
|
-
|
|
144676
|
-
|
|
144677
|
-
|
|
144966
|
+
case DOCUMENT_NODE:
|
|
144967
|
+
case DOCUMENT_FRAGMENT_NODE:
|
|
144968
|
+
// Descend into children; exit is a no-op (tag is null).
|
|
144969
|
+
return { ns: ns.slice(), isHTML: html, tag: null };
|
|
144970
|
+
|
|
144971
|
+
case ATTRIBUTE_NODE:
|
|
144972
|
+
addSerializedAttribute(buf, n.name, n.value);
|
|
144973
|
+
return null;
|
|
144974
|
+
|
|
144975
|
+
case TEXT_NODE:
|
|
144976
|
+
/**
|
|
144977
|
+
* The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,
|
|
144978
|
+
* except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.
|
|
144979
|
+
* If they are needed elsewhere, they must be escaped using either numeric character references or the strings
|
|
144980
|
+
* `&` and `<` respectively.
|
|
144981
|
+
* The right angle bracket (>) may be represented using the string " > ", and must, for compatibility,
|
|
144982
|
+
* be escaped using either `>` or a character reference when it appears in the string `]]>` in content,
|
|
144983
|
+
* when that string is not marking the end of a CDATA section.
|
|
144984
|
+
*
|
|
144985
|
+
* In the content of elements, character data is any string of characters
|
|
144986
|
+
* which does not contain the start-delimiter of any markup
|
|
144987
|
+
* and does not include the CDATA-section-close delimiter, `]]>`.
|
|
144988
|
+
*
|
|
144989
|
+
* @see https://www.w3.org/TR/xml/#NT-CharData
|
|
144990
|
+
* @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
|
|
144991
|
+
*/
|
|
144992
|
+
buf.push(n.data.replace(/[<&>]/g, _xmlEncoder));
|
|
144993
|
+
return null;
|
|
144994
|
+
|
|
144995
|
+
case CDATA_SECTION_NODE:
|
|
144996
|
+
if (requireWellFormed && n.data.indexOf(']]>') !== -1) {
|
|
144997
|
+
throw new DOMException(INVALID_STATE_ERR, 'The CDATASection data contains "]]>"');
|
|
144678
144998
|
}
|
|
144679
|
-
|
|
144680
|
-
|
|
144681
|
-
|
|
144682
|
-
|
|
144683
|
-
|
|
144684
|
-
|
|
144685
|
-
|
|
144686
|
-
|
|
144687
|
-
|
|
144688
|
-
|
|
144689
|
-
|
|
144690
|
-
|
|
144691
|
-
|
|
144692
|
-
|
|
144693
|
-
|
|
144694
|
-
|
|
144695
|
-
|
|
144696
|
-
|
|
144697
|
-
|
|
144698
|
-
|
|
144699
|
-
|
|
144700
|
-
|
|
144701
|
-
|
|
144702
|
-
|
|
144703
|
-
|
|
144704
|
-
|
|
144705
|
-
|
|
144706
|
-
|
|
144707
|
-
|
|
144708
|
-
|
|
144709
|
-
|
|
144710
|
-
|
|
144711
|
-
|
|
144712
|
-
|
|
144713
|
-
|
|
144714
|
-
|
|
144715
|
-
|
|
144716
|
-
|
|
144717
|
-
|
|
144718
|
-
|
|
144719
|
-
|
|
144720
|
-
|
|
144721
|
-
|
|
144722
|
-
|
|
144723
|
-
|
|
144724
|
-
|
|
144725
|
-
|
|
144726
|
-
|
|
144727
|
-
|
|
144728
|
-
|
|
144729
|
-
|
|
144730
|
-
|
|
144731
|
-
|
|
144732
|
-
|
|
144733
|
-
|
|
144734
|
-
|
|
144735
|
-
|
|
144736
|
-
|
|
144999
|
+
buf.push('<![CDATA[', n.data.replace(/]]>/g, ']]]]><![CDATA[>'), ']]>');
|
|
145000
|
+
return null;
|
|
145001
|
+
|
|
145002
|
+
case COMMENT_NODE:
|
|
145003
|
+
if (requireWellFormed && n.data.indexOf('-->') !== -1) {
|
|
145004
|
+
throw new DOMException(INVALID_STATE_ERR, 'The comment node data contains "-->"');
|
|
145005
|
+
}
|
|
145006
|
+
buf.push('<!--', n.data, '-->');
|
|
145007
|
+
return null;
|
|
145008
|
+
|
|
145009
|
+
case DOCUMENT_TYPE_NODE:
|
|
145010
|
+
if (requireWellFormed) {
|
|
145011
|
+
if (n.publicId && !/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(n.publicId)) {
|
|
145012
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType publicId is not a valid PubidLiteral');
|
|
145013
|
+
}
|
|
145014
|
+
if (n.systemId && !/^("[^"]*"|'[^']*')$/.test(n.systemId)) {
|
|
145015
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType systemId is not a valid SystemLiteral');
|
|
145016
|
+
}
|
|
145017
|
+
if (n.internalSubset && n.internalSubset.indexOf(']>') !== -1) {
|
|
145018
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType internalSubset contains "]>"');
|
|
145019
|
+
}
|
|
145020
|
+
}
|
|
145021
|
+
var pubid = n.publicId;
|
|
145022
|
+
var sysid = n.systemId;
|
|
145023
|
+
buf.push('<!DOCTYPE ', n.name);
|
|
145024
|
+
if (pubid) {
|
|
145025
|
+
buf.push(' PUBLIC ', pubid);
|
|
145026
|
+
if (sysid && sysid != '.') {
|
|
145027
|
+
buf.push(' ', sysid);
|
|
145028
|
+
}
|
|
145029
|
+
buf.push('>');
|
|
145030
|
+
} else if (sysid && sysid != '.') {
|
|
145031
|
+
buf.push(' SYSTEM ', sysid, '>');
|
|
145032
|
+
} else {
|
|
145033
|
+
var sub = n.internalSubset;
|
|
145034
|
+
if (sub) {
|
|
145035
|
+
buf.push(' [', sub, ']');
|
|
145036
|
+
}
|
|
145037
|
+
buf.push('>');
|
|
145038
|
+
}
|
|
145039
|
+
return null;
|
|
145040
|
+
|
|
145041
|
+
case PROCESSING_INSTRUCTION_NODE:
|
|
145042
|
+
if (requireWellFormed && n.data.indexOf('?>') !== -1) {
|
|
145043
|
+
throw new DOMException(INVALID_STATE_ERR, 'The ProcessingInstruction data contains "?>"');
|
|
145044
|
+
}
|
|
145045
|
+
buf.push('<?', n.target, ' ', n.data, '?>');
|
|
145046
|
+
return null;
|
|
145047
|
+
|
|
145048
|
+
case ENTITY_REFERENCE_NODE:
|
|
145049
|
+
buf.push('&', n.nodeName, ';');
|
|
145050
|
+
return null;
|
|
145051
|
+
|
|
145052
|
+
//case ENTITY_NODE:
|
|
145053
|
+
//case NOTATION_NODE:
|
|
145054
|
+
default:
|
|
145055
|
+
buf.push('??', n.nodeName);
|
|
145056
|
+
return null;
|
|
144737
145057
|
}
|
|
144738
|
-
|
|
144739
|
-
|
|
144740
|
-
|
|
144741
|
-
|
|
144742
|
-
var sub = node.internalSubset;
|
|
144743
|
-
if(sub){
|
|
144744
|
-
buf.push(" [",sub,"]");
|
|
145058
|
+
},
|
|
145059
|
+
exit: function (n, childCtx) {
|
|
145060
|
+
if (childCtx && childCtx.tag) {
|
|
145061
|
+
buf.push('</', childCtx.tag, '>');
|
|
144745
145062
|
}
|
|
144746
|
-
|
|
144747
|
-
|
|
144748
|
-
return;
|
|
144749
|
-
case PROCESSING_INSTRUCTION_NODE:
|
|
144750
|
-
return buf.push( "<?",node.target," ",node.data,"?>");
|
|
144751
|
-
case ENTITY_REFERENCE_NODE:
|
|
144752
|
-
return buf.push( '&',node.nodeName,';');
|
|
144753
|
-
//case ENTITY_NODE:
|
|
144754
|
-
//case NOTATION_NODE:
|
|
144755
|
-
default:
|
|
144756
|
-
buf.push('??',node.nodeName);
|
|
144757
|
-
}
|
|
145063
|
+
},
|
|
145064
|
+
});
|
|
144758
145065
|
}
|
|
144759
|
-
|
|
144760
|
-
|
|
144761
|
-
|
|
144762
|
-
|
|
144763
|
-
|
|
144764
|
-
|
|
144765
|
-
|
|
144766
|
-
|
|
144767
|
-
|
|
144768
|
-
|
|
144769
|
-
|
|
144770
|
-
|
|
144771
|
-
|
|
144772
|
-
|
|
144773
|
-
|
|
144774
|
-
|
|
144775
|
-
|
|
144776
|
-
|
|
144777
|
-
|
|
144778
|
-
|
|
144779
|
-
|
|
144780
|
-
|
|
144781
|
-
|
|
144782
|
-
|
|
144783
|
-
|
|
144784
|
-
|
|
144785
|
-
|
|
144786
|
-
|
|
144787
|
-
|
|
144788
|
-
|
|
144789
|
-
|
|
144790
|
-
|
|
144791
|
-
|
|
144792
|
-
|
|
144793
|
-
|
|
144794
|
-
|
|
144795
|
-
|
|
144796
|
-
var child = node.firstChild;
|
|
144797
|
-
while(child){
|
|
144798
|
-
node2.appendChild(importNode(doc,child,deep));
|
|
144799
|
-
child = child.nextSibling;
|
|
144800
|
-
}
|
|
144801
|
-
}
|
|
144802
|
-
return node2;
|
|
145066
|
+
/**
|
|
145067
|
+
* Imports a node from a different document into `doc`, creating a new copy.
|
|
145068
|
+
* Delegates to {@link walkDOM} for traversal. Each node in the subtree is shallow-cloned,
|
|
145069
|
+
* stamped with `doc` as its `ownerDocument`, and detached (`parentNode` set to `null`).
|
|
145070
|
+
* Children are imported recursively when `deep` is `true`; for {@link Attr} nodes `deep` is
|
|
145071
|
+
* always forced to `true`
|
|
145072
|
+
* because an attribute's value lives in a child text node.
|
|
145073
|
+
*
|
|
145074
|
+
* @param {Document} doc
|
|
145075
|
+
* The document that will own the imported node.
|
|
145076
|
+
* @param {Node} node
|
|
145077
|
+
* The node to import.
|
|
145078
|
+
* @param {boolean} deep
|
|
145079
|
+
* If `true`, descendants are imported recursively.
|
|
145080
|
+
* @returns {Node}
|
|
145081
|
+
* The newly imported node, now owned by `doc`.
|
|
145082
|
+
*/
|
|
145083
|
+
function importNode(doc, node, deep) {
|
|
145084
|
+
var destRoot;
|
|
145085
|
+
walkDOM(node, null, {
|
|
145086
|
+
enter: function (srcNode, destParent) {
|
|
145087
|
+
// Shallow-clone the node and stamp it into the target document.
|
|
145088
|
+
var destNode = srcNode.cloneNode(false);
|
|
145089
|
+
destNode.ownerDocument = doc;
|
|
145090
|
+
destNode.parentNode = null;
|
|
145091
|
+
// capture as the root of the imported subtree or attach to parent.
|
|
145092
|
+
if (destParent === null) {
|
|
145093
|
+
destRoot = destNode;
|
|
145094
|
+
} else {
|
|
145095
|
+
destParent.appendChild(destNode);
|
|
145096
|
+
}
|
|
145097
|
+
// ATTRIBUTE_NODE must always be imported deeply: its value lives in a child text node.
|
|
145098
|
+
var shouldDeep = srcNode.nodeType === ATTRIBUTE_NODE || deep;
|
|
145099
|
+
return shouldDeep ? destNode : null;
|
|
145100
|
+
},
|
|
145101
|
+
});
|
|
145102
|
+
return destRoot;
|
|
144803
145103
|
}
|
|
144804
145104
|
//
|
|
144805
145105
|
//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,
|
|
144806
145106
|
// attributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};
|
|
144807
|
-
function cloneNode(doc,node,deep){
|
|
144808
|
-
var
|
|
144809
|
-
|
|
144810
|
-
|
|
144811
|
-
|
|
144812
|
-
|
|
144813
|
-
|
|
144814
|
-
|
|
145107
|
+
function cloneNode(doc, node, deep) {
|
|
145108
|
+
var destRoot;
|
|
145109
|
+
walkDOM(node, null, {
|
|
145110
|
+
enter: function (srcNode, destParent) {
|
|
145111
|
+
// 1. Create a blank node of the same type and copy all scalar own properties.
|
|
145112
|
+
var destNode = new srcNode.constructor();
|
|
145113
|
+
for (var n in srcNode) {
|
|
145114
|
+
if (Object.prototype.hasOwnProperty.call(srcNode, n)) {
|
|
145115
|
+
var v = srcNode[n];
|
|
145116
|
+
if (typeof v != 'object') {
|
|
145117
|
+
if (v != destNode[n]) {
|
|
145118
|
+
destNode[n] = v;
|
|
145119
|
+
}
|
|
145120
|
+
}
|
|
144815
145121
|
}
|
|
144816
145122
|
}
|
|
144817
|
-
|
|
144818
|
-
|
|
144819
|
-
|
|
144820
|
-
|
|
144821
|
-
|
|
144822
|
-
|
|
144823
|
-
|
|
144824
|
-
|
|
144825
|
-
|
|
144826
|
-
|
|
144827
|
-
|
|
144828
|
-
|
|
144829
|
-
|
|
144830
|
-
|
|
144831
|
-
|
|
144832
|
-
|
|
144833
|
-
|
|
144834
|
-
|
|
144835
|
-
|
|
144836
|
-
|
|
144837
|
-
|
|
144838
|
-
|
|
144839
|
-
|
|
144840
|
-
|
|
144841
|
-
|
|
144842
|
-
|
|
145123
|
+
if (srcNode.childNodes) {
|
|
145124
|
+
destNode.childNodes = new NodeList();
|
|
145125
|
+
}
|
|
145126
|
+
destNode.ownerDocument = doc;
|
|
145127
|
+
// 2. Handle node-type-specific setup.
|
|
145128
|
+
// Attributes are not DOM children, so they are cloned inline here
|
|
145129
|
+
// rather than by walkDOM descent.
|
|
145130
|
+
// ATTRIBUTE_NODE forces deep=true so its own children are walked.
|
|
145131
|
+
var shouldDeep = deep;
|
|
145132
|
+
switch (destNode.nodeType) {
|
|
145133
|
+
case ELEMENT_NODE:
|
|
145134
|
+
var attrs = srcNode.attributes;
|
|
145135
|
+
var attrs2 = (destNode.attributes = new NamedNodeMap());
|
|
145136
|
+
var len = attrs.length;
|
|
145137
|
+
attrs2._ownerElement = destNode;
|
|
145138
|
+
for (var i = 0; i < len; i++) {
|
|
145139
|
+
destNode.setAttributeNode(cloneNode(doc, attrs.item(i), true));
|
|
145140
|
+
}
|
|
145141
|
+
break;
|
|
145142
|
+
case ATTRIBUTE_NODE:
|
|
145143
|
+
shouldDeep = true;
|
|
145144
|
+
}
|
|
145145
|
+
// 3. Attach to parent, or capture as the root of the cloned subtree.
|
|
145146
|
+
if (destParent !== null) {
|
|
145147
|
+
destParent.appendChild(destNode);
|
|
145148
|
+
} else {
|
|
145149
|
+
destRoot = destNode;
|
|
145150
|
+
}
|
|
145151
|
+
// 4. Return destNode as the context for children (causes walkDOM to descend),
|
|
145152
|
+
// or null to skip children (shallow clone).
|
|
145153
|
+
return shouldDeep ? destNode : null;
|
|
145154
|
+
},
|
|
145155
|
+
});
|
|
145156
|
+
return destRoot;
|
|
144843
145157
|
}
|
|
144844
145158
|
|
|
144845
145159
|
function __set__(object,key,value){
|
|
@@ -144855,49 +145169,55 @@ function requireDom$1 () {
|
|
|
144855
145169
|
}
|
|
144856
145170
|
});
|
|
144857
145171
|
|
|
144858
|
-
|
|
144859
|
-
|
|
144860
|
-
|
|
145172
|
+
/**
|
|
145173
|
+
* The text content of this node and its descendants.
|
|
145174
|
+
*
|
|
145175
|
+
* Setting `textContent` on an element or document fragment replaces all child nodes with a
|
|
145176
|
+
* single text node; on other nodes it sets `data`, `value`, and `nodeValue` directly.
|
|
145177
|
+
*
|
|
145178
|
+
* @type {string | null}
|
|
145179
|
+
* @see {@link https://dom.spec.whatwg.org/#dom-node-textcontent}
|
|
145180
|
+
*/
|
|
145181
|
+
Object.defineProperty(Node.prototype, 'textContent', {
|
|
145182
|
+
get: function () {
|
|
145183
|
+
if (this.nodeType === ELEMENT_NODE || this.nodeType === DOCUMENT_FRAGMENT_NODE) {
|
|
145184
|
+
var buf = [];
|
|
145185
|
+
walkDOM(this, null, {
|
|
145186
|
+
enter: function (n) {
|
|
145187
|
+
if (n.nodeType === ELEMENT_NODE || n.nodeType === DOCUMENT_FRAGMENT_NODE) {
|
|
145188
|
+
return true; // enter children
|
|
145189
|
+
}
|
|
145190
|
+
if (n.nodeType === PROCESSING_INSTRUCTION_NODE || n.nodeType === COMMENT_NODE) {
|
|
145191
|
+
return null; // excluded from text content
|
|
145192
|
+
}
|
|
145193
|
+
buf.push(n.nodeValue);
|
|
145194
|
+
},
|
|
145195
|
+
});
|
|
145196
|
+
return buf.join('');
|
|
145197
|
+
}
|
|
145198
|
+
return this.nodeValue;
|
|
144861
145199
|
},
|
|
144862
145200
|
|
|
144863
|
-
set:function(data){
|
|
144864
|
-
switch(this.nodeType){
|
|
144865
|
-
|
|
144866
|
-
|
|
144867
|
-
|
|
144868
|
-
|
|
144869
|
-
|
|
144870
|
-
|
|
144871
|
-
|
|
144872
|
-
|
|
144873
|
-
|
|
145201
|
+
set: function (data) {
|
|
145202
|
+
switch (this.nodeType) {
|
|
145203
|
+
case ELEMENT_NODE:
|
|
145204
|
+
case DOCUMENT_FRAGMENT_NODE:
|
|
145205
|
+
while (this.firstChild) {
|
|
145206
|
+
this.removeChild(this.firstChild);
|
|
145207
|
+
}
|
|
145208
|
+
if (data || String(data)) {
|
|
145209
|
+
this.appendChild(this.ownerDocument.createTextNode(data));
|
|
145210
|
+
}
|
|
145211
|
+
break;
|
|
144874
145212
|
|
|
144875
|
-
|
|
144876
|
-
|
|
144877
|
-
|
|
144878
|
-
|
|
145213
|
+
default:
|
|
145214
|
+
this.data = data;
|
|
145215
|
+
this.value = data;
|
|
145216
|
+
this.nodeValue = data;
|
|
144879
145217
|
}
|
|
144880
|
-
}
|
|
145218
|
+
},
|
|
144881
145219
|
});
|
|
144882
145220
|
|
|
144883
|
-
function getTextContent(node){
|
|
144884
|
-
switch(node.nodeType){
|
|
144885
|
-
case ELEMENT_NODE:
|
|
144886
|
-
case DOCUMENT_FRAGMENT_NODE:
|
|
144887
|
-
var buf = [];
|
|
144888
|
-
node = node.firstChild;
|
|
144889
|
-
while(node){
|
|
144890
|
-
if(node.nodeType!==7 && node.nodeType !==8){
|
|
144891
|
-
buf.push(getTextContent(node));
|
|
144892
|
-
}
|
|
144893
|
-
node = node.nextSibling;
|
|
144894
|
-
}
|
|
144895
|
-
return buf.join('');
|
|
144896
|
-
default:
|
|
144897
|
-
return node.nodeValue;
|
|
144898
|
-
}
|
|
144899
|
-
}
|
|
144900
|
-
|
|
144901
145221
|
__set__ = function(object,key,value){
|
|
144902
145222
|
//console.log(value)
|
|
144903
145223
|
object['$$'+key] = value;
|
|
@@ -144913,6 +145233,7 @@ function requireDom$1 () {
|
|
|
144913
145233
|
dom$1.Element = Element;
|
|
144914
145234
|
dom$1.Node = Node;
|
|
144915
145235
|
dom$1.NodeList = NodeList;
|
|
145236
|
+
dom$1.walkDOM = walkDOM;
|
|
144916
145237
|
dom$1.XMLSerializer = XMLSerializer;
|
|
144917
145238
|
//}
|
|
144918
145239
|
return dom$1;
|
|
@@ -147703,7 +148024,7 @@ function requireSax$1 () {
|
|
|
147703
148024
|
function parseInstruction(source,start,domBuilder){
|
|
147704
148025
|
var end = source.indexOf('?>',start);
|
|
147705
148026
|
if(end){
|
|
147706
|
-
var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)
|
|
148027
|
+
var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)$/);
|
|
147707
148028
|
if(match){
|
|
147708
148029
|
match[0].length;
|
|
147709
148030
|
domBuilder.processingInstruction(match[1], match[2]) ;
|
|
@@ -193178,17 +193499,17 @@ var root = freeGlobal || freeSelf || Function('return this')();
|
|
|
193178
193499
|
var Symbol$1 = root.Symbol;
|
|
193179
193500
|
|
|
193180
193501
|
/** Used for built-in method references. */
|
|
193181
|
-
var objectProto$
|
|
193502
|
+
var objectProto$t = Object.prototype;
|
|
193182
193503
|
|
|
193183
193504
|
/** Used to check objects for own properties. */
|
|
193184
|
-
var hasOwnProperty$
|
|
193505
|
+
var hasOwnProperty$p = objectProto$t.hasOwnProperty;
|
|
193185
193506
|
|
|
193186
193507
|
/**
|
|
193187
193508
|
* Used to resolve the
|
|
193188
193509
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
193189
193510
|
* of values.
|
|
193190
193511
|
*/
|
|
193191
|
-
var nativeObjectToString$3 = objectProto$
|
|
193512
|
+
var nativeObjectToString$3 = objectProto$t.toString;
|
|
193192
193513
|
|
|
193193
193514
|
/** Built-in value references. */
|
|
193194
193515
|
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
@@ -193201,7 +193522,7 @@ var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
|
193201
193522
|
* @returns {string} Returns the raw `toStringTag`.
|
|
193202
193523
|
*/
|
|
193203
193524
|
function getRawTag(value) {
|
|
193204
|
-
var isOwn = hasOwnProperty$
|
|
193525
|
+
var isOwn = hasOwnProperty$p.call(value, symToStringTag$1),
|
|
193205
193526
|
tag = value[symToStringTag$1];
|
|
193206
193527
|
|
|
193207
193528
|
try {
|
|
@@ -193221,14 +193542,14 @@ function getRawTag(value) {
|
|
|
193221
193542
|
}
|
|
193222
193543
|
|
|
193223
193544
|
/** Used for built-in method references. */
|
|
193224
|
-
var objectProto$
|
|
193545
|
+
var objectProto$s = Object.prototype;
|
|
193225
193546
|
|
|
193226
193547
|
/**
|
|
193227
193548
|
* Used to resolve the
|
|
193228
193549
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
193229
193550
|
* of values.
|
|
193230
193551
|
*/
|
|
193231
|
-
var nativeObjectToString$2 = objectProto$
|
|
193552
|
+
var nativeObjectToString$2 = objectProto$s.toString;
|
|
193232
193553
|
|
|
193233
193554
|
/**
|
|
193234
193555
|
* Converts `value` to a string using `Object.prototype.toString`.
|
|
@@ -193807,17 +194128,17 @@ var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
|
193807
194128
|
|
|
193808
194129
|
/** Used for built-in method references. */
|
|
193809
194130
|
var funcProto$1 = Function.prototype,
|
|
193810
|
-
objectProto$
|
|
194131
|
+
objectProto$r = Object.prototype;
|
|
193811
194132
|
|
|
193812
194133
|
/** Used to resolve the decompiled source of functions. */
|
|
193813
194134
|
var funcToString$1 = funcProto$1.toString;
|
|
193814
194135
|
|
|
193815
194136
|
/** Used to check objects for own properties. */
|
|
193816
|
-
var hasOwnProperty$
|
|
194137
|
+
var hasOwnProperty$o = objectProto$r.hasOwnProperty;
|
|
193817
194138
|
|
|
193818
194139
|
/** Used to detect if a method is native. */
|
|
193819
194140
|
var reIsNative = RegExp('^' +
|
|
193820
|
-
funcToString$1.call(hasOwnProperty$
|
|
194141
|
+
funcToString$1.call(hasOwnProperty$o).replace(reRegExpChar$1, '\\$&')
|
|
193821
194142
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
193822
194143
|
);
|
|
193823
194144
|
|
|
@@ -194147,10 +194468,10 @@ var getData = !metaMap ? noop$3 : function(func) {
|
|
|
194147
194468
|
var realNames = {};
|
|
194148
194469
|
|
|
194149
194470
|
/** Used for built-in method references. */
|
|
194150
|
-
var objectProto$
|
|
194471
|
+
var objectProto$q = Object.prototype;
|
|
194151
194472
|
|
|
194152
194473
|
/** Used to check objects for own properties. */
|
|
194153
|
-
var hasOwnProperty$
|
|
194474
|
+
var hasOwnProperty$n = objectProto$q.hasOwnProperty;
|
|
194154
194475
|
|
|
194155
194476
|
/**
|
|
194156
194477
|
* Gets the name of `func`.
|
|
@@ -194162,7 +194483,7 @@ var hasOwnProperty$m = objectProto$p.hasOwnProperty;
|
|
|
194162
194483
|
function getFuncName(func) {
|
|
194163
194484
|
var result = (func.name + ''),
|
|
194164
194485
|
array = realNames[result],
|
|
194165
|
-
length = hasOwnProperty$
|
|
194486
|
+
length = hasOwnProperty$n.call(realNames, result) ? array.length : 0;
|
|
194166
194487
|
|
|
194167
194488
|
while (length--) {
|
|
194168
194489
|
var data = array[length],
|
|
@@ -194230,10 +194551,10 @@ function wrapperClone(wrapper) {
|
|
|
194230
194551
|
}
|
|
194231
194552
|
|
|
194232
194553
|
/** Used for built-in method references. */
|
|
194233
|
-
var objectProto$
|
|
194554
|
+
var objectProto$p = Object.prototype;
|
|
194234
194555
|
|
|
194235
194556
|
/** Used to check objects for own properties. */
|
|
194236
|
-
var hasOwnProperty$
|
|
194557
|
+
var hasOwnProperty$m = objectProto$p.hasOwnProperty;
|
|
194237
194558
|
|
|
194238
194559
|
/**
|
|
194239
194560
|
* Creates a `lodash` object which wraps `value` to enable implicit method
|
|
@@ -194357,7 +194678,7 @@ function lodash(value) {
|
|
|
194357
194678
|
if (value instanceof LodashWrapper) {
|
|
194358
194679
|
return value;
|
|
194359
194680
|
}
|
|
194360
|
-
if (hasOwnProperty$
|
|
194681
|
+
if (hasOwnProperty$m.call(value, '__wrapped__')) {
|
|
194361
194682
|
return wrapperClone(value);
|
|
194362
194683
|
}
|
|
194363
194684
|
}
|
|
@@ -195261,10 +195582,10 @@ function eq(value, other) {
|
|
|
195261
195582
|
}
|
|
195262
195583
|
|
|
195263
195584
|
/** Used for built-in method references. */
|
|
195264
|
-
var objectProto$
|
|
195585
|
+
var objectProto$o = Object.prototype;
|
|
195265
195586
|
|
|
195266
195587
|
/** Used to check objects for own properties. */
|
|
195267
|
-
var hasOwnProperty$
|
|
195588
|
+
var hasOwnProperty$l = objectProto$o.hasOwnProperty;
|
|
195268
195589
|
|
|
195269
195590
|
/**
|
|
195270
195591
|
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
@@ -195278,7 +195599,7 @@ var hasOwnProperty$k = objectProto$n.hasOwnProperty;
|
|
|
195278
195599
|
*/
|
|
195279
195600
|
function assignValue(object, key, value) {
|
|
195280
195601
|
var objValue = object[key];
|
|
195281
|
-
if (!(hasOwnProperty$
|
|
195602
|
+
if (!(hasOwnProperty$l.call(object, key) && eq(objValue, value)) ||
|
|
195282
195603
|
(value === undefined && !(key in object))) {
|
|
195283
195604
|
baseAssignValue(object, key, value);
|
|
195284
195605
|
}
|
|
@@ -195486,7 +195807,7 @@ function createAssigner(assigner) {
|
|
|
195486
195807
|
}
|
|
195487
195808
|
|
|
195488
195809
|
/** Used for built-in method references. */
|
|
195489
|
-
var objectProto$
|
|
195810
|
+
var objectProto$n = Object.prototype;
|
|
195490
195811
|
|
|
195491
195812
|
/**
|
|
195492
195813
|
* Checks if `value` is likely a prototype object.
|
|
@@ -195497,7 +195818,7 @@ var objectProto$m = Object.prototype;
|
|
|
195497
195818
|
*/
|
|
195498
195819
|
function isPrototype(value) {
|
|
195499
195820
|
var Ctor = value && value.constructor,
|
|
195500
|
-
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$
|
|
195821
|
+
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$n;
|
|
195501
195822
|
|
|
195502
195823
|
return value === proto;
|
|
195503
195824
|
}
|
|
@@ -195536,13 +195857,13 @@ function baseIsArguments(value) {
|
|
|
195536
195857
|
}
|
|
195537
195858
|
|
|
195538
195859
|
/** Used for built-in method references. */
|
|
195539
|
-
var objectProto$
|
|
195860
|
+
var objectProto$m = Object.prototype;
|
|
195540
195861
|
|
|
195541
195862
|
/** Used to check objects for own properties. */
|
|
195542
|
-
var hasOwnProperty$
|
|
195863
|
+
var hasOwnProperty$k = objectProto$m.hasOwnProperty;
|
|
195543
195864
|
|
|
195544
195865
|
/** Built-in value references. */
|
|
195545
|
-
var propertyIsEnumerable$1 = objectProto$
|
|
195866
|
+
var propertyIsEnumerable$1 = objectProto$m.propertyIsEnumerable;
|
|
195546
195867
|
|
|
195547
195868
|
/**
|
|
195548
195869
|
* Checks if `value` is likely an `arguments` object.
|
|
@@ -195563,7 +195884,7 @@ var propertyIsEnumerable$1 = objectProto$l.propertyIsEnumerable;
|
|
|
195563
195884
|
* // => false
|
|
195564
195885
|
*/
|
|
195565
195886
|
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
|
195566
|
-
return isObjectLike(value) && hasOwnProperty$
|
|
195887
|
+
return isObjectLike(value) && hasOwnProperty$k.call(value, 'callee') &&
|
|
195567
195888
|
!propertyIsEnumerable$1.call(value, 'callee');
|
|
195568
195889
|
};
|
|
195569
195890
|
|
|
@@ -195736,10 +196057,10 @@ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
|
195736
196057
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
195737
196058
|
|
|
195738
196059
|
/** Used for built-in method references. */
|
|
195739
|
-
var objectProto$
|
|
196060
|
+
var objectProto$l = Object.prototype;
|
|
195740
196061
|
|
|
195741
196062
|
/** Used to check objects for own properties. */
|
|
195742
|
-
var hasOwnProperty$
|
|
196063
|
+
var hasOwnProperty$j = objectProto$l.hasOwnProperty;
|
|
195743
196064
|
|
|
195744
196065
|
/**
|
|
195745
196066
|
* Creates an array of the enumerable property names of the array-like `value`.
|
|
@@ -195759,7 +196080,7 @@ function arrayLikeKeys(value, inherited) {
|
|
|
195759
196080
|
length = result.length;
|
|
195760
196081
|
|
|
195761
196082
|
for (var key in value) {
|
|
195762
|
-
if ((inherited || hasOwnProperty$
|
|
196083
|
+
if ((inherited || hasOwnProperty$j.call(value, key)) &&
|
|
195763
196084
|
!(skipIndexes && (
|
|
195764
196085
|
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
195765
196086
|
key == 'length' ||
|
|
@@ -195794,10 +196115,10 @@ function overArg(func, transform) {
|
|
|
195794
196115
|
var nativeKeys = overArg(Object.keys, Object);
|
|
195795
196116
|
|
|
195796
196117
|
/** Used for built-in method references. */
|
|
195797
|
-
var objectProto$
|
|
196118
|
+
var objectProto$k = Object.prototype;
|
|
195798
196119
|
|
|
195799
196120
|
/** Used to check objects for own properties. */
|
|
195800
|
-
var hasOwnProperty$
|
|
196121
|
+
var hasOwnProperty$i = objectProto$k.hasOwnProperty;
|
|
195801
196122
|
|
|
195802
196123
|
/**
|
|
195803
196124
|
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
@@ -195812,7 +196133,7 @@ function baseKeys(object) {
|
|
|
195812
196133
|
}
|
|
195813
196134
|
var result = [];
|
|
195814
196135
|
for (var key in Object(object)) {
|
|
195815
|
-
if (hasOwnProperty$
|
|
196136
|
+
if (hasOwnProperty$i.call(object, key) && key != 'constructor') {
|
|
195816
196137
|
result.push(key);
|
|
195817
196138
|
}
|
|
195818
196139
|
}
|
|
@@ -195852,10 +196173,10 @@ function keys(object) {
|
|
|
195852
196173
|
}
|
|
195853
196174
|
|
|
195854
196175
|
/** Used for built-in method references. */
|
|
195855
|
-
var objectProto$
|
|
196176
|
+
var objectProto$j = Object.prototype;
|
|
195856
196177
|
|
|
195857
196178
|
/** Used to check objects for own properties. */
|
|
195858
|
-
var hasOwnProperty$
|
|
196179
|
+
var hasOwnProperty$h = objectProto$j.hasOwnProperty;
|
|
195859
196180
|
|
|
195860
196181
|
/**
|
|
195861
196182
|
* Assigns own enumerable string keyed properties of source objects to the
|
|
@@ -195895,7 +196216,7 @@ var assign = createAssigner(function(object, source) {
|
|
|
195895
196216
|
return;
|
|
195896
196217
|
}
|
|
195897
196218
|
for (var key in source) {
|
|
195898
|
-
if (hasOwnProperty$
|
|
196219
|
+
if (hasOwnProperty$h.call(source, key)) {
|
|
195899
196220
|
assignValue(object, key, source[key]);
|
|
195900
196221
|
}
|
|
195901
196222
|
}
|
|
@@ -195921,10 +196242,10 @@ function nativeKeysIn(object) {
|
|
|
195921
196242
|
}
|
|
195922
196243
|
|
|
195923
196244
|
/** Used for built-in method references. */
|
|
195924
|
-
var objectProto$
|
|
196245
|
+
var objectProto$i = Object.prototype;
|
|
195925
196246
|
|
|
195926
196247
|
/** Used to check objects for own properties. */
|
|
195927
|
-
var hasOwnProperty$
|
|
196248
|
+
var hasOwnProperty$g = objectProto$i.hasOwnProperty;
|
|
195928
196249
|
|
|
195929
196250
|
/**
|
|
195930
196251
|
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
@@ -195941,7 +196262,7 @@ function baseKeysIn(object) {
|
|
|
195941
196262
|
result = [];
|
|
195942
196263
|
|
|
195943
196264
|
for (var key in object) {
|
|
195944
|
-
if (!(key == 'constructor' && (isProto || !hasOwnProperty$
|
|
196265
|
+
if (!(key == 'constructor' && (isProto || !hasOwnProperty$g.call(object, key)))) {
|
|
195945
196266
|
result.push(key);
|
|
195946
196267
|
}
|
|
195947
196268
|
}
|
|
@@ -196135,10 +196456,10 @@ function hashDelete(key) {
|
|
|
196135
196456
|
var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
|
|
196136
196457
|
|
|
196137
196458
|
/** Used for built-in method references. */
|
|
196138
|
-
var objectProto$
|
|
196459
|
+
var objectProto$h = Object.prototype;
|
|
196139
196460
|
|
|
196140
196461
|
/** Used to check objects for own properties. */
|
|
196141
|
-
var hasOwnProperty$
|
|
196462
|
+
var hasOwnProperty$f = objectProto$h.hasOwnProperty;
|
|
196142
196463
|
|
|
196143
196464
|
/**
|
|
196144
196465
|
* Gets the hash value for `key`.
|
|
@@ -196155,14 +196476,14 @@ function hashGet(key) {
|
|
|
196155
196476
|
var result = data[key];
|
|
196156
196477
|
return result === HASH_UNDEFINED$2 ? undefined : result;
|
|
196157
196478
|
}
|
|
196158
|
-
return hasOwnProperty$
|
|
196479
|
+
return hasOwnProperty$f.call(data, key) ? data[key] : undefined;
|
|
196159
196480
|
}
|
|
196160
196481
|
|
|
196161
196482
|
/** Used for built-in method references. */
|
|
196162
|
-
var objectProto$
|
|
196483
|
+
var objectProto$g = Object.prototype;
|
|
196163
196484
|
|
|
196164
196485
|
/** Used to check objects for own properties. */
|
|
196165
|
-
var hasOwnProperty$
|
|
196486
|
+
var hasOwnProperty$e = objectProto$g.hasOwnProperty;
|
|
196166
196487
|
|
|
196167
196488
|
/**
|
|
196168
196489
|
* Checks if a hash value for `key` exists.
|
|
@@ -196175,7 +196496,7 @@ var hasOwnProperty$d = objectProto$f.hasOwnProperty;
|
|
|
196175
196496
|
*/
|
|
196176
196497
|
function hashHas(key) {
|
|
196177
196498
|
var data = this.__data__;
|
|
196178
|
-
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$
|
|
196499
|
+
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$e.call(data, key);
|
|
196179
196500
|
}
|
|
196180
196501
|
|
|
196181
196502
|
/** Used to stand-in for `undefined` hash values. */
|
|
@@ -196862,13 +197183,13 @@ var objectTag$3 = '[object Object]';
|
|
|
196862
197183
|
|
|
196863
197184
|
/** Used for built-in method references. */
|
|
196864
197185
|
var funcProto = Function.prototype,
|
|
196865
|
-
objectProto$
|
|
197186
|
+
objectProto$f = Object.prototype;
|
|
196866
197187
|
|
|
196867
197188
|
/** Used to resolve the decompiled source of functions. */
|
|
196868
197189
|
var funcToString = funcProto.toString;
|
|
196869
197190
|
|
|
196870
197191
|
/** Used to check objects for own properties. */
|
|
196871
|
-
var hasOwnProperty$
|
|
197192
|
+
var hasOwnProperty$d = objectProto$f.hasOwnProperty;
|
|
196872
197193
|
|
|
196873
197194
|
/** Used to infer the `Object` constructor. */
|
|
196874
197195
|
var objectCtorString = funcToString.call(Object);
|
|
@@ -196909,7 +197230,7 @@ function isPlainObject(value) {
|
|
|
196909
197230
|
if (proto === null) {
|
|
196910
197231
|
return true;
|
|
196911
197232
|
}
|
|
196912
|
-
var Ctor = hasOwnProperty$
|
|
197233
|
+
var Ctor = hasOwnProperty$d.call(proto, 'constructor') && proto.constructor;
|
|
196913
197234
|
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
|
196914
197235
|
funcToString.call(Ctor) == objectCtorString;
|
|
196915
197236
|
}
|
|
@@ -198110,10 +198431,10 @@ function stubArray() {
|
|
|
198110
198431
|
}
|
|
198111
198432
|
|
|
198112
198433
|
/** Used for built-in method references. */
|
|
198113
|
-
var objectProto$
|
|
198434
|
+
var objectProto$e = Object.prototype;
|
|
198114
198435
|
|
|
198115
198436
|
/** Built-in value references. */
|
|
198116
|
-
var propertyIsEnumerable = objectProto$
|
|
198437
|
+
var propertyIsEnumerable = objectProto$e.propertyIsEnumerable;
|
|
198117
198438
|
|
|
198118
198439
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
198119
198440
|
var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
|
|
@@ -198278,10 +198599,10 @@ if ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3)
|
|
|
198278
198599
|
var getTag$1 = getTag;
|
|
198279
198600
|
|
|
198280
198601
|
/** Used for built-in method references. */
|
|
198281
|
-
var objectProto$
|
|
198602
|
+
var objectProto$d = Object.prototype;
|
|
198282
198603
|
|
|
198283
198604
|
/** Used to check objects for own properties. */
|
|
198284
|
-
var hasOwnProperty$
|
|
198605
|
+
var hasOwnProperty$c = objectProto$d.hasOwnProperty;
|
|
198285
198606
|
|
|
198286
198607
|
/**
|
|
198287
198608
|
* Initializes an array clone.
|
|
@@ -198295,7 +198616,7 @@ function initCloneArray(array) {
|
|
|
198295
198616
|
result = new array.constructor(length);
|
|
198296
198617
|
|
|
198297
198618
|
// Add properties assigned by `RegExp#exec`.
|
|
198298
|
-
if (length && typeof array[0] == 'string' && hasOwnProperty$
|
|
198619
|
+
if (length && typeof array[0] == 'string' && hasOwnProperty$c.call(array, 'index')) {
|
|
198299
198620
|
result.index = array.index;
|
|
198300
198621
|
result.input = array.input;
|
|
198301
198622
|
}
|
|
@@ -198839,7 +199160,7 @@ function wrapperCommit() {
|
|
|
198839
199160
|
|
|
198840
199161
|
/**
|
|
198841
199162
|
* Creates an array with all falsey values removed. The values `false`, `null`,
|
|
198842
|
-
* `0`, `""`, `undefined`, and `NaN` are
|
|
199163
|
+
* `0`, `-0`, `0n`, `""`, `undefined`, and `NaN` are falsy.
|
|
198843
199164
|
*
|
|
198844
199165
|
* @static
|
|
198845
199166
|
* @memberOf _
|
|
@@ -198929,7 +199250,7 @@ function setCacheAdd(value) {
|
|
|
198929
199250
|
* @name has
|
|
198930
199251
|
* @memberOf SetCache
|
|
198931
199252
|
* @param {*} value The value to search for.
|
|
198932
|
-
* @returns {
|
|
199253
|
+
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
|
198933
199254
|
*/
|
|
198934
199255
|
function setCacheHas(value) {
|
|
198935
199256
|
return this.__data__.has(value);
|
|
@@ -199212,10 +199533,10 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
|
199212
199533
|
var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
199213
199534
|
|
|
199214
199535
|
/** Used for built-in method references. */
|
|
199215
|
-
var objectProto$
|
|
199536
|
+
var objectProto$c = Object.prototype;
|
|
199216
199537
|
|
|
199217
199538
|
/** Used to check objects for own properties. */
|
|
199218
|
-
var hasOwnProperty$
|
|
199539
|
+
var hasOwnProperty$b = objectProto$c.hasOwnProperty;
|
|
199219
199540
|
|
|
199220
199541
|
/**
|
|
199221
199542
|
* A specialized version of `baseIsEqualDeep` for objects with support for
|
|
@@ -199243,7 +199564,7 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
|
199243
199564
|
var index = objLength;
|
|
199244
199565
|
while (index--) {
|
|
199245
199566
|
var key = objProps[index];
|
|
199246
|
-
if (!(isPartial ? key in other : hasOwnProperty$
|
|
199567
|
+
if (!(isPartial ? key in other : hasOwnProperty$b.call(other, key))) {
|
|
199247
199568
|
return false;
|
|
199248
199569
|
}
|
|
199249
199570
|
}
|
|
@@ -199304,10 +199625,10 @@ var argsTag = '[object Arguments]',
|
|
|
199304
199625
|
objectTag = '[object Object]';
|
|
199305
199626
|
|
|
199306
199627
|
/** Used for built-in method references. */
|
|
199307
|
-
var objectProto$
|
|
199628
|
+
var objectProto$b = Object.prototype;
|
|
199308
199629
|
|
|
199309
199630
|
/** Used to check objects for own properties. */
|
|
199310
|
-
var hasOwnProperty$
|
|
199631
|
+
var hasOwnProperty$a = objectProto$b.hasOwnProperty;
|
|
199311
199632
|
|
|
199312
199633
|
/**
|
|
199313
199634
|
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
|
@@ -199350,8 +199671,8 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
|
199350
199671
|
: equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
199351
199672
|
}
|
|
199352
199673
|
if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
|
|
199353
|
-
var objIsWrapped = objIsObj && hasOwnProperty$
|
|
199354
|
-
othIsWrapped = othIsObj && hasOwnProperty$
|
|
199674
|
+
var objIsWrapped = objIsObj && hasOwnProperty$a.call(object, '__wrapped__'),
|
|
199675
|
+
othIsWrapped = othIsObj && hasOwnProperty$a.call(other, '__wrapped__');
|
|
199355
199676
|
|
|
199356
199677
|
if (objIsWrapped || othIsWrapped) {
|
|
199357
199678
|
var objUnwrapped = objIsWrapped ? object.value() : object,
|
|
@@ -199989,10 +200310,10 @@ function createAggregator(setter, initializer) {
|
|
|
199989
200310
|
}
|
|
199990
200311
|
|
|
199991
200312
|
/** Used for built-in method references. */
|
|
199992
|
-
var objectProto$
|
|
200313
|
+
var objectProto$a = Object.prototype;
|
|
199993
200314
|
|
|
199994
200315
|
/** Used to check objects for own properties. */
|
|
199995
|
-
var hasOwnProperty$
|
|
200316
|
+
var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
|
|
199996
200317
|
|
|
199997
200318
|
/**
|
|
199998
200319
|
* Creates an object composed of keys generated from the results of running
|
|
@@ -200017,7 +200338,7 @@ var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
|
|
|
200017
200338
|
* // => { '3': 2, '5': 1 }
|
|
200018
200339
|
*/
|
|
200019
200340
|
var countBy = createAggregator(function(result, value, key) {
|
|
200020
|
-
if (hasOwnProperty$
|
|
200341
|
+
if (hasOwnProperty$9.call(result, key)) {
|
|
200021
200342
|
++result[key];
|
|
200022
200343
|
} else {
|
|
200023
200344
|
baseAssignValue(result, key, 1);
|
|
@@ -200399,10 +200720,10 @@ function defaultTo(value, defaultValue) {
|
|
|
200399
200720
|
}
|
|
200400
200721
|
|
|
200401
200722
|
/** Used for built-in method references. */
|
|
200402
|
-
var objectProto$
|
|
200723
|
+
var objectProto$9 = Object.prototype;
|
|
200403
200724
|
|
|
200404
200725
|
/** Used to check objects for own properties. */
|
|
200405
|
-
var hasOwnProperty$
|
|
200726
|
+
var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
|
|
200406
200727
|
|
|
200407
200728
|
/**
|
|
200408
200729
|
* Assigns own and inherited enumerable string keyed properties of source
|
|
@@ -200447,7 +200768,7 @@ var defaults = baseRest(function(object, sources) {
|
|
|
200447
200768
|
var value = object[key];
|
|
200448
200769
|
|
|
200449
200770
|
if (value === undefined ||
|
|
200450
|
-
(eq(value, objectProto$
|
|
200771
|
+
(eq(value, objectProto$9[key]) && !hasOwnProperty$8.call(object, key))) {
|
|
200451
200772
|
object[key] = source[key];
|
|
200452
200773
|
}
|
|
200453
200774
|
}
|
|
@@ -202621,7 +202942,7 @@ function fromPairs(pairs) {
|
|
|
202621
202942
|
|
|
202622
202943
|
while (++index < length) {
|
|
202623
202944
|
var pair = pairs[index];
|
|
202624
|
-
result
|
|
202945
|
+
baseAssignValue(result, pair[0], pair[1]);
|
|
202625
202946
|
}
|
|
202626
202947
|
return result;
|
|
202627
202948
|
}
|
|
@@ -202696,10 +203017,10 @@ function functionsIn(object) {
|
|
|
202696
203017
|
}
|
|
202697
203018
|
|
|
202698
203019
|
/** Used for built-in method references. */
|
|
202699
|
-
var objectProto$
|
|
203020
|
+
var objectProto$8 = Object.prototype;
|
|
202700
203021
|
|
|
202701
203022
|
/** Used to check objects for own properties. */
|
|
202702
|
-
var hasOwnProperty$
|
|
203023
|
+
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
202703
203024
|
|
|
202704
203025
|
/**
|
|
202705
203026
|
* Creates an object composed of keys generated from the results of running
|
|
@@ -202725,7 +203046,7 @@ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
|
202725
203046
|
* // => { '3': ['one', 'two'], '5': ['three'] }
|
|
202726
203047
|
*/
|
|
202727
203048
|
var groupBy = createAggregator(function(result, value, key) {
|
|
202728
|
-
if (hasOwnProperty$
|
|
203049
|
+
if (hasOwnProperty$7.call(result, key)) {
|
|
202729
203050
|
result[key].push(value);
|
|
202730
203051
|
} else {
|
|
202731
203052
|
baseAssignValue(result, key, [value]);
|
|
@@ -202815,10 +203136,10 @@ var gte = createRelationalOperation(function(value, other) {
|
|
|
202815
203136
|
});
|
|
202816
203137
|
|
|
202817
203138
|
/** Used for built-in method references. */
|
|
202818
|
-
var objectProto$
|
|
203139
|
+
var objectProto$7 = Object.prototype;
|
|
202819
203140
|
|
|
202820
203141
|
/** Used to check objects for own properties. */
|
|
202821
|
-
var hasOwnProperty$
|
|
203142
|
+
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
202822
203143
|
|
|
202823
203144
|
/**
|
|
202824
203145
|
* The base implementation of `_.has` without support for deep paths.
|
|
@@ -202829,7 +203150,7 @@ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
|
202829
203150
|
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
202830
203151
|
*/
|
|
202831
203152
|
function baseHas(object, key) {
|
|
202832
|
-
return object != null && hasOwnProperty$
|
|
203153
|
+
return object != null && hasOwnProperty$6.call(object, key);
|
|
202833
203154
|
}
|
|
202834
203155
|
|
|
202835
203156
|
/**
|
|
@@ -203309,14 +203630,14 @@ function createInverter(setter, toIteratee) {
|
|
|
203309
203630
|
}
|
|
203310
203631
|
|
|
203311
203632
|
/** Used for built-in method references. */
|
|
203312
|
-
var objectProto$
|
|
203633
|
+
var objectProto$6 = Object.prototype;
|
|
203313
203634
|
|
|
203314
203635
|
/**
|
|
203315
203636
|
* Used to resolve the
|
|
203316
203637
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
203317
203638
|
* of values.
|
|
203318
203639
|
*/
|
|
203319
|
-
var nativeObjectToString$1 = objectProto$
|
|
203640
|
+
var nativeObjectToString$1 = objectProto$6.toString;
|
|
203320
203641
|
|
|
203321
203642
|
/**
|
|
203322
203643
|
* Creates an object composed of the inverted keys and values of `object`.
|
|
@@ -203346,17 +203667,17 @@ var invert = createInverter(function(result, value, key) {
|
|
|
203346
203667
|
}, constant(identity));
|
|
203347
203668
|
|
|
203348
203669
|
/** Used for built-in method references. */
|
|
203349
|
-
var objectProto$
|
|
203670
|
+
var objectProto$5 = Object.prototype;
|
|
203350
203671
|
|
|
203351
203672
|
/** Used to check objects for own properties. */
|
|
203352
|
-
var hasOwnProperty$
|
|
203673
|
+
var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
|
|
203353
203674
|
|
|
203354
203675
|
/**
|
|
203355
203676
|
* Used to resolve the
|
|
203356
203677
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
203357
203678
|
* of values.
|
|
203358
203679
|
*/
|
|
203359
|
-
var nativeObjectToString = objectProto$
|
|
203680
|
+
var nativeObjectToString = objectProto$5.toString;
|
|
203360
203681
|
|
|
203361
203682
|
/**
|
|
203362
203683
|
* This method is like `_.invert` except that the inverted object is generated
|
|
@@ -203390,7 +203711,7 @@ var invertBy = createInverter(function(result, value, key) {
|
|
|
203390
203711
|
value = nativeObjectToString.call(value);
|
|
203391
203712
|
}
|
|
203392
203713
|
|
|
203393
|
-
if (hasOwnProperty$
|
|
203714
|
+
if (hasOwnProperty$5.call(result, value)) {
|
|
203394
203715
|
result[value].push(key);
|
|
203395
203716
|
} else {
|
|
203396
203717
|
result[value] = [key];
|
|
@@ -203602,10 +203923,10 @@ var mapTag$2 = '[object Map]',
|
|
|
203602
203923
|
setTag$2 = '[object Set]';
|
|
203603
203924
|
|
|
203604
203925
|
/** Used for built-in method references. */
|
|
203605
|
-
var objectProto$
|
|
203926
|
+
var objectProto$4 = Object.prototype;
|
|
203606
203927
|
|
|
203607
203928
|
/** Used to check objects for own properties. */
|
|
203608
|
-
var hasOwnProperty$
|
|
203929
|
+
var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
|
|
203609
203930
|
|
|
203610
203931
|
/**
|
|
203611
203932
|
* Checks if `value` is an empty object, collection, map, or set.
|
|
@@ -203657,7 +203978,7 @@ function isEmpty(value) {
|
|
|
203657
203978
|
return !baseKeys(value).length;
|
|
203658
203979
|
}
|
|
203659
203980
|
for (var key in value) {
|
|
203660
|
-
if (hasOwnProperty$
|
|
203981
|
+
if (hasOwnProperty$4.call(value, key)) {
|
|
203661
203982
|
return false;
|
|
203662
203983
|
}
|
|
203663
203984
|
}
|
|
@@ -205215,6 +205536,12 @@ function nthArg(n) {
|
|
|
205215
205536
|
});
|
|
205216
205537
|
}
|
|
205217
205538
|
|
|
205539
|
+
/** Used for built-in method references. */
|
|
205540
|
+
var objectProto$3 = Object.prototype;
|
|
205541
|
+
|
|
205542
|
+
/** Used to check objects for own properties. */
|
|
205543
|
+
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
205544
|
+
|
|
205218
205545
|
/**
|
|
205219
205546
|
* The base implementation of `_.unset`.
|
|
205220
205547
|
*
|
|
@@ -205225,8 +205552,34 @@ function nthArg(n) {
|
|
|
205225
205552
|
*/
|
|
205226
205553
|
function baseUnset(object, path) {
|
|
205227
205554
|
path = castPath(path, object);
|
|
205228
|
-
|
|
205229
|
-
|
|
205555
|
+
|
|
205556
|
+
// Prevent prototype pollution:
|
|
205557
|
+
// https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
|
|
205558
|
+
// https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh
|
|
205559
|
+
var index = -1,
|
|
205560
|
+
length = path.length;
|
|
205561
|
+
|
|
205562
|
+
if (!length) {
|
|
205563
|
+
return true;
|
|
205564
|
+
}
|
|
205565
|
+
|
|
205566
|
+
while (++index < length) {
|
|
205567
|
+
var key = toKey(path[index]);
|
|
205568
|
+
|
|
205569
|
+
// Always block "__proto__" anywhere in the path if it's not expected
|
|
205570
|
+
if (key === '__proto__' && !hasOwnProperty$3.call(object, '__proto__')) {
|
|
205571
|
+
return false;
|
|
205572
|
+
}
|
|
205573
|
+
|
|
205574
|
+
// Block constructor/prototype as non-terminal traversal keys to prevent
|
|
205575
|
+
// escaping the object graph into built-in constructors and prototypes.
|
|
205576
|
+
if ((key === 'constructor' || key === 'prototype') && index < length - 1) {
|
|
205577
|
+
return false;
|
|
205578
|
+
}
|
|
205579
|
+
}
|
|
205580
|
+
|
|
205581
|
+
var obj = parent$1(object, path);
|
|
205582
|
+
return obj == null || delete obj[toKey(last(path))];
|
|
205230
205583
|
}
|
|
205231
205584
|
|
|
205232
205585
|
/**
|
|
@@ -205549,7 +205902,7 @@ function baseOrderBy(collection, iteratees, orders) {
|
|
|
205549
205902
|
if (isArray(iteratee)) {
|
|
205550
205903
|
return function(value) {
|
|
205551
205904
|
return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
205552
|
-
}
|
|
205905
|
+
};
|
|
205553
205906
|
}
|
|
205554
205907
|
return iteratee;
|
|
205555
205908
|
});
|
|
@@ -206561,6 +206914,8 @@ var nativeMin$5 = Math.min,
|
|
|
206561
206914
|
* **Note:** JavaScript follows the IEEE-754 standard for resolving
|
|
206562
206915
|
* floating-point values which can produce unexpected results.
|
|
206563
206916
|
*
|
|
206917
|
+
* **Note:** If `lower` is greater than `upper`, the values are swapped.
|
|
206918
|
+
*
|
|
206564
206919
|
* @static
|
|
206565
206920
|
* @memberOf _
|
|
206566
206921
|
* @since 0.7.0
|
|
@@ -206574,9 +206929,16 @@ var nativeMin$5 = Math.min,
|
|
|
206574
206929
|
* _.random(0, 5);
|
|
206575
206930
|
* // => an integer between 0 and 5
|
|
206576
206931
|
*
|
|
206932
|
+
* // when lower is greater than upper the values are swapped
|
|
206933
|
+
* _.random(5, 0);
|
|
206934
|
+
* // => an integer between 0 and 5
|
|
206935
|
+
*
|
|
206577
206936
|
* _.random(5);
|
|
206578
206937
|
* // => also an integer between 0 and 5
|
|
206579
206938
|
*
|
|
206939
|
+
* _.random(-5);
|
|
206940
|
+
* // => an integer between -5 and 0
|
|
206941
|
+
*
|
|
206580
206942
|
* _.random(5, true);
|
|
206581
206943
|
* // => a floating-point number between 0 and 5
|
|
206582
206944
|
*
|
|
@@ -208481,6 +208843,10 @@ var reEvaluate = /<%([\s\S]+?)%>/g;
|
|
|
208481
208843
|
* embedded Ruby (ERB) as well as ES2015 template strings. Change the
|
|
208482
208844
|
* following template settings to use alternative delimiters.
|
|
208483
208845
|
*
|
|
208846
|
+
* **Security:** See
|
|
208847
|
+
* [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md)
|
|
208848
|
+
* — `_.template` is insecure and will be removed in v5.
|
|
208849
|
+
*
|
|
208484
208850
|
* @static
|
|
208485
208851
|
* @memberOf _
|
|
208486
208852
|
* @type {Object}
|
|
@@ -208538,7 +208904,8 @@ var templateSettings = {
|
|
|
208538
208904
|
};
|
|
208539
208905
|
|
|
208540
208906
|
/** Error message constants. */
|
|
208541
|
-
var INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`'
|
|
208907
|
+
var INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`',
|
|
208908
|
+
INVALID_TEMPL_IMPORTS_ERROR_TEXT = 'Invalid `imports` option passed into `_.template`';
|
|
208542
208909
|
|
|
208543
208910
|
/** Used to match empty string literals in compiled template source. */
|
|
208544
208911
|
var reEmptyStringLeading = /\b__p \+= '';/g,
|
|
@@ -208582,6 +208949,10 @@ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
|
208582
208949
|
* properties may be accessed as free variables in the template. If a setting
|
|
208583
208950
|
* object is given, it takes precedence over `_.templateSettings` values.
|
|
208584
208951
|
*
|
|
208952
|
+
* **Security:** `_.template` is insecure and should not be used. It will be
|
|
208953
|
+
* removed in Lodash v5. Avoid untrusted input. See
|
|
208954
|
+
* [threat model](https://github.com/lodash/lodash/blob/main/threat-model.md).
|
|
208955
|
+
*
|
|
208585
208956
|
* **Note:** In the development build `_.template` utilizes
|
|
208586
208957
|
* [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
|
|
208587
208958
|
* for easier debugging.
|
|
@@ -208689,12 +209060,18 @@ function template(string, options, guard) {
|
|
|
208689
209060
|
options = undefined;
|
|
208690
209061
|
}
|
|
208691
209062
|
string = toString(string);
|
|
208692
|
-
options =
|
|
209063
|
+
options = assignWith({}, options, settings, customDefaultsAssignIn);
|
|
208693
209064
|
|
|
208694
|
-
var imports =
|
|
209065
|
+
var imports = assignWith({}, options.imports, settings.imports, customDefaultsAssignIn),
|
|
208695
209066
|
importsKeys = keys(imports),
|
|
208696
209067
|
importsValues = baseValues(imports, importsKeys);
|
|
208697
209068
|
|
|
209069
|
+
arrayEach(importsKeys, function(key) {
|
|
209070
|
+
if (reForbiddenIdentifierChars.test(key)) {
|
|
209071
|
+
throw new Error(INVALID_TEMPL_IMPORTS_ERROR_TEXT);
|
|
209072
|
+
}
|
|
209073
|
+
});
|
|
209074
|
+
|
|
208698
209075
|
var isEscaping,
|
|
208699
209076
|
isEvaluating,
|
|
208700
209077
|
index = 0,
|
|
@@ -210560,7 +210937,7 @@ function lazyValue() {
|
|
|
210560
210937
|
/**
|
|
210561
210938
|
* @license
|
|
210562
210939
|
* Lodash (Custom Build) <https://lodash.com/>
|
|
210563
|
-
* Build: `lodash modularize exports="es" -o ./`
|
|
210940
|
+
* Build: `lodash modularize exports="es" --repo lodash/lodash#4.18.1 -o ./`
|
|
210564
210941
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
210565
210942
|
* Released under MIT license <https://lodash.com/license>
|
|
210566
210943
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
@@ -210568,7 +210945,7 @@ function lazyValue() {
|
|
|
210568
210945
|
*/
|
|
210569
210946
|
|
|
210570
210947
|
/** Used as the semantic version number. */
|
|
210571
|
-
var VERSION = '4.
|
|
210948
|
+
var VERSION = '4.18.1';
|
|
210572
210949
|
|
|
210573
210950
|
/** Used to compose bitmasks for function metadata. */
|
|
210574
210951
|
var WRAP_BIND_KEY_FLAG = 2;
|
|
@@ -211503,14 +211880,14 @@ function requireDom () {
|
|
|
211503
211880
|
ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
|
|
211504
211881
|
var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
|
|
211505
211882
|
ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
|
|
211506
|
-
ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
|
|
211883
|
+
var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
|
|
211507
211884
|
ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
|
|
211508
211885
|
ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
|
|
211509
211886
|
var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
|
|
211510
211887
|
ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
|
|
211511
211888
|
var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
|
|
211512
211889
|
//level2
|
|
211513
|
-
ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
|
|
211890
|
+
var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
|
|
211514
211891
|
ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
|
|
211515
211892
|
ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
|
|
211516
211893
|
ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
|
|
@@ -211560,9 +211937,10 @@ function requireDom () {
|
|
|
211560
211937
|
item: function(index) {
|
|
211561
211938
|
return index >= 0 && index < this.length ? this[index] : null;
|
|
211562
211939
|
},
|
|
211563
|
-
toString:function(isHTML,nodeFilter){
|
|
211940
|
+
toString:function(isHTML,nodeFilter,options){
|
|
211941
|
+
var requireWellFormed = !!options && !!options.requireWellFormed;
|
|
211564
211942
|
for(var buf = [], i = 0;i<this.length;i++){
|
|
211565
|
-
serializeToString(this[i],buf,isHTML,nodeFilter);
|
|
211943
|
+
serializeToString(this[i],buf,isHTML,nodeFilter,null,requireWellFormed);
|
|
211566
211944
|
}
|
|
211567
211945
|
return buf.join('');
|
|
211568
211946
|
},
|
|
@@ -211807,13 +212185,28 @@ function requireDom () {
|
|
|
211807
212185
|
/**
|
|
211808
212186
|
* Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`.
|
|
211809
212187
|
*
|
|
211810
|
-
* __This
|
|
212188
|
+
* __This implementation differs from the specification:__
|
|
211811
212189
|
* - this implementation is not validating names or qualified names
|
|
211812
212190
|
* (when parsing XML strings, the SAX parser takes care of that)
|
|
211813
212191
|
*
|
|
212192
|
+
* Note: `internalSubset` can only be introduced via a direct property write to `node.internalSubset` after creation.
|
|
212193
|
+
* Creation-time validation of `publicId`, `systemId` is not enforced.
|
|
212194
|
+
* The serializer-level check covers all mutation vectors, including direct property writes.
|
|
212195
|
+
* `internalSubset` is only serialized as `[ ... ]` when both `publicId` and `systemId` are
|
|
212196
|
+
* absent (empty or `'.'`) — if either external identifier is present, `internalSubset` is
|
|
212197
|
+
* silently omitted from the serialized output.
|
|
212198
|
+
*
|
|
211814
212199
|
* @param {string} qualifiedName
|
|
211815
212200
|
* @param {string} [publicId]
|
|
212201
|
+
* The external subset public identifier. Stored verbatim including surrounding quotes.
|
|
212202
|
+
* When serialized with `requireWellFormed: true` (via the 4th-parameter options object),
|
|
212203
|
+
* throws `DOMException` with code `INVALID_STATE_ERR` if the value is non-empty and does
|
|
212204
|
+
* not match the XML `PubidLiteral` production (W3C DOM Parsing §3.2.1.3; XML 1.0 [12]).
|
|
211816
212205
|
* @param {string} [systemId]
|
|
212206
|
+
* The external subset system identifier. Stored verbatim including surrounding quotes.
|
|
212207
|
+
* When serialized with `requireWellFormed: true`, throws `DOMException` with code
|
|
212208
|
+
* `INVALID_STATE_ERR` if the value is non-empty and does not match the XML `SystemLiteral`
|
|
212209
|
+
* production (W3C DOM Parsing §3.2.1.3; XML 1.0 [11]).
|
|
211817
212210
|
* @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation
|
|
211818
212211
|
* or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()`
|
|
211819
212212
|
*
|
|
@@ -211879,18 +212272,44 @@ function requireDom () {
|
|
|
211879
212272
|
return cloneNode(this.ownerDocument||this,this,deep);
|
|
211880
212273
|
},
|
|
211881
212274
|
// Modified in DOM Level 2:
|
|
211882
|
-
|
|
211883
|
-
|
|
211884
|
-
|
|
211885
|
-
|
|
211886
|
-
|
|
211887
|
-
|
|
211888
|
-
|
|
211889
|
-
|
|
211890
|
-
|
|
211891
|
-
|
|
211892
|
-
|
|
211893
|
-
|
|
212275
|
+
/**
|
|
212276
|
+
* Puts the specified node and all of its subtree into a "normalized" form. In a normalized
|
|
212277
|
+
* subtree, no text nodes in the subtree are empty and there are no adjacent text nodes.
|
|
212278
|
+
*
|
|
212279
|
+
* Specifically, this method merges any adjacent text nodes (i.e., nodes for which `nodeType`
|
|
212280
|
+
* is `TEXT_NODE`) into a single node with the combined data. It also removes any empty text
|
|
212281
|
+
* nodes.
|
|
212282
|
+
*
|
|
212283
|
+
* This method iteratively traverses all child nodes to normalize all descendant nodes within
|
|
212284
|
+
* the subtree.
|
|
212285
|
+
*
|
|
212286
|
+
* @throws {DOMException}
|
|
212287
|
+
* May throw a DOMException if operations within removeChild or appendData (which are
|
|
212288
|
+
* potentially invoked in this method) do not meet their specific constraints.
|
|
212289
|
+
* @see {@link Node.removeChild}
|
|
212290
|
+
* @see {@link CharacterData.appendData}
|
|
212291
|
+
* @see ../docs/walk-dom.md.
|
|
212292
|
+
*/
|
|
212293
|
+
normalize: function () {
|
|
212294
|
+
walkDOM(this, null, {
|
|
212295
|
+
enter: function (node) {
|
|
212296
|
+
// Merge adjacent text children of node before walkDOM schedules them.
|
|
212297
|
+
// walkDOM reads lastChild/previousSibling after enter returns, so the
|
|
212298
|
+
// surviving post-merge children are what it descends into.
|
|
212299
|
+
var child = node.firstChild;
|
|
212300
|
+
while (child) {
|
|
212301
|
+
var next = child.nextSibling;
|
|
212302
|
+
if (next !== null && next.nodeType === TEXT_NODE && child.nodeType === TEXT_NODE) {
|
|
212303
|
+
node.removeChild(next);
|
|
212304
|
+
child.appendData(next.data);
|
|
212305
|
+
// Do not advance child: re-check new nextSibling for another text run
|
|
212306
|
+
} else {
|
|
212307
|
+
child = next;
|
|
212308
|
+
}
|
|
212309
|
+
}
|
|
212310
|
+
return true; // descend into surviving children
|
|
212311
|
+
},
|
|
212312
|
+
});
|
|
211894
212313
|
},
|
|
211895
212314
|
// Introduced in DOM Level 2:
|
|
211896
212315
|
isSupported:function(feature, version){
|
|
@@ -211966,21 +212385,103 @@ function requireDom () {
|
|
|
211966
212385
|
copy(NodeType,Node.prototype);
|
|
211967
212386
|
|
|
211968
212387
|
/**
|
|
211969
|
-
* @param
|
|
211970
|
-
*
|
|
212388
|
+
* @param {Node} node
|
|
212389
|
+
* Root of the subtree to visit.
|
|
212390
|
+
* @param {function(Node): boolean} callback
|
|
212391
|
+
* Called for each node in depth-first pre-order. Return a truthy value to stop traversal early.
|
|
212392
|
+
* @return {boolean} `true` if traversal was aborted by the callback, `false` otherwise.
|
|
211971
212393
|
*/
|
|
211972
|
-
function _visitNode(node,callback){
|
|
211973
|
-
|
|
211974
|
-
return true;
|
|
211975
|
-
}
|
|
211976
|
-
if(node = node.firstChild){
|
|
211977
|
-
do{
|
|
211978
|
-
if(_visitNode(node,callback)){return true}
|
|
211979
|
-
}while(node=node.nextSibling)
|
|
211980
|
-
}
|
|
212394
|
+
function _visitNode(node, callback) {
|
|
212395
|
+
return walkDOM(node, null, { enter: function (n) { return callback(n) ? walkDOM.STOP : true; } }) === walkDOM.STOP;
|
|
211981
212396
|
}
|
|
211982
212397
|
|
|
212398
|
+
/**
|
|
212399
|
+
* Depth-first pre/post-order DOM tree walker.
|
|
212400
|
+
*
|
|
212401
|
+
* Visits every node in the subtree rooted at `node`. For each node:
|
|
212402
|
+
*
|
|
212403
|
+
* 1. Calls `callbacks.enter(node, context)` before descending into the node's children. The
|
|
212404
|
+
* return value becomes the `context` passed to each child's `enter` call and to the matching
|
|
212405
|
+
* `exit` call.
|
|
212406
|
+
* 2. If `enter` returns `null` or `undefined`, the node's children are skipped;
|
|
212407
|
+
* sibling traversal continues normally.
|
|
212408
|
+
* 3. If `enter` returns `walkDOM.STOP`, the entire traversal is aborted immediately — no
|
|
212409
|
+
* further `enter` or `exit` calls are made.
|
|
212410
|
+
* 4. `lastChild` and `previousSibling` are read **after** `enter` returns, so `enter` may
|
|
212411
|
+
* safely modify the node's own child list before the walker descends. Modifying siblings of
|
|
212412
|
+
* the current node or any other part of the tree produces unpredictable results: nodes already
|
|
212413
|
+
* queued on the stack are visited regardless of DOM changes, and newly inserted nodes outside
|
|
212414
|
+
* the current child list are never visited.
|
|
212415
|
+
* 5. Calls `callbacks.exit(node, context)` (if provided) after all of a node's children have
|
|
212416
|
+
* been visited, passing the same `context` that `enter`
|
|
212417
|
+
* returned for that node.
|
|
212418
|
+
*
|
|
212419
|
+
* This implementation uses an explicit stack and does not recurse — it is safe on arbitrarily
|
|
212420
|
+
* deep trees.
|
|
212421
|
+
*
|
|
212422
|
+
* @param {Node} node
|
|
212423
|
+
* Root of the subtree to walk.
|
|
212424
|
+
* @param {*} context
|
|
212425
|
+
* Initial context value passed to the root node's `enter`.
|
|
212426
|
+
* @param {{ enter: function(Node, *): *, exit?: function(Node, *): void }} callbacks
|
|
212427
|
+
* @returns {void | walkDOM.STOP}
|
|
212428
|
+
* @see ../docs/walk-dom.md.
|
|
212429
|
+
*/
|
|
212430
|
+
function walkDOM(node, context, callbacks) {
|
|
212431
|
+
// Each stack frame is {node, context, phase}:
|
|
212432
|
+
// walkDOM.ENTER — call enter, then push children
|
|
212433
|
+
// walkDOM.EXIT — call exit
|
|
212434
|
+
var stack = [{ node: node, context: context, phase: walkDOM.ENTER }];
|
|
212435
|
+
while (stack.length > 0) {
|
|
212436
|
+
var frame = stack.pop();
|
|
212437
|
+
if (frame.phase === walkDOM.ENTER) {
|
|
212438
|
+
var childContext = callbacks.enter(frame.node, frame.context);
|
|
212439
|
+
if (childContext === walkDOM.STOP) {
|
|
212440
|
+
return walkDOM.STOP;
|
|
212441
|
+
}
|
|
212442
|
+
// Push exit frame before children so it fires after all children are processed (Last In First Out)
|
|
212443
|
+
stack.push({ node: frame.node, context: childContext, phase: walkDOM.EXIT });
|
|
212444
|
+
if (childContext === null || childContext === undefined) {
|
|
212445
|
+
continue; // skip children
|
|
212446
|
+
}
|
|
212447
|
+
// lastChild is read after enter returns, so enter may modify the child list.
|
|
212448
|
+
var child = frame.node.lastChild;
|
|
212449
|
+
// Traverse from lastChild backwards so that pushing onto the stack
|
|
212450
|
+
// naturally yields firstChild on top (processed first).
|
|
212451
|
+
while (child) {
|
|
212452
|
+
stack.push({ node: child, context: childContext, phase: walkDOM.ENTER });
|
|
212453
|
+
child = child.previousSibling;
|
|
212454
|
+
}
|
|
212455
|
+
} else {
|
|
212456
|
+
// frame.phase === walkDOM.EXIT
|
|
212457
|
+
if (callbacks.exit) {
|
|
212458
|
+
callbacks.exit(frame.node, frame.context);
|
|
212459
|
+
}
|
|
212460
|
+
}
|
|
212461
|
+
}
|
|
212462
|
+
}
|
|
211983
212463
|
|
|
212464
|
+
/**
|
|
212465
|
+
* Sentinel value returned from a `walkDOM` `enter` callback to abort the entire traversal
|
|
212466
|
+
* immediately.
|
|
212467
|
+
*
|
|
212468
|
+
* @type {symbol}
|
|
212469
|
+
*/
|
|
212470
|
+
walkDOM.STOP = Symbol('walkDOM.STOP');
|
|
212471
|
+
/**
|
|
212472
|
+
* Phase constant for a stack frame that has not yet been visited.
|
|
212473
|
+
* The `enter` callback is called and children are scheduled.
|
|
212474
|
+
*
|
|
212475
|
+
* @type {number}
|
|
212476
|
+
*/
|
|
212477
|
+
walkDOM.ENTER = 0;
|
|
212478
|
+
/**
|
|
212479
|
+
* Phase constant for a stack frame whose subtree has been fully visited.
|
|
212480
|
+
* The `exit` callback is called.
|
|
212481
|
+
*
|
|
212482
|
+
* @type {number}
|
|
212483
|
+
*/
|
|
212484
|
+
walkDOM.EXIT = 1;
|
|
211984
212485
|
|
|
211985
212486
|
function Document(){
|
|
211986
212487
|
this.ownerDocument = this;
|
|
@@ -212584,12 +213085,44 @@ function requireDom () {
|
|
|
212584
213085
|
node.appendData(data);
|
|
212585
213086
|
return node;
|
|
212586
213087
|
},
|
|
213088
|
+
/**
|
|
213089
|
+
* Returns a new CDATASection node whose data is `data`.
|
|
213090
|
+
*
|
|
213091
|
+
* __This implementation differs from the specification:__
|
|
213092
|
+
* - calling this method on an HTML document does not throw `NotSupportedError`.
|
|
213093
|
+
*
|
|
213094
|
+
* @param {string} data
|
|
213095
|
+
* @returns {CDATASection}
|
|
213096
|
+
* @throws DOMException with code `INVALID_CHARACTER_ERR` if `data` contains `"]]>"`.
|
|
213097
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createCDATASection
|
|
213098
|
+
* @see https://dom.spec.whatwg.org/#dom-document-createcdatasection
|
|
213099
|
+
*/
|
|
212587
213100
|
createCDATASection : function(data){
|
|
213101
|
+
if (data.indexOf(']]>') !== -1) {
|
|
213102
|
+
throw new DOMException(INVALID_CHARACTER_ERR, 'data contains "]]>"');
|
|
213103
|
+
}
|
|
212588
213104
|
var node = new CDATASection();
|
|
212589
213105
|
node.ownerDocument = this;
|
|
212590
213106
|
node.appendData(data);
|
|
212591
213107
|
return node;
|
|
212592
213108
|
},
|
|
213109
|
+
/**
|
|
213110
|
+
* Returns a ProcessingInstruction node whose target is target and data is data.
|
|
213111
|
+
*
|
|
213112
|
+
* __This implementation differs from the specification:__
|
|
213113
|
+
* - it does not do any input validation on the arguments and doesn't throw "InvalidCharacterError".
|
|
213114
|
+
*
|
|
213115
|
+
* Note: When the resulting document is serialized with `requireWellFormed: true`, the
|
|
213116
|
+
* serializer throws with code `INVALID_STATE_ERR` if `.data` contains `?>` (W3C DOM Parsing
|
|
213117
|
+
* §3.2.1.7). Without that option the data is emitted verbatim.
|
|
213118
|
+
*
|
|
213119
|
+
* @param {string} target
|
|
213120
|
+
* @param {string} data
|
|
213121
|
+
* @returns {ProcessingInstruction}
|
|
213122
|
+
* @see https://developer.mozilla.org/docs/Web/API/Document/createProcessingInstruction
|
|
213123
|
+
* @see https://dom.spec.whatwg.org/#dom-document-createprocessinginstruction
|
|
213124
|
+
* @see https://www.w3.org/TR/DOM-Parsing/#dfn-concept-serialize-xml §3.2.1.7
|
|
213125
|
+
*/
|
|
212593
213126
|
createProcessingInstruction : function(target,data){
|
|
212594
213127
|
var node = new ProcessingInstruction();
|
|
212595
213128
|
node.ownerDocument = this;
|
|
@@ -212815,6 +213348,19 @@ function requireDom () {
|
|
|
212815
213348
|
_extends(CDATASection,CharacterData);
|
|
212816
213349
|
|
|
212817
213350
|
|
|
213351
|
+
/**
|
|
213352
|
+
* Represents a DocumentType node (the `<!DOCTYPE ...>` declaration).
|
|
213353
|
+
*
|
|
213354
|
+
* `publicId`, `systemId`, and `internalSubset` are plain own-property assignments.
|
|
213355
|
+
* xmldom does not enforce the `readonly` constraint declared by the WHATWG DOM spec —
|
|
213356
|
+
* direct property writes succeed silently. Values are serialized verbatim when
|
|
213357
|
+
* `requireWellFormed` is false (the default). When the serializer is invoked with
|
|
213358
|
+
* `requireWellFormed: true` (via the 4th-parameter options object), it validates each
|
|
213359
|
+
* field and throws `DOMException` with code `INVALID_STATE_ERR` on invalid values.
|
|
213360
|
+
*
|
|
213361
|
+
* @class
|
|
213362
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/DocumentType MDN
|
|
213363
|
+
*/
|
|
212818
213364
|
function DocumentType() {
|
|
212819
213365
|
} DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
|
|
212820
213366
|
_extends(DocumentType,Node);
|
|
@@ -212842,11 +213388,48 @@ function requireDom () {
|
|
|
212842
213388
|
ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
|
|
212843
213389
|
_extends(ProcessingInstruction,Node);
|
|
212844
213390
|
function XMLSerializer(){}
|
|
212845
|
-
|
|
212846
|
-
|
|
213391
|
+
/**
|
|
213392
|
+
* Returns the result of serializing `node` to XML.
|
|
213393
|
+
*
|
|
213394
|
+
* When `options.requireWellFormed` is `true`, the serializer throws for content that would
|
|
213395
|
+
* produce ill-formed XML.
|
|
213396
|
+
*
|
|
213397
|
+
* __This implementation differs from the specification:__
|
|
213398
|
+
* - CDATASection nodes whose data contains `]]>` are serialized by splitting the section
|
|
213399
|
+
* at each `]]>` occurrence (following W3C DOM Level 3 Core `split-cdata-sections`
|
|
213400
|
+
* default behaviour) unless `requireWellFormed` is `true`.
|
|
213401
|
+
* - when `requireWellFormed` is `true`, `DOMException` with code `INVALID_STATE_ERR`
|
|
213402
|
+
* is only thrown to prevent injection vectors, not for all the spec mandated checks.
|
|
213403
|
+
*
|
|
213404
|
+
* @param {Node} node
|
|
213405
|
+
* @param {boolean} [isHtml]
|
|
213406
|
+
* @param {function} [nodeFilter]
|
|
213407
|
+
* @param {Object} [options]
|
|
213408
|
+
* @param {boolean} [options.requireWellFormed=false]
|
|
213409
|
+
* When `true`, throws for content that would produce ill-formed XML.
|
|
213410
|
+
* @returns {string}
|
|
213411
|
+
* @throws {DOMException}
|
|
213412
|
+
* With code `INVALID_STATE_ERR` when `requireWellFormed` is `true` and:
|
|
213413
|
+
* - a CDATASection node's data contains `"]]>"`,
|
|
213414
|
+
* - a Comment node's data contains `"-->"` (bare `"--"` does not throw on this branch),
|
|
213415
|
+
* - a ProcessingInstruction's data contains `"?>"`,
|
|
213416
|
+
* - a DocumentType's `publicId` is non-empty and does not match the XML `PubidLiteral`
|
|
213417
|
+
* production,
|
|
213418
|
+
* - a DocumentType's `systemId` is non-empty and does not match the XML `SystemLiteral`
|
|
213419
|
+
* production, or
|
|
213420
|
+
* - a DocumentType's `internalSubset` contains `"]>"`.
|
|
213421
|
+
* Note: xmldom does not enforce `readonly` on DocumentType fields — direct property
|
|
213422
|
+
* writes succeed and are covered by the serializer-level checks above.
|
|
213423
|
+
* @see https://html.spec.whatwg.org/#dom-xmlserializer-serializetostring
|
|
213424
|
+
* @see https://w3c.github.io/DOM-Parsing/#xml-serialization
|
|
213425
|
+
* @see https://github.com/w3c/DOM-Parsing/issues/84
|
|
213426
|
+
*/
|
|
213427
|
+
XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter,options){
|
|
213428
|
+
return nodeSerializeToString.call(node,isHtml,nodeFilter,options);
|
|
212847
213429
|
};
|
|
212848
213430
|
Node.prototype.toString = nodeSerializeToString;
|
|
212849
|
-
function nodeSerializeToString(isHtml,nodeFilter){
|
|
213431
|
+
function nodeSerializeToString(isHtml,nodeFilter,options){
|
|
213432
|
+
var requireWellFormed = !!options && !!options.requireWellFormed;
|
|
212850
213433
|
var buf = [];
|
|
212851
213434
|
var refNode = this.nodeType == 9 && this.documentElement || this;
|
|
212852
213435
|
var prefix = refNode.prefix;
|
|
@@ -212863,7 +213446,7 @@ function requireDom () {
|
|
|
212863
213446
|
];
|
|
212864
213447
|
}
|
|
212865
213448
|
}
|
|
212866
|
-
serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);
|
|
213449
|
+
serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces,requireWellFormed);
|
|
212867
213450
|
//console.log('###',this.nodeType,uri,prefix,buf.join(''))
|
|
212868
213451
|
return buf.join('');
|
|
212869
213452
|
}
|
|
@@ -212912,271 +213495,323 @@ function requireDom () {
|
|
|
212912
213495
|
buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"');
|
|
212913
213496
|
}
|
|
212914
213497
|
|
|
212915
|
-
function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
|
|
213498
|
+
function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces, requireWellFormed) {
|
|
212916
213499
|
if (!visibleNamespaces) {
|
|
212917
213500
|
visibleNamespaces = [];
|
|
212918
213501
|
}
|
|
212919
|
-
|
|
212920
|
-
|
|
212921
|
-
|
|
212922
|
-
|
|
212923
|
-
|
|
212924
|
-
|
|
212925
|
-
|
|
212926
|
-
|
|
212927
|
-
|
|
212928
|
-
|
|
212929
|
-
|
|
212930
|
-
//buf.sort.apply(attrs, attributeSorter);
|
|
212931
|
-
}
|
|
212932
|
-
|
|
212933
|
-
switch(node.nodeType){
|
|
212934
|
-
case ELEMENT_NODE:
|
|
212935
|
-
var attrs = node.attributes;
|
|
212936
|
-
var len = attrs.length;
|
|
212937
|
-
var child = node.firstChild;
|
|
212938
|
-
var nodeName = node.tagName;
|
|
212939
|
-
|
|
212940
|
-
isHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML;
|
|
212941
|
-
|
|
212942
|
-
var prefixedNodeName = nodeName;
|
|
212943
|
-
if (!isHTML && !node.prefix && node.namespaceURI) {
|
|
212944
|
-
var defaultNS;
|
|
212945
|
-
// lookup current default ns from `xmlns` attribute
|
|
212946
|
-
for (var ai = 0; ai < attrs.length; ai++) {
|
|
212947
|
-
if (attrs.item(ai).name === 'xmlns') {
|
|
212948
|
-
defaultNS = attrs.item(ai).value;
|
|
212949
|
-
break
|
|
212950
|
-
}
|
|
212951
|
-
}
|
|
212952
|
-
if (!defaultNS) {
|
|
212953
|
-
// lookup current default ns in visibleNamespaces
|
|
212954
|
-
for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) {
|
|
212955
|
-
var namespace = visibleNamespaces[nsi];
|
|
212956
|
-
if (namespace.prefix === '' && namespace.namespace === node.namespaceURI) {
|
|
212957
|
-
defaultNS = namespace.namespace;
|
|
212958
|
-
break
|
|
213502
|
+
walkDOM(node, { ns: visibleNamespaces, isHTML: isHTML }, {
|
|
213503
|
+
enter: function (n, ctx) {
|
|
213504
|
+
var ns = ctx.ns;
|
|
213505
|
+
var html = ctx.isHTML;
|
|
213506
|
+
|
|
213507
|
+
if (nodeFilter) {
|
|
213508
|
+
n = nodeFilter(n);
|
|
213509
|
+
if (n) {
|
|
213510
|
+
if (typeof n == 'string') {
|
|
213511
|
+
buf.push(n);
|
|
213512
|
+
return null;
|
|
212959
213513
|
}
|
|
213514
|
+
} else {
|
|
213515
|
+
return null;
|
|
212960
213516
|
}
|
|
212961
213517
|
}
|
|
212962
|
-
|
|
212963
|
-
|
|
212964
|
-
|
|
212965
|
-
|
|
212966
|
-
|
|
212967
|
-
|
|
213518
|
+
|
|
213519
|
+
switch (n.nodeType) {
|
|
213520
|
+
case ELEMENT_NODE:
|
|
213521
|
+
var attrs = n.attributes;
|
|
213522
|
+
var len = attrs.length;
|
|
213523
|
+
var nodeName = n.tagName;
|
|
213524
|
+
|
|
213525
|
+
html = NAMESPACE.isHTML(n.namespaceURI) || html;
|
|
213526
|
+
|
|
213527
|
+
var prefixedNodeName = nodeName;
|
|
213528
|
+
if (!html && !n.prefix && n.namespaceURI) {
|
|
213529
|
+
var defaultNS;
|
|
213530
|
+
// lookup current default ns from `xmlns` attribute
|
|
213531
|
+
for (var ai = 0; ai < attrs.length; ai++) {
|
|
213532
|
+
if (attrs.item(ai).name === 'xmlns') {
|
|
213533
|
+
defaultNS = attrs.item(ai).value;
|
|
213534
|
+
break;
|
|
213535
|
+
}
|
|
213536
|
+
}
|
|
213537
|
+
if (!defaultNS) {
|
|
213538
|
+
// lookup current default ns in visibleNamespaces
|
|
213539
|
+
for (var nsi = ns.length - 1; nsi >= 0; nsi--) {
|
|
213540
|
+
var nsEntry = ns[nsi];
|
|
213541
|
+
if (nsEntry.prefix === '' && nsEntry.namespace === n.namespaceURI) {
|
|
213542
|
+
defaultNS = nsEntry.namespace;
|
|
213543
|
+
break;
|
|
213544
|
+
}
|
|
213545
|
+
}
|
|
213546
|
+
}
|
|
213547
|
+
if (defaultNS !== n.namespaceURI) {
|
|
213548
|
+
for (var nsi = ns.length - 1; nsi >= 0; nsi--) {
|
|
213549
|
+
var nsEntry = ns[nsi];
|
|
213550
|
+
if (nsEntry.namespace === n.namespaceURI) {
|
|
213551
|
+
if (nsEntry.prefix) {
|
|
213552
|
+
prefixedNodeName = nsEntry.prefix + ':' + nodeName;
|
|
213553
|
+
}
|
|
213554
|
+
break;
|
|
213555
|
+
}
|
|
213556
|
+
}
|
|
212968
213557
|
}
|
|
212969
|
-
break
|
|
212970
213558
|
}
|
|
212971
|
-
}
|
|
212972
|
-
}
|
|
212973
|
-
}
|
|
212974
213559
|
|
|
212975
|
-
|
|
213560
|
+
buf.push('<', prefixedNodeName);
|
|
213561
|
+
|
|
213562
|
+
// Build a fresh namespace snapshot for this element's children.
|
|
213563
|
+
// The slice prevents sibling elements from inheriting each other's declarations.
|
|
213564
|
+
var childNs = ns.slice();
|
|
213565
|
+
for (var i = 0; i < len; i++) {
|
|
213566
|
+
var attr = attrs.item(i);
|
|
213567
|
+
if (attr.prefix == 'xmlns') {
|
|
213568
|
+
childNs.push({ prefix: attr.localName, namespace: attr.value });
|
|
213569
|
+
} else if (attr.nodeName == 'xmlns') {
|
|
213570
|
+
childNs.push({ prefix: '', namespace: attr.value });
|
|
213571
|
+
}
|
|
213572
|
+
}
|
|
212976
213573
|
|
|
212977
|
-
|
|
212978
|
-
|
|
212979
|
-
|
|
212980
|
-
|
|
212981
|
-
|
|
212982
|
-
|
|
212983
|
-
|
|
212984
|
-
|
|
212985
|
-
|
|
213574
|
+
for (var i = 0; i < len; i++) {
|
|
213575
|
+
var attr = attrs.item(i);
|
|
213576
|
+
if (needNamespaceDefine(attr, html, childNs)) {
|
|
213577
|
+
var attrPrefix = attr.prefix || '';
|
|
213578
|
+
var uri = attr.namespaceURI;
|
|
213579
|
+
addSerializedAttribute(buf, attrPrefix ? 'xmlns:' + attrPrefix : 'xmlns', uri);
|
|
213580
|
+
childNs.push({ prefix: attrPrefix, namespace: uri });
|
|
213581
|
+
}
|
|
213582
|
+
// Apply nodeFilter and serialize the attribute.
|
|
213583
|
+
var filteredAttr = nodeFilter ? nodeFilter(attr) : attr;
|
|
213584
|
+
if (filteredAttr) {
|
|
213585
|
+
if (typeof filteredAttr === 'string') {
|
|
213586
|
+
buf.push(filteredAttr);
|
|
213587
|
+
} else {
|
|
213588
|
+
addSerializedAttribute(buf, filteredAttr.name, filteredAttr.value);
|
|
213589
|
+
}
|
|
213590
|
+
}
|
|
213591
|
+
}
|
|
212986
213592
|
|
|
212987
|
-
|
|
212988
|
-
|
|
212989
|
-
|
|
212990
|
-
|
|
212991
|
-
|
|
212992
|
-
|
|
212993
|
-
|
|
212994
|
-
}
|
|
212995
|
-
serializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);
|
|
212996
|
-
}
|
|
213593
|
+
// add namespace for current node
|
|
213594
|
+
if (nodeName === prefixedNodeName && needNamespaceDefine(n, html, childNs)) {
|
|
213595
|
+
var nodePrefix = n.prefix || '';
|
|
213596
|
+
var uri = n.namespaceURI;
|
|
213597
|
+
addSerializedAttribute(buf, nodePrefix ? 'xmlns:' + nodePrefix : 'xmlns', uri);
|
|
213598
|
+
childNs.push({ prefix: nodePrefix, namespace: uri });
|
|
213599
|
+
}
|
|
212997
213600
|
|
|
212998
|
-
|
|
212999
|
-
|
|
213000
|
-
|
|
213001
|
-
|
|
213002
|
-
|
|
213003
|
-
|
|
213004
|
-
|
|
213601
|
+
var child = n.firstChild;
|
|
213602
|
+
if (child || html && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) {
|
|
213603
|
+
buf.push('>');
|
|
213604
|
+
if (html && /^script$/i.test(nodeName)) {
|
|
213605
|
+
// Inline serialization for <script> children; return null to skip walkDOM descent.
|
|
213606
|
+
while (child) {
|
|
213607
|
+
if (child.data) {
|
|
213608
|
+
buf.push(child.data);
|
|
213609
|
+
} else {
|
|
213610
|
+
serializeToString(child, buf, html, nodeFilter, childNs.slice(), requireWellFormed);
|
|
213611
|
+
}
|
|
213612
|
+
child = child.nextSibling;
|
|
213613
|
+
}
|
|
213614
|
+
buf.push('</', nodeName, '>');
|
|
213615
|
+
return null;
|
|
213616
|
+
}
|
|
213617
|
+
// Return child context; walkDOM descends and exit emits the closing tag.
|
|
213618
|
+
return { ns: childNs, isHTML: html, tag: prefixedNodeName };
|
|
213619
|
+
} else {
|
|
213620
|
+
buf.push('/>');
|
|
213621
|
+
return null;
|
|
213622
|
+
}
|
|
213005
213623
|
|
|
213006
|
-
|
|
213007
|
-
|
|
213008
|
-
|
|
213009
|
-
|
|
213010
|
-
|
|
213011
|
-
|
|
213012
|
-
|
|
213013
|
-
|
|
213014
|
-
|
|
213624
|
+
case DOCUMENT_NODE:
|
|
213625
|
+
case DOCUMENT_FRAGMENT_NODE:
|
|
213626
|
+
// Descend into children; exit is a no-op (tag is null).
|
|
213627
|
+
return { ns: ns.slice(), isHTML: html, tag: null };
|
|
213628
|
+
|
|
213629
|
+
case ATTRIBUTE_NODE:
|
|
213630
|
+
addSerializedAttribute(buf, n.name, n.value);
|
|
213631
|
+
return null;
|
|
213632
|
+
|
|
213633
|
+
case TEXT_NODE:
|
|
213634
|
+
/**
|
|
213635
|
+
* The ampersand character (&) and the left angle bracket (<) must not appear in their literal form,
|
|
213636
|
+
* except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section.
|
|
213637
|
+
* If they are needed elsewhere, they must be escaped using either numeric character references or the strings
|
|
213638
|
+
* `&` and `<` respectively.
|
|
213639
|
+
* The right angle bracket (>) may be represented using the string " > ", and must, for compatibility,
|
|
213640
|
+
* be escaped using either `>` or a character reference when it appears in the string `]]>` in content,
|
|
213641
|
+
* when that string is not marking the end of a CDATA section.
|
|
213642
|
+
*
|
|
213643
|
+
* In the content of elements, character data is any string of characters
|
|
213644
|
+
* which does not contain the start-delimiter of any markup
|
|
213645
|
+
* and does not include the CDATA-section-close delimiter, `]]>`.
|
|
213646
|
+
*
|
|
213647
|
+
* @see https://www.w3.org/TR/xml/#NT-CharData
|
|
213648
|
+
* @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
|
|
213649
|
+
*/
|
|
213650
|
+
buf.push(n.data.replace(/[<&>]/g, _xmlEncoder));
|
|
213651
|
+
return null;
|
|
213652
|
+
|
|
213653
|
+
case CDATA_SECTION_NODE:
|
|
213654
|
+
if (requireWellFormed && n.data.indexOf(']]>') !== -1) {
|
|
213655
|
+
throw new DOMException(INVALID_STATE_ERR, 'The CDATASection data contains "]]>"');
|
|
213015
213656
|
}
|
|
213016
|
-
|
|
213017
|
-
|
|
213018
|
-
|
|
213019
|
-
|
|
213020
|
-
|
|
213021
|
-
|
|
213022
|
-
|
|
213023
|
-
|
|
213024
|
-
|
|
213025
|
-
|
|
213026
|
-
|
|
213027
|
-
|
|
213028
|
-
|
|
213029
|
-
|
|
213030
|
-
|
|
213031
|
-
|
|
213032
|
-
|
|
213033
|
-
|
|
213034
|
-
|
|
213035
|
-
|
|
213036
|
-
|
|
213037
|
-
|
|
213038
|
-
|
|
213039
|
-
|
|
213040
|
-
|
|
213041
|
-
|
|
213042
|
-
|
|
213043
|
-
|
|
213044
|
-
|
|
213045
|
-
|
|
213046
|
-
|
|
213047
|
-
|
|
213048
|
-
|
|
213049
|
-
|
|
213050
|
-
|
|
213051
|
-
|
|
213052
|
-
|
|
213053
|
-
|
|
213054
|
-
|
|
213055
|
-
|
|
213056
|
-
|
|
213057
|
-
|
|
213058
|
-
|
|
213059
|
-
|
|
213060
|
-
|
|
213061
|
-
|
|
213062
|
-
|
|
213063
|
-
|
|
213064
|
-
|
|
213065
|
-
|
|
213066
|
-
|
|
213067
|
-
|
|
213068
|
-
|
|
213069
|
-
|
|
213070
|
-
|
|
213071
|
-
|
|
213072
|
-
|
|
213073
|
-
|
|
213657
|
+
buf.push('<![CDATA[', n.data.replace(/]]>/g, ']]]]><![CDATA[>'), ']]>');
|
|
213658
|
+
return null;
|
|
213659
|
+
|
|
213660
|
+
case COMMENT_NODE:
|
|
213661
|
+
if (requireWellFormed && n.data.indexOf('-->') !== -1) {
|
|
213662
|
+
throw new DOMException(INVALID_STATE_ERR, 'The comment node data contains "-->"');
|
|
213663
|
+
}
|
|
213664
|
+
buf.push('<!--', n.data, '-->');
|
|
213665
|
+
return null;
|
|
213666
|
+
|
|
213667
|
+
case DOCUMENT_TYPE_NODE:
|
|
213668
|
+
if (requireWellFormed) {
|
|
213669
|
+
if (n.publicId && !/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(n.publicId)) {
|
|
213670
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType publicId is not a valid PubidLiteral');
|
|
213671
|
+
}
|
|
213672
|
+
if (n.systemId && !/^("[^"]*"|'[^']*')$/.test(n.systemId)) {
|
|
213673
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType systemId is not a valid SystemLiteral');
|
|
213674
|
+
}
|
|
213675
|
+
if (n.internalSubset && n.internalSubset.indexOf(']>') !== -1) {
|
|
213676
|
+
throw new DOMException(INVALID_STATE_ERR, 'DocumentType internalSubset contains "]>"');
|
|
213677
|
+
}
|
|
213678
|
+
}
|
|
213679
|
+
var pubid = n.publicId;
|
|
213680
|
+
var sysid = n.systemId;
|
|
213681
|
+
buf.push('<!DOCTYPE ', n.name);
|
|
213682
|
+
if (pubid) {
|
|
213683
|
+
buf.push(' PUBLIC ', pubid);
|
|
213684
|
+
if (sysid && sysid != '.') {
|
|
213685
|
+
buf.push(' ', sysid);
|
|
213686
|
+
}
|
|
213687
|
+
buf.push('>');
|
|
213688
|
+
} else if (sysid && sysid != '.') {
|
|
213689
|
+
buf.push(' SYSTEM ', sysid, '>');
|
|
213690
|
+
} else {
|
|
213691
|
+
var sub = n.internalSubset;
|
|
213692
|
+
if (sub) {
|
|
213693
|
+
buf.push(' [', sub, ']');
|
|
213694
|
+
}
|
|
213695
|
+
buf.push('>');
|
|
213696
|
+
}
|
|
213697
|
+
return null;
|
|
213698
|
+
|
|
213699
|
+
case PROCESSING_INSTRUCTION_NODE:
|
|
213700
|
+
if (requireWellFormed && n.data.indexOf('?>') !== -1) {
|
|
213701
|
+
throw new DOMException(INVALID_STATE_ERR, 'The ProcessingInstruction data contains "?>"');
|
|
213702
|
+
}
|
|
213703
|
+
buf.push('<?', n.target, ' ', n.data, '?>');
|
|
213704
|
+
return null;
|
|
213705
|
+
|
|
213706
|
+
case ENTITY_REFERENCE_NODE:
|
|
213707
|
+
buf.push('&', n.nodeName, ';');
|
|
213708
|
+
return null;
|
|
213709
|
+
|
|
213710
|
+
//case ENTITY_NODE:
|
|
213711
|
+
//case NOTATION_NODE:
|
|
213712
|
+
default:
|
|
213713
|
+
buf.push('??', n.nodeName);
|
|
213714
|
+
return null;
|
|
213074
213715
|
}
|
|
213075
|
-
|
|
213076
|
-
|
|
213077
|
-
|
|
213078
|
-
|
|
213079
|
-
var sub = node.internalSubset;
|
|
213080
|
-
if(sub){
|
|
213081
|
-
buf.push(" [",sub,"]");
|
|
213716
|
+
},
|
|
213717
|
+
exit: function (n, childCtx) {
|
|
213718
|
+
if (childCtx && childCtx.tag) {
|
|
213719
|
+
buf.push('</', childCtx.tag, '>');
|
|
213082
213720
|
}
|
|
213083
|
-
|
|
213084
|
-
|
|
213085
|
-
return;
|
|
213086
|
-
case PROCESSING_INSTRUCTION_NODE:
|
|
213087
|
-
return buf.push( "<?",node.target," ",node.data,"?>");
|
|
213088
|
-
case ENTITY_REFERENCE_NODE:
|
|
213089
|
-
return buf.push( '&',node.nodeName,';');
|
|
213090
|
-
//case ENTITY_NODE:
|
|
213091
|
-
//case NOTATION_NODE:
|
|
213092
|
-
default:
|
|
213093
|
-
buf.push('??',node.nodeName);
|
|
213094
|
-
}
|
|
213721
|
+
},
|
|
213722
|
+
});
|
|
213095
213723
|
}
|
|
213096
|
-
|
|
213097
|
-
|
|
213098
|
-
|
|
213099
|
-
|
|
213100
|
-
|
|
213101
|
-
|
|
213102
|
-
|
|
213103
|
-
|
|
213104
|
-
|
|
213105
|
-
|
|
213106
|
-
|
|
213107
|
-
|
|
213108
|
-
|
|
213109
|
-
|
|
213110
|
-
|
|
213111
|
-
|
|
213112
|
-
|
|
213113
|
-
|
|
213114
|
-
|
|
213115
|
-
|
|
213116
|
-
|
|
213117
|
-
|
|
213118
|
-
|
|
213119
|
-
|
|
213120
|
-
|
|
213121
|
-
|
|
213122
|
-
|
|
213123
|
-
|
|
213124
|
-
|
|
213125
|
-
|
|
213126
|
-
|
|
213127
|
-
|
|
213128
|
-
|
|
213129
|
-
|
|
213130
|
-
|
|
213131
|
-
|
|
213132
|
-
|
|
213133
|
-
var child = node.firstChild;
|
|
213134
|
-
while(child){
|
|
213135
|
-
node2.appendChild(importNode(doc,child,deep));
|
|
213136
|
-
child = child.nextSibling;
|
|
213137
|
-
}
|
|
213138
|
-
}
|
|
213139
|
-
return node2;
|
|
213724
|
+
/**
|
|
213725
|
+
* Imports a node from a different document into `doc`, creating a new copy.
|
|
213726
|
+
* Delegates to {@link walkDOM} for traversal. Each node in the subtree is shallow-cloned,
|
|
213727
|
+
* stamped with `doc` as its `ownerDocument`, and detached (`parentNode` set to `null`).
|
|
213728
|
+
* Children are imported recursively when `deep` is `true`; for {@link Attr} nodes `deep` is
|
|
213729
|
+
* always forced to `true`
|
|
213730
|
+
* because an attribute's value lives in a child text node.
|
|
213731
|
+
*
|
|
213732
|
+
* @param {Document} doc
|
|
213733
|
+
* The document that will own the imported node.
|
|
213734
|
+
* @param {Node} node
|
|
213735
|
+
* The node to import.
|
|
213736
|
+
* @param {boolean} deep
|
|
213737
|
+
* If `true`, descendants are imported recursively.
|
|
213738
|
+
* @returns {Node}
|
|
213739
|
+
* The newly imported node, now owned by `doc`.
|
|
213740
|
+
*/
|
|
213741
|
+
function importNode(doc, node, deep) {
|
|
213742
|
+
var destRoot;
|
|
213743
|
+
walkDOM(node, null, {
|
|
213744
|
+
enter: function (srcNode, destParent) {
|
|
213745
|
+
// Shallow-clone the node and stamp it into the target document.
|
|
213746
|
+
var destNode = srcNode.cloneNode(false);
|
|
213747
|
+
destNode.ownerDocument = doc;
|
|
213748
|
+
destNode.parentNode = null;
|
|
213749
|
+
// capture as the root of the imported subtree or attach to parent.
|
|
213750
|
+
if (destParent === null) {
|
|
213751
|
+
destRoot = destNode;
|
|
213752
|
+
} else {
|
|
213753
|
+
destParent.appendChild(destNode);
|
|
213754
|
+
}
|
|
213755
|
+
// ATTRIBUTE_NODE must always be imported deeply: its value lives in a child text node.
|
|
213756
|
+
var shouldDeep = srcNode.nodeType === ATTRIBUTE_NODE || deep;
|
|
213757
|
+
return shouldDeep ? destNode : null;
|
|
213758
|
+
},
|
|
213759
|
+
});
|
|
213760
|
+
return destRoot;
|
|
213140
213761
|
}
|
|
213141
213762
|
//
|
|
213142
213763
|
//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,
|
|
213143
213764
|
// attributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};
|
|
213144
|
-
function cloneNode(doc,node,deep){
|
|
213145
|
-
var
|
|
213146
|
-
|
|
213147
|
-
|
|
213148
|
-
|
|
213149
|
-
|
|
213150
|
-
|
|
213151
|
-
|
|
213765
|
+
function cloneNode(doc, node, deep) {
|
|
213766
|
+
var destRoot;
|
|
213767
|
+
walkDOM(node, null, {
|
|
213768
|
+
enter: function (srcNode, destParent) {
|
|
213769
|
+
// 1. Create a blank node of the same type and copy all scalar own properties.
|
|
213770
|
+
var destNode = new srcNode.constructor();
|
|
213771
|
+
for (var n in srcNode) {
|
|
213772
|
+
if (Object.prototype.hasOwnProperty.call(srcNode, n)) {
|
|
213773
|
+
var v = srcNode[n];
|
|
213774
|
+
if (typeof v != 'object') {
|
|
213775
|
+
if (v != destNode[n]) {
|
|
213776
|
+
destNode[n] = v;
|
|
213777
|
+
}
|
|
213778
|
+
}
|
|
213152
213779
|
}
|
|
213153
213780
|
}
|
|
213154
|
-
|
|
213155
|
-
|
|
213156
|
-
|
|
213157
|
-
|
|
213158
|
-
|
|
213159
|
-
|
|
213160
|
-
|
|
213161
|
-
|
|
213162
|
-
|
|
213163
|
-
|
|
213164
|
-
|
|
213165
|
-
|
|
213166
|
-
|
|
213167
|
-
|
|
213168
|
-
|
|
213169
|
-
|
|
213170
|
-
|
|
213171
|
-
|
|
213172
|
-
|
|
213173
|
-
|
|
213174
|
-
|
|
213175
|
-
|
|
213176
|
-
|
|
213177
|
-
|
|
213178
|
-
|
|
213179
|
-
|
|
213781
|
+
if (srcNode.childNodes) {
|
|
213782
|
+
destNode.childNodes = new NodeList();
|
|
213783
|
+
}
|
|
213784
|
+
destNode.ownerDocument = doc;
|
|
213785
|
+
// 2. Handle node-type-specific setup.
|
|
213786
|
+
// Attributes are not DOM children, so they are cloned inline here
|
|
213787
|
+
// rather than by walkDOM descent.
|
|
213788
|
+
// ATTRIBUTE_NODE forces deep=true so its own children are walked.
|
|
213789
|
+
var shouldDeep = deep;
|
|
213790
|
+
switch (destNode.nodeType) {
|
|
213791
|
+
case ELEMENT_NODE:
|
|
213792
|
+
var attrs = srcNode.attributes;
|
|
213793
|
+
var attrs2 = (destNode.attributes = new NamedNodeMap());
|
|
213794
|
+
var len = attrs.length;
|
|
213795
|
+
attrs2._ownerElement = destNode;
|
|
213796
|
+
for (var i = 0; i < len; i++) {
|
|
213797
|
+
destNode.setAttributeNode(cloneNode(doc, attrs.item(i), true));
|
|
213798
|
+
}
|
|
213799
|
+
break;
|
|
213800
|
+
case ATTRIBUTE_NODE:
|
|
213801
|
+
shouldDeep = true;
|
|
213802
|
+
}
|
|
213803
|
+
// 3. Attach to parent, or capture as the root of the cloned subtree.
|
|
213804
|
+
if (destParent !== null) {
|
|
213805
|
+
destParent.appendChild(destNode);
|
|
213806
|
+
} else {
|
|
213807
|
+
destRoot = destNode;
|
|
213808
|
+
}
|
|
213809
|
+
// 4. Return destNode as the context for children (causes walkDOM to descend),
|
|
213810
|
+
// or null to skip children (shallow clone).
|
|
213811
|
+
return shouldDeep ? destNode : null;
|
|
213812
|
+
},
|
|
213813
|
+
});
|
|
213814
|
+
return destRoot;
|
|
213180
213815
|
}
|
|
213181
213816
|
|
|
213182
213817
|
function __set__(object,key,value){
|
|
@@ -213192,49 +213827,55 @@ function requireDom () {
|
|
|
213192
213827
|
}
|
|
213193
213828
|
});
|
|
213194
213829
|
|
|
213195
|
-
|
|
213196
|
-
|
|
213197
|
-
|
|
213830
|
+
/**
|
|
213831
|
+
* The text content of this node and its descendants.
|
|
213832
|
+
*
|
|
213833
|
+
* Setting `textContent` on an element or document fragment replaces all child nodes with a
|
|
213834
|
+
* single text node; on other nodes it sets `data`, `value`, and `nodeValue` directly.
|
|
213835
|
+
*
|
|
213836
|
+
* @type {string | null}
|
|
213837
|
+
* @see {@link https://dom.spec.whatwg.org/#dom-node-textcontent}
|
|
213838
|
+
*/
|
|
213839
|
+
Object.defineProperty(Node.prototype, 'textContent', {
|
|
213840
|
+
get: function () {
|
|
213841
|
+
if (this.nodeType === ELEMENT_NODE || this.nodeType === DOCUMENT_FRAGMENT_NODE) {
|
|
213842
|
+
var buf = [];
|
|
213843
|
+
walkDOM(this, null, {
|
|
213844
|
+
enter: function (n) {
|
|
213845
|
+
if (n.nodeType === ELEMENT_NODE || n.nodeType === DOCUMENT_FRAGMENT_NODE) {
|
|
213846
|
+
return true; // enter children
|
|
213847
|
+
}
|
|
213848
|
+
if (n.nodeType === PROCESSING_INSTRUCTION_NODE || n.nodeType === COMMENT_NODE) {
|
|
213849
|
+
return null; // excluded from text content
|
|
213850
|
+
}
|
|
213851
|
+
buf.push(n.nodeValue);
|
|
213852
|
+
},
|
|
213853
|
+
});
|
|
213854
|
+
return buf.join('');
|
|
213855
|
+
}
|
|
213856
|
+
return this.nodeValue;
|
|
213198
213857
|
},
|
|
213199
213858
|
|
|
213200
|
-
set:function(data){
|
|
213201
|
-
switch(this.nodeType){
|
|
213202
|
-
|
|
213203
|
-
|
|
213204
|
-
|
|
213205
|
-
|
|
213206
|
-
|
|
213207
|
-
|
|
213208
|
-
|
|
213209
|
-
|
|
213210
|
-
|
|
213859
|
+
set: function (data) {
|
|
213860
|
+
switch (this.nodeType) {
|
|
213861
|
+
case ELEMENT_NODE:
|
|
213862
|
+
case DOCUMENT_FRAGMENT_NODE:
|
|
213863
|
+
while (this.firstChild) {
|
|
213864
|
+
this.removeChild(this.firstChild);
|
|
213865
|
+
}
|
|
213866
|
+
if (data || String(data)) {
|
|
213867
|
+
this.appendChild(this.ownerDocument.createTextNode(data));
|
|
213868
|
+
}
|
|
213869
|
+
break;
|
|
213211
213870
|
|
|
213212
|
-
|
|
213213
|
-
|
|
213214
|
-
|
|
213215
|
-
|
|
213871
|
+
default:
|
|
213872
|
+
this.data = data;
|
|
213873
|
+
this.value = data;
|
|
213874
|
+
this.nodeValue = data;
|
|
213216
213875
|
}
|
|
213217
|
-
}
|
|
213876
|
+
},
|
|
213218
213877
|
});
|
|
213219
213878
|
|
|
213220
|
-
function getTextContent(node){
|
|
213221
|
-
switch(node.nodeType){
|
|
213222
|
-
case ELEMENT_NODE:
|
|
213223
|
-
case DOCUMENT_FRAGMENT_NODE:
|
|
213224
|
-
var buf = [];
|
|
213225
|
-
node = node.firstChild;
|
|
213226
|
-
while(node){
|
|
213227
|
-
if(node.nodeType!==7 && node.nodeType !==8){
|
|
213228
|
-
buf.push(getTextContent(node));
|
|
213229
|
-
}
|
|
213230
|
-
node = node.nextSibling;
|
|
213231
|
-
}
|
|
213232
|
-
return buf.join('');
|
|
213233
|
-
default:
|
|
213234
|
-
return node.nodeValue;
|
|
213235
|
-
}
|
|
213236
|
-
}
|
|
213237
|
-
|
|
213238
213879
|
__set__ = function(object,key,value){
|
|
213239
213880
|
//console.log(value)
|
|
213240
213881
|
object['$$'+key] = value;
|
|
@@ -213250,6 +213891,7 @@ function requireDom () {
|
|
|
213250
213891
|
dom.Element = Element;
|
|
213251
213892
|
dom.Node = Node;
|
|
213252
213893
|
dom.NodeList = NodeList;
|
|
213894
|
+
dom.walkDOM = walkDOM;
|
|
213253
213895
|
dom.XMLSerializer = XMLSerializer;
|
|
213254
213896
|
//}
|
|
213255
213897
|
return dom;
|
|
@@ -216040,7 +216682,7 @@ function requireSax () {
|
|
|
216040
216682
|
function parseInstruction(source,start,domBuilder){
|
|
216041
216683
|
var end = source.indexOf('?>',start);
|
|
216042
216684
|
if(end){
|
|
216043
|
-
var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)
|
|
216685
|
+
var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)$/);
|
|
216044
216686
|
if(match){
|
|
216045
216687
|
match[0].length;
|
|
216046
216688
|
domBuilder.processingInstruction(match[1], match[2]) ;
|