axe-core
Version:
Accessibility engine for automated Web UI testing
1 lines • 233 kB
JavaScript
!function e(window){var document=window.document,f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function c(e){this.name="SupportError",this.cause=e.cause,this.message="`"+e.cause+"` - feature unsupported in your environment.",e.ruleId&&(this.ruleId=e.ruleId,this.message+=" Skipping "+this.ruleId+" rule."),this.stack=(new Error).stack}(axe=axe||{}).version="3.0.4","function"==typeof define&&define.amd&&define("axe-core",[],function(){"use strict";return axe}),"object"===("undefined"==typeof module?"undefined":f(module))&&module.exports&&"function"==typeof e.toString&&(axe.source="("+e.toString()+')(typeof window === "object" ? window : this);',module.exports=axe),"function"==typeof window.getComputedStyle&&(window.axe=axe),(c.prototype=Object.create(Error.prototype)).constructor=c;var utils=axe.utils={},o={};f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function t(e,t,n){"use strict";var a,r;for(a=0,r=e.length;a<r;a++)t[n](e[a])}function n(e){this.brand="axe",this.application="axeAPI",this.tagExclude=["experimental"],this.defaultConfig=e,this._init()}function i(e,t,n){var a=e.brand,r=e.application;return axe.constants.helpUrlBase+a+"/"+(n||axe.version.substring(0,axe.version.lastIndexOf(".")))+"/"+t+"?application="+r}function u(e){"use strict";this.id=e.id,this.data=null,this.relatedNodes=[],this.result=null}function a(e){"use strict";return"string"==typeof e?new Function("return "+e+";")():e}function r(e){e&&(this.id=e.id,this.configure(e))}n.prototype._init=function(){var e=function(e){"use strict";var t;return e?(t=axe.utils.clone(e)).commons=e.commons:t={},t.reporter=t.reporter||null,t.noHtml=t.noHtml||!1,t.rules=t.rules||[],t.checks=t.checks||[],t.data=Object.assign({checks:{},rules:{}},t.data),t}(this.defaultConfig);axe.commons=e.commons,this.reporter=e.reporter,this.commands={},this.rules=[],this.checks={},this.noHtml=e.noHtml,t(e.rules,this,"addRule"),t(e.checks,this,"addCheck"),this.data={},this.data.checks=e.data&&e.data.checks||{},this.data.rules=e.data&&e.data.rules||{},this.data.failureSummaries=e.data&&e.data.failureSummaries||{},this.data.incompleteFallbackMessage=e.data&&e.data.incompleteFallbackMessage||"",this._constructHelpUrls()},n.prototype.registerCommand=function(e){"use strict";this.commands[e.id]=e.callback},n.prototype.addRule=function(e){"use strict";e.metadata&&(this.data.rules[e.id]=e.metadata);var t=this.getRule(e.id);t?t.configure(e):this.rules.push(new p(e,this))},n.prototype.addCheck=function(e){"use strict";var t=e.metadata;"object"===(void 0===t?"undefined":f(t))&&(this.data.checks[e.id]=t,"object"===f(t.messages)&&Object.keys(t.messages).filter(function(e){return t.messages.hasOwnProperty(e)&&"string"==typeof t.messages[e]}).forEach(function(e){0===t.messages[e].indexOf("function")&&(t.messages[e]=new Function("return "+t.messages[e]+";")())})),this.checks[e.id]?this.checks[e.id].configure(e):this.checks[e.id]=new r(e)},n.prototype.run=function(e,o,t,n){"use strict";this.normalizeOptions(o),axe._selectCache=[];var a=axe.utils.queue();this.rules.forEach(function(r){if(axe.utils.ruleShouldRun(r,e,o)){if(o.performanceTimer){var t="mark_rule_end_"+r.id,i="mark_rule_start_"+r.id;axe.utils.performanceTimer.mark(i)}a.defer(function(n,a){r.run(e,o,function(e){o.performanceTimer&&(axe.utils.performanceTimer.mark(t),axe.utils.performanceTimer.measure("rule_"+r.id,i,t)),n(e)},function(e){if(o.debug)a(e);else{var t=Object.assign(new m(r),{result:axe.constants.CANTTELL,description:"An error occured while running this rule",message:e.message,stack:e.stack,error:e});n(t)}})})}}),a.then(function(e){axe._selectCache=void 0,t(e.filter(function(e){return!!e}))}).catch(n)},n.prototype.after=function(e,n){"use strict";var a=this.rules;return e.map(function(e){var t=axe.utils.findBy(a,"id",e.id);if(!t)throw new Error("Result for unknown rule. You may be running mismatch aXe-core versions");return t.after(e,n)})},n.prototype.getRule=function(t){return this.rules.find(function(e){return e.id===t})},n.prototype.normalizeOptions=function(e){"use strict";var t=this;if("object"===f(e.runOnly)){Array.isArray(e.runOnly)&&(e.runOnly={type:"tag",values:e.runOnly});var n=e.runOnly;if(n.value&&!n.values&&(n.values=n.value,delete n.value),!Array.isArray(n.values)||0===n.values.length)throw new Error("runOnly.values must be a non-empty array");if(["rule","rules"].includes(n.type))n.type="rule",n.values.forEach(function(e){if(!t.getRule(e))throw new Error("unknown rule `"+e+"` in options.runOnly")});else{if(!["tag","tags",void 0].includes(n.type))throw new Error("Unknown runOnly type '"+n.type+"'");n.type="tag";var a=t.rules.reduce(function(e,t){return e.length?e.filter(function(e){return!t.tags.includes(e)}):e},n.values);if(0!==a.length)throw new Error("Could not find tags `"+a.join("`, `")+"`")}}return"object"===f(e.rules)&&Object.keys(e.rules).forEach(function(e){if(!t.getRule(e))throw new Error("unknown rule `"+e+"` in options.rules")}),e},n.prototype.setBranding=function(e){"use strict";var t={brand:this.brand,application:this.application};e&&e.hasOwnProperty("brand")&&e.brand&&"string"==typeof e.brand&&(this.brand=e.brand),e&&e.hasOwnProperty("application")&&e.application&&"string"==typeof e.application&&(this.application=e.application),this._constructHelpUrls(t)},n.prototype._constructHelpUrls=function(){var n=this,a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,r=(axe.version.match(/^[1-9][0-9]*\.[0-9]+/)||["x.y"])[0];this.rules.forEach(function(e){n.data.rules[e.id]||(n.data.rules[e.id]={});var t=n.data.rules[e.id];("string"!=typeof t.helpUrl||a&&t.helpUrl===i(a,e.id,r))&&(t.helpUrl=i(n,e.id,r))})},n.prototype.resetRulesAndChecks=function(){"use strict";this._init()},r.prototype.enabled=!0,r.prototype.run=function(e,t,n,a){"use strict";var r=(t=t||{}).hasOwnProperty("enabled")?t.enabled:this.enabled,i=t.options||this.options;if(r){var o,l=new u(this),s=axe.utils.checkHelper(l,t,n,a);try{o=this.evaluate.call(s,e.actualNode,i,e)}catch(e){return void a(e)}s.isAsync||(l.result=o,setTimeout(function(){n(l)},0))}else n(null)},r.prototype.configure=function(t){var n=this;["options","enabled"].filter(function(e){return t.hasOwnProperty(e)}).forEach(function(e){return n[e]=t[e]}),["evaluate","after"].filter(function(e){return t.hasOwnProperty(e)}).forEach(function(e){return n[e]=a(t[e])})};f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function l(e,t,n){"use strict";var a,r;e.frames=e.frames||[];var i=document.querySelectorAll(n.shift());e:for(var o=0,l=i.length;o<l;o++){r=i[o];for(var s=0,u=e.frames.length;s<u;s++)if(e.frames[s].node===r){e.frames[s][t].push(n);break e}a={node:r,include:[],exclude:[]},n&&a[t].push(n),e.frames.push(a)}}function s(t,e){"use strict";for(var n,a,r=[],i=0,o=t[e].length;i<o;i++){if("string"==typeof(n=t[e][i])){a=Array.from(document.querySelectorAll(n)),r=r.concat(a.map(function(e){return axe.utils.getNodeFromTree(t.flatTree[0],e)}));break}!n||!n.length||n instanceof Node?n instanceof Node&&(n.documentElement instanceof Node?r.push(t.flatTree[0]):r.push(axe.utils.getNodeFromTree(t.flatTree[0],n))):1<n.length?l(t,e,n):(a=Array.from(document.querySelectorAll(n[0])),r=r.concat(a.map(function(e){return axe.utils.getNodeFromTree(t.flatTree[0],e)})))}return r.filter(function(e){return e})}function d(e){"use strict";var t,n,a,r=this;this.frames=[],this.initiator=!e||"boolean"!=typeof e.initiator||e.initiator,this.page=!1,e=function(e){if(e&&"object"===(void 0===e?"undefined":f(e))||e instanceof NodeList){if(e instanceof Node)return{include:[e],exclude:[]};if(e.hasOwnProperty("include")||e.hasOwnProperty("exclude"))return{include:e.include&&+e.include.length?e.include:[document],exclude:e.exclude||[]};if(e.length===+e.length)return{include:e,exclude:[]}}return"string"==typeof e?{include:[e],exclude:[]}:{include:[document],exclude:[]}}(e),this.flatTree=axe.utils.getFlattenedTree((n=(t=e).include,a=t.exclude,(Array.from(n).concat(Array.from(a)).reduce(function(e,t){return e||(t instanceof Element?t.ownerDocument:t instanceof Document?t:void 0)},null)||document).documentElement)),this.exclude=e.exclude,this.include=e.include,this.include=s(this,"include"),this.exclude=s(this,"exclude"),axe.utils.select("frame, iframe",this).forEach(function(e){var t,n;ge(e,r)&&(t=r.frames,n=e.actualNode,axe.utils.isHidden(n)||axe.utils.findBy(t,"node",n)||t.push({node:n,include:[],exclude:[]}))}),1===this.include.length&&this.include[0].actualNode===document.documentElement&&(this.page=!0);var i=function(e){if(0===e.include.length){if(0===e.frames.length){var t=axe.utils.respondable.isInFrame()?"frame":"page";return new Error("No elements found for include in "+t+" Context")}e.frames.forEach(function(e,t){if(0===e.include.length)return new Error("No elements found for include in Context of frame "+t)})}}(this);if(i instanceof Error)throw i;Array.isArray(this.include)||(this.include=Array.from(this.include)),this.include.sort(axe.utils.nodeSorter)}function m(e){"use strict";this.id=e.id,this.result=axe.constants.NA,this.pageLevel=e.pageLevel,this.impact=null,this.nodes=[]}function p(e,t){"use strict";this._audit=t,this.id=e.id,this.selector=e.selector||"*",this.excludeHidden="boolean"!=typeof e.excludeHidden||e.excludeHidden,this.enabled="boolean"!=typeof e.enabled||e.enabled,this.pageLevel="boolean"==typeof e.pageLevel&&e.pageLevel,this.any=e.any||[],this.all=e.all||[],this.none=e.none||[],this.tags=e.tags||[],e.matches&&(this.matches=a(e.matches))}p.prototype.matches=function(){"use strict";return!0},p.prototype.gather=function(e){"use strict";var t=axe.utils.select(this.selector,e);return this.excludeHidden?t.filter(function(e){return!axe.utils.isHidden(e.actualNode)}):t},p.prototype.runChecks=function(t,r,i,n,e){"use strict";var o=this,l=axe.utils.queue();this[t].forEach(function(e){var n=o._audit.checks[e.id||e],a=axe.utils.getCheckOption(n,o.id,i);l.defer(function(e,t){n.run(r,a,e,t)})}),l.then(function(e){e=e.filter(function(e){return e}),n({type:t,results:e})}).catch(e)},p.prototype.run=function(e,i,t,n){var a=this,o=axe.utils.queue(),l=new m(this),r="mark_runchecks_start_"+this.id,s="mark_runchecks_end_"+this.id,u=void 0;try{u=this.gather(e).filter(function(e){return a.matches(e.actualNode,e)})}catch(e){return void n(new c({cause:e,ruleId:this.id}))}i.performanceTimer&&(axe.log("gather (",u.length,"):",axe.utils.performanceTimer.timeElapsed()+"ms"),axe.utils.performanceTimer.mark(r)),u.forEach(function(r){o.defer(function(t,n){var e=axe.utils.queue();e.defer(function(e,t){a.runChecks("any",r,i,e,t)}),e.defer(function(e,t){a.runChecks("all",r,i,e,t)}),e.defer(function(e,t){a.runChecks("none",r,i,e,t)}),e.then(function(e){if(e.length){var n=!1,a={};e.forEach(function(e){var t=e.results.filter(function(e){return e});(a[e.type]=t).length&&(n=!0)}),n&&(a.node=new axe.utils.DqElement(r.actualNode,i),l.nodes.push(a))}t()}).catch(function(e){return n(e)})})}),i.performanceTimer&&(axe.utils.performanceTimer.mark(s),axe.utils.performanceTimer.measure("runchecks_"+this.id,r,s)),o.then(function(){return t(l)}).catch(function(e){return n(e)})},p.prototype.after=function(l,s){"use strict";var n,e,a,t,r=(n=this,axe.utils.getAllChecks(n).map(function(e){var t=n._audit.checks[e.id||e];return t&&"function"==typeof t.after?t:null}).filter(Boolean)),u=this.id;return r.forEach(function(e){var t,n,a,r=(t=l.nodes,n=e.id,a=[],t.forEach(function(e){axe.utils.getAllChecks(e).forEach(function(e){e.id===n&&a.push(e)})}),a),i=axe.utils.getCheckOption(e,u,s),o=e.after(r,i);r.forEach(function(e){-1===o.indexOf(e)&&(e.filtered=!0)})}),l.nodes=(a=["any","all","none"],t=(e=l).nodes.filter(function(t){var n=0;return a.forEach(function(e){t[e]=t[e].filter(function(e){return!0!==e.filtered}),n+=t[e].length}),0<n}),e.pageLevel&&t.length&&(t=[t.reduce(function(t,n){if(t)return a.forEach(function(e){t[e].push.apply(t[e],n[e])}),t})]),t),l},p.prototype.configure=function(e){"use strict";e.hasOwnProperty("selector")&&(this.selector=e.selector),e.hasOwnProperty("excludeHidden")&&(this.excludeHidden="boolean"!=typeof e.excludeHidden||e.excludeHidden),e.hasOwnProperty("enabled")&&(this.enabled="boolean"!=typeof e.enabled||e.enabled),e.hasOwnProperty("pageLevel")&&(this.pageLevel="boolean"==typeof e.pageLevel&&e.pageLevel),e.hasOwnProperty("any")&&(this.any=e.any),e.hasOwnProperty("all")&&(this.all=e.all),e.hasOwnProperty("none")&&(this.none=e.none),e.hasOwnProperty("tags")&&(this.tags=e.tags),e.hasOwnProperty("matches")&&("string"==typeof e.matches?this.matches=new Function("return "+e.matches+";")():this.matches=e.matches)},function(axe){var i={helpUrlBase:"https://dequeuniversity.com/rules/",results:[],resultGroups:[],resultGroupMap:{},impact:Object.freeze(["minor","moderate","serious","critical"])};[{name:"NA",value:"inapplicable",priority:0,group:"inapplicable"},{name:"PASS",value:"passed",priority:1,group:"passes"},{name:"CANTTELL",value:"cantTell",priority:2,group:"incomplete"},{name:"FAIL",value:"failed",priority:3,group:"violations"}].forEach(function(e){var t=e.name,n=e.value,a=e.priority,r=e.group;i[t]=n,i[t+"_PRIO"]=a,i[t+"_GROUP"]=r,i.results[a]=n,i.resultGroups[a]=r,i.resultGroupMap[n]=r}),Object.freeze(i.results),Object.freeze(i.resultGroups),Object.freeze(i.resultGroupMap),Object.freeze(i),Object.defineProperty(axe,"constants",{value:i,enumerable:!0,configurable:!1,writable:!1})}(axe);f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function h(t,n){"use strict";if(t=t||function(){},n=n||axe.log,!axe._audit)throw new Error("No audit configured");var a=axe.utils.queue(),r=[];Object.keys(axe.plugins).forEach(function(e){a.defer(function(t){var n=function(e){r.push(e),t()};try{axe.plugins[e].cleanup(t,n)}catch(e){n(e)}})});var e=axe.utils.getFlattenedTree(document.body);axe.utils.querySelectorAll(e,"iframe, frame").forEach(function(n){a.defer(function(e,t){return axe.utils.sendCommandToFrame(n.actualNode,{command:"cleanup-plugin"},e,t)})}),a.then(function(e){0===r.length?t(e):n(r)}).catch(n)}function b(e,t,n){"use strict";var a=n,r=function(e){e instanceof Error==!1&&(e=new Error(e)),n(e)},i=e&&e.context||{};i.hasOwnProperty("include")&&!i.include.length&&(i.include=[document]);var o=e&&e.options||{};switch(e.command){case"rules":return w(i,o,function(e,t){a(e),t()},r);case"cleanup-plugin":return h(a,r);default:if(axe._audit&&axe._audit.commands&&axe._audit.commands[e.command])return axe._audit.commands[e.command](e,n)}}function g(e){"use strict";this._run=e.run,this._collect=e.collect,this._registry={},e.commands.forEach(function(e){axe._audit.registerCommand(e)})}axe.log=function(){"use strict";"object"===("undefined"==typeof console?"undefined":f(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},axe.cleanup=h,axe.configure=function(e){"use strict";var t;if(!(t=axe._audit))throw new Error("No audit configured");e.reporter&&("function"==typeof e.reporter||v[e.reporter])&&(t.reporter=e.reporter),e.checks&&e.checks.forEach(function(e){t.addCheck(e)});var n=[];e.rules&&e.rules.forEach(function(e){n.push(e.id),t.addRule(e)}),e.disableOtherRules&&t.rules.forEach(function(e){!1===n.includes(e.id)&&(e.enabled=!1)}),void 0!==e.branding?t.setBranding(e.branding):t._constructHelpUrls(),e.tagExclude&&(t.tagExclude=e.tagExclude),e.noHtml&&(t.noHtml=!0)},axe.getRules=function(e){"use strict";var t=(e=e||[]).length?axe._audit.rules.filter(function(t){return!!e.filter(function(e){return-1!==t.tags.indexOf(e)}).length}):axe._audit.rules,n=axe._audit.data.rules||{};return t.map(function(e){var t=n[e.id]||{};return{ruleId:e.id,description:t.description,help:t.help,helpUrl:t.helpUrl,tags:e.tags}})},axe._load=function(e){"use strict";axe.utils.respondable.subscribe("axe.ping",function(e,t,n){n({axe:!0})}),axe.utils.respondable.subscribe("axe.start",b),axe._audit=new n(e)},(axe=axe||{}).plugins={},g.prototype.run=function(){"use strict";return this._run.apply(this,arguments)},g.prototype.collect=function(){"use strict";return this._collect.apply(this,arguments)},g.prototype.cleanup=function(e){"use strict";var n=axe.utils.queue(),a=this;Object.keys(this._registry).forEach(function(t){n.defer(function(e){a._registry[t].cleanup(e)})}),n.then(function(){e()})},g.prototype.add=function(e){"use strict";this._registry[e.id]=e},axe.registerPlugin=function(e){"use strict";axe.plugins[e.id]=new g(e)};var y,v={};function k(){axe._tree=void 0,axe._selectorData=void 0}function w(n,a,r,i){"use strict";try{n=new d(n),axe._tree=n.flatTree,axe._selectorData=axe.utils.getSelectorData(n.flatTree)}catch(e){return k(),i(e)}var e=axe.utils.queue(),o=axe._audit;a.performanceTimer&&axe.utils.performanceTimer.auditStart(),n.frames.length&&!1!==a.iframes&&e.defer(function(e,t){axe.utils.collectResultsFromFrames(n,a,"rules",null,e,t)});var l=void 0;e.defer(function(e,t){a.restoreScroll&&(l=axe.utils.getScrollState()),o.run(n,a,e,t)}),e.then(function(e){try{l&&axe.utils.setScrollState(l),a.performanceTimer&&axe.utils.performanceTimer.auditEnd();var t=axe.utils.mergeResults(e.map(function(e){return{results:e}}));n.initiator&&((t=o.after(t,a)).forEach(axe.utils.publishMetaData),t=t.map(axe.utils.finalizeRuleResult));try{r(t,k)}catch(e){k(),axe.log(e)}}catch(e){k(),i(e)}}).catch(function(e){k(),i(e)})}axe.getReporter=function(e){"use strict";return"string"==typeof e&&v[e]?v[e]:"function"==typeof e?e:y},axe.addReporter=function(e,t,n){"use strict";v[e]=t,n&&(y=t)},axe.reset=function(){"use strict";var e=axe._audit;if(!e)throw new Error("No audit configured");e.resetRulesAndChecks()},axe._runRules=w;f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var x=function(){};function z(e,t,n){"use strict";var a=new TypeError("axe.run arguments are invalid");if(!function(e){switch(!0){case"string"==typeof e:case Array.isArray(e):case Node&&e instanceof Node:case NodeList&&e instanceof NodeList:return!0;case"object"!==(void 0===e?"undefined":f(e)):return!1;case void 0!==e.include:case void 0!==e.exclude:case"number"==typeof e.length:return!0;default:return!1}}(e)){if(void 0!==n)throw a;n=t,t=e,e=document}if("object"!==(void 0===t?"undefined":f(t))){if(void 0!==n)throw a;n=t,t={}}if("function"!=typeof n&&void 0!==n)throw a;return{context:e,options:t,callback:n||x}}axe.run=function(e,r,i){"use strict";if(!axe._audit)throw new Error("No audit configured");var t=z(e,r,i);e=t.context,r=t.options,i=t.callback,r.reporter=r.reporter||axe._audit.reporter||"v1",r.performanceTimer&&axe.utils.performanceTimer.start();var n=void 0,o=x,l=x;return window.Promise&&i===x&&(n=new Promise(function(e,t){o=t,l=e})),axe._runRules(e,r,function(e,t){var n=function(e){t();try{i(null,e)}catch(e){axe.log(e)}l(e)};r.performanceTimer&&axe.utils.performanceTimer.end();try{var a=axe.getReporter(r.reporter)(e,r,n);void 0!==a&&n(a)}catch(e){t(),i(e),o(e)}},function(e){i(e),o(e)}),n},o.failureSummary=function(e){"use strict";var n={};return n.none=e.none.concat(e.all),n.any=e.any,Object.keys(n).map(function(e){if(n[e].length){var t=axe._audit.data.failureSummaries[e];return t&&"function"==typeof t.failureMessage?t.failureMessage(n[e].map(function(e){return e.message||""})):void 0}}).filter(function(e){return void 0!==e}).join("\n\n")},o.incompleteFallbackMessage=function(){"use strict";return axe._audit.data.incompleteFallbackMessage()};f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var j=axe.constants.resultGroups;o.processAggregate=function(e,n){var t=axe.utils.aggregateResult(e);return t.timestamp=(new Date).toISOString(),t.url=window.location.href,j.forEach(function(e){n.resultTypes&&!n.resultTypes.includes(e)&&(t[e]||[]).forEach(function(e){Array.isArray(e.nodes)&&0<e.nodes.length&&(e.nodes=[e.nodes[0]])}),t[e]=(t[e]||[]).map(function(t){return t=Object.assign({},t),Array.isArray(t.nodes)&&0<t.nodes.length&&(t.nodes=t.nodes.map(function(e){return"object"===f(e.node)&&(e.html=e.node.source,n.elementRef&&!e.node.fromFrame&&(e.element=e.node.element),(!1!==n.selectors||e.node.fromFrame)&&(e.target=e.node.selector),n.xpath&&(e.xpath=e.node.xpath)),delete e.result,delete e.node,function(t,n){"use strict";["any","all","none"].forEach(function(e){Array.isArray(t[e])&&t[e].filter(function(e){return Array.isArray(e.relatedNodes)}).forEach(function(e){e.relatedNodes=e.relatedNodes.map(function(e){var t={html:e.source};return n.elementRef&&!e.fromFrame&&(t.element=e.element),(!1!==n.selectors||e.fromFrame)&&(t.target=e.selector),n.xpath&&(t.xpath=e.xpath),t})})})}(e,n),e})),j.forEach(function(e){return delete t[e]}),delete t.pageLevel,delete t.result,t})}),t},axe.addReporter("na",function(e,t,n){"use strict";"function"==typeof t&&(n=t,t={});var a=o.processAggregate(e,t);n({violations:a.violations,passes:a.passes,incomplete:a.incomplete,inapplicable:a.inapplicable,timestamp:a.timestamp,url:a.url})}),axe.addReporter("no-passes",function(e,t,n){"use strict";"function"==typeof t&&(n=t,t={}),t.resultTypes=["violations"];var a=o.processAggregate(e,t);n({violations:a.violations,timestamp:a.timestamp,url:a.url})}),axe.addReporter("raw",function(e,t,n){"use strict";"function"==typeof t&&(n=t,t={}),n(e)}),axe.addReporter("v1",function(e,t,n){"use strict";"function"==typeof t&&(n=t,t={});var a=o.processAggregate(e,t);a.violations.forEach(function(e){return e.nodes.forEach(function(e){e.failureSummary=o.failureSummary(e)})}),n({violations:a.violations,passes:a.passes,incomplete:a.incomplete,inapplicable:a.inapplicable,timestamp:a.timestamp,url:a.url})}),axe.addReporter("v2",function(e,t,n){"use strict";"function"==typeof t&&(n=t,t={});var a=o.processAggregate(e,t);n({violations:a.violations,passes:a.passes,incomplete:a.incomplete,inapplicable:a.inapplicable,timestamp:a.timestamp,url:a.url})},!0),axe.utils.aggregate=function(t,e,n){e=e.slice(),n&&e.push(n);var a=e.map(function(e){return t.indexOf(e)}).sort();return t[a.pop()]};var q=axe.constants,A=q.CANTTELL_PRIO,E=q.FAIL_PRIO,N=[];N[axe.constants.PASS_PRIO]=!0,N[axe.constants.CANTTELL_PRIO]=null,N[axe.constants.FAIL_PRIO]=!1;var T=["any","all","none"];function S(n,a){return T.reduce(function(e,t){return e[t]=(n[t]||[]).map(function(e){return a(e,t)}),e},{})}function C(e,t,n){var a=Object.assign({},t);a.nodes=(a[n]||[]).concat(),axe.constants.resultGroups.forEach(function(e){delete a[e]}),e[n].push(a)}axe.utils.aggregateChecks=function(e){var n=Object.assign({},e);S(n,function(e,t){var n=N.indexOf(e.result);e.priority=-1!==n?n:axe.constants.CANTTELL_PRIO,"none"===t&&(e.priority=4-e.priority)});var a={all:n.all.reduce(function(e,t){return Math.max(e,t.priority)},0),none:n.none.reduce(function(e,t){return Math.max(e,t.priority)},0),any:n.any.reduce(function(e,t){return Math.min(e,t.priority)},4)%4};n.priority=Math.max(a.all,a.none,a.any);var r=[];return T.forEach(function(t){n[t]=n[t].filter(function(e){return e.priority===n.priority&&e.priority===a[t]}),n[t].forEach(function(e){return r.push(e.impact)})}),[A,E].includes(n.priority)?n.impact=axe.utils.aggregate(axe.constants.impact,r):n.impact=null,S(n,function(e){delete e.result,delete e.priority}),n.result=axe.constants.results[n.priority],delete n.priority,n},axe.utils.aggregateNodeResults=function(e){var n={};if((e=e.map(function(e){if(e.any&&e.all&&e.none)return axe.utils.aggregateChecks(e);if(Array.isArray(e.node))return axe.utils.finalizeRuleResult(e);throw new TypeError("Invalid Result type")}))&&e.length){var t=e.map(function(e){return e.result});n.result=axe.utils.aggregate(axe.constants.results,t,n.result)}else n.result="inapplicable";axe.constants.resultGroups.forEach(function(e){return n[e]=[]}),e.forEach(function(e){var t=axe.constants.resultGroupMap[e.result];n[t].push(e)});var a=axe.constants.FAIL_GROUP;if(0===n[a].length&&(a=axe.constants.CANTTELL_GROUP),0<n[a].length){var r=n[a].map(function(e){return e.impact});n.impact=axe.utils.aggregate(axe.constants.impact,r)||null}else n.impact=null;return n},axe.utils.aggregateResult=function(e){var n={};return axe.constants.resultGroups.forEach(function(e){return n[e]=[]}),e.forEach(function(t){t.error?C(n,t,axe.constants.CANTTELL_GROUP):t.result===axe.constants.NA?C(n,t,axe.constants.NA_GROUP):axe.constants.resultGroups.forEach(function(e){Array.isArray(t[e])&&0<t[e].length&&C(n,t,e)})}),n},axe.utils.areStylesSet=function e(t,n,a){"use strict";var r=window.getComputedStyle(t,null),i=!1;return!!r&&(n.forEach(function(e){r.getPropertyValue(e.property)===e.value&&(i=!0)}),!!i||!(t.nodeName.toUpperCase()===a.toUpperCase()||!t.parentNode)&&e(t.parentNode,n,a))},axe.utils.checkHelper=function(t,n,a,r){"use strict";return{isAsync:!1,async:function(){return this.isAsync=!0,function(e){e instanceof Error==!1?(t.result=e,a(t)):r(e)}},data:function(e){t.data=e},relatedNodes:function(e){e=e instanceof Node?[e]:axe.utils.toArray(e),t.relatedNodes=e.map(function(e){return new axe.utils.DqElement(e,n)})}}};f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function R(e,t){"use strict";var n;return axe._tree&&(n=axe.utils.getSelector(t)),new Error(e+": "+(n||t))}function O(e,t,n){var a,r;this._fromFrame=!!n,this.spec=n||{},t&&t.absolutePaths&&(this._options={toRoot:!0}),axe._audit&&axe._audit.noHtml?this.source=null:void 0!==this.spec.source?this.source=this.spec.source:this.source=((r=(a=e).outerHTML)||"function"!=typeof XMLSerializer||(r=(new XMLSerializer).serializeToString(a)),function(e,t){if(t=t||300,e.length>t){var n=e.indexOf(">");e=e.substring(0,n+1)}return e}(r||"")),this._element=e}axe.utils.clone=function(e){"use strict";var t,n,a=e;if(null!==e&&"object"===(void 0===e?"undefined":f(e)))if(Array.isArray(e))for(a=[],t=0,n=e.length;t<n;t++)a[t]=axe.utils.clone(e[t]);else for(t in a={},e)a[t]=axe.utils.clone(e[t]);return a},axe.utils.sendCommandToFrame=function(t,n,a,r){"use strict";var i=t.contentWindow;if(!i)return axe.log("Frame does not have a content window",t),void a(null);var o=setTimeout(function(){o=setTimeout(function(){n.debug?r(R("No response from frame",t)):a(null)},0)},500);axe.utils.respondable(i,"axe.ping",null,void 0,function(){clearTimeout(o);var e=n.options&&n.options.frameWaitTime||6e4;o=setTimeout(function(){r(R("Axe in frame timed out",t))},e),axe.utils.respondable(i,"axe.start",n,void 0,function(e){clearTimeout(o),e instanceof Error==!1?a(e):r(e)})})},axe.utils.collectResultsFromFrames=function(e,t,n,i,a,r){"use strict";var o=axe.utils.queue();e.frames.forEach(function(a){var r={options:t,command:n,parameter:i,context:{initiator:!1,page:e.page,include:a.include||[],exclude:a.exclude||[]}};o.defer(function(t,e){var n=a.node;axe.utils.sendCommandToFrame(n,r,function(e){if(e)return t({results:e,frameElement:n,frame:axe.utils.getSelector(n)});t(null)},e)})}),o.then(function(e){a(axe.utils.mergeResults(e,t))}).catch(r)},axe.utils.contains=function(e,t){"use strict";return e.shadowId||t.shadowId?function t(e,n){return e.shadowId===n.shadowId||!!e.children.find(function(e){return t(e,n)})}(e,t):"function"==typeof e.actualNode.contains?e.actualNode.contains(t.actualNode):!!(16&e.actualNode.compareDocumentPosition(t.actualNode))},function(axe){function e(){this.pseudos={},this.attrEqualityMods={},this.ruleNestingOperators={},this.substitutesEnabled=!1}function i(e){return"a"<=e&&e<="f"||"A"<=e&&e<="F"||"0"<=e&&e<="9"}e.prototype.registerSelectorPseudos=function(e){for(var t=0,n=arguments.length;t<n;t++)e=arguments[t],this.pseudos[e]="selector";return this},e.prototype.unregisterSelectorPseudos=function(e){for(var t=0,n=arguments.length;t<n;t++)e=arguments[t],delete this.pseudos[e];return this},e.prototype.registerNumericPseudos=function(e){for(var t=0,n=arguments.length;t<n;t++)e=arguments[t],this.pseudos[e]="numeric";return this},e.prototype.unregisterNumericPseudos=function(e){for(var t=0,n=arguments.length;t<n;t++)e=arguments[t],delete this.pseudos[e];return this},e.prototype.registerNestingOperators=function(e){for(var t=0,n=arguments.length;t<n;t++)e=arguments[t],this.ruleNestingOperators[e]=!0;return this},e.prototype.unregisterNestingOperators=function(e){for(var t=0,n=arguments.length;t<n;t++)e=arguments[t],delete this.ruleNestingOperators[e];return this},e.prototype.registerAttrEqualityMods=function(e){for(var t=0,n=arguments.length;t<n;t++)e=arguments[t],this.attrEqualityMods[e]=!0;return this},e.prototype.unregisterAttrEqualityMods=function(e){for(var t=0,n=arguments.length;t<n;t++)e=arguments[t],delete this.attrEqualityMods[e];return this},e.prototype.enableSubstitutes=function(){return this.substitutesEnabled=!0,this},e.prototype.disableSubstitutes=function(){return this.substitutesEnabled=!1,this};var l={"!":!0,'"':!0,"#":!0,$:!0,"%":!0,"&":!0,"'":!0,"(":!0,")":!0,"*":!0,"+":!0,",":!0,".":!0,"/":!0,";":!0,"<":!0,"=":!0,">":!0,"?":!0,"@":!0,"[":!0,"\\":!0,"]":!0,"^":!0,"`":!0,"{":!0,"|":!0,"}":!0,"~":!0},o={"\n":"\\n","\r":"\\r","\t":"\\t","\f":"\\f","\v":"\\v"},y={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\","'":"'"},v={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\",'"':'"'};function t(s,u,c,d,r,m){var p,f,h,b,g;return b=s.length,p=null,h=function(e,t){var n,a,r;for(r="",u++,p=s.charAt(u);u<b;){if(p===e)return u++,r;if("\\"===p)if(u++,(p=s.charAt(u))===e)r+=e;else if(n=t[p])r+=n;else{if(i(p)){for(a=p,u++,p=s.charAt(u);i(p);)a+=p,u++,p=s.charAt(u);" "===p&&(u++,p=s.charAt(u)),r+=String.fromCharCode(parseInt(a,16));continue}r+=p}else r+=p;u++,p=s.charAt(u)}return r},f=function(){var e,t="";for(p=s.charAt(u);u<b;){if("a"<=(e=p)&&e<="z"||"A"<=e&&e<="Z"||"0"<=e&&e<="9"||"-"===e||"_"===e)t+=p;else{if("\\"!==p)return t;if(b<=++u)throw Error("Expected symbol but end of file reached.");if(p=s.charAt(u),l[p])t+=p;else{if(i(p)){var n=p;for(u++,p=s.charAt(u);i(p);)n+=p,u++,p=s.charAt(u);" "===p&&(u++,p=s.charAt(u)),t+=String.fromCharCode(parseInt(n,16));continue}t+=p}}u++,p=s.charAt(u)}return t},g=function(){p=s.charAt(u);for(var e=!1;" "===p||"\t"===p||"\n"===p||"\r"===p||"\f"===p;)e=!0,u++,p=s.charAt(u);return e},this.parse=function(){var e=this.parseSelector();if(u<b)throw Error('Rule expected but "'+s.charAt(u)+'" found.');return e},this.parseSelector=function(){var e,t=e=this.parseSingleSelector();for(p=s.charAt(u);","===p;){if(u++,g(),"selectors"!==e.type&&(e={type:"selectors",selectors:[t]}),!(t=this.parseSingleSelector()))throw Error('Rule expected after ",".');e.selectors.push(t)}return e},this.parseSingleSelector=function(){g();var e={type:"ruleSet"},t=this.parseRule();if(!t)return null;for(var n=e;t&&(t.type="rule",n.rule=t,n=t,g(),p=s.charAt(u),!(b<=u||","===p||")"===p));)if(r[p]){var a=p;if(u++,g(),!(t=this.parseRule()))throw Error('Rule expected after "'+a+'".');t.nestingOperator=a}else(t=this.parseRule())&&(t.nestingOperator=null);return e},this.parseRule=function(){for(var e,t=null;u<b;)if("*"===(p=s.charAt(u)))u++,(t=t||{}).tagName="*";else if("a"<=(e=p)&&e<="z"||"A"<=e&&e<="Z"||"-"===e||"_"===e||"\\"===p)(t=t||{}).tagName=f();else if("."===p)u++,((t=t||{}).classNames=t.classNames||[]).push(f());else if("#"===p)u++,(t=t||{}).id=f();else if("["===p){u++,g();var n={name:f()};if(g(),"]"===p)u++;else{var a="";if(d[p]&&(a=p,u++,p=s.charAt(u)),b<=u)throw Error('Expected "=" but end of file reached.');if("="!==p)throw Error('Expected "=" but "'+p+'" found.');n.operator=a+"=",u++,g();var r="";if(n.valueType="string",'"'===p)r=h('"',v);else if("'"===p)r=h("'",y);else if(m&&"$"===p)u++,r=f(),n.valueType="substitute";else{for(;u<b&&"]"!==p;)r+=p,u++,p=s.charAt(u);r=r.trim()}if(g(),b<=u)throw Error('Expected "]" but end of file reached.');if("]"!==p)throw Error('Expected "]" but "'+p+'" found.');u++,n.value=r}((t=t||{}).attrs=t.attrs||[]).push(n)}else{if(":"!==p)break;u++;var i=f(),o={name:i};if("("===p){u++;var l="";if(g(),"selector"===c[i])o.valueType="selector",l=this.parseSelector();else{if(o.valueType=c[i]||"string",'"'===p)l=h('"',v);else if("'"===p)l=h("'",y);else if(m&&"$"===p)u++,l=f(),o.valueType="substitute";else{for(;u<b&&")"!==p;)l+=p,u++,p=s.charAt(u);l=l.trim()}g()}if(b<=u)throw Error('Expected ")" but end of file reached.');if(")"!==p)throw Error('Expected ")" but "'+p+'" found.');u++,o.value=l}((t=t||{}).pseudos=t.pseudos||[]).push(o)}return t},this}e.prototype.parse=function(e){return new t(e,0,this.pseudos,this.attrEqualityMods,this.ruleNestingOperators,this.substitutesEnabled).parse()},e.prototype.escapeIdentifier=function(e){for(var t="",n=0,a=e.length;n<a;){var r=e.charAt(n);if(l[r])t+="\\"+r;else if("_"===r||"-"===r||"A"<=r&&r<="Z"||"a"<=r&&r<="z"||0!==n&&"0"<=r&&r<="9")t+=r;else{var i=r.charCodeAt(0);if(55296==(63488&i)){var o=e.charCodeAt(n++);if(55296!=(64512&i)||56320!=(64512&o))throw Error("UCS-2(decode): illegal sequence");i=((1023&i)<<10)+(1023&o)+65536}t+="\\"+i.toString(16)+" "}n++}return t},e.prototype.escapeStr=function(e){for(var t,n,a="",r=0,i=e.length;r<i;)'"'===(t=e.charAt(r))?t='\\"':"\\"===t?t="\\\\":(n=o[t])&&(t=n),a+=t,r++;return'"'+a+'"'},e.prototype.render=function(e){return this._renderEntity(e).trim()},e.prototype._renderEntity=function(e){var t,n,a;switch(a="",e.type){case"ruleSet":for(t=e.rule,n=[];t;)t.nestingOperator&&n.push(t.nestingOperator),n.push(this._renderEntity(t)),t=t.rule;a=n.join(" ");break;case"selectors":a=e.selectors.map(this._renderEntity,this).join(", ");break;case"rule":e.tagName&&(a="*"===e.tagName?"*":this.escapeIdentifier(e.tagName)),e.id&&(a+="#"+this.escapeIdentifier(e.id)),e.classNames&&(a+=e.classNames.map(function(e){return"."+this.escapeIdentifier(e)},this).join("")),e.attrs&&(a+=e.attrs.map(function(e){return e.operator?"substitute"===e.valueType?"["+this.escapeIdentifier(e.name)+e.operator+"$"+e.value+"]":"["+this.escapeIdentifier(e.name)+e.operator+this.escapeStr(e.value)+"]":"["+this.escapeIdentifier(e.name)+"]"},this).join("")),e.pseudos&&(a+=e.pseudos.map(function(e){return e.valueType?"selector"===e.valueType?":"+this.escapeIdentifier(e.name)+"("+this._renderEntity(e.value)+")":"substitute"===e.valueType?":"+this.escapeIdentifier(e.name)+"($"+e.value+")":"numeric"===e.valueType?":"+this.escapeIdentifier(e.name)+"("+e.value+")":":"+this.escapeIdentifier(e.name)+"("+this.escapeIdentifier(e.value)+")":":"+this.escapeIdentifier(e.name)},this).join(""));break;default:throw Error('Unknown entity type: "'+e.type(NaN))}return a};var n=new e;n.registerNestingOperators(">"),axe.utils.cssParser=n}(axe),O.prototype={get selector(){return this.spec.selector||[axe.utils.getSelector(this.element,this._options)]},get xpath(){return this.spec.xpath||[axe.utils.getXpath(this.element)]},get element(){return this._element},get fromFrame(){return this._fromFrame},toJSON:function(){"use strict";return{selector:this.selector,source:this.source,xpath:this.xpath}}},O.fromFrame=function(e,t,n){return e.selector.unshift(n.selector),e.xpath.unshift(n.xpath),new axe.utils.DqElement(n.element,t,e)},axe.utils.DqElement=O,axe.utils.matchesSelector=function(){"use strict";var n;return function(e,t){return n&&e[n]||(n=function(e){var t,n,a=e.Element.prototype,r=["matches","matchesSelector","mozMatchesSelector","webkitMatchesSelector","msMatchesSelector"],i=r.length;for(t=0;t<i;t++)if(a[n=r[t]])return n}(e.ownerDocument.defaultView)),e[n](t)}}(),axe.utils.escapeSelector=function(e){"use strict";for(var t,n=String(e),a=n.length,r=-1,i="",o=n.charCodeAt(0);++r<a;)0!=(t=n.charCodeAt(r))?i+=1<=t&&t<=31||127==t||0==r&&48<=t&&t<=57||1==r&&48<=t&&t<=57&&45==o?"\\"+t.toString(16)+" ":(0!=r||1!=a||45!=t)&&(128<=t||45==t||95==t||48<=t&&t<=57||65<=t&&t<=90||97<=t&&t<=122)?n.charAt(r):"\\"+n.charAt(r):i+="�";return i},axe.utils.extendMetaData=function(t,n){Object.assign(t,n),Object.keys(n).filter(function(e){return"function"==typeof n[e]}).forEach(function(e){t[e]=null;try{t[e]=n[e](t)}catch(e){}})},axe.utils.finalizeRuleResult=function(e){return Object.assign(e,axe.utils.aggregateNodeResults(e.nodes)),delete e.nodes,e};var axe;f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function F(e,t){return{shadowId:t,children:[],actualNode:e}}axe.utils.findBy=function(e,t,n){if(Array.isArray(e))return e.find(function(e){return"object"===(void 0===e?"undefined":f(e))&&e[t]===n})},(axe=axe||{utils:{}}).utils.getFlattenedTree=function(e,a){var t,n,r;function i(e,t){var n=axe.utils.getFlattenedTree(t,a);return n&&(e=e.concat(n)),e}if(e.documentElement&&(e=e.documentElement),r=e.nodeName.toLowerCase(),axe.utils.isShadowRoot(e))return t=F(e,a),a="a"+Math.random().toString().substring(2),n=Array.from(e.shadowRoot.childNodes),t.children=n.reduce(i,[]),[t];if("content"===r)return(n=Array.from(e.getDistributedNodes())).reduce(i,[]);if("slot"!==r)return 1===e.nodeType?(t=F(e,a),n=Array.from(e.childNodes),t.children=n.reduce(i,[]),[t]):3===e.nodeType?[F(e)]:void 0;(n=Array.from(e.assignedNodes())).length||(n=function(e){var t=[];for(e=e.firstChild;e;)t.push(e),e=e.nextSibling;return t}(e));window.getComputedStyle(e);return n.reduce(i,[])},axe.utils.getNodeFromTree=function(e,n){var a;return e.actualNode===n?e:(e.children.forEach(function(e){var t;e.actualNode===n?a=e:(t=axe.utils.getNodeFromTree(e,n))&&(a=t)}),a)},axe.utils.getAllChecks=function(e){"use strict";return[].concat(e.any||[]).concat(e.all||[]).concat(e.none||[])},axe.utils.getCheckOption=function(e,t,n){var a=((n.rules&&n.rules[t]||{}).checks||{})[e.id],r=(n.checks||{})[e.id],i=e.enabled,o=e.options;return r&&(r.hasOwnProperty("enabled")&&(i=r.enabled),r.hasOwnProperty("options")&&(o=r.options)),a&&(a.hasOwnProperty("enabled")&&(i=a.enabled),a.hasOwnProperty("options")&&(o=a.options)),{enabled:i,options:o,absolutePaths:n.absolutePaths}};var I=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(a=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{!a&&l.return&&l.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function L(e,t){return[e.substring(0,t),e.substring(t)]}function P(e){return e.replace(/\s+$/,"")}axe.utils.getFriendlyUriEnd=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!(e.length<=1||"data:"===e.substr(0,5)||"javascript:"===e.substr(0,11)||e.includes("?"))){var n=t.currentDomain,a=t.maxLength,r=void 0===a?25:a,i=function(e){var t=e,n="",a="",r="",i="",o="";if(e.includes("#")){var l=L(e,e.indexOf("#")),s=I(l,2);e=s[0],o=s[1]}if(e.includes("?")){var u=L(e,e.indexOf("?")),c=I(u,2);e=c[0],i=c[1]}if(e.includes("://")){var d=e.split("://"),m=I(d,2);n=m[0];var p=L(e=m[1],e.indexOf("/")),f=I(p,2);a=f[0],e=f[1]}else if("//"===e.substr(0,2)){var h=L(e=e.substr(2),e.indexOf("/")),b=I(h,2);a=b[0],e=b[1]}if("www."===a.substr(0,4)&&(a=a.substr(4)),a&&a.includes(":")){var g=L(a,a.indexOf(":")),y=I(g,2);a=y[0],r=y[1]}return{original:t,protocol:n,domain:a,port:r,path:e,query:i,hash:o}}(e),o=i.path,l=i.domain,s=i.hash,u=o.substr(o.substr(0,o.length-2).lastIndexOf("/")+1);if(s)return u&&(u+s).length<=r?P(u+s):u.length<2&&2<s.length&&s.length<=r?P(s):void 0;if(l&&l.length<r&&o.length<=1)return P(l+o);if(o==="/"+u&&l&&n&&l!==n&&(l+o).length<=r)return P(l+o);var c=u.lastIndexOf(".");return(-1===c||1<c)&&(-1!==c||2<u.length)&&u.length<=r&&!u.match(/index(\.[a-zA-Z]{2-4})?/)&&!function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return 0!==e.length&&(e.match(/[0-9]/g)||"").length>=e.length/2}(u)?P(u):void 0}};var V,_=axe.utils.escapeSelector,U=void 0,D=["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"],M=31;function H(e,t){var n=t.name,a=void 0;if(-1!==n.indexOf("href")||-1!==n.indexOf("src")){var r=axe.utils.getFriendlyUriEnd(e.getAttribute(n));if(r){var i=encodeURI(r);if(!i)return;a=_(t.name)+'$="'+i+'"'}else a=_(t.name)+'="'+e.getAttribute(n)+'"'}else a=_(n)+'="'+_(t.value)+'"';return a}function B(e,t){return e.count<t.count?-1:e.count===t.count?0:1}function G(e){return!D.includes(e.name)&&-1===e.name.indexOf(":")&&(!e.value||e.value.length<M)}function W(t,n){var e=t.parentNode&&Array.from(t.parentNode.children||"")||[];return e.find(function(e){return e!==t&&axe.utils.matchesSelector(e,n)})?":nth-child("+(1+e.indexOf(t))+")":""}function $(e){if(e.getAttribute("id")){var t=e.getRootNode&&e.getRootNode()||document,n="#"+_(e.getAttribute("id")||"");return n.match(/player_uid_/)||1!==t.querySelectorAll(n).length?void 0:n}}function X(e){return void 0===U&&(U=axe.utils.isXHTML(document)),_(U?e.localName:e.nodeName.toLowerCase())}function Y(e,t){var n,a,r,i,o,l,s,u,c,d,m="",p=void 0,f=(n=e,r=[],i=(a=t).classes,o=a.tags,n.classList&&Array.from(n.classList).forEach(function(e){var t=_(e);i[t]<o[n.nodeName]&&r.push({name:t,count:i[t],species:"class"})}),r.sort(B)),h=(l=e,u=[],c=(s=t).attributes,d=s.tags,l.attributes&&Array.from(l.attributes).filter(G).forEach(function(e){var t=H(l,e);t&&c[t]<d[l.nodeName]&&u.push({name:t,count:c[t],species:"attribute"})}),u.sort(B));return f.length&&1===f[0].count?p=[f[0]]:h.length&&1===h[0].count?(p=[h[0]],m=X(e)):((p=f.concat(h)).sort(B),(p=p.slice(0,3)).some(function(e){return"class"===e.species})?p.sort(function(e,t){return e.species!==t.species&&"class"===e.species?-1:e.species===t.species?0:1}):m=X(e)),m+p.reduce(function(e,t){switch(t.species){case"class":return e+"."+t.name;case"attribute":return e+"["+t.name+"]"}return e},"")}function J(e,t,n){if(!axe._selectorData)throw new Error("Expect axe._selectorData to be set up");var a=t.toRoot,r=void 0!==a&&a,i=void 0,o=void 0;do{var l=$(e);l||(l=Y(e,axe._selectorData),l+=W(e,l)),i=i?l+" > "+i:l,o=o?o.filter(function(e){return axe.utils.matchesSelector(e,i)}):Array.from(n.querySelectorAll(i)),e=e.parentElement}while((1<o.length||r)&&e&&11!==e.nodeType);return 1===o.length?i:-1!==i.indexOf(" > ")?":root"+i.substring(i.indexOf(" > ")):":root"}axe.utils.getSelectorData=function(e){for(var a={classes:{},tags:{},attributes:{}},r=(e=Array.isArray(e)?e:[e]).slice(),i=[],t=function(){var e=r.pop(),n=e.actualNode;if(n.querySelectorAll){var t=n.nodeName;a.tags[t]?a.tags[t]++:a.tags[t]=1,n.classList&&Array.from(n.classList).forEach(function(e){var t=_(e);a.classes[t]?a.classes[t]++:a.classes[t]=1}),n.attributes&&Array.from(n.attributes).filter(G).forEach(function(e){var t=H(n,e);t&&(a.attributes[t]?a.attributes[t]++:a.attributes[t]=1)})}for(e.children.length&&(i.push(r),r=e.children.slice());!r.length&&i.length;)r=i.pop()};r.length;)t();return a},axe.utils.getSelector=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!e)return"";var n=e.getRootNode&&e.getRootNode()||document;if(11!==n.nodeType)return J(e,t,n);for(var a=[];11===n.nodeType;)a.push({elm:e,doc:n}),n=(e=n.host).getRootNode();return a.push({elm:e,doc:n}),a.reverse().map(function(e){return J(e.elm,t,e.doc)})},axe.utils.getXpath=function(e){var t=function e(t,n){var a,r;if(!t)return[];if(!n&&9===t.nodeType)return n=[{str:"html"}];if(n=n||[],t.parentNode&&t.parentNode!==t&&(n=e(t.parentNode,n)),t.previousSibling){for(r=1,a=t.previousSibling;1===a.nodeType&&a.nodeName===t.nodeName&&r++,a=a.previousSibling;);1===r&&(r=null)}else if(t.nextSibling)for(a=t.nextSibling;a=1===a.nodeType&&a.nodeName===t.nodeName?(r=1,null):(r=null,a.previousSibling););if(1===t.nodeType){var i={};i.str=t.nodeName.toLowerCase();var o=t.getAttribute&&axe.utils.escapeSelector(t.getAttribute("id"));o&&1===t.ownerDocument.querySelectorAll("#"+o).length&&(i.id=t.getAttribute("id")),1<r&&(i.count=r),n.push(i)}return n}(e);return t.reduce(function(e,t){return t.id?"/"+t.str+"[@id='"+t.id+"']":e+"/"+t.str+(0<t.count?"["+t.count+"]":"")},"")},axe.utils.injectStyle=function(e){"use strict";if(V&&V.parentNode)return void 0===V.styleSheet?V.appendChild(document.createTextNode(e)):V.styleSheet.cssText+=e,V;if(e){var t=document.head||document.getElementsByTagName("head")[0];return(V=document.createElement("style")).type="text/css",void 0===V.styleSheet?V.appendChild(document.createTextNode(e)):V.styleSheet.cssText=e,t.appendChild(V),V}},axe.utils.isHidden=function(e,t){"use strict";var n;if(9===e.nodeType)return!1;11===e.nodeType&&(e=e.host);var a=window.getComputedStyle(e,null);return!a||!e.parentNode||"none"===a.getPropertyValue("display")||!t&&"hidden"===a.getPropertyValue("visibility")||"true"===e.getAttribute("aria-hidden")||(n=e.assignedSlot?e.assignedSlot:e.parentNode,axe.utils.isHidden(n,!0))};var K,Z,Q,ee,te=["article","aside","blockquote","body","div","footer","h1","h2","h3","h4","h5","h6","header","main","nav","p","section","span"];axe.utils.isShadowRoot=function(e){var t=e.nodeName.toLowerCase();return!(!e.shadowRoot||!/^[a-z][a-z0-9_.-]*-[a-z0-9_.-]*$/.test(t)&&!te.includes(t))},axe.utils.isXHTML=function(e){"use strict";return!!e.createElement&&"A"===e.createElement("A").localName},axe.utils.mergeResults=function(e,s){"use strict";var u=[];return e.forEach(function(l){var e,t=(e=l)&&e.results?Array.isArray(e.results)?e.results.length?e.results:null:[e.results]:null;t&&t.length&&t.forEach(function(e){var t,n,a,r,i;e.nodes&&l.frame&&(t=e.nodes,n=s,a=l.frameElement,r=l.frame,i={element:a,selector:r,xpath:axe.utils.getXpath(a)},t.forEach(function(e){e.node=axe.utils.DqElement.fromFrame(e.node,n,i);var t=axe.utils.getAllChecks(e);t.length&&t.forEach(function(e){e.relatedNodes=e.relatedNodes.map(function(e){return axe.utils.DqElement.fromFrame(e,n,i)})})}));var o=axe.utils.findBy(u,"id",e.id);o?e.nodes.length&&function(e,t){for(var n,a,r=t[0].node,i=0,o=e.length;i<o;i++)if(a=e[i].node,0<(n=axe.utils.nodeSorter({actualNode:a.element},{actualNode:r.element}))||0===n&&r.selector.length<a.selector.length)return e.splice.apply(e,[i,0].concat(t));e.push.apply(e,t)}(o.nodes,e.nodes):u.push(e)})}),u},axe.utils.nodeSorter=function(e,t){"use strict";return e.actualNode===t.actualNode?0:4&e.actualNode.compareDocumentPosition(t.actualNode)?-1:1},utils.performanceTimer=function(){"use strict";function e(){if(window.performance&&window.performance)return window.performance.now()}var t=null,n=e();return{start:function(){this.mark("mark_axe_start")},end:function(){this.mark("mark_axe_end"),this.measure("axe","mark_axe_start","mark_axe_end"),this.logMeasures("axe")},auditStart:function(){this.mark("mark_audit_start")},auditEnd:function(){this.mark("mark_audit_end"),this.measure("audit_start_to_end","mark_audit_start","mark_audit_end"),this.logMeasures()},mark:function(e){window.performance&&void 0!==window.performance.mark&&window.performance.mark(e)},measure:function(e,t,n){window.performance&&void 0!==window.performance.measure&&window.performance.measure(e,t,n)},logMeasures:function(e){function t(e){axe.log("Measure "+e.name+" took "+e.duration+"ms")}if(window.performance&&void 0!==window.performance.getEntriesByType)for(var n=window.performance.getEntriesByType("measure"),a=0;a<n.length;++a){var r=n[a];if(r.name===e)return void t(r);t(r)}},timeElapsed:function(){return e()-n},reset:function(){t||(t=e()),n=e()}}}(),"function"!=typeof Object.assign&&(Object.assign=function(e){"use strict";if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var a=arguments[n];if(null!=a)for(var r in a)a.hasOwnProperty(r)&&(t[r]=a[r])}return t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),a=n.length>>>0,r=arguments[1],i=0;i<a;i++)if(t=n[i],e.call(r,t,i,n))return t}}),axe.utils.pollyfillElementsFromPoint=function(){if(document.elementsFromPoint)return document.elementsFromPoint;if(document.msElementsFromPoint)return document.msElementsFromPoint;var e,t=((e=document.createElement("x")).style.cssText="pointer-events:auto","auto"===e.style.pointerEvents),l=t?"pointer-events":"visibility",s=t?"none":"hidden",u=document.createElement("style");return u.innerHTML=t?"* { pointer-events: all }":"* { visibility: visible }",function(e,t){var n,a,r,i=[],o=[];for(document.head.appendChild(u);(n=document.elementFromPoint(e,t))&&-1===i.indexOf(n);)i.push(n),o.push({value:n.style.getPropertyValue(l),priority:n.style.getPropertyPriority(l)}),n.style.setProperty(l,s,"important");for(i.indexOf(document.documentElement)<i.length-1&&(i.splice(i.indexOf(document.documentElement),1),i.push(document.documentElement)),a=o.length;r=o[--a];)i[a].style.setProperty(l,r.value?r.value:"",r.priority);return document.head.removeChild(u),i}},"function"==typeof window.addEventListener&&(document.elementsFromPoint=axe.utils.pollyfillElementsFromPoint()),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e){"use strict";var t=Object(this),n=parseInt(t.length,10)||0;if(0===n)return!1;