axe-core 4.7.2-canary.fcf76e0 → 4.8.0-canary.2f1bb0c
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/axe.js +1527 -813
- package/axe.min.js +2 -2
- package/locales/_template.json +12 -12
- package/locales/fr.json +14 -6
- package/locales/ja.json +273 -235
- package/locales/pl.json +280 -138
- package/package.json +1 -1
- package/sri-history.json +7 -3
package/axe.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! axe v4.
|
|
1
|
+
/*! axe v4.8.0-canary.2f1bb0c
|
|
2
2
|
* Copyright (c) 2015 - 2023 Deque Systems, Inc.
|
|
3
3
|
*
|
|
4
4
|
* Your use of this Source Code Form is subject to the terms of the Mozilla Public
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}, _typeof(obj);
|
|
23
23
|
}
|
|
24
24
|
var axe = axe || {};
|
|
25
|
-
axe.version = '4.
|
|
25
|
+
axe.version = '4.8.0-canary.2f1bb0c';
|
|
26
26
|
if (typeof define === 'function' && define.amd) {
|
|
27
27
|
define('axe-core', [], function() {
|
|
28
28
|
return axe;
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
SupportError.prototype = Object.create(Error.prototype);
|
|
50
50
|
SupportError.prototype.constructor = SupportError;
|
|
51
51
|
'use strict';
|
|
52
|
-
var _excluded = [ 'node' ], _excluded2 = [ '
|
|
52
|
+
var _excluded = [ 'node' ], _excluded2 = [ 'relatedNodes' ], _excluded3 = [ 'node' ], _excluded4 = [ 'variant' ], _excluded5 = [ 'matches' ], _excluded6 = [ 'chromium' ], _excluded7 = [ 'noImplicit' ], _excluded8 = [ 'noPresentational' ], _excluded9 = [ 'precision', 'format', 'inGamut' ], _excluded10 = [ 'space' ], _excluded11 = [ 'algorithm' ], _excluded12 = [ 'method' ], _excluded13 = [ 'maxDeltaE', 'deltaEMethod', 'steps', 'maxSteps' ], _excluded14 = [ 'node' ], _excluded15 = [ 'environmentData' ], _excluded16 = [ 'environmentData' ], _excluded17 = [ 'environmentData' ], _excluded18 = [ 'environmentData' ], _excluded19 = [ 'environmentData' ];
|
|
53
53
|
function _toArray(arr) {
|
|
54
54
|
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
|
|
55
55
|
}
|
|
@@ -1274,24 +1274,24 @@
|
|
|
1274
1274
|
symbol: true
|
|
1275
1275
|
};
|
|
1276
1276
|
module.exports = function() {
|
|
1277
|
-
var
|
|
1277
|
+
var Symbol2 = global2.Symbol;
|
|
1278
1278
|
var symbol;
|
|
1279
|
-
if (typeof
|
|
1279
|
+
if (typeof Symbol2 !== 'function') {
|
|
1280
1280
|
return false;
|
|
1281
1281
|
}
|
|
1282
|
-
symbol =
|
|
1282
|
+
symbol = Symbol2('test symbol');
|
|
1283
1283
|
try {
|
|
1284
1284
|
String(symbol);
|
|
1285
1285
|
} catch (e) {
|
|
1286
1286
|
return false;
|
|
1287
1287
|
}
|
|
1288
|
-
if (!validTypes[_typeof(
|
|
1288
|
+
if (!validTypes[_typeof(Symbol2.iterator)]) {
|
|
1289
1289
|
return false;
|
|
1290
1290
|
}
|
|
1291
|
-
if (!validTypes[_typeof(
|
|
1291
|
+
if (!validTypes[_typeof(Symbol2.toPrimitive)]) {
|
|
1292
1292
|
return false;
|
|
1293
1293
|
}
|
|
1294
|
-
if (!validTypes[_typeof(
|
|
1294
|
+
if (!validTypes[_typeof(Symbol2.toStringTag)]) {
|
|
1295
1295
|
return false;
|
|
1296
1296
|
}
|
|
1297
1297
|
return true;
|
|
@@ -1419,15 +1419,15 @@
|
|
|
1419
1419
|
} else {
|
|
1420
1420
|
NativeSymbol = null;
|
|
1421
1421
|
}
|
|
1422
|
-
HiddenSymbol = function
|
|
1422
|
+
HiddenSymbol = function Symbol2(description) {
|
|
1423
1423
|
if (this instanceof HiddenSymbol) {
|
|
1424
1424
|
throw new TypeError('Symbol is not a constructor');
|
|
1425
1425
|
}
|
|
1426
1426
|
return SymbolPolyfill(description);
|
|
1427
1427
|
};
|
|
1428
|
-
module.exports = SymbolPolyfill = function
|
|
1428
|
+
module.exports = SymbolPolyfill = function Symbol2(description) {
|
|
1429
1429
|
var symbol;
|
|
1430
|
-
if (this instanceof
|
|
1430
|
+
if (this instanceof Symbol2) {
|
|
1431
1431
|
throw new TypeError('Symbol is not a constructor');
|
|
1432
1432
|
}
|
|
1433
1433
|
if (isNativeSafe) {
|
|
@@ -4959,6 +4959,670 @@
|
|
|
4959
4959
|
}
|
|
4960
4960
|
})(typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : exports);
|
|
4961
4961
|
});
|
|
4962
|
+
var require_global = __commonJS(function(exports, module) {
|
|
4963
|
+
var check = function check(it) {
|
|
4964
|
+
return it && it.Math == Math && it;
|
|
4965
|
+
};
|
|
4966
|
+
module.exports = check((typeof globalThis === 'undefined' ? 'undefined' : _typeof(globalThis)) == 'object' && globalThis) || check((typeof window === 'undefined' ? 'undefined' : _typeof(window)) == 'object' && window) || check((typeof self === 'undefined' ? 'undefined' : _typeof(self)) == 'object' && self) || check((typeof global === 'undefined' ? 'undefined' : _typeof(global)) == 'object' && global) || function() {
|
|
4967
|
+
return this;
|
|
4968
|
+
}() || Function('return this')();
|
|
4969
|
+
});
|
|
4970
|
+
var require_fails = __commonJS(function(exports, module) {
|
|
4971
|
+
module.exports = function(exec) {
|
|
4972
|
+
try {
|
|
4973
|
+
return !!exec();
|
|
4974
|
+
} catch (error) {
|
|
4975
|
+
return true;
|
|
4976
|
+
}
|
|
4977
|
+
};
|
|
4978
|
+
});
|
|
4979
|
+
var require_function_bind_native = __commonJS(function(exports, module) {
|
|
4980
|
+
var fails = require_fails();
|
|
4981
|
+
module.exports = !fails(function() {
|
|
4982
|
+
var test = function() {}.bind();
|
|
4983
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
4984
|
+
});
|
|
4985
|
+
});
|
|
4986
|
+
var require_function_apply = __commonJS(function(exports, module) {
|
|
4987
|
+
var NATIVE_BIND = require_function_bind_native();
|
|
4988
|
+
var FunctionPrototype = Function.prototype;
|
|
4989
|
+
var apply = FunctionPrototype.apply;
|
|
4990
|
+
var call = FunctionPrototype.call;
|
|
4991
|
+
module.exports = (typeof Reflect === 'undefined' ? 'undefined' : _typeof(Reflect)) == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function() {
|
|
4992
|
+
return call.apply(apply, arguments);
|
|
4993
|
+
});
|
|
4994
|
+
});
|
|
4995
|
+
var require_function_uncurry_this = __commonJS(function(exports, module) {
|
|
4996
|
+
var NATIVE_BIND = require_function_bind_native();
|
|
4997
|
+
var FunctionPrototype = Function.prototype;
|
|
4998
|
+
var call = FunctionPrototype.call;
|
|
4999
|
+
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
|
|
5000
|
+
module.exports = NATIVE_BIND ? uncurryThisWithBind : function(fn) {
|
|
5001
|
+
return function() {
|
|
5002
|
+
return call.apply(fn, arguments);
|
|
5003
|
+
};
|
|
5004
|
+
};
|
|
5005
|
+
});
|
|
5006
|
+
var require_classof_raw = __commonJS(function(exports, module) {
|
|
5007
|
+
var uncurryThis = require_function_uncurry_this();
|
|
5008
|
+
var toString = uncurryThis({}.toString);
|
|
5009
|
+
var stringSlice = uncurryThis(''.slice);
|
|
5010
|
+
module.exports = function(it) {
|
|
5011
|
+
return stringSlice(toString(it), 8, -1);
|
|
5012
|
+
};
|
|
5013
|
+
});
|
|
5014
|
+
var require_function_uncurry_this_clause = __commonJS(function(exports, module) {
|
|
5015
|
+
var classofRaw = require_classof_raw();
|
|
5016
|
+
var uncurryThis = require_function_uncurry_this();
|
|
5017
|
+
module.exports = function(fn) {
|
|
5018
|
+
if (classofRaw(fn) === 'Function') {
|
|
5019
|
+
return uncurryThis(fn);
|
|
5020
|
+
}
|
|
5021
|
+
};
|
|
5022
|
+
});
|
|
5023
|
+
var require_document_all = __commonJS(function(exports, module) {
|
|
5024
|
+
var documentAll = (typeof document === 'undefined' ? 'undefined' : _typeof(document)) == 'object' && document.all;
|
|
5025
|
+
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== void 0;
|
|
5026
|
+
module.exports = {
|
|
5027
|
+
all: documentAll,
|
|
5028
|
+
IS_HTMLDDA: IS_HTMLDDA
|
|
5029
|
+
};
|
|
5030
|
+
});
|
|
5031
|
+
var require_is_callable2 = __commonJS(function(exports, module) {
|
|
5032
|
+
var $documentAll = require_document_all();
|
|
5033
|
+
var documentAll = $documentAll.all;
|
|
5034
|
+
module.exports = $documentAll.IS_HTMLDDA ? function(argument) {
|
|
5035
|
+
return typeof argument == 'function' || argument === documentAll;
|
|
5036
|
+
} : function(argument) {
|
|
5037
|
+
return typeof argument == 'function';
|
|
5038
|
+
};
|
|
5039
|
+
});
|
|
5040
|
+
var require_descriptors = __commonJS(function(exports, module) {
|
|
5041
|
+
var fails = require_fails();
|
|
5042
|
+
module.exports = !fails(function() {
|
|
5043
|
+
return Object.defineProperty({}, 1, {
|
|
5044
|
+
get: function get() {
|
|
5045
|
+
return 7;
|
|
5046
|
+
}
|
|
5047
|
+
})[1] != 7;
|
|
5048
|
+
});
|
|
5049
|
+
});
|
|
5050
|
+
var require_function_call = __commonJS(function(exports, module) {
|
|
5051
|
+
var NATIVE_BIND = require_function_bind_native();
|
|
5052
|
+
var call = Function.prototype.call;
|
|
5053
|
+
module.exports = NATIVE_BIND ? call.bind(call) : function() {
|
|
5054
|
+
return call.apply(call, arguments);
|
|
5055
|
+
};
|
|
5056
|
+
});
|
|
5057
|
+
var require_object_property_is_enumerable = __commonJS(function(exports) {
|
|
5058
|
+
'use strict';
|
|
5059
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
5060
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
5061
|
+
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({
|
|
5062
|
+
1: 2
|
|
5063
|
+
}, 1);
|
|
5064
|
+
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
5065
|
+
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
5066
|
+
return !!descriptor && descriptor.enumerable;
|
|
5067
|
+
} : $propertyIsEnumerable;
|
|
5068
|
+
});
|
|
5069
|
+
var require_create_property_descriptor = __commonJS(function(exports, module) {
|
|
5070
|
+
module.exports = function(bitmap, value) {
|
|
5071
|
+
return {
|
|
5072
|
+
enumerable: !(bitmap & 1),
|
|
5073
|
+
configurable: !(bitmap & 2),
|
|
5074
|
+
writable: !(bitmap & 4),
|
|
5075
|
+
value: value
|
|
5076
|
+
};
|
|
5077
|
+
};
|
|
5078
|
+
});
|
|
5079
|
+
var require_indexed_object = __commonJS(function(exports, module) {
|
|
5080
|
+
var uncurryThis = require_function_uncurry_this();
|
|
5081
|
+
var fails = require_fails();
|
|
5082
|
+
var classof = require_classof_raw();
|
|
5083
|
+
var $Object = Object;
|
|
5084
|
+
var split = uncurryThis(''.split);
|
|
5085
|
+
module.exports = fails(function() {
|
|
5086
|
+
return !$Object('z').propertyIsEnumerable(0);
|
|
5087
|
+
}) ? function(it) {
|
|
5088
|
+
return classof(it) == 'String' ? split(it, '') : $Object(it);
|
|
5089
|
+
} : $Object;
|
|
5090
|
+
});
|
|
5091
|
+
var require_is_null_or_undefined = __commonJS(function(exports, module) {
|
|
5092
|
+
module.exports = function(it) {
|
|
5093
|
+
return it === null || it === void 0;
|
|
5094
|
+
};
|
|
5095
|
+
});
|
|
5096
|
+
var require_require_object_coercible = __commonJS(function(exports, module) {
|
|
5097
|
+
var isNullOrUndefined = require_is_null_or_undefined();
|
|
5098
|
+
var $TypeError = TypeError;
|
|
5099
|
+
module.exports = function(it) {
|
|
5100
|
+
if (isNullOrUndefined(it)) {
|
|
5101
|
+
throw $TypeError('Can\'t call method on ' + it);
|
|
5102
|
+
}
|
|
5103
|
+
return it;
|
|
5104
|
+
};
|
|
5105
|
+
});
|
|
5106
|
+
var require_to_indexed_object = __commonJS(function(exports, module) {
|
|
5107
|
+
var IndexedObject = require_indexed_object();
|
|
5108
|
+
var requireObjectCoercible = require_require_object_coercible();
|
|
5109
|
+
module.exports = function(it) {
|
|
5110
|
+
return IndexedObject(requireObjectCoercible(it));
|
|
5111
|
+
};
|
|
5112
|
+
});
|
|
5113
|
+
var require_is_object2 = __commonJS(function(exports, module) {
|
|
5114
|
+
var isCallable = require_is_callable2();
|
|
5115
|
+
var $documentAll = require_document_all();
|
|
5116
|
+
var documentAll = $documentAll.all;
|
|
5117
|
+
module.exports = $documentAll.IS_HTMLDDA ? function(it) {
|
|
5118
|
+
return _typeof(it) == 'object' ? it !== null : isCallable(it) || it === documentAll;
|
|
5119
|
+
} : function(it) {
|
|
5120
|
+
return _typeof(it) == 'object' ? it !== null : isCallable(it);
|
|
5121
|
+
};
|
|
5122
|
+
});
|
|
5123
|
+
var require_path = __commonJS(function(exports, module) {
|
|
5124
|
+
module.exports = {};
|
|
5125
|
+
});
|
|
5126
|
+
var require_get_built_in = __commonJS(function(exports, module) {
|
|
5127
|
+
var path = require_path();
|
|
5128
|
+
var global2 = require_global();
|
|
5129
|
+
var isCallable = require_is_callable2();
|
|
5130
|
+
var aFunction = function aFunction(variable) {
|
|
5131
|
+
return isCallable(variable) ? variable : void 0;
|
|
5132
|
+
};
|
|
5133
|
+
module.exports = function(namespace, method) {
|
|
5134
|
+
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global2[namespace]) : path[namespace] && path[namespace][method] || global2[namespace] && global2[namespace][method];
|
|
5135
|
+
};
|
|
5136
|
+
});
|
|
5137
|
+
var require_object_is_prototype_of = __commonJS(function(exports, module) {
|
|
5138
|
+
var uncurryThis = require_function_uncurry_this();
|
|
5139
|
+
module.exports = uncurryThis({}.isPrototypeOf);
|
|
5140
|
+
});
|
|
5141
|
+
var require_engine_user_agent = __commonJS(function(exports, module) {
|
|
5142
|
+
var getBuiltIn = require_get_built_in();
|
|
5143
|
+
module.exports = getBuiltIn('navigator', 'userAgent') || '';
|
|
5144
|
+
});
|
|
5145
|
+
var require_engine_v8_version = __commonJS(function(exports, module) {
|
|
5146
|
+
var global2 = require_global();
|
|
5147
|
+
var userAgent = require_engine_user_agent();
|
|
5148
|
+
var process2 = global2.process;
|
|
5149
|
+
var Deno = global2.Deno;
|
|
5150
|
+
var versions = process2 && process2.versions || Deno && Deno.version;
|
|
5151
|
+
var v8 = versions && versions.v8;
|
|
5152
|
+
var match;
|
|
5153
|
+
var version;
|
|
5154
|
+
if (v8) {
|
|
5155
|
+
match = v8.split('.');
|
|
5156
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
5157
|
+
}
|
|
5158
|
+
if (!version && userAgent) {
|
|
5159
|
+
match = userAgent.match(/Edge\/(\d+)/);
|
|
5160
|
+
if (!match || match[1] >= 74) {
|
|
5161
|
+
match = userAgent.match(/Chrome\/(\d+)/);
|
|
5162
|
+
if (match) {
|
|
5163
|
+
version = +match[1];
|
|
5164
|
+
}
|
|
5165
|
+
}
|
|
5166
|
+
}
|
|
5167
|
+
module.exports = version;
|
|
5168
|
+
});
|
|
5169
|
+
var require_symbol_constructor_detection = __commonJS(function(exports, module) {
|
|
5170
|
+
var V8_VERSION = require_engine_v8_version();
|
|
5171
|
+
var fails = require_fails();
|
|
5172
|
+
module.exports = !!Object.getOwnPropertySymbols && !fails(function() {
|
|
5173
|
+
var symbol = Symbol();
|
|
5174
|
+
return !String(symbol) || !(Object(symbol) instanceof Symbol) || !Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
5175
|
+
});
|
|
5176
|
+
});
|
|
5177
|
+
var require_use_symbol_as_uid = __commonJS(function(exports, module) {
|
|
5178
|
+
var NATIVE_SYMBOL = require_symbol_constructor_detection();
|
|
5179
|
+
module.exports = NATIVE_SYMBOL && !Symbol.sham && _typeof(Symbol.iterator) == 'symbol';
|
|
5180
|
+
});
|
|
5181
|
+
var require_is_symbol2 = __commonJS(function(exports, module) {
|
|
5182
|
+
var getBuiltIn = require_get_built_in();
|
|
5183
|
+
var isCallable = require_is_callable2();
|
|
5184
|
+
var isPrototypeOf = require_object_is_prototype_of();
|
|
5185
|
+
var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
|
|
5186
|
+
var $Object = Object;
|
|
5187
|
+
module.exports = USE_SYMBOL_AS_UID ? function(it) {
|
|
5188
|
+
return _typeof(it) == 'symbol';
|
|
5189
|
+
} : function(it) {
|
|
5190
|
+
var $Symbol = getBuiltIn('Symbol');
|
|
5191
|
+
return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
|
|
5192
|
+
};
|
|
5193
|
+
});
|
|
5194
|
+
var require_try_to_string = __commonJS(function(exports, module) {
|
|
5195
|
+
var $String = String;
|
|
5196
|
+
module.exports = function(argument) {
|
|
5197
|
+
try {
|
|
5198
|
+
return $String(argument);
|
|
5199
|
+
} catch (error) {
|
|
5200
|
+
return 'Object';
|
|
5201
|
+
}
|
|
5202
|
+
};
|
|
5203
|
+
});
|
|
5204
|
+
var require_a_callable = __commonJS(function(exports, module) {
|
|
5205
|
+
var isCallable = require_is_callable2();
|
|
5206
|
+
var tryToString = require_try_to_string();
|
|
5207
|
+
var $TypeError = TypeError;
|
|
5208
|
+
module.exports = function(argument) {
|
|
5209
|
+
if (isCallable(argument)) {
|
|
5210
|
+
return argument;
|
|
5211
|
+
}
|
|
5212
|
+
throw $TypeError(tryToString(argument) + ' is not a function');
|
|
5213
|
+
};
|
|
5214
|
+
});
|
|
5215
|
+
var require_get_method = __commonJS(function(exports, module) {
|
|
5216
|
+
var aCallable = require_a_callable();
|
|
5217
|
+
var isNullOrUndefined = require_is_null_or_undefined();
|
|
5218
|
+
module.exports = function(V, P) {
|
|
5219
|
+
var func = V[P];
|
|
5220
|
+
return isNullOrUndefined(func) ? void 0 : aCallable(func);
|
|
5221
|
+
};
|
|
5222
|
+
});
|
|
5223
|
+
var require_ordinary_to_primitive = __commonJS(function(exports, module) {
|
|
5224
|
+
var call = require_function_call();
|
|
5225
|
+
var isCallable = require_is_callable2();
|
|
5226
|
+
var isObject = require_is_object2();
|
|
5227
|
+
var $TypeError = TypeError;
|
|
5228
|
+
module.exports = function(input, pref) {
|
|
5229
|
+
var fn, val;
|
|
5230
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) {
|
|
5231
|
+
return val;
|
|
5232
|
+
}
|
|
5233
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) {
|
|
5234
|
+
return val;
|
|
5235
|
+
}
|
|
5236
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) {
|
|
5237
|
+
return val;
|
|
5238
|
+
}
|
|
5239
|
+
throw $TypeError('Can\'t convert object to primitive value');
|
|
5240
|
+
};
|
|
5241
|
+
});
|
|
5242
|
+
var require_is_pure = __commonJS(function(exports, module) {
|
|
5243
|
+
module.exports = true;
|
|
5244
|
+
});
|
|
5245
|
+
var require_define_global_property = __commonJS(function(exports, module) {
|
|
5246
|
+
var global2 = require_global();
|
|
5247
|
+
var defineProperty = Object.defineProperty;
|
|
5248
|
+
module.exports = function(key, value) {
|
|
5249
|
+
try {
|
|
5250
|
+
defineProperty(global2, key, {
|
|
5251
|
+
value: value,
|
|
5252
|
+
configurable: true,
|
|
5253
|
+
writable: true
|
|
5254
|
+
});
|
|
5255
|
+
} catch (error) {
|
|
5256
|
+
global2[key] = value;
|
|
5257
|
+
}
|
|
5258
|
+
return value;
|
|
5259
|
+
};
|
|
5260
|
+
});
|
|
5261
|
+
var require_shared_store = __commonJS(function(exports, module) {
|
|
5262
|
+
var global2 = require_global();
|
|
5263
|
+
var defineGlobalProperty = require_define_global_property();
|
|
5264
|
+
var SHARED = '__core-js_shared__';
|
|
5265
|
+
var store = global2[SHARED] || defineGlobalProperty(SHARED, {});
|
|
5266
|
+
module.exports = store;
|
|
5267
|
+
});
|
|
5268
|
+
var require_shared = __commonJS(function(exports, module) {
|
|
5269
|
+
var IS_PURE = require_is_pure();
|
|
5270
|
+
var store = require_shared_store();
|
|
5271
|
+
(module.exports = function(key, value) {
|
|
5272
|
+
return store[key] || (store[key] = value !== void 0 ? value : {});
|
|
5273
|
+
})('versions', []).push({
|
|
5274
|
+
version: '3.26.1',
|
|
5275
|
+
mode: IS_PURE ? 'pure' : 'global',
|
|
5276
|
+
copyright: '\xa9 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
5277
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
|
|
5278
|
+
source: 'https://github.com/zloirock/core-js'
|
|
5279
|
+
});
|
|
5280
|
+
});
|
|
5281
|
+
var require_to_object = __commonJS(function(exports, module) {
|
|
5282
|
+
var requireObjectCoercible = require_require_object_coercible();
|
|
5283
|
+
var $Object = Object;
|
|
5284
|
+
module.exports = function(argument) {
|
|
5285
|
+
return $Object(requireObjectCoercible(argument));
|
|
5286
|
+
};
|
|
5287
|
+
});
|
|
5288
|
+
var require_has_own_property = __commonJS(function(exports, module) {
|
|
5289
|
+
var uncurryThis = require_function_uncurry_this();
|
|
5290
|
+
var toObject = require_to_object();
|
|
5291
|
+
var hasOwnProperty2 = uncurryThis({}.hasOwnProperty);
|
|
5292
|
+
module.exports = Object.hasOwn || function hasOwn2(it, key) {
|
|
5293
|
+
return hasOwnProperty2(toObject(it), key);
|
|
5294
|
+
};
|
|
5295
|
+
});
|
|
5296
|
+
var require_uid = __commonJS(function(exports, module) {
|
|
5297
|
+
var uncurryThis = require_function_uncurry_this();
|
|
5298
|
+
var id = 0;
|
|
5299
|
+
var postfix = Math.random();
|
|
5300
|
+
var toString = uncurryThis(1..toString);
|
|
5301
|
+
module.exports = function(key) {
|
|
5302
|
+
return 'Symbol(' + (key === void 0 ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
5303
|
+
};
|
|
5304
|
+
});
|
|
5305
|
+
var require_well_known_symbol = __commonJS(function(exports, module) {
|
|
5306
|
+
var global2 = require_global();
|
|
5307
|
+
var shared = require_shared();
|
|
5308
|
+
var hasOwn2 = require_has_own_property();
|
|
5309
|
+
var uid = require_uid();
|
|
5310
|
+
var NATIVE_SYMBOL = require_symbol_constructor_detection();
|
|
5311
|
+
var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
|
|
5312
|
+
var WellKnownSymbolsStore = shared('wks');
|
|
5313
|
+
var Symbol2 = global2.Symbol;
|
|
5314
|
+
var symbolFor = Symbol2 && Symbol2['for'];
|
|
5315
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol2 : Symbol2 && Symbol2.withoutSetter || uid;
|
|
5316
|
+
module.exports = function(name) {
|
|
5317
|
+
if (!hasOwn2(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
5318
|
+
var description = 'Symbol.' + name;
|
|
5319
|
+
if (NATIVE_SYMBOL && hasOwn2(Symbol2, name)) {
|
|
5320
|
+
WellKnownSymbolsStore[name] = Symbol2[name];
|
|
5321
|
+
} else if (USE_SYMBOL_AS_UID && symbolFor) {
|
|
5322
|
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
5323
|
+
} else {
|
|
5324
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
5325
|
+
}
|
|
5326
|
+
}
|
|
5327
|
+
return WellKnownSymbolsStore[name];
|
|
5328
|
+
};
|
|
5329
|
+
});
|
|
5330
|
+
var require_to_primitive = __commonJS(function(exports, module) {
|
|
5331
|
+
var call = require_function_call();
|
|
5332
|
+
var isObject = require_is_object2();
|
|
5333
|
+
var isSymbol = require_is_symbol2();
|
|
5334
|
+
var getMethod = require_get_method();
|
|
5335
|
+
var ordinaryToPrimitive = require_ordinary_to_primitive();
|
|
5336
|
+
var wellKnownSymbol = require_well_known_symbol();
|
|
5337
|
+
var $TypeError = TypeError;
|
|
5338
|
+
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
5339
|
+
module.exports = function(input, pref) {
|
|
5340
|
+
if (!isObject(input) || isSymbol(input)) {
|
|
5341
|
+
return input;
|
|
5342
|
+
}
|
|
5343
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
5344
|
+
var result;
|
|
5345
|
+
if (exoticToPrim) {
|
|
5346
|
+
if (pref === void 0) {
|
|
5347
|
+
pref = 'default';
|
|
5348
|
+
}
|
|
5349
|
+
result = call(exoticToPrim, input, pref);
|
|
5350
|
+
if (!isObject(result) || isSymbol(result)) {
|
|
5351
|
+
return result;
|
|
5352
|
+
}
|
|
5353
|
+
throw $TypeError('Can\'t convert object to primitive value');
|
|
5354
|
+
}
|
|
5355
|
+
if (pref === void 0) {
|
|
5356
|
+
pref = 'number';
|
|
5357
|
+
}
|
|
5358
|
+
return ordinaryToPrimitive(input, pref);
|
|
5359
|
+
};
|
|
5360
|
+
});
|
|
5361
|
+
var require_to_property_key = __commonJS(function(exports, module) {
|
|
5362
|
+
var toPrimitive = require_to_primitive();
|
|
5363
|
+
var isSymbol = require_is_symbol2();
|
|
5364
|
+
module.exports = function(argument) {
|
|
5365
|
+
var key = toPrimitive(argument, 'string');
|
|
5366
|
+
return isSymbol(key) ? key : key + '';
|
|
5367
|
+
};
|
|
5368
|
+
});
|
|
5369
|
+
var require_document_create_element = __commonJS(function(exports, module) {
|
|
5370
|
+
var global2 = require_global();
|
|
5371
|
+
var isObject = require_is_object2();
|
|
5372
|
+
var document2 = global2.document;
|
|
5373
|
+
var EXISTS = isObject(document2) && isObject(document2.createElement);
|
|
5374
|
+
module.exports = function(it) {
|
|
5375
|
+
return EXISTS ? document2.createElement(it) : {};
|
|
5376
|
+
};
|
|
5377
|
+
});
|
|
5378
|
+
var require_ie8_dom_define = __commonJS(function(exports, module) {
|
|
5379
|
+
var DESCRIPTORS = require_descriptors();
|
|
5380
|
+
var fails = require_fails();
|
|
5381
|
+
var createElement = require_document_create_element();
|
|
5382
|
+
module.exports = !DESCRIPTORS && !fails(function() {
|
|
5383
|
+
return Object.defineProperty(createElement('div'), 'a', {
|
|
5384
|
+
get: function get() {
|
|
5385
|
+
return 7;
|
|
5386
|
+
}
|
|
5387
|
+
}).a != 7;
|
|
5388
|
+
});
|
|
5389
|
+
});
|
|
5390
|
+
var require_object_get_own_property_descriptor = __commonJS(function(exports) {
|
|
5391
|
+
var DESCRIPTORS = require_descriptors();
|
|
5392
|
+
var call = require_function_call();
|
|
5393
|
+
var propertyIsEnumerableModule = require_object_property_is_enumerable();
|
|
5394
|
+
var createPropertyDescriptor = require_create_property_descriptor();
|
|
5395
|
+
var toIndexedObject = require_to_indexed_object();
|
|
5396
|
+
var toPropertyKey = require_to_property_key();
|
|
5397
|
+
var hasOwn2 = require_has_own_property();
|
|
5398
|
+
var IE8_DOM_DEFINE = require_ie8_dom_define();
|
|
5399
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
5400
|
+
exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
5401
|
+
O = toIndexedObject(O);
|
|
5402
|
+
P = toPropertyKey(P);
|
|
5403
|
+
if (IE8_DOM_DEFINE) {
|
|
5404
|
+
try {
|
|
5405
|
+
return $getOwnPropertyDescriptor(O, P);
|
|
5406
|
+
} catch (error) {}
|
|
5407
|
+
}
|
|
5408
|
+
if (hasOwn2(O, P)) {
|
|
5409
|
+
return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
|
|
5410
|
+
}
|
|
5411
|
+
};
|
|
5412
|
+
});
|
|
5413
|
+
var require_is_forced = __commonJS(function(exports, module) {
|
|
5414
|
+
var fails = require_fails();
|
|
5415
|
+
var isCallable = require_is_callable2();
|
|
5416
|
+
var replacement = /#|\.prototype\./;
|
|
5417
|
+
var isForced = function isForced(feature, detection) {
|
|
5418
|
+
var value = data[normalize(feature)];
|
|
5419
|
+
return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
|
|
5420
|
+
};
|
|
5421
|
+
var normalize = isForced.normalize = function(string) {
|
|
5422
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
5423
|
+
};
|
|
5424
|
+
var data = isForced.data = {};
|
|
5425
|
+
var NATIVE = isForced.NATIVE = 'N';
|
|
5426
|
+
var POLYFILL = isForced.POLYFILL = 'P';
|
|
5427
|
+
module.exports = isForced;
|
|
5428
|
+
});
|
|
5429
|
+
var require_function_bind_context = __commonJS(function(exports, module) {
|
|
5430
|
+
var uncurryThis = require_function_uncurry_this_clause();
|
|
5431
|
+
var aCallable = require_a_callable();
|
|
5432
|
+
var NATIVE_BIND = require_function_bind_native();
|
|
5433
|
+
var bind = uncurryThis(uncurryThis.bind);
|
|
5434
|
+
module.exports = function(fn, that) {
|
|
5435
|
+
aCallable(fn);
|
|
5436
|
+
return that === void 0 ? fn : NATIVE_BIND ? bind(fn, that) : function() {
|
|
5437
|
+
return fn.apply(that, arguments);
|
|
5438
|
+
};
|
|
5439
|
+
};
|
|
5440
|
+
});
|
|
5441
|
+
var require_v8_prototype_define_bug = __commonJS(function(exports, module) {
|
|
5442
|
+
var DESCRIPTORS = require_descriptors();
|
|
5443
|
+
var fails = require_fails();
|
|
5444
|
+
module.exports = DESCRIPTORS && fails(function() {
|
|
5445
|
+
return Object.defineProperty(function() {}, 'prototype', {
|
|
5446
|
+
value: 42,
|
|
5447
|
+
writable: false
|
|
5448
|
+
}).prototype != 42;
|
|
5449
|
+
});
|
|
5450
|
+
});
|
|
5451
|
+
var require_an_object = __commonJS(function(exports, module) {
|
|
5452
|
+
var isObject = require_is_object2();
|
|
5453
|
+
var $String = String;
|
|
5454
|
+
var $TypeError = TypeError;
|
|
5455
|
+
module.exports = function(argument) {
|
|
5456
|
+
if (isObject(argument)) {
|
|
5457
|
+
return argument;
|
|
5458
|
+
}
|
|
5459
|
+
throw $TypeError($String(argument) + ' is not an object');
|
|
5460
|
+
};
|
|
5461
|
+
});
|
|
5462
|
+
var require_object_define_property = __commonJS(function(exports) {
|
|
5463
|
+
var DESCRIPTORS = require_descriptors();
|
|
5464
|
+
var IE8_DOM_DEFINE = require_ie8_dom_define();
|
|
5465
|
+
var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
|
|
5466
|
+
var anObject = require_an_object();
|
|
5467
|
+
var toPropertyKey = require_to_property_key();
|
|
5468
|
+
var $TypeError = TypeError;
|
|
5469
|
+
var $defineProperty = Object.defineProperty;
|
|
5470
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
5471
|
+
var ENUMERABLE = 'enumerable';
|
|
5472
|
+
var CONFIGURABLE = 'configurable';
|
|
5473
|
+
var WRITABLE = 'writable';
|
|
5474
|
+
exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
|
|
5475
|
+
anObject(O);
|
|
5476
|
+
P = toPropertyKey(P);
|
|
5477
|
+
anObject(Attributes);
|
|
5478
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
5479
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
5480
|
+
if (current && current[WRITABLE]) {
|
|
5481
|
+
O[P] = Attributes.value;
|
|
5482
|
+
Attributes = {
|
|
5483
|
+
configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
|
|
5484
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
5485
|
+
writable: false
|
|
5486
|
+
};
|
|
5487
|
+
}
|
|
5488
|
+
}
|
|
5489
|
+
return $defineProperty(O, P, Attributes);
|
|
5490
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
5491
|
+
anObject(O);
|
|
5492
|
+
P = toPropertyKey(P);
|
|
5493
|
+
anObject(Attributes);
|
|
5494
|
+
if (IE8_DOM_DEFINE) {
|
|
5495
|
+
try {
|
|
5496
|
+
return $defineProperty(O, P, Attributes);
|
|
5497
|
+
} catch (error) {}
|
|
5498
|
+
}
|
|
5499
|
+
if ('get' in Attributes || 'set' in Attributes) {
|
|
5500
|
+
throw $TypeError('Accessors not supported');
|
|
5501
|
+
}
|
|
5502
|
+
if ('value' in Attributes) {
|
|
5503
|
+
O[P] = Attributes.value;
|
|
5504
|
+
}
|
|
5505
|
+
return O;
|
|
5506
|
+
};
|
|
5507
|
+
});
|
|
5508
|
+
var require_create_non_enumerable_property = __commonJS(function(exports, module) {
|
|
5509
|
+
var DESCRIPTORS = require_descriptors();
|
|
5510
|
+
var definePropertyModule = require_object_define_property();
|
|
5511
|
+
var createPropertyDescriptor = require_create_property_descriptor();
|
|
5512
|
+
module.exports = DESCRIPTORS ? function(object, key, value) {
|
|
5513
|
+
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
|
|
5514
|
+
} : function(object, key, value) {
|
|
5515
|
+
object[key] = value;
|
|
5516
|
+
return object;
|
|
5517
|
+
};
|
|
5518
|
+
});
|
|
5519
|
+
var require_export = __commonJS(function(exports, module) {
|
|
5520
|
+
'use strict';
|
|
5521
|
+
var global2 = require_global();
|
|
5522
|
+
var apply = require_function_apply();
|
|
5523
|
+
var uncurryThis = require_function_uncurry_this_clause();
|
|
5524
|
+
var isCallable = require_is_callable2();
|
|
5525
|
+
var getOwnPropertyDescriptor = require_object_get_own_property_descriptor().f;
|
|
5526
|
+
var isForced = require_is_forced();
|
|
5527
|
+
var path = require_path();
|
|
5528
|
+
var bind = require_function_bind_context();
|
|
5529
|
+
var createNonEnumerableProperty = require_create_non_enumerable_property();
|
|
5530
|
+
var hasOwn2 = require_has_own_property();
|
|
5531
|
+
var wrapConstructor = function wrapConstructor(NativeConstructor) {
|
|
5532
|
+
var Wrapper = function Wrapper(a2, b2, c4) {
|
|
5533
|
+
if (this instanceof Wrapper) {
|
|
5534
|
+
switch (arguments.length) {
|
|
5535
|
+
case 0:
|
|
5536
|
+
return new NativeConstructor();
|
|
5537
|
+
|
|
5538
|
+
case 1:
|
|
5539
|
+
return new NativeConstructor(a2);
|
|
5540
|
+
|
|
5541
|
+
case 2:
|
|
5542
|
+
return new NativeConstructor(a2, b2);
|
|
5543
|
+
}
|
|
5544
|
+
return new NativeConstructor(a2, b2, c4);
|
|
5545
|
+
}
|
|
5546
|
+
return apply(NativeConstructor, this, arguments);
|
|
5547
|
+
};
|
|
5548
|
+
Wrapper.prototype = NativeConstructor.prototype;
|
|
5549
|
+
return Wrapper;
|
|
5550
|
+
};
|
|
5551
|
+
module.exports = function(options, source) {
|
|
5552
|
+
var TARGET = options.target;
|
|
5553
|
+
var GLOBAL = options.global;
|
|
5554
|
+
var STATIC = options.stat;
|
|
5555
|
+
var PROTO = options.proto;
|
|
5556
|
+
var nativeSource = GLOBAL ? global2 : STATIC ? global2[TARGET] : (global2[TARGET] || {}).prototype;
|
|
5557
|
+
var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];
|
|
5558
|
+
var targetPrototype = target.prototype;
|
|
5559
|
+
var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;
|
|
5560
|
+
var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;
|
|
5561
|
+
for (key in source) {
|
|
5562
|
+
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
5563
|
+
USE_NATIVE = !FORCED && nativeSource && hasOwn2(nativeSource, key);
|
|
5564
|
+
targetProperty = target[key];
|
|
5565
|
+
if (USE_NATIVE) {
|
|
5566
|
+
if (options.dontCallGetSet) {
|
|
5567
|
+
descriptor = getOwnPropertyDescriptor(nativeSource, key);
|
|
5568
|
+
nativeProperty = descriptor && descriptor.value;
|
|
5569
|
+
} else {
|
|
5570
|
+
nativeProperty = nativeSource[key];
|
|
5571
|
+
}
|
|
5572
|
+
}
|
|
5573
|
+
sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key];
|
|
5574
|
+
if (USE_NATIVE && _typeof(targetProperty) == _typeof(sourceProperty)) {
|
|
5575
|
+
continue;
|
|
5576
|
+
}
|
|
5577
|
+
if (options.bind && USE_NATIVE) {
|
|
5578
|
+
resultProperty = bind(sourceProperty, global2);
|
|
5579
|
+
} else if (options.wrap && USE_NATIVE) {
|
|
5580
|
+
resultProperty = wrapConstructor(sourceProperty);
|
|
5581
|
+
} else if (PROTO && isCallable(sourceProperty)) {
|
|
5582
|
+
resultProperty = uncurryThis(sourceProperty);
|
|
5583
|
+
} else {
|
|
5584
|
+
resultProperty = sourceProperty;
|
|
5585
|
+
}
|
|
5586
|
+
if (options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) {
|
|
5587
|
+
createNonEnumerableProperty(resultProperty, 'sham', true);
|
|
5588
|
+
}
|
|
5589
|
+
createNonEnumerableProperty(target, key, resultProperty);
|
|
5590
|
+
if (PROTO) {
|
|
5591
|
+
VIRTUAL_PROTOTYPE = TARGET + 'Prototype';
|
|
5592
|
+
if (!hasOwn2(path, VIRTUAL_PROTOTYPE)) {
|
|
5593
|
+
createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});
|
|
5594
|
+
}
|
|
5595
|
+
createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);
|
|
5596
|
+
if (options.real && targetPrototype && !targetPrototype[key]) {
|
|
5597
|
+
createNonEnumerableProperty(targetPrototype, key, sourceProperty);
|
|
5598
|
+
}
|
|
5599
|
+
}
|
|
5600
|
+
}
|
|
5601
|
+
};
|
|
5602
|
+
});
|
|
5603
|
+
var require_es_object_has_own = __commonJS(function() {
|
|
5604
|
+
var $ = require_export();
|
|
5605
|
+
var hasOwn2 = require_has_own_property();
|
|
5606
|
+
$({
|
|
5607
|
+
target: 'Object',
|
|
5608
|
+
stat: true
|
|
5609
|
+
}, {
|
|
5610
|
+
hasOwn: hasOwn2
|
|
5611
|
+
});
|
|
5612
|
+
});
|
|
5613
|
+
var require_has_own = __commonJS(function(exports, module) {
|
|
5614
|
+
require_es_object_has_own();
|
|
5615
|
+
var path = require_path();
|
|
5616
|
+
module.exports = path.Object.hasOwn;
|
|
5617
|
+
});
|
|
5618
|
+
var require_has_own2 = __commonJS(function(exports, module) {
|
|
5619
|
+
var parent = require_has_own();
|
|
5620
|
+
module.exports = parent;
|
|
5621
|
+
});
|
|
5622
|
+
var require_has_own3 = __commonJS(function(exports, module) {
|
|
5623
|
+
var parent = require_has_own2();
|
|
5624
|
+
module.exports = parent;
|
|
5625
|
+
});
|
|
4962
5626
|
var definitions = [ {
|
|
4963
5627
|
name: 'NA',
|
|
4964
5628
|
value: 'inapplicable',
|
|
@@ -5227,6 +5891,9 @@
|
|
|
5227
5891
|
nodeLookup: function nodeLookup() {
|
|
5228
5892
|
return _nodeLookup;
|
|
5229
5893
|
},
|
|
5894
|
+
nodeSerializer: function nodeSerializer() {
|
|
5895
|
+
return node_serializer_default;
|
|
5896
|
+
},
|
|
5230
5897
|
nodeSorter: function nodeSorter() {
|
|
5231
5898
|
return node_sorter_default;
|
|
5232
5899
|
},
|
|
@@ -6028,6 +6695,7 @@
|
|
|
6028
6695
|
return cache_default.get('nodeMap') ? cache_default.get('nodeMap').get(el) : null;
|
|
6029
6696
|
}
|
|
6030
6697
|
var get_node_from_tree_default = getNodeFromTree;
|
|
6698
|
+
var CACHE_KEY = 'DqElm.RunOptions';
|
|
6031
6699
|
function truncate(str, maxLength) {
|
|
6032
6700
|
maxLength = maxLength || 300;
|
|
6033
6701
|
if (str.length > maxLength) {
|
|
@@ -6048,8 +6716,12 @@
|
|
|
6048
6716
|
}
|
|
6049
6717
|
function DqElement(elm) {
|
|
6050
6718
|
var _this$spec$selector, _this$_virtualNode;
|
|
6051
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] :
|
|
6719
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
6052
6720
|
var spec = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
6721
|
+
if (!options) {
|
|
6722
|
+
var _cache_default$get;
|
|
6723
|
+
options = (_cache_default$get = cache_default.get(CACHE_KEY)) !== null && _cache_default$get !== void 0 ? _cache_default$get : {};
|
|
6724
|
+
}
|
|
6053
6725
|
this.spec = spec;
|
|
6054
6726
|
if (elm instanceof abstract_virtual_node_default) {
|
|
6055
6727
|
this._virtualNode = elm;
|
|
@@ -6059,6 +6731,7 @@
|
|
|
6059
6731
|
this._virtualNode = get_node_from_tree_default(elm);
|
|
6060
6732
|
}
|
|
6061
6733
|
this.fromFrame = ((_this$spec$selector = this.spec.selector) === null || _this$spec$selector === void 0 ? void 0 : _this$spec$selector.length) > 1;
|
|
6734
|
+
this._includeElementInJson = options.elementRef;
|
|
6062
6735
|
if (options.absolutePaths) {
|
|
6063
6736
|
this._options = {
|
|
6064
6737
|
toRoot: true
|
|
@@ -6090,25 +6763,38 @@
|
|
|
6090
6763
|
return this._element;
|
|
6091
6764
|
},
|
|
6092
6765
|
toJSON: function toJSON() {
|
|
6093
|
-
|
|
6766
|
+
var spec = {
|
|
6094
6767
|
selector: this.selector,
|
|
6095
6768
|
source: this.source,
|
|
6096
6769
|
xpath: this.xpath,
|
|
6097
6770
|
ancestry: this.ancestry,
|
|
6098
|
-
nodeIndexes: this.nodeIndexes
|
|
6771
|
+
nodeIndexes: this.nodeIndexes,
|
|
6772
|
+
fromFrame: this.fromFrame
|
|
6099
6773
|
};
|
|
6774
|
+
if (this._includeElementInJson) {
|
|
6775
|
+
spec.element = this._element;
|
|
6776
|
+
}
|
|
6777
|
+
return spec;
|
|
6100
6778
|
}
|
|
6101
6779
|
};
|
|
6102
6780
|
DqElement.fromFrame = function fromFrame(node, options, frame) {
|
|
6103
6781
|
var spec = DqElement.mergeSpecs(node, frame);
|
|
6104
6782
|
return new DqElement(frame.element, options, spec);
|
|
6105
6783
|
};
|
|
6106
|
-
DqElement.mergeSpecs = function
|
|
6107
|
-
return _extends({},
|
|
6108
|
-
selector: [].concat(_toConsumableArray(
|
|
6109
|
-
ancestry: [].concat(_toConsumableArray(
|
|
6110
|
-
xpath: [].concat(_toConsumableArray(
|
|
6111
|
-
nodeIndexes: [].concat(_toConsumableArray(
|
|
6784
|
+
DqElement.mergeSpecs = function mergeSpecs(child, parentFrame) {
|
|
6785
|
+
return _extends({}, child, {
|
|
6786
|
+
selector: [].concat(_toConsumableArray(parentFrame.selector), _toConsumableArray(child.selector)),
|
|
6787
|
+
ancestry: [].concat(_toConsumableArray(parentFrame.ancestry), _toConsumableArray(child.ancestry)),
|
|
6788
|
+
xpath: [].concat(_toConsumableArray(parentFrame.xpath), _toConsumableArray(child.xpath)),
|
|
6789
|
+
nodeIndexes: [].concat(_toConsumableArray(parentFrame.nodeIndexes), _toConsumableArray(child.nodeIndexes)),
|
|
6790
|
+
fromFrame: true
|
|
6791
|
+
});
|
|
6792
|
+
};
|
|
6793
|
+
DqElement.setRunOptions = function setRunOptions(_ref2) {
|
|
6794
|
+
var elementRef = _ref2.elementRef, absolutePaths = _ref2.absolutePaths;
|
|
6795
|
+
cache_default.set(CACHE_KEY, {
|
|
6796
|
+
elementRef: elementRef,
|
|
6797
|
+
absolutePaths: absolutePaths
|
|
6112
6798
|
});
|
|
6113
6799
|
};
|
|
6114
6800
|
var dq_element_default = DqElement;
|
|
@@ -6144,7 +6830,7 @@
|
|
|
6144
6830
|
node = node.actualNode;
|
|
6145
6831
|
}
|
|
6146
6832
|
if (node instanceof window.Node) {
|
|
6147
|
-
var dqElm = new dq_element_default(node
|
|
6833
|
+
var dqElm = new dq_element_default(node);
|
|
6148
6834
|
checkResult.relatedNodes.push(dqElm);
|
|
6149
6835
|
}
|
|
6150
6836
|
});
|
|
@@ -6610,8 +7296,8 @@
|
|
|
6610
7296
|
axe._uuid = v1();
|
|
6611
7297
|
var uuid_default = v4;
|
|
6612
7298
|
var errorTypes = Object.freeze([ 'EvalError', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError' ]);
|
|
6613
|
-
function stringifyMessage(
|
|
6614
|
-
var topic =
|
|
7299
|
+
function stringifyMessage(_ref3) {
|
|
7300
|
+
var topic = _ref3.topic, channelId = _ref3.channelId, message = _ref3.message, messageId = _ref3.messageId, keepalive = _ref3.keepalive;
|
|
6615
7301
|
var data = {
|
|
6616
7302
|
channelId: channelId,
|
|
6617
7303
|
topic: topic,
|
|
@@ -6774,8 +7460,8 @@
|
|
|
6774
7460
|
var allowedOrigins = axe._audit.allowedOrigins;
|
|
6775
7461
|
return allowedOrigins && allowedOrigins.includes('*') || allowedOrigins.includes(origin);
|
|
6776
7462
|
}
|
|
6777
|
-
function messageHandler(
|
|
6778
|
-
var origin =
|
|
7463
|
+
function messageHandler(_ref4, topicHandler) {
|
|
7464
|
+
var origin = _ref4.origin, dataString = _ref4.data, win = _ref4.source;
|
|
6779
7465
|
try {
|
|
6780
7466
|
var data = parseMessage(dataString) || {};
|
|
6781
7467
|
var channelId = data.channelId, message = data.message, messageId = data.messageId;
|
|
@@ -6804,7 +7490,7 @@
|
|
|
6804
7490
|
}
|
|
6805
7491
|
function callReplyHandler(win, data) {
|
|
6806
7492
|
var channelId = data.channelId, message = data.message, keepalive = data.keepalive;
|
|
6807
|
-
var
|
|
7493
|
+
var _ref5 = getReplyHandler(channelId) || {}, replyHandler = _ref5.replyHandler, sendToParent = _ref5.sendToParent;
|
|
6808
7494
|
if (!replyHandler) {
|
|
6809
7495
|
return;
|
|
6810
7496
|
}
|
|
@@ -6868,8 +7554,8 @@
|
|
|
6868
7554
|
responder(error, keepalive);
|
|
6869
7555
|
}
|
|
6870
7556
|
}
|
|
6871
|
-
_respondable.updateMessenger = function updateMessenger(
|
|
6872
|
-
var open =
|
|
7557
|
+
_respondable.updateMessenger = function updateMessenger(_ref6) {
|
|
7558
|
+
var open = _ref6.open, post = _ref6.post;
|
|
6873
7559
|
assert_default(typeof open === 'function', 'open callback must be a function');
|
|
6874
7560
|
assert_default(typeof post === 'function', 'post callback must be a function');
|
|
6875
7561
|
if (closeHandler) {
|
|
@@ -6944,6 +7630,73 @@
|
|
|
6944
7630
|
}
|
|
6945
7631
|
return new Error(message + ': ' + (selector || node));
|
|
6946
7632
|
}
|
|
7633
|
+
var customSerializer = null;
|
|
7634
|
+
var nodeSerializer = {
|
|
7635
|
+
update: function update(serializer) {
|
|
7636
|
+
assert_default(_typeof(serializer) === 'object', 'serializer must be an object');
|
|
7637
|
+
customSerializer = serializer;
|
|
7638
|
+
},
|
|
7639
|
+
toSpec: function toSpec(node) {
|
|
7640
|
+
return nodeSerializer.dqElmToSpec(new dq_element_default(node));
|
|
7641
|
+
},
|
|
7642
|
+
dqElmToSpec: function dqElmToSpec(dqElm, runOptions) {
|
|
7643
|
+
var _customSerializer;
|
|
7644
|
+
if (dqElm instanceof dq_element_default === false) {
|
|
7645
|
+
return dqElm;
|
|
7646
|
+
}
|
|
7647
|
+
if (runOptions) {
|
|
7648
|
+
dqElm = cloneLimitedDqElement(dqElm, runOptions);
|
|
7649
|
+
}
|
|
7650
|
+
if (typeof ((_customSerializer = customSerializer) === null || _customSerializer === void 0 ? void 0 : _customSerializer.toSpec) === 'function') {
|
|
7651
|
+
return customSerializer.toSpec(dqElm);
|
|
7652
|
+
}
|
|
7653
|
+
return dqElm.toJSON();
|
|
7654
|
+
},
|
|
7655
|
+
mergeSpecs: function mergeSpecs(nodeSpec, parentFrameSpec) {
|
|
7656
|
+
var _customSerializer2;
|
|
7657
|
+
if (typeof ((_customSerializer2 = customSerializer) === null || _customSerializer2 === void 0 ? void 0 : _customSerializer2.mergeSpecs) === 'function') {
|
|
7658
|
+
return customSerializer.mergeSpecs(nodeSpec, parentFrameSpec);
|
|
7659
|
+
}
|
|
7660
|
+
return dq_element_default.mergeSpecs(nodeSpec, parentFrameSpec);
|
|
7661
|
+
},
|
|
7662
|
+
mapRawResults: function mapRawResults(rawResults) {
|
|
7663
|
+
return rawResults.map(function(rawResult) {
|
|
7664
|
+
return _extends({}, rawResult, {
|
|
7665
|
+
nodes: nodeSerializer.mapRawNodeResults(rawResult.nodes)
|
|
7666
|
+
});
|
|
7667
|
+
});
|
|
7668
|
+
},
|
|
7669
|
+
mapRawNodeResults: function mapRawNodeResults(nodeResults) {
|
|
7670
|
+
return nodeResults === null || nodeResults === void 0 ? void 0 : nodeResults.map(function(_ref7) {
|
|
7671
|
+
var node = _ref7.node, nodeResult = _objectWithoutProperties(_ref7, _excluded);
|
|
7672
|
+
nodeResult.node = nodeSerializer.dqElmToSpec(node);
|
|
7673
|
+
for (var _i2 = 0, _arr2 = [ 'any', 'all', 'none' ]; _i2 < _arr2.length; _i2++) {
|
|
7674
|
+
var type2 = _arr2[_i2];
|
|
7675
|
+
nodeResult[type2] = nodeResult[type2].map(function(_ref8) {
|
|
7676
|
+
var relatedNodes = _ref8.relatedNodes, checkResult = _objectWithoutProperties(_ref8, _excluded2);
|
|
7677
|
+
checkResult.relatedNodes = relatedNodes.map(nodeSerializer.dqElmToSpec);
|
|
7678
|
+
return checkResult;
|
|
7679
|
+
});
|
|
7680
|
+
}
|
|
7681
|
+
return nodeResult;
|
|
7682
|
+
});
|
|
7683
|
+
}
|
|
7684
|
+
};
|
|
7685
|
+
var node_serializer_default = nodeSerializer;
|
|
7686
|
+
function cloneLimitedDqElement(dqElm, runOptions) {
|
|
7687
|
+
var fromFrame2 = dqElm.fromFrame;
|
|
7688
|
+
var hasAncestry = runOptions.ancestry, hasXpath = runOptions.xpath;
|
|
7689
|
+
var hasSelectors = runOptions.selectors !== false || fromFrame2;
|
|
7690
|
+
dqElm = new dq_element_default(dqElm.element, runOptions, {
|
|
7691
|
+
source: dqElm.source,
|
|
7692
|
+
nodeIndexes: dqElm.nodeIndexes,
|
|
7693
|
+
selector: hasSelectors ? dqElm.selector : [ ':root' ],
|
|
7694
|
+
ancestry: hasAncestry ? dqElm.ancestry : [ ':root' ],
|
|
7695
|
+
xpath: hasXpath ? dqElm.xpath : '/'
|
|
7696
|
+
});
|
|
7697
|
+
dqElm.fromFrame = fromFrame2;
|
|
7698
|
+
return dqElm;
|
|
7699
|
+
}
|
|
6947
7700
|
function getAllChecks(object) {
|
|
6948
7701
|
var result = [];
|
|
6949
7702
|
return result.concat(object.any || []).concat(object.all || []).concat(object.none || []);
|
|
@@ -6959,22 +7712,22 @@
|
|
|
6959
7712
|
var find_by_default = findBy;
|
|
6960
7713
|
function pushFrame(resultSet, options, frameSpec) {
|
|
6961
7714
|
resultSet.forEach(function(res) {
|
|
6962
|
-
res.node =
|
|
7715
|
+
res.node = node_serializer_default.mergeSpecs(res.node, frameSpec);
|
|
6963
7716
|
var checks = get_all_checks_default(res);
|
|
6964
7717
|
checks.forEach(function(check) {
|
|
6965
7718
|
check.relatedNodes = check.relatedNodes.map(function(node) {
|
|
6966
|
-
return
|
|
7719
|
+
return node_serializer_default.mergeSpecs(node, frameSpec);
|
|
6967
7720
|
});
|
|
6968
7721
|
});
|
|
6969
7722
|
});
|
|
6970
7723
|
}
|
|
6971
7724
|
function spliceNodes(target, to2) {
|
|
6972
7725
|
var firstFromFrame = to2[0].node;
|
|
6973
|
-
for (var
|
|
6974
|
-
var node = target[
|
|
7726
|
+
for (var _i3 = 0; _i3 < target.length; _i3++) {
|
|
7727
|
+
var node = target[_i3].node;
|
|
6975
7728
|
var resultSort = nodeIndexSort(node.nodeIndexes, firstFromFrame.nodeIndexes);
|
|
6976
7729
|
if (resultSort > 0 || resultSort === 0 && firstFromFrame.selector.length < node.selector.length) {
|
|
6977
|
-
target.splice.apply(target, [
|
|
7730
|
+
target.splice.apply(target, [ _i3, 0 ].concat(_toConsumableArray(to2)));
|
|
6978
7731
|
return;
|
|
6979
7732
|
}
|
|
6980
7733
|
}
|
|
@@ -6999,7 +7752,7 @@
|
|
|
6999
7752
|
if (!results || !results.length) {
|
|
7000
7753
|
return;
|
|
7001
7754
|
}
|
|
7002
|
-
var frameSpec = getFrameSpec(frameResult
|
|
7755
|
+
var frameSpec = getFrameSpec(frameResult);
|
|
7003
7756
|
results.forEach(function(ruleResult) {
|
|
7004
7757
|
if (ruleResult.nodes && frameSpec) {
|
|
7005
7758
|
pushFrame(ruleResult.nodes, options, frameSpec);
|
|
@@ -7027,14 +7780,14 @@
|
|
|
7027
7780
|
var nodeIndexesA = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
7028
7781
|
var nodeIndexesB = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
7029
7782
|
var length = Math.max(nodeIndexesA === null || nodeIndexesA === void 0 ? void 0 : nodeIndexesA.length, nodeIndexesB === null || nodeIndexesB === void 0 ? void 0 : nodeIndexesB.length);
|
|
7030
|
-
for (var
|
|
7031
|
-
var indexA = nodeIndexesA === null || nodeIndexesA === void 0 ? void 0 : nodeIndexesA[
|
|
7032
|
-
var indexB = nodeIndexesB === null || nodeIndexesB === void 0 ? void 0 : nodeIndexesB[
|
|
7783
|
+
for (var _i4 = 0; _i4 < length; _i4++) {
|
|
7784
|
+
var indexA = nodeIndexesA === null || nodeIndexesA === void 0 ? void 0 : nodeIndexesA[_i4];
|
|
7785
|
+
var indexB = nodeIndexesB === null || nodeIndexesB === void 0 ? void 0 : nodeIndexesB[_i4];
|
|
7033
7786
|
if (typeof indexA !== 'number' || isNaN(indexA)) {
|
|
7034
|
-
return
|
|
7787
|
+
return _i4 === 0 ? 1 : -1;
|
|
7035
7788
|
}
|
|
7036
7789
|
if (typeof indexB !== 'number' || isNaN(indexB)) {
|
|
7037
|
-
return
|
|
7790
|
+
return _i4 === 0 ? -1 : 1;
|
|
7038
7791
|
}
|
|
7039
7792
|
if (indexA !== indexB) {
|
|
7040
7793
|
return indexA - indexB;
|
|
@@ -7043,19 +7796,22 @@
|
|
|
7043
7796
|
return 0;
|
|
7044
7797
|
}
|
|
7045
7798
|
var merge_results_default = mergeResults;
|
|
7046
|
-
function getFrameSpec(frameResult
|
|
7799
|
+
function getFrameSpec(frameResult) {
|
|
7047
7800
|
if (frameResult.frameElement) {
|
|
7048
|
-
return
|
|
7801
|
+
return node_serializer_default.toSpec(frameResult.frameElement);
|
|
7049
7802
|
} else if (frameResult.frameSpec) {
|
|
7050
7803
|
return frameResult.frameSpec;
|
|
7051
7804
|
}
|
|
7052
7805
|
return null;
|
|
7053
7806
|
}
|
|
7054
7807
|
function _collectResultsFromFrames(parentContent, options, command, parameter, resolve, reject) {
|
|
7808
|
+
options = _extends({}, options, {
|
|
7809
|
+
elementRef: false
|
|
7810
|
+
});
|
|
7055
7811
|
var q = queue_default();
|
|
7056
7812
|
var frames = parentContent.frames;
|
|
7057
|
-
frames.forEach(function(
|
|
7058
|
-
var frameElement =
|
|
7813
|
+
frames.forEach(function(_ref9) {
|
|
7814
|
+
var frameElement = _ref9.node, context = _objectWithoutProperties(_ref9, _excluded3);
|
|
7059
7815
|
q.defer(function(res, rej) {
|
|
7060
7816
|
var params = {
|
|
7061
7817
|
options: options,
|
|
@@ -7102,8 +7858,8 @@
|
|
|
7102
7858
|
if (!source || _typeof(source) !== 'object' || Array.isArray(source)) {
|
|
7103
7859
|
return;
|
|
7104
7860
|
}
|
|
7105
|
-
for (var
|
|
7106
|
-
var key = _Object$keys[
|
|
7861
|
+
for (var _i5 = 0, _Object$keys = Object.keys(source); _i5 < _Object$keys.length; _i5++) {
|
|
7862
|
+
var key = _Object$keys[_i5];
|
|
7107
7863
|
if (!target.hasOwnProperty(key) || _typeof(source[key]) !== 'object' || Array.isArray(target[key])) {
|
|
7108
7864
|
target[key] = source[key];
|
|
7109
7865
|
} else {
|
|
@@ -7184,6 +7940,12 @@
|
|
|
7184
7940
|
getTabbableElements: function getTabbableElements() {
|
|
7185
7941
|
return get_tabbable_elements_default;
|
|
7186
7942
|
},
|
|
7943
|
+
getTargetRects: function getTargetRects() {
|
|
7944
|
+
return get_target_rects_default;
|
|
7945
|
+
},
|
|
7946
|
+
getTargetSize: function getTargetSize() {
|
|
7947
|
+
return get_target_size_default;
|
|
7948
|
+
},
|
|
7187
7949
|
getTextElementStack: function getTextElementStack() {
|
|
7188
7950
|
return get_text_element_stack_default;
|
|
7189
7951
|
},
|
|
@@ -7293,8 +8055,8 @@
|
|
|
7293
8055
|
}
|
|
7294
8056
|
var get_root_node_default = getRootNode;
|
|
7295
8057
|
var get_root_node_default2 = get_root_node_default;
|
|
7296
|
-
function findElmsInContext(
|
|
7297
|
-
var context =
|
|
8058
|
+
function findElmsInContext(_ref10) {
|
|
8059
|
+
var context = _ref10.context, value = _ref10.value, attr = _ref10.attr, _ref10$elm = _ref10.elm, elm = _ref10$elm === void 0 ? '' : _ref10$elm;
|
|
7298
8060
|
var root;
|
|
7299
8061
|
var escapedValue = escape_selector_default(value);
|
|
7300
8062
|
if (context.nodeType === 9 || context.nodeType === 11) {
|
|
@@ -7361,11 +8123,11 @@
|
|
|
7361
8123
|
return vNode.getComputedStylePropertyValue('display') === 'none';
|
|
7362
8124
|
}
|
|
7363
8125
|
function visibilityHidden(vNode) {
|
|
7364
|
-
var
|
|
8126
|
+
var _ref11 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, isAncestor = _ref11.isAncestor;
|
|
7365
8127
|
return !isAncestor && [ 'hidden', 'collapse' ].includes(vNode.getComputedStylePropertyValue('visibility'));
|
|
7366
8128
|
}
|
|
7367
8129
|
function contentVisibiltyHidden(vNode) {
|
|
7368
|
-
var
|
|
8130
|
+
var _ref12 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, isAncestor = _ref12.isAncestor;
|
|
7369
8131
|
return !!isAncestor && vNode.getComputedStylePropertyValue('content-visibility') === 'hidden';
|
|
7370
8132
|
}
|
|
7371
8133
|
function ariaHidden(vNode) {
|
|
@@ -7381,7 +8143,7 @@
|
|
|
7381
8143
|
return !!scroll && (elHeight === 0 || elWidth === 0);
|
|
7382
8144
|
}
|
|
7383
8145
|
function overflowHidden(vNode) {
|
|
7384
|
-
var
|
|
8146
|
+
var _ref13 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, isAncestor = _ref13.isAncestor;
|
|
7385
8147
|
if (isAncestor) {
|
|
7386
8148
|
return false;
|
|
7387
8149
|
}
|
|
@@ -7460,7 +8222,7 @@
|
|
|
7460
8222
|
}
|
|
7461
8223
|
var hiddenMethods = [ displayHidden, visibilityHidden, contentVisibiltyHidden, detailsHidden ];
|
|
7462
8224
|
function _isHiddenForEveryone(vNode) {
|
|
7463
|
-
var
|
|
8225
|
+
var _ref14 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, skipAncestors = _ref14.skipAncestors, _ref14$isAncestor = _ref14.isAncestor, isAncestor = _ref14$isAncestor === void 0 ? false : _ref14$isAncestor;
|
|
7464
8226
|
vNode = _nodeLookup(vNode).vNode;
|
|
7465
8227
|
if (skipAncestors) {
|
|
7466
8228
|
return isHiddenSelf(vNode, isAncestor);
|
|
@@ -7574,7 +8336,7 @@
|
|
|
7574
8336
|
return true;
|
|
7575
8337
|
}
|
|
7576
8338
|
function isOffscreen(element) {
|
|
7577
|
-
var
|
|
8339
|
+
var _ref15 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, isAncestor = _ref15.isAncestor;
|
|
7578
8340
|
if (isAncestor) {
|
|
7579
8341
|
return false;
|
|
7580
8342
|
}
|
|
@@ -7640,9 +8402,9 @@
|
|
|
7640
8402
|
var left = Math.min(rectA.left, rectB.left);
|
|
7641
8403
|
return new window.DOMRect(left, top, right - left, bottom - top);
|
|
7642
8404
|
}
|
|
7643
|
-
function _isPointInRect(
|
|
7644
|
-
var x =
|
|
7645
|
-
var top =
|
|
8405
|
+
function _isPointInRect(_ref16, _ref17) {
|
|
8406
|
+
var x = _ref16.x, y = _ref16.y;
|
|
8407
|
+
var top = _ref17.top, right = _ref17.right, bottom = _ref17.bottom, left = _ref17.left;
|
|
7646
8408
|
return y >= top && x <= right && y <= bottom && x >= left;
|
|
7647
8409
|
}
|
|
7648
8410
|
var math_exports = {};
|
|
@@ -7665,6 +8427,9 @@
|
|
|
7665
8427
|
isPointInRect: function isPointInRect() {
|
|
7666
8428
|
return _isPointInRect;
|
|
7667
8429
|
},
|
|
8430
|
+
rectHasMinimumSize: function rectHasMinimumSize() {
|
|
8431
|
+
return _rectHasMinimumSize;
|
|
8432
|
+
},
|
|
7668
8433
|
rectsOverlap: function rectsOverlap() {
|
|
7669
8434
|
return _rectsOverlap;
|
|
7670
8435
|
},
|
|
@@ -7682,134 +8447,74 @@
|
|
|
7682
8447
|
}
|
|
7683
8448
|
return new window.DOMRect(leftX, topY, rightX - leftX, bottomY - topY);
|
|
7684
8449
|
}
|
|
7685
|
-
function
|
|
7686
|
-
var
|
|
7687
|
-
|
|
7688
|
-
var pointA = getFarthestPoint(rectA, rectB);
|
|
7689
|
-
var pointB = getClosestPoint(pointA, rectA, rectB);
|
|
7690
|
-
return pointDistance(pointA, pointB);
|
|
7691
|
-
}
|
|
7692
|
-
function getFarthestPoint(rectA, rectB) {
|
|
7693
|
-
var dimensionProps = [ [ 'x', 'left', 'right', 'width' ], [ 'y', 'top', 'bottom', 'height' ] ];
|
|
7694
|
-
var farthestPoint = {};
|
|
7695
|
-
dimensionProps.forEach(function(_ref15) {
|
|
7696
|
-
var _ref16 = _slicedToArray(_ref15, 4), axis = _ref16[0], start = _ref16[1], end = _ref16[2], diameter = _ref16[3];
|
|
7697
|
-
if (rectB[start] < rectA[start] && rectB[end] > rectA[end]) {
|
|
7698
|
-
farthestPoint[axis] = rectA[start] + rectA[diameter] / 2;
|
|
7699
|
-
return;
|
|
7700
|
-
}
|
|
7701
|
-
var centerB = rectB[start] + rectB[diameter] / 2;
|
|
7702
|
-
var startDistance = Math.abs(centerB - rectA[start]);
|
|
7703
|
-
var endDistance = Math.abs(centerB - rectA[end]);
|
|
7704
|
-
if (startDistance >= endDistance) {
|
|
7705
|
-
farthestPoint[axis] = rectA[start];
|
|
7706
|
-
} else {
|
|
7707
|
-
farthestPoint[axis] = rectA[end];
|
|
7708
|
-
}
|
|
7709
|
-
});
|
|
7710
|
-
return farthestPoint;
|
|
8450
|
+
function _getRectCenter(_ref18) {
|
|
8451
|
+
var left = _ref18.left, top = _ref18.top, width = _ref18.width, height = _ref18.height;
|
|
8452
|
+
return new window.DOMPoint(left + width / 2, top + height / 2);
|
|
7711
8453
|
}
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
return closestPoint;
|
|
7724
|
-
}
|
|
7725
|
-
adjacentRect = ownRect;
|
|
7726
|
-
}
|
|
7727
|
-
var _adjacentRect = adjacentRect, top = _adjacentRect.top, right = _adjacentRect.right, bottom = _adjacentRect.bottom, left = _adjacentRect.left;
|
|
7728
|
-
var xAligned = x >= left && x <= right;
|
|
7729
|
-
var yAligned = y >= top && y <= bottom;
|
|
7730
|
-
var closestX = Math.abs(left - x) < Math.abs(right - x) ? left : right;
|
|
7731
|
-
var closestY = Math.abs(top - y) < Math.abs(bottom - y) ? top : bottom;
|
|
7732
|
-
if (!xAligned && yAligned) {
|
|
7733
|
-
return {
|
|
7734
|
-
x: closestX,
|
|
7735
|
-
y: y
|
|
7736
|
-
};
|
|
7737
|
-
} else if (xAligned && !yAligned) {
|
|
7738
|
-
return {
|
|
7739
|
-
x: x,
|
|
7740
|
-
y: closestY
|
|
7741
|
-
};
|
|
7742
|
-
} else if (!xAligned && !yAligned) {
|
|
7743
|
-
return {
|
|
7744
|
-
x: closestX,
|
|
7745
|
-
y: closestY
|
|
7746
|
-
};
|
|
8454
|
+
var roundingMargin = .05;
|
|
8455
|
+
function _rectHasMinimumSize(minSize, _ref19) {
|
|
8456
|
+
var width = _ref19.width, height = _ref19.height;
|
|
8457
|
+
return width + roundingMargin >= minSize && height + roundingMargin >= minSize;
|
|
8458
|
+
}
|
|
8459
|
+
function _getOffset(vTarget, vNeighbor) {
|
|
8460
|
+
var minRadiusNeighbour = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 12;
|
|
8461
|
+
var targetRects = get_target_rects_default(vTarget);
|
|
8462
|
+
var neighborRects = get_target_rects_default(vNeighbor);
|
|
8463
|
+
if (!targetRects.length || !neighborRects.length) {
|
|
8464
|
+
return 0;
|
|
7747
8465
|
}
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
8466
|
+
var targetBoundingBox = targetRects.reduce(_getBoundingRect);
|
|
8467
|
+
var targetCenter = _getRectCenter(targetBoundingBox);
|
|
8468
|
+
var minDistance = Infinity;
|
|
8469
|
+
var _iterator2 = _createForOfIteratorHelper(neighborRects), _step2;
|
|
8470
|
+
try {
|
|
8471
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) {
|
|
8472
|
+
var rect = _step2.value;
|
|
8473
|
+
if (_isPointInRect(targetCenter, rect)) {
|
|
8474
|
+
return 0;
|
|
8475
|
+
}
|
|
8476
|
+
var closestPoint = getClosestPoint(targetCenter, rect);
|
|
8477
|
+
var distance2 = pointDistance(targetCenter, closestPoint);
|
|
8478
|
+
minDistance = Math.min(minDistance, distance2);
|
|
8479
|
+
}
|
|
8480
|
+
} catch (err) {
|
|
8481
|
+
_iterator2.e(err);
|
|
8482
|
+
} finally {
|
|
8483
|
+
_iterator2.f();
|
|
7758
8484
|
}
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
return Math.
|
|
7767
|
-
}
|
|
7768
|
-
function
|
|
7769
|
-
var x
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
} else if (x === ownRect.right && ownRect.left > adjacentRect.left) {
|
|
7778
|
-
closestX = ownRect.left;
|
|
7779
|
-
}
|
|
7780
|
-
if (y === ownRect.top && ownRect.bottom < adjacentRect.bottom) {
|
|
7781
|
-
closestY = ownRect.bottom;
|
|
7782
|
-
} else if (y === ownRect.bottom && ownRect.top > adjacentRect.top) {
|
|
7783
|
-
closestY = ownRect.top;
|
|
7784
|
-
}
|
|
7785
|
-
if (!closestX && !closestY) {
|
|
7786
|
-
return null;
|
|
7787
|
-
} else if (!closestY) {
|
|
7788
|
-
return {
|
|
7789
|
-
x: closestX,
|
|
7790
|
-
y: y
|
|
7791
|
-
};
|
|
7792
|
-
} else if (!closestX) {
|
|
7793
|
-
return {
|
|
7794
|
-
x: x,
|
|
7795
|
-
y: closestY
|
|
7796
|
-
};
|
|
8485
|
+
var neighborTargetSize = get_target_size_default(vNeighbor);
|
|
8486
|
+
if (_rectHasMinimumSize(minRadiusNeighbour * 2, neighborTargetSize)) {
|
|
8487
|
+
return minDistance;
|
|
8488
|
+
}
|
|
8489
|
+
var neighborBoundingBox = neighborRects.reduce(_getBoundingRect);
|
|
8490
|
+
var neighborCenter = _getRectCenter(neighborBoundingBox);
|
|
8491
|
+
var centerDistance = pointDistance(targetCenter, neighborCenter) - minRadiusNeighbour;
|
|
8492
|
+
return Math.max(0, Math.min(minDistance, centerDistance));
|
|
8493
|
+
}
|
|
8494
|
+
function getClosestPoint(point, rect) {
|
|
8495
|
+
var x;
|
|
8496
|
+
var y;
|
|
8497
|
+
if (point.x < rect.left) {
|
|
8498
|
+
x = rect.left;
|
|
8499
|
+
} else if (point.x > rect.right) {
|
|
8500
|
+
x = rect.right;
|
|
8501
|
+
} else {
|
|
8502
|
+
x = point.x;
|
|
7797
8503
|
}
|
|
7798
|
-
if (
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
};
|
|
8504
|
+
if (point.y < rect.top) {
|
|
8505
|
+
y = rect.top;
|
|
8506
|
+
} else if (point.y > rect.bottom) {
|
|
8507
|
+
y = rect.bottom;
|
|
7803
8508
|
} else {
|
|
7804
|
-
|
|
7805
|
-
x: x,
|
|
7806
|
-
y: closestY
|
|
7807
|
-
};
|
|
8509
|
+
y = point.y;
|
|
7808
8510
|
}
|
|
8511
|
+
return {
|
|
8512
|
+
x: x,
|
|
8513
|
+
y: y
|
|
8514
|
+
};
|
|
7809
8515
|
}
|
|
7810
|
-
function
|
|
7811
|
-
|
|
7812
|
-
return new window.DOMPoint(left + width / 2, top + height / 2);
|
|
8516
|
+
function pointDistance(pointA, pointB) {
|
|
8517
|
+
return Math.hypot(pointA.x - pointB.x, pointA.y - pointB.y);
|
|
7813
8518
|
}
|
|
7814
8519
|
function _hasVisualOverlap(vNodeA, vNodeB) {
|
|
7815
8520
|
var rectA = vNodeA.boundingClientRect;
|
|
@@ -7821,21 +8526,21 @@
|
|
|
7821
8526
|
}
|
|
7822
8527
|
function _splitRects(outerRect, overlapRects) {
|
|
7823
8528
|
var uniqueRects = [ outerRect ];
|
|
7824
|
-
var
|
|
8529
|
+
var _iterator3 = _createForOfIteratorHelper(overlapRects), _step3;
|
|
7825
8530
|
try {
|
|
7826
8531
|
var _loop3 = function _loop3() {
|
|
7827
|
-
var overlapRect =
|
|
8532
|
+
var overlapRect = _step3.value;
|
|
7828
8533
|
uniqueRects = uniqueRects.reduce(function(rects, inputRect) {
|
|
7829
8534
|
return rects.concat(splitRect(inputRect, overlapRect));
|
|
7830
8535
|
}, []);
|
|
7831
8536
|
};
|
|
7832
|
-
for (
|
|
8537
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) {
|
|
7833
8538
|
_loop3();
|
|
7834
8539
|
}
|
|
7835
8540
|
} catch (err) {
|
|
7836
|
-
|
|
8541
|
+
_iterator3.e(err);
|
|
7837
8542
|
} finally {
|
|
7838
|
-
|
|
8543
|
+
_iterator3.f();
|
|
7839
8544
|
}
|
|
7840
8545
|
return uniqueRects;
|
|
7841
8546
|
}
|
|
@@ -7877,6 +8582,9 @@
|
|
|
7877
8582
|
});
|
|
7878
8583
|
}
|
|
7879
8584
|
if (rects.length === 0) {
|
|
8585
|
+
if (isEnclosedRect(inputRect, clipRect)) {
|
|
8586
|
+
return [];
|
|
8587
|
+
}
|
|
7880
8588
|
rects.push(inputRect);
|
|
7881
8589
|
}
|
|
7882
8590
|
return rects.map(computeRect);
|
|
@@ -7885,12 +8593,10 @@
|
|
|
7885
8593
|
return num > min && num < max2;
|
|
7886
8594
|
};
|
|
7887
8595
|
function computeRect(baseRect) {
|
|
7888
|
-
return
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
width: baseRect.right - baseRect.left
|
|
7893
|
-
});
|
|
8596
|
+
return new window.DOMRect(baseRect.left, baseRect.top, baseRect.right - baseRect.left, baseRect.bottom - baseRect.top);
|
|
8597
|
+
}
|
|
8598
|
+
function isEnclosedRect(rectA, rectB) {
|
|
8599
|
+
return rectA.top >= rectB.top && rectA.left >= rectB.left && rectA.bottom <= rectB.bottom && rectA.right <= rectB.right;
|
|
7894
8600
|
}
|
|
7895
8601
|
var ROOT_LEVEL = 0;
|
|
7896
8602
|
var DEFAULT_LEVEL = .1;
|
|
@@ -8027,8 +8733,8 @@
|
|
|
8027
8733
|
function createStackingOrder(vNode, parentVNode, treeOrder) {
|
|
8028
8734
|
var stackingOrder = parentVNode._stackingOrder.slice();
|
|
8029
8735
|
if (isStackingContext(vNode, parentVNode)) {
|
|
8030
|
-
var index = stackingOrder.findIndex(function(
|
|
8031
|
-
var stackLevel2 =
|
|
8736
|
+
var index = stackingOrder.findIndex(function(_ref20) {
|
|
8737
|
+
var stackLevel2 = _ref20.stackLevel;
|
|
8032
8738
|
return [ ROOT_LEVEL, FLOAT_LEVEL, POSITION_LEVEL ].includes(stackLevel2);
|
|
8033
8739
|
});
|
|
8034
8740
|
if (index !== -1) {
|
|
@@ -8124,9 +8830,9 @@
|
|
|
8124
8830
|
}
|
|
8125
8831
|
}, {
|
|
8126
8832
|
key: 'getCellFromPoint',
|
|
8127
|
-
value: function getCellFromPoint(
|
|
8833
|
+
value: function getCellFromPoint(_ref21) {
|
|
8128
8834
|
var _this$cells, _row;
|
|
8129
|
-
var x =
|
|
8835
|
+
var x = _ref21.x, y = _ref21.y;
|
|
8130
8836
|
assert_default(this.boundaries, 'Grid does not have cells added');
|
|
8131
8837
|
var rowIndex = this.toGridIndex(y);
|
|
8132
8838
|
var colIndex = this.toGridIndex(x);
|
|
@@ -8156,8 +8862,8 @@
|
|
|
8156
8862
|
}
|
|
8157
8863
|
}, {
|
|
8158
8864
|
key: 'getGridPositionOfRect',
|
|
8159
|
-
value: function getGridPositionOfRect(
|
|
8160
|
-
var top =
|
|
8865
|
+
value: function getGridPositionOfRect(_ref22) {
|
|
8866
|
+
var top = _ref22.top, right = _ref22.right, bottom = _ref22.bottom, left = _ref22.left;
|
|
8161
8867
|
var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
8162
8868
|
top = this.toGridIndex(top - margin);
|
|
8163
8869
|
right = this.toGridIndex(right + margin - 1);
|
|
@@ -8172,7 +8878,7 @@
|
|
|
8172
8878
|
var _matrix$_negativeInde;
|
|
8173
8879
|
(_matrix$_negativeInde = matrix._negativeIndex) !== null && _matrix$_negativeInde !== void 0 ? _matrix$_negativeInde : matrix._negativeIndex = 0;
|
|
8174
8880
|
if (start < matrix._negativeIndex) {
|
|
8175
|
-
for (var
|
|
8881
|
+
for (var _i6 = 0; _i6 < matrix._negativeIndex - start; _i6++) {
|
|
8176
8882
|
matrix.splice(0, 0, []);
|
|
8177
8883
|
}
|
|
8178
8884
|
matrix._negativeIndex = start;
|
|
@@ -8198,18 +8904,18 @@
|
|
|
8198
8904
|
var gridPosition = grid.getGridPositionOfRect(rect, margin);
|
|
8199
8905
|
var neighbors = [];
|
|
8200
8906
|
grid.loopGridPosition(gridPosition, function(vNeighbors) {
|
|
8201
|
-
var
|
|
8907
|
+
var _iterator4 = _createForOfIteratorHelper(vNeighbors), _step4;
|
|
8202
8908
|
try {
|
|
8203
|
-
for (
|
|
8204
|
-
var vNeighbor =
|
|
8909
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done; ) {
|
|
8910
|
+
var vNeighbor = _step4.value;
|
|
8205
8911
|
if (vNeighbor && vNeighbor !== vNode && !neighbors.includes(vNeighbor) && selfIsFixed === hasFixedPosition(vNeighbor)) {
|
|
8206
8912
|
neighbors.push(vNeighbor);
|
|
8207
8913
|
}
|
|
8208
8914
|
}
|
|
8209
8915
|
} catch (err) {
|
|
8210
|
-
|
|
8916
|
+
_iterator4.e(err);
|
|
8211
8917
|
} finally {
|
|
8212
|
-
|
|
8918
|
+
_iterator4.f();
|
|
8213
8919
|
}
|
|
8214
8920
|
});
|
|
8215
8921
|
return neighbors;
|
|
@@ -8246,7 +8952,7 @@
|
|
|
8246
8952
|
}
|
|
8247
8953
|
return (_dialogs$find = dialogs.find(function(dialog) {
|
|
8248
8954
|
var _getNodeFromGrid;
|
|
8249
|
-
var
|
|
8955
|
+
var _ref23 = (_getNodeFromGrid = getNodeFromGrid(dialog)) !== null && _getNodeFromGrid !== void 0 ? _getNodeFromGrid : {}, vNode = _ref23.vNode, rect = _ref23.rect;
|
|
8250
8956
|
if (!vNode) {
|
|
8251
8957
|
return false;
|
|
8252
8958
|
}
|
|
@@ -8272,8 +8978,8 @@
|
|
|
8272
8978
|
if (!cells) {
|
|
8273
8979
|
continue;
|
|
8274
8980
|
}
|
|
8275
|
-
for (var
|
|
8276
|
-
var vNode = cells[
|
|
8981
|
+
for (var _i7 = 0; _i7 < cells.length; _i7++) {
|
|
8982
|
+
var vNode = cells[_i7];
|
|
8277
8983
|
var rect = vNode.boundingClientRect;
|
|
8278
8984
|
var intersection = _getIntersectionRect(rect, viewRect);
|
|
8279
8985
|
if (vNode.props.nodeName !== 'html' && vNode !== dialog && vNode.getComputedStylePropertyValue('pointer-events') !== 'none' && intersection) {
|
|
@@ -8287,7 +8993,7 @@
|
|
|
8287
8993
|
}
|
|
8288
8994
|
}
|
|
8289
8995
|
function _isInert(vNode) {
|
|
8290
|
-
var
|
|
8996
|
+
var _ref24 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, skipAncestors = _ref24.skipAncestors, isAncestor = _ref24.isAncestor;
|
|
8291
8997
|
if (skipAncestors) {
|
|
8292
8998
|
return isInertSelf(vNode, isAncestor);
|
|
8293
8999
|
}
|
|
@@ -8415,20 +9121,20 @@
|
|
|
8415
9121
|
function _visuallySort(a2, b2) {
|
|
8416
9122
|
_createGrid();
|
|
8417
9123
|
var length = Math.max(a2._stackingOrder.length, b2._stackingOrder.length);
|
|
8418
|
-
for (var
|
|
8419
|
-
if (typeof b2._stackingOrder[
|
|
9124
|
+
for (var _i8 = 0; _i8 < length; _i8++) {
|
|
9125
|
+
if (typeof b2._stackingOrder[_i8] === 'undefined') {
|
|
8420
9126
|
return -1;
|
|
8421
|
-
} else if (typeof a2._stackingOrder[
|
|
9127
|
+
} else if (typeof a2._stackingOrder[_i8] === 'undefined') {
|
|
8422
9128
|
return 1;
|
|
8423
9129
|
}
|
|
8424
|
-
if (b2._stackingOrder[
|
|
9130
|
+
if (b2._stackingOrder[_i8].stackLevel > a2._stackingOrder[_i8].stackLevel) {
|
|
8425
9131
|
return 1;
|
|
8426
9132
|
}
|
|
8427
|
-
if (b2._stackingOrder[
|
|
9133
|
+
if (b2._stackingOrder[_i8].stackLevel < a2._stackingOrder[_i8].stackLevel) {
|
|
8428
9134
|
return -1;
|
|
8429
9135
|
}
|
|
8430
|
-
if (b2._stackingOrder[
|
|
8431
|
-
return b2._stackingOrder[
|
|
9136
|
+
if (b2._stackingOrder[_i8].treeOrder !== a2._stackingOrder[_i8].treeOrder) {
|
|
9137
|
+
return b2._stackingOrder[_i8].treeOrder - a2._stackingOrder[_i8].treeOrder;
|
|
8432
9138
|
}
|
|
8433
9139
|
}
|
|
8434
9140
|
var aNode = a2.actualNode;
|
|
@@ -8537,12 +9243,102 @@
|
|
|
8537
9243
|
return tabbableElements;
|
|
8538
9244
|
}
|
|
8539
9245
|
var get_tabbable_elements_default = getTabbableElements;
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
return
|
|
8544
|
-
}
|
|
8545
|
-
|
|
9246
|
+
function isNativelyFocusable(el) {
|
|
9247
|
+
var _nodeLookup4 = _nodeLookup(el), vNode = _nodeLookup4.vNode;
|
|
9248
|
+
if (!vNode || focus_disabled_default(vNode)) {
|
|
9249
|
+
return false;
|
|
9250
|
+
}
|
|
9251
|
+
switch (vNode.props.nodeName) {
|
|
9252
|
+
case 'a':
|
|
9253
|
+
case 'area':
|
|
9254
|
+
if (vNode.hasAttr('href')) {
|
|
9255
|
+
return true;
|
|
9256
|
+
}
|
|
9257
|
+
break;
|
|
9258
|
+
|
|
9259
|
+
case 'input':
|
|
9260
|
+
return vNode.props.type !== 'hidden';
|
|
9261
|
+
|
|
9262
|
+
case 'textarea':
|
|
9263
|
+
case 'select':
|
|
9264
|
+
case 'summary':
|
|
9265
|
+
case 'button':
|
|
9266
|
+
return true;
|
|
9267
|
+
|
|
9268
|
+
case 'details':
|
|
9269
|
+
return !query_selector_all_default(vNode, 'summary').length;
|
|
9270
|
+
}
|
|
9271
|
+
return false;
|
|
9272
|
+
}
|
|
9273
|
+
var is_natively_focusable_default = isNativelyFocusable;
|
|
9274
|
+
function _isFocusable(el) {
|
|
9275
|
+
var _nodeLookup5 = _nodeLookup(el), vNode = _nodeLookup5.vNode;
|
|
9276
|
+
if (vNode.props.nodeType !== 1) {
|
|
9277
|
+
return false;
|
|
9278
|
+
}
|
|
9279
|
+
if (focus_disabled_default(vNode)) {
|
|
9280
|
+
return false;
|
|
9281
|
+
} else if (is_natively_focusable_default(vNode)) {
|
|
9282
|
+
return true;
|
|
9283
|
+
}
|
|
9284
|
+
var tabindex = vNode.attr('tabindex');
|
|
9285
|
+
if (tabindex && !isNaN(parseInt(tabindex, 10))) {
|
|
9286
|
+
return true;
|
|
9287
|
+
}
|
|
9288
|
+
return false;
|
|
9289
|
+
}
|
|
9290
|
+
function _isInTabOrder(el) {
|
|
9291
|
+
var _nodeLookup6 = _nodeLookup(el), vNode = _nodeLookup6.vNode;
|
|
9292
|
+
if (vNode.props.nodeType !== 1) {
|
|
9293
|
+
return false;
|
|
9294
|
+
}
|
|
9295
|
+
var tabindex = parseInt(vNode.attr('tabindex', 10));
|
|
9296
|
+
if (tabindex <= -1) {
|
|
9297
|
+
return false;
|
|
9298
|
+
}
|
|
9299
|
+
return _isFocusable(vNode);
|
|
9300
|
+
}
|
|
9301
|
+
var get_target_rects_default = memoize_default(getTargetRects);
|
|
9302
|
+
function getTargetRects(vNode) {
|
|
9303
|
+
var nodeRect = vNode.boundingClientRect;
|
|
9304
|
+
var overlappingVNodes = _findNearbyElms(vNode).filter(function(vNeighbor) {
|
|
9305
|
+
return _hasVisualOverlap(vNode, vNeighbor) && vNeighbor.getComputedStylePropertyValue('pointer-events') !== 'none' && !isDescendantNotInTabOrder(vNode, vNeighbor);
|
|
9306
|
+
});
|
|
9307
|
+
if (!overlappingVNodes.length) {
|
|
9308
|
+
return [ nodeRect ];
|
|
9309
|
+
}
|
|
9310
|
+
var obscuringRects = overlappingVNodes.map(function(_ref25) {
|
|
9311
|
+
var rect = _ref25.boundingClientRect;
|
|
9312
|
+
return rect;
|
|
9313
|
+
});
|
|
9314
|
+
return _splitRects(nodeRect, obscuringRects);
|
|
9315
|
+
}
|
|
9316
|
+
function isDescendantNotInTabOrder(vAncestor, vNode) {
|
|
9317
|
+
return vAncestor.actualNode.contains(vNode.actualNode) && !_isInTabOrder(vNode);
|
|
9318
|
+
}
|
|
9319
|
+
var get_target_size_default = memoize_default(getTargetSize);
|
|
9320
|
+
function getTargetSize(vNode, minSize) {
|
|
9321
|
+
var rects = get_target_rects_default(vNode);
|
|
9322
|
+
return getLargestRect(rects, minSize);
|
|
9323
|
+
}
|
|
9324
|
+
function getLargestRect(rects, minSize) {
|
|
9325
|
+
return rects.reduce(function(rectA, rectB) {
|
|
9326
|
+
var rectAisMinimum = _rectHasMinimumSize(minSize, rectA);
|
|
9327
|
+
var rectBisMinimum = _rectHasMinimumSize(minSize, rectB);
|
|
9328
|
+
if (rectAisMinimum !== rectBisMinimum) {
|
|
9329
|
+
return rectAisMinimum ? rectA : rectB;
|
|
9330
|
+
}
|
|
9331
|
+
var areaA = rectA.width * rectA.height;
|
|
9332
|
+
var areaB = rectB.width * rectB.height;
|
|
9333
|
+
return areaA > areaB ? rectA : rectB;
|
|
9334
|
+
});
|
|
9335
|
+
}
|
|
9336
|
+
var text_exports = {};
|
|
9337
|
+
__export(text_exports, {
|
|
9338
|
+
accessibleText: function accessibleText() {
|
|
9339
|
+
return accessible_text_default;
|
|
9340
|
+
},
|
|
9341
|
+
accessibleTextVirtual: function accessibleTextVirtual() {
|
|
8546
9342
|
return _accessibleTextVirtual;
|
|
8547
9343
|
},
|
|
8548
9344
|
autocomplete: function autocomplete() {
|
|
@@ -8634,7 +9430,7 @@
|
|
|
8634
9430
|
var accessible_text_default = accessibleText;
|
|
8635
9431
|
function arialabelledbyText(element) {
|
|
8636
9432
|
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
8637
|
-
var
|
|
9433
|
+
var _nodeLookup7 = _nodeLookup(element), vNode = _nodeLookup7.vNode;
|
|
8638
9434
|
if ((vNode === null || vNode === void 0 ? void 0 : vNode.props.nodeType) !== 1) {
|
|
8639
9435
|
return '';
|
|
8640
9436
|
}
|
|
@@ -8658,7 +9454,7 @@
|
|
|
8658
9454
|
}
|
|
8659
9455
|
var arialabelledby_text_default = arialabelledbyText;
|
|
8660
9456
|
function _arialabelText(element) {
|
|
8661
|
-
var
|
|
9457
|
+
var _nodeLookup8 = _nodeLookup(element), vNode = _nodeLookup8.vNode;
|
|
8662
9458
|
if ((vNode === null || vNode === void 0 ? void 0 : vNode.props.nodeType) !== 1) {
|
|
8663
9459
|
return '';
|
|
8664
9460
|
}
|
|
@@ -10681,7 +11477,7 @@
|
|
|
10681
11477
|
}
|
|
10682
11478
|
var get_cell_position_default = memoize_default(getCellPosition);
|
|
10683
11479
|
function _getScope(el) {
|
|
10684
|
-
var
|
|
11480
|
+
var _nodeLookup9 = _nodeLookup(el), vNode = _nodeLookup9.vNode, cell = _nodeLookup9.domNode;
|
|
10685
11481
|
var scope = vNode.attr('scope');
|
|
10686
11482
|
var role = vNode.attr('role');
|
|
10687
11483
|
if (![ 'td', 'th' ].includes(vNode.props.nodeName)) {
|
|
@@ -10731,50 +11527,6 @@
|
|
|
10731
11527
|
return str.replace(/\r\n/g, '\n').replace(/\u00A0/g, ' ').replace(/[\s]{2,}/g, ' ').trim();
|
|
10732
11528
|
}
|
|
10733
11529
|
var sanitize_default = sanitize;
|
|
10734
|
-
function isNativelyFocusable(el) {
|
|
10735
|
-
var _nodeLookup7 = _nodeLookup(el), vNode = _nodeLookup7.vNode;
|
|
10736
|
-
if (!vNode || focus_disabled_default(vNode)) {
|
|
10737
|
-
return false;
|
|
10738
|
-
}
|
|
10739
|
-
switch (vNode.props.nodeName) {
|
|
10740
|
-
case 'a':
|
|
10741
|
-
case 'area':
|
|
10742
|
-
if (vNode.hasAttr('href')) {
|
|
10743
|
-
return true;
|
|
10744
|
-
}
|
|
10745
|
-
break;
|
|
10746
|
-
|
|
10747
|
-
case 'input':
|
|
10748
|
-
return vNode.props.type !== 'hidden';
|
|
10749
|
-
|
|
10750
|
-
case 'textarea':
|
|
10751
|
-
case 'select':
|
|
10752
|
-
case 'summary':
|
|
10753
|
-
case 'button':
|
|
10754
|
-
return true;
|
|
10755
|
-
|
|
10756
|
-
case 'details':
|
|
10757
|
-
return !query_selector_all_default(vNode, 'summary').length;
|
|
10758
|
-
}
|
|
10759
|
-
return false;
|
|
10760
|
-
}
|
|
10761
|
-
var is_natively_focusable_default = isNativelyFocusable;
|
|
10762
|
-
function _isFocusable(el) {
|
|
10763
|
-
var _nodeLookup8 = _nodeLookup(el), vNode = _nodeLookup8.vNode;
|
|
10764
|
-
if (vNode.props.nodeType !== 1) {
|
|
10765
|
-
return false;
|
|
10766
|
-
}
|
|
10767
|
-
if (focus_disabled_default(vNode)) {
|
|
10768
|
-
return false;
|
|
10769
|
-
} else if (is_natively_focusable_default(vNode)) {
|
|
10770
|
-
return true;
|
|
10771
|
-
}
|
|
10772
|
-
var tabindex = vNode.attr('tabindex');
|
|
10773
|
-
if (tabindex && !isNaN(parseInt(tabindex, 10))) {
|
|
10774
|
-
return true;
|
|
10775
|
-
}
|
|
10776
|
-
return false;
|
|
10777
|
-
}
|
|
10778
11530
|
var getSectioningElementSelector = function getSectioningElementSelector() {
|
|
10779
11531
|
return cache_default.get('sectioningElementSelector', function() {
|
|
10780
11532
|
return get_elements_by_content_type_default('sectioning').map(function(nodeName2) {
|
|
@@ -11035,15 +11787,15 @@
|
|
|
11035
11787
|
if (!standard.variant) {
|
|
11036
11788
|
return standard;
|
|
11037
11789
|
}
|
|
11038
|
-
var variant = standard.variant, spec = _objectWithoutProperties(standard,
|
|
11790
|
+
var variant = standard.variant, spec = _objectWithoutProperties(standard, _excluded4);
|
|
11039
11791
|
for (var variantName in variant) {
|
|
11040
11792
|
if (!variant.hasOwnProperty(variantName) || variantName === 'default') {
|
|
11041
11793
|
continue;
|
|
11042
11794
|
}
|
|
11043
|
-
var _variant$variantName = variant[variantName], matches4 = _variant$variantName.matches, props = _objectWithoutProperties(_variant$variantName,
|
|
11795
|
+
var _variant$variantName = variant[variantName], matches4 = _variant$variantName.matches, props = _objectWithoutProperties(_variant$variantName, _excluded5);
|
|
11044
11796
|
var matchProperties = Array.isArray(matches4) ? matches4 : [ matches4 ];
|
|
11045
|
-
for (var
|
|
11046
|
-
if (matchProperties[
|
|
11797
|
+
for (var _i9 = 0; _i9 < matchProperties.length && noMatchAccessibleName; _i9++) {
|
|
11798
|
+
if (matchProperties[_i9].hasOwnProperty('hasAccessibleName')) {
|
|
11047
11799
|
return standard;
|
|
11048
11800
|
}
|
|
11049
11801
|
}
|
|
@@ -11118,7 +11870,7 @@
|
|
|
11118
11870
|
return getInheritedRole(vNode.parent, explicitRoleOptions);
|
|
11119
11871
|
}
|
|
11120
11872
|
function resolveImplicitRole(vNode, _ref30) {
|
|
11121
|
-
var chromium = _ref30.chromium, explicitRoleOptions = _objectWithoutProperties(_ref30,
|
|
11873
|
+
var chromium = _ref30.chromium, explicitRoleOptions = _objectWithoutProperties(_ref30, _excluded6);
|
|
11122
11874
|
var implicitRole3 = implicit_role_default(vNode, {
|
|
11123
11875
|
chromium: chromium
|
|
11124
11876
|
});
|
|
@@ -11139,8 +11891,8 @@
|
|
|
11139
11891
|
}
|
|
11140
11892
|
function resolveRole(node) {
|
|
11141
11893
|
var _ref31 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11142
|
-
var noImplicit = _ref31.noImplicit, roleOptions = _objectWithoutProperties(_ref31,
|
|
11143
|
-
var
|
|
11894
|
+
var noImplicit = _ref31.noImplicit, roleOptions = _objectWithoutProperties(_ref31, _excluded7);
|
|
11895
|
+
var _nodeLookup10 = _nodeLookup(node), vNode = _nodeLookup10.vNode;
|
|
11144
11896
|
if (vNode.props.nodeType !== 1) {
|
|
11145
11897
|
return null;
|
|
11146
11898
|
}
|
|
@@ -11158,7 +11910,7 @@
|
|
|
11158
11910
|
}
|
|
11159
11911
|
function getRole(node) {
|
|
11160
11912
|
var _ref32 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11161
|
-
var noPresentational = _ref32.noPresentational, options = _objectWithoutProperties(_ref32,
|
|
11913
|
+
var noPresentational = _ref32.noPresentational, options = _objectWithoutProperties(_ref32, _excluded8);
|
|
11162
11914
|
var role = resolveRole(node, options);
|
|
11163
11915
|
if (noPresentational && [ 'presentation', 'none' ].includes(role)) {
|
|
11164
11916
|
return null;
|
|
@@ -11168,7 +11920,7 @@
|
|
|
11168
11920
|
var get_role_default = getRole;
|
|
11169
11921
|
var alwaysTitleElements = [ 'iframe' ];
|
|
11170
11922
|
function titleText(node) {
|
|
11171
|
-
var
|
|
11923
|
+
var _nodeLookup11 = _nodeLookup(node), vNode = _nodeLookup11.vNode;
|
|
11172
11924
|
if (vNode.props.nodeType !== 1 || !node.hasAttr('title')) {
|
|
11173
11925
|
return '';
|
|
11174
11926
|
}
|
|
@@ -11211,163 +11963,9 @@
|
|
|
11211
11963
|
return _toConsumableArray(children);
|
|
11212
11964
|
}
|
|
11213
11965
|
var get_owned_virtual_default = getOwnedVirtual;
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
var alreadyProcessed2 = _accessibleTextVirtual.alreadyProcessed;
|
|
11217
|
-
context.startNode = context.startNode || virtualNode;
|
|
11218
|
-
var _context = context, strict = _context.strict, inControlContext = _context.inControlContext, inLabelledByContext = _context.inLabelledByContext;
|
|
11219
|
-
var _get_element_spec_def2 = get_element_spec_default(virtualNode, {
|
|
11220
|
-
noMatchAccessibleName: true
|
|
11221
|
-
}), contentTypes = _get_element_spec_def2.contentTypes;
|
|
11222
|
-
if (alreadyProcessed2(virtualNode, context) || virtualNode.props.nodeType !== 1 || contentTypes !== null && contentTypes !== void 0 && contentTypes.includes('embedded')) {
|
|
11223
|
-
return '';
|
|
11224
|
-
}
|
|
11225
|
-
if (!named_from_contents_default(virtualNode, {
|
|
11226
|
-
strict: strict
|
|
11227
|
-
}) && !context.subtreeDescendant) {
|
|
11228
|
-
return '';
|
|
11229
|
-
}
|
|
11230
|
-
if (!strict) {
|
|
11231
|
-
var subtreeDescendant = !inControlContext && !inLabelledByContext;
|
|
11232
|
-
context = _extends({
|
|
11233
|
-
subtreeDescendant: subtreeDescendant
|
|
11234
|
-
}, context);
|
|
11235
|
-
}
|
|
11236
|
-
return get_owned_virtual_default(virtualNode).reduce(function(contentText, child) {
|
|
11237
|
-
return appendAccessibleText(contentText, child, context);
|
|
11238
|
-
}, '');
|
|
11239
|
-
}
|
|
11240
|
-
var phrasingElements = get_elements_by_content_type_default('phrasing').concat([ '#text' ]);
|
|
11241
|
-
function appendAccessibleText(contentText, virtualNode, context) {
|
|
11242
|
-
var nodeName2 = virtualNode.props.nodeName;
|
|
11243
|
-
var contentTextAdd = _accessibleTextVirtual(virtualNode, context);
|
|
11244
|
-
if (!contentTextAdd) {
|
|
11245
|
-
return contentText;
|
|
11246
|
-
}
|
|
11247
|
-
if (!phrasingElements.includes(nodeName2)) {
|
|
11248
|
-
if (contentTextAdd[0] !== ' ') {
|
|
11249
|
-
contentTextAdd += ' ';
|
|
11250
|
-
}
|
|
11251
|
-
if (contentText && contentText[contentText.length - 1] !== ' ') {
|
|
11252
|
-
contentTextAdd = ' ' + contentTextAdd;
|
|
11253
|
-
}
|
|
11254
|
-
}
|
|
11255
|
-
return contentText + contentTextAdd;
|
|
11256
|
-
}
|
|
11257
|
-
var subtree_text_default = subtreeText;
|
|
11258
|
-
function labelText(virtualNode) {
|
|
11259
|
-
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11260
|
-
var alreadyProcessed2 = _accessibleTextVirtual.alreadyProcessed;
|
|
11261
|
-
if (context.inControlContext || context.inLabelledByContext || alreadyProcessed2(virtualNode, context)) {
|
|
11262
|
-
return '';
|
|
11263
|
-
}
|
|
11264
|
-
if (!context.startNode) {
|
|
11265
|
-
context.startNode = virtualNode;
|
|
11266
|
-
}
|
|
11267
|
-
var labelContext = _extends({
|
|
11268
|
-
inControlContext: true
|
|
11269
|
-
}, context);
|
|
11270
|
-
var explicitLabels = getExplicitLabels(virtualNode);
|
|
11271
|
-
var implicitLabel = closest_default(virtualNode, 'label');
|
|
11272
|
-
var labels;
|
|
11273
|
-
if (implicitLabel) {
|
|
11274
|
-
labels = [].concat(_toConsumableArray(explicitLabels), [ implicitLabel.actualNode ]);
|
|
11275
|
-
labels.sort(node_sorter_default);
|
|
11276
|
-
} else {
|
|
11277
|
-
labels = explicitLabels;
|
|
11278
|
-
}
|
|
11279
|
-
return labels.map(function(label3) {
|
|
11280
|
-
return accessible_text_default(label3, labelContext);
|
|
11281
|
-
}).filter(function(text) {
|
|
11282
|
-
return text !== '';
|
|
11283
|
-
}).join(' ');
|
|
11284
|
-
}
|
|
11285
|
-
function getExplicitLabels(virtualNode) {
|
|
11286
|
-
if (!virtualNode.attr('id')) {
|
|
11287
|
-
return [];
|
|
11288
|
-
}
|
|
11289
|
-
if (!virtualNode.actualNode) {
|
|
11290
|
-
throw new TypeError('Cannot resolve explicit label reference for non-DOM nodes');
|
|
11291
|
-
}
|
|
11292
|
-
return find_elms_in_context_default({
|
|
11293
|
-
elm: 'label',
|
|
11294
|
-
attr: 'for',
|
|
11295
|
-
value: virtualNode.attr('id'),
|
|
11296
|
-
context: virtualNode.actualNode
|
|
11297
|
-
});
|
|
11298
|
-
}
|
|
11299
|
-
var label_text_default = labelText;
|
|
11300
|
-
var defaultButtonValues = {
|
|
11301
|
-
submit: 'Submit',
|
|
11302
|
-
image: 'Submit',
|
|
11303
|
-
reset: 'Reset',
|
|
11304
|
-
button: ''
|
|
11305
|
-
};
|
|
11306
|
-
var nativeTextMethods = {
|
|
11307
|
-
valueText: function valueText(_ref34) {
|
|
11308
|
-
var actualNode = _ref34.actualNode;
|
|
11309
|
-
return actualNode.value || '';
|
|
11310
|
-
},
|
|
11311
|
-
buttonDefaultText: function buttonDefaultText(_ref35) {
|
|
11312
|
-
var actualNode = _ref35.actualNode;
|
|
11313
|
-
return defaultButtonValues[actualNode.type] || '';
|
|
11314
|
-
},
|
|
11315
|
-
tableCaptionText: descendantText.bind(null, 'caption'),
|
|
11316
|
-
figureText: descendantText.bind(null, 'figcaption'),
|
|
11317
|
-
svgTitleText: descendantText.bind(null, 'title'),
|
|
11318
|
-
fieldsetLegendText: descendantText.bind(null, 'legend'),
|
|
11319
|
-
altText: attrText.bind(null, 'alt'),
|
|
11320
|
-
tableSummaryText: attrText.bind(null, 'summary'),
|
|
11321
|
-
titleText: title_text_default,
|
|
11322
|
-
subtreeText: subtree_text_default,
|
|
11323
|
-
labelText: label_text_default,
|
|
11324
|
-
singleSpace: function singleSpace() {
|
|
11325
|
-
return ' ';
|
|
11326
|
-
},
|
|
11327
|
-
placeholderText: attrText.bind(null, 'placeholder')
|
|
11966
|
+
var unsupported_default = {
|
|
11967
|
+
accessibleNameFromFieldValue: [ 'progressbar' ]
|
|
11328
11968
|
};
|
|
11329
|
-
function attrText(attr, vNode) {
|
|
11330
|
-
return vNode.attr(attr) || '';
|
|
11331
|
-
}
|
|
11332
|
-
function descendantText(nodeName2, _ref36, context) {
|
|
11333
|
-
var actualNode = _ref36.actualNode;
|
|
11334
|
-
nodeName2 = nodeName2.toLowerCase();
|
|
11335
|
-
var nodeNames2 = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
|
|
11336
|
-
var candidate = actualNode.querySelector(nodeNames2);
|
|
11337
|
-
if (!candidate || candidate.nodeName.toLowerCase() !== nodeName2) {
|
|
11338
|
-
return '';
|
|
11339
|
-
}
|
|
11340
|
-
return accessible_text_default(candidate, context);
|
|
11341
|
-
}
|
|
11342
|
-
var native_text_methods_default = nativeTextMethods;
|
|
11343
|
-
function _nativeTextAlternative(virtualNode) {
|
|
11344
|
-
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11345
|
-
var actualNode = virtualNode.actualNode;
|
|
11346
|
-
if (virtualNode.props.nodeType !== 1 || [ 'presentation', 'none' ].includes(get_role_default(virtualNode))) {
|
|
11347
|
-
return '';
|
|
11348
|
-
}
|
|
11349
|
-
var textMethods = findTextMethods(virtualNode);
|
|
11350
|
-
var accessibleName = textMethods.reduce(function(accName, step) {
|
|
11351
|
-
return accName || step(virtualNode, context);
|
|
11352
|
-
}, '');
|
|
11353
|
-
if (context.debug) {
|
|
11354
|
-
axe.log(accessibleName || '{empty-value}', actualNode, context);
|
|
11355
|
-
}
|
|
11356
|
-
return accessibleName;
|
|
11357
|
-
}
|
|
11358
|
-
function findTextMethods(virtualNode) {
|
|
11359
|
-
var elmSpec = get_element_spec_default(virtualNode, {
|
|
11360
|
-
noMatchAccessibleName: true
|
|
11361
|
-
});
|
|
11362
|
-
var methods = elmSpec.namingMethods || [];
|
|
11363
|
-
return methods.map(function(methodName) {
|
|
11364
|
-
return native_text_methods_default[methodName];
|
|
11365
|
-
});
|
|
11366
|
-
}
|
|
11367
|
-
var unsupported = {
|
|
11368
|
-
accessibleNameFromFieldValue: [ 'combobox', 'listbox', 'progressbar' ]
|
|
11369
|
-
};
|
|
11370
|
-
var unsupported_default = unsupported;
|
|
11371
11969
|
function _isVisibleToScreenReaders(vNode) {
|
|
11372
11970
|
vNode = _nodeLookup(vNode).vNode;
|
|
11373
11971
|
return isVisibleToScreenReadersVirtual(vNode);
|
|
@@ -11394,7 +11992,7 @@
|
|
|
11394
11992
|
return isVisibleToScreenReadersVirtual(vNode.parent, true);
|
|
11395
11993
|
});
|
|
11396
11994
|
function visibleVirtual(element, screenReader, noRecursing) {
|
|
11397
|
-
var
|
|
11995
|
+
var _nodeLookup12 = _nodeLookup(element), vNode = _nodeLookup12.vNode;
|
|
11398
11996
|
var visibleMethod = screenReader ? _isVisibleToScreenReaders : _isVisibleOnScreen;
|
|
11399
11997
|
var visible2 = !element.actualNode || element.actualNode && visibleMethod(element);
|
|
11400
11998
|
var result = vNode.children.map(function(child) {
|
|
@@ -11473,71 +12071,225 @@
|
|
|
11473
12071
|
return valueString;
|
|
11474
12072
|
}
|
|
11475
12073
|
function nativeTextboxValue(node) {
|
|
11476
|
-
var
|
|
12074
|
+
var _nodeLookup13 = _nodeLookup(node), vNode = _nodeLookup13.vNode;
|
|
11477
12075
|
if (is_native_textbox_default(vNode)) {
|
|
11478
12076
|
return vNode.props.value || '';
|
|
11479
12077
|
}
|
|
11480
12078
|
return '';
|
|
11481
12079
|
}
|
|
11482
12080
|
function nativeSelectValue(node) {
|
|
11483
|
-
var
|
|
12081
|
+
var _nodeLookup14 = _nodeLookup(node), vNode = _nodeLookup14.vNode;
|
|
11484
12082
|
if (!is_native_select_default(vNode)) {
|
|
11485
12083
|
return '';
|
|
11486
12084
|
}
|
|
11487
|
-
var options = query_selector_all_default(vNode, 'option');
|
|
11488
|
-
var selectedOptions = options.filter(function(option) {
|
|
11489
|
-
return option.props.selected;
|
|
11490
|
-
});
|
|
11491
|
-
if (!selectedOptions.length) {
|
|
11492
|
-
selectedOptions.push(options[0]);
|
|
12085
|
+
var options = query_selector_all_default(vNode, 'option');
|
|
12086
|
+
var selectedOptions = options.filter(function(option) {
|
|
12087
|
+
return option.props.selected;
|
|
12088
|
+
});
|
|
12089
|
+
if (!selectedOptions.length) {
|
|
12090
|
+
selectedOptions.push(options[0]);
|
|
12091
|
+
}
|
|
12092
|
+
return selectedOptions.map(function(option) {
|
|
12093
|
+
return visible_virtual_default(option);
|
|
12094
|
+
}).join(' ') || '';
|
|
12095
|
+
}
|
|
12096
|
+
function ariaTextboxValue(node) {
|
|
12097
|
+
var _nodeLookup15 = _nodeLookup(node), vNode = _nodeLookup15.vNode, domNode = _nodeLookup15.domNode;
|
|
12098
|
+
if (!is_aria_textbox_default(vNode)) {
|
|
12099
|
+
return '';
|
|
12100
|
+
}
|
|
12101
|
+
if (!domNode || domNode && !_isHiddenForEveryone(domNode)) {
|
|
12102
|
+
return visible_virtual_default(vNode, true);
|
|
12103
|
+
} else {
|
|
12104
|
+
return domNode.textContent;
|
|
12105
|
+
}
|
|
12106
|
+
}
|
|
12107
|
+
function ariaListboxValue(node, context) {
|
|
12108
|
+
var _nodeLookup16 = _nodeLookup(node), vNode = _nodeLookup16.vNode;
|
|
12109
|
+
if (!is_aria_listbox_default(vNode)) {
|
|
12110
|
+
return '';
|
|
12111
|
+
}
|
|
12112
|
+
var selected = get_owned_virtual_default(vNode).filter(function(owned) {
|
|
12113
|
+
return get_role_default(owned) === 'option' && owned.attr('aria-selected') === 'true';
|
|
12114
|
+
});
|
|
12115
|
+
if (selected.length === 0) {
|
|
12116
|
+
return '';
|
|
12117
|
+
}
|
|
12118
|
+
return _accessibleTextVirtual(selected[0], context);
|
|
12119
|
+
}
|
|
12120
|
+
function ariaComboboxValue(node, context) {
|
|
12121
|
+
var _nodeLookup17 = _nodeLookup(node), vNode = _nodeLookup17.vNode;
|
|
12122
|
+
if (!is_aria_combobox_default(vNode)) {
|
|
12123
|
+
return '';
|
|
12124
|
+
}
|
|
12125
|
+
var listbox = get_owned_virtual_default(vNode).filter(function(elm) {
|
|
12126
|
+
return get_role_default(elm) === 'listbox';
|
|
12127
|
+
})[0];
|
|
12128
|
+
return listbox ? ariaListboxValue(listbox, context) : '';
|
|
12129
|
+
}
|
|
12130
|
+
function ariaRangeValue(node) {
|
|
12131
|
+
var _nodeLookup18 = _nodeLookup(node), vNode = _nodeLookup18.vNode;
|
|
12132
|
+
if (!is_aria_range_default(vNode) || !vNode.hasAttr('aria-valuenow')) {
|
|
12133
|
+
return '';
|
|
12134
|
+
}
|
|
12135
|
+
var valueNow = +vNode.attr('aria-valuenow');
|
|
12136
|
+
return !isNaN(valueNow) ? String(valueNow) : '0';
|
|
12137
|
+
}
|
|
12138
|
+
var form_control_value_default = formControlValue;
|
|
12139
|
+
function subtreeText(virtualNode) {
|
|
12140
|
+
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12141
|
+
var alreadyProcessed2 = _accessibleTextVirtual.alreadyProcessed;
|
|
12142
|
+
context.startNode = context.startNode || virtualNode;
|
|
12143
|
+
var _context = context, strict = _context.strict, inControlContext = _context.inControlContext, inLabelledByContext = _context.inLabelledByContext;
|
|
12144
|
+
var role = get_role_default(virtualNode);
|
|
12145
|
+
var _get_element_spec_def2 = get_element_spec_default(virtualNode, {
|
|
12146
|
+
noMatchAccessibleName: true
|
|
12147
|
+
}), contentTypes = _get_element_spec_def2.contentTypes;
|
|
12148
|
+
if (alreadyProcessed2(virtualNode, context) || virtualNode.props.nodeType !== 1 || contentTypes !== null && contentTypes !== void 0 && contentTypes.includes('embedded') || controlValueRoles.includes(role)) {
|
|
12149
|
+
return '';
|
|
12150
|
+
}
|
|
12151
|
+
if (!context.subtreeDescendant && !context.inLabelledByContext && !named_from_contents_default(virtualNode, {
|
|
12152
|
+
strict: strict
|
|
12153
|
+
})) {
|
|
12154
|
+
return '';
|
|
12155
|
+
}
|
|
12156
|
+
if (!strict) {
|
|
12157
|
+
var subtreeDescendant = !inControlContext && !inLabelledByContext;
|
|
12158
|
+
context = _extends({
|
|
12159
|
+
subtreeDescendant: subtreeDescendant
|
|
12160
|
+
}, context);
|
|
12161
|
+
}
|
|
12162
|
+
return get_owned_virtual_default(virtualNode).reduce(function(contentText, child) {
|
|
12163
|
+
return appendAccessibleText(contentText, child, context);
|
|
12164
|
+
}, '');
|
|
12165
|
+
}
|
|
12166
|
+
var phrasingElements = get_elements_by_content_type_default('phrasing').concat([ '#text' ]);
|
|
12167
|
+
function appendAccessibleText(contentText, virtualNode, context) {
|
|
12168
|
+
var nodeName2 = virtualNode.props.nodeName;
|
|
12169
|
+
var contentTextAdd = _accessibleTextVirtual(virtualNode, context);
|
|
12170
|
+
if (!contentTextAdd) {
|
|
12171
|
+
return contentText;
|
|
12172
|
+
}
|
|
12173
|
+
if (!phrasingElements.includes(nodeName2)) {
|
|
12174
|
+
if (contentTextAdd[0] !== ' ') {
|
|
12175
|
+
contentTextAdd += ' ';
|
|
12176
|
+
}
|
|
12177
|
+
if (contentText && contentText[contentText.length - 1] !== ' ') {
|
|
12178
|
+
contentTextAdd = ' ' + contentTextAdd;
|
|
12179
|
+
}
|
|
11493
12180
|
}
|
|
11494
|
-
return
|
|
11495
|
-
return visible_virtual_default(option);
|
|
11496
|
-
}).join(' ') || '';
|
|
12181
|
+
return contentText + contentTextAdd;
|
|
11497
12182
|
}
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
12183
|
+
var subtree_text_default = subtreeText;
|
|
12184
|
+
function labelText(virtualNode) {
|
|
12185
|
+
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12186
|
+
var alreadyProcessed2 = _accessibleTextVirtual.alreadyProcessed;
|
|
12187
|
+
if (context.inControlContext || context.inLabelledByContext || alreadyProcessed2(virtualNode, context)) {
|
|
11501
12188
|
return '';
|
|
11502
12189
|
}
|
|
11503
|
-
if (!
|
|
11504
|
-
|
|
12190
|
+
if (!context.startNode) {
|
|
12191
|
+
context.startNode = virtualNode;
|
|
12192
|
+
}
|
|
12193
|
+
var labelContext = _extends({
|
|
12194
|
+
inControlContext: true
|
|
12195
|
+
}, context);
|
|
12196
|
+
var explicitLabels = getExplicitLabels(virtualNode);
|
|
12197
|
+
var implicitLabel = closest_default(virtualNode, 'label');
|
|
12198
|
+
var labels;
|
|
12199
|
+
if (implicitLabel) {
|
|
12200
|
+
labels = [].concat(_toConsumableArray(explicitLabels), [ implicitLabel.actualNode ]);
|
|
12201
|
+
labels.sort(node_sorter_default);
|
|
11505
12202
|
} else {
|
|
11506
|
-
|
|
12203
|
+
labels = explicitLabels;
|
|
11507
12204
|
}
|
|
12205
|
+
return labels.map(function(label3) {
|
|
12206
|
+
return accessible_text_default(label3, labelContext);
|
|
12207
|
+
}).filter(function(text) {
|
|
12208
|
+
return text !== '';
|
|
12209
|
+
}).join(' ');
|
|
11508
12210
|
}
|
|
11509
|
-
function
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
return '';
|
|
12211
|
+
function getExplicitLabels(virtualNode) {
|
|
12212
|
+
if (!virtualNode.attr('id')) {
|
|
12213
|
+
return [];
|
|
11513
12214
|
}
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
});
|
|
11517
|
-
if (selected.length === 0) {
|
|
11518
|
-
return '';
|
|
12215
|
+
if (!virtualNode.actualNode) {
|
|
12216
|
+
throw new TypeError('Cannot resolve explicit label reference for non-DOM nodes');
|
|
11519
12217
|
}
|
|
11520
|
-
return
|
|
12218
|
+
return find_elms_in_context_default({
|
|
12219
|
+
elm: 'label',
|
|
12220
|
+
attr: 'for',
|
|
12221
|
+
value: virtualNode.attr('id'),
|
|
12222
|
+
context: virtualNode.actualNode
|
|
12223
|
+
});
|
|
11521
12224
|
}
|
|
11522
|
-
|
|
11523
|
-
|
|
11524
|
-
|
|
12225
|
+
var label_text_default = labelText;
|
|
12226
|
+
var defaultButtonValues = {
|
|
12227
|
+
submit: 'Submit',
|
|
12228
|
+
image: 'Submit',
|
|
12229
|
+
reset: 'Reset',
|
|
12230
|
+
button: ''
|
|
12231
|
+
};
|
|
12232
|
+
var nativeTextMethods = {
|
|
12233
|
+
valueText: function valueText(_ref34) {
|
|
12234
|
+
var actualNode = _ref34.actualNode;
|
|
12235
|
+
return actualNode.value || '';
|
|
12236
|
+
},
|
|
12237
|
+
buttonDefaultText: function buttonDefaultText(_ref35) {
|
|
12238
|
+
var actualNode = _ref35.actualNode;
|
|
12239
|
+
return defaultButtonValues[actualNode.type] || '';
|
|
12240
|
+
},
|
|
12241
|
+
tableCaptionText: descendantText.bind(null, 'caption'),
|
|
12242
|
+
figureText: descendantText.bind(null, 'figcaption'),
|
|
12243
|
+
svgTitleText: descendantText.bind(null, 'title'),
|
|
12244
|
+
fieldsetLegendText: descendantText.bind(null, 'legend'),
|
|
12245
|
+
altText: attrText.bind(null, 'alt'),
|
|
12246
|
+
tableSummaryText: attrText.bind(null, 'summary'),
|
|
12247
|
+
titleText: title_text_default,
|
|
12248
|
+
subtreeText: subtree_text_default,
|
|
12249
|
+
labelText: label_text_default,
|
|
12250
|
+
singleSpace: function singleSpace() {
|
|
12251
|
+
return ' ';
|
|
12252
|
+
},
|
|
12253
|
+
placeholderText: attrText.bind(null, 'placeholder')
|
|
12254
|
+
};
|
|
12255
|
+
function attrText(attr, vNode) {
|
|
12256
|
+
return vNode.attr(attr) || '';
|
|
12257
|
+
}
|
|
12258
|
+
function descendantText(nodeName2, _ref36, context) {
|
|
12259
|
+
var actualNode = _ref36.actualNode;
|
|
12260
|
+
nodeName2 = nodeName2.toLowerCase();
|
|
12261
|
+
var nodeNames2 = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
|
|
12262
|
+
var candidate = actualNode.querySelector(nodeNames2);
|
|
12263
|
+
if (!candidate || candidate.nodeName.toLowerCase() !== nodeName2) {
|
|
11525
12264
|
return '';
|
|
11526
12265
|
}
|
|
11527
|
-
|
|
11528
|
-
return get_role_default(elm) === 'listbox';
|
|
11529
|
-
})[0];
|
|
11530
|
-
return listbox ? ariaListboxValue(listbox, context) : '';
|
|
12266
|
+
return accessible_text_default(candidate, context);
|
|
11531
12267
|
}
|
|
11532
|
-
|
|
11533
|
-
|
|
11534
|
-
|
|
12268
|
+
var native_text_methods_default = nativeTextMethods;
|
|
12269
|
+
function _nativeTextAlternative(virtualNode) {
|
|
12270
|
+
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12271
|
+
var actualNode = virtualNode.actualNode;
|
|
12272
|
+
if (virtualNode.props.nodeType !== 1 || [ 'presentation', 'none' ].includes(get_role_default(virtualNode))) {
|
|
11535
12273
|
return '';
|
|
11536
12274
|
}
|
|
11537
|
-
var
|
|
11538
|
-
|
|
12275
|
+
var textMethods = findTextMethods(virtualNode);
|
|
12276
|
+
var accessibleName = textMethods.reduce(function(accName, step) {
|
|
12277
|
+
return accName || step(virtualNode, context);
|
|
12278
|
+
}, '');
|
|
12279
|
+
if (context.debug) {
|
|
12280
|
+
axe.log(accessibleName || '{empty-value}', actualNode, context);
|
|
12281
|
+
}
|
|
12282
|
+
return accessibleName;
|
|
12283
|
+
}
|
|
12284
|
+
function findTextMethods(virtualNode) {
|
|
12285
|
+
var elmSpec = get_element_spec_default(virtualNode, {
|
|
12286
|
+
noMatchAccessibleName: true
|
|
12287
|
+
});
|
|
12288
|
+
var methods = elmSpec.namingMethods || [];
|
|
12289
|
+
return methods.map(function(methodName) {
|
|
12290
|
+
return native_text_methods_default[methodName];
|
|
12291
|
+
});
|
|
11539
12292
|
}
|
|
11540
|
-
var form_control_value_default = formControlValue;
|
|
11541
12293
|
function getUnicodeNonBmpRegExp() {
|
|
11542
12294
|
return /[\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u20A0-\u20CF\u20D0-\u20FF\u2100-\u214F\u2150-\u218F\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u2400-\u243F\u2440-\u245F\u2460-\u24FF\u2500-\u257F\u2580-\u259F\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\uE000-\uF8FF]/g;
|
|
11543
12295
|
}
|
|
@@ -11996,7 +12748,7 @@
|
|
|
11996
12748
|
var get_text_element_stack_default = getTextElementStack;
|
|
11997
12749
|
var visualRoles = [ 'checkbox', 'img', 'meter', 'progressbar', 'scrollbar', 'radio', 'slider', 'spinbutton', 'textbox' ];
|
|
11998
12750
|
function isVisualContent(el) {
|
|
11999
|
-
var
|
|
12751
|
+
var _nodeLookup19 = _nodeLookup(el), vNode = _nodeLookup19.vNode;
|
|
12000
12752
|
var role = axe.commons.aria.getExplicitRole(vNode);
|
|
12001
12753
|
if (role) {
|
|
12002
12754
|
return visualRoles.indexOf(role) !== -1;
|
|
@@ -12064,7 +12816,7 @@
|
|
|
12064
12816
|
}
|
|
12065
12817
|
var inserted_into_focus_order_default = insertedIntoFocusOrder;
|
|
12066
12818
|
function isHiddenWithCSS(el, descendentVisibilityValue) {
|
|
12067
|
-
var
|
|
12819
|
+
var _nodeLookup20 = _nodeLookup(el), vNode = _nodeLookup20.vNode, domNode = _nodeLookup20.domNode;
|
|
12068
12820
|
if (!vNode) {
|
|
12069
12821
|
return _isHiddenWithCSS(domNode, descendentVisibilityValue);
|
|
12070
12822
|
}
|
|
@@ -12114,17 +12866,6 @@
|
|
|
12114
12866
|
return node.name === 'html' && !node.publicId && !node.systemId;
|
|
12115
12867
|
}
|
|
12116
12868
|
var is_html5_default = isHTML5;
|
|
12117
|
-
function _isInTabOrder(el) {
|
|
12118
|
-
var _nodeLookup20 = _nodeLookup(el), vNode = _nodeLookup20.vNode;
|
|
12119
|
-
if (vNode.props.nodeType !== 1) {
|
|
12120
|
-
return false;
|
|
12121
|
-
}
|
|
12122
|
-
var tabindex = parseInt(vNode.attr('tabindex', 10));
|
|
12123
|
-
if (tabindex <= -1) {
|
|
12124
|
-
return false;
|
|
12125
|
-
}
|
|
12126
|
-
return _isFocusable(vNode);
|
|
12127
|
-
}
|
|
12128
12869
|
function getRoleType(role) {
|
|
12129
12870
|
var _window3;
|
|
12130
12871
|
if (role instanceof abstract_virtual_node_default || (_window3 = window) !== null && _window3 !== void 0 && _window3.Node && role instanceof window.Node) {
|
|
@@ -12232,8 +12973,8 @@
|
|
|
12232
12973
|
var stacks = points.map(function(point) {
|
|
12233
12974
|
return Array.from(document.elementsFromPoint(point.x, point.y));
|
|
12234
12975
|
});
|
|
12235
|
-
var _loop4 = function _loop4(
|
|
12236
|
-
var modalElement = stacks[
|
|
12976
|
+
var _loop4 = function _loop4(_i10) {
|
|
12977
|
+
var modalElement = stacks[_i10].find(function(elm) {
|
|
12237
12978
|
var style = window.getComputedStyle(elm);
|
|
12238
12979
|
return parseInt(style.width, 10) >= percentWidth && parseInt(style.height, 10) >= percentHeight && style.getPropertyValue('pointer-events') !== 'none' && (style.position === 'absolute' || style.position === 'fixed');
|
|
12239
12980
|
});
|
|
@@ -12246,8 +12987,8 @@
|
|
|
12246
12987
|
};
|
|
12247
12988
|
}
|
|
12248
12989
|
};
|
|
12249
|
-
for (var
|
|
12250
|
-
var _ret = _loop4(
|
|
12990
|
+
for (var _i10 = 0; _i10 < stacks.length; _i10++) {
|
|
12991
|
+
var _ret = _loop4(_i10);
|
|
12251
12992
|
if (_typeof(_ret) === 'object') {
|
|
12252
12993
|
return _ret.v;
|
|
12253
12994
|
}
|
|
@@ -12263,10 +13004,10 @@
|
|
|
12263
13004
|
range2.setEnd(domNode, domNode.childNodes.length);
|
|
12264
13005
|
var lastLineEnd = 0;
|
|
12265
13006
|
var lineCount = 0;
|
|
12266
|
-
var
|
|
13007
|
+
var _iterator5 = _createForOfIteratorHelper(range2.getClientRects()), _step5;
|
|
12267
13008
|
try {
|
|
12268
|
-
for (
|
|
12269
|
-
var rect =
|
|
13009
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done; ) {
|
|
13010
|
+
var rect = _step5.value;
|
|
12270
13011
|
if (rect.height <= margin) {
|
|
12271
13012
|
continue;
|
|
12272
13013
|
}
|
|
@@ -12280,9 +13021,9 @@
|
|
|
12280
13021
|
}
|
|
12281
13022
|
}
|
|
12282
13023
|
} catch (err) {
|
|
12283
|
-
|
|
13024
|
+
_iterator5.e(err);
|
|
12284
13025
|
} finally {
|
|
12285
|
-
|
|
13026
|
+
_iterator5.f();
|
|
12286
13027
|
}
|
|
12287
13028
|
return false;
|
|
12288
13029
|
}
|
|
@@ -12371,21 +13112,21 @@
|
|
|
12371
13112
|
return B_cols.map(function(col) {
|
|
12372
13113
|
var ret = 0;
|
|
12373
13114
|
if (!Array.isArray(row)) {
|
|
12374
|
-
var
|
|
13115
|
+
var _iterator6 = _createForOfIteratorHelper(col), _step6;
|
|
12375
13116
|
try {
|
|
12376
|
-
for (
|
|
12377
|
-
var c4 =
|
|
13117
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done; ) {
|
|
13118
|
+
var c4 = _step6.value;
|
|
12378
13119
|
ret += row * c4;
|
|
12379
13120
|
}
|
|
12380
13121
|
} catch (err) {
|
|
12381
|
-
|
|
13122
|
+
_iterator6.e(err);
|
|
12382
13123
|
} finally {
|
|
12383
|
-
|
|
13124
|
+
_iterator6.f();
|
|
12384
13125
|
}
|
|
12385
13126
|
return ret;
|
|
12386
13127
|
}
|
|
12387
|
-
for (var
|
|
12388
|
-
ret += row[
|
|
13128
|
+
for (var _i11 = 0; _i11 < row.length; _i11++) {
|
|
13129
|
+
ret += row[_i11] * (col[_i11] || 0);
|
|
12389
13130
|
}
|
|
12390
13131
|
return ret;
|
|
12391
13132
|
});
|
|
@@ -12697,10 +13438,10 @@
|
|
|
12697
13438
|
var myPath = _classPrivateFieldGet(this, _path);
|
|
12698
13439
|
var otherPath = _classPrivateFieldGet(space, _path);
|
|
12699
13440
|
var connectionSpace, connectionSpaceIndex;
|
|
12700
|
-
for (var
|
|
12701
|
-
if (myPath[
|
|
12702
|
-
connectionSpace = myPath[
|
|
12703
|
-
connectionSpaceIndex =
|
|
13441
|
+
for (var _i12 = 0; _i12 < myPath.length; _i12++) {
|
|
13442
|
+
if (myPath[_i12] === otherPath[_i12]) {
|
|
13443
|
+
connectionSpace = myPath[_i12];
|
|
13444
|
+
connectionSpaceIndex = _i12;
|
|
12704
13445
|
} else {
|
|
12705
13446
|
break;
|
|
12706
13447
|
}
|
|
@@ -12708,11 +13449,11 @@
|
|
|
12708
13449
|
if (!connectionSpace) {
|
|
12709
13450
|
throw new Error('Cannot convert between color spaces '.concat(this, ' and ').concat(space, ': no connection space was found'));
|
|
12710
13451
|
}
|
|
12711
|
-
for (var
|
|
12712
|
-
coords = myPath[
|
|
13452
|
+
for (var _i13 = myPath.length - 1; _i13 > connectionSpaceIndex; _i13--) {
|
|
13453
|
+
coords = myPath[_i13].toBase(coords);
|
|
12713
13454
|
}
|
|
12714
|
-
for (var
|
|
12715
|
-
coords = otherPath[
|
|
13455
|
+
for (var _i14 = connectionSpaceIndex + 1; _i14 < otherPath.length; _i14++) {
|
|
13456
|
+
coords = otherPath[_i14].fromBase(coords);
|
|
12716
13457
|
}
|
|
12717
13458
|
return coords;
|
|
12718
13459
|
}
|
|
@@ -12762,16 +13503,16 @@
|
|
|
12762
13503
|
}
|
|
12763
13504
|
this.registry[id] = space;
|
|
12764
13505
|
if (arguments.length === 1 && space.aliases) {
|
|
12765
|
-
var
|
|
13506
|
+
var _iterator7 = _createForOfIteratorHelper(space.aliases), _step7;
|
|
12766
13507
|
try {
|
|
12767
|
-
for (
|
|
12768
|
-
var alias =
|
|
13508
|
+
for (_iterator7.s(); !(_step7 = _iterator7.n()).done; ) {
|
|
13509
|
+
var alias = _step7.value;
|
|
12769
13510
|
this.register(alias, space);
|
|
12770
13511
|
}
|
|
12771
13512
|
} catch (err) {
|
|
12772
|
-
|
|
13513
|
+
_iterator7.e(err);
|
|
12773
13514
|
} finally {
|
|
12774
|
-
|
|
13515
|
+
_iterator7.f();
|
|
12775
13516
|
}
|
|
12776
13517
|
}
|
|
12777
13518
|
return space;
|
|
@@ -12864,8 +13605,8 @@
|
|
|
12864
13605
|
format.type || (format.type = 'function');
|
|
12865
13606
|
format.name || (format.name = 'color');
|
|
12866
13607
|
format.coordGrammar = parseCoordGrammar(format.coords);
|
|
12867
|
-
var coordFormats = Object.entries(this.coords).map(function(
|
|
12868
|
-
var
|
|
13608
|
+
var coordFormats = Object.entries(this.coords).map(function(_ref151, i) {
|
|
13609
|
+
var _ref152 = _slicedToArray(_ref151, 2), id = _ref152[0], coordMeta = _ref152[1];
|
|
12869
13610
|
var outputType = format.coordGrammar[i][0];
|
|
12870
13611
|
var fromRange = coordMeta.range || coordMeta.refRange;
|
|
12871
13612
|
var toRange = outputType.range, suffix = '';
|
|
@@ -12993,10 +13734,10 @@
|
|
|
12993
13734
|
if (name === 'color') {
|
|
12994
13735
|
var id = env.parsed.args.shift();
|
|
12995
13736
|
var alpha = env.parsed.rawArgs.indexOf('/') > 0 ? env.parsed.args.pop() : 1;
|
|
12996
|
-
var
|
|
13737
|
+
var _iterator8 = _createForOfIteratorHelper(ColorSpace.all), _step8;
|
|
12997
13738
|
try {
|
|
12998
|
-
for (
|
|
12999
|
-
var space =
|
|
13739
|
+
for (_iterator8.s(); !(_step8 = _iterator8.n()).done; ) {
|
|
13740
|
+
var space = _step8.value;
|
|
13000
13741
|
var colorSpec = space.getFormat('color');
|
|
13001
13742
|
if (colorSpec) {
|
|
13002
13743
|
var _colorSpec$ids;
|
|
@@ -13024,9 +13765,9 @@
|
|
|
13024
13765
|
}
|
|
13025
13766
|
}
|
|
13026
13767
|
} catch (err) {
|
|
13027
|
-
|
|
13768
|
+
_iterator8.e(err);
|
|
13028
13769
|
} finally {
|
|
13029
|
-
|
|
13770
|
+
_iterator8.f();
|
|
13030
13771
|
}
|
|
13031
13772
|
var didYouMean = '';
|
|
13032
13773
|
if (id in ColorSpace.registry) {
|
|
@@ -13038,10 +13779,10 @@
|
|
|
13038
13779
|
}
|
|
13039
13780
|
throw new TypeError('Cannot parse color('.concat(id, '). ') + (didYouMean || 'Missing a plugin?'));
|
|
13040
13781
|
} else {
|
|
13041
|
-
var
|
|
13782
|
+
var _iterator9 = _createForOfIteratorHelper(ColorSpace.all), _step9;
|
|
13042
13783
|
try {
|
|
13043
13784
|
var _loop5 = function _loop5() {
|
|
13044
|
-
var space =
|
|
13785
|
+
var space = _step9.value;
|
|
13045
13786
|
var format = space.getFormat(name);
|
|
13046
13787
|
if (format && format.type === 'function') {
|
|
13047
13788
|
var _alpha = 1;
|
|
@@ -13083,16 +13824,16 @@
|
|
|
13083
13824
|
};
|
|
13084
13825
|
}
|
|
13085
13826
|
};
|
|
13086
|
-
for (
|
|
13827
|
+
for (_iterator9.s(); !(_step9 = _iterator9.n()).done; ) {
|
|
13087
13828
|
var _ret4 = _loop5();
|
|
13088
13829
|
if (_typeof(_ret4) === 'object') {
|
|
13089
13830
|
return _ret4.v;
|
|
13090
13831
|
}
|
|
13091
13832
|
}
|
|
13092
13833
|
} catch (err) {
|
|
13093
|
-
|
|
13834
|
+
_iterator9.e(err);
|
|
13094
13835
|
} finally {
|
|
13095
|
-
|
|
13836
|
+
_iterator9.f();
|
|
13096
13837
|
}
|
|
13097
13838
|
}
|
|
13098
13839
|
}();
|
|
@@ -13100,10 +13841,10 @@
|
|
|
13100
13841
|
return _ret2.v;
|
|
13101
13842
|
}
|
|
13102
13843
|
} else {
|
|
13103
|
-
var
|
|
13844
|
+
var _iterator10 = _createForOfIteratorHelper(ColorSpace.all), _step10;
|
|
13104
13845
|
try {
|
|
13105
|
-
for (
|
|
13106
|
-
var space =
|
|
13846
|
+
for (_iterator10.s(); !(_step10 = _iterator10.n()).done; ) {
|
|
13847
|
+
var space = _step10.value;
|
|
13107
13848
|
for (var formatId in space.formats) {
|
|
13108
13849
|
var format = space.formats[formatId];
|
|
13109
13850
|
if (format.type !== 'custom') {
|
|
@@ -13121,9 +13862,9 @@
|
|
|
13121
13862
|
}
|
|
13122
13863
|
}
|
|
13123
13864
|
} catch (err) {
|
|
13124
|
-
|
|
13865
|
+
_iterator10.e(err);
|
|
13125
13866
|
} finally {
|
|
13126
|
-
|
|
13867
|
+
_iterator10.f();
|
|
13127
13868
|
}
|
|
13128
13869
|
}
|
|
13129
13870
|
throw new TypeError('Could not parse '.concat(str, ' as a color. Missing a plugin?'));
|
|
@@ -13509,7 +14250,7 @@
|
|
|
13509
14250
|
function serialize(color) {
|
|
13510
14251
|
var _ref51, _color$space$getForma;
|
|
13511
14252
|
var _ref50 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13512
|
-
var _ref50$precision = _ref50.precision, precision = _ref50$precision === void 0 ? defaults.precision : _ref50$precision, _ref50$format = _ref50.format, format = _ref50$format === void 0 ? 'default' : _ref50$format, _ref50$inGamut = _ref50.inGamut, inGamut$1 = _ref50$inGamut === void 0 ? true : _ref50$inGamut, customOptions = _objectWithoutProperties(_ref50,
|
|
14253
|
+
var _ref50$precision = _ref50.precision, precision = _ref50$precision === void 0 ? defaults.precision : _ref50$precision, _ref50$format = _ref50.format, format = _ref50$format === void 0 ? 'default' : _ref50$format, _ref50$inGamut = _ref50.inGamut, inGamut$1 = _ref50$inGamut === void 0 ? true : _ref50$inGamut, customOptions = _objectWithoutProperties(_ref50, _excluded9);
|
|
13513
14254
|
var ret;
|
|
13514
14255
|
color = getColor(color);
|
|
13515
14256
|
var formatId = format;
|
|
@@ -13890,8 +14631,8 @@
|
|
|
13890
14631
|
});
|
|
13891
14632
|
defaults.display_space = sRGB;
|
|
13892
14633
|
if (typeof CSS !== 'undefined' && CSS.supports) {
|
|
13893
|
-
for (var
|
|
13894
|
-
var space =
|
|
14634
|
+
for (var _i15 = 0, _arr3 = [ lab, REC2020, P3 ]; _i15 < _arr3.length; _i15++) {
|
|
14635
|
+
var space = _arr3[_i15];
|
|
13895
14636
|
var coords = space.getMinCoords();
|
|
13896
14637
|
var color = {
|
|
13897
14638
|
space: space,
|
|
@@ -13907,7 +14648,7 @@
|
|
|
13907
14648
|
}
|
|
13908
14649
|
function _display(color) {
|
|
13909
14650
|
var _ref53 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13910
|
-
var _ref53$space = _ref53.space, space = _ref53$space === void 0 ? defaults.display_space : _ref53$space, options = _objectWithoutProperties(_ref53,
|
|
14651
|
+
var _ref53$space = _ref53.space, space = _ref53$space === void 0 ? defaults.display_space : _ref53$space, options = _objectWithoutProperties(_ref53, _excluded10);
|
|
13911
14652
|
var ret = serialize(color, options);
|
|
13912
14653
|
if (typeof CSS === 'undefined' || CSS.supports('color', ret) || !defaults.display_space) {
|
|
13913
14654
|
ret = new String(ret);
|
|
@@ -14142,7 +14883,7 @@
|
|
|
14142
14883
|
algorithm: o
|
|
14143
14884
|
};
|
|
14144
14885
|
}
|
|
14145
|
-
var _o = o, algorithm = _o.algorithm, rest = _objectWithoutProperties(_o,
|
|
14886
|
+
var _o = o, algorithm = _o.algorithm, rest = _objectWithoutProperties(_o, _excluded11);
|
|
14146
14887
|
if (!algorithm) {
|
|
14147
14888
|
var algorithms = Object.keys(contrastMethods).map(function(a2) {
|
|
14148
14889
|
return a2.replace(/^contrast/, '');
|
|
@@ -14506,7 +15247,7 @@
|
|
|
14506
15247
|
method: o
|
|
14507
15248
|
};
|
|
14508
15249
|
}
|
|
14509
|
-
var _o2 = o, _o2$method = _o2.method, method = _o2$method === void 0 ? defaults.deltaE : _o2$method, rest = _objectWithoutProperties(_o2,
|
|
15250
|
+
var _o2 = o, _o2$method = _o2.method, method = _o2$method === void 0 ? defaults.deltaE : _o2$method, rest = _objectWithoutProperties(_o2, _excluded12);
|
|
14510
15251
|
c12 = getColor(c12);
|
|
14511
15252
|
c22 = getColor(c22);
|
|
14512
15253
|
for (var m3 in deltaEMethods) {
|
|
@@ -14566,7 +15307,7 @@
|
|
|
14566
15307
|
c12 = _colorRange$rangeArgs[0];
|
|
14567
15308
|
c22 = _colorRange$rangeArgs[1];
|
|
14568
15309
|
}
|
|
14569
|
-
var _options = options, maxDeltaE = _options.maxDeltaE, deltaEMethod = _options.deltaEMethod, _options$steps = _options.steps, steps2 = _options$steps === void 0 ? 2 : _options$steps, _options$maxSteps = _options.maxSteps, maxSteps = _options$maxSteps === void 0 ? 1e3 : _options$maxSteps, rangeOptions = _objectWithoutProperties(_options,
|
|
15310
|
+
var _options = options, maxDeltaE = _options.maxDeltaE, deltaEMethod = _options.deltaEMethod, _options$steps = _options.steps, steps2 = _options$steps === void 0 ? 2 : _options$steps, _options$maxSteps = _options.maxSteps, maxSteps = _options$maxSteps === void 0 ? 1e3 : _options$maxSteps, rangeOptions = _objectWithoutProperties(_options, _excluded13);
|
|
14570
15311
|
if (!colorRange) {
|
|
14571
15312
|
var _ref60 = [ getColor(c12), getColor(c22) ];
|
|
14572
15313
|
c12 = _ref60[0];
|
|
@@ -14606,17 +15347,17 @@
|
|
|
14606
15347
|
}, 0);
|
|
14607
15348
|
while (maxDelta > maxDeltaE) {
|
|
14608
15349
|
maxDelta = 0;
|
|
14609
|
-
for (var
|
|
14610
|
-
var prev = ret[
|
|
14611
|
-
var cur = ret[
|
|
15350
|
+
for (var _i16 = 1; _i16 < ret.length && ret.length < maxSteps; _i16++) {
|
|
15351
|
+
var prev = ret[_i16 - 1];
|
|
15352
|
+
var cur = ret[_i16];
|
|
14612
15353
|
var p2 = (cur.p + prev.p) / 2;
|
|
14613
15354
|
var _color = colorRange(p2);
|
|
14614
15355
|
maxDelta = Math.max(maxDelta, deltaE(_color, prev.color), deltaE(_color, cur.color));
|
|
14615
|
-
ret.splice(
|
|
15356
|
+
ret.splice(_i16, 0, {
|
|
14616
15357
|
p: p2,
|
|
14617
15358
|
color: colorRange(p2)
|
|
14618
15359
|
});
|
|
14619
|
-
|
|
15360
|
+
_i16++;
|
|
14620
15361
|
}
|
|
14621
15362
|
}
|
|
14622
15363
|
}
|
|
@@ -15235,9 +15976,9 @@
|
|
|
15235
15976
|
_classPrivateFieldSet(this, _space, ColorSpace.get(space));
|
|
15236
15977
|
this.coords = coords ? coords.slice() : [ 0, 0, 0 ];
|
|
15237
15978
|
this.alpha = alpha < 1 ? alpha : 1;
|
|
15238
|
-
for (var
|
|
15239
|
-
if (this.coords[
|
|
15240
|
-
this.coords[
|
|
15979
|
+
for (var _i17 = 0; _i17 < this.coords.length; _i17++) {
|
|
15980
|
+
if (this.coords[_i17] === 'NaN') {
|
|
15981
|
+
this.coords[_i17] = NaN;
|
|
15241
15982
|
}
|
|
15242
15983
|
}
|
|
15243
15984
|
var _loop6 = function _loop6(id) {
|
|
@@ -15376,8 +16117,8 @@
|
|
|
15376
16117
|
parse: parse2,
|
|
15377
16118
|
defaults: defaults
|
|
15378
16119
|
});
|
|
15379
|
-
for (var
|
|
15380
|
-
var key = _Object$keys2[
|
|
16120
|
+
for (var _i18 = 0, _Object$keys2 = Object.keys(spaces); _i18 < _Object$keys2.length; _i18++) {
|
|
16121
|
+
var key = _Object$keys2[_i18];
|
|
15381
16122
|
ColorSpace.register(spaces[key]);
|
|
15382
16123
|
}
|
|
15383
16124
|
for (var id in ColorSpace.registry) {
|
|
@@ -15455,6 +16196,10 @@
|
|
|
15455
16196
|
var import_es6_promise = __toModule(require_es6_promise());
|
|
15456
16197
|
var import_typedarray = __toModule(require_typedarray());
|
|
15457
16198
|
var import_weakmap_polyfill = __toModule(require_weakmap_polyfill());
|
|
16199
|
+
var import_has_own = __toModule(require_has_own3());
|
|
16200
|
+
if (!('hasOwn' in Object)) {
|
|
16201
|
+
Object.hasOwn = import_has_own['default'];
|
|
16202
|
+
}
|
|
15458
16203
|
import_dot['default'].templateSettings.strip = false;
|
|
15459
16204
|
if (!('Promise' in window)) {
|
|
15460
16205
|
import_es6_promise['default'].polyfill();
|
|
@@ -16051,8 +16796,8 @@
|
|
|
16051
16796
|
return;
|
|
16052
16797
|
}
|
|
16053
16798
|
var shadowId = domTree[0].shadowId;
|
|
16054
|
-
for (var
|
|
16055
|
-
if (expressions[
|
|
16799
|
+
for (var _i19 = 0; _i19 < expressions.length; _i19++) {
|
|
16800
|
+
if (expressions[_i19].length > 1 && expressions[_i19].some(function(expression) {
|
|
16056
16801
|
return isGlobalSelector(expression);
|
|
16057
16802
|
})) {
|
|
16058
16803
|
return;
|
|
@@ -16113,9 +16858,9 @@
|
|
|
16113
16858
|
nodes = nodes ? getSharedValues(_cachedNodes, nodes) : _cachedNodes;
|
|
16114
16859
|
}
|
|
16115
16860
|
if (exp.attributes) {
|
|
16116
|
-
for (var
|
|
16861
|
+
for (var _i20 = 0; _i20 < exp.attributes.length; _i20++) {
|
|
16117
16862
|
var _selectorMap;
|
|
16118
|
-
var attr = exp.attributes[
|
|
16863
|
+
var attr = exp.attributes[_i20];
|
|
16119
16864
|
if (attr.type === 'attrValue') {
|
|
16120
16865
|
isComplexSelector = true;
|
|
16121
16866
|
}
|
|
@@ -16301,19 +17046,8 @@
|
|
|
16301
17046
|
if (Array.isArray(ruleResult.nodes) && ruleResult.nodes.length > 0) {
|
|
16302
17047
|
ruleResult.nodes = ruleResult.nodes.map(function(subResult) {
|
|
16303
17048
|
if (_typeof(subResult.node) === 'object') {
|
|
16304
|
-
|
|
16305
|
-
|
|
16306
|
-
subResult.element = subResult.node.element;
|
|
16307
|
-
}
|
|
16308
|
-
if (options.selectors !== false || subResult.node.fromFrame) {
|
|
16309
|
-
subResult.target = subResult.node.selector;
|
|
16310
|
-
}
|
|
16311
|
-
if (options.ancestry) {
|
|
16312
|
-
subResult.ancestry = subResult.node.ancestry;
|
|
16313
|
-
}
|
|
16314
|
-
if (options.xpath) {
|
|
16315
|
-
subResult.xpath = subResult.node.xpath;
|
|
16316
|
-
}
|
|
17049
|
+
var serialElm = trimElementSpec(subResult.node, options);
|
|
17050
|
+
Object.assign(subResult, serialElm);
|
|
16317
17051
|
}
|
|
16318
17052
|
delete subResult.result;
|
|
16319
17053
|
delete subResult.node;
|
|
@@ -16340,31 +17074,40 @@
|
|
|
16340
17074
|
return Array.isArray(checkRes.relatedNodes);
|
|
16341
17075
|
}).forEach(function(checkRes) {
|
|
16342
17076
|
checkRes.relatedNodes = checkRes.relatedNodes.map(function(relatedNode) {
|
|
16343
|
-
|
|
16344
|
-
var res = {
|
|
16345
|
-
html: (_relatedNode$source = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.source) !== null && _relatedNode$source !== void 0 ? _relatedNode$source : 'Undefined'
|
|
16346
|
-
};
|
|
16347
|
-
if (options.elementRef && !(relatedNode !== null && relatedNode !== void 0 && relatedNode.fromFrame)) {
|
|
16348
|
-
var _relatedNode$element;
|
|
16349
|
-
res.element = (_relatedNode$element = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.element) !== null && _relatedNode$element !== void 0 ? _relatedNode$element : null;
|
|
16350
|
-
}
|
|
16351
|
-
if (options.selectors !== false || relatedNode !== null && relatedNode !== void 0 && relatedNode.fromFrame) {
|
|
16352
|
-
var _relatedNode$selector;
|
|
16353
|
-
res.target = (_relatedNode$selector = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.selector) !== null && _relatedNode$selector !== void 0 ? _relatedNode$selector : [ ':root' ];
|
|
16354
|
-
}
|
|
16355
|
-
if (options.ancestry) {
|
|
16356
|
-
var _relatedNode$ancestry;
|
|
16357
|
-
res.ancestry = (_relatedNode$ancestry = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.ancestry) !== null && _relatedNode$ancestry !== void 0 ? _relatedNode$ancestry : [ ':root' ];
|
|
16358
|
-
}
|
|
16359
|
-
if (options.xpath) {
|
|
16360
|
-
var _relatedNode$xpath;
|
|
16361
|
-
res.xpath = (_relatedNode$xpath = relatedNode === null || relatedNode === void 0 ? void 0 : relatedNode.xpath) !== null && _relatedNode$xpath !== void 0 ? _relatedNode$xpath : [ '/' ];
|
|
16362
|
-
}
|
|
16363
|
-
return res;
|
|
17077
|
+
return trimElementSpec(relatedNode, options);
|
|
16364
17078
|
});
|
|
16365
17079
|
});
|
|
16366
17080
|
});
|
|
16367
17081
|
}
|
|
17082
|
+
function trimElementSpec() {
|
|
17083
|
+
var elmSpec = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
17084
|
+
var runOptions = arguments.length > 1 ? arguments[1] : undefined;
|
|
17085
|
+
elmSpec = node_serializer_default.dqElmToSpec(elmSpec, runOptions);
|
|
17086
|
+
var serialElm = {};
|
|
17087
|
+
if (axe._audit.noHtml) {
|
|
17088
|
+
serialElm.html = null;
|
|
17089
|
+
} else {
|
|
17090
|
+
var _elmSpec$source;
|
|
17091
|
+
serialElm.html = (_elmSpec$source = elmSpec.source) !== null && _elmSpec$source !== void 0 ? _elmSpec$source : 'Undefined';
|
|
17092
|
+
}
|
|
17093
|
+
if (runOptions.elementRef && !elmSpec.fromFrame) {
|
|
17094
|
+
var _elmSpec$element;
|
|
17095
|
+
serialElm.element = (_elmSpec$element = elmSpec.element) !== null && _elmSpec$element !== void 0 ? _elmSpec$element : null;
|
|
17096
|
+
}
|
|
17097
|
+
if (runOptions.selectors !== false || elmSpec.fromFrame) {
|
|
17098
|
+
var _elmSpec$selector;
|
|
17099
|
+
serialElm.target = (_elmSpec$selector = elmSpec.selector) !== null && _elmSpec$selector !== void 0 ? _elmSpec$selector : [ ':root' ];
|
|
17100
|
+
}
|
|
17101
|
+
if (runOptions.ancestry) {
|
|
17102
|
+
var _elmSpec$ancestry;
|
|
17103
|
+
serialElm.ancestry = (_elmSpec$ancestry = elmSpec.ancestry) !== null && _elmSpec$ancestry !== void 0 ? _elmSpec$ancestry : [ ':root' ];
|
|
17104
|
+
}
|
|
17105
|
+
if (runOptions.xpath) {
|
|
17106
|
+
var _elmSpec$xpath;
|
|
17107
|
+
serialElm.xpath = (_elmSpec$xpath = elmSpec.xpath) !== null && _elmSpec$xpath !== void 0 ? _elmSpec$xpath : [ '/' ];
|
|
17108
|
+
}
|
|
17109
|
+
return serialElm;
|
|
17110
|
+
}
|
|
16368
17111
|
var dataRegex = /\$\{\s?data\s?\}/g;
|
|
16369
17112
|
function substitute(str, data) {
|
|
16370
17113
|
if (typeof data === 'string') {
|
|
@@ -16552,8 +17295,8 @@
|
|
|
16552
17295
|
if (!isArrayLike(selectorList)) {
|
|
16553
17296
|
selectorList = [ selectorList ];
|
|
16554
17297
|
}
|
|
16555
|
-
for (var
|
|
16556
|
-
var normalizedSelector = normalizeContextSelector(selectorList[
|
|
17298
|
+
for (var _i21 = 0; _i21 < selectorList.length; _i21++) {
|
|
17299
|
+
var normalizedSelector = normalizeContextSelector(selectorList[_i21]);
|
|
16557
17300
|
if (normalizedSelector) {
|
|
16558
17301
|
normalizedList.push(normalizedSelector);
|
|
16559
17302
|
}
|
|
@@ -16580,10 +17323,10 @@
|
|
|
16580
17323
|
return;
|
|
16581
17324
|
}
|
|
16582
17325
|
var normalizedSelectors = [];
|
|
16583
|
-
var
|
|
17326
|
+
var _iterator11 = _createForOfIteratorHelper(frameSelectors), _step11;
|
|
16584
17327
|
try {
|
|
16585
|
-
for (
|
|
16586
|
-
var selector =
|
|
17328
|
+
for (_iterator11.s(); !(_step11 = _iterator11.n()).done; ) {
|
|
17329
|
+
var selector = _step11.value;
|
|
16587
17330
|
if (isLabelledShadowDomSelector(selector)) {
|
|
16588
17331
|
assertLabelledShadowDomSelector(selector);
|
|
16589
17332
|
selector = selector.fromShadowDom;
|
|
@@ -16594,9 +17337,9 @@
|
|
|
16594
17337
|
normalizedSelectors.push(selector);
|
|
16595
17338
|
}
|
|
16596
17339
|
} catch (err) {
|
|
16597
|
-
|
|
17340
|
+
_iterator11.e(err);
|
|
16598
17341
|
} finally {
|
|
16599
|
-
|
|
17342
|
+
_iterator11.f();
|
|
16600
17343
|
}
|
|
16601
17344
|
return normalizedSelectors;
|
|
16602
17345
|
}
|
|
@@ -16649,8 +17392,8 @@
|
|
|
16649
17392
|
}
|
|
16650
17393
|
function parseSelectorArray(context, type2) {
|
|
16651
17394
|
var result = [];
|
|
16652
|
-
for (var
|
|
16653
|
-
var item = context[type2][
|
|
17395
|
+
for (var _i22 = 0, l = context[type2].length; _i22 < l; _i22++) {
|
|
17396
|
+
var item = context[type2][_i22];
|
|
16654
17397
|
if (item instanceof window.Node) {
|
|
16655
17398
|
if (item.documentElement instanceof window.Node) {
|
|
16656
17399
|
result.push(context.flatTree[0]);
|
|
@@ -16737,8 +17480,8 @@
|
|
|
16737
17480
|
function getRootNode2(_ref69) {
|
|
16738
17481
|
var include = _ref69.include, exclude = _ref69.exclude;
|
|
16739
17482
|
var selectors = Array.from(include).concat(Array.from(exclude));
|
|
16740
|
-
for (var
|
|
16741
|
-
var item = selectors[
|
|
17483
|
+
for (var _i23 = 0; _i23 < selectors.length; _i23++) {
|
|
17484
|
+
var item = selectors[_i23];
|
|
16742
17485
|
if (item instanceof window.Element) {
|
|
16743
17486
|
return item.ownerDocument.documentElement;
|
|
16744
17487
|
}
|
|
@@ -16755,7 +17498,7 @@
|
|
|
16755
17498
|
}
|
|
16756
17499
|
var _Context = new Context(context), frames = _Context.frames;
|
|
16757
17500
|
return frames.map(function(_ref70) {
|
|
16758
|
-
var node = _ref70.node, frameContext = _objectWithoutProperties(_ref70,
|
|
17501
|
+
var node = _ref70.node, frameContext = _objectWithoutProperties(_ref70, _excluded14);
|
|
16759
17502
|
frameContext.initiator = false;
|
|
16760
17503
|
var frameSelector = _getAncestry(node);
|
|
16761
17504
|
return {
|
|
@@ -16925,18 +17668,18 @@
|
|
|
16925
17668
|
}
|
|
16926
17669
|
function getDeepest(collection) {
|
|
16927
17670
|
var deepest;
|
|
16928
|
-
var
|
|
17671
|
+
var _iterator12 = _createForOfIteratorHelper(collection), _step12;
|
|
16929
17672
|
try {
|
|
16930
|
-
for (
|
|
16931
|
-
var node =
|
|
17673
|
+
for (_iterator12.s(); !(_step12 = _iterator12.n()).done; ) {
|
|
17674
|
+
var node = _step12.value;
|
|
16932
17675
|
if (!deepest || !_contains(node, deepest)) {
|
|
16933
17676
|
deepest = node;
|
|
16934
17677
|
}
|
|
16935
17678
|
}
|
|
16936
17679
|
} catch (err) {
|
|
16937
|
-
|
|
17680
|
+
_iterator12.e(err);
|
|
16938
17681
|
} finally {
|
|
16939
|
-
|
|
17682
|
+
_iterator12.f();
|
|
16940
17683
|
}
|
|
16941
17684
|
return deepest;
|
|
16942
17685
|
}
|
|
@@ -17426,9 +18169,9 @@
|
|
|
17426
18169
|
var childAny = null;
|
|
17427
18170
|
var combinedLength = (((_currentLevel$anyLeve = currentLevel.anyLevel) === null || _currentLevel$anyLeve === void 0 ? void 0 : _currentLevel$anyLeve.length) || 0) + (((_currentLevel$thisLev = currentLevel.thisLevel) === null || _currentLevel$thisLev === void 0 ? void 0 : _currentLevel$thisLev.length) || 0);
|
|
17428
18171
|
var added = false;
|
|
17429
|
-
for (var
|
|
18172
|
+
for (var _i24 = 0; _i24 < combinedLength; _i24++) {
|
|
17430
18173
|
var _currentLevel$anyLeve2, _currentLevel$anyLeve3, _currentLevel$anyLeve4;
|
|
17431
|
-
var exp =
|
|
18174
|
+
var exp = _i24 < (((_currentLevel$anyLeve2 = currentLevel.anyLevel) === null || _currentLevel$anyLeve2 === void 0 ? void 0 : _currentLevel$anyLeve2.length) || 0) ? currentLevel.anyLevel[_i24] : currentLevel.thisLevel[_i24 - (((_currentLevel$anyLeve3 = currentLevel.anyLevel) === null || _currentLevel$anyLeve3 === void 0 ? void 0 : _currentLevel$anyLeve3.length) || 0)];
|
|
17432
18175
|
if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && _matchesExpression(vNode, exp[0])) {
|
|
17433
18176
|
if (exp.length === 1) {
|
|
17434
18177
|
if (!added && (!filter || filter(vNode))) {
|
|
@@ -17549,7 +18292,9 @@
|
|
|
17549
18292
|
isLink: isLink,
|
|
17550
18293
|
root: rootNode
|
|
17551
18294
|
});
|
|
17552
|
-
|
|
18295
|
+
if (stylesheet.sheet) {
|
|
18296
|
+
out.push(stylesheet.sheet);
|
|
18297
|
+
}
|
|
17553
18298
|
return out;
|
|
17554
18299
|
}, []);
|
|
17555
18300
|
}
|
|
@@ -17853,8 +18598,8 @@
|
|
|
17853
18598
|
}
|
|
17854
18599
|
var outerIncludes = getOuterIncludes(context.include);
|
|
17855
18600
|
var isInContext = getContextFilter(context);
|
|
17856
|
-
for (var
|
|
17857
|
-
candidate = outerIncludes[
|
|
18601
|
+
for (var _i25 = 0; _i25 < outerIncludes.length; _i25++) {
|
|
18602
|
+
candidate = outerIncludes[_i25];
|
|
17858
18603
|
var nodes = query_selector_all_filter_default(candidate, selector, isInContext);
|
|
17859
18604
|
result = mergeArrayUniques(result, nodes);
|
|
17860
18605
|
}
|
|
@@ -17891,9 +18636,9 @@
|
|
|
17891
18636
|
arr1 = arr2;
|
|
17892
18637
|
arr2 = temp;
|
|
17893
18638
|
}
|
|
17894
|
-
for (var
|
|
17895
|
-
if (!arr1.includes(arr2[
|
|
17896
|
-
arr1.push(arr2[
|
|
18639
|
+
for (var _i26 = 0, l = arr2.length; _i26 < l; _i26++) {
|
|
18640
|
+
if (!arr1.includes(arr2[_i26])) {
|
|
18641
|
+
arr1.push(arr2[_i26]);
|
|
17897
18642
|
}
|
|
17898
18643
|
}
|
|
17899
18644
|
return arr1;
|
|
@@ -17943,18 +18688,18 @@
|
|
|
17943
18688
|
return Array.from(elms);
|
|
17944
18689
|
}
|
|
17945
18690
|
var selected = [];
|
|
17946
|
-
var
|
|
18691
|
+
var _iterator13 = _createForOfIteratorHelper(elms), _step13;
|
|
17947
18692
|
try {
|
|
17948
|
-
for (
|
|
17949
|
-
var elm =
|
|
18693
|
+
for (_iterator13.s(); !(_step13 = _iterator13.n()).done; ) {
|
|
18694
|
+
var elm = _step13.value;
|
|
17950
18695
|
if (elm !== null && elm !== void 0 && elm.shadowRoot) {
|
|
17951
18696
|
selected.push.apply(selected, _toConsumableArray(selectAllRecursive(restSelector, elm.shadowRoot)));
|
|
17952
18697
|
}
|
|
17953
18698
|
}
|
|
17954
18699
|
} catch (err) {
|
|
17955
|
-
|
|
18700
|
+
_iterator13.e(err);
|
|
17956
18701
|
} finally {
|
|
17957
|
-
|
|
18702
|
+
_iterator13.f();
|
|
17958
18703
|
}
|
|
17959
18704
|
return selected;
|
|
17960
18705
|
}
|
|
@@ -17968,8 +18713,8 @@
|
|
|
17968
18713
|
while (lang.length < 3) {
|
|
17969
18714
|
lang += '`';
|
|
17970
18715
|
}
|
|
17971
|
-
for (var
|
|
17972
|
-
var index = lang.charCodeAt(
|
|
18716
|
+
for (var _i27 = 0; _i27 <= lang.length - 1; _i27++) {
|
|
18717
|
+
var index = lang.charCodeAt(_i27) - 96;
|
|
17973
18718
|
array = array[index];
|
|
17974
18719
|
if (!array) {
|
|
17975
18720
|
return false;
|
|
@@ -18357,16 +19102,16 @@
|
|
|
18357
19102
|
idRefs.get(_id2).push(node);
|
|
18358
19103
|
}
|
|
18359
19104
|
}
|
|
18360
|
-
for (var
|
|
18361
|
-
var attr = refAttrs[
|
|
19105
|
+
for (var _i28 = 0; _i28 < refAttrs.length; ++_i28) {
|
|
19106
|
+
var attr = refAttrs[_i28];
|
|
18362
19107
|
var attrValue = sanitize_default(node.getAttribute(attr) || '');
|
|
18363
19108
|
if (!attrValue) {
|
|
18364
19109
|
continue;
|
|
18365
19110
|
}
|
|
18366
|
-
var
|
|
19111
|
+
var _iterator14 = _createForOfIteratorHelper(token_list_default(attrValue)), _step14;
|
|
18367
19112
|
try {
|
|
18368
|
-
for (
|
|
18369
|
-
var token =
|
|
19113
|
+
for (_iterator14.s(); !(_step14 = _iterator14.n()).done; ) {
|
|
19114
|
+
var token = _step14.value;
|
|
18370
19115
|
if (!idRefs.has(token)) {
|
|
18371
19116
|
idRefs.set(token, [ node ]);
|
|
18372
19117
|
} else {
|
|
@@ -18374,15 +19119,15 @@
|
|
|
18374
19119
|
}
|
|
18375
19120
|
}
|
|
18376
19121
|
} catch (err) {
|
|
18377
|
-
|
|
19122
|
+
_iterator14.e(err);
|
|
18378
19123
|
} finally {
|
|
18379
|
-
|
|
19124
|
+
_iterator14.f();
|
|
18380
19125
|
}
|
|
18381
19126
|
}
|
|
18382
19127
|
}
|
|
18383
|
-
for (var
|
|
18384
|
-
if (node.childNodes[
|
|
18385
|
-
cacheIdRefs(node.childNodes[
|
|
19128
|
+
for (var _i29 = 0; _i29 < node.childNodes.length; _i29++) {
|
|
19129
|
+
if (node.childNodes[_i29].nodeType === 1) {
|
|
19130
|
+
cacheIdRefs(node.childNodes[_i29], idRefs, refAttrs);
|
|
18386
19131
|
}
|
|
18387
19132
|
}
|
|
18388
19133
|
}
|
|
@@ -20483,18 +21228,18 @@
|
|
|
20483
21228
|
if (Array.isArray(options[role])) {
|
|
20484
21229
|
allowed = unique_array_default(options[role].concat(allowed));
|
|
20485
21230
|
}
|
|
20486
|
-
var
|
|
21231
|
+
var _iterator15 = _createForOfIteratorHelper(virtualNode.attrNames), _step15;
|
|
20487
21232
|
try {
|
|
20488
|
-
for (
|
|
20489
|
-
var attrName =
|
|
21233
|
+
for (_iterator15.s(); !(_step15 = _iterator15.n()).done; ) {
|
|
21234
|
+
var attrName = _step15.value;
|
|
20490
21235
|
if (validate_attr_default(attrName) && !allowed.includes(attrName)) {
|
|
20491
21236
|
invalid.push(attrName);
|
|
20492
21237
|
}
|
|
20493
21238
|
}
|
|
20494
21239
|
} catch (err) {
|
|
20495
|
-
|
|
21240
|
+
_iterator15.e(err);
|
|
20496
21241
|
} finally {
|
|
20497
|
-
|
|
21242
|
+
_iterator15.f();
|
|
20498
21243
|
}
|
|
20499
21244
|
if (!invalid.length) {
|
|
20500
21245
|
return true;
|
|
@@ -20926,8 +21671,8 @@
|
|
|
20926
21671
|
}
|
|
20927
21672
|
var owners = getAriaOwners(node);
|
|
20928
21673
|
if (owners) {
|
|
20929
|
-
for (var
|
|
20930
|
-
missingParents = getMissingContext(get_node_from_tree_default(owners[
|
|
21674
|
+
for (var _i30 = 0, l = owners.length; _i30 < l; _i30++) {
|
|
21675
|
+
missingParents = getMissingContext(get_node_from_tree_default(owners[_i30]), ownGroupRoles, missingParents, true);
|
|
20931
21676
|
if (!missingParents) {
|
|
20932
21677
|
return true;
|
|
20933
21678
|
}
|
|
@@ -20957,11 +21702,11 @@
|
|
|
20957
21702
|
if (!validate_attr_default(name)) {
|
|
20958
21703
|
return false;
|
|
20959
21704
|
}
|
|
20960
|
-
var
|
|
20961
|
-
if (_typeof(
|
|
20962
|
-
return !!
|
|
21705
|
+
var unsupported = attribute.unsupported;
|
|
21706
|
+
if (_typeof(unsupported) !== 'object') {
|
|
21707
|
+
return !!unsupported;
|
|
20963
21708
|
}
|
|
20964
|
-
return !matches_default2(node,
|
|
21709
|
+
return !matches_default2(node, unsupported.exceptions);
|
|
20965
21710
|
});
|
|
20966
21711
|
if (unsupportedAttrs.length) {
|
|
20967
21712
|
this.data(unsupportedAttrs);
|
|
@@ -21529,11 +22274,11 @@
|
|
|
21529
22274
|
}
|
|
21530
22275
|
function getShadowColorsMap(parsedShadows) {
|
|
21531
22276
|
var colorMap = {};
|
|
21532
|
-
var
|
|
22277
|
+
var _iterator16 = _createForOfIteratorHelper(parsedShadows), _step16;
|
|
21533
22278
|
try {
|
|
21534
|
-
for (
|
|
22279
|
+
for (_iterator16.s(); !(_step16 = _iterator16.n()).done; ) {
|
|
21535
22280
|
var _colorMap$colorStr;
|
|
21536
|
-
var
|
|
22281
|
+
var _step16$value = _step16.value, colorStr = _step16$value.colorStr, pixels = _step16$value.pixels;
|
|
21537
22282
|
(_colorMap$colorStr = colorMap[colorStr]) !== null && _colorMap$colorStr !== void 0 ? _colorMap$colorStr : colorMap[colorStr] = {
|
|
21538
22283
|
top: [],
|
|
21539
22284
|
right: [],
|
|
@@ -21554,9 +22299,9 @@
|
|
|
21554
22299
|
}
|
|
21555
22300
|
}
|
|
21556
22301
|
} catch (err) {
|
|
21557
|
-
|
|
22302
|
+
_iterator16.e(err);
|
|
21558
22303
|
} finally {
|
|
21559
|
-
|
|
22304
|
+
_iterator16.f();
|
|
21560
22305
|
}
|
|
21561
22306
|
return colorMap;
|
|
21562
22307
|
}
|
|
@@ -21633,10 +22378,10 @@
|
|
|
21633
22378
|
assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
|
|
21634
22379
|
var thinShadows = [];
|
|
21635
22380
|
var shadows = _parseTextShadows(textShadow);
|
|
21636
|
-
var
|
|
22381
|
+
var _iterator17 = _createForOfIteratorHelper(shadows), _step17;
|
|
21637
22382
|
try {
|
|
21638
|
-
for (
|
|
21639
|
-
var shadow =
|
|
22383
|
+
for (_iterator17.s(); !(_step17 = _iterator17.n()).done; ) {
|
|
22384
|
+
var shadow = _step17.value;
|
|
21640
22385
|
var colorStr = shadow.colorStr || style.getPropertyValue('color');
|
|
21641
22386
|
var _shadow$pixels = _slicedToArray(shadow.pixels, 3), offsetX = _shadow$pixels[0], offsetY = _shadow$pixels[1], _shadow$pixels$ = _shadow$pixels[2], blurRadius = _shadow$pixels$ === void 0 ? 0 : _shadow$pixels$;
|
|
21642
22387
|
if (maxRatio && blurRadius >= fontSize * maxRatio) {
|
|
@@ -21669,9 +22414,9 @@
|
|
|
21669
22414
|
shadowColors.push(_color3);
|
|
21670
22415
|
}
|
|
21671
22416
|
} catch (err) {
|
|
21672
|
-
|
|
22417
|
+
_iterator17.e(err);
|
|
21673
22418
|
} finally {
|
|
21674
|
-
|
|
22419
|
+
_iterator17.f();
|
|
21675
22420
|
}
|
|
21676
22421
|
if (thinShadows.length > 0) {
|
|
21677
22422
|
var strokeColors = _getStrokeColorsFromShadows(thinShadows, {
|
|
@@ -21828,8 +22573,8 @@
|
|
|
21828
22573
|
color: bgColors.reduce(_flattenShadowColors)
|
|
21829
22574
|
} ];
|
|
21830
22575
|
}
|
|
21831
|
-
for (var
|
|
21832
|
-
var bgElm = elmStack[
|
|
22576
|
+
for (var _i31 = 0; _i31 < elmStack.length; _i31++) {
|
|
22577
|
+
var bgElm = elmStack[_i31];
|
|
21833
22578
|
var bgElmStyle = window.getComputedStyle(bgElm);
|
|
21834
22579
|
if (element_has_image_default(bgElm, bgElmStyle)) {
|
|
21835
22580
|
bgElms.push(bgElm);
|
|
@@ -21929,8 +22674,8 @@
|
|
|
21929
22674
|
});
|
|
21930
22675
|
} ];
|
|
21931
22676
|
var fgColors = [];
|
|
21932
|
-
for (var
|
|
21933
|
-
var colorFn = _colorStack[
|
|
22677
|
+
for (var _i32 = 0, _colorStack = colorStack; _i32 < _colorStack.length; _i32++) {
|
|
22678
|
+
var colorFn = _colorStack[_i32];
|
|
21934
22679
|
var _color4 = colorFn();
|
|
21935
22680
|
if (!_color4) {
|
|
21936
22681
|
continue;
|
|
@@ -21999,11 +22744,11 @@
|
|
|
21999
22744
|
return fgColor;
|
|
22000
22745
|
}
|
|
22001
22746
|
function findNodeInContexts(contexts, node) {
|
|
22002
|
-
var
|
|
22747
|
+
var _iterator18 = _createForOfIteratorHelper(contexts), _step18;
|
|
22003
22748
|
try {
|
|
22004
|
-
for (
|
|
22749
|
+
for (_iterator18.s(); !(_step18 = _iterator18.n()).done; ) {
|
|
22005
22750
|
var _context$vNode;
|
|
22006
|
-
var context =
|
|
22751
|
+
var context = _step18.value;
|
|
22007
22752
|
if (((_context$vNode = context.vNode) === null || _context$vNode === void 0 ? void 0 : _context$vNode.actualNode) === node) {
|
|
22008
22753
|
return context;
|
|
22009
22754
|
}
|
|
@@ -22013,9 +22758,9 @@
|
|
|
22013
22758
|
}
|
|
22014
22759
|
}
|
|
22015
22760
|
} catch (err) {
|
|
22016
|
-
|
|
22761
|
+
_iterator18.e(err);
|
|
22017
22762
|
} finally {
|
|
22018
|
-
|
|
22763
|
+
_iterator18.f();
|
|
22019
22764
|
}
|
|
22020
22765
|
}
|
|
22021
22766
|
function hasValidContrastRatio(bg, fg, fontSize, isBold) {
|
|
@@ -22289,8 +23034,8 @@
|
|
|
22289
23034
|
return blockLike3.indexOf(display2) !== -1 || display2.substr(0, 6) === 'table-';
|
|
22290
23035
|
}
|
|
22291
23036
|
function hasPseudoContent(node) {
|
|
22292
|
-
for (var
|
|
22293
|
-
var pseudo =
|
|
23037
|
+
for (var _i33 = 0, _arr4 = [ 'before', 'after' ]; _i33 < _arr4.length; _i33++) {
|
|
23038
|
+
var pseudo = _arr4[_i33];
|
|
22294
23039
|
var style = window.getComputedStyle(node, ':'.concat(pseudo));
|
|
22295
23040
|
var content = style.getPropertyValue('content');
|
|
22296
23041
|
if (content !== 'none') {
|
|
@@ -23270,7 +24015,7 @@
|
|
|
23270
24015
|
var relatedElements = [];
|
|
23271
24016
|
var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);
|
|
23272
24017
|
var _loop8 = function _loop8() {
|
|
23273
|
-
var key = _Object$keys3[
|
|
24018
|
+
var key = _Object$keys3[_i34];
|
|
23274
24019
|
var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;
|
|
23275
24020
|
var orientationRules = rules.filter(isMediaRuleWithOrientation);
|
|
23276
24021
|
if (!orientationRules.length) {
|
|
@@ -23288,7 +24033,7 @@
|
|
|
23288
24033
|
});
|
|
23289
24034
|
});
|
|
23290
24035
|
};
|
|
23291
|
-
for (var
|
|
24036
|
+
for (var _i34 = 0, _Object$keys3 = Object.keys(rulesGroupByDocumentFragment); _i34 < _Object$keys3.length; _i34++) {
|
|
23292
24037
|
var _ret6 = _loop8();
|
|
23293
24038
|
if (_ret6 === 'continue') {
|
|
23294
24039
|
continue;
|
|
@@ -23475,29 +24220,29 @@
|
|
|
23475
24220
|
return true;
|
|
23476
24221
|
}
|
|
23477
24222
|
var meta_viewport_scale_evaluate_default = metaViewportScaleEvaluate;
|
|
23478
|
-
var
|
|
24223
|
+
var roundingMargin2 = .05;
|
|
23479
24224
|
function targetOffsetEvaluate(node, options, vNode) {
|
|
23480
24225
|
var minOffset = (options === null || options === void 0 ? void 0 : options.minOffset) || 24;
|
|
23481
24226
|
var closeNeighbors = [];
|
|
23482
24227
|
var closestOffset = minOffset;
|
|
23483
|
-
var
|
|
24228
|
+
var _iterator19 = _createForOfIteratorHelper(_findNearbyElms(vNode, minOffset)), _step19;
|
|
23484
24229
|
try {
|
|
23485
|
-
for (
|
|
23486
|
-
var vNeighbor =
|
|
24230
|
+
for (_iterator19.s(); !(_step19 = _iterator19.n()).done; ) {
|
|
24231
|
+
var vNeighbor = _step19.value;
|
|
23487
24232
|
if (get_role_type_default(vNeighbor) !== 'widget' || !_isFocusable(vNeighbor)) {
|
|
23488
24233
|
continue;
|
|
23489
24234
|
}
|
|
23490
|
-
var offset = roundToSingleDecimal(_getOffset(vNode, vNeighbor));
|
|
23491
|
-
if (offset +
|
|
24235
|
+
var offset = roundToSingleDecimal(_getOffset(vNode, vNeighbor, minOffset / 2)) * 2;
|
|
24236
|
+
if (offset + roundingMargin2 >= minOffset) {
|
|
23492
24237
|
continue;
|
|
23493
24238
|
}
|
|
23494
24239
|
closestOffset = Math.min(closestOffset, offset);
|
|
23495
24240
|
closeNeighbors.push(vNeighbor);
|
|
23496
24241
|
}
|
|
23497
24242
|
} catch (err) {
|
|
23498
|
-
|
|
24243
|
+
_iterator19.e(err);
|
|
23499
24244
|
} finally {
|
|
23500
|
-
|
|
24245
|
+
_iterator19.f();
|
|
23501
24246
|
}
|
|
23502
24247
|
if (closeNeighbors.length === 0) {
|
|
23503
24248
|
this.data({
|
|
@@ -23527,11 +24272,10 @@
|
|
|
23527
24272
|
function roundToSingleDecimal(num) {
|
|
23528
24273
|
return Math.round(num * 10) / 10;
|
|
23529
24274
|
}
|
|
23530
|
-
var roundingMargin2 = .05;
|
|
23531
24275
|
function targetSize(node, options, vNode) {
|
|
23532
24276
|
var minSize = (options === null || options === void 0 ? void 0 : options.minSize) || 24;
|
|
23533
24277
|
var nodeRect = vNode.boundingClientRect;
|
|
23534
|
-
var hasMinimumSize =
|
|
24278
|
+
var hasMinimumSize = _rectHasMinimumSize.bind(null, minSize);
|
|
23535
24279
|
var nearbyElms = _findNearbyElms(vNode);
|
|
23536
24280
|
var overflowingContent = filterOverflowingContent(vNode, nearbyElms);
|
|
23537
24281
|
var _filterByElmsOverlap = filterByElmsOverlap(vNode, nearbyElms), fullyObscuringElms = _filterByElmsOverlap.fullyObscuringElms, partialObscuringElms = _filterByElmsOverlap.partialObscuringElms;
|
|
@@ -23579,18 +24323,18 @@
|
|
|
23579
24323
|
}
|
|
23580
24324
|
function filterOverflowingContent(vNode, nearbyElms) {
|
|
23581
24325
|
return nearbyElms.filter(function(nearbyElm) {
|
|
23582
|
-
return !
|
|
24326
|
+
return !isEnclosedRect2(nearbyElm, vNode) && isDescendantNotInTabOrder2(vNode, nearbyElm);
|
|
23583
24327
|
});
|
|
23584
24328
|
}
|
|
23585
24329
|
function filterByElmsOverlap(vNode, nearbyElms) {
|
|
23586
24330
|
var fullyObscuringElms = [];
|
|
23587
24331
|
var partialObscuringElms = [];
|
|
23588
|
-
var
|
|
24332
|
+
var _iterator20 = _createForOfIteratorHelper(nearbyElms), _step20;
|
|
23589
24333
|
try {
|
|
23590
|
-
for (
|
|
23591
|
-
var vNeighbor =
|
|
23592
|
-
if (!
|
|
23593
|
-
if (
|
|
24334
|
+
for (_iterator20.s(); !(_step20 = _iterator20.n()).done; ) {
|
|
24335
|
+
var vNeighbor = _step20.value;
|
|
24336
|
+
if (!isDescendantNotInTabOrder2(vNode, vNeighbor) && _hasVisualOverlap(vNode, vNeighbor) && getCssPointerEvents(vNeighbor) !== 'none') {
|
|
24337
|
+
if (isEnclosedRect2(vNode, vNeighbor)) {
|
|
23594
24338
|
fullyObscuringElms.push(vNeighbor);
|
|
23595
24339
|
} else {
|
|
23596
24340
|
partialObscuringElms.push(vNeighbor);
|
|
@@ -23598,9 +24342,9 @@
|
|
|
23598
24342
|
}
|
|
23599
24343
|
}
|
|
23600
24344
|
} catch (err) {
|
|
23601
|
-
|
|
24345
|
+
_iterator20.e(err);
|
|
23602
24346
|
} finally {
|
|
23603
|
-
|
|
24347
|
+
_iterator20.f();
|
|
23604
24348
|
}
|
|
23605
24349
|
return {
|
|
23606
24350
|
fullyObscuringElms: fullyObscuringElms,
|
|
@@ -23617,12 +24361,12 @@
|
|
|
23617
24361
|
return rect;
|
|
23618
24362
|
});
|
|
23619
24363
|
var unobscuredRects = _splitRects(nodeRect, obscuringRects);
|
|
23620
|
-
return
|
|
24364
|
+
return getLargestRect2(unobscuredRects);
|
|
23621
24365
|
}
|
|
23622
|
-
function
|
|
24366
|
+
function getLargestRect2(rects, minSize) {
|
|
23623
24367
|
return rects.reduce(function(rectA, rectB) {
|
|
23624
|
-
var rectAisMinimum =
|
|
23625
|
-
var rectBisMinimum =
|
|
24368
|
+
var rectAisMinimum = _rectHasMinimumSize(minSize, rectA);
|
|
24369
|
+
var rectBisMinimum = _rectHasMinimumSize(minSize, rectB);
|
|
23626
24370
|
if (rectAisMinimum !== rectBisMinimum) {
|
|
23627
24371
|
return rectAisMinimum ? rectA : rectB;
|
|
23628
24372
|
}
|
|
@@ -23636,7 +24380,7 @@
|
|
|
23636
24380
|
return get_role_type_default(vNode) === 'widget' && _isFocusable(vNode);
|
|
23637
24381
|
});
|
|
23638
24382
|
}
|
|
23639
|
-
function
|
|
24383
|
+
function isEnclosedRect2(vNodeA, vNodeB) {
|
|
23640
24384
|
var rectA = vNodeA.boundingClientRect;
|
|
23641
24385
|
var rectB = vNodeB.boundingClientRect;
|
|
23642
24386
|
return rectA.top >= rectB.top && rectA.left >= rectB.left && rectA.bottom <= rectB.bottom && rectA.right <= rectB.right;
|
|
@@ -23650,16 +24394,12 @@
|
|
|
23650
24394
|
height: Math.round(rect.height * 10) / 10
|
|
23651
24395
|
};
|
|
23652
24396
|
}
|
|
23653
|
-
function
|
|
24397
|
+
function isDescendantNotInTabOrder2(vAncestor, vNode) {
|
|
23654
24398
|
return vAncestor.actualNode.contains(vNode.actualNode) && !_isInTabOrder(vNode);
|
|
23655
24399
|
}
|
|
23656
|
-
function rectHasMinimumSize(minSize, _ref129) {
|
|
23657
|
-
var width = _ref129.width, height = _ref129.height;
|
|
23658
|
-
return width + roundingMargin2 >= minSize && height + roundingMargin2 >= minSize;
|
|
23659
|
-
}
|
|
23660
24400
|
function mapActualNodes(vNodes) {
|
|
23661
|
-
return vNodes.map(function(
|
|
23662
|
-
var actualNode =
|
|
24401
|
+
return vNodes.map(function(_ref129) {
|
|
24402
|
+
var actualNode = _ref129.actualNode;
|
|
23663
24403
|
return actualNode;
|
|
23664
24404
|
});
|
|
23665
24405
|
}
|
|
@@ -23685,14 +24425,14 @@
|
|
|
23685
24425
|
}
|
|
23686
24426
|
function getHeadingOrder(results) {
|
|
23687
24427
|
results = _toConsumableArray(results);
|
|
23688
|
-
results.sort(function(
|
|
23689
|
-
var nodeA =
|
|
23690
|
-
var nodeB =
|
|
24428
|
+
results.sort(function(_ref130, _ref131) {
|
|
24429
|
+
var nodeA = _ref130.node;
|
|
24430
|
+
var nodeB = _ref131.node;
|
|
23691
24431
|
return nodeA.ancestry.length - nodeB.ancestry.length;
|
|
23692
24432
|
});
|
|
23693
24433
|
var headingOrder = results.reduce(mergeHeadingOrder, []);
|
|
23694
|
-
return headingOrder.filter(function(
|
|
23695
|
-
var level =
|
|
24434
|
+
return headingOrder.filter(function(_ref132) {
|
|
24435
|
+
var level = _ref132.level;
|
|
23696
24436
|
return level !== -1;
|
|
23697
24437
|
});
|
|
23698
24438
|
}
|
|
@@ -23743,7 +24483,7 @@
|
|
|
23743
24483
|
var headingRole = role && role.includes('heading');
|
|
23744
24484
|
var ariaHeadingLevel = vNode.attr('aria-level');
|
|
23745
24485
|
var ariaLevel = parseInt(ariaHeadingLevel, 10);
|
|
23746
|
-
var
|
|
24486
|
+
var _ref133 = vNode.props.nodeName.match(/h(\d)/) || [], _ref134 = _slicedToArray(_ref133, 2), headingLevel = _ref134[1];
|
|
23747
24487
|
if (!headingRole) {
|
|
23748
24488
|
return -1;
|
|
23749
24489
|
}
|
|
@@ -23807,8 +24547,8 @@
|
|
|
23807
24547
|
if (results.length < 2) {
|
|
23808
24548
|
return results;
|
|
23809
24549
|
}
|
|
23810
|
-
var incompleteResults = results.filter(function(
|
|
23811
|
-
var result =
|
|
24550
|
+
var incompleteResults = results.filter(function(_ref135) {
|
|
24551
|
+
var result = _ref135.result;
|
|
23812
24552
|
return result !== void 0;
|
|
23813
24553
|
});
|
|
23814
24554
|
var uniqueResults = [];
|
|
@@ -23820,12 +24560,12 @@
|
|
|
23820
24560
|
if (nameMap[name]) {
|
|
23821
24561
|
return 'continue';
|
|
23822
24562
|
}
|
|
23823
|
-
var sameNameResults = incompleteResults.filter(function(
|
|
23824
|
-
var data =
|
|
24563
|
+
var sameNameResults = incompleteResults.filter(function(_ref136, resultNum) {
|
|
24564
|
+
var data = _ref136.data;
|
|
23825
24565
|
return data.name === name && resultNum !== index;
|
|
23826
24566
|
});
|
|
23827
|
-
var isSameUrl = sameNameResults.every(function(
|
|
23828
|
-
var data =
|
|
24567
|
+
var isSameUrl = sameNameResults.every(function(_ref137) {
|
|
24568
|
+
var data = _ref137.data;
|
|
23829
24569
|
return isIdenticalObject(data.urlProps, urlProps);
|
|
23830
24570
|
});
|
|
23831
24571
|
if (sameNameResults.length && !isSameUrl) {
|
|
@@ -24244,7 +24984,7 @@
|
|
|
24244
24984
|
var separatorRegex = /[;,\s]/;
|
|
24245
24985
|
var validRedirectNumRegex = /^[0-9.]+$/;
|
|
24246
24986
|
function metaRefreshEvaluate(node, options, virtualNode) {
|
|
24247
|
-
var
|
|
24987
|
+
var _ref138 = options || {}, minDelay = _ref138.minDelay, maxDelay = _ref138.maxDelay;
|
|
24248
24988
|
var content = (virtualNode.attr('content') || '').trim();
|
|
24249
24989
|
var _content$split = content.split(separatorRegex), _content$split2 = _slicedToArray(_content$split, 1), redirectStr = _content$split2[0];
|
|
24250
24990
|
if (!redirectStr.match(validRedirectNumRegex)) {
|
|
@@ -24284,16 +25024,16 @@
|
|
|
24284
25024
|
var outerText = elm.textContent.trim();
|
|
24285
25025
|
var innerText = outerText;
|
|
24286
25026
|
while (innerText === outerText && nextNode !== void 0) {
|
|
24287
|
-
var
|
|
25027
|
+
var _i35 = -1;
|
|
24288
25028
|
elm = nextNode;
|
|
24289
25029
|
if (elm.children.length === 0) {
|
|
24290
25030
|
return elm;
|
|
24291
25031
|
}
|
|
24292
25032
|
do {
|
|
24293
|
-
|
|
24294
|
-
innerText = elm.children[
|
|
24295
|
-
} while (innerText === '' &&
|
|
24296
|
-
nextNode = elm.children[
|
|
25033
|
+
_i35++;
|
|
25034
|
+
innerText = elm.children[_i35].textContent.trim();
|
|
25035
|
+
} while (innerText === '' && _i35 + 1 < elm.children.length);
|
|
25036
|
+
nextNode = elm.children[_i35];
|
|
24297
25037
|
}
|
|
24298
25038
|
return elm;
|
|
24299
25039
|
}
|
|
@@ -24356,19 +25096,19 @@
|
|
|
24356
25096
|
return;
|
|
24357
25097
|
}
|
|
24358
25098
|
var frameAncestry = r.node.ancestry.slice(0, -1);
|
|
24359
|
-
var
|
|
25099
|
+
var _iterator21 = _createForOfIteratorHelper(iframeResults), _step21;
|
|
24360
25100
|
try {
|
|
24361
|
-
for (
|
|
24362
|
-
var iframeResult =
|
|
25101
|
+
for (_iterator21.s(); !(_step21 = _iterator21.n()).done; ) {
|
|
25102
|
+
var iframeResult = _step21.value;
|
|
24363
25103
|
if (_matchAncestry(frameAncestry, iframeResult.node.ancestry)) {
|
|
24364
25104
|
r.result = iframeResult.result;
|
|
24365
25105
|
break;
|
|
24366
25106
|
}
|
|
24367
25107
|
}
|
|
24368
25108
|
} catch (err) {
|
|
24369
|
-
|
|
25109
|
+
_iterator21.e(err);
|
|
24370
25110
|
} finally {
|
|
24371
|
-
|
|
25111
|
+
_iterator21.f();
|
|
24372
25112
|
}
|
|
24373
25113
|
});
|
|
24374
25114
|
iframeResults.forEach(function(r) {
|
|
@@ -24415,8 +25155,8 @@
|
|
|
24415
25155
|
} else if (node !== document.body && has_content_default(node, true)) {
|
|
24416
25156
|
return [ virtualNode ];
|
|
24417
25157
|
} else {
|
|
24418
|
-
return virtualNode.children.filter(function(
|
|
24419
|
-
var actualNode =
|
|
25158
|
+
return virtualNode.children.filter(function(_ref139) {
|
|
25159
|
+
var actualNode = _ref139.actualNode;
|
|
24420
25160
|
return actualNode.nodeType === 1;
|
|
24421
25161
|
}).map(function(vNode) {
|
|
24422
25162
|
return findRegionlessElms(vNode, options);
|
|
@@ -24570,8 +25310,8 @@
|
|
|
24570
25310
|
}
|
|
24571
25311
|
return false;
|
|
24572
25312
|
}
|
|
24573
|
-
function getNumberValue(domNode,
|
|
24574
|
-
var cssProperty =
|
|
25313
|
+
function getNumberValue(domNode, _ref140) {
|
|
25314
|
+
var cssProperty = _ref140.cssProperty, absoluteValues = _ref140.absoluteValues, normalValue = _ref140.normalValue;
|
|
24575
25315
|
var computedStyle = window.getComputedStyle(domNode);
|
|
24576
25316
|
var cssPropValue = computedStyle.getPropertyValue(cssProperty);
|
|
24577
25317
|
if (cssPropValue === 'normal') {
|
|
@@ -24648,8 +25388,8 @@
|
|
|
24648
25388
|
if (!virtualNode.children) {
|
|
24649
25389
|
return void 0;
|
|
24650
25390
|
}
|
|
24651
|
-
var titleNode = virtualNode.children.find(function(
|
|
24652
|
-
var props =
|
|
25391
|
+
var titleNode = virtualNode.children.find(function(_ref141) {
|
|
25392
|
+
var props = _ref141.props;
|
|
24653
25393
|
return props.nodeName === 'title';
|
|
24654
25394
|
});
|
|
24655
25395
|
if (!titleNode) {
|
|
@@ -24849,8 +25589,8 @@
|
|
|
24849
25589
|
var aria = /^aria-/;
|
|
24850
25590
|
var attrs = virtualNode.attrNames;
|
|
24851
25591
|
if (attrs.length) {
|
|
24852
|
-
for (var
|
|
24853
|
-
if (aria.test(attrs[
|
|
25592
|
+
for (var _i36 = 0, l = attrs.length; _i36 < l; _i36++) {
|
|
25593
|
+
if (aria.test(attrs[_i36])) {
|
|
24854
25594
|
return true;
|
|
24855
25595
|
}
|
|
24856
25596
|
}
|
|
@@ -25240,7 +25980,7 @@
|
|
|
25240
25980
|
if (!role || [ 'none', 'presentation' ].includes(role)) {
|
|
25241
25981
|
return true;
|
|
25242
25982
|
}
|
|
25243
|
-
var
|
|
25983
|
+
var _ref142 = aria_roles_default[role] || {}, accessibleNameRequired = _ref142.accessibleNameRequired;
|
|
25244
25984
|
if (accessibleNameRequired || _isFocusable(virtualNode)) {
|
|
25245
25985
|
return true;
|
|
25246
25986
|
}
|
|
@@ -25583,7 +26323,7 @@
|
|
|
25583
26323
|
result = this.evaluate.call(helper, node.actualNode, checkOptions, node, context);
|
|
25584
26324
|
} catch (e) {
|
|
25585
26325
|
if (node && node.actualNode) {
|
|
25586
|
-
e.errorNode =
|
|
26326
|
+
e.errorNode = node_serializer_default.toSpec(node);
|
|
25587
26327
|
}
|
|
25588
26328
|
reject(e);
|
|
25589
26329
|
return;
|
|
@@ -25613,7 +26353,7 @@
|
|
|
25613
26353
|
result = this.evaluate.call(helper, node.actualNode, checkOptions, node, context);
|
|
25614
26354
|
} catch (e) {
|
|
25615
26355
|
if (node && node.actualNode) {
|
|
25616
|
-
e.errorNode =
|
|
26356
|
+
e.errorNode = node_serializer_default.toSpec(node);
|
|
25617
26357
|
}
|
|
25618
26358
|
throw e;
|
|
25619
26359
|
}
|
|
@@ -25780,7 +26520,7 @@
|
|
|
25780
26520
|
checkQueue.then(function(results) {
|
|
25781
26521
|
var result = getResult(results);
|
|
25782
26522
|
if (result) {
|
|
25783
|
-
result.node = new dq_element_default(node
|
|
26523
|
+
result.node = new dq_element_default(node);
|
|
25784
26524
|
ruleResult.nodes.push(result);
|
|
25785
26525
|
if (_this9.reviewOnFail) {
|
|
25786
26526
|
[ 'any', 'all' ].forEach(function(type2) {
|
|
@@ -25841,7 +26581,7 @@
|
|
|
25841
26581
|
});
|
|
25842
26582
|
var result = getResult(results);
|
|
25843
26583
|
if (result) {
|
|
25844
|
-
result.node = node.actualNode ? new dq_element_default(node
|
|
26584
|
+
result.node = node.actualNode ? new dq_element_default(node) : null;
|
|
25845
26585
|
ruleResult.nodes.push(result);
|
|
25846
26586
|
if (_this10.reviewOnFail) {
|
|
25847
26587
|
[ 'any', 'all' ].forEach(function(type2) {
|
|
@@ -26053,8 +26793,8 @@
|
|
|
26053
26793
|
lang: this.lang
|
|
26054
26794
|
};
|
|
26055
26795
|
var checkIDs = Object.keys(this.data.checks);
|
|
26056
|
-
for (var
|
|
26057
|
-
var _id6 = checkIDs[
|
|
26796
|
+
for (var _i37 = 0; _i37 < checkIDs.length; _i37++) {
|
|
26797
|
+
var _id6 = checkIDs[_i37];
|
|
26058
26798
|
var check = this.data.checks[_id6];
|
|
26059
26799
|
var _check$messages = check.messages, pass = _check$messages.pass, fail = _check$messages.fail, incomplete = _check$messages.incomplete;
|
|
26060
26800
|
locale.checks[_id6] = {
|
|
@@ -26064,8 +26804,8 @@
|
|
|
26064
26804
|
};
|
|
26065
26805
|
}
|
|
26066
26806
|
var ruleIDs = Object.keys(this.data.rules);
|
|
26067
|
-
for (var
|
|
26068
|
-
var _id7 = ruleIDs[
|
|
26807
|
+
for (var _i38 = 0; _i38 < ruleIDs.length; _i38++) {
|
|
26808
|
+
var _id7 = ruleIDs[_i38];
|
|
26069
26809
|
var rule = this.data.rules[_id7];
|
|
26070
26810
|
var description = rule.description, help = rule.help;
|
|
26071
26811
|
locale.rules[_id7] = {
|
|
@@ -26074,8 +26814,8 @@
|
|
|
26074
26814
|
};
|
|
26075
26815
|
}
|
|
26076
26816
|
var failureSummaries = Object.keys(this.data.failureSummaries);
|
|
26077
|
-
for (var
|
|
26078
|
-
var type2 = failureSummaries[
|
|
26817
|
+
for (var _i39 = 0; _i39 < failureSummaries.length; _i39++) {
|
|
26818
|
+
var type2 = failureSummaries[_i39];
|
|
26079
26819
|
var failureSummary2 = this.data.failureSummaries[type2];
|
|
26080
26820
|
var failureMessage = failureSummary2.failureMessage;
|
|
26081
26821
|
locale.failureSummaries[type2] = {
|
|
@@ -26098,8 +26838,8 @@
|
|
|
26098
26838
|
key: '_applyCheckLocale',
|
|
26099
26839
|
value: function _applyCheckLocale(checks) {
|
|
26100
26840
|
var keys = Object.keys(checks);
|
|
26101
|
-
for (var
|
|
26102
|
-
var _id8 = keys[
|
|
26841
|
+
for (var _i40 = 0; _i40 < keys.length; _i40++) {
|
|
26842
|
+
var _id8 = keys[_i40];
|
|
26103
26843
|
if (!this.data.checks[_id8]) {
|
|
26104
26844
|
throw new Error('Locale provided for unknown check: "'.concat(_id8, '"'));
|
|
26105
26845
|
}
|
|
@@ -26110,8 +26850,8 @@
|
|
|
26110
26850
|
key: '_applyRuleLocale',
|
|
26111
26851
|
value: function _applyRuleLocale(rules) {
|
|
26112
26852
|
var keys = Object.keys(rules);
|
|
26113
|
-
for (var
|
|
26114
|
-
var _id9 = keys[
|
|
26853
|
+
for (var _i41 = 0; _i41 < keys.length; _i41++) {
|
|
26854
|
+
var _id9 = keys[_i41];
|
|
26115
26855
|
if (!this.data.rules[_id9]) {
|
|
26116
26856
|
throw new Error('Locale provided for unknown rule: "'.concat(_id9, '"'));
|
|
26117
26857
|
}
|
|
@@ -26122,8 +26862,8 @@
|
|
|
26122
26862
|
key: '_applyFailureSummaries',
|
|
26123
26863
|
value: function _applyFailureSummaries(messages) {
|
|
26124
26864
|
var keys = Object.keys(messages);
|
|
26125
|
-
for (var
|
|
26126
|
-
var _key8 = keys[
|
|
26865
|
+
for (var _i42 = 0; _i42 < keys.length; _i42++) {
|
|
26866
|
+
var _key8 = keys[_i42];
|
|
26127
26867
|
if (!this.data.failureSummaries[_key8]) {
|
|
26128
26868
|
throw new Error('Locale provided for unknown failureMessage: "'.concat(_key8, '"'));
|
|
26129
26869
|
}
|
|
@@ -26155,10 +26895,10 @@
|
|
|
26155
26895
|
value: function setAllowedOrigins(allowedOrigins) {
|
|
26156
26896
|
var defaultOrigin = getDefaultOrigin();
|
|
26157
26897
|
this.allowedOrigins = [];
|
|
26158
|
-
var
|
|
26898
|
+
var _iterator22 = _createForOfIteratorHelper(allowedOrigins), _step22;
|
|
26159
26899
|
try {
|
|
26160
|
-
for (
|
|
26161
|
-
var origin =
|
|
26900
|
+
for (_iterator22.s(); !(_step22 = _iterator22.n()).done; ) {
|
|
26901
|
+
var origin = _step22.value;
|
|
26162
26902
|
if (origin === constants_default.allOrigins) {
|
|
26163
26903
|
this.allowedOrigins = [ '*' ];
|
|
26164
26904
|
return;
|
|
@@ -26169,9 +26909,9 @@
|
|
|
26169
26909
|
}
|
|
26170
26910
|
}
|
|
26171
26911
|
} catch (err) {
|
|
26172
|
-
|
|
26912
|
+
_iterator22.e(err);
|
|
26173
26913
|
} finally {
|
|
26174
|
-
|
|
26914
|
+
_iterator22.f();
|
|
26175
26915
|
}
|
|
26176
26916
|
}
|
|
26177
26917
|
}, {
|
|
@@ -26241,6 +26981,7 @@
|
|
|
26241
26981
|
key: 'run',
|
|
26242
26982
|
value: function run(context, options, resolve, reject) {
|
|
26243
26983
|
this.normalizeOptions(options);
|
|
26984
|
+
dq_element_default.setRunOptions(options);
|
|
26244
26985
|
axe._selectCache = [];
|
|
26245
26986
|
var allRulesToRun = getRulesToRun(this.rules, context, options);
|
|
26246
26987
|
var runNowRules = allRulesToRun.now;
|
|
@@ -26553,8 +27294,8 @@
|
|
|
26553
27294
|
});
|
|
26554
27295
|
};
|
|
26555
27296
|
}
|
|
26556
|
-
function getHelpUrl(
|
|
26557
|
-
var brand =
|
|
27297
|
+
function getHelpUrl(_ref143, ruleId, version) {
|
|
27298
|
+
var brand = _ref143.brand, application = _ref143.application, lang = _ref143.lang;
|
|
26558
27299
|
return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
|
|
26559
27300
|
}
|
|
26560
27301
|
function setupGlobals(context) {
|
|
@@ -26667,6 +27408,7 @@
|
|
|
26667
27408
|
switch (data.command) {
|
|
26668
27409
|
case 'rules':
|
|
26669
27410
|
return runRules(context, options, function(results, cleanupFn) {
|
|
27411
|
+
results = node_serializer_default.mapRawResults(results);
|
|
26670
27412
|
resolve(results);
|
|
26671
27413
|
cleanupFn();
|
|
26672
27414
|
}, reject);
|
|
@@ -26767,9 +27509,9 @@
|
|
|
26767
27509
|
toolOptions: options
|
|
26768
27510
|
});
|
|
26769
27511
|
}
|
|
26770
|
-
function normalizeRunParams(
|
|
26771
|
-
var
|
|
26772
|
-
var
|
|
27512
|
+
function normalizeRunParams(_ref144) {
|
|
27513
|
+
var _ref146, _options$reporter, _axe$_audit;
|
|
27514
|
+
var _ref145 = _slicedToArray(_ref144, 3), context = _ref145[0], options = _ref145[1], callback = _ref145[2];
|
|
26773
27515
|
var typeErr = new TypeError('axe.run arguments are invalid');
|
|
26774
27516
|
if (!isContextSpec(context)) {
|
|
26775
27517
|
if (callback !== void 0) {
|
|
@@ -26790,7 +27532,7 @@
|
|
|
26790
27532
|
throw typeErr;
|
|
26791
27533
|
}
|
|
26792
27534
|
options = _clone(options);
|
|
26793
|
-
options.reporter = (
|
|
27535
|
+
options.reporter = (_ref146 = (_options$reporter = options.reporter) !== null && _options$reporter !== void 0 ? _options$reporter : (_axe$_audit = axe._audit) === null || _axe$_audit === void 0 ? void 0 : _axe$_audit.reporter) !== null && _ref146 !== void 0 ? _ref146 : 'v1';
|
|
26794
27536
|
return {
|
|
26795
27537
|
context: context,
|
|
26796
27538
|
options: options,
|
|
@@ -26900,18 +27642,14 @@
|
|
|
26900
27642
|
axe._tree = contextObj.flatTree;
|
|
26901
27643
|
axe._selectorData = _getSelectorData(contextObj.flatTree);
|
|
26902
27644
|
axe._running = true;
|
|
27645
|
+
options.elementRef = false;
|
|
26903
27646
|
return new Promise(function(res, rej) {
|
|
26904
27647
|
axe._audit.run(contextObj, options, res, rej);
|
|
26905
27648
|
}).then(function(results) {
|
|
26906
|
-
results =
|
|
26907
|
-
|
|
26908
|
-
|
|
26909
|
-
|
|
26910
|
-
}, result);
|
|
26911
|
-
});
|
|
26912
|
-
var frames = contextObj.frames.map(function(_ref149) {
|
|
26913
|
-
var node = _ref149.node;
|
|
26914
|
-
return new dq_element_default(node, options).toJSON();
|
|
27649
|
+
results = node_serializer_default.mapRawResults(results);
|
|
27650
|
+
var frames = contextObj.frames.map(function(_ref147) {
|
|
27651
|
+
var node = _ref147.node;
|
|
27652
|
+
return node_serializer_default.toSpec(node);
|
|
26915
27653
|
});
|
|
26916
27654
|
var environmentData;
|
|
26917
27655
|
if (contextObj.initiator) {
|
|
@@ -26930,31 +27668,15 @@
|
|
|
26930
27668
|
return Promise.reject(err2);
|
|
26931
27669
|
});
|
|
26932
27670
|
}
|
|
26933
|
-
function serializeNode(_ref150) {
|
|
26934
|
-
var node = _ref150.node, nodeResult = _objectWithoutProperties(_ref150, _excluded14);
|
|
26935
|
-
nodeResult.node = node.toJSON();
|
|
26936
|
-
for (var _i42 = 0, _arr4 = [ 'any', 'all', 'none' ]; _i42 < _arr4.length; _i42++) {
|
|
26937
|
-
var type2 = _arr4[_i42];
|
|
26938
|
-
nodeResult[type2] = nodeResult[type2].map(function(_ref151) {
|
|
26939
|
-
var relatedNodes = _ref151.relatedNodes, checkResult = _objectWithoutProperties(_ref151, _excluded15);
|
|
26940
|
-
return _extends({}, checkResult, {
|
|
26941
|
-
relatedNodes: relatedNodes.map(function(relatedNode) {
|
|
26942
|
-
return relatedNode.toJSON();
|
|
26943
|
-
})
|
|
26944
|
-
});
|
|
26945
|
-
});
|
|
26946
|
-
}
|
|
26947
|
-
return nodeResult;
|
|
26948
|
-
}
|
|
26949
27671
|
function finishRun(partialResults) {
|
|
26950
|
-
var
|
|
27672
|
+
var _ref149, _options$reporter2, _axe$_audit2;
|
|
26951
27673
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
26952
27674
|
options = _clone(options);
|
|
26953
|
-
var
|
|
27675
|
+
var _ref148 = partialResults.find(function(r) {
|
|
26954
27676
|
return r.environmentData;
|
|
26955
|
-
}) || {}, environmentData =
|
|
27677
|
+
}) || {}, environmentData = _ref148.environmentData;
|
|
26956
27678
|
axe._audit.normalizeOptions(options);
|
|
26957
|
-
options.reporter = (
|
|
27679
|
+
options.reporter = (_ref149 = (_options$reporter2 = options.reporter) !== null && _options$reporter2 !== void 0 ? _options$reporter2 : (_axe$_audit2 = axe._audit) === null || _axe$_audit2 === void 0 ? void 0 : _axe$_audit2.reporter) !== null && _ref149 !== void 0 ? _ref149 : 'v1';
|
|
26958
27680
|
setFrameSpec(partialResults);
|
|
26959
27681
|
var results = merge_results_default(partialResults);
|
|
26960
27682
|
results = axe._audit.after(results, options);
|
|
@@ -26966,10 +27688,10 @@
|
|
|
26966
27688
|
}
|
|
26967
27689
|
function setFrameSpec(partialResults) {
|
|
26968
27690
|
var frameStack = [];
|
|
26969
|
-
var
|
|
27691
|
+
var _iterator23 = _createForOfIteratorHelper(partialResults), _step23;
|
|
26970
27692
|
try {
|
|
26971
|
-
for (
|
|
26972
|
-
var partialResult =
|
|
27693
|
+
for (_iterator23.s(); !(_step23 = _iterator23.n()).done; ) {
|
|
27694
|
+
var partialResult = _step23.value;
|
|
26973
27695
|
var frameSpec = frameStack.shift();
|
|
26974
27696
|
if (!partialResult) {
|
|
26975
27697
|
continue;
|
|
@@ -26979,18 +27701,18 @@
|
|
|
26979
27701
|
frameStack.unshift.apply(frameStack, _toConsumableArray(frameSpecs));
|
|
26980
27702
|
}
|
|
26981
27703
|
} catch (err) {
|
|
26982
|
-
|
|
27704
|
+
_iterator23.e(err);
|
|
26983
27705
|
} finally {
|
|
26984
|
-
|
|
27706
|
+
_iterator23.f();
|
|
26985
27707
|
}
|
|
26986
27708
|
}
|
|
26987
|
-
function getMergedFrameSpecs(
|
|
26988
|
-
var childFrameSpecs =
|
|
27709
|
+
function getMergedFrameSpecs(_ref150) {
|
|
27710
|
+
var childFrameSpecs = _ref150.frames, parentFrameSpec = _ref150.frameSpec;
|
|
26989
27711
|
if (!parentFrameSpec) {
|
|
26990
27712
|
return childFrameSpecs;
|
|
26991
27713
|
}
|
|
26992
27714
|
return childFrameSpecs.map(function(childFrameSpec) {
|
|
26993
|
-
return
|
|
27715
|
+
return node_serializer_default.mergeSpecs(childFrameSpec, parentFrameSpec);
|
|
26994
27716
|
});
|
|
26995
27717
|
}
|
|
26996
27718
|
function createReport2(results, options) {
|
|
@@ -27018,7 +27740,7 @@
|
|
|
27018
27740
|
callback = options;
|
|
27019
27741
|
options = {};
|
|
27020
27742
|
}
|
|
27021
|
-
var _options3 = options, environmentData = _options3.environmentData, toolOptions = _objectWithoutProperties(_options3,
|
|
27743
|
+
var _options3 = options, environmentData = _options3.environmentData, toolOptions = _objectWithoutProperties(_options3, _excluded15);
|
|
27022
27744
|
callback(_extends({}, _getEnvironmentData(environmentData), {
|
|
27023
27745
|
toolOptions: toolOptions
|
|
27024
27746
|
}, processAggregate(results, options)));
|
|
@@ -27029,7 +27751,7 @@
|
|
|
27029
27751
|
callback = options;
|
|
27030
27752
|
options = {};
|
|
27031
27753
|
}
|
|
27032
|
-
var _options4 = options, environmentData = _options4.environmentData, toolOptions = _objectWithoutProperties(_options4,
|
|
27754
|
+
var _options4 = options, environmentData = _options4.environmentData, toolOptions = _objectWithoutProperties(_options4, _excluded16);
|
|
27033
27755
|
options.resultTypes = [ 'violations' ];
|
|
27034
27756
|
var _processAggregate = processAggregate(results, options), violations = _processAggregate.violations;
|
|
27035
27757
|
callback(_extends({}, _getEnvironmentData(environmentData), {
|
|
@@ -27051,16 +27773,7 @@
|
|
|
27051
27773
|
var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ];
|
|
27052
27774
|
for (var _i43 = 0, _types = types; _i43 < _types.length; _i43++) {
|
|
27053
27775
|
var type2 = _types[_i43];
|
|
27054
|
-
|
|
27055
|
-
transformedResult[type2] = transformedResult[type2].map(function(_ref155) {
|
|
27056
|
-
var _node;
|
|
27057
|
-
var node = _ref155.node, typeResult = _objectWithoutProperties(_ref155, _excluded18);
|
|
27058
|
-
node = typeof ((_node = node) === null || _node === void 0 ? void 0 : _node.toJSON) === 'function' ? node.toJSON() : node;
|
|
27059
|
-
return _extends({
|
|
27060
|
-
node: node
|
|
27061
|
-
}, typeResult);
|
|
27062
|
-
});
|
|
27063
|
-
}
|
|
27776
|
+
transformedResult[type2] = node_serializer_default.mapRawNodeResults(transformedResult[type2]);
|
|
27064
27777
|
}
|
|
27065
27778
|
return transformedResult;
|
|
27066
27779
|
});
|
|
@@ -27072,7 +27785,7 @@
|
|
|
27072
27785
|
callback = options;
|
|
27073
27786
|
options = {};
|
|
27074
27787
|
}
|
|
27075
|
-
var _options5 = options, environmentData = _options5.environmentData, toolOptions = _objectWithoutProperties(_options5,
|
|
27788
|
+
var _options5 = options, environmentData = _options5.environmentData, toolOptions = _objectWithoutProperties(_options5, _excluded17);
|
|
27076
27789
|
raw_default(results, toolOptions, function(raw) {
|
|
27077
27790
|
var env = _getEnvironmentData(environmentData);
|
|
27078
27791
|
callback({
|
|
@@ -27087,7 +27800,7 @@
|
|
|
27087
27800
|
callback = options;
|
|
27088
27801
|
options = {};
|
|
27089
27802
|
}
|
|
27090
|
-
var _options6 = options, environmentData = _options6.environmentData, toolOptions = _objectWithoutProperties(_options6,
|
|
27803
|
+
var _options6 = options, environmentData = _options6.environmentData, toolOptions = _objectWithoutProperties(_options6, _excluded18);
|
|
27091
27804
|
var out = processAggregate(results, options);
|
|
27092
27805
|
var addFailureSummaries = function addFailureSummaries(result) {
|
|
27093
27806
|
result.nodes.forEach(function(nodeResult) {
|
|
@@ -27106,7 +27819,7 @@
|
|
|
27106
27819
|
callback = options;
|
|
27107
27820
|
options = {};
|
|
27108
27821
|
}
|
|
27109
|
-
var _options7 = options, environmentData = _options7.environmentData, toolOptions = _objectWithoutProperties(_options7,
|
|
27822
|
+
var _options7 = options, environmentData = _options7.environmentData, toolOptions = _objectWithoutProperties(_options7, _excluded19);
|
|
27110
27823
|
var out = processAggregate(results, options);
|
|
27111
27824
|
callback(_extends({}, _getEnvironmentData(environmentData), {
|
|
27112
27825
|
toolOptions: toolOptions
|
|
@@ -27231,8 +27944,8 @@
|
|
|
27231
27944
|
help: 'ARIA dialog and alertdialog nodes should have an accessible name'
|
|
27232
27945
|
},
|
|
27233
27946
|
'aria-hidden-body': {
|
|
27234
|
-
description: 'Ensures aria-hidden
|
|
27235
|
-
help: 'aria-hidden
|
|
27947
|
+
description: 'Ensures aria-hidden="true" is not present on the document body.',
|
|
27948
|
+
help: 'aria-hidden="true" must not be present on the document body'
|
|
27236
27949
|
},
|
|
27237
27950
|
'aria-hidden-focus': {
|
|
27238
27951
|
description: 'Ensures aria-hidden elements are not focusable nor contain focusable elements',
|
|
@@ -27275,7 +27988,7 @@
|
|
|
27275
27988
|
help: 'ARIA roles used must conform to valid values'
|
|
27276
27989
|
},
|
|
27277
27990
|
'aria-text': {
|
|
27278
|
-
description: 'Ensures
|
|
27991
|
+
description: 'Ensures role="text" is used on elements with no focusable descendants',
|
|
27279
27992
|
help: '"role=text" should have no focusable descendants'
|
|
27280
27993
|
},
|
|
27281
27994
|
'aria-toggle-field-name': {
|
|
@@ -27543,8 +28256,8 @@
|
|
|
27543
28256
|
help: 'All page content should be contained by landmarks'
|
|
27544
28257
|
},
|
|
27545
28258
|
'role-img-alt': {
|
|
27546
|
-
description: 'Ensures [role
|
|
27547
|
-
help: '[role
|
|
28259
|
+
description: 'Ensures [role="img"] elements have alternate text',
|
|
28260
|
+
help: '[role="img"] elements must have an alternative text'
|
|
27548
28261
|
},
|
|
27549
28262
|
'scope-attr-valid': {
|
|
27550
28263
|
description: 'Ensures the scope attribute is used correctly on tables',
|
|
@@ -27797,7 +28510,7 @@
|
|
|
27797
28510
|
'braille-roledescription-equivalent': {
|
|
27798
28511
|
impact: 'serious',
|
|
27799
28512
|
messages: {
|
|
27800
|
-
pass: 'aria-brailleroledescription is
|
|
28513
|
+
pass: 'aria-brailleroledescription is used on an element with aria-roledescription',
|
|
27801
28514
|
fail: {
|
|
27802
28515
|
noRoleDescription: 'aria-brailleroledescription is used on an element with no aria-roledescription',
|
|
27803
28516
|
emptyRoleDescription: 'aria-brailleroledescription is used on an element with an empty aria-roledescription'
|
|
@@ -28022,7 +28735,7 @@
|
|
|
28022
28735
|
messages: {
|
|
28023
28736
|
pass: 'No focusable elements contained within element',
|
|
28024
28737
|
incomplete: 'Check if the focusable elements immediately move the focus indicator',
|
|
28025
|
-
fail: 'Focusable content should have tabindex
|
|
28738
|
+
fail: 'Focusable content should have tabindex="-1" or be removed from the DOM'
|
|
28026
28739
|
}
|
|
28027
28740
|
},
|
|
28028
28741
|
'frame-focusable-content': {
|
|
@@ -28046,7 +28759,7 @@
|
|
|
28046
28759
|
pass: 'Element does not have focusable descendants',
|
|
28047
28760
|
fail: {
|
|
28048
28761
|
default: 'Element has focusable descendants',
|
|
28049
|
-
notHidden: 'Using a negative tabindex on an element inside an interactive control does not prevent assistive technologies from focusing the element (even with
|
|
28762
|
+
notHidden: 'Using a negative tabindex on an element inside an interactive control does not prevent assistive technologies from focusing the element (even with aria-hidden="true")'
|
|
28050
28763
|
},
|
|
28051
28764
|
incomplete: 'Could not determine if element has descendants'
|
|
28052
28765
|
}
|
|
@@ -28276,11 +28989,11 @@
|
|
|
28276
28989
|
'target-offset': {
|
|
28277
28990
|
impact: 'serious',
|
|
28278
28991
|
messages: {
|
|
28279
|
-
pass: 'Target has sufficient
|
|
28280
|
-
fail: 'Target has insufficient
|
|
28992
|
+
pass: 'Target has sufficient space from its closest neighbors. Safe clickable space has a diameter of ${data.closestOffset}px which is at least ${data.minOffset}px.',
|
|
28993
|
+
fail: 'Target has insufficient space to its closest neighbors. Safe clickable space has a diameter of ${data.closestOffset}px instead of at least ${data.minOffset}px.',
|
|
28281
28994
|
incomplete: {
|
|
28282
|
-
default: 'Element with negative tabindex has insufficient
|
|
28283
|
-
nonTabbableNeighbor: 'Target has insufficient
|
|
28995
|
+
default: 'Element with negative tabindex has insufficient space to its closest neighbors. Safe clickable space has a diameter of ${data.closestOffset}px instead of at least ${data.minOffset}px. Is this a target?',
|
|
28996
|
+
nonTabbableNeighbor: 'Target has insufficient space to its closest neighbors. Safe clickable space has a diameter of ${data.closestOffset}px instead of at least ${data.minOffset}px. Is the neighbor a target?'
|
|
28284
28997
|
}
|
|
28285
28998
|
}
|
|
28286
28999
|
},
|
|
@@ -28736,6 +29449,7 @@
|
|
|
28736
29449
|
none: []
|
|
28737
29450
|
}, {
|
|
28738
29451
|
id: 'aria-braille-equivalent',
|
|
29452
|
+
reviewOnFail: true,
|
|
28739
29453
|
impact: 'serious',
|
|
28740
29454
|
selector: '[aria-brailleroledescription], [aria-braillelabel]',
|
|
28741
29455
|
tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2' ],
|