- commit
- a9f2e1113562081bf9261dd7735341b8474b32d8
- parent
- ebb744081957f1d0ce253eaca8d19bcf9ea9f227
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2020-01-29 14:49
build
Diffstat
| M | babel.js | 14671 | ++++++++++++++++++++++++++++++++++++++++++++++--------------- |
| M | fuzz.js | 2675 | +++++++++++++++++++++++++++++++++---------------------------- |
2 files changed, 12439 insertions, 4907 deletions
diff --git a/babel.js b/babel.js
@@ -5744,7 +5744,7 @@ module.exports = {
5744 5744 };
5745 5745
5746 5746 },{"./atree.js":8,"./attrs.js":9}],13:[function(require,module,exports){
5747 -1 /*! aXe v3.2.2
-1 5747 /*! axe v3.4.1
5748 5748 * Copyright (c) 2019 Deque Systems, Inc.
5749 5749 *
5750 5750 * Your use of this Source Code Form is subject to the terms of the Mozilla Public
@@ -5759,13 +5759,20 @@ module.exports = {
5759 5759 var global = window;
5760 5760 var document = window.document;
5761 5761 'use strict';
5762 -1 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) {
5763 -1 return typeof obj;
5764 -1 } : function(obj) {
5765 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
5766 -1 };
-1 5762 function _typeof(obj) {
-1 5763 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 5764 _typeof = function _typeof(obj) {
-1 5765 return typeof obj;
-1 5766 };
-1 5767 } else {
-1 5768 _typeof = function _typeof(obj) {
-1 5769 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 5770 };
-1 5771 }
-1 5772 return _typeof(obj);
-1 5773 }
5767 5774 var axe = axe || {};
5768 -1 axe.version = '3.2.2';
-1 5775 axe.version = '3.4.1';
5769 5776 if (typeof define === 'function' && define.amd) {
5770 5777 define('axe-core', [], function() {
5771 5778 'use strict';
@@ -5783,10 +5790,10 @@ module.exports = {
5783 5790 function SupportError(error) {
5784 5791 this.name = 'SupportError';
5785 5792 this.cause = error.cause;
5786 -1 this.message = '`' + error.cause + '` - feature unsupported in your environment.';
-1 5793 this.message = '`'.concat(error.cause, '` - feature unsupported in your environment.');
5787 5794 if (error.ruleId) {
5788 5795 this.ruleId = error.ruleId;
5789 -1 this.message += ' Skipping ' + this.ruleId + ' rule.';
-1 5796 this.message += ' Skipping '.concat(this.ruleId, ' rule.');
5790 5797 }
5791 5798 this.stack = new Error().stack;
5792 5799 }
@@ -5825,154 +5832,345 @@ module.exports = {
5825 5832 return r;
5826 5833 })()({
5827 5834 1: [ function(_dereq_, module, exports) {
5828 -1 _dereq_('es6-promise').polyfill();
-1 5835 if (!('Promise' in window)) {
-1 5836 _dereq_('es6-promise').polyfill();
-1 5837 }
-1 5838 if (!('Uint32Array' in window)) {
-1 5839 _dereq_('core-js/features/typed-array/uint32-array');
-1 5840 }
-1 5841 if (window.Uint32Array) {
-1 5842 if (!('some' in window.Uint32Array.prototype)) {
-1 5843 _dereq_('core-js/features/typed-array/some');
-1 5844 }
-1 5845 if (!('reduce' in window.Uint32Array.prototype)) {
-1 5846 _dereq_('core-js/features/typed-array/reduce');
-1 5847 }
-1 5848 }
-1 5849 _dereq_('weakmap-polyfill');
5829 5850 axe.imports = {
5830 5851 axios: _dereq_('axios'),
5831 5852 CssSelectorParser: _dereq_('css-selector-parser').CssSelectorParser,
5832 -1 doT: _dereq_('dot'),
5833 -1 emojiRegexText: _dereq_('emoji-regex')
-1 5853 doT: _dereq_('@deque/dot'),
-1 5854 emojiRegexText: _dereq_('emoji-regex'),
-1 5855 memoize: _dereq_('memoizee')
5834 5856 };
5835 5857 }, {
5836 -1 axios: 2,
5837 -1 'css-selector-parser': 27,
5838 -1 dot: 29,
5839 -1 'emoji-regex': 30,
5840 -1 'es6-promise': 31
-1 5858 '@deque/dot': 2,
-1 5859 axios: 3,
-1 5860 'core-js/features/typed-array/reduce': 31,
-1 5861 'core-js/features/typed-array/some': 32,
-1 5862 'core-js/features/typed-array/uint32-array': 33,
-1 5863 'css-selector-parser': 147,
-1 5864 'emoji-regex': 150,
-1 5865 'es6-promise': 194,
-1 5866 memoizee: 209,
-1 5867 'weakmap-polyfill': 226
5841 5868 } ],
5842 5869 2: [ function(_dereq_, module, exports) {
5843 -1 module.exports = _dereq_('./lib/axios');
5844 -1 }, {
5845 -1 './lib/axios': 4
5846 -1 } ],
5847 -1 3: [ function(_dereq_, module, exports) {
5848 -1 (function(process) {
5849 -1 'use strict';
5850 -1 var utils = _dereq_('./../utils');
5851 -1 var settle = _dereq_('./../core/settle');
5852 -1 var buildURL = _dereq_('./../helpers/buildURL');
5853 -1 var parseHeaders = _dereq_('./../helpers/parseHeaders');
5854 -1 var isURLSameOrigin = _dereq_('./../helpers/isURLSameOrigin');
5855 -1 var createError = _dereq_('../core/createError');
5856 -1 var btoa = typeof window !== 'undefined' && window.btoa && window.btoa.bind(window) || _dereq_('./../helpers/btoa');
5857 -1 module.exports = function xhrAdapter(config) {
5858 -1 return new Promise(function dispatchXhrRequest(resolve, reject) {
5859 -1 var requestData = config.data;
5860 -1 var requestHeaders = config.headers;
5861 -1 if (utils.isFormData(requestData)) {
5862 -1 delete requestHeaders['Content-Type'];
5863 -1 }
5864 -1 var request = new XMLHttpRequest();
5865 -1 var loadEvent = 'onreadystatechange';
5866 -1 var xDomain = false;
5867 -1 if (process.env.NODE_ENV !== 'test' && typeof window !== 'undefined' && window.XDomainRequest && !('withCredentials' in request) && !isURLSameOrigin(config.url)) {
5868 -1 request = new window.XDomainRequest();
5869 -1 loadEvent = 'onload';
5870 -1 xDomain = true;
5871 -1 request.onprogress = function handleProgress() {};
5872 -1 request.ontimeout = function handleTimeout() {};
5873 -1 }
5874 -1 if (config.auth) {
5875 -1 var username = config.auth.username || '';
5876 -1 var password = config.auth.password || '';
5877 -1 requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
5878 -1 }
5879 -1 request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);
5880 -1 request.timeout = config.timeout;
5881 -1 request[loadEvent] = function handleLoad() {
5882 -1 if (!request || request.readyState !== 4 && !xDomain) {
5883 -1 return;
5884 -1 }
5885 -1 if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
5886 -1 return;
5887 -1 }
5888 -1 var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
5889 -1 var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
5890 -1 var response = {
5891 -1 data: responseData,
5892 -1 status: request.status === 1223 ? 204 : request.status,
5893 -1 statusText: request.status === 1223 ? 'No Content' : request.statusText,
5894 -1 headers: responseHeaders,
5895 -1 config: config,
5896 -1 request: request
5897 -1 };
5898 -1 settle(resolve, reject, response);
5899 -1 request = null;
5900 -1 };
5901 -1 request.onerror = function handleError() {
5902 -1 reject(createError('Network Error', config, null, request));
5903 -1 request = null;
5904 -1 };
5905 -1 request.ontimeout = function handleTimeout() {
5906 -1 reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', request));
5907 -1 request = null;
-1 5870 (function(global) {
-1 5871 (function() {
-1 5872 'use strict';
-1 5873 var doT = {
-1 5874 name: 'doT',
-1 5875 version: '1.1.1',
-1 5876 templateSettings: {
-1 5877 evaluate: /\{\{([\s\S]+?(\}?)+)\}\}/g,
-1 5878 interpolate: /\{\{=([\s\S]+?)\}\}/g,
-1 5879 encode: /\{\{!([\s\S]+?)\}\}/g,
-1 5880 use: /\{\{#([\s\S]+?)\}\}/g,
-1 5881 useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,
-1 5882 define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,
-1 5883 defineParams: /^\s*([\w$]+):([\s\S]+)/,
-1 5884 conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,
-1 5885 iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,
-1 5886 varname: 'it',
-1 5887 strip: true,
-1 5888 append: true,
-1 5889 selfcontained: false,
-1 5890 doNotSkipEncoded: false
-1 5891 },
-1 5892 template: undefined,
-1 5893 compile: undefined,
-1 5894 log: true
-1 5895 };
-1 5896 (function() {
-1 5897 if (typeof globalThis === 'object') {
-1 5898 return;
-1 5899 }
-1 5900 try {
-1 5901 Object.defineProperty(Object.prototype, '__magic__', {
-1 5902 get: function() {
-1 5903 return this;
-1 5904 },
-1 5905 configurable: true
-1 5906 });
-1 5907 __magic__.globalThis = __magic__;
-1 5908 delete Object.prototype.__magic__;
-1 5909 } catch (e) {
-1 5910 window.globalThis = function() {
-1 5911 if (typeof self !== 'undefined') {
-1 5912 return self;
-1 5913 }
-1 5914 if (typeof window !== 'undefined') {
-1 5915 return window;
-1 5916 }
-1 5917 if (typeof global !== 'undefined') {
-1 5918 return global;
-1 5919 }
-1 5920 if (typeof this !== 'undefined') {
-1 5921 return this;
-1 5922 }
-1 5923 throw new Error('Unable to locate global `this`');
-1 5924 }();
-1 5925 }
-1 5926 })();
-1 5927 doT.encodeHTMLSource = function(doNotSkipEncoded) {
-1 5928 var encodeHTMLRules = {
-1 5929 '&': '&',
-1 5930 '<': '<',
-1 5931 '>': '>',
-1 5932 '"': '"',
-1 5933 '\'': ''',
-1 5934 '/': '/'
-1 5935 }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
-1 5936 return function(code) {
-1 5937 return code ? code.toString().replace(matchHTML, function(m) {
-1 5938 return encodeHTMLRules[m] || m;
-1 5939 }) : '';
5908 5940 };
5909 -1 if (utils.isStandardBrowserEnv()) {
5910 -1 var cookies = _dereq_('./../helpers/cookies');
5911 -1 var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined;
5912 -1 if (xsrfValue) {
5913 -1 requestHeaders[config.xsrfHeaderName] = xsrfValue;
-1 5941 };
-1 5942 if (typeof module !== 'undefined' && module.exports) {
-1 5943 module.exports = doT;
-1 5944 } else if (typeof define === 'function' && define.amd) {
-1 5945 define(function() {
-1 5946 return doT;
-1 5947 });
-1 5948 } else {
-1 5949 globalThis.doT = doT;
-1 5950 }
-1 5951 var startend = {
-1 5952 append: {
-1 5953 start: '\'+(',
-1 5954 end: ')+\'',
-1 5955 startencode: '\'+encodeHTML('
-1 5956 },
-1 5957 split: {
-1 5958 start: '\';out+=(',
-1 5959 end: ');out+=\'',
-1 5960 startencode: '\';out+=encodeHTML('
-1 5961 }
-1 5962 }, skip = /$^/;
-1 5963 function resolveDefs(c, block, def) {
-1 5964 return (typeof block === 'string' ? block : block.toString()).replace(c.define || skip, function(m, code, assign, value) {
-1 5965 if (code.indexOf('def.') === 0) {
-1 5966 code = code.substring(4);
5914 5967 }
5915 -1 }
5916 -1 if ('setRequestHeader' in request) {
5917 -1 utils.forEach(requestHeaders, function setRequestHeader(val, key) {
5918 -1 if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
5919 -1 delete requestHeaders[key];
-1 5968 if (!(code in def)) {
-1 5969 if (assign === ':') {
-1 5970 if (c.defineParams) {
-1 5971 value.replace(c.defineParams, function(m, param, v) {
-1 5972 def[code] = {
-1 5973 arg: param,
-1 5974 text: v
-1 5975 };
-1 5976 });
-1 5977 }
-1 5978 if (!(code in def)) {
-1 5979 def[code] = value;
-1 5980 }
5920 5981 } else {
5921 -1 request.setRequestHeader(key, val);
-1 5982 new Function('def', 'def[\'' + code + '\']=' + value)(def);
5922 5983 }
5923 -1 });
5924 -1 }
5925 -1 if (config.withCredentials) {
5926 -1 request.withCredentials = true;
-1 5984 }
-1 5985 return '';
-1 5986 }).replace(c.use || skip, function(m, code) {
-1 5987 if (c.useParams) {
-1 5988 code = code.replace(c.useParams, function(m, s, d, param) {
-1 5989 if (def[d] && def[d].arg && param) {
-1 5990 var rw = (d + ':' + param).replace(/'|\\/g, '_');
-1 5991 def.__exp = def.__exp || {};
-1 5992 def.__exp[rw] = def[d].text.replace(new RegExp('(^|[^\\w$])' + def[d].arg + '([^\\w$])', 'g'), '$1' + param + '$2');
-1 5993 return s + 'def.__exp[\'' + rw + '\']';
-1 5994 }
-1 5995 });
-1 5996 }
-1 5997 var v = new Function('def', 'return ' + code)(def);
-1 5998 return v ? resolveDefs(c, v, def) : v;
-1 5999 });
-1 6000 }
-1 6001 function unescape(code) {
-1 6002 return code.replace(/\\('|\\)/g, '$1').replace(/[\r\t\n]/g, ' ');
-1 6003 }
-1 6004 doT.template = function(tmpl, c, def) {
-1 6005 c = c || doT.templateSettings;
-1 6006 var cse = c.append ? startend.append : startend.split, needhtmlencode, sid = 0, indv, str = c.use || c.define ? resolveDefs(c, tmpl, def || {}) : tmpl;
-1 6007 str = ('var out=\'' + (c.strip ? str.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g, ' ').replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g, '') : str).replace(/'|\\/g, '\\$&').replace(c.interpolate || skip, function(m, code) {
-1 6008 return cse.start + unescape(code) + cse.end;
-1 6009 }).replace(c.encode || skip, function(m, code) {
-1 6010 needhtmlencode = true;
-1 6011 return cse.startencode + unescape(code) + cse.end;
-1 6012 }).replace(c.conditional || skip, function(m, elsecase, code) {
-1 6013 return elsecase ? code ? '\';}else if(' + unescape(code) + '){out+=\'' : '\';}else{out+=\'' : code ? '\';if(' + unescape(code) + '){out+=\'' : '\';}out+=\'';
-1 6014 }).replace(c.iterate || skip, function(m, iterate, vname, iname) {
-1 6015 if (!iterate) {
-1 6016 return '\';} } out+=\'';
-1 6017 }
-1 6018 sid += 1;
-1 6019 indv = iname || 'i' + sid;
-1 6020 iterate = unescape(iterate);
-1 6021 return '\';var arr' + sid + '=' + iterate + ';if(arr' + sid + '){var ' + vname + ',' + indv + '=-1,l' + sid + '=arr' + sid + '.length-1;while(' + indv + '<l' + sid + '){' + vname + '=arr' + sid + '[' + indv + '+=1];out+=\'';
-1 6022 }).replace(c.evaluate || skip, function(m, code) {
-1 6023 return '\';' + unescape(code) + 'out+=\'';
-1 6024 }) + '\';return out;').replace(/\n/g, '\\n').replace(/\t/g, '\\t').replace(/\r/g, '\\r').replace(/(\s|;|\}|^|\{)out\+='';/g, '$1').replace(/\+''/g, '');
-1 6025 if (needhtmlencode) {
-1 6026 if (!c.selfcontained && globalThis && !globalThis._encodeHTML) {
-1 6027 globalThis._encodeHTML = doT.encodeHTMLSource(c.doNotSkipEncoded);
-1 6028 }
-1 6029 str = 'var encodeHTML = typeof _encodeHTML !== \'undefined\' ? _encodeHTML : (' + doT.encodeHTMLSource.toString() + '(' + (c.doNotSkipEncoded || '') + '));' + str;
5927 6030 }
5928 -1 if (config.responseType) {
5929 -1 try {
5930 -1 request.responseType = config.responseType;
5931 -1 } catch (e) {
5932 -1 if (config.responseType !== 'json') {
5933 -1 throw e;
5934 -1 }
-1 6031 try {
-1 6032 return new Function(c.varname, str);
-1 6033 } catch (e) {
-1 6034 if (typeof console !== 'undefined') {
-1 6035 console.log('Could not create a template function: ' + str);
5935 6036 }
-1 6037 throw e;
-1 6038 }
-1 6039 };
-1 6040 doT.compile = function(tmpl, def) {
-1 6041 return doT.template(tmpl, null, def);
-1 6042 };
-1 6043 })();
-1 6044 }).call(this, typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {});
-1 6045 }, {} ],
-1 6046 3: [ function(_dereq_, module, exports) {
-1 6047 module.exports = _dereq_('./lib/axios');
-1 6048 }, {
-1 6049 './lib/axios': 5
-1 6050 } ],
-1 6051 4: [ function(_dereq_, module, exports) {
-1 6052 'use strict';
-1 6053 var utils = _dereq_('./../utils');
-1 6054 var settle = _dereq_('./../core/settle');
-1 6055 var buildURL = _dereq_('./../helpers/buildURL');
-1 6056 var parseHeaders = _dereq_('./../helpers/parseHeaders');
-1 6057 var isURLSameOrigin = _dereq_('./../helpers/isURLSameOrigin');
-1 6058 var createError = _dereq_('../core/createError');
-1 6059 module.exports = function xhrAdapter(config) {
-1 6060 return new Promise(function dispatchXhrRequest(resolve, reject) {
-1 6061 var requestData = config.data;
-1 6062 var requestHeaders = config.headers;
-1 6063 if (utils.isFormData(requestData)) {
-1 6064 delete requestHeaders['Content-Type'];
-1 6065 }
-1 6066 var request = new XMLHttpRequest();
-1 6067 if (config.auth) {
-1 6068 var username = config.auth.username || '';
-1 6069 var password = config.auth.password || '';
-1 6070 requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
-1 6071 }
-1 6072 request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);
-1 6073 request.timeout = config.timeout;
-1 6074 request.onreadystatechange = function handleLoad() {
-1 6075 if (!request || request.readyState !== 4) {
-1 6076 return;
5936 6077 }
5937 -1 if (typeof config.onDownloadProgress === 'function') {
5938 -1 request.addEventListener('progress', config.onDownloadProgress);
-1 6078 if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
-1 6079 return;
5939 6080 }
5940 -1 if (typeof config.onUploadProgress === 'function' && request.upload) {
5941 -1 request.upload.addEventListener('progress', config.onUploadProgress);
-1 6081 var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
-1 6082 var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
-1 6083 var response = {
-1 6084 data: responseData,
-1 6085 status: request.status,
-1 6086 statusText: request.statusText,
-1 6087 headers: responseHeaders,
-1 6088 config: config,
-1 6089 request: request
-1 6090 };
-1 6091 settle(resolve, reject, response);
-1 6092 request = null;
-1 6093 };
-1 6094 request.onabort = function handleAbort() {
-1 6095 if (!request) {
-1 6096 return;
5942 6097 }
5943 -1 if (config.cancelToken) {
5944 -1 config.cancelToken.promise.then(function onCanceled(cancel) {
5945 -1 if (!request) {
5946 -1 return;
5947 -1 }
5948 -1 request.abort();
5949 -1 reject(cancel);
5950 -1 request = null;
5951 -1 });
-1 6098 reject(createError('Request aborted', config, 'ECONNABORTED', request));
-1 6099 request = null;
-1 6100 };
-1 6101 request.onerror = function handleError() {
-1 6102 reject(createError('Network Error', config, null, request));
-1 6103 request = null;
-1 6104 };
-1 6105 request.ontimeout = function handleTimeout() {
-1 6106 reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', request));
-1 6107 request = null;
-1 6108 };
-1 6109 if (utils.isStandardBrowserEnv()) {
-1 6110 var cookies = _dereq_('./../helpers/cookies');
-1 6111 var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined;
-1 6112 if (xsrfValue) {
-1 6113 requestHeaders[config.xsrfHeaderName] = xsrfValue;
5952 6114 }
5953 -1 if (requestData === undefined) {
5954 -1 requestData = null;
-1 6115 }
-1 6116 if ('setRequestHeader' in request) {
-1 6117 utils.forEach(requestHeaders, function setRequestHeader(val, key) {
-1 6118 if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
-1 6119 delete requestHeaders[key];
-1 6120 } else {
-1 6121 request.setRequestHeader(key, val);
-1 6122 }
-1 6123 });
-1 6124 }
-1 6125 if (config.withCredentials) {
-1 6126 request.withCredentials = true;
-1 6127 }
-1 6128 if (config.responseType) {
-1 6129 try {
-1 6130 request.responseType = config.responseType;
-1 6131 } catch (e) {
-1 6132 if (config.responseType !== 'json') {
-1 6133 throw e;
-1 6134 }
5955 6135 }
5956 -1 request.send(requestData);
5957 -1 });
5958 -1 };
5959 -1 }).call(this, _dereq_('_process'));
-1 6136 }
-1 6137 if (typeof config.onDownloadProgress === 'function') {
-1 6138 request.addEventListener('progress', config.onDownloadProgress);
-1 6139 }
-1 6140 if (typeof config.onUploadProgress === 'function' && request.upload) {
-1 6141 request.upload.addEventListener('progress', config.onUploadProgress);
-1 6142 }
-1 6143 if (config.cancelToken) {
-1 6144 config.cancelToken.promise.then(function onCanceled(cancel) {
-1 6145 if (!request) {
-1 6146 return;
-1 6147 }
-1 6148 request.abort();
-1 6149 reject(cancel);
-1 6150 request = null;
-1 6151 });
-1 6152 }
-1 6153 if (requestData === undefined) {
-1 6154 requestData = null;
-1 6155 }
-1 6156 request.send(requestData);
-1 6157 });
-1 6158 };
5960 6159 }, {
5961 -1 '../core/createError': 10,
5962 -1 './../core/settle': 13,
5963 -1 './../helpers/btoa': 17,
5964 -1 './../helpers/buildURL': 18,
5965 -1 './../helpers/cookies': 20,
5966 -1 './../helpers/isURLSameOrigin': 22,
5967 -1 './../helpers/parseHeaders': 24,
5968 -1 './../utils': 26,
5969 -1 _process: 33
-1 6160 '../core/createError': 11,
-1 6161 './../core/settle': 15,
-1 6162 './../helpers/buildURL': 19,
-1 6163 './../helpers/cookies': 21,
-1 6164 './../helpers/isURLSameOrigin': 23,
-1 6165 './../helpers/parseHeaders': 25,
-1 6166 './../utils': 27
5970 6167 } ],
5971 -1 4: [ function(_dereq_, module, exports) {
-1 6168 5: [ function(_dereq_, module, exports) {
5972 6169 'use strict';
5973 6170 var utils = _dereq_('./utils');
5974 6171 var bind = _dereq_('./helpers/bind');
5975 6172 var Axios = _dereq_('./core/Axios');
-1 6173 var mergeConfig = _dereq_('./core/mergeConfig');
5976 6174 var defaults = _dereq_('./defaults');
5977 6175 function createInstance(defaultConfig) {
5978 6176 var context = new Axios(defaultConfig);
@@ -5984,7 +6182,7 @@ module.exports = {
5984 6182 var axios = createInstance(defaults);
5985 6183 axios.Axios = Axios;
5986 6184 axios.create = function create(instanceConfig) {
5987 -1 return createInstance(utils.merge(defaults, instanceConfig));
-1 6185 return createInstance(mergeConfig(axios.defaults, instanceConfig));
5988 6186 };
5989 6187 axios.Cancel = _dereq_('./cancel/Cancel');
5990 6188 axios.CancelToken = _dereq_('./cancel/CancelToken');
@@ -5996,16 +6194,17 @@ module.exports = {
5996 6194 module.exports = axios;
5997 6195 module.exports.default = axios;
5998 6196 }, {
5999 -1 './cancel/Cancel': 5,
6000 -1 './cancel/CancelToken': 6,
6001 -1 './cancel/isCancel': 7,
6002 -1 './core/Axios': 8,
6003 -1 './defaults': 15,
6004 -1 './helpers/bind': 16,
6005 -1 './helpers/spread': 25,
6006 -1 './utils': 26
-1 6197 './cancel/Cancel': 6,
-1 6198 './cancel/CancelToken': 7,
-1 6199 './cancel/isCancel': 8,
-1 6200 './core/Axios': 9,
-1 6201 './core/mergeConfig': 14,
-1 6202 './defaults': 17,
-1 6203 './helpers/bind': 18,
-1 6204 './helpers/spread': 26,
-1 6205 './utils': 27
6007 6206 } ],
6008 -1 5: [ function(_dereq_, module, exports) {
-1 6207 6: [ function(_dereq_, module, exports) {
6009 6208 'use strict';
6010 6209 function Cancel(message) {
6011 6210 this.message = message;
@@ -6016,7 +6215,7 @@ module.exports = {
6016 6215 Cancel.prototype.__CANCEL__ = true;
6017 6216 module.exports = Cancel;
6018 6217 }, {} ],
6019 -1 6: [ function(_dereq_, module, exports) {
-1 6218 7: [ function(_dereq_, module, exports) {
6020 6219 'use strict';
6021 6220 var Cancel = _dereq_('./Cancel');
6022 6221 function CancelToken(executor) {
@@ -6053,20 +6252,21 @@ module.exports = {
6053 6252 };
6054 6253 module.exports = CancelToken;
6055 6254 }, {
6056 -1 './Cancel': 5
-1 6255 './Cancel': 6
6057 6256 } ],
6058 -1 7: [ function(_dereq_, module, exports) {
-1 6257 8: [ function(_dereq_, module, exports) {
6059 6258 'use strict';
6060 6259 module.exports = function isCancel(value) {
6061 6260 return !!(value && value.__CANCEL__);
6062 6261 };
6063 6262 }, {} ],
6064 -1 8: [ function(_dereq_, module, exports) {
-1 6263 9: [ function(_dereq_, module, exports) {
6065 6264 'use strict';
6066 -1 var defaults = _dereq_('./../defaults');
6067 6265 var utils = _dereq_('./../utils');
-1 6266 var buildURL = _dereq_('../helpers/buildURL');
6068 6267 var InterceptorManager = _dereq_('./InterceptorManager');
6069 6268 var dispatchRequest = _dereq_('./dispatchRequest');
-1 6269 var mergeConfig = _dereq_('./mergeConfig');
6070 6270 function Axios(instanceConfig) {
6071 6271 this.defaults = instanceConfig;
6072 6272 this.interceptors = {
@@ -6076,14 +6276,13 @@ module.exports = {
6076 6276 }
6077 6277 Axios.prototype.request = function request(config) {
6078 6278 if (typeof config === 'string') {
6079 -1 config = utils.merge({
6080 -1 url: arguments[0]
6081 -1 }, arguments[1]);
6082 -1 }
6083 -1 config = utils.merge(defaults, {
6084 -1 method: 'get'
6085 -1 }, this.defaults, config);
6086 -1 config.method = config.method.toLowerCase();
-1 6279 config = arguments[1] || {};
-1 6280 config.url = arguments[0];
-1 6281 } else {
-1 6282 config = config || {};
-1 6283 }
-1 6284 config = mergeConfig(this.defaults, config);
-1 6285 config.method = config.method ? config.method.toLowerCase() : 'get';
6087 6286 var chain = [ dispatchRequest, undefined ];
6088 6287 var promise = Promise.resolve(config);
6089 6288 this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
@@ -6097,6 +6296,10 @@ module.exports = {
6097 6296 }
6098 6297 return promise;
6099 6298 };
-1 6299 Axios.prototype.getUri = function getUri(config) {
-1 6300 config = mergeConfig(this.defaults, config);
-1 6301 return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
-1 6302 };
6100 6303 utils.forEach([ 'delete', 'get', 'head', 'options' ], function forEachMethodNoData(method) {
6101 6304 Axios.prototype[method] = function(url, config) {
6102 6305 return this.request(utils.merge(config || {}, {
@@ -6116,12 +6319,13 @@ module.exports = {
6116 6319 });
6117 6320 module.exports = Axios;
6118 6321 }, {
6119 -1 './../defaults': 15,
6120 -1 './../utils': 26,
6121 -1 './InterceptorManager': 9,
6122 -1 './dispatchRequest': 11
-1 6322 '../helpers/buildURL': 19,
-1 6323 './../utils': 27,
-1 6324 './InterceptorManager': 10,
-1 6325 './dispatchRequest': 12,
-1 6326 './mergeConfig': 14
6123 6327 } ],
6124 -1 9: [ function(_dereq_, module, exports) {
-1 6328 10: [ function(_dereq_, module, exports) {
6125 6329 'use strict';
6126 6330 var utils = _dereq_('./../utils');
6127 6331 function InterceptorManager() {
@@ -6148,9 +6352,9 @@ module.exports = {
6148 6352 };
6149 6353 module.exports = InterceptorManager;
6150 6354 }, {
6151 -1 './../utils': 26
-1 6355 './../utils': 27
6152 6356 } ],
6153 -1 10: [ function(_dereq_, module, exports) {
-1 6357 11: [ function(_dereq_, module, exports) {
6154 6358 'use strict';
6155 6359 var enhanceError = _dereq_('./enhanceError');
6156 6360 module.exports = function createError(message, config, code, request, response) {
@@ -6158,9 +6362,9 @@ module.exports = {
6158 6362 return enhanceError(error, config, code, request, response);
6159 6363 };
6160 6364 }, {
6161 -1 './enhanceError': 12
-1 6365 './enhanceError': 13
6162 6366 } ],
6163 -1 11: [ function(_dereq_, module, exports) {
-1 6367 12: [ function(_dereq_, module, exports) {
6164 6368 'use strict';
6165 6369 var utils = _dereq_('./../utils');
6166 6370 var transformData = _dereq_('./transformData');
@@ -6200,14 +6404,14 @@ module.exports = {
6200 6404 });
6201 6405 };
6202 6406 }, {
6203 -1 '../cancel/isCancel': 7,
6204 -1 '../defaults': 15,
6205 -1 './../helpers/combineURLs': 19,
6206 -1 './../helpers/isAbsoluteURL': 21,
6207 -1 './../utils': 26,
6208 -1 './transformData': 14
-1 6407 '../cancel/isCancel': 8,
-1 6408 '../defaults': 17,
-1 6409 './../helpers/combineURLs': 20,
-1 6410 './../helpers/isAbsoluteURL': 22,
-1 6411 './../utils': 27,
-1 6412 './transformData': 16
6209 6413 } ],
6210 -1 12: [ function(_dereq_, module, exports) {
-1 6414 13: [ function(_dereq_, module, exports) {
6211 6415 'use strict';
6212 6416 module.exports = function enhanceError(error, config, code, request, response) {
6213 6417 error.config = config;
@@ -6216,24 +6420,73 @@ module.exports = {
6216 6420 }
6217 6421 error.request = request;
6218 6422 error.response = response;
-1 6423 error.isAxiosError = true;
-1 6424 error.toJSON = function() {
-1 6425 return {
-1 6426 message: this.message,
-1 6427 name: this.name,
-1 6428 description: this.description,
-1 6429 number: this.number,
-1 6430 fileName: this.fileName,
-1 6431 lineNumber: this.lineNumber,
-1 6432 columnNumber: this.columnNumber,
-1 6433 stack: this.stack,
-1 6434 config: this.config,
-1 6435 code: this.code
-1 6436 };
-1 6437 };
6219 6438 return error;
6220 6439 };
6221 6440 }, {} ],
6222 -1 13: [ function(_dereq_, module, exports) {
-1 6441 14: [ function(_dereq_, module, exports) {
-1 6442 'use strict';
-1 6443 var utils = _dereq_('../utils');
-1 6444 module.exports = function mergeConfig(config1, config2) {
-1 6445 config2 = config2 || {};
-1 6446 var config = {};
-1 6447 utils.forEach([ 'url', 'method', 'params', 'data' ], function valueFromConfig2(prop) {
-1 6448 if (typeof config2[prop] !== 'undefined') {
-1 6449 config[prop] = config2[prop];
-1 6450 }
-1 6451 });
-1 6452 utils.forEach([ 'headers', 'auth', 'proxy' ], function mergeDeepProperties(prop) {
-1 6453 if (utils.isObject(config2[prop])) {
-1 6454 config[prop] = utils.deepMerge(config1[prop], config2[prop]);
-1 6455 } else if (typeof config2[prop] !== 'undefined') {
-1 6456 config[prop] = config2[prop];
-1 6457 } else if (utils.isObject(config1[prop])) {
-1 6458 config[prop] = utils.deepMerge(config1[prop]);
-1 6459 } else if (typeof config1[prop] !== 'undefined') {
-1 6460 config[prop] = config1[prop];
-1 6461 }
-1 6462 });
-1 6463 utils.forEach([ 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken', 'socketPath' ], function defaultToConfig2(prop) {
-1 6464 if (typeof config2[prop] !== 'undefined') {
-1 6465 config[prop] = config2[prop];
-1 6466 } else if (typeof config1[prop] !== 'undefined') {
-1 6467 config[prop] = config1[prop];
-1 6468 }
-1 6469 });
-1 6470 return config;
-1 6471 };
-1 6472 }, {
-1 6473 '../utils': 27
-1 6474 } ],
-1 6475 15: [ function(_dereq_, module, exports) {
6223 6476 'use strict';
6224 6477 var createError = _dereq_('./createError');
6225 6478 module.exports = function settle(resolve, reject, response) {
6226 6479 var validateStatus = response.config.validateStatus;
6227 -1 if (!response.status || !validateStatus || validateStatus(response.status)) {
-1 6480 if (!validateStatus || validateStatus(response.status)) {
6228 6481 resolve(response);
6229 6482 } else {
6230 6483 reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response));
6231 6484 }
6232 6485 };
6233 6486 }, {
6234 -1 './createError': 10
-1 6487 './createError': 11
6235 6488 } ],
6236 -1 14: [ function(_dereq_, module, exports) {
-1 6489 16: [ function(_dereq_, module, exports) {
6237 6490 'use strict';
6238 6491 var utils = _dereq_('./../utils');
6239 6492 module.exports = function transformData(data, headers, fns) {
@@ -6243,9 +6496,9 @@ module.exports = {
6243 6496 return data;
6244 6497 };
6245 6498 }, {
6246 -1 './../utils': 26
-1 6499 './../utils': 27
6247 6500 } ],
6248 -1 15: [ function(_dereq_, module, exports) {
-1 6501 17: [ function(_dereq_, module, exports) {
6249 6502 (function(process) {
6250 6503 'use strict';
6251 6504 var utils = _dereq_('./utils');
@@ -6260,16 +6513,17 @@ module.exports = {
6260 6513 }
6261 6514 function getDefaultAdapter() {
6262 6515 var adapter;
6263 -1 if (typeof XMLHttpRequest !== 'undefined') {
6264 -1 adapter = _dereq_('./adapters/xhr');
6265 -1 } else if (typeof process !== 'undefined') {
-1 6516 if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
6266 6517 adapter = _dereq_('./adapters/http');
-1 6518 } else if (typeof XMLHttpRequest !== 'undefined') {
-1 6519 adapter = _dereq_('./adapters/xhr');
6267 6520 }
6268 6521 return adapter;
6269 6522 }
6270 6523 var defaults = {
6271 6524 adapter: getDefaultAdapter(),
6272 6525 transformRequest: [ function transformRequest(data, headers) {
-1 6526 normalizeHeaderName(headers, 'Accept');
6273 6527 normalizeHeaderName(headers, 'Content-Type');
6274 6528 if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {
6275 6529 return data;
@@ -6317,13 +6571,13 @@ module.exports = {
6317 6571 module.exports = defaults;
6318 6572 }).call(this, _dereq_('_process'));
6319 6573 }, {
6320 -1 './adapters/http': 3,
6321 -1 './adapters/xhr': 3,
6322 -1 './helpers/normalizeHeaderName': 23,
6323 -1 './utils': 26,
6324 -1 _process: 33
-1 6574 './adapters/http': 4,
-1 6575 './adapters/xhr': 4,
-1 6576 './helpers/normalizeHeaderName': 24,
-1 6577 './utils': 27,
-1 6578 _process: 222
6325 6579 } ],
6326 -1 16: [ function(_dereq_, module, exports) {
-1 6580 18: [ function(_dereq_, module, exports) {
6327 6581 'use strict';
6328 6582 module.exports = function bind(fn, thisArg) {
6329 6583 return function wrap() {
@@ -6335,31 +6589,7 @@ module.exports = {
6335 6589 };
6336 6590 };
6337 6591 }, {} ],
6338 -1 17: [ function(_dereq_, module, exports) {
6339 -1 'use strict';
6340 -1 var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
6341 -1 function E() {
6342 -1 this.message = 'String contains an invalid character';
6343 -1 }
6344 -1 E.prototype = new Error();
6345 -1 E.prototype.code = 5;
6346 -1 E.prototype.name = 'InvalidCharacterError';
6347 -1 function btoa(input) {
6348 -1 var str = String(input);
6349 -1 var output = '';
6350 -1 for (var block, charCode, idx = 0, map = chars; str.charAt(idx | 0) || (map = '=',
6351 -1 idx % 1); output += map.charAt(63 & block >> 8 - idx % 1 * 8)) {
6352 -1 charCode = str.charCodeAt(idx += 3 / 4);
6353 -1 if (charCode > 255) {
6354 -1 throw new E();
6355 -1 }
6356 -1 block = block << 8 | charCode;
6357 -1 }
6358 -1 return output;
6359 -1 }
6360 -1 module.exports = btoa;
6361 -1 }, {} ],
6362 -1 18: [ function(_dereq_, module, exports) {
-1 6592 19: [ function(_dereq_, module, exports) {
6363 6593 'use strict';
6364 6594 var utils = _dereq_('./../utils');
6365 6595 function encode(val) {
@@ -6397,20 +6627,24 @@ module.exports = {
6397 6627 serializedParams = parts.join('&');
6398 6628 }
6399 6629 if (serializedParams) {
-1 6630 var hashmarkIndex = url.indexOf('#');
-1 6631 if (hashmarkIndex !== -1) {
-1 6632 url = url.slice(0, hashmarkIndex);
-1 6633 }
6400 6634 url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
6401 6635 }
6402 6636 return url;
6403 6637 };
6404 6638 }, {
6405 -1 './../utils': 26
-1 6639 './../utils': 27
6406 6640 } ],
6407 -1 19: [ function(_dereq_, module, exports) {
-1 6641 20: [ function(_dereq_, module, exports) {
6408 6642 'use strict';
6409 6643 module.exports = function combineURLs(baseURL, relativeURL) {
6410 6644 return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL;
6411 6645 };
6412 6646 }, {} ],
6413 -1 20: [ function(_dereq_, module, exports) {
-1 6647 21: [ function(_dereq_, module, exports) {
6414 6648 'use strict';
6415 6649 var utils = _dereq_('./../utils');
6416 6650 module.exports = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {
@@ -6450,15 +6684,15 @@ module.exports = {
6450 6684 };
6451 6685 }();
6452 6686 }, {
6453 -1 './../utils': 26
-1 6687 './../utils': 27
6454 6688 } ],
6455 -1 21: [ function(_dereq_, module, exports) {
-1 6689 22: [ function(_dereq_, module, exports) {
6456 6690 'use strict';
6457 6691 module.exports = function isAbsoluteURL(url) {
6458 6692 return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
6459 6693 };
6460 6694 }, {} ],
6461 -1 22: [ function(_dereq_, module, exports) {
-1 6695 23: [ function(_dereq_, module, exports) {
6462 6696 'use strict';
6463 6697 var utils = _dereq_('./../utils');
6464 6698 module.exports = utils.isStandardBrowserEnv() ? function standardBrowserEnv() {
@@ -6494,9 +6728,9 @@ module.exports = {
6494 6728 };
6495 6729 }();
6496 6730 }, {
6497 -1 './../utils': 26
-1 6731 './../utils': 27
6498 6732 } ],
6499 -1 23: [ function(_dereq_, module, exports) {
-1 6733 24: [ function(_dereq_, module, exports) {
6500 6734 'use strict';
6501 6735 var utils = _dereq_('../utils');
6502 6736 module.exports = function normalizeHeaderName(headers, normalizedName) {
@@ -6508,9 +6742,9 @@ module.exports = {
6508 6742 });
6509 6743 };
6510 6744 }, {
6511 -1 '../utils': 26
-1 6745 '../utils': 27
6512 6746 } ],
6513 -1 24: [ function(_dereq_, module, exports) {
-1 6747 25: [ function(_dereq_, module, exports) {
6514 6748 'use strict';
6515 6749 var utils = _dereq_('./../utils');
6516 6750 var ignoreDuplicateOf = [ 'age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent' ];
@@ -6540,9 +6774,9 @@ module.exports = {
6540 6774 return parsed;
6541 6775 };
6542 6776 }, {
6543 -1 './../utils': 26
-1 6777 './../utils': 27
6544 6778 } ],
6545 -1 25: [ function(_dereq_, module, exports) {
-1 6779 26: [ function(_dereq_, module, exports) {
6546 6780 'use strict';
6547 6781 module.exports = function spread(callback) {
6548 6782 return function wrap(arr) {
@@ -6550,7 +6784,7 @@ module.exports = {
6550 6784 };
6551 6785 };
6552 6786 }, {} ],
6553 -1 26: [ function(_dereq_, module, exports) {
-1 6787 27: [ function(_dereq_, module, exports) {
6554 6788 'use strict';
6555 6789 var bind = _dereq_('./helpers/bind');
6556 6790 var isBuffer = _dereq_('is-buffer');
@@ -6607,7 +6841,7 @@ module.exports = {
6607 6841 return str.replace(/^\s*/, '').replace(/\s*$/, '');
6608 6842 }
6609 6843 function isStandardBrowserEnv() {
6610 -1 if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
-1 6844 if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || navigator.product === 'NativeScript' || navigator.product === 'NS')) {
6611 6845 return false;
6612 6846 }
6613 6847 return typeof window !== 'undefined' && typeof document !== 'undefined';
@@ -6645,6 +6879,22 @@ module.exports = {
6645 6879 }
6646 6880 return result;
6647 6881 }
-1 6882 function deepMerge() {
-1 6883 var result = {};
-1 6884 function assignValue(val, key) {
-1 6885 if (typeof result[key] === 'object' && typeof val === 'object') {
-1 6886 result[key] = deepMerge(result[key], val);
-1 6887 } else if (typeof val === 'object') {
-1 6888 result[key] = deepMerge({}, val);
-1 6889 } else {
-1 6890 result[key] = val;
-1 6891 }
-1 6892 }
-1 6893 for (var i = 0, l = arguments.length; i < l; i++) {
-1 6894 forEach(arguments[i], assignValue);
-1 6895 }
-1 6896 return result;
-1 6897 }
6648 6898 function extend(a, b, thisArg) {
6649 6899 forEach(b, function assignValue(val, key) {
6650 6900 if (thisArg && typeof val === 'function') {
@@ -6674,1272 +6924,6407 @@ module.exports = {
6674 6924 isStandardBrowserEnv: isStandardBrowserEnv,
6675 6925 forEach: forEach,
6676 6926 merge: merge,
-1 6927 deepMerge: deepMerge,
6677 6928 extend: extend,
6678 6929 trim: trim
6679 6930 };
6680 6931 }, {
6681 -1 './helpers/bind': 16,
6682 -1 'is-buffer': 32
-1 6932 './helpers/bind': 18,
-1 6933 'is-buffer': 28
6683 6934 } ],
6684 -1 27: [ function(_dereq_, module, exports) {
6685 -1 module.exports = {
6686 -1 CssSelectorParser: _dereq_('./lib/css-selector-parser.js').CssSelectorParser
-1 6935 28: [ function(_dereq_, module, exports) {
-1 6936 module.exports = function isBuffer(obj) {
-1 6937 return obj != null && obj.constructor != null && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);
6687 6938 };
-1 6939 }, {} ],
-1 6940 29: [ function(_dereq_, module, exports) {
-1 6941 _dereq_('../../modules/es.typed-array.from');
-1 6942 _dereq_('../../modules/es.typed-array.of');
-1 6943 _dereq_('../../modules/es.typed-array.copy-within');
-1 6944 _dereq_('../../modules/es.typed-array.every');
-1 6945 _dereq_('../../modules/es.typed-array.fill');
-1 6946 _dereq_('../../modules/es.typed-array.filter');
-1 6947 _dereq_('../../modules/es.typed-array.find');
-1 6948 _dereq_('../../modules/es.typed-array.find-index');
-1 6949 _dereq_('../../modules/es.typed-array.for-each');
-1 6950 _dereq_('../../modules/es.typed-array.includes');
-1 6951 _dereq_('../../modules/es.typed-array.index-of');
-1 6952 _dereq_('../../modules/es.typed-array.join');
-1 6953 _dereq_('../../modules/es.typed-array.last-index-of');
-1 6954 _dereq_('../../modules/es.typed-array.map');
-1 6955 _dereq_('../../modules/es.typed-array.reduce');
-1 6956 _dereq_('../../modules/es.typed-array.reduce-right');
-1 6957 _dereq_('../../modules/es.typed-array.reverse');
-1 6958 _dereq_('../../modules/es.typed-array.set');
-1 6959 _dereq_('../../modules/es.typed-array.slice');
-1 6960 _dereq_('../../modules/es.typed-array.some');
-1 6961 _dereq_('../../modules/es.typed-array.sort');
-1 6962 _dereq_('../../modules/es.typed-array.subarray');
-1 6963 _dereq_('../../modules/es.typed-array.to-locale-string');
-1 6964 _dereq_('../../modules/es.typed-array.to-string');
-1 6965 _dereq_('../../modules/es.typed-array.iterator');
-1 6966 _dereq_('../../modules/es.object.to-string');
6688 6967 }, {
6689 -1 './lib/css-selector-parser.js': 28
-1 6968 '../../modules/es.object.to-string': 120,
-1 6969 '../../modules/es.typed-array.copy-within': 121,
-1 6970 '../../modules/es.typed-array.every': 122,
-1 6971 '../../modules/es.typed-array.fill': 123,
-1 6972 '../../modules/es.typed-array.filter': 124,
-1 6973 '../../modules/es.typed-array.find': 126,
-1 6974 '../../modules/es.typed-array.find-index': 125,
-1 6975 '../../modules/es.typed-array.for-each': 127,
-1 6976 '../../modules/es.typed-array.from': 128,
-1 6977 '../../modules/es.typed-array.includes': 129,
-1 6978 '../../modules/es.typed-array.index-of': 130,
-1 6979 '../../modules/es.typed-array.iterator': 131,
-1 6980 '../../modules/es.typed-array.join': 132,
-1 6981 '../../modules/es.typed-array.last-index-of': 133,
-1 6982 '../../modules/es.typed-array.map': 134,
-1 6983 '../../modules/es.typed-array.of': 135,
-1 6984 '../../modules/es.typed-array.reduce': 137,
-1 6985 '../../modules/es.typed-array.reduce-right': 136,
-1 6986 '../../modules/es.typed-array.reverse': 138,
-1 6987 '../../modules/es.typed-array.set': 139,
-1 6988 '../../modules/es.typed-array.slice': 140,
-1 6989 '../../modules/es.typed-array.some': 141,
-1 6990 '../../modules/es.typed-array.sort': 142,
-1 6991 '../../modules/es.typed-array.subarray': 143,
-1 6992 '../../modules/es.typed-array.to-locale-string': 144,
-1 6993 '../../modules/es.typed-array.to-string': 145
6690 6994 } ],
6691 -1 28: [ function(_dereq_, module, exports) {
6692 -1 function CssSelectorParser() {
6693 -1 this.pseudos = {};
6694 -1 this.attrEqualityMods = {};
6695 -1 this.ruleNestingOperators = {};
6696 -1 this.substitutesEnabled = false;
6697 -1 }
6698 -1 CssSelectorParser.prototype.registerSelectorPseudos = function(name) {
6699 -1 for (var j = 0, len = arguments.length; j < len; j++) {
6700 -1 name = arguments[j];
6701 -1 this.pseudos[name] = 'selector';
-1 6995 30: [ function(_dereq_, module, exports) {
-1 6996 _dereq_('../../modules/es.typed-array.uint32-array');
-1 6997 _dereq_('./methods');
-1 6998 var global = _dereq_('../../internals/global');
-1 6999 module.exports = global.Uint32Array;
-1 7000 }, {
-1 7001 '../../internals/global': 65,
-1 7002 '../../modules/es.typed-array.uint32-array': 146,
-1 7003 './methods': 29
-1 7004 } ],
-1 7005 31: [ function(_dereq_, module, exports) {
-1 7006 _dereq_('../../modules/es.typed-array.reduce');
-1 7007 }, {
-1 7008 '../../modules/es.typed-array.reduce': 137
-1 7009 } ],
-1 7010 32: [ function(_dereq_, module, exports) {
-1 7011 _dereq_('../../modules/es.typed-array.some');
-1 7012 }, {
-1 7013 '../../modules/es.typed-array.some': 141
-1 7014 } ],
-1 7015 33: [ function(_dereq_, module, exports) {
-1 7016 module.exports = _dereq_('../../es/typed-array/uint32-array');
-1 7017 }, {
-1 7018 '../../es/typed-array/uint32-array': 30
-1 7019 } ],
-1 7020 34: [ function(_dereq_, module, exports) {
-1 7021 module.exports = function(it) {
-1 7022 if (typeof it != 'function') {
-1 7023 throw TypeError(String(it) + ' is not a function');
6702 7024 }
6703 -1 return this;
-1 7025 return it;
6704 7026 };
6705 -1 CssSelectorParser.prototype.unregisterSelectorPseudos = function(name) {
6706 -1 for (var j = 0, len = arguments.length; j < len; j++) {
6707 -1 name = arguments[j];
6708 -1 delete this.pseudos[name];
-1 7027 }, {} ],
-1 7028 35: [ function(_dereq_, module, exports) {
-1 7029 var isObject = _dereq_('../internals/is-object');
-1 7030 module.exports = function(it) {
-1 7031 if (!isObject(it) && it !== null) {
-1 7032 throw TypeError('Can\'t set ' + String(it) + ' as a prototype');
6709 7033 }
6710 -1 return this;
-1 7034 return it;
6711 7035 };
6712 -1 CssSelectorParser.prototype.registerNumericPseudos = function(name) {
6713 -1 for (var j = 0, len = arguments.length; j < len; j++) {
6714 -1 name = arguments[j];
6715 -1 this.pseudos[name] = 'numeric';
6716 -1 }
6717 -1 return this;
-1 7036 }, {
-1 7037 '../internals/is-object': 76
-1 7038 } ],
-1 7039 36: [ function(_dereq_, module, exports) {
-1 7040 var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
-1 7041 var create = _dereq_('../internals/object-create');
-1 7042 var hide = _dereq_('../internals/hide');
-1 7043 var UNSCOPABLES = wellKnownSymbol('unscopables');
-1 7044 var ArrayPrototype = Array.prototype;
-1 7045 if (ArrayPrototype[UNSCOPABLES] == undefined) {
-1 7046 hide(ArrayPrototype, UNSCOPABLES, create(null));
-1 7047 }
-1 7048 module.exports = function(key) {
-1 7049 ArrayPrototype[UNSCOPABLES][key] = true;
6718 7050 };
6719 -1 CssSelectorParser.prototype.unregisterNumericPseudos = function(name) {
6720 -1 for (var j = 0, len = arguments.length; j < len; j++) {
6721 -1 name = arguments[j];
6722 -1 delete this.pseudos[name];
-1 7051 }, {
-1 7052 '../internals/hide': 68,
-1 7053 '../internals/object-create': 82,
-1 7054 '../internals/well-known-symbol': 118
-1 7055 } ],
-1 7056 37: [ function(_dereq_, module, exports) {
-1 7057 module.exports = function(it, Constructor, name) {
-1 7058 if (!(it instanceof Constructor)) {
-1 7059 throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
6723 7060 }
6724 -1 return this;
-1 7061 return it;
6725 7062 };
6726 -1 CssSelectorParser.prototype.registerNestingOperators = function(operator) {
6727 -1 for (var j = 0, len = arguments.length; j < len; j++) {
6728 -1 operator = arguments[j];
6729 -1 this.ruleNestingOperators[operator] = true;
-1 7063 }, {} ],
-1 7064 38: [ function(_dereq_, module, exports) {
-1 7065 var isObject = _dereq_('../internals/is-object');
-1 7066 module.exports = function(it) {
-1 7067 if (!isObject(it)) {
-1 7068 throw TypeError(String(it) + ' is not an object');
6730 7069 }
6731 -1 return this;
-1 7070 return it;
6732 7071 };
6733 -1 CssSelectorParser.prototype.unregisterNestingOperators = function(operator) {
6734 -1 for (var j = 0, len = arguments.length; j < len; j++) {
6735 -1 operator = arguments[j];
6736 -1 delete this.ruleNestingOperators[operator];
6737 -1 }
6738 -1 return this;
-1 7072 }, {
-1 7073 '../internals/is-object': 76
-1 7074 } ],
-1 7075 39: [ function(_dereq_, module, exports) {
-1 7076 'use strict';
-1 7077 var DESCRIPTORS = _dereq_('../internals/descriptors');
-1 7078 var global = _dereq_('../internals/global');
-1 7079 var isObject = _dereq_('../internals/is-object');
-1 7080 var has = _dereq_('../internals/has');
-1 7081 var classof = _dereq_('../internals/classof');
-1 7082 var hide = _dereq_('../internals/hide');
-1 7083 var redefine = _dereq_('../internals/redefine');
-1 7084 var defineProperty = _dereq_('../internals/object-define-property').f;
-1 7085 var getPrototypeOf = _dereq_('../internals/object-get-prototype-of');
-1 7086 var setPrototypeOf = _dereq_('../internals/object-set-prototype-of');
-1 7087 var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
-1 7088 var uid = _dereq_('../internals/uid');
-1 7089 var DataView = global.DataView;
-1 7090 var DataViewPrototype = DataView && DataView.prototype;
-1 7091 var Int8Array = global.Int8Array;
-1 7092 var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
-1 7093 var Uint8ClampedArray = global.Uint8ClampedArray;
-1 7094 var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
-1 7095 var TypedArray = Int8Array && getPrototypeOf(Int8Array);
-1 7096 var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);
-1 7097 var ObjectPrototype = Object.prototype;
-1 7098 var isPrototypeOf = ObjectPrototype.isPrototypeOf;
-1 7099 var TO_STRING_TAG = wellKnownSymbol('toStringTag');
-1 7100 var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
-1 7101 var NATIVE_ARRAY_BUFFER = !!(global.ArrayBuffer && DataView);
-1 7102 var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
-1 7103 var TYPED_ARRAY_TAG_REQIRED = false;
-1 7104 var NAME;
-1 7105 var TypedArrayConstructorsList = {
-1 7106 Int8Array: 1,
-1 7107 Uint8Array: 1,
-1 7108 Uint8ClampedArray: 1,
-1 7109 Int16Array: 2,
-1 7110 Uint16Array: 2,
-1 7111 Int32Array: 4,
-1 7112 Uint32Array: 4,
-1 7113 Float32Array: 4,
-1 7114 Float64Array: 8
6739 7115 };
6740 -1 CssSelectorParser.prototype.registerAttrEqualityMods = function(mod) {
6741 -1 for (var j = 0, len = arguments.length; j < len; j++) {
6742 -1 mod = arguments[j];
6743 -1 this.attrEqualityMods[mod] = true;
-1 7116 var isView = function isView(it) {
-1 7117 var klass = classof(it);
-1 7118 return klass === 'DataView' || has(TypedArrayConstructorsList, klass);
-1 7119 };
-1 7120 var isTypedArray = function(it) {
-1 7121 return isObject(it) && has(TypedArrayConstructorsList, classof(it));
-1 7122 };
-1 7123 var aTypedArray = function(it) {
-1 7124 if (isTypedArray(it)) {
-1 7125 return it;
6744 7126 }
6745 -1 return this;
-1 7127 throw TypeError('Target is not a typed array');
6746 7128 };
6747 -1 CssSelectorParser.prototype.unregisterAttrEqualityMods = function(mod) {
6748 -1 for (var j = 0, len = arguments.length; j < len; j++) {
6749 -1 mod = arguments[j];
6750 -1 delete this.attrEqualityMods[mod];
-1 7129 var aTypedArrayConstructor = function(C) {
-1 7130 if (setPrototypeOf) {
-1 7131 if (isPrototypeOf.call(TypedArray, C)) {
-1 7132 return C;
-1 7133 }
-1 7134 } else {
-1 7135 for (var ARRAY in TypedArrayConstructorsList) {
-1 7136 if (has(TypedArrayConstructorsList, NAME)) {
-1 7137 var TypedArrayConstructor = global[ARRAY];
-1 7138 if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) {
-1 7139 return C;
-1 7140 }
-1 7141 }
-1 7142 }
6751 7143 }
6752 -1 return this;
-1 7144 throw TypeError('Target is not a typed array constructor');
6753 7145 };
6754 -1 CssSelectorParser.prototype.enableSubstitutes = function() {
6755 -1 this.substitutesEnabled = true;
6756 -1 return this;
-1 7146 var exportProto = function(KEY, property, forced) {
-1 7147 if (!DESCRIPTORS) {
-1 7148 return;
-1 7149 }
-1 7150 if (forced) {
-1 7151 for (var ARRAY in TypedArrayConstructorsList) {
-1 7152 var TypedArrayConstructor = global[ARRAY];
-1 7153 if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) {
-1 7154 delete TypedArrayConstructor.prototype[KEY];
-1 7155 }
-1 7156 }
-1 7157 }
-1 7158 if (!TypedArrayPrototype[KEY] || forced) {
-1 7159 redefine(TypedArrayPrototype, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);
-1 7160 }
6757 7161 };
6758 -1 CssSelectorParser.prototype.disableSubstitutes = function() {
6759 -1 this.substitutesEnabled = false;
6760 -1 return this;
-1 7162 var exportStatic = function(KEY, property, forced) {
-1 7163 var ARRAY, TypedArrayConstructor;
-1 7164 if (!DESCRIPTORS) {
-1 7165 return;
-1 7166 }
-1 7167 if (setPrototypeOf) {
-1 7168 if (forced) {
-1 7169 for (ARRAY in TypedArrayConstructorsList) {
-1 7170 TypedArrayConstructor = global[ARRAY];
-1 7171 if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) {
-1 7172 delete TypedArrayConstructor[KEY];
-1 7173 }
-1 7174 }
-1 7175 }
-1 7176 if (!TypedArray[KEY] || forced) {
-1 7177 try {
-1 7178 return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8Array[KEY] || property);
-1 7179 } catch (error) {}
-1 7180 } else {
-1 7181 return;
-1 7182 }
-1 7183 }
-1 7184 for (ARRAY in TypedArrayConstructorsList) {
-1 7185 TypedArrayConstructor = global[ARRAY];
-1 7186 if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
-1 7187 redefine(TypedArrayConstructor, KEY, property);
-1 7188 }
-1 7189 }
6761 7190 };
6762 -1 function isIdentStart(c) {
6763 -1 return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c === '-' || c === '_';
-1 7191 for (NAME in TypedArrayConstructorsList) {
-1 7192 if (!global[NAME]) {
-1 7193 NATIVE_ARRAY_BUFFER_VIEWS = false;
-1 7194 }
6764 7195 }
6765 -1 function isIdent(c) {
6766 -1 return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c === '-' || c === '_';
-1 7196 if (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) {
-1 7197 TypedArray = function TypedArray() {
-1 7198 throw TypeError('Incorrect invocation');
-1 7199 };
-1 7200 if (NATIVE_ARRAY_BUFFER_VIEWS) {
-1 7201 for (NAME in TypedArrayConstructorsList) {
-1 7202 if (global[NAME]) {
-1 7203 setPrototypeOf(global[NAME], TypedArray);
-1 7204 }
-1 7205 }
-1 7206 }
6767 7207 }
6768 -1 function isHex(c) {
6769 -1 return c >= 'a' && c <= 'f' || c >= 'A' && c <= 'F' || c >= '0' && c <= '9';
-1 7208 if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
-1 7209 TypedArrayPrototype = TypedArray.prototype;
-1 7210 if (NATIVE_ARRAY_BUFFER_VIEWS) {
-1 7211 for (NAME in TypedArrayConstructorsList) {
-1 7212 if (global[NAME]) {
-1 7213 setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);
-1 7214 }
-1 7215 }
-1 7216 }
6770 7217 }
6771 -1 function isDecimal(c) {
6772 -1 return c >= '0' && c <= '9';
-1 7218 if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
-1 7219 setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
6773 7220 }
6774 -1 function isAttrMatchOperator(chr) {
6775 -1 return chr === '=' || chr === '^' || chr === '$' || chr === '*' || chr === '~';
-1 7221 if (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {
-1 7222 TYPED_ARRAY_TAG_REQIRED = true;
-1 7223 defineProperty(TypedArrayPrototype, TO_STRING_TAG, {
-1 7224 get: function() {
-1 7225 return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
-1 7226 }
-1 7227 });
-1 7228 for (NAME in TypedArrayConstructorsList) {
-1 7229 if (global[NAME]) {
-1 7230 hide(global[NAME], TYPED_ARRAY_TAG, NAME);
-1 7231 }
-1 7232 }
6776 7233 }
6777 -1 var identSpecialChars = {
6778 -1 '!': true,
6779 -1 '"': true,
6780 -1 '#': true,
6781 -1 $: true,
6782 -1 '%': true,
6783 -1 '&': true,
6784 -1 '\'': true,
6785 -1 '(': true,
6786 -1 ')': true,
6787 -1 '*': true,
6788 -1 '+': true,
6789 -1 ',': true,
6790 -1 '.': true,
6791 -1 '/': true,
6792 -1 ';': true,
6793 -1 '<': true,
6794 -1 '=': true,
6795 -1 '>': true,
6796 -1 '?': true,
6797 -1 '@': true,
6798 -1 '[': true,
6799 -1 '\\': true,
6800 -1 ']': true,
6801 -1 '^': true,
6802 -1 '`': true,
6803 -1 '{': true,
6804 -1 '|': true,
6805 -1 '}': true,
6806 -1 '~': true
-1 7234 if (NATIVE_ARRAY_BUFFER && setPrototypeOf && getPrototypeOf(DataViewPrototype) !== ObjectPrototype) {
-1 7235 setPrototypeOf(DataViewPrototype, ObjectPrototype);
-1 7236 }
-1 7237 module.exports = {
-1 7238 NATIVE_ARRAY_BUFFER: NATIVE_ARRAY_BUFFER,
-1 7239 NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
-1 7240 TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,
-1 7241 aTypedArray: aTypedArray,
-1 7242 aTypedArrayConstructor: aTypedArrayConstructor,
-1 7243 exportProto: exportProto,
-1 7244 exportStatic: exportStatic,
-1 7245 isView: isView,
-1 7246 isTypedArray: isTypedArray,
-1 7247 TypedArray: TypedArray,
-1 7248 TypedArrayPrototype: TypedArrayPrototype
6807 7249 };
6808 -1 var strReplacementsRev = {
6809 -1 '\n': '\\n',
6810 -1 '\r': '\\r',
6811 -1 '\t': '\\t',
6812 -1 '\f': '\\f',
6813 -1 '\v': '\\v'
-1 7250 }, {
-1 7251 '../internals/classof': 51,
-1 7252 '../internals/descriptors': 57,
-1 7253 '../internals/global': 65,
-1 7254 '../internals/has': 66,
-1 7255 '../internals/hide': 68,
-1 7256 '../internals/is-object': 76,
-1 7257 '../internals/object-define-property': 84,
-1 7258 '../internals/object-get-prototype-of': 88,
-1 7259 '../internals/object-set-prototype-of': 92,
-1 7260 '../internals/redefine': 97,
-1 7261 '../internals/uid': 117,
-1 7262 '../internals/well-known-symbol': 118
-1 7263 } ],
-1 7264 40: [ function(_dereq_, module, exports) {
-1 7265 'use strict';
-1 7266 var global = _dereq_('../internals/global');
-1 7267 var DESCRIPTORS = _dereq_('../internals/descriptors');
-1 7268 var NATIVE_ARRAY_BUFFER = _dereq_('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER;
-1 7269 var hide = _dereq_('../internals/hide');
-1 7270 var redefineAll = _dereq_('../internals/redefine-all');
-1 7271 var fails = _dereq_('../internals/fails');
-1 7272 var anInstance = _dereq_('../internals/an-instance');
-1 7273 var toInteger = _dereq_('../internals/to-integer');
-1 7274 var toLength = _dereq_('../internals/to-length');
-1 7275 var toIndex = _dereq_('../internals/to-index');
-1 7276 var getOwnPropertyNames = _dereq_('../internals/object-get-own-property-names').f;
-1 7277 var defineProperty = _dereq_('../internals/object-define-property').f;
-1 7278 var arrayFill = _dereq_('../internals/array-fill');
-1 7279 var setToStringTag = _dereq_('../internals/set-to-string-tag');
-1 7280 var InternalStateModule = _dereq_('../internals/internal-state');
-1 7281 var getInternalState = InternalStateModule.get;
-1 7282 var setInternalState = InternalStateModule.set;
-1 7283 var ARRAY_BUFFER = 'ArrayBuffer';
-1 7284 var DATA_VIEW = 'DataView';
-1 7285 var PROTOTYPE = 'prototype';
-1 7286 var WRONG_LENGTH = 'Wrong length';
-1 7287 var WRONG_INDEX = 'Wrong index';
-1 7288 var NativeArrayBuffer = global[ARRAY_BUFFER];
-1 7289 var $ArrayBuffer = NativeArrayBuffer;
-1 7290 var $DataView = global[DATA_VIEW];
-1 7291 var Math = global.Math;
-1 7292 var RangeError = global.RangeError;
-1 7293 var Infinity = 1 / 0;
-1 7294 var abs = Math.abs;
-1 7295 var pow = Math.pow;
-1 7296 var floor = Math.floor;
-1 7297 var log = Math.log;
-1 7298 var LN2 = Math.LN2;
-1 7299 var packIEEE754 = function(number, mantissaLength, bytes) {
-1 7300 var buffer = new Array(bytes);
-1 7301 var exponentLength = bytes * 8 - mantissaLength - 1;
-1 7302 var eMax = (1 << exponentLength) - 1;
-1 7303 var eBias = eMax >> 1;
-1 7304 var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;
-1 7305 var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;
-1 7306 var index = 0;
-1 7307 var exponent, mantissa, c;
-1 7308 number = abs(number);
-1 7309 if (number != number || number === Infinity) {
-1 7310 mantissa = number != number ? 1 : 0;
-1 7311 exponent = eMax;
-1 7312 } else {
-1 7313 exponent = floor(log(number) / LN2);
-1 7314 if (number * (c = pow(2, -exponent)) < 1) {
-1 7315 exponent--;
-1 7316 c *= 2;
-1 7317 }
-1 7318 if (exponent + eBias >= 1) {
-1 7319 number += rt / c;
-1 7320 } else {
-1 7321 number += rt * pow(2, 1 - eBias);
-1 7322 }
-1 7323 if (number * c >= 2) {
-1 7324 exponent++;
-1 7325 c /= 2;
-1 7326 }
-1 7327 if (exponent + eBias >= eMax) {
-1 7328 mantissa = 0;
-1 7329 exponent = eMax;
-1 7330 } else if (exponent + eBias >= 1) {
-1 7331 mantissa = (number * c - 1) * pow(2, mantissaLength);
-1 7332 exponent = exponent + eBias;
-1 7333 } else {
-1 7334 mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);
-1 7335 exponent = 0;
-1 7336 }
-1 7337 }
-1 7338 for (;mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8) {}
-1 7339 exponent = exponent << mantissaLength | mantissa;
-1 7340 exponentLength += mantissaLength;
-1 7341 for (;exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8) {}
-1 7342 buffer[--index] |= sign * 128;
-1 7343 return buffer;
6814 7344 };
6815 -1 var singleQuoteEscapeChars = {
6816 -1 n: '\n',
6817 -1 r: '\r',
6818 -1 t: '\t',
6819 -1 f: '\f',
6820 -1 '\\': '\\',
6821 -1 '\'': '\''
-1 7345 var unpackIEEE754 = function(buffer, mantissaLength) {
-1 7346 var bytes = buffer.length;
-1 7347 var exponentLength = bytes * 8 - mantissaLength - 1;
-1 7348 var eMax = (1 << exponentLength) - 1;
-1 7349 var eBias = eMax >> 1;
-1 7350 var nBits = exponentLength - 7;
-1 7351 var index = bytes - 1;
-1 7352 var sign = buffer[index--];
-1 7353 var exponent = sign & 127;
-1 7354 var mantissa;
-1 7355 sign >>= 7;
-1 7356 for (;nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8) {}
-1 7357 mantissa = exponent & (1 << -nBits) - 1;
-1 7358 exponent >>= -nBits;
-1 7359 nBits += mantissaLength;
-1 7360 for (;nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8) {}
-1 7361 if (exponent === 0) {
-1 7362 exponent = 1 - eBias;
-1 7363 } else if (exponent === eMax) {
-1 7364 return mantissa ? NaN : sign ? -Infinity : Infinity;
-1 7365 } else {
-1 7366 mantissa = mantissa + pow(2, mantissaLength);
-1 7367 exponent = exponent - eBias;
-1 7368 }
-1 7369 return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
6822 7370 };
6823 -1 var doubleQuotesEscapeChars = {
6824 -1 n: '\n',
6825 -1 r: '\r',
6826 -1 t: '\t',
6827 -1 f: '\f',
6828 -1 '\\': '\\',
6829 -1 '"': '"'
-1 7371 var unpackInt32 = function(buffer) {
-1 7372 return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];
6830 7373 };
6831 -1 function ParseContext(str, pos, pseudos, attrEqualityMods, ruleNestingOperators, substitutesEnabled) {
6832 -1 var chr, getIdent, getStr, l, skipWhitespace;
6833 -1 l = str.length;
6834 -1 chr = null;
6835 -1 getStr = function(quote, escapeTable) {
6836 -1 var esc, hex, result;
6837 -1 result = '';
6838 -1 pos++;
6839 -1 chr = str.charAt(pos);
6840 -1 while (pos < l) {
6841 -1 if (chr === quote) {
6842 -1 pos++;
6843 -1 return result;
6844 -1 } else if (chr === '\\') {
6845 -1 pos++;
6846 -1 chr = str.charAt(pos);
6847 -1 if (chr === quote) {
6848 -1 result += quote;
6849 -1 } else if (esc = escapeTable[chr]) {
6850 -1 result += esc;
6851 -1 } else if (isHex(chr)) {
6852 -1 hex = chr;
6853 -1 pos++;
6854 -1 chr = str.charAt(pos);
6855 -1 while (isHex(chr)) {
6856 -1 hex += chr;
6857 -1 pos++;
6858 -1 chr = str.charAt(pos);
6859 -1 }
6860 -1 if (chr === ' ') {
6861 -1 pos++;
6862 -1 chr = str.charAt(pos);
6863 -1 }
6864 -1 result += String.fromCharCode(parseInt(hex, 16));
6865 -1 continue;
6866 -1 } else {
6867 -1 result += chr;
6868 -1 }
6869 -1 } else {
6870 -1 result += chr;
6871 -1 }
6872 -1 pos++;
6873 -1 chr = str.charAt(pos);
-1 7374 var packInt8 = function(number) {
-1 7375 return [ number & 255 ];
-1 7376 };
-1 7377 var packInt16 = function(number) {
-1 7378 return [ number & 255, number >> 8 & 255 ];
-1 7379 };
-1 7380 var packInt32 = function(number) {
-1 7381 return [ number & 255, number >> 8 & 255, number >> 16 & 255, number >> 24 & 255 ];
-1 7382 };
-1 7383 var packFloat32 = function(number) {
-1 7384 return packIEEE754(number, 23, 4);
-1 7385 };
-1 7386 var packFloat64 = function(number) {
-1 7387 return packIEEE754(number, 52, 8);
-1 7388 };
-1 7389 var addGetter = function(Constructor, key) {
-1 7390 defineProperty(Constructor[PROTOTYPE], key, {
-1 7391 get: function() {
-1 7392 return getInternalState(this)[key];
6874 7393 }
6875 -1 return result;
6876 -1 };
6877 -1 getIdent = function() {
6878 -1 var result = '';
6879 -1 chr = str.charAt(pos);
6880 -1 while (pos < l) {
6881 -1 if (isIdent(chr)) {
6882 -1 result += chr;
6883 -1 } else if (chr === '\\') {
6884 -1 pos++;
6885 -1 if (pos >= l) {
6886 -1 throw Error('Expected symbol but end of file reached.');
6887 -1 }
6888 -1 chr = str.charAt(pos);
6889 -1 if (identSpecialChars[chr]) {
6890 -1 result += chr;
6891 -1 } else if (isHex(chr)) {
6892 -1 var hex = chr;
6893 -1 pos++;
6894 -1 chr = str.charAt(pos);
6895 -1 while (isHex(chr)) {
6896 -1 hex += chr;
6897 -1 pos++;
6898 -1 chr = str.charAt(pos);
6899 -1 }
6900 -1 if (chr === ' ') {
6901 -1 pos++;
6902 -1 chr = str.charAt(pos);
6903 -1 }
6904 -1 result += String.fromCharCode(parseInt(hex, 16));
6905 -1 continue;
6906 -1 } else {
6907 -1 result += chr;
6908 -1 }
6909 -1 } else {
6910 -1 return result;
6911 -1 }
6912 -1 pos++;
6913 -1 chr = str.charAt(pos);
-1 7394 });
-1 7395 };
-1 7396 var get = function(view, count, index, isLittleEndian) {
-1 7397 var numIndex = +index;
-1 7398 var intIndex = toIndex(numIndex);
-1 7399 var store = getInternalState(view);
-1 7400 if (intIndex + count > store.byteLength) {
-1 7401 throw RangeError(WRONG_INDEX);
-1 7402 }
-1 7403 var bytes = getInternalState(store.buffer).bytes;
-1 7404 var start = intIndex + store.byteOffset;
-1 7405 var pack = bytes.slice(start, start + count);
-1 7406 return isLittleEndian ? pack : pack.reverse();
-1 7407 };
-1 7408 var set = function(view, count, index, conversion, value, isLittleEndian) {
-1 7409 var numIndex = +index;
-1 7410 var intIndex = toIndex(numIndex);
-1 7411 var store = getInternalState(view);
-1 7412 if (intIndex + count > store.byteLength) {
-1 7413 throw RangeError(WRONG_INDEX);
-1 7414 }
-1 7415 var bytes = getInternalState(store.buffer).bytes;
-1 7416 var start = intIndex + store.byteOffset;
-1 7417 var pack = conversion(+value);
-1 7418 for (var i = 0; i < count; i++) {
-1 7419 bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];
-1 7420 }
-1 7421 };
-1 7422 if (!NATIVE_ARRAY_BUFFER) {
-1 7423 $ArrayBuffer = function ArrayBuffer(length) {
-1 7424 anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
-1 7425 var byteLength = toIndex(length);
-1 7426 setInternalState(this, {
-1 7427 bytes: arrayFill.call(new Array(byteLength), 0),
-1 7428 byteLength: byteLength
-1 7429 });
-1 7430 if (!DESCRIPTORS) {
-1 7431 this.byteLength = byteLength;
6914 7432 }
6915 -1 return result;
6916 7433 };
6917 -1 skipWhitespace = function() {
6918 -1 chr = str.charAt(pos);
6919 -1 var result = false;
6920 -1 while (chr === ' ' || chr === '\t' || chr === '\n' || chr === '\r' || chr === '\f') {
6921 -1 result = true;
6922 -1 pos++;
6923 -1 chr = str.charAt(pos);
-1 7434 $DataView = function DataView(buffer, byteOffset, byteLength) {
-1 7435 anInstance(this, $DataView, DATA_VIEW);
-1 7436 anInstance(buffer, $ArrayBuffer, DATA_VIEW);
-1 7437 var bufferLength = getInternalState(buffer).byteLength;
-1 7438 var offset = toInteger(byteOffset);
-1 7439 if (offset < 0 || offset > bufferLength) {
-1 7440 throw RangeError('Wrong offset');
-1 7441 }
-1 7442 byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
-1 7443 if (offset + byteLength > bufferLength) {
-1 7444 throw RangeError(WRONG_LENGTH);
-1 7445 }
-1 7446 setInternalState(this, {
-1 7447 buffer: buffer,
-1 7448 byteLength: byteLength,
-1 7449 byteOffset: offset
-1 7450 });
-1 7451 if (!DESCRIPTORS) {
-1 7452 this.buffer = buffer;
-1 7453 this.byteLength = byteLength;
-1 7454 this.byteOffset = offset;
6924 7455 }
6925 -1 return result;
6926 7456 };
6927 -1 this.parse = function() {
6928 -1 var res = this.parseSelector();
6929 -1 if (pos < l) {
6930 -1 throw Error('Rule expected but "' + str.charAt(pos) + '" found.');
-1 7457 if (DESCRIPTORS) {
-1 7458 addGetter($ArrayBuffer, 'byteLength');
-1 7459 addGetter($DataView, 'buffer');
-1 7460 addGetter($DataView, 'byteLength');
-1 7461 addGetter($DataView, 'byteOffset');
-1 7462 }
-1 7463 redefineAll($DataView[PROTOTYPE], {
-1 7464 getInt8: function getInt8(byteOffset) {
-1 7465 return get(this, 1, byteOffset)[0] << 24 >> 24;
-1 7466 },
-1 7467 getUint8: function getUint8(byteOffset) {
-1 7468 return get(this, 1, byteOffset)[0];
-1 7469 },
-1 7470 getInt16: function getInt16(byteOffset) {
-1 7471 var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
-1 7472 return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
-1 7473 },
-1 7474 getUint16: function getUint16(byteOffset) {
-1 7475 var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
-1 7476 return bytes[1] << 8 | bytes[0];
-1 7477 },
-1 7478 getInt32: function getInt32(byteOffset) {
-1 7479 return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));
-1 7480 },
-1 7481 getUint32: function getUint32(byteOffset) {
-1 7482 return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;
-1 7483 },
-1 7484 getFloat32: function getFloat32(byteOffset) {
-1 7485 return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);
-1 7486 },
-1 7487 getFloat64: function getFloat64(byteOffset) {
-1 7488 return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);
-1 7489 },
-1 7490 setInt8: function setInt8(byteOffset, value) {
-1 7491 set(this, 1, byteOffset, packInt8, value);
-1 7492 },
-1 7493 setUint8: function setUint8(byteOffset, value) {
-1 7494 set(this, 1, byteOffset, packInt8, value);
-1 7495 },
-1 7496 setInt16: function setInt16(byteOffset, value) {
-1 7497 set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
-1 7498 },
-1 7499 setUint16: function setUint16(byteOffset, value) {
-1 7500 set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
-1 7501 },
-1 7502 setInt32: function setInt32(byteOffset, value) {
-1 7503 set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
-1 7504 },
-1 7505 setUint32: function setUint32(byteOffset, value) {
-1 7506 set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
-1 7507 },
-1 7508 setFloat32: function setFloat32(byteOffset, value) {
-1 7509 set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);
-1 7510 },
-1 7511 setFloat64: function setFloat64(byteOffset, value) {
-1 7512 set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);
6931 7513 }
6932 -1 return res;
6933 -1 };
6934 -1 this.parseSelector = function() {
6935 -1 var res;
6936 -1 var selector = res = this.parseSingleSelector();
6937 -1 chr = str.charAt(pos);
6938 -1 while (chr === ',') {
6939 -1 pos++;
6940 -1 skipWhitespace();
6941 -1 if (res.type !== 'selectors') {
6942 -1 res = {
6943 -1 type: 'selectors',
6944 -1 selectors: [ selector ]
6945 -1 };
6946 -1 }
6947 -1 selector = this.parseSingleSelector();
6948 -1 if (!selector) {
6949 -1 throw Error('Rule expected after ",".');
6950 -1 }
6951 -1 res.selectors.push(selector);
6952 -1 }
6953 -1 return res;
6954 -1 };
6955 -1 this.parseSingleSelector = function() {
6956 -1 skipWhitespace();
6957 -1 var selector = {
6958 -1 type: 'ruleSet'
-1 7514 });
-1 7515 } else {
-1 7516 if (!fails(function() {
-1 7517 NativeArrayBuffer(1);
-1 7518 }) || !fails(function() {
-1 7519 new NativeArrayBuffer(-1);
-1 7520 }) || fails(function() {
-1 7521 new NativeArrayBuffer();
-1 7522 new NativeArrayBuffer(1.5);
-1 7523 new NativeArrayBuffer(NaN);
-1 7524 return NativeArrayBuffer.name != ARRAY_BUFFER;
-1 7525 })) {
-1 7526 $ArrayBuffer = function ArrayBuffer(length) {
-1 7527 anInstance(this, $ArrayBuffer);
-1 7528 return new NativeArrayBuffer(toIndex(length));
6959 7529 };
6960 -1 var rule = this.parseRule();
6961 -1 if (!rule) {
6962 -1 return null;
6963 -1 }
6964 -1 var currentRule = selector;
6965 -1 while (rule) {
6966 -1 rule.type = 'rule';
6967 -1 currentRule.rule = rule;
6968 -1 currentRule = rule;
6969 -1 skipWhitespace();
6970 -1 chr = str.charAt(pos);
6971 -1 if (pos >= l || chr === ',' || chr === ')') {
6972 -1 break;
-1 7530 var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];
-1 7531 for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j; ) {
-1 7532 if (!((key = keys[j++]) in $ArrayBuffer)) {
-1 7533 hide($ArrayBuffer, key, NativeArrayBuffer[key]);
-1 7534 }
-1 7535 }
-1 7536 ArrayBufferPrototype.constructor = $ArrayBuffer;
-1 7537 }
-1 7538 var testView = new $DataView(new $ArrayBuffer(2));
-1 7539 var nativeSetInt8 = $DataView[PROTOTYPE].setInt8;
-1 7540 testView.setInt8(0, 2147483648);
-1 7541 testView.setInt8(1, 2147483649);
-1 7542 if (testView.getInt8(0) || !testView.getInt8(1)) {
-1 7543 redefineAll($DataView[PROTOTYPE], {
-1 7544 setInt8: function setInt8(byteOffset, value) {
-1 7545 nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
-1 7546 },
-1 7547 setUint8: function setUint8(byteOffset, value) {
-1 7548 nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
6973 7549 }
6974 -1 if (ruleNestingOperators[chr]) {
6975 -1 var op = chr;
6976 -1 pos++;
6977 -1 skipWhitespace();
6978 -1 rule = this.parseRule();
6979 -1 if (!rule) {
6980 -1 throw Error('Rule expected after "' + op + '".');
-1 7550 }, {
-1 7551 unsafe: true
-1 7552 });
-1 7553 }
-1 7554 }
-1 7555 setToStringTag($ArrayBuffer, ARRAY_BUFFER);
-1 7556 setToStringTag($DataView, DATA_VIEW);
-1 7557 exports[ARRAY_BUFFER] = $ArrayBuffer;
-1 7558 exports[DATA_VIEW] = $DataView;
-1 7559 }, {
-1 7560 '../internals/an-instance': 37,
-1 7561 '../internals/array-buffer-view-core': 39,
-1 7562 '../internals/array-fill': 42,
-1 7563 '../internals/descriptors': 57,
-1 7564 '../internals/fails': 61,
-1 7565 '../internals/global': 65,
-1 7566 '../internals/hide': 68,
-1 7567 '../internals/internal-state': 72,
-1 7568 '../internals/object-define-property': 84,
-1 7569 '../internals/object-get-own-property-names': 86,
-1 7570 '../internals/redefine-all': 96,
-1 7571 '../internals/set-to-string-tag': 101,
-1 7572 '../internals/to-index': 107,
-1 7573 '../internals/to-integer': 109,
-1 7574 '../internals/to-length': 110
-1 7575 } ],
-1 7576 41: [ function(_dereq_, module, exports) {
-1 7577 'use strict';
-1 7578 var toObject = _dereq_('../internals/to-object');
-1 7579 var toAbsoluteIndex = _dereq_('../internals/to-absolute-index');
-1 7580 var toLength = _dereq_('../internals/to-length');
-1 7581 var min = Math.min;
-1 7582 module.exports = [].copyWithin || function copyWithin(target, start) {
-1 7583 var O = toObject(this);
-1 7584 var len = toLength(O.length);
-1 7585 var to = toAbsoluteIndex(target, len);
-1 7586 var from = toAbsoluteIndex(start, len);
-1 7587 var end = arguments.length > 2 ? arguments[2] : undefined;
-1 7588 var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
-1 7589 var inc = 1;
-1 7590 if (from < to && to < from + count) {
-1 7591 inc = -1;
-1 7592 from += count - 1;
-1 7593 to += count - 1;
-1 7594 }
-1 7595 while (count-- > 0) {
-1 7596 if (from in O) {
-1 7597 O[to] = O[from];
-1 7598 } else {
-1 7599 delete O[to];
-1 7600 }
-1 7601 to += inc;
-1 7602 from += inc;
-1 7603 }
-1 7604 return O;
-1 7605 };
-1 7606 }, {
-1 7607 '../internals/to-absolute-index': 106,
-1 7608 '../internals/to-length': 110,
-1 7609 '../internals/to-object': 111
-1 7610 } ],
-1 7611 42: [ function(_dereq_, module, exports) {
-1 7612 'use strict';
-1 7613 var toObject = _dereq_('../internals/to-object');
-1 7614 var toAbsoluteIndex = _dereq_('../internals/to-absolute-index');
-1 7615 var toLength = _dereq_('../internals/to-length');
-1 7616 module.exports = function fill(value) {
-1 7617 var O = toObject(this);
-1 7618 var length = toLength(O.length);
-1 7619 var argumentsLength = arguments.length;
-1 7620 var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
-1 7621 var end = argumentsLength > 2 ? arguments[2] : undefined;
-1 7622 var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
-1 7623 while (endPos > index) {
-1 7624 O[index++] = value;
-1 7625 }
-1 7626 return O;
-1 7627 };
-1 7628 }, {
-1 7629 '../internals/to-absolute-index': 106,
-1 7630 '../internals/to-length': 110,
-1 7631 '../internals/to-object': 111
-1 7632 } ],
-1 7633 43: [ function(_dereq_, module, exports) {
-1 7634 var toIndexedObject = _dereq_('../internals/to-indexed-object');
-1 7635 var toLength = _dereq_('../internals/to-length');
-1 7636 var toAbsoluteIndex = _dereq_('../internals/to-absolute-index');
-1 7637 var createMethod = function(IS_INCLUDES) {
-1 7638 return function($this, el, fromIndex) {
-1 7639 var O = toIndexedObject($this);
-1 7640 var length = toLength(O.length);
-1 7641 var index = toAbsoluteIndex(fromIndex, length);
-1 7642 var value;
-1 7643 if (IS_INCLUDES && el != el) {
-1 7644 while (length > index) {
-1 7645 value = O[index++];
-1 7646 if (value != value) {
-1 7647 return true;
6981 7648 }
6982 -1 rule.nestingOperator = op;
6983 -1 } else {
6984 -1 rule = this.parseRule();
6985 -1 if (rule) {
6986 -1 rule.nestingOperator = null;
-1 7649 }
-1 7650 } else {
-1 7651 for (;length > index; index++) {
-1 7652 if ((IS_INCLUDES || index in O) && O[index] === el) {
-1 7653 return IS_INCLUDES || index || 0;
6987 7654 }
6988 7655 }
6989 7656 }
6990 -1 return selector;
-1 7657 return !IS_INCLUDES && -1;
6991 7658 };
6992 -1 this.parseRule = function() {
6993 -1 var rule = null;
6994 -1 while (pos < l) {
6995 -1 chr = str.charAt(pos);
6996 -1 if (chr === '*') {
6997 -1 pos++;
6998 -1 (rule = rule || {}).tagName = '*';
6999 -1 } else if (isIdentStart(chr) || chr === '\\') {
7000 -1 (rule = rule || {}).tagName = getIdent();
7001 -1 } else if (chr === '.') {
7002 -1 pos++;
7003 -1 rule = rule || {};
7004 -1 (rule.classNames = rule.classNames || []).push(getIdent());
7005 -1 } else if (chr === '#') {
7006 -1 pos++;
7007 -1 (rule = rule || {}).id = getIdent();
7008 -1 } else if (chr === '[') {
7009 -1 pos++;
7010 -1 skipWhitespace();
7011 -1 var attr = {
7012 -1 name: getIdent()
7013 -1 };
7014 -1 skipWhitespace();
7015 -1 if (chr === ']') {
7016 -1 pos++;
7017 -1 } else {
7018 -1 var operator = '';
7019 -1 if (attrEqualityMods[chr]) {
7020 -1 operator = chr;
7021 -1 pos++;
7022 -1 chr = str.charAt(pos);
7023 -1 }
7024 -1 if (pos >= l) {
7025 -1 throw Error('Expected "=" but end of file reached.');
7026 -1 }
7027 -1 if (chr !== '=') {
7028 -1 throw Error('Expected "=" but "' + chr + '" found.');
7029 -1 }
7030 -1 attr.operator = operator + '=';
7031 -1 pos++;
7032 -1 skipWhitespace();
7033 -1 var attrValue = '';
7034 -1 attr.valueType = 'string';
7035 -1 if (chr === '"') {
7036 -1 attrValue = getStr('"', doubleQuotesEscapeChars);
7037 -1 } else if (chr === '\'') {
7038 -1 attrValue = getStr('\'', singleQuoteEscapeChars);
7039 -1 } else if (substitutesEnabled && chr === '$') {
7040 -1 pos++;
7041 -1 attrValue = getIdent();
7042 -1 attr.valueType = 'substitute';
7043 -1 } else {
7044 -1 while (pos < l) {
7045 -1 if (chr === ']') {
7046 -1 break;
7047 -1 }
7048 -1 attrValue += chr;
7049 -1 pos++;
7050 -1 chr = str.charAt(pos);
7051 -1 }
7052 -1 attrValue = attrValue.trim();
7053 -1 }
7054 -1 skipWhitespace();
7055 -1 if (pos >= l) {
7056 -1 throw Error('Expected "]" but end of file reached.');
7057 -1 }
7058 -1 if (chr !== ']') {
7059 -1 throw Error('Expected "]" but "' + chr + '" found.');
7060 -1 }
7061 -1 pos++;
7062 -1 attr.value = attrValue;
7063 -1 }
7064 -1 rule = rule || {};
7065 -1 (rule.attrs = rule.attrs || []).push(attr);
7066 -1 } else if (chr === ':') {
7067 -1 pos++;
7068 -1 var pseudoName = getIdent();
7069 -1 var pseudo = {
7070 -1 name: pseudoName
7071 -1 };
7072 -1 if (chr === '(') {
7073 -1 pos++;
7074 -1 var value = '';
7075 -1 skipWhitespace();
7076 -1 if (pseudos[pseudoName] === 'selector') {
7077 -1 pseudo.valueType = 'selector';
7078 -1 value = this.parseSelector();
7079 -1 } else {
7080 -1 pseudo.valueType = pseudos[pseudoName] || 'string';
7081 -1 if (chr === '"') {
7082 -1 value = getStr('"', doubleQuotesEscapeChars);
7083 -1 } else if (chr === '\'') {
7084 -1 value = getStr('\'', singleQuoteEscapeChars);
7085 -1 } else if (substitutesEnabled && chr === '$') {
7086 -1 pos++;
7087 -1 value = getIdent();
7088 -1 pseudo.valueType = 'substitute';
7089 -1 } else {
7090 -1 while (pos < l) {
7091 -1 if (chr === ')') {
7092 -1 break;
7093 -1 }
7094 -1 value += chr;
7095 -1 pos++;
7096 -1 chr = str.charAt(pos);
7097 -1 }
7098 -1 value = value.trim();
-1 7659 };
-1 7660 module.exports = {
-1 7661 includes: createMethod(true),
-1 7662 indexOf: createMethod(false)
-1 7663 };
-1 7664 }, {
-1 7665 '../internals/to-absolute-index': 106,
-1 7666 '../internals/to-indexed-object': 108,
-1 7667 '../internals/to-length': 110
-1 7668 } ],
-1 7669 44: [ function(_dereq_, module, exports) {
-1 7670 var bind = _dereq_('../internals/bind-context');
-1 7671 var IndexedObject = _dereq_('../internals/indexed-object');
-1 7672 var toObject = _dereq_('../internals/to-object');
-1 7673 var toLength = _dereq_('../internals/to-length');
-1 7674 var arraySpeciesCreate = _dereq_('../internals/array-species-create');
-1 7675 var push = [].push;
-1 7676 var createMethod = function(TYPE) {
-1 7677 var IS_MAP = TYPE == 1;
-1 7678 var IS_FILTER = TYPE == 2;
-1 7679 var IS_SOME = TYPE == 3;
-1 7680 var IS_EVERY = TYPE == 4;
-1 7681 var IS_FIND_INDEX = TYPE == 6;
-1 7682 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
-1 7683 return function($this, callbackfn, that, specificCreate) {
-1 7684 var O = toObject($this);
-1 7685 var self = IndexedObject(O);
-1 7686 var boundFunction = bind(callbackfn, that, 3);
-1 7687 var length = toLength(self.length);
-1 7688 var index = 0;
-1 7689 var create = specificCreate || arraySpeciesCreate;
-1 7690 var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
-1 7691 var value, result;
-1 7692 for (;length > index; index++) {
-1 7693 if (NO_HOLES || index in self) {
-1 7694 value = self[index];
-1 7695 result = boundFunction(value, index, O);
-1 7696 if (TYPE) {
-1 7697 if (IS_MAP) {
-1 7698 target[index] = result;
-1 7699 } else if (result) {
-1 7700 switch (TYPE) {
-1 7701 case 3:
-1 7702 return true;
-1 7703
-1 7704 case 5:
-1 7705 return value;
-1 7706
-1 7707 case 6:
-1 7708 return index;
-1 7709
-1 7710 case 2:
-1 7711 push.call(target, value);
7099 7712 }
7100 -1 skipWhitespace();
7101 -1 }
7102 -1 if (pos >= l) {
7103 -1 throw Error('Expected ")" but end of file reached.');
-1 7713 } else if (IS_EVERY) {
-1 7714 return false;
7104 7715 }
7105 -1 if (chr !== ')') {
7106 -1 throw Error('Expected ")" but "' + chr + '" found.');
7107 -1 }
7108 -1 pos++;
7109 -1 pseudo.value = value;
7110 7716 }
7111 -1 rule = rule || {};
7112 -1 (rule.pseudos = rule.pseudos || []).push(pseudo);
7113 -1 } else {
7114 -1 break;
7115 7717 }
7116 7718 }
7117 -1 return rule;
-1 7719 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
7118 7720 };
7119 -1 return this;
7120 -1 }
7121 -1 CssSelectorParser.prototype.parse = function(str) {
7122 -1 var context = new ParseContext(str, 0, this.pseudos, this.attrEqualityMods, this.ruleNestingOperators, this.substitutesEnabled);
7123 -1 return context.parse();
7124 7721 };
7125 -1 CssSelectorParser.prototype.escapeIdentifier = function(s) {
7126 -1 var result = '';
7127 -1 var i = 0;
7128 -1 var len = s.length;
7129 -1 while (i < len) {
7130 -1 var chr = s.charAt(i);
7131 -1 if (identSpecialChars[chr]) {
7132 -1 result += '\\' + chr;
7133 -1 } else {
7134 -1 if (!(chr === '_' || chr === '-' || chr >= 'A' && chr <= 'Z' || chr >= 'a' && chr <= 'z' || i !== 0 && chr >= '0' && chr <= '9')) {
7135 -1 var charCode = chr.charCodeAt(0);
7136 -1 if ((charCode & 63488) === 55296) {
7137 -1 var extraCharCode = s.charCodeAt(i++);
7138 -1 if ((charCode & 64512) !== 55296 || (extraCharCode & 64512) !== 56320) {
7139 -1 throw Error('UCS-2(decode): illegal sequence');
7140 -1 }
7141 -1 charCode = ((charCode & 1023) << 10) + (extraCharCode & 1023) + 65536;
-1 7722 module.exports = {
-1 7723 forEach: createMethod(0),
-1 7724 map: createMethod(1),
-1 7725 filter: createMethod(2),
-1 7726 some: createMethod(3),
-1 7727 every: createMethod(4),
-1 7728 find: createMethod(5),
-1 7729 findIndex: createMethod(6)
-1 7730 };
-1 7731 }, {
-1 7732 '../internals/array-species-create': 47,
-1 7733 '../internals/bind-context': 48,
-1 7734 '../internals/indexed-object': 71,
-1 7735 '../internals/to-length': 110,
-1 7736 '../internals/to-object': 111
-1 7737 } ],
-1 7738 45: [ function(_dereq_, module, exports) {
-1 7739 'use strict';
-1 7740 var toIndexedObject = _dereq_('../internals/to-indexed-object');
-1 7741 var toInteger = _dereq_('../internals/to-integer');
-1 7742 var toLength = _dereq_('../internals/to-length');
-1 7743 var sloppyArrayMethod = _dereq_('../internals/sloppy-array-method');
-1 7744 var min = Math.min;
-1 7745 var nativeLastIndexOf = [].lastIndexOf;
-1 7746 var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [ 1 ].lastIndexOf(1, -0) < 0;
-1 7747 var SLOPPY_METHOD = sloppyArrayMethod('lastIndexOf');
-1 7748 module.exports = NEGATIVE_ZERO || SLOPPY_METHOD ? function lastIndexOf(searchElement) {
-1 7749 if (NEGATIVE_ZERO) {
-1 7750 return nativeLastIndexOf.apply(this, arguments) || 0;
-1 7751 }
-1 7752 var O = toIndexedObject(this);
-1 7753 var length = toLength(O.length);
-1 7754 var index = length - 1;
-1 7755 if (arguments.length > 1) {
-1 7756 index = min(index, toInteger(arguments[1]));
-1 7757 }
-1 7758 if (index < 0) {
-1 7759 index = length + index;
-1 7760 }
-1 7761 for (;index >= 0; index--) {
-1 7762 if (index in O && O[index] === searchElement) {
-1 7763 return index || 0;
-1 7764 }
-1 7765 }
-1 7766 return -1;
-1 7767 } : nativeLastIndexOf;
-1 7768 }, {
-1 7769 '../internals/sloppy-array-method': 104,
-1 7770 '../internals/to-indexed-object': 108,
-1 7771 '../internals/to-integer': 109,
-1 7772 '../internals/to-length': 110
-1 7773 } ],
-1 7774 46: [ function(_dereq_, module, exports) {
-1 7775 var aFunction = _dereq_('../internals/a-function');
-1 7776 var toObject = _dereq_('../internals/to-object');
-1 7777 var IndexedObject = _dereq_('../internals/indexed-object');
-1 7778 var toLength = _dereq_('../internals/to-length');
-1 7779 var createMethod = function(IS_RIGHT) {
-1 7780 return function(that, callbackfn, argumentsLength, memo) {
-1 7781 aFunction(callbackfn);
-1 7782 var O = toObject(that);
-1 7783 var self = IndexedObject(O);
-1 7784 var length = toLength(O.length);
-1 7785 var index = IS_RIGHT ? length - 1 : 0;
-1 7786 var i = IS_RIGHT ? -1 : 1;
-1 7787 if (argumentsLength < 2) {
-1 7788 while (true) {
-1 7789 if (index in self) {
-1 7790 memo = self[index];
-1 7791 index += i;
-1 7792 break;
-1 7793 }
-1 7794 index += i;
-1 7795 if (IS_RIGHT ? index < 0 : length <= index) {
-1 7796 throw TypeError('Reduce of empty array with no initial value');
7142 7797 }
7143 -1 result += '\\' + charCode.toString(16) + ' ';
7144 -1 } else {
7145 -1 result += chr;
7146 7798 }
7147 7799 }
7148 -1 i++;
7149 -1 }
7150 -1 return result;
7151 -1 };
7152 -1 CssSelectorParser.prototype.escapeStr = function(s) {
7153 -1 var result = '';
7154 -1 var i = 0;
7155 -1 var len = s.length;
7156 -1 var chr, replacement;
7157 -1 while (i < len) {
7158 -1 chr = s.charAt(i);
7159 -1 if (chr === '"') {
7160 -1 chr = '\\"';
7161 -1 } else if (chr === '\\') {
7162 -1 chr = '\\\\';
7163 -1 } else if (replacement = strReplacementsRev[chr]) {
7164 -1 chr = replacement;
-1 7800 for (;IS_RIGHT ? index >= 0 : length > index; index += i) {
-1 7801 if (index in self) {
-1 7802 memo = callbackfn(memo, self[index], index, O);
-1 7803 }
7165 7804 }
7166 -1 result += chr;
7167 -1 i++;
-1 7805 return memo;
-1 7806 };
-1 7807 };
-1 7808 module.exports = {
-1 7809 left: createMethod(false),
-1 7810 right: createMethod(true)
-1 7811 };
-1 7812 }, {
-1 7813 '../internals/a-function': 34,
-1 7814 '../internals/indexed-object': 71,
-1 7815 '../internals/to-length': 110,
-1 7816 '../internals/to-object': 111
-1 7817 } ],
-1 7818 47: [ function(_dereq_, module, exports) {
-1 7819 var isObject = _dereq_('../internals/is-object');
-1 7820 var isArray = _dereq_('../internals/is-array');
-1 7821 var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
-1 7822 var SPECIES = wellKnownSymbol('species');
-1 7823 module.exports = function(originalArray, length) {
-1 7824 var C;
-1 7825 if (isArray(originalArray)) {
-1 7826 C = originalArray.constructor;
-1 7827 if (typeof C == 'function' && (C === Array || isArray(C.prototype))) {
-1 7828 C = undefined;
-1 7829 } else if (isObject(C)) {
-1 7830 C = C[SPECIES];
-1 7831 if (C === null) {
-1 7832 C = undefined;
-1 7833 }
-1 7834 }
-1 7835 }
-1 7836 return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
-1 7837 };
-1 7838 }, {
-1 7839 '../internals/is-array': 74,
-1 7840 '../internals/is-object': 76,
-1 7841 '../internals/well-known-symbol': 118
-1 7842 } ],
-1 7843 48: [ function(_dereq_, module, exports) {
-1 7844 var aFunction = _dereq_('../internals/a-function');
-1 7845 module.exports = function(fn, that, length) {
-1 7846 aFunction(fn);
-1 7847 if (that === undefined) {
-1 7848 return fn;
-1 7849 }
-1 7850 switch (length) {
-1 7851 case 0:
-1 7852 return function() {
-1 7853 return fn.call(that);
-1 7854 };
-1 7855
-1 7856 case 1:
-1 7857 return function(a) {
-1 7858 return fn.call(that, a);
-1 7859 };
-1 7860
-1 7861 case 2:
-1 7862 return function(a, b) {
-1 7863 return fn.call(that, a, b);
-1 7864 };
-1 7865
-1 7866 case 3:
-1 7867 return function(a, b, c) {
-1 7868 return fn.call(that, a, b, c);
-1 7869 };
7168 7870 }
7169 -1 return '"' + result + '"';
-1 7871 return function() {
-1 7872 return fn.apply(that, arguments);
-1 7873 };
7170 7874 };
7171 -1 CssSelectorParser.prototype.render = function(path) {
7172 -1 return this._renderEntity(path).trim();
-1 7875 }, {
-1 7876 '../internals/a-function': 34
-1 7877 } ],
-1 7878 49: [ function(_dereq_, module, exports) {
-1 7879 var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
-1 7880 var ITERATOR = wellKnownSymbol('iterator');
-1 7881 var SAFE_CLOSING = false;
-1 7882 try {
-1 7883 var called = 0;
-1 7884 var iteratorWithReturn = {
-1 7885 next: function() {
-1 7886 return {
-1 7887 done: !!called++
-1 7888 };
-1 7889 },
-1 7890 return: function() {
-1 7891 SAFE_CLOSING = true;
-1 7892 }
-1 7893 };
-1 7894 iteratorWithReturn[ITERATOR] = function() {
-1 7895 return this;
-1 7896 };
-1 7897 Array.from(iteratorWithReturn, function() {
-1 7898 throw 2;
-1 7899 });
-1 7900 } catch (error) {}
-1 7901 module.exports = function(exec, SKIP_CLOSING) {
-1 7902 if (!SKIP_CLOSING && !SAFE_CLOSING) {
-1 7903 return false;
-1 7904 }
-1 7905 var ITERATION_SUPPORT = false;
-1 7906 try {
-1 7907 var object = {};
-1 7908 object[ITERATOR] = function() {
-1 7909 return {
-1 7910 next: function() {
-1 7911 return {
-1 7912 done: ITERATION_SUPPORT = true
-1 7913 };
-1 7914 }
-1 7915 };
-1 7916 };
-1 7917 exec(object);
-1 7918 } catch (error) {}
-1 7919 return ITERATION_SUPPORT;
7173 7920 };
7174 -1 CssSelectorParser.prototype._renderEntity = function(entity) {
7175 -1 var currentEntity, parts, res;
7176 -1 res = '';
7177 -1 switch (entity.type) {
7178 -1 case 'ruleSet':
7179 -1 currentEntity = entity.rule;
7180 -1 parts = [];
7181 -1 while (currentEntity) {
7182 -1 if (currentEntity.nestingOperator) {
7183 -1 parts.push(currentEntity.nestingOperator);
-1 7921 }, {
-1 7922 '../internals/well-known-symbol': 118
-1 7923 } ],
-1 7924 50: [ function(_dereq_, module, exports) {
-1 7925 var toString = {}.toString;
-1 7926 module.exports = function(it) {
-1 7927 return toString.call(it).slice(8, -1);
-1 7928 };
-1 7929 }, {} ],
-1 7930 51: [ function(_dereq_, module, exports) {
-1 7931 var classofRaw = _dereq_('../internals/classof-raw');
-1 7932 var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
-1 7933 var TO_STRING_TAG = wellKnownSymbol('toStringTag');
-1 7934 var CORRECT_ARGUMENTS = classofRaw(function() {
-1 7935 return arguments;
-1 7936 }()) == 'Arguments';
-1 7937 var tryGet = function(it, key) {
-1 7938 try {
-1 7939 return it[key];
-1 7940 } catch (error) {}
-1 7941 };
-1 7942 module.exports = function(it) {
-1 7943 var O, tag, result;
-1 7944 return it === undefined ? 'Undefined' : it === null ? 'Null' : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
-1 7945 };
-1 7946 }, {
-1 7947 '../internals/classof-raw': 50,
-1 7948 '../internals/well-known-symbol': 118
-1 7949 } ],
-1 7950 52: [ function(_dereq_, module, exports) {
-1 7951 var has = _dereq_('../internals/has');
-1 7952 var ownKeys = _dereq_('../internals/own-keys');
-1 7953 var getOwnPropertyDescriptorModule = _dereq_('../internals/object-get-own-property-descriptor');
-1 7954 var definePropertyModule = _dereq_('../internals/object-define-property');
-1 7955 module.exports = function(target, source) {
-1 7956 var keys = ownKeys(source);
-1 7957 var defineProperty = definePropertyModule.f;
-1 7958 var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
-1 7959 for (var i = 0; i < keys.length; i++) {
-1 7960 var key = keys[i];
-1 7961 if (!has(target, key)) {
-1 7962 defineProperty(target, key, getOwnPropertyDescriptor(source, key));
-1 7963 }
-1 7964 }
-1 7965 };
-1 7966 }, {
-1 7967 '../internals/has': 66,
-1 7968 '../internals/object-define-property': 84,
-1 7969 '../internals/object-get-own-property-descriptor': 85,
-1 7970 '../internals/own-keys': 94
-1 7971 } ],
-1 7972 53: [ function(_dereq_, module, exports) {
-1 7973 var fails = _dereq_('../internals/fails');
-1 7974 module.exports = !fails(function() {
-1 7975 function F() {}
-1 7976 F.prototype.constructor = null;
-1 7977 return Object.getPrototypeOf(new F()) !== F.prototype;
-1 7978 });
-1 7979 }, {
-1 7980 '../internals/fails': 61
-1 7981 } ],
-1 7982 54: [ function(_dereq_, module, exports) {
-1 7983 'use strict';
-1 7984 var IteratorPrototype = _dereq_('../internals/iterators-core').IteratorPrototype;
-1 7985 var create = _dereq_('../internals/object-create');
-1 7986 var createPropertyDescriptor = _dereq_('../internals/create-property-descriptor');
-1 7987 var setToStringTag = _dereq_('../internals/set-to-string-tag');
-1 7988 var Iterators = _dereq_('../internals/iterators');
-1 7989 var returnThis = function() {
-1 7990 return this;
-1 7991 };
-1 7992 module.exports = function(IteratorConstructor, NAME, next) {
-1 7993 var TO_STRING_TAG = NAME + ' Iterator';
-1 7994 IteratorConstructor.prototype = create(IteratorPrototype, {
-1 7995 next: createPropertyDescriptor(1, next)
-1 7996 });
-1 7997 setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
-1 7998 Iterators[TO_STRING_TAG] = returnThis;
-1 7999 return IteratorConstructor;
-1 8000 };
-1 8001 }, {
-1 8002 '../internals/create-property-descriptor': 55,
-1 8003 '../internals/iterators': 79,
-1 8004 '../internals/iterators-core': 78,
-1 8005 '../internals/object-create': 82,
-1 8006 '../internals/set-to-string-tag': 101
-1 8007 } ],
-1 8008 55: [ function(_dereq_, module, exports) {
-1 8009 module.exports = function(bitmap, value) {
-1 8010 return {
-1 8011 enumerable: !(bitmap & 1),
-1 8012 configurable: !(bitmap & 2),
-1 8013 writable: !(bitmap & 4),
-1 8014 value: value
-1 8015 };
-1 8016 };
-1 8017 }, {} ],
-1 8018 56: [ function(_dereq_, module, exports) {
-1 8019 'use strict';
-1 8020 var $ = _dereq_('../internals/export');
-1 8021 var createIteratorConstructor = _dereq_('../internals/create-iterator-constructor');
-1 8022 var getPrototypeOf = _dereq_('../internals/object-get-prototype-of');
-1 8023 var setPrototypeOf = _dereq_('../internals/object-set-prototype-of');
-1 8024 var setToStringTag = _dereq_('../internals/set-to-string-tag');
-1 8025 var hide = _dereq_('../internals/hide');
-1 8026 var redefine = _dereq_('../internals/redefine');
-1 8027 var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
-1 8028 var IS_PURE = _dereq_('../internals/is-pure');
-1 8029 var Iterators = _dereq_('../internals/iterators');
-1 8030 var IteratorsCore = _dereq_('../internals/iterators-core');
-1 8031 var IteratorPrototype = IteratorsCore.IteratorPrototype;
-1 8032 var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
-1 8033 var ITERATOR = wellKnownSymbol('iterator');
-1 8034 var KEYS = 'keys';
-1 8035 var VALUES = 'values';
-1 8036 var ENTRIES = 'entries';
-1 8037 var returnThis = function() {
-1 8038 return this;
-1 8039 };
-1 8040 module.exports = function(Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
-1 8041 createIteratorConstructor(IteratorConstructor, NAME, next);
-1 8042 var getIterationMethod = function(KIND) {
-1 8043 if (KIND === DEFAULT && defaultIterator) {
-1 8044 return defaultIterator;
-1 8045 }
-1 8046 if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) {
-1 8047 return IterablePrototype[KIND];
-1 8048 }
-1 8049 switch (KIND) {
-1 8050 case KEYS:
-1 8051 return function keys() {
-1 8052 return new IteratorConstructor(this, KIND);
-1 8053 };
-1 8054
-1 8055 case VALUES:
-1 8056 return function values() {
-1 8057 return new IteratorConstructor(this, KIND);
-1 8058 };
-1 8059
-1 8060 case ENTRIES:
-1 8061 return function entries() {
-1 8062 return new IteratorConstructor(this, KIND);
-1 8063 };
-1 8064 }
-1 8065 return function() {
-1 8066 return new IteratorConstructor(this);
-1 8067 };
-1 8068 };
-1 8069 var TO_STRING_TAG = NAME + ' Iterator';
-1 8070 var INCORRECT_VALUES_NAME = false;
-1 8071 var IterablePrototype = Iterable.prototype;
-1 8072 var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT];
-1 8073 var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
-1 8074 var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
-1 8075 var CurrentIteratorPrototype, methods, KEY;
-1 8076 if (anyNativeIterator) {
-1 8077 CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
-1 8078 if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
-1 8079 if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
-1 8080 if (setPrototypeOf) {
-1 8081 setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
-1 8082 } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
-1 8083 hide(CurrentIteratorPrototype, ITERATOR, returnThis);
-1 8084 }
7184 8085 }
7185 -1 parts.push(this._renderEntity(currentEntity));
7186 -1 currentEntity = currentEntity.rule;
-1 8086 setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
-1 8087 if (IS_PURE) {
-1 8088 Iterators[TO_STRING_TAG] = returnThis;
-1 8089 }
-1 8090 }
-1 8091 }
-1 8092 if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
-1 8093 INCORRECT_VALUES_NAME = true;
-1 8094 defaultIterator = function values() {
-1 8095 return nativeIterator.call(this);
-1 8096 };
-1 8097 }
-1 8098 if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
-1 8099 hide(IterablePrototype, ITERATOR, defaultIterator);
-1 8100 }
-1 8101 Iterators[NAME] = defaultIterator;
-1 8102 if (DEFAULT) {
-1 8103 methods = {
-1 8104 values: getIterationMethod(VALUES),
-1 8105 keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
-1 8106 entries: getIterationMethod(ENTRIES)
-1 8107 };
-1 8108 if (FORCED) {
-1 8109 for (KEY in methods) {
-1 8110 if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
-1 8111 redefine(IterablePrototype, KEY, methods[KEY]);
-1 8112 }
-1 8113 }
-1 8114 } else {
-1 8115 $({
-1 8116 target: NAME,
-1 8117 proto: true,
-1 8118 forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME
-1 8119 }, methods);
-1 8120 }
-1 8121 }
-1 8122 return methods;
-1 8123 };
-1 8124 }, {
-1 8125 '../internals/create-iterator-constructor': 54,
-1 8126 '../internals/export': 60,
-1 8127 '../internals/hide': 68,
-1 8128 '../internals/is-pure': 77,
-1 8129 '../internals/iterators': 79,
-1 8130 '../internals/iterators-core': 78,
-1 8131 '../internals/object-get-prototype-of': 88,
-1 8132 '../internals/object-set-prototype-of': 92,
-1 8133 '../internals/redefine': 97,
-1 8134 '../internals/set-to-string-tag': 101,
-1 8135 '../internals/well-known-symbol': 118
-1 8136 } ],
-1 8137 57: [ function(_dereq_, module, exports) {
-1 8138 var fails = _dereq_('../internals/fails');
-1 8139 module.exports = !fails(function() {
-1 8140 return Object.defineProperty({}, 'a', {
-1 8141 get: function() {
-1 8142 return 7;
-1 8143 }
-1 8144 }).a != 7;
-1 8145 });
-1 8146 }, {
-1 8147 '../internals/fails': 61
-1 8148 } ],
-1 8149 58: [ function(_dereq_, module, exports) {
-1 8150 var global = _dereq_('../internals/global');
-1 8151 var isObject = _dereq_('../internals/is-object');
-1 8152 var document = global.document;
-1 8153 var EXISTS = isObject(document) && isObject(document.createElement);
-1 8154 module.exports = function(it) {
-1 8155 return EXISTS ? document.createElement(it) : {};
-1 8156 };
-1 8157 }, {
-1 8158 '../internals/global': 65,
-1 8159 '../internals/is-object': 76
-1 8160 } ],
-1 8161 59: [ function(_dereq_, module, exports) {
-1 8162 module.exports = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ];
-1 8163 }, {} ],
-1 8164 60: [ function(_dereq_, module, exports) {
-1 8165 var global = _dereq_('../internals/global');
-1 8166 var getOwnPropertyDescriptor = _dereq_('../internals/object-get-own-property-descriptor').f;
-1 8167 var hide = _dereq_('../internals/hide');
-1 8168 var redefine = _dereq_('../internals/redefine');
-1 8169 var setGlobal = _dereq_('../internals/set-global');
-1 8170 var copyConstructorProperties = _dereq_('../internals/copy-constructor-properties');
-1 8171 var isForced = _dereq_('../internals/is-forced');
-1 8172 module.exports = function(options, source) {
-1 8173 var TARGET = options.target;
-1 8174 var GLOBAL = options.global;
-1 8175 var STATIC = options.stat;
-1 8176 var FORCED, target, key, targetProperty, sourceProperty, descriptor;
-1 8177 if (GLOBAL) {
-1 8178 target = global;
-1 8179 } else if (STATIC) {
-1 8180 target = global[TARGET] || setGlobal(TARGET, {});
-1 8181 } else {
-1 8182 target = (global[TARGET] || {}).prototype;
-1 8183 }
-1 8184 if (target) {
-1 8185 for (key in source) {
-1 8186 sourceProperty = source[key];
-1 8187 if (options.noTargetGet) {
-1 8188 descriptor = getOwnPropertyDescriptor(target, key);
-1 8189 targetProperty = descriptor && descriptor.value;
-1 8190 } else {
-1 8191 targetProperty = target[key];
-1 8192 }
-1 8193 FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
-1 8194 if (!FORCED && targetProperty !== undefined) {
-1 8195 if (typeof sourceProperty === typeof targetProperty) {
-1 8196 continue;
-1 8197 }
-1 8198 copyConstructorProperties(sourceProperty, targetProperty);
-1 8199 }
-1 8200 if (options.sham || targetProperty && targetProperty.sham) {
-1 8201 hide(sourceProperty, 'sham', true);
-1 8202 }
-1 8203 redefine(target, key, sourceProperty, options);
-1 8204 }
-1 8205 }
-1 8206 };
-1 8207 }, {
-1 8208 '../internals/copy-constructor-properties': 52,
-1 8209 '../internals/global': 65,
-1 8210 '../internals/hide': 68,
-1 8211 '../internals/is-forced': 75,
-1 8212 '../internals/object-get-own-property-descriptor': 85,
-1 8213 '../internals/redefine': 97,
-1 8214 '../internals/set-global': 99
-1 8215 } ],
-1 8216 61: [ function(_dereq_, module, exports) {
-1 8217 module.exports = function(exec) {
-1 8218 try {
-1 8219 return !!exec();
-1 8220 } catch (error) {
-1 8221 return true;
-1 8222 }
-1 8223 };
-1 8224 }, {} ],
-1 8225 62: [ function(_dereq_, module, exports) {
-1 8226 var shared = _dereq_('../internals/shared');
-1 8227 module.exports = shared('native-function-to-string', Function.toString);
-1 8228 }, {
-1 8229 '../internals/shared': 103
-1 8230 } ],
-1 8231 63: [ function(_dereq_, module, exports) {
-1 8232 var path = _dereq_('../internals/path');
-1 8233 var global = _dereq_('../internals/global');
-1 8234 var aFunction = function(variable) {
-1 8235 return typeof variable == 'function' ? variable : undefined;
-1 8236 };
-1 8237 module.exports = function(namespace, method) {
-1 8238 return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace]) : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
-1 8239 };
-1 8240 }, {
-1 8241 '../internals/global': 65,
-1 8242 '../internals/path': 95
-1 8243 } ],
-1 8244 64: [ function(_dereq_, module, exports) {
-1 8245 var classof = _dereq_('../internals/classof');
-1 8246 var Iterators = _dereq_('../internals/iterators');
-1 8247 var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
-1 8248 var ITERATOR = wellKnownSymbol('iterator');
-1 8249 module.exports = function(it) {
-1 8250 if (it != undefined) {
-1 8251 return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)];
-1 8252 }
-1 8253 };
-1 8254 }, {
-1 8255 '../internals/classof': 51,
-1 8256 '../internals/iterators': 79,
-1 8257 '../internals/well-known-symbol': 118
-1 8258 } ],
-1 8259 65: [ function(_dereq_, module, exports) {
-1 8260 (function(global) {
-1 8261 var O = 'object';
-1 8262 var check = function(it) {
-1 8263 return it && it.Math == Math && it;
-1 8264 };
-1 8265 module.exports = check(typeof globalThis == O && globalThis) || check(typeof window == O && window) || check(typeof self == O && self) || check(typeof global == O && global) || Function('return this')();
-1 8266 }).call(this, typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {});
-1 8267 }, {} ],
-1 8268 66: [ function(_dereq_, module, exports) {
-1 8269 var hasOwnProperty = {}.hasOwnProperty;
-1 8270 module.exports = function(it, key) {
-1 8271 return hasOwnProperty.call(it, key);
-1 8272 };
-1 8273 }, {} ],
-1 8274 67: [ function(_dereq_, module, exports) {
-1 8275 module.exports = {};
-1 8276 }, {} ],
-1 8277 68: [ function(_dereq_, module, exports) {
-1 8278 var DESCRIPTORS = _dereq_('../internals/descriptors');
-1 8279 var definePropertyModule = _dereq_('../internals/object-define-property');
-1 8280 var createPropertyDescriptor = _dereq_('../internals/create-property-descriptor');
-1 8281 module.exports = DESCRIPTORS ? function(object, key, value) {
-1 8282 return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
-1 8283 } : function(object, key, value) {
-1 8284 object[key] = value;
-1 8285 return object;
-1 8286 };
-1 8287 }, {
-1 8288 '../internals/create-property-descriptor': 55,
-1 8289 '../internals/descriptors': 57,
-1 8290 '../internals/object-define-property': 84
-1 8291 } ],
-1 8292 69: [ function(_dereq_, module, exports) {
-1 8293 var getBuiltIn = _dereq_('../internals/get-built-in');
-1 8294 module.exports = getBuiltIn('document', 'documentElement');
-1 8295 }, {
-1 8296 '../internals/get-built-in': 63
-1 8297 } ],
-1 8298 70: [ function(_dereq_, module, exports) {
-1 8299 var DESCRIPTORS = _dereq_('../internals/descriptors');
-1 8300 var fails = _dereq_('../internals/fails');
-1 8301 var createElement = _dereq_('../internals/document-create-element');
-1 8302 module.exports = !DESCRIPTORS && !fails(function() {
-1 8303 return Object.defineProperty(createElement('div'), 'a', {
-1 8304 get: function() {
-1 8305 return 7;
-1 8306 }
-1 8307 }).a != 7;
-1 8308 });
-1 8309 }, {
-1 8310 '../internals/descriptors': 57,
-1 8311 '../internals/document-create-element': 58,
-1 8312 '../internals/fails': 61
-1 8313 } ],
-1 8314 71: [ function(_dereq_, module, exports) {
-1 8315 var fails = _dereq_('../internals/fails');
-1 8316 var classof = _dereq_('../internals/classof-raw');
-1 8317 var split = ''.split;
-1 8318 module.exports = fails(function() {
-1 8319 return !Object('z').propertyIsEnumerable(0);
-1 8320 }) ? function(it) {
-1 8321 return classof(it) == 'String' ? split.call(it, '') : Object(it);
-1 8322 } : Object;
-1 8323 }, {
-1 8324 '../internals/classof-raw': 50,
-1 8325 '../internals/fails': 61
-1 8326 } ],
-1 8327 72: [ function(_dereq_, module, exports) {
-1 8328 var NATIVE_WEAK_MAP = _dereq_('../internals/native-weak-map');
-1 8329 var global = _dereq_('../internals/global');
-1 8330 var isObject = _dereq_('../internals/is-object');
-1 8331 var hide = _dereq_('../internals/hide');
-1 8332 var objectHas = _dereq_('../internals/has');
-1 8333 var sharedKey = _dereq_('../internals/shared-key');
-1 8334 var hiddenKeys = _dereq_('../internals/hidden-keys');
-1 8335 var WeakMap = global.WeakMap;
-1 8336 var set, get, has;
-1 8337 var enforce = function(it) {
-1 8338 return has(it) ? get(it) : set(it, {});
-1 8339 };
-1 8340 var getterFor = function(TYPE) {
-1 8341 return function(it) {
-1 8342 var state;
-1 8343 if (!isObject(it) || (state = get(it)).type !== TYPE) {
-1 8344 throw TypeError('Incompatible receiver, ' + TYPE + ' required');
-1 8345 }
-1 8346 return state;
-1 8347 };
-1 8348 };
-1 8349 if (NATIVE_WEAK_MAP) {
-1 8350 var store = new WeakMap();
-1 8351 var wmget = store.get;
-1 8352 var wmhas = store.has;
-1 8353 var wmset = store.set;
-1 8354 set = function(it, metadata) {
-1 8355 wmset.call(store, it, metadata);
-1 8356 return metadata;
-1 8357 };
-1 8358 get = function(it) {
-1 8359 return wmget.call(store, it) || {};
-1 8360 };
-1 8361 has = function(it) {
-1 8362 return wmhas.call(store, it);
-1 8363 };
-1 8364 } else {
-1 8365 var STATE = sharedKey('state');
-1 8366 hiddenKeys[STATE] = true;
-1 8367 set = function(it, metadata) {
-1 8368 hide(it, STATE, metadata);
-1 8369 return metadata;
-1 8370 };
-1 8371 get = function(it) {
-1 8372 return objectHas(it, STATE) ? it[STATE] : {};
-1 8373 };
-1 8374 has = function(it) {
-1 8375 return objectHas(it, STATE);
-1 8376 };
-1 8377 }
-1 8378 module.exports = {
-1 8379 set: set,
-1 8380 get: get,
-1 8381 has: has,
-1 8382 enforce: enforce,
-1 8383 getterFor: getterFor
-1 8384 };
-1 8385 }, {
-1 8386 '../internals/global': 65,
-1 8387 '../internals/has': 66,
-1 8388 '../internals/hidden-keys': 67,
-1 8389 '../internals/hide': 68,
-1 8390 '../internals/is-object': 76,
-1 8391 '../internals/native-weak-map': 81,
-1 8392 '../internals/shared-key': 102
-1 8393 } ],
-1 8394 73: [ function(_dereq_, module, exports) {
-1 8395 var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
-1 8396 var Iterators = _dereq_('../internals/iterators');
-1 8397 var ITERATOR = wellKnownSymbol('iterator');
-1 8398 var ArrayPrototype = Array.prototype;
-1 8399 module.exports = function(it) {
-1 8400 return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
-1 8401 };
-1 8402 }, {
-1 8403 '../internals/iterators': 79,
-1 8404 '../internals/well-known-symbol': 118
-1 8405 } ],
-1 8406 74: [ function(_dereq_, module, exports) {
-1 8407 var classof = _dereq_('../internals/classof-raw');
-1 8408 module.exports = Array.isArray || function isArray(arg) {
-1 8409 return classof(arg) == 'Array';
-1 8410 };
-1 8411 }, {
-1 8412 '../internals/classof-raw': 50
-1 8413 } ],
-1 8414 75: [ function(_dereq_, module, exports) {
-1 8415 var fails = _dereq_('../internals/fails');
-1 8416 var replacement = /#|\.prototype\./;
-1 8417 var isForced = function(feature, detection) {
-1 8418 var value = data[normalize(feature)];
-1 8419 return value == POLYFILL ? true : value == NATIVE ? false : typeof detection == 'function' ? fails(detection) : !!detection;
-1 8420 };
-1 8421 var normalize = isForced.normalize = function(string) {
-1 8422 return String(string).replace(replacement, '.').toLowerCase();
-1 8423 };
-1 8424 var data = isForced.data = {};
-1 8425 var NATIVE = isForced.NATIVE = 'N';
-1 8426 var POLYFILL = isForced.POLYFILL = 'P';
-1 8427 module.exports = isForced;
-1 8428 }, {
-1 8429 '../internals/fails': 61
-1 8430 } ],
-1 8431 76: [ function(_dereq_, module, exports) {
-1 8432 module.exports = function(it) {
-1 8433 return typeof it === 'object' ? it !== null : typeof it === 'function';
-1 8434 };
-1 8435 }, {} ],
-1 8436 77: [ function(_dereq_, module, exports) {
-1 8437 module.exports = false;
-1 8438 }, {} ],
-1 8439 78: [ function(_dereq_, module, exports) {
-1 8440 'use strict';
-1 8441 var getPrototypeOf = _dereq_('../internals/object-get-prototype-of');
-1 8442 var hide = _dereq_('../internals/hide');
-1 8443 var has = _dereq_('../internals/has');
-1 8444 var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
-1 8445 var IS_PURE = _dereq_('../internals/is-pure');
-1 8446 var ITERATOR = wellKnownSymbol('iterator');
-1 8447 var BUGGY_SAFARI_ITERATORS = false;
-1 8448 var returnThis = function() {
-1 8449 return this;
-1 8450 };
-1 8451 var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
-1 8452 if ([].keys) {
-1 8453 arrayIterator = [].keys();
-1 8454 if (!('next' in arrayIterator)) {
-1 8455 BUGGY_SAFARI_ITERATORS = true;
-1 8456 } else {
-1 8457 PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
-1 8458 if (PrototypeOfArrayIteratorPrototype !== Object.prototype) {
-1 8459 IteratorPrototype = PrototypeOfArrayIteratorPrototype;
-1 8460 }
-1 8461 }
-1 8462 }
-1 8463 if (IteratorPrototype == undefined) {
-1 8464 IteratorPrototype = {};
-1 8465 }
-1 8466 if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {
-1 8467 hide(IteratorPrototype, ITERATOR, returnThis);
-1 8468 }
-1 8469 module.exports = {
-1 8470 IteratorPrototype: IteratorPrototype,
-1 8471 BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
-1 8472 };
-1 8473 }, {
-1 8474 '../internals/has': 66,
-1 8475 '../internals/hide': 68,
-1 8476 '../internals/is-pure': 77,
-1 8477 '../internals/object-get-prototype-of': 88,
-1 8478 '../internals/well-known-symbol': 118
-1 8479 } ],
-1 8480 79: [ function(_dereq_, module, exports) {
-1 8481 arguments[4][67][0].apply(exports, arguments);
-1 8482 }, {
-1 8483 dup: 67
-1 8484 } ],
-1 8485 80: [ function(_dereq_, module, exports) {
-1 8486 var fails = _dereq_('../internals/fails');
-1 8487 module.exports = !!Object.getOwnPropertySymbols && !fails(function() {
-1 8488 return !String(Symbol());
-1 8489 });
-1 8490 }, {
-1 8491 '../internals/fails': 61
-1 8492 } ],
-1 8493 81: [ function(_dereq_, module, exports) {
-1 8494 var global = _dereq_('../internals/global');
-1 8495 var nativeFunctionToString = _dereq_('../internals/function-to-string');
-1 8496 var WeakMap = global.WeakMap;
-1 8497 module.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap));
-1 8498 }, {
-1 8499 '../internals/function-to-string': 62,
-1 8500 '../internals/global': 65
-1 8501 } ],
-1 8502 82: [ function(_dereq_, module, exports) {
-1 8503 var anObject = _dereq_('../internals/an-object');
-1 8504 var defineProperties = _dereq_('../internals/object-define-properties');
-1 8505 var enumBugKeys = _dereq_('../internals/enum-bug-keys');
-1 8506 var hiddenKeys = _dereq_('../internals/hidden-keys');
-1 8507 var html = _dereq_('../internals/html');
-1 8508 var documentCreateElement = _dereq_('../internals/document-create-element');
-1 8509 var sharedKey = _dereq_('../internals/shared-key');
-1 8510 var IE_PROTO = sharedKey('IE_PROTO');
-1 8511 var PROTOTYPE = 'prototype';
-1 8512 var Empty = function() {};
-1 8513 var createDict = function() {
-1 8514 var iframe = documentCreateElement('iframe');
-1 8515 var length = enumBugKeys.length;
-1 8516 var lt = '<';
-1 8517 var script = 'script';
-1 8518 var gt = '>';
-1 8519 var js = 'java' + script + ':';
-1 8520 var iframeDocument;
-1 8521 iframe.style.display = 'none';
-1 8522 html.appendChild(iframe);
-1 8523 iframe.src = String(js);
-1 8524 iframeDocument = iframe.contentWindow.document;
-1 8525 iframeDocument.open();
-1 8526 iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
-1 8527 iframeDocument.close();
-1 8528 createDict = iframeDocument.F;
-1 8529 while (length--) {
-1 8530 delete createDict[PROTOTYPE][enumBugKeys[length]];
-1 8531 }
-1 8532 return createDict();
-1 8533 };
-1 8534 module.exports = Object.create || function create(O, Properties) {
-1 8535 var result;
-1 8536 if (O !== null) {
-1 8537 Empty[PROTOTYPE] = anObject(O);
-1 8538 result = new Empty();
-1 8539 Empty[PROTOTYPE] = null;
-1 8540 result[IE_PROTO] = O;
-1 8541 } else {
-1 8542 result = createDict();
-1 8543 }
-1 8544 return Properties === undefined ? result : defineProperties(result, Properties);
-1 8545 };
-1 8546 hiddenKeys[IE_PROTO] = true;
-1 8547 }, {
-1 8548 '../internals/an-object': 38,
-1 8549 '../internals/document-create-element': 58,
-1 8550 '../internals/enum-bug-keys': 59,
-1 8551 '../internals/hidden-keys': 67,
-1 8552 '../internals/html': 69,
-1 8553 '../internals/object-define-properties': 83,
-1 8554 '../internals/shared-key': 102
-1 8555 } ],
-1 8556 83: [ function(_dereq_, module, exports) {
-1 8557 var DESCRIPTORS = _dereq_('../internals/descriptors');
-1 8558 var definePropertyModule = _dereq_('../internals/object-define-property');
-1 8559 var anObject = _dereq_('../internals/an-object');
-1 8560 var objectKeys = _dereq_('../internals/object-keys');
-1 8561 module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
-1 8562 anObject(O);
-1 8563 var keys = objectKeys(Properties);
-1 8564 var length = keys.length;
-1 8565 var index = 0;
-1 8566 var key;
-1 8567 while (length > index) {
-1 8568 definePropertyModule.f(O, key = keys[index++], Properties[key]);
-1 8569 }
-1 8570 return O;
-1 8571 };
-1 8572 }, {
-1 8573 '../internals/an-object': 38,
-1 8574 '../internals/descriptors': 57,
-1 8575 '../internals/object-define-property': 84,
-1 8576 '../internals/object-keys': 90
-1 8577 } ],
-1 8578 84: [ function(_dereq_, module, exports) {
-1 8579 var DESCRIPTORS = _dereq_('../internals/descriptors');
-1 8580 var IE8_DOM_DEFINE = _dereq_('../internals/ie8-dom-define');
-1 8581 var anObject = _dereq_('../internals/an-object');
-1 8582 var toPrimitive = _dereq_('../internals/to-primitive');
-1 8583 var nativeDefineProperty = Object.defineProperty;
-1 8584 exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
-1 8585 anObject(O);
-1 8586 P = toPrimitive(P, true);
-1 8587 anObject(Attributes);
-1 8588 if (IE8_DOM_DEFINE) {
-1 8589 try {
-1 8590 return nativeDefineProperty(O, P, Attributes);
-1 8591 } catch (error) {}
-1 8592 }
-1 8593 if ('get' in Attributes || 'set' in Attributes) {
-1 8594 throw TypeError('Accessors not supported');
-1 8595 }
-1 8596 if ('value' in Attributes) {
-1 8597 O[P] = Attributes.value;
-1 8598 }
-1 8599 return O;
-1 8600 };
-1 8601 }, {
-1 8602 '../internals/an-object': 38,
-1 8603 '../internals/descriptors': 57,
-1 8604 '../internals/ie8-dom-define': 70,
-1 8605 '../internals/to-primitive': 113
-1 8606 } ],
-1 8607 85: [ function(_dereq_, module, exports) {
-1 8608 var DESCRIPTORS = _dereq_('../internals/descriptors');
-1 8609 var propertyIsEnumerableModule = _dereq_('../internals/object-property-is-enumerable');
-1 8610 var createPropertyDescriptor = _dereq_('../internals/create-property-descriptor');
-1 8611 var toIndexedObject = _dereq_('../internals/to-indexed-object');
-1 8612 var toPrimitive = _dereq_('../internals/to-primitive');
-1 8613 var has = _dereq_('../internals/has');
-1 8614 var IE8_DOM_DEFINE = _dereq_('../internals/ie8-dom-define');
-1 8615 var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
-1 8616 exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
-1 8617 O = toIndexedObject(O);
-1 8618 P = toPrimitive(P, true);
-1 8619 if (IE8_DOM_DEFINE) {
-1 8620 try {
-1 8621 return nativeGetOwnPropertyDescriptor(O, P);
-1 8622 } catch (error) {}
-1 8623 }
-1 8624 if (has(O, P)) {
-1 8625 return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
-1 8626 }
-1 8627 };
-1 8628 }, {
-1 8629 '../internals/create-property-descriptor': 55,
-1 8630 '../internals/descriptors': 57,
-1 8631 '../internals/has': 66,
-1 8632 '../internals/ie8-dom-define': 70,
-1 8633 '../internals/object-property-is-enumerable': 91,
-1 8634 '../internals/to-indexed-object': 108,
-1 8635 '../internals/to-primitive': 113
-1 8636 } ],
-1 8637 86: [ function(_dereq_, module, exports) {
-1 8638 var internalObjectKeys = _dereq_('../internals/object-keys-internal');
-1 8639 var enumBugKeys = _dereq_('../internals/enum-bug-keys');
-1 8640 var hiddenKeys = enumBugKeys.concat('length', 'prototype');
-1 8641 exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
-1 8642 return internalObjectKeys(O, hiddenKeys);
-1 8643 };
-1 8644 }, {
-1 8645 '../internals/enum-bug-keys': 59,
-1 8646 '../internals/object-keys-internal': 89
-1 8647 } ],
-1 8648 87: [ function(_dereq_, module, exports) {
-1 8649 exports.f = Object.getOwnPropertySymbols;
-1 8650 }, {} ],
-1 8651 88: [ function(_dereq_, module, exports) {
-1 8652 var has = _dereq_('../internals/has');
-1 8653 var toObject = _dereq_('../internals/to-object');
-1 8654 var sharedKey = _dereq_('../internals/shared-key');
-1 8655 var CORRECT_PROTOTYPE_GETTER = _dereq_('../internals/correct-prototype-getter');
-1 8656 var IE_PROTO = sharedKey('IE_PROTO');
-1 8657 var ObjectPrototype = Object.prototype;
-1 8658 module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function(O) {
-1 8659 O = toObject(O);
-1 8660 if (has(O, IE_PROTO)) {
-1 8661 return O[IE_PROTO];
-1 8662 }
-1 8663 if (typeof O.constructor == 'function' && O instanceof O.constructor) {
-1 8664 return O.constructor.prototype;
-1 8665 }
-1 8666 return O instanceof Object ? ObjectPrototype : null;
-1 8667 };
-1 8668 }, {
-1 8669 '../internals/correct-prototype-getter': 53,
-1 8670 '../internals/has': 66,
-1 8671 '../internals/shared-key': 102,
-1 8672 '../internals/to-object': 111
-1 8673 } ],
-1 8674 89: [ function(_dereq_, module, exports) {
-1 8675 var has = _dereq_('../internals/has');
-1 8676 var toIndexedObject = _dereq_('../internals/to-indexed-object');
-1 8677 var indexOf = _dereq_('../internals/array-includes').indexOf;
-1 8678 var hiddenKeys = _dereq_('../internals/hidden-keys');
-1 8679 module.exports = function(object, names) {
-1 8680 var O = toIndexedObject(object);
-1 8681 var i = 0;
-1 8682 var result = [];
-1 8683 var key;
-1 8684 for (key in O) {
-1 8685 !has(hiddenKeys, key) && has(O, key) && result.push(key);
-1 8686 }
-1 8687 while (names.length > i) {
-1 8688 if (has(O, key = names[i++])) {
-1 8689 ~indexOf(result, key) || result.push(key);
-1 8690 }
-1 8691 }
-1 8692 return result;
-1 8693 };
-1 8694 }, {
-1 8695 '../internals/array-includes': 43,
-1 8696 '../internals/has': 66,
-1 8697 '../internals/hidden-keys': 67,
-1 8698 '../internals/to-indexed-object': 108
-1 8699 } ],
-1 8700 90: [ function(_dereq_, module, exports) {
-1 8701 var internalObjectKeys = _dereq_('../internals/object-keys-internal');
-1 8702 var enumBugKeys = _dereq_('../internals/enum-bug-keys');
-1 8703 module.exports = Object.keys || function keys(O) {
-1 8704 return internalObjectKeys(O, enumBugKeys);
-1 8705 };
-1 8706 }, {
-1 8707 '../internals/enum-bug-keys': 59,
-1 8708 '../internals/object-keys-internal': 89
-1 8709 } ],
-1 8710 91: [ function(_dereq_, module, exports) {
-1 8711 'use strict';
-1 8712 var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
-1 8713 var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
-1 8714 var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({
-1 8715 1: 2
-1 8716 }, 1);
-1 8717 exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
-1 8718 var descriptor = getOwnPropertyDescriptor(this, V);
-1 8719 return !!descriptor && descriptor.enumerable;
-1 8720 } : nativePropertyIsEnumerable;
-1 8721 }, {} ],
-1 8722 92: [ function(_dereq_, module, exports) {
-1 8723 var anObject = _dereq_('../internals/an-object');
-1 8724 var aPossiblePrototype = _dereq_('../internals/a-possible-prototype');
-1 8725 module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function() {
-1 8726 var CORRECT_SETTER = false;
-1 8727 var test = {};
-1 8728 var setter;
-1 8729 try {
-1 8730 setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
-1 8731 setter.call(test, []);
-1 8732 CORRECT_SETTER = test instanceof Array;
-1 8733 } catch (error) {}
-1 8734 return function setPrototypeOf(O, proto) {
-1 8735 anObject(O);
-1 8736 aPossiblePrototype(proto);
-1 8737 if (CORRECT_SETTER) {
-1 8738 setter.call(O, proto);
-1 8739 } else {
-1 8740 O.__proto__ = proto;
-1 8741 }
-1 8742 return O;
-1 8743 };
-1 8744 }() : undefined);
-1 8745 }, {
-1 8746 '../internals/a-possible-prototype': 35,
-1 8747 '../internals/an-object': 38
-1 8748 } ],
-1 8749 93: [ function(_dereq_, module, exports) {
-1 8750 'use strict';
-1 8751 var classof = _dereq_('../internals/classof');
-1 8752 var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
-1 8753 var TO_STRING_TAG = wellKnownSymbol('toStringTag');
-1 8754 var test = {};
-1 8755 test[TO_STRING_TAG] = 'z';
-1 8756 module.exports = String(test) !== '[object z]' ? function toString() {
-1 8757 return '[object ' + classof(this) + ']';
-1 8758 } : test.toString;
-1 8759 }, {
-1 8760 '../internals/classof': 51,
-1 8761 '../internals/well-known-symbol': 118
-1 8762 } ],
-1 8763 94: [ function(_dereq_, module, exports) {
-1 8764 var getBuiltIn = _dereq_('../internals/get-built-in');
-1 8765 var getOwnPropertyNamesModule = _dereq_('../internals/object-get-own-property-names');
-1 8766 var getOwnPropertySymbolsModule = _dereq_('../internals/object-get-own-property-symbols');
-1 8767 var anObject = _dereq_('../internals/an-object');
-1 8768 module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
-1 8769 var keys = getOwnPropertyNamesModule.f(anObject(it));
-1 8770 var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
-1 8771 return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
-1 8772 };
-1 8773 }, {
-1 8774 '../internals/an-object': 38,
-1 8775 '../internals/get-built-in': 63,
-1 8776 '../internals/object-get-own-property-names': 86,
-1 8777 '../internals/object-get-own-property-symbols': 87
-1 8778 } ],
-1 8779 95: [ function(_dereq_, module, exports) {
-1 8780 module.exports = _dereq_('../internals/global');
-1 8781 }, {
-1 8782 '../internals/global': 65
-1 8783 } ],
-1 8784 96: [ function(_dereq_, module, exports) {
-1 8785 var redefine = _dereq_('../internals/redefine');
-1 8786 module.exports = function(target, src, options) {
-1 8787 for (var key in src) {
-1 8788 redefine(target, key, src[key], options);
-1 8789 }
-1 8790 return target;
-1 8791 };
-1 8792 }, {
-1 8793 '../internals/redefine': 97
-1 8794 } ],
-1 8795 97: [ function(_dereq_, module, exports) {
-1 8796 var global = _dereq_('../internals/global');
-1 8797 var shared = _dereq_('../internals/shared');
-1 8798 var hide = _dereq_('../internals/hide');
-1 8799 var has = _dereq_('../internals/has');
-1 8800 var setGlobal = _dereq_('../internals/set-global');
-1 8801 var nativeFunctionToString = _dereq_('../internals/function-to-string');
-1 8802 var InternalStateModule = _dereq_('../internals/internal-state');
-1 8803 var getInternalState = InternalStateModule.get;
-1 8804 var enforceInternalState = InternalStateModule.enforce;
-1 8805 var TEMPLATE = String(nativeFunctionToString).split('toString');
-1 8806 shared('inspectSource', function(it) {
-1 8807 return nativeFunctionToString.call(it);
-1 8808 });
-1 8809 (module.exports = function(O, key, value, options) {
-1 8810 var unsafe = options ? !!options.unsafe : false;
-1 8811 var simple = options ? !!options.enumerable : false;
-1 8812 var noTargetGet = options ? !!options.noTargetGet : false;
-1 8813 if (typeof value == 'function') {
-1 8814 if (typeof key == 'string' && !has(value, 'name')) {
-1 8815 hide(value, 'name', key);
-1 8816 }
-1 8817 enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
-1 8818 }
-1 8819 if (O === global) {
-1 8820 if (simple) {
-1 8821 O[key] = value;
-1 8822 } else {
-1 8823 setGlobal(key, value);
-1 8824 }
-1 8825 return;
-1 8826 } else if (!unsafe) {
-1 8827 delete O[key];
-1 8828 } else if (!noTargetGet && O[key]) {
-1 8829 simple = true;
-1 8830 }
-1 8831 if (simple) {
-1 8832 O[key] = value;
-1 8833 } else {
-1 8834 hide(O, key, value);
-1 8835 }
-1 8836 })(Function.prototype, 'toString', function toString() {
-1 8837 return typeof this == 'function' && getInternalState(this).source || nativeFunctionToString.call(this);
-1 8838 });
-1 8839 }, {
-1 8840 '../internals/function-to-string': 62,
-1 8841 '../internals/global': 65,
-1 8842 '../internals/has': 66,
-1 8843 '../internals/hide': 68,
-1 8844 '../internals/internal-state': 72,
-1 8845 '../internals/set-global': 99,
-1 8846 '../internals/shared': 103
-1 8847 } ],
-1 8848 98: [ function(_dereq_, module, exports) {
-1 8849 module.exports = function(it) {
-1 8850 if (it == undefined) {
-1 8851 throw TypeError('Can\'t call method on ' + it);
-1 8852 }
-1 8853 return it;
-1 8854 };
-1 8855 }, {} ],
-1 8856 99: [ function(_dereq_, module, exports) {
-1 8857 var global = _dereq_('../internals/global');
-1 8858 var hide = _dereq_('../internals/hide');
-1 8859 module.exports = function(key, value) {
-1 8860 try {
-1 8861 hide(global, key, value);
-1 8862 } catch (error) {
-1 8863 global[key] = value;
-1 8864 }
-1 8865 return value;
-1 8866 };
-1 8867 }, {
-1 8868 '../internals/global': 65,
-1 8869 '../internals/hide': 68
-1 8870 } ],
-1 8871 100: [ function(_dereq_, module, exports) {
-1 8872 'use strict';
-1 8873 var getBuiltIn = _dereq_('../internals/get-built-in');
-1 8874 var definePropertyModule = _dereq_('../internals/object-define-property');
-1 8875 var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
-1 8876 var DESCRIPTORS = _dereq_('../internals/descriptors');
-1 8877 var SPECIES = wellKnownSymbol('species');
-1 8878 module.exports = function(CONSTRUCTOR_NAME) {
-1 8879 var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
-1 8880 var defineProperty = definePropertyModule.f;
-1 8881 if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
-1 8882 defineProperty(Constructor, SPECIES, {
-1 8883 configurable: true,
-1 8884 get: function() {
-1 8885 return this;
-1 8886 }
-1 8887 });
-1 8888 }
-1 8889 };
-1 8890 }, {
-1 8891 '../internals/descriptors': 57,
-1 8892 '../internals/get-built-in': 63,
-1 8893 '../internals/object-define-property': 84,
-1 8894 '../internals/well-known-symbol': 118
-1 8895 } ],
-1 8896 101: [ function(_dereq_, module, exports) {
-1 8897 var defineProperty = _dereq_('../internals/object-define-property').f;
-1 8898 var has = _dereq_('../internals/has');
-1 8899 var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
-1 8900 var TO_STRING_TAG = wellKnownSymbol('toStringTag');
-1 8901 module.exports = function(it, TAG, STATIC) {
-1 8902 if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
-1 8903 defineProperty(it, TO_STRING_TAG, {
-1 8904 configurable: true,
-1 8905 value: TAG
-1 8906 });
-1 8907 }
-1 8908 };
-1 8909 }, {
-1 8910 '../internals/has': 66,
-1 8911 '../internals/object-define-property': 84,
-1 8912 '../internals/well-known-symbol': 118
-1 8913 } ],
-1 8914 102: [ function(_dereq_, module, exports) {
-1 8915 var shared = _dereq_('../internals/shared');
-1 8916 var uid = _dereq_('../internals/uid');
-1 8917 var keys = shared('keys');
-1 8918 module.exports = function(key) {
-1 8919 return keys[key] || (keys[key] = uid(key));
-1 8920 };
-1 8921 }, {
-1 8922 '../internals/shared': 103,
-1 8923 '../internals/uid': 117
-1 8924 } ],
-1 8925 103: [ function(_dereq_, module, exports) {
-1 8926 var global = _dereq_('../internals/global');
-1 8927 var setGlobal = _dereq_('../internals/set-global');
-1 8928 var IS_PURE = _dereq_('../internals/is-pure');
-1 8929 var SHARED = '__core-js_shared__';
-1 8930 var store = global[SHARED] || setGlobal(SHARED, {});
-1 8931 (module.exports = function(key, value) {
-1 8932 return store[key] || (store[key] = value !== undefined ? value : {});
-1 8933 })('versions', []).push({
-1 8934 version: '3.2.1',
-1 8935 mode: IS_PURE ? 'pure' : 'global',
-1 8936 copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
-1 8937 });
-1 8938 }, {
-1 8939 '../internals/global': 65,
-1 8940 '../internals/is-pure': 77,
-1 8941 '../internals/set-global': 99
-1 8942 } ],
-1 8943 104: [ function(_dereq_, module, exports) {
-1 8944 'use strict';
-1 8945 var fails = _dereq_('../internals/fails');
-1 8946 module.exports = function(METHOD_NAME, argument) {
-1 8947 var method = [][METHOD_NAME];
-1 8948 return !method || !fails(function() {
-1 8949 method.call(null, argument || function() {
-1 8950 throw 1;
-1 8951 }, 1);
-1 8952 });
-1 8953 };
-1 8954 }, {
-1 8955 '../internals/fails': 61
-1 8956 } ],
-1 8957 105: [ function(_dereq_, module, exports) {
-1 8958 var anObject = _dereq_('../internals/an-object');
-1 8959 var aFunction = _dereq_('../internals/a-function');
-1 8960 var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
-1 8961 var SPECIES = wellKnownSymbol('species');
-1 8962 module.exports = function(O, defaultConstructor) {
-1 8963 var C = anObject(O).constructor;
-1 8964 var S;
-1 8965 return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
-1 8966 };
-1 8967 }, {
-1 8968 '../internals/a-function': 34,
-1 8969 '../internals/an-object': 38,
-1 8970 '../internals/well-known-symbol': 118
-1 8971 } ],
-1 8972 106: [ function(_dereq_, module, exports) {
-1 8973 var toInteger = _dereq_('../internals/to-integer');
-1 8974 var max = Math.max;
-1 8975 var min = Math.min;
-1 8976 module.exports = function(index, length) {
-1 8977 var integer = toInteger(index);
-1 8978 return integer < 0 ? max(integer + length, 0) : min(integer, length);
-1 8979 };
-1 8980 }, {
-1 8981 '../internals/to-integer': 109
-1 8982 } ],
-1 8983 107: [ function(_dereq_, module, exports) {
-1 8984 var toInteger = _dereq_('../internals/to-integer');
-1 8985 var toLength = _dereq_('../internals/to-length');
-1 8986 module.exports = function(it) {
-1 8987 if (it === undefined) {
-1 8988 return 0;
-1 8989 }
-1 8990 var number = toInteger(it);
-1 8991 var length = toLength(number);
-1 8992 if (number !== length) {
-1 8993 throw RangeError('Wrong length or index');
-1 8994 }
-1 8995 return length;
-1 8996 };
-1 8997 }, {
-1 8998 '../internals/to-integer': 109,
-1 8999 '../internals/to-length': 110
-1 9000 } ],
-1 9001 108: [ function(_dereq_, module, exports) {
-1 9002 var IndexedObject = _dereq_('../internals/indexed-object');
-1 9003 var requireObjectCoercible = _dereq_('../internals/require-object-coercible');
-1 9004 module.exports = function(it) {
-1 9005 return IndexedObject(requireObjectCoercible(it));
-1 9006 };
-1 9007 }, {
-1 9008 '../internals/indexed-object': 71,
-1 9009 '../internals/require-object-coercible': 98
-1 9010 } ],
-1 9011 109: [ function(_dereq_, module, exports) {
-1 9012 var ceil = Math.ceil;
-1 9013 var floor = Math.floor;
-1 9014 module.exports = function(argument) {
-1 9015 return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
-1 9016 };
-1 9017 }, {} ],
-1 9018 110: [ function(_dereq_, module, exports) {
-1 9019 var toInteger = _dereq_('../internals/to-integer');
-1 9020 var min = Math.min;
-1 9021 module.exports = function(argument) {
-1 9022 return argument > 0 ? min(toInteger(argument), 9007199254740991) : 0;
-1 9023 };
-1 9024 }, {
-1 9025 '../internals/to-integer': 109
-1 9026 } ],
-1 9027 111: [ function(_dereq_, module, exports) {
-1 9028 var requireObjectCoercible = _dereq_('../internals/require-object-coercible');
-1 9029 module.exports = function(argument) {
-1 9030 return Object(requireObjectCoercible(argument));
-1 9031 };
-1 9032 }, {
-1 9033 '../internals/require-object-coercible': 98
-1 9034 } ],
-1 9035 112: [ function(_dereq_, module, exports) {
-1 9036 var toInteger = _dereq_('../internals/to-integer');
-1 9037 module.exports = function(it, BYTES) {
-1 9038 var offset = toInteger(it);
-1 9039 if (offset < 0 || offset % BYTES) {
-1 9040 throw RangeError('Wrong offset');
-1 9041 }
-1 9042 return offset;
-1 9043 };
-1 9044 }, {
-1 9045 '../internals/to-integer': 109
-1 9046 } ],
-1 9047 113: [ function(_dereq_, module, exports) {
-1 9048 var isObject = _dereq_('../internals/is-object');
-1 9049 module.exports = function(input, PREFERRED_STRING) {
-1 9050 if (!isObject(input)) {
-1 9051 return input;
-1 9052 }
-1 9053 var fn, val;
-1 9054 if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) {
-1 9055 return val;
-1 9056 }
-1 9057 if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) {
-1 9058 return val;
-1 9059 }
-1 9060 if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) {
-1 9061 return val;
-1 9062 }
-1 9063 throw TypeError('Can\'t convert object to primitive value');
-1 9064 };
-1 9065 }, {
-1 9066 '../internals/is-object': 76
-1 9067 } ],
-1 9068 114: [ function(_dereq_, module, exports) {
-1 9069 'use strict';
-1 9070 var $ = _dereq_('../internals/export');
-1 9071 var global = _dereq_('../internals/global');
-1 9072 var DESCRIPTORS = _dereq_('../internals/descriptors');
-1 9073 var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = _dereq_('../internals/typed-arrays-constructors-requires-wrappers');
-1 9074 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9075 var ArrayBufferModule = _dereq_('../internals/array-buffer');
-1 9076 var anInstance = _dereq_('../internals/an-instance');
-1 9077 var createPropertyDescriptor = _dereq_('../internals/create-property-descriptor');
-1 9078 var hide = _dereq_('../internals/hide');
-1 9079 var toLength = _dereq_('../internals/to-length');
-1 9080 var toIndex = _dereq_('../internals/to-index');
-1 9081 var toOffset = _dereq_('../internals/to-offset');
-1 9082 var toPrimitive = _dereq_('../internals/to-primitive');
-1 9083 var has = _dereq_('../internals/has');
-1 9084 var classof = _dereq_('../internals/classof');
-1 9085 var isObject = _dereq_('../internals/is-object');
-1 9086 var create = _dereq_('../internals/object-create');
-1 9087 var setPrototypeOf = _dereq_('../internals/object-set-prototype-of');
-1 9088 var getOwnPropertyNames = _dereq_('../internals/object-get-own-property-names').f;
-1 9089 var typedArrayFrom = _dereq_('../internals/typed-array-from');
-1 9090 var forEach = _dereq_('../internals/array-iteration').forEach;
-1 9091 var setSpecies = _dereq_('../internals/set-species');
-1 9092 var definePropertyModule = _dereq_('../internals/object-define-property');
-1 9093 var getOwnPropertyDescriptorModule = _dereq_('../internals/object-get-own-property-descriptor');
-1 9094 var InternalStateModule = _dereq_('../internals/internal-state');
-1 9095 var getInternalState = InternalStateModule.get;
-1 9096 var setInternalState = InternalStateModule.set;
-1 9097 var nativeDefineProperty = definePropertyModule.f;
-1 9098 var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
-1 9099 var round = Math.round;
-1 9100 var RangeError = global.RangeError;
-1 9101 var ArrayBuffer = ArrayBufferModule.ArrayBuffer;
-1 9102 var DataView = ArrayBufferModule.DataView;
-1 9103 var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
-1 9104 var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;
-1 9105 var TypedArray = ArrayBufferViewCore.TypedArray;
-1 9106 var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;
-1 9107 var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
-1 9108 var isTypedArray = ArrayBufferViewCore.isTypedArray;
-1 9109 var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
-1 9110 var WRONG_LENGTH = 'Wrong length';
-1 9111 var fromList = function(C, list) {
-1 9112 var index = 0;
-1 9113 var length = list.length;
-1 9114 var result = new (aTypedArrayConstructor(C))(length);
-1 9115 while (length > index) {
-1 9116 result[index] = list[index++];
-1 9117 }
-1 9118 return result;
-1 9119 };
-1 9120 var addGetter = function(it, key) {
-1 9121 nativeDefineProperty(it, key, {
-1 9122 get: function() {
-1 9123 return getInternalState(this)[key];
-1 9124 }
-1 9125 });
-1 9126 };
-1 9127 var isArrayBuffer = function(it) {
-1 9128 var klass;
-1 9129 return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';
-1 9130 };
-1 9131 var isTypedArrayIndex = function(target, key) {
-1 9132 return isTypedArray(target) && typeof key != 'symbol' && key in target && String(+key) == String(key);
-1 9133 };
-1 9134 var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {
-1 9135 return isTypedArrayIndex(target, key = toPrimitive(key, true)) ? createPropertyDescriptor(2, target[key]) : nativeGetOwnPropertyDescriptor(target, key);
-1 9136 };
-1 9137 var wrappedDefineProperty = function defineProperty(target, key, descriptor) {
-1 9138 if (isTypedArrayIndex(target, key = toPrimitive(key, true)) && isObject(descriptor) && has(descriptor, 'value') && !has(descriptor, 'get') && !has(descriptor, 'set') && !descriptor.configurable && (!has(descriptor, 'writable') || descriptor.writable) && (!has(descriptor, 'enumerable') || descriptor.enumerable)) {
-1 9139 target[key] = descriptor.value;
-1 9140 return target;
-1 9141 }
-1 9142 return nativeDefineProperty(target, key, descriptor);
-1 9143 };
-1 9144 if (DESCRIPTORS) {
-1 9145 if (!NATIVE_ARRAY_BUFFER_VIEWS) {
-1 9146 getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;
-1 9147 definePropertyModule.f = wrappedDefineProperty;
-1 9148 addGetter(TypedArrayPrototype, 'buffer');
-1 9149 addGetter(TypedArrayPrototype, 'byteOffset');
-1 9150 addGetter(TypedArrayPrototype, 'byteLength');
-1 9151 addGetter(TypedArrayPrototype, 'length');
-1 9152 }
-1 9153 $({
-1 9154 target: 'Object',
-1 9155 stat: true,
-1 9156 forced: !NATIVE_ARRAY_BUFFER_VIEWS
-1 9157 }, {
-1 9158 getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,
-1 9159 defineProperty: wrappedDefineProperty
-1 9160 });
-1 9161 module.exports = function(TYPE, BYTES, wrapper, CLAMPED) {
-1 9162 var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';
-1 9163 var GETTER = 'get' + TYPE;
-1 9164 var SETTER = 'set' + TYPE;
-1 9165 var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];
-1 9166 var TypedArrayConstructor = NativeTypedArrayConstructor;
-1 9167 var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;
-1 9168 var exported = {};
-1 9169 var getter = function(that, index) {
-1 9170 var data = getInternalState(that);
-1 9171 return data.view[GETTER](index * BYTES + data.byteOffset, true);
-1 9172 };
-1 9173 var setter = function(that, index, value) {
-1 9174 var data = getInternalState(that);
-1 9175 if (CLAMPED) {
-1 9176 value = (value = round(value)) < 0 ? 0 : value > 255 ? 255 : value & 255;
-1 9177 }
-1 9178 data.view[SETTER](index * BYTES + data.byteOffset, value, true);
-1 9179 };
-1 9180 var addElement = function(that, index) {
-1 9181 nativeDefineProperty(that, index, {
-1 9182 get: function() {
-1 9183 return getter(this, index);
-1 9184 },
-1 9185 set: function(value) {
-1 9186 return setter(this, index, value);
-1 9187 },
-1 9188 enumerable: true
-1 9189 });
-1 9190 };
-1 9191 if (!NATIVE_ARRAY_BUFFER_VIEWS) {
-1 9192 TypedArrayConstructor = wrapper(function(that, data, offset, $length) {
-1 9193 anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);
-1 9194 var index = 0;
-1 9195 var byteOffset = 0;
-1 9196 var buffer, byteLength, length;
-1 9197 if (!isObject(data)) {
-1 9198 length = toIndex(data);
-1 9199 byteLength = length * BYTES;
-1 9200 buffer = new ArrayBuffer(byteLength);
-1 9201 } else if (isArrayBuffer(data)) {
-1 9202 buffer = data;
-1 9203 byteOffset = toOffset(offset, BYTES);
-1 9204 var $len = data.byteLength;
-1 9205 if ($length === undefined) {
-1 9206 if ($len % BYTES) {
-1 9207 throw RangeError(WRONG_LENGTH);
-1 9208 }
-1 9209 byteLength = $len - byteOffset;
-1 9210 if (byteLength < 0) {
-1 9211 throw RangeError(WRONG_LENGTH);
-1 9212 }
-1 9213 } else {
-1 9214 byteLength = toLength($length) * BYTES;
-1 9215 if (byteLength + byteOffset > $len) {
-1 9216 throw RangeError(WRONG_LENGTH);
-1 9217 }
-1 9218 }
-1 9219 length = byteLength / BYTES;
-1 9220 } else if (isTypedArray(data)) {
-1 9221 return fromList(TypedArrayConstructor, data);
-1 9222 } else {
-1 9223 return typedArrayFrom.call(TypedArrayConstructor, data);
-1 9224 }
-1 9225 setInternalState(that, {
-1 9226 buffer: buffer,
-1 9227 byteOffset: byteOffset,
-1 9228 byteLength: byteLength,
-1 9229 length: length,
-1 9230 view: new DataView(buffer)
-1 9231 });
-1 9232 while (index < length) {
-1 9233 addElement(that, index++);
-1 9234 }
-1 9235 });
-1 9236 if (setPrototypeOf) {
-1 9237 setPrototypeOf(TypedArrayConstructor, TypedArray);
-1 9238 }
-1 9239 TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);
-1 9240 } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {
-1 9241 TypedArrayConstructor = wrapper(function(dummy, data, typedArrayOffset, $length) {
-1 9242 anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);
-1 9243 if (!isObject(data)) {
-1 9244 return new NativeTypedArrayConstructor(toIndex(data));
-1 9245 }
-1 9246 if (isArrayBuffer(data)) {
-1 9247 return $length !== undefined ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length) : typedArrayOffset !== undefined ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES)) : new NativeTypedArrayConstructor(data);
-1 9248 }
-1 9249 if (isTypedArray(data)) {
-1 9250 return fromList(TypedArrayConstructor, data);
-1 9251 }
-1 9252 return typedArrayFrom.call(TypedArrayConstructor, data);
-1 9253 });
-1 9254 if (setPrototypeOf) {
-1 9255 setPrototypeOf(TypedArrayConstructor, TypedArray);
-1 9256 }
-1 9257 forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function(key) {
-1 9258 if (!(key in TypedArrayConstructor)) {
-1 9259 hide(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);
-1 9260 }
-1 9261 });
-1 9262 TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;
-1 9263 }
-1 9264 if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {
-1 9265 hide(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);
-1 9266 }
-1 9267 if (TYPED_ARRAY_TAG) {
-1 9268 hide(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);
-1 9269 }
-1 9270 exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;
-1 9271 $({
-1 9272 global: true,
-1 9273 forced: TypedArrayConstructor != NativeTypedArrayConstructor,
-1 9274 sham: !NATIVE_ARRAY_BUFFER_VIEWS
-1 9275 }, exported);
-1 9276 if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {
-1 9277 hide(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);
-1 9278 }
-1 9279 if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {
-1 9280 hide(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);
-1 9281 }
-1 9282 setSpecies(CONSTRUCTOR_NAME);
-1 9283 };
-1 9284 } else {
-1 9285 module.exports = function() {};
-1 9286 }
-1 9287 }, {
-1 9288 '../internals/an-instance': 37,
-1 9289 '../internals/array-buffer': 40,
-1 9290 '../internals/array-buffer-view-core': 39,
-1 9291 '../internals/array-iteration': 44,
-1 9292 '../internals/classof': 51,
-1 9293 '../internals/create-property-descriptor': 55,
-1 9294 '../internals/descriptors': 57,
-1 9295 '../internals/export': 60,
-1 9296 '../internals/global': 65,
-1 9297 '../internals/has': 66,
-1 9298 '../internals/hide': 68,
-1 9299 '../internals/internal-state': 72,
-1 9300 '../internals/is-object': 76,
-1 9301 '../internals/object-create': 82,
-1 9302 '../internals/object-define-property': 84,
-1 9303 '../internals/object-get-own-property-descriptor': 85,
-1 9304 '../internals/object-get-own-property-names': 86,
-1 9305 '../internals/object-set-prototype-of': 92,
-1 9306 '../internals/set-species': 100,
-1 9307 '../internals/to-index': 107,
-1 9308 '../internals/to-length': 110,
-1 9309 '../internals/to-offset': 112,
-1 9310 '../internals/to-primitive': 113,
-1 9311 '../internals/typed-array-from': 115,
-1 9312 '../internals/typed-arrays-constructors-requires-wrappers': 116
-1 9313 } ],
-1 9314 115: [ function(_dereq_, module, exports) {
-1 9315 var toObject = _dereq_('../internals/to-object');
-1 9316 var toLength = _dereq_('../internals/to-length');
-1 9317 var getIteratorMethod = _dereq_('../internals/get-iterator-method');
-1 9318 var isArrayIteratorMethod = _dereq_('../internals/is-array-iterator-method');
-1 9319 var bind = _dereq_('../internals/bind-context');
-1 9320 var aTypedArrayConstructor = _dereq_('../internals/array-buffer-view-core').aTypedArrayConstructor;
-1 9321 module.exports = function from(source) {
-1 9322 var O = toObject(source);
-1 9323 var argumentsLength = arguments.length;
-1 9324 var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
-1 9325 var mapping = mapfn !== undefined;
-1 9326 var iteratorMethod = getIteratorMethod(O);
-1 9327 var i, length, result, step, iterator;
-1 9328 if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) {
-1 9329 iterator = iteratorMethod.call(O);
-1 9330 O = [];
-1 9331 while (!(step = iterator.next()).done) {
-1 9332 O.push(step.value);
-1 9333 }
-1 9334 }
-1 9335 if (mapping && argumentsLength > 2) {
-1 9336 mapfn = bind(mapfn, arguments[2], 2);
-1 9337 }
-1 9338 length = toLength(O.length);
-1 9339 result = new (aTypedArrayConstructor(this))(length);
-1 9340 for (i = 0; length > i; i++) {
-1 9341 result[i] = mapping ? mapfn(O[i], i) : O[i];
-1 9342 }
-1 9343 return result;
-1 9344 };
-1 9345 }, {
-1 9346 '../internals/array-buffer-view-core': 39,
-1 9347 '../internals/bind-context': 48,
-1 9348 '../internals/get-iterator-method': 64,
-1 9349 '../internals/is-array-iterator-method': 73,
-1 9350 '../internals/to-length': 110,
-1 9351 '../internals/to-object': 111
-1 9352 } ],
-1 9353 116: [ function(_dereq_, module, exports) {
-1 9354 var global = _dereq_('../internals/global');
-1 9355 var fails = _dereq_('../internals/fails');
-1 9356 var checkCorrectnessOfIteration = _dereq_('../internals/check-correctness-of-iteration');
-1 9357 var NATIVE_ARRAY_BUFFER_VIEWS = _dereq_('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER_VIEWS;
-1 9358 var ArrayBuffer = global.ArrayBuffer;
-1 9359 var Int8Array = global.Int8Array;
-1 9360 module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function() {
-1 9361 Int8Array(1);
-1 9362 }) || !fails(function() {
-1 9363 new Int8Array(-1);
-1 9364 }) || !checkCorrectnessOfIteration(function(iterable) {
-1 9365 new Int8Array();
-1 9366 new Int8Array(null);
-1 9367 new Int8Array(1.5);
-1 9368 new Int8Array(iterable);
-1 9369 }, true) || fails(function() {
-1 9370 return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;
-1 9371 });
-1 9372 }, {
-1 9373 '../internals/array-buffer-view-core': 39,
-1 9374 '../internals/check-correctness-of-iteration': 49,
-1 9375 '../internals/fails': 61,
-1 9376 '../internals/global': 65
-1 9377 } ],
-1 9378 117: [ function(_dereq_, module, exports) {
-1 9379 var id = 0;
-1 9380 var postfix = Math.random();
-1 9381 module.exports = function(key) {
-1 9382 return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
-1 9383 };
-1 9384 }, {} ],
-1 9385 118: [ function(_dereq_, module, exports) {
-1 9386 var global = _dereq_('../internals/global');
-1 9387 var shared = _dereq_('../internals/shared');
-1 9388 var uid = _dereq_('../internals/uid');
-1 9389 var NATIVE_SYMBOL = _dereq_('../internals/native-symbol');
-1 9390 var Symbol = global.Symbol;
-1 9391 var store = shared('wks');
-1 9392 module.exports = function(name) {
-1 9393 return store[name] || (store[name] = NATIVE_SYMBOL && Symbol[name] || (NATIVE_SYMBOL ? Symbol : uid)('Symbol.' + name));
-1 9394 };
-1 9395 }, {
-1 9396 '../internals/global': 65,
-1 9397 '../internals/native-symbol': 80,
-1 9398 '../internals/shared': 103,
-1 9399 '../internals/uid': 117
-1 9400 } ],
-1 9401 119: [ function(_dereq_, module, exports) {
-1 9402 'use strict';
-1 9403 var toIndexedObject = _dereq_('../internals/to-indexed-object');
-1 9404 var addToUnscopables = _dereq_('../internals/add-to-unscopables');
-1 9405 var Iterators = _dereq_('../internals/iterators');
-1 9406 var InternalStateModule = _dereq_('../internals/internal-state');
-1 9407 var defineIterator = _dereq_('../internals/define-iterator');
-1 9408 var ARRAY_ITERATOR = 'Array Iterator';
-1 9409 var setInternalState = InternalStateModule.set;
-1 9410 var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
-1 9411 module.exports = defineIterator(Array, 'Array', function(iterated, kind) {
-1 9412 setInternalState(this, {
-1 9413 type: ARRAY_ITERATOR,
-1 9414 target: toIndexedObject(iterated),
-1 9415 index: 0,
-1 9416 kind: kind
-1 9417 });
-1 9418 }, function() {
-1 9419 var state = getInternalState(this);
-1 9420 var target = state.target;
-1 9421 var kind = state.kind;
-1 9422 var index = state.index++;
-1 9423 if (!target || index >= target.length) {
-1 9424 state.target = undefined;
-1 9425 return {
-1 9426 value: undefined,
-1 9427 done: true
-1 9428 };
-1 9429 }
-1 9430 if (kind == 'keys') {
-1 9431 return {
-1 9432 value: index,
-1 9433 done: false
-1 9434 };
-1 9435 }
-1 9436 if (kind == 'values') {
-1 9437 return {
-1 9438 value: target[index],
-1 9439 done: false
-1 9440 };
-1 9441 }
-1 9442 return {
-1 9443 value: [ index, target[index] ],
-1 9444 done: false
-1 9445 };
-1 9446 }, 'values');
-1 9447 Iterators.Arguments = Iterators.Array;
-1 9448 addToUnscopables('keys');
-1 9449 addToUnscopables('values');
-1 9450 addToUnscopables('entries');
-1 9451 }, {
-1 9452 '../internals/add-to-unscopables': 36,
-1 9453 '../internals/define-iterator': 56,
-1 9454 '../internals/internal-state': 72,
-1 9455 '../internals/iterators': 79,
-1 9456 '../internals/to-indexed-object': 108
-1 9457 } ],
-1 9458 120: [ function(_dereq_, module, exports) {
-1 9459 var redefine = _dereq_('../internals/redefine');
-1 9460 var toString = _dereq_('../internals/object-to-string');
-1 9461 var ObjectPrototype = Object.prototype;
-1 9462 if (toString !== ObjectPrototype.toString) {
-1 9463 redefine(ObjectPrototype, 'toString', toString, {
-1 9464 unsafe: true
-1 9465 });
-1 9466 }
-1 9467 }, {
-1 9468 '../internals/object-to-string': 93,
-1 9469 '../internals/redefine': 97
-1 9470 } ],
-1 9471 121: [ function(_dereq_, module, exports) {
-1 9472 'use strict';
-1 9473 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9474 var $copyWithin = _dereq_('../internals/array-copy-within');
-1 9475 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9476 ArrayBufferViewCore.exportProto('copyWithin', function copyWithin(target, start) {
-1 9477 return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
-1 9478 });
-1 9479 }, {
-1 9480 '../internals/array-buffer-view-core': 39,
-1 9481 '../internals/array-copy-within': 41
-1 9482 } ],
-1 9483 122: [ function(_dereq_, module, exports) {
-1 9484 'use strict';
-1 9485 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9486 var $every = _dereq_('../internals/array-iteration').every;
-1 9487 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9488 ArrayBufferViewCore.exportProto('every', function every(callbackfn) {
-1 9489 return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
-1 9490 });
-1 9491 }, {
-1 9492 '../internals/array-buffer-view-core': 39,
-1 9493 '../internals/array-iteration': 44
-1 9494 } ],
-1 9495 123: [ function(_dereq_, module, exports) {
-1 9496 'use strict';
-1 9497 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9498 var $fill = _dereq_('../internals/array-fill');
-1 9499 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9500 ArrayBufferViewCore.exportProto('fill', function fill(value) {
-1 9501 return $fill.apply(aTypedArray(this), arguments);
-1 9502 });
-1 9503 }, {
-1 9504 '../internals/array-buffer-view-core': 39,
-1 9505 '../internals/array-fill': 42
-1 9506 } ],
-1 9507 124: [ function(_dereq_, module, exports) {
-1 9508 'use strict';
-1 9509 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9510 var $filter = _dereq_('../internals/array-iteration').filter;
-1 9511 var speciesConstructor = _dereq_('../internals/species-constructor');
-1 9512 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9513 var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
-1 9514 ArrayBufferViewCore.exportProto('filter', function filter(callbackfn) {
-1 9515 var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
-1 9516 var C = speciesConstructor(this, this.constructor);
-1 9517 var index = 0;
-1 9518 var length = list.length;
-1 9519 var result = new (aTypedArrayConstructor(C))(length);
-1 9520 while (length > index) {
-1 9521 result[index] = list[index++];
-1 9522 }
-1 9523 return result;
-1 9524 });
-1 9525 }, {
-1 9526 '../internals/array-buffer-view-core': 39,
-1 9527 '../internals/array-iteration': 44,
-1 9528 '../internals/species-constructor': 105
-1 9529 } ],
-1 9530 125: [ function(_dereq_, module, exports) {
-1 9531 'use strict';
-1 9532 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9533 var $findIndex = _dereq_('../internals/array-iteration').findIndex;
-1 9534 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9535 ArrayBufferViewCore.exportProto('findIndex', function findIndex(predicate) {
-1 9536 return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
-1 9537 });
-1 9538 }, {
-1 9539 '../internals/array-buffer-view-core': 39,
-1 9540 '../internals/array-iteration': 44
-1 9541 } ],
-1 9542 126: [ function(_dereq_, module, exports) {
-1 9543 'use strict';
-1 9544 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9545 var $find = _dereq_('../internals/array-iteration').find;
-1 9546 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9547 ArrayBufferViewCore.exportProto('find', function find(predicate) {
-1 9548 return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
-1 9549 });
-1 9550 }, {
-1 9551 '../internals/array-buffer-view-core': 39,
-1 9552 '../internals/array-iteration': 44
-1 9553 } ],
-1 9554 127: [ function(_dereq_, module, exports) {
-1 9555 'use strict';
-1 9556 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9557 var $forEach = _dereq_('../internals/array-iteration').forEach;
-1 9558 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9559 ArrayBufferViewCore.exportProto('forEach', function forEach(callbackfn) {
-1 9560 $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
-1 9561 });
-1 9562 }, {
-1 9563 '../internals/array-buffer-view-core': 39,
-1 9564 '../internals/array-iteration': 44
-1 9565 } ],
-1 9566 128: [ function(_dereq_, module, exports) {
-1 9567 'use strict';
-1 9568 var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = _dereq_('../internals/typed-arrays-constructors-requires-wrappers');
-1 9569 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9570 var typedArrayFrom = _dereq_('../internals/typed-array-from');
-1 9571 ArrayBufferViewCore.exportStatic('from', typedArrayFrom, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS);
-1 9572 }, {
-1 9573 '../internals/array-buffer-view-core': 39,
-1 9574 '../internals/typed-array-from': 115,
-1 9575 '../internals/typed-arrays-constructors-requires-wrappers': 116
-1 9576 } ],
-1 9577 129: [ function(_dereq_, module, exports) {
-1 9578 'use strict';
-1 9579 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9580 var $includes = _dereq_('../internals/array-includes').includes;
-1 9581 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9582 ArrayBufferViewCore.exportProto('includes', function includes(searchElement) {
-1 9583 return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
-1 9584 });
-1 9585 }, {
-1 9586 '../internals/array-buffer-view-core': 39,
-1 9587 '../internals/array-includes': 43
-1 9588 } ],
-1 9589 130: [ function(_dereq_, module, exports) {
-1 9590 'use strict';
-1 9591 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9592 var $indexOf = _dereq_('../internals/array-includes').indexOf;
-1 9593 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9594 ArrayBufferViewCore.exportProto('indexOf', function indexOf(searchElement) {
-1 9595 return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
-1 9596 });
-1 9597 }, {
-1 9598 '../internals/array-buffer-view-core': 39,
-1 9599 '../internals/array-includes': 43
-1 9600 } ],
-1 9601 131: [ function(_dereq_, module, exports) {
-1 9602 'use strict';
-1 9603 var global = _dereq_('../internals/global');
-1 9604 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9605 var ArrayIterators = _dereq_('../modules/es.array.iterator');
-1 9606 var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
-1 9607 var ITERATOR = wellKnownSymbol('iterator');
-1 9608 var Uint8Array = global.Uint8Array;
-1 9609 var arrayValues = ArrayIterators.values;
-1 9610 var arrayKeys = ArrayIterators.keys;
-1 9611 var arrayEntries = ArrayIterators.entries;
-1 9612 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9613 var exportProto = ArrayBufferViewCore.exportProto;
-1 9614 var nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];
-1 9615 var CORRECT_ITER_NAME = !!nativeTypedArrayIterator && (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined);
-1 9616 var typedArrayValues = function values() {
-1 9617 return arrayValues.call(aTypedArray(this));
-1 9618 };
-1 9619 exportProto('entries', function entries() {
-1 9620 return arrayEntries.call(aTypedArray(this));
-1 9621 });
-1 9622 exportProto('keys', function keys() {
-1 9623 return arrayKeys.call(aTypedArray(this));
-1 9624 });
-1 9625 exportProto('values', typedArrayValues, !CORRECT_ITER_NAME);
-1 9626 exportProto(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME);
-1 9627 }, {
-1 9628 '../internals/array-buffer-view-core': 39,
-1 9629 '../internals/global': 65,
-1 9630 '../internals/well-known-symbol': 118,
-1 9631 '../modules/es.array.iterator': 119
-1 9632 } ],
-1 9633 132: [ function(_dereq_, module, exports) {
-1 9634 'use strict';
-1 9635 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9636 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9637 var $join = [].join;
-1 9638 ArrayBufferViewCore.exportProto('join', function join(separator) {
-1 9639 return $join.apply(aTypedArray(this), arguments);
-1 9640 });
-1 9641 }, {
-1 9642 '../internals/array-buffer-view-core': 39
-1 9643 } ],
-1 9644 133: [ function(_dereq_, module, exports) {
-1 9645 'use strict';
-1 9646 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9647 var $lastIndexOf = _dereq_('../internals/array-last-index-of');
-1 9648 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9649 ArrayBufferViewCore.exportProto('lastIndexOf', function lastIndexOf(searchElement) {
-1 9650 return $lastIndexOf.apply(aTypedArray(this), arguments);
-1 9651 });
-1 9652 }, {
-1 9653 '../internals/array-buffer-view-core': 39,
-1 9654 '../internals/array-last-index-of': 45
-1 9655 } ],
-1 9656 134: [ function(_dereq_, module, exports) {
-1 9657 'use strict';
-1 9658 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9659 var $map = _dereq_('../internals/array-iteration').map;
-1 9660 var speciesConstructor = _dereq_('../internals/species-constructor');
-1 9661 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9662 var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
-1 9663 ArrayBufferViewCore.exportProto('map', function map(mapfn) {
-1 9664 return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function(O, length) {
-1 9665 return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length);
-1 9666 });
-1 9667 });
-1 9668 }, {
-1 9669 '../internals/array-buffer-view-core': 39,
-1 9670 '../internals/array-iteration': 44,
-1 9671 '../internals/species-constructor': 105
-1 9672 } ],
-1 9673 135: [ function(_dereq_, module, exports) {
-1 9674 'use strict';
-1 9675 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9676 var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = _dereq_('../internals/typed-arrays-constructors-requires-wrappers');
-1 9677 var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
-1 9678 ArrayBufferViewCore.exportStatic('of', function of() {
-1 9679 var index = 0;
-1 9680 var length = arguments.length;
-1 9681 var result = new (aTypedArrayConstructor(this))(length);
-1 9682 while (length > index) {
-1 9683 result[index] = arguments[index++];
-1 9684 }
-1 9685 return result;
-1 9686 }, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS);
-1 9687 }, {
-1 9688 '../internals/array-buffer-view-core': 39,
-1 9689 '../internals/typed-arrays-constructors-requires-wrappers': 116
-1 9690 } ],
-1 9691 136: [ function(_dereq_, module, exports) {
-1 9692 'use strict';
-1 9693 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9694 var $reduceRight = _dereq_('../internals/array-reduce').right;
-1 9695 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9696 ArrayBufferViewCore.exportProto('reduceRight', function reduceRight(callbackfn) {
-1 9697 return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
-1 9698 });
-1 9699 }, {
-1 9700 '../internals/array-buffer-view-core': 39,
-1 9701 '../internals/array-reduce': 46
-1 9702 } ],
-1 9703 137: [ function(_dereq_, module, exports) {
-1 9704 'use strict';
-1 9705 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9706 var $reduce = _dereq_('../internals/array-reduce').left;
-1 9707 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9708 ArrayBufferViewCore.exportProto('reduce', function reduce(callbackfn) {
-1 9709 return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
-1 9710 });
-1 9711 }, {
-1 9712 '../internals/array-buffer-view-core': 39,
-1 9713 '../internals/array-reduce': 46
-1 9714 } ],
-1 9715 138: [ function(_dereq_, module, exports) {
-1 9716 'use strict';
-1 9717 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9718 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9719 var floor = Math.floor;
-1 9720 ArrayBufferViewCore.exportProto('reverse', function reverse() {
-1 9721 var that = this;
-1 9722 var length = aTypedArray(that).length;
-1 9723 var middle = floor(length / 2);
-1 9724 var index = 0;
-1 9725 var value;
-1 9726 while (index < middle) {
-1 9727 value = that[index];
-1 9728 that[index++] = that[--length];
-1 9729 that[length] = value;
-1 9730 }
-1 9731 return that;
-1 9732 });
-1 9733 }, {
-1 9734 '../internals/array-buffer-view-core': 39
-1 9735 } ],
-1 9736 139: [ function(_dereq_, module, exports) {
-1 9737 'use strict';
-1 9738 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9739 var toLength = _dereq_('../internals/to-length');
-1 9740 var toOffset = _dereq_('../internals/to-offset');
-1 9741 var toObject = _dereq_('../internals/to-object');
-1 9742 var fails = _dereq_('../internals/fails');
-1 9743 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9744 var FORCED = fails(function() {
-1 9745 new Int8Array(1).set({});
-1 9746 });
-1 9747 ArrayBufferViewCore.exportProto('set', function set(arrayLike) {
-1 9748 aTypedArray(this);
-1 9749 var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
-1 9750 var length = this.length;
-1 9751 var src = toObject(arrayLike);
-1 9752 var len = toLength(src.length);
-1 9753 var index = 0;
-1 9754 if (len + offset > length) {
-1 9755 throw RangeError('Wrong length');
-1 9756 }
-1 9757 while (index < len) {
-1 9758 this[offset + index] = src[index++];
-1 9759 }
-1 9760 }, FORCED);
-1 9761 }, {
-1 9762 '../internals/array-buffer-view-core': 39,
-1 9763 '../internals/fails': 61,
-1 9764 '../internals/to-length': 110,
-1 9765 '../internals/to-object': 111,
-1 9766 '../internals/to-offset': 112
-1 9767 } ],
-1 9768 140: [ function(_dereq_, module, exports) {
-1 9769 'use strict';
-1 9770 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9771 var speciesConstructor = _dereq_('../internals/species-constructor');
-1 9772 var fails = _dereq_('../internals/fails');
-1 9773 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9774 var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
-1 9775 var $slice = [].slice;
-1 9776 var FORCED = fails(function() {
-1 9777 new Int8Array(1).slice();
-1 9778 });
-1 9779 ArrayBufferViewCore.exportProto('slice', function slice(start, end) {
-1 9780 var list = $slice.call(aTypedArray(this), start, end);
-1 9781 var C = speciesConstructor(this, this.constructor);
-1 9782 var index = 0;
-1 9783 var length = list.length;
-1 9784 var result = new (aTypedArrayConstructor(C))(length);
-1 9785 while (length > index) {
-1 9786 result[index] = list[index++];
-1 9787 }
-1 9788 return result;
-1 9789 }, FORCED);
-1 9790 }, {
-1 9791 '../internals/array-buffer-view-core': 39,
-1 9792 '../internals/fails': 61,
-1 9793 '../internals/species-constructor': 105
-1 9794 } ],
-1 9795 141: [ function(_dereq_, module, exports) {
-1 9796 'use strict';
-1 9797 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9798 var $some = _dereq_('../internals/array-iteration').some;
-1 9799 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9800 ArrayBufferViewCore.exportProto('some', function some(callbackfn) {
-1 9801 return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
-1 9802 });
-1 9803 }, {
-1 9804 '../internals/array-buffer-view-core': 39,
-1 9805 '../internals/array-iteration': 44
-1 9806 } ],
-1 9807 142: [ function(_dereq_, module, exports) {
-1 9808 'use strict';
-1 9809 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9810 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9811 var $sort = [].sort;
-1 9812 ArrayBufferViewCore.exportProto('sort', function sort(comparefn) {
-1 9813 return $sort.call(aTypedArray(this), comparefn);
-1 9814 });
-1 9815 }, {
-1 9816 '../internals/array-buffer-view-core': 39
-1 9817 } ],
-1 9818 143: [ function(_dereq_, module, exports) {
-1 9819 'use strict';
-1 9820 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9821 var toLength = _dereq_('../internals/to-length');
-1 9822 var toAbsoluteIndex = _dereq_('../internals/to-absolute-index');
-1 9823 var speciesConstructor = _dereq_('../internals/species-constructor');
-1 9824 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9825 ArrayBufferViewCore.exportProto('subarray', function subarray(begin, end) {
-1 9826 var O = aTypedArray(this);
-1 9827 var length = O.length;
-1 9828 var beginIndex = toAbsoluteIndex(begin, length);
-1 9829 return new (speciesConstructor(O, O.constructor))(O.buffer, O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT, toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex));
-1 9830 });
-1 9831 }, {
-1 9832 '../internals/array-buffer-view-core': 39,
-1 9833 '../internals/species-constructor': 105,
-1 9834 '../internals/to-absolute-index': 106,
-1 9835 '../internals/to-length': 110
-1 9836 } ],
-1 9837 144: [ function(_dereq_, module, exports) {
-1 9838 'use strict';
-1 9839 var global = _dereq_('../internals/global');
-1 9840 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9841 var fails = _dereq_('../internals/fails');
-1 9842 var Int8Array = global.Int8Array;
-1 9843 var aTypedArray = ArrayBufferViewCore.aTypedArray;
-1 9844 var $toLocaleString = [].toLocaleString;
-1 9845 var $slice = [].slice;
-1 9846 var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function() {
-1 9847 $toLocaleString.call(new Int8Array(1));
-1 9848 });
-1 9849 var FORCED = fails(function() {
-1 9850 return [ 1, 2 ].toLocaleString() != new Int8Array([ 1, 2 ]).toLocaleString();
-1 9851 }) || !fails(function() {
-1 9852 Int8Array.prototype.toLocaleString.call([ 1, 2 ]);
-1 9853 });
-1 9854 ArrayBufferViewCore.exportProto('toLocaleString', function toLocaleString() {
-1 9855 return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);
-1 9856 }, FORCED);
-1 9857 }, {
-1 9858 '../internals/array-buffer-view-core': 39,
-1 9859 '../internals/fails': 61,
-1 9860 '../internals/global': 65
-1 9861 } ],
-1 9862 145: [ function(_dereq_, module, exports) {
-1 9863 'use strict';
-1 9864 var global = _dereq_('../internals/global');
-1 9865 var ArrayBufferViewCore = _dereq_('../internals/array-buffer-view-core');
-1 9866 var fails = _dereq_('../internals/fails');
-1 9867 var Uint8Array = global.Uint8Array;
-1 9868 var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype;
-1 9869 var arrayToString = [].toString;
-1 9870 var arrayJoin = [].join;
-1 9871 if (fails(function() {
-1 9872 arrayToString.call({});
-1 9873 })) {
-1 9874 arrayToString = function toString() {
-1 9875 return arrayJoin.call(this);
-1 9876 };
-1 9877 }
-1 9878 ArrayBufferViewCore.exportProto('toString', arrayToString, (Uint8ArrayPrototype || {}).toString != arrayToString);
-1 9879 }, {
-1 9880 '../internals/array-buffer-view-core': 39,
-1 9881 '../internals/fails': 61,
-1 9882 '../internals/global': 65
-1 9883 } ],
-1 9884 146: [ function(_dereq_, module, exports) {
-1 9885 var typedArrayConstructor = _dereq_('../internals/typed-array-constructor');
-1 9886 typedArrayConstructor('Uint32', 4, function(init) {
-1 9887 return function Uint32Array(data, byteOffset, length) {
-1 9888 return init(this, data, byteOffset, length);
-1 9889 };
-1 9890 });
-1 9891 }, {
-1 9892 '../internals/typed-array-constructor': 114
-1 9893 } ],
-1 9894 147: [ function(_dereq_, module, exports) {
-1 9895 module.exports = {
-1 9896 CssSelectorParser: _dereq_('./lib/css-selector-parser.js').CssSelectorParser
-1 9897 };
-1 9898 }, {
-1 9899 './lib/css-selector-parser.js': 148
-1 9900 } ],
-1 9901 148: [ function(_dereq_, module, exports) {
-1 9902 function CssSelectorParser() {
-1 9903 this.pseudos = {};
-1 9904 this.attrEqualityMods = {};
-1 9905 this.ruleNestingOperators = {};
-1 9906 this.substitutesEnabled = false;
-1 9907 }
-1 9908 CssSelectorParser.prototype.registerSelectorPseudos = function(name) {
-1 9909 for (var j = 0, len = arguments.length; j < len; j++) {
-1 9910 name = arguments[j];
-1 9911 this.pseudos[name] = 'selector';
-1 9912 }
-1 9913 return this;
-1 9914 };
-1 9915 CssSelectorParser.prototype.unregisterSelectorPseudos = function(name) {
-1 9916 for (var j = 0, len = arguments.length; j < len; j++) {
-1 9917 name = arguments[j];
-1 9918 delete this.pseudos[name];
-1 9919 }
-1 9920 return this;
-1 9921 };
-1 9922 CssSelectorParser.prototype.registerNumericPseudos = function(name) {
-1 9923 for (var j = 0, len = arguments.length; j < len; j++) {
-1 9924 name = arguments[j];
-1 9925 this.pseudos[name] = 'numeric';
-1 9926 }
-1 9927 return this;
-1 9928 };
-1 9929 CssSelectorParser.prototype.unregisterNumericPseudos = function(name) {
-1 9930 for (var j = 0, len = arguments.length; j < len; j++) {
-1 9931 name = arguments[j];
-1 9932 delete this.pseudos[name];
-1 9933 }
-1 9934 return this;
-1 9935 };
-1 9936 CssSelectorParser.prototype.registerNestingOperators = function(operator) {
-1 9937 for (var j = 0, len = arguments.length; j < len; j++) {
-1 9938 operator = arguments[j];
-1 9939 this.ruleNestingOperators[operator] = true;
-1 9940 }
-1 9941 return this;
-1 9942 };
-1 9943 CssSelectorParser.prototype.unregisterNestingOperators = function(operator) {
-1 9944 for (var j = 0, len = arguments.length; j < len; j++) {
-1 9945 operator = arguments[j];
-1 9946 delete this.ruleNestingOperators[operator];
-1 9947 }
-1 9948 return this;
-1 9949 };
-1 9950 CssSelectorParser.prototype.registerAttrEqualityMods = function(mod) {
-1 9951 for (var j = 0, len = arguments.length; j < len; j++) {
-1 9952 mod = arguments[j];
-1 9953 this.attrEqualityMods[mod] = true;
-1 9954 }
-1 9955 return this;
-1 9956 };
-1 9957 CssSelectorParser.prototype.unregisterAttrEqualityMods = function(mod) {
-1 9958 for (var j = 0, len = arguments.length; j < len; j++) {
-1 9959 mod = arguments[j];
-1 9960 delete this.attrEqualityMods[mod];
-1 9961 }
-1 9962 return this;
-1 9963 };
-1 9964 CssSelectorParser.prototype.enableSubstitutes = function() {
-1 9965 this.substitutesEnabled = true;
-1 9966 return this;
-1 9967 };
-1 9968 CssSelectorParser.prototype.disableSubstitutes = function() {
-1 9969 this.substitutesEnabled = false;
-1 9970 return this;
-1 9971 };
-1 9972 function isIdentStart(c) {
-1 9973 return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c === '-' || c === '_';
-1 9974 }
-1 9975 function isIdent(c) {
-1 9976 return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c === '-' || c === '_';
-1 9977 }
-1 9978 function isHex(c) {
-1 9979 return c >= 'a' && c <= 'f' || c >= 'A' && c <= 'F' || c >= '0' && c <= '9';
-1 9980 }
-1 9981 function isDecimal(c) {
-1 9982 return c >= '0' && c <= '9';
-1 9983 }
-1 9984 function isAttrMatchOperator(chr) {
-1 9985 return chr === '=' || chr === '^' || chr === '$' || chr === '*' || chr === '~';
-1 9986 }
-1 9987 var identSpecialChars = {
-1 9988 '!': true,
-1 9989 '"': true,
-1 9990 '#': true,
-1 9991 $: true,
-1 9992 '%': true,
-1 9993 '&': true,
-1 9994 '\'': true,
-1 9995 '(': true,
-1 9996 ')': true,
-1 9997 '*': true,
-1 9998 '+': true,
-1 9999 ',': true,
-1 10000 '.': true,
-1 10001 '/': true,
-1 10002 ';': true,
-1 10003 '<': true,
-1 10004 '=': true,
-1 10005 '>': true,
-1 10006 '?': true,
-1 10007 '@': true,
-1 10008 '[': true,
-1 10009 '\\': true,
-1 10010 ']': true,
-1 10011 '^': true,
-1 10012 '`': true,
-1 10013 '{': true,
-1 10014 '|': true,
-1 10015 '}': true,
-1 10016 '~': true
-1 10017 };
-1 10018 var strReplacementsRev = {
-1 10019 '\n': '\\n',
-1 10020 '\r': '\\r',
-1 10021 '\t': '\\t',
-1 10022 '\f': '\\f',
-1 10023 '\v': '\\v'
-1 10024 };
-1 10025 var singleQuoteEscapeChars = {
-1 10026 n: '\n',
-1 10027 r: '\r',
-1 10028 t: '\t',
-1 10029 f: '\f',
-1 10030 '\\': '\\',
-1 10031 '\'': '\''
-1 10032 };
-1 10033 var doubleQuotesEscapeChars = {
-1 10034 n: '\n',
-1 10035 r: '\r',
-1 10036 t: '\t',
-1 10037 f: '\f',
-1 10038 '\\': '\\',
-1 10039 '"': '"'
-1 10040 };
-1 10041 function ParseContext(str, pos, pseudos, attrEqualityMods, ruleNestingOperators, substitutesEnabled) {
-1 10042 var chr, getIdent, getStr, l, skipWhitespace;
-1 10043 l = str.length;
-1 10044 chr = null;
-1 10045 getStr = function(quote, escapeTable) {
-1 10046 var esc, hex, result;
-1 10047 result = '';
-1 10048 pos++;
-1 10049 chr = str.charAt(pos);
-1 10050 while (pos < l) {
-1 10051 if (chr === quote) {
-1 10052 pos++;
-1 10053 return result;
-1 10054 } else if (chr === '\\') {
-1 10055 pos++;
-1 10056 chr = str.charAt(pos);
-1 10057 if (chr === quote) {
-1 10058 result += quote;
-1 10059 } else if (esc = escapeTable[chr]) {
-1 10060 result += esc;
-1 10061 } else if (isHex(chr)) {
-1 10062 hex = chr;
-1 10063 pos++;
-1 10064 chr = str.charAt(pos);
-1 10065 while (isHex(chr)) {
-1 10066 hex += chr;
-1 10067 pos++;
-1 10068 chr = str.charAt(pos);
-1 10069 }
-1 10070 if (chr === ' ') {
-1 10071 pos++;
-1 10072 chr = str.charAt(pos);
-1 10073 }
-1 10074 result += String.fromCharCode(parseInt(hex, 16));
-1 10075 continue;
-1 10076 } else {
-1 10077 result += chr;
-1 10078 }
-1 10079 } else {
-1 10080 result += chr;
-1 10081 }
-1 10082 pos++;
-1 10083 chr = str.charAt(pos);
-1 10084 }
-1 10085 return result;
-1 10086 };
-1 10087 getIdent = function() {
-1 10088 var result = '';
-1 10089 chr = str.charAt(pos);
-1 10090 while (pos < l) {
-1 10091 if (isIdent(chr)) {
-1 10092 result += chr;
-1 10093 } else if (chr === '\\') {
-1 10094 pos++;
-1 10095 if (pos >= l) {
-1 10096 throw Error('Expected symbol but end of file reached.');
-1 10097 }
-1 10098 chr = str.charAt(pos);
-1 10099 if (identSpecialChars[chr]) {
-1 10100 result += chr;
-1 10101 } else if (isHex(chr)) {
-1 10102 var hex = chr;
-1 10103 pos++;
-1 10104 chr = str.charAt(pos);
-1 10105 while (isHex(chr)) {
-1 10106 hex += chr;
-1 10107 pos++;
-1 10108 chr = str.charAt(pos);
-1 10109 }
-1 10110 if (chr === ' ') {
-1 10111 pos++;
-1 10112 chr = str.charAt(pos);
-1 10113 }
-1 10114 result += String.fromCharCode(parseInt(hex, 16));
-1 10115 continue;
-1 10116 } else {
-1 10117 result += chr;
-1 10118 }
-1 10119 } else {
-1 10120 return result;
-1 10121 }
-1 10122 pos++;
-1 10123 chr = str.charAt(pos);
-1 10124 }
-1 10125 return result;
-1 10126 };
-1 10127 skipWhitespace = function() {
-1 10128 chr = str.charAt(pos);
-1 10129 var result = false;
-1 10130 while (chr === ' ' || chr === '\t' || chr === '\n' || chr === '\r' || chr === '\f') {
-1 10131 result = true;
-1 10132 pos++;
-1 10133 chr = str.charAt(pos);
-1 10134 }
-1 10135 return result;
-1 10136 };
-1 10137 this.parse = function() {
-1 10138 var res = this.parseSelector();
-1 10139 if (pos < l) {
-1 10140 throw Error('Rule expected but "' + str.charAt(pos) + '" found.');
-1 10141 }
-1 10142 return res;
-1 10143 };
-1 10144 this.parseSelector = function() {
-1 10145 var res;
-1 10146 var selector = res = this.parseSingleSelector();
-1 10147 chr = str.charAt(pos);
-1 10148 while (chr === ',') {
-1 10149 pos++;
-1 10150 skipWhitespace();
-1 10151 if (res.type !== 'selectors') {
-1 10152 res = {
-1 10153 type: 'selectors',
-1 10154 selectors: [ selector ]
-1 10155 };
-1 10156 }
-1 10157 selector = this.parseSingleSelector();
-1 10158 if (!selector) {
-1 10159 throw Error('Rule expected after ",".');
-1 10160 }
-1 10161 res.selectors.push(selector);
-1 10162 }
-1 10163 return res;
-1 10164 };
-1 10165 this.parseSingleSelector = function() {
-1 10166 skipWhitespace();
-1 10167 var selector = {
-1 10168 type: 'ruleSet'
-1 10169 };
-1 10170 var rule = this.parseRule();
-1 10171 if (!rule) {
-1 10172 return null;
-1 10173 }
-1 10174 var currentRule = selector;
-1 10175 while (rule) {
-1 10176 rule.type = 'rule';
-1 10177 currentRule.rule = rule;
-1 10178 currentRule = rule;
-1 10179 skipWhitespace();
-1 10180 chr = str.charAt(pos);
-1 10181 if (pos >= l || chr === ',' || chr === ')') {
-1 10182 break;
-1 10183 }
-1 10184 if (ruleNestingOperators[chr]) {
-1 10185 var op = chr;
-1 10186 pos++;
-1 10187 skipWhitespace();
-1 10188 rule = this.parseRule();
-1 10189 if (!rule) {
-1 10190 throw Error('Rule expected after "' + op + '".');
-1 10191 }
-1 10192 rule.nestingOperator = op;
-1 10193 } else {
-1 10194 rule = this.parseRule();
-1 10195 if (rule) {
-1 10196 rule.nestingOperator = null;
-1 10197 }
-1 10198 }
-1 10199 }
-1 10200 return selector;
-1 10201 };
-1 10202 this.parseRule = function() {
-1 10203 var rule = null;
-1 10204 while (pos < l) {
-1 10205 chr = str.charAt(pos);
-1 10206 if (chr === '*') {
-1 10207 pos++;
-1 10208 (rule = rule || {}).tagName = '*';
-1 10209 } else if (isIdentStart(chr) || chr === '\\') {
-1 10210 (rule = rule || {}).tagName = getIdent();
-1 10211 } else if (chr === '.') {
-1 10212 pos++;
-1 10213 rule = rule || {};
-1 10214 (rule.classNames = rule.classNames || []).push(getIdent());
-1 10215 } else if (chr === '#') {
-1 10216 pos++;
-1 10217 (rule = rule || {}).id = getIdent();
-1 10218 } else if (chr === '[') {
-1 10219 pos++;
-1 10220 skipWhitespace();
-1 10221 var attr = {
-1 10222 name: getIdent()
-1 10223 };
-1 10224 skipWhitespace();
-1 10225 if (chr === ']') {
-1 10226 pos++;
-1 10227 } else {
-1 10228 var operator = '';
-1 10229 if (attrEqualityMods[chr]) {
-1 10230 operator = chr;
-1 10231 pos++;
-1 10232 chr = str.charAt(pos);
-1 10233 }
-1 10234 if (pos >= l) {
-1 10235 throw Error('Expected "=" but end of file reached.');
-1 10236 }
-1 10237 if (chr !== '=') {
-1 10238 throw Error('Expected "=" but "' + chr + '" found.');
-1 10239 }
-1 10240 attr.operator = operator + '=';
-1 10241 pos++;
-1 10242 skipWhitespace();
-1 10243 var attrValue = '';
-1 10244 attr.valueType = 'string';
-1 10245 if (chr === '"') {
-1 10246 attrValue = getStr('"', doubleQuotesEscapeChars);
-1 10247 } else if (chr === '\'') {
-1 10248 attrValue = getStr('\'', singleQuoteEscapeChars);
-1 10249 } else if (substitutesEnabled && chr === '$') {
-1 10250 pos++;
-1 10251 attrValue = getIdent();
-1 10252 attr.valueType = 'substitute';
-1 10253 } else {
-1 10254 while (pos < l) {
-1 10255 if (chr === ']') {
-1 10256 break;
-1 10257 }
-1 10258 attrValue += chr;
-1 10259 pos++;
-1 10260 chr = str.charAt(pos);
-1 10261 }
-1 10262 attrValue = attrValue.trim();
-1 10263 }
-1 10264 skipWhitespace();
-1 10265 if (pos >= l) {
-1 10266 throw Error('Expected "]" but end of file reached.');
-1 10267 }
-1 10268 if (chr !== ']') {
-1 10269 throw Error('Expected "]" but "' + chr + '" found.');
-1 10270 }
-1 10271 pos++;
-1 10272 attr.value = attrValue;
-1 10273 }
-1 10274 rule = rule || {};
-1 10275 (rule.attrs = rule.attrs || []).push(attr);
-1 10276 } else if (chr === ':') {
-1 10277 pos++;
-1 10278 var pseudoName = getIdent();
-1 10279 var pseudo = {
-1 10280 name: pseudoName
-1 10281 };
-1 10282 if (chr === '(') {
-1 10283 pos++;
-1 10284 var value = '';
-1 10285 skipWhitespace();
-1 10286 if (pseudos[pseudoName] === 'selector') {
-1 10287 pseudo.valueType = 'selector';
-1 10288 value = this.parseSelector();
-1 10289 } else {
-1 10290 pseudo.valueType = pseudos[pseudoName] || 'string';
-1 10291 if (chr === '"') {
-1 10292 value = getStr('"', doubleQuotesEscapeChars);
-1 10293 } else if (chr === '\'') {
-1 10294 value = getStr('\'', singleQuoteEscapeChars);
-1 10295 } else if (substitutesEnabled && chr === '$') {
-1 10296 pos++;
-1 10297 value = getIdent();
-1 10298 pseudo.valueType = 'substitute';
-1 10299 } else {
-1 10300 while (pos < l) {
-1 10301 if (chr === ')') {
-1 10302 break;
-1 10303 }
-1 10304 value += chr;
-1 10305 pos++;
-1 10306 chr = str.charAt(pos);
-1 10307 }
-1 10308 value = value.trim();
-1 10309 }
-1 10310 skipWhitespace();
-1 10311 }
-1 10312 if (pos >= l) {
-1 10313 throw Error('Expected ")" but end of file reached.');
-1 10314 }
-1 10315 if (chr !== ')') {
-1 10316 throw Error('Expected ")" but "' + chr + '" found.');
-1 10317 }
-1 10318 pos++;
-1 10319 pseudo.value = value;
-1 10320 }
-1 10321 rule = rule || {};
-1 10322 (rule.pseudos = rule.pseudos || []).push(pseudo);
-1 10323 } else {
-1 10324 break;
-1 10325 }
-1 10326 }
-1 10327 return rule;
-1 10328 };
-1 10329 return this;
-1 10330 }
-1 10331 CssSelectorParser.prototype.parse = function(str) {
-1 10332 var context = new ParseContext(str, 0, this.pseudos, this.attrEqualityMods, this.ruleNestingOperators, this.substitutesEnabled);
-1 10333 return context.parse();
-1 10334 };
-1 10335 CssSelectorParser.prototype.escapeIdentifier = function(s) {
-1 10336 var result = '';
-1 10337 var i = 0;
-1 10338 var len = s.length;
-1 10339 while (i < len) {
-1 10340 var chr = s.charAt(i);
-1 10341 if (identSpecialChars[chr]) {
-1 10342 result += '\\' + chr;
-1 10343 } else {
-1 10344 if (!(chr === '_' || chr === '-' || chr >= 'A' && chr <= 'Z' || chr >= 'a' && chr <= 'z' || i !== 0 && chr >= '0' && chr <= '9')) {
-1 10345 var charCode = chr.charCodeAt(0);
-1 10346 if ((charCode & 63488) === 55296) {
-1 10347 var extraCharCode = s.charCodeAt(i++);
-1 10348 if ((charCode & 64512) !== 55296 || (extraCharCode & 64512) !== 56320) {
-1 10349 throw Error('UCS-2(decode): illegal sequence');
-1 10350 }
-1 10351 charCode = ((charCode & 1023) << 10) + (extraCharCode & 1023) + 65536;
-1 10352 }
-1 10353 result += '\\' + charCode.toString(16) + ' ';
-1 10354 } else {
-1 10355 result += chr;
-1 10356 }
-1 10357 }
-1 10358 i++;
-1 10359 }
-1 10360 return result;
-1 10361 };
-1 10362 CssSelectorParser.prototype.escapeStr = function(s) {
-1 10363 var result = '';
-1 10364 var i = 0;
-1 10365 var len = s.length;
-1 10366 var chr, replacement;
-1 10367 while (i < len) {
-1 10368 chr = s.charAt(i);
-1 10369 if (chr === '"') {
-1 10370 chr = '\\"';
-1 10371 } else if (chr === '\\') {
-1 10372 chr = '\\\\';
-1 10373 } else if (replacement = strReplacementsRev[chr]) {
-1 10374 chr = replacement;
-1 10375 }
-1 10376 result += chr;
-1 10377 i++;
-1 10378 }
-1 10379 return '"' + result + '"';
-1 10380 };
-1 10381 CssSelectorParser.prototype.render = function(path) {
-1 10382 return this._renderEntity(path).trim();
-1 10383 };
-1 10384 CssSelectorParser.prototype._renderEntity = function(entity) {
-1 10385 var currentEntity, parts, res;
-1 10386 res = '';
-1 10387 switch (entity.type) {
-1 10388 case 'ruleSet':
-1 10389 currentEntity = entity.rule;
-1 10390 parts = [];
-1 10391 while (currentEntity) {
-1 10392 if (currentEntity.nestingOperator) {
-1 10393 parts.push(currentEntity.nestingOperator);
-1 10394 }
-1 10395 parts.push(this._renderEntity(currentEntity));
-1 10396 currentEntity = currentEntity.rule;
-1 10397 }
-1 10398 res = parts.join(' ');
-1 10399 break;
-1 10400
-1 10401 case 'selectors':
-1 10402 res = entity.selectors.map(this._renderEntity, this).join(', ');
-1 10403 break;
-1 10404
-1 10405 case 'rule':
-1 10406 if (entity.tagName) {
-1 10407 if (entity.tagName === '*') {
-1 10408 res = '*';
-1 10409 } else {
-1 10410 res = this.escapeIdentifier(entity.tagName);
-1 10411 }
-1 10412 }
-1 10413 if (entity.id) {
-1 10414 res += '#' + this.escapeIdentifier(entity.id);
-1 10415 }
-1 10416 if (entity.classNames) {
-1 10417 res += entity.classNames.map(function(cn) {
-1 10418 return '.' + this.escapeIdentifier(cn);
-1 10419 }, this).join('');
-1 10420 }
-1 10421 if (entity.attrs) {
-1 10422 res += entity.attrs.map(function(attr) {
-1 10423 if (attr.operator) {
-1 10424 if (attr.valueType === 'substitute') {
-1 10425 return '[' + this.escapeIdentifier(attr.name) + attr.operator + '$' + attr.value + ']';
-1 10426 } else {
-1 10427 return '[' + this.escapeIdentifier(attr.name) + attr.operator + this.escapeStr(attr.value) + ']';
-1 10428 }
-1 10429 } else {
-1 10430 return '[' + this.escapeIdentifier(attr.name) + ']';
-1 10431 }
-1 10432 }, this).join('');
-1 10433 }
-1 10434 if (entity.pseudos) {
-1 10435 res += entity.pseudos.map(function(pseudo) {
-1 10436 if (pseudo.valueType) {
-1 10437 if (pseudo.valueType === 'selector') {
-1 10438 return ':' + this.escapeIdentifier(pseudo.name) + '(' + this._renderEntity(pseudo.value) + ')';
-1 10439 } else if (pseudo.valueType === 'substitute') {
-1 10440 return ':' + this.escapeIdentifier(pseudo.name) + '($' + pseudo.value + ')';
-1 10441 } else if (pseudo.valueType === 'numeric') {
-1 10442 return ':' + this.escapeIdentifier(pseudo.name) + '(' + pseudo.value + ')';
-1 10443 } else {
-1 10444 return ':' + this.escapeIdentifier(pseudo.name) + '(' + this.escapeIdentifier(pseudo.value) + ')';
-1 10445 }
-1 10446 } else {
-1 10447 return ':' + this.escapeIdentifier(pseudo.name);
-1 10448 }
-1 10449 }, this).join('');
-1 10450 }
-1 10451 break;
-1 10452
-1 10453 default:
-1 10454 throw Error('Unknown entity type: "' + entity.type(+'".'));
-1 10455 }
-1 10456 return res;
-1 10457 };
-1 10458 exports.CssSelectorParser = CssSelectorParser;
-1 10459 }, {} ],
-1 10460 149: [ function(_dereq_, module, exports) {
-1 10461 'use strict';
-1 10462 var assign = _dereq_('es5-ext/object/assign'), normalizeOpts = _dereq_('es5-ext/object/normalize-options'), isCallable = _dereq_('es5-ext/object/is-callable'), contains = _dereq_('es5-ext/string/#/contains'), d;
-1 10463 d = module.exports = function(dscr, value) {
-1 10464 var c, e, w, options, desc;
-1 10465 if (arguments.length < 2 || typeof dscr !== 'string') {
-1 10466 options = value;
-1 10467 value = dscr;
-1 10468 dscr = null;
-1 10469 } else {
-1 10470 options = arguments[2];
-1 10471 }
-1 10472 if (dscr == null) {
-1 10473 c = w = true;
-1 10474 e = false;
-1 10475 } else {
-1 10476 c = contains.call(dscr, 'c');
-1 10477 e = contains.call(dscr, 'e');
-1 10478 w = contains.call(dscr, 'w');
-1 10479 }
-1 10480 desc = {
-1 10481 value: value,
-1 10482 configurable: c,
-1 10483 enumerable: e,
-1 10484 writable: w
-1 10485 };
-1 10486 return !options ? desc : assign(normalizeOpts(options), desc);
-1 10487 };
-1 10488 d.gs = function(dscr, get, set) {
-1 10489 var c, e, options, desc;
-1 10490 if (typeof dscr !== 'string') {
-1 10491 options = set;
-1 10492 set = get;
-1 10493 get = dscr;
-1 10494 dscr = null;
-1 10495 } else {
-1 10496 options = arguments[3];
-1 10497 }
-1 10498 if (get == null) {
-1 10499 get = undefined;
-1 10500 } else if (!isCallable(get)) {
-1 10501 options = get;
-1 10502 get = set = undefined;
-1 10503 } else if (set == null) {
-1 10504 set = undefined;
-1 10505 } else if (!isCallable(set)) {
-1 10506 options = set;
-1 10507 set = undefined;
-1 10508 }
-1 10509 if (dscr == null) {
-1 10510 c = true;
-1 10511 e = false;
-1 10512 } else {
-1 10513 c = contains.call(dscr, 'c');
-1 10514 e = contains.call(dscr, 'e');
-1 10515 }
-1 10516 desc = {
-1 10517 get: get,
-1 10518 set: set,
-1 10519 configurable: c,
-1 10520 enumerable: e
-1 10521 };
-1 10522 return !options ? desc : assign(normalizeOpts(options), desc);
-1 10523 };
-1 10524 }, {
-1 10525 'es5-ext/object/assign': 170,
-1 10526 'es5-ext/object/is-callable': 174,
-1 10527 'es5-ext/object/normalize-options': 182,
-1 10528 'es5-ext/string/#/contains': 189
-1 10529 } ],
-1 10530 150: [ function(_dereq_, module, exports) {
-1 10531 'use strict';
-1 10532 module.exports = function() {
-1 10533 return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
-1 10534 };
-1 10535 }, {} ],
-1 10536 151: [ function(_dereq_, module, exports) {
-1 10537 'use strict';
-1 10538 var numberIsNaN = _dereq_('../../number/is-nan'), toPosInt = _dereq_('../../number/to-pos-integer'), value = _dereq_('../../object/valid-value'), indexOf = Array.prototype.indexOf, objHasOwnProperty = Object.prototype.hasOwnProperty, abs = Math.abs, floor = Math.floor;
-1 10539 module.exports = function(searchElement) {
-1 10540 var i, length, fromIndex, val;
-1 10541 if (!numberIsNaN(searchElement)) {
-1 10542 return indexOf.apply(this, arguments);
-1 10543 }
-1 10544 length = toPosInt(value(this).length);
-1 10545 fromIndex = arguments[1];
-1 10546 if (isNaN(fromIndex)) {
-1 10547 fromIndex = 0;
-1 10548 } else if (fromIndex >= 0) {
-1 10549 fromIndex = floor(fromIndex);
-1 10550 } else {
-1 10551 fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
-1 10552 }
-1 10553 for (i = fromIndex; i < length; ++i) {
-1 10554 if (objHasOwnProperty.call(this, i)) {
-1 10555 val = this[i];
-1 10556 if (numberIsNaN(val)) {
-1 10557 return i;
-1 10558 }
-1 10559 }
-1 10560 }
-1 10561 return -1;
-1 10562 };
-1 10563 }, {
-1 10564 '../../number/is-nan': 164,
-1 10565 '../../number/to-pos-integer': 168,
-1 10566 '../../object/valid-value': 185
-1 10567 } ],
-1 10568 152: [ function(_dereq_, module, exports) {
-1 10569 'use strict';
-1 10570 module.exports = _dereq_('./is-implemented')() ? Array.from : _dereq_('./shim');
-1 10571 }, {
-1 10572 './is-implemented': 153,
-1 10573 './shim': 154
-1 10574 } ],
-1 10575 153: [ function(_dereq_, module, exports) {
-1 10576 'use strict';
-1 10577 module.exports = function() {
-1 10578 var from = Array.from, arr, result;
-1 10579 if (typeof from !== 'function') {
-1 10580 return false;
-1 10581 }
-1 10582 arr = [ 'raz', 'dwa' ];
-1 10583 result = from(arr);
-1 10584 return Boolean(result && result !== arr && result[1] === 'dwa');
-1 10585 };
-1 10586 }, {} ],
-1 10587 154: [ function(_dereq_, module, exports) {
-1 10588 'use strict';
-1 10589 var iteratorSymbol = _dereq_('es6-symbol').iterator, isArguments = _dereq_('../../function/is-arguments'), isFunction = _dereq_('../../function/is-function'), toPosInt = _dereq_('../../number/to-pos-integer'), callable = _dereq_('../../object/valid-callable'), validValue = _dereq_('../../object/valid-value'), isValue = _dereq_('../../object/is-value'), isString = _dereq_('../../string/is-string'), isArray = Array.isArray, call = Function.prototype.call, desc = {
-1 10590 configurable: true,
-1 10591 enumerable: true,
-1 10592 writable: true,
-1 10593 value: null
-1 10594 }, defineProperty = Object.defineProperty;
-1 10595 module.exports = function(arrayLike) {
-1 10596 var mapFn = arguments[1], thisArg = arguments[2], Context, i, j, arr, length, code, iterator, result, getIterator, value;
-1 10597 arrayLike = Object(validValue(arrayLike));
-1 10598 if (isValue(mapFn)) {
-1 10599 callable(mapFn);
-1 10600 }
-1 10601 if (!this || this === Array || !isFunction(this)) {
-1 10602 if (!mapFn) {
-1 10603 if (isArguments(arrayLike)) {
-1 10604 length = arrayLike.length;
-1 10605 if (length !== 1) {
-1 10606 return Array.apply(null, arrayLike);
-1 10607 }
-1 10608 arr = new Array(1);
-1 10609 arr[0] = arrayLike[0];
-1 10610 return arr;
-1 10611 }
-1 10612 if (isArray(arrayLike)) {
-1 10613 arr = new Array(length = arrayLike.length);
-1 10614 for (i = 0; i < length; ++i) {
-1 10615 arr[i] = arrayLike[i];
-1 10616 }
-1 10617 return arr;
-1 10618 }
-1 10619 }
-1 10620 arr = [];
-1 10621 } else {
-1 10622 Context = this;
-1 10623 }
-1 10624 if (!isArray(arrayLike)) {
-1 10625 if ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {
-1 10626 iterator = callable(getIterator).call(arrayLike);
-1 10627 if (Context) {
-1 10628 arr = new Context();
-1 10629 }
-1 10630 result = iterator.next();
-1 10631 i = 0;
-1 10632 while (!result.done) {
-1 10633 value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;
-1 10634 if (Context) {
-1 10635 desc.value = value;
-1 10636 defineProperty(arr, i, desc);
-1 10637 } else {
-1 10638 arr[i] = value;
-1 10639 }
-1 10640 result = iterator.next();
-1 10641 ++i;
-1 10642 }
-1 10643 length = i;
-1 10644 } else if (isString(arrayLike)) {
-1 10645 length = arrayLike.length;
-1 10646 if (Context) {
-1 10647 arr = new Context();
-1 10648 }
-1 10649 for (i = 0, j = 0; i < length; ++i) {
-1 10650 value = arrayLike[i];
-1 10651 if (i + 1 < length) {
-1 10652 code = value.charCodeAt(0);
-1 10653 if (code >= 55296 && code <= 56319) {
-1 10654 value += arrayLike[++i];
-1 10655 }
-1 10656 }
-1 10657 value = mapFn ? call.call(mapFn, thisArg, value, j) : value;
-1 10658 if (Context) {
-1 10659 desc.value = value;
-1 10660 defineProperty(arr, j, desc);
-1 10661 } else {
-1 10662 arr[j] = value;
-1 10663 }
-1 10664 ++j;
-1 10665 }
-1 10666 length = j;
-1 10667 }
-1 10668 }
-1 10669 if (length === undefined) {
-1 10670 length = toPosInt(arrayLike.length);
-1 10671 if (Context) {
-1 10672 arr = new Context(length);
-1 10673 }
-1 10674 for (i = 0; i < length; ++i) {
-1 10675 value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];
-1 10676 if (Context) {
-1 10677 desc.value = value;
-1 10678 defineProperty(arr, i, desc);
-1 10679 } else {
-1 10680 arr[i] = value;
-1 10681 }
-1 10682 }
-1 10683 }
-1 10684 if (Context) {
-1 10685 desc.value = null;
-1 10686 arr.length = length;
-1 10687 }
-1 10688 return arr;
-1 10689 };
-1 10690 }, {
-1 10691 '../../function/is-arguments': 158,
-1 10692 '../../function/is-function': 159,
-1 10693 '../../number/to-pos-integer': 168,
-1 10694 '../../object/is-value': 176,
-1 10695 '../../object/valid-callable': 184,
-1 10696 '../../object/valid-value': 185,
-1 10697 '../../string/is-string': 192,
-1 10698 'es6-symbol': 195
-1 10699 } ],
-1 10700 155: [ function(_dereq_, module, exports) {
-1 10701 'use strict';
-1 10702 var from = _dereq_('./from'), isArray = Array.isArray;
-1 10703 module.exports = function(arrayLike) {
-1 10704 return isArray(arrayLike) ? arrayLike : from(arrayLike);
-1 10705 };
-1 10706 }, {
-1 10707 './from': 152
-1 10708 } ],
-1 10709 156: [ function(_dereq_, module, exports) {
-1 10710 'use strict';
-1 10711 var assign = _dereq_('../object/assign'), isObject = _dereq_('../object/is-object'), isValue = _dereq_('../object/is-value'), captureStackTrace = Error.captureStackTrace;
-1 10712 exports = module.exports = function(message) {
-1 10713 var err = new Error(message), code = arguments[1], ext = arguments[2];
-1 10714 if (!isValue(ext)) {
-1 10715 if (isObject(code)) {
-1 10716 ext = code;
-1 10717 code = null;
-1 10718 }
-1 10719 }
-1 10720 if (isValue(ext)) {
-1 10721 assign(err, ext);
-1 10722 }
-1 10723 if (isValue(code)) {
-1 10724 err.code = code;
-1 10725 }
-1 10726 if (captureStackTrace) {
-1 10727 captureStackTrace(err, exports);
-1 10728 }
-1 10729 return err;
-1 10730 };
-1 10731 }, {
-1 10732 '../object/assign': 170,
-1 10733 '../object/is-object': 175,
-1 10734 '../object/is-value': 176
-1 10735 } ],
-1 10736 157: [ function(_dereq_, module, exports) {
-1 10737 'use strict';
-1 10738 var toPosInt = _dereq_('../number/to-pos-integer');
-1 10739 var test = function(arg1, arg2) {
-1 10740 return arg2;
-1 10741 };
-1 10742 var desc, defineProperty, generate, mixin;
-1 10743 try {
-1 10744 Object.defineProperty(test, 'length', {
-1 10745 configurable: true,
-1 10746 writable: false,
-1 10747 enumerable: false,
-1 10748 value: 1
-1 10749 });
-1 10750 } catch (ignore) {}
-1 10751 if (test.length === 1) {
-1 10752 desc = {
-1 10753 configurable: true,
-1 10754 writable: false,
-1 10755 enumerable: false
-1 10756 };
-1 10757 defineProperty = Object.defineProperty;
-1 10758 module.exports = function(fn, length) {
-1 10759 length = toPosInt(length);
-1 10760 if (fn.length === length) {
-1 10761 return fn;
-1 10762 }
-1 10763 desc.value = length;
-1 10764 return defineProperty(fn, 'length', desc);
-1 10765 };
-1 10766 } else {
-1 10767 mixin = _dereq_('../object/mixin');
-1 10768 generate = function() {
-1 10769 var cache = [];
-1 10770 return function(length) {
-1 10771 var args, i = 0;
-1 10772 if (cache[length]) {
-1 10773 return cache[length];
-1 10774 }
-1 10775 args = [];
-1 10776 while (length--) {
-1 10777 args.push('a' + (++i).toString(36));
-1 10778 }
-1 10779 return new Function('fn', 'return function (' + args.join(', ') + ') { return fn.apply(this, arguments); };');
-1 10780 };
-1 10781 }();
-1 10782 module.exports = function(src, length) {
-1 10783 var target;
-1 10784 length = toPosInt(length);
-1 10785 if (src.length === length) {
-1 10786 return src;
-1 10787 }
-1 10788 target = generate(length)(src);
-1 10789 try {
-1 10790 mixin(target, src);
-1 10791 } catch (ignore) {}
-1 10792 return target;
-1 10793 };
-1 10794 }
-1 10795 }, {
-1 10796 '../number/to-pos-integer': 168,
-1 10797 '../object/mixin': 181
-1 10798 } ],
-1 10799 158: [ function(_dereq_, module, exports) {
-1 10800 'use strict';
-1 10801 var objToString = Object.prototype.toString, id = objToString.call(function() {
-1 10802 return arguments;
-1 10803 }());
-1 10804 module.exports = function(value) {
-1 10805 return objToString.call(value) === id;
-1 10806 };
-1 10807 }, {} ],
-1 10808 159: [ function(_dereq_, module, exports) {
-1 10809 'use strict';
-1 10810 var objToString = Object.prototype.toString, id = objToString.call(_dereq_('./noop'));
-1 10811 module.exports = function(value) {
-1 10812 return typeof value === 'function' && objToString.call(value) === id;
-1 10813 };
-1 10814 }, {
-1 10815 './noop': 160
-1 10816 } ],
-1 10817 160: [ function(_dereq_, module, exports) {
-1 10818 'use strict';
-1 10819 module.exports = function() {};
-1 10820 }, {} ],
-1 10821 161: [ function(_dereq_, module, exports) {
-1 10822 'use strict';
-1 10823 module.exports = _dereq_('./is-implemented')() ? Math.sign : _dereq_('./shim');
-1 10824 }, {
-1 10825 './is-implemented': 162,
-1 10826 './shim': 163
-1 10827 } ],
-1 10828 162: [ function(_dereq_, module, exports) {
-1 10829 'use strict';
-1 10830 module.exports = function() {
-1 10831 var sign = Math.sign;
-1 10832 if (typeof sign !== 'function') {
-1 10833 return false;
-1 10834 }
-1 10835 return sign(10) === 1 && sign(-20) === -1;
-1 10836 };
-1 10837 }, {} ],
-1 10838 163: [ function(_dereq_, module, exports) {
-1 10839 'use strict';
-1 10840 module.exports = function(value) {
-1 10841 value = Number(value);
-1 10842 if (isNaN(value) || value === 0) {
-1 10843 return value;
-1 10844 }
-1 10845 return value > 0 ? 1 : -1;
-1 10846 };
-1 10847 }, {} ],
-1 10848 164: [ function(_dereq_, module, exports) {
-1 10849 'use strict';
-1 10850 module.exports = _dereq_('./is-implemented')() ? Number.isNaN : _dereq_('./shim');
-1 10851 }, {
-1 10852 './is-implemented': 165,
-1 10853 './shim': 166
-1 10854 } ],
-1 10855 165: [ function(_dereq_, module, exports) {
-1 10856 'use strict';
-1 10857 module.exports = function() {
-1 10858 var numberIsNaN = Number.isNaN;
-1 10859 if (typeof numberIsNaN !== 'function') {
-1 10860 return false;
-1 10861 }
-1 10862 return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);
-1 10863 };
-1 10864 }, {} ],
-1 10865 166: [ function(_dereq_, module, exports) {
-1 10866 'use strict';
-1 10867 module.exports = function(value) {
-1 10868 return value !== value;
-1 10869 };
-1 10870 }, {} ],
-1 10871 167: [ function(_dereq_, module, exports) {
-1 10872 'use strict';
-1 10873 var sign = _dereq_('../math/sign'), abs = Math.abs, floor = Math.floor;
-1 10874 module.exports = function(value) {
-1 10875 if (isNaN(value)) {
-1 10876 return 0;
-1 10877 }
-1 10878 value = Number(value);
-1 10879 if (value === 0 || !isFinite(value)) {
-1 10880 return value;
-1 10881 }
-1 10882 return sign(value) * floor(abs(value));
-1 10883 };
-1 10884 }, {
-1 10885 '../math/sign': 161
-1 10886 } ],
-1 10887 168: [ function(_dereq_, module, exports) {
-1 10888 'use strict';
-1 10889 var toInteger = _dereq_('./to-integer'), max = Math.max;
-1 10890 module.exports = function(value) {
-1 10891 return max(0, toInteger(value));
-1 10892 };
-1 10893 }, {
-1 10894 './to-integer': 167
-1 10895 } ],
-1 10896 169: [ function(_dereq_, module, exports) {
-1 10897 'use strict';
-1 10898 var callable = _dereq_('./valid-callable'), value = _dereq_('./valid-value'), bind = Function.prototype.bind, call = Function.prototype.call, keys = Object.keys, objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;
-1 10899 module.exports = function(method, defVal) {
-1 10900 return function(obj, cb) {
-1 10901 var list, thisArg = arguments[2], compareFn = arguments[3];
-1 10902 obj = Object(value(obj));
-1 10903 callable(cb);
-1 10904 list = keys(obj);
-1 10905 if (compareFn) {
-1 10906 list.sort(typeof compareFn === 'function' ? bind.call(compareFn, obj) : undefined);
-1 10907 }
-1 10908 if (typeof method !== 'function') {
-1 10909 method = list[method];
-1 10910 }
-1 10911 return call.call(method, list, function(key, index) {
-1 10912 if (!objPropertyIsEnumerable.call(obj, key)) {
-1 10913 return defVal;
-1 10914 }
-1 10915 return call.call(cb, thisArg, obj[key], key, obj, index);
-1 10916 });
-1 10917 };
-1 10918 };
-1 10919 }, {
-1 10920 './valid-callable': 184,
-1 10921 './valid-value': 185
-1 10922 } ],
-1 10923 170: [ function(_dereq_, module, exports) {
-1 10924 'use strict';
-1 10925 module.exports = _dereq_('./is-implemented')() ? Object.assign : _dereq_('./shim');
-1 10926 }, {
-1 10927 './is-implemented': 171,
-1 10928 './shim': 172
-1 10929 } ],
-1 10930 171: [ function(_dereq_, module, exports) {
-1 10931 'use strict';
-1 10932 module.exports = function() {
-1 10933 var assign = Object.assign, obj;
-1 10934 if (typeof assign !== 'function') {
-1 10935 return false;
-1 10936 }
-1 10937 obj = {
-1 10938 foo: 'raz'
-1 10939 };
-1 10940 assign(obj, {
-1 10941 bar: 'dwa'
-1 10942 }, {
-1 10943 trzy: 'trzy'
-1 10944 });
-1 10945 return obj.foo + obj.bar + obj.trzy === 'razdwatrzy';
-1 10946 };
-1 10947 }, {} ],
-1 10948 172: [ function(_dereq_, module, exports) {
-1 10949 'use strict';
-1 10950 var keys = _dereq_('../keys'), value = _dereq_('../valid-value'), max = Math.max;
-1 10951 module.exports = function(dest, src) {
-1 10952 var error, i, length = max(arguments.length, 2), assign;
-1 10953 dest = Object(value(dest));
-1 10954 assign = function(key) {
-1 10955 try {
-1 10956 dest[key] = src[key];
-1 10957 } catch (e) {
-1 10958 if (!error) {
-1 10959 error = e;
-1 10960 }
-1 10961 }
-1 10962 };
-1 10963 for (i = 1; i < length; ++i) {
-1 10964 src = arguments[i];
-1 10965 keys(src).forEach(assign);
-1 10966 }
-1 10967 if (error !== undefined) {
-1 10968 throw error;
-1 10969 }
-1 10970 return dest;
-1 10971 };
-1 10972 }, {
-1 10973 '../keys': 177,
-1 10974 '../valid-value': 185
-1 10975 } ],
-1 10976 173: [ function(_dereq_, module, exports) {
-1 10977 'use strict';
-1 10978 module.exports = _dereq_('./_iterate')('forEach');
-1 10979 }, {
-1 10980 './_iterate': 169
-1 10981 } ],
-1 10982 174: [ function(_dereq_, module, exports) {
-1 10983 'use strict';
-1 10984 module.exports = function(obj) {
-1 10985 return typeof obj === 'function';
-1 10986 };
-1 10987 }, {} ],
-1 10988 175: [ function(_dereq_, module, exports) {
-1 10989 'use strict';
-1 10990 var isValue = _dereq_('./is-value');
-1 10991 var map = {
-1 10992 function: true,
-1 10993 object: true
-1 10994 };
-1 10995 module.exports = function(value) {
-1 10996 return isValue(value) && map[typeof value] || false;
-1 10997 };
-1 10998 }, {
-1 10999 './is-value': 176
-1 11000 } ],
-1 11001 176: [ function(_dereq_, module, exports) {
-1 11002 'use strict';
-1 11003 var _undefined = _dereq_('../function/noop')();
-1 11004 module.exports = function(val) {
-1 11005 return val !== _undefined && val !== null;
-1 11006 };
-1 11007 }, {
-1 11008 '../function/noop': 160
-1 11009 } ],
-1 11010 177: [ function(_dereq_, module, exports) {
-1 11011 'use strict';
-1 11012 module.exports = _dereq_('./is-implemented')() ? Object.keys : _dereq_('./shim');
-1 11013 }, {
-1 11014 './is-implemented': 178,
-1 11015 './shim': 179
-1 11016 } ],
-1 11017 178: [ function(_dereq_, module, exports) {
-1 11018 'use strict';
-1 11019 module.exports = function() {
-1 11020 try {
-1 11021 Object.keys('primitive');
-1 11022 return true;
-1 11023 } catch (e) {
-1 11024 return false;
-1 11025 }
-1 11026 };
-1 11027 }, {} ],
-1 11028 179: [ function(_dereq_, module, exports) {
-1 11029 'use strict';
-1 11030 var isValue = _dereq_('../is-value');
-1 11031 var keys = Object.keys;
-1 11032 module.exports = function(object) {
-1 11033 return keys(isValue(object) ? Object(object) : object);
-1 11034 };
-1 11035 }, {
-1 11036 '../is-value': 176
-1 11037 } ],
-1 11038 180: [ function(_dereq_, module, exports) {
-1 11039 'use strict';
-1 11040 var callable = _dereq_('./valid-callable'), forEach = _dereq_('./for-each'), call = Function.prototype.call;
-1 11041 module.exports = function(obj, cb) {
-1 11042 var result = {}, thisArg = arguments[2];
-1 11043 callable(cb);
-1 11044 forEach(obj, function(value, key, targetObj, index) {
-1 11045 result[key] = call.call(cb, thisArg, value, key, targetObj, index);
-1 11046 });
-1 11047 return result;
-1 11048 };
-1 11049 }, {
-1 11050 './for-each': 173,
-1 11051 './valid-callable': 184
-1 11052 } ],
-1 11053 181: [ function(_dereq_, module, exports) {
-1 11054 'use strict';
-1 11055 var value = _dereq_('./valid-value'), defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;
-1 11056 module.exports = function(target, source) {
-1 11057 var error, sourceObject = Object(value(source));
-1 11058 target = Object(value(target));
-1 11059 getOwnPropertyNames(sourceObject).forEach(function(name) {
-1 11060 try {
-1 11061 defineProperty(target, name, getOwnPropertyDescriptor(source, name));
-1 11062 } catch (e) {
-1 11063 error = e;
-1 11064 }
-1 11065 });
-1 11066 if (typeof getOwnPropertySymbols === 'function') {
-1 11067 getOwnPropertySymbols(sourceObject).forEach(function(symbol) {
-1 11068 try {
-1 11069 defineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol));
-1 11070 } catch (e) {
-1 11071 error = e;
-1 11072 }
-1 11073 });
-1 11074 }
-1 11075 if (error !== undefined) {
-1 11076 throw error;
-1 11077 }
-1 11078 return target;
-1 11079 };
-1 11080 }, {
-1 11081 './valid-value': 185
-1 11082 } ],
-1 11083 182: [ function(_dereq_, module, exports) {
-1 11084 'use strict';
-1 11085 var isValue = _dereq_('./is-value');
-1 11086 var forEach = Array.prototype.forEach, create = Object.create;
-1 11087 var process = function(src, obj) {
-1 11088 var key;
-1 11089 for (key in src) {
-1 11090 obj[key] = src[key];
-1 11091 }
-1 11092 };
-1 11093 module.exports = function(opts1) {
-1 11094 var result = create(null);
-1 11095 forEach.call(arguments, function(options) {
-1 11096 if (!isValue(options)) {
-1 11097 return;
-1 11098 }
-1 11099 process(Object(options), result);
-1 11100 });
-1 11101 return result;
-1 11102 };
-1 11103 }, {
-1 11104 './is-value': 176
-1 11105 } ],
-1 11106 183: [ function(_dereq_, module, exports) {
-1 11107 'use strict';
-1 11108 var forEach = Array.prototype.forEach, create = Object.create;
-1 11109 module.exports = function(arg) {
-1 11110 var set = create(null);
-1 11111 forEach.call(arguments, function(name) {
-1 11112 set[name] = true;
-1 11113 });
-1 11114 return set;
-1 11115 };
-1 11116 }, {} ],
-1 11117 184: [ function(_dereq_, module, exports) {
-1 11118 'use strict';
-1 11119 module.exports = function(fn) {
-1 11120 if (typeof fn !== 'function') {
-1 11121 throw new TypeError(fn + ' is not a function');
-1 11122 }
-1 11123 return fn;
-1 11124 };
-1 11125 }, {} ],
-1 11126 185: [ function(_dereq_, module, exports) {
-1 11127 'use strict';
-1 11128 var isValue = _dereq_('./is-value');
-1 11129 module.exports = function(value) {
-1 11130 if (!isValue(value)) {
-1 11131 throw new TypeError('Cannot use null or undefined');
-1 11132 }
-1 11133 return value;
-1 11134 };
-1 11135 }, {
-1 11136 './is-value': 176
-1 11137 } ],
-1 11138 186: [ function(_dereq_, module, exports) {
-1 11139 'use strict';
-1 11140 var ensureValue = _dereq_('./valid-value'), stringifiable = _dereq_('./validate-stringifiable');
-1 11141 module.exports = function(value) {
-1 11142 return stringifiable(ensureValue(value));
-1 11143 };
-1 11144 }, {
-1 11145 './valid-value': 185,
-1 11146 './validate-stringifiable': 187
-1 11147 } ],
-1 11148 187: [ function(_dereq_, module, exports) {
-1 11149 'use strict';
-1 11150 var isCallable = _dereq_('./is-callable');
-1 11151 module.exports = function(stringifiable) {
-1 11152 try {
-1 11153 if (stringifiable && isCallable(stringifiable.toString)) {
-1 11154 return stringifiable.toString();
-1 11155 }
-1 11156 return String(stringifiable);
-1 11157 } catch (e) {
-1 11158 throw new TypeError('Passed argument cannot be stringifed');
-1 11159 }
-1 11160 };
-1 11161 }, {
-1 11162 './is-callable': 174
-1 11163 } ],
-1 11164 188: [ function(_dereq_, module, exports) {
-1 11165 'use strict';
-1 11166 var isCallable = _dereq_('./object/is-callable');
-1 11167 module.exports = function(value) {
-1 11168 try {
-1 11169 if (value && isCallable(value.toString)) {
-1 11170 return value.toString();
-1 11171 }
-1 11172 return String(value);
-1 11173 } catch (e) {
-1 11174 return '<Non-coercible to string value>';
-1 11175 }
-1 11176 };
-1 11177 }, {
-1 11178 './object/is-callable': 174
-1 11179 } ],
-1 11180 189: [ function(_dereq_, module, exports) {
-1 11181 'use strict';
-1 11182 module.exports = _dereq_('./is-implemented')() ? String.prototype.contains : _dereq_('./shim');
-1 11183 }, {
-1 11184 './is-implemented': 190,
-1 11185 './shim': 191
-1 11186 } ],
-1 11187 190: [ function(_dereq_, module, exports) {
-1 11188 'use strict';
-1 11189 var str = 'razdwatrzy';
-1 11190 module.exports = function() {
-1 11191 if (typeof str.contains !== 'function') {
-1 11192 return false;
-1 11193 }
-1 11194 return str.contains('dwa') === true && str.contains('foo') === false;
-1 11195 };
-1 11196 }, {} ],
-1 11197 191: [ function(_dereq_, module, exports) {
-1 11198 'use strict';
-1 11199 var indexOf = String.prototype.indexOf;
-1 11200 module.exports = function(searchString) {
-1 11201 return indexOf.call(this, searchString, arguments[1]) > -1;
-1 11202 };
-1 11203 }, {} ],
-1 11204 192: [ function(_dereq_, module, exports) {
-1 11205 'use strict';
-1 11206 var objToString = Object.prototype.toString, id = objToString.call('');
-1 11207 module.exports = function(value) {
-1 11208 return typeof value === 'string' || value && typeof value === 'object' && (value instanceof String || objToString.call(value) === id) || false;
-1 11209 };
-1 11210 }, {} ],
-1 11211 193: [ function(_dereq_, module, exports) {
-1 11212 'use strict';
-1 11213 var safeToString = _dereq_('./safe-to-string');
-1 11214 var reNewLine = /[\n\r\u2028\u2029]/g;
-1 11215 module.exports = function(value) {
-1 11216 var string = safeToString(value);
-1 11217 if (string.length > 100) {
-1 11218 string = string.slice(0, 99) + '…';
-1 11219 }
-1 11220 string = string.replace(reNewLine, function(char) {
-1 11221 return JSON.stringify(char).slice(1, -1);
-1 11222 });
-1 11223 return string;
-1 11224 };
-1 11225 }, {
-1 11226 './safe-to-string': 188
-1 11227 } ],
-1 11228 194: [ function(_dereq_, module, exports) {
-1 11229 (function(process, global) {
-1 11230 (function(global, factory) {
-1 11231 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.ES6Promise = factory();
-1 11232 })(this, function() {
-1 11233 'use strict';
-1 11234 function objectOrFunction(x) {
-1 11235 var type = typeof x;
-1 11236 return x !== null && (type === 'object' || type === 'function');
-1 11237 }
-1 11238 function isFunction(x) {
-1 11239 return typeof x === 'function';
-1 11240 }
-1 11241 var _isArray = void 0;
-1 11242 if (Array.isArray) {
-1 11243 _isArray = Array.isArray;
-1 11244 } else {
-1 11245 _isArray = function(x) {
-1 11246 return Object.prototype.toString.call(x) === '[object Array]';
-1 11247 };
-1 11248 }
-1 11249 var isArray = _isArray;
-1 11250 var len = 0;
-1 11251 var vertxNext = void 0;
-1 11252 var customSchedulerFn = void 0;
-1 11253 var asap = function asap(callback, arg) {
-1 11254 queue[len] = callback;
-1 11255 queue[len + 1] = arg;
-1 11256 len += 2;
-1 11257 if (len === 2) {
-1 11258 if (customSchedulerFn) {
-1 11259 customSchedulerFn(flush);
-1 11260 } else {
-1 11261 scheduleFlush();
-1 11262 }
-1 11263 }
-1 11264 };
-1 11265 function setScheduler(scheduleFn) {
-1 11266 customSchedulerFn = scheduleFn;
-1 11267 }
-1 11268 function setAsap(asapFn) {
-1 11269 asap = asapFn;
-1 11270 }
-1 11271 var browserWindow = typeof window !== 'undefined' ? window : undefined;
-1 11272 var browserGlobal = browserWindow || {};
-1 11273 var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-1 11274 var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
-1 11275 var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
-1 11276 function useNextTick() {
-1 11277 return function() {
-1 11278 return process.nextTick(flush);
-1 11279 };
-1 11280 }
-1 11281 function useVertxTimer() {
-1 11282 if (typeof vertxNext !== 'undefined') {
-1 11283 return function() {
-1 11284 vertxNext(flush);
-1 11285 };
-1 11286 }
-1 11287 return useSetTimeout();
-1 11288 }
-1 11289 function useMutationObserver() {
-1 11290 var iterations = 0;
-1 11291 var observer = new BrowserMutationObserver(flush);
-1 11292 var node = document.createTextNode('');
-1 11293 observer.observe(node, {
-1 11294 characterData: true
-1 11295 });
-1 11296 return function() {
-1 11297 node.data = iterations = ++iterations % 2;
-1 11298 };
-1 11299 }
-1 11300 function useMessageChannel() {
-1 11301 var channel = new MessageChannel();
-1 11302 channel.port1.onmessage = flush;
-1 11303 return function() {
-1 11304 return channel.port2.postMessage(0);
-1 11305 };
-1 11306 }
-1 11307 function useSetTimeout() {
-1 11308 var globalSetTimeout = setTimeout;
-1 11309 return function() {
-1 11310 return globalSetTimeout(flush, 1);
-1 11311 };
-1 11312 }
-1 11313 var queue = new Array(1e3);
-1 11314 function flush() {
-1 11315 for (var i = 0; i < len; i += 2) {
-1 11316 var callback = queue[i];
-1 11317 var arg = queue[i + 1];
-1 11318 callback(arg);
-1 11319 queue[i] = undefined;
-1 11320 queue[i + 1] = undefined;
-1 11321 }
-1 11322 len = 0;
-1 11323 }
-1 11324 function attemptVertx() {
-1 11325 try {
-1 11326 var vertx = Function('return this')().require('vertx');
-1 11327 vertxNext = vertx.runOnLoop || vertx.runOnContext;
-1 11328 return useVertxTimer();
-1 11329 } catch (e) {
-1 11330 return useSetTimeout();
-1 11331 }
-1 11332 }
-1 11333 var scheduleFlush = void 0;
-1 11334 if (isNode) {
-1 11335 scheduleFlush = useNextTick();
-1 11336 } else if (BrowserMutationObserver) {
-1 11337 scheduleFlush = useMutationObserver();
-1 11338 } else if (isWorker) {
-1 11339 scheduleFlush = useMessageChannel();
-1 11340 } else if (browserWindow === undefined && typeof _dereq_ === 'function') {
-1 11341 scheduleFlush = attemptVertx();
-1 11342 } else {
-1 11343 scheduleFlush = useSetTimeout();
-1 11344 }
-1 11345 function then(onFulfillment, onRejection) {
-1 11346 var parent = this;
-1 11347 var child = new this.constructor(noop);
-1 11348 if (child[PROMISE_ID] === undefined) {
-1 11349 makePromise(child);
-1 11350 }
-1 11351 var _state = parent._state;
-1 11352 if (_state) {
-1 11353 var callback = arguments[_state - 1];
-1 11354 asap(function() {
-1 11355 return invokeCallback(_state, child, callback, parent._result);
-1 11356 });
-1 11357 } else {
-1 11358 subscribe(parent, child, onFulfillment, onRejection);
-1 11359 }
-1 11360 return child;
-1 11361 }
-1 11362 function resolve$1(object) {
-1 11363 var Constructor = this;
-1 11364 if (object && typeof object === 'object' && object.constructor === Constructor) {
-1 11365 return object;
-1 11366 }
-1 11367 var promise = new Constructor(noop);
-1 11368 resolve(promise, object);
-1 11369 return promise;
-1 11370 }
-1 11371 var PROMISE_ID = Math.random().toString(36).substring(2);
-1 11372 function noop() {}
-1 11373 var PENDING = void 0;
-1 11374 var FULFILLED = 1;
-1 11375 var REJECTED = 2;
-1 11376 function selfFulfillment() {
-1 11377 return new TypeError('You cannot resolve a promise with itself');
-1 11378 }
-1 11379 function cannotReturnOwn() {
-1 11380 return new TypeError('A promises callback cannot return that same promise.');
-1 11381 }
-1 11382 function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
-1 11383 try {
-1 11384 then$$1.call(value, fulfillmentHandler, rejectionHandler);
-1 11385 } catch (e) {
-1 11386 return e;
-1 11387 }
-1 11388 }
-1 11389 function handleForeignThenable(promise, thenable, then$$1) {
-1 11390 asap(function(promise) {
-1 11391 var sealed = false;
-1 11392 var error = tryThen(then$$1, thenable, function(value) {
-1 11393 if (sealed) {
-1 11394 return;
-1 11395 }
-1 11396 sealed = true;
-1 11397 if (thenable !== value) {
-1 11398 resolve(promise, value);
-1 11399 } else {
-1 11400 fulfill(promise, value);
-1 11401 }
-1 11402 }, function(reason) {
-1 11403 if (sealed) {
-1 11404 return;
-1 11405 }
-1 11406 sealed = true;
-1 11407 reject(promise, reason);
-1 11408 }, 'Settle: ' + (promise._label || ' unknown promise'));
-1 11409 if (!sealed && error) {
-1 11410 sealed = true;
-1 11411 reject(promise, error);
-1 11412 }
-1 11413 }, promise);
-1 11414 }
-1 11415 function handleOwnThenable(promise, thenable) {
-1 11416 if (thenable._state === FULFILLED) {
-1 11417 fulfill(promise, thenable._result);
-1 11418 } else if (thenable._state === REJECTED) {
-1 11419 reject(promise, thenable._result);
-1 11420 } else {
-1 11421 subscribe(thenable, undefined, function(value) {
-1 11422 return resolve(promise, value);
-1 11423 }, function(reason) {
-1 11424 return reject(promise, reason);
-1 11425 });
-1 11426 }
-1 11427 }
-1 11428 function handleMaybeThenable(promise, maybeThenable, then$$1) {
-1 11429 if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
-1 11430 handleOwnThenable(promise, maybeThenable);
-1 11431 } else {
-1 11432 if (then$$1 === undefined) {
-1 11433 fulfill(promise, maybeThenable);
-1 11434 } else if (isFunction(then$$1)) {
-1 11435 handleForeignThenable(promise, maybeThenable, then$$1);
-1 11436 } else {
-1 11437 fulfill(promise, maybeThenable);
-1 11438 }
-1 11439 }
-1 11440 }
-1 11441 function resolve(promise, value) {
-1 11442 if (promise === value) {
-1 11443 reject(promise, selfFulfillment());
-1 11444 } else if (objectOrFunction(value)) {
-1 11445 var then$$1 = void 0;
-1 11446 try {
-1 11447 then$$1 = value.then;
-1 11448 } catch (error) {
-1 11449 reject(promise, error);
-1 11450 return;
-1 11451 }
-1 11452 handleMaybeThenable(promise, value, then$$1);
-1 11453 } else {
-1 11454 fulfill(promise, value);
-1 11455 }
-1 11456 }
-1 11457 function publishRejection(promise) {
-1 11458 if (promise._onerror) {
-1 11459 promise._onerror(promise._result);
-1 11460 }
-1 11461 publish(promise);
-1 11462 }
-1 11463 function fulfill(promise, value) {
-1 11464 if (promise._state !== PENDING) {
-1 11465 return;
-1 11466 }
-1 11467 promise._result = value;
-1 11468 promise._state = FULFILLED;
-1 11469 if (promise._subscribers.length !== 0) {
-1 11470 asap(publish, promise);
-1 11471 }
-1 11472 }
-1 11473 function reject(promise, reason) {
-1 11474 if (promise._state !== PENDING) {
-1 11475 return;
-1 11476 }
-1 11477 promise._state = REJECTED;
-1 11478 promise._result = reason;
-1 11479 asap(publishRejection, promise);
-1 11480 }
-1 11481 function subscribe(parent, child, onFulfillment, onRejection) {
-1 11482 var _subscribers = parent._subscribers;
-1 11483 var length = _subscribers.length;
-1 11484 parent._onerror = null;
-1 11485 _subscribers[length] = child;
-1 11486 _subscribers[length + FULFILLED] = onFulfillment;
-1 11487 _subscribers[length + REJECTED] = onRejection;
-1 11488 if (length === 0 && parent._state) {
-1 11489 asap(publish, parent);
-1 11490 }
-1 11491 }
-1 11492 function publish(promise) {
-1 11493 var subscribers = promise._subscribers;
-1 11494 var settled = promise._state;
-1 11495 if (subscribers.length === 0) {
-1 11496 return;
-1 11497 }
-1 11498 var child = void 0, callback = void 0, detail = promise._result;
-1 11499 for (var i = 0; i < subscribers.length; i += 3) {
-1 11500 child = subscribers[i];
-1 11501 callback = subscribers[i + settled];
-1 11502 if (child) {
-1 11503 invokeCallback(settled, child, callback, detail);
-1 11504 } else {
-1 11505 callback(detail);
-1 11506 }
-1 11507 }
-1 11508 promise._subscribers.length = 0;
7187 11509 }
7188 -1 res = parts.join(' ');
7189 -1 break;
7190 -1
7191 -1 case 'selectors':
7192 -1 res = entity.selectors.map(this._renderEntity, this).join(', ');
7193 -1 break;
7194 -1
7195 -1 case 'rule':
7196 -1 if (entity.tagName) {
7197 -1 if (entity.tagName === '*') {
7198 -1 res = '*';
-1 11510 function invokeCallback(settled, promise, callback, detail) {
-1 11511 var hasCallback = isFunction(callback), value = void 0, error = void 0, succeeded = true;
-1 11512 if (hasCallback) {
-1 11513 try {
-1 11514 value = callback(detail);
-1 11515 } catch (e) {
-1 11516 succeeded = false;
-1 11517 error = e;
-1 11518 }
-1 11519 if (promise === value) {
-1 11520 reject(promise, cannotReturnOwn());
-1 11521 return;
-1 11522 }
7199 11523 } else {
7200 -1 res = this.escapeIdentifier(entity.tagName);
-1 11524 value = detail;
-1 11525 }
-1 11526 if (promise._state !== PENDING) {} else if (hasCallback && succeeded) {
-1 11527 resolve(promise, value);
-1 11528 } else if (succeeded === false) {
-1 11529 reject(promise, error);
-1 11530 } else if (settled === FULFILLED) {
-1 11531 fulfill(promise, value);
-1 11532 } else if (settled === REJECTED) {
-1 11533 reject(promise, value);
7201 11534 }
7202 11535 }
7203 -1 if (entity.id) {
7204 -1 res += '#' + this.escapeIdentifier(entity.id);
-1 11536 function initializePromise(promise, resolver) {
-1 11537 try {
-1 11538 resolver(function resolvePromise(value) {
-1 11539 resolve(promise, value);
-1 11540 }, function rejectPromise(reason) {
-1 11541 reject(promise, reason);
-1 11542 });
-1 11543 } catch (e) {
-1 11544 reject(promise, e);
-1 11545 }
7205 11546 }
7206 -1 if (entity.classNames) {
7207 -1 res += entity.classNames.map(function(cn) {
7208 -1 return '.' + this.escapeIdentifier(cn);
7209 -1 }, this).join('');
-1 11547 var id = 0;
-1 11548 function nextId() {
-1 11549 return id++;
7210 11550 }
7211 -1 if (entity.attrs) {
7212 -1 res += entity.attrs.map(function(attr) {
7213 -1 if (attr.operator) {
7214 -1 if (attr.valueType === 'substitute') {
7215 -1 return '[' + this.escapeIdentifier(attr.name) + attr.operator + '$' + attr.value + ']';
-1 11551 function makePromise(promise) {
-1 11552 promise[PROMISE_ID] = id++;
-1 11553 promise._state = undefined;
-1 11554 promise._result = undefined;
-1 11555 promise._subscribers = [];
-1 11556 }
-1 11557 function validationError() {
-1 11558 return new Error('Array Methods must be provided an Array');
-1 11559 }
-1 11560 var Enumerator = function() {
-1 11561 function Enumerator(Constructor, input) {
-1 11562 this._instanceConstructor = Constructor;
-1 11563 this.promise = new Constructor(noop);
-1 11564 if (!this.promise[PROMISE_ID]) {
-1 11565 makePromise(this.promise);
-1 11566 }
-1 11567 if (isArray(input)) {
-1 11568 this.length = input.length;
-1 11569 this._remaining = input.length;
-1 11570 this._result = new Array(this.length);
-1 11571 if (this.length === 0) {
-1 11572 fulfill(this.promise, this._result);
7216 11573 } else {
7217 -1 return '[' + this.escapeIdentifier(attr.name) + attr.operator + this.escapeStr(attr.value) + ']';
-1 11574 this.length = this.length || 0;
-1 11575 this._enumerate(input);
-1 11576 if (this._remaining === 0) {
-1 11577 fulfill(this.promise, this._result);
-1 11578 }
7218 11579 }
7219 11580 } else {
7220 -1 return '[' + this.escapeIdentifier(attr.name) + ']';
-1 11581 reject(this.promise, validationError());
7221 11582 }
7222 -1 }, this).join('');
7223 -1 }
7224 -1 if (entity.pseudos) {
7225 -1 res += entity.pseudos.map(function(pseudo) {
7226 -1 if (pseudo.valueType) {
7227 -1 if (pseudo.valueType === 'selector') {
7228 -1 return ':' + this.escapeIdentifier(pseudo.name) + '(' + this._renderEntity(pseudo.value) + ')';
7229 -1 } else if (pseudo.valueType === 'substitute') {
7230 -1 return ':' + this.escapeIdentifier(pseudo.name) + '($' + pseudo.value + ')';
7231 -1 } else if (pseudo.valueType === 'numeric') {
7232 -1 return ':' + this.escapeIdentifier(pseudo.name) + '(' + pseudo.value + ')';
-1 11583 }
-1 11584 Enumerator.prototype._enumerate = function _enumerate(input) {
-1 11585 for (var i = 0; this._state === PENDING && i < input.length; i++) {
-1 11586 this._eachEntry(input[i], i);
-1 11587 }
-1 11588 };
-1 11589 Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
-1 11590 var c = this._instanceConstructor;
-1 11591 var resolve$$1 = c.resolve;
-1 11592 if (resolve$$1 === resolve$1) {
-1 11593 var _then = void 0;
-1 11594 var error = void 0;
-1 11595 var didError = false;
-1 11596 try {
-1 11597 _then = entry.then;
-1 11598 } catch (e) {
-1 11599 didError = true;
-1 11600 error = e;
-1 11601 }
-1 11602 if (_then === then && entry._state !== PENDING) {
-1 11603 this._settledAt(entry._state, i, entry._result);
-1 11604 } else if (typeof _then !== 'function') {
-1 11605 this._remaining--;
-1 11606 this._result[i] = entry;
-1 11607 } else if (c === Promise$1) {
-1 11608 var promise = new c(noop);
-1 11609 if (didError) {
-1 11610 reject(promise, error);
-1 11611 } else {
-1 11612 handleMaybeThenable(promise, entry, _then);
-1 11613 }
-1 11614 this._willSettleAt(promise, i);
7233 11615 } else {
7234 -1 return ':' + this.escapeIdentifier(pseudo.name) + '(' + this.escapeIdentifier(pseudo.value) + ')';
-1 11616 this._willSettleAt(new c(function(resolve$$1) {
-1 11617 return resolve$$1(entry);
-1 11618 }), i);
7235 11619 }
7236 11620 } else {
7237 -1 return ':' + this.escapeIdentifier(pseudo.name);
-1 11621 this._willSettleAt(resolve$$1(entry), i);
7238 11622 }
7239 -1 }, this).join('');
-1 11623 };
-1 11624 Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
-1 11625 var promise = this.promise;
-1 11626 if (promise._state === PENDING) {
-1 11627 this._remaining--;
-1 11628 if (state === REJECTED) {
-1 11629 reject(promise, value);
-1 11630 } else {
-1 11631 this._result[i] = value;
-1 11632 }
-1 11633 }
-1 11634 if (this._remaining === 0) {
-1 11635 fulfill(promise, this._result);
-1 11636 }
-1 11637 };
-1 11638 Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
-1 11639 var enumerator = this;
-1 11640 subscribe(promise, undefined, function(value) {
-1 11641 return enumerator._settledAt(FULFILLED, i, value);
-1 11642 }, function(reason) {
-1 11643 return enumerator._settledAt(REJECTED, i, reason);
-1 11644 });
-1 11645 };
-1 11646 return Enumerator;
-1 11647 }();
-1 11648 function all(entries) {
-1 11649 return new Enumerator(this, entries).promise;
7240 11650 }
7241 -1 break;
7242 -1
7243 -1 default:
7244 -1 throw Error('Unknown entity type: "' + entity.type(+'".'));
-1 11651 function race(entries) {
-1 11652 var Constructor = this;
-1 11653 if (!isArray(entries)) {
-1 11654 return new Constructor(function(_, reject) {
-1 11655 return reject(new TypeError('You must pass an array to race.'));
-1 11656 });
-1 11657 } else {
-1 11658 return new Constructor(function(resolve, reject) {
-1 11659 var length = entries.length;
-1 11660 for (var i = 0; i < length; i++) {
-1 11661 Constructor.resolve(entries[i]).then(resolve, reject);
-1 11662 }
-1 11663 });
-1 11664 }
-1 11665 }
-1 11666 function reject$1(reason) {
-1 11667 var Constructor = this;
-1 11668 var promise = new Constructor(noop);
-1 11669 reject(promise, reason);
-1 11670 return promise;
-1 11671 }
-1 11672 function needsResolver() {
-1 11673 throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
-1 11674 }
-1 11675 function needsNew() {
-1 11676 throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.');
-1 11677 }
-1 11678 var Promise$1 = function() {
-1 11679 function Promise(resolver) {
-1 11680 this[PROMISE_ID] = nextId();
-1 11681 this._result = this._state = undefined;
-1 11682 this._subscribers = [];
-1 11683 if (noop !== resolver) {
-1 11684 typeof resolver !== 'function' && needsResolver();
-1 11685 this instanceof Promise ? initializePromise(this, resolver) : needsNew();
-1 11686 }
-1 11687 }
-1 11688 Promise.prototype.catch = function _catch(onRejection) {
-1 11689 return this.then(null, onRejection);
-1 11690 };
-1 11691 Promise.prototype.finally = function _finally(callback) {
-1 11692 var promise = this;
-1 11693 var constructor = promise.constructor;
-1 11694 if (isFunction(callback)) {
-1 11695 return promise.then(function(value) {
-1 11696 return constructor.resolve(callback()).then(function() {
-1 11697 return value;
-1 11698 });
-1 11699 }, function(reason) {
-1 11700 return constructor.resolve(callback()).then(function() {
-1 11701 throw reason;
-1 11702 });
-1 11703 });
-1 11704 }
-1 11705 return promise.then(callback, callback);
-1 11706 };
-1 11707 return Promise;
-1 11708 }();
-1 11709 Promise$1.prototype.then = then;
-1 11710 Promise$1.all = all;
-1 11711 Promise$1.race = race;
-1 11712 Promise$1.resolve = resolve$1;
-1 11713 Promise$1.reject = reject$1;
-1 11714 Promise$1._setScheduler = setScheduler;
-1 11715 Promise$1._setAsap = setAsap;
-1 11716 Promise$1._asap = asap;
-1 11717 function polyfill() {
-1 11718 var local = void 0;
-1 11719 if (typeof global !== 'undefined') {
-1 11720 local = global;
-1 11721 } else if (typeof self !== 'undefined') {
-1 11722 local = self;
-1 11723 } else {
-1 11724 try {
-1 11725 local = Function('return this')();
-1 11726 } catch (e) {
-1 11727 throw new Error('polyfill failed because global object is unavailable in this environment');
-1 11728 }
-1 11729 }
-1 11730 var P = local.Promise;
-1 11731 if (P) {
-1 11732 var promiseToString = null;
-1 11733 try {
-1 11734 promiseToString = Object.prototype.toString.call(P.resolve());
-1 11735 } catch (e) {}
-1 11736 if (promiseToString === '[object Promise]' && !P.cast) {
-1 11737 return;
-1 11738 }
-1 11739 }
-1 11740 local.Promise = Promise$1;
-1 11741 }
-1 11742 Promise$1.polyfill = polyfill;
-1 11743 Promise$1.Promise = Promise$1;
-1 11744 return Promise$1;
-1 11745 });
-1 11746 }).call(this, _dereq_('_process'), typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {});
-1 11747 }, {
-1 11748 _process: 222
-1 11749 } ],
-1 11750 195: [ function(_dereq_, module, exports) {
-1 11751 'use strict';
-1 11752 module.exports = _dereq_('./is-implemented')() ? Symbol : _dereq_('./polyfill');
-1 11753 }, {
-1 11754 './is-implemented': 196,
-1 11755 './polyfill': 198
-1 11756 } ],
-1 11757 196: [ function(_dereq_, module, exports) {
-1 11758 'use strict';
-1 11759 var validTypes = {
-1 11760 object: true,
-1 11761 symbol: true
-1 11762 };
-1 11763 module.exports = function() {
-1 11764 var symbol;
-1 11765 if (typeof Symbol !== 'function') {
-1 11766 return false;
7245 11767 }
7246 -1 return res;
-1 11768 symbol = Symbol('test symbol');
-1 11769 try {
-1 11770 String(symbol);
-1 11771 } catch (e) {
-1 11772 return false;
-1 11773 }
-1 11774 if (!validTypes[typeof Symbol.iterator]) {
-1 11775 return false;
-1 11776 }
-1 11777 if (!validTypes[typeof Symbol.toPrimitive]) {
-1 11778 return false;
-1 11779 }
-1 11780 if (!validTypes[typeof Symbol.toStringTag]) {
-1 11781 return false;
-1 11782 }
-1 11783 return true;
7247 11784 };
7248 -1 exports.CssSelectorParser = CssSelectorParser;
7249 11785 }, {} ],
7250 -1 29: [ function(_dereq_, module, exports) {
7251 -1 (function() {
7252 -1 'use strict';
7253 -1 var doT = {
7254 -1 name: 'doT',
7255 -1 version: '1.1.1',
7256 -1 templateSettings: {
7257 -1 evaluate: /\{\{([\s\S]+?(\}?)+)\}\}/g,
7258 -1 interpolate: /\{\{=([\s\S]+?)\}\}/g,
7259 -1 encode: /\{\{!([\s\S]+?)\}\}/g,
7260 -1 use: /\{\{#([\s\S]+?)\}\}/g,
7261 -1 useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,
7262 -1 define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,
7263 -1 defineParams: /^\s*([\w$]+):([\s\S]+)/,
7264 -1 conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,
7265 -1 iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,
7266 -1 varname: 'it',
7267 -1 strip: true,
7268 -1 append: true,
7269 -1 selfcontained: false,
7270 -1 doNotSkipEncoded: false
7271 -1 },
7272 -1 template: undefined,
7273 -1 compile: undefined,
7274 -1 log: true
7275 -1 }, _globals;
7276 -1 doT.encodeHTMLSource = function(doNotSkipEncoded) {
7277 -1 var encodeHTMLRules = {
7278 -1 '&': '&',
7279 -1 '<': '<',
7280 -1 '>': '>',
7281 -1 '"': '"',
7282 -1 '\'': ''',
7283 -1 '/': '/'
7284 -1 }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
7285 -1 return function(code) {
7286 -1 return code ? code.toString().replace(matchHTML, function(m) {
7287 -1 return encodeHTMLRules[m] || m;
7288 -1 }) : '';
7289 -1 };
-1 11786 197: [ function(_dereq_, module, exports) {
-1 11787 'use strict';
-1 11788 module.exports = function(x) {
-1 11789 if (!x) {
-1 11790 return false;
-1 11791 }
-1 11792 if (typeof x === 'symbol') {
-1 11793 return true;
-1 11794 }
-1 11795 if (!x.constructor) {
-1 11796 return false;
-1 11797 }
-1 11798 if (x.constructor.name !== 'Symbol') {
-1 11799 return false;
-1 11800 }
-1 11801 return x[x.constructor.toStringTag] === 'Symbol';
-1 11802 };
-1 11803 }, {} ],
-1 11804 198: [ function(_dereq_, module, exports) {
-1 11805 'use strict';
-1 11806 var d = _dereq_('d'), validateSymbol = _dereq_('./validate-symbol'), create = Object.create, defineProperties = Object.defineProperties, defineProperty = Object.defineProperty, objPrototype = Object.prototype, NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create(null), isNativeSafe;
-1 11807 if (typeof Symbol === 'function') {
-1 11808 NativeSymbol = Symbol;
-1 11809 try {
-1 11810 String(NativeSymbol());
-1 11811 isNativeSafe = true;
-1 11812 } catch (ignore) {}
-1 11813 }
-1 11814 var generateName = function() {
-1 11815 var created = create(null);
-1 11816 return function(desc) {
-1 11817 var postfix = 0, name, ie11BugWorkaround;
-1 11818 while (created[desc + (postfix || '')]) {
-1 11819 ++postfix;
-1 11820 }
-1 11821 desc += postfix || '';
-1 11822 created[desc] = true;
-1 11823 name = '@@' + desc;
-1 11824 defineProperty(objPrototype, name, d.gs(null, function(value) {
-1 11825 if (ie11BugWorkaround) {
-1 11826 return;
-1 11827 }
-1 11828 ie11BugWorkaround = true;
-1 11829 defineProperty(this, name, d(value));
-1 11830 ie11BugWorkaround = false;
-1 11831 }));
-1 11832 return name;
7290 11833 };
7291 -1 _globals = function() {
7292 -1 return this || {};
7293 -1 }();
7294 -1 if (typeof module !== 'undefined' && module.exports) {
7295 -1 module.exports = doT;
7296 -1 } else if (typeof define === 'function' && define.amd) {
7297 -1 define(function() {
7298 -1 return doT;
7299 -1 });
-1 11834 }();
-1 11835 HiddenSymbol = function Symbol(description) {
-1 11836 if (this instanceof HiddenSymbol) {
-1 11837 throw new TypeError('Symbol is not a constructor');
-1 11838 }
-1 11839 return SymbolPolyfill(description);
-1 11840 };
-1 11841 module.exports = SymbolPolyfill = function Symbol(description) {
-1 11842 var symbol;
-1 11843 if (this instanceof Symbol) {
-1 11844 throw new TypeError('Symbol is not a constructor');
-1 11845 }
-1 11846 if (isNativeSafe) {
-1 11847 return NativeSymbol(description);
-1 11848 }
-1 11849 symbol = create(HiddenSymbol.prototype);
-1 11850 description = description === undefined ? '' : String(description);
-1 11851 return defineProperties(symbol, {
-1 11852 __description__: d('', description),
-1 11853 __name__: d('', generateName(description))
-1 11854 });
-1 11855 };
-1 11856 defineProperties(SymbolPolyfill, {
-1 11857 for: d(function(key) {
-1 11858 if (globalSymbols[key]) {
-1 11859 return globalSymbols[key];
-1 11860 }
-1 11861 return globalSymbols[key] = SymbolPolyfill(String(key));
-1 11862 }),
-1 11863 keyFor: d(function(s) {
-1 11864 var key;
-1 11865 validateSymbol(s);
-1 11866 for (key in globalSymbols) {
-1 11867 if (globalSymbols[key] === s) {
-1 11868 return key;
-1 11869 }
-1 11870 }
-1 11871 }),
-1 11872 hasInstance: d('', NativeSymbol && NativeSymbol.hasInstance || SymbolPolyfill('hasInstance')),
-1 11873 isConcatSpreadable: d('', NativeSymbol && NativeSymbol.isConcatSpreadable || SymbolPolyfill('isConcatSpreadable')),
-1 11874 iterator: d('', NativeSymbol && NativeSymbol.iterator || SymbolPolyfill('iterator')),
-1 11875 match: d('', NativeSymbol && NativeSymbol.match || SymbolPolyfill('match')),
-1 11876 replace: d('', NativeSymbol && NativeSymbol.replace || SymbolPolyfill('replace')),
-1 11877 search: d('', NativeSymbol && NativeSymbol.search || SymbolPolyfill('search')),
-1 11878 species: d('', NativeSymbol && NativeSymbol.species || SymbolPolyfill('species')),
-1 11879 split: d('', NativeSymbol && NativeSymbol.split || SymbolPolyfill('split')),
-1 11880 toPrimitive: d('', NativeSymbol && NativeSymbol.toPrimitive || SymbolPolyfill('toPrimitive')),
-1 11881 toStringTag: d('', NativeSymbol && NativeSymbol.toStringTag || SymbolPolyfill('toStringTag')),
-1 11882 unscopables: d('', NativeSymbol && NativeSymbol.unscopables || SymbolPolyfill('unscopables'))
-1 11883 });
-1 11884 defineProperties(HiddenSymbol.prototype, {
-1 11885 constructor: d(SymbolPolyfill),
-1 11886 toString: d('', function() {
-1 11887 return this.__name__;
-1 11888 })
-1 11889 });
-1 11890 defineProperties(SymbolPolyfill.prototype, {
-1 11891 toString: d(function() {
-1 11892 return 'Symbol (' + validateSymbol(this).__description__ + ')';
-1 11893 }),
-1 11894 valueOf: d(function() {
-1 11895 return validateSymbol(this);
-1 11896 })
-1 11897 });
-1 11898 defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('', function() {
-1 11899 var symbol = validateSymbol(this);
-1 11900 if (typeof symbol === 'symbol') {
-1 11901 return symbol;
-1 11902 }
-1 11903 return symbol.toString();
-1 11904 }));
-1 11905 defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol'));
-1 11906 defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));
-1 11907 defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));
-1 11908 }, {
-1 11909 './validate-symbol': 199,
-1 11910 d: 149
-1 11911 } ],
-1 11912 199: [ function(_dereq_, module, exports) {
-1 11913 'use strict';
-1 11914 var isSymbol = _dereq_('./is-symbol');
-1 11915 module.exports = function(value) {
-1 11916 if (!isSymbol(value)) {
-1 11917 throw new TypeError(value + ' is not a symbol');
-1 11918 }
-1 11919 return value;
-1 11920 };
-1 11921 }, {
-1 11922 './is-symbol': 197
-1 11923 } ],
-1 11924 200: [ function(_dereq_, module, exports) {
-1 11925 'use strict';
-1 11926 var d = _dereq_('d'), callable = _dereq_('es5-ext/object/valid-callable'), apply = Function.prototype.apply, call = Function.prototype.call, create = Object.create, defineProperty = Object.defineProperty, defineProperties = Object.defineProperties, hasOwnProperty = Object.prototype.hasOwnProperty, descriptor = {
-1 11927 configurable: true,
-1 11928 enumerable: false,
-1 11929 writable: true
-1 11930 }, on, once, off, emit, methods, descriptors, base;
-1 11931 on = function(type, listener) {
-1 11932 var data;
-1 11933 callable(listener);
-1 11934 if (!hasOwnProperty.call(this, '__ee__')) {
-1 11935 data = descriptor.value = create(null);
-1 11936 defineProperty(this, '__ee__', descriptor);
-1 11937 descriptor.value = null;
7300 11938 } else {
7301 -1 _globals.doT = doT;
-1 11939 data = this.__ee__;
7302 11940 }
7303 -1 var startend = {
7304 -1 append: {
7305 -1 start: '\'+(',
7306 -1 end: ')+\'',
7307 -1 startencode: '\'+encodeHTML('
7308 -1 },
7309 -1 split: {
7310 -1 start: '\';out+=(',
7311 -1 end: ');out+=\'',
7312 -1 startencode: '\';out+=encodeHTML('
7313 -1 }
7314 -1 }, skip = /$^/;
7315 -1 function resolveDefs(c, block, def) {
7316 -1 return (typeof block === 'string' ? block : block.toString()).replace(c.define || skip, function(m, code, assign, value) {
7317 -1 if (code.indexOf('def.') === 0) {
7318 -1 code = code.substring(4);
7319 -1 }
7320 -1 if (!(code in def)) {
7321 -1 if (assign === ':') {
7322 -1 if (c.defineParams) {
7323 -1 value.replace(c.defineParams, function(m, param, v) {
7324 -1 def[code] = {
7325 -1 arg: param,
7326 -1 text: v
7327 -1 };
7328 -1 });
7329 -1 }
7330 -1 if (!(code in def)) {
7331 -1 def[code] = value;
7332 -1 }
-1 11941 if (!data[type]) {
-1 11942 data[type] = listener;
-1 11943 } else if (typeof data[type] === 'object') {
-1 11944 data[type].push(listener);
-1 11945 } else {
-1 11946 data[type] = [ data[type], listener ];
-1 11947 }
-1 11948 return this;
-1 11949 };
-1 11950 once = function(type, listener) {
-1 11951 var once, self;
-1 11952 callable(listener);
-1 11953 self = this;
-1 11954 on.call(this, type, once = function() {
-1 11955 off.call(self, type, once);
-1 11956 apply.call(listener, this, arguments);
-1 11957 });
-1 11958 once.__eeOnceListener__ = listener;
-1 11959 return this;
-1 11960 };
-1 11961 off = function(type, listener) {
-1 11962 var data, listeners, candidate, i;
-1 11963 callable(listener);
-1 11964 if (!hasOwnProperty.call(this, '__ee__')) {
-1 11965 return this;
-1 11966 }
-1 11967 data = this.__ee__;
-1 11968 if (!data[type]) {
-1 11969 return this;
-1 11970 }
-1 11971 listeners = data[type];
-1 11972 if (typeof listeners === 'object') {
-1 11973 for (i = 0; candidate = listeners[i]; ++i) {
-1 11974 if (candidate === listener || candidate.__eeOnceListener__ === listener) {
-1 11975 if (listeners.length === 2) {
-1 11976 data[type] = listeners[i ? 0 : 1];
7333 11977 } else {
7334 -1 new Function('def', 'def[\'' + code + '\']=' + value)(def);
-1 11978 listeners.splice(i, 1);
7335 11979 }
7336 11980 }
7337 -1 return '';
7338 -1 }).replace(c.use || skip, function(m, code) {
7339 -1 if (c.useParams) {
7340 -1 code = code.replace(c.useParams, function(m, s, d, param) {
7341 -1 if (def[d] && def[d].arg && param) {
7342 -1 var rw = (d + ':' + param).replace(/'|\\/g, '_');
7343 -1 def.__exp = def.__exp || {};
7344 -1 def.__exp[rw] = def[d].text.replace(new RegExp('(^|[^\\w$])' + def[d].arg + '([^\\w$])', 'g'), '$1' + param + '$2');
7345 -1 return s + 'def.__exp[\'' + rw + '\']';
7346 -1 }
7347 -1 });
7348 -1 }
7349 -1 var v = new Function('def', 'return ' + code)(def);
7350 -1 return v ? resolveDefs(c, v, def) : v;
7351 -1 });
-1 11981 }
-1 11982 } else {
-1 11983 if (listeners === listener || listeners.__eeOnceListener__ === listener) {
-1 11984 delete data[type];
-1 11985 }
-1 11986 }
-1 11987 return this;
-1 11988 };
-1 11989 emit = function(type) {
-1 11990 var i, l, listener, listeners, args;
-1 11991 if (!hasOwnProperty.call(this, '__ee__')) {
-1 11992 return;
-1 11993 }
-1 11994 listeners = this.__ee__[type];
-1 11995 if (!listeners) {
-1 11996 return;
7352 11997 }
7353 -1 function unescape(code) {
7354 -1 return code.replace(/\\('|\\)/g, '$1').replace(/[\r\t\n]/g, ' ');
7355 -1 }
7356 -1 doT.template = function(tmpl, c, def) {
7357 -1 c = c || doT.templateSettings;
7358 -1 var cse = c.append ? startend.append : startend.split, needhtmlencode, sid = 0, indv, str = c.use || c.define ? resolveDefs(c, tmpl, def || {}) : tmpl;
7359 -1 str = ('var out=\'' + (c.strip ? str.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g, ' ').replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g, '') : str).replace(/'|\\/g, '\\$&').replace(c.interpolate || skip, function(m, code) {
7360 -1 return cse.start + unescape(code) + cse.end;
7361 -1 }).replace(c.encode || skip, function(m, code) {
7362 -1 needhtmlencode = true;
7363 -1 return cse.startencode + unescape(code) + cse.end;
7364 -1 }).replace(c.conditional || skip, function(m, elsecase, code) {
7365 -1 return elsecase ? code ? '\';}else if(' + unescape(code) + '){out+=\'' : '\';}else{out+=\'' : code ? '\';if(' + unescape(code) + '){out+=\'' : '\';}out+=\'';
7366 -1 }).replace(c.iterate || skip, function(m, iterate, vname, iname) {
7367 -1 if (!iterate) {
7368 -1 return '\';} } out+=\'';
7369 -1 }
7370 -1 sid += 1;
7371 -1 indv = iname || 'i' + sid;
7372 -1 iterate = unescape(iterate);
7373 -1 return '\';var arr' + sid + '=' + iterate + ';if(arr' + sid + '){var ' + vname + ',' + indv + '=-1,l' + sid + '=arr' + sid + '.length-1;while(' + indv + '<l' + sid + '){' + vname + '=arr' + sid + '[' + indv + '+=1];out+=\'';
7374 -1 }).replace(c.evaluate || skip, function(m, code) {
7375 -1 return '\';' + unescape(code) + 'out+=\'';
7376 -1 }) + '\';return out;').replace(/\n/g, '\\n').replace(/\t/g, '\\t').replace(/\r/g, '\\r').replace(/(\s|;|\}|^|\{)out\+='';/g, '$1').replace(/\+''/g, '');
7377 -1 if (needhtmlencode) {
7378 -1 if (!c.selfcontained && _globals && !_globals._encodeHTML) {
7379 -1 _globals._encodeHTML = doT.encodeHTMLSource(c.doNotSkipEncoded);
7380 -1 }
7381 -1 str = 'var encodeHTML = typeof _encodeHTML !== \'undefined\' ? _encodeHTML : (' + doT.encodeHTMLSource.toString() + '(' + (c.doNotSkipEncoded || '') + '));' + str;
-1 11998 if (typeof listeners === 'object') {
-1 11999 l = arguments.length;
-1 12000 args = new Array(l - 1);
-1 12001 for (i = 1; i < l; ++i) {
-1 12002 args[i - 1] = arguments[i];
7382 12003 }
7383 -1 try {
7384 -1 return new Function(c.varname, str);
7385 -1 } catch (e) {
7386 -1 if (typeof console !== 'undefined') {
7387 -1 console.log('Could not create a template function: ' + str);
-1 12004 listeners = listeners.slice();
-1 12005 for (i = 0; listener = listeners[i]; ++i) {
-1 12006 apply.call(listener, this, args);
-1 12007 }
-1 12008 } else {
-1 12009 switch (arguments.length) {
-1 12010 case 1:
-1 12011 call.call(listeners, this);
-1 12012 break;
-1 12013
-1 12014 case 2:
-1 12015 call.call(listeners, this, arguments[1]);
-1 12016 break;
-1 12017
-1 12018 case 3:
-1 12019 call.call(listeners, this, arguments[1], arguments[2]);
-1 12020 break;
-1 12021
-1 12022 default:
-1 12023 l = arguments.length;
-1 12024 args = new Array(l - 1);
-1 12025 for (i = 1; i < l; ++i) {
-1 12026 args[i - 1] = arguments[i];
7388 12027 }
7389 -1 throw e;
-1 12028 apply.call(listeners, this, args);
7390 12029 }
7391 -1 };
7392 -1 doT.compile = function(tmpl, def) {
7393 -1 return doT.template(tmpl, null, def);
7394 -1 };
7395 -1 })();
7396 -1 }, {} ],
7397 -1 30: [ function(_dereq_, module, exports) {
7398 -1 'use strict';
7399 -1 module.exports = function() {
7400 -1 return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
-1 12030 }
7401 12031 };
-1 12032 methods = {
-1 12033 on: on,
-1 12034 once: once,
-1 12035 off: off,
-1 12036 emit: emit
-1 12037 };
-1 12038 descriptors = {
-1 12039 on: d(on),
-1 12040 once: d(once),
-1 12041 off: d(off),
-1 12042 emit: d(emit)
-1 12043 };
-1 12044 base = defineProperties({}, descriptors);
-1 12045 module.exports = exports = function(o) {
-1 12046 return o == null ? create(base) : defineProperties(Object(o), descriptors);
-1 12047 };
-1 12048 exports.methods = methods;
-1 12049 }, {
-1 12050 d: 149,
-1 12051 'es5-ext/object/valid-callable': 184
-1 12052 } ],
-1 12053 201: [ function(_dereq_, module, exports) {
-1 12054 module.exports = isPromise;
-1 12055 function isPromise(obj) {
-1 12056 return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
-1 12057 }
7402 12058 }, {} ],
7403 -1 31: [ function(_dereq_, module, exports) {
7404 -1 (function(process, global) {
7405 -1 (function(global, factory) {
7406 -1 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.ES6Promise = factory();
7407 -1 })(this, function() {
7408 -1 'use strict';
7409 -1 function objectOrFunction(x) {
7410 -1 var type = typeof x;
7411 -1 return x !== null && (type === 'object' || type === 'function');
-1 12059 202: [ function(_dereq_, module, exports) {
-1 12060 'use strict';
-1 12061 var toPosInt = _dereq_('es5-ext/number/to-pos-integer'), create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty;
-1 12062 module.exports = function(limit) {
-1 12063 var size = 0, base = 1, queue = create(null), map = create(null), index = 0, del;
-1 12064 limit = toPosInt(limit);
-1 12065 return {
-1 12066 hit: function(id) {
-1 12067 var oldIndex = map[id], nuIndex = ++index;
-1 12068 queue[nuIndex] = id;
-1 12069 map[id] = nuIndex;
-1 12070 if (!oldIndex) {
-1 12071 ++size;
-1 12072 if (size <= limit) {
-1 12073 return;
-1 12074 }
-1 12075 id = queue[base];
-1 12076 del(id);
-1 12077 return id;
-1 12078 }
-1 12079 delete queue[oldIndex];
-1 12080 if (base !== oldIndex) {
-1 12081 return;
-1 12082 }
-1 12083 while (!hasOwnProperty.call(queue, ++base)) {
-1 12084 continue;
-1 12085 }
-1 12086 },
-1 12087 delete: del = function(id) {
-1 12088 var oldIndex = map[id];
-1 12089 if (!oldIndex) {
-1 12090 return;
-1 12091 }
-1 12092 delete queue[oldIndex];
-1 12093 delete map[id];
-1 12094 --size;
-1 12095 if (base !== oldIndex) {
-1 12096 return;
-1 12097 }
-1 12098 if (!size) {
-1 12099 index = 0;
-1 12100 base = 1;
-1 12101 return;
-1 12102 }
-1 12103 while (!hasOwnProperty.call(queue, ++base)) {
-1 12104 continue;
-1 12105 }
-1 12106 },
-1 12107 clear: function() {
-1 12108 size = 0;
-1 12109 base = 1;
-1 12110 queue = create(null);
-1 12111 map = create(null);
-1 12112 index = 0;
7412 12113 }
7413 -1 function isFunction(x) {
7414 -1 return typeof x === 'function';
-1 12114 };
-1 12115 };
-1 12116 }, {
-1 12117 'es5-ext/number/to-pos-integer': 168
-1 12118 } ],
-1 12119 203: [ function(_dereq_, module, exports) {
-1 12120 'use strict';
-1 12121 var aFrom = _dereq_('es5-ext/array/from'), objectMap = _dereq_('es5-ext/object/map'), mixin = _dereq_('es5-ext/object/mixin'), defineLength = _dereq_('es5-ext/function/_define-length'), nextTick = _dereq_('next-tick');
-1 12122 var slice = Array.prototype.slice, apply = Function.prototype.apply, create = Object.create;
-1 12123 _dereq_('../lib/registered-extensions').async = function(tbi, conf) {
-1 12124 var waiting = create(null), cache = create(null), base = conf.memoized, original = conf.original, currentCallback, currentContext, currentArgs;
-1 12125 conf.memoized = defineLength(function(arg) {
-1 12126 var args = arguments, last = args[args.length - 1];
-1 12127 if (typeof last === 'function') {
-1 12128 currentCallback = last;
-1 12129 args = slice.call(args, 0, -1);
-1 12130 }
-1 12131 return base.apply(currentContext = this, currentArgs = args);
-1 12132 }, base);
-1 12133 try {
-1 12134 mixin(conf.memoized, base);
-1 12135 } catch (ignore) {}
-1 12136 conf.on('get', function(id) {
-1 12137 var cb, context, args;
-1 12138 if (!currentCallback) {
-1 12139 return;
7415 12140 }
7416 -1 var _isArray = void 0;
7417 -1 if (Array.isArray) {
7418 -1 _isArray = Array.isArray;
7419 -1 } else {
7420 -1 _isArray = function(x) {
7421 -1 return Object.prototype.toString.call(x) === '[object Array]';
7422 -1 };
-1 12141 if (waiting[id]) {
-1 12142 if (typeof waiting[id] === 'function') {
-1 12143 waiting[id] = [ waiting[id], currentCallback ];
-1 12144 } else {
-1 12145 waiting[id].push(currentCallback);
-1 12146 }
-1 12147 currentCallback = null;
-1 12148 return;
7423 12149 }
7424 -1 var isArray = _isArray;
7425 -1 var len = 0;
7426 -1 var vertxNext = void 0;
7427 -1 var customSchedulerFn = void 0;
7428 -1 var asap = function asap(callback, arg) {
7429 -1 queue[len] = callback;
7430 -1 queue[len + 1] = arg;
7431 -1 len += 2;
7432 -1 if (len === 2) {
7433 -1 if (customSchedulerFn) {
7434 -1 customSchedulerFn(flush);
-1 12150 cb = currentCallback;
-1 12151 context = currentContext;
-1 12152 args = currentArgs;
-1 12153 currentCallback = currentContext = currentArgs = null;
-1 12154 nextTick(function() {
-1 12155 var data;
-1 12156 if (hasOwnProperty.call(cache, id)) {
-1 12157 data = cache[id];
-1 12158 conf.emit('getasync', id, args, context);
-1 12159 apply.call(cb, data.context, data.args);
-1 12160 } else {
-1 12161 currentCallback = cb;
-1 12162 currentContext = context;
-1 12163 currentArgs = args;
-1 12164 base.apply(context, args);
-1 12165 }
-1 12166 });
-1 12167 });
-1 12168 conf.original = function() {
-1 12169 var args, cb, origCb, result;
-1 12170 if (!currentCallback) {
-1 12171 return apply.call(original, this, arguments);
-1 12172 }
-1 12173 args = aFrom(arguments);
-1 12174 cb = function self(err) {
-1 12175 var cb, args, id = self.id;
-1 12176 if (id == null) {
-1 12177 nextTick(apply.bind(self, this, arguments));
-1 12178 return undefined;
-1 12179 }
-1 12180 delete self.id;
-1 12181 cb = waiting[id];
-1 12182 delete waiting[id];
-1 12183 if (!cb) {
-1 12184 return undefined;
-1 12185 }
-1 12186 args = aFrom(arguments);
-1 12187 if (conf.has(id)) {
-1 12188 if (err) {
-1 12189 conf.delete(id);
7435 12190 } else {
7436 -1 scheduleFlush();
-1 12191 cache[id] = {
-1 12192 context: this,
-1 12193 args: args
-1 12194 };
-1 12195 conf.emit('setasync', id, typeof cb === 'function' ? 1 : cb.length);
7437 12196 }
7438 12197 }
-1 12198 if (typeof cb === 'function') {
-1 12199 result = apply.call(cb, this, args);
-1 12200 } else {
-1 12201 cb.forEach(function(cb) {
-1 12202 result = apply.call(cb, this, args);
-1 12203 }, this);
-1 12204 }
-1 12205 return result;
7439 12206 };
7440 -1 function setScheduler(scheduleFn) {
7441 -1 customSchedulerFn = scheduleFn;
7442 -1 }
7443 -1 function setAsap(asapFn) {
7444 -1 asap = asapFn;
7445 -1 }
7446 -1 var browserWindow = typeof window !== 'undefined' ? window : undefined;
7447 -1 var browserGlobal = browserWindow || {};
7448 -1 var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
7449 -1 var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
7450 -1 var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
7451 -1 function useNextTick() {
7452 -1 return function() {
7453 -1 return process.nextTick(flush);
7454 -1 };
-1 12207 origCb = currentCallback;
-1 12208 currentCallback = currentContext = currentArgs = null;
-1 12209 args.push(cb);
-1 12210 result = apply.call(original, this, args);
-1 12211 cb.cb = origCb;
-1 12212 currentCallback = cb;
-1 12213 return result;
-1 12214 };
-1 12215 conf.on('set', function(id) {
-1 12216 if (!currentCallback) {
-1 12217 conf.delete(id);
-1 12218 return;
7455 12219 }
7456 -1 function useVertxTimer() {
7457 -1 if (typeof vertxNext !== 'undefined') {
7458 -1 return function() {
7459 -1 vertxNext(flush);
7460 -1 };
-1 12220 if (waiting[id]) {
-1 12221 if (typeof waiting[id] === 'function') {
-1 12222 waiting[id] = [ waiting[id], currentCallback.cb ];
-1 12223 } else {
-1 12224 waiting[id].push(currentCallback.cb);
7461 12225 }
7462 -1 return useSetTimeout();
-1 12226 } else {
-1 12227 waiting[id] = currentCallback.cb;
7463 12228 }
7464 -1 function useMutationObserver() {
7465 -1 var iterations = 0;
7466 -1 var observer = new BrowserMutationObserver(flush);
7467 -1 var node = document.createTextNode('');
7468 -1 observer.observe(node, {
7469 -1 characterData: true
7470 -1 });
7471 -1 return function() {
7472 -1 node.data = iterations = ++iterations % 2;
7473 -1 };
-1 12229 delete currentCallback.cb;
-1 12230 currentCallback.id = id;
-1 12231 currentCallback = null;
-1 12232 });
-1 12233 conf.on('delete', function(id) {
-1 12234 var result;
-1 12235 if (hasOwnProperty.call(waiting, id)) {
-1 12236 return;
7474 12237 }
7475 -1 function useMessageChannel() {
7476 -1 var channel = new MessageChannel();
7477 -1 channel.port1.onmessage = flush;
7478 -1 return function() {
7479 -1 return channel.port2.postMessage(0);
7480 -1 };
-1 12238 if (!cache[id]) {
-1 12239 return;
7481 12240 }
7482 -1 function useSetTimeout() {
7483 -1 var globalSetTimeout = setTimeout;
7484 -1 return function() {
7485 -1 return globalSetTimeout(flush, 1);
7486 -1 };
-1 12241 result = cache[id];
-1 12242 delete cache[id];
-1 12243 conf.emit('deleteasync', id, slice.call(result.args, 1));
-1 12244 });
-1 12245 conf.on('clear', function() {
-1 12246 var oldCache = cache;
-1 12247 cache = create(null);
-1 12248 conf.emit('clearasync', objectMap(oldCache, function(data) {
-1 12249 return slice.call(data.args, 1);
-1 12250 }));
-1 12251 });
-1 12252 };
-1 12253 }, {
-1 12254 '../lib/registered-extensions': 211,
-1 12255 'es5-ext/array/from': 152,
-1 12256 'es5-ext/function/_define-length': 157,
-1 12257 'es5-ext/object/map': 180,
-1 12258 'es5-ext/object/mixin': 181,
-1 12259 'next-tick': 221
-1 12260 } ],
-1 12261 204: [ function(_dereq_, module, exports) {
-1 12262 'use strict';
-1 12263 var callable = _dereq_('es5-ext/object/valid-callable'), forEach = _dereq_('es5-ext/object/for-each'), extensions = _dereq_('../lib/registered-extensions'), apply = Function.prototype.apply;
-1 12264 extensions.dispose = function(dispose, conf, options) {
-1 12265 var del;
-1 12266 callable(dispose);
-1 12267 if (options.async && extensions.async || options.promise && extensions.promise) {
-1 12268 conf.on('deleteasync', del = function(id, resultArray) {
-1 12269 apply.call(dispose, null, resultArray);
-1 12270 });
-1 12271 conf.on('clearasync', function(cache) {
-1 12272 forEach(cache, function(result, id) {
-1 12273 del(id, result);
-1 12274 });
-1 12275 });
-1 12276 return;
-1 12277 }
-1 12278 conf.on('delete', del = function(id, result) {
-1 12279 dispose(result);
-1 12280 });
-1 12281 conf.on('clear', function(cache) {
-1 12282 forEach(cache, function(result, id) {
-1 12283 del(id, result);
-1 12284 });
-1 12285 });
-1 12286 };
-1 12287 }, {
-1 12288 '../lib/registered-extensions': 211,
-1 12289 'es5-ext/object/for-each': 173,
-1 12290 'es5-ext/object/valid-callable': 184
-1 12291 } ],
-1 12292 205: [ function(_dereq_, module, exports) {
-1 12293 'use strict';
-1 12294 var aFrom = _dereq_('es5-ext/array/from'), forEach = _dereq_('es5-ext/object/for-each'), nextTick = _dereq_('next-tick'), isPromise = _dereq_('is-promise'), timeout = _dereq_('timers-ext/valid-timeout'), extensions = _dereq_('../lib/registered-extensions');
-1 12295 var noop = Function.prototype, max = Math.max, min = Math.min, create = Object.create;
-1 12296 extensions.maxAge = function(maxAge, conf, options) {
-1 12297 var timeouts, postfix, preFetchAge, preFetchTimeouts;
-1 12298 maxAge = timeout(maxAge);
-1 12299 if (!maxAge) {
-1 12300 return;
-1 12301 }
-1 12302 timeouts = create(null);
-1 12303 postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';
-1 12304 conf.on('set' + postfix, function(id) {
-1 12305 timeouts[id] = setTimeout(function() {
-1 12306 conf.delete(id);
-1 12307 }, maxAge);
-1 12308 if (typeof timeouts[id].unref === 'function') {
-1 12309 timeouts[id].unref();
7487 12310 }
7488 -1 var queue = new Array(1e3);
7489 -1 function flush() {
7490 -1 for (var i = 0; i < len; i += 2) {
7491 -1 var callback = queue[i];
7492 -1 var arg = queue[i + 1];
7493 -1 callback(arg);
7494 -1 queue[i] = undefined;
7495 -1 queue[i + 1] = undefined;
7496 -1 }
7497 -1 len = 0;
-1 12311 if (!preFetchTimeouts) {
-1 12312 return;
7498 12313 }
7499 -1 function attemptVertx() {
7500 -1 try {
7501 -1 var vertx = Function('return this')().require('vertx');
7502 -1 vertxNext = vertx.runOnLoop || vertx.runOnContext;
7503 -1 return useVertxTimer();
7504 -1 } catch (e) {
7505 -1 return useSetTimeout();
-1 12314 if (preFetchTimeouts[id]) {
-1 12315 if (preFetchTimeouts[id] !== 'nextTick') {
-1 12316 clearTimeout(preFetchTimeouts[id]);
7506 12317 }
7507 12318 }
7508 -1 var scheduleFlush = void 0;
7509 -1 if (isNode) {
7510 -1 scheduleFlush = useNextTick();
7511 -1 } else if (BrowserMutationObserver) {
7512 -1 scheduleFlush = useMutationObserver();
7513 -1 } else if (isWorker) {
7514 -1 scheduleFlush = useMessageChannel();
7515 -1 } else if (browserWindow === undefined && typeof _dereq_ === 'function') {
7516 -1 scheduleFlush = attemptVertx();
-1 12319 preFetchTimeouts[id] = setTimeout(function() {
-1 12320 delete preFetchTimeouts[id];
-1 12321 }, preFetchAge);
-1 12322 if (typeof preFetchTimeouts[id].unref === 'function') {
-1 12323 preFetchTimeouts[id].unref();
-1 12324 }
-1 12325 });
-1 12326 conf.on('delete' + postfix, function(id) {
-1 12327 clearTimeout(timeouts[id]);
-1 12328 delete timeouts[id];
-1 12329 if (!preFetchTimeouts) {
-1 12330 return;
-1 12331 }
-1 12332 if (preFetchTimeouts[id] !== 'nextTick') {
-1 12333 clearTimeout(preFetchTimeouts[id]);
-1 12334 }
-1 12335 delete preFetchTimeouts[id];
-1 12336 });
-1 12337 if (options.preFetch) {
-1 12338 if (options.preFetch === true || isNaN(options.preFetch)) {
-1 12339 preFetchAge = .333;
7517 12340 } else {
7518 -1 scheduleFlush = useSetTimeout();
-1 12341 preFetchAge = max(min(Number(options.preFetch), 1), 0);
-1 12342 }
-1 12343 if (preFetchAge) {
-1 12344 preFetchTimeouts = {};
-1 12345 preFetchAge = (1 - preFetchAge) * maxAge;
-1 12346 conf.on('get' + postfix, function(id, args, context) {
-1 12347 if (!preFetchTimeouts[id]) {
-1 12348 preFetchTimeouts[id] = 'nextTick';
-1 12349 nextTick(function() {
-1 12350 var result;
-1 12351 if (preFetchTimeouts[id] !== 'nextTick') {
-1 12352 return;
-1 12353 }
-1 12354 delete preFetchTimeouts[id];
-1 12355 conf.delete(id);
-1 12356 if (options.async) {
-1 12357 args = aFrom(args);
-1 12358 args.push(noop);
-1 12359 }
-1 12360 result = conf.memoized.apply(context, args);
-1 12361 if (options.promise) {
-1 12362 if (isPromise(result)) {
-1 12363 if (typeof result.done === 'function') {
-1 12364 result.done(noop, noop);
-1 12365 } else {
-1 12366 result.then(noop, noop);
-1 12367 }
-1 12368 }
-1 12369 }
-1 12370 });
-1 12371 }
-1 12372 });
7519 12373 }
7520 -1 function then(onFulfillment, onRejection) {
7521 -1 var parent = this;
7522 -1 var child = new this.constructor(noop);
7523 -1 if (child[PROMISE_ID] === undefined) {
7524 -1 makePromise(child);
7525 -1 }
7526 -1 var _state = parent._state;
7527 -1 if (_state) {
7528 -1 var callback = arguments[_state - 1];
7529 -1 asap(function() {
7530 -1 return invokeCallback(_state, child, callback, parent._result);
7531 -1 });
7532 -1 } else {
7533 -1 subscribe(parent, child, onFulfillment, onRejection);
7534 -1 }
7535 -1 return child;
-1 12374 }
-1 12375 conf.on('clear' + postfix, function() {
-1 12376 forEach(timeouts, function(id) {
-1 12377 clearTimeout(id);
-1 12378 });
-1 12379 timeouts = {};
-1 12380 if (preFetchTimeouts) {
-1 12381 forEach(preFetchTimeouts, function(id) {
-1 12382 if (id !== 'nextTick') {
-1 12383 clearTimeout(id);
-1 12384 }
-1 12385 });
-1 12386 preFetchTimeouts = {};
7536 12387 }
7537 -1 function resolve$1(object) {
7538 -1 var Constructor = this;
7539 -1 if (object && typeof object === 'object' && object.constructor === Constructor) {
7540 -1 return object;
7541 -1 }
7542 -1 var promise = new Constructor(noop);
7543 -1 resolve(promise, object);
7544 -1 return promise;
-1 12388 });
-1 12389 };
-1 12390 }, {
-1 12391 '../lib/registered-extensions': 211,
-1 12392 'es5-ext/array/from': 152,
-1 12393 'es5-ext/object/for-each': 173,
-1 12394 'is-promise': 201,
-1 12395 'next-tick': 221,
-1 12396 'timers-ext/valid-timeout': 225
-1 12397 } ],
-1 12398 206: [ function(_dereq_, module, exports) {
-1 12399 'use strict';
-1 12400 var toPosInteger = _dereq_('es5-ext/number/to-pos-integer'), lruQueue = _dereq_('lru-queue'), extensions = _dereq_('../lib/registered-extensions');
-1 12401 extensions.max = function(max, conf, options) {
-1 12402 var postfix, queue, hit;
-1 12403 max = toPosInteger(max);
-1 12404 if (!max) {
-1 12405 return;
-1 12406 }
-1 12407 queue = lruQueue(max);
-1 12408 postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';
-1 12409 conf.on('set' + postfix, hit = function(id) {
-1 12410 id = queue.hit(id);
-1 12411 if (id === undefined) {
-1 12412 return;
7545 12413 }
7546 -1 var PROMISE_ID = Math.random().toString(36).substring(2);
7547 -1 function noop() {}
7548 -1 var PENDING = void 0;
7549 -1 var FULFILLED = 1;
7550 -1 var REJECTED = 2;
7551 -1 var TRY_CATCH_ERROR = {
7552 -1 error: null
7553 -1 };
7554 -1 function selfFulfillment() {
7555 -1 return new TypeError('You cannot resolve a promise with itself');
-1 12414 conf.delete(id);
-1 12415 });
-1 12416 conf.on('get' + postfix, hit);
-1 12417 conf.on('delete' + postfix, queue.delete);
-1 12418 conf.on('clear' + postfix, queue.clear);
-1 12419 };
-1 12420 }, {
-1 12421 '../lib/registered-extensions': 211,
-1 12422 'es5-ext/number/to-pos-integer': 168,
-1 12423 'lru-queue': 202
-1 12424 } ],
-1 12425 207: [ function(_dereq_, module, exports) {
-1 12426 'use strict';
-1 12427 var objectMap = _dereq_('es5-ext/object/map'), primitiveSet = _dereq_('es5-ext/object/primitive-set'), ensureString = _dereq_('es5-ext/object/validate-stringifiable-value'), toShortString = _dereq_('es5-ext/to-short-string-representation'), isPromise = _dereq_('is-promise'), nextTick = _dereq_('next-tick');
-1 12428 var create = Object.create, supportedModes = primitiveSet('then', 'then:finally', 'done', 'done:finally');
-1 12429 _dereq_('../lib/registered-extensions').promise = function(mode, conf) {
-1 12430 var waiting = create(null), cache = create(null), promises = create(null);
-1 12431 if (mode === true) {
-1 12432 mode = null;
-1 12433 } else {
-1 12434 mode = ensureString(mode);
-1 12435 if (!supportedModes[mode]) {
-1 12436 throw new TypeError('\'' + toShortString(mode) + '\' is not valid promise mode');
7556 12437 }
7557 -1 function cannotReturnOwn() {
7558 -1 return new TypeError('A promises callback cannot return that same promise.');
-1 12438 }
-1 12439 conf.on('set', function(id, ignore, promise) {
-1 12440 var isFailed = false;
-1 12441 if (!isPromise(promise)) {
-1 12442 cache[id] = promise;
-1 12443 conf.emit('setasync', id, 1);
-1 12444 return;
7559 12445 }
7560 -1 function getThen(promise) {
7561 -1 try {
7562 -1 return promise.then;
7563 -1 } catch (error) {
7564 -1 TRY_CATCH_ERROR.error = error;
7565 -1 return TRY_CATCH_ERROR;
-1 12446 waiting[id] = 1;
-1 12447 promises[id] = promise;
-1 12448 var onSuccess = function(result) {
-1 12449 var count = waiting[id];
-1 12450 if (isFailed) {
-1 12451 throw new Error('Memoizee error: Detected unordered then|done & finally resolution, which ' + 'in turn makes proper detection of success/failure impossible (when in ' + '\'done:finally\' mode)\n' + 'Consider to rely on \'then\' or \'done\' mode instead.');
-1 12452 }
-1 12453 if (!count) {
-1 12454 return;
7566 12455 }
-1 12456 delete waiting[id];
-1 12457 cache[id] = result;
-1 12458 conf.emit('setasync', id, count);
-1 12459 };
-1 12460 var onFailure = function() {
-1 12461 isFailed = true;
-1 12462 if (!waiting[id]) {
-1 12463 return;
-1 12464 }
-1 12465 delete waiting[id];
-1 12466 delete promises[id];
-1 12467 conf.delete(id);
-1 12468 };
-1 12469 var resolvedMode = mode;
-1 12470 if (!resolvedMode) {
-1 12471 resolvedMode = 'then';
7567 12472 }
7568 -1 function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
7569 -1 try {
7570 -1 then$$1.call(value, fulfillmentHandler, rejectionHandler);
7571 -1 } catch (e) {
7572 -1 return e;
-1 12473 if (resolvedMode === 'then') {
-1 12474 var nextTickFailure = function() {
-1 12475 nextTick(onFailure);
-1 12476 };
-1 12477 promise = promise.then(function(result) {
-1 12478 nextTick(onSuccess.bind(this, result));
-1 12479 }, nextTickFailure);
-1 12480 if (typeof promise.finally === 'function') {
-1 12481 promise.finally(nextTickFailure);
-1 12482 }
-1 12483 } else if (resolvedMode === 'done') {
-1 12484 if (typeof promise.done !== 'function') {
-1 12485 throw new Error('Memoizee error: Retrieved promise does not implement \'done\' ' + 'in \'done\' mode');
-1 12486 }
-1 12487 promise.done(onSuccess, onFailure);
-1 12488 } else if (resolvedMode === 'done:finally') {
-1 12489 if (typeof promise.done !== 'function') {
-1 12490 throw new Error('Memoizee error: Retrieved promise does not implement \'done\' ' + 'in \'done:finally\' mode');
7573 12491 }
-1 12492 if (typeof promise.finally !== 'function') {
-1 12493 throw new Error('Memoizee error: Retrieved promise does not implement \'finally\' ' + 'in \'done:finally\' mode');
-1 12494 }
-1 12495 promise.done(onSuccess);
-1 12496 promise.finally(onFailure);
7574 12497 }
7575 -1 function handleForeignThenable(promise, thenable, then$$1) {
7576 -1 asap(function(promise) {
7577 -1 var sealed = false;
7578 -1 var error = tryThen(then$$1, thenable, function(value) {
7579 -1 if (sealed) {
7580 -1 return;
7581 -1 }
7582 -1 sealed = true;
7583 -1 if (thenable !== value) {
7584 -1 resolve(promise, value);
7585 -1 } else {
7586 -1 fulfill(promise, value);
7587 -1 }
7588 -1 }, function(reason) {
7589 -1 if (sealed) {
7590 -1 return;
7591 -1 }
7592 -1 sealed = true;
7593 -1 reject(promise, reason);
7594 -1 }, 'Settle: ' + (promise._label || ' unknown promise'));
7595 -1 if (!sealed && error) {
7596 -1 sealed = true;
7597 -1 reject(promise, error);
7598 -1 }
7599 -1 }, promise);
-1 12498 });
-1 12499 conf.on('get', function(id, args, context) {
-1 12500 var promise;
-1 12501 if (waiting[id]) {
-1 12502 ++waiting[id];
-1 12503 return;
7600 12504 }
7601 -1 function handleOwnThenable(promise, thenable) {
7602 -1 if (thenable._state === FULFILLED) {
7603 -1 fulfill(promise, thenable._result);
7604 -1 } else if (thenable._state === REJECTED) {
7605 -1 reject(promise, thenable._result);
-1 12505 promise = promises[id];
-1 12506 var emit = function() {
-1 12507 conf.emit('getasync', id, args, context);
-1 12508 };
-1 12509 if (isPromise(promise)) {
-1 12510 if (typeof promise.done === 'function') {
-1 12511 promise.done(emit);
7606 12512 } else {
7607 -1 subscribe(thenable, undefined, function(value) {
7608 -1 return resolve(promise, value);
7609 -1 }, function(reason) {
7610 -1 return reject(promise, reason);
-1 12513 promise.then(function() {
-1 12514 nextTick(emit);
7611 12515 });
7612 12516 }
-1 12517 } else {
-1 12518 emit();
7613 12519 }
7614 -1 function handleMaybeThenable(promise, maybeThenable, then$$1) {
7615 -1 if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
7616 -1 handleOwnThenable(promise, maybeThenable);
7617 -1 } else {
7618 -1 if (then$$1 === TRY_CATCH_ERROR) {
7619 -1 reject(promise, TRY_CATCH_ERROR.error);
7620 -1 TRY_CATCH_ERROR.error = null;
7621 -1 } else if (then$$1 === undefined) {
7622 -1 fulfill(promise, maybeThenable);
7623 -1 } else if (isFunction(then$$1)) {
7624 -1 handleForeignThenable(promise, maybeThenable, then$$1);
7625 -1 } else {
7626 -1 fulfill(promise, maybeThenable);
7627 -1 }
7628 -1 }
-1 12520 });
-1 12521 conf.on('delete', function(id) {
-1 12522 delete promises[id];
-1 12523 if (waiting[id]) {
-1 12524 delete waiting[id];
-1 12525 return;
7629 12526 }
7630 -1 function resolve(promise, value) {
7631 -1 if (promise === value) {
7632 -1 reject(promise, selfFulfillment());
7633 -1 } else if (objectOrFunction(value)) {
7634 -1 handleMaybeThenable(promise, value, getThen(value));
7635 -1 } else {
7636 -1 fulfill(promise, value);
7637 -1 }
-1 12527 if (!hasOwnProperty.call(cache, id)) {
-1 12528 return;
7638 12529 }
7639 -1 function publishRejection(promise) {
7640 -1 if (promise._onerror) {
7641 -1 promise._onerror(promise._result);
-1 12530 var result = cache[id];
-1 12531 delete cache[id];
-1 12532 conf.emit('deleteasync', id, [ result ]);
-1 12533 });
-1 12534 conf.on('clear', function() {
-1 12535 var oldCache = cache;
-1 12536 cache = create(null);
-1 12537 waiting = create(null);
-1 12538 promises = create(null);
-1 12539 conf.emit('clearasync', objectMap(oldCache, function(data) {
-1 12540 return [ data ];
-1 12541 }));
-1 12542 });
-1 12543 };
-1 12544 }, {
-1 12545 '../lib/registered-extensions': 211,
-1 12546 'es5-ext/object/map': 180,
-1 12547 'es5-ext/object/primitive-set': 183,
-1 12548 'es5-ext/object/validate-stringifiable-value': 186,
-1 12549 'es5-ext/to-short-string-representation': 193,
-1 12550 'is-promise': 201,
-1 12551 'next-tick': 221
-1 12552 } ],
-1 12553 208: [ function(_dereq_, module, exports) {
-1 12554 'use strict';
-1 12555 var d = _dereq_('d'), extensions = _dereq_('../lib/registered-extensions'), create = Object.create, defineProperties = Object.defineProperties;
-1 12556 extensions.refCounter = function(ignore, conf, options) {
-1 12557 var cache, postfix;
-1 12558 cache = create(null);
-1 12559 postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';
-1 12560 conf.on('set' + postfix, function(id, length) {
-1 12561 cache[id] = length || 1;
-1 12562 });
-1 12563 conf.on('get' + postfix, function(id) {
-1 12564 ++cache[id];
-1 12565 });
-1 12566 conf.on('delete' + postfix, function(id) {
-1 12567 delete cache[id];
-1 12568 });
-1 12569 conf.on('clear' + postfix, function() {
-1 12570 cache = {};
-1 12571 });
-1 12572 defineProperties(conf.memoized, {
-1 12573 deleteRef: d(function() {
-1 12574 var id = conf.get(arguments);
-1 12575 if (id === null) {
-1 12576 return null;
7642 12577 }
7643 -1 publish(promise);
7644 -1 }
7645 -1 function fulfill(promise, value) {
7646 -1 if (promise._state !== PENDING) {
7647 -1 return;
-1 12578 if (!cache[id]) {
-1 12579 return null;
7648 12580 }
7649 -1 promise._result = value;
7650 -1 promise._state = FULFILLED;
7651 -1 if (promise._subscribers.length !== 0) {
7652 -1 asap(publish, promise);
-1 12581 if (!--cache[id]) {
-1 12582 conf.delete(id);
-1 12583 return true;
7653 12584 }
7654 -1 }
7655 -1 function reject(promise, reason) {
7656 -1 if (promise._state !== PENDING) {
7657 -1 return;
-1 12585 return false;
-1 12586 }),
-1 12587 getRefCount: d(function() {
-1 12588 var id = conf.get(arguments);
-1 12589 if (id === null) {
-1 12590 return 0;
7658 12591 }
7659 -1 promise._state = REJECTED;
7660 -1 promise._result = reason;
7661 -1 asap(publishRejection, promise);
7662 -1 }
7663 -1 function subscribe(parent, child, onFulfillment, onRejection) {
7664 -1 var _subscribers = parent._subscribers;
7665 -1 var length = _subscribers.length;
7666 -1 parent._onerror = null;
7667 -1 _subscribers[length] = child;
7668 -1 _subscribers[length + FULFILLED] = onFulfillment;
7669 -1 _subscribers[length + REJECTED] = onRejection;
7670 -1 if (length === 0 && parent._state) {
7671 -1 asap(publish, parent);
-1 12592 if (!cache[id]) {
-1 12593 return 0;
-1 12594 }
-1 12595 return cache[id];
-1 12596 })
-1 12597 });
-1 12598 };
-1 12599 }, {
-1 12600 '../lib/registered-extensions': 211,
-1 12601 d: 149
-1 12602 } ],
-1 12603 209: [ function(_dereq_, module, exports) {
-1 12604 'use strict';
-1 12605 var normalizeOpts = _dereq_('es5-ext/object/normalize-options'), resolveLength = _dereq_('./lib/resolve-length'), plain = _dereq_('./plain');
-1 12606 module.exports = function(fn) {
-1 12607 var options = normalizeOpts(arguments[1]), length;
-1 12608 if (!options.normalizer) {
-1 12609 length = options.length = resolveLength(options.length, fn.length, options.async);
-1 12610 if (length !== 0) {
-1 12611 if (options.primitive) {
-1 12612 if (length === false) {
-1 12613 options.normalizer = _dereq_('./normalizers/primitive');
-1 12614 } else if (length > 1) {
-1 12615 options.normalizer = _dereq_('./normalizers/get-primitive-fixed')(length);
-1 12616 }
-1 12617 } else if (length === false) {
-1 12618 options.normalizer = _dereq_('./normalizers/get')();
-1 12619 } else if (length === 1) {
-1 12620 options.normalizer = _dereq_('./normalizers/get-1')();
-1 12621 } else {
-1 12622 options.normalizer = _dereq_('./normalizers/get-fixed')(length);
7672 12623 }
7673 12624 }
7674 -1 function publish(promise) {
7675 -1 var subscribers = promise._subscribers;
7676 -1 var settled = promise._state;
7677 -1 if (subscribers.length === 0) {
7678 -1 return;
-1 12625 }
-1 12626 if (options.async) {
-1 12627 _dereq_('./ext/async');
-1 12628 }
-1 12629 if (options.promise) {
-1 12630 _dereq_('./ext/promise');
-1 12631 }
-1 12632 if (options.dispose) {
-1 12633 _dereq_('./ext/dispose');
-1 12634 }
-1 12635 if (options.maxAge) {
-1 12636 _dereq_('./ext/max-age');
-1 12637 }
-1 12638 if (options.max) {
-1 12639 _dereq_('./ext/max');
-1 12640 }
-1 12641 if (options.refCounter) {
-1 12642 _dereq_('./ext/ref-counter');
-1 12643 }
-1 12644 return plain(fn, options);
-1 12645 };
-1 12646 }, {
-1 12647 './ext/async': 203,
-1 12648 './ext/dispose': 204,
-1 12649 './ext/max': 206,
-1 12650 './ext/max-age': 205,
-1 12651 './ext/promise': 207,
-1 12652 './ext/ref-counter': 208,
-1 12653 './lib/resolve-length': 212,
-1 12654 './normalizers/get': 218,
-1 12655 './normalizers/get-1': 215,
-1 12656 './normalizers/get-fixed': 216,
-1 12657 './normalizers/get-primitive-fixed': 217,
-1 12658 './normalizers/primitive': 219,
-1 12659 './plain': 220,
-1 12660 'es5-ext/object/normalize-options': 182
-1 12661 } ],
-1 12662 210: [ function(_dereq_, module, exports) {
-1 12663 'use strict';
-1 12664 var customError = _dereq_('es5-ext/error/custom'), defineLength = _dereq_('es5-ext/function/_define-length'), d = _dereq_('d'), ee = _dereq_('event-emitter').methods, resolveResolve = _dereq_('./resolve-resolve'), resolveNormalize = _dereq_('./resolve-normalize');
-1 12665 var apply = Function.prototype.apply, call = Function.prototype.call, create = Object.create, defineProperties = Object.defineProperties, on = ee.on, emit = ee.emit;
-1 12666 module.exports = function(original, length, options) {
-1 12667 var cache = create(null), conf, memLength, get, set, del, clear, extDel, extGet, extHas, normalizer, getListeners, setListeners, deleteListeners, memoized, resolve;
-1 12668 if (length !== false) {
-1 12669 memLength = length;
-1 12670 } else if (isNaN(original.length)) {
-1 12671 memLength = 1;
-1 12672 } else {
-1 12673 memLength = original.length;
-1 12674 }
-1 12675 if (options.normalizer) {
-1 12676 normalizer = resolveNormalize(options.normalizer);
-1 12677 get = normalizer.get;
-1 12678 set = normalizer.set;
-1 12679 del = normalizer.delete;
-1 12680 clear = normalizer.clear;
-1 12681 }
-1 12682 if (options.resolvers != null) {
-1 12683 resolve = resolveResolve(options.resolvers);
-1 12684 }
-1 12685 if (get) {
-1 12686 memoized = defineLength(function(arg) {
-1 12687 var id, result, args = arguments;
-1 12688 if (resolve) {
-1 12689 args = resolve(args);
-1 12690 }
-1 12691 id = get(args);
-1 12692 if (id !== null) {
-1 12693 if (hasOwnProperty.call(cache, id)) {
-1 12694 if (getListeners) {
-1 12695 conf.emit('get', id, args, this);
-1 12696 }
-1 12697 return cache[id];
-1 12698 }
7679 12699 }
7680 -1 var child = void 0, callback = void 0, detail = promise._result;
7681 -1 for (var i = 0; i < subscribers.length; i += 3) {
7682 -1 child = subscribers[i];
7683 -1 callback = subscribers[i + settled];
7684 -1 if (child) {
7685 -1 invokeCallback(settled, child, callback, detail);
7686 -1 } else {
7687 -1 callback(detail);
-1 12700 if (args.length === 1) {
-1 12701 result = call.call(original, this, args[0]);
-1 12702 } else {
-1 12703 result = apply.call(original, this, args);
-1 12704 }
-1 12705 if (id === null) {
-1 12706 id = get(args);
-1 12707 if (id !== null) {
-1 12708 throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
-1 12709 }
-1 12710 id = set(args);
-1 12711 } else if (hasOwnProperty.call(cache, id)) {
-1 12712 throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
-1 12713 }
-1 12714 cache[id] = result;
-1 12715 if (setListeners) {
-1 12716 conf.emit('set', id, null, result);
-1 12717 }
-1 12718 return result;
-1 12719 }, memLength);
-1 12720 } else if (length === 0) {
-1 12721 memoized = function() {
-1 12722 var result;
-1 12723 if (hasOwnProperty.call(cache, 'data')) {
-1 12724 if (getListeners) {
-1 12725 conf.emit('get', 'data', arguments, this);
7688 12726 }
-1 12727 return cache.data;
7689 12728 }
7690 -1 promise._subscribers.length = 0;
7691 -1 }
7692 -1 function tryCatch(callback, detail) {
7693 -1 try {
7694 -1 return callback(detail);
7695 -1 } catch (e) {
7696 -1 TRY_CATCH_ERROR.error = e;
7697 -1 return TRY_CATCH_ERROR;
-1 12729 if (arguments.length) {
-1 12730 result = apply.call(original, this, arguments);
-1 12731 } else {
-1 12732 result = call.call(original, this);
7698 12733 }
7699 -1 }
7700 -1 function invokeCallback(settled, promise, callback, detail) {
7701 -1 var hasCallback = isFunction(callback), value = void 0, error = void 0, succeeded = void 0, failed = void 0;
7702 -1 if (hasCallback) {
7703 -1 value = tryCatch(callback, detail);
7704 -1 if (value === TRY_CATCH_ERROR) {
7705 -1 failed = true;
7706 -1 error = value.error;
7707 -1 value.error = null;
7708 -1 } else {
7709 -1 succeeded = true;
7710 -1 }
7711 -1 if (promise === value) {
7712 -1 reject(promise, cannotReturnOwn());
7713 -1 return;
-1 12734 if (hasOwnProperty.call(cache, 'data')) {
-1 12735 throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
-1 12736 }
-1 12737 cache.data = result;
-1 12738 if (setListeners) {
-1 12739 conf.emit('set', 'data', null, result);
-1 12740 }
-1 12741 return result;
-1 12742 };
-1 12743 } else {
-1 12744 memoized = function(arg) {
-1 12745 var result, args = arguments, id;
-1 12746 if (resolve) {
-1 12747 args = resolve(arguments);
-1 12748 }
-1 12749 id = String(args[0]);
-1 12750 if (hasOwnProperty.call(cache, id)) {
-1 12751 if (getListeners) {
-1 12752 conf.emit('get', id, args, this);
7714 12753 }
-1 12754 return cache[id];
-1 12755 }
-1 12756 if (args.length === 1) {
-1 12757 result = call.call(original, this, args[0]);
7715 12758 } else {
7716 -1 value = detail;
7717 -1 succeeded = true;
-1 12759 result = apply.call(original, this, args);
7718 12760 }
7719 -1 if (promise._state !== PENDING) {} else if (hasCallback && succeeded) {
7720 -1 resolve(promise, value);
7721 -1 } else if (failed) {
7722 -1 reject(promise, error);
7723 -1 } else if (settled === FULFILLED) {
7724 -1 fulfill(promise, value);
7725 -1 } else if (settled === REJECTED) {
7726 -1 reject(promise, value);
-1 12761 if (hasOwnProperty.call(cache, id)) {
-1 12762 throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
-1 12763 }
-1 12764 cache[id] = result;
-1 12765 if (setListeners) {
-1 12766 conf.emit('set', id, null, result);
-1 12767 }
-1 12768 return result;
-1 12769 };
-1 12770 }
-1 12771 conf = {
-1 12772 original: original,
-1 12773 memoized: memoized,
-1 12774 profileName: options.profileName,
-1 12775 get: function(args) {
-1 12776 if (resolve) {
-1 12777 args = resolve(args);
-1 12778 }
-1 12779 if (get) {
-1 12780 return get(args);
-1 12781 }
-1 12782 return String(args[0]);
-1 12783 },
-1 12784 has: function(id) {
-1 12785 return hasOwnProperty.call(cache, id);
-1 12786 },
-1 12787 delete: function(id) {
-1 12788 var result;
-1 12789 if (!hasOwnProperty.call(cache, id)) {
-1 12790 return;
-1 12791 }
-1 12792 if (del) {
-1 12793 del(id);
-1 12794 }
-1 12795 result = cache[id];
-1 12796 delete cache[id];
-1 12797 if (deleteListeners) {
-1 12798 conf.emit('delete', id, result);
7727 12799 }
-1 12800 },
-1 12801 clear: function() {
-1 12802 var oldCache = cache;
-1 12803 if (clear) {
-1 12804 clear();
-1 12805 }
-1 12806 cache = create(null);
-1 12807 conf.emit('clear', oldCache);
-1 12808 },
-1 12809 on: function(type, listener) {
-1 12810 if (type === 'get') {
-1 12811 getListeners = true;
-1 12812 } else if (type === 'set') {
-1 12813 setListeners = true;
-1 12814 } else if (type === 'delete') {
-1 12815 deleteListeners = true;
-1 12816 }
-1 12817 return on.call(this, type, listener);
-1 12818 },
-1 12819 emit: emit,
-1 12820 updateEnv: function() {
-1 12821 original = conf.original;
7728 12822 }
7729 -1 function initializePromise(promise, resolver) {
7730 -1 try {
7731 -1 resolver(function resolvePromise(value) {
7732 -1 resolve(promise, value);
7733 -1 }, function rejectPromise(reason) {
7734 -1 reject(promise, reason);
7735 -1 });
7736 -1 } catch (e) {
7737 -1 reject(promise, e);
-1 12823 };
-1 12824 if (get) {
-1 12825 extDel = defineLength(function(arg) {
-1 12826 var id, args = arguments;
-1 12827 if (resolve) {
-1 12828 args = resolve(args);
-1 12829 }
-1 12830 id = get(args);
-1 12831 if (id === null) {
-1 12832 return;
-1 12833 }
-1 12834 conf.delete(id);
-1 12835 }, memLength);
-1 12836 } else if (length === 0) {
-1 12837 extDel = function() {
-1 12838 return conf.delete('data');
-1 12839 };
-1 12840 } else {
-1 12841 extDel = function(arg) {
-1 12842 if (resolve) {
-1 12843 arg = resolve(arguments)[0];
7738 12844 }
-1 12845 return conf.delete(arg);
-1 12846 };
-1 12847 }
-1 12848 extGet = defineLength(function() {
-1 12849 var id, args = arguments;
-1 12850 if (length === 0) {
-1 12851 return cache.data;
7739 12852 }
7740 -1 var id = 0;
7741 -1 function nextId() {
7742 -1 return id++;
-1 12853 if (resolve) {
-1 12854 args = resolve(args);
7743 12855 }
7744 -1 function makePromise(promise) {
7745 -1 promise[PROMISE_ID] = id++;
7746 -1 promise._state = undefined;
7747 -1 promise._result = undefined;
7748 -1 promise._subscribers = [];
-1 12856 if (get) {
-1 12857 id = get(args);
-1 12858 } else {
-1 12859 id = String(args[0]);
7749 12860 }
7750 -1 function validationError() {
7751 -1 return new Error('Array Methods must be provided an Array');
-1 12861 return cache[id];
-1 12862 });
-1 12863 extHas = defineLength(function() {
-1 12864 var id, args = arguments;
-1 12865 if (length === 0) {
-1 12866 return conf.has('data');
7752 12867 }
7753 -1 var Enumerator = function() {
7754 -1 function Enumerator(Constructor, input) {
7755 -1 this._instanceConstructor = Constructor;
7756 -1 this.promise = new Constructor(noop);
7757 -1 if (!this.promise[PROMISE_ID]) {
7758 -1 makePromise(this.promise);
7759 -1 }
7760 -1 if (isArray(input)) {
7761 -1 this.length = input.length;
7762 -1 this._remaining = input.length;
7763 -1 this._result = new Array(this.length);
7764 -1 if (this.length === 0) {
7765 -1 fulfill(this.promise, this._result);
7766 -1 } else {
7767 -1 this.length = this.length || 0;
7768 -1 this._enumerate(input);
7769 -1 if (this._remaining === 0) {
7770 -1 fulfill(this.promise, this._result);
7771 -1 }
7772 -1 }
7773 -1 } else {
7774 -1 reject(this.promise, validationError());
7775 -1 }
-1 12868 if (resolve) {
-1 12869 args = resolve(args);
-1 12870 }
-1 12871 if (get) {
-1 12872 id = get(args);
-1 12873 } else {
-1 12874 id = String(args[0]);
-1 12875 }
-1 12876 if (id === null) {
-1 12877 return false;
-1 12878 }
-1 12879 return conf.has(id);
-1 12880 });
-1 12881 defineProperties(memoized, {
-1 12882 __memoized__: d(true),
-1 12883 delete: d(extDel),
-1 12884 clear: d(conf.clear),
-1 12885 _get: d(extGet),
-1 12886 _has: d(extHas)
-1 12887 });
-1 12888 return conf;
-1 12889 };
-1 12890 }, {
-1 12891 './resolve-normalize': 213,
-1 12892 './resolve-resolve': 214,
-1 12893 d: 149,
-1 12894 'es5-ext/error/custom': 156,
-1 12895 'es5-ext/function/_define-length': 157,
-1 12896 'event-emitter': 200
-1 12897 } ],
-1 12898 211: [ function(_dereq_, module, exports) {
-1 12899 'use strict';
-1 12900 }, {} ],
-1 12901 212: [ function(_dereq_, module, exports) {
-1 12902 'use strict';
-1 12903 var toPosInt = _dereq_('es5-ext/number/to-pos-integer');
-1 12904 module.exports = function(optsLength, fnLength, isAsync) {
-1 12905 var length;
-1 12906 if (isNaN(optsLength)) {
-1 12907 length = fnLength;
-1 12908 if (!(length >= 0)) {
-1 12909 return 1;
-1 12910 }
-1 12911 if (isAsync && length) {
-1 12912 return length - 1;
-1 12913 }
-1 12914 return length;
-1 12915 }
-1 12916 if (optsLength === false) {
-1 12917 return false;
-1 12918 }
-1 12919 return toPosInt(optsLength);
-1 12920 };
-1 12921 }, {
-1 12922 'es5-ext/number/to-pos-integer': 168
-1 12923 } ],
-1 12924 213: [ function(_dereq_, module, exports) {
-1 12925 'use strict';
-1 12926 var callable = _dereq_('es5-ext/object/valid-callable');
-1 12927 module.exports = function(userNormalizer) {
-1 12928 var normalizer;
-1 12929 if (typeof userNormalizer === 'function') {
-1 12930 return {
-1 12931 set: userNormalizer,
-1 12932 get: userNormalizer
-1 12933 };
-1 12934 }
-1 12935 normalizer = {
-1 12936 get: callable(userNormalizer.get)
-1 12937 };
-1 12938 if (userNormalizer.set !== undefined) {
-1 12939 normalizer.set = callable(userNormalizer.set);
-1 12940 if (userNormalizer.delete) {
-1 12941 normalizer.delete = callable(userNormalizer.delete);
-1 12942 }
-1 12943 if (userNormalizer.clear) {
-1 12944 normalizer.clear = callable(userNormalizer.clear);
-1 12945 }
-1 12946 return normalizer;
-1 12947 }
-1 12948 normalizer.set = normalizer.get;
-1 12949 return normalizer;
-1 12950 };
-1 12951 }, {
-1 12952 'es5-ext/object/valid-callable': 184
-1 12953 } ],
-1 12954 214: [ function(_dereq_, module, exports) {
-1 12955 'use strict';
-1 12956 var toArray = _dereq_('es5-ext/array/to-array'), isValue = _dereq_('es5-ext/object/is-value'), callable = _dereq_('es5-ext/object/valid-callable');
-1 12957 var slice = Array.prototype.slice, resolveArgs;
-1 12958 resolveArgs = function(args) {
-1 12959 return this.map(function(resolve, i) {
-1 12960 return resolve ? resolve(args[i]) : args[i];
-1 12961 }).concat(slice.call(args, this.length));
-1 12962 };
-1 12963 module.exports = function(resolvers) {
-1 12964 resolvers = toArray(resolvers);
-1 12965 resolvers.forEach(function(resolve) {
-1 12966 if (isValue(resolve)) {
-1 12967 callable(resolve);
-1 12968 }
-1 12969 });
-1 12970 return resolveArgs.bind(resolvers);
-1 12971 };
-1 12972 }, {
-1 12973 'es5-ext/array/to-array': 155,
-1 12974 'es5-ext/object/is-value': 176,
-1 12975 'es5-ext/object/valid-callable': 184
-1 12976 } ],
-1 12977 215: [ function(_dereq_, module, exports) {
-1 12978 'use strict';
-1 12979 var indexOf = _dereq_('es5-ext/array/#/e-index-of');
-1 12980 module.exports = function() {
-1 12981 var lastId = 0, argsMap = [], cache = [];
-1 12982 return {
-1 12983 get: function(args) {
-1 12984 var index = indexOf.call(argsMap, args[0]);
-1 12985 return index === -1 ? null : cache[index];
-1 12986 },
-1 12987 set: function(args) {
-1 12988 argsMap.push(args[0]);
-1 12989 cache.push(++lastId);
-1 12990 return lastId;
-1 12991 },
-1 12992 delete: function(id) {
-1 12993 var index = indexOf.call(cache, id);
-1 12994 if (index !== -1) {
-1 12995 argsMap.splice(index, 1);
-1 12996 cache.splice(index, 1);
7776 12997 }
7777 -1 Enumerator.prototype._enumerate = function _enumerate(input) {
7778 -1 for (var i = 0; this._state === PENDING && i < input.length; i++) {
7779 -1 this._eachEntry(input[i], i);
7780 -1 }
7781 -1 };
7782 -1 Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
7783 -1 var c = this._instanceConstructor;
7784 -1 var resolve$$1 = c.resolve;
7785 -1 if (resolve$$1 === resolve$1) {
7786 -1 var _then = getThen(entry);
7787 -1 if (_then === then && entry._state !== PENDING) {
7788 -1 this._settledAt(entry._state, i, entry._result);
7789 -1 } else if (typeof _then !== 'function') {
7790 -1 this._remaining--;
7791 -1 this._result[i] = entry;
7792 -1 } else if (c === Promise$1) {
7793 -1 var promise = new c(noop);
7794 -1 handleMaybeThenable(promise, entry, _then);
7795 -1 this._willSettleAt(promise, i);
7796 -1 } else {
7797 -1 this._willSettleAt(new c(function(resolve$$1) {
7798 -1 return resolve$$1(entry);
7799 -1 }), i);
7800 -1 }
7801 -1 } else {
7802 -1 this._willSettleAt(resolve$$1(entry), i);
-1 12998 },
-1 12999 clear: function() {
-1 13000 argsMap = [];
-1 13001 cache = [];
-1 13002 }
-1 13003 };
-1 13004 };
-1 13005 }, {
-1 13006 'es5-ext/array/#/e-index-of': 151
-1 13007 } ],
-1 13008 216: [ function(_dereq_, module, exports) {
-1 13009 'use strict';
-1 13010 var indexOf = _dereq_('es5-ext/array/#/e-index-of'), create = Object.create;
-1 13011 module.exports = function(length) {
-1 13012 var lastId = 0, map = [ [], [] ], cache = create(null);
-1 13013 return {
-1 13014 get: function(args) {
-1 13015 var index = 0, set = map, i;
-1 13016 while (index < length - 1) {
-1 13017 i = indexOf.call(set[0], args[index]);
-1 13018 if (i === -1) {
-1 13019 return null;
7803 13020 }
7804 -1 };
7805 -1 Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
7806 -1 var promise = this.promise;
7807 -1 if (promise._state === PENDING) {
7808 -1 this._remaining--;
7809 -1 if (state === REJECTED) {
7810 -1 reject(promise, value);
7811 -1 } else {
7812 -1 this._result[i] = value;
7813 -1 }
-1 13021 set = set[1][i];
-1 13022 ++index;
-1 13023 }
-1 13024 i = indexOf.call(set[0], args[index]);
-1 13025 if (i === -1) {
-1 13026 return null;
-1 13027 }
-1 13028 return set[1][i] || null;
-1 13029 },
-1 13030 set: function(args) {
-1 13031 var index = 0, set = map, i;
-1 13032 while (index < length - 1) {
-1 13033 i = indexOf.call(set[0], args[index]);
-1 13034 if (i === -1) {
-1 13035 i = set[0].push(args[index]) - 1;
-1 13036 set[1].push([ [], [] ]);
7814 13037 }
7815 -1 if (this._remaining === 0) {
7816 -1 fulfill(promise, this._result);
-1 13038 set = set[1][i];
-1 13039 ++index;
-1 13040 }
-1 13041 i = indexOf.call(set[0], args[index]);
-1 13042 if (i === -1) {
-1 13043 i = set[0].push(args[index]) - 1;
-1 13044 }
-1 13045 set[1][i] = ++lastId;
-1 13046 cache[lastId] = args;
-1 13047 return lastId;
-1 13048 },
-1 13049 delete: function(id) {
-1 13050 var index = 0, set = map, i, path = [], args = cache[id];
-1 13051 while (index < length - 1) {
-1 13052 i = indexOf.call(set[0], args[index]);
-1 13053 if (i === -1) {
-1 13054 return;
7817 13055 }
7818 -1 };
7819 -1 Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
7820 -1 var enumerator = this;
7821 -1 subscribe(promise, undefined, function(value) {
7822 -1 return enumerator._settledAt(FULFILLED, i, value);
7823 -1 }, function(reason) {
7824 -1 return enumerator._settledAt(REJECTED, i, reason);
7825 -1 });
7826 -1 };
7827 -1 return Enumerator;
7828 -1 }();
7829 -1 function all(entries) {
7830 -1 return new Enumerator(this, entries).promise;
7831 -1 }
7832 -1 function race(entries) {
7833 -1 var Constructor = this;
7834 -1 if (!isArray(entries)) {
7835 -1 return new Constructor(function(_, reject) {
7836 -1 return reject(new TypeError('You must pass an array to race.'));
7837 -1 });
7838 -1 } else {
7839 -1 return new Constructor(function(resolve, reject) {
7840 -1 var length = entries.length;
7841 -1 for (var i = 0; i < length; i++) {
7842 -1 Constructor.resolve(entries[i]).then(resolve, reject);
7843 -1 }
7844 -1 });
-1 13056 path.push(set, i);
-1 13057 set = set[1][i];
-1 13058 ++index;
7845 13059 }
-1 13060 i = indexOf.call(set[0], args[index]);
-1 13061 if (i === -1) {
-1 13062 return;
-1 13063 }
-1 13064 id = set[1][i];
-1 13065 set[0].splice(i, 1);
-1 13066 set[1].splice(i, 1);
-1 13067 while (!set[0].length && path.length) {
-1 13068 i = path.pop();
-1 13069 set = path.pop();
-1 13070 set[0].splice(i, 1);
-1 13071 set[1].splice(i, 1);
-1 13072 }
-1 13073 delete cache[id];
-1 13074 },
-1 13075 clear: function() {
-1 13076 map = [ [], [] ];
-1 13077 cache = create(null);
7846 13078 }
7847 -1 function reject$1(reason) {
7848 -1 var Constructor = this;
7849 -1 var promise = new Constructor(noop);
7850 -1 reject(promise, reason);
7851 -1 return promise;
7852 -1 }
7853 -1 function needsResolver() {
7854 -1 throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
7855 -1 }
7856 -1 function needsNew() {
7857 -1 throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.');
-1 13079 };
-1 13080 };
-1 13081 }, {
-1 13082 'es5-ext/array/#/e-index-of': 151
-1 13083 } ],
-1 13084 217: [ function(_dereq_, module, exports) {
-1 13085 'use strict';
-1 13086 module.exports = function(length) {
-1 13087 if (!length) {
-1 13088 return function() {
-1 13089 return '';
-1 13090 };
-1 13091 }
-1 13092 return function(args) {
-1 13093 var id = String(args[0]), i = 0, currentLength = length;
-1 13094 while (--currentLength) {
-1 13095 id += '' + args[++i];
7858 13096 }
7859 -1 var Promise$1 = function() {
7860 -1 function Promise(resolver) {
7861 -1 this[PROMISE_ID] = nextId();
7862 -1 this._result = this._state = undefined;
7863 -1 this._subscribers = [];
7864 -1 if (noop !== resolver) {
7865 -1 typeof resolver !== 'function' && needsResolver();
7866 -1 this instanceof Promise ? initializePromise(this, resolver) : needsNew();
-1 13097 return id;
-1 13098 };
-1 13099 };
-1 13100 }, {} ],
-1 13101 218: [ function(_dereq_, module, exports) {
-1 13102 'use strict';
-1 13103 var indexOf = _dereq_('es5-ext/array/#/e-index-of');
-1 13104 var create = Object.create;
-1 13105 module.exports = function() {
-1 13106 var lastId = 0, map = [], cache = create(null);
-1 13107 return {
-1 13108 get: function(args) {
-1 13109 var index = 0, set = map, i, length = args.length;
-1 13110 if (length === 0) {
-1 13111 return set[length] || null;
-1 13112 }
-1 13113 if (set = set[length]) {
-1 13114 while (index < length - 1) {
-1 13115 i = indexOf.call(set[0], args[index]);
-1 13116 if (i === -1) {
-1 13117 return null;
-1 13118 }
-1 13119 set = set[1][i];
-1 13120 ++index;
7867 13121 }
7868 -1 }
7869 -1 Promise.prototype.catch = function _catch(onRejection) {
7870 -1 return this.then(null, onRejection);
7871 -1 };
7872 -1 Promise.prototype.finally = function _finally(callback) {
7873 -1 var promise = this;
7874 -1 var constructor = promise.constructor;
7875 -1 if (isFunction(callback)) {
7876 -1 return promise.then(function(value) {
7877 -1 return constructor.resolve(callback()).then(function() {
7878 -1 return value;
7879 -1 });
7880 -1 }, function(reason) {
7881 -1 return constructor.resolve(callback()).then(function() {
7882 -1 throw reason;
7883 -1 });
7884 -1 });
-1 13122 i = indexOf.call(set[0], args[index]);
-1 13123 if (i === -1) {
-1 13124 return null;
7885 13125 }
7886 -1 return promise.then(callback, callback);
7887 -1 };
7888 -1 return Promise;
7889 -1 }();
7890 -1 Promise$1.prototype.then = then;
7891 -1 Promise$1.all = all;
7892 -1 Promise$1.race = race;
7893 -1 Promise$1.resolve = resolve$1;
7894 -1 Promise$1.reject = reject$1;
7895 -1 Promise$1._setScheduler = setScheduler;
7896 -1 Promise$1._setAsap = setAsap;
7897 -1 Promise$1._asap = asap;
7898 -1 function polyfill() {
7899 -1 var local = void 0;
7900 -1 if (typeof global !== 'undefined') {
7901 -1 local = global;
7902 -1 } else if (typeof self !== 'undefined') {
7903 -1 local = self;
-1 13126 return set[1][i] || null;
-1 13127 }
-1 13128 return null;
-1 13129 },
-1 13130 set: function(args) {
-1 13131 var index = 0, set = map, i, length = args.length;
-1 13132 if (length === 0) {
-1 13133 set[length] = ++lastId;
7904 13134 } else {
7905 -1 try {
7906 -1 local = Function('return this')();
7907 -1 } catch (e) {
7908 -1 throw new Error('polyfill failed because global object is unavailable in this environment');
-1 13135 if (!set[length]) {
-1 13136 set[length] = [ [], [] ];
-1 13137 }
-1 13138 set = set[length];
-1 13139 while (index < length - 1) {
-1 13140 i = indexOf.call(set[0], args[index]);
-1 13141 if (i === -1) {
-1 13142 i = set[0].push(args[index]) - 1;
-1 13143 set[1].push([ [], [] ]);
-1 13144 }
-1 13145 set = set[1][i];
-1 13146 ++index;
-1 13147 }
-1 13148 i = indexOf.call(set[0], args[index]);
-1 13149 if (i === -1) {
-1 13150 i = set[0].push(args[index]) - 1;
7909 13151 }
-1 13152 set[1][i] = ++lastId;
7910 13153 }
7911 -1 var P = local.Promise;
7912 -1 if (P) {
7913 -1 var promiseToString = null;
7914 -1 try {
7915 -1 promiseToString = Object.prototype.toString.call(P.resolve());
7916 -1 } catch (e) {}
7917 -1 if (promiseToString === '[object Promise]' && !P.cast) {
-1 13154 cache[lastId] = args;
-1 13155 return lastId;
-1 13156 },
-1 13157 delete: function(id) {
-1 13158 var index = 0, set = map, i, args = cache[id], length = args.length, path = [];
-1 13159 if (length === 0) {
-1 13160 delete set[length];
-1 13161 } else if (set = set[length]) {
-1 13162 while (index < length - 1) {
-1 13163 i = indexOf.call(set[0], args[index]);
-1 13164 if (i === -1) {
-1 13165 return;
-1 13166 }
-1 13167 path.push(set, i);
-1 13168 set = set[1][i];
-1 13169 ++index;
-1 13170 }
-1 13171 i = indexOf.call(set[0], args[index]);
-1 13172 if (i === -1) {
7918 13173 return;
7919 13174 }
-1 13175 id = set[1][i];
-1 13176 set[0].splice(i, 1);
-1 13177 set[1].splice(i, 1);
-1 13178 while (!set[0].length && path.length) {
-1 13179 i = path.pop();
-1 13180 set = path.pop();
-1 13181 set[0].splice(i, 1);
-1 13182 set[1].splice(i, 1);
-1 13183 }
7920 13184 }
7921 -1 local.Promise = Promise$1;
-1 13185 delete cache[id];
-1 13186 },
-1 13187 clear: function() {
-1 13188 map = [];
-1 13189 cache = create(null);
7922 13190 }
7923 -1 Promise$1.polyfill = polyfill;
7924 -1 Promise$1.Promise = Promise$1;
7925 -1 return Promise$1;
7926 -1 });
7927 -1 }).call(this, _dereq_('_process'), typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {});
-1 13191 };
-1 13192 };
7928 13193 }, {
7929 -1 _process: 33
-1 13194 'es5-ext/array/#/e-index-of': 151
7930 13195 } ],
7931 -1 32: [ function(_dereq_, module, exports) {
7932 -1 module.exports = function(obj) {
7933 -1 return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer);
-1 13196 219: [ function(_dereq_, module, exports) {
-1 13197 'use strict';
-1 13198 module.exports = function(args) {
-1 13199 var id, i, length = args.length;
-1 13200 if (!length) {
-1 13201 return '';
-1 13202 }
-1 13203 id = String(args[i = 0]);
-1 13204 while (--length) {
-1 13205 id += '' + args[++i];
-1 13206 }
-1 13207 return id;
7934 13208 };
7935 -1 function isBuffer(obj) {
7936 -1 return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);
7937 -1 }
7938 -1 function isSlowBuffer(obj) {
7939 -1 return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0));
7940 -1 }
7941 13209 }, {} ],
7942 -1 33: [ function(_dereq_, module, exports) {
-1 13210 220: [ function(_dereq_, module, exports) {
-1 13211 'use strict';
-1 13212 var callable = _dereq_('es5-ext/object/valid-callable'), forEach = _dereq_('es5-ext/object/for-each'), extensions = _dereq_('./lib/registered-extensions'), configure = _dereq_('./lib/configure-map'), resolveLength = _dereq_('./lib/resolve-length');
-1 13213 module.exports = function self(fn) {
-1 13214 var options, length, conf;
-1 13215 callable(fn);
-1 13216 options = Object(arguments[1]);
-1 13217 if (options.async && options.promise) {
-1 13218 throw new Error('Options \'async\' and \'promise\' cannot be used together');
-1 13219 }
-1 13220 if (hasOwnProperty.call(fn, '__memoized__') && !options.force) {
-1 13221 return fn;
-1 13222 }
-1 13223 length = resolveLength(options.length, fn.length, options.async && extensions.async);
-1 13224 conf = configure(fn, length, options);
-1 13225 forEach(extensions, function(extFn, name) {
-1 13226 if (options[name]) {
-1 13227 extFn(options[name], conf, options);
-1 13228 }
-1 13229 });
-1 13230 if (self.__profiler__) {
-1 13231 self.__profiler__(conf);
-1 13232 }
-1 13233 conf.updateEnv();
-1 13234 return conf.memoized;
-1 13235 };
-1 13236 }, {
-1 13237 './lib/configure-map': 210,
-1 13238 './lib/registered-extensions': 211,
-1 13239 './lib/resolve-length': 212,
-1 13240 'es5-ext/object/for-each': 173,
-1 13241 'es5-ext/object/valid-callable': 184
-1 13242 } ],
-1 13243 221: [ function(_dereq_, module, exports) {
-1 13244 (function(process, setImmediate) {
-1 13245 'use strict';
-1 13246 var callable, byObserver;
-1 13247 callable = function(fn) {
-1 13248 if (typeof fn !== 'function') {
-1 13249 throw new TypeError(fn + ' is not a function');
-1 13250 }
-1 13251 return fn;
-1 13252 };
-1 13253 byObserver = function(Observer) {
-1 13254 var node = document.createTextNode(''), queue, currentQueue, i = 0;
-1 13255 new Observer(function() {
-1 13256 var callback;
-1 13257 if (!queue) {
-1 13258 if (!currentQueue) {
-1 13259 return;
-1 13260 }
-1 13261 queue = currentQueue;
-1 13262 } else if (currentQueue) {
-1 13263 queue = currentQueue.concat(queue);
-1 13264 }
-1 13265 currentQueue = queue;
-1 13266 queue = null;
-1 13267 if (typeof currentQueue === 'function') {
-1 13268 callback = currentQueue;
-1 13269 currentQueue = null;
-1 13270 callback();
-1 13271 return;
-1 13272 }
-1 13273 node.data = i = ++i % 2;
-1 13274 while (currentQueue) {
-1 13275 callback = currentQueue.shift();
-1 13276 if (!currentQueue.length) {
-1 13277 currentQueue = null;
-1 13278 }
-1 13279 callback();
-1 13280 }
-1 13281 }).observe(node, {
-1 13282 characterData: true
-1 13283 });
-1 13284 return function(fn) {
-1 13285 callable(fn);
-1 13286 if (queue) {
-1 13287 if (typeof queue === 'function') {
-1 13288 queue = [ queue, fn ];
-1 13289 } else {
-1 13290 queue.push(fn);
-1 13291 }
-1 13292 return;
-1 13293 }
-1 13294 queue = fn;
-1 13295 node.data = i = ++i % 2;
-1 13296 };
-1 13297 };
-1 13298 module.exports = function() {
-1 13299 if (typeof process === 'object' && process && typeof process.nextTick === 'function') {
-1 13300 return process.nextTick;
-1 13301 }
-1 13302 if (typeof document === 'object' && document) {
-1 13303 if (typeof MutationObserver === 'function') {
-1 13304 return byObserver(MutationObserver);
-1 13305 }
-1 13306 if (typeof WebKitMutationObserver === 'function') {
-1 13307 return byObserver(WebKitMutationObserver);
-1 13308 }
-1 13309 }
-1 13310 if (typeof setImmediate === 'function') {
-1 13311 return function(cb) {
-1 13312 setImmediate(callable(cb));
-1 13313 };
-1 13314 }
-1 13315 if (typeof setTimeout === 'function' || typeof setTimeout === 'object') {
-1 13316 return function(cb) {
-1 13317 setTimeout(callable(cb), 0);
-1 13318 };
-1 13319 }
-1 13320 return null;
-1 13321 }();
-1 13322 }).call(this, _dereq_('_process'), _dereq_('timers').setImmediate);
-1 13323 }, {
-1 13324 _process: 222,
-1 13325 timers: 223
-1 13326 } ],
-1 13327 222: [ function(_dereq_, module, exports) {
7943 13328 var process = module.exports = {};
7944 13329 var cachedSetTimeout;
7945 13330 var cachedClearTimeout;
@@ -8095,6 +13480,187 @@ module.exports = {
8095 13480 process.umask = function() {
8096 13481 return 0;
8097 13482 };
-1 13483 }, {} ],
-1 13484 223: [ function(_dereq_, module, exports) {
-1 13485 (function(setImmediate, clearImmediate) {
-1 13486 var nextTick = _dereq_('process/browser.js').nextTick;
-1 13487 var apply = Function.prototype.apply;
-1 13488 var slice = Array.prototype.slice;
-1 13489 var immediateIds = {};
-1 13490 var nextImmediateId = 0;
-1 13491 exports.setTimeout = function() {
-1 13492 return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);
-1 13493 };
-1 13494 exports.setInterval = function() {
-1 13495 return new Timeout(apply.call(setInterval, window, arguments), clearInterval);
-1 13496 };
-1 13497 exports.clearTimeout = exports.clearInterval = function(timeout) {
-1 13498 timeout.close();
-1 13499 };
-1 13500 function Timeout(id, clearFn) {
-1 13501 this._id = id;
-1 13502 this._clearFn = clearFn;
-1 13503 }
-1 13504 Timeout.prototype.unref = Timeout.prototype.ref = function() {};
-1 13505 Timeout.prototype.close = function() {
-1 13506 this._clearFn.call(window, this._id);
-1 13507 };
-1 13508 exports.enroll = function(item, msecs) {
-1 13509 clearTimeout(item._idleTimeoutId);
-1 13510 item._idleTimeout = msecs;
-1 13511 };
-1 13512 exports.unenroll = function(item) {
-1 13513 clearTimeout(item._idleTimeoutId);
-1 13514 item._idleTimeout = -1;
-1 13515 };
-1 13516 exports._unrefActive = exports.active = function(item) {
-1 13517 clearTimeout(item._idleTimeoutId);
-1 13518 var msecs = item._idleTimeout;
-1 13519 if (msecs >= 0) {
-1 13520 item._idleTimeoutId = setTimeout(function onTimeout() {
-1 13521 if (item._onTimeout) {
-1 13522 item._onTimeout();
-1 13523 }
-1 13524 }, msecs);
-1 13525 }
-1 13526 };
-1 13527 exports.setImmediate = typeof setImmediate === 'function' ? setImmediate : function(fn) {
-1 13528 var id = nextImmediateId++;
-1 13529 var args = arguments.length < 2 ? false : slice.call(arguments, 1);
-1 13530 immediateIds[id] = true;
-1 13531 nextTick(function onNextTick() {
-1 13532 if (immediateIds[id]) {
-1 13533 if (args) {
-1 13534 fn.apply(null, args);
-1 13535 } else {
-1 13536 fn.call(null);
-1 13537 }
-1 13538 exports.clearImmediate(id);
-1 13539 }
-1 13540 });
-1 13541 return id;
-1 13542 };
-1 13543 exports.clearImmediate = typeof clearImmediate === 'function' ? clearImmediate : function(id) {
-1 13544 delete immediateIds[id];
-1 13545 };
-1 13546 }).call(this, _dereq_('timers').setImmediate, _dereq_('timers').clearImmediate);
-1 13547 }, {
-1 13548 'process/browser.js': 222,
-1 13549 timers: 223
-1 13550 } ],
-1 13551 224: [ function(_dereq_, module, exports) {
-1 13552 'use strict';
-1 13553 module.exports = 2147483647;
-1 13554 }, {} ],
-1 13555 225: [ function(_dereq_, module, exports) {
-1 13556 'use strict';
-1 13557 var toPosInt = _dereq_('es5-ext/number/to-pos-integer'), maxTimeout = _dereq_('./max-timeout');
-1 13558 module.exports = function(value) {
-1 13559 value = toPosInt(value);
-1 13560 if (value > maxTimeout) {
-1 13561 throw new TypeError(value + ' exceeds maximum possible timeout');
-1 13562 }
-1 13563 return value;
-1 13564 };
-1 13565 }, {
-1 13566 './max-timeout': 224,
-1 13567 'es5-ext/number/to-pos-integer': 168
-1 13568 } ],
-1 13569 226: [ function(_dereq_, module, exports) {
-1 13570 (function(global) {
-1 13571 (function(self) {
-1 13572 'use strict';
-1 13573 if (self.WeakMap) {
-1 13574 return;
-1 13575 }
-1 13576 var hasOwnProperty = Object.prototype.hasOwnProperty;
-1 13577 var defineProperty = function(object, name, value) {
-1 13578 if (Object.defineProperty) {
-1 13579 Object.defineProperty(object, name, {
-1 13580 configurable: true,
-1 13581 writable: true,
-1 13582 value: value
-1 13583 });
-1 13584 } else {
-1 13585 object[name] = value;
-1 13586 }
-1 13587 };
-1 13588 self.WeakMap = function() {
-1 13589 function WeakMap() {
-1 13590 if (this === void 0) {
-1 13591 throw new TypeError('Constructor WeakMap requires \'new\'');
-1 13592 }
-1 13593 defineProperty(this, '_id', genId('_WeakMap'));
-1 13594 if (arguments.length > 0) {
-1 13595 throw new TypeError('WeakMap iterable is not supported');
-1 13596 }
-1 13597 }
-1 13598 defineProperty(WeakMap.prototype, 'delete', function(key) {
-1 13599 checkInstance(this, 'delete');
-1 13600 if (!isObject(key)) {
-1 13601 return false;
-1 13602 }
-1 13603 var entry = key[this._id];
-1 13604 if (entry && entry[0] === key) {
-1 13605 delete key[this._id];
-1 13606 return true;
-1 13607 }
-1 13608 return false;
-1 13609 });
-1 13610 defineProperty(WeakMap.prototype, 'get', function(key) {
-1 13611 checkInstance(this, 'get');
-1 13612 if (!isObject(key)) {
-1 13613 return void 0;
-1 13614 }
-1 13615 var entry = key[this._id];
-1 13616 if (entry && entry[0] === key) {
-1 13617 return entry[1];
-1 13618 }
-1 13619 return void 0;
-1 13620 });
-1 13621 defineProperty(WeakMap.prototype, 'has', function(key) {
-1 13622 checkInstance(this, 'has');
-1 13623 if (!isObject(key)) {
-1 13624 return false;
-1 13625 }
-1 13626 var entry = key[this._id];
-1 13627 if (entry && entry[0] === key) {
-1 13628 return true;
-1 13629 }
-1 13630 return false;
-1 13631 });
-1 13632 defineProperty(WeakMap.prototype, 'set', function(key, value) {
-1 13633 checkInstance(this, 'set');
-1 13634 if (!isObject(key)) {
-1 13635 throw new TypeError('Invalid value used as weak map key');
-1 13636 }
-1 13637 var entry = key[this._id];
-1 13638 if (entry && entry[0] === key) {
-1 13639 entry[1] = value;
-1 13640 return this;
-1 13641 }
-1 13642 defineProperty(key, this._id, [ key, value ]);
-1 13643 return this;
-1 13644 });
-1 13645 function checkInstance(x, methodName) {
-1 13646 if (!isObject(x) || !hasOwnProperty.call(x, '_id')) {
-1 13647 throw new TypeError(methodName + ' method called on incompatible receiver ' + typeof x);
-1 13648 }
-1 13649 }
-1 13650 function genId(prefix) {
-1 13651 return prefix + '_' + rand() + '.' + rand();
-1 13652 }
-1 13653 function rand() {
-1 13654 return Math.random().toString().substring(2);
-1 13655 }
-1 13656 defineProperty(WeakMap, '_polyfill', true);
-1 13657 return WeakMap;
-1 13658 }();
-1 13659 function isObject(x) {
-1 13660 return Object(x) === x;
-1 13661 }
-1 13662 })(typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : this);
-1 13663 }).call(this, typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {});
8098 13664 }, {} ]
8099 13665 }, {}, [ 1 ]);
8100 13666 'use strict';
@@ -8102,22 +13668,32 @@ module.exports = {
8102 13668 'use strict';
8103 13669 var helpers = {};
8104 13670 'use strict';
8105 -1 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) {
8106 -1 return typeof obj;
8107 -1 } : function(obj) {
8108 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
8109 -1 };
8110 -1 var _extends = Object.assign || function(target) {
8111 -1 for (var i = 1; i < arguments.length; i++) {
8112 -1 var source = arguments[i];
8113 -1 for (var key in source) {
8114 -1 if (Object.prototype.hasOwnProperty.call(source, key)) {
8115 -1 target[key] = source[key];
-1 13671 function _typeof(obj) {
-1 13672 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 13673 _typeof = function _typeof(obj) {
-1 13674 return typeof obj;
-1 13675 };
-1 13676 } else {
-1 13677 _typeof = function _typeof(obj) {
-1 13678 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 13679 };
-1 13680 }
-1 13681 return _typeof(obj);
-1 13682 }
-1 13683 function _extends() {
-1 13684 _extends = Object.assign || function(target) {
-1 13685 for (var i = 1; i < arguments.length; i++) {
-1 13686 var source = arguments[i];
-1 13687 for (var key in source) {
-1 13688 if (Object.prototype.hasOwnProperty.call(source, key)) {
-1 13689 target[key] = source[key];
-1 13690 }
8116 13691 }
8117 13692 }
8118 -1 }
8119 -1 return target;
8120 -1 };
-1 13693 return target;
-1 13694 };
-1 13695 return _extends.apply(this, arguments);
-1 13696 }
8121 13697 function getDefaultConfiguration(audit) {
8122 13698 'use strict';
8123 13699 var config;
@@ -8147,6 +13723,7 @@ module.exports = {
8147 13723 this.brand = 'axe';
8148 13724 this.application = 'axeAPI';
8149 13725 this.tagExclude = [ 'experimental' ];
-1 13726 this.lang = 'en';
8150 13727 this.defaultConfig = audit;
8151 13728 this._init();
8152 13729 this._defaultLocale = null;
@@ -8157,7 +13734,10 @@ module.exports = {
8157 13734 }
8158 13735 var locale = {
8159 13736 checks: {},
8160 -1 rules: {}
-1 13737 rules: {},
-1 13738 failureSummaries: {},
-1 13739 incompleteFallbackMessage: '',
-1 13740 lang: this.lang
8161 13741 };
8162 13742 var checkIDs = Object.keys(this.data.checks);
8163 13743 for (var i = 0; i < checkIDs.length; i++) {
@@ -8180,6 +13760,16 @@ module.exports = {
8180 13760 help: help
8181 13761 };
8182 13762 }
-1 13763 var failureSummaries = Object.keys(this.data.failureSummaries);
-1 13764 for (var _i2 = 0; _i2 < failureSummaries.length; _i2++) {
-1 13765 var type = failureSummaries[_i2];
-1 13766 var failureSummary = this.data.failureSummaries[type];
-1 13767 var failureMessage = failureSummary.failureMessage;
-1 13768 locale.failureSummaries[type] = {
-1 13769 failureMessage: failureMessage
-1 13770 };
-1 13771 }
-1 13772 locale.incompleteFallbackMessage = this.data.incompleteFallbackMessage;
8183 13773 this._defaultLocale = locale;
8184 13774 };
8185 13775 Audit.prototype._resetLocale = function() {
@@ -8201,7 +13791,7 @@ module.exports = {
8201 13791 messages: {
8202 13792 pass: pass || a.messages.pass,
8203 13793 fail: fail || a.messages.fail,
8204 -1 incomplete: _typeof(a.messages.incomplete) === 'object' ? _extends({}, a.messages.incomplete, b.incomplete) : b.incomplete
-1 13794 incomplete: _typeof(a.messages.incomplete) === 'object' ? _extends({}, a.messages.incomplete, {}, b.incomplete) : b.incomplete
8205 13795 }
8206 13796 });
8207 13797 };
@@ -8218,12 +13808,27 @@ module.exports = {
8218 13808 description: description || a.description
8219 13809 });
8220 13810 };
-1 13811 var mergeFailureMessage = function mergeFailureMessage(a, b) {
-1 13812 var failureMessage = b.failureMessage;
-1 13813 if (typeof failureMessage === 'string') {
-1 13814 failureMessage = axe.imports.doT.compile(failureMessage);
-1 13815 }
-1 13816 return _extends({}, a, {
-1 13817 failureMessage: failureMessage || a.failureMessage
-1 13818 });
-1 13819 };
-1 13820 var mergeFallbackMessage = function mergeFallbackMessage(a, b) {
-1 13821 if (typeof b === 'string') {
-1 13822 b = axe.imports.doT.compile(b);
-1 13823 }
-1 13824 return b || a;
-1 13825 };
8221 13826 Audit.prototype._applyCheckLocale = function(checks) {
8222 13827 var keys = Object.keys(checks);
8223 13828 for (var i = 0; i < keys.length; i++) {
8224 13829 var id = keys[i];
8225 13830 if (!this.data.checks[id]) {
8226 -1 throw new Error('Locale provided for unknown check: "' + id + '"');
-1 13831 throw new Error('Locale provided for unknown check: "'.concat(id, '"'));
8227 13832 }
8228 13833 this.data.checks[id] = mergeCheckLocale(this.data.checks[id], checks[id]);
8229 13834 }
@@ -8233,11 +13838,21 @@ module.exports = {
8233 13838 for (var i = 0; i < keys.length; i++) {
8234 13839 var id = keys[i];
8235 13840 if (!this.data.rules[id]) {
8236 -1 throw new Error('Locale provided for unknown rule: "' + id + '"');
-1 13841 throw new Error('Locale provided for unknown rule: "'.concat(id, '"'));
8237 13842 }
8238 13843 this.data.rules[id] = mergeRuleLocale(this.data.rules[id], rules[id]);
8239 13844 }
8240 13845 };
-1 13846 Audit.prototype._applyFailureSummaries = function(messages) {
-1 13847 var keys = Object.keys(messages);
-1 13848 for (var i = 0; i < keys.length; i++) {
-1 13849 var key = keys[i];
-1 13850 if (!this.data.failureSummaries[key]) {
-1 13851 throw new Error('Locale provided for unknown failureMessage: "'.concat(key, '"'));
-1 13852 }
-1 13853 this.data.failureSummaries[key] = mergeFailureMessage(this.data.failureSummaries[key], messages[key]);
-1 13854 }
-1 13855 };
8241 13856 Audit.prototype.applyLocale = function(locale) {
8242 13857 this._setDefaultLocale();
8243 13858 if (locale.checks) {
@@ -8246,10 +13861,20 @@ module.exports = {
8246 13861 if (locale.rules) {
8247 13862 this._applyRuleLocale(locale.rules);
8248 13863 }
-1 13864 if (locale.failureSummaries) {
-1 13865 this._applyFailureSummaries(locale.failureSummaries, 'failureSummaries');
-1 13866 }
-1 13867 if (locale.incompleteFallbackMessage) {
-1 13868 this.data.incompleteFallbackMessage = mergeFallbackMessage(this.data.incompleteFallbackMessage, locale.incompleteFallbackMessage);
-1 13869 }
-1 13870 if (locale.lang) {
-1 13871 this.lang = locale.lang;
-1 13872 }
8249 13873 };
8250 13874 Audit.prototype._init = function() {
8251 13875 var audit = getDefaultConfiguration(this.defaultConfig);
8252 13876 axe.commons = commons = audit.commons;
-1 13877 this.lang = audit.lang || 'en';
8253 13878 this.reporter = audit.reporter;
8254 13879 this.commands = {};
8255 13880 this.rules = [];
@@ -8282,7 +13907,7 @@ module.exports = {
8282 13907 Audit.prototype.addCheck = function(spec) {
8283 13908 'use strict';
8284 13909 var metadata = spec.metadata;
8285 -1 if ((typeof metadata === 'undefined' ? 'undefined' : _typeof(metadata)) === 'object') {
-1 13910 if (_typeof(metadata) === 'object') {
8286 13911 this.data.checks[spec.id] = metadata;
8287 13912 if (_typeof(metadata.messages) === 'object') {
8288 13913 Object.keys(metadata.messages).filter(function(prop) {
@@ -8355,14 +13980,12 @@ module.exports = {
8355 13980 });
8356 13981 var preloaderQueue = axe.utils.queue();
8357 13982 if (runLaterRules.length) {
8358 -1 preloaderQueue.defer(function(res, rej) {
8359 -1 axe.utils.preload(options).then(function(preloadResults) {
8360 -1 var assets = preloadResults[0];
8361 -1 res(assets);
8362 -1 }).catch(function(err) {
-1 13983 preloaderQueue.defer(function(resolve) {
-1 13984 axe.utils.preload(options).then(function(assets) {
-1 13985 return resolve(assets);
-1 13986 })['catch'](function(err) {
8363 13987 console.warn('Couldn\'t load preload assets: ', err);
8364 -1 var assets = undefined;
8365 -1 res(assets);
-1 13988 resolve(undefined);
8366 13989 });
8367 13990 });
8368 13991 }
@@ -8374,7 +13997,7 @@ module.exports = {
8374 13997 if (assetsFromQueue && assetsFromQueue.length) {
8375 13998 var assets = assetsFromQueue[0];
8376 13999 if (assets) {
8377 -1 context = _extends({}, context, assets);
-1 14000 context = _extends({}, context, {}, assets);
8378 14001 }
8379 14002 }
8380 14003 var nowRulesResults = nowRulesAndPreloaderResults[0];
@@ -8395,8 +14018,8 @@ module.exports = {
8395 14018 resolve(nowRulesResults.concat(laterRuleResults).filter(function(result) {
8396 14019 return !!result;
8397 14020 }));
8398 -1 }).catch(reject);
8399 -1 }).catch(reject);
-1 14021 })['catch'](reject);
-1 14022 })['catch'](reject);
8400 14023 };
8401 14024 Audit.prototype.after = function(results, options) {
8402 14025 'use strict';
@@ -8404,7 +14027,7 @@ module.exports = {
8404 14027 return results.map(function(ruleResult) {
8405 14028 var rule = axe.utils.findBy(rules, 'id', ruleResult.id);
8406 14029 if (!rule) {
8407 -1 throw new Error('Result for unknown rule. You may be running mismatch aXe-core versions');
-1 14030 throw new Error('Result for unknown rule. You may be running mismatch axe-core versions');
8408 14031 }
8409 14032 return rule.after(ruleResult, options);
8410 14033 });
@@ -8450,7 +14073,7 @@ module.exports = {
8450 14073 axe.log('Could not find tags `' + unmatchedTags.join('`, `') + '`');
8451 14074 }
8452 14075 } else {
8453 -1 throw new Error('Unknown runOnly type \'' + only.type + '\'');
-1 14076 throw new Error('Unknown runOnly type \''.concat(only.type, '\''));
8454 14077 }
8455 14078 }
8456 14079 if (_typeof(options.rules) === 'object') {
@@ -8477,8 +14100,8 @@ module.exports = {
8477 14100 this._constructHelpUrls(previous);
8478 14101 };
8479 14102 function getHelpUrl(_ref, ruleId, version) {
8480 -1 var brand = _ref.brand, application = _ref.application;
8481 -1 return axe.constants.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + application;
-1 14103 var brand = _ref.brand, application = _ref.application, lang = _ref.lang;
-1 14104 return axe.constants.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
8482 14105 }
8483 14106 Audit.prototype._constructHelpUrls = function() {
8484 14107 var _this = this;
@@ -8500,6 +14123,23 @@ module.exports = {
8500 14123 this._resetLocale();
8501 14124 };
8502 14125 'use strict';
-1 14126 (function() {
-1 14127 'use strict';
-1 14128 var _cache = {};
-1 14129 var cache = {
-1 14130 set: function set(key, value) {
-1 14131 _cache[key] = value;
-1 14132 },
-1 14133 get: function get(key) {
-1 14134 return _cache[key];
-1 14135 },
-1 14136 clear: function clear() {
-1 14137 _cache = {};
-1 14138 }
-1 14139 };
-1 14140 axe._cache = cache;
-1 14141 })();
-1 14142 'use strict';
8503 14143 function CheckResult(check) {
8504 14144 'use strict';
8505 14145 this.id = check.id;
@@ -8547,6 +14187,30 @@ module.exports = {
8547 14187 resolve(null);
8548 14188 }
8549 14189 };
-1 14190 Check.prototype.runSync = function(node, options, context) {
-1 14191 options = options || {};
-1 14192 var _options = options, _options$enabled = _options.enabled, enabled = _options$enabled === void 0 ? this.enabled : _options$enabled;
-1 14193 if (!enabled) {
-1 14194 return null;
-1 14195 }
-1 14196 var checkOptions = options.options || this.options;
-1 14197 var checkResult = new CheckResult(this);
-1 14198 var checkHelper = axe.utils.checkHelper(checkResult, options);
-1 14199 checkHelper.async = function() {
-1 14200 throw new Error('Cannot run async check while in a synchronous run');
-1 14201 };
-1 14202 var result;
-1 14203 try {
-1 14204 result = this.evaluate.call(checkHelper, node.actualNode, checkOptions, node, context);
-1 14205 } catch (e) {
-1 14206 if (node && node.actualNode) {
-1 14207 e.errorNode = new DqElement(node.actualNode).toJSON();
-1 14208 }
-1 14209 throw e;
-1 14210 }
-1 14211 checkResult.result = result;
-1 14212 return checkResult;
-1 14213 };
8550 14214 Check.prototype.configure = function(spec) {
8551 14215 var _this = this;
8552 14216 [ 'options', 'enabled' ].filter(function(prop) {
@@ -8561,11 +14225,18 @@ module.exports = {
8561 14225 });
8562 14226 };
8563 14227 'use strict';
8564 -1 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) {
8565 -1 return typeof obj;
8566 -1 } : function(obj) {
8567 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
8568 -1 };
-1 14228 function _typeof(obj) {
-1 14229 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 14230 _typeof = function _typeof(obj) {
-1 14231 return typeof obj;
-1 14232 };
-1 14233 } else {
-1 14234 _typeof = function _typeof(obj) {
-1 14235 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 14236 };
-1 14237 }
-1 14238 return _typeof(obj);
-1 14239 }
8569 14240 function pushUniqueFrame(collection, frame) {
8570 14241 'use strict';
8571 14242 if (axe.utils.isHidden(frame)) {
@@ -8606,7 +14277,7 @@ module.exports = {
8606 14277 }
8607 14278 function normalizeContext(context) {
8608 14279 'use strict';
8609 -1 if (context && (typeof context === 'undefined' ? 'undefined' : _typeof(context)) === 'object' || context instanceof NodeList) {
-1 14280 if (context && _typeof(context) === 'object' || context instanceof NodeList) {
8610 14281 if (context instanceof Node) {
8611 14282 return {
8612 14283 include: [ context ],
@@ -8645,7 +14316,7 @@ module.exports = {
8645 14316 if (typeof item === 'string') {
8646 14317 nodeList = Array.from(document.querySelectorAll(item));
8647 14318 result = result.concat(nodeList.map(function(node) {
8648 -1 return axe.utils.getNodeFromTree(context.flatTree[0], node);
-1 14319 return axe.utils.getNodeFromTree(node);
8649 14320 }));
8650 14321 break;
8651 14322 } else if (item && item.length && !(item instanceof Node)) {
@@ -8654,14 +14325,14 @@ module.exports = {
8654 14325 } else {
8655 14326 nodeList = Array.from(document.querySelectorAll(item[0]));
8656 14327 result = result.concat(nodeList.map(function(node) {
8657 -1 return axe.utils.getNodeFromTree(context.flatTree[0], node);
-1 14328 return axe.utils.getNodeFromTree(node);
8658 14329 }));
8659 14330 }
8660 14331 } else if (item instanceof Node) {
8661 14332 if (item.documentElement instanceof Node) {
8662 14333 result.push(context.flatTree[0]);
8663 14334 } else {
8664 -1 result.push(axe.utils.getNodeFromTree(context.flatTree[0], item));
-1 14335 result.push(axe.utils.getNodeFromTree(item));
8665 14336 }
8666 14337 }
8667 14338 }
@@ -8686,16 +14357,16 @@ module.exports = {
8686 14357 function getRootNode(_ref) {
8687 14358 var include = _ref.include, exclude = _ref.exclude;
8688 14359 var selectors = Array.from(include).concat(Array.from(exclude));
8689 -1 var localDocument = selectors.reduce(function(result, item) {
8690 -1 if (result) {
8691 -1 return result;
8692 -1 } else if (item instanceof Element) {
8693 -1 return item.ownerDocument;
8694 -1 } else if (item instanceof Document) {
8695 -1 return item;
-1 14360 for (var i = 0; i < selectors.length; ++i) {
-1 14361 var item = selectors[i];
-1 14362 if (item instanceof Element) {
-1 14363 return item.ownerDocument.documentElement;
8696 14364 }
8697 -1 }, null);
8698 -1 return (localDocument || document).documentElement;
-1 14365 if (item instanceof Document) {
-1 14366 return item.documentElement;
-1 14367 }
-1 14368 }
-1 14369 return document.documentElement;
8699 14370 }
8700 14371 function Context(spec) {
8701 14372 'use strict';
@@ -8758,12 +14429,30 @@ module.exports = {
8758 14429 return true;
8759 14430 };
8760 14431 Rule.prototype.gather = function(context) {
8761 -1 'use strict';
-1 14432 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-1 14433 var markStart = 'mark_gather_start_' + this.id;
-1 14434 var markEnd = 'mark_gather_end_' + this.id;
-1 14435 var markHiddenStart = 'mark_isHidden_start_' + this.id;
-1 14436 var markHiddenEnd = 'mark_isHidden_end_' + this.id;
-1 14437 if (options.performanceTimer) {
-1 14438 axe.utils.performanceTimer.mark(markStart);
-1 14439 }
8762 14440 var elements = axe.utils.select(this.selector, context);
8763 14441 if (this.excludeHidden) {
8764 -1 return elements.filter(function(element) {
-1 14442 if (options.performanceTimer) {
-1 14443 axe.utils.performanceTimer.mark(markHiddenStart);
-1 14444 }
-1 14445 elements = elements.filter(function(element) {
8765 14446 return !axe.utils.isHidden(element.actualNode);
8766 14447 });
-1 14448 if (options.performanceTimer) {
-1 14449 axe.utils.performanceTimer.mark(markHiddenEnd);
-1 14450 axe.utils.performanceTimer.measure('rule_' + this.id + '#gather_axe.utils.isHidden', markHiddenStart, markHiddenEnd);
-1 14451 }
-1 14452 }
-1 14453 if (options.performanceTimer) {
-1 14454 axe.utils.performanceTimer.mark(markEnd);
-1 14455 axe.utils.performanceTimer.measure('rule_' + this.id + '#gather', markStart, markEnd);
8767 14456 }
8768 14457 return elements;
8769 14458 };
@@ -8786,21 +14475,38 @@ module.exports = {
8786 14475 type: type,
8787 14476 results: results
8788 14477 });
8789 -1 }).catch(reject);
-1 14478 })['catch'](reject);
-1 14479 };
-1 14480 Rule.prototype.runChecksSync = function(type, node, options, context) {
-1 14481 'use strict';
-1 14482 var self = this;
-1 14483 var results = [];
-1 14484 this[type].forEach(function(c) {
-1 14485 var check = self._audit.checks[c.id || c];
-1 14486 var option = axe.utils.getCheckOption(check, self.id, options);
-1 14487 results.push(check.runSync(node, option, context));
-1 14488 });
-1 14489 results = results.filter(function(check) {
-1 14490 return check;
-1 14491 });
-1 14492 return {
-1 14493 type: type,
-1 14494 results: results
-1 14495 };
8790 14496 };
8791 -1 Rule.prototype.run = function(context, options, resolve, reject) {
-1 14497 Rule.prototype.run = function(context) {
8792 14498 var _this = this;
-1 14499 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-1 14500 var resolve = arguments.length > 2 ? arguments[2] : undefined;
-1 14501 var reject = arguments.length > 3 ? arguments[3] : undefined;
-1 14502 if (options.performanceTimer) {
-1 14503 this._trackPerformance();
-1 14504 }
8793 14505 var q = axe.utils.queue();
8794 14506 var ruleResult = new RuleResult(this);
8795 -1 var markStart = 'mark_rule_start_' + this.id;
8796 -1 var markEnd = 'mark_rule_end_' + this.id;
8797 -1 var markChecksStart = 'mark_runchecks_start_' + this.id;
8798 -1 var markChecksEnd = 'mark_runchecks_end_' + this.id;
8799 -1 var nodes = void 0;
-1 14507 var nodes;
8800 14508 try {
8801 -1 nodes = this.gather(context).filter(function(node) {
8802 -1 return _this.matches(node.actualNode, node, context);
8803 -1 });
-1 14509 nodes = this.gatherAndMatchNodes(context, options);
8804 14510 } catch (error) {
8805 14511 reject(new SupportError({
8806 14512 cause: error,
@@ -8809,8 +14515,7 @@ module.exports = {
8809 14515 return;
8810 14516 }
8811 14517 if (options.performanceTimer) {
8812 -1 axe.log('gather (', nodes.length, '):', axe.utils.performanceTimer.timeElapsed() + 'ms');
8813 -1 axe.utils.performanceTimer.mark(markChecksStart);
-1 14518 this._logGatherPerformance(nodes);
8814 14519 }
8815 14520 nodes.forEach(function(node) {
8816 14521 q.defer(function(resolveNode, rejectNode) {
@@ -8818,27 +14523,16 @@ module.exports = {
8818 14523 [ 'any', 'all', 'none' ].forEach(function(type) {
8819 14524 checkQueue.defer(function(res, rej) {
8820 14525 _this.runChecks(type, node, options, context, res, rej);
8821 -1 });
8822 -1 });
8823 -1 checkQueue.then(function(results) {
8824 -1 if (results.length) {
8825 -1 var hasResults = false, result = {};
8826 -1 results.forEach(function(r) {
8827 -1 var res = r.results.filter(function(result) {
8828 -1 return result;
8829 -1 });
8830 -1 result[r.type] = res;
8831 -1 if (res.length) {
8832 -1 hasResults = true;
8833 -1 }
8834 -1 });
8835 -1 if (hasResults) {
8836 -1 result.node = new axe.utils.DqElement(node.actualNode, options);
8837 -1 ruleResult.nodes.push(result);
8838 -1 }
-1 14526 });
-1 14527 });
-1 14528 checkQueue.then(function(results) {
-1 14529 var result = getResult(results);
-1 14530 if (result) {
-1 14531 result.node = new axe.utils.DqElement(node.actualNode, options);
-1 14532 ruleResult.nodes.push(result);
8839 14533 }
8840 14534 resolveNode();
8841 -1 }).catch(function(err) {
-1 14535 })['catch'](function(err) {
8842 14536 return rejectNode(err);
8843 14537 });
8844 14538 });
@@ -8847,17 +14541,100 @@ module.exports = {
8847 14541 return setTimeout(resolve, 0);
8848 14542 });
8849 14543 if (options.performanceTimer) {
8850 -1 axe.utils.performanceTimer.mark(markChecksEnd);
8851 -1 axe.utils.performanceTimer.mark(markEnd);
8852 -1 axe.utils.performanceTimer.measure('runchecks_' + this.id, markChecksStart, markChecksEnd);
8853 -1 axe.utils.performanceTimer.measure('rule_' + this.id, markStart, markEnd);
-1 14544 this._logRulePerformance();
8854 14545 }
8855 14546 q.then(function() {
8856 14547 return resolve(ruleResult);
8857 -1 }).catch(function(error) {
-1 14548 })['catch'](function(error) {
8858 14549 return reject(error);
8859 14550 });
8860 14551 };
-1 14552 Rule.prototype.runSync = function(context) {
-1 14553 var _this2 = this;
-1 14554 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-1 14555 if (options.performanceTimer) {
-1 14556 this._trackPerformance();
-1 14557 }
-1 14558 var ruleResult = new RuleResult(this);
-1 14559 var nodes;
-1 14560 try {
-1 14561 nodes = this.gatherAndMatchNodes(context, options);
-1 14562 } catch (error) {
-1 14563 throw new SupportError({
-1 14564 cause: error,
-1 14565 ruleId: this.id
-1 14566 });
-1 14567 }
-1 14568 if (options.performanceTimer) {
-1 14569 this._logGatherPerformance(nodes);
-1 14570 }
-1 14571 nodes.forEach(function(node) {
-1 14572 var results = [];
-1 14573 [ 'any', 'all', 'none' ].forEach(function(type) {
-1 14574 results.push(_this2.runChecksSync(type, node, options, context));
-1 14575 });
-1 14576 var result = getResult(results);
-1 14577 if (result) {
-1 14578 result.node = node.actualNode ? new axe.utils.DqElement(node.actualNode, options) : null;
-1 14579 ruleResult.nodes.push(result);
-1 14580 }
-1 14581 });
-1 14582 if (options.performanceTimer) {
-1 14583 this._logRulePerformance();
-1 14584 }
-1 14585 return ruleResult;
-1 14586 };
-1 14587 Rule.prototype._trackPerformance = function() {
-1 14588 this._markStart = 'mark_rule_start_' + this.id;
-1 14589 this._markEnd = 'mark_rule_end_' + this.id;
-1 14590 this._markChecksStart = 'mark_runchecks_start_' + this.id;
-1 14591 this._markChecksEnd = 'mark_runchecks_end_' + this.id;
-1 14592 };
-1 14593 Rule.prototype._logGatherPerformance = function(nodes) {
-1 14594 axe.log('gather (', nodes.length, '):', axe.utils.performanceTimer.timeElapsed() + 'ms');
-1 14595 axe.utils.performanceTimer.mark(this._markChecksStart);
-1 14596 };
-1 14597 Rule.prototype._logRulePerformance = function() {
-1 14598 axe.utils.performanceTimer.mark(this._markChecksEnd);
-1 14599 axe.utils.performanceTimer.mark(this._markEnd);
-1 14600 axe.utils.performanceTimer.measure('runchecks_' + this.id, this._markChecksStart, this._markChecksEnd);
-1 14601 axe.utils.performanceTimer.measure('rule_' + this.id, this._markStart, this._markEnd);
-1 14602 };
-1 14603 function getResult(results) {
-1 14604 if (results.length) {
-1 14605 var hasResults = false, result = {};
-1 14606 results.forEach(function(r) {
-1 14607 var res = r.results.filter(function(result) {
-1 14608 return result;
-1 14609 });
-1 14610 result[r.type] = res;
-1 14611 if (res.length) {
-1 14612 hasResults = true;
-1 14613 }
-1 14614 });
-1 14615 if (hasResults) {
-1 14616 return result;
-1 14617 }
-1 14618 return null;
-1 14619 }
-1 14620 }
-1 14621 Rule.prototype.gatherAndMatchNodes = function(context, options) {
-1 14622 var _this3 = this;
-1 14623 var markMatchesStart = 'mark_matches_start_' + this.id;
-1 14624 var markMatchesEnd = 'mark_matches_end_' + this.id;
-1 14625 var nodes = this.gather(context, options);
-1 14626 if (options.performanceTimer) {
-1 14627 axe.utils.performanceTimer.mark(markMatchesStart);
-1 14628 }
-1 14629 nodes = nodes.filter(function(node) {
-1 14630 return _this3.matches(node.actualNode, node, context);
-1 14631 });
-1 14632 if (options.performanceTimer) {
-1 14633 axe.utils.performanceTimer.mark(markMatchesEnd);
-1 14634 axe.utils.performanceTimer.measure('rule_' + this.id + '#matches', markMatchesStart, markMatchesEnd);
-1 14635 }
-1 14636 return nodes;
-1 14637 };
8861 14638 function findAfterChecks(rule) {
8862 14639 'use strict';
8863 14640 return axe.utils.getAllChecks(rule).map(function(c) {
@@ -8959,6 +14736,356 @@ module.exports = {
8959 14736 }
8960 14737 };
8961 14738 'use strict';
-1 14739 function _classCallCheck(instance, Constructor) {
-1 14740 if (!(instance instanceof Constructor)) {
-1 14741 throw new TypeError('Cannot call a class as a function');
-1 14742 }
-1 14743 }
-1 14744 function _defineProperties(target, props) {
-1 14745 for (var i = 0; i < props.length; i++) {
-1 14746 var descriptor = props[i];
-1 14747 descriptor.enumerable = descriptor.enumerable || false;
-1 14748 descriptor.configurable = true;
-1 14749 if ('value' in descriptor) {
-1 14750 descriptor.writable = true;
-1 14751 }
-1 14752 Object.defineProperty(target, descriptor.key, descriptor);
-1 14753 }
-1 14754 }
-1 14755 function _createClass(Constructor, protoProps, staticProps) {
-1 14756 if (protoProps) {
-1 14757 _defineProperties(Constructor.prototype, protoProps);
-1 14758 }
-1 14759 if (staticProps) {
-1 14760 _defineProperties(Constructor, staticProps);
-1 14761 }
-1 14762 return Constructor;
-1 14763 }
-1 14764 var whitespaceRegex = /[\t\r\n\f]/g;
-1 14765 var AbstractVirtualNode = function() {
-1 14766 function AbstractVirtualNode() {
-1 14767 _classCallCheck(this, AbstractVirtualNode);
-1 14768 this.children = [];
-1 14769 this.parent = null;
-1 14770 }
-1 14771 _createClass(AbstractVirtualNode, [ {
-1 14772 key: 'attr',
-1 14773 value: function attr() {
-1 14774 throw new Error('VirtualNode class must have a "attr" function');
-1 14775 }
-1 14776 }, {
-1 14777 key: 'hasAttr',
-1 14778 value: function hasAttr() {
-1 14779 throw new Error('VirtualNode class must have a "hasAttr" function');
-1 14780 }
-1 14781 }, {
-1 14782 key: 'hasClass',
-1 14783 value: function hasClass(className) {
-1 14784 var classAttr = this.attr('class');
-1 14785 if (!classAttr) {
-1 14786 return false;
-1 14787 }
-1 14788 var selector = ' ' + className + ' ';
-1 14789 return (' ' + classAttr + ' ').replace(whitespaceRegex, ' ').indexOf(selector) >= 0;
-1 14790 }
-1 14791 }, {
-1 14792 key: 'props',
-1 14793 get: function get() {
-1 14794 throw new Error('VirtualNode class must have a "props" object consisting ' + 'of "nodeType" and "nodeName" properties');
-1 14795 }
-1 14796 } ]);
-1 14797 return AbstractVirtualNode;
-1 14798 }();
-1 14799 axe.AbstractVirtualNode = AbstractVirtualNode;
-1 14800 'use strict';
-1 14801 function _extends() {
-1 14802 _extends = Object.assign || function(target) {
-1 14803 for (var i = 1; i < arguments.length; i++) {
-1 14804 var source = arguments[i];
-1 14805 for (var key in source) {
-1 14806 if (Object.prototype.hasOwnProperty.call(source, key)) {
-1 14807 target[key] = source[key];
-1 14808 }
-1 14809 }
-1 14810 }
-1 14811 return target;
-1 14812 };
-1 14813 return _extends.apply(this, arguments);
-1 14814 }
-1 14815 function _typeof(obj) {
-1 14816 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 14817 _typeof = function _typeof(obj) {
-1 14818 return typeof obj;
-1 14819 };
-1 14820 } else {
-1 14821 _typeof = function _typeof(obj) {
-1 14822 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 14823 };
-1 14824 }
-1 14825 return _typeof(obj);
-1 14826 }
-1 14827 function _classCallCheck(instance, Constructor) {
-1 14828 if (!(instance instanceof Constructor)) {
-1 14829 throw new TypeError('Cannot call a class as a function');
-1 14830 }
-1 14831 }
-1 14832 function _defineProperties(target, props) {
-1 14833 for (var i = 0; i < props.length; i++) {
-1 14834 var descriptor = props[i];
-1 14835 descriptor.enumerable = descriptor.enumerable || false;
-1 14836 descriptor.configurable = true;
-1 14837 if ('value' in descriptor) {
-1 14838 descriptor.writable = true;
-1 14839 }
-1 14840 Object.defineProperty(target, descriptor.key, descriptor);
-1 14841 }
-1 14842 }
-1 14843 function _createClass(Constructor, protoProps, staticProps) {
-1 14844 if (protoProps) {
-1 14845 _defineProperties(Constructor.prototype, protoProps);
-1 14846 }
-1 14847 if (staticProps) {
-1 14848 _defineProperties(Constructor, staticProps);
-1 14849 }
-1 14850 return Constructor;
-1 14851 }
-1 14852 function _possibleConstructorReturn(self, call) {
-1 14853 if (call && (_typeof(call) === 'object' || typeof call === 'function')) {
-1 14854 return call;
-1 14855 }
-1 14856 return _assertThisInitialized(self);
-1 14857 }
-1 14858 function _assertThisInitialized(self) {
-1 14859 if (self === void 0) {
-1 14860 throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');
-1 14861 }
-1 14862 return self;
-1 14863 }
-1 14864 function _getPrototypeOf(o) {
-1 14865 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
-1 14866 return o.__proto__ || Object.getPrototypeOf(o);
-1 14867 };
-1 14868 return _getPrototypeOf(o);
-1 14869 }
-1 14870 function _inherits(subClass, superClass) {
-1 14871 if (typeof superClass !== 'function' && superClass !== null) {
-1 14872 throw new TypeError('Super expression must either be null or a function');
-1 14873 }
-1 14874 subClass.prototype = Object.create(superClass && superClass.prototype, {
-1 14875 constructor: {
-1 14876 value: subClass,
-1 14877 writable: true,
-1 14878 configurable: true
-1 14879 }
-1 14880 });
-1 14881 if (superClass) {
-1 14882 _setPrototypeOf(subClass, superClass);
-1 14883 }
-1 14884 }
-1 14885 function _setPrototypeOf(o, p) {
-1 14886 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
-1 14887 o.__proto__ = p;
-1 14888 return o;
-1 14889 };
-1 14890 return _setPrototypeOf(o, p);
-1 14891 }
-1 14892 var SerialVirtualNode = function(_axe$AbstractVirtualN) {
-1 14893 _inherits(SerialVirtualNode, _axe$AbstractVirtualN);
-1 14894 function SerialVirtualNode(serialNode) {
-1 14895 var _this;
-1 14896 _classCallCheck(this, SerialVirtualNode);
-1 14897 _this = _possibleConstructorReturn(this, _getPrototypeOf(SerialVirtualNode).call(this));
-1 14898 _this._props = normaliseProps(serialNode);
-1 14899 _this._attrs = normaliseAttrs(serialNode);
-1 14900 return _this;
-1 14901 }
-1 14902 _createClass(SerialVirtualNode, [ {
-1 14903 key: 'attr',
-1 14904 value: function attr(attrName) {
-1 14905 return this._attrs[attrName] || null;
-1 14906 }
-1 14907 }, {
-1 14908 key: 'hasAttr',
-1 14909 value: function hasAttr(attrName) {
-1 14910 return this._attrs[attrName] !== undefined;
-1 14911 }
-1 14912 }, {
-1 14913 key: 'props',
-1 14914 get: function get() {
-1 14915 return this._props;
-1 14916 }
-1 14917 } ]);
-1 14918 return SerialVirtualNode;
-1 14919 }(axe.AbstractVirtualNode);
-1 14920 function normaliseProps(serialNode) {
-1 14921 var nodeName = serialNode.nodeName, _serialNode$nodeType = serialNode.nodeType, nodeType = _serialNode$nodeType === void 0 ? 1 : _serialNode$nodeType;
-1 14922 axe.utils.assert(nodeType === 1, 'nodeType has to be undefined or 1, got \''.concat(nodeType, '\''));
-1 14923 axe.utils.assert(typeof nodeName === 'string', 'nodeName has to be a string, got \''.concat(nodeName, '\''));
-1 14924 var props = _extends({}, serialNode, {
-1 14925 nodeType: nodeType,
-1 14926 nodeName: nodeName.toLowerCase()
-1 14927 });
-1 14928 delete props.attributes;
-1 14929 return Object.freeze(props);
-1 14930 }
-1 14931 function normaliseAttrs(_ref) {
-1 14932 var _ref$attributes = _ref.attributes, attributes = _ref$attributes === void 0 ? {} : _ref$attributes;
-1 14933 var attrMap = {
-1 14934 htmlFor: 'for',
-1 14935 className: 'class'
-1 14936 };
-1 14937 return Object.keys(attributes).reduce(function(attrs, attrName) {
-1 14938 var value = attributes[attrName];
-1 14939 axe.utils.assert(_typeof(value) !== 'object' || value === null, 'expects attributes not to be an object, \''.concat(attrName, '\' was'));
-1 14940 if (value !== undefined) {
-1 14941 var mappedName = attrMap[attrName] || attrName;
-1 14942 attrs[mappedName] = value !== null ? String(value) : null;
-1 14943 }
-1 14944 return attrs;
-1 14945 }, {});
-1 14946 }
-1 14947 'use strict';
-1 14948 function _typeof(obj) {
-1 14949 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 14950 _typeof = function _typeof(obj) {
-1 14951 return typeof obj;
-1 14952 };
-1 14953 } else {
-1 14954 _typeof = function _typeof(obj) {
-1 14955 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 14956 };
-1 14957 }
-1 14958 return _typeof(obj);
-1 14959 }
-1 14960 function _classCallCheck(instance, Constructor) {
-1 14961 if (!(instance instanceof Constructor)) {
-1 14962 throw new TypeError('Cannot call a class as a function');
-1 14963 }
-1 14964 }
-1 14965 function _defineProperties(target, props) {
-1 14966 for (var i = 0; i < props.length; i++) {
-1 14967 var descriptor = props[i];
-1 14968 descriptor.enumerable = descriptor.enumerable || false;
-1 14969 descriptor.configurable = true;
-1 14970 if ('value' in descriptor) {
-1 14971 descriptor.writable = true;
-1 14972 }
-1 14973 Object.defineProperty(target, descriptor.key, descriptor);
-1 14974 }
-1 14975 }
-1 14976 function _createClass(Constructor, protoProps, staticProps) {
-1 14977 if (protoProps) {
-1 14978 _defineProperties(Constructor.prototype, protoProps);
-1 14979 }
-1 14980 if (staticProps) {
-1 14981 _defineProperties(Constructor, staticProps);
-1 14982 }
-1 14983 return Constructor;
-1 14984 }
-1 14985 function _possibleConstructorReturn(self, call) {
-1 14986 if (call && (_typeof(call) === 'object' || typeof call === 'function')) {
-1 14987 return call;
-1 14988 }
-1 14989 return _assertThisInitialized(self);
-1 14990 }
-1 14991 function _getPrototypeOf(o) {
-1 14992 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
-1 14993 return o.__proto__ || Object.getPrototypeOf(o);
-1 14994 };
-1 14995 return _getPrototypeOf(o);
-1 14996 }
-1 14997 function _assertThisInitialized(self) {
-1 14998 if (self === void 0) {
-1 14999 throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');
-1 15000 }
-1 15001 return self;
-1 15002 }
-1 15003 function _inherits(subClass, superClass) {
-1 15004 if (typeof superClass !== 'function' && superClass !== null) {
-1 15005 throw new TypeError('Super expression must either be null or a function');
-1 15006 }
-1 15007 subClass.prototype = Object.create(superClass && superClass.prototype, {
-1 15008 constructor: {
-1 15009 value: subClass,
-1 15010 writable: true,
-1 15011 configurable: true
-1 15012 }
-1 15013 });
-1 15014 if (superClass) {
-1 15015 _setPrototypeOf(subClass, superClass);
-1 15016 }
-1 15017 }
-1 15018 function _setPrototypeOf(o, p) {
-1 15019 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
-1 15020 o.__proto__ = p;
-1 15021 return o;
-1 15022 };
-1 15023 return _setPrototypeOf(o, p);
-1 15024 }
-1 15025 var VirtualNode = function(_axe$AbstractVirtualN) {
-1 15026 _inherits(VirtualNode, _axe$AbstractVirtualN);
-1 15027 function VirtualNode(node, parent, shadowId) {
-1 15028 var _this;
-1 15029 _classCallCheck(this, VirtualNode);
-1 15030 _this = _possibleConstructorReturn(this, _getPrototypeOf(VirtualNode).call(this));
-1 15031 _this.shadowId = shadowId;
-1 15032 _this.children = [];
-1 15033 _this.actualNode = node;
-1 15034 _this.parent = parent;
-1 15035 _this._isHidden = null;
-1 15036 _this._cache = {};
-1 15037 if (axe._cache.get('nodeMap')) {
-1 15038 axe._cache.get('nodeMap').set(node, _assertThisInitialized(_this));
-1 15039 }
-1 15040 return _this;
-1 15041 }
-1 15042 _createClass(VirtualNode, [ {
-1 15043 key: 'attr',
-1 15044 value: function attr(attrName) {
-1 15045 if (typeof this.actualNode.getAttribute !== 'function') {
-1 15046 return null;
-1 15047 }
-1 15048 return this.actualNode.getAttribute(attrName);
-1 15049 }
-1 15050 }, {
-1 15051 key: 'hasAttr',
-1 15052 value: function hasAttr(attrName) {
-1 15053 if (typeof this.actualNode.hasAttribute !== 'function') {
-1 15054 return false;
-1 15055 }
-1 15056 return this.actualNode.hasAttribute(attrName);
-1 15057 }
-1 15058 }, {
-1 15059 key: 'props',
-1 15060 get: function get() {
-1 15061 var _this$actualNode = this.actualNode, nodeType = _this$actualNode.nodeType, nodeName = _this$actualNode.nodeName, id = _this$actualNode.id, type = _this$actualNode.type;
-1 15062 return {
-1 15063 nodeType: nodeType,
-1 15064 nodeName: nodeName.toLowerCase(),
-1 15065 id: id,
-1 15066 type: type
-1 15067 };
-1 15068 }
-1 15069 }, {
-1 15070 key: 'isFocusable',
-1 15071 get: function get() {
-1 15072 if (!this._cache.hasOwnProperty('isFocusable')) {
-1 15073 this._cache.isFocusable = axe.commons.dom.isFocusable(this.actualNode);
-1 15074 }
-1 15075 return this._cache.isFocusable;
-1 15076 }
-1 15077 }, {
-1 15078 key: 'tabbableElements',
-1 15079 get: function get() {
-1 15080 if (!this._cache.hasOwnProperty('tabbableElements')) {
-1 15081 this._cache.tabbableElements = axe.commons.dom.getTabbableElements(this);
-1 15082 }
-1 15083 return this._cache.tabbableElements;
-1 15084 }
-1 15085 } ]);
-1 15086 return VirtualNode;
-1 15087 }(axe.AbstractVirtualNode);
-1 15088 'use strict';
8962 15089 (function(axe) {
8963 15090 var definitions = [ {
8964 15091 name: 'NA',
@@ -8987,8 +15114,10 @@ module.exports = {
8987 15114 resultGroups: [],
8988 15115 resultGroupMap: {},
8989 15116 impact: Object.freeze([ 'minor', 'moderate', 'serious', 'critical' ]),
8990 -1 preloadAssets: Object.freeze([ 'cssom' ]),
8991 -1 preloadAssetsTimeout: 1e4
-1 15117 preload: Object.freeze({
-1 15118 assets: [ 'cssom' ],
-1 15119 timeout: 1e4
-1 15120 })
8992 15121 };
8993 15122 definitions.forEach(function(definition) {
8994 15123 var name = definition.name;
@@ -9014,11 +15143,18 @@ module.exports = {
9014 15143 });
9015 15144 })(axe);
9016 15145 'use strict';
9017 -1 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) {
9018 -1 return typeof obj;
9019 -1 } : function(obj) {
9020 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
9021 -1 };
-1 15146 function _typeof(obj) {
-1 15147 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 15148 _typeof = function _typeof(obj) {
-1 15149 return typeof obj;
-1 15150 };
-1 15151 } else {
-1 15152 _typeof = function _typeof(obj) {
-1 15153 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 15154 };
-1 15155 }
-1 15156 return _typeof(obj);
-1 15157 }
9022 15158 axe.log = function() {
9023 15159 'use strict';
9024 15160 if ((typeof console === 'undefined' ? 'undefined' : _typeof(console)) === 'object' && console.log) {
@@ -9062,10 +15198,52 @@ module.exports = {
9062 15198 } else {
9063 15199 reject(cleanupErrors);
9064 15200 }
9065 -1 }).catch(reject);
-1 15201 })['catch'](reject);
9066 15202 }
9067 15203 axe.cleanup = cleanupPlugins;
9068 15204 'use strict';
-1 15205 function _slicedToArray(arr, i) {
-1 15206 return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
-1 15207 }
-1 15208 function _nonIterableRest() {
-1 15209 throw new TypeError('Invalid attempt to destructure non-iterable instance');
-1 15210 }
-1 15211 function _iterableToArrayLimit(arr, i) {
-1 15212 if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === '[object Arguments]')) {
-1 15213 return;
-1 15214 }
-1 15215 var _arr = [];
-1 15216 var _n = true;
-1 15217 var _d = false;
-1 15218 var _e = undefined;
-1 15219 try {
-1 15220 for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
-1 15221 _arr.push(_s.value);
-1 15222 if (i && _arr.length === i) {
-1 15223 break;
-1 15224 }
-1 15225 }
-1 15226 } catch (err) {
-1 15227 _d = true;
-1 15228 _e = err;
-1 15229 } finally {
-1 15230 try {
-1 15231 if (!_n && _i['return'] != null) {
-1 15232 _i['return']();
-1 15233 }
-1 15234 } finally {
-1 15235 if (_d) {
-1 15236 throw _e;
-1 15237 }
-1 15238 }
-1 15239 }
-1 15240 return _arr;
-1 15241 }
-1 15242 function _arrayWithHoles(arr) {
-1 15243 if (Array.isArray(arr)) {
-1 15244 return arr;
-1 15245 }
-1 15246 }
9069 15247 function configureChecksRulesAndBranding(spec) {
9070 15248 'use strict';
9071 15249 var audit;
@@ -9073,6 +15251,19 @@ module.exports = {
9073 15251 if (!audit) {
9074 15252 throw new Error('No audit configured');
9075 15253 }
-1 15254 if (spec.axeVersion || spec.ver) {
-1 15255 var specVersion = spec.axeVersion || spec.ver;
-1 15256 if (!/^\d+\.\d+\.\d+(-canary)?/.test(specVersion)) {
-1 15257 throw new Error('Invalid configured version '.concat(specVersion));
-1 15258 }
-1 15259 var _specVersion$split = specVersion.split('-'), _specVersion$split2 = _slicedToArray(_specVersion$split, 2), version = _specVersion$split2[0], canary = _specVersion$split2[1];
-1 15260 var _version$split$map = version.split('.').map(Number), _version$split$map2 = _slicedToArray(_version$split$map, 3), major = _version$split$map2[0], minor = _version$split$map2[1], patch = _version$split$map2[2];
-1 15261 var _axe$version$split = axe.version.split('-'), _axe$version$split2 = _slicedToArray(_axe$version$split, 2), axeVersion = _axe$version$split2[0], axeCanary = _axe$version$split2[1];
-1 15262 var _axeVersion$split$map = axeVersion.split('.').map(Number), _axeVersion$split$map2 = _slicedToArray(_axeVersion$split$map, 3), axeMajor = _axeVersion$split$map2[0], axeMinor = _axeVersion$split$map2[1], axePatch = _axeVersion$split$map2[2];
-1 15263 if (major !== axeMajor || axeMinor < minor || axeMinor === minor && axePatch < patch || major === axeMajor && minor === axeMinor && patch === axePatch && canary && canary !== axeCanary) {
-1 15264 throw new Error('Configured version '.concat(specVersion, ' is not compatible with current axe version ').concat(axe.version));
-1 15265 }
-1 15266 }
9076 15267 if (spec.reporter && (typeof spec.reporter === 'function' || reporters[spec.reporter])) {
9077 15268 audit.reporter = spec.reporter;
9078 15269 }
@@ -9243,6 +15434,10 @@ module.exports = {
9243 15434 axe.reset = resetConfiguration;
9244 15435 'use strict';
9245 15436 function cleanup() {
-1 15437 axe._memoizedFns.forEach(function(fn) {
-1 15438 return fn.clear();
-1 15439 });
-1 15440 axe._cache.clear();
9246 15441 axe._tree = undefined;
9247 15442 axe._selectorData = undefined;
9248 15443 }
@@ -9266,7 +15461,7 @@ module.exports = {
9266 15461 axe.utils.collectResultsFromFrames(context, options, 'rules', null, res, rej);
9267 15462 });
9268 15463 }
9269 -1 var scrollState = void 0;
-1 15464 var scrollState;
9270 15465 q.defer(function(res, rej) {
9271 15466 if (options.restoreScroll) {
9272 15467 scrollState = axe.utils.getScrollState();
@@ -9301,18 +15496,74 @@ module.exports = {
9301 15496 cleanup();
9302 15497 reject(e);
9303 15498 }
9304 -1 }).catch(function(e) {
-1 15499 })['catch'](function(e) {
9305 15500 cleanup();
9306 15501 reject(e);
9307 15502 });
9308 15503 }
9309 15504 axe._runRules = runRules;
9310 15505 'use strict';
9311 -1 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) {
9312 -1 return typeof obj;
9313 -1 } : function(obj) {
9314 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 15506 function _extends() {
-1 15507 _extends = Object.assign || function(target) {
-1 15508 for (var i = 1; i < arguments.length; i++) {
-1 15509 var source = arguments[i];
-1 15510 for (var key in source) {
-1 15511 if (Object.prototype.hasOwnProperty.call(source, key)) {
-1 15512 target[key] = source[key];
-1 15513 }
-1 15514 }
-1 15515 }
-1 15516 return target;
-1 15517 };
-1 15518 return _extends.apply(this, arguments);
-1 15519 }
-1 15520 axe.runVirtualRule = function(ruleId, vNode) {
-1 15521 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-1 15522 options.reporter = options.reporter || axe._audit.reporter || 'v1';
-1 15523 axe._selectorData = {};
-1 15524 if (vNode instanceof axe.AbstractVirtualNode === false) {
-1 15525 vNode = new SerialVirtualNode(vNode);
-1 15526 }
-1 15527 var rule = axe._audit.rules.find(function(rule) {
-1 15528 return rule.id === ruleId;
-1 15529 });
-1 15530 if (!rule) {
-1 15531 throw new Error('unknown rule `' + ruleId + '`');
-1 15532 }
-1 15533 rule = Object.create(rule, {
-1 15534 excludeHidden: {
-1 15535 value: false
-1 15536 }
-1 15537 });
-1 15538 var context = {
-1 15539 include: [ vNode ]
-1 15540 };
-1 15541 var rawResults = rule.runSync(context, options);
-1 15542 axe.utils.publishMetaData(rawResults);
-1 15543 axe.utils.finalizeRuleResult(rawResults);
-1 15544 var results = axe.utils.aggregateResult([ rawResults ]);
-1 15545 results.violations.forEach(function(result) {
-1 15546 return result.nodes.forEach(function(nodeResult) {
-1 15547 nodeResult.failureSummary = helpers.failureSummary(nodeResult);
-1 15548 });
-1 15549 });
-1 15550 return _extends({}, helpers.getEnvironmentData(), {}, results, {
-1 15551 toolOptions: options
-1 15552 });
9315 15553 };
-1 15554 'use strict';
-1 15555 function _typeof(obj) {
-1 15556 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 15557 _typeof = function _typeof(obj) {
-1 15558 return typeof obj;
-1 15559 };
-1 15560 } else {
-1 15561 _typeof = function _typeof(obj) {
-1 15562 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 15563 };
-1 15564 }
-1 15565 return _typeof(obj);
-1 15566 }
9316 15567 function isContext(potential) {
9317 15568 'use strict';
9318 15569 switch (true) {
@@ -9322,7 +15573,7 @@ module.exports = {
9322 15573 case NodeList && potential instanceof NodeList:
9323 15574 return true;
9324 15575
9325 -1 case (typeof potential === 'undefined' ? 'undefined' : _typeof(potential)) !== 'object':
-1 15576 case _typeof(potential) !== 'object':
9326 15577 return false;
9327 15578
9328 15579 case potential.include !== undefined:
@@ -9346,7 +15597,7 @@ module.exports = {
9346 15597 options = context;
9347 15598 context = document;
9348 15599 }
9349 -1 if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') {
-1 15600 if (_typeof(options) !== 'object') {
9350 15601 if (callback !== undefined) {
9351 15602 throw typeErr;
9352 15603 }
@@ -9375,7 +15626,7 @@ module.exports = {
9375 15626 if (options.performanceTimer) {
9376 15627 axe.utils.performanceTimer.start();
9377 15628 }
9378 -1 var p = void 0;
-1 15629 var p;
9379 15630 var reject = noop;
9380 15631 var resolve = noop;
9381 15632 if (typeof Promise === 'function' && callback === noop) {
@@ -9384,8 +15635,16 @@ module.exports = {
9384 15635 resolve = _resolve;
9385 15636 });
9386 15637 }
-1 15638 if (axe._running) {
-1 15639 var err = 'Axe is already running. Use `await axe.run()` to wait ' + 'for the previous run to finish before starting a new run.';
-1 15640 callback(err);
-1 15641 reject(err);
-1 15642 return p;
-1 15643 }
-1 15644 axe._running = true;
9387 15645 axe._runRules(context, options, function(rawResults, cleanup) {
9388 15646 var respond = function respond(results) {
-1 15647 axe._running = false;
9389 15648 cleanup();
9390 15649 try {
9391 15650 callback(null, results);
@@ -9404,11 +15663,13 @@ module.exports = {
9404 15663 respond(results);
9405 15664 }
9406 15665 } catch (err) {
-1 15666 axe._running = false;
9407 15667 cleanup();
9408 15668 callback(err);
9409 15669 reject(err);
9410 15670 }
9411 15671 }, function(err) {
-1 15672 axe._running = false;
9412 15673 callback(err);
9413 15674 reject(err);
9414 15675 });
@@ -9437,7 +15698,7 @@ module.exports = {
9437 15698 'use strict';
9438 15699 helpers.getEnvironmentData = function getEnvironmentData() {
9439 15700 var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
9440 -1 var _win$screen = win.screen, screen = _win$screen === undefined ? {} : _win$screen, _win$navigator = win.navigator, navigator = _win$navigator === undefined ? {} : _win$navigator, _win$location = win.location, location = _win$location === undefined ? {} : _win$location, innerHeight = win.innerHeight, innerWidth = win.innerWidth;
-1 15701 var _win$screen = win.screen, screen = _win$screen === void 0 ? {} : _win$screen, _win$navigator = win.navigator, navigator = _win$navigator === void 0 ? {} : _win$navigator, _win$location = win.location, location = _win$location === void 0 ? {} : _win$location, innerHeight = win.innerHeight, innerWidth = win.innerWidth;
9441 15702 var orientation = screen.msOrientation || screen.orientation || screen.mozOrientation || {};
9442 15703 return {
9443 15704 testEngine: {
@@ -9464,11 +15725,18 @@ module.exports = {
9464 15725 return axe._audit.data.incompleteFallbackMessage();
9465 15726 };
9466 15727 'use strict';
9467 -1 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) {
9468 -1 return typeof obj;
9469 -1 } : function(obj) {
9470 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
9471 -1 };
-1 15728 function _typeof(obj) {
-1 15729 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 15730 _typeof = function _typeof(obj) {
-1 15731 return typeof obj;
-1 15732 };
-1 15733 } else {
-1 15734 _typeof = function _typeof(obj) {
-1 15735 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 15736 };
-1 15737 }
-1 15738 return _typeof(obj);
-1 15739 }
9472 15740 function normalizeRelatedNodes(node, options) {
9473 15741 'use strict';
9474 15742 [ 'any', 'all', 'none' ].forEach(function(type) {
@@ -9540,19 +15808,23 @@ module.exports = {
9540 15808 return resultObject;
9541 15809 };
9542 15810 'use strict';
9543 -1 var _extends = Object.assign || function(target) {
9544 -1 for (var i = 1; i < arguments.length; i++) {
9545 -1 var source = arguments[i];
9546 -1 for (var key in source) {
9547 -1 if (Object.prototype.hasOwnProperty.call(source, key)) {
9548 -1 target[key] = source[key];
-1 15811 function _extends() {
-1 15812 _extends = Object.assign || function(target) {
-1 15813 for (var i = 1; i < arguments.length; i++) {
-1 15814 var source = arguments[i];
-1 15815 for (var key in source) {
-1 15816 if (Object.prototype.hasOwnProperty.call(source, key)) {
-1 15817 target[key] = source[key];
-1 15818 }
9549 15819 }
9550 15820 }
9551 -1 }
9552 -1 return target;
9553 -1 };
-1 15821 return target;
-1 15822 };
-1 15823 return _extends.apply(this, arguments);
-1 15824 }
9554 15825 axe.addReporter('na', function(results, options, callback) {
9555 15826 'use strict';
-1 15827 console.warn('"na" reporter will be deprecated in axe v4.0. Use the "v2" reporter instead.');
9556 15828 if (typeof options === 'function') {
9557 15829 callback = options;
9558 15830 options = {};
@@ -9567,17 +15839,20 @@ module.exports = {
9567 15839 }));
9568 15840 });
9569 15841 'use strict';
9570 -1 var _extends = Object.assign || function(target) {
9571 -1 for (var i = 1; i < arguments.length; i++) {
9572 -1 var source = arguments[i];
9573 -1 for (var key in source) {
9574 -1 if (Object.prototype.hasOwnProperty.call(source, key)) {
9575 -1 target[key] = source[key];
-1 15842 function _extends() {
-1 15843 _extends = Object.assign || function(target) {
-1 15844 for (var i = 1; i < arguments.length; i++) {
-1 15845 var source = arguments[i];
-1 15846 for (var key in source) {
-1 15847 if (Object.prototype.hasOwnProperty.call(source, key)) {
-1 15848 target[key] = source[key];
-1 15849 }
9576 15850 }
9577 15851 }
9578 -1 }
9579 -1 return target;
9580 -1 };
-1 15852 return target;
-1 15853 };
-1 15854 return _extends.apply(this, arguments);
-1 15855 }
9581 15856 axe.addReporter('no-passes', function(results, options, callback) {
9582 15857 'use strict';
9583 15858 if (typeof options === 'function') {
@@ -9592,26 +15867,76 @@ module.exports = {
9592 15867 }));
9593 15868 });
9594 15869 'use strict';
-1 15870 axe.addReporter('rawEnv', function(results, options, callback) {
-1 15871 if (typeof options === 'function') {
-1 15872 callback = options;
-1 15873 options = {};
-1 15874 }
-1 15875 function rawCallback(raw) {
-1 15876 var env = helpers.getEnvironmentData();
-1 15877 callback({
-1 15878 raw: raw,
-1 15879 env: env
-1 15880 });
-1 15881 }
-1 15882 axe.getReporter('raw')(results, options, rawCallback);
-1 15883 });
-1 15884 'use strict';
-1 15885 function _extends() {
-1 15886 _extends = Object.assign || function(target) {
-1 15887 for (var i = 1; i < arguments.length; i++) {
-1 15888 var source = arguments[i];
-1 15889 for (var key in source) {
-1 15890 if (Object.prototype.hasOwnProperty.call(source, key)) {
-1 15891 target[key] = source[key];
-1 15892 }
-1 15893 }
-1 15894 }
-1 15895 return target;
-1 15896 };
-1 15897 return _extends.apply(this, arguments);
-1 15898 }
9595 15899 axe.addReporter('raw', function(results, options, callback) {
9596 15900 'use strict';
9597 15901 if (typeof options === 'function') {
9598 15902 callback = options;
9599 15903 options = {};
9600 15904 }
9601 -1 callback(results);
-1 15905 if (!results || !Array.isArray(results)) {
-1 15906 return callback(results);
-1 15907 }
-1 15908 var transformedResults = results.map(function(result) {
-1 15909 var transformedResult = _extends({}, result);
-1 15910 var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ];
-1 15911 for (var _i = 0, _types = types; _i < _types.length; _i++) {
-1 15912 var type = _types[_i];
-1 15913 if (transformedResult[type] && Array.isArray(transformedResult[type])) {
-1 15914 transformedResult[type] = transformedResult[type].map(function(typeResult) {
-1 15915 return _extends({}, typeResult, {
-1 15916 node: typeResult.node.toJSON()
-1 15917 });
-1 15918 });
-1 15919 }
-1 15920 }
-1 15921 return transformedResult;
-1 15922 });
-1 15923 callback(transformedResults);
9602 15924 });
9603 15925 'use strict';
9604 -1 var _extends = Object.assign || function(target) {
9605 -1 for (var i = 1; i < arguments.length; i++) {
9606 -1 var source = arguments[i];
9607 -1 for (var key in source) {
9608 -1 if (Object.prototype.hasOwnProperty.call(source, key)) {
9609 -1 target[key] = source[key];
-1 15926 function _extends() {
-1 15927 _extends = Object.assign || function(target) {
-1 15928 for (var i = 1; i < arguments.length; i++) {
-1 15929 var source = arguments[i];
-1 15930 for (var key in source) {
-1 15931 if (Object.prototype.hasOwnProperty.call(source, key)) {
-1 15932 target[key] = source[key];
-1 15933 }
9610 15934 }
9611 15935 }
9612 -1 }
9613 -1 return target;
9614 -1 };
-1 15936 return target;
-1 15937 };
-1 15938 return _extends.apply(this, arguments);
-1 15939 }
9615 15940 axe.addReporter('v1', function(results, options, callback) {
9616 15941 'use strict';
9617 15942 if (typeof options === 'function') {
@@ -9633,17 +15958,20 @@ module.exports = {
9633 15958 }));
9634 15959 });
9635 15960 'use strict';
9636 -1 var _extends = Object.assign || function(target) {
9637 -1 for (var i = 1; i < arguments.length; i++) {
9638 -1 var source = arguments[i];
9639 -1 for (var key in source) {
9640 -1 if (Object.prototype.hasOwnProperty.call(source, key)) {
9641 -1 target[key] = source[key];
-1 15961 function _extends() {
-1 15962 _extends = Object.assign || function(target) {
-1 15963 for (var i = 1; i < arguments.length; i++) {
-1 15964 var source = arguments[i];
-1 15965 for (var key in source) {
-1 15966 if (Object.prototype.hasOwnProperty.call(source, key)) {
-1 15967 target[key] = source[key];
-1 15968 }
9642 15969 }
9643 15970 }
9644 -1 }
9645 -1 return target;
9646 -1 };
-1 15971 return target;
-1 15972 };
-1 15973 return _extends.apply(this, arguments);
-1 15974 }
9647 15975 axe.addReporter('v2', function(results, options, callback) {
9648 15976 'use strict';
9649 15977 if (typeof options === 'function') {
@@ -9808,25 +16136,28 @@ module.exports = {
9808 16136 function areStylesSet(el, styles, stopAt) {
9809 16137 'use strict';
9810 16138 var styl = window.getComputedStyle(el, null);
9811 -1 var set = false;
9812 16139 if (!styl) {
9813 16140 return false;
9814 16141 }
9815 -1 styles.forEach(function(att) {
-1 16142 for (var i = 0; i < styles.length; ++i) {
-1 16143 var att = styles[i];
9816 16144 if (styl.getPropertyValue(att.property) === att.value) {
9817 -1 set = true;
-1 16145 return true;
9818 16146 }
9819 -1 });
9820 -1 if (set) {
9821 -1 return true;
9822 16147 }
9823 -1 if (el.nodeName.toUpperCase() === stopAt.toUpperCase() || !el.parentNode) {
-1 16148 if (!el.parentNode || el.nodeName.toUpperCase() === stopAt.toUpperCase()) {
9824 16149 return false;
9825 16150 }
9826 16151 return areStylesSet(el.parentNode, styles, stopAt);
9827 16152 }
9828 16153 axe.utils.areStylesSet = areStylesSet;
9829 16154 'use strict';
-1 16155 axe.utils.assert = function assert(bool, message) {
-1 16156 if (!bool) {
-1 16157 throw new Error(message);
-1 16158 }
-1 16159 };
-1 16160 'use strict';
9830 16161 axe.utils.checkHelper = function checkHelper(checkResult, options, resolve, reject) {
9831 16162 'use strict';
9832 16163 return {
@@ -9854,15 +16185,22 @@ module.exports = {
9854 16185 };
9855 16186 };
9856 16187 'use strict';
9857 -1 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) {
9858 -1 return typeof obj;
9859 -1 } : function(obj) {
9860 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
9861 -1 };
-1 16188 function _typeof(obj) {
-1 16189 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 16190 _typeof = function _typeof(obj) {
-1 16191 return typeof obj;
-1 16192 };
-1 16193 } else {
-1 16194 _typeof = function _typeof(obj) {
-1 16195 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 16196 };
-1 16197 }
-1 16198 return _typeof(obj);
-1 16199 }
9862 16200 axe.utils.clone = function(obj) {
9863 16201 'use strict';
9864 16202 var index, length, out = obj;
9865 -1 if (obj !== null && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object') {
-1 16203 if (obj !== null && _typeof(obj) === 'object') {
9866 16204 if (Array.isArray(obj)) {
9867 16205 out = [];
9868 16206 for (index = 0, length = obj.length; index < length; index++) {
@@ -9906,7 +16244,7 @@ module.exports = {
9906 16244 axe.utils.respondable(win, 'axe.ping', null, undefined, function() {
9907 16245 clearTimeout(timeout);
9908 16246 var frameWaitTime = parameters.options && parameters.options.frameWaitTime || 6e4;
9909 -1 timeout = setTimeout(function() {
-1 16247 timeout = setTimeout(function collectResultFramesTimeout() {
9910 16248 reject(err('Axe in frame timed out', node));
9911 16249 }, frameWaitTime);
9912 16250 axe.utils.respondable(win, 'axe.start', parameters, undefined, function(data) {
@@ -9951,32 +16289,43 @@ module.exports = {
9951 16289 });
9952 16290 q.then(function(data) {
9953 16291 resolve(axe.utils.mergeResults(data, options));
9954 -1 }).catch(reject);
-1 16292 })['catch'](reject);
9955 16293 }
9956 16294 axe.utils.collectResultsFromFrames = collectResultsFromFrames;
9957 16295 'use strict';
9958 -1 axe.utils.contains = function(node, otherNode) {
-1 16296 axe.utils.contains = function(vNode, otherVNode) {
9959 16297 'use strict';
9960 -1 function containsShadowChild(node, otherNode) {
9961 -1 if (node.shadowId === otherNode.shadowId) {
-1 16298 function containsShadowChild(vNode, otherVNode) {
-1 16299 if (vNode.shadowId === otherVNode.shadowId) {
9962 16300 return true;
9963 16301 }
9964 -1 return !!node.children.find(function(child) {
9965 -1 return containsShadowChild(child, otherNode);
-1 16302 return !!vNode.children.find(function(child) {
-1 16303 return containsShadowChild(child, otherVNode);
9966 16304 });
9967 16305 }
9968 -1 if (node.shadowId || otherNode.shadowId) {
9969 -1 return containsShadowChild(node, otherNode);
-1 16306 if (vNode.shadowId || otherVNode.shadowId) {
-1 16307 return containsShadowChild(vNode, otherVNode);
9970 16308 }
9971 -1 if (typeof node.actualNode.contains === 'function') {
9972 -1 return node.actualNode.contains(otherNode.actualNode);
-1 16309 if (vNode.actualNode) {
-1 16310 if (typeof vNode.actualNode.contains === 'function') {
-1 16311 return vNode.actualNode.contains(otherVNode.actualNode);
-1 16312 }
-1 16313 return !!(vNode.actualNode.compareDocumentPosition(otherVNode.actualNode) & 16);
-1 16314 } else {
-1 16315 do {
-1 16316 if (otherVNode === vNode) {
-1 16317 return true;
-1 16318 }
-1 16319 } while (otherVNode = otherVNode && otherVNode.parent);
9973 16320 }
9974 -1 return !!(node.actualNode.compareDocumentPosition(otherNode.actualNode) & 16);
-1 16321 return false;
9975 16322 };
9976 16323 'use strict';
9977 16324 (function(axe) {
9978 16325 var parser = new axe.imports.CssSelectorParser();
-1 16326 parser.registerSelectorPseudos('not');
9979 16327 parser.registerNestingOperators('>');
-1 16328 parser.registerAttrEqualityMods('^', '$', '*');
9980 16329 axe.utils.cssParser = parser;
9981 16330 })(axe);
9982 16331 'use strict';
@@ -10051,7 +16400,10 @@ module.exports = {
10051 16400 if (!method || !node[method]) {
10052 16401 method = getMethod(node);
10053 16402 }
10054 -1 return node[method](selector);
-1 16403 if (node[method]) {
-1 16404 return node[method](selector);
-1 16405 }
-1 16406 return false;
10055 16407 };
10056 16408 }();
10057 16409 'use strict';
@@ -10104,15 +16456,22 @@ module.exports = {
10104 16456 return ruleResult;
10105 16457 };
10106 16458 'use strict';
10107 -1 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) {
10108 -1 return typeof obj;
10109 -1 } : function(obj) {
10110 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
10111 -1 };
-1 16459 function _typeof(obj) {
-1 16460 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 16461 _typeof = function _typeof(obj) {
-1 16462 return typeof obj;
-1 16463 };
-1 16464 } else {
-1 16465 _typeof = function _typeof(obj) {
-1 16466 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 16467 };
-1 16468 }
-1 16469 return _typeof(obj);
-1 16470 }
10112 16471 axe.utils.findBy = function(array, key, value) {
10113 16472 if (Array.isArray(array)) {
10114 16473 return array.find(function(obj) {
10115 -1 return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj[key] === value;
-1 16474 return _typeof(obj) === 'object' && obj[key] === value;
10116 16475 });
10117 16476 }
10118 16477 };
@@ -10120,26 +16479,6 @@ module.exports = {
10120 16479 var axe = axe || {
10121 16480 utils: {}
10122 16481 };
10123 -1 function virtualDOMfromNode(node, shadowId) {
10124 -1 var vNodeCache = {};
10125 -1 return {
10126 -1 shadowId: shadowId,
10127 -1 children: [],
10128 -1 actualNode: node,
10129 -1 get isFocusable() {
10130 -1 if (!vNodeCache._isFocusable) {
10131 -1 vNodeCache._isFocusable = axe.commons.dom.isFocusable(node);
10132 -1 }
10133 -1 return vNodeCache._isFocusable;
10134 -1 },
10135 -1 get tabbableElements() {
10136 -1 if (!vNodeCache._tabbableElements) {
10137 -1 vNodeCache._tabbableElements = axe.commons.dom.getTabbableElements(this);
10138 -1 }
10139 -1 return vNodeCache._tabbableElements;
10140 -1 }
10141 -1 };
10142 -1 }
10143 16482 function getSlotChildren(node) {
10144 16483 var retVal = [];
10145 16484 node = node.firstChild;
@@ -10149,10 +16488,10 @@ module.exports = {
10149 16488 }
10150 16489 return retVal;
10151 16490 }
10152 -1 axe.utils.getFlattenedTree = function(node, shadowId) {
-1 16491 function flattenTree(node, shadowId, parent) {
10153 16492 var retVal, realArray, nodeName;
10154 -1 function reduceShadowDOM(res, child) {
10155 -1 var replacements = axe.utils.getFlattenedTree(child, shadowId);
-1 16493 function reduceShadowDOM(res, child, parent) {
-1 16494 var replacements = flattenTree(child, shadowId, parent);
10156 16495 if (replacements) {
10157 16496 res = res.concat(replacements);
10158 16497 }
@@ -10163,15 +16502,19 @@ module.exports = {
10163 16502 }
10164 16503 nodeName = node.nodeName.toLowerCase();
10165 16504 if (axe.utils.isShadowRoot(node)) {
10166 -1 retVal = virtualDOMfromNode(node, shadowId);
-1 16505 retVal = new VirtualNode(node, parent, shadowId);
10167 16506 shadowId = 'a' + Math.random().toString().substring(2);
10168 16507 realArray = Array.from(node.shadowRoot.childNodes);
10169 -1 retVal.children = realArray.reduce(reduceShadowDOM, []);
-1 16508 retVal.children = realArray.reduce(function(res, child) {
-1 16509 return reduceShadowDOM(res, child, retVal);
-1 16510 }, []);
10170 16511 return [ retVal ];
10171 16512 } else {
10172 -1 if (nodeName === 'content') {
-1 16513 if (nodeName === 'content' && typeof node.getDistributedNodes === 'function') {
10173 16514 realArray = Array.from(node.getDistributedNodes());
10174 -1 return realArray.reduce(reduceShadowDOM, []);
-1 16515 return realArray.reduce(function(res, child) {
-1 16516 return reduceShadowDOM(res, child, parent);
-1 16517 }, []);
10175 16518 } else if (nodeName === 'slot' && typeof node.assignedNodes === 'function') {
10176 16519 realArray = Array.from(node.assignedNodes());
10177 16520 if (!realArray.length) {
@@ -10179,41 +16522,38 @@ module.exports = {
10179 16522 }
10180 16523 var styl = window.getComputedStyle(node);
10181 16524 if (false && styl.display !== 'contents') {
10182 -1 retVal = virtualDOMfromNode(node, shadowId);
10183 -1 retVal.children = realArray.reduce(reduceShadowDOM, []);
-1 16525 retVal = new VirtualNode(node, parent, shadowId);
-1 16526 retVal.children = realArray.reduce(function(res, child) {
-1 16527 return reduceShadowDOM(res, child, retVal);
-1 16528 }, []);
10184 16529 return [ retVal ];
10185 16530 } else {
10186 -1 return realArray.reduce(reduceShadowDOM, []);
-1 16531 return realArray.reduce(function(res, child) {
-1 16532 return reduceShadowDOM(res, child, parent);
-1 16533 }, []);
10187 16534 }
10188 16535 } else {
10189 16536 if (node.nodeType === 1) {
10190 -1 retVal = virtualDOMfromNode(node, shadowId);
-1 16537 retVal = new VirtualNode(node, parent, shadowId);
10191 16538 realArray = Array.from(node.childNodes);
10192 -1 retVal.children = realArray.reduce(reduceShadowDOM, []);
-1 16539 retVal.children = realArray.reduce(function(res, child) {
-1 16540 return reduceShadowDOM(res, child, retVal);
-1 16541 }, []);
10193 16542 return [ retVal ];
10194 16543 } else if (node.nodeType === 3) {
10195 -1 return [ virtualDOMfromNode(node) ];
-1 16544 return [ new VirtualNode(node, parent) ];
10196 16545 }
10197 16546 return undefined;
10198 16547 }
10199 16548 }
-1 16549 }
-1 16550 axe.utils.getFlattenedTree = function(node, shadowId) {
-1 16551 axe._cache.set('nodeMap', new WeakMap());
-1 16552 return flattenTree(node, shadowId);
10200 16553 };
10201 16554 axe.utils.getNodeFromTree = function(vNode, node) {
10202 -1 var found;
10203 -1 if (vNode.actualNode === node) {
10204 -1 return vNode;
10205 -1 }
10206 -1 vNode.children.forEach(function(candidate) {
10207 -1 if (found) {
10208 -1 return;
10209 -1 }
10210 -1 if (candidate.actualNode === node) {
10211 -1 found = candidate;
10212 -1 } else {
10213 -1 found = axe.utils.getNodeFromTree(candidate, node);
10214 -1 }
10215 -1 });
10216 -1 return found;
-1 16555 var el = node || vNode;
-1 16556 return axe._cache.get('nodeMap') ? axe._cache.get('nodeMap').get(el) : null;
10217 16557 };
10218 16558 'use strict';
10219 16559 axe.utils.getAllChecks = function getAllChecks(object) {
@@ -10257,45 +16597,48 @@ module.exports = {
10257 16597 };
10258 16598 };
10259 16599 'use strict';
10260 -1 var _slicedToArray = function() {
10261 -1 function sliceIterator(arr, i) {
10262 -1 var _arr = [];
10263 -1 var _n = true;
10264 -1 var _d = false;
10265 -1 var _e = undefined;
-1 16600 function _slicedToArray(arr, i) {
-1 16601 return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
-1 16602 }
-1 16603 function _nonIterableRest() {
-1 16604 throw new TypeError('Invalid attempt to destructure non-iterable instance');
-1 16605 }
-1 16606 function _iterableToArrayLimit(arr, i) {
-1 16607 if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === '[object Arguments]')) {
-1 16608 return;
-1 16609 }
-1 16610 var _arr = [];
-1 16611 var _n = true;
-1 16612 var _d = false;
-1 16613 var _e = undefined;
-1 16614 try {
-1 16615 for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
-1 16616 _arr.push(_s.value);
-1 16617 if (i && _arr.length === i) {
-1 16618 break;
-1 16619 }
-1 16620 }
-1 16621 } catch (err) {
-1 16622 _d = true;
-1 16623 _e = err;
-1 16624 } finally {
10266 16625 try {
10267 -1 for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
10268 -1 _arr.push(_s.value);
10269 -1 if (i && _arr.length === i) {
10270 -1 break;
10271 -1 }
-1 16626 if (!_n && _i['return'] != null) {
-1 16627 _i['return']();
10272 16628 }
10273 -1 } catch (err) {
10274 -1 _d = true;
10275 -1 _e = err;
10276 16629 } finally {
10277 -1 try {
10278 -1 if (!_n && _i['return']) {
10279 -1 _i['return']();
10280 -1 }
10281 -1 } finally {
10282 -1 if (_d) {
10283 -1 throw _e;
10284 -1 }
-1 16630 if (_d) {
-1 16631 throw _e;
10285 16632 }
10286 16633 }
10287 -1 return _arr;
10288 16634 }
10289 -1 return function(arr, i) {
10290 -1 if (Array.isArray(arr)) {
10291 -1 return arr;
10292 -1 } else if (Symbol.iterator in Object(arr)) {
10293 -1 return sliceIterator(arr, i);
10294 -1 } else {
10295 -1 throw new TypeError('Invalid attempt to destructure non-iterable instance');
10296 -1 }
10297 -1 };
10298 -1 }();
-1 16635 return _arr;
-1 16636 }
-1 16637 function _arrayWithHoles(arr) {
-1 16638 if (Array.isArray(arr)) {
-1 16639 return arr;
-1 16640 }
-1 16641 }
10299 16642 function isMostlyNumbers() {
10300 16643 var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
10301 16644 return str.length !== 0 && (str.match(/[0-9]/g) || '').length >= str.length / 2;
@@ -10363,7 +16706,7 @@ module.exports = {
10363 16706 if (uri.length <= 1 || uri.substr(0, 5) === 'data:' || uri.substr(0, 11) === 'javascript:' || uri.includes('?')) {
10364 16707 return;
10365 16708 }
10366 -1 var currentDomain = options.currentDomain, _options$maxLength = options.maxLength, maxLength = _options$maxLength === undefined ? 25 : _options$maxLength;
-1 16709 var currentDomain = options.currentDomain, _options$maxLength = options.maxLength, maxLength = _options$maxLength === void 0 ? 25 : _options$maxLength;
10367 16710 var _uriParser = uriParser(uri), path = _uriParser.path, domain = _uriParser.domain, hash = _uriParser.hash;
10368 16711 var pathEnd = path.substr(path.substr(0, path.length - 2).lastIndexOf('/') + 1);
10369 16712 if (hash) {
@@ -10386,6 +16729,13 @@ module.exports = {
10386 16729 }
10387 16730 };
10388 16731 'use strict';
-1 16732 axe.utils.getNodeAttributes = function getNodeAttributes(node) {
-1 16733 if (node.attributes instanceof window.NamedNodeMap) {
-1 16734 return node.attributes;
-1 16735 }
-1 16736 return node.cloneNode(false).attributes;
-1 16737 };
-1 16738 'use strict';
10389 16739 axe.utils.getRootNode = function getRootNode(node) {
10390 16740 var doc = node.getRootNode && node.getRootNode() || document;
10391 16741 if (doc === node) {
@@ -10394,13 +16744,34 @@ module.exports = {
10394 16744 return doc;
10395 16745 };
10396 16746 'use strict';
-1 16747 axe.utils.getScroll = function getScroll(elm) {
-1 16748 var buffer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
-1 16749 var overflowX = elm.scrollWidth > elm.clientWidth + buffer;
-1 16750 var overflowY = elm.scrollHeight > elm.clientHeight + buffer;
-1 16751 if (!(overflowX || overflowY)) {
-1 16752 return;
-1 16753 }
-1 16754 var style = window.getComputedStyle(elm);
-1 16755 var overflowXStyle = style.getPropertyValue('overflow-x');
-1 16756 var overflowYStyle = style.getPropertyValue('overflow-y');
-1 16757 var scrollableX = overflowXStyle !== 'visible' && overflowXStyle !== 'hidden';
-1 16758 var scrollableY = overflowYStyle !== 'visible' && overflowYStyle !== 'hidden';
-1 16759 if (overflowX && scrollableX || overflowY && scrollableY) {
-1 16760 return {
-1 16761 elm: elm,
-1 16762 top: elm.scrollTop,
-1 16763 left: elm.scrollLeft
-1 16764 };
-1 16765 }
-1 16766 };
-1 16767 'use strict';
10397 16768 var escapeSelector = axe.utils.escapeSelector;
10398 -1 var isXHTML = void 0;
-1 16769 var isXHTML;
10399 16770 var ignoredAttributes = [ 'class', 'style', 'id', 'selected', 'checked', 'disabled', 'tabindex', 'aria-checked', 'aria-selected', 'aria-invalid', 'aria-activedescendant', 'aria-busy', 'aria-disabled', 'aria-expanded', 'aria-grabbed', 'aria-pressed', 'aria-valuenow' ];
10400 16771 var MAXATTRIBUTELENGTH = 31;
10401 16772 function getAttributeNameValue(node, at) {
10402 16773 var name = at.name;
10403 -1 var atnv = void 0;
-1 16774 var atnv;
10404 16775 if (name.indexOf('href') !== -1 || name.indexOf('src') !== -1) {
10405 16776 var friendly = axe.utils.getFriendlyUriEnd(node.getAttribute(name));
10406 16777 if (friendly) {
@@ -10453,8 +16824,8 @@ module.exports = {
10453 16824 }
10454 16825 });
10455 16826 }
10456 -1 if (node.attributes) {
10457 -1 Array.from(node.attributes).filter(filterAttributes).forEach(function(at) {
-1 16827 if (node.hasAttributes()) {
-1 16828 Array.from(axe.utils.getNodeAttributes(node)).filter(filterAttributes).forEach(function(at) {
10458 16829 var atnv = getAttributeNameValue(node, at);
10459 16830 if (atnv) {
10460 16831 if (data.attributes[atnv]) {
@@ -10529,8 +16900,8 @@ module.exports = {
10529 16900 var retVal = [];
10530 16901 var attData = selectorData.attributes;
10531 16902 var tagData = selectorData.tags;
10532 -1 if (node.attributes) {
10533 -1 Array.from(node.attributes).filter(filterAttributes).forEach(function(at) {
-1 16903 if (node.hasAttributes()) {
-1 16904 Array.from(axe.utils.getNodeAttributes(node)).filter(filterAttributes).forEach(function(at) {
10534 16905 var atnv = getAttributeNameValue(node, at);
10535 16906 if (atnv && attData[atnv] < tagData[node.nodeName]) {
10536 16907 retVal.push({
@@ -10545,7 +16916,7 @@ module.exports = {
10545 16916 }
10546 16917 function getThreeLeastCommonFeatures(elm, selectorData) {
10547 16918 var selector = '';
10548 -1 var features = void 0;
-1 16919 var features;
10549 16920 var clss = uncommonClasses(elm, selectorData);
10550 16921 var atts = uncommonAttributes(elm, selectorData);
10551 16922 if (clss.length && clss[0].count === 1) {
@@ -10582,9 +16953,9 @@ module.exports = {
10582 16953 if (!axe._selectorData) {
10583 16954 throw new Error('Expect axe._selectorData to be set up');
10584 16955 }
10585 -1 var _options$toRoot = options.toRoot, toRoot = _options$toRoot === undefined ? false : _options$toRoot;
10586 -1 var selector = void 0;
10587 -1 var similar = void 0;
-1 16956 var _options$toRoot = options.toRoot, toRoot = _options$toRoot === void 0 ? false : _options$toRoot;
-1 16957 var selector;
-1 16958 var similar;
10588 16959 do {
10589 16960 var features = getElmId(elm);
10590 16961 if (!features) {
@@ -10621,6 +16992,9 @@ module.exports = {
10621 16992 if (doc.nodeType === 11) {
10622 16993 var stack = [];
10623 16994 while (doc.nodeType === 11) {
-1 16995 if (!doc.host) {
-1 16996 return '';
-1 16997 }
10624 16998 stack.push({
10625 16999 elm: elm,
10626 17000 doc: doc
@@ -10640,6 +17014,30 @@ module.exports = {
10640 17014 }
10641 17015 };
10642 17016 'use strict';
-1 17017 axe.utils.getStyleSheetFactory = function getStyleSheetFactory(dynamicDoc) {
-1 17018 if (!dynamicDoc) {
-1 17019 throw new Error('axe.utils.getStyleSheetFactory should be invoked with an argument');
-1 17020 }
-1 17021 return function(options) {
-1 17022 var data = options.data, _options$isCrossOrigi = options.isCrossOrigin, isCrossOrigin = _options$isCrossOrigi === void 0 ? false : _options$isCrossOrigi, shadowId = options.shadowId, root = options.root, priority = options.priority, _options$isLink = options.isLink, isLink = _options$isLink === void 0 ? false : _options$isLink;
-1 17023 var style = dynamicDoc.createElement('style');
-1 17024 if (isLink) {
-1 17025 var text = dynamicDoc.createTextNode('@import "'.concat(data.href, '"'));
-1 17026 style.appendChild(text);
-1 17027 } else {
-1 17028 style.appendChild(dynamicDoc.createTextNode(data));
-1 17029 }
-1 17030 dynamicDoc.head.appendChild(style);
-1 17031 return {
-1 17032 sheet: style.sheet,
-1 17033 isCrossOrigin: isCrossOrigin,
-1 17034 shadowId: shadowId,
-1 17035 root: root,
-1 17036 priority: priority
-1 17037 };
-1 17038 };
-1 17039 };
-1 17040 'use strict';
10643 17041 function getXPathArray(node, path) {
10644 17042 var sibling, count;
10645 17043 if (!node) {
@@ -10696,9 +17094,9 @@ module.exports = {
10696 17094 function xpathToString(xpathArray) {
10697 17095 return xpathArray.reduce(function(str, elm) {
10698 17096 if (elm.id) {
10699 -1 return '/' + elm.str + '[@id=\'' + elm.id + '\']';
-1 17097 return '/'.concat(elm.str, '[@id=\'').concat(elm.id, '\']');
10700 17098 } else {
10701 -1 return str + ('/' + elm.str) + (elm.count > 0 ? '[' + elm.count + ']' : '');
-1 17099 return str + '/'.concat(elm.str) + (elm.count > 0 ? '['.concat(elm.count, ']') : '');
10702 17100 }
10703 17101 }, '');
10704 17102 }
@@ -10736,32 +17134,41 @@ module.exports = {
10736 17134 'use strict';
10737 17135 axe.utils.isHidden = function isHidden(el, recursed) {
10738 17136 'use strict';
10739 -1 var parent;
-1 17137 var node = axe.utils.getNodeFromTree(el);
10740 17138 if (el.nodeType === 9) {
10741 17139 return false;
10742 17140 }
10743 17141 if (el.nodeType === 11) {
10744 17142 el = el.host;
10745 17143 }
-1 17144 if (node && node._isHidden !== null) {
-1 17145 return node._isHidden;
-1 17146 }
10746 17147 var style = window.getComputedStyle(el, null);
10747 17148 if (!style || !el.parentNode || style.getPropertyValue('display') === 'none' || !recursed && style.getPropertyValue('visibility') === 'hidden' || el.getAttribute('aria-hidden') === 'true') {
10748 17149 return true;
10749 17150 }
10750 -1 parent = el.assignedSlot ? el.assignedSlot : el.parentNode;
10751 -1 return axe.utils.isHidden(parent, true);
-1 17151 var parent = el.assignedSlot ? el.assignedSlot : el.parentNode;
-1 17152 var isHidden = axe.utils.isHidden(parent, true);
-1 17153 if (node) {
-1 17154 node._isHidden = isHidden;
-1 17155 }
-1 17156 return isHidden;
10752 17157 };
10753 17158 'use strict';
10754 17159 var htmlTags = [ 'a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'math', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rb', 'rp', 'rt', 'rtc', 'ruby', 's', 'samp', 'script', 'section', 'select', 'slot', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'svg', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr' ];
10755 17160 axe.utils.isHtmlElement = function isHtmlElement(node) {
10756 -1 var tagName = node.nodeName.toLowerCase();
10757 -1 return htmlTags.includes(tagName) && node.namespaceURI !== 'http://www.w3.org/2000/svg';
-1 17161 if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
-1 17162 return false;
-1 17163 }
-1 17164 return htmlTags.includes(node.nodeName.toLowerCase());
10758 17165 };
10759 17166 'use strict';
10760 17167 var possibleShadowRoots = [ 'article', 'aside', 'blockquote', 'body', 'div', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'main', 'nav', 'p', 'section', 'span' ];
10761 17168 axe.utils.isShadowRoot = function isShadowRoot(node) {
10762 -1 var nodeName = node.nodeName.toLowerCase();
10763 17169 if (node.shadowRoot) {
10764 -1 if (/^[a-z][a-z0-9_.-]*-[a-z0-9_.-]*$/.test(nodeName) || possibleShadowRoots.includes(nodeName)) {
-1 17170 var nodeName = node.nodeName.toLowerCase();
-1 17171 if (possibleShadowRoots.includes(nodeName) || /^[a-z][a-z0-9_.-]*-[a-z0-9_.-]*$/.test(nodeName)) {
10765 17172 return true;
10766 17173 }
10767 17174 }
@@ -10776,6 +17183,13 @@ module.exports = {
10776 17183 return doc.createElement('A').localName === 'A';
10777 17184 };
10778 17185 'use strict';
-1 17186 axe._memoizedFns = [];
-1 17187 axe.utils.memoize = function(fn) {
-1 17188 var memoized = axe.imports.memoize(fn);
-1 17189 axe._memoizedFns.push(memoized);
-1 17190 return memoized;
-1 17191 };
-1 17192 'use strict';
10779 17193 function pushFrame(resultSet, options, frameElement, frameSelector) {
10780 17194 'use strict';
10781 17195 var frameXpath = axe.utils.getXpath(frameElement);
@@ -10864,6 +17278,112 @@ module.exports = {
10864 17278 }
10865 17279 };
10866 17280 'use strict';
-1 17281 axe.utils.parseCrossOriginStylesheet = function parseCrossOriginStylesheet(url, options, priority, importedUrls, isCrossOrigin) {
-1 17282 var axiosOptions = {
-1 17283 method: 'get',
-1 17284 url: url
-1 17285 };
-1 17286 importedUrls.push(url);
-1 17287 return axe.imports.axios(axiosOptions).then(function(_ref) {
-1 17288 var data = _ref.data;
-1 17289 var result = options.convertDataToStylesheet({
-1 17290 data: data,
-1 17291 isCrossOrigin: isCrossOrigin,
-1 17292 priority: priority,
-1 17293 root: options.rootNode,
-1 17294 shadowId: options.shadowId
-1 17295 });
-1 17296 return axe.utils.parseStylesheet(result.sheet, options, priority, importedUrls, result.isCrossOrigin);
-1 17297 });
-1 17298 };
-1 17299 'use strict';
-1 17300 function _toConsumableArray(arr) {
-1 17301 return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
-1 17302 }
-1 17303 function _nonIterableSpread() {
-1 17304 throw new TypeError('Invalid attempt to spread non-iterable instance');
-1 17305 }
-1 17306 function _iterableToArray(iter) {
-1 17307 if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === '[object Arguments]') {
-1 17308 return Array.from(iter);
-1 17309 }
-1 17310 }
-1 17311 function _arrayWithoutHoles(arr) {
-1 17312 if (Array.isArray(arr)) {
-1 17313 for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
-1 17314 arr2[i] = arr[i];
-1 17315 }
-1 17316 return arr2;
-1 17317 }
-1 17318 }
-1 17319 axe.utils.parseSameOriginStylesheet = function parseSameOriginStylesheet(sheet, options, priority, importedUrls) {
-1 17320 var isCrossOrigin = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
-1 17321 var rules = Array.from(sheet.cssRules);
-1 17322 if (!rules) {
-1 17323 return Promise.resolve();
-1 17324 }
-1 17325 var cssImportRules = rules.filter(function(r) {
-1 17326 return r.type === 3;
-1 17327 });
-1 17328 if (!cssImportRules.length) {
-1 17329 return Promise.resolve({
-1 17330 isCrossOrigin: isCrossOrigin,
-1 17331 priority: priority,
-1 17332 root: options.rootNode,
-1 17333 shadowId: options.shadowId,
-1 17334 sheet: sheet
-1 17335 });
-1 17336 }
-1 17337 var cssImportUrlsNotAlreadyImported = cssImportRules.filter(function(rule) {
-1 17338 return rule.href;
-1 17339 }).map(function(rule) {
-1 17340 return rule.href;
-1 17341 }).filter(function(url) {
-1 17342 return !importedUrls.includes(url);
-1 17343 });
-1 17344 var promises = cssImportUrlsNotAlreadyImported.map(function(importUrl, cssRuleIndex) {
-1 17345 var newPriority = [].concat(_toConsumableArray(priority), [ cssRuleIndex ]);
-1 17346 var isCrossOriginRequest = /^https?:\/\/|^\/\//i.test(importUrl);
-1 17347 return axe.utils.parseCrossOriginStylesheet(importUrl, options, newPriority, importedUrls, isCrossOriginRequest);
-1 17348 });
-1 17349 var nonImportCSSRules = rules.filter(function(r) {
-1 17350 return r.type !== 3;
-1 17351 });
-1 17352 if (!nonImportCSSRules.length) {
-1 17353 return Promise.all(promises);
-1 17354 }
-1 17355 promises.push(Promise.resolve(options.convertDataToStylesheet({
-1 17356 data: nonImportCSSRules.map(function(rule) {
-1 17357 return rule.cssText;
-1 17358 }).join(),
-1 17359 isCrossOrigin: isCrossOrigin,
-1 17360 priority: priority,
-1 17361 root: options.rootNode,
-1 17362 shadowId: options.shadowId
-1 17363 })));
-1 17364 return Promise.all(promises);
-1 17365 };
-1 17366 'use strict';
-1 17367 axe.utils.parseStylesheet = function parseStylesheet(sheet, options, priority, importedUrls) {
-1 17368 var isCrossOrigin = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
-1 17369 var isSameOrigin = isSameOriginStylesheet(sheet);
-1 17370 if (isSameOrigin) {
-1 17371 return axe.utils.parseSameOriginStylesheet(sheet, options, priority, importedUrls, isCrossOrigin);
-1 17372 }
-1 17373 return axe.utils.parseCrossOriginStylesheet(sheet.href, options, priority, importedUrls, true);
-1 17374 };
-1 17375 function isSameOriginStylesheet(sheet) {
-1 17376 try {
-1 17377 var rules = sheet.cssRules;
-1 17378 if (!rules && sheet.href) {
-1 17379 return false;
-1 17380 }
-1 17381 return true;
-1 17382 } catch (e) {
-1 17383 return false;
-1 17384 }
-1 17385 }
-1 17386 'use strict';
10867 17387 utils.performanceTimer = function() {
10868 17388 'use strict';
10869 17389 function now() {
@@ -10905,7 +17425,10 @@ module.exports = {
10905 17425 axe.log('Measure ' + req.name + ' took ' + req.duration + 'ms');
10906 17426 }
10907 17427 if (window.performance && window.performance.getEntriesByType !== undefined) {
10908 -1 var measures = window.performance.getEntriesByType('measure');
-1 17428 var axeStart = window.performance.getEntriesByName('mark_axe_start')[0];
-1 17429 var measures = window.performance.getEntriesByType('measure').filter(function(measure) {
-1 17430 return measure.startTime >= axeStart.startTime;
-1 17431 });
10909 17432 for (var i = 0; i < measures.length; ++i) {
10910 17433 var req = measures[i];
10911 17434 if (req.name === measureName) {
@@ -11139,32 +17662,17 @@ module.exports = {
11139 17662 };
11140 17663 }
11141 17664 'use strict';
11142 -1 function _toConsumableArray(arr) {
11143 -1 if (Array.isArray(arr)) {
11144 -1 for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
11145 -1 arr2[i] = arr[i];
11146 -1 }
11147 -1 return arr2;
11148 -1 } else {
11149 -1 return Array.from(arr);
11150 -1 }
11151 -1 }
11152 17665 axe.utils.preloadCssom = function preloadCssom(_ref) {
11153 -1 var timeout = _ref.timeout, _ref$treeRoot = _ref.treeRoot, treeRoot = _ref$treeRoot === undefined ? axe._tree[0] : _ref$treeRoot;
-1 17666 var _ref$treeRoot = _ref.treeRoot, treeRoot = _ref$treeRoot === void 0 ? axe._tree[0] : _ref$treeRoot;
11154 17667 var rootNodes = getAllRootNodesInTree(treeRoot);
11155 -1 var q = axe.utils.queue();
11156 17668 if (!rootNodes.length) {
11157 -1 return q;
-1 17669 return Promise.resolve();
11158 17670 }
11159 -1 var dynamicDoc = document.implementation.createHTMLDocument();
11160 -1 var convertDataToStylesheet = getStyleSheetFactory(dynamicDoc);
11161 -1 q.defer(function(resolve, reject) {
11162 -1 getCssomForAllRootNodes(rootNodes, convertDataToStylesheet, timeout).then(function(assets) {
11163 -1 var cssom = processCssomAssets(assets);
11164 -1 resolve(cssom);
11165 -1 }).catch(reject);
-1 17671 var dynamicDoc = document.implementation.createHTMLDocument('Dynamic document for loading cssom');
-1 17672 var convertDataToStylesheet = axe.utils.getStyleSheetFactory(dynamicDoc);
-1 17673 return getCssomForAllRootNodes(rootNodes, convertDataToStylesheet).then(function(assets) {
-1 17674 return flattenAssets(assets);
11166 17675 });
11167 -1 return q;
11168 17676 };
11169 17677 function getAllRootNodesInTree(tree) {
11170 17678 var ids = [];
@@ -11182,170 +17690,45 @@ module.exports = {
11182 17690 });
11183 17691 return axe.utils.uniqueArray(rootNodes, []);
11184 17692 }
11185 -1 var getStyleSheetFactory = function getStyleSheetFactory(dynamicDoc) {
11186 -1 return function(_ref2) {
11187 -1 var data = _ref2.data, isExternal = _ref2.isExternal, shadowId = _ref2.shadowId, root = _ref2.root, priority = _ref2.priority, _ref2$isLink = _ref2.isLink, isLink = _ref2$isLink === undefined ? false : _ref2$isLink;
11188 -1 var style = dynamicDoc.createElement('style');
11189 -1 if (isLink) {
11190 -1 var text = dynamicDoc.createTextNode('@import "' + data.href + '"');
11191 -1 style.appendChild(text);
11192 -1 } else {
11193 -1 style.appendChild(dynamicDoc.createTextNode(data));
-1 17693 function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) {
-1 17694 var promises = [];
-1 17695 rootNodes.forEach(function(_ref2, index) {
-1 17696 var rootNode = _ref2.rootNode, shadowId = _ref2.shadowId;
-1 17697 var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet);
-1 17698 if (!sheets) {
-1 17699 return Promise.all(promises);
11194 17700 }
11195 -1 dynamicDoc.head.appendChild(style);
11196 -1 return {
11197 -1 sheet: style.sheet,
11198 -1 isExternal: isExternal,
-1 17701 var rootIndex = index + 1;
-1 17702 var parseOptions = {
-1 17703 rootNode: rootNode,
11199 17704 shadowId: shadowId,
11200 -1 root: root,
11201 -1 priority: priority
-1 17705 convertDataToStylesheet: convertDataToStylesheet,
-1 17706 rootIndex: rootIndex
11202 17707 };
11203 -1 };
11204 -1 };
11205 -1 function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet, timeout) {
11206 -1 var q = axe.utils.queue();
11207 -1 rootNodes.forEach(function(_ref3, index) {
11208 -1 var rootNode = _ref3.rootNode, shadowId = _ref3.shadowId;
11209 -1 return q.defer(function(resolve, reject) {
11210 -1 return loadCssom({
11211 -1 rootNode: rootNode,
11212 -1 shadowId: shadowId,
11213 -1 timeout: timeout,
11214 -1 convertDataToStylesheet: convertDataToStylesheet,
11215 -1 rootIndex: index + 1
11216 -1 }).then(resolve).catch(reject);
11217 -1 });
11218 -1 });
11219 -1 return q;
11220 -1 }
11221 -1 function processCssomAssets(nestedAssets) {
11222 -1 var result = [];
11223 -1 nestedAssets.forEach(function(item) {
11224 -1 if (Array.isArray(item)) {
11225 -1 result.push.apply(result, _toConsumableArray(processCssomAssets(item)));
11226 -1 } else {
11227 -1 result.push(item);
11228 -1 }
11229 -1 });
11230 -1 return result;
11231 -1 }
11232 -1 function loadCssom(options) {
11233 -1 var rootIndex = options.rootIndex;
11234 -1 var q = axe.utils.queue();
11235 -1 var sheets = getStylesheetsOfRootNode(options);
11236 -1 if (!sheets) {
11237 -1 return q;
11238 -1 }
11239 -1 sheets.forEach(function(sheet, sheetIndex) {
11240 -1 var priority = [ rootIndex, sheetIndex ];
11241 -1 try {
11242 -1 var deferredQ = parseNonCrossOriginStylesheet(sheet, options, priority);
11243 -1 q.defer(deferredQ);
11244 -1 } catch (e) {
11245 -1 var _deferredQ = parseCrossOriginStylesheet(sheet.href, options, priority);
11246 -1 q.defer(_deferredQ);
11247 -1 }
11248 -1 });
11249 -1 return q;
11250 -1 }
11251 -1 function parseNonCrossOriginStylesheet(sheet, options, priority) {
11252 -1 var q = axe.utils.queue();
11253 -1 var cssRules = sheet.cssRules;
11254 -1 var rules = Array.from(cssRules);
11255 -1 if (!rules) {
11256 -1 return q;
11257 -1 }
11258 -1 var cssImportRules = rules.filter(function(r) {
11259 -1 return r.type === 3;
11260 -1 });
11261 -1 if (!cssImportRules.length) {
11262 -1 q.defer(function(resolve) {
11263 -1 return resolve({
11264 -1 isExternal: false,
11265 -1 priority: priority,
11266 -1 root: options.rootNode,
11267 -1 shadowId: options.shadowId,
11268 -1 sheet: sheet
11269 -1 });
11270 -1 });
11271 -1 return q;
11272 -1 }
11273 -1 cssImportRules.forEach(function(importRule, cssRuleIndex) {
11274 -1 return q.defer(function(resolve, reject) {
11275 -1 var importUrl = importRule.href;
11276 -1 var newPriority = [].concat(_toConsumableArray(priority), [ cssRuleIndex ]);
11277 -1 var axiosOptions = {
11278 -1 method: 'get',
11279 -1 url: importUrl,
11280 -1 timeout: options.timeout
11281 -1 };
11282 -1 axe.imports.axios(axiosOptions).then(function(_ref4) {
11283 -1 var data = _ref4.data;
11284 -1 return resolve(options.convertDataToStylesheet({
11285 -1 data: data,
11286 -1 isExternal: true,
11287 -1 priority: newPriority,
11288 -1 root: options.rootNode,
11289 -1 shadowId: options.shadowId
11290 -1 }));
11291 -1 }).catch(reject);
11292 -1 });
11293 -1 });
11294 -1 var nonImportCSSRules = rules.filter(function(r) {
11295 -1 return r.type !== 3;
11296 -1 });
11297 -1 if (!nonImportCSSRules.length) {
11298 -1 return q;
11299 -1 }
11300 -1 q.defer(function(resolve) {
11301 -1 return resolve(options.convertDataToStylesheet({
11302 -1 data: nonImportCSSRules.map(function(rule) {
11303 -1 return rule.cssText;
11304 -1 }).join(),
11305 -1 isExternal: false,
11306 -1 priority: priority,
11307 -1 root: options.rootNode,
11308 -1 shadowId: options.shadowId
-1 17708 var importedUrls = [];
-1 17709 var p = Promise.all(sheets.map(function(sheet, sheetIndex) {
-1 17710 var priority = [ rootIndex, sheetIndex ];
-1 17711 return axe.utils.parseStylesheet(sheet, parseOptions, priority, importedUrls);
11309 17712 }));
-1 17713 promises.push(p);
11310 17714 });
11311 -1 return q;
-1 17715 return Promise.all(promises);
11312 17716 }
11313 -1 function parseCrossOriginStylesheet(url, options, priority) {
11314 -1 var q = axe.utils.queue();
11315 -1 if (!url) {
11316 -1 return q;
11317 -1 }
11318 -1 var axiosOptions = {
11319 -1 method: 'get',
11320 -1 url: url,
11321 -1 timeout: options.timeout
11322 -1 };
11323 -1 q.defer(function(resolve, reject) {
11324 -1 axe.imports.axios(axiosOptions).then(function(_ref5) {
11325 -1 var data = _ref5.data;
11326 -1 return resolve(options.convertDataToStylesheet({
11327 -1 data: data,
11328 -1 isExternal: true,
11329 -1 priority: priority,
11330 -1 root: options.rootNode,
11331 -1 shadowId: options.shadowId
11332 -1 }));
11333 -1 }).catch(reject);
11334 -1 });
11335 -1 return q;
-1 17717 function flattenAssets(assets) {
-1 17718 return assets.reduce(function(acc, val) {
-1 17719 return Array.isArray(val) ? acc.concat(flattenAssets(val)) : acc.concat(val);
-1 17720 }, []);
11336 17721 }
11337 -1 function getStylesheetsOfRootNode(options) {
11338 -1 var rootNode = options.rootNode, shadowId = options.shadowId;
11339 -1 var sheets = void 0;
-1 17722 function getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet) {
-1 17723 var sheets;
11340 17724 if (rootNode.nodeType === 11 && shadowId) {
11341 -1 sheets = getStylesheetsFromDocumentFragment(options);
-1 17725 sheets = getStylesheetsFromDocumentFragment(rootNode, convertDataToStylesheet);
11342 17726 } else {
11343 17727 sheets = getStylesheetsFromDocument(rootNode);
11344 17728 }
11345 17729 return filterStylesheetsWithSameHref(sheets);
11346 17730 }
11347 -1 function getStylesheetsFromDocumentFragment(options) {
11348 -1 var rootNode = options.rootNode, convertDataToStylesheet = options.convertDataToStylesheet;
-1 17731 function getStylesheetsFromDocumentFragment(rootNode, convertDataToStylesheet) {
11349 17732 return Array.from(rootNode.children).filter(filerStyleAndLinkAttributesInDocumentFragment).reduce(function(out, node) {
11350 17733 var nodeName = node.nodeName.toUpperCase();
11351 17734 var data = nodeName === 'STYLE' ? node.textContent : node;
@@ -11392,11 +17775,20 @@ module.exports = {
11392 17775 });
11393 17776 }
11394 17777 'use strict';
11395 -1 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) {
11396 -1 return typeof obj;
11397 -1 } : function(obj) {
11398 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
11399 -1 };
-1 17778 function _extends() {
-1 17779 _extends = Object.assign || function(target) {
-1 17780 for (var i = 1; i < arguments.length; i++) {
-1 17781 var source = arguments[i];
-1 17782 for (var key in source) {
-1 17783 if (Object.prototype.hasOwnProperty.call(source, key)) {
-1 17784 target[key] = source[key];
-1 17785 }
-1 17786 }
-1 17787 }
-1 17788 return target;
-1 17789 };
-1 17790 return _extends.apply(this, arguments);
-1 17791 }
11400 17792 function _defineProperty(obj, key, value) {
11401 17793 if (key in obj) {
11402 17794 Object.defineProperty(obj, key, {
@@ -11410,8 +17802,20 @@ module.exports = {
11410 17802 }
11411 17803 return obj;
11412 17804 }
-1 17805 function _typeof(obj) {
-1 17806 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 17807 _typeof = function _typeof(obj) {
-1 17808 return typeof obj;
-1 17809 };
-1 17810 } else {
-1 17811 _typeof = function _typeof(obj) {
-1 17812 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 17813 };
-1 17814 }
-1 17815 return _typeof(obj);
-1 17816 }
11413 17817 function isValidPreloadObject(preload) {
11414 -1 return (typeof preload === 'undefined' ? 'undefined' : _typeof(preload)) === 'object' && Array.isArray(preload.assets);
-1 17818 return _typeof(preload) === 'object' && Array.isArray(preload.assets);
11415 17819 }
11416 17820 axe.utils.shouldPreload = function shouldPreload(options) {
11417 17821 if (!options || options.preload === undefined || options.preload === null) {
@@ -11423,9 +17827,10 @@ module.exports = {
11423 17827 return isValidPreloadObject(options.preload);
11424 17828 };
11425 17829 axe.utils.getPreloadConfig = function getPreloadConfig(options) {
-1 17830 var _axe$constants$preloa = axe.constants.preload, assets = _axe$constants$preloa.assets, timeout = _axe$constants$preloa.timeout;
11426 17831 var config = {
11427 -1 assets: axe.constants.preloadAssets,
11428 -1 timeout: axe.constants.preloadAssetsTimeout
-1 17832 assets: assets,
-1 17833 timeout: timeout
11429 17834 };
11430 17835 if (!options.preload) {
11431 17836 return config;
@@ -11434,10 +17839,10 @@ module.exports = {
11434 17839 return config;
11435 17840 }
11436 17841 var areRequestedAssetsValid = options.preload.assets.every(function(a) {
11437 -1 return axe.constants.preloadAssets.includes(a.toLowerCase());
-1 17842 return assets.includes(a.toLowerCase());
11438 17843 });
11439 17844 if (!areRequestedAssetsValid) {
11440 -1 throw new Error('Requested assets, not supported. ' + ('Supported assets are: ' + axe.constants.preloadAssets.join(', ') + '.'));
-1 17845 throw new Error('Requested assets, not supported. ' + 'Supported assets are: '.concat(assets.join(', '), '.'));
11441 17846 }
11442 17847 config.assets = axe.utils.uniqueArray(options.preload.assets.map(function(a) {
11443 17848 return a.toLowerCase();
@@ -11451,31 +17856,44 @@ module.exports = {
11451 17856 var preloadFunctionsMap = {
11452 17857 cssom: axe.utils.preloadCssom
11453 17858 };
11454 -1 var q = axe.utils.queue();
11455 17859 var shouldPreload = axe.utils.shouldPreload(options);
11456 17860 if (!shouldPreload) {
11457 -1 return q;
11458 -1 }
11459 -1 var preloadConfig = axe.utils.getPreloadConfig(options);
11460 -1 preloadConfig.assets.forEach(function(asset) {
11461 -1 q.defer(function(resolve, reject) {
11462 -1 preloadFunctionsMap[asset](preloadConfig).then(function(results) {
11463 -1 resolve(_defineProperty({}, asset, results[0]));
11464 -1 }).catch(reject);
-1 17861 return Promise.resolve();
-1 17862 }
-1 17863 return new Promise(function(resolve, reject) {
-1 17864 var _axe$utils$getPreload = axe.utils.getPreloadConfig(options), assets = _axe$utils$getPreload.assets, timeout = _axe$utils$getPreload.timeout;
-1 17865 setTimeout(function() {
-1 17866 return reject('Preload assets timed out.');
-1 17867 }, timeout);
-1 17868 Promise.all(assets.map(function(asset) {
-1 17869 return preloadFunctionsMap[asset](options).then(function(results) {
-1 17870 return _defineProperty({}, asset, results);
-1 17871 });
-1 17872 })).then(function(results) {
-1 17873 var preloadAssets = results.reduce(function(out, result) {
-1 17874 return _extends({}, out, {}, result);
-1 17875 }, {});
-1 17876 resolve(preloadAssets);
11465 17877 });
11466 17878 });
11467 -1 return q;
11468 17879 };
11469 17880 'use strict';
11470 -1 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) {
11471 -1 return typeof obj;
11472 -1 } : function(obj) {
11473 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
11474 -1 };
-1 17881 function _typeof(obj) {
-1 17882 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 17883 _typeof = function _typeof(obj) {
-1 17884 return typeof obj;
-1 17885 };
-1 17886 } else {
-1 17887 _typeof = function _typeof(obj) {
-1 17888 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 17889 };
-1 17890 }
-1 17891 return _typeof(obj);
-1 17892 }
11475 17893 function getIncompleteReason(checkData, messages) {
11476 17894 function getDefaultMsg(messages) {
11477 -1 if (messages.incomplete && messages.incomplete.default) {
11478 -1 return messages.incomplete.default;
-1 17895 if (messages.incomplete && messages.incomplete['default']) {
-1 17896 return messages.incomplete['default'];
11479 17897 } else {
11480 17898 return helpers.incompleteFallbackMessage();
11481 17899 }
@@ -11537,30 +17955,30 @@ module.exports = {
11537 17955 'use strict';
11538 17956 var convertExpressions = function convertExpressions() {};
11539 17957 var matchExpressions = function matchExpressions() {};
11540 -1 function matchesTag(node, exp) {
11541 -1 return node.nodeType === 1 && (exp.tag === '*' || node.nodeName.toLowerCase() === exp.tag);
-1 17958 function matchesTag(vNode, exp) {
-1 17959 return vNode.props.nodeType === 1 && (exp.tag === '*' || vNode.props.nodeName === exp.tag);
11542 17960 }
11543 -1 function matchesClasses(node, exp) {
11544 -1 return !exp.classes || exp.classes.reduce(function(result, cl) {
11545 -1 return result && node.className && node.className.match(cl.regexp);
11546 -1 }, true);
-1 17961 function matchesClasses(vNode, exp) {
-1 17962 return !exp.classes || exp.classes.every(function(cl) {
-1 17963 return vNode.hasClass(cl.value);
-1 17964 });
11547 17965 }
11548 -1 function matchesAttributes(node, exp) {
11549 -1 return !exp.attributes || exp.attributes.reduce(function(result, att) {
11550 -1 var nodeAtt = node.getAttribute(att.key);
11551 -1 return result && nodeAtt !== null && (!att.value || att.test(nodeAtt));
11552 -1 }, true);
-1 17966 function matchesAttributes(vNode, exp) {
-1 17967 return !exp.attributes || exp.attributes.every(function(att) {
-1 17968 var nodeAtt = vNode.attr(att.key);
-1 17969 return nodeAtt !== null && (!att.value || att.test(nodeAtt));
-1 17970 });
11553 17971 }
11554 -1 function matchesId(node, exp) {
11555 -1 return !exp.id || node.id === exp.id;
-1 17972 function matchesId(vNode, exp) {
-1 17973 return !exp.id || vNode.props.id === exp.id;
11556 17974 }
11557 17975 function matchesPseudos(target, exp) {
11558 -1 if (!exp.pseudos || exp.pseudos.reduce(function(result, pseudo) {
-1 17976 if (!exp.pseudos || exp.pseudos.every(function(pseudo) {
11559 17977 if (pseudo.name === 'not') {
11560 -1 return result && !matchExpressions([ target ], pseudo.expressions, false).length;
-1 17978 return !matchExpressions([ target ], pseudo.expressions, false).length;
11561 17979 }
11562 17980 throw new Error('the pseudo selector ' + pseudo.name + ' has not yet been implemented');
11563 -1 }, true)) {
-1 17981 })) {
11564 17982 return true;
11565 17983 }
11566 17984 return false;
@@ -11657,7 +18075,7 @@ module.exports = {
11657 18075 return pseudos.map(function(p) {
11658 18076 var expressions;
11659 18077 if (p.name === 'not') {
11660 -1 expressions = axe.utils.cssParser.parse(p.value);
-1 18078 expressions = p.value;
11661 18079 expressions = expressions.selectors ? expressions.selectors : [ expressions ];
11662 18080 expressions = convertExpressions(expressions);
11663 18081 }
@@ -11686,36 +18104,36 @@ module.exports = {
11686 18104 return newExp;
11687 18105 });
11688 18106 };
11689 -1 function createLocalVariables(nodes, anyLevel, thisLevel, parentShadowId) {
-1 18107 function createLocalVariables(vNodes, anyLevel, thisLevel, parentShadowId) {
11690 18108 var retVal = {
11691 -1 nodes: nodes.slice(),
-1 18109 vNodes: vNodes.slice(),
11692 18110 anyLevel: anyLevel,
11693 18111 thisLevel: thisLevel,
11694 18112 parentShadowId: parentShadowId
11695 18113 };
11696 -1 retVal.nodes.reverse();
-1 18114 retVal.vNodes.reverse();
11697 18115 return retVal;
11698 18116 }
11699 -1 function matchesSelector(node, exp) {
11700 -1 return matchesTag(node.actualNode, exp[0]) && matchesClasses(node.actualNode, exp[0]) && matchesAttributes(node.actualNode, exp[0]) && matchesId(node.actualNode, exp[0]) && matchesPseudos(node, exp[0]);
-1 18117 function matchesSelector(vNode, exp) {
-1 18118 return matchesTag(vNode, exp[0]) && matchesClasses(vNode, exp[0]) && matchesAttributes(vNode, exp[0]) && matchesId(vNode, exp[0]) && matchesPseudos(vNode, exp[0]);
11701 18119 }
11702 18120 matchExpressions = function matchExpressions(domTree, expressions, recurse, filter) {
11703 18121 var stack = [];
11704 -1 var nodes = Array.isArray(domTree) ? domTree : [ domTree ];
11705 -1 var currentLevel = createLocalVariables(nodes, expressions, [], domTree[0].shadowId);
-1 18122 var vNodes = Array.isArray(domTree) ? domTree : [ domTree ];
-1 18123 var currentLevel = createLocalVariables(vNodes, expressions, [], domTree[0].shadowId);
11706 18124 var result = [];
11707 -1 while (currentLevel.nodes.length) {
11708 -1 var node = currentLevel.nodes.pop();
-1 18125 while (currentLevel.vNodes.length) {
-1 18126 var vNode = currentLevel.vNodes.pop();
11709 18127 var childOnly = [];
11710 18128 var childAny = [];
11711 18129 var combined = currentLevel.anyLevel.slice().concat(currentLevel.thisLevel);
11712 18130 var added = false;
11713 18131 for (var i = 0; i < combined.length; i++) {
11714 18132 var exp = combined[i];
11715 -1 if (matchesSelector(node, exp) && (!exp[0].id || node.shadowId === currentLevel.parentShadowId)) {
-1 18133 if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && matchesSelector(vNode, exp)) {
11716 18134 if (exp.length === 1) {
11717 -1 if (!added && (!filter || filter(node))) {
11718 -1 result.push(node);
-1 18135 if (!added && (!filter || filter(vNode))) {
-1 18136 result.push(vNode);
11719 18137 added = true;
11720 18138 }
11721 18139 } else {
@@ -11730,15 +18148,15 @@ module.exports = {
11730 18148 }
11731 18149 }
11732 18150 }
11733 -1 if (currentLevel.anyLevel.includes(exp) && (!exp[0].id || node.shadowId === currentLevel.parentShadowId)) {
-1 18151 if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && currentLevel.anyLevel.includes(exp)) {
11734 18152 childAny.push(exp);
11735 18153 }
11736 18154 }
11737 -1 if (node.children && node.children.length && recurse) {
-1 18155 if (vNode.children && vNode.children.length && recurse) {
11738 18156 stack.push(currentLevel);
11739 -1 currentLevel = createLocalVariables(node.children, childAny, childOnly, node.shadowId);
-1 18157 currentLevel = createLocalVariables(vNode.children, childAny, childOnly, vNode.shadowId);
11740 18158 }
11741 -1 while (!currentLevel.nodes.length && stack.length) {
-1 18159 while (!currentLevel.vNodes.length && stack.length) {
11742 18160 currentLevel = stack.pop();
11743 18161 }
11744 18162 }
@@ -11755,11 +18173,18 @@ module.exports = {
11755 18173 return matchExpressions(domTree, expressions, true, filter);
11756 18174 };
11757 18175 'use strict';
11758 -1 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) {
11759 -1 return typeof obj;
11760 -1 } : function(obj) {
11761 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
11762 -1 };
-1 18176 function _typeof(obj) {
-1 18177 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 18178 _typeof = function _typeof(obj) {
-1 18179 return typeof obj;
-1 18180 };
-1 18181 } else {
-1 18182 _typeof = function _typeof(obj) {
-1 18183 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 18184 };
-1 18185 }
-1 18186 return _typeof(obj);
-1 18187 }
11763 18188 (function() {
11764 18189 'use strict';
11765 18190 function noop() {}
@@ -11812,10 +18237,10 @@ module.exports = {
11812 18237 }
11813 18238 var q = {
11814 18239 defer: function defer(fn) {
11815 -1 if ((typeof fn === 'undefined' ? 'undefined' : _typeof(fn)) === 'object' && fn.then && fn.catch) {
-1 18240 if (_typeof(fn) === 'object' && fn.then && fn['catch']) {
11816 18241 var defer = fn;
11817 18242 fn = function fn(resolve, reject) {
11818 -1 defer.then(resolve).catch(reject);
-1 18243 defer.then(resolve)['catch'](reject);
11819 18244 };
11820 18245 }
11821 18246 funcGuard(fn);
@@ -11863,11 +18288,18 @@ module.exports = {
11863 18288 axe.utils.queue = queue;
11864 18289 })();
11865 18290 'use strict';
11866 -1 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) {
11867 -1 return typeof obj;
11868 -1 } : function(obj) {
11869 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
11870 -1 };
-1 18291 function _typeof(obj) {
-1 18292 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 18293 _typeof = function _typeof(obj) {
-1 18294 return typeof obj;
-1 18295 };
-1 18296 } else {
-1 18297 _typeof = function _typeof(obj) {
-1 18298 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 18299 };
-1 18300 }
-1 18301 return _typeof(obj);
-1 18302 }
11871 18303 (function(exports) {
11872 18304 'use strict';
11873 18305 var messages = {}, subscribers = {}, errorTypes = Object.freeze([ 'EvalError', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError' ]);
@@ -11883,7 +18315,7 @@ module.exports = {
11883 18315 return src;
11884 18316 }
11885 18317 function verify(postedMessage) {
11886 -1 if ((typeof postedMessage === 'undefined' ? 'undefined' : _typeof(postedMessage)) === 'object' && typeof postedMessage.uuid === 'string' && postedMessage._respondable === true) {
-1 18318 if (_typeof(postedMessage) === 'object' && typeof postedMessage.uuid === 'string' && postedMessage._respondable === true) {
11887 18319 var messageSource = _getSource();
11888 18320 return postedMessage._source === messageSource || postedMessage._source === 'axeAPI.x.y.z' || messageSource === 'axeAPI.x.y.z';
11889 18321 }
@@ -11908,6 +18340,12 @@ module.exports = {
11908 18340 _source: _getSource(),
11909 18341 _keepalive: keepalive
11910 18342 };
-1 18343 var axeRespondables = axe._cache.get('axeRespondables');
-1 18344 if (!axeRespondables) {
-1 18345 axeRespondables = {};
-1 18346 axe._cache.set('axeRespondables', axeRespondables);
-1 18347 }
-1 18348 axeRespondables[uuid] = true;
11911 18349 if (typeof callback === 'function') {
11912 18350 messages[uuid] = callback;
11913 18351 }
@@ -11971,6 +18409,10 @@ module.exports = {
11971 18409 return;
11972 18410 }
11973 18411 var uuid = data.uuid;
-1 18412 var axeRespondables = axe._cache.get('axeRespondables') || {};
-1 18413 if (axeRespondables[uuid] && data.topic && e.source !== window) {
-1 18414 return;
-1 18415 }
11974 18416 var keepalive = data._keepalive;
11975 18417 var callback = messages[uuid];
11976 18418 if (callback) {
@@ -11985,7 +18427,7 @@ module.exports = {
11985 18427 try {
11986 18428 publish(e.source, data, keepalive);
11987 18429 } catch (err) {
11988 -1 post(e.source, data.topic, err, uuid, false);
-1 18430 post(e.source, null, err, uuid, false);
11989 18431 }
11990 18432 }
11991 18433 }, false);
@@ -12039,29 +18481,17 @@ module.exports = {
12039 18481 }
12040 18482 };
12041 18483 'use strict';
12042 -1 function getScroll(elm) {
12043 -1 var style = window.getComputedStyle(elm);
12044 -1 var visibleOverflowY = style.getPropertyValue('overflow-y') === 'visible';
12045 -1 var visibleOverflowX = style.getPropertyValue('overflow-x') === 'visible';
12046 -1 if (!visibleOverflowY && elm.scrollHeight > elm.clientHeight || !visibleOverflowX && elm.scrollWidth > elm.clientWidth) {
12047 -1 return {
12048 -1 elm: elm,
12049 -1 top: elm.scrollTop,
12050 -1 left: elm.scrollLeft
12051 -1 };
12052 -1 }
12053 -1 }
12054 18484 function setScroll(elm, top, left) {
12055 18485 if (elm === window) {
12056 -1 return elm.scroll(top, left);
-1 18486 return elm.scroll(left, top);
12057 18487 } else {
12058 18488 elm.scrollTop = top;
12059 18489 elm.scrollLeft = left;
12060 18490 }
12061 18491 }
12062 18492 function getElmScrollRecursive(root) {
12063 -1 return Array.from(root.children).reduce(function(scrolls, elm) {
12064 -1 var scroll = getScroll(elm);
-1 18493 return Array.from(root.children || root.childNodes || []).reduce(function(scrolls, elm) {
-1 18494 var scroll = axe.utils.getScroll(elm);
12065 18495 if (scroll) {
12066 18496 scrolls.push(scroll);
12067 18497 }
@@ -12131,7 +18561,7 @@ module.exports = {
12131 18561 }
12132 18562 function reduceIncludes(includes) {
12133 18563 return includes.reduce(function(res, el) {
12134 -1 if (!res.length || !res[res.length - 1].actualNode.contains(el.actualNode)) {
-1 18564 if (!res.length || !axe.utils.contains(res[res.length - 1], el)) {
12135 18565 res.push(el);
12136 18566 }
12137 18567 return res;
@@ -12139,7 +18569,8 @@ module.exports = {
12139 18569 }
12140 18570 axe.utils.select = function select(selector, context) {
12141 18571 'use strict';
12142 -1 var result = [], candidate;
-1 18572 var result = [];
-1 18573 var candidate;
12143 18574 if (axe._selectCache) {
12144 18575 for (var j = 0, l = axe._selectCache.length; j < l; j++) {
12145 18576 var item = axe._selectCache[j];
@@ -12156,9 +18587,6 @@ module.exports = {
12156 18587 var reducedIncludes = reduceIncludes(context.include);
12157 18588 for (var i = 0; i < reducedIncludes.length; i++) {
12158 18589 candidate = reducedIncludes[i];
12159 -1 if (candidate.actualNode.nodeType === candidate.actualNode.ELEMENT_NODE && axe.utils.matchesSelector(candidate.actualNode, selector) && curried(candidate)) {
12160 -1 result = pushNode(result, [ candidate ]);
12161 -1 }
12162 18590 result = pushNode(result, axe.utils.querySelectorAllFilter(candidate, selector, curried));
12163 18591 }
12164 18592 if (axe._selectCache) {
@@ -12311,33 +18739,53 @@ module.exports = {
12311 18739 return langs;
12312 18740 };
12313 18741 'use strict';
12314 -1 var _extends = Object.assign || function(target) {
12315 -1 for (var i = 1; i < arguments.length; i++) {
12316 -1 var source = arguments[i];
12317 -1 for (var key in source) {
12318 -1 if (Object.prototype.hasOwnProperty.call(source, key)) {
12319 -1 target[key] = source[key];
12320 -1 }
12321 -1 }
12322 -1 }
12323 -1 return target;
12324 -1 };
12325 -1 var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function(obj) {
12326 -1 return typeof obj;
12327 -1 } : function(obj) {
12328 -1 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
12329 -1 };
12330 18742 function _toConsumableArray(arr) {
-1 18743 return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
-1 18744 }
-1 18745 function _nonIterableSpread() {
-1 18746 throw new TypeError('Invalid attempt to spread non-iterable instance');
-1 18747 }
-1 18748 function _iterableToArray(iter) {
-1 18749 if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === '[object Arguments]') {
-1 18750 return Array.from(iter);
-1 18751 }
-1 18752 }
-1 18753 function _arrayWithoutHoles(arr) {
12331 18754 if (Array.isArray(arr)) {
12332 -1 for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
-1 18755 for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
12333 18756 arr2[i] = arr[i];
12334 18757 }
12335 18758 return arr2;
-1 18759 }
-1 18760 }
-1 18761 function _extends() {
-1 18762 _extends = Object.assign || function(target) {
-1 18763 for (var i = 1; i < arguments.length; i++) {
-1 18764 var source = arguments[i];
-1 18765 for (var key in source) {
-1 18766 if (Object.prototype.hasOwnProperty.call(source, key)) {
-1 18767 target[key] = source[key];
-1 18768 }
-1 18769 }
-1 18770 }
-1 18771 return target;
-1 18772 };
-1 18773 return _extends.apply(this, arguments);
-1 18774 }
-1 18775 function _typeof(obj) {
-1 18776 if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
-1 18777 _typeof = function _typeof(obj) {
-1 18778 return typeof obj;
-1 18779 };
12336 18780 } else {
12337 -1 return Array.from(arr);
-1 18781 _typeof = function _typeof(obj) {
-1 18782 return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
-1 18783 };
12338 18784 }
-1 18785 return _typeof(obj);
12339 18786 }
12340 18787 axe._load({
-1 18788 lang: 'en',
12341 18789 data: {
12342 18790 rules: {
12343 18791 accesskeys: {
@@ -12368,6 +18816,10 @@ module.exports = {
12368 18816 description: 'Ensures aria-hidden elements do not contain focusable elements',
12369 18817 help: 'ARIA hidden element must not contain focusable elements'
12370 18818 },
-1 18819 'aria-input-field-name': {
-1 18820 description: 'Ensures every ARIA input field has an accessible name',
-1 18821 help: 'ARIA input fields have an accessible name'
-1 18822 },
12371 18823 'aria-required-attr': {
12372 18824 description: 'Ensures elements with ARIA roles have all required ARIA attributes',
12373 18825 help: 'Required ARIA attributes must be provided'
@@ -12380,10 +18832,18 @@ module.exports = {
12380 18832 description: 'Ensures elements with an ARIA role that require parent roles are contained by them',
12381 18833 help: 'Certain ARIA roles must be contained by particular parents'
12382 18834 },
-1 18835 'aria-roledescription': {
-1 18836 description: 'Ensure aria-roledescription is only used on elements with an implicit or explicit role',
-1 18837 help: 'Use aria-roledescription on elements with a semantic role'
-1 18838 },
12383 18839 'aria-roles': {
12384 18840 description: 'Ensures all elements with a role attribute use a valid value',
12385 18841 help: 'ARIA roles used must conform to valid values'
12386 18842 },
-1 18843 'aria-toggle-field-name': {
-1 18844 description: 'Ensures every ARIA toggle field has an accessible name',
-1 18845 help: 'ARIA toggle fields have an accessible name'
-1 18846 },
12387 18847 'aria-valid-attr-value': {
12388 18848 description: 'Ensures all ARIA attributes have valid values',
12389 18849 help: 'ARIA attributes must conform to valid values'
@@ -12400,6 +18860,10 @@ module.exports = {
12400 18860 description: 'Ensure the autocomplete attribute is correct and suitable for the form field',
12401 18861 help: 'autocomplete attribute must be used correctly'
12402 18862 },
-1 18863 'avoid-inline-spacing': {
-1 18864 description: 'Ensure that text spacing set through style attributes can be adjusted with custom stylesheets',
-1 18865 help: 'Inline text spacing must be adjustable with custom stylesheets'
-1 18866 },
12403 18867 blink: {
12404 18868 description: 'Ensures <blink> elements are not used',
12405 18869 help: '<blink> elements are deprecated and must not be used'
@@ -12458,7 +18922,7 @@ module.exports = {
12458 18922 },
12459 18923 'form-field-multiple-labels': {
12460 18924 description: 'Ensures form field does not have multiple label elements',
12461 -1 help: 'Form field must not have multiple label elements'
-1 18925 help: 'Form field should not have multiple label elements'
12462 18926 },
12463 18927 'frame-tested': {
12464 18928 description: 'Ensures <iframe> and <frame> elements contain the axe-core script',
@@ -12497,8 +18961,12 @@ module.exports = {
12497 18961 help: 'Images must have alternate text'
12498 18962 },
12499 18963 'image-redundant-alt': {
12500 -1 description: 'Ensure button and link text is not repeated as image alternative',
12501 -1 help: 'Text of buttons and links should not be repeated in the image alternative'
-1 18964 description: 'Ensure image alternative is not repeated as text',
-1 18965 help: 'Alternative text of images should not be repeated as text'
-1 18966 },
-1 18967 'input-button-name': {
-1 18968 description: 'Ensures input buttons have discernible text',
-1 18969 help: 'Input buttons must have discernible text'
12502 18970 },
12503 18971 'input-image-alt': {
12504 18972 description: 'Ensures <input type="image"> elements have alternate text',
@@ -12544,6 +19012,10 @@ module.exports = {
12544 19012 description: 'Ensures the document has only one main landmark and each iframe in the page has at most one main landmark',
12545 19013 help: 'Document must have one main landmark'
12546 19014 },
-1 19015 'landmark-unique': {
-1 19016 help: 'Ensures landmarks are unique',
-1 19017 description: 'Landmarks must have a unique role or role/label/title (i.e. accessible name) combination'
-1 19018 },
12547 19019 'layout-table': {
12548 19020 description: 'Ensures presentational <table> elements do not use <th>, <caption> elements or the summary attribute',
12549 19021 help: 'Layout tables must not use data table elements'
@@ -12600,10 +19072,18 @@ module.exports = {
12600 19072 description: 'Ensures all page content is contained by landmarks',
12601 19073 help: 'All page content must be contained by landmarks'
12602 19074 },
-1 19075 'role-img-alt': {
-1 19076 description: 'Ensures [role=\'img\'] elements have alternate text',
-1 19077 help: '[role=\'img\'] elements have an alternative text'
-1 19078 },
12603 19079 'scope-attr-valid': {
12604 19080 description: 'Ensures the scope attribute is used correctly on tables',
12605 19081 help: 'scope attribute should be used correctly'
12606 19082 },
-1 19083 'scrollable-region-focusable': {
-1 19084 description: 'Elements that have scrollable content should be accessible by keyboard',
-1 19085 help: 'Ensure that scrollable region has keyboard access'
-1 19086 },
12607 19087 'server-side-image-map': {
12608 19088 description: 'Ensures that server-side image maps are not used',
12609 19089 help: 'Server-side image maps must not be used'
@@ -12826,6 +19306,19 @@ module.exports = {
12826 19306 }
12827 19307 }
12828 19308 },
-1 19309 'no-implicit-explicit-label': {
-1 19310 impact: 'moderate',
-1 19311 messages: {
-1 19312 pass: function anonymous(it) {
-1 19313 var out = 'There is no mismatch between a <label> and accessible name';
-1 19314 return out;
-1 19315 },
-1 19316 incomplete: function anonymous(it) {
-1 19317 var out = 'Check that the <label> does not need be part of the ARIA ' + it.data + ' field\'s name';
-1 19318 return out;
-1 19319 }
-1 19320 }
-1 19321 },
12829 19322 'aria-required-attr': {
12830 19323 impact: 'critical',
12831 19324 messages: {
@@ -12901,6 +19394,23 @@ module.exports = {
12901 19394 }
12902 19395 }
12903 19396 },
-1 19397 'aria-roledescription': {
-1 19398 impact: 'serious',
-1 19399 messages: {
-1 19400 pass: function anonymous(it) {
-1 19401 var out = 'aria-roledescription used on a supported semantic role';
-1 19402 return out;
-1 19403 },
-1 19404 incomplete: function anonymous(it) {
-1 19405 var out = 'Check that the aria-roledescription is announced by supported screen readers';
-1 19406 return out;
-1 19407 },
-1 19408 fail: function anonymous(it) {
-1 19409 var out = 'Give the element a role that supports aria-roledescription';
-1 19410 return out;
-1 19411 }
-1 19412 }
-1 19413 },
12904 19414 invalidrole: {
12905 19415 impact: 'critical',
12906 19416 messages: {
@@ -12948,6 +19458,19 @@ module.exports = {
12948 19458 }
12949 19459 }
12950 19460 },
-1 19461 'has-visible-text': {
-1 19462 impact: 'minor',
-1 19463 messages: {
-1 19464 pass: function anonymous(it) {
-1 19465 var out = 'Element has text that is visible to screen readers';
-1 19466 return out;
-1 19467 },
-1 19468 fail: function anonymous(it) {
-1 19469 var out = 'Element does not have text that is visible to screen readers';
-1 19470 return out;
-1 19471 }
-1 19472 }
-1 19473 },
12951 19474 'aria-valid-attr-value': {
12952 19475 impact: 'critical',
12953 19476 messages: {
@@ -12966,6 +19489,18 @@ module.exports = {
12966 19489 }
12967 19490 }
12968 19491 return out;
-1 19492 },
-1 19493 incomplete: function anonymous(it) {
-1 19494 var out = 'ARIA attribute' + (it.data && it.data.length > 1 ? 's' : '') + ' element ID does not exist on the page:';
-1 19495 var arr1 = it.data;
-1 19496 if (arr1) {
-1 19497 var value, i1 = -1, l1 = arr1.length - 1;
-1 19498 while (i1 < l1) {
-1 19499 value = arr1[i1 += 1];
-1 19500 out += ' ' + value;
-1 19501 }
-1 19502 }
-1 19503 return out;
12969 19504 }
12970 19505 }
12971 19506 },
@@ -13051,46 +19586,28 @@ module.exports = {
13051 19586 }
13052 19587 }
13053 19588 },
13054 -1 'is-on-screen': {
-1 19589 'avoid-inline-spacing': {
13055 19590 impact: 'serious',
13056 19591 messages: {
13057 19592 pass: function anonymous(it) {
13058 -1 var out = 'Element is not visible';
13059 -1 return out;
13060 -1 },
13061 -1 fail: function anonymous(it) {
13062 -1 var out = 'Element is visible';
13063 -1 return out;
13064 -1 }
13065 -1 }
13066 -1 },
13067 -1 'non-empty-if-present': {
13068 -1 impact: 'critical',
13069 -1 messages: {
13070 -1 pass: function anonymous(it) {
13071 -1 var out = 'Element ';
13072 -1 if (it.data) {
13073 -1 out += 'has a non-empty value attribute';
13074 -1 } else {
13075 -1 out += 'does not have a value attribute';
13076 -1 }
-1 19593 var out = 'No inline styles with \'!important\' that affect text spacing has been specified';
13077 19594 return out;
13078 19595 },
13079 19596 fail: function anonymous(it) {
13080 -1 var out = 'Element has a value attribute and the value attribute is empty';
-1 19597 var out = 'Remove \'!important\' from inline style' + (it.data && it.data.length > 1 ? 's' : '') + ' ' + it.data.join(', ') + ', as overriding this is not supported by most browsers';
13081 19598 return out;
13082 19599 }
13083 19600 }
13084 19601 },
13085 -1 'non-empty-value': {
13086 -1 impact: 'critical',
-1 19602 'is-on-screen': {
-1 19603 impact: 'serious',
13087 19604 messages: {
13088 19605 pass: function anonymous(it) {
13089 -1 var out = 'Element has a non-empty value attribute';
-1 19606 var out = 'Element is not visible';
13090 19607 return out;
13091 19608 },
13092 19609 fail: function anonymous(it) {
13093 -1 var out = 'Element has no value attribute or the value attribute is empty';
-1 19610 var out = 'Element is visible';
13094 19611 return out;
13095 19612 }
13096 19613 }
@@ -13134,19 +19651,6 @@ module.exports = {
13134 19651 }
13135 19652 }
13136 19653 },
13137 -1 'focusable-no-name': {
13138 -1 impact: 'serious',
13139 -1 messages: {
13140 -1 pass: function anonymous(it) {
13141 -1 var out = 'Element is not in tab order or has accessible text';
13142 -1 return out;
13143 -1 },
13144 -1 fail: function anonymous(it) {
13145 -1 var out = 'Element is in tab order and does not have accessible text';
13146 -1 return out;
13147 -1 }
13148 -1 }
13149 -1 },
13150 19654 'internal-link-present': {
13151 19655 impact: 'serious',
13152 19656 messages: {
@@ -13370,19 +19874,6 @@ module.exports = {
13370 19874 }
13371 19875 }
13372 19876 },
13373 -1 'has-visible-text': {
13374 -1 impact: 'minor',
13375 -1 messages: {
13376 -1 pass: function anonymous(it) {
13377 -1 var out = 'Element has text that is visible to screen readers';
13378 -1 return out;
13379 -1 },
13380 -1 fail: function anonymous(it) {
13381 -1 var out = 'Element does not have text that is visible to screen readers';
13382 -1 return out;
13383 -1 }
13384 -1 }
13385 -1 },
13386 19877 'has-widget-role': {
13387 19878 impact: 'minor',
13388 19879 messages: {
@@ -13416,8 +19907,8 @@ module.exports = {
13416 19907 var out = 'Form field does not have multiple label elements';
13417 19908 return out;
13418 19909 },
13419 -1 fail: function anonymous(it) {
13420 -1 var out = 'Multiple label elements is not widely supported in assistive technologies';
-1 19910 incomplete: function anonymous(it) {
-1 19911 var out = 'Multiple label elements is not widely supported in assistive technologies. Ensure the first label contains all necessary information.';
13421 19912 return out;
13422 19913 }
13423 19914 }
@@ -13560,6 +20051,37 @@ module.exports = {
13560 20051 }
13561 20052 }
13562 20053 },
-1 20054 'non-empty-if-present': {
-1 20055 impact: 'critical',
-1 20056 messages: {
-1 20057 pass: function anonymous(it) {
-1 20058 var out = 'Element ';
-1 20059 if (it.data) {
-1 20060 out += 'has a non-empty value attribute';
-1 20061 } else {
-1 20062 out += 'does not have a value attribute';
-1 20063 }
-1 20064 return out;
-1 20065 },
-1 20066 fail: function anonymous(it) {
-1 20067 var out = 'Element has a value attribute and the value attribute is empty';
-1 20068 return out;
-1 20069 }
-1 20070 }
-1 20071 },
-1 20072 'non-empty-value': {
-1 20073 impact: 'critical',
-1 20074 messages: {
-1 20075 pass: function anonymous(it) {
-1 20076 var out = 'Element has a non-empty value attribute';
-1 20077 return out;
-1 20078 },
-1 20079 fail: function anonymous(it) {
-1 20080 var out = 'Element has no value attribute or the value attribute is empty';
-1 20081 return out;
-1 20082 }
-1 20083 }
-1 20084 },
13563 20085 'label-content-name-mismatch': {
13564 20086 impact: 'serious',
13565 20087 messages: {
@@ -13703,6 +20225,19 @@ module.exports = {
13703 20225 }
13704 20226 }
13705 20227 },
-1 20228 'landmark-is-unique': {
-1 20229 impact: 'moderate',
-1 20230 messages: {
-1 20231 pass: function anonymous(it) {
-1 20232 var out = 'Landmarks must have a unique role or role/label/title (i.e. accessible name) combination';
-1 20233 return out;
-1 20234 },
-1 20235 fail: function anonymous(it) {
-1 20236 var out = 'The landmark must have a unique aria-label, aria-labelledby, or title to make landmarks distinguishable';
-1 20237 return out;
-1 20238 }
-1 20239 }
-1 20240 },
13706 20241 'has-th': {
13707 20242 impact: 'serious',
13708 20243 messages: {
@@ -13763,6 +20298,19 @@ module.exports = {
13763 20298 }
13764 20299 }
13765 20300 },
-1 20301 'focusable-no-name': {
-1 20302 impact: 'serious',
-1 20303 messages: {
-1 20304 pass: function anonymous(it) {
-1 20305 var out = 'Element is not in tab order or has accessible text';
-1 20306 return out;
-1 20307 },
-1 20308 fail: function anonymous(it) {
-1 20309 var out = 'Element is in tab order and does not have accessible text';
-1 20310 return out;
-1 20311 }
-1 20312 }
-1 20313 },
13766 20314 'only-listitems': {
13767 20315 impact: 'serious',
13768 20316 messages: {
@@ -13784,7 +20332,11 @@ module.exports = {
13784 20332 return out;
13785 20333 },
13786 20334 fail: function anonymous(it) {
13787 -1 var out = 'List item does not have a <ul>, <ol> or role="list" parent element';
-1 20335 var out = 'List item does not have a <ul>, <ol>';
-1 20336 if (it.data === 'roleNotValid') {
-1 20337 out += ' without a role, or a role="list"';
-1 20338 }
-1 20339 out += ' parent element';
13788 20340 return out;
13789 20341 }
13790 20342 }
@@ -13893,6 +20445,32 @@ module.exports = {
13893 20445 }
13894 20446 }
13895 20447 },
-1 20448 'focusable-content': {
-1 20449 impact: 'moderate',
-1 20450 messages: {
-1 20451 pass: function anonymous(it) {
-1 20452 var out = 'Element contains focusable elements';
-1 20453 return out;
-1 20454 },
-1 20455 fail: function anonymous(it) {
-1 20456 var out = 'Element should have focusable content';
-1 20457 return out;
-1 20458 }
-1 20459 }
-1 20460 },
-1 20461 'focusable-element': {
-1 20462 impact: 'moderate',
-1 20463 messages: {
-1 20464 pass: function anonymous(it) {
-1 20465 var out = 'Element is focusable';
-1 20466 return out;
-1 20467 },
-1 20468 fail: function anonymous(it) {
-1 20469 var out = 'Element should be focusable';
-1 20470 return out;
-1 20471 }
-1 20472 }
-1 20473 },
13896 20474 exists: {
13897 20475 impact: 'minor',
13898 20476 messages: {
@@ -13900,7 +20478,7 @@ module.exports = {
13900 20478 var out = 'Element does not exist';
13901 20479 return out;
13902 20480 },
13903 -1 fail: function anonymous(it) {
-1 20481 incomplete: function anonymous(it) {
13904 20482 var out = 'Element exists';
13905 20483 return out;
13906 20484 }
@@ -13957,7 +20535,7 @@ module.exports = {
13957 20535 return out;
13958 20536 },
13959 20537 fail: function anonymous(it) {
13960 -1 var out = 'The first row of the table should be a caption instead of a table cell';
-1 20538 var out = 'The first child of the table should be a caption instead of a table cell';
13961 20539 return out;
13962 20540 }
13963 20541 }
@@ -14050,7 +20628,7 @@ module.exports = {
14050 20628 }
14051 20629 },
14052 20630 incompleteFallbackMessage: function anonymous(it) {
14053 -1 var out = 'aXe couldn\'t tell the reason. Time to break out the element inspector!';
-1 20631 var out = 'axe couldn\'t tell the reason. Time to break out the element inspector!';
14054 20632 return out;
14055 20633 }
14056 20634 },
@@ -14075,7 +20653,7 @@ module.exports = {
14075 20653 matches: function matches(node, virtualNode, context) {
14076 20654 var aria = /^aria-/;
14077 20655 if (node.hasAttributes()) {
14078 -1 var attrs = node.attributes;
-1 20656 var attrs = axe.utils.getNodeAttributes(node);
14079 20657 for (var i = 0, l = attrs.length; i < l; i++) {
14080 20658 if (aria.test(attrs[i].name)) {
14081 20659 return true;
@@ -14145,11 +20723,41 @@ module.exports = {
14145 20723 return shouldMatchElement(getComposedParent(node));
14146 20724 },
14147 20725 excludeHidden: false,
14148 -1 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412' ],
-1 20726 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'wcag131' ],
14149 20727 all: [ 'focusable-disabled', 'focusable-not-tabbable' ],
14150 20728 any: [],
14151 20729 none: []
14152 20730 }, {
-1 20731 id: 'aria-input-field-name',
-1 20732 selector: '[role="combobox"], [role="listbox"], [role="searchbox"], [role="slider"], [role="spinbutton"], [role="textbox"]',
-1 20733 matches: function matches(node, virtualNode, context) {
-1 20734 var aria = axe.commons.aria;
-1 20735 var nodeName = node.nodeName.toUpperCase();
-1 20736 var role = aria.getRole(node, {
-1 20737 noImplicit: true
-1 20738 });
-1 20739 if (nodeName === 'AREA' && !!node.getAttribute('href')) {
-1 20740 return false;
-1 20741 }
-1 20742 if ([ 'INPUT', 'SELECT', 'TEXTAREA' ].includes(nodeName)) {
-1 20743 return false;
-1 20744 }
-1 20745 if (nodeName === 'IMG' || role === 'img' && nodeName !== 'SVG') {
-1 20746 return false;
-1 20747 }
-1 20748 if (nodeName === 'BUTTON' || role === 'button') {
-1 20749 return false;
-1 20750 }
-1 20751 if (role === 'combobox' && axe.utils.querySelectorAll(virtualNode, 'input:not([type="hidden"])').length) {
-1 20752 return false;
-1 20753 }
-1 20754 return true;
-1 20755 },
-1 20756 tags: [ 'wcag2a', 'wcag412' ],
-1 20757 all: [],
-1 20758 any: [ 'aria-label', 'aria-labelledby', 'non-empty-title' ],
-1 20759 none: [ 'no-implicit-explicit-label' ]
-1 20760 }, {
14153 20761 id: 'aria-required-attr',
14154 20762 selector: '[role]',
14155 20763 tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
@@ -14163,7 +20771,7 @@ module.exports = {
14163 20771 all: [],
14164 20772 any: [ {
14165 20773 options: {
14166 -1 reviewEmpty: [ 'listbox' ]
-1 20774 reviewEmpty: [ 'doc-bibliography', 'doc-endnotes', 'grid', 'list', 'listbox', 'table', 'tablist', 'tree', 'treegrid', 'rowgroup' ]
14167 20775 },
14168 20776 id: 'aria-required-children'
14169 20777 } ],
@@ -14173,7 +20781,19 @@ module.exports = {
14173 20781 selector: '[role]',
14174 20782 tags: [ 'cat.aria', 'wcag2a', 'wcag131' ],
14175 20783 all: [],
14176 -1 any: [ 'aria-required-parent' ],
-1 20784 any: [ 'aria-required-parent' ],
-1 20785 none: []
-1 20786 }, {
-1 20787 id: 'aria-roledescription',
-1 20788 selector: '[aria-roledescription]',
-1 20789 tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
-1 20790 all: [],
-1 20791 any: [ {
-1 20792 options: {
-1 20793 supportedRoles: [ 'button', 'img', 'checkbox', 'radio', 'combobox', 'menuitemcheckbox', 'menuitemradio' ]
-1 20794 },
-1 20795 id: 'aria-roledescription'
-1 20796 } ],
14177 20797 none: []
14178 20798 }, {
14179 20799 id: 'aria-roles',
@@ -14183,11 +20803,41 @@ module.exports = {
14183 20803 any: [],
14184 20804 none: [ 'invalidrole', 'abstractrole', 'unsupportedrole' ]
14185 20805 }, {
-1 20806 id: 'aria-toggle-field-name',
-1 20807 selector: '[role="checkbox"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="radio"], [role="switch"]',
-1 20808 matches: function matches(node, virtualNode, context) {
-1 20809 var aria = axe.commons.aria;
-1 20810 var nodeName = node.nodeName.toUpperCase();
-1 20811 var role = aria.getRole(node, {
-1 20812 noImplicit: true
-1 20813 });
-1 20814 if (nodeName === 'AREA' && !!node.getAttribute('href')) {
-1 20815 return false;
-1 20816 }
-1 20817 if ([ 'INPUT', 'SELECT', 'TEXTAREA' ].includes(nodeName)) {
-1 20818 return false;
-1 20819 }
-1 20820 if (nodeName === 'IMG' || role === 'img' && nodeName !== 'SVG') {
-1 20821 return false;
-1 20822 }
-1 20823 if (nodeName === 'BUTTON' || role === 'button') {
-1 20824 return false;
-1 20825 }
-1 20826 if (role === 'combobox' && axe.utils.querySelectorAll(virtualNode, 'input:not([type="hidden"])').length) {
-1 20827 return false;
-1 20828 }
-1 20829 return true;
-1 20830 },
-1 20831 tags: [ 'wcag2a', 'wcag412' ],
-1 20832 all: [],
-1 20833 any: [ 'aria-label', 'aria-labelledby', 'non-empty-title', 'has-visible-text' ],
-1 20834 none: [ 'no-implicit-explicit-label' ]
-1 20835 }, {
14186 20836 id: 'aria-valid-attr-value',
14187 20837 matches: function matches(node, virtualNode, context) {
14188 20838 var aria = /^aria-/;
14189 20839 if (node.hasAttributes()) {
14190 -1 var attrs = node.attributes;
-1 20840 var attrs = axe.utils.getNodeAttributes(node);
14191 20841 for (var i = 0, l = attrs.length; i < l; i++) {
14192 20842 if (aria.test(attrs[i].name)) {
14193 20843 return true;
@@ -14208,7 +20858,7 @@ module.exports = {
14208 20858 matches: function matches(node, virtualNode, context) {
14209 20859 var aria = /^aria-/;
14210 20860 if (node.hasAttributes()) {
14211 -1 var attrs = node.attributes;
-1 20861 var attrs = axe.utils.getNodeAttributes(node);
14212 20862 for (var i = 0, l = attrs.length; i < l; i++) {
14213 20863 if (aria.test(attrs[i].name)) {
14214 20864 return true;
@@ -14237,31 +20887,31 @@ module.exports = {
14237 20887 id: 'autocomplete-valid',
14238 20888 matches: function matches(node, virtualNode, context) {
14239 20889 var _axe$commons = axe.commons, text = _axe$commons.text, aria = _axe$commons.aria, dom = _axe$commons.dom;
14240 -1 var autocomplete = node.getAttribute('autocomplete');
-1 20890 var autocomplete = virtualNode.attr('autocomplete');
14241 20891 if (!autocomplete || text.sanitize(autocomplete) === '') {
14242 20892 return false;
14243 20893 }
14244 -1 var nodeName = node.nodeName.toUpperCase();
14245 -1 if ([ 'TEXTAREA', 'INPUT', 'SELECT' ].includes(nodeName) === false) {
-1 20894 var nodeName = virtualNode.props.nodeName;
-1 20895 if ([ 'textarea', 'input', 'select' ].includes(nodeName) === false) {
14246 20896 return false;
14247 20897 }
14248 20898 var excludedInputTypes = [ 'submit', 'reset', 'button', 'hidden' ];
14249 -1 if (nodeName === 'INPUT' && excludedInputTypes.includes(node.type)) {
-1 20899 if (nodeName === 'input' && excludedInputTypes.includes(virtualNode.props.type)) {
14250 20900 return false;
14251 20901 }
14252 -1 var ariaDisabled = node.getAttribute('aria-disabled') || 'false';
14253 -1 if (node.disabled || ariaDisabled.toLowerCase() === 'true') {
-1 20902 var ariaDisabled = virtualNode.attr('aria-disabled') || 'false';
-1 20903 if (virtualNode.hasAttr('disabled') || ariaDisabled.toLowerCase() === 'true') {
14254 20904 return false;
14255 20905 }
14256 -1 var role = node.getAttribute('role');
14257 -1 var tabIndex = node.getAttribute('tabindex');
-1 20906 var role = virtualNode.attr('role');
-1 20907 var tabIndex = virtualNode.attr('tabindex');
14258 20908 if (tabIndex === '-1' && role) {
14259 20909 var roleDef = aria.lookupTable.role[role];
14260 20910 if (roleDef === undefined || roleDef.type !== 'widget') {
14261 20911 return false;
14262 20912 }
14263 20913 }
14264 -1 if (tabIndex === '-1' && !dom.isVisible(node, false) && !dom.isVisible(node, true)) {
-1 20914 if (tabIndex === '-1' && virtualNode.actualNode && !dom.isVisible(virtualNode.actualNode, false) && !dom.isVisible(virtualNode.actualNode, true)) {
14265 20915 return false;
14266 20916 }
14267 20917 return true;
@@ -14271,6 +20921,13 @@ module.exports = {
14271 20921 any: [],
14272 20922 none: []
14273 20923 }, {
-1 20924 id: 'avoid-inline-spacing',
-1 20925 selector: '[style]',
-1 20926 tags: [ 'wcag21aa', 'wcag1412' ],
-1 20927 all: [ 'avoid-inline-spacing' ],
-1 20928 any: [],
-1 20929 none: []
-1 20930 }, {
14274 20931 id: 'blink',
14275 20932 selector: 'blink',
14276 20933 excludeHidden: false,
@@ -14280,11 +20937,11 @@ module.exports = {
14280 20937 none: [ 'is-on-screen' ]
14281 20938 }, {
14282 20939 id: 'button-name',
14283 -1 selector: 'button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"]',
-1 20940 selector: 'button, [role="button"]:not(input)',
14284 20941 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'section508', 'section508.22.a' ],
14285 20942 all: [],
14286 -1 any: [ 'non-empty-if-present', 'non-empty-value', 'button-has-visible-text', 'aria-label', 'aria-labelledby', 'role-presentation', 'role-none', 'non-empty-title' ],
14287 -1 none: [ 'focusable-no-name' ]
-1 20943 any: [ 'button-has-visible-text', 'aria-label', 'aria-labelledby', 'role-presentation', 'role-none', 'non-empty-title' ],
-1 20944 none: []
14288 20945 }, {
14289 20946 id: 'bypass',
14290 20947 selector: 'html',
@@ -14299,14 +20956,16 @@ module.exports = {
14299 20956 }, {
14300 20957 id: 'checkboxgroup',
14301 20958 selector: 'input[type=checkbox][name]',
14302 -1 tags: [ 'cat.forms', 'best-practice' ],
-1 20959 tags: [ 'cat.forms', 'best-practice', 'deprecated' ],
-1 20960 enabled: false,
14303 20961 all: [],
14304 20962 any: [ 'group-labelledby', 'fieldset' ],
14305 20963 none: []
14306 20964 }, {
14307 20965 id: 'color-contrast',
14308 20966 matches: function matches(node, virtualNode, context) {
14309 -1 var nodeName = node.nodeName.toUpperCase(), nodeType = node.type;
-1 20967 var nodeName = node.nodeName.toUpperCase();
-1 20968 var nodeType = node.type;
14310 20969 if (node.getAttribute('aria-disabled') === 'true' || axe.commons.dom.findUpVirtual(virtualNode, '[aria-disabled="true"]')) {
14311 20970 return false;
14312 20971 }
@@ -14334,14 +20993,15 @@ module.exports = {
14334 20993 var relevantVirtualNode = virtualNode;
14335 20994 if (nodeParentLabel) {
14336 20995 relevantNode = nodeParentLabel;
14337 -1 relevantVirtualNode = axe.utils.getNodeFromTree(axe._tree[0], nodeParentLabel);
-1 20996 relevantVirtualNode = axe.utils.getNodeFromTree(nodeParentLabel);
14338 20997 }
14339 20998 var doc = axe.commons.dom.getRootNode(relevantNode);
14340 20999 var candidate = relevantNode.htmlFor && doc.getElementById(relevantNode.htmlFor);
14341 -1 if (candidate && candidate.disabled) {
-1 21000 var candidateVirtualNode = axe.utils.getNodeFromTree(candidate);
-1 21001 if (candidate && (candidate.disabled || candidate.getAttribute('aria-disabled') === 'true' || axe.commons.dom.findUpVirtual(candidateVirtualNode, '[aria-disabled="true"]'))) {
14342 21002 return false;
14343 21003 }
14344 -1 var candidate = axe.utils.querySelectorAll(relevantVirtualNode, 'input:not([type="hidden"]):not([type="image"])' + ':not([type="button"]):not([type="submit"]):not([type="reset"]), select, textarea');
-1 21004 candidate = axe.utils.querySelectorAll(relevantVirtualNode, 'input:not([type="hidden"]):not([type="image"])' + ':not([type="button"]):not([type="submit"]):not([type="reset"]), select, textarea');
14345 21005 if (candidate.length && candidate[0].actualNode.disabled) {
14346 21006 return false;
14347 21007 }
@@ -14349,15 +21009,24 @@ module.exports = {
14349 21009 if (node.getAttribute('id')) {
14350 21010 var id = axe.utils.escapeSelector(node.getAttribute('id'));
14351 21011 var _doc = axe.commons.dom.getRootNode(node);
14352 -1 var candidate = _doc.querySelector('[aria-labelledby~=' + id + ']');
14353 -1 if (candidate && candidate.disabled) {
-1 21012 var _candidate = _doc.querySelector('[aria-labelledby~=' + id + ']');
-1 21013 if (_candidate && _candidate.disabled) {
14354 21014 return false;
14355 21015 }
14356 21016 }
14357 -1 if (axe.commons.text.visibleVirtual(virtualNode, false, true) === '') {
-1 21017 var visibleText = axe.commons.text.visibleVirtual(virtualNode, false, true);
-1 21018 if (visibleText === '' || axe.commons.text.removeUnicode(visibleText, {
-1 21019 emoji: true,
-1 21020 nonBmp: true,
-1 21021 punctuations: true
-1 21022 }) === '') {
14358 21023 return false;
14359 21024 }
14360 -1 var range = document.createRange(), childNodes = virtualNode.children, length = childNodes.length, child, index;
-1 21025 var range = document.createRange();
-1 21026 var childNodes = virtualNode.children;
-1 21027 var length = childNodes.length;
-1 21028 var child = null;
-1 21029 var index = 0;
14361 21030 for (index = 0; index < length; index++) {
14362 21031 child = childNodes[index];
14363 21032 if (child.actualNode.nodeType === 3 && axe.commons.text.sanitize(child.actualNode.nodeValue) !== '') {
@@ -14425,9 +21094,9 @@ module.exports = {
14425 21094 matches: function matches(node, virtualNode, context) {
14426 21095 var _axe$commons2 = axe.commons, dom = _axe$commons2.dom, aria = _axe$commons2.aria;
14427 21096 var id = node.getAttribute('id').trim();
14428 -1 var idSelector = '*[id="' + axe.utils.escapeSelector(id) + '"]';
-1 21097 var idSelector = '*[id="'.concat(axe.utils.escapeSelector(id), '"]');
14429 21098 var idMatchingElms = Array.from(dom.getRootNode(node).querySelectorAll(idSelector));
14430 -1 return idMatchingElms.some(dom.isFocusable) && !aria.isAccessibleRef(node);
-1 21099 return !aria.isAccessibleRef(node) && idMatchingElms.some(dom.isFocusable);
14431 21100 },
14432 21101 excludeHidden: false,
14433 21102 tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ],
@@ -14451,11 +21120,11 @@ module.exports = {
14451 21120 matches: function matches(node, virtualNode, context) {
14452 21121 var _axe$commons3 = axe.commons, dom = _axe$commons3.dom, aria = _axe$commons3.aria;
14453 21122 var id = node.getAttribute('id').trim();
14454 -1 var idSelector = '*[id="' + axe.utils.escapeSelector(id) + '"]';
-1 21123 var idSelector = '*[id="'.concat(axe.utils.escapeSelector(id), '"]');
14455 21124 var idMatchingElms = Array.from(dom.getRootNode(node).querySelectorAll(idSelector));
14456 -1 return idMatchingElms.every(function(elm) {
-1 21125 return !aria.isAccessibleRef(node) && idMatchingElms.every(function(elm) {
14457 21126 return !dom.isFocusable(elm);
14458 -1 }) && !aria.isAccessibleRef(node);
-1 21127 });
14459 21128 },
14460 21129 excludeHidden: false,
14461 21130 tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ],
@@ -14466,7 +21135,7 @@ module.exports = {
14466 21135 id: 'empty-heading',
14467 21136 selector: 'h1, h2, h3, h4, h5, h6, [role="heading"]',
14468 21137 matches: function matches(node, virtualNode, context) {
14469 -1 var explicitRoles = void 0;
-1 21138 var explicitRoles;
14470 21139 if (node.hasAttribute('role')) {
14471 21140 explicitRoles = node.getAttribute('role').split(/\s+/i).filter(axe.commons.aria.isValidRole);
14472 21141 }
@@ -14544,7 +21213,7 @@ module.exports = {
14544 21213 id: 'heading-order',
14545 21214 selector: 'h1, h2, h3, h4, h5, h6, [role=heading]',
14546 21215 matches: function matches(node, virtualNode, context) {
14547 -1 var explicitRoles = void 0;
-1 21216 var explicitRoles;
14548 21217 if (node.hasAttribute('role')) {
14549 21218 explicitRoles = node.getAttribute('role').split(/\s+/i).filter(axe.commons.aria.isValidRole);
14550 21219 }
@@ -14569,6 +21238,9 @@ module.exports = {
14569 21238 }, {
14570 21239 id: 'html-has-lang',
14571 21240 selector: 'html',
-1 21241 matches: function matches(node, virtualNode, context) {
-1 21242 return node.ownerDocument.defaultView.self === node.ownerDocument.defaultView.top;
-1 21243 },
14572 21244 tags: [ 'cat.language', 'wcag2a', 'wcag311' ],
14573 21245 all: [],
14574 21246 any: [ 'has-lang' ],
@@ -14595,19 +21267,26 @@ module.exports = {
14595 21267 none: []
14596 21268 }, {
14597 21269 id: 'image-alt',
14598 -1 selector: 'img, [role=\'img\']:not(svg)',
-1 21270 selector: 'img',
14599 21271 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a' ],
14600 21272 all: [],
14601 21273 any: [ 'has-alt', 'aria-label', 'aria-labelledby', 'non-empty-title', 'role-presentation', 'role-none' ],
14602 21274 none: [ 'alt-space-value' ]
14603 21275 }, {
14604 21276 id: 'image-redundant-alt',
14605 -1 selector: 'button, [role="button"], a[href], p, li, td, th',
-1 21277 selector: 'img',
14606 21278 tags: [ 'cat.text-alternatives', 'best-practice' ],
14607 21279 all: [],
14608 21280 any: [],
14609 21281 none: [ 'duplicate-img-label' ]
14610 21282 }, {
-1 21283 id: 'input-button-name',
-1 21284 selector: 'input[type="button"], input[type="submit"], input[type="reset"]',
-1 21285 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'section508', 'section508.22.a' ],
-1 21286 all: [],
-1 21287 any: [ 'non-empty-if-present', 'non-empty-value', 'aria-label', 'aria-labelledby', 'role-presentation', 'role-none', 'non-empty-title' ],
-1 21288 none: []
-1 21289 }, {
14611 21290 id: 'input-image-alt',
14612 21291 selector: 'input[type="image"]',
14613 21292 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a' ],
@@ -14640,7 +21319,13 @@ module.exports = {
14640 21319 },
14641 21320 tags: [ 'wcag21a', 'wcag253', 'experimental' ],
14642 21321 all: [],
14643 -1 any: [ 'label-content-name-mismatch' ],
-1 21322 any: [ {
-1 21323 options: {
-1 21324 pixelThreshold: .1,
-1 21325 occuranceThreshold: 3
-1 21326 },
-1 21327 id: 'label-content-name-mismatch'
-1 21328 } ],
14644 21329 none: []
14645 21330 }, {
14646 21331 id: 'label-title-only',
@@ -14750,6 +21435,37 @@ module.exports = {
14750 21435 any: [],
14751 21436 none: []
14752 21437 }, {
-1 21438 id: 'landmark-unique',
-1 21439 selector: '[role=banner], [role=complementary], [role=contentinfo], [role=main], [role=navigation], [role=region], [role=search], [role=form], form, footer, header, aside, main, nav, section',
-1 21440 tags: [ 'cat.semantics', 'best-practice' ],
-1 21441 matches: function matches(node, virtualNode, context) {
-1 21442 var excludedParentsForHeaderFooterLandmarks = [ 'article', 'aside', 'main', 'nav', 'section' ].join(',');
-1 21443 function isHeaderFooterLandmark(headerFooterElement) {
-1 21444 return !axe.commons.dom.findUpVirtual(headerFooterElement, excludedParentsForHeaderFooterLandmarks);
-1 21445 }
-1 21446 function isLandmarkVirtual(virtualNode) {
-1 21447 var actualNode = virtualNode.actualNode;
-1 21448 var landmarkRoles = axe.commons.aria.getRolesByType('landmark');
-1 21449 var role = axe.commons.aria.getRole(actualNode);
-1 21450 if (!role) {
-1 21451 return false;
-1 21452 }
-1 21453 var nodeName = actualNode.nodeName.toUpperCase();
-1 21454 if (nodeName === 'HEADER' || nodeName === 'FOOTER') {
-1 21455 return isHeaderFooterLandmark(virtualNode);
-1 21456 }
-1 21457 if (nodeName === 'SECTION' || nodeName === 'FORM') {
-1 21458 var accessibleText = axe.commons.text.accessibleTextVirtual(virtualNode);
-1 21459 return !!accessibleText;
-1 21460 }
-1 21461 return landmarkRoles.indexOf(role) >= 0 || role === 'region';
-1 21462 }
-1 21463 return isLandmarkVirtual(virtualNode) && axe.commons.dom.isVisible(node, true);
-1 21464 },
-1 21465 all: [],
-1 21466 any: [ 'landmark-is-unique' ],
-1 21467 none: []
-1 21468 }, {
14753 21469 id: 'layout-table',
14754 21470 selector: 'table',
14755 21471 matches: function matches(node, virtualNode, context) {
@@ -14784,10 +21500,7 @@ module.exports = {
14784 21500 none: []
14785 21501 }, {
14786 21502 id: 'link-name',
14787 -1 selector: 'a[href], [role=link][href]',
14788 -1 matches: function matches(node, virtualNode, context) {
14789 -1 return node.getAttribute('role') !== 'button';
14790 -1 },
-1 21503 selector: 'a[href]:not([role=button]), [role=link]',
14791 21504 tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'wcag244', 'section508', 'section508.22.a' ],
14792 21505 all: [],
14793 21506 any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', 'role-presentation', 'role-none' ],
@@ -14824,7 +21537,7 @@ module.exports = {
14824 21537 id: 'meta-refresh',
14825 21538 selector: 'meta[http-equiv="refresh"]',
14826 21539 excludeHidden: false,
14827 -1 tags: [ 'cat.time', 'wcag2a', 'wcag2aaa', 'wcag221', 'wcag224', 'wcag325' ],
-1 21540 tags: [ 'cat.time-and-media', 'wcag2a', 'wcag2aaa', 'wcag221', 'wcag224', 'wcag325' ],
14828 21541 all: [],
14829 21542 any: [ 'meta-refresh' ],
14830 21543 none: []
@@ -14912,7 +21625,8 @@ module.exports = {
14912 21625 }, {
14913 21626 id: 'radiogroup',
14914 21627 selector: 'input[type=radio][name]',
14915 -1 tags: [ 'cat.forms', 'best-practice' ],
-1 21628 tags: [ 'cat.forms', 'best-practice', 'deprecated' ],
-1 21629 enabled: false,
14916 21630 all: [],
14917 21631 any: [ 'group-labelledby', 'fieldset' ],
14918 21632 none: []
@@ -14925,6 +21639,13 @@ module.exports = {
14925 21639 any: [ 'region' ],
14926 21640 none: []
14927 21641 }, {
-1 21642 id: 'role-img-alt',
-1 21643 selector: '[role=\'img\']:not(svg):not(img):not(area):not(input):not(object)',
-1 21644 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a' ],
-1 21645 all: [],
-1 21646 any: [ 'aria-label', 'aria-labelledby', 'non-empty-title' ],
-1 21647 none: []
-1 21648 }, {
14928 21649 id: 'scope-attr-valid',
14929 21650 selector: 'td[scope], th[scope]',
14930 21651 tags: [ 'cat.tables', 'best-practice' ],
@@ -14932,6 +21653,27 @@ module.exports = {
14932 21653 any: [],
14933 21654 none: []
14934 21655 }, {
-1 21656 id: 'scrollable-region-focusable',
-1 21657 matches: function matches(node, virtualNode, context) {
-1 21658 var querySelectorAll = axe.utils.querySelectorAll;
-1 21659 var hasContentVirtual = axe.commons.dom.hasContentVirtual;
-1 21660 if (!!axe.utils.getScroll(node, 13) === false) {
-1 21661 return false;
-1 21662 }
-1 21663 var nodeAndDescendents = querySelectorAll(virtualNode, '*');
-1 21664 var hasVisibleChildren = nodeAndDescendents.some(function(elm) {
-1 21665 return hasContentVirtual(elm, true, true);
-1 21666 });
-1 21667 if (!hasVisibleChildren) {
-1 21668 return false;
-1 21669 }
-1 21670 return true;
-1 21671 },
-1 21672 tags: [ 'wcag2a', 'wcag211' ],
-1 21673 all: [],
-1 21674 any: [ 'focusable-content', 'focusable-element' ],
-1 21675 none: []
-1 21676 }, {
14935 21677 id: 'server-side-image-map',
14936 21678 selector: 'img[ismap]',
14937 21679 tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag211', 'section508', 'section508.22.f' ],
@@ -14940,9 +21682,9 @@ module.exports = {
14940 21682 none: [ 'exists' ]
14941 21683 }, {
14942 21684 id: 'skip-link',
14943 -1 selector: 'a[href]',
-1 21685 selector: 'a[href^="#"], a[href^="/#"]',
14944 21686 matches: function matches(node, virtualNode, context) {
14945 -1 return /^#[^/!]/.test(node.getAttribute('href'));
-1 21687 return axe.commons.dom.isSkipLink(node);
14946 21688 },
14947 21689 tags: [ 'cat.keyboard', 'best-practice' ],
14948 21690 all: [],
@@ -15025,7 +21767,8 @@ module.exports = {
15025 21767 id: 'video-description',
15026 21768 selector: 'video',
15027 21769 excludeHidden: false,
15028 -1 tags: [ 'cat.text-alternatives', 'wcag2aa', 'wcag125', 'section508', 'section508.22.b' ],
-1 21770 tags: [ 'cat.text-alternatives', 'wcag2aa', 'wcag125', 'section508', 'section508.22.b', 'deprecated' ],
-1 21771 enabled: false,
15029 21772 all: [],
15030 21773 any: [],
15031 21774 none: [ 'description' ]
@@ -15040,7 +21783,7 @@ module.exports = {
15040 21783 evaluate: function evaluate(node, options, virtualNode, context) {
15041 21784 options = options || {};
15042 21785 var invalid = [];
15043 -1 var attr, attrName, allowed, role = node.getAttribute('role'), attrs = node.attributes;
-1 21786 var attr, attrName, allowed, role = node.getAttribute('role'), attrs = axe.utils.getNodeAttributes(node);
15044 21787 if (!role) {
15045 21788 role = axe.commons.aria.implicitRole(node);
15046 21789 }
@@ -15067,7 +21810,7 @@ module.exports = {
15067 21810 id: 'aria-allowed-role',
15068 21811 evaluate: function evaluate(node, options, virtualNode, context) {
15069 21812 var dom = axe.commons.dom;
15070 -1 var _ref = options || {}, _ref$allowImplicit = _ref.allowImplicit, allowImplicit = _ref$allowImplicit === undefined ? true : _ref$allowImplicit, _ref$ignoredTags = _ref.ignoredTags, ignoredTags = _ref$ignoredTags === undefined ? [] : _ref$ignoredTags;
-1 21813 var _ref = options || {}, _ref$allowImplicit = _ref.allowImplicit, allowImplicit = _ref$allowImplicit === void 0 ? true : _ref$allowImplicit, _ref$ignoredTags = _ref.ignoredTags, ignoredTags = _ref$ignoredTags === void 0 ? [] : _ref$ignoredTags;
15071 21814 var tagName = node.nodeName.toUpperCase();
15072 21815 if (ignoredTags.map(function(t) {
15073 21816 return t.toUpperCase();
@@ -15094,6 +21837,23 @@ module.exports = {
15094 21837 return node.getAttribute('aria-hidden') !== 'true';
15095 21838 }
15096 21839 }, {
-1 21840 id: 'aria-roledescription',
-1 21841 evaluate: function evaluate(node, options, virtualNode, context) {
-1 21842 options = options || {};
-1 21843 var role = axe.commons.aria.getRole(node);
-1 21844 var supportedRoles = options.supportedRoles || [];
-1 21845 if (supportedRoles.includes(role)) {
-1 21846 return true;
-1 21847 }
-1 21848 if (role && role !== 'presentation' && role !== 'none') {
-1 21849 return undefined;
-1 21850 }
-1 21851 return false;
-1 21852 },
-1 21853 options: {
-1 21854 supportedRoles: [ 'button', 'img', 'checkbox', 'radio', 'combobox', 'menuitemcheckbox', 'menuitemradio' ]
-1 21855 }
-1 21856 }, {
15097 21857 id: 'aria-errormessage',
15098 21858 evaluate: function evaluate(node, options, virtualNode, context) {
15099 21859 var _axe$commons5 = axe.commons, aria = _axe$commons5.aria, dom = _axe$commons5.dom;
@@ -15147,19 +21907,47 @@ module.exports = {
15147 21907 });
15148 21908 }
15149 21909 }, {
-1 21910 id: 'no-implicit-explicit-label',
-1 21911 evaluate: function evaluate(node, options, virtualNode, context) {
-1 21912 var _axe$commons6 = axe.commons, aria = _axe$commons6.aria, text = _axe$commons6.text;
-1 21913 var role = aria.getRole(node, {
-1 21914 noImplicit: true
-1 21915 });
-1 21916 this.data(role);
-1 21917 var labelText = text.sanitize(text.labelText(virtualNode)).toLowerCase();
-1 21918 var accText = text.sanitize(text.accessibleText(node)).toLowerCase();
-1 21919 if (!accText && !labelText) {
-1 21920 return false;
-1 21921 }
-1 21922 if (!accText && labelText) {
-1 21923 return undefined;
-1 21924 }
-1 21925 if (!accText.includes(labelText)) {
-1 21926 return undefined;
-1 21927 }
-1 21928 return false;
-1 21929 }
-1 21930 }, {
15150 21931 id: 'aria-required-attr',
15151 21932 evaluate: function evaluate(node, options, virtualNode, context) {
15152 21933 options = options || {};
15153 21934 var missing = [];
-1 21935 var _axe$commons$forms = axe.commons.forms, isNativeTextbox = _axe$commons$forms.isNativeTextbox, isNativeSelect = _axe$commons$forms.isNativeSelect, isAriaTextbox = _axe$commons$forms.isAriaTextbox, isAriaListbox = _axe$commons$forms.isAriaListbox, isAriaCombobox = _axe$commons$forms.isAriaCombobox, isAriaRange = _axe$commons$forms.isAriaRange;
-1 21936 var preChecks = {
-1 21937 'aria-valuenow': function ariaValuenow() {
-1 21938 return !(isNativeTextbox(node) || isNativeSelect(node) || isAriaTextbox(node) || isAriaListbox(node) || isAriaCombobox(node) || isAriaRange(node) && node.hasAttribute('aria-valuenow'));
-1 21939 }
-1 21940 };
15154 21941 if (node.hasAttributes()) {
15155 -1 var attr, role = node.getAttribute('role'), required = axe.commons.aria.requiredAttr(role);
-1 21942 var role = node.getAttribute('role');
-1 21943 var required = axe.commons.aria.requiredAttr(role);
15156 21944 if (Array.isArray(options[role])) {
15157 21945 required = axe.utils.uniqueArray(options[role], required);
15158 21946 }
15159 21947 if (role && required) {
15160 21948 for (var i = 0, l = required.length; i < l; i++) {
15161 -1 attr = required[i];
15162 -1 if (!node.getAttribute(attr)) {
-1 21949 var attr = required[i];
-1 21950 if (!node.getAttribute(attr) && (preChecks[attr] ? preChecks[attr]() : true)) {
15163 21951 missing.push(attr);
15164 21952 }
15165 21953 }
@@ -15178,6 +21966,7 @@ module.exports = {
15178 21966 var implicitNodes = axe.commons.aria.implicitNodes;
15179 21967 var matchesSelector = axe.utils.matchesSelector;
15180 21968 var idrefs = axe.commons.dom.idrefs;
-1 21969 var hasContentVirtual = axe.commons.dom.hasContentVirtual;
15181 21970 var reviewEmpty = options && Array.isArray(options.reviewEmpty) ? options.reviewEmpty : [];
15182 21971 function owns(node, virtualTree, role, ariaOwned) {
15183 21972 if (node === null) {
@@ -15185,7 +21974,9 @@ module.exports = {
15185 21974 }
15186 21975 var implicit = implicitNodes(role), selector = [ '[role="' + role + '"]' ];
15187 21976 if (implicit) {
15188 -1 selector = selector.concat(implicit);
-1 21977 selector = selector.concat(implicit.map(function(implicitSelector) {
-1 21978 return implicitSelector + ':not([role])';
-1 21979 }));
15189 21980 }
15190 21981 selector = selector.join(',');
15191 21982 return ariaOwned ? matchesSelector(node, selector) || !!axe.utils.querySelectorAll(virtualTree, selector)[0] : !!axe.utils.querySelectorAll(virtualTree, selector)[0];
@@ -15196,7 +21987,7 @@ module.exports = {
15196 21987 if (nodes[index] === null) {
15197 21988 continue;
15198 21989 }
15199 -1 var virtualTree = axe.utils.getNodeFromTree(axe._tree[0], nodes[index]);
-1 21990 var virtualTree = axe.utils.getNodeFromTree(nodes[index]);
15200 21991 if (owns(nodes[index], virtualTree, role, true)) {
15201 21992 return true;
15202 21993 }
@@ -15204,23 +21995,23 @@ module.exports = {
15204 21995 return false;
15205 21996 }
15206 21997 function missingRequiredChildren(node, childRoles, all, role) {
15207 -1 var i, l = childRoles.length, missing = [], ownedElements = idrefs(node, 'aria-owns');
15208 -1 for (i = 0; i < l; i++) {
15209 -1 var r = childRoles[i];
15210 -1 if (owns(node, virtualNode, r) || ariaOwns(ownedElements, r)) {
-1 21998 var index, length = childRoles.length, missing = [], ownedElements = idrefs(node, 'aria-owns');
-1 21999 for (index = 0; index < length; index++) {
-1 22000 var childRole = childRoles[index];
-1 22001 if (owns(node, virtualNode, childRole) || ariaOwns(ownedElements, childRole)) {
15211 22002 if (!all) {
15212 22003 return null;
15213 22004 }
15214 22005 } else {
15215 22006 if (all) {
15216 -1 missing.push(r);
-1 22007 missing.push(childRole);
15217 22008 }
15218 22009 }
15219 22010 }
15220 22011 if (role === 'combobox') {
15221 22012 var textboxIndex = missing.indexOf('textbox');
15222 22013 var textTypeInputs = [ 'text', 'search', 'email', 'url', 'tel' ];
15223 -1 if (textboxIndex >= 0 && node.nodeName.toUpperCase() === 'INPUT' && textTypeInputs.includes(node.type)) {
-1 22014 if (textboxIndex >= 0 && node.nodeName.toUpperCase() === 'INPUT' && textTypeInputs.includes(node.type) || owns(node, virtualNode, 'searchbox') || ariaOwns(ownedElements, 'searchbox')) {
15224 22015 missing.splice(textboxIndex, 1);
15225 22016 }
15226 22017 var listboxIndex = missing.indexOf('listbox');
@@ -15237,6 +22028,12 @@ module.exports = {
15237 22028 }
15238 22029 return null;
15239 22030 }
-1 22031 function hasDecendantWithRole(node) {
-1 22032 return node.children && node.children.some(function(child) {
-1 22033 var role = axe.commons.aria.getRole(child);
-1 22034 return ![ 'presentation', 'none', null ].includes(role) || hasDecendantWithRole(child);
-1 22035 });
-1 22036 }
15240 22037 var role = node.getAttribute('role');
15241 22038 var required = requiredOwned(role);
15242 22039 if (!required) {
@@ -15253,14 +22050,14 @@ module.exports = {
15253 22050 return true;
15254 22051 }
15255 22052 this.data(missing);
15256 -1 if (reviewEmpty.includes(role)) {
-1 22053 if (reviewEmpty.includes(role) && !hasContentVirtual(virtualNode, false, true) && !hasDecendantWithRole(virtualNode) && idrefs(node, 'aria-owns').length === 0) {
15257 22054 return undefined;
15258 22055 } else {
15259 22056 return false;
15260 22057 }
15261 22058 },
15262 22059 options: {
15263 -1 reviewEmpty: [ 'listbox' ]
-1 22060 reviewEmpty: [ 'doc-bibliography', 'doc-endnotes', 'grid', 'list', 'listbox', 'table', 'tablist', 'tree', 'treegrid', 'rowgroup' ]
15264 22061 }
15265 22062 }, {
15266 22063 id: 'aria-required-parent',
@@ -15295,7 +22092,7 @@ module.exports = {
15295 22092 if (element.getAttribute('id')) {
15296 22093 var id = axe.utils.escapeSelector(element.getAttribute('id'));
15297 22094 var doc = axe.commons.dom.getRootNode(element);
15298 -1 o = doc.querySelector('[aria-owns~=' + id + ']');
-1 22095 o = doc.querySelector('[aria-owns~='.concat(id, ']'));
15299 22096 if (o) {
15300 22097 owners.push(o);
15301 22098 }
@@ -15311,7 +22108,7 @@ module.exports = {
15311 22108 var owners = getAriaOwners(node);
15312 22109 if (owners) {
15313 22110 for (var i = 0, l = owners.length; i < l; i++) {
15314 -1 missingParents = getMissingContext(axe.utils.getNodeFromTree(axe._tree[0], owners[i]), missingParents, true);
-1 22111 missingParents = getMissingContext(axe.utils.getNodeFromTree(owners[i]), missingParents, true);
15315 22112 if (!missingParents) {
15316 22113 return true;
15317 22114 }
@@ -15326,14 +22123,14 @@ module.exports = {
15326 22123 var nodeName = node.nodeName.toUpperCase();
15327 22124 var lookupTable = axe.commons.aria.lookupTable;
15328 22125 var role = axe.commons.aria.getRole(node);
15329 -1 var unsupportedAttrs = Array.from(node.attributes).filter(function(_ref2) {
-1 22126 var unsupportedAttrs = Array.from(axe.utils.getNodeAttributes(node)).filter(function(_ref2) {
15330 22127 var name = _ref2.name;
15331 22128 var attribute = lookupTable.attributes[name];
15332 22129 if (!axe.commons.aria.validateAttr(name)) {
15333 22130 return false;
15334 22131 }
15335 22132 var unsupported = attribute.unsupported;
15336 -1 if ((typeof unsupported === 'undefined' ? 'undefined' : _typeof(unsupported)) !== 'object') {
-1 22133 if (_typeof(unsupported) !== 'object') {
15337 22134 return !!unsupported;
15338 22135 }
15339 22136 var isException = axe.commons.matches(node, unsupported.exceptions);
@@ -15363,18 +22160,36 @@ module.exports = {
15363 22160 id: 'aria-valid-attr-value',
15364 22161 evaluate: function evaluate(node, options, virtualNode, context) {
15365 22162 options = Array.isArray(options) ? options : [];
15366 -1 var invalid = [], aria = /^aria-/;
15367 -1 var attr, attrName, attrs = node.attributes;
-1 22163 var needsReview = [];
-1 22164 var invalid = [];
-1 22165 var aria = /^aria-/;
-1 22166 var attrs = axe.utils.getNodeAttributes(node);
15368 22167 var skipAttrs = [ 'aria-errormessage' ];
15369 -1 for (var i = 0, l = attrs.length; i < l; i++) {
15370 -1 attr = attrs[i];
15371 -1 attrName = attr.name;
15372 -1 if (!skipAttrs.includes(attrName)) {
15373 -1 if (options.indexOf(attrName) === -1 && aria.test(attrName) && !axe.commons.aria.validateAttrValue(node, attrName)) {
15374 -1 invalid.push(attrName + '="' + attr.nodeValue + '"');
-1 22168 var preChecks = {
-1 22169 'aria-controls': function ariaControls() {
-1 22170 return node.getAttribute('aria-expanded') !== 'false' && node.getAttribute('aria-selected') !== 'false';
-1 22171 },
-1 22172 'aria-owns': function ariaOwns() {
-1 22173 return node.getAttribute('aria-expanded') !== 'false';
-1 22174 },
-1 22175 'aria-describedby': function ariaDescribedby() {
-1 22176 if (!axe.commons.aria.validateAttrValue(node, 'aria-describedby')) {
-1 22177 needsReview.push('aria-describedby="'.concat(node.getAttribute('aria-describedby'), '"'));
15375 22178 }
-1 22179 return;
-1 22180 }
-1 22181 };
-1 22182 for (var i = 0, l = attrs.length; i < l; i++) {
-1 22183 var attr = attrs[i];
-1 22184 var attrName = attr.name;
-1 22185 if (!skipAttrs.includes(attrName) && options.indexOf(attrName) === -1 && aria.test(attrName) && (preChecks[attrName] ? preChecks[attrName]() : true) && !axe.commons.aria.validateAttrValue(node, attrName)) {
-1 22186 invalid.push(''.concat(attrName, '="').concat(attr.nodeValue, '"'));
15376 22187 }
15377 22188 }
-1 22189 if (needsReview.length) {
-1 22190 this.data(needsReview);
-1 22191 return undefined;
-1 22192 }
15378 22193 if (invalid.length) {
15379 22194 this.data(invalid);
15380 22195 return false;
@@ -15387,7 +22202,7 @@ module.exports = {
15387 22202 evaluate: function evaluate(node, options, virtualNode, context) {
15388 22203 options = Array.isArray(options) ? options : [];
15389 22204 var invalid = [], aria = /^aria-/;
15390 -1 var attr, attrs = node.attributes;
-1 22205 var attr, attrs = axe.utils.getNodeAttributes(node);
15391 22206 for (var i = 0, l = attrs.length; i < l; i++) {
15392 22207 attr = attrs[i].name;
15393 22208 if (options.indexOf(attr) === -1 && aria.test(attr) && !axe.commons.aria.validateAttr(attr)) {
@@ -15441,21 +22256,21 @@ module.exports = {
15441 22256 }, {
15442 22257 id: 'color-contrast',
15443 22258 evaluate: function evaluate(node, options, virtualNode, context) {
15444 -1 var _axe$commons6 = axe.commons, dom = _axe$commons6.dom, color = _axe$commons6.color, text = _axe$commons6.text;
-1 22259 var _axe$commons7 = axe.commons, dom = _axe$commons7.dom, color = _axe$commons7.color, text = _axe$commons7.text;
15445 22260 if (!dom.isVisible(node, false)) {
15446 22261 return true;
15447 22262 }
15448 22263 var noScroll = !!(options || {}).noScroll;
15449 22264 var bgNodes = [];
15450 22265 var bgColor = color.getBackgroundColor(node, bgNodes, noScroll);
15451 -1 var fgColor = color.getForegroundColor(node, noScroll);
-1 22266 var fgColor = color.getForegroundColor(node, noScroll, bgColor);
15452 22267 var nodeStyle = window.getComputedStyle(node);
15453 22268 var fontSize = parseFloat(nodeStyle.getPropertyValue('font-size'));
15454 22269 var fontWeight = nodeStyle.getPropertyValue('font-weight');
15455 22270 var bold = [ 'bold', 'bolder', '600', '700', '800', '900' ].indexOf(fontWeight) !== -1;
15456 22271 var cr = color.hasValidContrastRatio(bgColor, fgColor, fontSize, bold);
15457 22272 var truncatedResult = Math.floor(cr.contrastRatio * 100) / 100;
15458 -1 var missing = void 0;
-1 22273 var missing;
15459 22274 if (bgColor === null) {
15460 22275 missing = color.incompleteData.get('bgColor');
15461 22276 }
@@ -15470,7 +22285,7 @@ module.exports = {
15470 22285 fgColor: fgColor ? fgColor.toHexString() : undefined,
15471 22286 bgColor: bgColor ? bgColor.toHexString() : undefined,
15472 22287 contrastRatio: cr ? truncatedResult : undefined,
15473 -1 fontSize: (fontSize * 72 / 96).toFixed(1) + 'pt',
-1 22288 fontSize: ''.concat((fontSize * 72 / 96).toFixed(1), 'pt (').concat(fontSize, 'px)'),
15474 22289 fontWeight: bold ? 'bold' : 'normal',
15475 22290 missingData: missing,
15476 22291 expectedContrastRatio: cr.expectedContrastRatio + ':1'
@@ -15490,7 +22305,7 @@ module.exports = {
15490 22305 }, {
15491 22306 id: 'link-in-text-block',
15492 22307 evaluate: function evaluate(node, options, virtualNode, context) {
15493 -1 var _axe$commons7 = axe.commons, color = _axe$commons7.color, dom = _axe$commons7.dom;
-1 22308 var _axe$commons8 = axe.commons, color = _axe$commons8.color, dom = _axe$commons8.dom;
15494 22309 function getContrast(color1, color2) {
15495 22310 var c1lum = color1.getRelativeLuminance();
15496 22311 var c2lum = color2.getRelativeLuminance();
@@ -15532,7 +22347,7 @@ module.exports = {
15532 22347 nodeColor = color.getBackgroundColor(node);
15533 22348 parentColor = color.getBackgroundColor(parentBlock);
15534 22349 if (!nodeColor || !parentColor || getContrast(nodeColor, parentColor) >= 3) {
15535 -1 var reason = void 0;
-1 22350 var reason;
15536 22351 if (!nodeColor || !parentColor) {
15537 22352 reason = axe.commons.color.incompleteData.get('bgColor');
15538 22353 } else {
@@ -15551,7 +22366,7 @@ module.exports = {
15551 22366 }, {
15552 22367 id: 'autocomplete-appropriate',
15553 22368 evaluate: function evaluate(node, options, virtualNode, context) {
15554 -1 if (node.nodeName.toUpperCase() !== 'INPUT') {
-1 22369 if (virtualNode.props.nodeName !== 'input') {
15555 22370 return true;
15556 22371 }
15557 22372 var number = [ 'text', 'search', 'number' ];
@@ -15574,7 +22389,7 @@ module.exports = {
15574 22389 photo: url,
15575 22390 impp: url
15576 22391 };
15577 -1 if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {
-1 22392 if (_typeof(options) === 'object') {
15578 22393 Object.keys(options).forEach(function(key) {
15579 22394 if (!allowedTypesMap[key]) {
15580 22395 allowedTypesMap[key] = [];
@@ -15582,7 +22397,7 @@ module.exports = {
15582 22397 allowedTypesMap[key] = allowedTypesMap[key].concat(options[key]);
15583 22398 });
15584 22399 }
15585 -1 var autocomplete = node.getAttribute('autocomplete');
-1 22400 var autocomplete = virtualNode.attr('autocomplete');
15586 22401 var autocompleteTerms = autocomplete.split(/\s+/g).map(function(term) {
15587 22402 return term.toLowerCase();
15588 22403 });
@@ -15591,7 +22406,7 @@ module.exports = {
15591 22406 return true;
15592 22407 }
15593 22408 var allowedTypes = allowedTypesMap[purposeTerm];
15594 -1 var type = node.hasAttribute('type') ? axe.commons.text.sanitize(node.getAttribute('type')).toLowerCase() : 'text';
-1 22409 var type = virtualNode.hasAttr('type') ? axe.commons.text.sanitize(virtualNode.attr('type')).toLowerCase() : 'text';
15595 22410 type = axe.utils.validInputTypes().includes(type) ? type : 'text';
15596 22411 if (typeof allowedTypes === 'undefined') {
15597 22412 return type === 'text';
@@ -15601,7 +22416,7 @@ module.exports = {
15601 22416 }, {
15602 22417 id: 'autocomplete-valid',
15603 22418 evaluate: function evaluate(node, options, virtualNode, context) {
15604 -1 var autocomplete = node.getAttribute('autocomplete') || '';
-1 22419 var autocomplete = virtualNode.attr('autocomplete') || '';
15605 22420 return axe.commons.text.isValidAutocomplete(autocomplete, options);
15606 22421 }
15607 22422 }, {
@@ -15707,11 +22522,12 @@ module.exports = {
15707 22522 }
15708 22523 return false;
15709 22524 });
15710 -1 }
-1 22525 },
-1 22526 deprecated: true
15711 22527 }, {
15712 22528 id: 'group-labelledby',
15713 22529 evaluate: function evaluate(node, options, virtualNode, context) {
15714 -1 var _axe$commons8 = axe.commons, dom = _axe$commons8.dom, text = _axe$commons8.text;
-1 22530 var _axe$commons9 = axe.commons, dom = _axe$commons9.dom, text = _axe$commons9.text;
15715 22531 var type = axe.utils.escapeSelector(node.type);
15716 22532 var name = axe.utils.escapeSelector(node.name);
15717 22533 var doc = dom.getRootNode(node);
@@ -15719,7 +22535,7 @@ module.exports = {
15719 22535 name: node.name,
15720 22536 type: node.type
15721 22537 };
15722 -1 var matchingNodes = Array.from(doc.querySelectorAll('input[type="' + type + '"][name="' + name + '"]'));
-1 22538 var matchingNodes = Array.from(doc.querySelectorAll('input[type="'.concat(type, '"][name="').concat(name, '"]')));
15723 22539 if (matchingNodes.length <= 1) {
15724 22540 this.data(data);
15725 22541 return true;
@@ -15776,7 +22592,8 @@ module.exports = {
15776 22592 }
15777 22593 return false;
15778 22594 });
15779 -1 }
-1 22595 },
-1 22596 deprecated: true
15780 22597 }, {
15781 22598 id: 'accesskeys',
15782 22599 evaluate: function evaluate(node, options, virtualNode, context) {
@@ -15806,6 +22623,18 @@ module.exports = {
15806 22623 });
15807 22624 }
15808 22625 }, {
-1 22626 id: 'focusable-content',
-1 22627 evaluate: function evaluate(node, options, virtualNode, context) {
-1 22628 var tabbableElements = virtualNode.tabbableElements;
-1 22629 if (!tabbableElements) {
-1 22630 return false;
-1 22631 }
-1 22632 var tabbableContentElements = tabbableElements.filter(function(el) {
-1 22633 return el !== virtualNode;
-1 22634 });
-1 22635 return tabbableContentElements.length > 0;
-1 22636 }
-1 22637 }, {
15809 22638 id: 'focusable-disabled',
15810 22639 evaluate: function evaluate(node, options, virtualNode, context) {
15811 22640 var elementsThatCanBeDisabled = [ 'BUTTON', 'FIELDSET', 'INPUT', 'SELECT', 'TEXTAREA' ];
@@ -15825,6 +22654,14 @@ module.exports = {
15825 22654 return relatedNodes.length === 0;
15826 22655 }
15827 22656 }, {
-1 22657 id: 'focusable-element',
-1 22658 evaluate: function evaluate(node, options, virtualNode, context) {
-1 22659 var isFocusable = virtualNode.isFocusable;
-1 22660 var tabIndex = parseInt(virtualNode.actualNode.getAttribute('tabindex'), 10);
-1 22661 tabIndex = !isNaN(tabIndex) ? tabIndex : null;
-1 22662 return tabIndex ? isFocusable && tabIndex >= 0 : isFocusable;
-1 22663 }
-1 22664 }, {
15828 22665 id: 'focusable-no-name',
15829 22666 evaluate: function evaluate(node, options, virtualNode, context) {
15830 22667 var tabIndex = node.getAttribute('tabindex'), inFocusOrder = axe.commons.dom.isFocusable(node) && tabIndex > -1;
@@ -15989,28 +22826,33 @@ module.exports = {
15989 22826 }, {
15990 22827 id: 'tabindex',
15991 22828 evaluate: function evaluate(node, options, virtualNode, context) {
15992 -1 return node.tabIndex <= 0;
-1 22829 var tabIndex = parseInt(node.getAttribute('tabindex'), 10);
-1 22830 return isNaN(tabIndex) ? true : tabIndex <= 0;
15993 22831 }
15994 22832 }, {
15995 22833 id: 'alt-space-value',
15996 22834 evaluate: function evaluate(node, options, virtualNode, context) {
15997 -1 var validAttrValue = /^\s+$/.test(node.getAttribute('alt'));
15998 -1 return node.hasAttribute('alt') && validAttrValue;
-1 22835 var alt = virtualNode.attr('alt');
-1 22836 var isOnlySpace = /^\s+$/;
-1 22837 return typeof alt === 'string' && isOnlySpace.test(alt);
15999 22838 }
16000 22839 }, {
16001 22840 id: 'duplicate-img-label',
16002 22841 evaluate: function evaluate(node, options, virtualNode, context) {
16003 -1 var text = axe.commons.text.visibleVirtual(virtualNode, true).toLowerCase();
16004 -1 if (text === '') {
-1 22842 var _axe$commons10 = axe.commons, aria = _axe$commons10.aria, text = _axe$commons10.text, dom = _axe$commons10.dom;
-1 22843 if ([ 'none', 'presentation' ].includes(aria.getRole(node))) {
16005 22844 return false;
16006 22845 }
16007 -1 var images = axe.utils.querySelectorAll(virtualNode, 'img').filter(function(_ref5) {
16008 -1 var actualNode = _ref5.actualNode;
16009 -1 return axe.commons.dom.isVisible(actualNode) && ![ 'none', 'presentation' ].includes(actualNode.getAttribute('role'));
16010 -1 });
16011 -1 return images.some(function(img) {
16012 -1 return text === axe.commons.text.accessibleTextVirtual(img).toLowerCase();
16013 -1 });
-1 22846 var parent = dom.findUpVirtual(virtualNode, 'button, [role="button"], a[href], p, li, td, th');
-1 22847 if (!parent) {
-1 22848 return false;
-1 22849 }
-1 22850 var parentVNode = axe.utils.getNodeFromTree(parent);
-1 22851 var visibleText = text.visibleVirtual(parentVNode, true).toLowerCase();
-1 22852 if (visibleText === '') {
-1 22853 return false;
-1 22854 }
-1 22855 return visibleText === text.accessibleTextVirtual(virtualNode).toLowerCase();
16014 22856 }
16015 22857 }, {
16016 22858 id: 'explicit-label',
@@ -16018,7 +22860,7 @@ module.exports = {
16018 22860 if (node.getAttribute('id')) {
16019 22861 var root = axe.commons.dom.getRootNode(node);
16020 22862 var id = axe.utils.escapeSelector(node.getAttribute('id'));
16021 -1 var label = root.querySelector('label[for="' + id + '"]');
-1 22863 var label = root.querySelector('label[for="'.concat(id, '"]'));
16022 22864 if (label) {
16023 22865 if (!axe.commons.dom.isVisible(label)) {
16024 22866 return true;
@@ -16054,7 +22896,7 @@ module.exports = {
16054 22896 if (node.getAttribute('id')) {
16055 22897 var root = axe.commons.dom.getRootNode(node);
16056 22898 var id = axe.utils.escapeSelector(node.getAttribute('id'));
16057 -1 var label = root.querySelector('label[for="' + id + '"]');
-1 22899 var label = root.querySelector('label[for="'.concat(id, '"]'));
16058 22900 if (label && !axe.commons.dom.isVisible(label, true)) {
16059 22901 var name = axe.commons.text.accessibleTextVirtual(virtualNode).trim();
16060 22902 var isNameEmpty = name === '';
@@ -16066,7 +22908,7 @@ module.exports = {
16066 22908 }, {
16067 22909 id: 'implicit-label',
16068 22910 evaluate: function evaluate(node, options, virtualNode, context) {
16069 -1 var _axe$commons9 = axe.commons, dom = _axe$commons9.dom, text = _axe$commons9.text;
-1 22911 var _axe$commons11 = axe.commons, dom = _axe$commons11.dom, text = _axe$commons11.text;
16070 22912 var label = dom.findUpVirtual(virtualNode, 'label');
16071 22913 if (label) {
16072 22914 return !!text.accessibleText(label, {
@@ -16079,11 +22921,21 @@ module.exports = {
16079 22921 id: 'label-content-name-mismatch',
16080 22922 evaluate: function evaluate(node, options, virtualNode, context) {
16081 22923 var text = axe.commons.text;
-1 22924 var _ref5 = options || {}, pixelThreshold = _ref5.pixelThreshold, occuranceThreshold = _ref5.occuranceThreshold;
16082 22925 var accText = text.accessibleText(node).toLowerCase();
16083 22926 if (text.isHumanInterpretable(accText) < 1) {
16084 22927 return undefined;
16085 22928 }
16086 -1 var visibleText = text.sanitize(text.visibleVirtual(virtualNode)).toLowerCase();
-1 22929 var textVNodes = text.visibleTextNodes(virtualNode);
-1 22930 var nonLigatureText = textVNodes.filter(function(textVNode) {
-1 22931 return !text.isIconLigature(textVNode, pixelThreshold, occuranceThreshold);
-1 22932 }).map(function(textVNode) {
-1 22933 return textVNode.actualNode.nodeValue;
-1 22934 }).join('');
-1 22935 var visibleText = text.sanitize(nonLigatureText).toLowerCase();
-1 22936 if (!visibleText) {
-1 22937 return true;
-1 22938 }
16087 22939 if (text.isHumanInterpretable(visibleText) < 1) {
16088 22940 if (isStringContained(visibleText, accText)) {
16089 22941 return true;
@@ -16107,18 +22959,22 @@ module.exports = {
16107 22959 });
16108 22960 return text.sanitize(noUnicodeStr);
16109 22961 }
-1 22962 },
-1 22963 options: {
-1 22964 pixelThreshold: .1,
-1 22965 occuranceThreshold: 3
16110 22966 }
16111 22967 }, {
16112 22968 id: 'multiple-label',
16113 22969 evaluate: function evaluate(node, options, virtualNode, context) {
16114 22970 var id = axe.utils.escapeSelector(node.getAttribute('id'));
16115 -1 var labels = Array.from(document.querySelectorAll('label[for="' + id + '"]'));
16116 22971 var parent = node.parentNode;
-1 22972 var root = axe.commons.dom.getRootNode(node);
-1 22973 root = root.documentElement || root;
-1 22974 var labels = Array.from(root.querySelectorAll('label[for="'.concat(id, '"]')));
16117 22975 if (labels.length) {
16118 -1 labels = labels.filter(function(label, index) {
16119 -1 if (index === 0 && !axe.commons.dom.isVisible(label, true) || axe.commons.dom.isVisible(label, true)) {
16120 -1 return label;
16121 -1 }
-1 22976 labels = labels.filter(function(label) {
-1 22977 return axe.commons.dom.isVisible(label);
16122 22978 });
16123 22979 }
16124 22980 while (parent) {
@@ -16128,7 +22984,17 @@ module.exports = {
16128 22984 parent = parent.parentNode;
16129 22985 }
16130 22986 this.relatedNodes(labels);
16131 -1 return labels.length > 1;
-1 22987 if (labels.length > 1) {
-1 22988 var ATVisibleLabels = labels.filter(function(label) {
-1 22989 return axe.commons.dom.isVisible(label, true);
-1 22990 });
-1 22991 if (ATVisibleLabels.length > 1) {
-1 22992 return undefined;
-1 22993 }
-1 22994 var labelledby = axe.commons.dom.idrefs(node, 'aria-labelledby');
-1 22995 return !labelledby.includes(ATVisibleLabels[0]) ? undefined : false;
-1 22996 }
-1 22997 return false;
16132 22998 }
16133 22999 }, {
16134 23000 id: 'title-only',
@@ -16137,6 +23003,36 @@ module.exports = {
16137 23003 return !labelText && !!(node.getAttribute('title') || node.getAttribute('aria-describedby'));
16138 23004 }
16139 23005 }, {
-1 23006 id: 'landmark-is-unique',
-1 23007 evaluate: function evaluate(node, options, virtualNode, context) {
-1 23008 var role = axe.commons.aria.getRole(node);
-1 23009 var accessibleText = axe.commons.text.accessibleTextVirtual(virtualNode);
-1 23010 accessibleText = accessibleText ? accessibleText.toLowerCase() : null;
-1 23011 this.data({
-1 23012 role: role,
-1 23013 accessibleText: accessibleText
-1 23014 });
-1 23015 this.relatedNodes([ node ]);
-1 23016 return true;
-1 23017 },
-1 23018 after: function after(results, options) {
-1 23019 var uniqueLandmarks = [];
-1 23020 return results.filter(function(currentResult) {
-1 23021 var findMatch = function findMatch(someResult) {
-1 23022 return currentResult.data.role === someResult.data.role && currentResult.data.accessibleText === someResult.data.accessibleText;
-1 23023 };
-1 23024 var matchedResult = uniqueLandmarks.find(findMatch);
-1 23025 if (matchedResult) {
-1 23026 matchedResult.result = false;
-1 23027 matchedResult.relatedNodes.push(currentResult.relatedNodes[0]);
-1 23028 return false;
-1 23029 }
-1 23030 uniqueLandmarks.push(currentResult);
-1 23031 currentResult.relatedNodes = [];
-1 23032 return true;
-1 23033 });
-1 23034 }
-1 23035 }, {
16140 23036 id: 'has-lang',
16141 23037 evaluate: function evaluate(node, options, virtualNode, context) {
16142 23038 return !!(node.getAttribute('lang') || node.getAttribute('xml:lang') || '').trim();
@@ -16207,6 +23103,7 @@ module.exports = {
16207 23103 return true;
16208 23104 }
16209 23105 if (parentRole && axe.commons.aria.isValidRole(parentRole)) {
-1 23106 this.data('roleNotValid');
16210 23107 return false;
16211 23108 }
16212 23109 return [ 'UL', 'OL' ].includes(parentTagName);
@@ -16214,7 +23111,7 @@ module.exports = {
16214 23111 }, {
16215 23112 id: 'only-dlitems',
16216 23113 evaluate: function evaluate(node, options, virtualNode, context) {
16217 -1 var _axe$commons10 = axe.commons, dom = _axe$commons10.dom, aria = _axe$commons10.aria;
-1 23114 var _axe$commons12 = axe.commons, dom = _axe$commons12.dom, aria = _axe$commons12.aria;
16218 23115 var ALLOWED_ROLES = [ 'definition', 'term', 'list' ];
16219 23116 var base = {
16220 23117 badNodes: [],
@@ -16370,7 +23267,7 @@ module.exports = {
16370 23267 }, {
16371 23268 id: 'css-orientation-lock',
16372 23269 evaluate: function evaluate(node, options, virtualNode, context) {
16373 -1 var _ref10 = context || {}, _ref10$cssom = _ref10.cssom, cssom = _ref10$cssom === undefined ? undefined : _ref10$cssom;
-1 23270 var _ref10 = context || {}, _ref10$cssom = _ref10.cssom, cssom = _ref10$cssom === void 0 ? undefined : _ref10$cssom;
16374 23271 if (!cssom || !cssom.length) {
16375 23272 return undefined;
16376 23273 }
@@ -16402,7 +23299,7 @@ module.exports = {
16402 23299 }
16403 23300 var orientationRules = mediaRules.filter(function(r) {
16404 23301 var cssText = r.cssText;
16405 -1 return /orientation:\s+landscape/i.test(cssText) || /orientation:\s+portrait/i.test(cssText);
-1 23302 return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
16406 23303 });
16407 23304 if (!orientationRules || !orientationRules.length) {
16408 23305 return;
@@ -16418,7 +23315,7 @@ module.exports = {
16418 23315 if (cssRule.style.length <= 0) {
16419 23316 return;
16420 23317 }
16421 -1 var transformStyleValue = cssRule.style.transform || false;
-1 23318 var transformStyleValue = cssRule.style.transform || cssRule.style.webkitTransform || cssRule.style.msTransform || false;
16422 23319 if (!transformStyleValue) {
16423 23320 return;
16424 23321 }
@@ -16646,23 +23543,13 @@ module.exports = {
16646 23543 }, {
16647 23544 id: 'region',
16648 23545 evaluate: function evaluate(node, options, virtualNode, context) {
16649 -1 var _axe$commons11 = axe.commons, dom = _axe$commons11.dom, aria = _axe$commons11.aria;
16650 -1 function getSkiplink(virtualNode) {
16651 -1 var firstLink = axe.utils.querySelectorAll(virtualNode, 'a[href]')[0];
16652 -1 if (firstLink && axe.commons.dom.getElementByReference(firstLink.actualNode, 'href')) {
16653 -1 return firstLink.actualNode;
16654 -1 }
16655 -1 }
16656 -1 var skipLink = getSkiplink(virtualNode);
-1 23546 var _axe$commons13 = axe.commons, dom = _axe$commons13.dom, aria = _axe$commons13.aria;
16657 23547 var landmarkRoles = aria.getRolesByType('landmark');
16658 23548 var implicitLandmarks = landmarkRoles.reduce(function(arr, role) {
16659 23549 return arr.concat(aria.implicitNodes(role));
16660 23550 }, []).filter(function(r) {
16661 23551 return r !== null;
16662 23552 });
16663 -1 function isSkipLink(vNode) {
16664 -1 return skipLink && skipLink === vNode.actualNode;
16665 -1 }
16666 23553 function isRegion(virtualNode) {
16667 23554 var node = virtualNode.actualNode;
16668 23555 var explicitRole = axe.commons.aria.getRole(node, {
@@ -16687,7 +23574,7 @@ module.exports = {
16687 23574 }
16688 23575 function findRegionlessElms(virtualNode) {
16689 23576 var node = virtualNode.actualNode;
16690 -1 if (isRegion(virtualNode) || isSkipLink(virtualNode) || !dom.isVisible(node, true)) {
-1 23577 if (isRegion(virtualNode) || dom.isSkipLink(virtualNode.actualNode) && dom.getElementByReference(virtualNode.actualNode, 'href') || !dom.isVisible(node, true)) {
16691 23578 return [];
16692 23579 } else if (dom.hasContent(node, true)) {
16693 23580 return [ node ];
@@ -16741,7 +23628,7 @@ module.exports = {
16741 23628 return true;
16742 23629 }
16743 23630 var root = axe.commons.dom.getRootNode(node);
16744 -1 var matchingNodes = Array.from(root.querySelectorAll('[id="' + axe.utils.escapeSelector(id) + '"]')).filter(function(foundNode) {
-1 23631 var matchingNodes = Array.from(root.querySelectorAll('[id="'.concat(axe.utils.escapeSelector(id), '"]'))).filter(function(foundNode) {
16745 23632 return foundNode !== node;
16746 23633 });
16747 23634 if (matchingNodes.length) {
@@ -16768,7 +23655,7 @@ module.exports = {
16768 23655 return true;
16769 23656 }
16770 23657 var root = axe.commons.dom.getRootNode(node);
16771 -1 var matchingNodes = Array.from(root.querySelectorAll('[id="' + axe.utils.escapeSelector(id) + '"]')).filter(function(foundNode) {
-1 23658 var matchingNodes = Array.from(root.querySelectorAll('[id="'.concat(axe.utils.escapeSelector(id), '"]'))).filter(function(foundNode) {
16772 23659 return foundNode !== node;
16773 23660 });
16774 23661 if (matchingNodes.length) {
@@ -16795,7 +23682,7 @@ module.exports = {
16795 23682 return true;
16796 23683 }
16797 23684 var root = axe.commons.dom.getRootNode(node);
16798 -1 var matchingNodes = Array.from(root.querySelectorAll('[id="' + axe.utils.escapeSelector(id) + '"]')).filter(function(foundNode) {
-1 23685 var matchingNodes = Array.from(root.querySelectorAll('[id="'.concat(axe.utils.escapeSelector(id), '"]'))).filter(function(foundNode) {
16799 23686 return foundNode !== node;
16800 23687 });
16801 23688 if (matchingNodes.length) {
@@ -16817,21 +23704,36 @@ module.exports = {
16817 23704 }, {
16818 23705 id: 'aria-label',
16819 23706 evaluate: function evaluate(node, options, virtualNode, context) {
16820 -1 var _axe$commons12 = axe.commons, text = _axe$commons12.text, aria = _axe$commons12.aria;
-1 23707 var _axe$commons14 = axe.commons, text = _axe$commons14.text, aria = _axe$commons14.aria;
16821 23708 return !!text.sanitize(aria.arialabelText(node));
16822 23709 }
16823 23710 }, {
16824 23711 id: 'aria-labelledby',
16825 23712 evaluate: function evaluate(node, options, virtualNode, context) {
16826 -1 var _axe$commons13 = axe.commons, text = _axe$commons13.text, aria = _axe$commons13.aria;
-1 23713 var _axe$commons15 = axe.commons, text = _axe$commons15.text, aria = _axe$commons15.aria;
16827 23714 return !!text.sanitize(aria.arialabelledbyText(node));
16828 23715 }
16829 23716 }, {
-1 23717 id: 'avoid-inline-spacing',
-1 23718 evaluate: function evaluate(node, options, virtualNode, context) {
-1 23719 var inlineSpacingCssProperties = [ 'line-height', 'letter-spacing', 'word-spacing' ];
-1 23720 var overriddenProperties = inlineSpacingCssProperties.filter(function(property) {
-1 23721 if (node.style.getPropertyPriority(property) === 'important') {
-1 23722 return property;
-1 23723 }
-1 23724 });
-1 23725 if (overriddenProperties.length > 0) {
-1 23726 this.data(overriddenProperties);
-1 23727 return false;
-1 23728 }
-1 23729 return true;
-1 23730 }
-1 23731 }, {
16830 23732 id: 'button-has-visible-text',
16831 23733 evaluate: function evaluate(node, options, virtualNode, context) {
16832 23734 var nodeName = node.nodeName.toUpperCase();
16833 23735 var role = node.getAttribute('role');
16834 -1 var label = void 0;
-1 23736 var label;
16835 23737 if (nodeName === 'BUTTON' || role === 'button' && nodeName !== 'INPUT') {
16836 23738 label = axe.commons.text.accessibleTextVirtual(virtualNode);
16837 23739 this.data(label);
@@ -16849,13 +23751,16 @@ module.exports = {
16849 23751 }, {
16850 23752 id: 'exists',
16851 23753 evaluate: function evaluate(node, options, virtualNode, context) {
16852 -1 return true;
-1 23754 return undefined;
16853 23755 }
16854 23756 }, {
16855 23757 id: 'has-alt',
16856 23758 evaluate: function evaluate(node, options, virtualNode, context) {
16857 -1 var nn = node.nodeName.toLowerCase();
16858 -1 return node.hasAttribute('alt') && (nn === 'img' || nn === 'input' || nn === 'area');
-1 23759 var nodeName = virtualNode.props.nodeName;
-1 23760 if (![ 'img', 'input', 'area' ].includes(nodeName)) {
-1 23761 return false;
-1 23762 }
-1 23763 return virtualNode.hasAttr('alt');
16859 23764 }
16860 23765 }, {
16861 23766 id: 'has-visible-text',
@@ -16870,7 +23775,7 @@ module.exports = {
16870 23775 }, {
16871 23776 id: 'non-empty-alt',
16872 23777 evaluate: function evaluate(node, options, virtualNode, context) {
16873 -1 var label = node.getAttribute('alt');
-1 23778 var label = virtualNode.attr('alt');
16874 23779 return !!(label ? axe.commons.text.sanitize(label).trim() : '');
16875 23780 }
16876 23781 }, {
@@ -16975,9 +23880,10 @@ module.exports = {
16975 23880 var tableUtils = axe.commons.table;
16976 23881 var badCells = [];
16977 23882 var cells = tableUtils.getAllCells(node);
-1 23883 var tableGrid = tableUtils.toGrid(node);
16978 23884 cells.forEach(function(cell) {
16979 23885 if (axe.commons.dom.hasContent(cell) && tableUtils.isDataCell(cell) && !axe.commons.aria.label(cell)) {
16980 -1 var hasHeaders = tableUtils.getHeaders(cell).some(function(header) {
-1 23886 var hasHeaders = tableUtils.getHeaders(cell, tableGrid).some(function(header) {
16981 23887 return header !== null && !!axe.commons.dom.hasContent(header);
16982 23888 });
16983 23889 if (!hasHeaders) {
@@ -17060,27 +23966,28 @@ module.exports = {
17060 23966 return cell.nodeName.toUpperCase() === 'TH' || [ 'rowheader', 'columnheader' ].indexOf(cell.getAttribute('role')) !== -1;
17061 23967 });
17062 23968 var tableGrid = tableUtils.toGrid(node);
17063 -1 var out = headers.reduce(function(res, header) {
-1 23969 var out = true;
-1 23970 headers.forEach(function(header) {
17064 23971 if (header.getAttribute('id') && reffedHeaders.includes(header.getAttribute('id'))) {
17065 -1 return !res ? res : true;
-1 23972 return;
17066 23973 }
17067 -1 var hasCell = false;
17068 23974 var pos = tableUtils.getCellPosition(header, tableGrid);
-1 23975 var hasCell = false;
17069 23976 if (tableUtils.isColumnHeader(header)) {
17070 -1 hasCell = tableUtils.traverse('down', pos, tableGrid).reduce(function(out, cell) {
17071 -1 return out || axe.commons.dom.hasContent(cell) && !tableUtils.isColumnHeader(cell);
17072 -1 }, false);
-1 23977 hasCell = tableUtils.traverse('down', pos, tableGrid).find(function(cell) {
-1 23978 return !tableUtils.isColumnHeader(cell);
-1 23979 });
17073 23980 }
17074 23981 if (!hasCell && tableUtils.isRowHeader(header)) {
17075 -1 hasCell = tableUtils.traverse('right', pos, tableGrid).reduce(function(out, cell) {
17076 -1 return out || axe.commons.dom.hasContent(cell) && !tableUtils.isRowHeader(cell);
17077 -1 }, false);
-1 23982 hasCell = tableUtils.traverse('right', pos, tableGrid).find(function(cell) {
-1 23983 return !tableUtils.isRowHeader(cell);
-1 23984 });
17078 23985 }
17079 23986 if (!hasCell) {
17080 23987 checkResult.relatedNodes(header);
17081 23988 }
17082 -1 return res && hasCell;
17083 -1 }, true);
-1 23989 out = out && hasCell;
-1 23990 });
17084 23991 return out ? true : undefined;
17085 23992 }
17086 23993 }, {
@@ -17301,14 +24208,7 @@ module.exports = {
17301 24208 'aria-roledescription': {
17302 24209 type: 'string',
17303 24210 allowEmpty: true,
17304 -1 unsupported: {
17305 -1 exceptions: [ 'button', {
17306 -1 nodeName: 'input',
17307 -1 properties: {
17308 -1 type: [ 'button', 'checkbox', 'image', 'radio', 'reset', 'submit' ]
17309 -1 }
17310 -1 }, 'img', 'select', 'summary' ]
17311 -1 }
-1 24211 unsupported: false
17312 24212 },
17313 24213 'aria-rowcount': {
17314 24214 type: 'int',
@@ -17477,7 +24377,7 @@ module.exports = {
17477 24377 allowedElements: [ {
17478 24378 nodeName: 'input',
17479 24379 properties: {
17480 -1 type: 'text'
-1 24380 type: [ 'text', 'search', 'tel', 'url', 'email' ]
17481 24381 }
17482 24382 } ]
17483 24383 },
@@ -17637,7 +24537,9 @@ module.exports = {
17637 24537 attributes: {
17638 24538 allowed: [ 'aria-expanded', 'aria-errormessage' ]
17639 24539 },
17640 -1 owned: null,
-1 24540 owned: {
-1 24541 one: [ 'doc-biblioentry' ]
-1 24542 },
17641 24543 nameFrom: [ 'author' ],
17642 24544 context: null,
17643 24545 unsupported: false,
@@ -17751,7 +24653,9 @@ module.exports = {
17751 24653 attributes: {
17752 24654 allowed: [ 'aria-expanded', 'aria-errormessage' ]
17753 24655 },
17754 -1 owned: [ 'doc-endnote' ],
-1 24656 owned: {
-1 24657 one: [ 'doc-endnote' ]
-1 24658 },
17755 24659 namefrom: [ 'author' ],
17756 24660 context: null,
17757 24661 unsupported: false,
@@ -18025,7 +24929,7 @@ module.exports = {
18025 24929 },
18026 24930 figure: {
18027 24931 type: 'structure',
18028 -1 unsupported: true
-1 24932 unsupported: false
18029 24933 },
18030 24934 form: {
18031 24935 type: 'landmark',
@@ -18141,7 +25045,7 @@ module.exports = {
18141 25045 listbox: {
18142 25046 type: 'composite',
18143 25047 attributes: {
18144 -1 allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-required', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
-1 25048 allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
18145 25049 },
18146 25050 owned: {
18147 25051 all: [ 'option' ]
@@ -18227,7 +25131,9 @@ module.exports = {
18227 25131 attributes: {
18228 25132 allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
18229 25133 },
18230 -1 owned: null,
-1 25134 owned: {
-1 25135 one: [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ]
-1 25136 },
18231 25137 nameFrom: [ 'author' ],
18232 25138 context: null,
18233 25139 unsupported: false,
@@ -18396,8 +25302,7 @@ module.exports = {
18396 25302 radio: {
18397 25303 type: 'widget',
18398 25304 attributes: {
18399 -1 allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-required', 'aria-errormessage' ],
18400 -1 required: [ 'aria-checked' ]
-1 25305 allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-required', 'aria-errormessage', 'aria-checked' ]
18401 25306 },
18402 25307 owned: null,
18403 25308 nameFrom: [ 'author', 'contents' ],
@@ -18473,7 +25378,7 @@ module.exports = {
18473 25378 all: [ 'row' ]
18474 25379 },
18475 25380 nameFrom: [ 'author', 'contents' ],
18476 -1 context: [ 'grid', 'table' ],
-1 25381 context: [ 'grid', 'table', 'treegrid' ],
18477 25382 implicit: [ 'tbody', 'thead', 'tfoot' ],
18478 25383 unsupported: false
18479 25384 },
@@ -18491,8 +25396,8 @@ module.exports = {
18491 25396 scrollbar: {
18492 25397 type: 'widget',
18493 25398 attributes: {
18494 -1 required: [ 'aria-controls', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin' ],
18495 -1 allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-errormessage' ]
-1 25399 required: [ 'aria-controls', 'aria-valuenow' ],
-1 25400 allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ]
18496 25401 },
18497 25402 owned: null,
18498 25403 nameFrom: [ 'author' ],
@@ -18559,8 +25464,8 @@ module.exports = {
18559 25464 slider: {
18560 25465 type: 'widget',
18561 25466 attributes: {
18562 -1 allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-readonly', 'aria-errormessage' ],
18563 -1 required: [ 'aria-valuenow', 'aria-valuemax', 'aria-valuemin' ]
-1 25467 allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-readonly', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ],
-1 25468 required: [ 'aria-valuenow' ]
18564 25469 },
18565 25470 owned: null,
18566 25471 nameFrom: [ 'author' ],
@@ -18571,8 +25476,8 @@ module.exports = {
18571 25476 spinbutton: {
18572 25477 type: 'widget',
18573 25478 attributes: {
18574 -1 allowed: [ 'aria-valuetext', 'aria-required', 'aria-readonly', 'aria-errormessage' ],
18575 -1 required: [ 'aria-valuenow', 'aria-valuemax', 'aria-valuemin' ]
-1 25479 allowed: [ 'aria-valuetext', 'aria-required', 'aria-readonly', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ],
-1 25480 required: [ 'aria-valuenow' ]
18576 25481 },
18577 25482 owned: null,
18578 25483 nameFrom: [ 'author' ],
@@ -18802,14 +25707,6 @@ module.exports = {
18802 25707 type: [ 'color', 'data', 'datatime', 'file', 'hidden', 'month', 'number', 'password', 'range', 'reset', 'submit', 'time', 'week' ]
18803 25708 }
18804 25709 }, {
18805 -1 nodeName: 'input',
18806 -1 attributes: {
18807 -1 list: isNull
18808 -1 },
18809 -1 properties: {
18810 -1 type: [ 'email', 'search', 'tel', 'url' ]
18811 -1 }
18812 -1 }, {
18813 25710 nodeName: 'link',
18814 25711 attributes: {
18815 25712 href: isNotNull
@@ -18841,6 +25738,11 @@ module.exports = {
18841 25738 href: isNull
18842 25739 }
18843 25740 }, {
-1 25741 nodeName: 'img',
-1 25742 attributes: {
-1 25743 alt: isNull
-1 25744 }
-1 25745 }, {
18844 25746 nodeName: [ 'abbr', 'address', 'canvas', 'div', 'p', 'pre', 'blockquote', 'ins', 'del', 'output', 'span', 'table', 'tbody', 'thead', 'tfoot', 'td', 'em', 'strong', 'small', 's', 'cite', 'q', 'dfn', 'abbr', 'time', 'code', 'var', 'samp', 'kbd', 'sub', 'sup', 'i', 'b', 'u', 'mark', 'ruby', 'rt', 'rp', 'bdi', 'bdo', 'br', 'wbr', 'th', 'tr' ]
18845 25747 } ];
18846 25748 lookupTable.evaluateRoleForElement = {
@@ -18866,11 +25768,17 @@ module.exports = {
18866 25768 return out;
18867 25769 },
18868 25770 IMG: function IMG(_ref16) {
18869 -1 var node = _ref16.node, out = _ref16.out;
18870 -1 if (node.alt) {
18871 -1 return !out;
-1 25771 var node = _ref16.node, role = _ref16.role, out = _ref16.out;
-1 25772 switch (node.alt) {
-1 25773 case null:
-1 25774 return out;
-1 25775
-1 25776 case '':
-1 25777 return role === 'presentation' || role === 'none';
-1 25778
-1 25779 default:
-1 25780 return role !== 'presentation' && role !== 'none';
18872 25781 }
18873 -1 return out;
18874 25782 },
18875 25783 INPUT: function INPUT(_ref17) {
18876 25784 var node = _ref17.node, role = _ref17.role, out = _ref17.out;
@@ -18891,6 +25799,12 @@ module.exports = {
18891 25799 case 'text':
18892 25800 return role === 'combobox' || role === 'searchbox' || role === 'spinbutton';
18893 25801
-1 25802 case 'tel':
-1 25803 case 'url':
-1 25804 case 'search':
-1 25805 case 'email':
-1 25806 return role === 'combobox';
-1 25807
18894 25808 default:
18895 25809 return false;
18896 25810 }
@@ -18928,11 +25842,13 @@ module.exports = {
18928 25842 }
18929 25843 };
18930 25844 lookupTable.rolesOfType = {
18931 -1 widget: [ 'button', 'checkbox', 'dialog', 'gridcell', 'heading', 'link', 'log', 'marquee', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'scrollbar', 'slider', 'spinbutton', 'status', 'switch', 'tab', 'tabpanel', 'textbox', 'timer', 'tooltip', 'tree', 'treeitem' ]
-1 25845 widget: [ 'button', 'checkbox', 'dialog', 'gridcell', 'link', 'log', 'marquee', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'scrollbar', 'slider', 'spinbutton', 'status', 'switch', 'tab', 'tabpanel', 'textbox', 'timer', 'tooltip', 'tree', 'treeitem' ]
18932 25846 };
18933 25847 var color = {};
18934 25848 commons.color = color;
18935 25849 var dom = commons.dom = {};
-1 25850 var forms = {};
-1 25851 commons.forms = forms;
18936 25852 function matches(node, definition) {
18937 25853 return matches.fromDefinition(node, definition);
18938 25854 }
@@ -18966,7 +25882,7 @@ module.exports = {
18966 25882 if (!accessibleName) {
18967 25883 return accessibleNameAdd;
18968 25884 } else {
18969 -1 return accessibleName + ' ' + accessibleNameAdd;
-1 25885 return ''.concat(accessibleName, ' ').concat(accessibleNameAdd);
18970 25886 }
18971 25887 }, '');
18972 25888 };
@@ -18993,7 +25909,7 @@ module.exports = {
18993 25909 }
18994 25910 if (node.hasAttributeNS('http://www.idpf.org/2007/ops', 'type')) {
18995 25911 var epubRoles = axe.utils.tokenList(node.getAttributeNS('http://www.idpf.org/2007/ops', 'type').toLowerCase()).map(function(role) {
18996 -1 return 'doc-' + role;
-1 25912 return 'doc-'.concat(role);
18997 25913 });
18998 25914 roles = roles.concat(epubRoles);
18999 25915 }
@@ -19028,7 +25944,7 @@ module.exports = {
19028 25944 }
19029 25945 return dom.idrefs(actualNode, 'aria-owns').reduce(function(ownedElms, element) {
19030 25946 if (element) {
19031 -1 var virtualNode = axe.utils.getNodeFromTree(axe._tree[0], element);
-1 25947 var virtualNode = axe.utils.getNodeFromTree(element);
19032 25948 ownedElms.push(virtualNode);
19033 25949 }
19034 25950 return ownedElms;
@@ -19056,44 +25972,43 @@ module.exports = {
19056 25972 }
19057 25973 return explicitRole || null;
19058 25974 };
19059 -1 function findDomNode(node, functor) {
19060 -1 if (functor(node)) {
19061 -1 return node;
19062 -1 }
19063 -1 for (var i = 0; i < node.children.length; i++) {
19064 -1 var out = findDomNode(node.children[i], functor);
19065 -1 if (out) {
19066 -1 return out;
-1 25975 var idRefsRegex = /^idrefs?$/;
-1 25976 function cacheIdRefs(node, refAttrs) {
-1 25977 if (node.hasAttribute) {
-1 25978 var idRefs = axe._cache.get('idRefs');
-1 25979 if (node.nodeName.toUpperCase() === 'LABEL' && node.hasAttribute('for')) {
-1 25980 idRefs[node.getAttribute('for')] = true;
-1 25981 }
-1 25982 for (var i = 0; i < refAttrs.length; ++i) {
-1 25983 var attr = refAttrs[i];
-1 25984 if (!node.hasAttribute(attr)) {
-1 25985 continue;
-1 25986 }
-1 25987 var attrValue = node.getAttribute(attr);
-1 25988 var tokens = axe.utils.tokenList(attrValue);
-1 25989 for (var k = 0; k < tokens.length; ++k) {
-1 25990 idRefs[tokens[k]] = true;
-1 25991 }
19067 25992 }
19068 25993 }
-1 25994 for (var _i = 0; _i < node.children.length; _i++) {
-1 25995 cacheIdRefs(node.children[_i], refAttrs);
-1 25996 }
19069 25997 }
19070 25998 aria.isAccessibleRef = function isAccessibleRef(node) {
19071 25999 node = node.actualNode || node;
19072 26000 var root = dom.getRootNode(node);
19073 26001 root = root.documentElement || root;
19074 26002 var id = node.id;
19075 -1 var refAttrs = Object.keys(aria.lookupTable.attributes).filter(function(attr) {
19076 -1 var type = aria.lookupTable.attributes[attr].type;
19077 -1 return /^idrefs?$/.test(type);
19078 -1 });
19079 -1 var refElm = findDomNode(root, function(elm) {
19080 -1 if (elm.nodeType !== 1) {
19081 -1 return;
19082 -1 }
19083 -1 if (elm.nodeName.toUpperCase() === 'LABEL' && elm.getAttribute('for') === id) {
19084 -1 return true;
19085 -1 }
19086 -1 return refAttrs.filter(function(attr) {
19087 -1 return elm.hasAttribute(attr);
19088 -1 }).some(function(attr) {
19089 -1 var attrValue = elm.getAttribute(attr);
19090 -1 if (aria.lookupTable.attributes[attr].type === 'idref') {
19091 -1 return attrValue === id;
19092 -1 }
19093 -1 return axe.utils.tokenList(attrValue).includes(id);
-1 26003 if (!axe._cache.get('idRefs')) {
-1 26004 axe._cache.set('idRefs', {});
-1 26005 var refAttrs = Object.keys(aria.lookupTable.attributes).filter(function(attr) {
-1 26006 var type = aria.lookupTable.attributes[attr].type;
-1 26007 return idRefsRegex.test(type);
19094 26008 });
19095 -1 });
19096 -1 return typeof refElm !== 'undefined';
-1 26009 cacheIdRefs(root, refAttrs);
-1 26010 }
-1 26011 return axe._cache.get('idRefs')[id] === true;
19097 26012 };
19098 26013 aria.isAriaRoleAllowedOnElement = function isAriaRoleAllowedOnElement(node, role) {
19099 26014 var nodeName = node.nodeName.toUpperCase();
@@ -19124,11 +26039,11 @@ module.exports = {
19124 26039 };
19125 26040 aria.labelVirtual = function(_ref25) {
19126 26041 var actualNode = _ref25.actualNode;
19127 -1 var ref = void 0, candidate = void 0;
-1 26042 var ref, candidate;
19128 26043 if (actualNode.getAttribute('aria-labelledby')) {
19129 26044 ref = dom.idrefs(actualNode, 'aria-labelledby');
19130 26045 candidate = ref.map(function(thing) {
19131 -1 var vNode = axe.utils.getNodeFromTree(axe._tree[0], thing);
-1 26046 var vNode = axe.utils.getNodeFromTree(thing);
19132 26047 return vNode ? text.visibleVirtual(vNode, true) : '';
19133 26048 }).join(' ').trim();
19134 26049 if (candidate) {
@@ -19145,7 +26060,7 @@ module.exports = {
19145 26060 return null;
19146 26061 };
19147 26062 aria.label = function(node) {
19148 -1 node = axe.utils.getNodeFromTree(axe._tree[0], node);
-1 26063 node = axe.utils.getNodeFromTree(node);
19149 26064 return aria.labelVirtual(node);
19150 26065 };
19151 26066 aria.namedFromContents = function namedFromContents(node) {
@@ -19165,7 +26080,7 @@ module.exports = {
19165 26080 return !roleDef || [ 'presentation', 'none' ].includes(role);
19166 26081 };
19167 26082 aria.isValidRole = function(role) {
19168 -1 var _ref27 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref27.allowAbstract, _ref27$flagUnsupporte = _ref27.flagUnsupported, flagUnsupported = _ref27$flagUnsupporte === undefined ? false : _ref27$flagUnsupporte;
-1 26083 var _ref27 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref27.allowAbstract, _ref27$flagUnsupporte = _ref27.flagUnsupported, flagUnsupported = _ref27$flagUnsupporte === void 0 ? false : _ref27$flagUnsupporte;
19169 26084 var roleDefinition = aria.lookupTable.role[role];
19170 26085 var isRoleUnsupported = roleDefinition ? roleDefinition.unsupported : false;
19171 26086 if (!roleDefinition || flagUnsupported && isRoleUnsupported) {
@@ -19253,7 +26168,7 @@ module.exports = {
19253 26168 if (!availableImplicitRoles.length) {
19254 26169 return null;
19255 26170 }
19256 -1 var nodeAttributes = node.attributes;
-1 26171 var nodeAttributes = axe.utils.getNodeAttributes(node);
19257 26172 var ariaAttributes = [];
19258 26173 for (var i = 0, j = nodeAttributes.length; i < j; i++) {
19259 26174 var attr = nodeAttributes[i];
@@ -19304,6 +26219,20 @@ module.exports = {
19304 26219 return /^[-+]?[0-9]+$/.test(value);
19305 26220 }
19306 26221 };
-1 26222 color.centerPointOfRect = function centerPointOfRect(rect) {
-1 26223 if (rect.left > window.innerWidth) {
-1 26224 return undefined;
-1 26225 }
-1 26226 if (rect.top > window.innerHeight) {
-1 26227 return undefined;
-1 26228 }
-1 26229 var x = Math.min(Math.ceil(rect.left + rect.width / 2), window.innerWidth - 1);
-1 26230 var y = Math.min(Math.ceil(rect.top + rect.height / 2), window.innerHeight - 1);
-1 26231 return {
-1 26232 x: x,
-1 26233 y: y
-1 26234 };
-1 26235 };
19307 26236 color.Color = function(red, green, blue, alpha) {
19308 26237 this.red = red;
19309 26238 this.green = green;
@@ -19338,7 +26267,7 @@ module.exports = {
19338 26267 this.red = parseInt(match[1], 10);
19339 26268 this.green = parseInt(match[2], 10);
19340 26269 this.blue = parseInt(match[3], 10);
19341 -1 this.alpha = parseFloat(match[4]);
-1 26270 this.alpha = Math.round(parseFloat(match[4]) * 100) / 100;
19342 26271 return;
19343 26272 }
19344 26273 };
@@ -19381,6 +26310,22 @@ module.exports = {
19381 26310 expectedContrastRatio: expectedContrastRatio
19382 26311 };
19383 26312 };
-1 26313 color.elementHasImage = function elementHasImage(elm, style) {
-1 26314 var graphicNodes = [ 'IMG', 'CANVAS', 'OBJECT', 'IFRAME', 'VIDEO', 'SVG' ];
-1 26315 var nodeName = elm.nodeName.toUpperCase();
-1 26316 if (graphicNodes.includes(nodeName)) {
-1 26317 axe.commons.color.incompleteData.set('bgColor', 'imgNode');
-1 26318 return true;
-1 26319 }
-1 26320 style = style || window.getComputedStyle(elm);
-1 26321 var bgImageStyle = style.getPropertyValue('background-image');
-1 26322 var hasBgImage = bgImageStyle !== 'none';
-1 26323 if (hasBgImage) {
-1 26324 var hasGradient = /gradient/.test(bgImageStyle);
-1 26325 axe.commons.color.incompleteData.set('bgColor', hasGradient ? 'bgGradient' : 'bgImage');
-1 26326 }
-1 26327 return hasBgImage;
-1 26328 };
19384 26329 function _getFonts(style) {
19385 26330 return style.getPropertyValue('font-family').split(/[,;]/g).map(function(font) {
19386 26331 return font.trim().toLowerCase();
@@ -19413,155 +26358,73 @@ module.exports = {
19413 26358 return hasStyle;
19414 26359 }
19415 26360 color.elementIsDistinct = elementIsDistinct;
19416 -1 var graphicNodes = [ 'IMG', 'CANVAS', 'OBJECT', 'IFRAME', 'VIDEO', 'SVG' ];
19417 -1 function elmHasImage(elm, style) {
19418 -1 var nodeName = elm.nodeName.toUpperCase();
19419 -1 if (graphicNodes.includes(nodeName)) {
19420 -1 axe.commons.color.incompleteData.set('bgColor', 'imgNode');
19421 -1 return true;
19422 -1 }
19423 -1 style = style || window.getComputedStyle(elm);
19424 -1 var bgImageStyle = style.getPropertyValue('background-image');
19425 -1 var hasBgImage = bgImageStyle !== 'none';
19426 -1 if (hasBgImage) {
19427 -1 var hasGradient = /gradient/.test(bgImageStyle);
19428 -1 axe.commons.color.incompleteData.set('bgColor', hasGradient ? 'bgGradient' : 'bgImage');
19429 -1 }
19430 -1 return hasBgImage;
19431 -1 }
19432 -1 function getBgColor(elm, elmStyle) {
19433 -1 elmStyle = elmStyle || window.getComputedStyle(elm);
19434 -1 var bgColor = new color.Color();
19435 -1 bgColor.parseRgbString(elmStyle.getPropertyValue('background-color'));
19436 -1 if (bgColor.alpha !== 0) {
19437 -1 var opacity = elmStyle.getPropertyValue('opacity');
19438 -1 bgColor.alpha = bgColor.alpha * opacity;
19439 -1 }
19440 -1 return bgColor;
19441 -1 }
19442 -1 function contentOverlapping(targetElement, bgNode) {
19443 -1 var targetRect = targetElement.getClientRects()[0];
19444 -1 var obscuringElements = dom.shadowElementsFromPoint(targetRect.left, targetRect.top);
19445 -1 if (obscuringElements) {
19446 -1 for (var i = 0; i < obscuringElements.length; i++) {
19447 -1 if (obscuringElements[i] !== targetElement && obscuringElements[i] === bgNode) {
19448 -1 return true;
-1 26361 color.getBackgroundColor = function getBackgroundColor(elm) {
-1 26362 var bgElms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
-1 26363 var noScroll = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
-1 26364 if (noScroll !== true) {
-1 26365 var clientHeight = elm.getBoundingClientRect().height;
-1 26366 var alignToTop = clientHeight - 2 >= window.innerHeight * 2;
-1 26367 elm.scrollIntoView(alignToTop);
-1 26368 var center, scrollParent;
-1 26369 do {
-1 26370 var rect = elm.getBoundingClientRect();
-1 26371 var x = 'x' in rect ? rect.x : rect.left;
-1 26372 center = x + rect.width / 2;
-1 26373 if (center < 0) {
-1 26374 scrollParent = getScrollParent(elm);
-1 26375 scrollParent.scrollLeft = 0;
19449 26376 }
19450 -1 }
-1 26377 } while (center < 0 && scrollParent !== document.documentElement);
19451 26378 }
19452 -1 return false;
19453 -1 }
19454 -1 function calculateObscuringAlpha(elmIndex, elmStack, originalElm) {
19455 -1 var totalAlpha = 0;
19456 -1 if (elmIndex > 0) {
19457 -1 for (var i = elmIndex - 1; i >= 0; i--) {
19458 -1 var bgElm = elmStack[i];
19459 -1 var bgElmStyle = window.getComputedStyle(bgElm);
19460 -1 var bgColor = getBgColor(bgElm, bgElmStyle);
19461 -1 if (bgColor.alpha && contentOverlapping(originalElm, bgElm)) {
19462 -1 totalAlpha += bgColor.alpha;
19463 -1 } else {
19464 -1 elmStack.splice(i, 1);
19465 -1 }
-1 26379 var bgColors = [];
-1 26380 var elmStack = color.getBackgroundStack(elm);
-1 26381 (elmStack || []).some(function(bgElm) {
-1 26382 var bgElmStyle = window.getComputedStyle(bgElm);
-1 26383 var bgColor = color.getOwnBackgroundColor(bgElmStyle);
-1 26384 if (elmPartiallyObscured(elm, bgElm, bgColor) || color.elementHasImage(bgElm, bgElmStyle)) {
-1 26385 bgColors = null;
-1 26386 bgElms.push(bgElm);
-1 26387 return true;
19466 26388 }
19467 -1 }
19468 -1 return totalAlpha;
19469 -1 }
19470 -1 function elmPartiallyObscured(elm, bgElm, bgColor) {
19471 -1 var obscured = elm !== bgElm && !dom.visuallyContains(elm, bgElm) && bgColor.alpha !== 0;
19472 -1 if (obscured) {
19473 -1 axe.commons.color.incompleteData.set('bgColor', 'elmPartiallyObscured');
19474 -1 }
19475 -1 return obscured;
19476 -1 }
19477 -1 function includeMissingElements(elmStack, elm) {
19478 -1 var elementMap = {
19479 -1 TD: [ 'TR', 'TBODY' ],
19480 -1 TH: [ 'TR', 'THEAD' ],
19481 -1 INPUT: [ 'LABEL' ]
19482 -1 };
19483 -1 var tagArray = elmStack.map(function(elm) {
19484 -1 return elm.nodeName;
19485 -1 });
19486 -1 var bgNodes = elmStack;
19487 -1 for (var candidate in elementMap) {
19488 -1 if (tagArray.includes(candidate)) {
19489 -1 for (var candidateIndex in elementMap[candidate]) {
19490 -1 if (candidate.hasOwnProperty(candidateIndex)) {
19491 -1 var ancestorMatch = axe.commons.dom.findUp(elm, elementMap[candidate][candidateIndex]);
19492 -1 if (ancestorMatch && elmStack.indexOf(ancestorMatch) === -1) {
19493 -1 var overlaps = axe.commons.dom.visuallyOverlaps(elm.getBoundingClientRect(), ancestorMatch);
19494 -1 if (overlaps) {
19495 -1 bgNodes.splice(tagArray.indexOf(candidate) + 1, 0, ancestorMatch);
19496 -1 }
19497 -1 }
19498 -1 if (elm.nodeName === elementMap[candidate][candidateIndex] && tagArray.indexOf(elm.nodeName) === -1) {
19499 -1 bgNodes.splice(tagArray.indexOf(candidate) + 1, 0, elm);
19500 -1 }
19501 -1 }
19502 -1 }
-1 26389 if (bgColor.alpha !== 0) {
-1 26390 bgElms.push(bgElm);
-1 26391 bgColors.push(bgColor);
-1 26392 return bgColor.alpha === 1;
-1 26393 } else {
-1 26394 return false;
19503 26395 }
-1 26396 });
-1 26397 if (bgColors !== null && elmStack !== null) {
-1 26398 bgColors.push(new color.Color(255, 255, 255, 1));
-1 26399 var colors = bgColors.reduce(color.flattenColors);
-1 26400 return colors;
19504 26401 }
19505 -1 return bgNodes;
19506 -1 }
19507 -1 function sortPageBackground(elmStack) {
19508 -1 var bodyIndex = elmStack.indexOf(document.body);
19509 -1 var bgNodes = elmStack;
19510 -1 if (bodyIndex > 1 && !elmHasImage(document.documentElement) && getBgColor(document.documentElement).alpha === 0) {
19511 -1 bgNodes.splice(bodyIndex, 1);
19512 -1 bgNodes.splice(elmStack.indexOf(document.documentElement), 1);
19513 -1 bgNodes.push(document.body);
19514 -1 }
19515 -1 return bgNodes;
19516 -1 }
19517 -1 color.getCoords = function(rect) {
19518 -1 var x = void 0, y = void 0;
19519 -1 if (rect.left > window.innerWidth) {
19520 -1 return;
19521 -1 }
19522 -1 if (rect.top > window.innerHeight) {
19523 -1 return;
19524 -1 }
19525 -1 x = Math.min(Math.ceil(rect.left + rect.width / 2), window.innerWidth - 1);
19526 -1 y = Math.min(Math.ceil(rect.top + rect.height / 2), window.innerHeight - 1);
19527 -1 return {
19528 -1 x: x,
19529 -1 y: y
19530 -1 };
-1 26402 return null;
19531 26403 };
19532 -1 color.getRectStack = function(elm) {
19533 -1 var boundingCoords = color.getCoords(elm.getBoundingClientRect());
19534 -1 if (!boundingCoords) {
-1 26404 color.getBackgroundStack = function getBackgroundStack(elm) {
-1 26405 var elmStack = color.filteredRectStack(elm);
-1 26406 if (elmStack === null) {
19535 26407 return null;
19536 26408 }
19537 -1 var boundingStack = dom.shadowElementsFromPoint(boundingCoords.x, boundingCoords.y);
19538 -1 var rects = Array.from(elm.getClientRects());
19539 -1 if (!rects || rects.length <= 1) {
19540 -1 return [ boundingStack ];
19541 -1 }
19542 -1 var filteredArr = rects.filter(function(rect) {
19543 -1 return rect.width && rect.width > 0;
19544 -1 }).map(function(rect) {
19545 -1 var coords = color.getCoords(rect);
19546 -1 if (coords) {
19547 -1 return dom.shadowElementsFromPoint(coords.x, coords.y);
19548 -1 }
19549 -1 });
19550 -1 if (filteredArr.some(function(stack) {
19551 -1 return stack === undefined;
19552 -1 })) {
-1 26409 elmStack = includeMissingElements(elmStack, elm);
-1 26410 elmStack = dom.reduceToElementsBelowFloating(elmStack, elm);
-1 26411 elmStack = sortPageBackground(elmStack);
-1 26412 var elmIndex = elmStack.indexOf(elm);
-1 26413 if (calculateObscuringElement(elmIndex, elmStack, elm)) {
-1 26414 axe.commons.color.incompleteData.set('bgColor', 'bgOverlap');
19553 26415 return null;
19554 26416 }
19555 -1 filteredArr.splice(0, 0, boundingStack);
19556 -1 return filteredArr;
-1 26417 return elmIndex !== -1 ? elmStack : null;
19557 26418 };
19558 -1 color.filteredRectStack = function(elm) {
-1 26419 color.filteredRectStack = function filteredRectStack(elm) {
19559 26420 var rectStack = color.getRectStack(elm);
19560 26421 if (rectStack && rectStack.length === 1) {
19561 26422 return rectStack[0];
19562 -1 } else if (rectStack && rectStack.length > 1) {
-1 26423 }
-1 26424 if (rectStack && rectStack.length > 1) {
19563 26425 var boundingStack = rectStack.shift();
19564 -1 var isSame = void 0;
-1 26426 var isSame;
-1 26427 includeMissingElements(boundingStack, elm);
19565 26428 rectStack.forEach(function(rectList, index) {
19566 26429 if (index === 0) {
19567 26430 return;
@@ -19576,73 +26439,160 @@ module.exports = {
19576 26439 return null;
19577 26440 }
19578 26441 return rectStack[0];
19579 -1 } else {
19580 -1 axe.commons.color.incompleteData.set('bgColor', 'outsideViewport');
19581 -1 return null;
19582 26442 }
-1 26443 axe.commons.color.incompleteData.set('bgColor', 'outsideViewport');
-1 26444 return null;
19583 26445 };
19584 -1 color.getBackgroundStack = function(elm) {
19585 -1 var elmStack = color.filteredRectStack(elm);
19586 -1 if (elmStack === null) {
-1 26446 color.getRectStack = function(elm) {
-1 26447 var boundingCoords = axe.commons.color.centerPointOfRect(elm.getBoundingClientRect());
-1 26448 if (!boundingCoords) {
19587 26449 return null;
19588 26450 }
19589 -1 elmStack = includeMissingElements(elmStack, elm);
19590 -1 elmStack = dom.reduceToElementsBelowFloating(elmStack, elm);
19591 -1 elmStack = sortPageBackground(elmStack);
19592 -1 var elmIndex = elmStack.indexOf(elm);
19593 -1 if (calculateObscuringAlpha(elmIndex, elmStack, elm) >= .99) {
19594 -1 axe.commons.color.incompleteData.set('bgColor', 'bgOverlap');
-1 26451 var boundingStack = dom.shadowElementsFromPoint(boundingCoords.x, boundingCoords.y);
-1 26452 var rects = Array.from(elm.getClientRects());
-1 26453 if (!rects || rects.length <= 1) {
-1 26454 return [ boundingStack ];
-1 26455 }
-1 26456 var filteredArr = rects.filter(function(rect) {
-1 26457 return rect.width && rect.width > 0;
-1 26458 }).map(function(rect) {
-1 26459 var coords = axe.commons.color.centerPointOfRect(rect);
-1 26460 if (coords) {
-1 26461 return dom.shadowElementsFromPoint(coords.x, coords.y);
-1 26462 }
-1 26463 });
-1 26464 if (filteredArr.some(function(stack) {
-1 26465 return stack === undefined;
-1 26466 })) {
19595 26467 return null;
19596 26468 }
19597 -1 return elmIndex !== -1 ? elmStack : null;
-1 26469 filteredArr.splice(0, 0, boundingStack);
-1 26470 return filteredArr;
19598 26471 };
19599 -1 color.getBackgroundColor = function(elm) {
19600 -1 var bgElms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
19601 -1 var noScroll = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
19602 -1 if (noScroll !== true) {
19603 -1 var clientHeight = elm.getBoundingClientRect().height;
19604 -1 var alignToTop = clientHeight - 2 >= window.innerHeight * 2;
19605 -1 elm.scrollIntoView(alignToTop);
-1 26472 function sortPageBackground(elmStack) {
-1 26473 var bodyIndex = elmStack.indexOf(document.body);
-1 26474 var bgNodes = elmStack;
-1 26475 var sortBodyElement = bodyIndex > 1 || bodyIndex === -1;
-1 26476 if (sortBodyElement && !color.elementHasImage(document.documentElement) && color.getOwnBackgroundColor(window.getComputedStyle(document.documentElement)).alpha === 0) {
-1 26477 if (bodyIndex > 1) {
-1 26478 bgNodes.splice(bodyIndex, 1);
-1 26479 }
-1 26480 bgNodes.splice(elmStack.indexOf(document.documentElement), 1);
-1 26481 bgNodes.push(document.body);
19606 26482 }
19607 -1 var bgColors = [];
19608 -1 var elmStack = color.getBackgroundStack(elm);
19609 -1 (elmStack || []).some(function(bgElm) {
19610 -1 var bgElmStyle = window.getComputedStyle(bgElm);
19611 -1 var bgColor = getBgColor(bgElm, bgElmStyle);
19612 -1 if (elmPartiallyObscured(elm, bgElm, bgColor) || elmHasImage(bgElm, bgElmStyle)) {
19613 -1 bgColors = null;
19614 -1 bgElms.push(bgElm);
19615 -1 return true;
-1 26483 return bgNodes;
-1 26484 }
-1 26485 function includeMissingElements(elmStack, elm) {
-1 26486 var nodeName = elm.nodeName.toUpperCase();
-1 26487 var elementMap = {
-1 26488 TD: [ 'TR', 'THEAD', 'TBODY', 'TFOOT' ],
-1 26489 TH: [ 'TR', 'THEAD', 'TBODY', 'TFOOT' ],
-1 26490 INPUT: [ 'LABEL' ]
-1 26491 };
-1 26492 var tagArray = elmStack.map(function(elm) {
-1 26493 return elm.nodeName.toUpperCase();
-1 26494 });
-1 26495 var bgNodes = elmStack;
-1 26496 for (var candidate in elementMap) {
-1 26497 if (tagArray.includes(candidate)) {
-1 26498 for (var candidateIndex = 0; candidateIndex < elementMap[candidate].length; candidateIndex++) {
-1 26499 var ancestorMatch = axe.commons.dom.findUp(elm, elementMap[candidate][candidateIndex]);
-1 26500 if (ancestorMatch && elmStack.indexOf(ancestorMatch) === -1) {
-1 26501 var overlaps = axe.commons.dom.visuallyOverlaps(elm.getBoundingClientRect(), ancestorMatch);
-1 26502 if (overlaps) {
-1 26503 bgNodes.splice(tagArray.indexOf(candidate) + 1, 0, ancestorMatch);
-1 26504 }
-1 26505 }
-1 26506 if (nodeName === elementMap[candidate][candidateIndex] && tagArray.indexOf(nodeName) === -1) {
-1 26507 bgNodes.splice(tagArray.indexOf(candidate) + 1, 0, elm);
-1 26508 }
-1 26509 }
19616 26510 }
19617 -1 if (bgColor.alpha !== 0) {
19618 -1 bgElms.push(bgElm);
19619 -1 bgColors.push(bgColor);
19620 -1 return bgColor.alpha === 1;
19621 -1 } else {
19622 -1 return false;
-1 26511 }
-1 26512 return bgNodes;
-1 26513 }
-1 26514 function elmPartiallyObscured(elm, bgElm, bgColor) {
-1 26515 var obscured = elm !== bgElm && !dom.visuallyContains(elm, bgElm) && bgColor.alpha !== 0;
-1 26516 if (obscured) {
-1 26517 axe.commons.color.incompleteData.set('bgColor', 'elmPartiallyObscured');
-1 26518 }
-1 26519 return obscured;
-1 26520 }
-1 26521 function calculateObscuringElement(elmIndex, elmStack, originalElm) {
-1 26522 if (elmIndex > 0) {
-1 26523 for (var i = elmIndex - 1; i >= 0; i--) {
-1 26524 var bgElm = elmStack[i];
-1 26525 if (contentOverlapping(originalElm, bgElm)) {
-1 26526 return true;
-1 26527 } else {
-1 26528 elmStack.splice(i, 1);
-1 26529 }
19623 26530 }
19624 -1 });
19625 -1 if (bgColors !== null && elmStack !== null) {
19626 -1 bgColors.push(new color.Color(255, 255, 255, 1));
19627 -1 var colors = bgColors.reduce(color.flattenColors);
19628 -1 return colors;
19629 26531 }
19630 -1 return null;
19631 -1 };
-1 26532 return false;
-1 26533 }
-1 26534 function contentOverlapping(targetElement, bgNode) {
-1 26535 var targetRect = targetElement.getClientRects()[0];
-1 26536 var obscuringElements = dom.shadowElementsFromPoint(targetRect.left, targetRect.top);
-1 26537 if (obscuringElements) {
-1 26538 for (var i = 0; i < obscuringElements.length; i++) {
-1 26539 if (obscuringElements[i] !== targetElement && obscuringElements[i] === bgNode) {
-1 26540 return true;
-1 26541 }
-1 26542 }
-1 26543 }
-1 26544 return false;
-1 26545 }
-1 26546 function getScrollParent(element, includeHidden) {
-1 26547 var style = getComputedStyle(element);
-1 26548 var excludeStaticParent = style.position === 'absolute';
-1 26549 var overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/;
-1 26550 if (style.position === 'fixed') {
-1 26551 return document.documentElement;
-1 26552 }
-1 26553 for (var parent = element; parent = parent.parentElement; ) {
-1 26554 style = getComputedStyle(parent);
-1 26555 if (excludeStaticParent && style.position === 'static') {
-1 26556 continue;
-1 26557 }
-1 26558 if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX)) {
-1 26559 return parent;
-1 26560 }
-1 26561 }
-1 26562 return document.documentElement;
-1 26563 }
19632 26564 dom.isOpaque = function(node) {
19633 26565 var style = window.getComputedStyle(node);
19634 -1 return elmHasImage(node, style) || getBgColor(node, style).alpha === 1;
-1 26566 return color.elementHasImage(node, style) || color.getOwnBackgroundColor(style).alpha === 1;
19635 26567 };
19636 -1 color.getForegroundColor = function(node, noScroll) {
-1 26568 function getOpacity(node) {
-1 26569 if (!node) {
-1 26570 return 1;
-1 26571 }
-1 26572 var vNode = axe.utils.getNodeFromTree(node);
-1 26573 if (vNode && vNode._opacity !== undefined && vNode._opacity !== null) {
-1 26574 return vNode._opacity;
-1 26575 }
-1 26576 var nodeStyle = window.getComputedStyle(node);
-1 26577 var opacity = nodeStyle.getPropertyValue('opacity');
-1 26578 var finalOpacity = opacity * getOpacity(node.parentElement);
-1 26579 if (vNode) {
-1 26580 vNode._opacity = finalOpacity;
-1 26581 }
-1 26582 return finalOpacity;
-1 26583 }
-1 26584 color.getForegroundColor = function(node, noScroll, bgColor) {
19637 26585 var nodeStyle = window.getComputedStyle(node);
19638 26586 var fgColor = new color.Color();
19639 26587 fgColor.parseRgbString(nodeStyle.getPropertyValue('color'));
19640 -1 var opacity = nodeStyle.getPropertyValue('opacity');
-1 26588 var opacity = getOpacity(node);
19641 26589 fgColor.alpha = fgColor.alpha * opacity;
19642 26590 if (fgColor.alpha === 1) {
19643 26591 return fgColor;
19644 26592 }
19645 -1 var bgColor = color.getBackgroundColor(node, [], noScroll);
-1 26593 if (!bgColor) {
-1 26594 bgColor = color.getBackgroundColor(node, [], noScroll);
-1 26595 }
19646 26596 if (bgColor === null) {
19647 26597 var reason = axe.commons.color.incompleteData.get('bgColor');
19648 26598 axe.commons.color.incompleteData.set('fgColor', reason);
@@ -19650,6 +26600,15 @@ module.exports = {
19650 26600 }
19651 26601 return color.flattenColors(fgColor, bgColor);
19652 26602 };
-1 26603 color.getOwnBackgroundColor = function getOwnBackgroundColor(elmStyle) {
-1 26604 var bgColor = new color.Color();
-1 26605 bgColor.parseRgbString(elmStyle.getPropertyValue('background-color'));
-1 26606 if (bgColor.alpha !== 0) {
-1 26607 var opacity = elmStyle.getPropertyValue('opacity');
-1 26608 bgColor.alpha = bgColor.alpha * opacity;
-1 26609 }
-1 26610 return bgColor;
-1 26611 };
19653 26612 color.incompleteData = function() {
19654 26613 var data = {};
19655 26614 return {
@@ -19687,8 +26646,8 @@ module.exports = {
19687 26646 return finalElements;
19688 26647 };
19689 26648 dom.findElmsInContext = function(_ref28) {
19690 -1 var context = _ref28.context, value = _ref28.value, attr = _ref28.attr, _ref28$elm = _ref28.elm, elm = _ref28$elm === undefined ? '' : _ref28$elm;
19691 -1 var root = void 0;
-1 26649 var context = _ref28.context, value = _ref28.value, attr = _ref28.attr, _ref28$elm = _ref28.elm, elm = _ref28$elm === void 0 ? '' : _ref28$elm;
-1 26650 var root;
19692 26651 var escapedValue = axe.utils.escapeSelector(value);
19693 26652 if (context.nodeType === 9 || context.nodeType === 11) {
19694 26653 root = context;
@@ -19698,10 +26657,10 @@ module.exports = {
19698 26657 return Array.from(root.querySelectorAll(elm + '[' + attr + '=' + escapedValue + ']'));
19699 26658 };
19700 26659 dom.findUp = function(element, target) {
19701 -1 return dom.findUpVirtual(axe.utils.getNodeFromTree(axe._tree[0], element), target);
-1 26660 return dom.findUpVirtual(axe.utils.getNodeFromTree(element), target);
19702 26661 };
19703 26662 dom.findUpVirtual = function(element, target) {
19704 -1 var parent = void 0;
-1 26663 var parent;
19705 26664 parent = element.actualNode;
19706 26665 if (!element.shadowId && typeof element.actualNode.closest === 'function') {
19707 26666 var match = element.actualNode.closest(target);
@@ -19716,6 +26675,9 @@ module.exports = {
19716 26675 parent = parent.host;
19717 26676 }
19718 26677 } while (parent && !axe.utils.matchesSelector(parent, target) && parent !== document.documentElement);
-1 26678 if (!parent) {
-1 26679 return null;
-1 26680 }
19719 26681 if (!axe.utils.matchesSelector(parent, target)) {
19720 26682 return null;
19721 26683 }
@@ -19824,14 +26786,14 @@ module.exports = {
19824 26786 });
19825 26787 }
19826 26788 }
19827 -1 dom.hasContentVirtual = function(elm, noRecursion) {
19828 -1 return hasChildTextNodes(elm) || dom.isVisualContent(elm.actualNode) || !!aria.labelVirtual(elm) || !noRecursion && elm.children.some(function(child) {
-1 26789 dom.hasContentVirtual = function(elm, noRecursion, ignoreAria) {
-1 26790 return hasChildTextNodes(elm) || dom.isVisualContent(elm.actualNode) || !ignoreAria && !!aria.labelVirtual(elm) || !noRecursion && elm.children.some(function(child) {
19829 26791 return child.actualNode.nodeType === 1 && dom.hasContentVirtual(child);
19830 26792 });
19831 26793 };
19832 -1 dom.hasContent = function hasContent(elm, noRecursion) {
19833 -1 elm = axe.utils.getNodeFromTree(axe._tree[0], elm);
19834 -1 return dom.hasContentVirtual(elm, noRecursion);
-1 26794 dom.hasContent = function hasContent(elm, noRecursion, ignoreAria) {
-1 26795 elm = axe.utils.getNodeFromTree(elm);
-1 26796 return dom.hasContentVirtual(elm, noRecursion, ignoreAria);
19835 26797 };
19836 26798 dom.idrefs = function(node, attr) {
19837 26799 'use strict';
@@ -19845,7 +26807,7 @@ module.exports = {
19845 26807 return result;
19846 26808 };
19847 26809 function focusDisabled(el) {
19848 -1 return el.disabled || dom.isHiddenWithCSS(el) && el.nodeName.toUpperCase() !== 'AREA';
-1 26810 return el.disabled || el.nodeName.toUpperCase() !== 'AREA' && dom.isHiddenWithCSS(el);
19849 26811 }
19850 26812 dom.isFocusable = function(el) {
19851 26813 'use strict';
@@ -19885,9 +26847,20 @@ module.exports = {
19885 26847 return false;
19886 26848 };
19887 26849 dom.insertedIntoFocusOrder = function(el) {
19888 -1 return el.tabIndex > -1 && dom.isFocusable(el) && !dom.isNativelyFocusable(el);
-1 26850 var tabIndex = parseInt(el.getAttribute('tabindex'), 10);
-1 26851 return tabIndex > -1 && dom.isFocusable(el) && !dom.isNativelyFocusable(el);
19889 26852 };
19890 26853 dom.isHiddenWithCSS = function isHiddenWithCSS(el, descendentVisibilityValue) {
-1 26854 var vNode = axe.utils.getNodeFromTree(el);
-1 26855 if (!vNode) {
-1 26856 return _isHiddenWithCSS(el, descendentVisibilityValue);
-1 26857 }
-1 26858 if (vNode._isHiddenWithCSS === void 0) {
-1 26859 vNode._isHiddenWithCSS = _isHiddenWithCSS(el, descendentVisibilityValue);
-1 26860 }
-1 26861 return vNode._isHiddenWithCSS;
-1 26862 };
-1 26863 function _isHiddenWithCSS(el, descendentVisibilityValue) {
19891 26864 if (el.nodeType === 9) {
19892 26865 return false;
19893 26866 }
@@ -19918,7 +26891,7 @@ module.exports = {
19918 26891 return dom.isHiddenWithCSS(parent, visibilityValue);
19919 26892 }
19920 26893 return false;
19921 -1 };
-1 26894 }
19922 26895 dom.isHTML5 = function(doc) {
19923 26896 var node = doc.doctype;
19924 26897 if (node === null) {
@@ -19943,7 +26916,7 @@ module.exports = {
19943 26916 while (parentBlock && !isBlock(parentBlock)) {
19944 26917 parentBlock = dom.getComposedParent(parentBlock);
19945 26918 }
19946 -1 return axe.utils.getNodeFromTree(axe._tree[0], parentBlock);
-1 26919 return axe.utils.getNodeFromTree(parentBlock);
19947 26920 }
19948 26921 dom.isInTextBlock = function isInTextBlock(node) {
19949 26922 if (isBlock(node)) {
@@ -19971,7 +26944,7 @@ module.exports = {
19971 26944 } else {
19972 26945 inBrBlock = 2;
19973 26946 }
19974 -1 } else if (currNode.style.display === 'none' || currNode.style.overflow === 'hidden' || ![ '', null, 'none' ].includes(currNode.style.float) || ![ '', null, 'relative' ].includes(currNode.style.position)) {
-1 26947 } else if (currNode.style.display === 'none' || currNode.style.overflow === 'hidden' || ![ '', null, 'none' ].includes(currNode.style['float']) || ![ '', null, 'relative' ].includes(currNode.style.position)) {
19975 26948 return false;
19976 26949 } else if (nodeName === 'A' && currNode.href || (currNode.getAttribute('role') || '').toLowerCase() === 'link') {
19977 26950 if (currNode === node) {
@@ -20003,7 +26976,7 @@ module.exports = {
20003 26976 return true;
20004 26977 }
20005 26978 dom.isOffscreen = function(element) {
20006 -1 var leftBoundary = void 0;
-1 26979 var leftBoundary;
20007 26980 var docElement = document.documentElement;
20008 26981 var styl = window.getComputedStyle(element);
20009 26982 var dir = window.getComputedStyle(document.body || docElement).getPropertyValue('direction');
@@ -20026,36 +26999,77 @@ module.exports = {
20026 26999 }
20027 27000 return false;
20028 27001 };
20029 -1 function isClipped(clip) {
-1 27002 var isInternalLinkRegex = /^\/?#[^/!]/;
-1 27003 dom.isSkipLink = function(element) {
-1 27004 if (!isInternalLinkRegex.test(element.getAttribute('href'))) {
-1 27005 return false;
-1 27006 }
-1 27007 var firstPageLink;
-1 27008 if (typeof axe._cache.get('firstPageLink') !== 'undefined') {
-1 27009 firstPageLink = axe._cache.get('firstPageLink');
-1 27010 } else {
-1 27011 firstPageLink = axe.utils.querySelectorAll(axe._tree, 'a:not([href^="#"]):not([href^="/#"]):not([href^="javascript"])')[0];
-1 27012 axe._cache.set('firstPageLink', firstPageLink || null);
-1 27013 }
-1 27014 if (!firstPageLink) {
-1 27015 return true;
-1 27016 }
-1 27017 return element.compareDocumentPosition(firstPageLink.actualNode) === element.DOCUMENT_POSITION_FOLLOWING;
-1 27018 };
-1 27019 var clipRegex = /rect\s*\(([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px\s*\)/;
-1 27020 var clipPathRegex = /(\w+)\((\d+)/;
-1 27021 function isClipped(style) {
20030 27022 'use strict';
20031 -1 var matches = clip.match(/rect\s*\(([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px\s*\)/);
20032 -1 if (matches && matches.length === 5) {
20033 -1 return matches[3] - matches[1] <= 0 && matches[2] - matches[4] <= 0;
-1 27023 var matchesClip = style.getPropertyValue('clip').match(clipRegex);
-1 27024 var matchesClipPath = style.getPropertyValue('clip-path').match(clipPathRegex);
-1 27025 if (matchesClip && matchesClip.length === 5) {
-1 27026 return matchesClip[3] - matchesClip[1] <= 0 && matchesClip[2] - matchesClip[4] <= 0;
-1 27027 }
-1 27028 if (matchesClipPath) {
-1 27029 var type = matchesClipPath[1];
-1 27030 var value = parseInt(matchesClipPath[2], 10);
-1 27031 switch (type) {
-1 27032 case 'inset':
-1 27033 return value >= 50;
-1 27034
-1 27035 case 'circle':
-1 27036 return value === 0;
-1 27037
-1 27038 default:
-1 27039 }
20034 27040 }
20035 27041 return false;
20036 27042 }
20037 27043 dom.isVisible = function(el, screenReader, recursed) {
20038 27044 'use strict';
20039 -1 var style, nodeName, parent;
-1 27045 var node = axe.utils.getNodeFromTree(el);
-1 27046 var cacheName = '_isVisible' + (screenReader ? 'ScreenReader' : '');
20040 27047 if (el.nodeType === 9) {
20041 27048 return true;
20042 27049 }
20043 27050 if (el.nodeType === 11) {
20044 27051 el = el.host;
20045 27052 }
20046 -1 style = window.getComputedStyle(el, null);
-1 27053 if (node && typeof node[cacheName] !== 'undefined') {
-1 27054 return node[cacheName];
-1 27055 }
-1 27056 var style = window.getComputedStyle(el, null);
20047 27057 if (style === null) {
20048 27058 return false;
20049 27059 }
20050 -1 nodeName = el.nodeName.toUpperCase();
20051 -1 if (style.getPropertyValue('display') === 'none' || [ 'STYLE', 'SCRIPT', 'NOSCRIPT', 'TEMPLATE' ].includes(nodeName) || !screenReader && isClipped(style.getPropertyValue('clip')) || !recursed && (style.getPropertyValue('visibility') === 'hidden' || !screenReader && dom.isOffscreen(el)) || screenReader && el.getAttribute('aria-hidden') === 'true') {
-1 27060 var nodeName = el.nodeName.toUpperCase();
-1 27061 if (style.getPropertyValue('display') === 'none' || [ 'STYLE', 'SCRIPT', 'NOSCRIPT', 'TEMPLATE' ].includes(nodeName) || !screenReader && isClipped(style) || !recursed && (style.getPropertyValue('visibility') === 'hidden' || !screenReader && dom.isOffscreen(el)) || screenReader && el.getAttribute('aria-hidden') === 'true') {
20052 27062 return false;
20053 27063 }
20054 -1 parent = el.assignedSlot ? el.assignedSlot : el.parentNode;
-1 27064 var parent = el.assignedSlot ? el.assignedSlot : el.parentNode;
-1 27065 var isVisible = false;
20055 27066 if (parent) {
20056 -1 return dom.isVisible(parent, screenReader, true);
-1 27067 isVisible = dom.isVisible(parent, screenReader, true);
20057 27068 }
20058 -1 return false;
-1 27069 if (node) {
-1 27070 node[cacheName] = isVisible;
-1 27071 }
-1 27072 return isVisible;
20059 27073 };
20060 27074 var visualRoles = [ 'checkbox', 'img', 'radio', 'range', 'slider', 'spinbutton', 'textbox' ];
20061 27075 dom.isVisualContent = function(element) {
@@ -20157,6 +27171,40 @@ module.exports = {
20157 27171 }
20158 27172 return true;
20159 27173 };
-1 27174 forms.isAriaCombobox = function(node) {
-1 27175 var role = axe.commons.aria.getRole(node, {
-1 27176 noImplicit: true
-1 27177 });
-1 27178 return role === 'combobox';
-1 27179 };
-1 27180 forms.isAriaListbox = function(node) {
-1 27181 var role = axe.commons.aria.getRole(node, {
-1 27182 noImplicit: true
-1 27183 });
-1 27184 return role === 'listbox';
-1 27185 };
-1 27186 var rangeRoles = [ 'progressbar', 'scrollbar', 'slider', 'spinbutton' ];
-1 27187 forms.isAriaRange = function(node) {
-1 27188 var role = axe.commons.aria.getRole(node, {
-1 27189 noImplicit: true
-1 27190 });
-1 27191 return rangeRoles.includes(role);
-1 27192 };
-1 27193 forms.isAriaTextbox = function(node) {
-1 27194 var role = axe.commons.aria.getRole(node, {
-1 27195 noImplicit: true
-1 27196 });
-1 27197 return role === 'textbox';
-1 27198 };
-1 27199 forms.isNativeSelect = function(node) {
-1 27200 var nodeName = node.nodeName.toUpperCase();
-1 27201 return nodeName === 'SELECT';
-1 27202 };
-1 27203 var nonTextInputTypes = [ 'button', 'checkbox', 'color', 'file', 'hidden', 'image', 'password', 'radio', 'reset', 'submit' ];
-1 27204 forms.isNativeTextbox = function(node) {
-1 27205 var nodeName = node.nodeName.toUpperCase();
-1 27206 return nodeName === 'TEXTAREA' || nodeName === 'INPUT' && !nonTextInputTypes.includes(node.type);
-1 27207 };
20160 27208 matches.attributes = function matchesAttributes(node, matcher) {
20161 27209 node = node.actualNode || node;
20162 27210 return matches.fromFunction(function(attrName) {
@@ -20179,7 +27227,7 @@ module.exports = {
20179 27227 }
20180 27228 return Object.keys(definition).every(function(matcherName) {
20181 27229 if (!matchers.includes(matcherName)) {
20182 -1 throw new Error('Unknown matcher type "' + matcherName + '"');
-1 27230 throw new Error('Unknown matcher type "'.concat(matcherName, '"'));
20183 27231 }
20184 27232 var matchMethod = matches[matcherName];
20185 27233 var matcher = definition[matcherName];
@@ -20187,7 +27235,7 @@ module.exports = {
20187 27235 });
20188 27236 };
20189 27237 matches.fromFunction = function matchFromFunction(getValue, matcher) {
20190 -1 var matcherType = typeof matcher === 'undefined' ? 'undefined' : _typeof(matcher);
-1 27238 var matcherType = _typeof(matcher);
20191 27239 if (matcherType !== 'object' || Array.isArray(matcher) || matcher instanceof RegExp) {
20192 27240 throw new Error('Expect matcher to be an object');
20193 27241 }
@@ -20196,7 +27244,7 @@ module.exports = {
20196 27244 });
20197 27245 };
20198 27246 matches.fromPrimative = function matchFromPrimative(someString, matcher) {
20199 -1 var matcherType = typeof matcher === 'undefined' ? 'undefined' : _typeof(matcher);
-1 27247 var matcherType = _typeof(matcher);
20200 27248 if (Array.isArray(matcher) && typeof someString !== 'undefined') {
20201 27249 return matcher.includes(someString);
20202 27250 }
@@ -20208,7 +27256,7 @@ module.exports = {
20208 27256 }
20209 27257 return matcher === someString;
20210 27258 };
20211 -1 var isXHTMLGlobal = void 0;
-1 27259 var isXHTMLGlobal;
20212 27260 matches.nodeName = function matchNodeName(node, matcher) {
20213 27261 var _ref30 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, isXHTML = _ref30.isXHTML;
20214 27262 node = node.actualNode || node;
@@ -20241,7 +27289,7 @@ module.exports = {
20241 27289 }
20242 27290 return cells;
20243 27291 };
20244 -1 table.getCellPosition = function(cell, tableGrid) {
-1 27292 table.getCellPosition = axe.utils.memoize(function(cell, tableGrid) {
20245 27293 var rowIndex, index;
20246 27294 if (!tableGrid) {
20247 27295 tableGrid = table.toGrid(dom.findUp(cell, 'table'));
@@ -20257,19 +27305,45 @@ module.exports = {
20257 27305 }
20258 27306 }
20259 27307 }
20260 -1 };
20261 -1 table.getHeaders = function(cell) {
-1 27308 });
-1 27309 function traverseForHeaders(headerType, position, tableGrid) {
-1 27310 var property = headerType === 'row' ? '_rowHeaders' : '_colHeaders';
-1 27311 var predicate = headerType === 'row' ? table.isRowHeader : table.isColumnHeader;
-1 27312 var rowEnd = headerType === 'row' ? position.y : 0;
-1 27313 var colEnd = headerType === 'row' ? 0 : position.x;
-1 27314 var headers;
-1 27315 var cells = [];
-1 27316 for (var row = position.y; row >= rowEnd && !headers; row--) {
-1 27317 for (var col = position.x; col >= colEnd; col--) {
-1 27318 var cell = tableGrid[row] ? tableGrid[row][col] : undefined;
-1 27319 if (!cell) {
-1 27320 continue;
-1 27321 }
-1 27322 var vNode = axe.utils.getNodeFromTree(cell);
-1 27323 if (vNode[property]) {
-1 27324 headers = vNode[property];
-1 27325 break;
-1 27326 }
-1 27327 cells.push(cell);
-1 27328 }
-1 27329 }
-1 27330 headers = (headers || []).concat(cells.filter(predicate));
-1 27331 cells.forEach(function(tableCell) {
-1 27332 var vNode = axe.utils.getNodeFromTree(tableCell);
-1 27333 vNode[property] = headers;
-1 27334 });
-1 27335 return headers;
-1 27336 }
-1 27337 table.getHeaders = function(cell, tableGrid) {
20262 27338 if (cell.hasAttribute('headers')) {
20263 27339 return commons.dom.idrefs(cell, 'headers');
20264 27340 }
20265 -1 var tableGrid = commons.table.toGrid(commons.dom.findUp(cell, 'table'));
-1 27341 if (!tableGrid) {
-1 27342 tableGrid = commons.table.toGrid(commons.dom.findUp(cell, 'table'));
-1 27343 }
20266 27344 var position = commons.table.getCellPosition(cell, tableGrid);
20267 -1 var rowHeaders = table.traverse('left', position, tableGrid).filter(function(cell) {
20268 -1 return table.isRowHeader(cell);
20269 -1 });
20270 -1 var colHeaders = table.traverse('up', position, tableGrid).filter(function(cell) {
20271 -1 return table.isColumnHeader(cell);
20272 -1 });
-1 27345 var rowHeaders = traverseForHeaders('row', position, tableGrid);
-1 27346 var colHeaders = traverseForHeaders('col', position, tableGrid);
20273 27347 return [].concat(rowHeaders, colHeaders).reverse();
20274 27348 };
20275 27349 table.getScope = function(cell) {
@@ -20288,7 +27362,7 @@ module.exports = {
20288 27362 return false;
20289 27363 }
20290 27364 var tableGrid = table.toGrid(dom.findUp(cell, 'table'));
20291 -1 var pos = table.getCellPosition(cell);
-1 27365 var pos = table.getCellPosition(cell, tableGrid);
20292 27366 var headerRow = tableGrid[pos.y].reduce(function(headerRow, cell) {
20293 27367 return headerRow && cell.nodeName.toUpperCase() === 'TH';
20294 27368 }, true);
@@ -20423,14 +27497,14 @@ module.exports = {
20423 27497 }
20424 27498 if (cell.getAttribute('id')) {
20425 27499 var id = axe.utils.escapeSelector(cell.getAttribute('id'));
20426 -1 return !!document.querySelector('[headers~="' + id + '"]');
-1 27500 return !!document.querySelector('[headers~="'.concat(id, '"]'));
20427 27501 }
20428 27502 return false;
20429 27503 };
20430 27504 table.isRowHeader = function(cell) {
20431 27505 return [ 'row', 'auto' ].includes(table.getScope(cell));
20432 27506 };
20433 -1 table.toGrid = function(node) {
-1 27507 table.toGrid = axe.utils.memoize(function(node) {
20434 27508 var table = [];
20435 27509 var rows = node.rows;
20436 27510 for (var i = 0, rowLength = rows.length; i < rowLength; i++) {
@@ -20451,7 +27525,7 @@ module.exports = {
20451 27525 }
20452 27526 }
20453 27527 return table;
20454 -1 };
-1 27528 });
20455 27529 table.toArray = table.toGrid;
20456 27530 (function(table) {
20457 27531 var traverseTable = function traverseTable(dir, position, tableGrid, callback) {
@@ -20520,7 +27594,7 @@ module.exports = {
20520 27594 };
20521 27595 })(table);
20522 27596 text.accessibleText = function accessibleText(element, context) {
20523 -1 var virtualNode = axe.utils.getNodeFromTree(axe._tree[0], element);
-1 27597 var virtualNode = axe.utils.getNodeFromTree(element);
20524 27598 return text.accessibleTextVirtual(virtualNode, context);
20525 27599 };
20526 27600 text.accessibleTextVirtual = function accessibleTextVirtual(virtualNode) {
@@ -20532,14 +27606,14 @@ module.exports = {
20532 27606 }
20533 27607 var computationSteps = [ aria.arialabelledbyText, aria.arialabelText, text.nativeTextAlternative, text.formControlValue, text.subtreeText, textNodeContent, text.titleText ];
20534 27608 var accName = computationSteps.reduce(function(accName, step) {
-1 27609 if (context.startNode === virtualNode) {
-1 27610 accName = text.sanitize(accName);
-1 27611 }
20535 27612 if (accName !== '') {
20536 27613 return accName;
20537 27614 }
20538 27615 return step(virtualNode, context);
20539 27616 }, '');
20540 -1 if (context.startNode === virtualNode) {
20541 -1 accName = text.sanitize(accName);
20542 -1 }
20543 27617 if (context.debug) {
20544 27618 axe.log(accName || '{empty-value}', actualNode, context);
20545 27619 }
@@ -20581,9 +27655,7 @@ module.exports = {
20581 27655 context.processed.push(virtualnode);
20582 27656 return false;
20583 27657 };
20584 -1 var selectRoles = [ 'combobox', 'listbox' ];
20585 -1 var rangeRoles = [ 'progressbar', 'scrollbar', 'slider', 'spinbutton' ];
20586 -1 var controlValueRoles = [ 'textbox' ].concat(selectRoles, rangeRoles);
-1 27658 var controlValueRoles = [ 'textbox', 'progressbar', 'scrollbar', 'slider', 'spinbutton', 'combobox', 'listbox' ];
20587 27659 text.formControlValueMethods = {
20588 27660 nativeTextboxValue: nativeTextboxValue,
20589 27661 nativeSelectValue: nativeSelectValue,
@@ -20613,16 +27685,14 @@ module.exports = {
20613 27685 };
20614 27686 function nativeTextboxValue(node) {
20615 27687 node = node.actualNode || node;
20616 -1 var nonTextInputTypes = [ 'button', 'checkbox', 'file', 'hidden', 'image', 'password', 'radio', 'reset', 'submit', 'color' ];
20617 -1 var nodeName = node.nodeName.toUpperCase();
20618 -1 if (nodeName === 'TEXTAREA' || nodeName === 'INPUT' && !nonTextInputTypes.includes(node.type)) {
-1 27688 if (axe.commons.forms.isNativeTextbox(node)) {
20619 27689 return node.value || '';
20620 27690 }
20621 27691 return '';
20622 27692 }
20623 27693 function nativeSelectValue(node) {
20624 27694 node = node.actualNode || node;
20625 -1 if (node.nodeName.toUpperCase() !== 'SELECT') {
-1 27695 if (!axe.commons.forms.isNativeSelect(node)) {
20626 27696 return '';
20627 27697 }
20628 27698 return Array.from(node.options).filter(function(option) {
@@ -20633,8 +27703,7 @@ module.exports = {
20633 27703 }
20634 27704 function ariaTextboxValue(virtualNode) {
20635 27705 var actualNode = virtualNode.actualNode;
20636 -1 var role = aria.getRole(actualNode);
20637 -1 if (role !== 'textbox') {
-1 27706 if (!axe.commons.forms.isAriaTextbox(actualNode)) {
20638 27707 return '';
20639 27708 }
20640 27709 if (!dom.isHiddenWithCSS(actualNode)) {
@@ -20645,8 +27714,7 @@ module.exports = {
20645 27714 }
20646 27715 function ariaListboxValue(virtualNode, context) {
20647 27716 var actualNode = virtualNode.actualNode;
20648 -1 var role = aria.getRole(actualNode);
20649 -1 if (role !== 'listbox') {
-1 27717 if (!axe.commons.forms.isAriaListbox(actualNode)) {
20650 27718 return '';
20651 27719 }
20652 27720 var selected = aria.getOwnedVirtual(virtualNode).filter(function(owned) {
@@ -20659,11 +27727,8 @@ module.exports = {
20659 27727 }
20660 27728 function ariaComboboxValue(virtualNode, context) {
20661 27729 var actualNode = virtualNode.actualNode;
20662 -1 var role = aria.getRole(actualNode, {
20663 -1 noImplicit: true
20664 -1 });
20665 -1 var listbox = void 0;
20666 -1 if (!role === 'combobox') {
-1 27730 var listbox;
-1 27731 if (!axe.commons.forms.isAriaCombobox(actualNode)) {
20667 27732 return '';
20668 27733 }
20669 27734 listbox = aria.getOwnedVirtual(virtualNode).filter(function(elm) {
@@ -20673,8 +27738,7 @@ module.exports = {
20673 27738 }
20674 27739 function ariaRangeValue(node) {
20675 27740 node = node.actualNode || node;
20676 -1 var role = aria.getRole(node);
20677 -1 if (!rangeRoles.includes(role) || !node.hasAttribute('aria-valuenow')) {
-1 27741 if (!axe.commons.forms.isAriaRange(node) || !node.hasAttribute('aria-valuenow')) {
20678 27742 return '';
20679 27743 }
20680 27744 var valueNow = +node.getAttribute('aria-valuenow');
@@ -20698,6 +27762,90 @@ module.exports = {
20698 27762 }
20699 27763 return 1;
20700 27764 };
-1 27765 text.isIconLigature = function(textVNode) {
-1 27766 var differenceThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .15;
-1 27767 var occuranceThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
-1 27768 var nodeValue = textVNode.actualNode.nodeValue.trim();
-1 27769 if (!text.sanitize(nodeValue) || text.hasUnicode(nodeValue, {
-1 27770 emoji: true,
-1 27771 nonBmp: true
-1 27772 })) {
-1 27773 return false;
-1 27774 }
-1 27775 if (!axe._cache.get('canvasContext')) {
-1 27776 axe._cache.set('canvasContext', document.createElement('canvas').getContext('2d'));
-1 27777 }
-1 27778 var canvasContext = axe._cache.get('canvasContext');
-1 27779 var canvas = canvasContext.canvas;
-1 27780 if (!axe._cache.get('fonts')) {
-1 27781 axe._cache.set('fonts', {});
-1 27782 }
-1 27783 var fonts = axe._cache.get('fonts');
-1 27784 var style = window.getComputedStyle(textVNode.parent.actualNode);
-1 27785 var fontFamily = style.getPropertyValue('font-family');
-1 27786 if (!fonts[fontFamily]) {
-1 27787 fonts[fontFamily] = {
-1 27788 occurances: 0,
-1 27789 numLigatures: 0
-1 27790 };
-1 27791 }
-1 27792 var font = fonts[fontFamily];
-1 27793 if (font.occurances >= occuranceThreshold) {
-1 27794 if (font.numLigatures / font.occurances === 1) {
-1 27795 return true;
-1 27796 } else if (font.numLigatures === 0) {
-1 27797 return false;
-1 27798 }
-1 27799 }
-1 27800 font.occurances++;
-1 27801 var fontSize = 30;
-1 27802 var fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
-1 27803 canvasContext.font = fontStyle;
-1 27804 var firstChar = nodeValue.charAt(0);
-1 27805 var width = canvasContext.measureText(firstChar).width;
-1 27806 if (width < 30) {
-1 27807 var diff = 30 / width;
-1 27808 width *= diff;
-1 27809 fontSize *= diff;
-1 27810 fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
-1 27811 }
-1 27812 canvas.width = width;
-1 27813 canvas.height = fontSize;
-1 27814 canvasContext.font = fontStyle;
-1 27815 canvasContext.textAlign = 'left';
-1 27816 canvasContext.textBaseline = 'top';
-1 27817 canvasContext.fillText(firstChar, 0, 0);
-1 27818 var compareData = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
-1 27819 if (!compareData.some(function(pixel) {
-1 27820 return pixel;
-1 27821 })) {
-1 27822 font.numLigatures++;
-1 27823 return true;
-1 27824 }
-1 27825 canvasContext.clearRect(0, 0, width, fontSize);
-1 27826 canvasContext.fillText(nodeValue, 0, 0);
-1 27827 var compareWith = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
-1 27828 var differences = compareData.reduce(function(diff, pixel, i) {
-1 27829 if (pixel === 0 && compareWith[i] === 0) {
-1 27830 return diff;
-1 27831 }
-1 27832 if (pixel !== 0 && compareWith[i] !== 0) {
-1 27833 return diff;
-1 27834 }
-1 27835 return ++diff;
-1 27836 }, 0);
-1 27837 var expectedWidth = nodeValue.split('').reduce(function(width, _char) {
-1 27838 return width + canvasContext.measureText(_char).width;
-1 27839 }, 0);
-1 27840 var actualWidth = canvasContext.measureText(nodeValue).width;
-1 27841 var pixelDifference = differences / compareData.length;
-1 27842 var sizeDifference = 1 - actualWidth / expectedWidth;
-1 27843 if (pixelDifference >= differenceThreshold && sizeDifference >= differenceThreshold) {
-1 27844 font.numLigatures++;
-1 27845 return true;
-1 27846 }
-1 27847 return false;
-1 27848 };
20701 27849 var autocomplete = {
20702 27850 stateTerms: [ 'on', 'off' ],
20703 27851 standaloneTerms: [ 'name', 'honorific-prefix', 'given-name', 'additional-name', 'family-name', 'honorific-suffix', 'nickname', 'username', 'new-password', 'current-password', 'organization-title', 'organization', 'street-address', 'address-line1', 'address-line2', 'address-line3', 'address-level4', 'address-level3', 'address-level2', 'address-level1', 'country', 'country-name', 'postal-code', 'cc-name', 'cc-given-name', 'cc-additional-name', 'cc-family-name', 'cc-number', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-csc', 'cc-type', 'transaction-currency', 'transaction-amount', 'language', 'bday', 'bday-day', 'bday-month', 'bday-year', 'sex', 'url', 'photo' ],
@@ -20707,7 +27855,7 @@ module.exports = {
20707 27855 };
20708 27856 text.autocomplete = autocomplete;
20709 27857 text.isValidAutocomplete = function isValidAutocomplete(autocomplete) {
20710 -1 var _ref33 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref33$looseTyped = _ref33.looseTyped, looseTyped = _ref33$looseTyped === undefined ? false : _ref33$looseTyped, _ref33$stateTerms = _ref33.stateTerms, stateTerms = _ref33$stateTerms === undefined ? [] : _ref33$stateTerms, _ref33$locations = _ref33.locations, locations = _ref33$locations === undefined ? [] : _ref33$locations, _ref33$qualifiers = _ref33.qualifiers, qualifiers = _ref33$qualifiers === undefined ? [] : _ref33$qualifiers, _ref33$standaloneTerm = _ref33.standaloneTerms, standaloneTerms = _ref33$standaloneTerm === undefined ? [] : _ref33$standaloneTerm, _ref33$qualifiedTerms = _ref33.qualifiedTerms, qualifiedTerms = _ref33$qualifiedTerms === undefined ? [] : _ref33$qualifiedTerms;
-1 27858 var _ref33 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref33$looseTyped = _ref33.looseTyped, looseTyped = _ref33$looseTyped === void 0 ? false : _ref33$looseTyped, _ref33$stateTerms = _ref33.stateTerms, stateTerms = _ref33$stateTerms === void 0 ? [] : _ref33$stateTerms, _ref33$locations = _ref33.locations, locations = _ref33$locations === void 0 ? [] : _ref33$locations, _ref33$qualifiers = _ref33.qualifiers, qualifiers = _ref33$qualifiers === void 0 ? [] : _ref33$qualifiers, _ref33$standaloneTerm = _ref33.standaloneTerms, standaloneTerms = _ref33$standaloneTerm === void 0 ? [] : _ref33$standaloneTerm, _ref33$qualifiedTerms = _ref33.qualifiedTerms, qualifiedTerms = _ref33$qualifiedTerms === void 0 ? [] : _ref33$qualifiedTerms;
20711 27859 autocomplete = autocomplete.toLowerCase().trim();
20712 27860 stateTerms = stateTerms.concat(text.autocomplete.stateTerms);
20713 27861 if (stateTerms.includes(autocomplete) || autocomplete === '') {
@@ -20750,7 +27898,7 @@ module.exports = {
20750 27898 }, context);
20751 27899 var explicitLabels = getExplicitLabels(virtualNode);
20752 27900 var implicitLabel = dom.findUpVirtual(virtualNode, 'label');
20753 -1 var labels = void 0;
-1 27901 var labels;
20754 27902 if (implicitLabel) {
20755 27903 labels = [].concat(_toConsumableArray(explicitLabels), [ implicitLabel ]);
20756 27904 labels.sort(axe.utils.nodeSorter);
@@ -20798,7 +27946,7 @@ module.exports = {
20798 27946 return null;
20799 27947 };
20800 27948 text.label = function(node) {
20801 -1 node = axe.utils.getNodeFromTree(axe._tree[0], node);
-1 27949 node = axe.utils.getNodeFromTree(node);
20802 27950 return text.labelVirtual(node);
20803 27951 };
20804 27952 text.nativeElementType = [ {
@@ -21006,6 +28154,7 @@ module.exports = {
21006 28154 }
21007 28155 if (nonBmp) {
21008 28156 str = str.replace(getUnicodeNonBmpRegExp(), '');
-1 28157 str = str.replace(getSupplementaryPrivateUseRegExp(), '');
21009 28158 }
21010 28159 if (punctuations) {
21011 28160 str = str.replace(getPunctuationRegExp(), '');
@@ -21013,14 +28162,31 @@ module.exports = {
21013 28162 return str;
21014 28163 };
21015 28164 function getUnicodeNonBmpRegExp() {
21016 -1 return new RegExp('[' + 'ᴀ-ᵿ' + 'ᶀ-ᶿ' + '᷀-᷿' + '₠-' + '⃐-' + '℀-⅏' + '⅐-' + '←-⇿' + '∀-⋿' + '⌀-⏿' + '␀-' + '⑀-' + '①-⓿' + '─-╿' + '▀-▟' + '■-◿' + '☀-⛿' + '✀-➿' + ']');
-1 28165 return new RegExp('[' + 'ᴀ-ᵿ' + 'ᶀ-ᶿ' + '᷀-᷿' + '₠-' + '⃐-' + '℀-⅏' + '⅐-' + '←-⇿' + '∀-⋿' + '⌀-⏿' + '␀-' + '⑀-' + '①-⓿' + '─-╿' + '▀-▟' + '■-◿' + '☀-⛿' + '✀-➿' + '-' + ']');
21017 28166 }
21018 28167 function getPunctuationRegExp() {
21019 28168 return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/g;
21020 28169 }
-1 28170 function getSupplementaryPrivateUseRegExp() {
-1 28171 return /[\uDB80-\uDBBF][\uDC00-\uDFFD]/g;
-1 28172 }
21021 28173 text.unsupported = {
21022 28174 accessibleNameFromFieldValue: [ 'combobox', 'listbox', 'progressbar' ]
21023 28175 };
-1 28176 text.visibleTextNodes = function(vNode) {
-1 28177 var parentVisible = axe.commons.dom.isVisible(vNode.actualNode);
-1 28178 var nodes = [];
-1 28179 vNode.children.forEach(function(child) {
-1 28180 if (child.actualNode.nodeType === 3) {
-1 28181 if (parentVisible) {
-1 28182 nodes.push(child);
-1 28183 }
-1 28184 } else {
-1 28185 nodes = nodes.concat(text.visibleTextNodes(child));
-1 28186 }
-1 28187 });
-1 28188 return nodes;
-1 28189 };
21024 28190 text.visibleVirtual = function(element, screenReader, noRecursing) {
21025 28191 var result = element.children.map(function(child) {
21026 28192 if (child.actualNode.nodeType === 3) {
@@ -21035,7 +28201,7 @@ module.exports = {
21035 28201 return text.sanitize(result);
21036 28202 };
21037 28203 text.visible = function(element, screenReader, noRecursing) {
21038 -1 element = axe.utils.getNodeFromTree(axe._tree[0], element);
-1 28204 element = axe.utils.getNodeFromTree(element);
21039 28205 return text.visibleVirtual(element, screenReader, noRecursing);
21040 28206 };
21041 28207 return commons;
@@ -21043,8 +28209,6 @@ module.exports = {
21043 28209 });
21044 28210 })(typeof window === 'object' ? window : this);
21045 28211 },{}],14:[function(require,module,exports){
21046 -1 window.getAccNameVersion = "2.27";
21047 -1
21048 28212 /*!
21049 28213 CalcNames: The AccName Computation Prototype, compute the Name and Description property values for a DOM node
21050 28214 Returns an object with 'name' and 'desc' properties.
@@ -21055,1409 +28219,1594 @@ https://github.com/whatsock/w3c-alternative-text-computation
21055 28219 Distributed under the terms of the Open Source Initiative OSI - MIT License
21056 28220 */
21057 28221
21058 -1 // AccName Computation Prototype
21059 -1 window.getAccName = window.calcNames = function(
21060 -1 node,
21061 -1 fnc,
21062 -1 preventVisualARIASelfCSSRef,
21063 -1 overrides
21064 -1 ) {
21065 -1 overrides = overrides || {};
21066 -1 var docO = overrides.document || document;
21067 -1 var props = { name: "", desc: "", error: "" };
21068 -1 try {
21069 -1 if (!node || node.nodeType !== 1) {
21070 -1 return props;
21071 -1 }
21072 -1 var rootNode = node;
21073 -1
21074 -1 // Track nodes to prevent duplicate node reference parsing.
21075 -1 var nodes = [];
21076 -1 // Track aria-owns references to prevent duplicate parsing.
21077 -1 var owns = [];
21078 -1
21079 -1 // Recursively process a DOM node to compute an accessible name in accordance with the spec
21080 -1 var walk = function(
21081 -1 refNode,
21082 -1 stop,
21083 -1 skip,
21084 -1 nodesToIgnoreValues,
21085 -1 skipAbort,
21086 -1 ownedBy,
21087 -1 skipTo
21088 -1 ) {
21089 -1 skipTo = skipTo || {};
21090 -1 skipTo.tag = skipTo.tag || false;
21091 -1 skipTo.role = skipTo.role || false;
21092 -1 skipTo.go = skipTo.go || false;
21093 -1 var fullResult = {
21094 -1 name: "",
21095 -1 title: ""
21096 -1 };
21097 -1
21098 -1 /*
-1 28222 (function() {
-1 28223 var nameSpace = window.AccNamePrototypeNameSpace || window;
-1 28224 if (nameSpace && typeof nameSpace === "string" && nameSpace.length) {
-1 28225 window[nameSpace] = {};
-1 28226 nameSpace = window[nameSpace];
-1 28227 }
-1 28228 nameSpace.getAccNameVersion = "2.42";
-1 28229 // AccName Computation Prototype
-1 28230 nameSpace.getAccName = nameSpace.calcNames = function(
-1 28231 node,
-1 28232 fnc,
-1 28233 preventVisualARIASelfCSSRef,
-1 28234 overrides
-1 28235 ) {
-1 28236 overrides = overrides || {};
-1 28237 var docO = overrides.document || document;
-1 28238 var props = { name: "", desc: "", error: "" };
-1 28239 var nameFromPlaceholder = false;
-1 28240 var nameFromUserAgent = false;
-1 28241 try {
-1 28242 if (!node || node.nodeType !== 1) {
-1 28243 return props;
-1 28244 }
-1 28245 var rootNode = node;
-1 28246
-1 28247 // Track nodes to prevent duplicate node reference parsing.
-1 28248 var nodes = [];
-1 28249 // Track aria-owns references to prevent duplicate parsing.
-1 28250 var owns = [];
-1 28251
-1 28252 // Recursively process a DOM node to compute an accessible name in accordance with the spec
-1 28253 var walk = function(
-1 28254 refNode,
-1 28255 stop,
-1 28256 skip,
-1 28257 nodesToIgnoreValues,
-1 28258 skipAbort,
-1 28259 ownedBy,
-1 28260 skipTo
-1 28261 ) {
-1 28262 skipTo = skipTo || {};
-1 28263 skipTo.tag = skipTo.tag || false;
-1 28264 skipTo.role = skipTo.role || false;
-1 28265 skipTo.go = skipTo.go || false;
-1 28266 var fullResult = {
-1 28267 name: "",
-1 28268 title: ""
-1 28269 };
-1 28270 var hasLabel = false;
-1 28271
-1 28272 /*
21099 28273 ARIA Role Exception Rule Set 1.1
21100 28274 The following Role Exception Rule Set is based on the following ARIA Working Group discussion involving all relevant browser venders.
21101 28275 https://lists.w3.org/Archives/Public/public-aria/2017Jun/0057.html
21102 28276 Plus roles extended for the Role Parity project.
21103 28277 */
21104 -1 var isException = function(node, refNode) {
21105 -1 if (
21106 -1 !refNode ||
21107 -1 !node ||
21108 -1 refNode.nodeType !== 1 ||
21109 -1 node.nodeType !== 1
21110 -1 ) {
21111 -1 return false;
21112 -1 }
21113 -1
21114 -1 var inList = function(node, list) {
21115 -1 var role = getRole(node);
21116 -1 var tag = node.nodeName.toLowerCase();
21117 -1 return (
21118 -1 (role && list.roles.indexOf(role) >= 0) ||
21119 -1 (!role && list.tags.indexOf(tag) >= 0)
21120 -1 );
21121 -1 };
21122 -1
21123 -1 // The list3 overrides must be checked first.
21124 -1 if (inList(node, list3)) {
-1 28278 var isException = function(node, refNode) {
21125 28279 if (
21126 -1 node === refNode &&
21127 -1 !(node.id && ownedBy[node.id] && ownedBy[node.id].node)
-1 28280 !refNode ||
-1 28281 !node ||
-1 28282 refNode.nodeType !== 1 ||
-1 28283 node.nodeType !== 1
21128 28284 ) {
21129 -1 return !isFocusable(node);
21130 -1 } else {
21131 -1 // Note: the inParent checker needs to be present to allow for embedded roles matching list3 when the referenced parent is referenced using aria-labelledby, aria-describedby, or aria-owns.
21132 -1 return !(
21133 -1 (inParent(node, ownedBy.top) &&
21134 -1 node.nodeName.toLowerCase() !== "select") ||
21135 -1 inList(refNode, list1)
21136 -1 );
-1 28285 return false;
21137 28286 }
21138 -1 }
21139 -1 // Otherwise process list2 to identify roles to ignore processing name from content.
21140 -1 else if (
21141 -1 (inList(node, list2) ||
21142 -1 (node === rootNode && !inList(node, list1))) &&
21143 -1 !skipTo.go
21144 -1 ) {
21145 -1 return true;
21146 -1 } else {
21147 -1 return false;
21148 -1 }
21149 -1 };
21150 28287
21151 -1 var inParent = function(node, parent) {
21152 -1 var trackNodes = [];
21153 -1 while (node) {
21154 -1 if (
21155 -1 node.id &&
21156 -1 ownedBy[node.id] &&
21157 -1 ownedBy[node.id].node &&
21158 -1 trackNodes.indexOf(node) === -1
21159 -1 ) {
21160 -1 trackNodes.push(node);
21161 -1 node = ownedBy[node.id].node;
21162 -1 } else {
21163 -1 node = node.parentNode;
-1 28288 var inList = function(node, list) {
-1 28289 var role = getRole(node);
-1 28290 var tag = node.nodeName.toLowerCase();
-1 28291 return (
-1 28292 (role && list.roles.indexOf(role) >= 0) ||
-1 28293 (!role && list.tags.indexOf(tag) >= 0)
-1 28294 );
-1 28295 };
-1 28296
-1 28297 // The list3 overrides must be checked first.
-1 28298 if (inList(node, list3)) {
-1 28299 if (
-1 28300 node === refNode &&
-1 28301 !(node.id && ownedBy[node.id] && ownedBy[node.id].node)
-1 28302 ) {
-1 28303 return !isFocusable(node);
-1 28304 } else {
-1 28305 // Note: the inParent checker needs to be present to allow for embedded roles matching list3 when the referenced parent is referenced using aria-labelledby, aria-describedby, or aria-owns.
-1 28306 return !(
-1 28307 (inParent(node, ownedBy.top) &&
-1 28308 node.nodeName.toLowerCase() !== "select") ||
-1 28309 inList(refNode, list1)
-1 28310 );
-1 28311 }
21164 28312 }
21165 -1 if (node && node === parent) {
21166 -1 return true;
21167 -1 } else if (!node || node === ownedBy.top || node === docO.body) {
21168 -1 return false;
-1 28313 // Otherwise process list2 to identify roles to ignore processing name from content.
-1 28314 else
-1 28315 return !!(
-1 28316 (inList(node, list2) ||
-1 28317 (node === rootNode && !inList(node, list1))) &&
-1 28318 !skipTo.go
-1 28319 );
-1 28320 };
-1 28321
-1 28322 var inParent = function(node, parent) {
-1 28323 var trackNodes = [];
-1 28324 while (node) {
-1 28325 if (
-1 28326 node.id &&
-1 28327 ownedBy[node.id] &&
-1 28328 ownedBy[node.id].node &&
-1 28329 trackNodes.indexOf(node) === -1
-1 28330 ) {
-1 28331 trackNodes.push(node);
-1 28332 node = ownedBy[node.id].node;
-1 28333 } else {
-1 28334 node = node.parentNode;
-1 28335 }
-1 28336 if (node && node === parent) {
-1 28337 return true;
-1 28338 } else if (!node || node === ownedBy.top || node === docO.body) {
-1 28339 return false;
-1 28340 }
21169 28341 }
21170 -1 }
21171 -1 return false;
21172 -1 };
-1 28342 return false;
-1 28343 };
21173 28344
21174 -1 // Placeholder for storing CSS before and after pseudo element text values for the top level node
21175 -1 var cssOP = {
21176 -1 before: "",
21177 -1 after: ""
21178 -1 };
-1 28345 // Placeholder for storing CSS before and after pseudo element text values for the top level node
-1 28346 var cssOP = {
-1 28347 before: "",
-1 28348 after: ""
-1 28349 };
21179 28350
21180 -1 if (ownedBy.ref) {
21181 -1 if (isParentHidden(refNode, docO.body, true, true)) {
21182 -1 // If referenced via aria-labelledby or aria-describedby, do not return a name or description if a parent node is hidden.
21183 -1 return fullResult;
21184 -1 } else if (isHidden(refNode, docO.body)) {
21185 -1 // Otherwise, if aria-labelledby or aria-describedby reference a node that is explicitly hidden, then process all children regardless of their individual hidden states.
21186 -1 var ignoreHidden = true;
-1 28351 if (ownedBy.ref) {
-1 28352 if (isParentHidden(refNode, docO.body, true, true)) {
-1 28353 // If referenced via aria-labelledby or aria-describedby, do not return a name or description if a parent node is hidden.
-1 28354 return fullResult;
-1 28355 } else if (isHidden(refNode, docO.body)) {
-1 28356 // Otherwise, if aria-labelledby or aria-describedby reference a node that is explicitly hidden, then process all children regardless of their individual hidden states.
-1 28357 var ignoreHidden = true;
-1 28358 }
21187 28359 }
21188 -1 }
21189 28360
21190 -1 if (!skipTo.tag && !skipTo.role && nodes.indexOf(refNode) === -1) {
21191 -1 // Store the before and after pseudo element 'content' values for the top level DOM node
21192 -1 // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added.
21193 -1 cssOP = getCSSText(refNode, null);
21194 -1
21195 -1 // Enabled in Visual ARIA to prevent self referencing by Visual ARIA tooltips
21196 -1 if (preventVisualARIASelfCSSRef) {
21197 -1 if (
21198 -1 cssOP.before.indexOf(" [ARIA] ") !== -1 ||
21199 -1 cssOP.before.indexOf(" aria-") !== -1 ||
21200 -1 cssOP.before.indexOf(" accName: ") !== -1
21201 -1 )
21202 -1 cssOP.before = "";
21203 -1 if (
21204 -1 cssOP.after.indexOf(" [ARIA] ") !== -1 ||
21205 -1 cssOP.after.indexOf(" aria-") !== -1 ||
21206 -1 cssOP.after.indexOf(" accDescription: ") !== -1
21207 -1 )
21208 -1 cssOP.after = "";
21209 -1 }
21210 -1 }
-1 28361 if (!skipTo.tag && !skipTo.role && nodes.indexOf(refNode) === -1) {
-1 28362 // Store the before and after pseudo element 'content' values for the top level DOM node
-1 28363 // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added.
-1 28364 cssOP = getCSSText(refNode, null);
21211 28365
21212 -1 // Recursively apply the same naming computation to all nodes within the referenced structure
21213 -1 var walkDOM = function(node, fn, refNode) {
21214 -1 var res = {
21215 -1 name: "",
21216 -1 title: ""
21217 -1 };
21218 -1 if (!node) {
21219 -1 return res;
21220 -1 }
21221 -1 var nodeIsBlock =
21222 -1 node && node.nodeType === 1 && isBlockLevelElement(node)
21223 -1 ? true
21224 -1 : false;
21225 -1 var currentNode = node;
21226 -1 var fResult = fn(node) || {};
21227 -1 if (fResult.name && fResult.name.length) {
21228 -1 res.name += fResult.name;
21229 -1 }
21230 -1 if (!fResult.skip && !isException(node, ownedBy.top)) {
21231 -1 if (skipTo.go) skipTo.go = false;
21232 -1 node = node.firstChild;
21233 -1 while (node) {
21234 -1 res.name += walkDOM(node, fn, refNode).name;
21235 -1 node = node.nextSibling;
-1 28366 // Enabled in Visual ARIA to prevent self referencing by Visual ARIA tooltips
-1 28367 if (preventVisualARIASelfCSSRef) {
-1 28368 if (
-1 28369 cssOP.before.indexOf(" [ARIA] ") !== -1 ||
-1 28370 cssOP.before.indexOf(" aria-") !== -1 ||
-1 28371 cssOP.before.indexOf(" accName: ") !== -1
-1 28372 )
-1 28373 cssOP.before = "";
-1 28374 if (
-1 28375 cssOP.after.indexOf(" [ARIA] ") !== -1 ||
-1 28376 cssOP.after.indexOf(" aria-") !== -1 ||
-1 28377 cssOP.after.indexOf(" accDescription: ") !== -1
-1 28378 )
-1 28379 cssOP.after = "";
21236 28380 }
21237 28381 }
21238 -1 res.name += fResult.owns || "";
21239 -1 if (
21240 -1 rootNode === currentNode &&
21241 -1 !trim(res.name) &&
21242 -1 trim(fResult.title)
21243 -1 ) {
21244 -1 res.name = addSpacing(fResult.title);
21245 -1 } else if (rootNode === currentNode && trim(fResult.title)) {
21246 -1 res.title = addSpacing(fResult.title);
21247 -1 }
21248 -1 if (rootNode === currentNode && trim(fResult.desc)) {
21249 -1 res.title = addSpacing(fResult.desc);
21250 -1 }
21251 -1 if (nodeIsBlock || fResult.isWidget) {
21252 -1 res.name = addSpacing(res.name);
21253 -1 }
21254 -1 return res;
21255 -1 };
21256 28382
21257 -1 fullResult = walkDOM(
21258 -1 refNode,
21259 -1 function(node) {
21260 -1 var i = 0;
21261 -1 var element = null;
21262 -1 var ids = [];
21263 -1 var parts = [];
21264 -1 var result = {
-1 28383 // Recursively apply the same naming computation to all nodes within the referenced structure
-1 28384 var walkDOM = function(node, fn, refNode) {
-1 28385 var res = {
21265 28386 name: "",
21266 -1 title: "",
21267 -1 owns: "",
21268 -1 skip: false
-1 28387 title: ""
21269 28388 };
21270 -1 var isEmbeddedNode =
-1 28389 if (!node) {
-1 28390 return res;
-1 28391 }
-1 28392 var nodeIsBlock = !!(
21271 28393 node &&
21272 28394 node.nodeType === 1 &&
21273 -1 nodesToIgnoreValues &&
21274 -1 nodesToIgnoreValues.length &&
21275 -1 nodesToIgnoreValues.indexOf(node) !== -1 &&
21276 -1 node === rootNode &&
21277 -1 node !== refNode
21278 -1 ? true
21279 -1 : false;
21280 -1
-1 28395 isBlockLevelElement(node)
-1 28396 );
-1 28397 var currentNode = node;
-1 28398 var fResult = fn(node) || {};
-1 28399 if (fResult.name && fResult.name.length) {
-1 28400 res.name += fResult.name;
-1 28401 }
-1 28402 if (!fResult.skip && !isException(node, ownedBy.top)) {
-1 28403 if (skipTo.go) skipTo.go = false;
-1 28404 node = node.firstChild;
-1 28405 while (node) {
-1 28406 res.name += walkDOM(node, fn, refNode).name;
-1 28407 node = node.nextSibling;
-1 28408 }
-1 28409 }
-1 28410 res.name += fResult.owns || "";
21281 28411 if (
21282 -1 (skip ||
21283 -1 !node ||
21284 -1 nodes.indexOf(node) !== -1 ||
21285 -1 (!ignoreHidden && isHidden(node, ownedBy.top))) &&
21286 -1 !skipAbort &&
21287 -1 !isEmbeddedNode
-1 28412 rootNode === currentNode &&
-1 28413 refNode === currentNode &&
-1 28414 !trim(res.name) &&
-1 28415 trim(fResult.title)
21288 28416 ) {
21289 -1 // Abort if algorithm step is already completed, or if node is a hidden child of refNode, or if this node has already been processed, or skip abort if aria-labelledby self references same node.
21290 -1 return result;
-1 28417 res.name = addSpacing(fResult.title);
-1 28418 } else if (
-1 28419 rootNode === currentNode &&
-1 28420 refNode === currentNode &&
-1 28421 trim(fResult.title)
-1 28422 ) {
-1 28423 res.title = addSpacing(fResult.title);
21291 28424 }
21292 -1
21293 -1 if (!skipTo.tag && !skipTo.role && nodes.indexOf(node) === -1) {
21294 -1 nodes.push(node);
-1 28425 if (
-1 28426 rootNode === currentNode &&
-1 28427 refNode === currentNode &&
-1 28428 trim(fResult.desc)
-1 28429 ) {
-1 28430 res.title = addSpacing(fResult.desc);
21295 28431 }
21296 -1
21297 -1 // Store name for the current node.
21298 -1 var name = "";
21299 -1 // Store name from aria-owns references if detected.
21300 -1 var ariaO = "";
21301 -1 // Placeholder for storing CSS before and after pseudo element text values for the current node container element
21302 -1 var cssO = {
21303 -1 before: "",
21304 -1 after: ""
21305 -1 };
21306 -1
21307 -1 var parent = refNode === node ? node : node.parentNode;
21308 -1 if (!skipTo.tag && !skipTo.role && nodes.indexOf(parent) === -1) {
21309 -1 nodes.push(parent);
21310 -1 // Store the before and after pseudo element 'content' values for the current node container element
21311 -1 // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added.
21312 -1 cssO = getCSSText(parent, refNode);
21313 -1
21314 -1 // Enabled in Visual ARIA to prevent self referencing by Visual ARIA tooltips
21315 -1 if (preventVisualARIASelfCSSRef) {
21316 -1 if (
21317 -1 cssO.before.indexOf(" [ARIA] ") !== -1 ||
21318 -1 cssO.before.indexOf(" aria-") !== -1 ||
21319 -1 cssO.before.indexOf(" accName: ") !== -1
21320 -1 )
21321 -1 cssO.before = "";
21322 -1 if (
21323 -1 cssO.after.indexOf(" [ARIA] ") !== -1 ||
21324 -1 cssO.after.indexOf(" aria-") !== -1 ||
21325 -1 cssO.after.indexOf(" accDescription: ") !== -1
21326 -1 )
21327 -1 cssO.after = "";
21328 -1 }
-1 28432 if (
-1 28433 rootNode === currentNode &&
-1 28434 refNode === currentNode &&
-1 28435 trim(fResult.placeholder) &&
-1 28436 !trim(res.name)
-1 28437 ) {
-1 28438 res.name = addSpacing(fResult.placeholder);
-1 28439 nameFromPlaceholder = true;
-1 28440 } else if (
-1 28441 rootNode === currentNode &&
-1 28442 refNode === currentNode &&
-1 28443 trim(fResult.placeholder) &&
-1 28444 !trim(res.title)
-1 28445 ) {
-1 28446 res.title = addSpacing(fResult.placeholder);
21329 28447 }
-1 28448 if (nodeIsBlock || fResult.isWidget) {
-1 28449 res.name = addSpacing(res.name);
-1 28450 }
-1 28451 return res;
-1 28452 };
21330 28453
21331 -1 // Process standard DOM element node
21332 -1 if (node.nodeType === 1) {
21333 -1 var nTag = node.nodeName.toLowerCase();
21334 -1 var nRole = getRole(node);
21335 -1 var aLabelledby =
21336 -1 (!skipTo.tag &&
21337 -1 !skipTo.role &&
21338 -1 node.getAttribute("aria-labelledby")) ||
21339 -1 "";
21340 -1 var aDescribedby =
21341 -1 (!skipTo.tag &&
21342 -1 !skipTo.role &&
21343 -1 node.getAttribute("aria-describedby")) ||
21344 -1 "";
21345 -1 var aLabel =
21346 -1 (!skipTo.tag &&
21347 -1 !skipTo.role &&
21348 -1 node.getAttribute("aria-label")) ||
21349 -1 "";
21350 -1 var nTitle =
21351 -1 (!skipTo.tag && !skipTo.role && node.getAttribute("title")) || "";
21352 -1
21353 -1 var isNativeFormField = nativeFormFields.indexOf(nTag) !== -1;
21354 -1 var isNativeButton = ["input"].indexOf(nTag) !== -1;
21355 -1 var isRangeWidgetRole = rangeWidgetRoles.indexOf(nRole) !== -1;
21356 -1 var isEditWidgetRole = editWidgetRoles.indexOf(nRole) !== -1;
21357 -1 var isSelectWidgetRole = selectWidgetRoles.indexOf(nRole) !== -1;
21358 -1 var isSimulatedFormField =
21359 -1 isRangeWidgetRole ||
21360 -1 isEditWidgetRole ||
21361 -1 isSelectWidgetRole ||
21362 -1 nRole === "combobox";
21363 -1 var isWidgetRole =
21364 -1 (isSimulatedFormField ||
21365 -1 otherWidgetRoles.indexOf(nRole) !== -1) &&
21366 -1 nRole !== "link";
21367 -1 result.isWidget = isNativeFormField || isWidgetRole;
21368 -1
21369 -1 var hasName = false;
21370 -1 var hasDesc = false;
21371 -1 var aOwns = node.getAttribute("aria-owns") || "";
21372 -1 var isSeparatChildFormField =
21373 -1 !skipTo.tag &&
21374 -1 !skipTo.role &&
21375 -1 !isEmbeddedNode &&
21376 -1 ((node !== refNode &&
21377 -1 (isNativeFormField || isSimulatedFormField)) ||
21378 -1 (node.id &&
21379 -1 ownedBy[node.id] &&
21380 -1 ownedBy[node.id].target &&
21381 -1 ownedBy[node.id].target === node))
21382 -1 ? true
21383 -1 : false;
21384 -1
21385 -1 // Check for non-empty value of aria-describedby if current node equals reference node, follow each ID ref, then stop and process no deeper.
21386 -1 if (
21387 -1 !stop &&
21388 -1 node === refNode &&
21389 -1 !skipTo.tag &&
21390 -1 !skipTo.role &&
21391 -1 aDescribedby
21392 -1 ) {
21393 -1 var desc = "";
21394 -1 ids = aDescribedby.split(/\s+/);
21395 -1 parts = [];
21396 -1 for (i = 0; i < ids.length; i++) {
21397 -1 element = docO.getElementById(ids[i]);
21398 -1 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label
21399 -1 parts.push(
21400 -1 walk(element, true, false, [node], false, {
21401 -1 ref: ownedBy,
21402 -1 top: element
21403 -1 }).name
21404 -1 );
21405 -1 }
21406 -1 // Check for blank value, since whitespace chars alone are not valid as a name
21407 -1 desc = trim(parts.join(" "));
21408 -1
21409 -1 if (trim(desc)) {
21410 -1 result.desc = desc;
21411 -1 hasDesc = true;
21412 -1 }
21413 -1 }
21414 -1
21415 -1 // Check for non-empty value of aria-labelledby on current node, follow each ID ref, then stop and process no deeper.
21416 -1 if (!stop && !skipTo.tag && !skipTo.role && aLabelledby) {
21417 -1 ids = aLabelledby.split(/\s+/);
21418 -1 parts = [];
21419 -1 for (i = 0; i < ids.length; i++) {
21420 -1 element = docO.getElementById(ids[i]);
21421 -1 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label
21422 -1 parts.push(
21423 -1 walk(element, true, skip, [node], element === refNode, {
21424 -1 ref: ownedBy,
21425 -1 top: element
21426 -1 }).name
21427 -1 );
21428 -1 }
21429 -1 // Check for blank value, since whitespace chars alone are not valid as a name
21430 -1 name = trim(parts.join(" "));
21431 -1
21432 -1 if (trim(name)) {
21433 -1 hasName = true;
21434 -1 // Abort further recursion if name is valid.
21435 -1 result.skip = true;
21436 -1 }
21437 -1 }
-1 28454 fullResult = walkDOM(
-1 28455 refNode,
-1 28456 function(node) {
-1 28457 var i = 0;
-1 28458 var element = null;
-1 28459 var ids = [];
-1 28460 var parts = [];
-1 28461 var result = {
-1 28462 name: "",
-1 28463 title: "",
-1 28464 owns: "",
-1 28465 skip: false
-1 28466 };
-1 28467 var isEmbeddedNode = !!(
-1 28468 node &&
-1 28469 node.nodeType === 1 &&
-1 28470 nodesToIgnoreValues &&
-1 28471 nodesToIgnoreValues.length &&
-1 28472 nodesToIgnoreValues.indexOf(node) !== -1 &&
-1 28473 node === rootNode &&
-1 28474 node !== refNode
-1 28475 );
-1 28476 var hLabel = false;
21438 28477
21439 -1 // Otherwise, if current node has a non-empty aria-label then set as name and process no deeper within the branch.
21440 28478 if (
21441 -1 !skipTo.tag &&
21442 -1 !skipTo.role &&
21443 -1 !hasName &&
21444 -1 trim(aLabel) &&
21445 -1 !isSeparatChildFormField
-1 28479 (skip ||
-1 28480 !node ||
-1 28481 nodes.indexOf(node) !== -1 ||
-1 28482 (!ignoreHidden && isHidden(node, ownedBy.top))) &&
-1 28483 !skipAbort &&
-1 28484 !isEmbeddedNode
21446 28485 ) {
21447 -1 name = aLabel;
-1 28486 // Abort if algorithm step is already completed, or if node is a hidden child of refNode, or if this node has already been processed, or skip abort if aria-labelledby self references same node.
-1 28487 return result;
-1 28488 }
21448 28489
21449 -1 // Check for blank value, since whitespace chars alone are not valid as a name
21450 -1 if (trim(name)) {
21451 -1 hasName = true;
21452 -1 if (node === refNode) {
21453 -1 // If name is non-empty and both the current and refObject nodes match, then don't process any deeper within the branch.
21454 -1 skip = true;
21455 -1 }
-1 28490 if (!skipTo.tag && !skipTo.role && nodes.indexOf(node) === -1) {
-1 28491 nodes.push(node);
-1 28492 }
-1 28493
-1 28494 // Store name for the current node.
-1 28495 var name = "";
-1 28496 // Store name from aria-owns references if detected.
-1 28497 var ariaO = "";
-1 28498 // Placeholder for storing CSS before and after pseudo element text values for the current node container element
-1 28499 var cssO = {
-1 28500 before: "",
-1 28501 after: ""
-1 28502 };
-1 28503
-1 28504 var parent = refNode === node ? node : node.parentNode;
-1 28505 if (!skipTo.tag && !skipTo.role && nodes.indexOf(parent) === -1) {
-1 28506 nodes.push(parent);
-1 28507 // Store the before and after pseudo element 'content' values for the current node container element
-1 28508 // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added.
-1 28509 cssO = getCSSText(parent, refNode);
-1 28510
-1 28511 // Enabled in Visual ARIA to prevent self referencing by Visual ARIA tooltips
-1 28512 if (preventVisualARIASelfCSSRef) {
-1 28513 if (
-1 28514 cssO.before.indexOf(" [ARIA] ") !== -1 ||
-1 28515 cssO.before.indexOf(" aria-") !== -1 ||
-1 28516 cssO.before.indexOf(" accName: ") !== -1
-1 28517 )
-1 28518 cssO.before = "";
-1 28519 if (
-1 28520 cssO.after.indexOf(" [ARIA] ") !== -1 ||
-1 28521 cssO.after.indexOf(" aria-") !== -1 ||
-1 28522 cssO.after.indexOf(" accDescription: ") !== -1
-1 28523 )
-1 28524 cssO.after = "";
21456 28525 }
21457 28526 }
21458 28527
21459 -1 var rolePresentation =
21460 -1 !skipTo.tag &&
21461 -1 !skipTo.role &&
21462 -1 !hasName &&
21463 -1 nRole &&
21464 -1 presentationRoles.indexOf(nRole) !== -1 &&
21465 -1 !isFocusable(node) &&
21466 -1 !hasGlobalAttr(node)
21467 -1 ? true
21468 -1 : false;
21469 -1
21470 -1 // Otherwise, if the current node is not a nested widget control within the parent ref obj, but is instead a native markup element that includes a host-defined labelling mechanism, then set the name and description accordingly if present.
21471 -1 if (!isSeparatChildFormField) {
21472 -1 // Otherwise, if name is still empty and the current node matches the ref node and is a standard form field with a non-empty associated label element, process label with same naming computation algorithm.
21473 -1 if (
-1 28528 // Process standard DOM element node
-1 28529 if (node.nodeType === 1) {
-1 28530 var nTag = node.nodeName.toLowerCase();
-1 28531 var nRole = getRole(node);
-1 28532 var aLabelledby =
-1 28533 (!skipTo.tag &&
-1 28534 !skipTo.role &&
-1 28535 node.getAttribute("aria-labelledby")) ||
-1 28536 "";
-1 28537 var aDescribedby =
-1 28538 (!skipTo.tag &&
-1 28539 !skipTo.role &&
-1 28540 node.getAttribute("aria-describedby")) ||
-1 28541 "";
-1 28542 var aLabel =
-1 28543 (!skipTo.tag &&
-1 28544 !skipTo.role &&
-1 28545 node.getAttribute("aria-label")) ||
-1 28546 "";
-1 28547 var nTitle =
-1 28548 (!skipTo.tag && !skipTo.role && node.getAttribute("title")) ||
-1 28549 "";
-1 28550
-1 28551 var isNativeFormField = nativeFormFields.indexOf(nTag) !== -1;
-1 28552 var isNativeButton = ["input"].indexOf(nTag) !== -1;
-1 28553 var isRangeWidgetRole = rangeWidgetRoles.indexOf(nRole) !== -1;
-1 28554 var isEditWidgetRole = editWidgetRoles.indexOf(nRole) !== -1;
-1 28555 var isSelectWidgetRole = selectWidgetRoles.indexOf(nRole) !== -1;
-1 28556 var isSimulatedFormField =
-1 28557 isRangeWidgetRole ||
-1 28558 isEditWidgetRole ||
-1 28559 isSelectWidgetRole ||
-1 28560 nRole === "combobox";
-1 28561 var isWidgetRole =
-1 28562 (isSimulatedFormField ||
-1 28563 otherWidgetRoles.indexOf(nRole) !== -1) &&
-1 28564 nRole !== "link";
-1 28565 result.isWidget = isNativeFormField || isWidgetRole;
-1 28566
-1 28567 var hasName = false;
-1 28568 var hasDesc = false;
-1 28569 var aOwns = node.getAttribute("aria-owns") || "";
-1 28570 var isSeparatChildFormField = !!(
21474 28571 !skipTo.tag &&
21475 28572 !skipTo.role &&
21476 -1 !hasName &&
-1 28573 !isEmbeddedNode &&
-1 28574 ((node !== refNode &&
-1 28575 (isNativeFormField || isSimulatedFormField)) ||
-1 28576 (node.id &&
-1 28577 ownedBy[node.id] &&
-1 28578 ownedBy[node.id].target &&
-1 28579 ownedBy[node.id].target === node))
-1 28580 );
-1 28581
-1 28582 // Check for non-empty value of aria-describedby if current node equals reference node, follow each ID ref, then stop and process no deeper.
-1 28583 if (
-1 28584 !stop &&
21477 28585 node === refNode &&
21478 -1 isNativeFormField
-1 28586 !skipTo.tag &&
-1 28587 !skipTo.role &&
-1 28588 aDescribedby
21479 28589 ) {
21480 -1 // Logic modified to match issue
21481 -1 // https://github.com/WhatSock/w3c-alternative-text-computation/issues/12 */
21482 -1 var labels = docO.querySelectorAll("label");
21483 -1 var implicitLabel = getParent(node, "label") || false;
21484 -1 var explicitLabel =
21485 -1 node.id &&
21486 -1 docO.querySelectorAll('label[for="' + node.id + '"]').length
21487 -1 ? docO.querySelector('label[for="' + node.id + '"]')
21488 -1 : false;
21489 -1 var implicitI = 0;
21490 -1 var explicitI = 0;
21491 -1 for (i = 0; i < labels.length; i++) {
21492 -1 if (labels[i] === implicitLabel) {
21493 -1 implicitI = i;
21494 -1 } else if (labels[i] === explicitLabel) {
21495 -1 explicitI = i;
21496 -1 }
21497 -1 }
21498 -1 var isImplicitFirst =
21499 -1 implicitLabel &&
21500 -1 implicitLabel.nodeType === 1 &&
21501 -1 explicitLabel &&
21502 -1 explicitLabel.nodeType === 1 &&
21503 -1 implicitI < explicitI
21504 -1 ? true
21505 -1 : false;
21506 -1
21507 -1 if (
21508 -1 explicitLabel &&
21509 -1 !isParentHidden(explicitLabel, docO.body, true)
21510 -1 ) {
21511 -1 var eLblName = trim(
21512 -1 walk(explicitLabel, true, skip, [node], false, {
-1 28590 var desc;
-1 28591 ids = aDescribedby.split(/\s+/);
-1 28592 parts = [];
-1 28593 for (i = 0; i < ids.length; i++) {
-1 28594 element = docO.getElementById(ids[i]);
-1 28595 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label
-1 28596 parts.push(
-1 28597 walk(element, true, false, [node], false, {
21513 28598 ref: ownedBy,
21514 -1 top: explicitLabel
-1 28599 top: element
21515 28600 }).name
21516 28601 );
21517 28602 }
21518 -1 if (
21519 -1 implicitLabel &&
21520 -1 implicitLabel !== explicitLabel &&
21521 -1 !isParentHidden(implicitLabel, docO.body, true)
21522 -1 ) {
21523 -1 var iLblName = trim(
21524 -1 walk(implicitLabel, true, skip, [node], false, {
-1 28603 // Check for blank value, since whitespace chars alone are not valid as a name
-1 28604 desc = trim(parts.join(" "));
-1 28605
-1 28606 if (trim(desc)) {
-1 28607 result.desc = desc;
-1 28608 hasDesc = true;
-1 28609 }
-1 28610 }
-1 28611
-1 28612 // Check for non-empty value of aria-labelledby on current node, follow each ID ref, then stop and process no deeper.
-1 28613 if (!stop && !skipTo.tag && !skipTo.role && aLabelledby) {
-1 28614 ids = aLabelledby.split(/\s+/);
-1 28615 parts = [];
-1 28616 for (i = 0; i < ids.length; i++) {
-1 28617 element = docO.getElementById(ids[i]);
-1 28618 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label
-1 28619 parts.push(
-1 28620 walk(element, true, skip, [node], element === refNode, {
21525 28621 ref: ownedBy,
21526 -1 top: implicitLabel
-1 28622 top: element
21527 28623 }).name
21528 28624 );
21529 28625 }
21530 -1
21531 -1 if (iLblName && eLblName && isImplicitFirst) {
21532 -1 name = iLblName + " " + eLblName;
21533 -1 } else if (eLblName && iLblName) {
21534 -1 name = eLblName + " " + iLblName;
21535 -1 } else if (eLblName) {
21536 -1 name = eLblName;
21537 -1 } else if (iLblName) {
21538 -1 name = iLblName;
21539 -1 }
-1 28626 // Check for blank value, since whitespace chars alone are not valid as a name
-1 28627 name = trim(parts.join(" "));
21540 28628
21541 28629 if (trim(name)) {
21542 28630 hasName = true;
-1 28631 hLabel = true;
-1 28632 hasLabel = true;
-1 28633 // Abort further recursion if name is valid.
-1 28634 result.skip = true;
21543 28635 }
21544 28636 }
21545 28637
21546 -1 // Process native form field buttons in accordance with the HTML AAM
21547 -1 // https://w3c.github.io/html-aam/#accessible-name-and-description-computation
21548 -1 var btnType =
21549 -1 (!skipTo.tag &&
21550 -1 !skipTo.role &&
21551 -1 isNativeButton &&
21552 -1 node.getAttribute("type")) ||
21553 -1 false;
21554 -1 var btnValue =
21555 -1 (!skipTo.tag &&
21556 -1 !skipTo.role &&
21557 -1 btnType &&
21558 -1 trim(node.getAttribute("value"))) ||
21559 -1 false;
21560 -1
21561 -1 var nAlt = rolePresentation ? "" : trim(node.getAttribute("alt"));
21562 -1
21563 -1 // Otherwise, if name is still empty and current node is a standard non-presentational img or image button with a non-empty alt attribute, set alt attribute value as the accessible name.
-1 28638 // Otherwise, if current node has a non-empty aria-label then set as name and process no deeper within the branch.
21564 28639 if (
21565 28640 !skipTo.tag &&
21566 28641 !skipTo.role &&
21567 28642 !hasName &&
21568 -1 !rolePresentation &&
21569 -1 (nTag === "img" || btnType === "image") &&
21570 -1 nAlt
-1 28643 trim(aLabel) &&
-1 28644 !isSeparatChildFormField
21571 28645 ) {
-1 28646 name = aLabel;
-1 28647
21572 28648 // Check for blank value, since whitespace chars alone are not valid as a name
21573 -1 name = trim(nAlt);
21574 28649 if (trim(name)) {
21575 28650 hasName = true;
-1 28651 hLabel = true;
-1 28652 if (node === refNode) {
-1 28653 // If name is non-empty and both the current and refObject nodes match, then don't process any deeper within the branch.
-1 28654 skip = true;
-1 28655 hasLabel = true;
-1 28656 }
21576 28657 }
21577 28658 }
21578 28659
21579 -1 if (
-1 28660 var rolePresentation =
21580 28661 !skipTo.tag &&
21581 28662 !skipTo.role &&
21582 28663 !hasName &&
21583 -1 node === refNode &&
21584 -1 btnType &&
21585 -1 ["button", "image", "submit", "reset"].indexOf(btnType) !== -1
21586 -1 ) {
21587 -1 if (btnValue) {
21588 -1 name = btnValue;
21589 -1 } else {
21590 -1 switch (btnType) {
21591 -1 case "submit":
21592 -1 case "image":
21593 -1 name = "submit";
21594 -1 break;
21595 -1 case "reset":
21596 -1 name = "reset";
21597 -1 break;
21598 -1 default:
21599 -1 name = "";
-1 28664 nRole &&
-1 28665 presentationRoles.indexOf(nRole) !== -1 &&
-1 28666 !isFocusable(node) &&
-1 28667 !hasGlobalAttr(node);
-1 28668
-1 28669 // Otherwise, if the current node is not a nested widget control within the parent ref obj, but is instead a native markup element that includes a host-defined labelling mechanism, then set the name and description accordingly if present.
-1 28670 if (!isSeparatChildFormField) {
-1 28671 // Otherwise, if name is still empty and the current node matches the ref node and is a standard form field with a non-empty associated label element, process label with same naming computation algorithm.
-1 28672 if (
-1 28673 !skipTo.tag &&
-1 28674 !skipTo.role &&
-1 28675 !hasName &&
-1 28676 node === refNode &&
-1 28677 isNativeFormField
-1 28678 ) {
-1 28679 // Logic modified to match issue
-1 28680 // https://github.com/WhatSock/w3c-alternative-text-computation/issues/12 */
-1 28681 var labels = docO.querySelectorAll("label");
-1 28682 var lblName = "";
-1 28683 var implicitLabel = getParent(node, "label") || false;
-1 28684
-1 28685 for (i = 0; i < labels.length; i++) {
-1 28686 if (
-1 28687 (labels[i] === implicitLabel ||
-1 28688 labels[i].getAttribute("for") === node.id) &&
-1 28689 !isParentHidden(labels[i], docO.body, true)
-1 28690 ) {
-1 28691 lblName += addSpacing(
-1 28692 walk(labels[i], true, skip, [node], false, {
-1 28693 ref: ownedBy,
-1 28694 top: labels[i]
-1 28695 }).name
-1 28696 );
-1 28697 }
-1 28698 }
-1 28699
-1 28700 name = lblName;
-1 28701
-1 28702 if (trim(name)) {
-1 28703 hasName = true;
21600 28704 }
21601 28705 }
21602 -1 if (trim(name)) {
-1 28706
-1 28707 // Process native form field buttons in accordance with the HTML AAM
-1 28708 // https://w3c.github.io/html-aam/#accessible-name-and-description-computation
-1 28709 var btnType =
-1 28710 (!skipTo.tag &&
-1 28711 !skipTo.role &&
-1 28712 isNativeButton &&
-1 28713 node.getAttribute("type")) ||
-1 28714 false;
-1 28715 var btnValue =
-1 28716 (!skipTo.tag &&
-1 28717 !skipTo.role &&
-1 28718 btnType &&
-1 28719 trim(node.getAttribute("value"))) ||
-1 28720 false;
-1 28721
-1 28722 var nAlt =
-1 28723 rolePresentation && nTag === "img"
-1 28724 ? ""
-1 28725 : trim(node.alt || node.getAttribute("alt"));
-1 28726
-1 28727 // Otherwise, if name is still empty and current node is a standard non-presentational img or image button with a non-empty alt or title attribute, set alt or title attribute value as the accessible name.
-1 28728 if (
-1 28729 !skipTo.tag &&
-1 28730 !skipTo.role &&
-1 28731 !hasName &&
-1 28732 !rolePresentation &&
-1 28733 (nTag === "img" || btnType === "image") &&
-1 28734 (nAlt || trim(nTitle))
-1 28735 ) {
-1 28736 // Check for blank value, since whitespace chars alone are not valid as a name
-1 28737 name = trim(nAlt) || trim(nTitle);
-1 28738 if (trim(name)) {
-1 28739 hasName = true;
-1 28740 }
-1 28741 }
-1 28742
-1 28743 // Process native HTML area tags to use alt as name when not explicitly set using aria-labelledby or aria-label.
-1 28744 if (
-1 28745 !skipTo.tag &&
-1 28746 !skipTo.role &&
-1 28747 !hasName &&
-1 28748 !rolePresentation &&
-1 28749 nTag === "area" &&
-1 28750 nAlt
-1 28751 ) {
-1 28752 // Check for blank value, since whitespace chars alone are not valid as a name
-1 28753 name = trim(nAlt);
-1 28754 if (trim(name)) {
-1 28755 hasName = true;
-1 28756 }
-1 28757 }
-1 28758
-1 28759 // Process native HTML optgroup tags to use label as name when not explicitly set using aria-labelledby or aria-label.
-1 28760 if (nTag === "optgroup") {
-1 28761 if (
-1 28762 !skipTo.tag &&
-1 28763 !skipTo.role &&
-1 28764 !hasName &&
-1 28765 !rolePresentation &&
-1 28766 node.getAttribute("label")
-1 28767 ) {
-1 28768 // Check for blank value, since whitespace chars alone are not valid as a name
-1 28769 name = trim(node.getAttribute("label"));
-1 28770 if (trim(name)) {
-1 28771 hasName = true;
-1 28772 }
-1 28773 }
-1 28774 result.skip = true;
-1 28775 }
-1 28776
-1 28777 // Process the accessible names for native HTML buttons
-1 28778 if (
-1 28779 !skipTo.tag &&
-1 28780 !skipTo.role &&
-1 28781 !hasName &&
-1 28782 node === refNode &&
-1 28783 btnType &&
-1 28784 ["button", "submit", "reset"].indexOf(btnType) !== -1
-1 28785 ) {
-1 28786 if (btnValue) {
-1 28787 name = btnValue;
-1 28788 } else {
-1 28789 switch (btnType) {
-1 28790 case "submit":
-1 28791 name = "submit";
-1 28792 break;
-1 28793 case "reset":
-1 28794 name = "reset";
-1 28795 break;
-1 28796 default:
-1 28797 name = "";
-1 28798 }
-1 28799 }
-1 28800 if (trim(name)) {
-1 28801 hasName = true;
-1 28802 }
-1 28803 }
-1 28804
-1 28805 if (
-1 28806 !skipTo.tag &&
-1 28807 !skipTo.role &&
-1 28808 hasName &&
-1 28809 node === refNode &&
-1 28810 btnType &&
-1 28811 ["button", "submit", "reset"].indexOf(btnType) !== -1 &&
-1 28812 btnValue &&
-1 28813 btnValue !== name &&
-1 28814 !result.desc
-1 28815 ) {
-1 28816 result.desc = btnValue;
-1 28817 hasDesc = true;
-1 28818 }
-1 28819
-1 28820 // Process the accessible names for native HTML image buttons
-1 28821 if (
-1 28822 !skipTo.tag &&
-1 28823 !skipTo.role &&
-1 28824 !hasName &&
-1 28825 node === refNode &&
-1 28826 btnType &&
-1 28827 btnType === "image"
-1 28828 ) {
-1 28829 name = "Submit Query";
21603 28830 hasName = true;
-1 28831 nameFromUserAgent = true;
-1 28832 }
-1 28833
-1 28834 var isFieldset =
-1 28835 !skipTo.tag &&
-1 28836 !skipTo.role &&
-1 28837 !hasName &&
-1 28838 node === rootNode &&
-1 28839 (nRole === "group" ||
-1 28840 nRole === "radiogroup" ||
-1 28841 (!nRole && nTag === "fieldset"));
-1 28842
-1 28843 // Otherwise, if name is still empty and the current node matches the root node and is a standard fieldset element with a non-empty associated legend element as the first child node, process legend with same naming computation algorithm.
-1 28844 // Plus do the same for role="group" and role="radiogroup" with embedded role="legend", or a combination of these.
-1 28845 if (isFieldset) {
-1 28846 var fChild =
-1 28847 firstChild(node, ["legend"], ["legend"]) || false;
-1 28848 if (fChild) {
-1 28849 name = trim(
-1 28850 walk(fChild, stop, false, [], false, {
-1 28851 ref: ownedBy,
-1 28852 top: fChild
-1 28853 }).name
-1 28854 );
-1 28855 }
-1 28856 if (trim(name)) {
-1 28857 hasName = true;
-1 28858 }
-1 28859 skip = true;
-1 28860 }
-1 28861
-1 28862 var isTable =
-1 28863 !skipTo.tag &&
-1 28864 !skipTo.role &&
-1 28865 !hasName &&
-1 28866 node === rootNode &&
-1 28867 (nRole === "table" || (!nRole && nTag === "table"));
-1 28868
-1 28869 // Otherwise, if name is still empty and the current node matches the root node and is a standard table element with a non-empty associated caption element as the first child node, process caption with same naming computation algorithm.
-1 28870 // Plus do the same for role="table" with embedded role="caption", or a combination of these.
-1 28871 if (isTable) {
-1 28872 fChild = firstChild(node, ["caption"], ["caption"]) || false;
-1 28873 if (fChild) {
-1 28874 name = trim(
-1 28875 walk(fChild, stop, false, [], false, {
-1 28876 ref: ownedBy,
-1 28877 top: fChild
-1 28878 }).name
-1 28879 );
-1 28880 }
-1 28881 if (trim(name)) {
-1 28882 hasName = true;
-1 28883 }
-1 28884 skip = true;
-1 28885 }
-1 28886
-1 28887 var isFigure =
-1 28888 !skipTo.tag &&
-1 28889 !skipTo.role &&
-1 28890 !hasName &&
-1 28891 node === rootNode &&
-1 28892 (nRole === "figure" || (!nRole && nTag === "figure"));
-1 28893
-1 28894 // Otherwise, if name is still empty and the current node matches the root node and is a standard figure element with a non-empty associated figcaption element as the first or last child node, process caption with same naming computation algorithm.
-1 28895 // Plus do the same for role="figure" with embedded role="caption", or a combination of these.
-1 28896 if (isFigure) {
-1 28897 fChild =
-1 28898 firstChild(node, ["figcaption"], ["caption"]) ||
-1 28899 lastChild(node, ["figcaption"], ["caption"]) ||
-1 28900 false;
-1 28901 if (fChild) {
-1 28902 name = trim(
-1 28903 walk(fChild, stop, false, [], false, {
-1 28904 ref: ownedBy,
-1 28905 top: fChild
-1 28906 }).name
-1 28907 );
-1 28908 }
-1 28909 if (trim(name)) {
-1 28910 hasName = true;
-1 28911 }
-1 28912 skip = true;
-1 28913 }
-1 28914
-1 28915 // Otherwise, if name is still empty and the root node and the current node are the same and node is an svg element, then parse the content of the title element to set the name and the desc element to set the description.
-1 28916 if (!skipTo.tag && !skipTo.role && nTag === "svg") {
-1 28917 var svgT = node.querySelector("title") || false;
-1 28918 var svgD =
-1 28919 (node === rootNode && node.querySelector("desc")) || false;
-1 28920 if (!hasName && svgT) {
-1 28921 name = trim(
-1 28922 walk(svgT, true, false, [], false, {
-1 28923 ref: ownedBy,
-1 28924 top: svgT
-1 28925 }).name
-1 28926 );
-1 28927 }
-1 28928 if (!hasDesc && svgD) {
-1 28929 var dE = trim(
-1 28930 walk(svgD, true, false, [], false, {
-1 28931 ref: ownedBy,
-1 28932 top: svgD
-1 28933 }).name
-1 28934 );
-1 28935 if (trim(dE)) {
-1 28936 result.desc = dE;
-1 28937 }
-1 28938 }
-1 28939 result.skip = true;
-1 28940 }
-1 28941 }
-1 28942
-1 28943 // Otherwise, if the current node is a nested widget control within the parent ref obj, then add only its value and process no deeper within the branch.
-1 28944 if (!skipTo.tag && !skipTo.role && isSeparatChildFormField) {
-1 28945 // Prevent the referencing node from having its value included in the case of form control labels that contain the element with focus.
-1 28946 if (
-1 28947 !(
-1 28948 nodesToIgnoreValues &&
-1 28949 nodesToIgnoreValues.length &&
-1 28950 nodesToIgnoreValues.indexOf(node) !== -1
-1 28951 )
-1 28952 ) {
-1 28953 if (isRangeWidgetRole) {
-1 28954 // For range widgets, append aria-valuetext if non-empty, or aria-valuenow if non-empty, or node.value if applicable.
-1 28955 name = getObjectValue(nRole, node, true);
-1 28956 } else if (
-1 28957 isEditWidgetRole ||
-1 28958 (nRole === "combobox" && isNativeFormField)
-1 28959 ) {
-1 28960 // For simulated edit widgets, append text from content if applicable, or node.value if applicable.
-1 28961 name = getObjectValue(nRole, node, false, true);
-1 28962 } else if (isSelectWidgetRole) {
-1 28963 // For simulated select widgets, append same naming computation algorithm for all child nodes including aria-selected="true" separated by a space when multiple.
-1 28964 // Also filter nodes so that only valid child roles of relevant parent role that include aria-selected="true" are included.
-1 28965 name = getObjectValue(nRole, node, false, false, true);
-1 28966 } else if (
-1 28967 isNativeFormField &&
-1 28968 ["input", "textarea"].indexOf(nTag) !== -1 &&
-1 28969 (!isWidgetRole || isEditWidgetRole)
-1 28970 ) {
-1 28971 // For native edit fields, append node.value when applicable.
-1 28972 name = getObjectValue(
-1 28973 nRole,
-1 28974 node,
-1 28975 false,
-1 28976 false,
-1 28977 false,
-1 28978 true
-1 28979 );
-1 28980 } else if (
-1 28981 isNativeFormField &&
-1 28982 nTag === "select" &&
-1 28983 (!isWidgetRole || nRole === "combobox")
-1 28984 ) {
-1 28985 // For native select fields, get text from content for all options with selected attribute separated by a space when multiple, but don't process if another widget role is present unless it matches role="combobox".
-1 28986 // Reference: https://github.com/WhatSock/w3c-alternative-text-computation/issues/7
-1 28987 name = getObjectValue(
-1 28988 nRole,
-1 28989 node,
-1 28990 false,
-1 28991 false,
-1 28992 true,
-1 28993 true
-1 28994 );
-1 28995 }
-1 28996
-1 28997 // Check for blank value, since whitespace chars alone are not valid as a name
-1 28998 name = trim(name);
21604 28999 }
21605 29000 }
21606 29001
-1 29002 // Otherwise, if current node is the same as rootNode and is non-presentational and includes a non-empty title attribute, store title attribute value as the accessible name if name is still empty, or the description if not.
-1 29003 // Processing for this is handled within the walkDOM function.
21607 29004 if (
21608 29005 !skipTo.tag &&
21609 29006 !skipTo.role &&
21610 -1 hasName &&
21611 -1 node === refNode &&
21612 -1 btnType &&
21613 -1 ["button", "submit", "reset"].indexOf(btnType) !== -1 &&
21614 -1 btnValue &&
21615 -1 btnValue !== name &&
21616 -1 !result.desc
-1 29007 !rolePresentation &&
-1 29008 trim(nTitle)
21617 29009 ) {
21618 -1 result.desc = btnValue;
21619 -1 hasDesc = true;
-1 29010 result.title = trim(nTitle);
21620 29011 }
21621 29012
21622 -1 var isFieldset =
-1 29013 var nType = isNativeFormField && trim(node.getAttribute("type"));
-1 29014 if (!nType) nType = "text";
-1 29015 var placeholder =
21623 29016 !skipTo.tag &&
21624 29017 !skipTo.role &&
21625 -1 !hasName &&
21626 29018 node === rootNode &&
21627 -1 (nRole === "group" || (!nRole && nTag === "fieldset"));
-1 29019 node === refNode &&
-1 29020 (isEditWidgetRole ||
-1 29021 (isNativeFormField &&
-1 29022 (nTag === "textarea" ||
-1 29023 (nTag === "input" &&
-1 29024 [
-1 29025 "password",
-1 29026 "search",
-1 29027 "tel",
-1 29028 "text",
-1 29029 "url",
-1 29030 "email"
-1 29031 ].indexOf(nType) !== -1)))) &&
-1 29032 trim(
-1 29033 node.getAttribute("placeholder") ||
-1 29034 node.getAttribute("aria-placeholder")
-1 29035 );
-1 29036
-1 29037 if (placeholder) {
-1 29038 result.placeholder = placeholder;
-1 29039 }
-1 29040
-1 29041 var isSkipTo =
-1 29042 (skipTo.role && skipTo.role === nRole) ||
-1 29043 (!nRole && skipTo.tag && skipTo.tag === nTag);
21628 29044
21629 -1 // Otherwise, if name is still empty and the current node matches the root node and is a standard fieldset element with a non-empty associated legend element, process legend with same naming computation algorithm.
21630 -1 // Plus do the same for role="group" with embedded role="legend", or a combination of these.
21631 -1 if (isFieldset) {
-1 29045 // Process custom tag and role searches if needed.
-1 29046 if (isSkipTo) {
21632 29047 name = trim(
21633 -1 walk(
21634 -1 node,
21635 -1 stop,
21636 -1 false,
21637 -1 [],
21638 -1 false,
21639 -1 {
21640 -1 ref: ownedBy,
21641 -1 top: node
21642 -1 },
21643 -1 {
21644 -1 tag: "legend",
21645 -1 role: "legend",
21646 -1 go: true
21647 -1 }
21648 -1 ).name
-1 29048 walk(node, stop, false, [], false, {
-1 29049 ref: ownedBy,
-1 29050 top: node
-1 29051 }).name
21649 29052 );
21650 29053 if (trim(name)) {
21651 -1 hasName = true;
-1 29054 skip = true;
21652 29055 }
21653 -1 skip = true;
21654 29056 }
21655 29057
21656 -1 // Otherwise, if name is still empty and the root node and the current node are the same and node is an svg element, then parse the content of the title element to set the name and the desc element to set the description.
21657 -1 if (!skipTo.tag && !skipTo.role && nTag === "svg") {
21658 -1 var svgT = node.querySelector("title") || false;
21659 -1 var svgD =
21660 -1 (node === rootNode && node.querySelector("desc")) || false;
21661 -1 if (!hasName && svgT) {
21662 -1 name = trim(
21663 -1 walk(svgT, true, false, [], false, {
21664 -1 ref: ownedBy,
21665 -1 top: svgT
21666 -1 }).name
21667 -1 );
21668 -1 if (trim(name)) {
21669 -1 hasName = true;
21670 -1 }
21671 -1 }
21672 -1 if (!hasDesc && svgD) {
21673 -1 var dE = trim(
21674 -1 walk(svgD, true, false, [], false, {
21675 -1 ref: ownedBy,
21676 -1 top: svgD
21677 -1 }).name
21678 -1 );
21679 -1 if (trim(dE)) {
21680 -1 result.desc = dE;
21681 -1 hasDesc = true;
-1 29058 // Check for non-empty value of aria-owns, follow each ID ref, then process with same naming computation.
-1 29059 // Also abort aria-owns processing if contained on an element that does not support child elements.
-1 29060 if (
-1 29061 !isSkipTo &&
-1 29062 aOwns &&
-1 29063 ["input", "img", "progress"].indexOf(nTag) === -1
-1 29064 ) {
-1 29065 ids = aOwns.split(/\s+/);
-1 29066 parts = [];
-1 29067 for (i = 0; i < ids.length; i++) {
-1 29068 element = docO.getElementById(ids[i]);
-1 29069 // Abort processing if the referenced node has already been traversed
-1 29070 if (element && owns.indexOf(ids[i]) === -1) {
-1 29071 owns.push(ids[i]);
-1 29072 var oBy = { ref: ownedBy, top: ownedBy.top };
-1 29073 oBy[ids[i]] = {
-1 29074 refNode: refNode,
-1 29075 node: node,
-1 29076 target: element
-1 29077 };
-1 29078 if (!isParentHidden(element, docO.body, true)) {
-1 29079 parts.push(
-1 29080 walk(element, true, skip, [], false, oBy).name
-1 29081 );
-1 29082 }
21682 29083 }
21683 29084 }
21684 -1 result.skip = true;
-1 29085 // Join without adding whitespace since this is already handled by parsing individual nodes within the algorithm steps.
-1 29086 ariaO = parts.join("");
21685 29087 }
21686 29088 }
21687 29089
21688 -1 // Otherwise, if the current node is a nested widget control within the parent ref obj, then add only its value and process no deeper within the branch.
21689 -1 if (!skipTo.tag && !skipTo.role && isSeparatChildFormField) {
21690 -1 // Prevent the referencing node from having its value included in the case of form control labels that contain the element with focus.
21691 -1 if (
21692 -1 !(
21693 -1 nodesToIgnoreValues &&
21694 -1 nodesToIgnoreValues.length &&
21695 -1 nodesToIgnoreValues.indexOf(node) !== -1
21696 -1 )
21697 -1 ) {
21698 -1 if (isRangeWidgetRole) {
21699 -1 // For range widgets, append aria-valuetext if non-empty, or aria-valuenow if non-empty, or node.value if applicable.
21700 -1 name = getObjectValue(nRole, node, true);
21701 -1 } else if (
21702 -1 isEditWidgetRole ||
21703 -1 (nRole === "combobox" && isNativeFormField)
21704 -1 ) {
21705 -1 // For simulated edit widgets, append text from content if applicable, or node.value if applicable.
21706 -1 name = getObjectValue(nRole, node, false, true);
21707 -1 } else if (isSelectWidgetRole) {
21708 -1 // For simulated select widgets, append same naming computation algorithm for all child nodes including aria-selected="true" separated by a space when multiple.
21709 -1 // Also filter nodes so that only valid child roles of relevant parent role that include aria-selected="true" are included.
21710 -1 name = getObjectValue(nRole, node, false, false, true);
21711 -1 } else if (
21712 -1 isNativeFormField &&
21713 -1 ["input", "textarea"].indexOf(nTag) !== -1 &&
21714 -1 (!isWidgetRole || isEditWidgetRole)
21715 -1 ) {
21716 -1 // For native edit fields, append node.value when applicable.
21717 -1 name = getObjectValue(nRole, node, false, false, false, true);
21718 -1 } else if (
21719 -1 isNativeFormField &&
21720 -1 nTag === "select" &&
21721 -1 (!isWidgetRole || nRole === "combobox")
21722 -1 ) {
21723 -1 // For native select fields, get text from content for all options with selected attribute separated by a space when multiple, but don't process if another widget role is present unless it matches role="combobox".
21724 -1 // Reference: https://github.com/WhatSock/w3c-alternative-text-computation/issues/7
21725 -1 name = getObjectValue(nRole, node, false, false, true, true);
21726 -1 }
21727 -1
21728 -1 // Check for blank value, since whitespace chars alone are not valid as a name
21729 -1 name = trim(name);
21730 -1 }
-1 29090 // Otherwise, process text node
-1 29091 else if (!skipTo.tag && !skipTo.role && node.nodeType === 3) {
-1 29092 name = node.data;
-1 29093 }
21731 29094
21732 -1 if (trim(name)) {
21733 -1 hasName = true;
21734 -1 }
-1 29095 if (!hLabel) {
-1 29096 // Prepend and append the current CSS pseudo element text, plus normalize all whitespace such as newline characters and others into flat spaces.
-1 29097 name = cssO.before + name.replace(/\s+/g, " ") + cssO.after;
21735 29098 }
21736 29099
21737 -1 // Otherwise, if current node is the same as rootNode and is non-presentational and includes a non-empty title attribute, store title attribute value as the accessible name if name is still empty, or the description if not.
21738 -1 // Processing for this is handled within the walkDOM function.
21739 29100 if (
21740 -1 !skipTo.tag &&
21741 -1 !skipTo.role &&
21742 -1 !rolePresentation &&
21743 -1 trim(nTitle)
-1 29101 name.length &&
-1 29102 !hasParentLabelOrHidden(node, ownedBy.top, ownedBy, ignoreHidden)
21744 29103 ) {
21745 -1 result.title = trim(nTitle);
-1 29104 result.name = name;
21746 29105 }
21747 29106
21748 -1 var isSkipTo =
21749 -1 (skipTo.role && skipTo.role === nRole) ||
21750 -1 (!nRole && skipTo.tag && skipTo.tag === nTag);
-1 29107 result.owns = ariaO;
21751 29108
21752 -1 // Process custom tag and role searches such as fieldset directing AccName to the first legend.
21753 -1 if (isSkipTo) {
21754 -1 name = trim(
21755 -1 walk(node, stop, false, [], false, {
21756 -1 ref: ownedBy,
21757 -1 top: node
21758 -1 }).name
21759 -1 );
21760 -1 if (trim(name)) {
21761 -1 hasName = true;
21762 -1 skip = true;
21763 -1 }
21764 -1 }
21765 -1
21766 -1 // Check for non-empty value of aria-owns, follow each ID ref, then process with same naming computation.
21767 -1 // Also abort aria-owns processing if contained on an element that does not support child elements.
21768 -1 if (!isSkipTo && aOwns && !isNativeFormField && nTag !== "img") {
21769 -1 ids = aOwns.split(/\s+/);
21770 -1 parts = [];
21771 -1 for (i = 0; i < ids.length; i++) {
21772 -1 element = docO.getElementById(ids[i]);
21773 -1 // Abort processing if the referenced node has already been traversed
21774 -1 if (element && owns.indexOf(ids[i]) === -1) {
21775 -1 owns.push(ids[i]);
21776 -1 var oBy = { ref: ownedBy, top: ownedBy.top };
21777 -1 oBy[ids[i]] = {
21778 -1 refNode: refNode,
21779 -1 node: node,
21780 -1 target: element
21781 -1 };
21782 -1 if (!isParentHidden(element, docO.body, true)) {
21783 -1 parts.push(walk(element, true, skip, [], false, oBy).name);
21784 -1 }
21785 -1 }
21786 -1 }
21787 -1 // Join without adding whitespace since this is already handled by parsing individual nodes within the algorithm steps.
21788 -1 ariaO = parts.join("");
21789 -1 }
21790 -1 }
-1 29109 return result;
-1 29110 },
-1 29111 refNode
-1 29112 );
21791 29113
21792 -1 // Otherwise, process text node
21793 -1 else if (!skipTo.tag && !skipTo.role && node.nodeType === 3) {
21794 -1 name = node.data;
21795 -1 }
-1 29114 if (!hasLabel) {
-1 29115 // Prepend and append the refObj CSS pseudo element text, plus normalize whitespace chars into flat spaces.
-1 29116 fullResult.name =
-1 29117 cssOP.before + fullResult.name.replace(/\s+/g, " ") + cssOP.after;
-1 29118 }
21796 29119
21797 -1 // Prepend and append the current CSS pseudo element text, plus normalize all whitespace such as newline characters and others into flat spaces.
21798 -1 name = cssO.before + name.replace(/\s+/g, " ") + cssO.after;
-1 29120 return fullResult;
-1 29121 };
21799 29122
-1 29123 var firstChild = function(e, t, r, s) {
-1 29124 e = e ? e.firstChild : null;
-1 29125 while (e) {
-1 29126 var tr = getRole(e) || false;
21800 29127 if (
21801 -1 name.length &&
21802 -1 !hasParentLabelOrHidden(node, ownedBy.top, ownedBy, ignoreHidden)
-1 29128 e.nodeType === 1 &&
-1 29129 ((!t && !r) ||
-1 29130 (tr && r && r.indexOf(tr) !== -1) ||
-1 29131 (!tr && t && t.indexOf(e.nodeName.toLowerCase()) !== -1))
21803 29132 ) {
21804 -1 result.name = name;
-1 29133 return e;
-1 29134 } else if (!s && e.nodeType === 1 && (t || r)) {
-1 29135 return null;
21805 29136 }
-1 29137 e = e.nextSibling;
-1 29138 }
-1 29139 return e;
-1 29140 };
21806 29141
21807 -1 result.owns = ariaO;
21808 -1
21809 -1 return result;
21810 -1 },
21811 -1 refNode
21812 -1 );
21813 -1
21814 -1 // Prepend and append the refObj CSS pseudo element text, plus normalize whitespace chars into flat spaces.
21815 -1 fullResult.name =
21816 -1 cssOP.before + fullResult.name.replace(/\s+/g, " ") + cssOP.after;
21817 -1
21818 -1 return fullResult;
21819 -1 };
-1 29142 var lastChild = function(e, t, r, s) {
-1 29143 e = e ? e.lastChild : null;
-1 29144 while (e) {
-1 29145 var tr = getRole(e) || false;
-1 29146 if (
-1 29147 e.nodeType === 1 &&
-1 29148 ((!t && !r) ||
-1 29149 (tr && r && r.indexOf(tr) !== -1) ||
-1 29150 (!tr && t && t.indexOf(e.nodeName.toLowerCase()) !== -1))
-1 29151 ) {
-1 29152 return e;
-1 29153 } else if (!s && e.nodeType === 1 && (t || r)) {
-1 29154 return null;
-1 29155 }
-1 29156 e = e.previousSibling;
-1 29157 }
-1 29158 return e;
-1 29159 };
21820 29160
21821 -1 var getRole = function(node) {
21822 -1 var role = node && node.getAttribute ? node.getAttribute("role") : "";
21823 -1 if (!trim(role)) {
-1 29161 var getRole = function(node) {
-1 29162 var role = node && node.getAttribute ? node.getAttribute("role") : "";
-1 29163 if (!trim(role)) {
-1 29164 return "";
-1 29165 }
-1 29166 var inList = function(list) {
-1 29167 return trim(role).length > 0 && list.roles.indexOf(role) >= 0;
-1 29168 };
-1 29169 var roles = role.split(/\s+/);
-1 29170 for (var i = 0; i < roles.length; i++) {
-1 29171 role = roles[i];
-1 29172 if (
-1 29173 inList(list1) ||
-1 29174 inList(list2) ||
-1 29175 inList(list3) ||
-1 29176 inList(list4) ||
-1 29177 presentationRoles.indexOf(role) !== -1
-1 29178 ) {
-1 29179 return role;
-1 29180 }
-1 29181 }
21824 29182 return "";
21825 -1 }
21826 -1 var inList = function(list) {
21827 -1 return trim(role).length > 0 && list.roles.indexOf(role) >= 0;
21828 29183 };
21829 -1 var roles = role.split(/\s+/);
21830 -1 for (var i = 0; i < roles.length; i++) {
21831 -1 role = roles[i];
21832 -1 if (
21833 -1 inList(list1) ||
21834 -1 inList(list2) ||
21835 -1 inList(list3) ||
21836 -1 inList(list4) ||
21837 -1 presentationRoles.indexOf(role) !== -1
21838 -1 ) {
21839 -1 return role;
21840 -1 }
21841 -1 }
21842 -1 return "";
21843 -1 };
21844 29184
21845 -1 var isFocusable = function(node) {
21846 -1 var nodeName = node.nodeName.toLowerCase();
21847 -1 if (node.getAttribute("tabindex")) {
21848 -1 return true;
21849 -1 }
21850 -1 if (nodeName === "a" && node.getAttribute("href")) {
21851 -1 return true;
21852 -1 }
21853 -1 if (
21854 -1 ["button", "input", "select", "textarea"].indexOf(nodeName) !== -1 &&
21855 -1 node.getAttribute("type") !== "hidden"
21856 -1 ) {
21857 -1 return true;
21858 -1 }
21859 -1 return false;
21860 -1 };
-1 29185 var isFocusable = function(node) {
-1 29186 var nodeName = node.nodeName.toLowerCase();
-1 29187 if (node.getAttribute("tabindex")) {
-1 29188 return true;
-1 29189 }
-1 29190 if (nodeName === "a" && node.getAttribute("href")) {
-1 29191 return true;
-1 29192 }
-1 29193 return (
-1 29194 ["button", "input", "select", "textarea"].indexOf(nodeName) !== -1 &&
-1 29195 node.getAttribute("type") !== "hidden"
-1 29196 );
-1 29197 };
21861 29198
21862 -1 // ARIA Role Exception Rule Set 1.1
21863 -1 // The following Role Exception Rule Set is based on the following ARIA Working Group discussion involving all relevant browser venders.
21864 -1 // https://lists.w3.org/Archives/Public/public-aria/2017Jun/0057.html
-1 29199 // ARIA Role Exception Rule Set 1.1
-1 29200 // The following Role Exception Rule Set is based on the following ARIA Working Group discussion involving all relevant browser venders.
-1 29201 // https://lists.w3.org/Archives/Public/public-aria/2017Jun/0057.html
-1 29202
-1 29203 // Always include name from content when the referenced node matches list1, as well as when child nodes match those within list3
-1 29204 // Note: gridcell was added to list1 to account for focusable gridcells that match the ARIA 1.0 paradigm for interactive grids.
-1 29205 // So too was row to match 'name from author' and 'name from content' in accordance with the spec.
-1 29206 var list1 = {
-1 29207 roles: [
-1 29208 "button",
-1 29209 "checkbox",
-1 29210 "link",
-1 29211 "option",
-1 29212 "radio",
-1 29213 "switch",
-1 29214 "tab",
-1 29215 "treeitem",
-1 29216 "menuitem",
-1 29217 "menuitemcheckbox",
-1 29218 "menuitemradio",
-1 29219 "row",
-1 29220 "cell",
-1 29221 "gridcell",
-1 29222 "columnheader",
-1 29223 "rowheader",
-1 29224 "tooltip",
-1 29225 "heading"
-1 29226 ],
-1 29227 tags: [
-1 29228 "a",
-1 29229 "button",
-1 29230 "summary",
-1 29231 "input",
-1 29232 "h1",
-1 29233 "h2",
-1 29234 "h3",
-1 29235 "h4",
-1 29236 "h5",
-1 29237 "h6",
-1 29238 "menuitem",
-1 29239 "option",
-1 29240 "tr",
-1 29241 "td",
-1 29242 "th"
-1 29243 ]
-1 29244 };
-1 29245 // Never include name from content when current node matches list2
-1 29246 // The rowgroup role was added to prevent 'name from content' in accordance with relevant ARIA 1.1 spec changes.
-1 29247 // The fieldset element and group role was added to account for implicit mappings where name from content is not supported.
-1 29248 var list2 = {
-1 29249 roles: [
-1 29250 "application",
-1 29251 "alert",
-1 29252 "log",
-1 29253 "marquee",
-1 29254 "timer",
-1 29255 "alertdialog",
-1 29256 "dialog",
-1 29257 "banner",
-1 29258 "complementary",
-1 29259 "form",
-1 29260 "main",
-1 29261 "navigation",
-1 29262 "region",
-1 29263 "search",
-1 29264 "article",
-1 29265 "document",
-1 29266 "feed",
-1 29267 "figure",
-1 29268 "img",
-1 29269 "math",
-1 29270 "toolbar",
-1 29271 "menu",
-1 29272 "menubar",
-1 29273 "grid",
-1 29274 "listbox",
-1 29275 "radiogroup",
-1 29276 "textbox",
-1 29277 "searchbox",
-1 29278 "spinbutton",
-1 29279 "scrollbar",
-1 29280 "slider",
-1 29281 "tablist",
-1 29282 "tabpanel",
-1 29283 "tree",
-1 29284 "treegrid",
-1 29285 "separator",
-1 29286 "rowgroup",
-1 29287 "group"
-1 29288 ],
-1 29289 tags: [
-1 29290 "article",
-1 29291 "aside",
-1 29292 "body",
-1 29293 "select",
-1 29294 "datalist",
-1 29295 "optgroup",
-1 29296 "dialog",
-1 29297 "figure",
-1 29298 "footer",
-1 29299 "form",
-1 29300 "header",
-1 29301 "hr",
-1 29302 "img",
-1 29303 "textarea",
-1 29304 "input",
-1 29305 "main",
-1 29306 "math",
-1 29307 "menu",
-1 29308 "nav",
-1 29309 "section",
-1 29310 "thead",
-1 29311 "tbody",
-1 29312 "tfoot",
-1 29313 "fieldset"
-1 29314 ]
-1 29315 };
-1 29316 // As an override of list2, conditionally include name from content if current node is focusable, or if the current node matches list3 while the referenced parent node (root node) matches list1.
-1 29317 var list3 = {
-1 29318 roles: [
-1 29319 "term",
-1 29320 "definition",
-1 29321 "directory",
-1 29322 "list",
-1 29323 "note",
-1 29324 "status",
-1 29325 "table",
-1 29326 "contentinfo"
-1 29327 ],
-1 29328 tags: ["dl", "ul", "ol", "dd", "details", "output", "table"]
-1 29329 };
-1 29330 // Subsequent roles added as part of the Role Parity project for ARIA 1.2.
-1 29331 // Tracks roles that don't specifically belong within the prior process lists.
-1 29332 var list4 = {
-1 29333 roles: ["legend", "caption"],
-1 29334 tags: ["legend", "caption", "figcaption"]
-1 29335 };
21865 29336
21866 -1 // Always include name from content when the referenced node matches list1, as well as when child nodes match those within list3
21867 -1 // Note: gridcell was added to list1 to account for focusable gridcells that match the ARIA 1.0 paradigm for interactive grids.
21868 -1 // So too was row to match 'name from author' and 'name from content' in accordance with the spec.
21869 -1 var list1 = {
21870 -1 roles: [
-1 29337 var nativeFormFields = ["button", "input", "select", "textarea"];
-1 29338 var rangeWidgetRoles = ["scrollbar", "slider", "spinbutton"];
-1 29339 var editWidgetRoles = ["searchbox", "textbox"];
-1 29340 var selectWidgetRoles = [
-1 29341 "grid",
-1 29342 "listbox",
-1 29343 "tablist",
-1 29344 "tree",
-1 29345 "treegrid"
-1 29346 ];
-1 29347 var otherWidgetRoles = [
21871 29348 "button",
21872 29349 "checkbox",
21873 29350 "link",
21874 -1 "option",
21875 -1 "radio",
21876 29351 "switch",
21877 -1 "tab",
21878 -1 "treeitem",
21879 -1 "menuitem",
21880 -1 "menuitemcheckbox",
21881 -1 "menuitemradio",
21882 -1 "row",
21883 -1 "cell",
21884 -1 "gridcell",
21885 -1 "columnheader",
21886 -1 "rowheader",
21887 -1 "tooltip",
21888 -1 "heading"
21889 -1 ],
21890 -1 tags: [
21891 -1 "a",
21892 -1 "button",
21893 -1 "summary",
21894 -1 "input",
21895 -1 "h1",
21896 -1 "h2",
21897 -1 "h3",
21898 -1 "h4",
21899 -1 "h5",
21900 -1 "h6",
21901 -1 "menuitem",
21902 29352 "option",
21903 -1 "tr",
21904 -1 "td",
21905 -1 "th"
21906 -1 ]
21907 -1 };
21908 -1 // Never include name from content when current node matches list2
21909 -1 // The rowgroup role was added to prevent 'name from content' in accordance with relevant ARIA 1.1 spec changes.
21910 -1 // The fieldset element and group role was added to account for implicit mappings where name from content is not supported.
21911 -1 var list2 = {
21912 -1 roles: [
21913 -1 "application",
21914 -1 "alert",
21915 -1 "log",
21916 -1 "marquee",
21917 -1 "timer",
21918 -1 "alertdialog",
21919 -1 "dialog",
21920 -1 "banner",
21921 -1 "complementary",
21922 -1 "form",
21923 -1 "main",
21924 -1 "navigation",
21925 -1 "region",
21926 -1 "search",
21927 -1 "article",
21928 -1 "document",
21929 -1 "feed",
21930 -1 "figure",
21931 -1 "img",
21932 -1 "math",
21933 -1 "toolbar",
21934 29353 "menu",
21935 29354 "menubar",
21936 -1 "grid",
21937 -1 "listbox",
21938 -1 "radiogroup",
21939 -1 "textbox",
21940 -1 "searchbox",
21941 -1 "spinbutton",
21942 -1 "scrollbar",
21943 -1 "slider",
21944 -1 "tablist",
21945 -1 "tabpanel",
21946 -1 "tree",
21947 -1 "treegrid",
21948 -1 "separator",
21949 -1 "rowgroup",
21950 -1 "group"
21951 -1 ],
21952 -1 tags: [
21953 -1 "article",
21954 -1 "aside",
21955 -1 "body",
21956 -1 "select",
21957 -1 "datalist",
21958 -1 "optgroup",
21959 -1 "dialog",
21960 -1 "figure",
21961 -1 "footer",
21962 -1 "form",
21963 -1 "header",
21964 -1 "hr",
21965 -1 "img",
21966 -1 "textarea",
21967 -1 "input",
21968 -1 "main",
21969 -1 "math",
21970 -1 "menu",
21971 -1 "nav",
21972 -1 "section",
21973 -1 "thead",
21974 -1 "tbody",
21975 -1 "tfoot",
21976 -1 "fieldset"
21977 -1 ]
21978 -1 };
21979 -1 // As an override of list2, conditionally include name from content if current node is focusable, or if the current node matches list3 while the referenced parent node (root node) matches list1.
21980 -1 var list3 = {
21981 -1 roles: [
21982 -1 "term",
21983 -1 "definition",
21984 -1 "directory",
21985 -1 "list",
21986 -1 "note",
21987 -1 "status",
21988 -1 "table",
21989 -1 "contentinfo"
21990 -1 ],
21991 -1 tags: ["dl", "ul", "ol", "dd", "details", "output", "table"]
21992 -1 };
21993 -1 // Subsequent roles added as part of the Role Parity project for ARIA 1.2.
21994 -1 // Tracks roles that don't specifically belong within the prior process lists.
21995 -1 var list4 = {
21996 -1 roles: ["legend"],
21997 -1 tags: ["legend"]
21998 -1 };
21999 -1
22000 -1 var nativeFormFields = ["button", "input", "select", "textarea"];
22001 -1 var rangeWidgetRoles = ["scrollbar", "slider", "spinbutton"];
22002 -1 var editWidgetRoles = ["searchbox", "textbox"];
22003 -1 var selectWidgetRoles = ["grid", "listbox", "tablist", "tree", "treegrid"];
22004 -1 var otherWidgetRoles = [
22005 -1 "button",
22006 -1 "checkbox",
22007 -1 "link",
22008 -1 "switch",
22009 -1 "option",
22010 -1 "menu",
22011 -1 "menubar",
22012 -1 "menuitem",
22013 -1 "menuitemcheckbox",
22014 -1 "menuitemradio",
22015 -1 "radio",
22016 -1 "tab",
22017 -1 "treeitem",
22018 -1 "gridcell"
22019 -1 ];
22020 -1 var presentationRoles = ["presentation", "none"];
22021 -1
22022 -1 var hasGlobalAttr = function(node) {
22023 -1 var globalPropsAndStates = [
22024 -1 "labelledby",
22025 -1 "label",
22026 -1 "describedby",
22027 -1 "busy",
22028 -1 "controls",
22029 -1 "current",
22030 -1 "details",
22031 -1 "disabled",
22032 -1 "dropeffect",
22033 -1 "errormessage",
22034 -1 "flowto",
22035 -1 "grabbed",
22036 -1 "haspopup",
22037 -1 "invalid",
22038 -1 "keyshortcuts",
22039 -1 "live",
22040 -1 "owns",
22041 -1 "roledescription"
-1 29355 "menuitem",
-1 29356 "menuitemcheckbox",
-1 29357 "menuitemradio",
-1 29358 "radio",
-1 29359 "tab",
-1 29360 "treeitem",
-1 29361 "gridcell"
22042 29362 ];
22043 -1 for (var i = 0; i < globalPropsAndStates.length; i++) {
22044 -1 var a = trim(node.getAttribute("aria-" + globalPropsAndStates[i]));
22045 -1 if (a) {
22046 -1 return true;
22047 -1 }
22048 -1 }
22049 -1 return false;
22050 -1 };
22051 -1
22052 -1 var isHidden =
22053 -1 overrides.isHidden ||
22054 -1 function(node, refNode) {
22055 -1 var hidden = function(node) {
22056 -1 if (!node || node.nodeType !== 1 || node === refNode) {
22057 -1 return false;
22058 -1 }
22059 -1 if (node.getAttribute("aria-hidden") === "true") {
22060 -1 return true;
22061 -1 }
22062 -1 if (node.getAttribute("hidden")) {
22063 -1 return true;
22064 -1 }
22065 -1 var style = getStyleObject(node);
22066 -1 if (style["display"] === "none" || style["visibility"] === "hidden") {
-1 29363 var presentationRoles = ["presentation", "none"];
-1 29364
-1 29365 var hasGlobalAttr = function(node) {
-1 29366 var globalPropsAndStates = [
-1 29367 "labelledby",
-1 29368 "label",
-1 29369 "describedby",
-1 29370 "busy",
-1 29371 "controls",
-1 29372 "current",
-1 29373 "details",
-1 29374 "disabled",
-1 29375 "dropeffect",
-1 29376 "errormessage",
-1 29377 "flowto",
-1 29378 "grabbed",
-1 29379 "haspopup",
-1 29380 "invalid",
-1 29381 "keyshortcuts",
-1 29382 "live",
-1 29383 "owns",
-1 29384 "roledescription"
-1 29385 ];
-1 29386 for (var i = 0; i < globalPropsAndStates.length; i++) {
-1 29387 var a = trim(node.getAttribute("aria-" + globalPropsAndStates[i]));
-1 29388 if (a) {
22067 29389 return true;
22068 29390 }
22069 -1 return false;
22070 -1 };
22071 -1 return hidden(node);
-1 29391 }
-1 29392 return false;
22072 29393 };
22073 29394
22074 -1 var isParentHidden = function(node, refNode, skipOwned, skipCurrent) {
22075 -1 while (node && node !== refNode) {
22076 -1 if (!skipCurrent && node.nodeType === 1 && isHidden(node, refNode)) {
22077 -1 return true;
22078 -1 } else skipCurrent = false;
22079 -1 node = node.parentNode;
22080 -1 }
22081 -1 return false;
22082 -1 };
-1 29395 var isHidden =
-1 29396 overrides.isHidden ||
-1 29397 function(node, refNode) {
-1 29398 var hidden = function(node) {
-1 29399 if (!node || node.nodeType !== 1 || node === refNode) {
-1 29400 return false;
-1 29401 }
-1 29402 if (node.getAttribute("aria-hidden") === "true") {
-1 29403 return true;
-1 29404 }
-1 29405 if (node.getAttribute("hidden")) {
-1 29406 return true;
-1 29407 }
-1 29408 var style = getStyleObject(node);
-1 29409 return (
-1 29410 style["display"] === "none" || style["visibility"] === "hidden"
-1 29411 );
-1 29412 };
-1 29413 return hidden(node);
-1 29414 };
22083 29415
22084 -1 var getStyleObject =
22085 -1 overrides.getStyleObject ||
22086 -1 function(node) {
22087 -1 var style = {};
22088 -1 if (docO.defaultView && docO.defaultView.getComputedStyle) {
22089 -1 style = docO.defaultView.getComputedStyle(node, "");
22090 -1 } else if (node.currentStyle) {
22091 -1 style = node.currentStyle;
-1 29416 var isParentHidden = function(node, refNode, skipOwned, skipCurrent) {
-1 29417 while (node && node !== refNode) {
-1 29418 if (!skipCurrent && node.nodeType === 1 && isHidden(node, refNode)) {
-1 29419 return true;
-1 29420 } else skipCurrent = false;
-1 29421 node = node.parentNode;
22092 29422 }
22093 -1 return style;
-1 29423 return false;
22094 29424 };
22095 29425
22096 -1 var cleanCSSText = function(node, text) {
22097 -1 var s = text;
22098 -1 if (s.indexOf("attr(") !== -1) {
22099 -1 var m = s.match(/attr\((.|\n|\r\n)*?\)/g);
22100 -1 for (var i = 0; i < m.length; i++) {
22101 -1 var b = m[i].slice(5, -1);
22102 -1 b = node.getAttribute(b) || "";
22103 -1 s = s.replace(m[i], b);
-1 29426 var getStyleObject =
-1 29427 overrides.getStyleObject ||
-1 29428 function(node) {
-1 29429 var style = {};
-1 29430 if (docO.defaultView && docO.defaultView.getComputedStyle) {
-1 29431 style = docO.defaultView.getComputedStyle(node, "");
-1 29432 } else if (node.currentStyle) {
-1 29433 style = node.currentStyle;
-1 29434 }
-1 29435 return style;
-1 29436 };
-1 29437
-1 29438 var cleanCSSText = function(node, text) {
-1 29439 var s = text;
-1 29440 if (s.indexOf("attr(") !== -1) {
-1 29441 var m = s.match(/attr\((.|\n|\r\n)*?\)/g);
-1 29442 for (var i = 0; i < m.length; i++) {
-1 29443 var b = m[i].slice(5, -1);
-1 29444 b = node.getAttribute(b) || "";
-1 29445 s = s.replace(m[i], b);
-1 29446 }
22104 29447 }
22105 -1 }
22106 -1 return s || text;
22107 -1 };
-1 29448 return s || text;
-1 29449 };
22108 29450
22109 -1 var isBlockLevelElement = function(node, cssObj) {
22110 -1 var styleObject = cssObj || getStyleObject(node);
22111 -1 for (var prop in blockStyles) {
22112 -1 var values = blockStyles[prop];
22113 -1 for (var i = 0; i < values.length; i++) {
22114 -1 if (
22115 -1 styleObject[prop] &&
22116 -1 ((values[i].indexOf("!") === 0 &&
22117 -1 [values[i].slice(1), "inherit", "initial", "unset"].indexOf(
22118 -1 styleObject[prop]
22119 -1 ) === -1) ||
22120 -1 styleObject[prop].indexOf(values[i]) === 0)
22121 -1 ) {
22122 -1 return true;
-1 29451 var isBlockLevelElement = function(node, cssObj) {
-1 29452 var styleObject = cssObj || getStyleObject(node);
-1 29453 for (var prop in blockStyles) {
-1 29454 var values = blockStyles[prop];
-1 29455 for (var i = 0; i < values.length; i++) {
-1 29456 if (
-1 29457 styleObject[prop] &&
-1 29458 ((values[i].indexOf("!") === 0 &&
-1 29459 [values[i].slice(1), "inherit", "initial", "unset"].indexOf(
-1 29460 styleObject[prop]
-1 29461 ) === -1) ||
-1 29462 styleObject[prop].indexOf(values[i]) === 0)
-1 29463 ) {
-1 29464 return true;
-1 29465 }
22123 29466 }
22124 29467 }
22125 -1 }
22126 -1 if (
22127 -1 !cssObj &&
22128 -1 node.nodeName &&
22129 -1 blockElements.indexOf(node.nodeName.toLowerCase()) !== -1 &&
22130 -1 !(
22131 -1 styleObject["display"] &&
22132 -1 styleObject["display"].indexOf("inline") === 0 &&
22133 -1 node.nodeName.toLowerCase() !== "br"
22134 -1 )
22135 -1 ) {
22136 -1 return true;
22137 -1 }
22138 -1 return false;
22139 -1 };
-1 29468 return (
-1 29469 !cssObj &&
-1 29470 node.nodeName &&
-1 29471 blockElements.indexOf(node.nodeName.toLowerCase()) !== -1 &&
-1 29472 !(
-1 29473 styleObject["display"] &&
-1 29474 styleObject["display"].indexOf("inline") === 0 &&
-1 29475 node.nodeName.toLowerCase() !== "br"
-1 29476 )
-1 29477 );
-1 29478 };
22140 29479
22141 -1 // CSS Block Styles indexed from:
22142 -1 // https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
22143 -1 var blockStyles = {
22144 -1 display: ["block", "grid", "table", "flow-root", "flex"],
22145 -1 position: ["absolute", "fixed"],
22146 -1 float: ["left", "right", "inline"],
22147 -1 clear: ["left", "right", "both", "inline"],
22148 -1 overflow: ["hidden", "scroll", "auto"],
22149 -1 "column-count": ["!auto"],
22150 -1 "column-width": ["!auto"],
22151 -1 "column-span": ["all"],
22152 -1 contain: ["layout", "content", "strict"]
22153 -1 };
-1 29480 // CSS Block Styles indexed from:
-1 29481 // https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
-1 29482 var blockStyles = {
-1 29483 display: ["block", "grid", "table", "flow-root", "flex"],
-1 29484 position: ["absolute", "fixed"],
-1 29485 float: ["left", "right", "inline"],
-1 29486 clear: ["left", "right", "both", "inline"],
-1 29487 overflow: ["hidden", "scroll", "auto"],
-1 29488 "column-count": ["!auto"],
-1 29489 "column-width": ["!auto"],
-1 29490 "column-span": ["all"],
-1 29491 contain: ["layout", "content", "strict"]
-1 29492 };
22154 29493
22155 -1 // HTML5 Block Elements indexed from:
22156 -1 // https://github.com/webmodules/block-elements
22157 -1 // Note: 'br' was added to this array because it impacts visual display and should thus add a space .
22158 -1 // Reference issue: https://github.com/w3c/accname/issues/4
22159 -1 // Note: Added in 1.13, td, th, tr, and legend
22160 -1 var blockElements = [
22161 -1 "address",
22162 -1 "article",
22163 -1 "aside",
22164 -1 "blockquote",
22165 -1 "br",
22166 -1 "canvas",
22167 -1 "dd",
22168 -1 "div",
22169 -1 "dl",
22170 -1 "dt",
22171 -1 "fieldset",
22172 -1 "figcaption",
22173 -1 "figure",
22174 -1 "footer",
22175 -1 "form",
22176 -1 "h1",
22177 -1 "h2",
22178 -1 "h3",
22179 -1 "h4",
22180 -1 "h5",
22181 -1 "h6",
22182 -1 "header",
22183 -1 "hgroup",
22184 -1 "hr",
22185 -1 "legend",
22186 -1 "li",
22187 -1 "main",
22188 -1 "nav",
22189 -1 "noscript",
22190 -1 "ol",
22191 -1 "output",
22192 -1 "p",
22193 -1 "pre",
22194 -1 "section",
22195 -1 "table",
22196 -1 "td",
22197 -1 "tfoot",
22198 -1 "th",
22199 -1 "tr",
22200 -1 "ul",
22201 -1 "video"
22202 -1 ];
-1 29494 // HTML5 Block Elements indexed from:
-1 29495 // https://github.com/webmodules/block-elements
-1 29496 // Note: 'br' was added to this array because it impacts visual display and should thus add a space .
-1 29497 // Reference issue: https://github.com/w3c/accname/issues/4
-1 29498 // Note: Added in 1.13, td, th, tr, and legend
-1 29499 var blockElements = [
-1 29500 "address",
-1 29501 "article",
-1 29502 "aside",
-1 29503 "blockquote",
-1 29504 "br",
-1 29505 "canvas",
-1 29506 "dd",
-1 29507 "div",
-1 29508 "dl",
-1 29509 "dt",
-1 29510 "fieldset",
-1 29511 "figcaption",
-1 29512 "figure",
-1 29513 "footer",
-1 29514 "form",
-1 29515 "h1",
-1 29516 "h2",
-1 29517 "h3",
-1 29518 "h4",
-1 29519 "h5",
-1 29520 "h6",
-1 29521 "header",
-1 29522 "hgroup",
-1 29523 "hr",
-1 29524 "legend",
-1 29525 "li",
-1 29526 "main",
-1 29527 "nav",
-1 29528 "noscript",
-1 29529 "ol",
-1 29530 "output",
-1 29531 "p",
-1 29532 "pre",
-1 29533 "section",
-1 29534 "table",
-1 29535 "td",
-1 29536 "tfoot",
-1 29537 "th",
-1 29538 "tr",
-1 29539 "ul",
-1 29540 "video"
-1 29541 ];
22203 29542
22204 -1 var getObjectValue = function(
22205 -1 role,
22206 -1 node,
22207 -1 isRange,
22208 -1 isEdit,
22209 -1 isSelect,
22210 -1 isNative
22211 -1 ) {
22212 -1 var val = "";
22213 -1 var bypass = false;
22214 -1
22215 -1 if (isRange && !isNative) {
22216 -1 val =
22217 -1 node.getAttribute("aria-valuetext") ||
22218 -1 node.getAttribute("aria-valuenow") ||
22219 -1 "";
22220 -1 } else if (isEdit && !isNative) {
22221 -1 val = getText(node) || "";
22222 -1 } else if (isSelect && !isNative) {
22223 -1 var childRoles = [];
22224 -1 if (role === "grid" || role === "treegrid") {
22225 -1 childRoles = ["gridcell", "rowheader", "columnheader"];
22226 -1 } else if (role === "listbox") {
22227 -1 childRoles = ["option"];
22228 -1 } else if (role === "tablist") {
22229 -1 childRoles = ["tab"];
22230 -1 } else if (role === "tree") {
22231 -1 childRoles = ["treeitem"];
22232 -1 }
22233 -1 val = joinSelectedParts(
22234 -1 node,
22235 -1 node.querySelectorAll('*[aria-selected="true"]'),
22236 -1 false,
22237 -1 childRoles
22238 -1 );
22239 -1 bypass = true;
22240 -1 }
22241 -1 val = trim(val);
22242 -1 if (!val && (isRange || isEdit) && node.value) {
22243 -1 val = node.value;
22244 -1 }
22245 -1 if (!bypass && !val && isNative) {
22246 -1 if (isSelect) {
-1 29543 var getObjectValue = function(
-1 29544 role,
-1 29545 node,
-1 29546 isRange,
-1 29547 isEdit,
-1 29548 isSelect,
-1 29549 isNative
-1 29550 ) {
-1 29551 var val = "";
-1 29552 var bypass = false;
-1 29553
-1 29554 if (isRange && !isNative) {
-1 29555 val =
-1 29556 node.getAttribute("aria-valuetext") ||
-1 29557 node.getAttribute("aria-valuenow") ||
-1 29558 "";
-1 29559 } else if (isEdit && !isNative) {
-1 29560 val = getText(node) || "";
-1 29561 } else if (isSelect && !isNative) {
-1 29562 var childRoles = [];
-1 29563 if (role === "grid" || role === "treegrid") {
-1 29564 childRoles = ["gridcell", "rowheader", "columnheader"];
-1 29565 } else if (role === "listbox") {
-1 29566 childRoles = ["option"];
-1 29567 } else if (role === "tablist") {
-1 29568 childRoles = ["tab"];
-1 29569 } else if (role === "tree") {
-1 29570 childRoles = ["treeitem"];
-1 29571 }
22247 29572 val = joinSelectedParts(
22248 29573 node,
22249 -1 node.querySelectorAll("option[selected]"),
22250 -1 true
-1 29574 node.querySelectorAll('*[aria-selected="true"]'),
-1 29575 false,
-1 29576 childRoles
22251 29577 );
22252 -1 } else {
-1 29578 bypass = true;
-1 29579 }
-1 29580 val = trim(val);
-1 29581 if (!val && (isRange || isEdit) && node.value) {
22253 29582 val = node.value;
22254 29583 }
22255 -1 }
-1 29584 if (!bypass && !val && isNative) {
-1 29585 if (isSelect) {
-1 29586 val = joinSelectedParts(
-1 29587 node,
-1 29588 node.querySelectorAll("option[selected]"),
-1 29589 true
-1 29590 );
-1 29591 } else {
-1 29592 val = node.value;
-1 29593 }
-1 29594 }
22256 29595
22257 -1 return val;
22258 -1 };
-1 29596 return val;
-1 29597 };
22259 29598
22260 -1 var addSpacing = function(s) {
22261 -1 return trim(s).length ? " " + s + " " : " ";
22262 -1 };
-1 29599 var addSpacing = function(s) {
-1 29600 return trim(s).length ? " " + s + " " : " ";
-1 29601 };
22263 29602
22264 -1 var joinSelectedParts = function(node, nOA, isNative, childRoles) {
22265 -1 if (!nOA || !nOA.length) {
22266 -1 return "";
22267 -1 }
22268 -1 var parts = [];
22269 -1 for (var i = 0; i < nOA.length; i++) {
22270 -1 var role = getRole(nOA[i]);
22271 -1 var isValidChildRole = !childRoles || childRoles.indexOf(role) !== -1;
22272 -1 if (isValidChildRole) {
22273 -1 parts.push(
22274 -1 isNative
22275 -1 ? getText(nOA[i])
22276 -1 : walk(nOA[i], true, false, [], false, { top: nOA[i] }).name
22277 -1 );
-1 29603 var joinSelectedParts = function(node, nOA, isNative, childRoles) {
-1 29604 if (!nOA || !nOA.length) {
-1 29605 return "";
-1 29606 }
-1 29607 var parts = [];
-1 29608 for (var i = 0; i < nOA.length; i++) {
-1 29609 var role = getRole(nOA[i]);
-1 29610 var isValidChildRole = !childRoles || childRoles.indexOf(role) !== -1;
-1 29611 if (isValidChildRole) {
-1 29612 parts.push(
-1 29613 isNative
-1 29614 ? getText(nOA[i])
-1 29615 : walk(nOA[i], true, false, [], false, { top: nOA[i] }).name
-1 29616 );
-1 29617 }
22278 29618 }
22279 -1 }
22280 -1 return parts.join(" ");
22281 -1 };
-1 29619 return parts.join(" ");
-1 29620 };
22282 29621
22283 -1 var getPseudoElStyleObj =
22284 -1 overrides.getPseudoElStyleObj ||
22285 -1 function(node, position) {
22286 -1 var styleObj = {};
22287 -1 for (var prop in blockStyles) {
22288 -1 styleObj[prop] = docO.defaultView
-1 29622 var getPseudoElStyleObj =
-1 29623 overrides.getPseudoElStyleObj ||
-1 29624 function(node, position) {
-1 29625 var styleObj = {};
-1 29626 for (var prop in blockStyles) {
-1 29627 styleObj[prop] = docO.defaultView
-1 29628 .getComputedStyle(node, position)
-1 29629 .getPropertyValue(prop);
-1 29630 }
-1 29631 styleObj["content"] = docO.defaultView
22289 29632 .getComputedStyle(node, position)
22290 -1 .getPropertyValue(prop);
22291 -1 }
22292 -1 styleObj["content"] = docO.defaultView
22293 -1 .getComputedStyle(node, position)
22294 -1 .getPropertyValue("content")
22295 -1 .replace(/^"|\\|"$/g, "");
22296 -1 return styleObj;
22297 -1 };
-1 29633 .getPropertyValue("content")
-1 29634 .replace(/^"|\\|"$/g, "");
-1 29635 return styleObj;
-1 29636 };
22298 29637
22299 -1 var getText = function(node, position) {
22300 -1 if (!position && node.nodeType === 1) {
22301 -1 return node.innerText || node.textContent || "";
22302 -1 }
22303 -1 var styles = getPseudoElStyleObj(node, position);
22304 -1 var text = styles["content"];
22305 -1 if (!text || text === "none") {
22306 -1 return "";
22307 -1 }
22308 -1 if (isBlockLevelElement({}, styles)) {
22309 -1 if (position === ":before") {
22310 -1 text += " ";
22311 -1 } else if (position === ":after") {
22312 -1 text = " " + text;
-1 29638 var getText = function(node, position) {
-1 29639 if (!position && node.nodeType === 1) {
-1 29640 return node.innerText || node.textContent || "";
22313 29641 }
22314 -1 }
22315 -1 return text;
22316 -1 };
-1 29642 var styles = getPseudoElStyleObj(node, position);
-1 29643 var text = styles["content"];
-1 29644 if (!text || text === "none") {
-1 29645 return "";
-1 29646 }
-1 29647 if (isBlockLevelElement({}, styles)) {
-1 29648 if (position === ":before") {
-1 29649 text += " ";
-1 29650 } else if (position === ":after") {
-1 29651 text = " " + text;
-1 29652 }
-1 29653 }
-1 29654 return text;
-1 29655 };
22317 29656
22318 -1 var getCSSText =
22319 -1 overrides.getCSSText ||
22320 -1 function(node, refNode) {
22321 -1 if (
22322 -1 (node && node.nodeType !== 1) ||
22323 -1 node === refNode ||
22324 -1 ["input", "select", "textarea", "img", "iframe"].indexOf(
22325 -1 node.nodeName.toLowerCase()
22326 -1 ) !== -1
22327 -1 ) {
22328 -1 return { before: "", after: "" };
22329 -1 }
22330 -1 if (docO.defaultView && docO.defaultView.getComputedStyle) {
-1 29657 var getCSSText =
-1 29658 overrides.getCSSText ||
-1 29659 function(node, refNode) {
-1 29660 if (
-1 29661 (node && node.nodeType !== 1) ||
-1 29662 node === refNode ||
-1 29663 [
-1 29664 "input",
-1 29665 "select",
-1 29666 "textarea",
-1 29667 "img",
-1 29668 "iframe",
-1 29669 "optgroup"
-1 29670 ].indexOf(node.nodeName.toLowerCase()) !== -1
-1 29671 ) {
-1 29672 return { before: "", after: "" };
-1 29673 }
22331 29674 return {
22332 29675 before: cleanCSSText(node, getText(node, ":before")),
22333 29676 after: cleanCSSText(node, getText(node, ":after"))
22334 29677 };
22335 -1 } else {
22336 -1 return { before: "", after: "" };
22337 -1 }
22338 -1 };
22339 -1
22340 -1 var getParent = function(node, nTag, nRole, noRole) {
22341 -1 var noRole = noRole ? true : false;
22342 -1 while (node) {
22343 -1 node = node.parentNode;
22344 -1 if (
22345 -1 node &&
22346 -1 ((nRole && getRole(node) === nRole) ||
22347 -1 (nTag &&
22348 -1 node.nodeName &&
22349 -1 node.nodeName.toLowerCase() === nTag &&
22350 -1 (!noRole || getRole(node).length < 1)))
22351 -1 ) {
22352 -1 return node;
22353 -1 }
22354 -1 }
22355 -1 return {};
22356 -1 };
-1 29678 };
22357 29679
22358 -1 var hasParentLabelOrHidden = function(
22359 -1 node,
22360 -1 refNode,
22361 -1 ownedBy,
22362 -1 ignoreHidden
22363 -1 ) {
22364 -1 var trackNodes = [];
22365 -1 while (node && node !== refNode) {
22366 -1 if (
22367 -1 node.id &&
22368 -1 ownedBy &&
22369 -1 ownedBy[node.id] &&
22370 -1 ownedBy[node.id].node &&
22371 -1 trackNodes.indexOf(node) === -1
22372 -1 ) {
22373 -1 trackNodes.push(node);
22374 -1 node = ownedBy[node.id].node;
22375 -1 } else {
-1 29680 var getParent = function(node, nTag, nRole, noRole) {
-1 29681 noRole = !!noRole;
-1 29682 while (node) {
22376 29683 node = node.parentNode;
-1 29684 if (
-1 29685 node &&
-1 29686 ((nRole && getRole(node) === nRole) ||
-1 29687 (nTag &&
-1 29688 node.nodeName &&
-1 29689 node.nodeName.toLowerCase() === nTag &&
-1 29690 (!noRole || getRole(node).length < 1)))
-1 29691 ) {
-1 29692 return node;
-1 29693 }
22377 29694 }
22378 -1 if (node && node.getAttribute) {
-1 29695 return {};
-1 29696 };
-1 29697
-1 29698 var hasParentLabelOrHidden = function(
-1 29699 node,
-1 29700 refNode,
-1 29701 ownedBy,
-1 29702 ignoreHidden
-1 29703 ) {
-1 29704 var trackNodes = [];
-1 29705 while (node && node !== refNode) {
22379 29706 if (
22380 -1 trim(node.getAttribute("aria-label")) ||
22381 -1 (!ignoreHidden && isHidden(node, refNode))
-1 29707 node.id &&
-1 29708 ownedBy &&
-1 29709 ownedBy[node.id] &&
-1 29710 ownedBy[node.id].node &&
-1 29711 trackNodes.indexOf(node) === -1
22382 29712 ) {
22383 -1 return true;
-1 29713 trackNodes.push(node);
-1 29714 node = ownedBy[node.id].node;
-1 29715 } else {
-1 29716 node = node.parentNode;
-1 29717 }
-1 29718 if (node && node.getAttribute) {
-1 29719 if (
-1 29720 trim(node.getAttribute("aria-label")) ||
-1 29721 (!ignoreHidden && isHidden(node, refNode))
-1 29722 ) {
-1 29723 return true;
-1 29724 }
22384 29725 }
22385 29726 }
22386 -1 }
22387 -1 return false;
22388 -1 };
-1 29727 return false;
-1 29728 };
22389 29729
22390 -1 var trim = function(str) {
22391 -1 if (typeof str !== "string") {
22392 -1 return "";
-1 29730 var trim = function(str) {
-1 29731 if (typeof str !== "string") {
-1 29732 return "";
-1 29733 }
-1 29734 return str.replace(/^\s+|\s+$/g, "");
-1 29735 };
-1 29736
-1 29737 if (
-1 29738 isParentHidden(
-1 29739 node,
-1 29740 docO.body,
-1 29741 true,
-1 29742 !!(node && node.nodeName && node.nodeName.toLowerCase() === "area")
-1 29743 )
-1 29744 ) {
-1 29745 return props;
22393 29746 }
22394 -1 return str.replace(/^\s+|\s+$/g, "");
22395 -1 };
22396 29747
22397 -1 if (isParentHidden(node, docO.body, true)) {
22398 -1 return props;
22399 -1 }
-1 29748 // Compute accessible Name and Description properties value for node
-1 29749 var accProps = walk(node, false, false, [], false, { top: node });
-1 29750
-1 29751 var accName = trim(accProps.name.replace(/\s+/g, " "));
-1 29752 var accDesc = trim(accProps.title.replace(/\s+/g, " "));
22400 29753
22401 -1 // Compute accessible Name and Description properties value for node
22402 -1 var accProps = walk(node, false, false, [], false, { top: node });
-1 29754 if (accName === accDesc) {
-1 29755 // If both Name and Description properties match, then clear the Description property value.
-1 29756 accDesc = "";
-1 29757 }
22403 29758
22404 -1 var accName = trim(accProps.name.replace(/\s+/g, " "));
22405 -1 var accDesc = trim(accProps.title.replace(/\s+/g, " "));
-1 29759 props.name = accName;
-1 29760 props.desc = accDesc;
22406 29761
22407 -1 if (accName === accDesc) {
22408 -1 // If both Name and Description properties match, then clear the Description property value.
22409 -1 accDesc = "";
-1 29762 // Clear track variables
-1 29763 nodes = [];
-1 29764 owns = [];
-1 29765 } catch (e) {
-1 29766 props.error = e;
22410 29767 }
-1 29768 props.placeholder = nameFromPlaceholder;
-1 29769 props.userAgent = nameFromUserAgent;
22411 29770
22412 -1 props.name = accName;
22413 -1 props.desc = accDesc;
22414 -1
22415 -1 // Clear track variables
22416 -1 nodes = [];
22417 -1 owns = [];
22418 -1 } catch (e) {
22419 -1 props.error = e;
22420 -1 }
-1 29771 if (fnc && typeof fnc === "function") {
-1 29772 return fnc.apply(node, [props, node]);
-1 29773 } else {
-1 29774 return props;
-1 29775 }
-1 29776 };
22421 29777
22422 -1 if (fnc && typeof fnc === "function") {
22423 -1 return fnc.apply(node, [props, node]);
22424 -1 } else {
22425 -1 return props;
22426 -1 }
22427 -1 };
-1 29778 // Customize returned string for testable statements
-1 29779
-1 29780 nameSpace.getAccNameMsg = nameSpace.getNames = function(node, overrides) {
-1 29781 var props = nameSpace.getAccName(node, null, false, overrides);
-1 29782 if (props.error) {
-1 29783 return (
-1 29784 props.error +
-1 29785 "\n\n" +
-1 29786 "An error has been thrown in AccName Prototype version " +
-1 29787 nameSpace.getAccNameVersion +
-1 29788 ". Please copy this error message and the HTML markup that caused it, and submit both as a new GitHub issue at\n" +
-1 29789 "https://github.com/whatsock/w3c-alternative-text-computation"
-1 29790 );
-1 29791 }
-1 29792 var r =
-1 29793 'accName: "' + props.name + '"\n\naccDesc: "' + props.desc + '"\n\n';
-1 29794 if (props.placeholder) r += "Name from placeholder: true\n\n";
-1 29795 if (props.userAgent) r += "Name from user agent: true\n\n";
-1 29796 r +=
-1 29797 "(Running AccName Computation Prototype version: " +
-1 29798 nameSpace.getAccNameVersion +
-1 29799 ")";
-1 29800 return r;
-1 29801 };
22428 29802
22429 -1 // Customize returned string for testable statements
22430 -1
22431 -1 window.getAccNameMsg = window.getNames = function(node, overrides) {
22432 -1 var props = window.getAccName(node, null, false, overrides);
22433 -1 if (props.error) {
22434 -1 return (
22435 -1 props.error +
22436 -1 "\n\n" +
22437 -1 "An error has been thrown in AccName Prototype version " +
22438 -1 window.getAccNameVersion +
22439 -1 ". Please copy this error message and the HTML markup that caused it, and submit both as a new GitHub issue at\n" +
22440 -1 "https://github.com/whatsock/w3c-alternative-text-computation"
22441 -1 );
22442 -1 } else {
22443 -1 return (
22444 -1 'accName: "' +
22445 -1 props.name +
22446 -1 '"\n\naccDesc: "' +
22447 -1 props.desc +
22448 -1 '"\n\n(Running AccName Computation Prototype version: ' +
22449 -1 window.getAccNameVersion +
22450 -1 ")"
22451 -1 );
-1 29803 if (typeof module === "object" && module.exports) {
-1 29804 module.exports = {
-1 29805 getNames: nameSpace.getNames,
-1 29806 calcNames: nameSpace.calcNames
-1 29807 };
22452 29808 }
22453 -1 };
22454 -1
22455 -1 if (typeof module === "object" && module.exports) {
22456 -1 module.exports = {
22457 -1 getNames: window.getNames,
22458 -1 calcNames: window.calcNames
22459 -1 };
22460 -1 }
-1 29809 })();
22461 29810
22462 29811 },{}],15:[function(require,module,exports){
22463 29812 (function (global){
@@ -22510,8 +29859,8 @@ var implementations = {
22510 29859 role: ex(ariaApi.getRole, [el]),
22511 29860 };
22512 29861 },
22513 -1 'accdc (2.27)': accdc.calcNames,
22514 -1 'axe (3.2.2)': function(el) {
-1 29862 'accdc (2.42)': accdc.calcNames,
-1 29863 'axe (3.4.3)': function(el) {
22515 29864 return {
22516 29865 name: ex(function(el) {
22517 29866 axe._tree = axe.utils.getFlattenedTree(document.body);
diff --git a/fuzz.js b/fuzz.js
@@ -1050,22 +1050,22 @@ exports.labelable = [ 1050 1050 ]; 1051 1051 1052 1052 },{}],8:[function(require,module,exports){1053 -1 var cov_22i8nvh4cs=function(){var path="node_modules/aria-api/lib/name.js";var hash="5101a9b8358270f08e855ff19ea691a5651f4ed4";var global=new Function("return this")();var gcv="__coverage__";var coverageData={path:"/home/tobias/code/a11y/babelacc/node_modules/aria-api/lib/name.js",statementMap:{"0":{start:{line:1,column:16},end:{line:1,column:41}},"1":{start:{line:2,column:12},end:{line:2,column:33}},"2":{start:{line:3,column:12},end:{line:3,column:33}},"3":{start:{line:5,column:23},end:{line:21,column:1}},"4":{start:{line:6,column:14},end:{line:6,column:53}},"5":{start:{line:7,column:11},end:{line:7,column:45}},"6":{start:{line:8,column:14},end:{line:8,column:54}},"7":{start:{line:9,column:1},end:{line:11,column:2}},"8":{start:{line:10,column:2},end:{line:10,column:12}},"9":{start:{line:12,column:1},end:{line:20,column:2}},"10":{start:{line:13,column:2},end:{line:13,column:12}},"11":{start:{line:15,column:2},end:{line:19,column:3}},"12":{start:{line:16,column:3},end:{line:16,column:27}},"13":{start:{line:18,column:3},end:{line:18,column:39}},"14":{start:{line:23,column:17},end:{line:45,column:1}},"15":{start:{line:24,column:16},end:{line:24,column:41}},"16":{start:{line:26,column:11},end:{line:26,column:13}},"17":{start:{line:27,column:1},end:{line:42,column:2}},"18":{start:{line:27,column:14},end:{line:27,column:15}},"19":{start:{line:28,column:13},end:{line:28,column:24}},"20":{start:{line:29,column:2},end:{line:41,column:3}},"21":{start:{line:30,column:3},end:{line:30,column:27}},"22":{start:{line:31,column:9},end:{line:41,column:3}},"23":{start:{line:32,column:3},end:{line:40,column:4}},"24":{start:{line:33,column:4},end:{line:33,column:16}},"25":{start:{line:34,column:10},end:{line:40,column:4}},"26":{start:{line:37,column:4},end:{line:37,column:40}},"27":{start:{line:39,column:4},end:{line:39,column:52}},"28":{start:{line:44,column:1},end:{line:44,column:12}},"29":{start:{line:47,column:27},end:{line:50,column:1}},"30":{start:{line:48,column:12},end:{line:48,column:29}},"31":{start:{line:49,column:1},end:{line:49,column:55}},"32":{start:{line:52,column:18},end:{line:55,column:1}},"33":{start:{line:53,column:16},end:{line:53,column:45}},"34":{start:{line:54,column:1},end:{line:54,column:29}},"35":{start:{line:58,column:20},end:{line:71,column:1}},"36":{start:{line:59,column:14},end:{line:59,column:16}},"37":{start:{line:60,column:17},end:{line:60,column:46}},"38":{start:{line:61,column:1},end:{line:69,column:4}},"39":{start:{line:62,column:2},end:{line:68,column:3}},"40":{start:{line:63,column:3},end:{line:65,column:4}},"41":{start:{line:64,column:4},end:{line:64,column:22}},"42":{start:{line:66,column:9},end:{line:68,column:3}},"43":{start:{line:67,column:3},end:{line:67,column:21}},"44":{start:{line:70,column:1},end:{line:70,column:15}},"45":{start:{line:73,column:30},end:{line:77,column:1}},"46":{start:{line:74,column:13},end:{line:74,column:46}},"47":{start:{line:75,column:17},end:{line:75,column:34}},"48":{start:{line:76,column:1},end:{line:76,column:49}},"49":{start:{line:79,column:14},end:{line:181,column:1}},"50":{start:{line:80,column:11},end:{line:80,column:13}},"51":{start:{line:82,column:1},end:{line:82,column:25}},"52":{start:{line:83,column:1},end:{line:89,column:2}},"53":{start:{line:84,column:2},end:{line:86,column:3}},"54":{start:{line:85,column:3},end:{line:85,column:13}},"55":{start:{line:88,column:2},end:{line:88,column:19}},"56":{start:{line:95,column:1},end:{line:102,column:2}},"57":{start:{line:96,column:12},end:{line:96,column:59}},"58":{start:{line:97,column:16},end:{line:100,column:4}},"59":{start:{line:98,column:15},end:{line:98,column:42}},"60":{start:{line:99,column:3},end:{line:99,column:59}},"61":{start:{line:101,column:2},end:{line:101,column:26}},"62":{start:{line:105,column:1},end:{line:108,column:2}},"63":{start:{line:107,column:2},end:{line:107,column:38}},"64":{start:{line:111,column:1},end:{line:116,column:2}},"65":{start:{line:112,column:16},end:{line:114,column:4}},"66":{start:{line:113,column:3},end:{line:113,column:40}},"67":{start:{line:115,column:2},end:{line:115,column:26}},"68":{start:{line:117,column:1},end:{line:119,column:2}},"69":{start:{line:118,column:2},end:{line:118,column:29}},"70":{start:{line:120,column:1},end:{line:122,column:2}},"71":{start:{line:121,column:2},end:{line:121,column:21}},"72":{start:{line:123,column:1},end:{line:125,column:2}},"73":{start:{line:124,column:2},end:{line:124,column:17}},"74":{start:{line:126,column:1},end:{line:135,column:2}},"75":{start:{line:127,column:2},end:{line:134,column:3}},"76":{start:{line:128,column:3},end:{line:133,column:4}},"77":{start:{line:129,column:21},end:{line:129,column:77}},"78":{start:{line:130,column:4},end:{line:132,column:5}},"79":{start:{line:131,column:5},end:{line:131,column:46}},"80":{start:{line:138,column:1},end:{line:153,column:2}},"81":{start:{line:139,column:2},end:{line:152,column:3}},"82":{start:{line:140,column:3},end:{line:151,column:4}},"83":{start:{line:141,column:4},end:{line:141,column:37}},"84":{start:{line:142,column:10},end:{line:151,column:4}},"85":{start:{line:143,column:19},end:{line:143,column:92}},"86":{start:{line:144,column:4},end:{line:148,column:5}},"87":{start:{line:145,column:5},end:{line:145,column:49}},"88":{start:{line:147,column:5},end:{line:147,column:26}},"89":{start:{line:149,column:10},end:{line:151,column:4}},"90":{start:{line:150,column:4},end:{line:150,column:103}},"91":{start:{line:157,column:1},end:{line:159,column:2}},"92":{start:{line:158,column:2},end:{line:158,column:32}},"93":{start:{line:161,column:1},end:{line:167,column:2}},"94":{start:{line:162,column:2},end:{line:166,column:3}},"95":{start:{line:163,column:3},end:{line:165,column:4}},"96":{start:{line:164,column:4},end:{line:164,column:43}},"97":{start:{line:174,column:1},end:{line:176,column:2}},"98":{start:{line:175,column:2},end:{line:175,column:23}},"99":{start:{line:178,column:14},end:{line:178,column:45}},"100":{start:{line:179,column:13},end:{line:179,column:43}},"101":{start:{line:180,column:1},end:{line:180,column:29}},"102":{start:{line:183,column:21},end:{line:185,column:1}},"103":{start:{line:184,column:1},end:{line:184,column:48}},"104":{start:{line:187,column:21},end:{line:210,column:1}},"105":{start:{line:188,column:11},end:{line:188,column:13}},"106":{start:{line:190,column:1},end:{line:201,column:2}},"107":{start:{line:191,column:12},end:{line:191,column:60}},"108":{start:{line:192,column:16},end:{line:195,column:4}},"109":{start:{line:193,column:15},end:{line:193,column:42}},"110":{start:{line:194,column:3},end:{line:194,column:44}},"111":{start:{line:196,column:2},end:{line:196,column:26}},"112":{start:{line:197,column:8},end:{line:201,column:2}},"113":{start:{line:198,column:2},end:{line:198,column:17}},"114":{start:{line:199,column:8},end:{line:201,column:2}},"115":{start:{line:200,column:2},end:{line:200,column:23}},"116":{start:{line:203,column:1},end:{line:203,column:47}},"117":{start:{line:205,column:1},end:{line:207,column:2}},"118":{start:{line:206,column:2},end:{line:206,column:11}},"119":{start:{line:209,column:1},end:{line:209,column:12}},"120":{start:{line:212,column:0},end:{line:215,column:2}}},fnMap:{"0":{name:"(anonymous_0)",decl:{start:{line:5,column:23},end:{line:5,column:24}},loc:{start:{line:5,column:48},end:{line:21,column:1}},line:5},"1":{name:"(anonymous_1)",decl:{start:{line:23,column:17},end:{line:23,column:18}},loc:{start:{line:23,column:41},end:{line:45,column:1}},line:23},"2":{name:"(anonymous_2)",decl:{start:{line:47,column:27},end:{line:47,column:28}},loc:{start:{line:47,column:40},end:{line:50,column:1}},line:47},"3":{name:"(anonymous_3)",decl:{start:{line:52,column:18},end:{line:52,column:19}},loc:{start:{line:52,column:31},end:{line:55,column:1}},line:52},"4":{name:"(anonymous_4)",decl:{start:{line:58,column:20},end:{line:58,column:21}},loc:{start:{line:58,column:38},end:{line:71,column:1}},line:58},"5":{name:"(anonymous_5)",decl:{start:{line:61,column:44},end:{line:61,column:45}},loc:{start:{line:61,column:59},end:{line:69,column:2}},line:61},"6":{name:"(anonymous_6)",decl:{start:{line:73,column:30},end:{line:73,column:31}},loc:{start:{line:73,column:43},end:{line:77,column:1}},line:73},"7":{name:"(anonymous_7)",decl:{start:{line:79,column:14},end:{line:79,column:15}},loc:{start:{line:79,column:64},end:{line:181,column:1}},line:79},"8":{name:"(anonymous_8)",decl:{start:{line:97,column:24},end:{line:97,column:25}},loc:{start:{line:97,column:37},end:{line:100,column:3}},line:97},"9":{name:"(anonymous_9)",decl:{start:{line:112,column:38},end:{line:112,column:39}},loc:{start:{line:112,column:54},end:{line:114,column:3}},line:112},"10":{name:"(anonymous_10)",decl:{start:{line:183,column:21},end:{line:183,column:22}},loc:{start:{line:183,column:34},end:{line:185,column:1}},line:183},"11":{name:"(anonymous_11)",decl:{start:{line:187,column:21},end:{line:187,column:22}},loc:{start:{line:187,column:34},end:{line:210,column:1}},line:187},"12":{name:"(anonymous_12)",decl:{start:{line:192,column:24},end:{line:192,column:25}},loc:{start:{line:192,column:37},end:{line:195,column:3}},line:192}},branchMap:{"0":{loc:{start:{line:9,column:1},end:{line:11,column:2}},type:"if",locations:[{start:{line:9,column:1},end:{line:11,column:2}},{start:{line:9,column:1},end:{line:11,column:2}}],line:9},"1":{loc:{start:{line:12,column:1},end:{line:20,column:2}},type:"if",locations:[{start:{line:12,column:1},end:{line:20,column:2}},{start:{line:12,column:1},end:{line:20,column:2}}],line:12},"2":{loc:{start:{line:15,column:2},end:{line:19,column:3}},type:"if",locations:[{start:{line:15,column:2},end:{line:19,column:3}},{start:{line:15,column:2},end:{line:19,column:3}}],line:15},"3":{loc:{start:{line:29,column:2},end:{line:41,column:3}},type:"if",locations:[{start:{line:29,column:2},end:{line:41,column:3}},{start:{line:29,column:2},end:{line:41,column:3}}],line:29},"4":{loc:{start:{line:31,column:9},end:{line:41,column:3}},type:"if",locations:[{start:{line:31,column:9},end:{line:41,column:3}},{start:{line:31,column:9},end:{line:41,column:3}}],line:31},"5":{loc:{start:{line:32,column:3},end:{line:40,column:4}},type:"if",locations:[{start:{line:32,column:3},end:{line:40,column:4}},{start:{line:32,column:3},end:{line:40,column:4}}],line:32},"6":{loc:{start:{line:34,column:10},end:{line:40,column:4}},type:"if",locations:[{start:{line:34,column:10},end:{line:40,column:4}},{start:{line:34,column:10},end:{line:40,column:4}}],line:34},"7":{loc:{start:{line:34,column:14},end:{line:36,column:41}},type:"binary-expr",locations:[{start:{line:34,column:14},end:{line:34,column:77}},{start:{line:35,column:5},end:{line:35,column:43}},{start:{line:36,column:5},end:{line:36,column:41}}],line:34},"8":{loc:{start:{line:49,column:9},end:{line:49,column:36}},type:"binary-expr",locations:[{start:{line:49,column:9},end:{line:49,column:30}},{start:{line:49,column:34},end:{line:49,column:36}}],line:49},"9":{loc:{start:{line:62,column:2},end:{line:68,column:3}},type:"if",locations:[{start:{line:62,column:2},end:{line:68,column:3}},{start:{line:62,column:2},end:{line:68,column:3}}],line:62},"10":{loc:{start:{line:63,column:3},end:{line:65,column:4}},type:"if",locations:[{start:{line:63,column:3},end:{line:65,column:4}},{start:{line:63,column:3},end:{line:65,column:4}}],line:63},"11":{loc:{start:{line:63,column:7},end:{line:63,column:60}},type:"binary-expr",locations:[{start:{line:63,column:7},end:{line:63,column:17}},{start:{line:63,column:21},end:{line:63,column:60}}],line:63},"12":{loc:{start:{line:66,column:9},end:{line:68,column:3}},type:"if",locations:[{start:{line:66,column:9},end:{line:68,column:3}},{start:{line:66,column:9},end:{line:68,column:3}}],line:66},"13":{loc:{start:{line:76,column:8},end:{line:76,column:48}},type:"binary-expr",locations:[{start:{line:76,column:8},end:{line:76,column:13}},{start:{line:76,column:17},end:{line:76,column:48}}],line:76},"14":{loc:{start:{line:82,column:11},end:{line:82,column:24}},type:"binary-expr",locations:[{start:{line:82,column:11},end:{line:82,column:18}},{start:{line:82,column:22},end:{line:82,column:24}}],line:82},"15":{loc:{start:{line:83,column:1},end:{line:89,column:2}},type:"if",locations:[{start:{line:83,column:1},end:{line:89,column:2}},{start:{line:83,column:1},end:{line:89,column:2}}],line:83},"16":{loc:{start:{line:84,column:2},end:{line:86,column:3}},type:"if",locations:[{start:{line:84,column:2},end:{line:86,column:3}},{start:{line:84,column:2},end:{line:86,column:3}}],line:84},"17":{loc:{start:{line:95,column:1},end:{line:102,column:2}},type:"if",locations:[{start:{line:95,column:1},end:{line:102,column:2}},{start:{line:95,column:1},end:{line:102,column:2}}],line:95},"18":{loc:{start:{line:95,column:5},end:{line:95,column:50}},type:"binary-expr",locations:[{start:{line:95,column:5},end:{line:95,column:15}},{start:{line:95,column:19},end:{line:95,column:50}}],line:95},"19":{loc:{start:{line:99,column:10},end:{line:99,column:58}},type:"cond-expr",locations:[{start:{line:99,column:18},end:{line:99,column:53}},{start:{line:99,column:56},end:{line:99,column:58}}],line:99},"20":{loc:{start:{line:105,column:1},end:{line:108,column:2}},type:"if",locations:[{start:{line:105,column:1},end:{line:108,column:2}},{start:{line:105,column:1},end:{line:108,column:2}}],line:105},"21":{loc:{start:{line:105,column:5},end:{line:105,column:46}},type:"binary-expr",locations:[{start:{line:105,column:5},end:{line:105,column:16}},{start:{line:105,column:20},end:{line:105,column:46}}],line:105},"22":{loc:{start:{line:111,column:1},end:{line:116,column:2}},type:"if",locations:[{start:{line:111,column:1},end:{line:116,column:2}},{start:{line:111,column:1},end:{line:116,column:2}}],line:111},"23":{loc:{start:{line:111,column:5},end:{line:111,column:49}},type:"binary-expr",locations:[{start:{line:111,column:5},end:{line:111,column:16}},{start:{line:111,column:20},end:{line:111,column:30}},{start:{line:111,column:34},end:{line:111,column:49}}],line:111},"24":{loc:{start:{line:117,column:1},end:{line:119,column:2}},type:"if",locations:[{start:{line:117,column:1},end:{line:119,column:2}},{start:{line:117,column:1},end:{line:119,column:2}}],line:117},"25":{loc:{start:{line:118,column:8},end:{line:118,column:28}},type:"binary-expr",locations:[{start:{line:118,column:8},end:{line:118,column:22}},{start:{line:118,column:26},end:{line:118,column:28}}],line:118},"26":{loc:{start:{line:120,column:1},end:{line:122,column:2}},type:"if",locations:[{start:{line:120,column:1},end:{line:122,column:2}},{start:{line:120,column:1},end:{line:122,column:2}}],line:120},"27":{loc:{start:{line:121,column:8},end:{line:121,column:20}},type:"binary-expr",locations:[{start:{line:121,column:8},end:{line:121,column:14}},{start:{line:121,column:18},end:{line:121,column:20}}],line:121},"28":{loc:{start:{line:123,column:1},end:{line:125,column:2}},type:"if",locations:[{start:{line:123,column:1},end:{line:125,column:2}},{start:{line:123,column:1},end:{line:125,column:2}}],line:123},"29":{loc:{start:{line:123,column:5},end:{line:123,column:58}},type:"binary-expr",locations:[{start:{line:123,column:5},end:{line:123,column:16}},{start:{line:123,column:20},end:{line:123,column:46}},{start:{line:123,column:50},end:{line:123,column:58}}],line:123},"30":{loc:{start:{line:126,column:1},end:{line:135,column:2}},type:"if",locations:[{start:{line:126,column:1},end:{line:135,column:2}},{start:{line:126,column:1},end:{line:135,column:2}}],line:126},"31":{loc:{start:{line:128,column:3},end:{line:133,column:4}},type:"if",locations:[{start:{line:128,column:3},end:{line:133,column:4}},{start:{line:128,column:3},end:{line:133,column:4}}],line:128},"32":{loc:{start:{line:130,column:4},end:{line:132,column:5}},type:"if",locations:[{start:{line:130,column:4},end:{line:132,column:5}},{start:{line:130,column:4},end:{line:132,column:5}}],line:130},"33":{loc:{start:{line:138,column:1},end:{line:153,column:2}},type:"if",locations:[{start:{line:138,column:1},end:{line:153,column:2}},{start:{line:138,column:1},end:{line:153,column:2}}],line:138},"34":{loc:{start:{line:138,column:5},end:{line:138,column:93}},type:"binary-expr",locations:[{start:{line:138,column:5},end:{line:138,column:16}},{start:{line:138,column:21},end:{line:138,column:30}},{start:{line:138,column:34},end:{line:138,column:61}},{start:{line:138,column:65},end:{line:138,column:92}}],line:138},"35":{loc:{start:{line:139,column:2},end:{line:152,column:3}},type:"if",locations:[{start:{line:139,column:2},end:{line:152,column:3}},{start:{line:139,column:2},end:{line:152,column:3}}],line:139},"36":{loc:{start:{line:140,column:3},end:{line:151,column:4}},type:"if",locations:[{start:{line:140,column:3},end:{line:151,column:4}},{start:{line:140,column:3},end:{line:151,column:4}}],line:140},"37":{loc:{start:{line:141,column:10},end:{line:141,column:36}},type:"binary-expr",locations:[{start:{line:141,column:10},end:{line:141,column:18}},{start:{line:141,column:22},end:{line:141,column:36}}],line:141},"38":{loc:{start:{line:142,column:10},end:{line:151,column:4}},type:"if",locations:[{start:{line:142,column:10},end:{line:151,column:4}},{start:{line:142,column:10},end:{line:151,column:4}}],line:142},"39":{loc:{start:{line:143,column:19},end:{line:143,column:92}},type:"binary-expr",locations:[{start:{line:143,column:19},end:{line:143,column:55}},{start:{line:143,column:59},end:{line:143,column:92}}],line:143},"40":{loc:{start:{line:144,column:4},end:{line:148,column:5}},type:"if",locations:[{start:{line:144,column:4},end:{line:148,column:5}},{start:{line:144,column:4},end:{line:148,column:5}}],line:144},"41":{loc:{start:{line:147,column:11},end:{line:147,column:25}},type:"binary-expr",locations:[{start:{line:147,column:11},end:{line:147,column:19}},{start:{line:147,column:23},end:{line:147,column:25}}],line:147},"42":{loc:{start:{line:149,column:10},end:{line:151,column:4}},type:"if",locations:[{start:{line:149,column:10},end:{line:151,column:4}},{start:{line:149,column:10},end:{line:151,column:4}}],line:149},"43":{loc:{start:{line:150,column:16},end:{line:150,column:101}},type:"binary-expr",locations:[{start:{line:150,column:16},end:{line:150,column:51}},{start:{line:150,column:55},end:{line:150,column:89}},{start:{line:150,column:93},end:{line:150,column:101}}],line:150},"44":{loc:{start:{line:157,column:1},end:{line:159,column:2}},type:"if",locations:[{start:{line:157,column:1},end:{line:159,column:2}},{start:{line:157,column:1},end:{line:159,column:2}}],line:157},"45":{loc:{start:{line:157,column:5},end:{line:157,column:112}},type:"binary-expr",locations:[{start:{line:157,column:5},end:{line:157,column:16}},{start:{line:157,column:21},end:{line:157,column:30}},{start:{line:157,column:34},end:{line:157,column:58}},{start:{line:157,column:62},end:{line:157,column:81}},{start:{line:157,column:86},end:{line:157,column:112}}],line:157},"46":{loc:{start:{line:161,column:1},end:{line:167,column:2}},type:"if",locations:[{start:{line:161,column:1},end:{line:167,column:2}},{start:{line:161,column:1},end:{line:167,column:2}}],line:161},"47":{loc:{start:{line:163,column:3},end:{line:165,column:4}},type:"if",locations:[{start:{line:163,column:3},end:{line:165,column:4}},{start:{line:163,column:3},end:{line:165,column:4}}],line:163},"48":{loc:{start:{line:174,column:1},end:{line:176,column:2}},type:"if",locations:[{start:{line:174,column:1},end:{line:176,column:2}},{start:{line:174,column:1},end:{line:176,column:2}}],line:174},"49":{loc:{start:{line:174,column:5},end:{line:174,column:54}},type:"binary-expr",locations:[{start:{line:174,column:5},end:{line:174,column:16}},{start:{line:174,column:20},end:{line:174,column:54}}],line:174},"50":{loc:{start:{line:175,column:8},end:{line:175,column:22}},type:"binary-expr",locations:[{start:{line:175,column:8},end:{line:175,column:16}},{start:{line:175,column:20},end:{line:175,column:22}}],line:175},"51":{loc:{start:{line:190,column:1},end:{line:201,column:2}},type:"if",locations:[{start:{line:190,column:1},end:{line:201,column:2}},{start:{line:190,column:1},end:{line:201,column:2}}],line:190},"52":{loc:{start:{line:194,column:10},end:{line:194,column:43}},type:"cond-expr",locations:[{start:{line:194,column:18},end:{line:194,column:38}},{start:{line:194,column:41},end:{line:194,column:43}}],line:194},"53":{loc:{start:{line:197,column:8},end:{line:201,column:2}},type:"if",locations:[{start:{line:197,column:8},end:{line:201,column:2}},{start:{line:197,column:8},end:{line:201,column:2}}],line:197},"54":{loc:{start:{line:199,column:8},end:{line:201,column:2}},type:"if",locations:[{start:{line:199,column:8},end:{line:201,column:2}},{start:{line:199,column:8},end:{line:201,column:2}}],line:199},"55":{loc:{start:{line:203,column:8},end:{line:203,column:17}},type:"binary-expr",locations:[{start:{line:203,column:8},end:{line:203,column:11}},{start:{line:203,column:15},end:{line:203,column:17}}],line:203},"56":{loc:{start:{line:205,column:1},end:{line:207,column:2}},type:"if",locations:[{start:{line:205,column:1},end:{line:207,column:2}},{start:{line:205,column:1},end:{line:207,column:2}}],line:205}},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0},f:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},b:{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0,0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0,0],"44":[0,0],"45":[0,0,0,0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0],"52":[0,0],"53":[0,0],"54":[0,0],"55":[0,0],"56":[0,0]},_coverageSchema:"43e27e138ebf9cfc5966b082cf9a028302ed4184",hash:"5101a9b8358270f08e855ff19ea691a5651f4ed4"};var coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}return coverage[path]=coverageData;}();var constants=(cov_22i8nvh4cs.s[0]++,require('./constants.js'));var atree=(cov_22i8nvh4cs.s[1]++,require('./atree.js'));var query=(cov_22i8nvh4cs.s[2]++,require('./query.js'));cov_22i8nvh4cs.s[3]++;var getPseudoContent=function(node,selector){cov_22i8nvh4cs.f[0]++;var styles=(cov_22i8nvh4cs.s[4]++,window.getComputedStyle(node,selector));var ret=(cov_22i8nvh4cs.s[5]++,styles.getPropertyValue('content'));var inline=(cov_22i8nvh4cs.s[6]++,styles.display.substr(0,6)==='inline');cov_22i8nvh4cs.s[7]++;if(!ret){cov_22i8nvh4cs.b[0][0]++;cov_22i8nvh4cs.s[8]++;return'';}else{cov_22i8nvh4cs.b[0][1]++;}cov_22i8nvh4cs.s[9]++;if(ret.substr(0,1)!=='"'){cov_22i8nvh4cs.b[1][0]++;cov_22i8nvh4cs.s[10]++;return'';}else{cov_22i8nvh4cs.b[1][1]++;cov_22i8nvh4cs.s[11]++;if(inline){cov_22i8nvh4cs.b[2][0]++;cov_22i8nvh4cs.s[12]++;return ret.slice(1,-1);}else{cov_22i8nvh4cs.b[2][1]++;cov_22i8nvh4cs.s[13]++;return' '+ret.slice(1,-1)+' ';}}};cov_22i8nvh4cs.s[14]++;var getContent=function(root,visited){cov_22i8nvh4cs.f[1]++;var children=(cov_22i8nvh4cs.s[15]++,atree.getChildNodes(root));var ret=(cov_22i8nvh4cs.s[16]++,'');cov_22i8nvh4cs.s[17]++;for(var i=(cov_22i8nvh4cs.s[18]++,0);i<children.length;i++){var node=(cov_22i8nvh4cs.s[19]++,children[i]);cov_22i8nvh4cs.s[20]++;if(node.nodeType===node.TEXT_NODE){cov_22i8nvh4cs.b[3][0]++;cov_22i8nvh4cs.s[21]++;ret+=node.textContent;}else{cov_22i8nvh4cs.b[3][1]++;cov_22i8nvh4cs.s[22]++;if(node.nodeType===node.ELEMENT_NODE){cov_22i8nvh4cs.b[4][0]++;cov_22i8nvh4cs.s[23]++;if(node.tagName.toLowerCase()==='br'){cov_22i8nvh4cs.b[5][0]++;cov_22i8nvh4cs.s[24]++;ret+='\n';}else{cov_22i8nvh4cs.b[5][1]++;cov_22i8nvh4cs.s[25]++;if((cov_22i8nvh4cs.b[7][0]++,window.getComputedStyle(node).display.substr(0,6)==='inline')&&(cov_22i8nvh4cs.b[7][1]++,node.tagName.toLowerCase()!=='input')&&(cov_22i8nvh4cs.b[7][2]++,node.tagName.toLowerCase()!=='img')){cov_22i8nvh4cs.b[6][0]++;cov_22i8nvh4cs.s[26]++;// https://github.com/w3c/accname/issues/31054 -1 ret+=getName(node,true,visited);}else{cov_22i8nvh4cs.b[6][1]++;cov_22i8nvh4cs.s[27]++;ret+=' '+getName(node,true,visited)+' ';}}}else{cov_22i8nvh4cs.b[4][1]++;}}}cov_22i8nvh4cs.s[28]++;return ret;};cov_22i8nvh4cs.s[29]++;var allowNameFromContent=function(el){cov_22i8nvh4cs.f[2]++;var role=(cov_22i8nvh4cs.s[30]++,query.getRole(el));cov_22i8nvh4cs.s[31]++;return((cov_22i8nvh4cs.b[8][0]++,constants.roles[role])||(cov_22i8nvh4cs.b[8][1]++,{})).nameFromContents;};cov_22i8nvh4cs.s[32]++;var isLabelable=function(el){cov_22i8nvh4cs.f[3]++;var selector=(cov_22i8nvh4cs.s[33]++,constants.labelable.join(','));cov_22i8nvh4cs.s[34]++;return el.matches(selector);};// Control.labels is part of the standard, but not supported in most browsers1055 -1 cov_22i8nvh4cs.s[35]++;var getLabelNodes=function(element){cov_22i8nvh4cs.f[4]++;var labels=(cov_22i8nvh4cs.s[36]++,[]);var labelable=(cov_22i8nvh4cs.s[37]++,constants.labelable.join(','));cov_22i8nvh4cs.s[38]++;document.querySelectorAll('label').forEach(function(node){cov_22i8nvh4cs.f[5]++;cov_22i8nvh4cs.s[39]++;if(node.getAttribute('for')){cov_22i8nvh4cs.b[9][0]++;cov_22i8nvh4cs.s[40]++;if((cov_22i8nvh4cs.b[11][0]++,element.id)&&(cov_22i8nvh4cs.b[11][1]++,node.getAttribute('for')===element.id)){cov_22i8nvh4cs.b[10][0]++;cov_22i8nvh4cs.s[41]++;labels.push(node);}else{cov_22i8nvh4cs.b[10][1]++;}}else{cov_22i8nvh4cs.b[9][1]++;cov_22i8nvh4cs.s[42]++;if(node.querySelector(labelable)===element){cov_22i8nvh4cs.b[12][0]++;cov_22i8nvh4cs.s[43]++;labels.push(node);}else{cov_22i8nvh4cs.b[12][1]++;}}});cov_22i8nvh4cs.s[44]++;return labels;};cov_22i8nvh4cs.s[45]++;var isInLabelForOtherWidget=function(el){cov_22i8nvh4cs.f[6]++;var label=(cov_22i8nvh4cs.s[46]++,el.parentElement.closest('label'));var ownLabels=(cov_22i8nvh4cs.s[47]++,getLabelNodes(el));cov_22i8nvh4cs.s[48]++;return(cov_22i8nvh4cs.b[13][0]++,label)&&(cov_22i8nvh4cs.b[13][1]++,ownLabels.indexOf(label)===-1);};cov_22i8nvh4cs.s[49]++;var getName=function(el,recursive,visited,directReference){cov_22i8nvh4cs.f[7]++;var ret=(cov_22i8nvh4cs.s[50]++,'');cov_22i8nvh4cs.s[51]++;visited=(cov_22i8nvh4cs.b[14][0]++,visited)||(cov_22i8nvh4cs.b[14][1]++,[]);cov_22i8nvh4cs.s[52]++;if(visited.includes(el)){cov_22i8nvh4cs.b[15][0]++;cov_22i8nvh4cs.s[53]++;if(!directReference){cov_22i8nvh4cs.b[16][0]++;cov_22i8nvh4cs.s[54]++;return'';}else{cov_22i8nvh4cs.b[16][1]++;}}else{cov_22i8nvh4cs.b[15][1]++;cov_22i8nvh4cs.s[55]++;visited.push(el);}// A-1 1053 var cov_1pyj5qc77c=function(){var path="node_modules/aria-api/lib/name.js";var hash="aa6dae0aec5fb24c7c531ceeaab7ca593fe6392e";var global=new Function("return this")();var gcv="__coverage__";var coverageData={path:"/home/local/MPIB-BERLIN/bengfort/code/babelacc/node_modules/aria-api/lib/name.js",statementMap:{"0":{start:{line:1,column:16},end:{line:1,column:41}},"1":{start:{line:2,column:12},end:{line:2,column:33}},"2":{start:{line:3,column:12},end:{line:3,column:33}},"3":{start:{line:5,column:23},end:{line:21,column:1}},"4":{start:{line:6,column:14},end:{line:6,column:53}},"5":{start:{line:7,column:11},end:{line:7,column:45}},"6":{start:{line:8,column:14},end:{line:8,column:54}},"7":{start:{line:9,column:1},end:{line:11,column:2}},"8":{start:{line:10,column:2},end:{line:10,column:12}},"9":{start:{line:12,column:1},end:{line:20,column:2}},"10":{start:{line:13,column:2},end:{line:13,column:12}},"11":{start:{line:15,column:2},end:{line:19,column:3}},"12":{start:{line:16,column:3},end:{line:16,column:27}},"13":{start:{line:18,column:3},end:{line:18,column:39}},"14":{start:{line:23,column:17},end:{line:45,column:1}},"15":{start:{line:24,column:16},end:{line:24,column:41}},"16":{start:{line:26,column:11},end:{line:26,column:13}},"17":{start:{line:27,column:1},end:{line:42,column:2}},"18":{start:{line:27,column:14},end:{line:27,column:15}},"19":{start:{line:28,column:13},end:{line:28,column:24}},"20":{start:{line:29,column:2},end:{line:41,column:3}},"21":{start:{line:30,column:3},end:{line:30,column:27}},"22":{start:{line:31,column:9},end:{line:41,column:3}},"23":{start:{line:32,column:3},end:{line:40,column:4}},"24":{start:{line:33,column:4},end:{line:33,column:16}},"25":{start:{line:34,column:10},end:{line:40,column:4}},"26":{start:{line:37,column:4},end:{line:37,column:40}},"27":{start:{line:39,column:4},end:{line:39,column:52}},"28":{start:{line:44,column:1},end:{line:44,column:12}},"29":{start:{line:47,column:27},end:{line:50,column:1}},"30":{start:{line:48,column:12},end:{line:48,column:29}},"31":{start:{line:49,column:1},end:{line:49,column:55}},"32":{start:{line:52,column:18},end:{line:55,column:1}},"33":{start:{line:53,column:16},end:{line:53,column:45}},"34":{start:{line:54,column:1},end:{line:54,column:29}},"35":{start:{line:58,column:20},end:{line:71,column:1}},"36":{start:{line:59,column:14},end:{line:59,column:16}},"37":{start:{line:60,column:17},end:{line:60,column:46}},"38":{start:{line:61,column:1},end:{line:69,column:4}},"39":{start:{line:62,column:2},end:{line:68,column:3}},"40":{start:{line:63,column:3},end:{line:65,column:4}},"41":{start:{line:64,column:4},end:{line:64,column:22}},"42":{start:{line:66,column:9},end:{line:68,column:3}},"43":{start:{line:67,column:3},end:{line:67,column:21}},"44":{start:{line:70,column:1},end:{line:70,column:15}},"45":{start:{line:73,column:30},end:{line:77,column:1}},"46":{start:{line:74,column:13},end:{line:74,column:46}},"47":{start:{line:75,column:17},end:{line:75,column:34}},"48":{start:{line:76,column:1},end:{line:76,column:49}},"49":{start:{line:79,column:14},end:{line:181,column:1}},"50":{start:{line:80,column:11},end:{line:80,column:13}},"51":{start:{line:82,column:1},end:{line:82,column:25}},"52":{start:{line:83,column:1},end:{line:89,column:2}},"53":{start:{line:84,column:2},end:{line:86,column:3}},"54":{start:{line:85,column:3},end:{line:85,column:13}},"55":{start:{line:88,column:2},end:{line:88,column:19}},"56":{start:{line:95,column:1},end:{line:102,column:2}},"57":{start:{line:96,column:12},end:{line:96,column:59}},"58":{start:{line:97,column:16},end:{line:100,column:4}},"59":{start:{line:98,column:15},end:{line:98,column:42}},"60":{start:{line:99,column:3},end:{line:99,column:59}},"61":{start:{line:101,column:2},end:{line:101,column:26}},"62":{start:{line:105,column:1},end:{line:108,column:2}},"63":{start:{line:107,column:2},end:{line:107,column:38}},"64":{start:{line:111,column:1},end:{line:116,column:2}},"65":{start:{line:112,column:16},end:{line:114,column:4}},"66":{start:{line:113,column:3},end:{line:113,column:40}},"67":{start:{line:115,column:2},end:{line:115,column:26}},"68":{start:{line:117,column:1},end:{line:119,column:2}},"69":{start:{line:118,column:2},end:{line:118,column:29}},"70":{start:{line:120,column:1},end:{line:122,column:2}},"71":{start:{line:121,column:2},end:{line:121,column:21}},"72":{start:{line:123,column:1},end:{line:125,column:2}},"73":{start:{line:124,column:2},end:{line:124,column:17}},"74":{start:{line:126,column:1},end:{line:135,column:2}},"75":{start:{line:127,column:2},end:{line:134,column:3}},"76":{start:{line:128,column:3},end:{line:133,column:4}},"77":{start:{line:129,column:21},end:{line:129,column:77}},"78":{start:{line:130,column:4},end:{line:132,column:5}},"79":{start:{line:131,column:5},end:{line:131,column:46}},"80":{start:{line:138,column:1},end:{line:153,column:2}},"81":{start:{line:139,column:2},end:{line:152,column:3}},"82":{start:{line:140,column:3},end:{line:151,column:4}},"83":{start:{line:141,column:4},end:{line:141,column:37}},"84":{start:{line:142,column:10},end:{line:151,column:4}},"85":{start:{line:143,column:19},end:{line:143,column:92}},"86":{start:{line:144,column:4},end:{line:148,column:5}},"87":{start:{line:145,column:5},end:{line:145,column:49}},"88":{start:{line:147,column:5},end:{line:147,column:26}},"89":{start:{line:149,column:10},end:{line:151,column:4}},"90":{start:{line:150,column:4},end:{line:150,column:103}},"91":{start:{line:157,column:1},end:{line:159,column:2}},"92":{start:{line:158,column:2},end:{line:158,column:32}},"93":{start:{line:161,column:1},end:{line:167,column:2}},"94":{start:{line:162,column:2},end:{line:166,column:3}},"95":{start:{line:163,column:3},end:{line:165,column:4}},"96":{start:{line:164,column:4},end:{line:164,column:43}},"97":{start:{line:174,column:1},end:{line:176,column:2}},"98":{start:{line:175,column:2},end:{line:175,column:23}},"99":{start:{line:178,column:14},end:{line:178,column:45}},"100":{start:{line:179,column:13},end:{line:179,column:43}},"101":{start:{line:180,column:1},end:{line:180,column:29}},"102":{start:{line:183,column:21},end:{line:185,column:1}},"103":{start:{line:184,column:1},end:{line:184,column:48}},"104":{start:{line:187,column:21},end:{line:210,column:1}},"105":{start:{line:188,column:11},end:{line:188,column:13}},"106":{start:{line:190,column:1},end:{line:201,column:2}},"107":{start:{line:191,column:12},end:{line:191,column:60}},"108":{start:{line:192,column:16},end:{line:195,column:4}},"109":{start:{line:193,column:15},end:{line:193,column:42}},"110":{start:{line:194,column:3},end:{line:194,column:44}},"111":{start:{line:196,column:2},end:{line:196,column:26}},"112":{start:{line:197,column:8},end:{line:201,column:2}},"113":{start:{line:198,column:2},end:{line:198,column:17}},"114":{start:{line:199,column:8},end:{line:201,column:2}},"115":{start:{line:200,column:2},end:{line:200,column:23}},"116":{start:{line:203,column:1},end:{line:203,column:47}},"117":{start:{line:205,column:1},end:{line:207,column:2}},"118":{start:{line:206,column:2},end:{line:206,column:11}},"119":{start:{line:209,column:1},end:{line:209,column:12}},"120":{start:{line:212,column:0},end:{line:215,column:2}}},fnMap:{"0":{name:"(anonymous_0)",decl:{start:{line:5,column:23},end:{line:5,column:24}},loc:{start:{line:5,column:48},end:{line:21,column:1}},line:5},"1":{name:"(anonymous_1)",decl:{start:{line:23,column:17},end:{line:23,column:18}},loc:{start:{line:23,column:41},end:{line:45,column:1}},line:23},"2":{name:"(anonymous_2)",decl:{start:{line:47,column:27},end:{line:47,column:28}},loc:{start:{line:47,column:40},end:{line:50,column:1}},line:47},"3":{name:"(anonymous_3)",decl:{start:{line:52,column:18},end:{line:52,column:19}},loc:{start:{line:52,column:31},end:{line:55,column:1}},line:52},"4":{name:"(anonymous_4)",decl:{start:{line:58,column:20},end:{line:58,column:21}},loc:{start:{line:58,column:38},end:{line:71,column:1}},line:58},"5":{name:"(anonymous_5)",decl:{start:{line:61,column:44},end:{line:61,column:45}},loc:{start:{line:61,column:59},end:{line:69,column:2}},line:61},"6":{name:"(anonymous_6)",decl:{start:{line:73,column:30},end:{line:73,column:31}},loc:{start:{line:73,column:43},end:{line:77,column:1}},line:73},"7":{name:"(anonymous_7)",decl:{start:{line:79,column:14},end:{line:79,column:15}},loc:{start:{line:79,column:64},end:{line:181,column:1}},line:79},"8":{name:"(anonymous_8)",decl:{start:{line:97,column:24},end:{line:97,column:25}},loc:{start:{line:97,column:37},end:{line:100,column:3}},line:97},"9":{name:"(anonymous_9)",decl:{start:{line:112,column:38},end:{line:112,column:39}},loc:{start:{line:112,column:54},end:{line:114,column:3}},line:112},"10":{name:"(anonymous_10)",decl:{start:{line:183,column:21},end:{line:183,column:22}},loc:{start:{line:183,column:34},end:{line:185,column:1}},line:183},"11":{name:"(anonymous_11)",decl:{start:{line:187,column:21},end:{line:187,column:22}},loc:{start:{line:187,column:34},end:{line:210,column:1}},line:187},"12":{name:"(anonymous_12)",decl:{start:{line:192,column:24},end:{line:192,column:25}},loc:{start:{line:192,column:37},end:{line:195,column:3}},line:192}},branchMap:{"0":{loc:{start:{line:9,column:1},end:{line:11,column:2}},type:"if",locations:[{start:{line:9,column:1},end:{line:11,column:2}},{start:{line:9,column:1},end:{line:11,column:2}}],line:9},"1":{loc:{start:{line:12,column:1},end:{line:20,column:2}},type:"if",locations:[{start:{line:12,column:1},end:{line:20,column:2}},{start:{line:12,column:1},end:{line:20,column:2}}],line:12},"2":{loc:{start:{line:15,column:2},end:{line:19,column:3}},type:"if",locations:[{start:{line:15,column:2},end:{line:19,column:3}},{start:{line:15,column:2},end:{line:19,column:3}}],line:15},"3":{loc:{start:{line:29,column:2},end:{line:41,column:3}},type:"if",locations:[{start:{line:29,column:2},end:{line:41,column:3}},{start:{line:29,column:2},end:{line:41,column:3}}],line:29},"4":{loc:{start:{line:31,column:9},end:{line:41,column:3}},type:"if",locations:[{start:{line:31,column:9},end:{line:41,column:3}},{start:{line:31,column:9},end:{line:41,column:3}}],line:31},"5":{loc:{start:{line:32,column:3},end:{line:40,column:4}},type:"if",locations:[{start:{line:32,column:3},end:{line:40,column:4}},{start:{line:32,column:3},end:{line:40,column:4}}],line:32},"6":{loc:{start:{line:34,column:10},end:{line:40,column:4}},type:"if",locations:[{start:{line:34,column:10},end:{line:40,column:4}},{start:{line:34,column:10},end:{line:40,column:4}}],line:34},"7":{loc:{start:{line:34,column:14},end:{line:36,column:41}},type:"binary-expr",locations:[{start:{line:34,column:14},end:{line:34,column:77}},{start:{line:35,column:5},end:{line:35,column:43}},{start:{line:36,column:5},end:{line:36,column:41}}],line:34},"8":{loc:{start:{line:49,column:9},end:{line:49,column:36}},type:"binary-expr",locations:[{start:{line:49,column:9},end:{line:49,column:30}},{start:{line:49,column:34},end:{line:49,column:36}}],line:49},"9":{loc:{start:{line:62,column:2},end:{line:68,column:3}},type:"if",locations:[{start:{line:62,column:2},end:{line:68,column:3}},{start:{line:62,column:2},end:{line:68,column:3}}],line:62},"10":{loc:{start:{line:63,column:3},end:{line:65,column:4}},type:"if",locations:[{start:{line:63,column:3},end:{line:65,column:4}},{start:{line:63,column:3},end:{line:65,column:4}}],line:63},"11":{loc:{start:{line:63,column:7},end:{line:63,column:60}},type:"binary-expr",locations:[{start:{line:63,column:7},end:{line:63,column:17}},{start:{line:63,column:21},end:{line:63,column:60}}],line:63},"12":{loc:{start:{line:66,column:9},end:{line:68,column:3}},type:"if",locations:[{start:{line:66,column:9},end:{line:68,column:3}},{start:{line:66,column:9},end:{line:68,column:3}}],line:66},"13":{loc:{start:{line:76,column:8},end:{line:76,column:48}},type:"binary-expr",locations:[{start:{line:76,column:8},end:{line:76,column:13}},{start:{line:76,column:17},end:{line:76,column:48}}],line:76},"14":{loc:{start:{line:82,column:11},end:{line:82,column:24}},type:"binary-expr",locations:[{start:{line:82,column:11},end:{line:82,column:18}},{start:{line:82,column:22},end:{line:82,column:24}}],line:82},"15":{loc:{start:{line:83,column:1},end:{line:89,column:2}},type:"if",locations:[{start:{line:83,column:1},end:{line:89,column:2}},{start:{line:83,column:1},end:{line:89,column:2}}],line:83},"16":{loc:{start:{line:84,column:2},end:{line:86,column:3}},type:"if",locations:[{start:{line:84,column:2},end:{line:86,column:3}},{start:{line:84,column:2},end:{line:86,column:3}}],line:84},"17":{loc:{start:{line:95,column:1},end:{line:102,column:2}},type:"if",locations:[{start:{line:95,column:1},end:{line:102,column:2}},{start:{line:95,column:1},end:{line:102,column:2}}],line:95},"18":{loc:{start:{line:95,column:5},end:{line:95,column:50}},type:"binary-expr",locations:[{start:{line:95,column:5},end:{line:95,column:15}},{start:{line:95,column:19},end:{line:95,column:50}}],line:95},"19":{loc:{start:{line:99,column:10},end:{line:99,column:58}},type:"cond-expr",locations:[{start:{line:99,column:18},end:{line:99,column:53}},{start:{line:99,column:56},end:{line:99,column:58}}],line:99},"20":{loc:{start:{line:105,column:1},end:{line:108,column:2}},type:"if",locations:[{start:{line:105,column:1},end:{line:108,column:2}},{start:{line:105,column:1},end:{line:108,column:2}}],line:105},"21":{loc:{start:{line:105,column:5},end:{line:105,column:46}},type:"binary-expr",locations:[{start:{line:105,column:5},end:{line:105,column:16}},{start:{line:105,column:20},end:{line:105,column:46}}],line:105},"22":{loc:{start:{line:111,column:1},end:{line:116,column:2}},type:"if",locations:[{start:{line:111,column:1},end:{line:116,column:2}},{start:{line:111,column:1},end:{line:116,column:2}}],line:111},"23":{loc:{start:{line:111,column:5},end:{line:111,column:49}},type:"binary-expr",locations:[{start:{line:111,column:5},end:{line:111,column:16}},{start:{line:111,column:20},end:{line:111,column:30}},{start:{line:111,column:34},end:{line:111,column:49}}],line:111},"24":{loc:{start:{line:117,column:1},end:{line:119,column:2}},type:"if",locations:[{start:{line:117,column:1},end:{line:119,column:2}},{start:{line:117,column:1},end:{line:119,column:2}}],line:117},"25":{loc:{start:{line:118,column:8},end:{line:118,column:28}},type:"binary-expr",locations:[{start:{line:118,column:8},end:{line:118,column:22}},{start:{line:118,column:26},end:{line:118,column:28}}],line:118},"26":{loc:{start:{line:120,column:1},end:{line:122,column:2}},type:"if",locations:[{start:{line:120,column:1},end:{line:122,column:2}},{start:{line:120,column:1},end:{line:122,column:2}}],line:120},"27":{loc:{start:{line:121,column:8},end:{line:121,column:20}},type:"binary-expr",locations:[{start:{line:121,column:8},end:{line:121,column:14}},{start:{line:121,column:18},end:{line:121,column:20}}],line:121},"28":{loc:{start:{line:123,column:1},end:{line:125,column:2}},type:"if",locations:[{start:{line:123,column:1},end:{line:125,column:2}},{start:{line:123,column:1},end:{line:125,column:2}}],line:123},"29":{loc:{start:{line:123,column:5},end:{line:123,column:58}},type:"binary-expr",locations:[{start:{line:123,column:5},end:{line:123,column:16}},{start:{line:123,column:20},end:{line:123,column:46}},{start:{line:123,column:50},end:{line:123,column:58}}],line:123},"30":{loc:{start:{line:126,column:1},end:{line:135,column:2}},type:"if",locations:[{start:{line:126,column:1},end:{line:135,column:2}},{start:{line:126,column:1},end:{line:135,column:2}}],line:126},"31":{loc:{start:{line:128,column:3},end:{line:133,column:4}},type:"if",locations:[{start:{line:128,column:3},end:{line:133,column:4}},{start:{line:128,column:3},end:{line:133,column:4}}],line:128},"32":{loc:{start:{line:130,column:4},end:{line:132,column:5}},type:"if",locations:[{start:{line:130,column:4},end:{line:132,column:5}},{start:{line:130,column:4},end:{line:132,column:5}}],line:130},"33":{loc:{start:{line:138,column:1},end:{line:153,column:2}},type:"if",locations:[{start:{line:138,column:1},end:{line:153,column:2}},{start:{line:138,column:1},end:{line:153,column:2}}],line:138},"34":{loc:{start:{line:138,column:5},end:{line:138,column:93}},type:"binary-expr",locations:[{start:{line:138,column:5},end:{line:138,column:16}},{start:{line:138,column:21},end:{line:138,column:30}},{start:{line:138,column:34},end:{line:138,column:61}},{start:{line:138,column:65},end:{line:138,column:92}}],line:138},"35":{loc:{start:{line:139,column:2},end:{line:152,column:3}},type:"if",locations:[{start:{line:139,column:2},end:{line:152,column:3}},{start:{line:139,column:2},end:{line:152,column:3}}],line:139},"36":{loc:{start:{line:140,column:3},end:{line:151,column:4}},type:"if",locations:[{start:{line:140,column:3},end:{line:151,column:4}},{start:{line:140,column:3},end:{line:151,column:4}}],line:140},"37":{loc:{start:{line:141,column:10},end:{line:141,column:36}},type:"binary-expr",locations:[{start:{line:141,column:10},end:{line:141,column:18}},{start:{line:141,column:22},end:{line:141,column:36}}],line:141},"38":{loc:{start:{line:142,column:10},end:{line:151,column:4}},type:"if",locations:[{start:{line:142,column:10},end:{line:151,column:4}},{start:{line:142,column:10},end:{line:151,column:4}}],line:142},"39":{loc:{start:{line:143,column:19},end:{line:143,column:92}},type:"binary-expr",locations:[{start:{line:143,column:19},end:{line:143,column:55}},{start:{line:143,column:59},end:{line:143,column:92}}],line:143},"40":{loc:{start:{line:144,column:4},end:{line:148,column:5}},type:"if",locations:[{start:{line:144,column:4},end:{line:148,column:5}},{start:{line:144,column:4},end:{line:148,column:5}}],line:144},"41":{loc:{start:{line:147,column:11},end:{line:147,column:25}},type:"binary-expr",locations:[{start:{line:147,column:11},end:{line:147,column:19}},{start:{line:147,column:23},end:{line:147,column:25}}],line:147},"42":{loc:{start:{line:149,column:10},end:{line:151,column:4}},type:"if",locations:[{start:{line:149,column:10},end:{line:151,column:4}},{start:{line:149,column:10},end:{line:151,column:4}}],line:149},"43":{loc:{start:{line:150,column:16},end:{line:150,column:101}},type:"binary-expr",locations:[{start:{line:150,column:16},end:{line:150,column:51}},{start:{line:150,column:55},end:{line:150,column:89}},{start:{line:150,column:93},end:{line:150,column:101}}],line:150},"44":{loc:{start:{line:157,column:1},end:{line:159,column:2}},type:"if",locations:[{start:{line:157,column:1},end:{line:159,column:2}},{start:{line:157,column:1},end:{line:159,column:2}}],line:157},"45":{loc:{start:{line:157,column:5},end:{line:157,column:112}},type:"binary-expr",locations:[{start:{line:157,column:5},end:{line:157,column:16}},{start:{line:157,column:21},end:{line:157,column:30}},{start:{line:157,column:34},end:{line:157,column:58}},{start:{line:157,column:62},end:{line:157,column:81}},{start:{line:157,column:86},end:{line:157,column:112}}],line:157},"46":{loc:{start:{line:161,column:1},end:{line:167,column:2}},type:"if",locations:[{start:{line:161,column:1},end:{line:167,column:2}},{start:{line:161,column:1},end:{line:167,column:2}}],line:161},"47":{loc:{start:{line:163,column:3},end:{line:165,column:4}},type:"if",locations:[{start:{line:163,column:3},end:{line:165,column:4}},{start:{line:163,column:3},end:{line:165,column:4}}],line:163},"48":{loc:{start:{line:174,column:1},end:{line:176,column:2}},type:"if",locations:[{start:{line:174,column:1},end:{line:176,column:2}},{start:{line:174,column:1},end:{line:176,column:2}}],line:174},"49":{loc:{start:{line:174,column:5},end:{line:174,column:54}},type:"binary-expr",locations:[{start:{line:174,column:5},end:{line:174,column:16}},{start:{line:174,column:20},end:{line:174,column:54}}],line:174},"50":{loc:{start:{line:175,column:8},end:{line:175,column:22}},type:"binary-expr",locations:[{start:{line:175,column:8},end:{line:175,column:16}},{start:{line:175,column:20},end:{line:175,column:22}}],line:175},"51":{loc:{start:{line:190,column:1},end:{line:201,column:2}},type:"if",locations:[{start:{line:190,column:1},end:{line:201,column:2}},{start:{line:190,column:1},end:{line:201,column:2}}],line:190},"52":{loc:{start:{line:194,column:10},end:{line:194,column:43}},type:"cond-expr",locations:[{start:{line:194,column:18},end:{line:194,column:38}},{start:{line:194,column:41},end:{line:194,column:43}}],line:194},"53":{loc:{start:{line:197,column:8},end:{line:201,column:2}},type:"if",locations:[{start:{line:197,column:8},end:{line:201,column:2}},{start:{line:197,column:8},end:{line:201,column:2}}],line:197},"54":{loc:{start:{line:199,column:8},end:{line:201,column:2}},type:"if",locations:[{start:{line:199,column:8},end:{line:201,column:2}},{start:{line:199,column:8},end:{line:201,column:2}}],line:199},"55":{loc:{start:{line:203,column:8},end:{line:203,column:17}},type:"binary-expr",locations:[{start:{line:203,column:8},end:{line:203,column:11}},{start:{line:203,column:15},end:{line:203,column:17}}],line:203},"56":{loc:{start:{line:205,column:1},end:{line:207,column:2}},type:"if",locations:[{start:{line:205,column:1},end:{line:207,column:2}},{start:{line:205,column:1},end:{line:207,column:2}}],line:205}},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0},f:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},b:{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0,0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0,0],"44":[0,0],"45":[0,0,0,0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0],"52":[0,0],"53":[0,0],"54":[0,0],"55":[0,0],"56":[0,0]},_coverageSchema:"43e27e138ebf9cfc5966b082cf9a028302ed4184",hash:"aa6dae0aec5fb24c7c531ceeaab7ca593fe6392e"};var coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}return coverage[path]=coverageData;}();var constants=(cov_1pyj5qc77c.s[0]++,require('./constants.js'));var atree=(cov_1pyj5qc77c.s[1]++,require('./atree.js'));var query=(cov_1pyj5qc77c.s[2]++,require('./query.js'));cov_1pyj5qc77c.s[3]++;var getPseudoContent=function(node,selector){cov_1pyj5qc77c.f[0]++;var styles=(cov_1pyj5qc77c.s[4]++,window.getComputedStyle(node,selector));var ret=(cov_1pyj5qc77c.s[5]++,styles.getPropertyValue('content'));var inline=(cov_1pyj5qc77c.s[6]++,styles.display.substr(0,6)==='inline');cov_1pyj5qc77c.s[7]++;if(!ret){cov_1pyj5qc77c.b[0][0]++;cov_1pyj5qc77c.s[8]++;return'';}else{cov_1pyj5qc77c.b[0][1]++;}cov_1pyj5qc77c.s[9]++;if(ret.substr(0,1)!=='"'){cov_1pyj5qc77c.b[1][0]++;cov_1pyj5qc77c.s[10]++;return'';}else{cov_1pyj5qc77c.b[1][1]++;cov_1pyj5qc77c.s[11]++;if(inline){cov_1pyj5qc77c.b[2][0]++;cov_1pyj5qc77c.s[12]++;return ret.slice(1,-1);}else{cov_1pyj5qc77c.b[2][1]++;cov_1pyj5qc77c.s[13]++;return' '+ret.slice(1,-1)+' ';}}};cov_1pyj5qc77c.s[14]++;var getContent=function(root,visited){cov_1pyj5qc77c.f[1]++;var children=(cov_1pyj5qc77c.s[15]++,atree.getChildNodes(root));var ret=(cov_1pyj5qc77c.s[16]++,'');cov_1pyj5qc77c.s[17]++;for(var i=(cov_1pyj5qc77c.s[18]++,0);i<children.length;i++){var node=(cov_1pyj5qc77c.s[19]++,children[i]);cov_1pyj5qc77c.s[20]++;if(node.nodeType===node.TEXT_NODE){cov_1pyj5qc77c.b[3][0]++;cov_1pyj5qc77c.s[21]++;ret+=node.textContent;}else{cov_1pyj5qc77c.b[3][1]++;cov_1pyj5qc77c.s[22]++;if(node.nodeType===node.ELEMENT_NODE){cov_1pyj5qc77c.b[4][0]++;cov_1pyj5qc77c.s[23]++;if(node.tagName.toLowerCase()==='br'){cov_1pyj5qc77c.b[5][0]++;cov_1pyj5qc77c.s[24]++;ret+='\n';}else{cov_1pyj5qc77c.b[5][1]++;cov_1pyj5qc77c.s[25]++;if((cov_1pyj5qc77c.b[7][0]++,window.getComputedStyle(node).display.substr(0,6)==='inline')&&(cov_1pyj5qc77c.b[7][1]++,node.tagName.toLowerCase()!=='input')&&(cov_1pyj5qc77c.b[7][2]++,node.tagName.toLowerCase()!=='img')){cov_1pyj5qc77c.b[6][0]++;cov_1pyj5qc77c.s[26]++;// https://github.com/w3c/accname/issues/3 -1 1054 ret+=getName(node,true,visited);}else{cov_1pyj5qc77c.b[6][1]++;cov_1pyj5qc77c.s[27]++;ret+=' '+getName(node,true,visited)+' ';}}}else{cov_1pyj5qc77c.b[4][1]++;}}}cov_1pyj5qc77c.s[28]++;return ret;};cov_1pyj5qc77c.s[29]++;var allowNameFromContent=function(el){cov_1pyj5qc77c.f[2]++;var role=(cov_1pyj5qc77c.s[30]++,query.getRole(el));cov_1pyj5qc77c.s[31]++;return((cov_1pyj5qc77c.b[8][0]++,constants.roles[role])||(cov_1pyj5qc77c.b[8][1]++,{})).nameFromContents;};cov_1pyj5qc77c.s[32]++;var isLabelable=function(el){cov_1pyj5qc77c.f[3]++;var selector=(cov_1pyj5qc77c.s[33]++,constants.labelable.join(','));cov_1pyj5qc77c.s[34]++;return el.matches(selector);};// Control.labels is part of the standard, but not supported in most browsers -1 1055 cov_1pyj5qc77c.s[35]++;var getLabelNodes=function(element){cov_1pyj5qc77c.f[4]++;var labels=(cov_1pyj5qc77c.s[36]++,[]);var labelable=(cov_1pyj5qc77c.s[37]++,constants.labelable.join(','));cov_1pyj5qc77c.s[38]++;document.querySelectorAll('label').forEach(function(node){cov_1pyj5qc77c.f[5]++;cov_1pyj5qc77c.s[39]++;if(node.getAttribute('for')){cov_1pyj5qc77c.b[9][0]++;cov_1pyj5qc77c.s[40]++;if((cov_1pyj5qc77c.b[11][0]++,element.id)&&(cov_1pyj5qc77c.b[11][1]++,node.getAttribute('for')===element.id)){cov_1pyj5qc77c.b[10][0]++;cov_1pyj5qc77c.s[41]++;labels.push(node);}else{cov_1pyj5qc77c.b[10][1]++;}}else{cov_1pyj5qc77c.b[9][1]++;cov_1pyj5qc77c.s[42]++;if(node.querySelector(labelable)===element){cov_1pyj5qc77c.b[12][0]++;cov_1pyj5qc77c.s[43]++;labels.push(node);}else{cov_1pyj5qc77c.b[12][1]++;}}});cov_1pyj5qc77c.s[44]++;return labels;};cov_1pyj5qc77c.s[45]++;var isInLabelForOtherWidget=function(el){cov_1pyj5qc77c.f[6]++;var label=(cov_1pyj5qc77c.s[46]++,el.parentElement.closest('label'));var ownLabels=(cov_1pyj5qc77c.s[47]++,getLabelNodes(el));cov_1pyj5qc77c.s[48]++;return(cov_1pyj5qc77c.b[13][0]++,label)&&(cov_1pyj5qc77c.b[13][1]++,ownLabels.indexOf(label)===-1);};cov_1pyj5qc77c.s[49]++;var getName=function(el,recursive,visited,directReference){cov_1pyj5qc77c.f[7]++;var ret=(cov_1pyj5qc77c.s[50]++,'');cov_1pyj5qc77c.s[51]++;visited=(cov_1pyj5qc77c.b[14][0]++,visited)||(cov_1pyj5qc77c.b[14][1]++,[]);cov_1pyj5qc77c.s[52]++;if(visited.includes(el)){cov_1pyj5qc77c.b[15][0]++;cov_1pyj5qc77c.s[53]++;if(!directReference){cov_1pyj5qc77c.b[16][0]++;cov_1pyj5qc77c.s[54]++;return'';}else{cov_1pyj5qc77c.b[16][1]++;}}else{cov_1pyj5qc77c.b[15][1]++;cov_1pyj5qc77c.s[55]++;visited.push(el);}// A 1056 1056 // handled in atree 1057 1057 // B1058 -1 cov_22i8nvh4cs.s[56]++;if((cov_22i8nvh4cs.b[18][0]++,!recursive)&&(cov_22i8nvh4cs.b[18][1]++,el.matches('[aria-labelledby]'))){cov_22i8nvh4cs.b[17][0]++;var ids=(cov_22i8nvh4cs.s[57]++,el.getAttribute('aria-labelledby').split(/\s+/));var strings=(cov_22i8nvh4cs.s[58]++,ids.map(function(id){cov_22i8nvh4cs.f[8]++;var label=(cov_22i8nvh4cs.s[59]++,document.getElementById(id));cov_22i8nvh4cs.s[60]++;return label?(cov_22i8nvh4cs.b[19][0]++,getName(label,true,visited,true)):(cov_22i8nvh4cs.b[19][1]++,'');}));cov_22i8nvh4cs.s[61]++;ret=strings.join(' ');}else{cov_22i8nvh4cs.b[17][1]++;}// C1059 -1 cov_22i8nvh4cs.s[62]++;if((cov_22i8nvh4cs.b[21][0]++,!ret.trim())&&(cov_22i8nvh4cs.b[21][1]++,el.matches('[aria-label]'))){cov_22i8nvh4cs.b[20][0]++;cov_22i8nvh4cs.s[63]++;// FIXME: may skip to 2E1060 -1 ret=el.getAttribute('aria-label');}else{cov_22i8nvh4cs.b[20][1]++;}// D1061 -1 cov_22i8nvh4cs.s[64]++;if((cov_22i8nvh4cs.b[23][0]++,!ret.trim())&&(cov_22i8nvh4cs.b[23][1]++,!recursive)&&(cov_22i8nvh4cs.b[23][2]++,isLabelable(el))){cov_22i8nvh4cs.b[22][0]++;var strings=(cov_22i8nvh4cs.s[65]++,getLabelNodes(el).map(function(label){cov_22i8nvh4cs.f[9]++;cov_22i8nvh4cs.s[66]++;return getName(label,true,visited);}));cov_22i8nvh4cs.s[67]++;ret=strings.join(' ');}else{cov_22i8nvh4cs.b[22][1]++;}cov_22i8nvh4cs.s[68]++;if(!ret.trim()){cov_22i8nvh4cs.b[24][0]++;cov_22i8nvh4cs.s[69]++;ret=(cov_22i8nvh4cs.b[25][0]++,el.placeholder)||(cov_22i8nvh4cs.b[25][1]++,'');}else{cov_22i8nvh4cs.b[24][1]++;}cov_22i8nvh4cs.s[70]++;if(!ret.trim()){cov_22i8nvh4cs.b[26][0]++;cov_22i8nvh4cs.s[71]++;ret=(cov_22i8nvh4cs.b[27][0]++,el.alt)||(cov_22i8nvh4cs.b[27][1]++,'');}else{cov_22i8nvh4cs.b[26][1]++;}cov_22i8nvh4cs.s[72]++;if((cov_22i8nvh4cs.b[29][0]++,!ret.trim())&&(cov_22i8nvh4cs.b[29][1]++,el.matches('abbr,acronym'))&&(cov_22i8nvh4cs.b[29][2]++,el.title)){cov_22i8nvh4cs.b[28][0]++;cov_22i8nvh4cs.s[73]++;ret=el.title;}else{cov_22i8nvh4cs.b[28][1]++;}cov_22i8nvh4cs.s[74]++;if(!ret.trim()){cov_22i8nvh4cs.b[30][0]++;cov_22i8nvh4cs.s[75]++;for(var selector in constants.nameFromDescendant){cov_22i8nvh4cs.s[76]++;if(el.matches(selector)){cov_22i8nvh4cs.b[31][0]++;var descendant=(cov_22i8nvh4cs.s[77]++,el.querySelector(constants.nameFromDescendant[selector]));cov_22i8nvh4cs.s[78]++;if(descendant){cov_22i8nvh4cs.b[32][0]++;cov_22i8nvh4cs.s[79]++;ret=getName(descendant,true,visited);}else{cov_22i8nvh4cs.b[32][1]++;}}else{cov_22i8nvh4cs.b[31][1]++;}}}else{cov_22i8nvh4cs.b[30][1]++;}// E1062 -1 cov_22i8nvh4cs.s[80]++;if((cov_22i8nvh4cs.b[34][0]++,!ret.trim())&&((cov_22i8nvh4cs.b[34][1]++,recursive)||(cov_22i8nvh4cs.b[34][2]++,isInLabelForOtherWidget(el))||(cov_22i8nvh4cs.b[34][3]++,query.matches(el,'button')))){cov_22i8nvh4cs.b[33][0]++;cov_22i8nvh4cs.s[81]++;if(query.matches(el,'textbox,button,combobox,listbox,range')){cov_22i8nvh4cs.b[35][0]++;cov_22i8nvh4cs.s[82]++;if(query.matches(el,'textbox,button')){cov_22i8nvh4cs.b[36][0]++;cov_22i8nvh4cs.s[83]++;ret=(cov_22i8nvh4cs.b[37][0]++,el.value)||(cov_22i8nvh4cs.b[37][1]++,el.textContent);}else{cov_22i8nvh4cs.b[36][1]++;cov_22i8nvh4cs.s[84]++;if(query.matches(el,'combobox,listbox')){cov_22i8nvh4cs.b[38][0]++;var selected=(cov_22i8nvh4cs.s[85]++,(cov_22i8nvh4cs.b[39][0]++,query.querySelector(el,':selected'))||(cov_22i8nvh4cs.b[39][1]++,query.querySelector(el,'option')));cov_22i8nvh4cs.s[86]++;if(selected){cov_22i8nvh4cs.b[40][0]++;cov_22i8nvh4cs.s[87]++;ret=getName(selected,recursive,visited);}else{cov_22i8nvh4cs.b[40][1]++;cov_22i8nvh4cs.s[88]++;ret=(cov_22i8nvh4cs.b[41][0]++,el.value)||(cov_22i8nvh4cs.b[41][1]++,'');}}else{cov_22i8nvh4cs.b[38][1]++;cov_22i8nvh4cs.s[89]++;if(query.matches(el,'range')){cov_22i8nvh4cs.b[42][0]++;cov_22i8nvh4cs.s[90]++;ret=''+((cov_22i8nvh4cs.b[43][0]++,query.getAttribute(el,'valuetext'))||(cov_22i8nvh4cs.b[43][1]++,query.getAttribute(el,'valuenow'))||(cov_22i8nvh4cs.b[43][2]++,el.value));}else{cov_22i8nvh4cs.b[42][1]++;}}}}else{cov_22i8nvh4cs.b[35][1]++;}}else{cov_22i8nvh4cs.b[33][1]++;}// F-1 1058 cov_1pyj5qc77c.s[56]++;if((cov_1pyj5qc77c.b[18][0]++,!recursive)&&(cov_1pyj5qc77c.b[18][1]++,el.matches('[aria-labelledby]'))){cov_1pyj5qc77c.b[17][0]++;var ids=(cov_1pyj5qc77c.s[57]++,el.getAttribute('aria-labelledby').split(/\s+/));var strings=(cov_1pyj5qc77c.s[58]++,ids.map(function(id){cov_1pyj5qc77c.f[8]++;var label=(cov_1pyj5qc77c.s[59]++,document.getElementById(id));cov_1pyj5qc77c.s[60]++;return label?(cov_1pyj5qc77c.b[19][0]++,getName(label,true,visited,true)):(cov_1pyj5qc77c.b[19][1]++,'');}));cov_1pyj5qc77c.s[61]++;ret=strings.join(' ');}else{cov_1pyj5qc77c.b[17][1]++;}// C -1 1059 cov_1pyj5qc77c.s[62]++;if((cov_1pyj5qc77c.b[21][0]++,!ret.trim())&&(cov_1pyj5qc77c.b[21][1]++,el.matches('[aria-label]'))){cov_1pyj5qc77c.b[20][0]++;cov_1pyj5qc77c.s[63]++;// FIXME: may skip to 2E -1 1060 ret=el.getAttribute('aria-label');}else{cov_1pyj5qc77c.b[20][1]++;}// D -1 1061 cov_1pyj5qc77c.s[64]++;if((cov_1pyj5qc77c.b[23][0]++,!ret.trim())&&(cov_1pyj5qc77c.b[23][1]++,!recursive)&&(cov_1pyj5qc77c.b[23][2]++,isLabelable(el))){cov_1pyj5qc77c.b[22][0]++;var strings=(cov_1pyj5qc77c.s[65]++,getLabelNodes(el).map(function(label){cov_1pyj5qc77c.f[9]++;cov_1pyj5qc77c.s[66]++;return getName(label,true,visited);}));cov_1pyj5qc77c.s[67]++;ret=strings.join(' ');}else{cov_1pyj5qc77c.b[22][1]++;}cov_1pyj5qc77c.s[68]++;if(!ret.trim()){cov_1pyj5qc77c.b[24][0]++;cov_1pyj5qc77c.s[69]++;ret=(cov_1pyj5qc77c.b[25][0]++,el.placeholder)||(cov_1pyj5qc77c.b[25][1]++,'');}else{cov_1pyj5qc77c.b[24][1]++;}cov_1pyj5qc77c.s[70]++;if(!ret.trim()){cov_1pyj5qc77c.b[26][0]++;cov_1pyj5qc77c.s[71]++;ret=(cov_1pyj5qc77c.b[27][0]++,el.alt)||(cov_1pyj5qc77c.b[27][1]++,'');}else{cov_1pyj5qc77c.b[26][1]++;}cov_1pyj5qc77c.s[72]++;if((cov_1pyj5qc77c.b[29][0]++,!ret.trim())&&(cov_1pyj5qc77c.b[29][1]++,el.matches('abbr,acronym'))&&(cov_1pyj5qc77c.b[29][2]++,el.title)){cov_1pyj5qc77c.b[28][0]++;cov_1pyj5qc77c.s[73]++;ret=el.title;}else{cov_1pyj5qc77c.b[28][1]++;}cov_1pyj5qc77c.s[74]++;if(!ret.trim()){cov_1pyj5qc77c.b[30][0]++;cov_1pyj5qc77c.s[75]++;for(var selector in constants.nameFromDescendant){cov_1pyj5qc77c.s[76]++;if(el.matches(selector)){cov_1pyj5qc77c.b[31][0]++;var descendant=(cov_1pyj5qc77c.s[77]++,el.querySelector(constants.nameFromDescendant[selector]));cov_1pyj5qc77c.s[78]++;if(descendant){cov_1pyj5qc77c.b[32][0]++;cov_1pyj5qc77c.s[79]++;ret=getName(descendant,true,visited);}else{cov_1pyj5qc77c.b[32][1]++;}}else{cov_1pyj5qc77c.b[31][1]++;}}}else{cov_1pyj5qc77c.b[30][1]++;}// E -1 1062 cov_1pyj5qc77c.s[80]++;if((cov_1pyj5qc77c.b[34][0]++,!ret.trim())&&((cov_1pyj5qc77c.b[34][1]++,recursive)||(cov_1pyj5qc77c.b[34][2]++,isInLabelForOtherWidget(el))||(cov_1pyj5qc77c.b[34][3]++,query.matches(el,'button')))){cov_1pyj5qc77c.b[33][0]++;cov_1pyj5qc77c.s[81]++;if(query.matches(el,'textbox,button,combobox,listbox,range')){cov_1pyj5qc77c.b[35][0]++;cov_1pyj5qc77c.s[82]++;if(query.matches(el,'textbox,button')){cov_1pyj5qc77c.b[36][0]++;cov_1pyj5qc77c.s[83]++;ret=(cov_1pyj5qc77c.b[37][0]++,el.value)||(cov_1pyj5qc77c.b[37][1]++,el.textContent);}else{cov_1pyj5qc77c.b[36][1]++;cov_1pyj5qc77c.s[84]++;if(query.matches(el,'combobox,listbox')){cov_1pyj5qc77c.b[38][0]++;var selected=(cov_1pyj5qc77c.s[85]++,(cov_1pyj5qc77c.b[39][0]++,query.querySelector(el,':selected'))||(cov_1pyj5qc77c.b[39][1]++,query.querySelector(el,'option')));cov_1pyj5qc77c.s[86]++;if(selected){cov_1pyj5qc77c.b[40][0]++;cov_1pyj5qc77c.s[87]++;ret=getName(selected,recursive,visited);}else{cov_1pyj5qc77c.b[40][1]++;cov_1pyj5qc77c.s[88]++;ret=(cov_1pyj5qc77c.b[41][0]++,el.value)||(cov_1pyj5qc77c.b[41][1]++,'');}}else{cov_1pyj5qc77c.b[38][1]++;cov_1pyj5qc77c.s[89]++;if(query.matches(el,'range')){cov_1pyj5qc77c.b[42][0]++;cov_1pyj5qc77c.s[90]++;ret=''+((cov_1pyj5qc77c.b[43][0]++,query.getAttribute(el,'valuetext'))||(cov_1pyj5qc77c.b[43][1]++,query.getAttribute(el,'valuenow'))||(cov_1pyj5qc77c.b[43][2]++,el.value));}else{cov_1pyj5qc77c.b[42][1]++;}}}}else{cov_1pyj5qc77c.b[35][1]++;}}else{cov_1pyj5qc77c.b[33][1]++;}// F 1063 1063 // FIXME: menu is not mentioned in the spec1064 -1 cov_22i8nvh4cs.s[91]++;if((cov_22i8nvh4cs.b[45][0]++,!ret.trim())&&((cov_22i8nvh4cs.b[45][1]++,recursive)||(cov_22i8nvh4cs.b[45][2]++,allowNameFromContent(el))||(cov_22i8nvh4cs.b[45][3]++,el.closest('label')))&&(cov_22i8nvh4cs.b[45][4]++,!query.matches(el,'menu'))){cov_22i8nvh4cs.b[44][0]++;cov_22i8nvh4cs.s[92]++;ret=getContent(el,visited);}else{cov_22i8nvh4cs.b[44][1]++;}cov_22i8nvh4cs.s[93]++;if(!ret.trim()){cov_22i8nvh4cs.b[46][0]++;cov_22i8nvh4cs.s[94]++;for(var selector in constants.nameDefaults){cov_22i8nvh4cs.s[95]++;if(el.matches(selector)){cov_22i8nvh4cs.b[47][0]++;cov_22i8nvh4cs.s[96]++;ret=constants.nameDefaults[selector];}else{cov_22i8nvh4cs.b[47][1]++;}}}else{cov_22i8nvh4cs.b[46][1]++;}// G/H-1 1064 cov_1pyj5qc77c.s[91]++;if((cov_1pyj5qc77c.b[45][0]++,!ret.trim())&&((cov_1pyj5qc77c.b[45][1]++,recursive)||(cov_1pyj5qc77c.b[45][2]++,allowNameFromContent(el))||(cov_1pyj5qc77c.b[45][3]++,el.closest('label')))&&(cov_1pyj5qc77c.b[45][4]++,!query.matches(el,'menu'))){cov_1pyj5qc77c.b[44][0]++;cov_1pyj5qc77c.s[92]++;ret=getContent(el,visited);}else{cov_1pyj5qc77c.b[44][1]++;}cov_1pyj5qc77c.s[93]++;if(!ret.trim()){cov_1pyj5qc77c.b[46][0]++;cov_1pyj5qc77c.s[94]++;for(var selector in constants.nameDefaults){cov_1pyj5qc77c.s[95]++;if(el.matches(selector)){cov_1pyj5qc77c.b[47][0]++;cov_1pyj5qc77c.s[96]++;ret=constants.nameDefaults[selector];}else{cov_1pyj5qc77c.b[47][1]++;}}}else{cov_1pyj5qc77c.b[46][1]++;}// G/H 1065 1065 // handled in getContent 1066 1066 // I 1067 1067 // FIXME: presentation not mentioned in the spec1068 -1 cov_22i8nvh4cs.s[97]++;if((cov_22i8nvh4cs.b[49][0]++,!ret.trim())&&(cov_22i8nvh4cs.b[49][1]++,!query.matches(el,'presentation'))){cov_22i8nvh4cs.b[48][0]++;cov_22i8nvh4cs.s[98]++;ret=(cov_22i8nvh4cs.b[50][0]++,el.title)||(cov_22i8nvh4cs.b[50][1]++,'');}else{cov_22i8nvh4cs.b[48][1]++;}var before=(cov_22i8nvh4cs.s[99]++,getPseudoContent(el,':before'));var after=(cov_22i8nvh4cs.s[100]++,getPseudoContent(el,':after'));cov_22i8nvh4cs.s[101]++;return before+ret+after;};cov_22i8nvh4cs.s[102]++;var getNameTrimmed=function(el){cov_22i8nvh4cs.f[10]++;cov_22i8nvh4cs.s[103]++;return getName(el).replace(/\s+/g,' ').trim();};cov_22i8nvh4cs.s[104]++;var getDescription=function(el){cov_22i8nvh4cs.f[11]++;var ret=(cov_22i8nvh4cs.s[105]++,'');cov_22i8nvh4cs.s[106]++;if(el.matches('[aria-describedby]')){cov_22i8nvh4cs.b[51][0]++;var ids=(cov_22i8nvh4cs.s[107]++,el.getAttribute('aria-describedby').split(/\s+/));var strings=(cov_22i8nvh4cs.s[108]++,ids.map(function(id){cov_22i8nvh4cs.f[12]++;var label=(cov_22i8nvh4cs.s[109]++,document.getElementById(id));cov_22i8nvh4cs.s[110]++;return label?(cov_22i8nvh4cs.b[52][0]++,getName(label,true)):(cov_22i8nvh4cs.b[52][1]++,'');}));cov_22i8nvh4cs.s[111]++;ret=strings.join(' ');}else{cov_22i8nvh4cs.b[51][1]++;cov_22i8nvh4cs.s[112]++;if(el.title){cov_22i8nvh4cs.b[53][0]++;cov_22i8nvh4cs.s[113]++;ret=el.title;}else{cov_22i8nvh4cs.b[53][1]++;cov_22i8nvh4cs.s[114]++;if(el.placeholder){cov_22i8nvh4cs.b[54][0]++;cov_22i8nvh4cs.s[115]++;ret=el.placeholder;}else{cov_22i8nvh4cs.b[54][1]++;}}}cov_22i8nvh4cs.s[116]++;ret=((cov_22i8nvh4cs.b[55][0]++,ret)||(cov_22i8nvh4cs.b[55][1]++,'')).trim().replace(/\s+/g,' ');cov_22i8nvh4cs.s[117]++;if(ret===getNameTrimmed(el)){cov_22i8nvh4cs.b[56][0]++;cov_22i8nvh4cs.s[118]++;ret='';}else{cov_22i8nvh4cs.b[56][1]++;}cov_22i8nvh4cs.s[119]++;return ret;};cov_22i8nvh4cs.s[120]++;module.exports={getName:getNameTrimmed,getDescription:getDescription};-1 1068 cov_1pyj5qc77c.s[97]++;if((cov_1pyj5qc77c.b[49][0]++,!ret.trim())&&(cov_1pyj5qc77c.b[49][1]++,!query.matches(el,'presentation'))){cov_1pyj5qc77c.b[48][0]++;cov_1pyj5qc77c.s[98]++;ret=(cov_1pyj5qc77c.b[50][0]++,el.title)||(cov_1pyj5qc77c.b[50][1]++,'');}else{cov_1pyj5qc77c.b[48][1]++;}var before=(cov_1pyj5qc77c.s[99]++,getPseudoContent(el,':before'));var after=(cov_1pyj5qc77c.s[100]++,getPseudoContent(el,':after'));cov_1pyj5qc77c.s[101]++;return before+ret+after;};cov_1pyj5qc77c.s[102]++;var getNameTrimmed=function(el){cov_1pyj5qc77c.f[10]++;cov_1pyj5qc77c.s[103]++;return getName(el).replace(/\s+/g,' ').trim();};cov_1pyj5qc77c.s[104]++;var getDescription=function(el){cov_1pyj5qc77c.f[11]++;var ret=(cov_1pyj5qc77c.s[105]++,'');cov_1pyj5qc77c.s[106]++;if(el.matches('[aria-describedby]')){cov_1pyj5qc77c.b[51][0]++;var ids=(cov_1pyj5qc77c.s[107]++,el.getAttribute('aria-describedby').split(/\s+/));var strings=(cov_1pyj5qc77c.s[108]++,ids.map(function(id){cov_1pyj5qc77c.f[12]++;var label=(cov_1pyj5qc77c.s[109]++,document.getElementById(id));cov_1pyj5qc77c.s[110]++;return label?(cov_1pyj5qc77c.b[52][0]++,getName(label,true)):(cov_1pyj5qc77c.b[52][1]++,'');}));cov_1pyj5qc77c.s[111]++;ret=strings.join(' ');}else{cov_1pyj5qc77c.b[51][1]++;cov_1pyj5qc77c.s[112]++;if(el.title){cov_1pyj5qc77c.b[53][0]++;cov_1pyj5qc77c.s[113]++;ret=el.title;}else{cov_1pyj5qc77c.b[53][1]++;cov_1pyj5qc77c.s[114]++;if(el.placeholder){cov_1pyj5qc77c.b[54][0]++;cov_1pyj5qc77c.s[115]++;ret=el.placeholder;}else{cov_1pyj5qc77c.b[54][1]++;}}}cov_1pyj5qc77c.s[116]++;ret=((cov_1pyj5qc77c.b[55][0]++,ret)||(cov_1pyj5qc77c.b[55][1]++,'')).trim().replace(/\s+/g,' ');cov_1pyj5qc77c.s[117]++;if(ret===getNameTrimmed(el)){cov_1pyj5qc77c.b[56][0]++;cov_1pyj5qc77c.s[118]++;ret='';}else{cov_1pyj5qc77c.b[56][1]++;}cov_1pyj5qc77c.s[119]++;return ret;};cov_1pyj5qc77c.s[120]++;module.exports={getName:getNameTrimmed,getDescription:getDescription}; 1069 1069 1070 1070 },{"./atree.js":5,"./constants.js":7,"./query.js":9}],9:[function(require,module,exports){ 1071 1071 var attrs = require('./attrs.js'); @@ -1126,8 +1126,6 @@ module.exports = { 1126 1126 }; 1127 1127 1128 1128 },{"./atree.js":5,"./attrs.js":6}],10:[function(require,module,exports){1129 -1 window.getAccNameVersion = "2.26";1130 -11131 1129 /*! 1132 1130 CalcNames: The AccName Computation Prototype, compute the Name and Description property values for a DOM node 1133 1131 Returns an object with 'name' and 'desc' properties. @@ -1138,1408 +1136,1593 @@ https://github.com/whatsock/w3c-alternative-text-computation 1138 1136 Distributed under the terms of the Open Source Initiative OSI - MIT License 1139 1137 */ 1140 11381141 -1 // AccName Computation Prototype1142 -1 window.getAccName = window.calcNames = function(1143 -1 node,1144 -1 fnc,1145 -1 preventVisualARIASelfCSSRef,1146 -1 overrides1147 -1 ) {1148 -1 overrides = overrides || {};1149 -1 var docO = overrides.document || document;1150 -1 var props = { name: "", desc: "", error: "" };1151 -1 try {1152 -1 if (!node || node.nodeType !== 1) {1153 -1 return props;1154 -1 }1155 -1 var rootNode = node;1156 -11157 -1 // Track nodes to prevent duplicate node reference parsing.1158 -1 var nodes = [];1159 -1 // Track aria-owns references to prevent duplicate parsing.1160 -1 var owns = [];1161 -11162 -1 // Recursively process a DOM node to compute an accessible name in accordance with the spec1163 -1 var walk = function(1164 -1 refNode,1165 -1 stop,1166 -1 skip,1167 -1 nodesToIgnoreValues,1168 -1 skipAbort,1169 -1 ownedBy,1170 -1 skipTo1171 -1 ) {1172 -1 skipTo = skipTo || {};1173 -1 skipTo.tag = skipTo.tag || false;1174 -1 skipTo.role = skipTo.role || false;1175 -1 skipTo.go = skipTo.go || false;1176 -1 var fullResult = {1177 -1 name: "",1178 -1 title: ""1179 -1 };-1 1139 (function() { -1 1140 var nameSpace = window.AccNamePrototypeNameSpace || window; -1 1141 if (nameSpace && typeof nameSpace === "string" && nameSpace.length) { -1 1142 window[nameSpace] = {}; -1 1143 nameSpace = window[nameSpace]; -1 1144 } -1 1145 nameSpace.getAccNameVersion = "2.42"; -1 1146 // AccName Computation Prototype -1 1147 nameSpace.getAccName = nameSpace.calcNames = function( -1 1148 node, -1 1149 fnc, -1 1150 preventVisualARIASelfCSSRef, -1 1151 overrides -1 1152 ) { -1 1153 overrides = overrides || {}; -1 1154 var docO = overrides.document || document; -1 1155 var props = { name: "", desc: "", error: "" }; -1 1156 var nameFromPlaceholder = false; -1 1157 var nameFromUserAgent = false; -1 1158 try { -1 1159 if (!node || node.nodeType !== 1) { -1 1160 return props; -1 1161 } -1 1162 var rootNode = node; -1 1163 -1 1164 // Track nodes to prevent duplicate node reference parsing. -1 1165 var nodes = []; -1 1166 // Track aria-owns references to prevent duplicate parsing. -1 1167 var owns = []; -1 1168 -1 1169 // Recursively process a DOM node to compute an accessible name in accordance with the spec -1 1170 var walk = function( -1 1171 refNode, -1 1172 stop, -1 1173 skip, -1 1174 nodesToIgnoreValues, -1 1175 skipAbort, -1 1176 ownedBy, -1 1177 skipTo -1 1178 ) { -1 1179 skipTo = skipTo || {}; -1 1180 skipTo.tag = skipTo.tag || false; -1 1181 skipTo.role = skipTo.role || false; -1 1182 skipTo.go = skipTo.go || false; -1 1183 var fullResult = { -1 1184 name: "", -1 1185 title: "" -1 1186 }; -1 1187 var hasLabel = false; 1180 11881181 -1 /*-1 1189 /* 1182 1190 ARIA Role Exception Rule Set 1.1 1183 1191 The following Role Exception Rule Set is based on the following ARIA Working Group discussion involving all relevant browser venders. 1184 1192 https://lists.w3.org/Archives/Public/public-aria/2017Jun/0057.html 1185 1193 Plus roles extended for the Role Parity project. 1186 1194 */1187 -1 var isException = function(node, refNode) {1188 -1 if (1189 -1 !refNode ||1190 -1 !node ||1191 -1 refNode.nodeType !== 1 ||1192 -1 node.nodeType !== 11193 -1 ) {1194 -1 return false;1195 -1 }1196 -11197 -1 var inList = function(node, list) {1198 -1 var role = getRole(node);1199 -1 var tag = node.nodeName.toLowerCase();1200 -1 return (1201 -1 (role && list.roles.indexOf(role) >= 0) ||1202 -1 (!role && list.tags.indexOf(tag) >= 0)1203 -1 );1204 -1 };1205 -11206 -1 // The list3 overrides must be checked first.1207 -1 if (inList(node, list3)) {-1 1195 var isException = function(node, refNode) { 1208 1196 if (1209 -1 node === refNode &&1210 -1 !(node.id && ownedBy[node.id] && ownedBy[node.id].node)-1 1197 !refNode || -1 1198 !node || -1 1199 refNode.nodeType !== 1 || -1 1200 node.nodeType !== 1 1211 1201 ) {1212 -1 return !isFocusable(node);1213 -1 } else {1214 -1 // Note: the inParent checker needs to be present to allow for embedded roles matching list3 when the referenced parent is referenced using aria-labelledby, aria-describedby, or aria-owns.1215 -1 return !(1216 -1 (inParent(node, ownedBy.top) &&1217 -1 node.nodeName.toLowerCase() !== "select") ||1218 -1 inList(refNode, list1)1219 -1 );-1 1202 return false; 1220 1203 }1221 -1 }1222 -1 // Otherwise process list2 to identify roles to ignore processing name from content.1223 -1 else if (1224 -1 (inList(node, list2) ||1225 -1 (node === rootNode && !inList(node, list1))) &&1226 -1 !skipTo.go1227 -1 ) {1228 -1 return true;1229 -1 } else {1230 -1 return false;1231 -1 }1232 -1 };1233 12041234 -1 var inParent = function(node, parent) {1235 -1 var trackNodes = [];1236 -1 while (node) {1237 -1 if (1238 -1 node.id &&1239 -1 ownedBy[node.id] &&1240 -1 ownedBy[node.id].node &&1241 -1 trackNodes.indexOf(node) === -11242 -1 ) {1243 -1 trackNodes.push(node);1244 -1 node = ownedBy[node.id].node;1245 -1 } else {1246 -1 node = node.parentNode;-1 1205 var inList = function(node, list) { -1 1206 var role = getRole(node); -1 1207 var tag = node.nodeName.toLowerCase(); -1 1208 return ( -1 1209 (role && list.roles.indexOf(role) >= 0) || -1 1210 (!role && list.tags.indexOf(tag) >= 0) -1 1211 ); -1 1212 }; -1 1213 -1 1214 // The list3 overrides must be checked first. -1 1215 if (inList(node, list3)) { -1 1216 if ( -1 1217 node === refNode && -1 1218 !(node.id && ownedBy[node.id] && ownedBy[node.id].node) -1 1219 ) { -1 1220 return !isFocusable(node); -1 1221 } else { -1 1222 // Note: the inParent checker needs to be present to allow for embedded roles matching list3 when the referenced parent is referenced using aria-labelledby, aria-describedby, or aria-owns. -1 1223 return !( -1 1224 (inParent(node, ownedBy.top) && -1 1225 node.nodeName.toLowerCase() !== "select") || -1 1226 inList(refNode, list1) -1 1227 ); -1 1228 } 1247 1229 }1248 -1 if (node && node === parent) {1249 -1 return true;1250 -1 } else if (!node || node === ownedBy.top || node === docO.body) {1251 -1 return false;-1 1230 // Otherwise process list2 to identify roles to ignore processing name from content. -1 1231 else -1 1232 return !!( -1 1233 (inList(node, list2) || -1 1234 (node === rootNode && !inList(node, list1))) && -1 1235 !skipTo.go -1 1236 ); -1 1237 }; -1 1238 -1 1239 var inParent = function(node, parent) { -1 1240 var trackNodes = []; -1 1241 while (node) { -1 1242 if ( -1 1243 node.id && -1 1244 ownedBy[node.id] && -1 1245 ownedBy[node.id].node && -1 1246 trackNodes.indexOf(node) === -1 -1 1247 ) { -1 1248 trackNodes.push(node); -1 1249 node = ownedBy[node.id].node; -1 1250 } else { -1 1251 node = node.parentNode; -1 1252 } -1 1253 if (node && node === parent) { -1 1254 return true; -1 1255 } else if (!node || node === ownedBy.top || node === docO.body) { -1 1256 return false; -1 1257 } 1252 1258 }1253 -1 }1254 -1 return false;1255 -1 };-1 1259 return false; -1 1260 }; 1256 12611257 -1 // Placeholder for storing CSS before and after pseudo element text values for the top level node1258 -1 var cssOP = {1259 -1 before: "",1260 -1 after: ""1261 -1 };-1 1262 // Placeholder for storing CSS before and after pseudo element text values for the top level node -1 1263 var cssOP = { -1 1264 before: "", -1 1265 after: "" -1 1266 }; 1262 12671263 -1 if (ownedBy.ref) {1264 -1 if (isParentHidden(refNode, docO.body, true, true)) {1265 -1 // If referenced via aria-labelledby or aria-describedby, do not return a name or description if a parent node is hidden.1266 -1 return fullResult;1267 -1 } else if (isHidden(refNode, docO.body)) {1268 -1 // Otherwise, if aria-labelledby or aria-describedby reference a node that is explicitly hidden, then process all children regardless of their individual hidden states.1269 -1 var ignoreHidden = true;-1 1268 if (ownedBy.ref) { -1 1269 if (isParentHidden(refNode, docO.body, true, true)) { -1 1270 // If referenced via aria-labelledby or aria-describedby, do not return a name or description if a parent node is hidden. -1 1271 return fullResult; -1 1272 } else if (isHidden(refNode, docO.body)) { -1 1273 // Otherwise, if aria-labelledby or aria-describedby reference a node that is explicitly hidden, then process all children regardless of their individual hidden states. -1 1274 var ignoreHidden = true; -1 1275 } 1270 1276 }1271 -1 }1272 12771273 -1 if (!skipTo.tag && !skipTo.role && nodes.indexOf(refNode) === -1) {1274 -1 // Store the before and after pseudo element 'content' values for the top level DOM node1275 -1 // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added.1276 -1 cssOP = getCSSText(refNode, null);1277 -11278 -1 // Enabled in Visual ARIA to prevent self referencing by Visual ARIA tooltips1279 -1 if (preventVisualARIASelfCSSRef) {1280 -1 if (1281 -1 cssOP.before.indexOf(" [ARIA] ") !== -1 ||1282 -1 cssOP.before.indexOf(" aria-") !== -1 ||1283 -1 cssOP.before.indexOf(" accName: ") !== -11284 -1 )1285 -1 cssOP.before = "";1286 -1 if (1287 -1 cssOP.after.indexOf(" [ARIA] ") !== -1 ||1288 -1 cssOP.after.indexOf(" aria-") !== -1 ||1289 -1 cssOP.after.indexOf(" accDescription: ") !== -11290 -1 )1291 -1 cssOP.after = "";1292 -1 }1293 -1 }-1 1278 if (!skipTo.tag && !skipTo.role && nodes.indexOf(refNode) === -1) { -1 1279 // Store the before and after pseudo element 'content' values for the top level DOM node -1 1280 // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added. -1 1281 cssOP = getCSSText(refNode, null); 1294 12821295 -1 // Recursively apply the same naming computation to all nodes within the referenced structure1296 -1 var walkDOM = function(node, fn, refNode) {1297 -1 var res = {1298 -1 name: "",1299 -1 title: ""1300 -1 };1301 -1 if (!node) {1302 -1 return res;1303 -1 }1304 -1 var nodeIsBlock =1305 -1 node && node.nodeType === 1 && isBlockLevelElement(node)1306 -1 ? true1307 -1 : false;1308 -1 var currentNode = node;1309 -1 var fResult = fn(node) || {};1310 -1 if (fResult.name && fResult.name.length) {1311 -1 res.name += fResult.name;1312 -1 }1313 -1 if (!fResult.skip && !isException(node, ownedBy.top)) {1314 -1 if (skipTo.go) skipTo.go = false;1315 -1 node = node.firstChild;1316 -1 while (node) {1317 -1 res.name += walkDOM(node, fn, refNode).name;1318 -1 node = node.nextSibling;-1 1283 // Enabled in Visual ARIA to prevent self referencing by Visual ARIA tooltips -1 1284 if (preventVisualARIASelfCSSRef) { -1 1285 if ( -1 1286 cssOP.before.indexOf(" [ARIA] ") !== -1 || -1 1287 cssOP.before.indexOf(" aria-") !== -1 || -1 1288 cssOP.before.indexOf(" accName: ") !== -1 -1 1289 ) -1 1290 cssOP.before = ""; -1 1291 if ( -1 1292 cssOP.after.indexOf(" [ARIA] ") !== -1 || -1 1293 cssOP.after.indexOf(" aria-") !== -1 || -1 1294 cssOP.after.indexOf(" accDescription: ") !== -1 -1 1295 ) -1 1296 cssOP.after = ""; 1319 1297 } 1320 1298 }1321 -1 res.name += fResult.owns || "";1322 -1 if (1323 -1 rootNode === currentNode &&1324 -1 !trim(res.name) &&1325 -1 trim(fResult.title)1326 -1 ) {1327 -1 res.name = addSpacing(fResult.title);1328 -1 } else if (rootNode === currentNode && trim(fResult.title)) {1329 -1 res.title = addSpacing(fResult.title);1330 -1 }1331 -1 if (rootNode === currentNode && trim(fResult.desc)) {1332 -1 res.title = addSpacing(fResult.desc);1333 -1 }1334 -1 if (nodeIsBlock || fResult.isWidget) {1335 -1 res.name = addSpacing(res.name);1336 -1 }1337 -1 return res;1338 -1 };1339 12991340 -1 fullResult = walkDOM(1341 -1 refNode,1342 -1 function(node) {1343 -1 var i = 0;1344 -1 var element = null;1345 -1 var ids = [];1346 -1 var parts = [];1347 -1 var result = {-1 1300 // Recursively apply the same naming computation to all nodes within the referenced structure -1 1301 var walkDOM = function(node, fn, refNode) { -1 1302 var res = { 1348 1303 name: "",1349 -1 title: "",1350 -1 owns: "",1351 -1 skip: false-1 1304 title: "" 1352 1305 };1353 -1 var isEmbeddedNode =-1 1306 if (!node) { -1 1307 return res; -1 1308 } -1 1309 var nodeIsBlock = !!( 1354 1310 node && 1355 1311 node.nodeType === 1 &&1356 -1 nodesToIgnoreValues &&1357 -1 nodesToIgnoreValues.length &&1358 -1 nodesToIgnoreValues.indexOf(node) !== -1 &&1359 -1 node === rootNode &&1360 -1 node !== refNode1361 -1 ? true1362 -1 : false;1363 -1-1 1312 isBlockLevelElement(node) -1 1313 ); -1 1314 var currentNode = node; -1 1315 var fResult = fn(node) || {}; -1 1316 if (fResult.name && fResult.name.length) { -1 1317 res.name += fResult.name; -1 1318 } -1 1319 if (!fResult.skip && !isException(node, ownedBy.top)) { -1 1320 if (skipTo.go) skipTo.go = false; -1 1321 node = node.firstChild; -1 1322 while (node) { -1 1323 res.name += walkDOM(node, fn, refNode).name; -1 1324 node = node.nextSibling; -1 1325 } -1 1326 } -1 1327 res.name += fResult.owns || ""; 1364 1328 if (1365 -1 (skip ||1366 -1 !node ||1367 -1 nodes.indexOf(node) !== -1 ||1368 -1 (!ignoreHidden && isHidden(node, ownedBy.top))) &&1369 -1 !skipAbort &&1370 -1 !isEmbeddedNode-1 1329 rootNode === currentNode && -1 1330 refNode === currentNode && -1 1331 !trim(res.name) && -1 1332 trim(fResult.title) 1371 1333 ) {1372 -1 // Abort if algorithm step is already completed, or if node is a hidden child of refNode, or if this node has already been processed, or skip abort if aria-labelledby self references same node.1373 -1 return result;-1 1334 res.name = addSpacing(fResult.title); -1 1335 } else if ( -1 1336 rootNode === currentNode && -1 1337 refNode === currentNode && -1 1338 trim(fResult.title) -1 1339 ) { -1 1340 res.title = addSpacing(fResult.title); 1374 1341 }1375 -11376 -1 if (!skipTo.tag && !skipTo.role && nodes.indexOf(node) === -1) {1377 -1 nodes.push(node);-1 1342 if ( -1 1343 rootNode === currentNode && -1 1344 refNode === currentNode && -1 1345 trim(fResult.desc) -1 1346 ) { -1 1347 res.title = addSpacing(fResult.desc); 1378 1348 }1379 -11380 -1 // Store name for the current node.1381 -1 var name = "";1382 -1 // Store name from aria-owns references if detected.1383 -1 var ariaO = "";1384 -1 // Placeholder for storing CSS before and after pseudo element text values for the current node container element1385 -1 var cssO = {1386 -1 before: "",1387 -1 after: ""1388 -1 };1389 -11390 -1 var parent = refNode === node ? node : node.parentNode;1391 -1 if (!skipTo.tag && !skipTo.role && nodes.indexOf(parent) === -1) {1392 -1 nodes.push(parent);1393 -1 // Store the before and after pseudo element 'content' values for the current node container element1394 -1 // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added.1395 -1 cssO = getCSSText(parent, refNode);1396 -11397 -1 // Enabled in Visual ARIA to prevent self referencing by Visual ARIA tooltips1398 -1 if (preventVisualARIASelfCSSRef) {1399 -1 if (1400 -1 cssO.before.indexOf(" [ARIA] ") !== -1 ||1401 -1 cssO.before.indexOf(" aria-") !== -1 ||1402 -1 cssO.before.indexOf(" accName: ") !== -11403 -1 )1404 -1 cssO.before = "";1405 -1 if (1406 -1 cssO.after.indexOf(" [ARIA] ") !== -1 ||1407 -1 cssO.after.indexOf(" aria-") !== -1 ||1408 -1 cssO.after.indexOf(" accDescription: ") !== -11409 -1 )1410 -1 cssO.after = "";1411 -1 }-1 1349 if ( -1 1350 rootNode === currentNode && -1 1351 refNode === currentNode && -1 1352 trim(fResult.placeholder) && -1 1353 !trim(res.name) -1 1354 ) { -1 1355 res.name = addSpacing(fResult.placeholder); -1 1356 nameFromPlaceholder = true; -1 1357 } else if ( -1 1358 rootNode === currentNode && -1 1359 refNode === currentNode && -1 1360 trim(fResult.placeholder) && -1 1361 !trim(res.title) -1 1362 ) { -1 1363 res.title = addSpacing(fResult.placeholder); -1 1364 } -1 1365 if (nodeIsBlock || fResult.isWidget) { -1 1366 res.name = addSpacing(res.name); 1412 1367 } -1 1368 return res; -1 1369 }; -1 1370 -1 1371 fullResult = walkDOM( -1 1372 refNode, -1 1373 function(node) { -1 1374 var i = 0; -1 1375 var element = null; -1 1376 var ids = []; -1 1377 var parts = []; -1 1378 var result = { -1 1379 name: "", -1 1380 title: "", -1 1381 owns: "", -1 1382 skip: false -1 1383 }; -1 1384 var isEmbeddedNode = !!( -1 1385 node && -1 1386 node.nodeType === 1 && -1 1387 nodesToIgnoreValues && -1 1388 nodesToIgnoreValues.length && -1 1389 nodesToIgnoreValues.indexOf(node) !== -1 && -1 1390 node === rootNode && -1 1391 node !== refNode -1 1392 ); -1 1393 var hLabel = false; 1413 13941414 -1 // Process standard DOM element node1415 -1 if (node.nodeType === 1) {1416 -1 var nTag = node.nodeName.toLowerCase();1417 -1 var nRole = getRole(node);1418 -1 var aLabelledby =1419 -1 (!skipTo.tag &&1420 -1 !skipTo.role &&1421 -1 node.getAttribute("aria-labelledby")) ||1422 -1 "";1423 -1 var aDescribedby =1424 -1 (!skipTo.tag &&1425 -1 !skipTo.role &&1426 -1 node.getAttribute("aria-describedby")) ||1427 -1 "";1428 -1 var aLabel =1429 -1 (!skipTo.tag &&1430 -1 !skipTo.role &&1431 -1 node.getAttribute("aria-label")) ||1432 -1 "";1433 -1 var nTitle =1434 -1 (!skipTo.tag && !skipTo.role && node.getAttribute("title")) || "";1435 -11436 -1 var isNativeFormField = nativeFormFields.indexOf(nTag) !== -1;1437 -1 var isNativeButton = ["input"].indexOf(nTag) !== -1;1438 -1 var isRangeWidgetRole = rangeWidgetRoles.indexOf(nRole) !== -1;1439 -1 var isEditWidgetRole = editWidgetRoles.indexOf(nRole) !== -1;1440 -1 var isSelectWidgetRole = selectWidgetRoles.indexOf(nRole) !== -1;1441 -1 var isSimulatedFormField =1442 -1 isRangeWidgetRole ||1443 -1 isEditWidgetRole ||1444 -1 isSelectWidgetRole ||1445 -1 nRole === "combobox";1446 -1 var isWidgetRole =1447 -1 (isSimulatedFormField ||1448 -1 otherWidgetRoles.indexOf(nRole) !== -1) &&1449 -1 nRole !== "link";1450 -1 result.isWidget = isNativeFormField || isWidgetRole;1451 -11452 -1 var hasName = false;1453 -1 var hasDesc = false;1454 -1 var aOwns = node.getAttribute("aria-owns") || "";1455 -1 var isSeparatChildFormField =1456 -1 !skipTo.tag &&1457 -1 !skipTo.role &&1458 -1 !isEmbeddedNode &&1459 -1 ((node !== refNode &&1460 -1 (isNativeFormField || isSimulatedFormField)) ||1461 -1 (node.id &&1462 -1 ownedBy[node.id] &&1463 -1 ownedBy[node.id].target &&1464 -1 ownedBy[node.id].target === node))1465 -1 ? true1466 -1 : false;1467 -11468 -1 // Check for non-empty value of aria-describedby if current node equals reference node, follow each ID ref, then stop and process no deeper.1469 1395 if (1470 -1 !stop &&1471 -1 node === refNode &&1472 -1 !skipTo.tag &&1473 -1 !skipTo.role &&1474 -1 aDescribedby-1 1396 (skip || -1 1397 !node || -1 1398 nodes.indexOf(node) !== -1 || -1 1399 (!ignoreHidden && isHidden(node, ownedBy.top))) && -1 1400 !skipAbort && -1 1401 !isEmbeddedNode 1475 1402 ) {1476 -1 var desc = "";1477 -1 ids = aDescribedby.split(/\s+/);1478 -1 parts = [];1479 -1 for (i = 0; i < ids.length; i++) {1480 -1 element = docO.getElementById(ids[i]);1481 -1 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label1482 -1 parts.push(1483 -1 walk(element, true, false, [node], false, {1484 -1 ref: ownedBy,1485 -1 top: element1486 -1 }).name1487 -1 );1488 -1 }1489 -1 // Check for blank value, since whitespace chars alone are not valid as a name1490 -1 desc = trim(parts.join(" "));1491 -11492 -1 if (trim(desc)) {1493 -1 result.desc = desc;1494 -1 hasDesc = true;1495 -1 }-1 1403 // Abort if algorithm step is already completed, or if node is a hidden child of refNode, or if this node has already been processed, or skip abort if aria-labelledby self references same node. -1 1404 return result; 1496 1405 } 1497 14061498 -1 // Check for non-empty value of aria-labelledby on current node, follow each ID ref, then stop and process no deeper.1499 -1 if (!stop && !skipTo.tag && !skipTo.role && aLabelledby) {1500 -1 ids = aLabelledby.split(/\s+/);1501 -1 parts = [];1502 -1 for (i = 0; i < ids.length; i++) {1503 -1 element = docO.getElementById(ids[i]);1504 -1 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label1505 -1 parts.push(1506 -1 walk(element, true, skip, [node], element === refNode, {1507 -1 ref: ownedBy,1508 -1 top: element1509 -1 }).name1510 -1 );1511 -1 }1512 -1 // Check for blank value, since whitespace chars alone are not valid as a name1513 -1 name = trim(parts.join(" "));1514 -11515 -1 if (trim(name)) {1516 -1 hasName = true;1517 -1 // Abort further recursion if name is valid.1518 -1 result.skip = true;1519 -1 }-1 1407 if (!skipTo.tag && !skipTo.role && nodes.indexOf(node) === -1) { -1 1408 nodes.push(node); 1520 1409 } 1521 14101522 -1 // Otherwise, if current node has a non-empty aria-label then set as name and process no deeper within the branch.1523 -1 if (1524 -1 !skipTo.tag &&1525 -1 !skipTo.role &&1526 -1 !hasName &&1527 -1 trim(aLabel) &&1528 -1 !isSeparatChildFormField1529 -1 ) {1530 -1 name = aLabel;1531 -11532 -1 // Check for blank value, since whitespace chars alone are not valid as a name1533 -1 if (trim(name)) {1534 -1 hasName = true;1535 -1 if (node === refNode) {1536 -1 // If name is non-empty and both the current and refObject nodes match, then don't process any deeper within the branch.1537 -1 skip = true;1538 -1 }-1 1411 // Store name for the current node. -1 1412 var name = ""; -1 1413 // Store name from aria-owns references if detected. -1 1414 var ariaO = ""; -1 1415 // Placeholder for storing CSS before and after pseudo element text values for the current node container element -1 1416 var cssO = { -1 1417 before: "", -1 1418 after: "" -1 1419 }; -1 1420 -1 1421 var parent = refNode === node ? node : node.parentNode; -1 1422 if (!skipTo.tag && !skipTo.role && nodes.indexOf(parent) === -1) { -1 1423 nodes.push(parent); -1 1424 // Store the before and after pseudo element 'content' values for the current node container element -1 1425 // Note: If the pseudo element includes block level styling, a space will be added, otherwise inline is asumed and no spacing is added. -1 1426 cssO = getCSSText(parent, refNode); -1 1427 -1 1428 // Enabled in Visual ARIA to prevent self referencing by Visual ARIA tooltips -1 1429 if (preventVisualARIASelfCSSRef) { -1 1430 if ( -1 1431 cssO.before.indexOf(" [ARIA] ") !== -1 || -1 1432 cssO.before.indexOf(" aria-") !== -1 || -1 1433 cssO.before.indexOf(" accName: ") !== -1 -1 1434 ) -1 1435 cssO.before = ""; -1 1436 if ( -1 1437 cssO.after.indexOf(" [ARIA] ") !== -1 || -1 1438 cssO.after.indexOf(" aria-") !== -1 || -1 1439 cssO.after.indexOf(" accDescription: ") !== -1 -1 1440 ) -1 1441 cssO.after = ""; 1539 1442 } 1540 1443 } 1541 14441542 -1 var rolePresentation =1543 -1 !skipTo.tag &&1544 -1 !skipTo.role &&1545 -1 !hasName &&1546 -1 nRole &&1547 -1 presentationRoles.indexOf(nRole) !== -1 &&1548 -1 !isFocusable(node) &&1549 -1 !hasGlobalAttr(node)1550 -1 ? true1551 -1 : false;1552 -11553 -1 // Otherwise, if the current node is not a nested widget control within the parent ref obj, but is instead a native markup element that includes a host-defined labelling mechanism, then set the name and description accordingly if present.1554 -1 if (!isSeparatChildFormField) {1555 -1 // Otherwise, if name is still empty and the current node matches the ref node and is a standard form field with a non-empty associated label element, process label with same naming computation algorithm.1556 -1 if (-1 1445 // Process standard DOM element node -1 1446 if (node.nodeType === 1) { -1 1447 var nTag = node.nodeName.toLowerCase(); -1 1448 var nRole = getRole(node); -1 1449 var aLabelledby = -1 1450 (!skipTo.tag && -1 1451 !skipTo.role && -1 1452 node.getAttribute("aria-labelledby")) || -1 1453 ""; -1 1454 var aDescribedby = -1 1455 (!skipTo.tag && -1 1456 !skipTo.role && -1 1457 node.getAttribute("aria-describedby")) || -1 1458 ""; -1 1459 var aLabel = -1 1460 (!skipTo.tag && -1 1461 !skipTo.role && -1 1462 node.getAttribute("aria-label")) || -1 1463 ""; -1 1464 var nTitle = -1 1465 (!skipTo.tag && !skipTo.role && node.getAttribute("title")) || -1 1466 ""; -1 1467 -1 1468 var isNativeFormField = nativeFormFields.indexOf(nTag) !== -1; -1 1469 var isNativeButton = ["input"].indexOf(nTag) !== -1; -1 1470 var isRangeWidgetRole = rangeWidgetRoles.indexOf(nRole) !== -1; -1 1471 var isEditWidgetRole = editWidgetRoles.indexOf(nRole) !== -1; -1 1472 var isSelectWidgetRole = selectWidgetRoles.indexOf(nRole) !== -1; -1 1473 var isSimulatedFormField = -1 1474 isRangeWidgetRole || -1 1475 isEditWidgetRole || -1 1476 isSelectWidgetRole || -1 1477 nRole === "combobox"; -1 1478 var isWidgetRole = -1 1479 (isSimulatedFormField || -1 1480 otherWidgetRoles.indexOf(nRole) !== -1) && -1 1481 nRole !== "link"; -1 1482 result.isWidget = isNativeFormField || isWidgetRole; -1 1483 -1 1484 var hasName = false; -1 1485 var hasDesc = false; -1 1486 var aOwns = node.getAttribute("aria-owns") || ""; -1 1487 var isSeparatChildFormField = !!( 1557 1488 !skipTo.tag && 1558 1489 !skipTo.role &&1559 -1 !hasName &&-1 1490 !isEmbeddedNode && -1 1491 ((node !== refNode && -1 1492 (isNativeFormField || isSimulatedFormField)) || -1 1493 (node.id && -1 1494 ownedBy[node.id] && -1 1495 ownedBy[node.id].target && -1 1496 ownedBy[node.id].target === node)) -1 1497 ); -1 1498 -1 1499 // Check for non-empty value of aria-describedby if current node equals reference node, follow each ID ref, then stop and process no deeper. -1 1500 if ( -1 1501 !stop && 1560 1502 node === refNode &&1561 -1 isNativeFormField-1 1503 !skipTo.tag && -1 1504 !skipTo.role && -1 1505 aDescribedby 1562 1506 ) {1563 -1 // Logic modified to match issue1564 -1 // https://github.com/WhatSock/w3c-alternative-text-computation/issues/12 */1565 -1 var labels = docO.querySelectorAll("label");1566 -1 var implicitLabel = getParent(node, "label") || false;1567 -1 var explicitLabel =1568 -1 node.id &&1569 -1 docO.querySelectorAll('label[for="' + node.id + '"]').length1570 -1 ? docO.querySelector('label[for="' + node.id + '"]')1571 -1 : false;1572 -1 var implicitI = 0;1573 -1 var explicitI = 0;1574 -1 for (i = 0; i < labels.length; i++) {1575 -1 if (labels[i] === implicitLabel) {1576 -1 implicitI = i;1577 -1 } else if (labels[i] === explicitLabel) {1578 -1 explicitI = i;1579 -1 }1580 -1 }1581 -1 var isImplicitFirst =1582 -1 implicitLabel &&1583 -1 implicitLabel.nodeType === 1 &&1584 -1 explicitLabel &&1585 -1 explicitLabel.nodeType === 1 &&1586 -1 implicitI < explicitI1587 -1 ? true1588 -1 : false;1589 -11590 -1 if (1591 -1 explicitLabel &&1592 -1 !isParentHidden(explicitLabel, docO.body, true)1593 -1 ) {1594 -1 var eLblName = trim(1595 -1 walk(explicitLabel, true, skip, [node], false, {-1 1507 var desc; -1 1508 ids = aDescribedby.split(/\s+/); -1 1509 parts = []; -1 1510 for (i = 0; i < ids.length; i++) { -1 1511 element = docO.getElementById(ids[i]); -1 1512 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label -1 1513 parts.push( -1 1514 walk(element, true, false, [node], false, { 1596 1515 ref: ownedBy,1597 -1 top: explicitLabel-1 1516 top: element 1598 1517 }).name 1599 1518 ); 1600 1519 }1601 -1 if (1602 -1 implicitLabel &&1603 -1 implicitLabel !== explicitLabel &&1604 -1 !isParentHidden(implicitLabel, docO.body, true)1605 -1 ) {1606 -1 var iLblName = trim(1607 -1 walk(implicitLabel, true, skip, [node], false, {-1 1520 // Check for blank value, since whitespace chars alone are not valid as a name -1 1521 desc = trim(parts.join(" ")); -1 1522 -1 1523 if (trim(desc)) { -1 1524 result.desc = desc; -1 1525 hasDesc = true; -1 1526 } -1 1527 } -1 1528 -1 1529 // Check for non-empty value of aria-labelledby on current node, follow each ID ref, then stop and process no deeper. -1 1530 if (!stop && !skipTo.tag && !skipTo.role && aLabelledby) { -1 1531 ids = aLabelledby.split(/\s+/); -1 1532 parts = []; -1 1533 for (i = 0; i < ids.length; i++) { -1 1534 element = docO.getElementById(ids[i]); -1 1535 // Also prevent the current form field from having its value included in the naming computation if nested as a child of label -1 1536 parts.push( -1 1537 walk(element, true, skip, [node], element === refNode, { 1608 1538 ref: ownedBy,1609 -1 top: implicitLabel-1 1539 top: element 1610 1540 }).name 1611 1541 ); 1612 1542 }1613 -11614 -1 if (iLblName && eLblName && isImplicitFirst) {1615 -1 name = iLblName + " " + eLblName;1616 -1 } else if (eLblName && iLblName) {1617 -1 name = eLblName + " " + iLblName;1618 -1 } else if (eLblName) {1619 -1 name = eLblName;1620 -1 } else if (iLblName) {1621 -1 name = iLblName;1622 -1 }-1 1543 // Check for blank value, since whitespace chars alone are not valid as a name -1 1544 name = trim(parts.join(" ")); 1623 1545 1624 1546 if (trim(name)) { 1625 1547 hasName = true; -1 1548 hLabel = true; -1 1549 hasLabel = true; -1 1550 // Abort further recursion if name is valid. -1 1551 result.skip = true; 1626 1552 } 1627 1553 } 1628 15541629 -1 // Process native form field buttons in accordance with the HTML AAM1630 -1 // https://w3c.github.io/html-aam/#accessible-name-and-description-computation1631 -1 var btnType =1632 -1 (!skipTo.tag &&1633 -1 !skipTo.role &&1634 -1 isNativeButton &&1635 -1 node.getAttribute("type")) ||1636 -1 false;1637 -1 var btnValue =1638 -1 (!skipTo.tag &&1639 -1 !skipTo.role &&1640 -1 btnType &&1641 -1 trim(node.getAttribute("value"))) ||1642 -1 false;1643 -11644 -1 var nAlt = rolePresentation ? "" : trim(node.getAttribute("alt"));1645 -11646 -1 // Otherwise, if name is still empty and current node is a standard non-presentational img or image button with a non-empty alt attribute, set alt attribute value as the accessible name.-1 1555 // Otherwise, if current node has a non-empty aria-label then set as name and process no deeper within the branch. 1647 1556 if ( 1648 1557 !skipTo.tag && 1649 1558 !skipTo.role && 1650 1559 !hasName &&1651 -1 !rolePresentation &&1652 -1 (nTag === "img" || btnType === "image") &&1653 -1 nAlt-1 1560 trim(aLabel) && -1 1561 !isSeparatChildFormField 1654 1562 ) { -1 1563 name = aLabel; -1 1564 1655 1565 // Check for blank value, since whitespace chars alone are not valid as a name1656 -1 name = trim(nAlt);1657 1566 if (trim(name)) { 1658 1567 hasName = true; -1 1568 hLabel = true; -1 1569 if (node === refNode) { -1 1570 // If name is non-empty and both the current and refObject nodes match, then don't process any deeper within the branch. -1 1571 skip = true; -1 1572 hasLabel = true; -1 1573 } 1659 1574 } 1660 1575 } 1661 15761662 -1 if (-1 1577 var rolePresentation = 1663 1578 !skipTo.tag && 1664 1579 !skipTo.role && 1665 1580 !hasName &&1666 -1 node === refNode &&1667 -1 btnType &&1668 -1 ["button", "image", "submit", "reset"].indexOf(btnType) !== -11669 -1 ) {1670 -1 if (btnValue) {1671 -1 name = btnValue;1672 -1 } else {1673 -1 switch (btnType) {1674 -1 case "submit":1675 -1 case "image":1676 -1 name = "Submit Query";1677 -1 break;1678 -1 case "reset":1679 -1 name = "Reset";1680 -1 break;1681 -1 default:1682 -1 name = "";-1 1581 nRole && -1 1582 presentationRoles.indexOf(nRole) !== -1 && -1 1583 !isFocusable(node) && -1 1584 !hasGlobalAttr(node); -1 1585 -1 1586 // Otherwise, if the current node is not a nested widget control within the parent ref obj, but is instead a native markup element that includes a host-defined labelling mechanism, then set the name and description accordingly if present. -1 1587 if (!isSeparatChildFormField) { -1 1588 // Otherwise, if name is still empty and the current node matches the ref node and is a standard form field with a non-empty associated label element, process label with same naming computation algorithm. -1 1589 if ( -1 1590 !skipTo.tag && -1 1591 !skipTo.role && -1 1592 !hasName && -1 1593 node === refNode && -1 1594 isNativeFormField -1 1595 ) { -1 1596 // Logic modified to match issue -1 1597 // https://github.com/WhatSock/w3c-alternative-text-computation/issues/12 */ -1 1598 var labels = docO.querySelectorAll("label"); -1 1599 var lblName = ""; -1 1600 var implicitLabel = getParent(node, "label") || false; -1 1601 -1 1602 for (i = 0; i < labels.length; i++) { -1 1603 if ( -1 1604 (labels[i] === implicitLabel || -1 1605 labels[i].getAttribute("for") === node.id) && -1 1606 !isParentHidden(labels[i], docO.body, true) -1 1607 ) { -1 1608 lblName += addSpacing( -1 1609 walk(labels[i], true, skip, [node], false, { -1 1610 ref: ownedBy, -1 1611 top: labels[i] -1 1612 }).name -1 1613 ); -1 1614 } 1683 1615 }1684 -1 }1685 -1 if (trim(name)) {1686 -1 hasName = true;1687 -1 }1688 -1 }1689 16161690 -1 if (1691 -1 !skipTo.tag &&1692 -1 !skipTo.role &&1693 -1 hasName &&1694 -1 node === refNode &&1695 -1 btnType &&1696 -1 ["button", "submit", "reset"].indexOf(btnType) !== -1 &&1697 -1 btnValue &&1698 -1 btnValue !== name &&1699 -1 !result.desc1700 -1 ) {1701 -1 result.desc = btnValue;1702 -1 hasDesc = true;1703 -1 }-1 1617 name = lblName; 1704 16181705 -1 var isFieldset =1706 -1 !skipTo.tag &&1707 -1 !skipTo.role &&1708 -1 !hasName &&1709 -1 node === rootNode &&1710 -1 (nRole === "group" || (!nRole && nTag === "fieldset"));-1 1619 if (trim(name)) { -1 1620 hasName = true; -1 1621 } -1 1622 } 1711 16231712 -1 // Otherwise, if name is still empty and the current node matches the root node and is a standard fieldset element with a non-empty associated legend element, process legend with same naming computation algorithm.1713 -1 // Plus do the same for role="group" with embedded role="legend", or a combination of these.1714 -1 if (isFieldset) {1715 -1 name = trim(1716 -1 walk(1717 -1 node,1718 -1 stop,1719 -1 false,1720 -1 [],1721 -1 false,1722 -1 {1723 -1 ref: ownedBy,1724 -1 top: node1725 -1 },1726 -1 {1727 -1 tag: "legend",1728 -1 role: "legend",1729 -1 go: true1730 -1 }1731 -1 ).name1732 -1 );1733 -1 if (trim(name)) {1734 -1 hasName = true;-1 1624 // Process native form field buttons in accordance with the HTML AAM -1 1625 // https://w3c.github.io/html-aam/#accessible-name-and-description-computation -1 1626 var btnType = -1 1627 (!skipTo.tag && -1 1628 !skipTo.role && -1 1629 isNativeButton && -1 1630 node.getAttribute("type")) || -1 1631 false; -1 1632 var btnValue = -1 1633 (!skipTo.tag && -1 1634 !skipTo.role && -1 1635 btnType && -1 1636 trim(node.getAttribute("value"))) || -1 1637 false; -1 1638 -1 1639 var nAlt = -1 1640 rolePresentation && nTag === "img" -1 1641 ? "" -1 1642 : trim(node.alt || node.getAttribute("alt")); -1 1643 -1 1644 // Otherwise, if name is still empty and current node is a standard non-presentational img or image button with a non-empty alt or title attribute, set alt or title attribute value as the accessible name. -1 1645 if ( -1 1646 !skipTo.tag && -1 1647 !skipTo.role && -1 1648 !hasName && -1 1649 !rolePresentation && -1 1650 (nTag === "img" || btnType === "image") && -1 1651 (nAlt || trim(nTitle)) -1 1652 ) { -1 1653 // Check for blank value, since whitespace chars alone are not valid as a name -1 1654 name = trim(nAlt) || trim(nTitle); -1 1655 if (trim(name)) { -1 1656 hasName = true; -1 1657 } 1735 1658 }1736 -1 skip = true;1737 -1 }1738 16591739 -1 // Otherwise, if name is still empty and the root node and the current node are the same and node is an svg element, then parse the content of the title element to set the name and the desc element to set the description.1740 -1 if (!skipTo.tag && !skipTo.role && nTag === "svg") {1741 -1 var svgT = node.querySelector("title") || false;1742 -1 var svgD =1743 -1 (node === rootNode && node.querySelector("desc")) || false;1744 -1 if (!hasName && svgT) {1745 -1 name = trim(1746 -1 walk(svgT, true, false, [], false, {1747 -1 ref: ownedBy,1748 -1 top: svgT1749 -1 }).name1750 -1 );-1 1660 // Process native HTML area tags to use alt as name when not explicitly set using aria-labelledby or aria-label. -1 1661 if ( -1 1662 !skipTo.tag && -1 1663 !skipTo.role && -1 1664 !hasName && -1 1665 !rolePresentation && -1 1666 nTag === "area" && -1 1667 nAlt -1 1668 ) { -1 1669 // Check for blank value, since whitespace chars alone are not valid as a name -1 1670 name = trim(nAlt); 1751 1671 if (trim(name)) { 1752 1672 hasName = true; 1753 1673 } 1754 1674 }1755 -1 if (!hasDesc && svgD) {1756 -1 var dE = trim(1757 -1 walk(svgD, true, false, [], false, {1758 -1 ref: ownedBy,1759 -1 top: svgD1760 -1 }).name1761 -1 );1762 -1 if (trim(dE)) {1763 -1 result.desc = dE;1764 -1 hasDesc = true;-1 1675 -1 1676 // Process native HTML optgroup tags to use label as name when not explicitly set using aria-labelledby or aria-label. -1 1677 if (nTag === "optgroup") { -1 1678 if ( -1 1679 !skipTo.tag && -1 1680 !skipTo.role && -1 1681 !hasName && -1 1682 !rolePresentation && -1 1683 node.getAttribute("label") -1 1684 ) { -1 1685 // Check for blank value, since whitespace chars alone are not valid as a name -1 1686 name = trim(node.getAttribute("label")); -1 1687 if (trim(name)) { -1 1688 hasName = true; -1 1689 } 1765 1690 } -1 1691 result.skip = true; 1766 1692 }1767 -1 result.skip = true;1768 -1 }1769 -1 }1770 16931771 -1 // Otherwise, if the current node is a nested widget control within the parent ref obj, then add only its value and process no deeper within the branch.1772 -1 if (!skipTo.tag && !skipTo.role && isSeparatChildFormField) {1773 -1 // Prevent the referencing node from having its value included in the case of form control labels that contain the element with focus.1774 -1 if (1775 -1 !(1776 -1 nodesToIgnoreValues &&1777 -1 nodesToIgnoreValues.length &&1778 -1 nodesToIgnoreValues.indexOf(node) !== -11779 -1 )1780 -1 ) {1781 -1 if (isRangeWidgetRole) {1782 -1 // For range widgets, append aria-valuetext if non-empty, or aria-valuenow if non-empty, or node.value if applicable.1783 -1 name = getObjectValue(nRole, node, true);1784 -1 } else if (1785 -1 isEditWidgetRole ||1786 -1 (nRole === "combobox" && isNativeFormField)1787 -1 ) {1788 -1 // For simulated edit widgets, append text from content if applicable, or node.value if applicable.1789 -1 name = getObjectValue(nRole, node, false, true);1790 -1 } else if (isSelectWidgetRole) {1791 -1 // For simulated select widgets, append same naming computation algorithm for all child nodes including aria-selected="true" separated by a space when multiple.1792 -1 // Also filter nodes so that only valid child roles of relevant parent role that include aria-selected="true" are included.1793 -1 name = getObjectValue(nRole, node, false, false, true);1794 -1 } else if (1795 -1 isNativeFormField &&1796 -1 ["input", "textarea"].indexOf(nTag) !== -1 &&1797 -1 (!isWidgetRole || isEditWidgetRole)-1 1694 // Process the accessible names for native HTML buttons -1 1695 if ( -1 1696 !skipTo.tag && -1 1697 !skipTo.role && -1 1698 !hasName && -1 1699 node === refNode && -1 1700 btnType && -1 1701 ["button", "submit", "reset"].indexOf(btnType) !== -1 1798 1702 ) {1799 -1 // For native edit fields, append node.value when applicable.1800 -1 name = getObjectValue(nRole, node, false, false, false, true);1801 -1 } else if (1802 -1 isNativeFormField &&1803 -1 nTag === "select" &&1804 -1 (!isWidgetRole || nRole === "combobox")-1 1703 if (btnValue) { -1 1704 name = btnValue; -1 1705 } else { -1 1706 switch (btnType) { -1 1707 case "submit": -1 1708 name = "submit"; -1 1709 break; -1 1710 case "reset": -1 1711 name = "reset"; -1 1712 break; -1 1713 default: -1 1714 name = ""; -1 1715 } -1 1716 } -1 1717 if (trim(name)) { -1 1718 hasName = true; -1 1719 } -1 1720 } -1 1721 -1 1722 if ( -1 1723 !skipTo.tag && -1 1724 !skipTo.role && -1 1725 hasName && -1 1726 node === refNode && -1 1727 btnType && -1 1728 ["button", "submit", "reset"].indexOf(btnType) !== -1 && -1 1729 btnValue && -1 1730 btnValue !== name && -1 1731 !result.desc 1805 1732 ) {1806 -1 // For native select fields, get text from content for all options with selected attribute separated by a space when multiple, but don't process if another widget role is present unless it matches role="combobox".1807 -1 // Reference: https://github.com/WhatSock/w3c-alternative-text-computation/issues/71808 -1 name = getObjectValue(nRole, node, false, false, true, true);-1 1733 result.desc = btnValue; -1 1734 hasDesc = true; 1809 1735 } 1810 17361811 -1 // Check for blank value, since whitespace chars alone are not valid as a name1812 -1 name = trim(name);1813 -1 }-1 1737 // Process the accessible names for native HTML image buttons -1 1738 if ( -1 1739 !skipTo.tag && -1 1740 !skipTo.role && -1 1741 !hasName && -1 1742 node === refNode && -1 1743 btnType && -1 1744 btnType === "image" -1 1745 ) { -1 1746 name = "Submit Query"; -1 1747 hasName = true; -1 1748 nameFromUserAgent = true; -1 1749 } 1814 17501815 -1 if (trim(name)) {1816 -1 hasName = true;1817 -1 }1818 -1 }-1 1751 var isFieldset = -1 1752 !skipTo.tag && -1 1753 !skipTo.role && -1 1754 !hasName && -1 1755 node === rootNode && -1 1756 (nRole === "group" || -1 1757 nRole === "radiogroup" || -1 1758 (!nRole && nTag === "fieldset")); -1 1759 -1 1760 // Otherwise, if name is still empty and the current node matches the root node and is a standard fieldset element with a non-empty associated legend element as the first child node, process legend with same naming computation algorithm. -1 1761 // Plus do the same for role="group" and role="radiogroup" with embedded role="legend", or a combination of these. -1 1762 if (isFieldset) { -1 1763 var fChild = -1 1764 firstChild(node, ["legend"], ["legend"]) || false; -1 1765 if (fChild) { -1 1766 name = trim( -1 1767 walk(fChild, stop, false, [], false, { -1 1768 ref: ownedBy, -1 1769 top: fChild -1 1770 }).name -1 1771 ); -1 1772 } -1 1773 if (trim(name)) { -1 1774 hasName = true; -1 1775 } -1 1776 skip = true; -1 1777 } 1819 17781820 -1 // Otherwise, if current node is the same as rootNode and is non-presentational and includes a non-empty title attribute, store title attribute value as the accessible name if name is still empty, or the description if not.1821 -1 // Processing for this is handled within the walkDOM function.1822 -1 if (1823 -1 !skipTo.tag &&1824 -1 !skipTo.role &&1825 -1 !rolePresentation &&1826 -1 trim(nTitle)1827 -1 ) {1828 -1 result.title = trim(nTitle);1829 -1 }-1 1779 var isTable = -1 1780 !skipTo.tag && -1 1781 !skipTo.role && -1 1782 !hasName && -1 1783 node === rootNode && -1 1784 (nRole === "table" || (!nRole && nTag === "table")); -1 1785 -1 1786 // Otherwise, if name is still empty and the current node matches the root node and is a standard table element with a non-empty associated caption element as the first child node, process caption with same naming computation algorithm. -1 1787 // Plus do the same for role="table" with embedded role="caption", or a combination of these. -1 1788 if (isTable) { -1 1789 fChild = firstChild(node, ["caption"], ["caption"]) || false; -1 1790 if (fChild) { -1 1791 name = trim( -1 1792 walk(fChild, stop, false, [], false, { -1 1793 ref: ownedBy, -1 1794 top: fChild -1 1795 }).name -1 1796 ); -1 1797 } -1 1798 if (trim(name)) { -1 1799 hasName = true; -1 1800 } -1 1801 skip = true; -1 1802 } 1830 18031831 -1 var isSkipTo =1832 -1 (skipTo.role && skipTo.role === nRole) ||1833 -1 (!nRole && skipTo.tag && skipTo.tag === nTag);1834 -11835 -1 // Process custom tag and role searches such as fieldset directing AccName to the first legend.1836 -1 if (isSkipTo) {1837 -1 name = trim(1838 -1 walk(node, stop, false, [], false, {1839 -1 ref: ownedBy,1840 -1 top: node1841 -1 }).name1842 -1 );1843 -1 if (trim(name)) {1844 -1 hasName = true;1845 -1 skip = true;-1 1804 var isFigure = -1 1805 !skipTo.tag && -1 1806 !skipTo.role && -1 1807 !hasName && -1 1808 node === rootNode && -1 1809 (nRole === "figure" || (!nRole && nTag === "figure")); -1 1810 -1 1811 // Otherwise, if name is still empty and the current node matches the root node and is a standard figure element with a non-empty associated figcaption element as the first or last child node, process caption with same naming computation algorithm. -1 1812 // Plus do the same for role="figure" with embedded role="caption", or a combination of these. -1 1813 if (isFigure) { -1 1814 fChild = -1 1815 firstChild(node, ["figcaption"], ["caption"]) || -1 1816 lastChild(node, ["figcaption"], ["caption"]) || -1 1817 false; -1 1818 if (fChild) { -1 1819 name = trim( -1 1820 walk(fChild, stop, false, [], false, { -1 1821 ref: ownedBy, -1 1822 top: fChild -1 1823 }).name -1 1824 ); -1 1825 } -1 1826 if (trim(name)) { -1 1827 hasName = true; -1 1828 } -1 1829 skip = true; -1 1830 } -1 1831 -1 1832 // Otherwise, if name is still empty and the root node and the current node are the same and node is an svg element, then parse the content of the title element to set the name and the desc element to set the description. -1 1833 if (!skipTo.tag && !skipTo.role && nTag === "svg") { -1 1834 var svgT = node.querySelector("title") || false; -1 1835 var svgD = -1 1836 (node === rootNode && node.querySelector("desc")) || false; -1 1837 if (!hasName && svgT) { -1 1838 name = trim( -1 1839 walk(svgT, true, false, [], false, { -1 1840 ref: ownedBy, -1 1841 top: svgT -1 1842 }).name -1 1843 ); -1 1844 } -1 1845 if (!hasDesc && svgD) { -1 1846 var dE = trim( -1 1847 walk(svgD, true, false, [], false, { -1 1848 ref: ownedBy, -1 1849 top: svgD -1 1850 }).name -1 1851 ); -1 1852 if (trim(dE)) { -1 1853 result.desc = dE; -1 1854 } -1 1855 } -1 1856 result.skip = true; -1 1857 } 1846 1858 }1847 -1 }1848 18591849 -1 // Check for non-empty value of aria-owns, follow each ID ref, then process with same naming computation.1850 -1 // Also abort aria-owns processing if contained on an element that does not support child elements.1851 -1 if (!isSkipTo && aOwns && !isNativeFormField && nTag !== "img") {1852 -1 ids = aOwns.split(/\s+/);1853 -1 parts = [];1854 -1 for (i = 0; i < ids.length; i++) {1855 -1 element = docO.getElementById(ids[i]);1856 -1 // Abort processing if the referenced node has already been traversed1857 -1 if (element && owns.indexOf(ids[i]) === -1) {1858 -1 owns.push(ids[i]);1859 -1 var oBy = { ref: ownedBy, top: ownedBy.top };1860 -1 oBy[ids[i]] = {1861 -1 refNode: refNode,1862 -1 node: node,1863 -1 target: element1864 -1 };1865 -1 if (!isParentHidden(element, docO.body, true)) {1866 -1 parts.push(walk(element, true, skip, [], false, oBy).name);-1 1860 // Otherwise, if the current node is a nested widget control within the parent ref obj, then add only its value and process no deeper within the branch. -1 1861 if (!skipTo.tag && !skipTo.role && isSeparatChildFormField) { -1 1862 // Prevent the referencing node from having its value included in the case of form control labels that contain the element with focus. -1 1863 if ( -1 1864 !( -1 1865 nodesToIgnoreValues && -1 1866 nodesToIgnoreValues.length && -1 1867 nodesToIgnoreValues.indexOf(node) !== -1 -1 1868 ) -1 1869 ) { -1 1870 if (isRangeWidgetRole) { -1 1871 // For range widgets, append aria-valuetext if non-empty, or aria-valuenow if non-empty, or node.value if applicable. -1 1872 name = getObjectValue(nRole, node, true); -1 1873 } else if ( -1 1874 isEditWidgetRole || -1 1875 (nRole === "combobox" && isNativeFormField) -1 1876 ) { -1 1877 // For simulated edit widgets, append text from content if applicable, or node.value if applicable. -1 1878 name = getObjectValue(nRole, node, false, true); -1 1879 } else if (isSelectWidgetRole) { -1 1880 // For simulated select widgets, append same naming computation algorithm for all child nodes including aria-selected="true" separated by a space when multiple. -1 1881 // Also filter nodes so that only valid child roles of relevant parent role that include aria-selected="true" are included. -1 1882 name = getObjectValue(nRole, node, false, false, true); -1 1883 } else if ( -1 1884 isNativeFormField && -1 1885 ["input", "textarea"].indexOf(nTag) !== -1 && -1 1886 (!isWidgetRole || isEditWidgetRole) -1 1887 ) { -1 1888 // For native edit fields, append node.value when applicable. -1 1889 name = getObjectValue( -1 1890 nRole, -1 1891 node, -1 1892 false, -1 1893 false, -1 1894 false, -1 1895 true -1 1896 ); -1 1897 } else if ( -1 1898 isNativeFormField && -1 1899 nTag === "select" && -1 1900 (!isWidgetRole || nRole === "combobox") -1 1901 ) { -1 1902 // For native select fields, get text from content for all options with selected attribute separated by a space when multiple, but don't process if another widget role is present unless it matches role="combobox". -1 1903 // Reference: https://github.com/WhatSock/w3c-alternative-text-computation/issues/7 -1 1904 name = getObjectValue( -1 1905 nRole, -1 1906 node, -1 1907 false, -1 1908 false, -1 1909 true, -1 1910 true -1 1911 ); 1867 1912 } -1 1913 -1 1914 // Check for blank value, since whitespace chars alone are not valid as a name -1 1915 name = trim(name); 1868 1916 } 1869 1917 }1870 -1 // Join without adding whitespace since this is already handled by parsing individual nodes within the algorithm steps.1871 -1 ariaO = parts.join("");-1 1918 -1 1919 // Otherwise, if current node is the same as rootNode and is non-presentational and includes a non-empty title attribute, store title attribute value as the accessible name if name is still empty, or the description if not. -1 1920 // Processing for this is handled within the walkDOM function. -1 1921 if ( -1 1922 !skipTo.tag && -1 1923 !skipTo.role && -1 1924 !rolePresentation && -1 1925 trim(nTitle) -1 1926 ) { -1 1927 result.title = trim(nTitle); -1 1928 } -1 1929 -1 1930 var nType = isNativeFormField && trim(node.getAttribute("type")); -1 1931 if (!nType) nType = "text"; -1 1932 var placeholder = -1 1933 !skipTo.tag && -1 1934 !skipTo.role && -1 1935 node === rootNode && -1 1936 node === refNode && -1 1937 (isEditWidgetRole || -1 1938 (isNativeFormField && -1 1939 (nTag === "textarea" || -1 1940 (nTag === "input" && -1 1941 [ -1 1942 "password", -1 1943 "search", -1 1944 "tel", -1 1945 "text", -1 1946 "url", -1 1947 "email" -1 1948 ].indexOf(nType) !== -1)))) && -1 1949 trim( -1 1950 node.getAttribute("placeholder") || -1 1951 node.getAttribute("aria-placeholder") -1 1952 ); -1 1953 -1 1954 if (placeholder) { -1 1955 result.placeholder = placeholder; -1 1956 } -1 1957 -1 1958 var isSkipTo = -1 1959 (skipTo.role && skipTo.role === nRole) || -1 1960 (!nRole && skipTo.tag && skipTo.tag === nTag); -1 1961 -1 1962 // Process custom tag and role searches if needed. -1 1963 if (isSkipTo) { -1 1964 name = trim( -1 1965 walk(node, stop, false, [], false, { -1 1966 ref: ownedBy, -1 1967 top: node -1 1968 }).name -1 1969 ); -1 1970 if (trim(name)) { -1 1971 skip = true; -1 1972 } -1 1973 } -1 1974 -1 1975 // Check for non-empty value of aria-owns, follow each ID ref, then process with same naming computation. -1 1976 // Also abort aria-owns processing if contained on an element that does not support child elements. -1 1977 if ( -1 1978 !isSkipTo && -1 1979 aOwns && -1 1980 ["input", "img", "progress"].indexOf(nTag) === -1 -1 1981 ) { -1 1982 ids = aOwns.split(/\s+/); -1 1983 parts = []; -1 1984 for (i = 0; i < ids.length; i++) { -1 1985 element = docO.getElementById(ids[i]); -1 1986 // Abort processing if the referenced node has already been traversed -1 1987 if (element && owns.indexOf(ids[i]) === -1) { -1 1988 owns.push(ids[i]); -1 1989 var oBy = { ref: ownedBy, top: ownedBy.top }; -1 1990 oBy[ids[i]] = { -1 1991 refNode: refNode, -1 1992 node: node, -1 1993 target: element -1 1994 }; -1 1995 if (!isParentHidden(element, docO.body, true)) { -1 1996 parts.push( -1 1997 walk(element, true, skip, [], false, oBy).name -1 1998 ); -1 1999 } -1 2000 } -1 2001 } -1 2002 // Join without adding whitespace since this is already handled by parsing individual nodes within the algorithm steps. -1 2003 ariaO = parts.join(""); -1 2004 } 1872 2005 }1873 -1 }1874 20061875 -1 // Otherwise, process text node1876 -1 else if (!skipTo.tag && !skipTo.role && node.nodeType === 3) {1877 -1 name = node.data;1878 -1 }-1 2007 // Otherwise, process text node -1 2008 else if (!skipTo.tag && !skipTo.role && node.nodeType === 3) { -1 2009 name = node.data; -1 2010 } 1879 20111880 -1 // Prepend and append the current CSS pseudo element text, plus normalize all whitespace such as newline characters and others into flat spaces.1881 -1 name = cssO.before + name.replace(/\s+/g, " ") + cssO.after;-1 2012 if (!hLabel) { -1 2013 // Prepend and append the current CSS pseudo element text, plus normalize all whitespace such as newline characters and others into flat spaces. -1 2014 name = cssO.before + name.replace(/\s+/g, " ") + cssO.after; -1 2015 } 1882 20161883 -1 if (1884 -1 name.length &&1885 -1 !hasParentLabelOrHidden(node, ownedBy.top, ownedBy, ignoreHidden)1886 -1 ) {1887 -1 result.name = name;1888 -1 }-1 2017 if ( -1 2018 name.length && -1 2019 !hasParentLabelOrHidden(node, ownedBy.top, ownedBy, ignoreHidden) -1 2020 ) { -1 2021 result.name = name; -1 2022 } 1889 20231890 -1 result.owns = ariaO;-1 2024 result.owns = ariaO; 1891 20251892 -1 return result;1893 -1 },1894 -1 refNode1895 -1 );-1 2026 return result; -1 2027 }, -1 2028 refNode -1 2029 ); 1896 20301897 -1 // Prepend and append the refObj CSS pseudo element text, plus normalize whitespace chars into flat spaces.1898 -1 fullResult.name =1899 -1 cssOP.before + fullResult.name.replace(/\s+/g, " ") + cssOP.after;-1 2031 if (!hasLabel) { -1 2032 // Prepend and append the refObj CSS pseudo element text, plus normalize whitespace chars into flat spaces. -1 2033 fullResult.name = -1 2034 cssOP.before + fullResult.name.replace(/\s+/g, " ") + cssOP.after; -1 2035 } 1900 20361901 -1 return fullResult;1902 -1 };-1 2037 return fullResult; -1 2038 }; 1903 20391904 -1 var getRole = function(node) {1905 -1 var role = node && node.getAttribute ? node.getAttribute("role") : "";1906 -1 if (!trim(role)) {1907 -1 return "";1908 -1 }1909 -1 var inList = function(list) {1910 -1 return trim(role).length > 0 && list.roles.indexOf(role) >= 0;-1 2040 var firstChild = function(e, t, r, s) { -1 2041 e = e ? e.firstChild : null; -1 2042 while (e) { -1 2043 var tr = getRole(e) || false; -1 2044 if ( -1 2045 e.nodeType === 1 && -1 2046 ((!t && !r) || -1 2047 (tr && r && r.indexOf(tr) !== -1) || -1 2048 (!tr && t && t.indexOf(e.nodeName.toLowerCase()) !== -1)) -1 2049 ) { -1 2050 return e; -1 2051 } else if (!s && e.nodeType === 1 && (t || r)) { -1 2052 return null; -1 2053 } -1 2054 e = e.nextSibling; -1 2055 } -1 2056 return e; 1911 2057 };1912 -1 var roles = role.split(/\s+/);1913 -1 for (var i = 0; i < roles.length; i++) {1914 -1 role = roles[i];1915 -1 if (1916 -1 inList(list1) ||1917 -1 inList(list2) ||1918 -1 inList(list3) ||1919 -1 inList(list4) ||1920 -1 presentationRoles.indexOf(role) !== -11921 -1 ) {1922 -1 return role;-1 2058 -1 2059 var lastChild = function(e, t, r, s) { -1 2060 e = e ? e.lastChild : null; -1 2061 while (e) { -1 2062 var tr = getRole(e) || false; -1 2063 if ( -1 2064 e.nodeType === 1 && -1 2065 ((!t && !r) || -1 2066 (tr && r && r.indexOf(tr) !== -1) || -1 2067 (!tr && t && t.indexOf(e.nodeName.toLowerCase()) !== -1)) -1 2068 ) { -1 2069 return e; -1 2070 } else if (!s && e.nodeType === 1 && (t || r)) { -1 2071 return null; -1 2072 } -1 2073 e = e.previousSibling; 1923 2074 }1924 -1 }1925 -1 return "";1926 -1 };-1 2075 return e; -1 2076 }; 1927 20771928 -1 var isFocusable = function(node) {1929 -1 var nodeName = node.nodeName.toLowerCase();1930 -1 if (node.getAttribute("tabindex")) {1931 -1 return true;1932 -1 }1933 -1 if (nodeName === "a" && node.getAttribute("href")) {1934 -1 return true;1935 -1 }1936 -1 if (1937 -1 ["button", "input", "select", "textarea"].indexOf(nodeName) !== -1 &&1938 -1 node.getAttribute("type") !== "hidden"1939 -1 ) {1940 -1 return true;1941 -1 }1942 -1 return false;1943 -1 };-1 2078 var getRole = function(node) { -1 2079 var role = node && node.getAttribute ? node.getAttribute("role") : ""; -1 2080 if (!trim(role)) { -1 2081 return ""; -1 2082 } -1 2083 var inList = function(list) { -1 2084 return trim(role).length > 0 && list.roles.indexOf(role) >= 0; -1 2085 }; -1 2086 var roles = role.split(/\s+/); -1 2087 for (var i = 0; i < roles.length; i++) { -1 2088 role = roles[i]; -1 2089 if ( -1 2090 inList(list1) || -1 2091 inList(list2) || -1 2092 inList(list3) || -1 2093 inList(list4) || -1 2094 presentationRoles.indexOf(role) !== -1 -1 2095 ) { -1 2096 return role; -1 2097 } -1 2098 } -1 2099 return ""; -1 2100 }; -1 2101 -1 2102 var isFocusable = function(node) { -1 2103 var nodeName = node.nodeName.toLowerCase(); -1 2104 if (node.getAttribute("tabindex")) { -1 2105 return true; -1 2106 } -1 2107 if (nodeName === "a" && node.getAttribute("href")) { -1 2108 return true; -1 2109 } -1 2110 return ( -1 2111 ["button", "input", "select", "textarea"].indexOf(nodeName) !== -1 && -1 2112 node.getAttribute("type") !== "hidden" -1 2113 ); -1 2114 }; 1944 21151945 -1 // ARIA Role Exception Rule Set 1.11946 -1 // The following Role Exception Rule Set is based on the following ARIA Working Group discussion involving all relevant browser venders.1947 -1 // https://lists.w3.org/Archives/Public/public-aria/2017Jun/0057.html-1 2116 // ARIA Role Exception Rule Set 1.1 -1 2117 // The following Role Exception Rule Set is based on the following ARIA Working Group discussion involving all relevant browser venders. -1 2118 // https://lists.w3.org/Archives/Public/public-aria/2017Jun/0057.html -1 2119 -1 2120 // Always include name from content when the referenced node matches list1, as well as when child nodes match those within list3 -1 2121 // Note: gridcell was added to list1 to account for focusable gridcells that match the ARIA 1.0 paradigm for interactive grids. -1 2122 // So too was row to match 'name from author' and 'name from content' in accordance with the spec. -1 2123 var list1 = { -1 2124 roles: [ -1 2125 "button", -1 2126 "checkbox", -1 2127 "link", -1 2128 "option", -1 2129 "radio", -1 2130 "switch", -1 2131 "tab", -1 2132 "treeitem", -1 2133 "menuitem", -1 2134 "menuitemcheckbox", -1 2135 "menuitemradio", -1 2136 "row", -1 2137 "cell", -1 2138 "gridcell", -1 2139 "columnheader", -1 2140 "rowheader", -1 2141 "tooltip", -1 2142 "heading" -1 2143 ], -1 2144 tags: [ -1 2145 "a", -1 2146 "button", -1 2147 "summary", -1 2148 "input", -1 2149 "h1", -1 2150 "h2", -1 2151 "h3", -1 2152 "h4", -1 2153 "h5", -1 2154 "h6", -1 2155 "menuitem", -1 2156 "option", -1 2157 "tr", -1 2158 "td", -1 2159 "th" -1 2160 ] -1 2161 }; -1 2162 // Never include name from content when current node matches list2 -1 2163 // The rowgroup role was added to prevent 'name from content' in accordance with relevant ARIA 1.1 spec changes. -1 2164 // The fieldset element and group role was added to account for implicit mappings where name from content is not supported. -1 2165 var list2 = { -1 2166 roles: [ -1 2167 "application", -1 2168 "alert", -1 2169 "log", -1 2170 "marquee", -1 2171 "timer", -1 2172 "alertdialog", -1 2173 "dialog", -1 2174 "banner", -1 2175 "complementary", -1 2176 "form", -1 2177 "main", -1 2178 "navigation", -1 2179 "region", -1 2180 "search", -1 2181 "article", -1 2182 "document", -1 2183 "feed", -1 2184 "figure", -1 2185 "img", -1 2186 "math", -1 2187 "toolbar", -1 2188 "menu", -1 2189 "menubar", -1 2190 "grid", -1 2191 "listbox", -1 2192 "radiogroup", -1 2193 "textbox", -1 2194 "searchbox", -1 2195 "spinbutton", -1 2196 "scrollbar", -1 2197 "slider", -1 2198 "tablist", -1 2199 "tabpanel", -1 2200 "tree", -1 2201 "treegrid", -1 2202 "separator", -1 2203 "rowgroup", -1 2204 "group" -1 2205 ], -1 2206 tags: [ -1 2207 "article", -1 2208 "aside", -1 2209 "body", -1 2210 "select", -1 2211 "datalist", -1 2212 "optgroup", -1 2213 "dialog", -1 2214 "figure", -1 2215 "footer", -1 2216 "form", -1 2217 "header", -1 2218 "hr", -1 2219 "img", -1 2220 "textarea", -1 2221 "input", -1 2222 "main", -1 2223 "math", -1 2224 "menu", -1 2225 "nav", -1 2226 "section", -1 2227 "thead", -1 2228 "tbody", -1 2229 "tfoot", -1 2230 "fieldset" -1 2231 ] -1 2232 }; -1 2233 // As an override of list2, conditionally include name from content if current node is focusable, or if the current node matches list3 while the referenced parent node (root node) matches list1. -1 2234 var list3 = { -1 2235 roles: [ -1 2236 "term", -1 2237 "definition", -1 2238 "directory", -1 2239 "list", -1 2240 "note", -1 2241 "status", -1 2242 "table", -1 2243 "contentinfo" -1 2244 ], -1 2245 tags: ["dl", "ul", "ol", "dd", "details", "output", "table"] -1 2246 }; -1 2247 // Subsequent roles added as part of the Role Parity project for ARIA 1.2. -1 2248 // Tracks roles that don't specifically belong within the prior process lists. -1 2249 var list4 = { -1 2250 roles: ["legend", "caption"], -1 2251 tags: ["legend", "caption", "figcaption"] -1 2252 }; 1948 22531949 -1 // Always include name from content when the referenced node matches list1, as well as when child nodes match those within list31950 -1 // Note: gridcell was added to list1 to account for focusable gridcells that match the ARIA 1.0 paradigm for interactive grids.1951 -1 // So too was row to match 'name from author' and 'name from content' in accordance with the spec.1952 -1 var list1 = {1953 -1 roles: [-1 2254 var nativeFormFields = ["button", "input", "select", "textarea"]; -1 2255 var rangeWidgetRoles = ["scrollbar", "slider", "spinbutton"]; -1 2256 var editWidgetRoles = ["searchbox", "textbox"]; -1 2257 var selectWidgetRoles = [ -1 2258 "grid", -1 2259 "listbox", -1 2260 "tablist", -1 2261 "tree", -1 2262 "treegrid" -1 2263 ]; -1 2264 var otherWidgetRoles = [ 1954 2265 "button", 1955 2266 "checkbox", 1956 2267 "link",1957 -1 "option",1958 -1 "radio",1959 2268 "switch",1960 -1 "tab",1961 -1 "treeitem",-1 2269 "option", -1 2270 "menu", -1 2271 "menubar", 1962 2272 "menuitem", 1963 2273 "menuitemcheckbox", 1964 2274 "menuitemradio",1965 -1 "row",1966 -1 "cell",1967 -1 "gridcell",1968 -1 "columnheader",1969 -1 "rowheader",1970 -1 "tooltip",1971 -1 "heading"1972 -1 ],1973 -1 tags: [1974 -1 "a",1975 -1 "button",1976 -1 "summary",1977 -1 "input",-1 2275 "radio", -1 2276 "tab", -1 2277 "treeitem", -1 2278 "gridcell" -1 2279 ]; -1 2280 var presentationRoles = ["presentation", "none"]; -1 2281 -1 2282 var hasGlobalAttr = function(node) { -1 2283 var globalPropsAndStates = [ -1 2284 "labelledby", -1 2285 "label", -1 2286 "describedby", -1 2287 "busy", -1 2288 "controls", -1 2289 "current", -1 2290 "details", -1 2291 "disabled", -1 2292 "dropeffect", -1 2293 "errormessage", -1 2294 "flowto", -1 2295 "grabbed", -1 2296 "haspopup", -1 2297 "invalid", -1 2298 "keyshortcuts", -1 2299 "live", -1 2300 "owns", -1 2301 "roledescription" -1 2302 ]; -1 2303 for (var i = 0; i < globalPropsAndStates.length; i++) { -1 2304 var a = trim(node.getAttribute("aria-" + globalPropsAndStates[i])); -1 2305 if (a) { -1 2306 return true; -1 2307 } -1 2308 } -1 2309 return false; -1 2310 }; -1 2311 -1 2312 var isHidden = -1 2313 overrides.isHidden || -1 2314 function(node, refNode) { -1 2315 var hidden = function(node) { -1 2316 if (!node || node.nodeType !== 1 || node === refNode) { -1 2317 return false; -1 2318 } -1 2319 if (node.getAttribute("aria-hidden") === "true") { -1 2320 return true; -1 2321 } -1 2322 if (node.getAttribute("hidden")) { -1 2323 return true; -1 2324 } -1 2325 var style = getStyleObject(node); -1 2326 return ( -1 2327 style["display"] === "none" || style["visibility"] === "hidden" -1 2328 ); -1 2329 }; -1 2330 return hidden(node); -1 2331 }; -1 2332 -1 2333 var isParentHidden = function(node, refNode, skipOwned, skipCurrent) { -1 2334 while (node && node !== refNode) { -1 2335 if (!skipCurrent && node.nodeType === 1 && isHidden(node, refNode)) { -1 2336 return true; -1 2337 } else skipCurrent = false; -1 2338 node = node.parentNode; -1 2339 } -1 2340 return false; -1 2341 }; -1 2342 -1 2343 var getStyleObject = -1 2344 overrides.getStyleObject || -1 2345 function(node) { -1 2346 var style = {}; -1 2347 if (docO.defaultView && docO.defaultView.getComputedStyle) { -1 2348 style = docO.defaultView.getComputedStyle(node, ""); -1 2349 } else if (node.currentStyle) { -1 2350 style = node.currentStyle; -1 2351 } -1 2352 return style; -1 2353 }; -1 2354 -1 2355 var cleanCSSText = function(node, text) { -1 2356 var s = text; -1 2357 if (s.indexOf("attr(") !== -1) { -1 2358 var m = s.match(/attr\((.|\n|\r\n)*?\)/g); -1 2359 for (var i = 0; i < m.length; i++) { -1 2360 var b = m[i].slice(5, -1); -1 2361 b = node.getAttribute(b) || ""; -1 2362 s = s.replace(m[i], b); -1 2363 } -1 2364 } -1 2365 return s || text; -1 2366 }; -1 2367 -1 2368 var isBlockLevelElement = function(node, cssObj) { -1 2369 var styleObject = cssObj || getStyleObject(node); -1 2370 for (var prop in blockStyles) { -1 2371 var values = blockStyles[prop]; -1 2372 for (var i = 0; i < values.length; i++) { -1 2373 if ( -1 2374 styleObject[prop] && -1 2375 ((values[i].indexOf("!") === 0 && -1 2376 [values[i].slice(1), "inherit", "initial", "unset"].indexOf( -1 2377 styleObject[prop] -1 2378 ) === -1) || -1 2379 styleObject[prop].indexOf(values[i]) === 0) -1 2380 ) { -1 2381 return true; -1 2382 } -1 2383 } -1 2384 } -1 2385 return ( -1 2386 !cssObj && -1 2387 node.nodeName && -1 2388 blockElements.indexOf(node.nodeName.toLowerCase()) !== -1 && -1 2389 !( -1 2390 styleObject["display"] && -1 2391 styleObject["display"].indexOf("inline") === 0 && -1 2392 node.nodeName.toLowerCase() !== "br" -1 2393 ) -1 2394 ); -1 2395 }; -1 2396 -1 2397 // CSS Block Styles indexed from: -1 2398 // https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context -1 2399 var blockStyles = { -1 2400 display: ["block", "grid", "table", "flow-root", "flex"], -1 2401 position: ["absolute", "fixed"], -1 2402 float: ["left", "right", "inline"], -1 2403 clear: ["left", "right", "both", "inline"], -1 2404 overflow: ["hidden", "scroll", "auto"], -1 2405 "column-count": ["!auto"], -1 2406 "column-width": ["!auto"], -1 2407 "column-span": ["all"], -1 2408 contain: ["layout", "content", "strict"] -1 2409 }; -1 2410 -1 2411 // HTML5 Block Elements indexed from: -1 2412 // https://github.com/webmodules/block-elements -1 2413 // Note: 'br' was added to this array because it impacts visual display and should thus add a space . -1 2414 // Reference issue: https://github.com/w3c/accname/issues/4 -1 2415 // Note: Added in 1.13, td, th, tr, and legend -1 2416 var blockElements = [ -1 2417 "address", -1 2418 "article", -1 2419 "aside", -1 2420 "blockquote", -1 2421 "br", -1 2422 "canvas", -1 2423 "dd", -1 2424 "div", -1 2425 "dl", -1 2426 "dt", -1 2427 "fieldset", -1 2428 "figcaption", -1 2429 "figure", -1 2430 "footer", -1 2431 "form", 1978 2432 "h1", 1979 2433 "h2", 1980 2434 "h3", 1981 2435 "h4", 1982 2436 "h5", 1983 2437 "h6",1984 -1 "menuitem",1985 -1 "option",1986 -1 "tr",1987 -1 "td",1988 -1 "th"1989 -1 ]1990 -1 };1991 -1 // Never include name from content when current node matches list21992 -1 // The rowgroup role was added to prevent 'name from content' in accordance with relevant ARIA 1.1 spec changes.1993 -1 // The fieldset element and group role was added to account for implicit mappings where name from content is not supported.1994 -1 var list2 = {1995 -1 roles: [1996 -1 "application",1997 -1 "alert",1998 -1 "log",1999 -1 "marquee",2000 -1 "timer",2001 -1 "alertdialog",2002 -1 "dialog",2003 -1 "banner",2004 -1 "complementary",2005 -1 "form",2006 -1 "main",2007 -1 "navigation",2008 -1 "region",2009 -1 "search",2010 -1 "article",2011 -1 "document",2012 -1 "feed",2013 -1 "figure",2014 -1 "img",2015 -1 "math",2016 -1 "toolbar",2017 -1 "menu",2018 -1 "menubar",2019 -1 "grid",2020 -1 "listbox",2021 -1 "radiogroup",2022 -1 "textbox",2023 -1 "searchbox",2024 -1 "spinbutton",2025 -1 "scrollbar",2026 -1 "slider",2027 -1 "tablist",2028 -1 "tabpanel",2029 -1 "tree",2030 -1 "treegrid",2031 -1 "separator",2032 -1 "rowgroup",2033 -1 "group"2034 -1 ],2035 -1 tags: [2036 -1 "article",2037 -1 "aside",2038 -1 "body",2039 -1 "select",2040 -1 "datalist",2041 -1 "optgroup",2042 -1 "dialog",2043 -1 "figure",2044 -1 "footer",2045 -1 "form",2046 2438 "header", -1 2439 "hgroup", 2047 2440 "hr",2048 -1 "img",2049 -1 "textarea",2050 -1 "input",-1 2441 "legend", -1 2442 "li", 2051 2443 "main",2052 -1 "math",2053 -1 "menu",2054 2444 "nav", -1 2445 "noscript", -1 2446 "ol", -1 2447 "output", -1 2448 "p", -1 2449 "pre", 2055 2450 "section",2056 -1 "thead",2057 -1 "tbody",2058 -1 "tfoot",2059 -1 "fieldset"2060 -1 ]2061 -1 };2062 -1 // As an override of list2, conditionally include name from content if current node is focusable, or if the current node matches list3 while the referenced parent node (root node) matches list1.2063 -1 var list3 = {2064 -1 roles: [2065 -1 "term",2066 -1 "definition",2067 -1 "directory",2068 -1 "list",2069 -1 "note",2070 -1 "status",2071 2451 "table",2072 -1 "contentinfo"2073 -1 ],2074 -1 tags: ["dl", "ul", "ol", "dd", "details", "output", "table"]2075 -1 };2076 -1 // Subsequent roles added as part of the Role Parity project for ARIA 1.2.2077 -1 // Tracks roles that don't specifically belong within the prior process lists.2078 -1 var list4 = {2079 -1 roles: ["legend"],2080 -1 tags: ["legend"]2081 -1 };2082 -12083 -1 var nativeFormFields = ["button", "input", "select", "textarea"];2084 -1 var rangeWidgetRoles = ["scrollbar", "slider", "spinbutton"];2085 -1 var editWidgetRoles = ["searchbox", "textbox"];2086 -1 var selectWidgetRoles = ["grid", "listbox", "tablist", "tree", "treegrid"];2087 -1 var otherWidgetRoles = [2088 -1 "button",2089 -1 "checkbox",2090 -1 "link",2091 -1 "switch",2092 -1 "option",2093 -1 "menu",2094 -1 "menubar",2095 -1 "menuitem",2096 -1 "menuitemcheckbox",2097 -1 "menuitemradio",2098 -1 "radio",2099 -1 "tab",2100 -1 "treeitem",2101 -1 "gridcell"2102 -1 ];2103 -1 var presentationRoles = ["presentation", "none"];2104 -12105 -1 var hasGlobalAttr = function(node) {2106 -1 var globalPropsAndStates = [2107 -1 "labelledby",2108 -1 "label",2109 -1 "describedby",2110 -1 "busy",2111 -1 "controls",2112 -1 "current",2113 -1 "details",2114 -1 "disabled",2115 -1 "dropeffect",2116 -1 "errormessage",2117 -1 "flowto",2118 -1 "grabbed",2119 -1 "haspopup",2120 -1 "invalid",2121 -1 "keyshortcuts",2122 -1 "live",2123 -1 "owns",2124 -1 "roledescription"-1 2452 "td", -1 2453 "tfoot", -1 2454 "th", -1 2455 "tr", -1 2456 "ul", -1 2457 "video" 2125 2458 ];2126 -1 for (var i = 0; i < globalPropsAndStates.length; i++) {2127 -1 var a = trim(node.getAttribute("aria-" + globalPropsAndStates[i]));2128 -1 if (a) {2129 -1 return true;2130 -1 }2131 -1 }2132 -1 return false;2133 -1 };2134 24592135 -1 var isHidden =2136 -1 overrides.isHidden ||2137 -1 function(node, refNode) {2138 -1 var hidden = function(node) {2139 -1 if (!node || node.nodeType !== 1 || node === refNode) {2140 -1 return false;2141 -1 }2142 -1 if (node.getAttribute("aria-hidden") === "true") {2143 -1 return true;2144 -1 }2145 -1 if (node.getAttribute("hidden")) {2146 -1 return true;-1 2460 var getObjectValue = function( -1 2461 role, -1 2462 node, -1 2463 isRange, -1 2464 isEdit, -1 2465 isSelect, -1 2466 isNative -1 2467 ) { -1 2468 var val = ""; -1 2469 var bypass = false; -1 2470 -1 2471 if (isRange && !isNative) { -1 2472 val = -1 2473 node.getAttribute("aria-valuetext") || -1 2474 node.getAttribute("aria-valuenow") || -1 2475 ""; -1 2476 } else if (isEdit && !isNative) { -1 2477 val = getText(node) || ""; -1 2478 } else if (isSelect && !isNative) { -1 2479 var childRoles = []; -1 2480 if (role === "grid" || role === "treegrid") { -1 2481 childRoles = ["gridcell", "rowheader", "columnheader"]; -1 2482 } else if (role === "listbox") { -1 2483 childRoles = ["option"]; -1 2484 } else if (role === "tablist") { -1 2485 childRoles = ["tab"]; -1 2486 } else if (role === "tree") { -1 2487 childRoles = ["treeitem"]; 2147 2488 }2148 -1 var style = getStyleObject(node);2149 -1 if (style["display"] === "none" || style["visibility"] === "hidden") {2150 -1 return true;-1 2489 val = joinSelectedParts( -1 2490 node, -1 2491 node.querySelectorAll('*[aria-selected="true"]'), -1 2492 false, -1 2493 childRoles -1 2494 ); -1 2495 bypass = true; -1 2496 } -1 2497 val = trim(val); -1 2498 if (!val && (isRange || isEdit) && node.value) { -1 2499 val = node.value; -1 2500 } -1 2501 if (!bypass && !val && isNative) { -1 2502 if (isSelect) { -1 2503 val = joinSelectedParts( -1 2504 node, -1 2505 node.querySelectorAll("option[selected]"), -1 2506 true -1 2507 ); -1 2508 } else { -1 2509 val = node.value; 2151 2510 }2152 -1 return false;2153 -1 };2154 -1 return hidden(node);2155 -1 };-1 2511 } 2156 25122157 -1 var isParentHidden = function(node, refNode, skipOwned, skipCurrent) {2158 -1 while (node && node !== refNode) {2159 -1 if (!skipCurrent && node.nodeType === 1 && isHidden(node, refNode)) {2160 -1 return true;2161 -1 } else skipCurrent = false;2162 -1 node = node.parentNode;2163 -1 }2164 -1 return false;2165 -1 };-1 2513 return val; -1 2514 }; 2166 25152167 -1 var getStyleObject =2168 -1 overrides.getStyleObject ||2169 -1 function(node) {2170 -1 var style = {};2171 -1 if (docO.defaultView && docO.defaultView.getComputedStyle) {2172 -1 style = docO.defaultView.getComputedStyle(node, "");2173 -1 } else if (node.currentStyle) {2174 -1 style = node.currentStyle;2175 -1 }2176 -1 return style;-1 2516 var addSpacing = function(s) { -1 2517 return trim(s).length ? " " + s + " " : " "; 2177 2518 }; 2178 25192179 -1 var cleanCSSText = function(node, text) {2180 -1 var s = text;2181 -1 if (s.indexOf("attr(") !== -1) {2182 -1 var m = s.match(/attr\((.|\n|\r\n)*?\)/g);2183 -1 for (var i = 0; i < m.length; i++) {2184 -1 var b = m[i].slice(5, -1);2185 -1 b = node.getAttribute(b) || "";2186 -1 s = s.replace(m[i], b);-1 2520 var joinSelectedParts = function(node, nOA, isNative, childRoles) { -1 2521 if (!nOA || !nOA.length) { -1 2522 return ""; 2187 2523 }2188 -1 }2189 -1 return s || text;2190 -1 };2191 -12192 -1 var isBlockLevelElement = function(node, cssObj) {2193 -1 var styleObject = cssObj || getStyleObject(node);2194 -1 for (var prop in blockStyles) {2195 -1 var values = blockStyles[prop];2196 -1 for (var i = 0; i < values.length; i++) {2197 -1 if (2198 -1 styleObject[prop] &&2199 -1 ((values[i].indexOf("!") === 0 &&2200 -1 [values[i].slice(1), "inherit", "initial", "unset"].indexOf(2201 -1 styleObject[prop]2202 -1 ) === -1) ||2203 -1 styleObject[prop].indexOf(values[i]) === 0)2204 -1 ) {2205 -1 return true;-1 2524 var parts = []; -1 2525 for (var i = 0; i < nOA.length; i++) { -1 2526 var role = getRole(nOA[i]); -1 2527 var isValidChildRole = !childRoles || childRoles.indexOf(role) !== -1; -1 2528 if (isValidChildRole) { -1 2529 parts.push( -1 2530 isNative -1 2531 ? getText(nOA[i]) -1 2532 : walk(nOA[i], true, false, [], false, { top: nOA[i] }).name -1 2533 ); 2206 2534 } 2207 2535 }2208 -1 }2209 -1 if (2210 -1 !cssObj &&2211 -1 node.nodeName &&2212 -1 blockElements.indexOf(node.nodeName.toLowerCase()) !== -1 &&2213 -1 !(2214 -1 styleObject["display"] &&2215 -1 styleObject["display"].indexOf("inline") === 0 &&2216 -1 node.nodeName.toLowerCase() !== "br"2217 -1 )2218 -1 ) {2219 -1 return true;2220 -1 }2221 -1 return false;2222 -1 };-1 2536 return parts.join(" "); -1 2537 }; 2223 25382224 -1 // CSS Block Styles indexed from:2225 -1 // https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context2226 -1 var blockStyles = {2227 -1 display: ["block", "grid", "table", "flow-root", "flex"],2228 -1 position: ["absolute", "fixed"],2229 -1 float: ["left", "right", "inline"],2230 -1 clear: ["left", "right", "both", "inline"],2231 -1 overflow: ["hidden", "scroll", "auto"],2232 -1 "column-count": ["!auto"],2233 -1 "column-width": ["!auto"],2234 -1 "column-span": ["all"],2235 -1 contain: ["layout", "content", "strict"]2236 -1 };-1 2539 var getPseudoElStyleObj = -1 2540 overrides.getPseudoElStyleObj || -1 2541 function(node, position) { -1 2542 var styleObj = {}; -1 2543 for (var prop in blockStyles) { -1 2544 styleObj[prop] = docO.defaultView -1 2545 .getComputedStyle(node, position) -1 2546 .getPropertyValue(prop); -1 2547 } -1 2548 styleObj["content"] = docO.defaultView -1 2549 .getComputedStyle(node, position) -1 2550 .getPropertyValue("content") -1 2551 .replace(/^"|\\|"$/g, ""); -1 2552 return styleObj; -1 2553 }; 2237 25542238 -1 // HTML5 Block Elements indexed from:2239 -1 // https://github.com/webmodules/block-elements2240 -1 // Note: 'br' was added to this array because it impacts visual display and should thus add a space .2241 -1 // Reference issue: https://github.com/w3c/accname/issues/42242 -1 // Note: Added in 1.13, td, th, tr, and legend2243 -1 var blockElements = [2244 -1 "address",2245 -1 "article",2246 -1 "aside",2247 -1 "blockquote",2248 -1 "br",2249 -1 "canvas",2250 -1 "dd",2251 -1 "div",2252 -1 "dl",2253 -1 "dt",2254 -1 "fieldset",2255 -1 "figcaption",2256 -1 "figure",2257 -1 "footer",2258 -1 "form",2259 -1 "h1",2260 -1 "h2",2261 -1 "h3",2262 -1 "h4",2263 -1 "h5",2264 -1 "h6",2265 -1 "header",2266 -1 "hgroup",2267 -1 "hr",2268 -1 "legend",2269 -1 "li",2270 -1 "main",2271 -1 "nav",2272 -1 "noscript",2273 -1 "ol",2274 -1 "output",2275 -1 "p",2276 -1 "pre",2277 -1 "section",2278 -1 "table",2279 -1 "td",2280 -1 "tfoot",2281 -1 "th",2282 -1 "tr",2283 -1 "ul",2284 -1 "video"2285 -1 ];2286 -12287 -1 var getObjectValue = function(2288 -1 role,2289 -1 node,2290 -1 isRange,2291 -1 isEdit,2292 -1 isSelect,2293 -1 isNative2294 -1 ) {2295 -1 var val = "";2296 -1 var bypass = false;2297 -12298 -1 if (isRange && !isNative) {2299 -1 val =2300 -1 node.getAttribute("aria-valuetext") ||2301 -1 node.getAttribute("aria-valuenow") ||2302 -1 "";2303 -1 } else if (isEdit && !isNative) {2304 -1 val = getText(node) || "";2305 -1 } else if (isSelect && !isNative) {2306 -1 var childRoles = [];2307 -1 if (role === "grid" || role === "treegrid") {2308 -1 childRoles = ["gridcell", "rowheader", "columnheader"];2309 -1 } else if (role === "listbox") {2310 -1 childRoles = ["option"];2311 -1 } else if (role === "tablist") {2312 -1 childRoles = ["tab"];2313 -1 } else if (role === "tree") {2314 -1 childRoles = ["treeitem"];2315 -1 }2316 -1 val = joinSelectedParts(2317 -1 node,2318 -1 node.querySelectorAll('*[aria-selected="true"]'),2319 -1 false,2320 -1 childRoles2321 -1 );2322 -1 bypass = true;2323 -1 }2324 -1 val = trim(val);2325 -1 if (!val && (isRange || isEdit) && node.value) {2326 -1 val = node.value;2327 -1 }2328 -1 if (!bypass && !val && isNative) {2329 -1 if (isSelect) {2330 -1 val = joinSelectedParts(2331 -1 node,2332 -1 node.querySelectorAll("option[selected]"),2333 -1 true2334 -1 );2335 -1 } else {2336 -1 val = node.value;-1 2555 var getText = function(node, position) { -1 2556 if (!position && node.nodeType === 1) { -1 2557 return node.innerText || node.textContent || ""; 2337 2558 }2338 -1 }2339 -12340 -1 return val;2341 -1 };2342 -12343 -1 var addSpacing = function(s) {2344 -1 return trim(s).length ? " " + s + " " : " ";2345 -1 };2346 -12347 -1 var joinSelectedParts = function(node, nOA, isNative, childRoles) {2348 -1 if (!nOA || !nOA.length) {2349 -1 return "";2350 -1 }2351 -1 var parts = [];2352 -1 for (var i = 0; i < nOA.length; i++) {2353 -1 var role = getRole(nOA[i]);2354 -1 var isValidChildRole = !childRoles || childRoles.indexOf(role) !== -1;2355 -1 if (isValidChildRole) {2356 -1 parts.push(2357 -1 isNative2358 -1 ? getText(nOA[i])2359 -1 : walk(nOA[i], true, false, [], false, { top: nOA[i] }).name2360 -1 );-1 2559 var styles = getPseudoElStyleObj(node, position); -1 2560 var text = styles["content"]; -1 2561 if (!text || text === "none") { -1 2562 return ""; 2361 2563 }2362 -1 }2363 -1 return parts.join(" ");2364 -1 };2365 -12366 -1 var getPseudoElStyleObj =2367 -1 overrides.getPseudoElStyleObj ||2368 -1 function(node, position) {2369 -1 var styleObj = {};2370 -1 for (var prop in blockStyles) {2371 -1 styleObj[prop] = docO.defaultView2372 -1 .getComputedStyle(node, position)2373 -1 .getPropertyValue(prop);-1 2564 if (isBlockLevelElement({}, styles)) { -1 2565 if (position === ":before") { -1 2566 text += " "; -1 2567 } else if (position === ":after") { -1 2568 text = " " + text; -1 2569 } 2374 2570 }2375 -1 styleObj["content"] = docO.defaultView2376 -1 .getComputedStyle(node, position)2377 -1 .getPropertyValue("content")2378 -1 .replace(/^"|\\|"$/g, "");2379 -1 return styleObj;-1 2571 return text; 2380 2572 }; 2381 25732382 -1 var getText = function(node, position) {2383 -1 if (!position && node.nodeType === 1) {2384 -1 return node.innerText || node.textContent || "";2385 -1 }2386 -1 var styles = getPseudoElStyleObj(node, position);2387 -1 var text = styles["content"];2388 -1 if (!text || text === "none") {2389 -1 return "";2390 -1 }2391 -1 if (isBlockLevelElement({}, styles)) {2392 -1 if (position === ":before") {2393 -1 text += " ";2394 -1 } else if (position === ":after") {2395 -1 text = " " + text;2396 -1 }2397 -1 }2398 -1 return text;2399 -1 };2400 -12401 -1 var getCSSText =2402 -1 overrides.getCSSText ||2403 -1 function(node, refNode) {2404 -1 if (2405 -1 (node && node.nodeType !== 1) ||2406 -1 node === refNode ||2407 -1 ["input", "select", "textarea", "img", "iframe"].indexOf(2408 -1 node.nodeName.toLowerCase()2409 -1 ) !== -12410 -1 ) {2411 -1 return { before: "", after: "" };2412 -1 }2413 -1 if (docO.defaultView && docO.defaultView.getComputedStyle) {-1 2574 var getCSSText = -1 2575 overrides.getCSSText || -1 2576 function(node, refNode) { -1 2577 if ( -1 2578 (node && node.nodeType !== 1) || -1 2579 node === refNode || -1 2580 [ -1 2581 "input", -1 2582 "select", -1 2583 "textarea", -1 2584 "img", -1 2585 "iframe", -1 2586 "optgroup" -1 2587 ].indexOf(node.nodeName.toLowerCase()) !== -1 -1 2588 ) { -1 2589 return { before: "", after: "" }; -1 2590 } 2414 2591 return { 2415 2592 before: cleanCSSText(node, getText(node, ":before")), 2416 2593 after: cleanCSSText(node, getText(node, ":after")) 2417 2594 };2418 -1 } else {2419 -1 return { before: "", after: "" };2420 -1 }2421 -1 };2422 -12423 -1 var getParent = function(node, nTag, nRole, noRole) {2424 -1 var noRole = noRole ? true : false;2425 -1 while (node) {2426 -1 node = node.parentNode;2427 -1 if (2428 -1 node &&2429 -1 ((nRole && getRole(node) === nRole) ||2430 -1 (nTag &&2431 -1 node.nodeName &&2432 -1 node.nodeName.toLowerCase() === nTag &&2433 -1 (!noRole || getRole(node).length < 1)))2434 -1 ) {2435 -1 return node;2436 -1 }2437 -1 }2438 -1 return {};2439 -1 };-1 2595 }; 2440 25962441 -1 var hasParentLabelOrHidden = function(2442 -1 node,2443 -1 refNode,2444 -1 ownedBy,2445 -1 ignoreHidden2446 -1 ) {2447 -1 var trackNodes = [];2448 -1 while (node && node !== refNode) {2449 -1 if (2450 -1 node.id &&2451 -1 ownedBy &&2452 -1 ownedBy[node.id] &&2453 -1 ownedBy[node.id].node &&2454 -1 trackNodes.indexOf(node) === -12455 -1 ) {2456 -1 trackNodes.push(node);2457 -1 node = ownedBy[node.id].node;2458 -1 } else {-1 2597 var getParent = function(node, nTag, nRole, noRole) { -1 2598 noRole = !!noRole; -1 2599 while (node) { 2459 2600 node = node.parentNode; -1 2601 if ( -1 2602 node && -1 2603 ((nRole && getRole(node) === nRole) || -1 2604 (nTag && -1 2605 node.nodeName && -1 2606 node.nodeName.toLowerCase() === nTag && -1 2607 (!noRole || getRole(node).length < 1))) -1 2608 ) { -1 2609 return node; -1 2610 } 2460 2611 }2461 -1 if (node && node.getAttribute) {-1 2612 return {}; -1 2613 }; -1 2614 -1 2615 var hasParentLabelOrHidden = function( -1 2616 node, -1 2617 refNode, -1 2618 ownedBy, -1 2619 ignoreHidden -1 2620 ) { -1 2621 var trackNodes = []; -1 2622 while (node && node !== refNode) { 2462 2623 if (2463 -1 trim(node.getAttribute("aria-label")) ||2464 -1 (!ignoreHidden && isHidden(node, refNode))-1 2624 node.id && -1 2625 ownedBy && -1 2626 ownedBy[node.id] && -1 2627 ownedBy[node.id].node && -1 2628 trackNodes.indexOf(node) === -1 2465 2629 ) {2466 -1 return true;-1 2630 trackNodes.push(node); -1 2631 node = ownedBy[node.id].node; -1 2632 } else { -1 2633 node = node.parentNode; -1 2634 } -1 2635 if (node && node.getAttribute) { -1 2636 if ( -1 2637 trim(node.getAttribute("aria-label")) || -1 2638 (!ignoreHidden && isHidden(node, refNode)) -1 2639 ) { -1 2640 return true; -1 2641 } 2467 2642 } 2468 2643 }2469 -1 }2470 -1 return false;2471 -1 };-1 2644 return false; -1 2645 }; 2472 26462473 -1 var trim = function(str) {2474 -1 if (typeof str !== "string") {2475 -1 return "";-1 2647 var trim = function(str) { -1 2648 if (typeof str !== "string") { -1 2649 return ""; -1 2650 } -1 2651 return str.replace(/^\s+|\s+$/g, ""); -1 2652 }; -1 2653 -1 2654 if ( -1 2655 isParentHidden( -1 2656 node, -1 2657 docO.body, -1 2658 true, -1 2659 !!(node && node.nodeName && node.nodeName.toLowerCase() === "area") -1 2660 ) -1 2661 ) { -1 2662 return props; 2476 2663 }2477 -1 return str.replace(/^\s+|\s+$/g, "");2478 -1 };2479 26642480 -1 if (isParentHidden(node, docO.body, true)) {2481 -1 return props;2482 -1 }-1 2665 // Compute accessible Name and Description properties value for node -1 2666 var accProps = walk(node, false, false, [], false, { top: node }); 2483 26672484 -1 // Compute accessible Name and Description properties value for node2485 -1 var accProps = walk(node, false, false, [], false, { top: node });-1 2668 var accName = trim(accProps.name.replace(/\s+/g, " ")); -1 2669 var accDesc = trim(accProps.title.replace(/\s+/g, " ")); 2486 26702487 -1 var accName = trim(accProps.name.replace(/\s+/g, " "));2488 -1 var accDesc = trim(accProps.title.replace(/\s+/g, " "));-1 2671 if (accName === accDesc) { -1 2672 // If both Name and Description properties match, then clear the Description property value. -1 2673 accDesc = ""; -1 2674 } 2489 26752490 -1 if (accName === accDesc) {2491 -1 // If both Name and Description properties match, then clear the Description property value.2492 -1 accDesc = "";2493 -1 }-1 2676 props.name = accName; -1 2677 props.desc = accDesc; 2494 26782495 -1 props.name = accName;2496 -1 props.desc = accDesc;-1 2679 // Clear track variables -1 2680 nodes = []; -1 2681 owns = []; -1 2682 } catch (e) { -1 2683 props.error = e; -1 2684 } -1 2685 props.placeholder = nameFromPlaceholder; -1 2686 props.userAgent = nameFromUserAgent; 2497 26872498 -1 // Clear track variables2499 -1 nodes = [];2500 -1 owns = [];2501 -1 } catch (e) {2502 -1 props.error = e;2503 -1 }-1 2688 if (fnc && typeof fnc === "function") { -1 2689 return fnc.apply(node, [props, node]); -1 2690 } else { -1 2691 return props; -1 2692 } -1 2693 }; 2504 26942505 -1 if (fnc && typeof fnc === "function") {2506 -1 return fnc.apply(node, [props, node]);2507 -1 } else {2508 -1 return props;2509 -1 }2510 -1 };-1 2695 // Customize returned string for testable statements -1 2696 -1 2697 nameSpace.getAccNameMsg = nameSpace.getNames = function(node, overrides) { -1 2698 var props = nameSpace.getAccName(node, null, false, overrides); -1 2699 if (props.error) { -1 2700 return ( -1 2701 props.error + -1 2702 "\n\n" + -1 2703 "An error has been thrown in AccName Prototype version " + -1 2704 nameSpace.getAccNameVersion + -1 2705 ". Please copy this error message and the HTML markup that caused it, and submit both as a new GitHub issue at\n" + -1 2706 "https://github.com/whatsock/w3c-alternative-text-computation" -1 2707 ); -1 2708 } -1 2709 var r = -1 2710 'accName: "' + props.name + '"\n\naccDesc: "' + props.desc + '"\n\n'; -1 2711 if (props.placeholder) r += "Name from placeholder: true\n\n"; -1 2712 if (props.userAgent) r += "Name from user agent: true\n\n"; -1 2713 r += -1 2714 "(Running AccName Computation Prototype version: " + -1 2715 nameSpace.getAccNameVersion + -1 2716 ")"; -1 2717 return r; -1 2718 }; 2511 27192512 -1 // Customize returned string for testable statements2513 -12514 -1 window.getAccNameMsg = window.getNames = function(node, overrides) {2515 -1 var props = window.getAccName(node, null, false, overrides);2516 -1 if (props.error) {2517 -1 return (2518 -1 props.error +2519 -1 "\n\n" +2520 -1 "An error has been thrown in AccName Prototype version " +2521 -1 window.getAccNameVersion +2522 -1 ". Please copy this error message and the HTML markup that caused it, and submit both as a new GitHub issue at\n" +2523 -1 "https://github.com/whatsock/w3c-alternative-text-computation"2524 -1 );2525 -1 } else {2526 -1 return (2527 -1 'accName: "' +2528 -1 props.name +2529 -1 '"\n\naccDesc: "' +2530 -1 props.desc +2531 -1 '"\n\n(Running AccName Computation Prototype version: ' +2532 -1 window.getAccNameVersion +2533 -1 ")"2534 -1 );-1 2720 if (typeof module === "object" && module.exports) { -1 2721 module.exports = { -1 2722 getNames: nameSpace.getNames, -1 2723 calcNames: nameSpace.calcNames -1 2724 }; 2535 2725 }2536 -1 };2537 -12538 -1 if (typeof module === "object" && module.exports) {2539 -1 module.exports = {2540 -1 getNames: window.getNames,2541 -1 calcNames: window.calcNames2542 -1 };2543 -1 }-1 2726 })(); 2544 2727 2545 2728 },{}]},{},[3]);