axe.js 871 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776
  1. /*! axe v4.2.2
  2. * Copyright (c) 2021 Deque Systems, Inc.
  3. *
  4. * Your use of this Source Code Form is subject to the terms of the Mozilla Public
  5. * License, v. 2.0. If a copy of the MPL was not distributed with this
  6. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  7. *
  8. * This entire copyright notice must appear in every copy of this file you
  9. * distribute or in any file that contains substantial portions of this source
  10. * code.
  11. */
  12. (function axeFunction(window) {
  13. var global = window;
  14. var document = window.document;
  15. 'use strict';
  16. function _typeof(obj) {
  17. '@babel/helpers - typeof';
  18. if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
  19. _typeof = function _typeof(obj) {
  20. return typeof obj;
  21. };
  22. } else {
  23. _typeof = function _typeof(obj) {
  24. return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
  25. };
  26. }
  27. return _typeof(obj);
  28. }
  29. var axe = axe || {};
  30. axe.version = '4.2.2';
  31. if (typeof define === 'function' && define.amd) {
  32. define('axe-core', [], function() {
  33. return axe;
  34. });
  35. }
  36. if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object' && module.exports && typeof axeFunction.toString === 'function') {
  37. axe.source = '(' + axeFunction.toString() + ')(typeof window === "object" ? window : this);';
  38. module.exports = axe;
  39. }
  40. if (typeof window.getComputedStyle === 'function') {
  41. window.axe = axe;
  42. }
  43. var commons;
  44. function SupportError(error) {
  45. this.name = 'SupportError';
  46. this.cause = error.cause;
  47. this.message = '`'.concat(error.cause, '` - feature unsupported in your environment.');
  48. if (error.ruleId) {
  49. this.ruleId = error.ruleId;
  50. this.message += ' Skipping '.concat(this.ruleId, ' rule.');
  51. }
  52. this.stack = new Error().stack;
  53. }
  54. SupportError.prototype = Object.create(Error.prototype);
  55. SupportError.prototype.constructor = SupportError;
  56. 'use strict';
  57. function _objectWithoutProperties(source, excluded) {
  58. if (source == null) {
  59. return {};
  60. }
  61. var target = _objectWithoutPropertiesLoose(source, excluded);
  62. var key, i;
  63. if (Object.getOwnPropertySymbols) {
  64. var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
  65. for (i = 0; i < sourceSymbolKeys.length; i++) {
  66. key = sourceSymbolKeys[i];
  67. if (excluded.indexOf(key) >= 0) {
  68. continue;
  69. }
  70. if (!Object.prototype.propertyIsEnumerable.call(source, key)) {
  71. continue;
  72. }
  73. target[key] = source[key];
  74. }
  75. }
  76. return target;
  77. }
  78. function _objectWithoutPropertiesLoose(source, excluded) {
  79. if (source == null) {
  80. return {};
  81. }
  82. var target = {};
  83. var sourceKeys = Object.keys(source);
  84. var key, i;
  85. for (i = 0; i < sourceKeys.length; i++) {
  86. key = sourceKeys[i];
  87. if (excluded.indexOf(key) >= 0) {
  88. continue;
  89. }
  90. target[key] = source[key];
  91. }
  92. return target;
  93. }
  94. function _defineProperty(obj, key, value) {
  95. if (key in obj) {
  96. Object.defineProperty(obj, key, {
  97. value: value,
  98. enumerable: true,
  99. configurable: true,
  100. writable: true
  101. });
  102. } else {
  103. obj[key] = value;
  104. }
  105. return obj;
  106. }
  107. function _inherits(subClass, superClass) {
  108. if (typeof superClass !== 'function' && superClass !== null) {
  109. throw new TypeError('Super expression must either be null or a function');
  110. }
  111. subClass.prototype = Object.create(superClass && superClass.prototype, {
  112. constructor: {
  113. value: subClass,
  114. writable: true,
  115. configurable: true
  116. }
  117. });
  118. if (superClass) {
  119. _setPrototypeOf(subClass, superClass);
  120. }
  121. }
  122. function _setPrototypeOf(o, p) {
  123. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  124. o.__proto__ = p;
  125. return o;
  126. };
  127. return _setPrototypeOf(o, p);
  128. }
  129. function _createSuper(Derived) {
  130. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  131. return function _createSuperInternal() {
  132. var Super = _getPrototypeOf(Derived), result;
  133. if (hasNativeReflectConstruct) {
  134. var NewTarget = _getPrototypeOf(this).constructor;
  135. result = Reflect.construct(Super, arguments, NewTarget);
  136. } else {
  137. result = Super.apply(this, arguments);
  138. }
  139. return _possibleConstructorReturn(this, result);
  140. };
  141. }
  142. function _possibleConstructorReturn(self, call) {
  143. if (call && (_typeof(call) === 'object' || typeof call === 'function')) {
  144. return call;
  145. }
  146. return _assertThisInitialized(self);
  147. }
  148. function _assertThisInitialized(self) {
  149. if (self === void 0) {
  150. throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');
  151. }
  152. return self;
  153. }
  154. function _isNativeReflectConstruct() {
  155. if (typeof Reflect === 'undefined' || !Reflect.construct) {
  156. return false;
  157. }
  158. if (Reflect.construct.sham) {
  159. return false;
  160. }
  161. if (typeof Proxy === 'function') {
  162. return true;
  163. }
  164. try {
  165. Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));
  166. return true;
  167. } catch (e) {
  168. return false;
  169. }
  170. }
  171. function _getPrototypeOf(o) {
  172. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  173. return o.__proto__ || Object.getPrototypeOf(o);
  174. };
  175. return _getPrototypeOf(o);
  176. }
  177. function _toConsumableArray(arr) {
  178. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  179. }
  180. function _nonIterableSpread() {
  181. throw new TypeError('Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
  182. }
  183. function _iterableToArray(iter) {
  184. if (typeof Symbol !== 'undefined' && Symbol.iterator in Object(iter)) {
  185. return Array.from(iter);
  186. }
  187. }
  188. function _arrayWithoutHoles(arr) {
  189. if (Array.isArray(arr)) {
  190. return _arrayLikeToArray(arr);
  191. }
  192. }
  193. function _slicedToArray(arr, i) {
  194. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
  195. }
  196. function _nonIterableRest() {
  197. throw new TypeError('Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
  198. }
  199. function _iterableToArrayLimit(arr, i) {
  200. if (typeof Symbol === 'undefined' || !(Symbol.iterator in Object(arr))) {
  201. return;
  202. }
  203. var _arr = [];
  204. var _n = true;
  205. var _d = false;
  206. var _e = undefined;
  207. try {
  208. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  209. _arr.push(_s.value);
  210. if (i && _arr.length === i) {
  211. break;
  212. }
  213. }
  214. } catch (err) {
  215. _d = true;
  216. _e = err;
  217. } finally {
  218. try {
  219. if (!_n && _i['return'] != null) {
  220. _i['return']();
  221. }
  222. } finally {
  223. if (_d) {
  224. throw _e;
  225. }
  226. }
  227. }
  228. return _arr;
  229. }
  230. function _arrayWithHoles(arr) {
  231. if (Array.isArray(arr)) {
  232. return arr;
  233. }
  234. }
  235. function _extends() {
  236. _extends = Object.assign || function(target) {
  237. for (var i = 1; i < arguments.length; i++) {
  238. var source = arguments[i];
  239. for (var key in source) {
  240. if (Object.prototype.hasOwnProperty.call(source, key)) {
  241. target[key] = source[key];
  242. }
  243. }
  244. }
  245. return target;
  246. };
  247. return _extends.apply(this, arguments);
  248. }
  249. function _classCallCheck(instance, Constructor) {
  250. if (!(instance instanceof Constructor)) {
  251. throw new TypeError('Cannot call a class as a function');
  252. }
  253. }
  254. function _defineProperties(target, props) {
  255. for (var i = 0; i < props.length; i++) {
  256. var descriptor = props[i];
  257. descriptor.enumerable = descriptor.enumerable || false;
  258. descriptor.configurable = true;
  259. if ('value' in descriptor) {
  260. descriptor.writable = true;
  261. }
  262. Object.defineProperty(target, descriptor.key, descriptor);
  263. }
  264. }
  265. function _createClass(Constructor, protoProps, staticProps) {
  266. if (protoProps) {
  267. _defineProperties(Constructor.prototype, protoProps);
  268. }
  269. if (staticProps) {
  270. _defineProperties(Constructor, staticProps);
  271. }
  272. return Constructor;
  273. }
  274. function _createForOfIteratorHelper(o, allowArrayLike) {
  275. var it;
  276. if (typeof Symbol === 'undefined' || o[Symbol.iterator] == null) {
  277. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === 'number') {
  278. if (it) {
  279. o = it;
  280. }
  281. var i = 0;
  282. var F = function F() {};
  283. return {
  284. s: F,
  285. n: function n() {
  286. if (i >= o.length) {
  287. return {
  288. done: true
  289. };
  290. }
  291. return {
  292. done: false,
  293. value: o[i++]
  294. };
  295. },
  296. e: function e(_e2) {
  297. throw _e2;
  298. },
  299. f: F
  300. };
  301. }
  302. throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
  303. }
  304. var normalCompletion = true, didErr = false, err;
  305. return {
  306. s: function s() {
  307. it = o[Symbol.iterator]();
  308. },
  309. n: function n() {
  310. var step = it.next();
  311. normalCompletion = step.done;
  312. return step;
  313. },
  314. e: function e(_e3) {
  315. didErr = true;
  316. err = _e3;
  317. },
  318. f: function f() {
  319. try {
  320. if (!normalCompletion && it['return'] != null) {
  321. it['return']();
  322. }
  323. } finally {
  324. if (didErr) {
  325. throw err;
  326. }
  327. }
  328. }
  329. };
  330. }
  331. function _unsupportedIterableToArray(o, minLen) {
  332. if (!o) {
  333. return;
  334. }
  335. if (typeof o === 'string') {
  336. return _arrayLikeToArray(o, minLen);
  337. }
  338. var n = Object.prototype.toString.call(o).slice(8, -1);
  339. if (n === 'Object' && o.constructor) {
  340. n = o.constructor.name;
  341. }
  342. if (n === 'Map' || n === 'Set') {
  343. return Array.from(o);
  344. }
  345. if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) {
  346. return _arrayLikeToArray(o, minLen);
  347. }
  348. }
  349. function _arrayLikeToArray(arr, len) {
  350. if (len == null || len > arr.length) {
  351. len = arr.length;
  352. }
  353. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  354. arr2[i] = arr[i];
  355. }
  356. return arr2;
  357. }
  358. function _typeof(obj) {
  359. '@babel/helpers - typeof';
  360. if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
  361. _typeof = function _typeof(obj) {
  362. return typeof obj;
  363. };
  364. } else {
  365. _typeof = function _typeof(obj) {
  366. return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj;
  367. };
  368. }
  369. return _typeof(obj);
  370. }
  371. (function() {
  372. var __create = Object.create;
  373. var __defProp = Object.defineProperty;
  374. var __getProtoOf = Object.getPrototypeOf;
  375. var __hasOwnProp = Object.prototype.hasOwnProperty;
  376. var __getOwnPropNames = Object.getOwnPropertyNames;
  377. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  378. var __markAsModule = function __markAsModule(target) {
  379. return __defProp(target, '__esModule', {
  380. value: true
  381. });
  382. };
  383. var __commonJS = function __commonJS(callback, module) {
  384. return function() {
  385. if (!module) {
  386. module = {
  387. exports: {}
  388. };
  389. callback(module.exports, module);
  390. }
  391. return module.exports;
  392. };
  393. };
  394. var __export = function __export(target, all) {
  395. __markAsModule(target);
  396. for (var name in all) {
  397. __defProp(target, name, {
  398. get: all[name],
  399. enumerable: true
  400. });
  401. }
  402. };
  403. var __exportStar = function __exportStar(target, module) {
  404. __markAsModule(target);
  405. if (_typeof(module) === 'object' || typeof module === 'function') {
  406. var _iterator = _createForOfIteratorHelper(__getOwnPropNames(module)), _step;
  407. try {
  408. var _loop = function _loop() {
  409. var key = _step.value;
  410. if (!__hasOwnProp.call(target, key) && key !== 'default') {
  411. __defProp(target, key, {
  412. get: function get() {
  413. return module[key];
  414. },
  415. enumerable: __getOwnPropDesc(module, key).enumerable
  416. });
  417. }
  418. };
  419. for (_iterator.s(); !(_step = _iterator.n()).done; ) {
  420. _loop();
  421. }
  422. } catch (err) {
  423. _iterator.e(err);
  424. } finally {
  425. _iterator.f();
  426. }
  427. }
  428. return target;
  429. };
  430. var __toModule = function __toModule(module) {
  431. if (module && module.__esModule) {
  432. return module;
  433. }
  434. return __exportStar(__defProp(__create(__getProtoOf(module)), 'default', {
  435. value: module,
  436. enumerable: true
  437. }), module);
  438. };
  439. var require_utils = __commonJS(function(exports) {
  440. 'use strict';
  441. Object.defineProperty(exports, '__esModule', {
  442. value: true
  443. });
  444. function isIdentStart(c) {
  445. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c === '-' || c === '_';
  446. }
  447. exports.isIdentStart = isIdentStart;
  448. function isIdent(c) {
  449. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c === '-' || c === '_';
  450. }
  451. exports.isIdent = isIdent;
  452. function isHex(c) {
  453. return c >= 'a' && c <= 'f' || c >= 'A' && c <= 'F' || c >= '0' && c <= '9';
  454. }
  455. exports.isHex = isHex;
  456. function escapeIdentifier(s) {
  457. var len = s.length;
  458. var result = '';
  459. var i = 0;
  460. while (i < len) {
  461. var chr = s.charAt(i);
  462. if (exports.identSpecialChars[chr]) {
  463. result += '\\' + chr;
  464. } else {
  465. if (!(chr === '_' || chr === '-' || chr >= 'A' && chr <= 'Z' || chr >= 'a' && chr <= 'z' || i !== 0 && chr >= '0' && chr <= '9')) {
  466. var charCode = chr.charCodeAt(0);
  467. if ((charCode & 63488) === 55296) {
  468. var extraCharCode = s.charCodeAt(i++);
  469. if ((charCode & 64512) !== 55296 || (extraCharCode & 64512) !== 56320) {
  470. throw Error('UCS-2(decode): illegal sequence');
  471. }
  472. charCode = ((charCode & 1023) << 10) + (extraCharCode & 1023) + 65536;
  473. }
  474. result += '\\' + charCode.toString(16) + ' ';
  475. } else {
  476. result += chr;
  477. }
  478. }
  479. i++;
  480. }
  481. return result;
  482. }
  483. exports.escapeIdentifier = escapeIdentifier;
  484. function escapeStr(s) {
  485. var len = s.length;
  486. var result = '';
  487. var i = 0;
  488. var replacement;
  489. while (i < len) {
  490. var chr = s.charAt(i);
  491. if (chr === '"') {
  492. chr = '\\"';
  493. } else if (chr === '\\') {
  494. chr = '\\\\';
  495. } else if ((replacement = exports.strReplacementsRev[chr]) !== void 0) {
  496. chr = replacement;
  497. }
  498. result += chr;
  499. i++;
  500. }
  501. return '"' + result + '"';
  502. }
  503. exports.escapeStr = escapeStr;
  504. exports.identSpecialChars = {
  505. '!': true,
  506. '"': true,
  507. '#': true,
  508. $: true,
  509. '%': true,
  510. '&': true,
  511. '\'': true,
  512. '(': true,
  513. ')': true,
  514. '*': true,
  515. '+': true,
  516. ',': true,
  517. '.': true,
  518. '/': true,
  519. ';': true,
  520. '<': true,
  521. '=': true,
  522. '>': true,
  523. '?': true,
  524. '@': true,
  525. '[': true,
  526. '\\': true,
  527. ']': true,
  528. '^': true,
  529. '`': true,
  530. '{': true,
  531. '|': true,
  532. '}': true,
  533. '~': true
  534. };
  535. exports.strReplacementsRev = {
  536. '\n': '\\n',
  537. '\r': '\\r',
  538. '\t': '\\t',
  539. '\f': '\\f',
  540. '\v': '\\v'
  541. };
  542. exports.singleQuoteEscapeChars = {
  543. n: '\n',
  544. r: '\r',
  545. t: '\t',
  546. f: '\f',
  547. '\\': '\\',
  548. '\'': '\''
  549. };
  550. exports.doubleQuotesEscapeChars = {
  551. n: '\n',
  552. r: '\r',
  553. t: '\t',
  554. f: '\f',
  555. '\\': '\\',
  556. '"': '"'
  557. };
  558. });
  559. var require_parser_context = __commonJS(function(exports) {
  560. 'use strict';
  561. Object.defineProperty(exports, '__esModule', {
  562. value: true
  563. });
  564. var utils_1 = require_utils();
  565. function parseCssSelector(str, pos, pseudos, attrEqualityMods, ruleNestingOperators, substitutesEnabled) {
  566. var l = str.length;
  567. var chr = '';
  568. function getStr(quote, escapeTable) {
  569. var result = '';
  570. pos++;
  571. chr = str.charAt(pos);
  572. while (pos < l) {
  573. if (chr === quote) {
  574. pos++;
  575. return result;
  576. } else if (chr === '\\') {
  577. pos++;
  578. chr = str.charAt(pos);
  579. var esc = void 0;
  580. if (chr === quote) {
  581. result += quote;
  582. } else if ((esc = escapeTable[chr]) !== void 0) {
  583. result += esc;
  584. } else if (utils_1.isHex(chr)) {
  585. var hex = chr;
  586. pos++;
  587. chr = str.charAt(pos);
  588. while (utils_1.isHex(chr)) {
  589. hex += chr;
  590. pos++;
  591. chr = str.charAt(pos);
  592. }
  593. if (chr === ' ') {
  594. pos++;
  595. chr = str.charAt(pos);
  596. }
  597. result += String.fromCharCode(parseInt(hex, 16));
  598. continue;
  599. } else {
  600. result += chr;
  601. }
  602. } else {
  603. result += chr;
  604. }
  605. pos++;
  606. chr = str.charAt(pos);
  607. }
  608. return result;
  609. }
  610. function getIdent() {
  611. var result = '';
  612. chr = str.charAt(pos);
  613. while (pos < l) {
  614. if (utils_1.isIdent(chr)) {
  615. result += chr;
  616. } else if (chr === '\\') {
  617. pos++;
  618. if (pos >= l) {
  619. throw Error('Expected symbol but end of file reached.');
  620. }
  621. chr = str.charAt(pos);
  622. if (utils_1.identSpecialChars[chr]) {
  623. result += chr;
  624. } else if (utils_1.isHex(chr)) {
  625. var hex = chr;
  626. pos++;
  627. chr = str.charAt(pos);
  628. while (utils_1.isHex(chr)) {
  629. hex += chr;
  630. pos++;
  631. chr = str.charAt(pos);
  632. }
  633. if (chr === ' ') {
  634. pos++;
  635. chr = str.charAt(pos);
  636. }
  637. result += String.fromCharCode(parseInt(hex, 16));
  638. continue;
  639. } else {
  640. result += chr;
  641. }
  642. } else {
  643. return result;
  644. }
  645. pos++;
  646. chr = str.charAt(pos);
  647. }
  648. return result;
  649. }
  650. function skipWhitespace() {
  651. chr = str.charAt(pos);
  652. var result = false;
  653. while (chr === ' ' || chr === '\t' || chr === '\n' || chr === '\r' || chr === '\f') {
  654. result = true;
  655. pos++;
  656. chr = str.charAt(pos);
  657. }
  658. return result;
  659. }
  660. function parse2() {
  661. var res = parseSelector();
  662. if (pos < l) {
  663. throw Error('Rule expected but "' + str.charAt(pos) + '" found.');
  664. }
  665. return res;
  666. }
  667. function parseSelector() {
  668. var selector = parseSingleSelector();
  669. if (!selector) {
  670. return null;
  671. }
  672. var res = selector;
  673. chr = str.charAt(pos);
  674. while (chr === ',') {
  675. pos++;
  676. skipWhitespace();
  677. if (res.type !== 'selectors') {
  678. res = {
  679. type: 'selectors',
  680. selectors: [ selector ]
  681. };
  682. }
  683. selector = parseSingleSelector();
  684. if (!selector) {
  685. throw Error('Rule expected after ",".');
  686. }
  687. res.selectors.push(selector);
  688. }
  689. return res;
  690. }
  691. function parseSingleSelector() {
  692. skipWhitespace();
  693. var selector = {
  694. type: 'ruleSet'
  695. };
  696. var rule3 = parseRule();
  697. if (!rule3) {
  698. return null;
  699. }
  700. var currentRule = selector;
  701. while (rule3) {
  702. rule3.type = 'rule';
  703. currentRule.rule = rule3;
  704. currentRule = rule3;
  705. skipWhitespace();
  706. chr = str.charAt(pos);
  707. if (pos >= l || chr === ',' || chr === ')') {
  708. break;
  709. }
  710. if (ruleNestingOperators[chr]) {
  711. var op = chr;
  712. pos++;
  713. skipWhitespace();
  714. rule3 = parseRule();
  715. if (!rule3) {
  716. throw Error('Rule expected after "' + op + '".');
  717. }
  718. rule3.nestingOperator = op;
  719. } else {
  720. rule3 = parseRule();
  721. if (rule3) {
  722. rule3.nestingOperator = null;
  723. }
  724. }
  725. }
  726. return selector;
  727. }
  728. function parseRule() {
  729. var rule3 = null;
  730. while (pos < l) {
  731. chr = str.charAt(pos);
  732. if (chr === '*') {
  733. pos++;
  734. (rule3 = rule3 || {}).tagName = '*';
  735. } else if (utils_1.isIdentStart(chr) || chr === '\\') {
  736. (rule3 = rule3 || {}).tagName = getIdent();
  737. } else if (chr === '.') {
  738. pos++;
  739. rule3 = rule3 || {};
  740. (rule3.classNames = rule3.classNames || []).push(getIdent());
  741. } else if (chr === '#') {
  742. pos++;
  743. (rule3 = rule3 || {}).id = getIdent();
  744. } else if (chr === '[') {
  745. pos++;
  746. skipWhitespace();
  747. var attr = {
  748. name: getIdent()
  749. };
  750. skipWhitespace();
  751. if (chr === ']') {
  752. pos++;
  753. } else {
  754. var operator = '';
  755. if (attrEqualityMods[chr]) {
  756. operator = chr;
  757. pos++;
  758. chr = str.charAt(pos);
  759. }
  760. if (pos >= l) {
  761. throw Error('Expected "=" but end of file reached.');
  762. }
  763. if (chr !== '=') {
  764. throw Error('Expected "=" but "' + chr + '" found.');
  765. }
  766. attr.operator = operator + '=';
  767. pos++;
  768. skipWhitespace();
  769. var attrValue = '';
  770. attr.valueType = 'string';
  771. if (chr === '"') {
  772. attrValue = getStr('"', utils_1.doubleQuotesEscapeChars);
  773. } else if (chr === '\'') {
  774. attrValue = getStr('\'', utils_1.singleQuoteEscapeChars);
  775. } else if (substitutesEnabled && chr === '$') {
  776. pos++;
  777. attrValue = getIdent();
  778. attr.valueType = 'substitute';
  779. } else {
  780. while (pos < l) {
  781. if (chr === ']') {
  782. break;
  783. }
  784. attrValue += chr;
  785. pos++;
  786. chr = str.charAt(pos);
  787. }
  788. attrValue = attrValue.trim();
  789. }
  790. skipWhitespace();
  791. if (pos >= l) {
  792. throw Error('Expected "]" but end of file reached.');
  793. }
  794. if (chr !== ']') {
  795. throw Error('Expected "]" but "' + chr + '" found.');
  796. }
  797. pos++;
  798. attr.value = attrValue;
  799. }
  800. rule3 = rule3 || {};
  801. (rule3.attrs = rule3.attrs || []).push(attr);
  802. } else if (chr === ':') {
  803. pos++;
  804. var pseudoName = getIdent();
  805. var pseudo = {
  806. name: pseudoName
  807. };
  808. if (chr === '(') {
  809. pos++;
  810. var value = '';
  811. skipWhitespace();
  812. if (pseudos[pseudoName] === 'selector') {
  813. pseudo.valueType = 'selector';
  814. value = parseSelector();
  815. } else {
  816. pseudo.valueType = pseudos[pseudoName] || 'string';
  817. if (chr === '"') {
  818. value = getStr('"', utils_1.doubleQuotesEscapeChars);
  819. } else if (chr === '\'') {
  820. value = getStr('\'', utils_1.singleQuoteEscapeChars);
  821. } else if (substitutesEnabled && chr === '$') {
  822. pos++;
  823. value = getIdent();
  824. pseudo.valueType = 'substitute';
  825. } else {
  826. while (pos < l) {
  827. if (chr === ')') {
  828. break;
  829. }
  830. value += chr;
  831. pos++;
  832. chr = str.charAt(pos);
  833. }
  834. value = value.trim();
  835. }
  836. skipWhitespace();
  837. }
  838. if (pos >= l) {
  839. throw Error('Expected ")" but end of file reached.');
  840. }
  841. if (chr !== ')') {
  842. throw Error('Expected ")" but "' + chr + '" found.');
  843. }
  844. pos++;
  845. pseudo.value = value;
  846. }
  847. rule3 = rule3 || {};
  848. (rule3.pseudos = rule3.pseudos || []).push(pseudo);
  849. } else {
  850. break;
  851. }
  852. }
  853. return rule3;
  854. }
  855. return parse2();
  856. }
  857. exports.parseCssSelector = parseCssSelector;
  858. });
  859. var require_render = __commonJS(function(exports) {
  860. 'use strict';
  861. Object.defineProperty(exports, '__esModule', {
  862. value: true
  863. });
  864. var utils_1 = require_utils();
  865. function renderEntity(entity) {
  866. var res = '';
  867. switch (entity.type) {
  868. case 'ruleSet':
  869. var currentEntity = entity.rule;
  870. var parts = [];
  871. while (currentEntity) {
  872. if (currentEntity.nestingOperator) {
  873. parts.push(currentEntity.nestingOperator);
  874. }
  875. parts.push(renderEntity(currentEntity));
  876. currentEntity = currentEntity.rule;
  877. }
  878. res = parts.join(' ');
  879. break;
  880. case 'selectors':
  881. res = entity.selectors.map(renderEntity).join(', ');
  882. break;
  883. case 'rule':
  884. if (entity.tagName) {
  885. if (entity.tagName === '*') {
  886. res = '*';
  887. } else {
  888. res = utils_1.escapeIdentifier(entity.tagName);
  889. }
  890. }
  891. if (entity.id) {
  892. res += '#' + utils_1.escapeIdentifier(entity.id);
  893. }
  894. if (entity.classNames) {
  895. res += entity.classNames.map(function(cn) {
  896. return '.' + utils_1.escapeIdentifier(cn);
  897. }).join('');
  898. }
  899. if (entity.attrs) {
  900. res += entity.attrs.map(function(attr) {
  901. if ('operator' in attr) {
  902. if (attr.valueType === 'substitute') {
  903. return '[' + utils_1.escapeIdentifier(attr.name) + attr.operator + '$' + attr.value + ']';
  904. } else {
  905. return '[' + utils_1.escapeIdentifier(attr.name) + attr.operator + utils_1.escapeStr(attr.value) + ']';
  906. }
  907. } else {
  908. return '[' + utils_1.escapeIdentifier(attr.name) + ']';
  909. }
  910. }).join('');
  911. }
  912. if (entity.pseudos) {
  913. res += entity.pseudos.map(function(pseudo) {
  914. if (pseudo.valueType) {
  915. if (pseudo.valueType === 'selector') {
  916. return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + renderEntity(pseudo.value) + ')';
  917. } else if (pseudo.valueType === 'substitute') {
  918. return ':' + utils_1.escapeIdentifier(pseudo.name) + '($' + pseudo.value + ')';
  919. } else if (pseudo.valueType === 'numeric') {
  920. return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + pseudo.value + ')';
  921. } else {
  922. return ':' + utils_1.escapeIdentifier(pseudo.name) + '(' + utils_1.escapeIdentifier(pseudo.value) + ')';
  923. }
  924. } else {
  925. return ':' + utils_1.escapeIdentifier(pseudo.name);
  926. }
  927. }).join('');
  928. }
  929. break;
  930. default:
  931. throw Error('Unknown entity type: "' + entity.type + '".');
  932. }
  933. return res;
  934. }
  935. exports.renderEntity = renderEntity;
  936. });
  937. var require_lib = __commonJS(function(exports) {
  938. 'use strict';
  939. Object.defineProperty(exports, '__esModule', {
  940. value: true
  941. });
  942. var parser_context_1 = require_parser_context();
  943. var render_1 = require_render();
  944. var CssSelectorParser3 = function() {
  945. function CssSelectorParser4() {
  946. this.pseudos = {};
  947. this.attrEqualityMods = {};
  948. this.ruleNestingOperators = {};
  949. this.substitutesEnabled = false;
  950. }
  951. CssSelectorParser4.prototype.registerSelectorPseudos = function() {
  952. var pseudos = [];
  953. for (var _i = 0; _i < arguments.length; _i++) {
  954. pseudos[_i] = arguments[_i];
  955. }
  956. for (var _a = 0, pseudos_1 = pseudos; _a < pseudos_1.length; _a++) {
  957. var pseudo = pseudos_1[_a];
  958. this.pseudos[pseudo] = 'selector';
  959. }
  960. return this;
  961. };
  962. CssSelectorParser4.prototype.unregisterSelectorPseudos = function() {
  963. var pseudos = [];
  964. for (var _i = 0; _i < arguments.length; _i++) {
  965. pseudos[_i] = arguments[_i];
  966. }
  967. for (var _a = 0, pseudos_2 = pseudos; _a < pseudos_2.length; _a++) {
  968. var pseudo = pseudos_2[_a];
  969. delete this.pseudos[pseudo];
  970. }
  971. return this;
  972. };
  973. CssSelectorParser4.prototype.registerNumericPseudos = function() {
  974. var pseudos = [];
  975. for (var _i = 0; _i < arguments.length; _i++) {
  976. pseudos[_i] = arguments[_i];
  977. }
  978. for (var _a = 0, pseudos_3 = pseudos; _a < pseudos_3.length; _a++) {
  979. var pseudo = pseudos_3[_a];
  980. this.pseudos[pseudo] = 'numeric';
  981. }
  982. return this;
  983. };
  984. CssSelectorParser4.prototype.unregisterNumericPseudos = function() {
  985. var pseudos = [];
  986. for (var _i = 0; _i < arguments.length; _i++) {
  987. pseudos[_i] = arguments[_i];
  988. }
  989. for (var _a = 0, pseudos_4 = pseudos; _a < pseudos_4.length; _a++) {
  990. var pseudo = pseudos_4[_a];
  991. delete this.pseudos[pseudo];
  992. }
  993. return this;
  994. };
  995. CssSelectorParser4.prototype.registerNestingOperators = function() {
  996. var operators = [];
  997. for (var _i = 0; _i < arguments.length; _i++) {
  998. operators[_i] = arguments[_i];
  999. }
  1000. for (var _a = 0, operators_1 = operators; _a < operators_1.length; _a++) {
  1001. var operator = operators_1[_a];
  1002. this.ruleNestingOperators[operator] = true;
  1003. }
  1004. return this;
  1005. };
  1006. CssSelectorParser4.prototype.unregisterNestingOperators = function() {
  1007. var operators = [];
  1008. for (var _i = 0; _i < arguments.length; _i++) {
  1009. operators[_i] = arguments[_i];
  1010. }
  1011. for (var _a = 0, operators_2 = operators; _a < operators_2.length; _a++) {
  1012. var operator = operators_2[_a];
  1013. delete this.ruleNestingOperators[operator];
  1014. }
  1015. return this;
  1016. };
  1017. CssSelectorParser4.prototype.registerAttrEqualityMods = function() {
  1018. var mods = [];
  1019. for (var _i = 0; _i < arguments.length; _i++) {
  1020. mods[_i] = arguments[_i];
  1021. }
  1022. for (var _a = 0, mods_1 = mods; _a < mods_1.length; _a++) {
  1023. var mod = mods_1[_a];
  1024. this.attrEqualityMods[mod] = true;
  1025. }
  1026. return this;
  1027. };
  1028. CssSelectorParser4.prototype.unregisterAttrEqualityMods = function() {
  1029. var mods = [];
  1030. for (var _i = 0; _i < arguments.length; _i++) {
  1031. mods[_i] = arguments[_i];
  1032. }
  1033. for (var _a = 0, mods_2 = mods; _a < mods_2.length; _a++) {
  1034. var mod = mods_2[_a];
  1035. delete this.attrEqualityMods[mod];
  1036. }
  1037. return this;
  1038. };
  1039. CssSelectorParser4.prototype.enableSubstitutes = function() {
  1040. this.substitutesEnabled = true;
  1041. return this;
  1042. };
  1043. CssSelectorParser4.prototype.disableSubstitutes = function() {
  1044. this.substitutesEnabled = false;
  1045. return this;
  1046. };
  1047. CssSelectorParser4.prototype.parse = function(str) {
  1048. return parser_context_1.parseCssSelector(str, 0, this.pseudos, this.attrEqualityMods, this.ruleNestingOperators, this.substitutesEnabled);
  1049. };
  1050. CssSelectorParser4.prototype.render = function(path) {
  1051. return render_1.renderEntity(path).trim();
  1052. };
  1053. return CssSelectorParser4;
  1054. }();
  1055. exports.CssSelectorParser = CssSelectorParser3;
  1056. });
  1057. var require_noop = __commonJS(function(exports, module) {
  1058. 'use strict';
  1059. module.exports = function() {};
  1060. });
  1061. var require_is_value = __commonJS(function(exports, module) {
  1062. 'use strict';
  1063. var _undefined = require_noop()();
  1064. module.exports = function(val) {
  1065. return val !== _undefined && val !== null;
  1066. };
  1067. });
  1068. var require_normalize_options = __commonJS(function(exports, module) {
  1069. 'use strict';
  1070. var isValue = require_is_value();
  1071. var forEach = Array.prototype.forEach;
  1072. var create = Object.create;
  1073. var process2 = function process2(src, obj) {
  1074. var key;
  1075. for (key in src) {
  1076. obj[key] = src[key];
  1077. }
  1078. };
  1079. module.exports = function(opts1) {
  1080. var result = create(null);
  1081. forEach.call(arguments, function(options) {
  1082. if (!isValue(options)) {
  1083. return;
  1084. }
  1085. process2(Object(options), result);
  1086. });
  1087. return result;
  1088. };
  1089. });
  1090. var require_is_implemented = __commonJS(function(exports, module) {
  1091. 'use strict';
  1092. module.exports = function() {
  1093. var sign = Math.sign;
  1094. if (typeof sign !== 'function') {
  1095. return false;
  1096. }
  1097. return sign(10) === 1 && sign(-20) === -1;
  1098. };
  1099. });
  1100. var require_shim = __commonJS(function(exports, module) {
  1101. 'use strict';
  1102. module.exports = function(value) {
  1103. value = Number(value);
  1104. if (isNaN(value) || value === 0) {
  1105. return value;
  1106. }
  1107. return value > 0 ? 1 : -1;
  1108. };
  1109. });
  1110. var require_sign = __commonJS(function(exports, module) {
  1111. 'use strict';
  1112. module.exports = require_is_implemented()() ? Math.sign : require_shim();
  1113. });
  1114. var require_to_integer = __commonJS(function(exports, module) {
  1115. 'use strict';
  1116. var sign = require_sign();
  1117. var abs = Math.abs;
  1118. var floor = Math.floor;
  1119. module.exports = function(value) {
  1120. if (isNaN(value)) {
  1121. return 0;
  1122. }
  1123. value = Number(value);
  1124. if (value === 0 || !isFinite(value)) {
  1125. return value;
  1126. }
  1127. return sign(value) * floor(abs(value));
  1128. };
  1129. });
  1130. var require_to_pos_integer = __commonJS(function(exports, module) {
  1131. 'use strict';
  1132. var toInteger = require_to_integer();
  1133. var max = Math.max;
  1134. module.exports = function(value) {
  1135. return max(0, toInteger(value));
  1136. };
  1137. });
  1138. var require_resolve_length = __commonJS(function(exports, module) {
  1139. 'use strict';
  1140. var toPosInt = require_to_pos_integer();
  1141. module.exports = function(optsLength, fnLength, isAsync) {
  1142. var length;
  1143. if (isNaN(optsLength)) {
  1144. length = fnLength;
  1145. if (!(length >= 0)) {
  1146. return 1;
  1147. }
  1148. if (isAsync && length) {
  1149. return length - 1;
  1150. }
  1151. return length;
  1152. }
  1153. if (optsLength === false) {
  1154. return false;
  1155. }
  1156. return toPosInt(optsLength);
  1157. };
  1158. });
  1159. var require_valid_callable = __commonJS(function(exports, module) {
  1160. 'use strict';
  1161. module.exports = function(fn) {
  1162. if (typeof fn !== 'function') {
  1163. throw new TypeError(fn + ' is not a function');
  1164. }
  1165. return fn;
  1166. };
  1167. });
  1168. var require_valid_value = __commonJS(function(exports, module) {
  1169. 'use strict';
  1170. var isValue = require_is_value();
  1171. module.exports = function(value) {
  1172. if (!isValue(value)) {
  1173. throw new TypeError('Cannot use null or undefined');
  1174. }
  1175. return value;
  1176. };
  1177. });
  1178. var require_iterate = __commonJS(function(exports, module) {
  1179. 'use strict';
  1180. var callable = require_valid_callable();
  1181. var value = require_valid_value();
  1182. var bind = Function.prototype.bind;
  1183. var call = Function.prototype.call;
  1184. var keys = Object.keys;
  1185. var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;
  1186. module.exports = function(method, defVal) {
  1187. return function(obj, cb) {
  1188. var list, thisArg = arguments[2], compareFn = arguments[3];
  1189. obj = Object(value(obj));
  1190. callable(cb);
  1191. list = keys(obj);
  1192. if (compareFn) {
  1193. list.sort(typeof compareFn === 'function' ? bind.call(compareFn, obj) : void 0);
  1194. }
  1195. if (typeof method !== 'function') {
  1196. method = list[method];
  1197. }
  1198. return call.call(method, list, function(key, index) {
  1199. if (!objPropertyIsEnumerable.call(obj, key)) {
  1200. return defVal;
  1201. }
  1202. return call.call(cb, thisArg, obj[key], key, obj, index);
  1203. });
  1204. };
  1205. };
  1206. });
  1207. var require_for_each = __commonJS(function(exports, module) {
  1208. 'use strict';
  1209. module.exports = require_iterate()('forEach');
  1210. });
  1211. var require_registered_extensions = __commonJS(function() {
  1212. 'use strict';
  1213. });
  1214. var require_is_implemented2 = __commonJS(function(exports, module) {
  1215. 'use strict';
  1216. module.exports = function() {
  1217. var assign = Object.assign, obj;
  1218. if (typeof assign !== 'function') {
  1219. return false;
  1220. }
  1221. obj = {
  1222. foo: 'raz'
  1223. };
  1224. assign(obj, {
  1225. bar: 'dwa'
  1226. }, {
  1227. trzy: 'trzy'
  1228. });
  1229. return obj.foo + obj.bar + obj.trzy === 'razdwatrzy';
  1230. };
  1231. });
  1232. var require_is_implemented3 = __commonJS(function(exports, module) {
  1233. 'use strict';
  1234. module.exports = function() {
  1235. try {
  1236. Object.keys('primitive');
  1237. return true;
  1238. } catch (e) {
  1239. return false;
  1240. }
  1241. };
  1242. });
  1243. var require_shim2 = __commonJS(function(exports, module) {
  1244. 'use strict';
  1245. var isValue = require_is_value();
  1246. var keys = Object.keys;
  1247. module.exports = function(object) {
  1248. return keys(isValue(object) ? Object(object) : object);
  1249. };
  1250. });
  1251. var require_keys = __commonJS(function(exports, module) {
  1252. 'use strict';
  1253. module.exports = require_is_implemented3()() ? Object.keys : require_shim2();
  1254. });
  1255. var require_shim3 = __commonJS(function(exports, module) {
  1256. 'use strict';
  1257. var keys = require_keys();
  1258. var value = require_valid_value();
  1259. var max = Math.max;
  1260. module.exports = function(dest, src) {
  1261. var error, i, length = max(arguments.length, 2), assign;
  1262. dest = Object(value(dest));
  1263. assign = function assign(key) {
  1264. try {
  1265. dest[key] = src[key];
  1266. } catch (e) {
  1267. if (!error) {
  1268. error = e;
  1269. }
  1270. }
  1271. };
  1272. for (i = 1; i < length; ++i) {
  1273. src = arguments[i];
  1274. keys(src).forEach(assign);
  1275. }
  1276. if (error !== void 0) {
  1277. throw error;
  1278. }
  1279. return dest;
  1280. };
  1281. });
  1282. var require_assign = __commonJS(function(exports, module) {
  1283. 'use strict';
  1284. module.exports = require_is_implemented2()() ? Object.assign : require_shim3();
  1285. });
  1286. var require_is_object = __commonJS(function(exports, module) {
  1287. 'use strict';
  1288. var isValue = require_is_value();
  1289. var map = {
  1290. function: true,
  1291. object: true
  1292. };
  1293. module.exports = function(value) {
  1294. return isValue(value) && map[_typeof(value)] || false;
  1295. };
  1296. });
  1297. var require_custom = __commonJS(function(exports, module) {
  1298. 'use strict';
  1299. var assign = require_assign();
  1300. var isObject = require_is_object();
  1301. var isValue = require_is_value();
  1302. var captureStackTrace = Error.captureStackTrace;
  1303. module.exports = function(message) {
  1304. var err2 = new Error(message), code = arguments[1], ext = arguments[2];
  1305. if (!isValue(ext)) {
  1306. if (isObject(code)) {
  1307. ext = code;
  1308. code = null;
  1309. }
  1310. }
  1311. if (isValue(ext)) {
  1312. assign(err2, ext);
  1313. }
  1314. if (isValue(code)) {
  1315. err2.code = code;
  1316. }
  1317. if (captureStackTrace) {
  1318. captureStackTrace(err2, module.exports);
  1319. }
  1320. return err2;
  1321. };
  1322. });
  1323. var require_mixin = __commonJS(function(exports, module) {
  1324. 'use strict';
  1325. var value = require_valid_value();
  1326. var defineProperty = Object.defineProperty;
  1327. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  1328. var getOwnPropertyNames = Object.getOwnPropertyNames;
  1329. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  1330. module.exports = function(target, source) {
  1331. var error, sourceObject = Object(value(source));
  1332. target = Object(value(target));
  1333. getOwnPropertyNames(sourceObject).forEach(function(name) {
  1334. try {
  1335. defineProperty(target, name, getOwnPropertyDescriptor(source, name));
  1336. } catch (e) {
  1337. error = e;
  1338. }
  1339. });
  1340. if (typeof getOwnPropertySymbols === 'function') {
  1341. getOwnPropertySymbols(sourceObject).forEach(function(symbol) {
  1342. try {
  1343. defineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol));
  1344. } catch (e) {
  1345. error = e;
  1346. }
  1347. });
  1348. }
  1349. if (error !== void 0) {
  1350. throw error;
  1351. }
  1352. return target;
  1353. };
  1354. });
  1355. var require_define_length = __commonJS(function(exports, module) {
  1356. 'use strict';
  1357. var toPosInt = require_to_pos_integer();
  1358. var test = function test(arg1, arg2) {
  1359. return arg2;
  1360. };
  1361. var desc;
  1362. var defineProperty;
  1363. var generate;
  1364. var mixin;
  1365. try {
  1366. Object.defineProperty(test, 'length', {
  1367. configurable: true,
  1368. writable: false,
  1369. enumerable: false,
  1370. value: 1
  1371. });
  1372. } catch (ignore) {}
  1373. if (test.length === 1) {
  1374. desc = {
  1375. configurable: true,
  1376. writable: false,
  1377. enumerable: false
  1378. };
  1379. defineProperty = Object.defineProperty;
  1380. module.exports = function(fn, length) {
  1381. length = toPosInt(length);
  1382. if (fn.length === length) {
  1383. return fn;
  1384. }
  1385. desc.value = length;
  1386. return defineProperty(fn, 'length', desc);
  1387. };
  1388. } else {
  1389. mixin = require_mixin();
  1390. generate = function() {
  1391. var cache20 = [];
  1392. return function(length) {
  1393. var args, i = 0;
  1394. if (cache20[length]) {
  1395. return cache20[length];
  1396. }
  1397. args = [];
  1398. while (length--) {
  1399. args.push('a' + (++i).toString(36));
  1400. }
  1401. return new Function('fn', 'return function (' + args.join(', ') + ') { return fn.apply(this, arguments); };');
  1402. };
  1403. }();
  1404. module.exports = function(src, length) {
  1405. var target;
  1406. length = toPosInt(length);
  1407. if (src.length === length) {
  1408. return src;
  1409. }
  1410. target = generate(length)(src);
  1411. try {
  1412. mixin(target, src);
  1413. } catch (ignore) {}
  1414. return target;
  1415. };
  1416. }
  1417. });
  1418. var require_is = __commonJS(function(exports, module) {
  1419. 'use strict';
  1420. var _undefined = void 0;
  1421. module.exports = function(value) {
  1422. return value !== _undefined && value !== null;
  1423. };
  1424. });
  1425. var require_is2 = __commonJS(function(exports, module) {
  1426. 'use strict';
  1427. var isValue = require_is();
  1428. var possibleTypes = {
  1429. object: true,
  1430. function: true,
  1431. undefined: true
  1432. };
  1433. module.exports = function(value) {
  1434. if (!isValue(value)) {
  1435. return false;
  1436. }
  1437. return hasOwnProperty.call(possibleTypes, _typeof(value));
  1438. };
  1439. });
  1440. var require_is3 = __commonJS(function(exports, module) {
  1441. 'use strict';
  1442. var isObject = require_is2();
  1443. module.exports = function(value) {
  1444. if (!isObject(value)) {
  1445. return false;
  1446. }
  1447. try {
  1448. if (!value.constructor) {
  1449. return false;
  1450. }
  1451. return value.constructor.prototype === value;
  1452. } catch (error) {
  1453. return false;
  1454. }
  1455. };
  1456. });
  1457. var require_is4 = __commonJS(function(exports, module) {
  1458. 'use strict';
  1459. var isPrototype = require_is3();
  1460. module.exports = function(value) {
  1461. if (typeof value !== 'function') {
  1462. return false;
  1463. }
  1464. if (!hasOwnProperty.call(value, 'length')) {
  1465. return false;
  1466. }
  1467. try {
  1468. if (typeof value.length !== 'number') {
  1469. return false;
  1470. }
  1471. if (typeof value.call !== 'function') {
  1472. return false;
  1473. }
  1474. if (typeof value.apply !== 'function') {
  1475. return false;
  1476. }
  1477. } catch (error) {
  1478. return false;
  1479. }
  1480. return !isPrototype(value);
  1481. };
  1482. });
  1483. var require_is5 = __commonJS(function(exports, module) {
  1484. 'use strict';
  1485. var isFunction = require_is4();
  1486. var classRe = /^\s*class[\s{/}]/;
  1487. var functionToString = Function.prototype.toString;
  1488. module.exports = function(value) {
  1489. if (!isFunction(value)) {
  1490. return false;
  1491. }
  1492. if (classRe.test(functionToString.call(value))) {
  1493. return false;
  1494. }
  1495. return true;
  1496. };
  1497. });
  1498. var require_is_implemented4 = __commonJS(function(exports, module) {
  1499. 'use strict';
  1500. var str = 'razdwatrzy';
  1501. module.exports = function() {
  1502. if (typeof str.contains !== 'function') {
  1503. return false;
  1504. }
  1505. return str.contains('dwa') === true && str.contains('foo') === false;
  1506. };
  1507. });
  1508. var require_shim4 = __commonJS(function(exports, module) {
  1509. 'use strict';
  1510. var indexOf = String.prototype.indexOf;
  1511. module.exports = function(searchString) {
  1512. return indexOf.call(this, searchString, arguments[1]) > -1;
  1513. };
  1514. });
  1515. var require_contains = __commonJS(function(exports, module) {
  1516. 'use strict';
  1517. module.exports = require_is_implemented4()() ? String.prototype.contains : require_shim4();
  1518. });
  1519. var require_d = __commonJS(function(exports, module) {
  1520. 'use strict';
  1521. var isValue = require_is();
  1522. var isPlainFunction = require_is5();
  1523. var assign = require_assign();
  1524. var normalizeOpts = require_normalize_options();
  1525. var contains6 = require_contains();
  1526. var d = module.exports = function(dscr, value) {
  1527. var c, e, w, options, desc;
  1528. if (arguments.length < 2 || typeof dscr !== 'string') {
  1529. options = value;
  1530. value = dscr;
  1531. dscr = null;
  1532. } else {
  1533. options = arguments[2];
  1534. }
  1535. if (isValue(dscr)) {
  1536. c = contains6.call(dscr, 'c');
  1537. e = contains6.call(dscr, 'e');
  1538. w = contains6.call(dscr, 'w');
  1539. } else {
  1540. c = w = true;
  1541. e = false;
  1542. }
  1543. desc = {
  1544. value: value,
  1545. configurable: c,
  1546. enumerable: e,
  1547. writable: w
  1548. };
  1549. return !options ? desc : assign(normalizeOpts(options), desc);
  1550. };
  1551. d.gs = function(dscr, get, set) {
  1552. var c, e, options, desc;
  1553. if (typeof dscr !== 'string') {
  1554. options = set;
  1555. set = get;
  1556. get = dscr;
  1557. dscr = null;
  1558. } else {
  1559. options = arguments[3];
  1560. }
  1561. if (!isValue(get)) {
  1562. get = void 0;
  1563. } else if (!isPlainFunction(get)) {
  1564. options = get;
  1565. get = set = void 0;
  1566. } else if (!isValue(set)) {
  1567. set = void 0;
  1568. } else if (!isPlainFunction(set)) {
  1569. options = set;
  1570. set = void 0;
  1571. }
  1572. if (isValue(dscr)) {
  1573. c = contains6.call(dscr, 'c');
  1574. e = contains6.call(dscr, 'e');
  1575. } else {
  1576. c = true;
  1577. e = false;
  1578. }
  1579. desc = {
  1580. get: get,
  1581. set: set,
  1582. configurable: c,
  1583. enumerable: e
  1584. };
  1585. return !options ? desc : assign(normalizeOpts(options), desc);
  1586. };
  1587. });
  1588. var require_event_emitter = __commonJS(function(exports, module) {
  1589. 'use strict';
  1590. var d = require_d();
  1591. var callable = require_valid_callable();
  1592. var apply = Function.prototype.apply;
  1593. var call = Function.prototype.call;
  1594. var create = Object.create;
  1595. var defineProperty = Object.defineProperty;
  1596. var defineProperties = Object.defineProperties;
  1597. var hasOwnProperty2 = Object.prototype.hasOwnProperty;
  1598. var descriptor = {
  1599. configurable: true,
  1600. enumerable: false,
  1601. writable: true
  1602. };
  1603. var on;
  1604. var once;
  1605. var off;
  1606. var emit;
  1607. var methods;
  1608. var descriptors;
  1609. var base;
  1610. on = function on(type, listener) {
  1611. var data2;
  1612. callable(listener);
  1613. if (!hasOwnProperty2.call(this, '__ee__')) {
  1614. data2 = descriptor.value = create(null);
  1615. defineProperty(this, '__ee__', descriptor);
  1616. descriptor.value = null;
  1617. } else {
  1618. data2 = this.__ee__;
  1619. }
  1620. if (!data2[type]) {
  1621. data2[type] = listener;
  1622. } else if (_typeof(data2[type]) === 'object') {
  1623. data2[type].push(listener);
  1624. } else {
  1625. data2[type] = [ data2[type], listener ];
  1626. }
  1627. return this;
  1628. };
  1629. once = function once(type, listener) {
  1630. var _once, self2;
  1631. callable(listener);
  1632. self2 = this;
  1633. on.call(this, type, _once = function once2() {
  1634. off.call(self2, type, _once);
  1635. apply.call(listener, this, arguments);
  1636. });
  1637. _once.__eeOnceListener__ = listener;
  1638. return this;
  1639. };
  1640. off = function off(type, listener) {
  1641. var data2, listeners, candidate, i;
  1642. callable(listener);
  1643. if (!hasOwnProperty2.call(this, '__ee__')) {
  1644. return this;
  1645. }
  1646. data2 = this.__ee__;
  1647. if (!data2[type]) {
  1648. return this;
  1649. }
  1650. listeners = data2[type];
  1651. if (_typeof(listeners) === 'object') {
  1652. for (i = 0; candidate = listeners[i]; ++i) {
  1653. if (candidate === listener || candidate.__eeOnceListener__ === listener) {
  1654. if (listeners.length === 2) {
  1655. data2[type] = listeners[i ? 0 : 1];
  1656. } else {
  1657. listeners.splice(i, 1);
  1658. }
  1659. }
  1660. }
  1661. } else {
  1662. if (listeners === listener || listeners.__eeOnceListener__ === listener) {
  1663. delete data2[type];
  1664. }
  1665. }
  1666. return this;
  1667. };
  1668. emit = function emit(type) {
  1669. var i, l, listener, listeners, args;
  1670. if (!hasOwnProperty2.call(this, '__ee__')) {
  1671. return;
  1672. }
  1673. listeners = this.__ee__[type];
  1674. if (!listeners) {
  1675. return;
  1676. }
  1677. if (_typeof(listeners) === 'object') {
  1678. l = arguments.length;
  1679. args = new Array(l - 1);
  1680. for (i = 1; i < l; ++i) {
  1681. args[i - 1] = arguments[i];
  1682. }
  1683. listeners = listeners.slice();
  1684. for (i = 0; listener = listeners[i]; ++i) {
  1685. apply.call(listener, this, args);
  1686. }
  1687. } else {
  1688. switch (arguments.length) {
  1689. case 1:
  1690. call.call(listeners, this);
  1691. break;
  1692. case 2:
  1693. call.call(listeners, this, arguments[1]);
  1694. break;
  1695. case 3:
  1696. call.call(listeners, this, arguments[1], arguments[2]);
  1697. break;
  1698. default:
  1699. l = arguments.length;
  1700. args = new Array(l - 1);
  1701. for (i = 1; i < l; ++i) {
  1702. args[i - 1] = arguments[i];
  1703. }
  1704. apply.call(listeners, this, args);
  1705. }
  1706. }
  1707. };
  1708. methods = {
  1709. on: on,
  1710. once: once,
  1711. off: off,
  1712. emit: emit
  1713. };
  1714. descriptors = {
  1715. on: d(on),
  1716. once: d(once),
  1717. off: d(off),
  1718. emit: d(emit)
  1719. };
  1720. base = defineProperties({}, descriptors);
  1721. module.exports = exports = function exports(o) {
  1722. return o == null ? create(base) : defineProperties(Object(o), descriptors);
  1723. };
  1724. exports.methods = methods;
  1725. });
  1726. var require_is_implemented5 = __commonJS(function(exports, module) {
  1727. 'use strict';
  1728. module.exports = function() {
  1729. var from = Array.from, arr, result;
  1730. if (typeof from !== 'function') {
  1731. return false;
  1732. }
  1733. arr = [ 'raz', 'dwa' ];
  1734. result = from(arr);
  1735. return Boolean(result && result !== arr && result[1] === 'dwa');
  1736. };
  1737. });
  1738. var require_is_implemented6 = __commonJS(function(exports, module) {
  1739. 'use strict';
  1740. module.exports = function() {
  1741. if ((typeof globalThis === 'undefined' ? 'undefined' : _typeof(globalThis)) !== 'object') {
  1742. return false;
  1743. }
  1744. if (!globalThis) {
  1745. return false;
  1746. }
  1747. return globalThis.Array === Array;
  1748. };
  1749. });
  1750. var require_implementation = __commonJS(function(exports, module) {
  1751. var naiveFallback = function naiveFallback() {
  1752. if ((typeof self === 'undefined' ? 'undefined' : _typeof(self)) === 'object' && self) {
  1753. return self;
  1754. }
  1755. if ((typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && window) {
  1756. return window;
  1757. }
  1758. throw new Error('Unable to resolve global `this`');
  1759. };
  1760. module.exports = function() {
  1761. if (this) {
  1762. return this;
  1763. }
  1764. try {
  1765. Object.defineProperty(Object.prototype, '__global__', {
  1766. get: function get() {
  1767. return this;
  1768. },
  1769. configurable: true
  1770. });
  1771. } catch (error) {
  1772. return naiveFallback();
  1773. }
  1774. try {
  1775. if (!__global__) {
  1776. return naiveFallback();
  1777. }
  1778. return __global__;
  1779. } finally {
  1780. delete Object.prototype.__global__;
  1781. }
  1782. }();
  1783. });
  1784. var require_global_this = __commonJS(function(exports, module) {
  1785. 'use strict';
  1786. module.exports = require_is_implemented6()() ? globalThis : require_implementation();
  1787. });
  1788. var require_is_implemented7 = __commonJS(function(exports, module) {
  1789. 'use strict';
  1790. var global2 = require_global_this();
  1791. var validTypes = {
  1792. object: true,
  1793. symbol: true
  1794. };
  1795. module.exports = function() {
  1796. var _Symbol = global2.Symbol;
  1797. var symbol;
  1798. if (typeof _Symbol !== 'function') {
  1799. return false;
  1800. }
  1801. symbol = _Symbol('test symbol');
  1802. try {
  1803. String(symbol);
  1804. } catch (e) {
  1805. return false;
  1806. }
  1807. if (!validTypes[_typeof(_Symbol.iterator)]) {
  1808. return false;
  1809. }
  1810. if (!validTypes[_typeof(_Symbol.toPrimitive)]) {
  1811. return false;
  1812. }
  1813. if (!validTypes[_typeof(_Symbol.toStringTag)]) {
  1814. return false;
  1815. }
  1816. return true;
  1817. };
  1818. });
  1819. var require_is_symbol = __commonJS(function(exports, module) {
  1820. 'use strict';
  1821. module.exports = function(value) {
  1822. if (!value) {
  1823. return false;
  1824. }
  1825. if (_typeof(value) === 'symbol') {
  1826. return true;
  1827. }
  1828. if (!value.constructor) {
  1829. return false;
  1830. }
  1831. if (value.constructor.name !== 'Symbol') {
  1832. return false;
  1833. }
  1834. return value[value.constructor.toStringTag] === 'Symbol';
  1835. };
  1836. });
  1837. var require_validate_symbol = __commonJS(function(exports, module) {
  1838. 'use strict';
  1839. var isSymbol = require_is_symbol();
  1840. module.exports = function(value) {
  1841. if (!isSymbol(value)) {
  1842. throw new TypeError(value + ' is not a symbol');
  1843. }
  1844. return value;
  1845. };
  1846. });
  1847. var require_generate_name = __commonJS(function(exports, module) {
  1848. 'use strict';
  1849. var d = require_d();
  1850. var create = Object.create;
  1851. var defineProperty = Object.defineProperty;
  1852. var objPrototype = Object.prototype;
  1853. var created = create(null);
  1854. module.exports = function(desc) {
  1855. var postfix = 0, name, ie11BugWorkaround;
  1856. while (created[desc + (postfix || '')]) {
  1857. ++postfix;
  1858. }
  1859. desc += postfix || '';
  1860. created[desc] = true;
  1861. name = '@@' + desc;
  1862. defineProperty(objPrototype, name, d.gs(null, function(value) {
  1863. if (ie11BugWorkaround) {
  1864. return;
  1865. }
  1866. ie11BugWorkaround = true;
  1867. defineProperty(this, name, d(value));
  1868. ie11BugWorkaround = false;
  1869. }));
  1870. return name;
  1871. };
  1872. });
  1873. var require_standard_symbols = __commonJS(function(exports, module) {
  1874. 'use strict';
  1875. var d = require_d();
  1876. var NativeSymbol = require_global_this().Symbol;
  1877. module.exports = function(SymbolPolyfill) {
  1878. return Object.defineProperties(SymbolPolyfill, {
  1879. hasInstance: d('', NativeSymbol && NativeSymbol.hasInstance || SymbolPolyfill('hasInstance')),
  1880. isConcatSpreadable: d('', NativeSymbol && NativeSymbol.isConcatSpreadable || SymbolPolyfill('isConcatSpreadable')),
  1881. iterator: d('', NativeSymbol && NativeSymbol.iterator || SymbolPolyfill('iterator')),
  1882. match: d('', NativeSymbol && NativeSymbol.match || SymbolPolyfill('match')),
  1883. replace: d('', NativeSymbol && NativeSymbol.replace || SymbolPolyfill('replace')),
  1884. search: d('', NativeSymbol && NativeSymbol.search || SymbolPolyfill('search')),
  1885. species: d('', NativeSymbol && NativeSymbol.species || SymbolPolyfill('species')),
  1886. split: d('', NativeSymbol && NativeSymbol.split || SymbolPolyfill('split')),
  1887. toPrimitive: d('', NativeSymbol && NativeSymbol.toPrimitive || SymbolPolyfill('toPrimitive')),
  1888. toStringTag: d('', NativeSymbol && NativeSymbol.toStringTag || SymbolPolyfill('toStringTag')),
  1889. unscopables: d('', NativeSymbol && NativeSymbol.unscopables || SymbolPolyfill('unscopables'))
  1890. });
  1891. };
  1892. });
  1893. var require_symbol_registry = __commonJS(function(exports, module) {
  1894. 'use strict';
  1895. var d = require_d();
  1896. var validateSymbol = require_validate_symbol();
  1897. var registry = Object.create(null);
  1898. module.exports = function(SymbolPolyfill) {
  1899. return Object.defineProperties(SymbolPolyfill, {
  1900. for: d(function(key) {
  1901. if (registry[key]) {
  1902. return registry[key];
  1903. }
  1904. return registry[key] = SymbolPolyfill(String(key));
  1905. }),
  1906. keyFor: d(function(symbol) {
  1907. var key;
  1908. validateSymbol(symbol);
  1909. for (key in registry) {
  1910. if (registry[key] === symbol) {
  1911. return key;
  1912. }
  1913. }
  1914. return void 0;
  1915. })
  1916. });
  1917. };
  1918. });
  1919. var require_polyfill = __commonJS(function(exports, module) {
  1920. 'use strict';
  1921. var d = require_d();
  1922. var validateSymbol = require_validate_symbol();
  1923. var NativeSymbol = require_global_this().Symbol;
  1924. var generateName = require_generate_name();
  1925. var setupStandardSymbols = require_standard_symbols();
  1926. var setupSymbolRegistry = require_symbol_registry();
  1927. var create = Object.create;
  1928. var defineProperties = Object.defineProperties;
  1929. var defineProperty = Object.defineProperty;
  1930. var SymbolPolyfill;
  1931. var HiddenSymbol;
  1932. var isNativeSafe;
  1933. if (typeof NativeSymbol === 'function') {
  1934. try {
  1935. String(NativeSymbol());
  1936. isNativeSafe = true;
  1937. } catch (ignore) {}
  1938. } else {
  1939. NativeSymbol = null;
  1940. }
  1941. HiddenSymbol = function _Symbol2(description) {
  1942. if (this instanceof HiddenSymbol) {
  1943. throw new TypeError('Symbol is not a constructor');
  1944. }
  1945. return SymbolPolyfill(description);
  1946. };
  1947. module.exports = SymbolPolyfill = function _Symbol3(description) {
  1948. var symbol;
  1949. if (this instanceof _Symbol3) {
  1950. throw new TypeError('Symbol is not a constructor');
  1951. }
  1952. if (isNativeSafe) {
  1953. return NativeSymbol(description);
  1954. }
  1955. symbol = create(HiddenSymbol.prototype);
  1956. description = description === void 0 ? '' : String(description);
  1957. return defineProperties(symbol, {
  1958. __description__: d('', description),
  1959. __name__: d('', generateName(description))
  1960. });
  1961. };
  1962. setupStandardSymbols(SymbolPolyfill);
  1963. setupSymbolRegistry(SymbolPolyfill);
  1964. defineProperties(HiddenSymbol.prototype, {
  1965. constructor: d(SymbolPolyfill),
  1966. toString: d('', function() {
  1967. return this.__name__;
  1968. })
  1969. });
  1970. defineProperties(SymbolPolyfill.prototype, {
  1971. toString: d(function() {
  1972. return 'Symbol (' + validateSymbol(this).__description__ + ')';
  1973. }),
  1974. valueOf: d(function() {
  1975. return validateSymbol(this);
  1976. })
  1977. });
  1978. defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d('', function() {
  1979. var symbol = validateSymbol(this);
  1980. if (_typeof(symbol) === 'symbol') {
  1981. return symbol;
  1982. }
  1983. return symbol.toString();
  1984. }));
  1985. defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d('c', 'Symbol'));
  1986. defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, d('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));
  1987. defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, d('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));
  1988. });
  1989. var require_es6_symbol = __commonJS(function(exports, module) {
  1990. 'use strict';
  1991. module.exports = require_is_implemented7()() ? require_global_this().Symbol : require_polyfill();
  1992. });
  1993. var require_is_arguments = __commonJS(function(exports, module) {
  1994. 'use strict';
  1995. var objToString = Object.prototype.toString;
  1996. var id = objToString.call(function() {
  1997. return arguments;
  1998. }());
  1999. module.exports = function(value) {
  2000. return objToString.call(value) === id;
  2001. };
  2002. });
  2003. var require_is_function = __commonJS(function(exports, module) {
  2004. 'use strict';
  2005. var objToString = Object.prototype.toString;
  2006. var isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);
  2007. module.exports = function(value) {
  2008. return typeof value === 'function' && isFunctionStringTag(objToString.call(value));
  2009. };
  2010. });
  2011. var require_is_string = __commonJS(function(exports, module) {
  2012. 'use strict';
  2013. var objToString = Object.prototype.toString;
  2014. var id = objToString.call('');
  2015. module.exports = function(value) {
  2016. return typeof value === 'string' || value && _typeof(value) === 'object' && (value instanceof String || objToString.call(value) === id) || false;
  2017. };
  2018. });
  2019. var require_shim5 = __commonJS(function(exports, module) {
  2020. 'use strict';
  2021. var iteratorSymbol = require_es6_symbol().iterator;
  2022. var isArguments = require_is_arguments();
  2023. var isFunction = require_is_function();
  2024. var toPosInt = require_to_pos_integer();
  2025. var callable = require_valid_callable();
  2026. var validValue = require_valid_value();
  2027. var isValue = require_is_value();
  2028. var isString = require_is_string();
  2029. var isArray = Array.isArray;
  2030. var call = Function.prototype.call;
  2031. var desc = {
  2032. configurable: true,
  2033. enumerable: true,
  2034. writable: true,
  2035. value: null
  2036. };
  2037. var defineProperty = Object.defineProperty;
  2038. module.exports = function(arrayLike) {
  2039. var mapFn = arguments[1], thisArg = arguments[2], Context2, i, j, arr, length, code, iterator, result, getIterator, value;
  2040. arrayLike = Object(validValue(arrayLike));
  2041. if (isValue(mapFn)) {
  2042. callable(mapFn);
  2043. }
  2044. if (!this || this === Array || !isFunction(this)) {
  2045. if (!mapFn) {
  2046. if (isArguments(arrayLike)) {
  2047. length = arrayLike.length;
  2048. if (length !== 1) {
  2049. return Array.apply(null, arrayLike);
  2050. }
  2051. arr = new Array(1);
  2052. arr[0] = arrayLike[0];
  2053. return arr;
  2054. }
  2055. if (isArray(arrayLike)) {
  2056. arr = new Array(length = arrayLike.length);
  2057. for (i = 0; i < length; ++i) {
  2058. arr[i] = arrayLike[i];
  2059. }
  2060. return arr;
  2061. }
  2062. }
  2063. arr = [];
  2064. } else {
  2065. Context2 = this;
  2066. }
  2067. if (!isArray(arrayLike)) {
  2068. if ((getIterator = arrayLike[iteratorSymbol]) !== void 0) {
  2069. iterator = callable(getIterator).call(arrayLike);
  2070. if (Context2) {
  2071. arr = new Context2();
  2072. }
  2073. result = iterator.next();
  2074. i = 0;
  2075. while (!result.done) {
  2076. value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;
  2077. if (Context2) {
  2078. desc.value = value;
  2079. defineProperty(arr, i, desc);
  2080. } else {
  2081. arr[i] = value;
  2082. }
  2083. result = iterator.next();
  2084. ++i;
  2085. }
  2086. length = i;
  2087. } else if (isString(arrayLike)) {
  2088. length = arrayLike.length;
  2089. if (Context2) {
  2090. arr = new Context2();
  2091. }
  2092. for (i = 0, j = 0; i < length; ++i) {
  2093. value = arrayLike[i];
  2094. if (i + 1 < length) {
  2095. code = value.charCodeAt(0);
  2096. if (code >= 55296 && code <= 56319) {
  2097. value += arrayLike[++i];
  2098. }
  2099. }
  2100. value = mapFn ? call.call(mapFn, thisArg, value, j) : value;
  2101. if (Context2) {
  2102. desc.value = value;
  2103. defineProperty(arr, j, desc);
  2104. } else {
  2105. arr[j] = value;
  2106. }
  2107. ++j;
  2108. }
  2109. length = j;
  2110. }
  2111. }
  2112. if (length === void 0) {
  2113. length = toPosInt(arrayLike.length);
  2114. if (Context2) {
  2115. arr = new Context2(length);
  2116. }
  2117. for (i = 0; i < length; ++i) {
  2118. value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];
  2119. if (Context2) {
  2120. desc.value = value;
  2121. defineProperty(arr, i, desc);
  2122. } else {
  2123. arr[i] = value;
  2124. }
  2125. }
  2126. }
  2127. if (Context2) {
  2128. desc.value = null;
  2129. arr.length = length;
  2130. }
  2131. return arr;
  2132. };
  2133. });
  2134. var require_from = __commonJS(function(exports, module) {
  2135. 'use strict';
  2136. module.exports = require_is_implemented5()() ? Array.from : require_shim5();
  2137. });
  2138. var require_to_array = __commonJS(function(exports, module) {
  2139. 'use strict';
  2140. var from = require_from();
  2141. var isArray = Array.isArray;
  2142. module.exports = function(arrayLike) {
  2143. return isArray(arrayLike) ? arrayLike : from(arrayLike);
  2144. };
  2145. });
  2146. var require_resolve_resolve = __commonJS(function(exports, module) {
  2147. 'use strict';
  2148. var toArray2 = require_to_array();
  2149. var isValue = require_is_value();
  2150. var callable = require_valid_callable();
  2151. var slice = Array.prototype.slice;
  2152. var resolveArgs;
  2153. resolveArgs = function resolveArgs(args) {
  2154. return this.map(function(resolve, i) {
  2155. return resolve ? resolve(args[i]) : args[i];
  2156. }).concat(slice.call(args, this.length));
  2157. };
  2158. module.exports = function(resolvers) {
  2159. resolvers = toArray2(resolvers);
  2160. resolvers.forEach(function(resolve) {
  2161. if (isValue(resolve)) {
  2162. callable(resolve);
  2163. }
  2164. });
  2165. return resolveArgs.bind(resolvers);
  2166. };
  2167. });
  2168. var require_resolve_normalize = __commonJS(function(exports, module) {
  2169. 'use strict';
  2170. var callable = require_valid_callable();
  2171. module.exports = function(userNormalizer) {
  2172. var normalizer;
  2173. if (typeof userNormalizer === 'function') {
  2174. return {
  2175. set: userNormalizer,
  2176. get: userNormalizer
  2177. };
  2178. }
  2179. normalizer = {
  2180. get: callable(userNormalizer.get)
  2181. };
  2182. if (userNormalizer.set !== void 0) {
  2183. normalizer.set = callable(userNormalizer.set);
  2184. if (userNormalizer['delete']) {
  2185. normalizer['delete'] = callable(userNormalizer['delete']);
  2186. }
  2187. if (userNormalizer.clear) {
  2188. normalizer.clear = callable(userNormalizer.clear);
  2189. }
  2190. return normalizer;
  2191. }
  2192. normalizer.set = normalizer.get;
  2193. return normalizer;
  2194. };
  2195. });
  2196. var require_configure_map = __commonJS(function(exports, module) {
  2197. 'use strict';
  2198. var customError = require_custom();
  2199. var defineLength = require_define_length();
  2200. var d = require_d();
  2201. var ee = require_event_emitter().methods;
  2202. var resolveResolve = require_resolve_resolve();
  2203. var resolveNormalize = require_resolve_normalize();
  2204. var apply = Function.prototype.apply;
  2205. var call = Function.prototype.call;
  2206. var create = Object.create;
  2207. var defineProperties = Object.defineProperties;
  2208. var _on = ee.on;
  2209. var emit = ee.emit;
  2210. module.exports = function(original, length, options) {
  2211. var cache20 = create(null), conf, memLength, _get, set, del, _clear, extDel, extGet, extHas, normalizer, getListeners, setListeners, deleteListeners, memoized, resolve;
  2212. if (length !== false) {
  2213. memLength = length;
  2214. } else if (isNaN(original.length)) {
  2215. memLength = 1;
  2216. } else {
  2217. memLength = original.length;
  2218. }
  2219. if (options.normalizer) {
  2220. normalizer = resolveNormalize(options.normalizer);
  2221. _get = normalizer.get;
  2222. set = normalizer.set;
  2223. del = normalizer['delete'];
  2224. _clear = normalizer.clear;
  2225. }
  2226. if (options.resolvers != null) {
  2227. resolve = resolveResolve(options.resolvers);
  2228. }
  2229. if (_get) {
  2230. memoized = defineLength(function(arg) {
  2231. var id, result, args = arguments;
  2232. if (resolve) {
  2233. args = resolve(args);
  2234. }
  2235. id = _get(args);
  2236. if (id !== null) {
  2237. if (hasOwnProperty.call(cache20, id)) {
  2238. if (getListeners) {
  2239. conf.emit('get', id, args, this);
  2240. }
  2241. return cache20[id];
  2242. }
  2243. }
  2244. if (args.length === 1) {
  2245. result = call.call(original, this, args[0]);
  2246. } else {
  2247. result = apply.call(original, this, args);
  2248. }
  2249. if (id === null) {
  2250. id = _get(args);
  2251. if (id !== null) {
  2252. throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
  2253. }
  2254. id = set(args);
  2255. } else if (hasOwnProperty.call(cache20, id)) {
  2256. throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
  2257. }
  2258. cache20[id] = result;
  2259. if (setListeners) {
  2260. conf.emit('set', id, null, result);
  2261. }
  2262. return result;
  2263. }, memLength);
  2264. } else if (length === 0) {
  2265. memoized = function memoized() {
  2266. var result;
  2267. if (hasOwnProperty.call(cache20, 'data')) {
  2268. if (getListeners) {
  2269. conf.emit('get', 'data', arguments, this);
  2270. }
  2271. return cache20.data;
  2272. }
  2273. if (arguments.length) {
  2274. result = apply.call(original, this, arguments);
  2275. } else {
  2276. result = call.call(original, this);
  2277. }
  2278. if (hasOwnProperty.call(cache20, 'data')) {
  2279. throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
  2280. }
  2281. cache20.data = result;
  2282. if (setListeners) {
  2283. conf.emit('set', 'data', null, result);
  2284. }
  2285. return result;
  2286. };
  2287. } else {
  2288. memoized = function memoized(arg) {
  2289. var result, args = arguments, id;
  2290. if (resolve) {
  2291. args = resolve(arguments);
  2292. }
  2293. id = String(args[0]);
  2294. if (hasOwnProperty.call(cache20, id)) {
  2295. if (getListeners) {
  2296. conf.emit('get', id, args, this);
  2297. }
  2298. return cache20[id];
  2299. }
  2300. if (args.length === 1) {
  2301. result = call.call(original, this, args[0]);
  2302. } else {
  2303. result = apply.call(original, this, args);
  2304. }
  2305. if (hasOwnProperty.call(cache20, id)) {
  2306. throw customError('Circular invocation', 'CIRCULAR_INVOCATION');
  2307. }
  2308. cache20[id] = result;
  2309. if (setListeners) {
  2310. conf.emit('set', id, null, result);
  2311. }
  2312. return result;
  2313. };
  2314. }
  2315. conf = {
  2316. original: original,
  2317. memoized: memoized,
  2318. profileName: options.profileName,
  2319. get: function get(args) {
  2320. if (resolve) {
  2321. args = resolve(args);
  2322. }
  2323. if (_get) {
  2324. return _get(args);
  2325. }
  2326. return String(args[0]);
  2327. },
  2328. has: function has(id) {
  2329. return hasOwnProperty.call(cache20, id);
  2330. },
  2331. delete: function _delete(id) {
  2332. var result;
  2333. if (!hasOwnProperty.call(cache20, id)) {
  2334. return;
  2335. }
  2336. if (del) {
  2337. del(id);
  2338. }
  2339. result = cache20[id];
  2340. delete cache20[id];
  2341. if (deleteListeners) {
  2342. conf.emit('delete', id, result);
  2343. }
  2344. },
  2345. clear: function clear() {
  2346. var oldCache = cache20;
  2347. if (_clear) {
  2348. _clear();
  2349. }
  2350. cache20 = create(null);
  2351. conf.emit('clear', oldCache);
  2352. },
  2353. on: function on(type, listener) {
  2354. if (type === 'get') {
  2355. getListeners = true;
  2356. } else if (type === 'set') {
  2357. setListeners = true;
  2358. } else if (type === 'delete') {
  2359. deleteListeners = true;
  2360. }
  2361. return _on.call(this, type, listener);
  2362. },
  2363. emit: emit,
  2364. updateEnv: function updateEnv() {
  2365. original = conf.original;
  2366. }
  2367. };
  2368. if (_get) {
  2369. extDel = defineLength(function(arg) {
  2370. var id, args = arguments;
  2371. if (resolve) {
  2372. args = resolve(args);
  2373. }
  2374. id = _get(args);
  2375. if (id === null) {
  2376. return;
  2377. }
  2378. conf['delete'](id);
  2379. }, memLength);
  2380. } else if (length === 0) {
  2381. extDel = function extDel() {
  2382. return conf['delete']('data');
  2383. };
  2384. } else {
  2385. extDel = function extDel(arg) {
  2386. if (resolve) {
  2387. arg = resolve(arguments)[0];
  2388. }
  2389. return conf['delete'](arg);
  2390. };
  2391. }
  2392. extGet = defineLength(function() {
  2393. var id, args = arguments;
  2394. if (length === 0) {
  2395. return cache20.data;
  2396. }
  2397. if (resolve) {
  2398. args = resolve(args);
  2399. }
  2400. if (_get) {
  2401. id = _get(args);
  2402. } else {
  2403. id = String(args[0]);
  2404. }
  2405. return cache20[id];
  2406. });
  2407. extHas = defineLength(function() {
  2408. var id, args = arguments;
  2409. if (length === 0) {
  2410. return conf.has('data');
  2411. }
  2412. if (resolve) {
  2413. args = resolve(args);
  2414. }
  2415. if (_get) {
  2416. id = _get(args);
  2417. } else {
  2418. id = String(args[0]);
  2419. }
  2420. if (id === null) {
  2421. return false;
  2422. }
  2423. return conf.has(id);
  2424. });
  2425. defineProperties(memoized, {
  2426. __memoized__: d(true),
  2427. delete: d(extDel),
  2428. clear: d(conf.clear),
  2429. _get: d(extGet),
  2430. _has: d(extHas)
  2431. });
  2432. return conf;
  2433. };
  2434. });
  2435. var require_plain = __commonJS(function(exports, module) {
  2436. 'use strict';
  2437. var callable = require_valid_callable();
  2438. var forEach = require_for_each();
  2439. var extensions = require_registered_extensions();
  2440. var configure5 = require_configure_map();
  2441. var resolveLength = require_resolve_length();
  2442. module.exports = function self2(fn) {
  2443. var options, length, conf;
  2444. callable(fn);
  2445. options = Object(arguments[1]);
  2446. if (options.async && options.promise) {
  2447. throw new Error('Options \'async\' and \'promise\' cannot be used together');
  2448. }
  2449. if (hasOwnProperty.call(fn, '__memoized__') && !options.force) {
  2450. return fn;
  2451. }
  2452. length = resolveLength(options.length, fn.length, options.async && extensions.async);
  2453. conf = configure5(fn, length, options);
  2454. forEach(extensions, function(extFn, name) {
  2455. if (options[name]) {
  2456. extFn(options[name], conf, options);
  2457. }
  2458. });
  2459. if (self2.__profiler__) {
  2460. self2.__profiler__(conf);
  2461. }
  2462. conf.updateEnv();
  2463. return conf.memoized;
  2464. };
  2465. });
  2466. var require_primitive = __commonJS(function(exports, module) {
  2467. 'use strict';
  2468. module.exports = function(args) {
  2469. var id, i, length = args.length;
  2470. if (!length) {
  2471. return '\x02';
  2472. }
  2473. id = String(args[i = 0]);
  2474. while (--length) {
  2475. id += '\x01' + args[++i];
  2476. }
  2477. return id;
  2478. };
  2479. });
  2480. var require_get_primitive_fixed = __commonJS(function(exports, module) {
  2481. 'use strict';
  2482. module.exports = function(length) {
  2483. if (!length) {
  2484. return function() {
  2485. return '';
  2486. };
  2487. }
  2488. return function(args) {
  2489. var id = String(args[0]), i = 0, currentLength = length;
  2490. while (--currentLength) {
  2491. id += '\x01' + args[++i];
  2492. }
  2493. return id;
  2494. };
  2495. };
  2496. });
  2497. var require_is_implemented8 = __commonJS(function(exports, module) {
  2498. 'use strict';
  2499. module.exports = function() {
  2500. var numberIsNaN = Number.isNaN;
  2501. if (typeof numberIsNaN !== 'function') {
  2502. return false;
  2503. }
  2504. return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);
  2505. };
  2506. });
  2507. var require_shim6 = __commonJS(function(exports, module) {
  2508. 'use strict';
  2509. module.exports = function(value) {
  2510. return value !== value;
  2511. };
  2512. });
  2513. var require_is_nan = __commonJS(function(exports, module) {
  2514. 'use strict';
  2515. module.exports = require_is_implemented8()() ? Number.isNaN : require_shim6();
  2516. });
  2517. var require_e_index_of = __commonJS(function(exports, module) {
  2518. 'use strict';
  2519. var numberIsNaN = require_is_nan();
  2520. var toPosInt = require_to_pos_integer();
  2521. var value = require_valid_value();
  2522. var indexOf = Array.prototype.indexOf;
  2523. var objHasOwnProperty = Object.prototype.hasOwnProperty;
  2524. var abs = Math.abs;
  2525. var floor = Math.floor;
  2526. module.exports = function(searchElement) {
  2527. var i, length, fromIndex, val;
  2528. if (!numberIsNaN(searchElement)) {
  2529. return indexOf.apply(this, arguments);
  2530. }
  2531. length = toPosInt(value(this).length);
  2532. fromIndex = arguments[1];
  2533. if (isNaN(fromIndex)) {
  2534. fromIndex = 0;
  2535. } else if (fromIndex >= 0) {
  2536. fromIndex = floor(fromIndex);
  2537. } else {
  2538. fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
  2539. }
  2540. for (i = fromIndex; i < length; ++i) {
  2541. if (objHasOwnProperty.call(this, i)) {
  2542. val = this[i];
  2543. if (numberIsNaN(val)) {
  2544. return i;
  2545. }
  2546. }
  2547. }
  2548. return -1;
  2549. };
  2550. });
  2551. var require_get = __commonJS(function(exports, module) {
  2552. 'use strict';
  2553. var indexOf = require_e_index_of();
  2554. var create = Object.create;
  2555. module.exports = function() {
  2556. var lastId = 0, map = [], cache20 = create(null);
  2557. return {
  2558. get: function get(args) {
  2559. var index = 0, set = map, i, length = args.length;
  2560. if (length === 0) {
  2561. return set[length] || null;
  2562. }
  2563. if (set = set[length]) {
  2564. while (index < length - 1) {
  2565. i = indexOf.call(set[0], args[index]);
  2566. if (i === -1) {
  2567. return null;
  2568. }
  2569. set = set[1][i];
  2570. ++index;
  2571. }
  2572. i = indexOf.call(set[0], args[index]);
  2573. if (i === -1) {
  2574. return null;
  2575. }
  2576. return set[1][i] || null;
  2577. }
  2578. return null;
  2579. },
  2580. set: function set(args) {
  2581. var index = 0, set = map, i, length = args.length;
  2582. if (length === 0) {
  2583. set[length] = ++lastId;
  2584. } else {
  2585. if (!set[length]) {
  2586. set[length] = [ [], [] ];
  2587. }
  2588. set = set[length];
  2589. while (index < length - 1) {
  2590. i = indexOf.call(set[0], args[index]);
  2591. if (i === -1) {
  2592. i = set[0].push(args[index]) - 1;
  2593. set[1].push([ [], [] ]);
  2594. }
  2595. set = set[1][i];
  2596. ++index;
  2597. }
  2598. i = indexOf.call(set[0], args[index]);
  2599. if (i === -1) {
  2600. i = set[0].push(args[index]) - 1;
  2601. }
  2602. set[1][i] = ++lastId;
  2603. }
  2604. cache20[lastId] = args;
  2605. return lastId;
  2606. },
  2607. delete: function _delete(id) {
  2608. var index = 0, set = map, i, args = cache20[id], length = args.length, path = [];
  2609. if (length === 0) {
  2610. delete set[length];
  2611. } else if (set = set[length]) {
  2612. while (index < length - 1) {
  2613. i = indexOf.call(set[0], args[index]);
  2614. if (i === -1) {
  2615. return;
  2616. }
  2617. path.push(set, i);
  2618. set = set[1][i];
  2619. ++index;
  2620. }
  2621. i = indexOf.call(set[0], args[index]);
  2622. if (i === -1) {
  2623. return;
  2624. }
  2625. id = set[1][i];
  2626. set[0].splice(i, 1);
  2627. set[1].splice(i, 1);
  2628. while (!set[0].length && path.length) {
  2629. i = path.pop();
  2630. set = path.pop();
  2631. set[0].splice(i, 1);
  2632. set[1].splice(i, 1);
  2633. }
  2634. }
  2635. delete cache20[id];
  2636. },
  2637. clear: function clear() {
  2638. map = [];
  2639. cache20 = create(null);
  2640. }
  2641. };
  2642. };
  2643. });
  2644. var require_get_1 = __commonJS(function(exports, module) {
  2645. 'use strict';
  2646. var indexOf = require_e_index_of();
  2647. module.exports = function() {
  2648. var lastId = 0, argsMap = [], cache20 = [];
  2649. return {
  2650. get: function get(args) {
  2651. var index = indexOf.call(argsMap, args[0]);
  2652. return index === -1 ? null : cache20[index];
  2653. },
  2654. set: function set(args) {
  2655. argsMap.push(args[0]);
  2656. cache20.push(++lastId);
  2657. return lastId;
  2658. },
  2659. delete: function _delete(id) {
  2660. var index = indexOf.call(cache20, id);
  2661. if (index !== -1) {
  2662. argsMap.splice(index, 1);
  2663. cache20.splice(index, 1);
  2664. }
  2665. },
  2666. clear: function clear() {
  2667. argsMap = [];
  2668. cache20 = [];
  2669. }
  2670. };
  2671. };
  2672. });
  2673. var require_get_fixed = __commonJS(function(exports, module) {
  2674. 'use strict';
  2675. var indexOf = require_e_index_of();
  2676. var create = Object.create;
  2677. module.exports = function(length) {
  2678. var lastId = 0, map = [ [], [] ], cache20 = create(null);
  2679. return {
  2680. get: function get(args) {
  2681. var index = 0, set = map, i;
  2682. while (index < length - 1) {
  2683. i = indexOf.call(set[0], args[index]);
  2684. if (i === -1) {
  2685. return null;
  2686. }
  2687. set = set[1][i];
  2688. ++index;
  2689. }
  2690. i = indexOf.call(set[0], args[index]);
  2691. if (i === -1) {
  2692. return null;
  2693. }
  2694. return set[1][i] || null;
  2695. },
  2696. set: function set(args) {
  2697. var index = 0, set = map, i;
  2698. while (index < length - 1) {
  2699. i = indexOf.call(set[0], args[index]);
  2700. if (i === -1) {
  2701. i = set[0].push(args[index]) - 1;
  2702. set[1].push([ [], [] ]);
  2703. }
  2704. set = set[1][i];
  2705. ++index;
  2706. }
  2707. i = indexOf.call(set[0], args[index]);
  2708. if (i === -1) {
  2709. i = set[0].push(args[index]) - 1;
  2710. }
  2711. set[1][i] = ++lastId;
  2712. cache20[lastId] = args;
  2713. return lastId;
  2714. },
  2715. delete: function _delete(id) {
  2716. var index = 0, set = map, i, path = [], args = cache20[id];
  2717. while (index < length - 1) {
  2718. i = indexOf.call(set[0], args[index]);
  2719. if (i === -1) {
  2720. return;
  2721. }
  2722. path.push(set, i);
  2723. set = set[1][i];
  2724. ++index;
  2725. }
  2726. i = indexOf.call(set[0], args[index]);
  2727. if (i === -1) {
  2728. return;
  2729. }
  2730. id = set[1][i];
  2731. set[0].splice(i, 1);
  2732. set[1].splice(i, 1);
  2733. while (!set[0].length && path.length) {
  2734. i = path.pop();
  2735. set = path.pop();
  2736. set[0].splice(i, 1);
  2737. set[1].splice(i, 1);
  2738. }
  2739. delete cache20[id];
  2740. },
  2741. clear: function clear() {
  2742. map = [ [], [] ];
  2743. cache20 = create(null);
  2744. }
  2745. };
  2746. };
  2747. });
  2748. var require_map = __commonJS(function(exports, module) {
  2749. 'use strict';
  2750. var callable = require_valid_callable();
  2751. var forEach = require_for_each();
  2752. var call = Function.prototype.call;
  2753. module.exports = function(obj, cb) {
  2754. var result = {}, thisArg = arguments[2];
  2755. callable(cb);
  2756. forEach(obj, function(value, key, targetObj, index) {
  2757. result[key] = call.call(cb, thisArg, value, key, targetObj, index);
  2758. });
  2759. return result;
  2760. };
  2761. });
  2762. var require_next_tick = __commonJS(function(exports, module) {
  2763. 'use strict';
  2764. var callable;
  2765. var byObserver;
  2766. callable = function callable(fn) {
  2767. if (typeof fn !== 'function') {
  2768. throw new TypeError(fn + ' is not a function');
  2769. }
  2770. return fn;
  2771. };
  2772. byObserver = function byObserver(Observer) {
  2773. var node = document.createTextNode(''), queue4, currentQueue, i = 0;
  2774. new Observer(function() {
  2775. var callback;
  2776. if (!queue4) {
  2777. if (!currentQueue) {
  2778. return;
  2779. }
  2780. queue4 = currentQueue;
  2781. } else if (currentQueue) {
  2782. queue4 = currentQueue.concat(queue4);
  2783. }
  2784. currentQueue = queue4;
  2785. queue4 = null;
  2786. if (typeof currentQueue === 'function') {
  2787. callback = currentQueue;
  2788. currentQueue = null;
  2789. callback();
  2790. return;
  2791. }
  2792. node.data = i = ++i % 2;
  2793. while (currentQueue) {
  2794. callback = currentQueue.shift();
  2795. if (!currentQueue.length) {
  2796. currentQueue = null;
  2797. }
  2798. callback();
  2799. }
  2800. }).observe(node, {
  2801. characterData: true
  2802. });
  2803. return function(fn) {
  2804. callable(fn);
  2805. if (queue4) {
  2806. if (typeof queue4 === 'function') {
  2807. queue4 = [ queue4, fn ];
  2808. } else {
  2809. queue4.push(fn);
  2810. }
  2811. return;
  2812. }
  2813. queue4 = fn;
  2814. node.data = i = ++i % 2;
  2815. };
  2816. };
  2817. module.exports = function() {
  2818. if ((typeof process === 'undefined' ? 'undefined' : _typeof(process)) === 'object' && process && typeof process.nextTick === 'function') {
  2819. return process.nextTick;
  2820. }
  2821. if ((typeof document === 'undefined' ? 'undefined' : _typeof(document)) === 'object' && document) {
  2822. if (typeof MutationObserver === 'function') {
  2823. return byObserver(MutationObserver);
  2824. }
  2825. if (typeof WebKitMutationObserver === 'function') {
  2826. return byObserver(WebKitMutationObserver);
  2827. }
  2828. }
  2829. if (typeof setImmediate === 'function') {
  2830. return function(cb) {
  2831. setImmediate(callable(cb));
  2832. };
  2833. }
  2834. if (typeof setTimeout === 'function' || (typeof setTimeout === 'undefined' ? 'undefined' : _typeof(setTimeout)) === 'object') {
  2835. return function(cb) {
  2836. setTimeout(callable(cb), 0);
  2837. };
  2838. }
  2839. return null;
  2840. }();
  2841. });
  2842. var require_async = __commonJS(function() {
  2843. 'use strict';
  2844. var aFrom = require_from();
  2845. var objectMap = require_map();
  2846. var mixin = require_mixin();
  2847. var defineLength = require_define_length();
  2848. var nextTick = require_next_tick();
  2849. var slice = Array.prototype.slice;
  2850. var apply = Function.prototype.apply;
  2851. var create = Object.create;
  2852. require_registered_extensions().async = function(tbi, conf) {
  2853. var waiting = create(null), cache20 = create(null), base = conf.memoized, original = conf.original, currentCallback, currentContext, currentArgs;
  2854. conf.memoized = defineLength(function(arg) {
  2855. var args = arguments, last = args[args.length - 1];
  2856. if (typeof last === 'function') {
  2857. currentCallback = last;
  2858. args = slice.call(args, 0, -1);
  2859. }
  2860. return base.apply(currentContext = this, currentArgs = args);
  2861. }, base);
  2862. try {
  2863. mixin(conf.memoized, base);
  2864. } catch (ignore) {}
  2865. conf.on('get', function(id) {
  2866. var cb, context3, args;
  2867. if (!currentCallback) {
  2868. return;
  2869. }
  2870. if (waiting[id]) {
  2871. if (typeof waiting[id] === 'function') {
  2872. waiting[id] = [ waiting[id], currentCallback ];
  2873. } else {
  2874. waiting[id].push(currentCallback);
  2875. }
  2876. currentCallback = null;
  2877. return;
  2878. }
  2879. cb = currentCallback;
  2880. context3 = currentContext;
  2881. args = currentArgs;
  2882. currentCallback = currentContext = currentArgs = null;
  2883. nextTick(function() {
  2884. var data2;
  2885. if (hasOwnProperty.call(cache20, id)) {
  2886. data2 = cache20[id];
  2887. conf.emit('getasync', id, args, context3);
  2888. apply.call(cb, data2.context, data2.args);
  2889. } else {
  2890. currentCallback = cb;
  2891. currentContext = context3;
  2892. currentArgs = args;
  2893. base.apply(context3, args);
  2894. }
  2895. });
  2896. });
  2897. conf.original = function() {
  2898. var args, cb, origCb, result;
  2899. if (!currentCallback) {
  2900. return apply.call(original, this, arguments);
  2901. }
  2902. args = aFrom(arguments);
  2903. cb = function self2(err2) {
  2904. var cb2, args2, id = self2.id;
  2905. if (id == null) {
  2906. nextTick(apply.bind(self2, this, arguments));
  2907. return void 0;
  2908. }
  2909. delete self2.id;
  2910. cb2 = waiting[id];
  2911. delete waiting[id];
  2912. if (!cb2) {
  2913. return void 0;
  2914. }
  2915. args2 = aFrom(arguments);
  2916. if (conf.has(id)) {
  2917. if (err2) {
  2918. conf['delete'](id);
  2919. } else {
  2920. cache20[id] = {
  2921. context: this,
  2922. args: args2
  2923. };
  2924. conf.emit('setasync', id, typeof cb2 === 'function' ? 1 : cb2.length);
  2925. }
  2926. }
  2927. if (typeof cb2 === 'function') {
  2928. result = apply.call(cb2, this, args2);
  2929. } else {
  2930. cb2.forEach(function(cb3) {
  2931. result = apply.call(cb3, this, args2);
  2932. }, this);
  2933. }
  2934. return result;
  2935. };
  2936. origCb = currentCallback;
  2937. currentCallback = currentContext = currentArgs = null;
  2938. args.push(cb);
  2939. result = apply.call(original, this, args);
  2940. cb.cb = origCb;
  2941. currentCallback = cb;
  2942. return result;
  2943. };
  2944. conf.on('set', function(id) {
  2945. if (!currentCallback) {
  2946. conf['delete'](id);
  2947. return;
  2948. }
  2949. if (waiting[id]) {
  2950. if (typeof waiting[id] === 'function') {
  2951. waiting[id] = [ waiting[id], currentCallback.cb ];
  2952. } else {
  2953. waiting[id].push(currentCallback.cb);
  2954. }
  2955. } else {
  2956. waiting[id] = currentCallback.cb;
  2957. }
  2958. delete currentCallback.cb;
  2959. currentCallback.id = id;
  2960. currentCallback = null;
  2961. });
  2962. conf.on('delete', function(id) {
  2963. var result;
  2964. if (hasOwnProperty.call(waiting, id)) {
  2965. return;
  2966. }
  2967. if (!cache20[id]) {
  2968. return;
  2969. }
  2970. result = cache20[id];
  2971. delete cache20[id];
  2972. conf.emit('deleteasync', id, slice.call(result.args, 1));
  2973. });
  2974. conf.on('clear', function() {
  2975. var oldCache = cache20;
  2976. cache20 = create(null);
  2977. conf.emit('clearasync', objectMap(oldCache, function(data2) {
  2978. return slice.call(data2.args, 1);
  2979. }));
  2980. });
  2981. };
  2982. });
  2983. var require_primitive_set = __commonJS(function(exports, module) {
  2984. 'use strict';
  2985. var forEach = Array.prototype.forEach;
  2986. var create = Object.create;
  2987. module.exports = function(arg) {
  2988. var set = create(null);
  2989. forEach.call(arguments, function(name) {
  2990. set[name] = true;
  2991. });
  2992. return set;
  2993. };
  2994. });
  2995. var require_is_callable = __commonJS(function(exports, module) {
  2996. 'use strict';
  2997. module.exports = function(obj) {
  2998. return typeof obj === 'function';
  2999. };
  3000. });
  3001. var require_validate_stringifiable = __commonJS(function(exports, module) {
  3002. 'use strict';
  3003. var isCallable = require_is_callable();
  3004. module.exports = function(stringifiable) {
  3005. try {
  3006. if (stringifiable && isCallable(stringifiable.toString)) {
  3007. return stringifiable.toString();
  3008. }
  3009. return String(stringifiable);
  3010. } catch (e) {
  3011. throw new TypeError('Passed argument cannot be stringifed');
  3012. }
  3013. };
  3014. });
  3015. var require_validate_stringifiable_value = __commonJS(function(exports, module) {
  3016. 'use strict';
  3017. var ensureValue = require_valid_value();
  3018. var stringifiable = require_validate_stringifiable();
  3019. module.exports = function(value) {
  3020. return stringifiable(ensureValue(value));
  3021. };
  3022. });
  3023. var require_safe_to_string = __commonJS(function(exports, module) {
  3024. 'use strict';
  3025. var isCallable = require_is_callable();
  3026. module.exports = function(value) {
  3027. try {
  3028. if (value && isCallable(value.toString)) {
  3029. return value.toString();
  3030. }
  3031. return String(value);
  3032. } catch (e) {
  3033. return '<Non-coercible to string value>';
  3034. }
  3035. };
  3036. });
  3037. var require_to_short_string_representation = __commonJS(function(exports, module) {
  3038. 'use strict';
  3039. var safeToString = require_safe_to_string();
  3040. var reNewLine = /[\n\r\u2028\u2029]/g;
  3041. module.exports = function(value) {
  3042. var string = safeToString(value);
  3043. if (string.length > 100) {
  3044. string = string.slice(0, 99) + '\u2026';
  3045. }
  3046. string = string.replace(reNewLine, function(_char) {
  3047. return JSON.stringify(_char).slice(1, -1);
  3048. });
  3049. return string;
  3050. };
  3051. });
  3052. var require_is_promise = __commonJS(function(exports, module) {
  3053. module.exports = isPromise;
  3054. module.exports['default'] = isPromise;
  3055. function isPromise(obj) {
  3056. return !!obj && (_typeof(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  3057. }
  3058. });
  3059. var require_promise = __commonJS(function() {
  3060. 'use strict';
  3061. var objectMap = require_map();
  3062. var primitiveSet = require_primitive_set();
  3063. var ensureString = require_validate_stringifiable_value();
  3064. var toShortString = require_to_short_string_representation();
  3065. var isPromise = require_is_promise();
  3066. var nextTick = require_next_tick();
  3067. var create = Object.create;
  3068. var supportedModes = primitiveSet('then', 'then:finally', 'done', 'done:finally');
  3069. require_registered_extensions().promise = function(mode, conf) {
  3070. var waiting = create(null), cache20 = create(null), promises = create(null);
  3071. if (mode === true) {
  3072. mode = null;
  3073. } else {
  3074. mode = ensureString(mode);
  3075. if (!supportedModes[mode]) {
  3076. throw new TypeError('\'' + toShortString(mode) + '\' is not valid promise mode');
  3077. }
  3078. }
  3079. conf.on('set', function(id, ignore, promise) {
  3080. var isFailed = false;
  3081. if (!isPromise(promise)) {
  3082. cache20[id] = promise;
  3083. conf.emit('setasync', id, 1);
  3084. return;
  3085. }
  3086. waiting[id] = 1;
  3087. promises[id] = promise;
  3088. var onSuccess = function onSuccess(result) {
  3089. var count = waiting[id];
  3090. if (isFailed) {
  3091. 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)\nConsider to rely on \'then\' or \'done\' mode instead.');
  3092. }
  3093. if (!count) {
  3094. return;
  3095. }
  3096. delete waiting[id];
  3097. cache20[id] = result;
  3098. conf.emit('setasync', id, count);
  3099. };
  3100. var onFailure = function onFailure() {
  3101. isFailed = true;
  3102. if (!waiting[id]) {
  3103. return;
  3104. }
  3105. delete waiting[id];
  3106. delete promises[id];
  3107. conf['delete'](id);
  3108. };
  3109. var resolvedMode = mode;
  3110. if (!resolvedMode) {
  3111. resolvedMode = 'then';
  3112. }
  3113. if (resolvedMode === 'then') {
  3114. var nextTickFailure = function nextTickFailure() {
  3115. nextTick(onFailure);
  3116. };
  3117. promise = promise.then(function(result) {
  3118. nextTick(onSuccess.bind(this, result));
  3119. }, nextTickFailure);
  3120. if (typeof promise['finally'] === 'function') {
  3121. promise['finally'](nextTickFailure);
  3122. }
  3123. } else if (resolvedMode === 'done') {
  3124. if (typeof promise.done !== 'function') {
  3125. throw new Error('Memoizee error: Retrieved promise does not implement \'done\' in \'done\' mode');
  3126. }
  3127. promise.done(onSuccess, onFailure);
  3128. } else if (resolvedMode === 'done:finally') {
  3129. if (typeof promise.done !== 'function') {
  3130. throw new Error('Memoizee error: Retrieved promise does not implement \'done\' in \'done:finally\' mode');
  3131. }
  3132. if (typeof promise['finally'] !== 'function') {
  3133. throw new Error('Memoizee error: Retrieved promise does not implement \'finally\' in \'done:finally\' mode');
  3134. }
  3135. promise.done(onSuccess);
  3136. promise['finally'](onFailure);
  3137. }
  3138. });
  3139. conf.on('get', function(id, args, context3) {
  3140. var promise;
  3141. if (waiting[id]) {
  3142. ++waiting[id];
  3143. return;
  3144. }
  3145. promise = promises[id];
  3146. var emit = function emit() {
  3147. conf.emit('getasync', id, args, context3);
  3148. };
  3149. if (isPromise(promise)) {
  3150. if (typeof promise.done === 'function') {
  3151. promise.done(emit);
  3152. } else {
  3153. promise.then(function() {
  3154. nextTick(emit);
  3155. });
  3156. }
  3157. } else {
  3158. emit();
  3159. }
  3160. });
  3161. conf.on('delete', function(id) {
  3162. delete promises[id];
  3163. if (waiting[id]) {
  3164. delete waiting[id];
  3165. return;
  3166. }
  3167. if (!hasOwnProperty.call(cache20, id)) {
  3168. return;
  3169. }
  3170. var result = cache20[id];
  3171. delete cache20[id];
  3172. conf.emit('deleteasync', id, [ result ]);
  3173. });
  3174. conf.on('clear', function() {
  3175. var oldCache = cache20;
  3176. cache20 = create(null);
  3177. waiting = create(null);
  3178. promises = create(null);
  3179. conf.emit('clearasync', objectMap(oldCache, function(data2) {
  3180. return [ data2 ];
  3181. }));
  3182. });
  3183. };
  3184. });
  3185. var require_dispose = __commonJS(function() {
  3186. 'use strict';
  3187. var callable = require_valid_callable();
  3188. var forEach = require_for_each();
  3189. var extensions = require_registered_extensions();
  3190. var apply = Function.prototype.apply;
  3191. extensions.dispose = function(dispose, conf, options) {
  3192. var del;
  3193. callable(dispose);
  3194. if (options.async && extensions.async || options.promise && extensions.promise) {
  3195. conf.on('deleteasync', del = function del(id, resultArray) {
  3196. apply.call(dispose, null, resultArray);
  3197. });
  3198. conf.on('clearasync', function(cache20) {
  3199. forEach(cache20, function(result, id) {
  3200. del(id, result);
  3201. });
  3202. });
  3203. return;
  3204. }
  3205. conf.on('delete', del = function del(id, result) {
  3206. dispose(result);
  3207. });
  3208. conf.on('clear', function(cache20) {
  3209. forEach(cache20, function(result, id) {
  3210. del(id, result);
  3211. });
  3212. });
  3213. };
  3214. });
  3215. var require_max_timeout = __commonJS(function(exports, module) {
  3216. 'use strict';
  3217. module.exports = 2147483647;
  3218. });
  3219. var require_valid_timeout = __commonJS(function(exports, module) {
  3220. 'use strict';
  3221. var toPosInt = require_to_pos_integer();
  3222. var maxTimeout = require_max_timeout();
  3223. module.exports = function(value) {
  3224. value = toPosInt(value);
  3225. if (value > maxTimeout) {
  3226. throw new TypeError(value + ' exceeds maximum possible timeout');
  3227. }
  3228. return value;
  3229. };
  3230. });
  3231. var require_max_age = __commonJS(function() {
  3232. 'use strict';
  3233. var aFrom = require_from();
  3234. var forEach = require_for_each();
  3235. var nextTick = require_next_tick();
  3236. var isPromise = require_is_promise();
  3237. var timeout = require_valid_timeout();
  3238. var extensions = require_registered_extensions();
  3239. var noop4 = Function.prototype;
  3240. var max = Math.max;
  3241. var min = Math.min;
  3242. var create = Object.create;
  3243. extensions.maxAge = function(maxAge, conf, options) {
  3244. var timeouts, postfix, preFetchAge, preFetchTimeouts;
  3245. maxAge = timeout(maxAge);
  3246. if (!maxAge) {
  3247. return;
  3248. }
  3249. timeouts = create(null);
  3250. postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';
  3251. conf.on('set' + postfix, function(id) {
  3252. timeouts[id] = setTimeout(function() {
  3253. conf['delete'](id);
  3254. }, maxAge);
  3255. if (typeof timeouts[id].unref === 'function') {
  3256. timeouts[id].unref();
  3257. }
  3258. if (!preFetchTimeouts) {
  3259. return;
  3260. }
  3261. if (preFetchTimeouts[id]) {
  3262. if (preFetchTimeouts[id] !== 'nextTick') {
  3263. clearTimeout(preFetchTimeouts[id]);
  3264. }
  3265. }
  3266. preFetchTimeouts[id] = setTimeout(function() {
  3267. delete preFetchTimeouts[id];
  3268. }, preFetchAge);
  3269. if (typeof preFetchTimeouts[id].unref === 'function') {
  3270. preFetchTimeouts[id].unref();
  3271. }
  3272. });
  3273. conf.on('delete' + postfix, function(id) {
  3274. clearTimeout(timeouts[id]);
  3275. delete timeouts[id];
  3276. if (!preFetchTimeouts) {
  3277. return;
  3278. }
  3279. if (preFetchTimeouts[id] !== 'nextTick') {
  3280. clearTimeout(preFetchTimeouts[id]);
  3281. }
  3282. delete preFetchTimeouts[id];
  3283. });
  3284. if (options.preFetch) {
  3285. if (options.preFetch === true || isNaN(options.preFetch)) {
  3286. preFetchAge = .333;
  3287. } else {
  3288. preFetchAge = max(min(Number(options.preFetch), 1), 0);
  3289. }
  3290. if (preFetchAge) {
  3291. preFetchTimeouts = {};
  3292. preFetchAge = (1 - preFetchAge) * maxAge;
  3293. conf.on('get' + postfix, function(id, args, context3) {
  3294. if (!preFetchTimeouts[id]) {
  3295. preFetchTimeouts[id] = 'nextTick';
  3296. nextTick(function() {
  3297. var result;
  3298. if (preFetchTimeouts[id] !== 'nextTick') {
  3299. return;
  3300. }
  3301. delete preFetchTimeouts[id];
  3302. conf['delete'](id);
  3303. if (options.async) {
  3304. args = aFrom(args);
  3305. args.push(noop4);
  3306. }
  3307. result = conf.memoized.apply(context3, args);
  3308. if (options.promise) {
  3309. if (isPromise(result)) {
  3310. if (typeof result.done === 'function') {
  3311. result.done(noop4, noop4);
  3312. } else {
  3313. result.then(noop4, noop4);
  3314. }
  3315. }
  3316. }
  3317. });
  3318. }
  3319. });
  3320. }
  3321. }
  3322. conf.on('clear' + postfix, function() {
  3323. forEach(timeouts, function(id) {
  3324. clearTimeout(id);
  3325. });
  3326. timeouts = {};
  3327. if (preFetchTimeouts) {
  3328. forEach(preFetchTimeouts, function(id) {
  3329. if (id !== 'nextTick') {
  3330. clearTimeout(id);
  3331. }
  3332. });
  3333. preFetchTimeouts = {};
  3334. }
  3335. });
  3336. };
  3337. });
  3338. var require_lru_queue = __commonJS(function(exports, module) {
  3339. 'use strict';
  3340. var toPosInt = require_to_pos_integer();
  3341. var create = Object.create;
  3342. var hasOwnProperty2 = Object.prototype.hasOwnProperty;
  3343. module.exports = function(limit) {
  3344. var size = 0, base = 1, queue4 = create(null), map = create(null), index = 0, del;
  3345. limit = toPosInt(limit);
  3346. return {
  3347. hit: function hit(id) {
  3348. var oldIndex = map[id], nuIndex = ++index;
  3349. queue4[nuIndex] = id;
  3350. map[id] = nuIndex;
  3351. if (!oldIndex) {
  3352. ++size;
  3353. if (size <= limit) {
  3354. return;
  3355. }
  3356. id = queue4[base];
  3357. del(id);
  3358. return id;
  3359. }
  3360. delete queue4[oldIndex];
  3361. if (base !== oldIndex) {
  3362. return;
  3363. }
  3364. while (!hasOwnProperty2.call(queue4, ++base)) {
  3365. continue;
  3366. }
  3367. },
  3368. delete: del = function del(id) {
  3369. var oldIndex = map[id];
  3370. if (!oldIndex) {
  3371. return;
  3372. }
  3373. delete queue4[oldIndex];
  3374. delete map[id];
  3375. --size;
  3376. if (base !== oldIndex) {
  3377. return;
  3378. }
  3379. if (!size) {
  3380. index = 0;
  3381. base = 1;
  3382. return;
  3383. }
  3384. while (!hasOwnProperty2.call(queue4, ++base)) {
  3385. continue;
  3386. }
  3387. },
  3388. clear: function clear() {
  3389. size = 0;
  3390. base = 1;
  3391. queue4 = create(null);
  3392. map = create(null);
  3393. index = 0;
  3394. }
  3395. };
  3396. };
  3397. });
  3398. var require_max = __commonJS(function() {
  3399. 'use strict';
  3400. var toPosInteger = require_to_pos_integer();
  3401. var lruQueue = require_lru_queue();
  3402. var extensions = require_registered_extensions();
  3403. extensions.max = function(max, conf, options) {
  3404. var postfix, queue4, hit;
  3405. max = toPosInteger(max);
  3406. if (!max) {
  3407. return;
  3408. }
  3409. queue4 = lruQueue(max);
  3410. postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';
  3411. conf.on('set' + postfix, hit = function hit(id) {
  3412. id = queue4.hit(id);
  3413. if (id === void 0) {
  3414. return;
  3415. }
  3416. conf['delete'](id);
  3417. });
  3418. conf.on('get' + postfix, hit);
  3419. conf.on('delete' + postfix, queue4['delete']);
  3420. conf.on('clear' + postfix, queue4.clear);
  3421. };
  3422. });
  3423. var require_ref_counter = __commonJS(function() {
  3424. 'use strict';
  3425. var d = require_d();
  3426. var extensions = require_registered_extensions();
  3427. var create = Object.create;
  3428. var defineProperties = Object.defineProperties;
  3429. extensions.refCounter = function(ignore, conf, options) {
  3430. var cache20, postfix;
  3431. cache20 = create(null);
  3432. postfix = options.async && extensions.async || options.promise && extensions.promise ? 'async' : '';
  3433. conf.on('set' + postfix, function(id, length) {
  3434. cache20[id] = length || 1;
  3435. });
  3436. conf.on('get' + postfix, function(id) {
  3437. ++cache20[id];
  3438. });
  3439. conf.on('delete' + postfix, function(id) {
  3440. delete cache20[id];
  3441. });
  3442. conf.on('clear' + postfix, function() {
  3443. cache20 = {};
  3444. });
  3445. defineProperties(conf.memoized, {
  3446. deleteRef: d(function() {
  3447. var id = conf.get(arguments);
  3448. if (id === null) {
  3449. return null;
  3450. }
  3451. if (!cache20[id]) {
  3452. return null;
  3453. }
  3454. if (!--cache20[id]) {
  3455. conf['delete'](id);
  3456. return true;
  3457. }
  3458. return false;
  3459. }),
  3460. getRefCount: d(function() {
  3461. var id = conf.get(arguments);
  3462. if (id === null) {
  3463. return 0;
  3464. }
  3465. if (!cache20[id]) {
  3466. return 0;
  3467. }
  3468. return cache20[id];
  3469. })
  3470. });
  3471. };
  3472. });
  3473. var require_memoizee = __commonJS(function(exports, module) {
  3474. 'use strict';
  3475. var normalizeOpts = require_normalize_options();
  3476. var resolveLength = require_resolve_length();
  3477. var plain = require_plain();
  3478. module.exports = function(fn) {
  3479. var options = normalizeOpts(arguments[1]), length;
  3480. if (!options.normalizer) {
  3481. length = options.length = resolveLength(options.length, fn.length, options.async);
  3482. if (length !== 0) {
  3483. if (options.primitive) {
  3484. if (length === false) {
  3485. options.normalizer = require_primitive();
  3486. } else if (length > 1) {
  3487. options.normalizer = require_get_primitive_fixed()(length);
  3488. }
  3489. } else if (length === false) {
  3490. options.normalizer = require_get()();
  3491. } else if (length === 1) {
  3492. options.normalizer = require_get_1()();
  3493. } else {
  3494. options.normalizer = require_get_fixed()(length);
  3495. }
  3496. }
  3497. }
  3498. if (options.async) {
  3499. require_async();
  3500. }
  3501. if (options.promise) {
  3502. require_promise();
  3503. }
  3504. if (options.dispose) {
  3505. require_dispose();
  3506. }
  3507. if (options.maxAge) {
  3508. require_max_age();
  3509. }
  3510. if (options.max) {
  3511. require_max();
  3512. }
  3513. if (options.refCounter) {
  3514. require_ref_counter();
  3515. }
  3516. return plain(fn, options);
  3517. };
  3518. });
  3519. var require_emoji_regex = __commonJS(function(exports, module) {
  3520. 'use strict';
  3521. module.exports = function() {
  3522. 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;
  3523. };
  3524. });
  3525. var require_doT = __commonJS(function(exports, module) {
  3526. (function() {
  3527. 'use strict';
  3528. var doT3 = {
  3529. name: 'doT',
  3530. version: '1.1.1',
  3531. templateSettings: {
  3532. evaluate: /\{\{([\s\S]+?(\}?)+)\}\}/g,
  3533. interpolate: /\{\{=([\s\S]+?)\}\}/g,
  3534. encode: /\{\{!([\s\S]+?)\}\}/g,
  3535. use: /\{\{#([\s\S]+?)\}\}/g,
  3536. useParams: /(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,
  3537. define: /\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,
  3538. defineParams: /^\s*([\w$]+):([\s\S]+)/,
  3539. conditional: /\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,
  3540. iterate: /\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,
  3541. varname: 'it',
  3542. strip: true,
  3543. append: true,
  3544. selfcontained: false,
  3545. doNotSkipEncoded: false
  3546. },
  3547. template: void 0,
  3548. compile: void 0,
  3549. log: true
  3550. };
  3551. (function() {
  3552. if ((typeof globalThis === 'undefined' ? 'undefined' : _typeof(globalThis)) === 'object') {
  3553. return;
  3554. }
  3555. try {
  3556. Object.defineProperty(Object.prototype, '__magic__', {
  3557. get: function get() {
  3558. return this;
  3559. },
  3560. configurable: true
  3561. });
  3562. __magic__.globalThis = __magic__;
  3563. delete Object.prototype.__magic__;
  3564. } catch (e) {
  3565. window.globalThis = function() {
  3566. if (typeof self !== 'undefined') {
  3567. return self;
  3568. }
  3569. if (typeof window !== 'undefined') {
  3570. return window;
  3571. }
  3572. if (typeof global !== 'undefined') {
  3573. return global;
  3574. }
  3575. if (typeof this !== 'undefined') {
  3576. return this;
  3577. }
  3578. throw new Error('Unable to locate global `this`');
  3579. }();
  3580. }
  3581. })();
  3582. doT3.encodeHTMLSource = function(doNotSkipEncoded) {
  3583. var encodeHTMLRules = {
  3584. '&': '&#38;',
  3585. '<': '&#60;',
  3586. '>': '&#62;',
  3587. '"': '&#34;',
  3588. '\'': '&#39;',
  3589. '/': '&#47;'
  3590. }, matchHTML = doNotSkipEncoded ? /[&<>"'\/]/g : /&(?!#?\w+;)|<|>|"|'|\//g;
  3591. return function(code) {
  3592. return code ? code.toString().replace(matchHTML, function(m) {
  3593. return encodeHTMLRules[m] || m;
  3594. }) : '';
  3595. };
  3596. };
  3597. if (typeof module !== 'undefined' && module.exports) {
  3598. module.exports = doT3;
  3599. } else if (typeof define === 'function' && define.amd) {
  3600. define(function() {
  3601. return doT3;
  3602. });
  3603. } else {
  3604. globalThis.doT = doT3;
  3605. }
  3606. var startend = {
  3607. append: {
  3608. start: '\'+(',
  3609. end: ')+\'',
  3610. startencode: '\'+encodeHTML('
  3611. },
  3612. split: {
  3613. start: '\';out+=(',
  3614. end: ');out+=\'',
  3615. startencode: '\';out+=encodeHTML('
  3616. }
  3617. }, skip = /$^/;
  3618. function resolveDefs(c, block, def) {
  3619. return (typeof block === 'string' ? block : block.toString()).replace(c.define || skip, function(m, code, assign, value) {
  3620. if (code.indexOf('def.') === 0) {
  3621. code = code.substring(4);
  3622. }
  3623. if (!(code in def)) {
  3624. if (assign === ':') {
  3625. if (c.defineParams) {
  3626. value.replace(c.defineParams, function(m2, param, v) {
  3627. def[code] = {
  3628. arg: param,
  3629. text: v
  3630. };
  3631. });
  3632. }
  3633. if (!(code in def)) {
  3634. def[code] = value;
  3635. }
  3636. } else {
  3637. new Function('def', 'def[\'' + code + '\']=' + value)(def);
  3638. }
  3639. }
  3640. return '';
  3641. }).replace(c.use || skip, function(m, code) {
  3642. if (c.useParams) {
  3643. code = code.replace(c.useParams, function(m2, s, d, param) {
  3644. if (def[d] && def[d].arg && param) {
  3645. var rw = (d + ':' + param).replace(/'|\\/g, '_');
  3646. def.__exp = def.__exp || {};
  3647. def.__exp[rw] = def[d].text.replace(new RegExp('(^|[^\\w$])' + def[d].arg + '([^\\w$])', 'g'), '$1' + param + '$2');
  3648. return s + 'def.__exp[\'' + rw + '\']';
  3649. }
  3650. });
  3651. }
  3652. var v = new Function('def', 'return ' + code)(def);
  3653. return v ? resolveDefs(c, v, def) : v;
  3654. });
  3655. }
  3656. function unescape(code) {
  3657. return code.replace(/\\('|\\)/g, '$1').replace(/[\r\t\n]/g, ' ');
  3658. }
  3659. doT3.template = function(tmpl, c, def) {
  3660. c = c || doT3.templateSettings;
  3661. var cse = c.append ? startend.append : startend.split, needhtmlencode, sid = 0, indv, str = c.use || c.define ? resolveDefs(c, tmpl, def || {}) : tmpl;
  3662. 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) {
  3663. return cse.start + unescape(code) + cse.end;
  3664. }).replace(c.encode || skip, function(m, code) {
  3665. needhtmlencode = true;
  3666. return cse.startencode + unescape(code) + cse.end;
  3667. }).replace(c.conditional || skip, function(m, elsecase, code) {
  3668. return elsecase ? code ? '\';}else if(' + unescape(code) + '){out+=\'' : '\';}else{out+=\'' : code ? '\';if(' + unescape(code) + '){out+=\'' : '\';}out+=\'';
  3669. }).replace(c.iterate || skip, function(m, iterate, vname, iname) {
  3670. if (!iterate) {
  3671. return '\';} } out+=\'';
  3672. }
  3673. sid += 1;
  3674. indv = iname || 'i' + sid;
  3675. iterate = unescape(iterate);
  3676. 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+=\'';
  3677. }).replace(c.evaluate || skip, function(m, code) {
  3678. return '\';' + unescape(code) + 'out+=\'';
  3679. }) + '\';return out;').replace(/\n/g, '\\n').replace(/\t/g, '\\t').replace(/\r/g, '\\r').replace(/(\s|;|\}|^|\{)out\+='';/g, '$1').replace(/\+''/g, '');
  3680. if (needhtmlencode) {
  3681. if (!c.selfcontained && globalThis && !globalThis._encodeHTML) {
  3682. globalThis._encodeHTML = doT3.encodeHTMLSource(c.doNotSkipEncoded);
  3683. }
  3684. str = 'var encodeHTML = typeof _encodeHTML !== \'undefined\' ? _encodeHTML : (' + doT3.encodeHTMLSource.toString() + '(' + (c.doNotSkipEncoded || '') + '));' + str;
  3685. }
  3686. try {
  3687. return new Function(c.varname, str);
  3688. } catch (e) {
  3689. if (typeof console !== 'undefined') {
  3690. console.log('Could not create a template function: ' + str);
  3691. }
  3692. throw e;
  3693. }
  3694. };
  3695. doT3.compile = function(tmpl, def) {
  3696. return doT3.template(tmpl, null, def);
  3697. };
  3698. })();
  3699. });
  3700. var require_es6_promise = __commonJS(function(exports, module) {
  3701. (function(global2, factory) {
  3702. _typeof(exports) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global2.ES6Promise = factory();
  3703. })(exports, function() {
  3704. 'use strict';
  3705. function objectOrFunction(x) {
  3706. var type = _typeof(x);
  3707. return x !== null && (type === 'object' || type === 'function');
  3708. }
  3709. function isFunction(x) {
  3710. return typeof x === 'function';
  3711. }
  3712. var _isArray = void 0;
  3713. if (Array.isArray) {
  3714. _isArray = Array.isArray;
  3715. } else {
  3716. _isArray = function _isArray(x) {
  3717. return Object.prototype.toString.call(x) === '[object Array]';
  3718. };
  3719. }
  3720. var isArray = _isArray;
  3721. var len = 0;
  3722. var vertxNext = void 0;
  3723. var customSchedulerFn = void 0;
  3724. var asap = function asap2(callback, arg) {
  3725. queue4[len] = callback;
  3726. queue4[len + 1] = arg;
  3727. len += 2;
  3728. if (len === 2) {
  3729. if (customSchedulerFn) {
  3730. customSchedulerFn(flush);
  3731. } else {
  3732. scheduleFlush();
  3733. }
  3734. }
  3735. };
  3736. function setScheduler(scheduleFn) {
  3737. customSchedulerFn = scheduleFn;
  3738. }
  3739. function setAsap(asapFn) {
  3740. asap = asapFn;
  3741. }
  3742. var browserWindow = typeof window !== 'undefined' ? window : void 0;
  3743. var browserGlobal = browserWindow || {};
  3744. var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
  3745. var isNode2 = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
  3746. var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
  3747. function useNextTick() {
  3748. return function() {
  3749. return process.nextTick(flush);
  3750. };
  3751. }
  3752. function useVertxTimer() {
  3753. if (typeof vertxNext !== 'undefined') {
  3754. return function() {
  3755. vertxNext(flush);
  3756. };
  3757. }
  3758. return useSetTimeout();
  3759. }
  3760. function useMutationObserver() {
  3761. var iterations = 0;
  3762. var observer = new BrowserMutationObserver(flush);
  3763. var node = document.createTextNode('');
  3764. observer.observe(node, {
  3765. characterData: true
  3766. });
  3767. return function() {
  3768. node.data = iterations = ++iterations % 2;
  3769. };
  3770. }
  3771. function useMessageChannel() {
  3772. var channel = new MessageChannel();
  3773. channel.port1.onmessage = flush;
  3774. return function() {
  3775. return channel.port2.postMessage(0);
  3776. };
  3777. }
  3778. function useSetTimeout() {
  3779. var globalSetTimeout = setTimeout;
  3780. return function() {
  3781. return globalSetTimeout(flush, 1);
  3782. };
  3783. }
  3784. var queue4 = new Array(1e3);
  3785. function flush() {
  3786. for (var i = 0; i < len; i += 2) {
  3787. var callback = queue4[i];
  3788. var arg = queue4[i + 1];
  3789. callback(arg);
  3790. queue4[i] = void 0;
  3791. queue4[i + 1] = void 0;
  3792. }
  3793. len = 0;
  3794. }
  3795. function attemptVertx() {
  3796. try {
  3797. var vertx = Function('return this')().require('vertx');
  3798. vertxNext = vertx.runOnLoop || vertx.runOnContext;
  3799. return useVertxTimer();
  3800. } catch (e) {
  3801. return useSetTimeout();
  3802. }
  3803. }
  3804. var scheduleFlush = void 0;
  3805. if (isNode2) {
  3806. scheduleFlush = useNextTick();
  3807. } else if (BrowserMutationObserver) {
  3808. scheduleFlush = useMutationObserver();
  3809. } else if (isWorker) {
  3810. scheduleFlush = useMessageChannel();
  3811. } else if (browserWindow === void 0 && true) {
  3812. scheduleFlush = attemptVertx();
  3813. } else {
  3814. scheduleFlush = useSetTimeout();
  3815. }
  3816. function then(onFulfillment, onRejection) {
  3817. var parent = this;
  3818. var child = new this.constructor(noop4);
  3819. if (child[PROMISE_ID] === void 0) {
  3820. makePromise(child);
  3821. }
  3822. var _state = parent._state;
  3823. if (_state) {
  3824. var callback = arguments[_state - 1];
  3825. asap(function() {
  3826. return invokeCallback(_state, child, callback, parent._result);
  3827. });
  3828. } else {
  3829. subscribe2(parent, child, onFulfillment, onRejection);
  3830. }
  3831. return child;
  3832. }
  3833. function resolve$1(object) {
  3834. var Constructor = this;
  3835. if (object && _typeof(object) === 'object' && object.constructor === Constructor) {
  3836. return object;
  3837. }
  3838. var promise = new Constructor(noop4);
  3839. resolve(promise, object);
  3840. return promise;
  3841. }
  3842. var PROMISE_ID = Math.random().toString(36).substring(2);
  3843. function noop4() {}
  3844. var PENDING = void 0;
  3845. var FULFILLED = 1;
  3846. var REJECTED = 2;
  3847. function selfFulfillment() {
  3848. return new TypeError('You cannot resolve a promise with itself');
  3849. }
  3850. function cannotReturnOwn() {
  3851. return new TypeError('A promises callback cannot return that same promise.');
  3852. }
  3853. function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
  3854. try {
  3855. then$$1.call(value, fulfillmentHandler, rejectionHandler);
  3856. } catch (e) {
  3857. return e;
  3858. }
  3859. }
  3860. function handleForeignThenable(promise, thenable, then$$1) {
  3861. asap(function(promise2) {
  3862. var sealed = false;
  3863. var error = tryThen(then$$1, thenable, function(value) {
  3864. if (sealed) {
  3865. return;
  3866. }
  3867. sealed = true;
  3868. if (thenable !== value) {
  3869. resolve(promise2, value);
  3870. } else {
  3871. fulfill(promise2, value);
  3872. }
  3873. }, function(reason) {
  3874. if (sealed) {
  3875. return;
  3876. }
  3877. sealed = true;
  3878. reject(promise2, reason);
  3879. }, 'Settle: ' + (promise2._label || ' unknown promise'));
  3880. if (!sealed && error) {
  3881. sealed = true;
  3882. reject(promise2, error);
  3883. }
  3884. }, promise);
  3885. }
  3886. function handleOwnThenable(promise, thenable) {
  3887. if (thenable._state === FULFILLED) {
  3888. fulfill(promise, thenable._result);
  3889. } else if (thenable._state === REJECTED) {
  3890. reject(promise, thenable._result);
  3891. } else {
  3892. subscribe2(thenable, void 0, function(value) {
  3893. return resolve(promise, value);
  3894. }, function(reason) {
  3895. return reject(promise, reason);
  3896. });
  3897. }
  3898. }
  3899. function handleMaybeThenable(promise, maybeThenable, then$$1) {
  3900. if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
  3901. handleOwnThenable(promise, maybeThenable);
  3902. } else {
  3903. if (then$$1 === void 0) {
  3904. fulfill(promise, maybeThenable);
  3905. } else if (isFunction(then$$1)) {
  3906. handleForeignThenable(promise, maybeThenable, then$$1);
  3907. } else {
  3908. fulfill(promise, maybeThenable);
  3909. }
  3910. }
  3911. }
  3912. function resolve(promise, value) {
  3913. if (promise === value) {
  3914. reject(promise, selfFulfillment());
  3915. } else if (objectOrFunction(value)) {
  3916. var then$$1 = void 0;
  3917. try {
  3918. then$$1 = value.then;
  3919. } catch (error) {
  3920. reject(promise, error);
  3921. return;
  3922. }
  3923. handleMaybeThenable(promise, value, then$$1);
  3924. } else {
  3925. fulfill(promise, value);
  3926. }
  3927. }
  3928. function publishRejection(promise) {
  3929. if (promise._onerror) {
  3930. promise._onerror(promise._result);
  3931. }
  3932. publish(promise);
  3933. }
  3934. function fulfill(promise, value) {
  3935. if (promise._state !== PENDING) {
  3936. return;
  3937. }
  3938. promise._result = value;
  3939. promise._state = FULFILLED;
  3940. if (promise._subscribers.length !== 0) {
  3941. asap(publish, promise);
  3942. }
  3943. }
  3944. function reject(promise, reason) {
  3945. if (promise._state !== PENDING) {
  3946. return;
  3947. }
  3948. promise._state = REJECTED;
  3949. promise._result = reason;
  3950. asap(publishRejection, promise);
  3951. }
  3952. function subscribe2(parent, child, onFulfillment, onRejection) {
  3953. var _subscribers = parent._subscribers;
  3954. var length = _subscribers.length;
  3955. parent._onerror = null;
  3956. _subscribers[length] = child;
  3957. _subscribers[length + FULFILLED] = onFulfillment;
  3958. _subscribers[length + REJECTED] = onRejection;
  3959. if (length === 0 && parent._state) {
  3960. asap(publish, parent);
  3961. }
  3962. }
  3963. function publish(promise) {
  3964. var subscribers = promise._subscribers;
  3965. var settled = promise._state;
  3966. if (subscribers.length === 0) {
  3967. return;
  3968. }
  3969. var child = void 0, callback = void 0, detail = promise._result;
  3970. for (var i = 0; i < subscribers.length; i += 3) {
  3971. child = subscribers[i];
  3972. callback = subscribers[i + settled];
  3973. if (child) {
  3974. invokeCallback(settled, child, callback, detail);
  3975. } else {
  3976. callback(detail);
  3977. }
  3978. }
  3979. promise._subscribers.length = 0;
  3980. }
  3981. function invokeCallback(settled, promise, callback, detail) {
  3982. var hasCallback = isFunction(callback), value = void 0, error = void 0, succeeded = true;
  3983. if (hasCallback) {
  3984. try {
  3985. value = callback(detail);
  3986. } catch (e) {
  3987. succeeded = false;
  3988. error = e;
  3989. }
  3990. if (promise === value) {
  3991. reject(promise, cannotReturnOwn());
  3992. return;
  3993. }
  3994. } else {
  3995. value = detail;
  3996. }
  3997. if (promise._state !== PENDING) {} else if (hasCallback && succeeded) {
  3998. resolve(promise, value);
  3999. } else if (succeeded === false) {
  4000. reject(promise, error);
  4001. } else if (settled === FULFILLED) {
  4002. fulfill(promise, value);
  4003. } else if (settled === REJECTED) {
  4004. reject(promise, value);
  4005. }
  4006. }
  4007. function initializePromise(promise, resolver) {
  4008. try {
  4009. resolver(function resolvePromise(value) {
  4010. resolve(promise, value);
  4011. }, function rejectPromise(reason) {
  4012. reject(promise, reason);
  4013. });
  4014. } catch (e) {
  4015. reject(promise, e);
  4016. }
  4017. }
  4018. var id = 0;
  4019. function nextId() {
  4020. return id++;
  4021. }
  4022. function makePromise(promise) {
  4023. promise[PROMISE_ID] = id++;
  4024. promise._state = void 0;
  4025. promise._result = void 0;
  4026. promise._subscribers = [];
  4027. }
  4028. function validationError() {
  4029. return new Error('Array Methods must be provided an Array');
  4030. }
  4031. var Enumerator = function() {
  4032. function Enumerator2(Constructor, input) {
  4033. this._instanceConstructor = Constructor;
  4034. this.promise = new Constructor(noop4);
  4035. if (!this.promise[PROMISE_ID]) {
  4036. makePromise(this.promise);
  4037. }
  4038. if (isArray(input)) {
  4039. this.length = input.length;
  4040. this._remaining = input.length;
  4041. this._result = new Array(this.length);
  4042. if (this.length === 0) {
  4043. fulfill(this.promise, this._result);
  4044. } else {
  4045. this.length = this.length || 0;
  4046. this._enumerate(input);
  4047. if (this._remaining === 0) {
  4048. fulfill(this.promise, this._result);
  4049. }
  4050. }
  4051. } else {
  4052. reject(this.promise, validationError());
  4053. }
  4054. }
  4055. Enumerator2.prototype._enumerate = function _enumerate(input) {
  4056. for (var i = 0; this._state === PENDING && i < input.length; i++) {
  4057. this._eachEntry(input[i], i);
  4058. }
  4059. };
  4060. Enumerator2.prototype._eachEntry = function _eachEntry(entry, i) {
  4061. var c = this._instanceConstructor;
  4062. var resolve$$1 = c.resolve;
  4063. if (resolve$$1 === resolve$1) {
  4064. var _then = void 0;
  4065. var error = void 0;
  4066. var didError = false;
  4067. try {
  4068. _then = entry.then;
  4069. } catch (e) {
  4070. didError = true;
  4071. error = e;
  4072. }
  4073. if (_then === then && entry._state !== PENDING) {
  4074. this._settledAt(entry._state, i, entry._result);
  4075. } else if (typeof _then !== 'function') {
  4076. this._remaining--;
  4077. this._result[i] = entry;
  4078. } else if (c === Promise$1) {
  4079. var promise = new c(noop4);
  4080. if (didError) {
  4081. reject(promise, error);
  4082. } else {
  4083. handleMaybeThenable(promise, entry, _then);
  4084. }
  4085. this._willSettleAt(promise, i);
  4086. } else {
  4087. this._willSettleAt(new c(function(resolve$$12) {
  4088. return resolve$$12(entry);
  4089. }), i);
  4090. }
  4091. } else {
  4092. this._willSettleAt(resolve$$1(entry), i);
  4093. }
  4094. };
  4095. Enumerator2.prototype._settledAt = function _settledAt(state, i, value) {
  4096. var promise = this.promise;
  4097. if (promise._state === PENDING) {
  4098. this._remaining--;
  4099. if (state === REJECTED) {
  4100. reject(promise, value);
  4101. } else {
  4102. this._result[i] = value;
  4103. }
  4104. }
  4105. if (this._remaining === 0) {
  4106. fulfill(promise, this._result);
  4107. }
  4108. };
  4109. Enumerator2.prototype._willSettleAt = function _willSettleAt(promise, i) {
  4110. var enumerator = this;
  4111. subscribe2(promise, void 0, function(value) {
  4112. return enumerator._settledAt(FULFILLED, i, value);
  4113. }, function(reason) {
  4114. return enumerator._settledAt(REJECTED, i, reason);
  4115. });
  4116. };
  4117. return Enumerator2;
  4118. }();
  4119. function all(entries) {
  4120. return new Enumerator(this, entries).promise;
  4121. }
  4122. function race(entries) {
  4123. var Constructor = this;
  4124. if (!isArray(entries)) {
  4125. return new Constructor(function(_, reject2) {
  4126. return reject2(new TypeError('You must pass an array to race.'));
  4127. });
  4128. } else {
  4129. return new Constructor(function(resolve2, reject2) {
  4130. var length = entries.length;
  4131. for (var i = 0; i < length; i++) {
  4132. Constructor.resolve(entries[i]).then(resolve2, reject2);
  4133. }
  4134. });
  4135. }
  4136. }
  4137. function reject$1(reason) {
  4138. var Constructor = this;
  4139. var promise = new Constructor(noop4);
  4140. reject(promise, reason);
  4141. return promise;
  4142. }
  4143. function needsResolver() {
  4144. throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
  4145. }
  4146. function needsNew() {
  4147. throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.');
  4148. }
  4149. var Promise$1 = function() {
  4150. function Promise2(resolver) {
  4151. this[PROMISE_ID] = nextId();
  4152. this._result = this._state = void 0;
  4153. this._subscribers = [];
  4154. if (noop4 !== resolver) {
  4155. typeof resolver !== 'function' && needsResolver();
  4156. this instanceof Promise2 ? initializePromise(this, resolver) : needsNew();
  4157. }
  4158. }
  4159. Promise2.prototype['catch'] = function _catch(onRejection) {
  4160. return this.then(null, onRejection);
  4161. };
  4162. Promise2.prototype['finally'] = function _finally(callback) {
  4163. var promise = this;
  4164. var constructor = promise.constructor;
  4165. if (isFunction(callback)) {
  4166. return promise.then(function(value) {
  4167. return constructor.resolve(callback()).then(function() {
  4168. return value;
  4169. });
  4170. }, function(reason) {
  4171. return constructor.resolve(callback()).then(function() {
  4172. throw reason;
  4173. });
  4174. });
  4175. }
  4176. return promise.then(callback, callback);
  4177. };
  4178. return Promise2;
  4179. }();
  4180. Promise$1.prototype.then = then;
  4181. Promise$1.all = all;
  4182. Promise$1.race = race;
  4183. Promise$1.resolve = resolve$1;
  4184. Promise$1.reject = reject$1;
  4185. Promise$1._setScheduler = setScheduler;
  4186. Promise$1._setAsap = setAsap;
  4187. Promise$1._asap = asap;
  4188. function polyfill() {
  4189. var local = void 0;
  4190. if (typeof global !== 'undefined') {
  4191. local = global;
  4192. } else if (typeof self !== 'undefined') {
  4193. local = self;
  4194. } else {
  4195. try {
  4196. local = Function('return this')();
  4197. } catch (e) {
  4198. throw new Error('polyfill failed because global object is unavailable in this environment');
  4199. }
  4200. }
  4201. var P = local.Promise;
  4202. if (P) {
  4203. var promiseToString = null;
  4204. try {
  4205. promiseToString = Object.prototype.toString.call(P.resolve());
  4206. } catch (e) {}
  4207. if (promiseToString === '[object Promise]' && !P.cast) {
  4208. return;
  4209. }
  4210. }
  4211. local.Promise = Promise$1;
  4212. }
  4213. Promise$1.polyfill = polyfill;
  4214. Promise$1.Promise = Promise$1;
  4215. return Promise$1;
  4216. });
  4217. });
  4218. var require_typedarray = __commonJS(function(exports) {
  4219. var undefined2 = void 0;
  4220. var MAX_ARRAY_LENGTH = 1e5;
  4221. var ECMAScript = function() {
  4222. var opts = Object.prototype.toString, ophop = Object.prototype.hasOwnProperty;
  4223. return {
  4224. Class: function Class(v) {
  4225. return opts.call(v).replace(/^\[object *|\]$/g, '');
  4226. },
  4227. HasProperty: function HasProperty(o, p) {
  4228. return p in o;
  4229. },
  4230. HasOwnProperty: function HasOwnProperty(o, p) {
  4231. return ophop.call(o, p);
  4232. },
  4233. IsCallable: function IsCallable(o) {
  4234. return typeof o === 'function';
  4235. },
  4236. ToInt32: function ToInt32(v) {
  4237. return v >> 0;
  4238. },
  4239. ToUint32: function ToUint32(v) {
  4240. return v >>> 0;
  4241. }
  4242. };
  4243. }();
  4244. var LN2 = Math.LN2;
  4245. var abs = Math.abs;
  4246. var floor = Math.floor;
  4247. var log10 = Math.log;
  4248. var min = Math.min;
  4249. var pow = Math.pow;
  4250. var round = Math.round;
  4251. function configureProperties(obj) {
  4252. if (getOwnPropNames && defineProp) {
  4253. var props = getOwnPropNames(obj), i;
  4254. for (i = 0; i < props.length; i += 1) {
  4255. defineProp(obj, props[i], {
  4256. value: obj[props[i]],
  4257. writable: false,
  4258. enumerable: false,
  4259. configurable: false
  4260. });
  4261. }
  4262. }
  4263. }
  4264. var defineProp;
  4265. if (Object.defineProperty && function() {
  4266. try {
  4267. Object.defineProperty({}, 'x', {});
  4268. return true;
  4269. } catch (e) {
  4270. return false;
  4271. }
  4272. }()) {
  4273. defineProp = Object.defineProperty;
  4274. } else {
  4275. defineProp = function defineProp(o, p, desc) {
  4276. if (!o === Object(o)) {
  4277. throw new TypeError('Object.defineProperty called on non-object');
  4278. }
  4279. if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) {
  4280. Object.prototype.__defineGetter__.call(o, p, desc.get);
  4281. }
  4282. if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) {
  4283. Object.prototype.__defineSetter__.call(o, p, desc.set);
  4284. }
  4285. if (ECMAScript.HasProperty(desc, 'value')) {
  4286. o[p] = desc.value;
  4287. }
  4288. return o;
  4289. };
  4290. }
  4291. var getOwnPropNames = Object.getOwnPropertyNames || function(o) {
  4292. if (o !== Object(o)) {
  4293. throw new TypeError('Object.getOwnPropertyNames called on non-object');
  4294. }
  4295. var props = [], p;
  4296. for (p in o) {
  4297. if (ECMAScript.HasOwnProperty(o, p)) {
  4298. props.push(p);
  4299. }
  4300. }
  4301. return props;
  4302. };
  4303. function makeArrayAccessors(obj) {
  4304. if (!defineProp) {
  4305. return;
  4306. }
  4307. if (obj.length > MAX_ARRAY_LENGTH) {
  4308. throw new RangeError('Array too large for polyfill');
  4309. }
  4310. function makeArrayAccessor(index) {
  4311. defineProp(obj, index, {
  4312. get: function get() {
  4313. return obj._getter(index);
  4314. },
  4315. set: function set(v) {
  4316. obj._setter(index, v);
  4317. },
  4318. enumerable: true,
  4319. configurable: false
  4320. });
  4321. }
  4322. var i;
  4323. for (i = 0; i < obj.length; i += 1) {
  4324. makeArrayAccessor(i);
  4325. }
  4326. }
  4327. function as_signed(value, bits) {
  4328. var s = 32 - bits;
  4329. return value << s >> s;
  4330. }
  4331. function as_unsigned(value, bits) {
  4332. var s = 32 - bits;
  4333. return value << s >>> s;
  4334. }
  4335. function packI8(n) {
  4336. return [ n & 255 ];
  4337. }
  4338. function unpackI8(bytes) {
  4339. return as_signed(bytes[0], 8);
  4340. }
  4341. function packU8(n) {
  4342. return [ n & 255 ];
  4343. }
  4344. function unpackU8(bytes) {
  4345. return as_unsigned(bytes[0], 8);
  4346. }
  4347. function packU8Clamped(n) {
  4348. n = round(Number(n));
  4349. return [ n < 0 ? 0 : n > 255 ? 255 : n & 255 ];
  4350. }
  4351. function packI16(n) {
  4352. return [ n >> 8 & 255, n & 255 ];
  4353. }
  4354. function unpackI16(bytes) {
  4355. return as_signed(bytes[0] << 8 | bytes[1], 16);
  4356. }
  4357. function packU16(n) {
  4358. return [ n >> 8 & 255, n & 255 ];
  4359. }
  4360. function unpackU16(bytes) {
  4361. return as_unsigned(bytes[0] << 8 | bytes[1], 16);
  4362. }
  4363. function packI32(n) {
  4364. return [ n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, n & 255 ];
  4365. }
  4366. function unpackI32(bytes) {
  4367. return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32);
  4368. }
  4369. function packU32(n) {
  4370. return [ n >> 24 & 255, n >> 16 & 255, n >> 8 & 255, n & 255 ];
  4371. }
  4372. function unpackU32(bytes) {
  4373. return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32);
  4374. }
  4375. function packIEEE754(v, ebits, fbits) {
  4376. var bias = (1 << ebits - 1) - 1, s, e, f, ln, i, bits, str, bytes;
  4377. function roundToEven(n) {
  4378. var w = floor(n), f2 = n - w;
  4379. if (f2 < .5) {
  4380. return w;
  4381. }
  4382. if (f2 > .5) {
  4383. return w + 1;
  4384. }
  4385. return w % 2 ? w + 1 : w;
  4386. }
  4387. if (v !== v) {
  4388. e = (1 << ebits) - 1;
  4389. f = pow(2, fbits - 1);
  4390. s = 0;
  4391. } else if (v === Infinity || v === -Infinity) {
  4392. e = (1 << ebits) - 1;
  4393. f = 0;
  4394. s = v < 0 ? 1 : 0;
  4395. } else if (v === 0) {
  4396. e = 0;
  4397. f = 0;
  4398. s = 1 / v === -Infinity ? 1 : 0;
  4399. } else {
  4400. s = v < 0;
  4401. v = abs(v);
  4402. if (v >= pow(2, 1 - bias)) {
  4403. e = min(floor(log10(v) / LN2), 1023);
  4404. f = roundToEven(v / pow(2, e) * pow(2, fbits));
  4405. if (f / pow(2, fbits) >= 2) {
  4406. e = e + 1;
  4407. f = 1;
  4408. }
  4409. if (e > bias) {
  4410. e = (1 << ebits) - 1;
  4411. f = 0;
  4412. } else {
  4413. e = e + bias;
  4414. f = f - pow(2, fbits);
  4415. }
  4416. } else {
  4417. e = 0;
  4418. f = roundToEven(v / pow(2, 1 - bias - fbits));
  4419. }
  4420. }
  4421. bits = [];
  4422. for (i = fbits; i; i -= 1) {
  4423. bits.push(f % 2 ? 1 : 0);
  4424. f = floor(f / 2);
  4425. }
  4426. for (i = ebits; i; i -= 1) {
  4427. bits.push(e % 2 ? 1 : 0);
  4428. e = floor(e / 2);
  4429. }
  4430. bits.push(s ? 1 : 0);
  4431. bits.reverse();
  4432. str = bits.join('');
  4433. bytes = [];
  4434. while (str.length) {
  4435. bytes.push(parseInt(str.substring(0, 8), 2));
  4436. str = str.substring(8);
  4437. }
  4438. return bytes;
  4439. }
  4440. function unpackIEEE754(bytes, ebits, fbits) {
  4441. var bits = [], i, j, b, str, bias, s, e, f;
  4442. for (i = bytes.length; i; i -= 1) {
  4443. b = bytes[i - 1];
  4444. for (j = 8; j; j -= 1) {
  4445. bits.push(b % 2 ? 1 : 0);
  4446. b = b >> 1;
  4447. }
  4448. }
  4449. bits.reverse();
  4450. str = bits.join('');
  4451. bias = (1 << ebits - 1) - 1;
  4452. s = parseInt(str.substring(0, 1), 2) ? -1 : 1;
  4453. e = parseInt(str.substring(1, 1 + ebits), 2);
  4454. f = parseInt(str.substring(1 + ebits), 2);
  4455. if (e === (1 << ebits) - 1) {
  4456. return f !== 0 ? NaN : s * Infinity;
  4457. } else if (e > 0) {
  4458. return s * pow(2, e - bias) * (1 + f / pow(2, fbits));
  4459. } else if (f !== 0) {
  4460. return s * pow(2, -(bias - 1)) * (f / pow(2, fbits));
  4461. } else {
  4462. return s < 0 ? -0 : 0;
  4463. }
  4464. }
  4465. function unpackF64(b) {
  4466. return unpackIEEE754(b, 11, 52);
  4467. }
  4468. function packF64(v) {
  4469. return packIEEE754(v, 11, 52);
  4470. }
  4471. function unpackF32(b) {
  4472. return unpackIEEE754(b, 8, 23);
  4473. }
  4474. function packF32(v) {
  4475. return packIEEE754(v, 8, 23);
  4476. }
  4477. (function() {
  4478. var ArrayBuffer = function ArrayBuffer2(length) {
  4479. length = ECMAScript.ToInt32(length);
  4480. if (length < 0) {
  4481. throw new RangeError('ArrayBuffer size is not a small enough positive integer');
  4482. }
  4483. this.byteLength = length;
  4484. this._bytes = [];
  4485. this._bytes.length = length;
  4486. var i;
  4487. for (i = 0; i < this.byteLength; i += 1) {
  4488. this._bytes[i] = 0;
  4489. }
  4490. configureProperties(this);
  4491. };
  4492. exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer;
  4493. var ArrayBufferView = function ArrayBufferView2() {};
  4494. function makeConstructor(bytesPerElement, pack, unpack) {
  4495. var _ctor;
  4496. _ctor = function ctor(buffer, byteOffset, length) {
  4497. var array, sequence, i, s;
  4498. if (!arguments.length || typeof arguments[0] === 'number') {
  4499. this.length = ECMAScript.ToInt32(arguments[0]);
  4500. if (length < 0) {
  4501. throw new RangeError('ArrayBufferView size is not a small enough positive integer');
  4502. }
  4503. this.byteLength = this.length * this.BYTES_PER_ELEMENT;
  4504. this.buffer = new ArrayBuffer(this.byteLength);
  4505. this.byteOffset = 0;
  4506. } else if (_typeof(arguments[0]) === 'object' && arguments[0].constructor === _ctor) {
  4507. array = arguments[0];
  4508. this.length = array.length;
  4509. this.byteLength = this.length * this.BYTES_PER_ELEMENT;
  4510. this.buffer = new ArrayBuffer(this.byteLength);
  4511. this.byteOffset = 0;
  4512. for (i = 0; i < this.length; i += 1) {
  4513. this._setter(i, array._getter(i));
  4514. }
  4515. } else if (_typeof(arguments[0]) === 'object' && !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
  4516. sequence = arguments[0];
  4517. this.length = ECMAScript.ToUint32(sequence.length);
  4518. this.byteLength = this.length * this.BYTES_PER_ELEMENT;
  4519. this.buffer = new ArrayBuffer(this.byteLength);
  4520. this.byteOffset = 0;
  4521. for (i = 0; i < this.length; i += 1) {
  4522. s = sequence[i];
  4523. this._setter(i, Number(s));
  4524. }
  4525. } else if (_typeof(arguments[0]) === 'object' && (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
  4526. this.buffer = buffer;
  4527. this.byteOffset = ECMAScript.ToUint32(byteOffset);
  4528. if (this.byteOffset > this.buffer.byteLength) {
  4529. throw new RangeError('byteOffset out of range');
  4530. }
  4531. if (this.byteOffset % this.BYTES_PER_ELEMENT) {
  4532. throw new RangeError('ArrayBuffer length minus the byteOffset is not a multiple of the element size.');
  4533. }
  4534. if (arguments.length < 3) {
  4535. this.byteLength = this.buffer.byteLength - this.byteOffset;
  4536. if (this.byteLength % this.BYTES_PER_ELEMENT) {
  4537. throw new RangeError('length of buffer minus byteOffset not a multiple of the element size');
  4538. }
  4539. this.length = this.byteLength / this.BYTES_PER_ELEMENT;
  4540. } else {
  4541. this.length = ECMAScript.ToUint32(length);
  4542. this.byteLength = this.length * this.BYTES_PER_ELEMENT;
  4543. }
  4544. if (this.byteOffset + this.byteLength > this.buffer.byteLength) {
  4545. throw new RangeError('byteOffset and length reference an area beyond the end of the buffer');
  4546. }
  4547. } else {
  4548. throw new TypeError('Unexpected argument type(s)');
  4549. }
  4550. this.constructor = _ctor;
  4551. configureProperties(this);
  4552. makeArrayAccessors(this);
  4553. };
  4554. _ctor.prototype = new ArrayBufferView();
  4555. _ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement;
  4556. _ctor.prototype._pack = pack;
  4557. _ctor.prototype._unpack = unpack;
  4558. _ctor.BYTES_PER_ELEMENT = bytesPerElement;
  4559. _ctor.prototype._getter = function(index) {
  4560. if (arguments.length < 1) {
  4561. throw new SyntaxError('Not enough arguments');
  4562. }
  4563. index = ECMAScript.ToUint32(index);
  4564. if (index >= this.length) {
  4565. return undefined2;
  4566. }
  4567. var bytes = [], i, o;
  4568. for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1,
  4569. o += 1) {
  4570. bytes.push(this.buffer._bytes[o]);
  4571. }
  4572. return this._unpack(bytes);
  4573. };
  4574. _ctor.prototype.get = _ctor.prototype._getter;
  4575. _ctor.prototype._setter = function(index, value) {
  4576. if (arguments.length < 2) {
  4577. throw new SyntaxError('Not enough arguments');
  4578. }
  4579. index = ECMAScript.ToUint32(index);
  4580. if (index >= this.length) {
  4581. return undefined2;
  4582. }
  4583. var bytes = this._pack(value), i, o;
  4584. for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; i < this.BYTES_PER_ELEMENT; i += 1,
  4585. o += 1) {
  4586. this.buffer._bytes[o] = bytes[i];
  4587. }
  4588. };
  4589. _ctor.prototype.set = function(index, value) {
  4590. if (arguments.length < 1) {
  4591. throw new SyntaxError('Not enough arguments');
  4592. }
  4593. var array, sequence, offset, len, i, s, d, byteOffset, byteLength, tmp;
  4594. if (_typeof(arguments[0]) === 'object' && arguments[0].constructor === this.constructor) {
  4595. array = arguments[0];
  4596. offset = ECMAScript.ToUint32(arguments[1]);
  4597. if (offset + array.length > this.length) {
  4598. throw new RangeError('Offset plus length of array is out of range');
  4599. }
  4600. byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT;
  4601. byteLength = array.length * this.BYTES_PER_ELEMENT;
  4602. if (array.buffer === this.buffer) {
  4603. tmp = [];
  4604. for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) {
  4605. tmp[i] = array.buffer._bytes[s];
  4606. }
  4607. for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) {
  4608. this.buffer._bytes[d] = tmp[i];
  4609. }
  4610. } else {
  4611. for (i = 0, s = array.byteOffset, d = byteOffset; i < byteLength; i += 1, s += 1,
  4612. d += 1) {
  4613. this.buffer._bytes[d] = array.buffer._bytes[s];
  4614. }
  4615. }
  4616. } else if (_typeof(arguments[0]) === 'object' && typeof arguments[0].length !== 'undefined') {
  4617. sequence = arguments[0];
  4618. len = ECMAScript.ToUint32(sequence.length);
  4619. offset = ECMAScript.ToUint32(arguments[1]);
  4620. if (offset + len > this.length) {
  4621. throw new RangeError('Offset plus length of array is out of range');
  4622. }
  4623. for (i = 0; i < len; i += 1) {
  4624. s = sequence[i];
  4625. this._setter(offset + i, Number(s));
  4626. }
  4627. } else {
  4628. throw new TypeError('Unexpected argument type(s)');
  4629. }
  4630. };
  4631. _ctor.prototype.subarray = function(start, end) {
  4632. function clamp(v, min2, max) {
  4633. return v < min2 ? min2 : v > max ? max : v;
  4634. }
  4635. start = ECMAScript.ToInt32(start);
  4636. end = ECMAScript.ToInt32(end);
  4637. if (arguments.length < 1) {
  4638. start = 0;
  4639. }
  4640. if (arguments.length < 2) {
  4641. end = this.length;
  4642. }
  4643. if (start < 0) {
  4644. start = this.length + start;
  4645. }
  4646. if (end < 0) {
  4647. end = this.length + end;
  4648. }
  4649. start = clamp(start, 0, this.length);
  4650. end = clamp(end, 0, this.length);
  4651. var len = end - start;
  4652. if (len < 0) {
  4653. len = 0;
  4654. }
  4655. return new this.constructor(this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len);
  4656. };
  4657. return _ctor;
  4658. }
  4659. var Int8Array = makeConstructor(1, packI8, unpackI8);
  4660. var Uint8Array2 = makeConstructor(1, packU8, unpackU8);
  4661. var Uint8ClampedArray2 = makeConstructor(1, packU8Clamped, unpackU8);
  4662. var Int16Array = makeConstructor(2, packI16, unpackI16);
  4663. var Uint16Array = makeConstructor(2, packU16, unpackU16);
  4664. var Int32Array = makeConstructor(4, packI32, unpackI32);
  4665. var Uint32Array3 = makeConstructor(4, packU32, unpackU32);
  4666. var Float32Array = makeConstructor(4, packF32, unpackF32);
  4667. var Float64Array = makeConstructor(8, packF64, unpackF64);
  4668. exports.Int8Array = exports.Int8Array || Int8Array;
  4669. exports.Uint8Array = exports.Uint8Array || Uint8Array2;
  4670. exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray2;
  4671. exports.Int16Array = exports.Int16Array || Int16Array;
  4672. exports.Uint16Array = exports.Uint16Array || Uint16Array;
  4673. exports.Int32Array = exports.Int32Array || Int32Array;
  4674. exports.Uint32Array = exports.Uint32Array || Uint32Array3;
  4675. exports.Float32Array = exports.Float32Array || Float32Array;
  4676. exports.Float64Array = exports.Float64Array || Float64Array;
  4677. })();
  4678. (function() {
  4679. function r(array, index) {
  4680. return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index];
  4681. }
  4682. var IS_BIG_ENDIAN = function() {
  4683. var u16array = new exports.Uint16Array([ 4660 ]), u8array = new exports.Uint8Array(u16array.buffer);
  4684. return r(u8array, 0) === 18;
  4685. }();
  4686. var DataView = function DataView2(buffer, byteOffset, byteLength) {
  4687. if (arguments.length === 0) {
  4688. buffer = new exports.ArrayBuffer(0);
  4689. } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) {
  4690. throw new TypeError('TypeError');
  4691. }
  4692. this.buffer = buffer || new exports.ArrayBuffer(0);
  4693. this.byteOffset = ECMAScript.ToUint32(byteOffset);
  4694. if (this.byteOffset > this.buffer.byteLength) {
  4695. throw new RangeError('byteOffset out of range');
  4696. }
  4697. if (arguments.length < 3) {
  4698. this.byteLength = this.buffer.byteLength - this.byteOffset;
  4699. } else {
  4700. this.byteLength = ECMAScript.ToUint32(byteLength);
  4701. }
  4702. if (this.byteOffset + this.byteLength > this.buffer.byteLength) {
  4703. throw new RangeError('byteOffset and length reference an area beyond the end of the buffer');
  4704. }
  4705. configureProperties(this);
  4706. };
  4707. function makeGetter(arrayType) {
  4708. return function(byteOffset, littleEndian) {
  4709. byteOffset = ECMAScript.ToUint32(byteOffset);
  4710. if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
  4711. throw new RangeError('Array index out of range');
  4712. }
  4713. byteOffset += this.byteOffset;
  4714. var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), bytes = [], i;
  4715. for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
  4716. bytes.push(r(uint8Array, i));
  4717. }
  4718. if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
  4719. bytes.reverse();
  4720. }
  4721. return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0);
  4722. };
  4723. }
  4724. DataView.prototype.getUint8 = makeGetter(exports.Uint8Array);
  4725. DataView.prototype.getInt8 = makeGetter(exports.Int8Array);
  4726. DataView.prototype.getUint16 = makeGetter(exports.Uint16Array);
  4727. DataView.prototype.getInt16 = makeGetter(exports.Int16Array);
  4728. DataView.prototype.getUint32 = makeGetter(exports.Uint32Array);
  4729. DataView.prototype.getInt32 = makeGetter(exports.Int32Array);
  4730. DataView.prototype.getFloat32 = makeGetter(exports.Float32Array);
  4731. DataView.prototype.getFloat64 = makeGetter(exports.Float64Array);
  4732. function makeSetter(arrayType) {
  4733. return function(byteOffset, value, littleEndian) {
  4734. byteOffset = ECMAScript.ToUint32(byteOffset);
  4735. if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
  4736. throw new RangeError('Array index out of range');
  4737. }
  4738. var typeArray = new arrayType([ value ]), byteArray = new exports.Uint8Array(typeArray.buffer), bytes = [], i, byteView;
  4739. for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
  4740. bytes.push(r(byteArray, i));
  4741. }
  4742. if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
  4743. bytes.reverse();
  4744. }
  4745. byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT);
  4746. byteView.set(bytes);
  4747. };
  4748. }
  4749. DataView.prototype.setUint8 = makeSetter(exports.Uint8Array);
  4750. DataView.prototype.setInt8 = makeSetter(exports.Int8Array);
  4751. DataView.prototype.setUint16 = makeSetter(exports.Uint16Array);
  4752. DataView.prototype.setInt16 = makeSetter(exports.Int16Array);
  4753. DataView.prototype.setUint32 = makeSetter(exports.Uint32Array);
  4754. DataView.prototype.setInt32 = makeSetter(exports.Int32Array);
  4755. DataView.prototype.setFloat32 = makeSetter(exports.Float32Array);
  4756. DataView.prototype.setFloat64 = makeSetter(exports.Float64Array);
  4757. exports.DataView = exports.DataView || DataView;
  4758. })();
  4759. });
  4760. var require_weakmap_polyfill = __commonJS(function(exports) {
  4761. (function(self2) {
  4762. 'use strict';
  4763. if (self2.WeakMap) {
  4764. return;
  4765. }
  4766. var hasOwnProperty2 = Object.prototype.hasOwnProperty;
  4767. var defineProperty = function defineProperty(object, name, value) {
  4768. if (Object.defineProperty) {
  4769. Object.defineProperty(object, name, {
  4770. configurable: true,
  4771. writable: true,
  4772. value: value
  4773. });
  4774. } else {
  4775. object[name] = value;
  4776. }
  4777. };
  4778. self2.WeakMap = function() {
  4779. function WeakMap2() {
  4780. if (this === void 0) {
  4781. throw new TypeError('Constructor WeakMap requires \'new\'');
  4782. }
  4783. defineProperty(this, '_id', genId('_WeakMap'));
  4784. if (arguments.length > 0) {
  4785. throw new TypeError('WeakMap iterable is not supported');
  4786. }
  4787. }
  4788. defineProperty(WeakMap2.prototype, 'delete', function(key) {
  4789. checkInstance(this, 'delete');
  4790. if (!isObject(key)) {
  4791. return false;
  4792. }
  4793. var entry = key[this._id];
  4794. if (entry && entry[0] === key) {
  4795. delete key[this._id];
  4796. return true;
  4797. }
  4798. return false;
  4799. });
  4800. defineProperty(WeakMap2.prototype, 'get', function(key) {
  4801. checkInstance(this, 'get');
  4802. if (!isObject(key)) {
  4803. return void 0;
  4804. }
  4805. var entry = key[this._id];
  4806. if (entry && entry[0] === key) {
  4807. return entry[1];
  4808. }
  4809. return void 0;
  4810. });
  4811. defineProperty(WeakMap2.prototype, 'has', function(key) {
  4812. checkInstance(this, 'has');
  4813. if (!isObject(key)) {
  4814. return false;
  4815. }
  4816. var entry = key[this._id];
  4817. if (entry && entry[0] === key) {
  4818. return true;
  4819. }
  4820. return false;
  4821. });
  4822. defineProperty(WeakMap2.prototype, 'set', function(key, value) {
  4823. checkInstance(this, 'set');
  4824. if (!isObject(key)) {
  4825. throw new TypeError('Invalid value used as weak map key');
  4826. }
  4827. var entry = key[this._id];
  4828. if (entry && entry[0] === key) {
  4829. entry[1] = value;
  4830. return this;
  4831. }
  4832. defineProperty(key, this._id, [ key, value ]);
  4833. return this;
  4834. });
  4835. function checkInstance(x, methodName) {
  4836. if (!isObject(x) || !hasOwnProperty2.call(x, '_id')) {
  4837. throw new TypeError(methodName + ' method called on incompatible receiver ' + _typeof(x));
  4838. }
  4839. }
  4840. function genId(prefix) {
  4841. return prefix + '_' + rand() + '.' + rand();
  4842. }
  4843. function rand() {
  4844. return Math.random().toString().substring(2);
  4845. }
  4846. defineProperty(WeakMap2, '_polyfill', true);
  4847. return WeakMap2;
  4848. }();
  4849. function isObject(x) {
  4850. return Object(x) === x;
  4851. }
  4852. })(typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : exports);
  4853. });
  4854. var definitions = [ {
  4855. name: 'NA',
  4856. value: 'inapplicable',
  4857. priority: 0,
  4858. group: 'inapplicable'
  4859. }, {
  4860. name: 'PASS',
  4861. value: 'passed',
  4862. priority: 1,
  4863. group: 'passes'
  4864. }, {
  4865. name: 'CANTTELL',
  4866. value: 'cantTell',
  4867. priority: 2,
  4868. group: 'incomplete'
  4869. }, {
  4870. name: 'FAIL',
  4871. value: 'failed',
  4872. priority: 3,
  4873. group: 'violations'
  4874. } ];
  4875. var constants = {
  4876. helpUrlBase: 'https://dequeuniversity.com/rules/',
  4877. results: [],
  4878. resultGroups: [],
  4879. resultGroupMap: {},
  4880. impact: Object.freeze([ 'minor', 'moderate', 'serious', 'critical' ]),
  4881. preload: Object.freeze({
  4882. assets: [ 'cssom', 'media' ],
  4883. timeout: 1e4
  4884. }),
  4885. allOrigins: '<unsafe_all_origins>',
  4886. sameOrigin: '<same_origin>'
  4887. };
  4888. definitions.forEach(function(definition) {
  4889. var name = definition.name;
  4890. var value = definition.value;
  4891. var priority = definition.priority;
  4892. var group = definition.group;
  4893. constants[name] = value;
  4894. constants[name + '_PRIO'] = priority;
  4895. constants[name + '_GROUP'] = group;
  4896. constants.results[priority] = value;
  4897. constants.resultGroups[priority] = group;
  4898. constants.resultGroupMap[value] = group;
  4899. });
  4900. Object.freeze(constants.results);
  4901. Object.freeze(constants.resultGroups);
  4902. Object.freeze(constants.resultGroupMap);
  4903. Object.freeze(constants);
  4904. var constants_default = constants;
  4905. function log() {
  4906. if ((typeof console === 'undefined' ? 'undefined' : _typeof(console)) === 'object' && console.log) {
  4907. Function.prototype.apply.call(console.log, console, arguments);
  4908. }
  4909. }
  4910. var log_default = log;
  4911. var whitespaceRegex = /[\t\r\n\f]/g;
  4912. var AbstractVirtualNode = function() {
  4913. function AbstractVirtualNode() {
  4914. _classCallCheck(this, AbstractVirtualNode);
  4915. this.parent = void 0;
  4916. }
  4917. _createClass(AbstractVirtualNode, [ {
  4918. key: 'attr',
  4919. value: function attr() {
  4920. throw new Error('VirtualNode class must have an "attr" function');
  4921. }
  4922. }, {
  4923. key: 'hasAttr',
  4924. value: function hasAttr() {
  4925. throw new Error('VirtualNode class must have a "hasAttr" function');
  4926. }
  4927. }, {
  4928. key: 'hasClass',
  4929. value: function hasClass(className) {
  4930. var classAttr = this.attr('class');
  4931. if (!classAttr) {
  4932. return false;
  4933. }
  4934. var selector = ' ' + className + ' ';
  4935. return (' ' + classAttr + ' ').replace(whitespaceRegex, ' ').indexOf(selector) >= 0;
  4936. }
  4937. }, {
  4938. key: 'props',
  4939. get: function get() {
  4940. throw new Error('VirtualNode class must have a "props" object consisting of "nodeType" and "nodeName" properties');
  4941. }
  4942. }, {
  4943. key: 'attrNames',
  4944. get: function get() {
  4945. throw new Error('VirtualNode class must have an "attrNames" property');
  4946. }
  4947. } ]);
  4948. return AbstractVirtualNode;
  4949. }();
  4950. var abstract_virtual_node_default = AbstractVirtualNode;
  4951. var utils_exports = {};
  4952. __export(utils_exports, {
  4953. DqElement: function DqElement() {
  4954. return dq_element_default;
  4955. },
  4956. aggregate: function aggregate() {
  4957. return aggregate_default;
  4958. },
  4959. aggregateChecks: function aggregateChecks() {
  4960. return aggregate_checks_default;
  4961. },
  4962. aggregateNodeResults: function aggregateNodeResults() {
  4963. return aggregate_node_results_default;
  4964. },
  4965. aggregateResult: function aggregateResult() {
  4966. return aggregate_result_default;
  4967. },
  4968. areStylesSet: function areStylesSet() {
  4969. return are_styles_set_default;
  4970. },
  4971. assert: function assert() {
  4972. return assert_default;
  4973. },
  4974. checkHelper: function checkHelper() {
  4975. return check_helper_default;
  4976. },
  4977. clone: function clone() {
  4978. return clone_default;
  4979. },
  4980. closest: function closest() {
  4981. return closest_default;
  4982. },
  4983. collectResultsFromFrames: function collectResultsFromFrames() {
  4984. return collect_results_from_frames_default;
  4985. },
  4986. contains: function contains() {
  4987. return contains_default;
  4988. },
  4989. convertSelector: function convertSelector() {
  4990. return _convertSelector;
  4991. },
  4992. cssParser: function cssParser() {
  4993. return css_parser_default;
  4994. },
  4995. deepMerge: function deepMerge() {
  4996. return deep_merge_default;
  4997. },
  4998. escapeSelector: function escapeSelector() {
  4999. return escape_selector_default;
  5000. },
  5001. extendMetaData: function extendMetaData() {
  5002. return extend_meta_data_default;
  5003. },
  5004. filterHtmlAttrs: function filterHtmlAttrs() {
  5005. return filter_html_attrs_default;
  5006. },
  5007. finalizeRuleResult: function finalizeRuleResult() {
  5008. return finalize_result_default;
  5009. },
  5010. findBy: function findBy() {
  5011. return find_by_default;
  5012. },
  5013. getAllChecks: function getAllChecks() {
  5014. return get_all_checks_default;
  5015. },
  5016. getAncestry: function getAncestry() {
  5017. return _getAncestry;
  5018. },
  5019. getBaseLang: function getBaseLang() {
  5020. return get_base_lang_default;
  5021. },
  5022. getCheckMessage: function getCheckMessage() {
  5023. return get_check_message_default;
  5024. },
  5025. getCheckOption: function getCheckOption() {
  5026. return get_check_option_default;
  5027. },
  5028. getFlattenedTree: function getFlattenedTree() {
  5029. return get_flattened_tree_default;
  5030. },
  5031. getFriendlyUriEnd: function getFriendlyUriEnd() {
  5032. return get_friendly_uri_end_default;
  5033. },
  5034. getNodeAttributes: function getNodeAttributes() {
  5035. return get_node_attributes_default;
  5036. },
  5037. getNodeFromTree: function getNodeFromTree() {
  5038. return get_node_from_tree_default;
  5039. },
  5040. getPreloadConfig: function getPreloadConfig() {
  5041. return _getPreloadConfig;
  5042. },
  5043. getRootNode: function getRootNode() {
  5044. return get_root_node_default;
  5045. },
  5046. getRule: function getRule() {
  5047. return get_rule_default;
  5048. },
  5049. getScroll: function getScroll() {
  5050. return get_scroll_default;
  5051. },
  5052. getScrollState: function getScrollState() {
  5053. return get_scroll_state_default;
  5054. },
  5055. getSelector: function getSelector() {
  5056. return _getSelector;
  5057. },
  5058. getSelectorData: function getSelectorData() {
  5059. return _getSelectorData;
  5060. },
  5061. getShadowSelector: function getShadowSelector() {
  5062. return get_shadow_selector_default;
  5063. },
  5064. getStandards: function getStandards() {
  5065. return _getStandards;
  5066. },
  5067. getStyleSheetFactory: function getStyleSheetFactory() {
  5068. return get_stylesheet_factory_default;
  5069. },
  5070. getXpath: function getXpath() {
  5071. return get_xpath_default;
  5072. },
  5073. injectStyle: function injectStyle() {
  5074. return inject_style_default;
  5075. },
  5076. isHidden: function isHidden() {
  5077. return is_hidden_default;
  5078. },
  5079. isHtmlElement: function isHtmlElement() {
  5080. return is_html_element_default;
  5081. },
  5082. isNodeInContext: function isNodeInContext() {
  5083. return is_node_in_context_default;
  5084. },
  5085. isShadowRoot: function isShadowRoot() {
  5086. return is_shadow_root_default;
  5087. },
  5088. isValidLang: function isValidLang() {
  5089. return valid_langs_default;
  5090. },
  5091. isXHTML: function isXHTML() {
  5092. return is_xhtml_default;
  5093. },
  5094. matches: function matches() {
  5095. return matches_default;
  5096. },
  5097. matchesExpression: function matchesExpression() {
  5098. return _matchesExpression;
  5099. },
  5100. matchesSelector: function matchesSelector() {
  5101. return element_matches_default;
  5102. },
  5103. memoize: function memoize() {
  5104. return memoize_default;
  5105. },
  5106. mergeResults: function mergeResults() {
  5107. return merge_results_default;
  5108. },
  5109. nodeSorter: function nodeSorter() {
  5110. return node_sorter_default;
  5111. },
  5112. parseCrossOriginStylesheet: function parseCrossOriginStylesheet() {
  5113. return parse_crossorigin_stylesheet_default;
  5114. },
  5115. parseSameOriginStylesheet: function parseSameOriginStylesheet() {
  5116. return parse_sameorigin_stylesheet_default;
  5117. },
  5118. parseStylesheet: function parseStylesheet() {
  5119. return parse_stylesheet_default;
  5120. },
  5121. performanceTimer: function performanceTimer() {
  5122. return performance_timer_default;
  5123. },
  5124. pollyfillElementsFromPoint: function pollyfillElementsFromPoint() {
  5125. return _pollyfillElementsFromPoint;
  5126. },
  5127. preload: function preload() {
  5128. return preload_default;
  5129. },
  5130. preloadCssom: function preloadCssom() {
  5131. return preload_cssom_default;
  5132. },
  5133. preloadMedia: function preloadMedia() {
  5134. return preload_media_default;
  5135. },
  5136. processMessage: function processMessage() {
  5137. return process_message_default;
  5138. },
  5139. publishMetaData: function publishMetaData() {
  5140. return publish_metadata_default;
  5141. },
  5142. querySelectorAll: function querySelectorAll() {
  5143. return query_selector_all_default;
  5144. },
  5145. querySelectorAllFilter: function querySelectorAllFilter() {
  5146. return query_selector_all_filter_default;
  5147. },
  5148. queue: function queue() {
  5149. return queue_default;
  5150. },
  5151. respondable: function respondable() {
  5152. return _respondable;
  5153. },
  5154. ruleShouldRun: function ruleShouldRun() {
  5155. return rule_should_run_default;
  5156. },
  5157. select: function select() {
  5158. return select_default;
  5159. },
  5160. sendCommandToFrame: function sendCommandToFrame() {
  5161. return send_command_to_frame_default;
  5162. },
  5163. setScrollState: function setScrollState() {
  5164. return set_scroll_state_default;
  5165. },
  5166. shouldPreload: function shouldPreload() {
  5167. return _shouldPreload;
  5168. },
  5169. toArray: function toArray() {
  5170. return to_array_default;
  5171. },
  5172. tokenList: function tokenList() {
  5173. return token_list_default;
  5174. },
  5175. uniqueArray: function uniqueArray() {
  5176. return unique_array_default;
  5177. },
  5178. uuid: function uuid() {
  5179. return uuid_default;
  5180. },
  5181. validInputTypes: function validInputTypes() {
  5182. return valid_input_type_default;
  5183. },
  5184. validLangs: function validLangs() {
  5185. return _validLangs;
  5186. }
  5187. });
  5188. var errorTypes = Object.freeze([ 'EvalError', 'RangeError', 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError' ]);
  5189. function stringifyMessage(_ref) {
  5190. var topic = _ref.topic, channelId = _ref.channelId, message = _ref.message, messageId = _ref.messageId, keepalive = _ref.keepalive;
  5191. var data2 = {
  5192. channelId: channelId,
  5193. topic: topic,
  5194. messageId: messageId,
  5195. keepalive: !!keepalive,
  5196. source: getSource()
  5197. };
  5198. if (message instanceof Error) {
  5199. data2.error = {
  5200. name: message.name,
  5201. message: message.message,
  5202. stack: message.stack
  5203. };
  5204. } else {
  5205. data2.payload = message;
  5206. }
  5207. return JSON.stringify(data2);
  5208. }
  5209. function parseMessage(dataString) {
  5210. var data2;
  5211. try {
  5212. data2 = JSON.parse(dataString);
  5213. } catch (e) {
  5214. return;
  5215. }
  5216. if (!isRespondableMessage(data2)) {
  5217. return;
  5218. }
  5219. var _data = data2, topic = _data.topic, channelId = _data.channelId, messageId = _data.messageId, keepalive = _data.keepalive;
  5220. var message = _typeof(data2.error) === 'object' ? buildErrorObject(data2.error) : data2.payload;
  5221. return {
  5222. topic: topic,
  5223. message: message,
  5224. messageId: messageId,
  5225. channelId: channelId,
  5226. keepalive: !!keepalive
  5227. };
  5228. }
  5229. function isRespondableMessage(postedMessage) {
  5230. return _typeof(postedMessage) === 'object' && typeof postedMessage.channelId === 'string' && postedMessage.source === getSource();
  5231. }
  5232. function buildErrorObject(error) {
  5233. var msg = error.message || 'Unknown error occurred';
  5234. var errorName = errorTypes.includes(error.name) ? error.name : 'Error';
  5235. var ErrConstructor = window[errorName] || Error;
  5236. if (error.stack) {
  5237. msg += '\n' + error.stack.replace(error.message, '');
  5238. }
  5239. return new ErrConstructor(msg);
  5240. }
  5241. function getSource() {
  5242. var application = 'axeAPI';
  5243. var version = '';
  5244. if (typeof axe !== 'undefined' && axe._audit && axe._audit.application) {
  5245. application = axe._audit.application;
  5246. }
  5247. if (typeof axe !== 'undefined') {
  5248. version = axe.version;
  5249. }
  5250. return application + '.' + version;
  5251. }
  5252. function assert(bool, message) {
  5253. if (!bool) {
  5254. throw new Error(message);
  5255. }
  5256. }
  5257. var assert_default = assert;
  5258. function assertIsParentWindow(win) {
  5259. assetNotGlobalWindow(win);
  5260. assert_default(window.parent === win, 'Source of the response must be the parent window.');
  5261. }
  5262. function assertIsFrameWindow(win) {
  5263. assetNotGlobalWindow(win);
  5264. assert_default(win.parent === window, 'Respondable target must be a frame in the current window');
  5265. }
  5266. function assetNotGlobalWindow(win) {
  5267. assert_default(window !== win, 'Messages can not be sent to the same window.');
  5268. }
  5269. var channels = {};
  5270. function storeReplyHandler(channelId, replyHandler) {
  5271. var sendToParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  5272. assert_default(!channels[channelId], 'A replyHandler already exists for this message channel.');
  5273. channels[channelId] = {
  5274. replyHandler: replyHandler,
  5275. sendToParent: sendToParent
  5276. };
  5277. }
  5278. function getReplyHandler(topic) {
  5279. return channels[topic];
  5280. }
  5281. function deleteReplyHandler(channelId) {
  5282. delete channels[channelId];
  5283. }
  5284. var uuid;
  5285. var _rng;
  5286. var _crypto = window.crypto || window.msCrypto;
  5287. if (!_rng && _crypto && _crypto.getRandomValues) {
  5288. var _rnds8 = new Uint8Array(16);
  5289. _rng = function whatwgRNG() {
  5290. _crypto.getRandomValues(_rnds8);
  5291. return _rnds8;
  5292. };
  5293. }
  5294. try {
  5295. if (!_rng) {
  5296. var nodeCrypto = require('crypto');
  5297. _rng = function _rng() {
  5298. return nodeCrypto.randomBytes(16);
  5299. };
  5300. }
  5301. } catch (e) {}
  5302. if (!_rng) {
  5303. var _rnds = new Array(16);
  5304. _rng = function _rng() {
  5305. for (var i = 0, r; i < 16; i++) {
  5306. if ((i & 3) === 0) {
  5307. r = Math.random() * 4294967296;
  5308. }
  5309. _rnds[i] = r >>> ((i & 3) << 3) & 255;
  5310. }
  5311. return _rnds;
  5312. };
  5313. }
  5314. var BufferClass = typeof window.Buffer == 'function' ? window.Buffer : Array;
  5315. var _byteToHex = [];
  5316. var _hexToByte = {};
  5317. for (var i = 0; i < 256; i++) {
  5318. _byteToHex[i] = (i + 256).toString(16).substr(1);
  5319. _hexToByte[_byteToHex[i]] = i;
  5320. }
  5321. function parse(s, buf, offset) {
  5322. var i = buf && offset || 0, ii = 0;
  5323. buf = buf || [];
  5324. s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) {
  5325. if (ii < 16) {
  5326. buf[i + ii++] = _hexToByte[oct];
  5327. }
  5328. });
  5329. while (ii < 16) {
  5330. buf[i + ii++] = 0;
  5331. }
  5332. return buf;
  5333. }
  5334. function unparse(buf, offset) {
  5335. var i = offset || 0, bth = _byteToHex;
  5336. return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]];
  5337. }
  5338. var _seedBytes = _rng();
  5339. var _nodeId = [ _seedBytes[0] | 1, _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] ];
  5340. var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 16383;
  5341. var _lastMSecs = 0;
  5342. var _lastNSecs = 0;
  5343. function v1(options, buf, offset) {
  5344. var i = buf && offset || 0;
  5345. var b = buf || [];
  5346. options = options || {};
  5347. var clockseq = options.clockseq != null ? options.clockseq : _clockseq;
  5348. var msecs = options.msecs != null ? options.msecs : new Date().getTime();
  5349. var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1;
  5350. var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;
  5351. if (dt < 0 && options.clockseq == null) {
  5352. clockseq = clockseq + 1 & 16383;
  5353. }
  5354. if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) {
  5355. nsecs = 0;
  5356. }
  5357. if (nsecs >= 1e4) {
  5358. throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
  5359. }
  5360. _lastMSecs = msecs;
  5361. _lastNSecs = nsecs;
  5362. _clockseq = clockseq;
  5363. msecs += 122192928e5;
  5364. var tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
  5365. b[i++] = tl >>> 24 & 255;
  5366. b[i++] = tl >>> 16 & 255;
  5367. b[i++] = tl >>> 8 & 255;
  5368. b[i++] = tl & 255;
  5369. var tmh = msecs / 4294967296 * 1e4 & 268435455;
  5370. b[i++] = tmh >>> 8 & 255;
  5371. b[i++] = tmh & 255;
  5372. b[i++] = tmh >>> 24 & 15 | 16;
  5373. b[i++] = tmh >>> 16 & 255;
  5374. b[i++] = clockseq >>> 8 | 128;
  5375. b[i++] = clockseq & 255;
  5376. var node = options.node || _nodeId;
  5377. for (var n = 0; n < 6; n++) {
  5378. b[i + n] = node[n];
  5379. }
  5380. return buf ? buf : unparse(b);
  5381. }
  5382. function v4(options, buf, offset) {
  5383. var i = buf && offset || 0;
  5384. if (typeof options == 'string') {
  5385. buf = options == 'binary' ? new BufferClass(16) : null;
  5386. options = null;
  5387. }
  5388. options = options || {};
  5389. var rnds = options.random || (options.rng || _rng)();
  5390. rnds[6] = rnds[6] & 15 | 64;
  5391. rnds[8] = rnds[8] & 63 | 128;
  5392. if (buf) {
  5393. for (var ii = 0; ii < 16; ii++) {
  5394. buf[i + ii] = rnds[ii];
  5395. }
  5396. }
  5397. return buf || unparse(rnds);
  5398. }
  5399. uuid = v4;
  5400. uuid.v1 = v1;
  5401. uuid.v4 = v4;
  5402. uuid.parse = parse;
  5403. uuid.unparse = unparse;
  5404. uuid.BufferClass = BufferClass;
  5405. axe._uuid = v1();
  5406. var uuid_default = v4;
  5407. var messageIds = [];
  5408. function createMessageId() {
  5409. var uuid5 = ''.concat(v4(), ':').concat(v4());
  5410. if (messageIds.includes(uuid5)) {
  5411. return createMessageId();
  5412. }
  5413. messageIds.push(uuid5);
  5414. return uuid5;
  5415. }
  5416. function isNewMessage(uuid5) {
  5417. if (messageIds.includes(uuid5)) {
  5418. return false;
  5419. }
  5420. messageIds.push(uuid5);
  5421. return true;
  5422. }
  5423. function postMessage(win, data2, sendToParent, replyHandler) {
  5424. if (typeof replyHandler === 'function') {
  5425. storeReplyHandler(data2.channelId, replyHandler, sendToParent);
  5426. }
  5427. sendToParent ? assertIsParentWindow(win) : assertIsFrameWindow(win);
  5428. if (data2.message instanceof Error && !sendToParent) {
  5429. axe.log(data2.message);
  5430. return false;
  5431. }
  5432. var dataString = stringifyMessage(_extends({
  5433. messageId: createMessageId()
  5434. }, data2));
  5435. var allowedOrigins = axe._audit.allowedOrigins;
  5436. if (!allowedOrigins || !allowedOrigins.length) {
  5437. return false;
  5438. }
  5439. allowedOrigins.forEach(function(origin) {
  5440. try {
  5441. win.postMessage(dataString, origin);
  5442. } catch (err2) {
  5443. if (err2 instanceof win.DOMException) {
  5444. throw new Error('allowedOrigins value "'.concat(origin, '" is not a valid origin'));
  5445. }
  5446. throw err2;
  5447. }
  5448. });
  5449. return true;
  5450. }
  5451. function processError(win, error, channelId) {
  5452. if (!win.parent !== window) {
  5453. return axe.log(error);
  5454. }
  5455. try {
  5456. postMessage(win, {
  5457. topic: null,
  5458. channelId: channelId,
  5459. message: error,
  5460. messageId: createMessageId(),
  5461. keepalive: true
  5462. }, true);
  5463. } catch (err2) {
  5464. return axe.log(err2);
  5465. }
  5466. }
  5467. function createResponder(win, channelId) {
  5468. var sendToParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  5469. return function respond(message, keepalive, replyHandler) {
  5470. var data2 = {
  5471. channelId: channelId,
  5472. message: message,
  5473. keepalive: keepalive
  5474. };
  5475. postMessage(win, data2, sendToParent, replyHandler);
  5476. };
  5477. }
  5478. function originIsAllowed(origin) {
  5479. var allowedOrigins = axe._audit.allowedOrigins;
  5480. return allowedOrigins && allowedOrigins.includes('*') || allowedOrigins.includes(origin);
  5481. }
  5482. function messageHandler(_ref2, topicHandler) {
  5483. var origin = _ref2.origin, dataString = _ref2.data, win = _ref2.source;
  5484. var data2 = parseMessage(dataString) || {};
  5485. var channelId = data2.channelId, message = data2.message, messageId = data2.messageId;
  5486. if (!originIsAllowed(origin) || !isNewMessage(messageId)) {
  5487. return;
  5488. }
  5489. if (message instanceof Error && win.parent !== window) {
  5490. axe.log(message);
  5491. return false;
  5492. }
  5493. try {
  5494. if (data2.topic) {
  5495. var responder = createResponder(win, channelId);
  5496. assertIsParentWindow(win);
  5497. topicHandler(data2, responder);
  5498. } else {
  5499. callReplyHandler(win, data2);
  5500. }
  5501. } catch (error) {
  5502. processError(win, error, channelId);
  5503. }
  5504. }
  5505. function callReplyHandler(win, data2) {
  5506. var channelId = data2.channelId, message = data2.message, keepalive = data2.keepalive;
  5507. var _ref3 = getReplyHandler(channelId) || {}, replyHandler = _ref3.replyHandler, sendToParent = _ref3.sendToParent;
  5508. if (!replyHandler) {
  5509. return;
  5510. }
  5511. sendToParent ? assertIsParentWindow(win) : assertIsFrameWindow(win);
  5512. var responder = createResponder(win, channelId, sendToParent);
  5513. if (!keepalive && channelId) {
  5514. deleteReplyHandler(channelId);
  5515. }
  5516. try {
  5517. replyHandler(message, keepalive, responder);
  5518. } catch (error) {
  5519. axe.log(error);
  5520. responder(error, keepalive);
  5521. }
  5522. }
  5523. var frameMessenger = {
  5524. open: function open(topicHandler) {
  5525. if (typeof window.addEventListener !== 'function') {
  5526. return;
  5527. }
  5528. var handler = function handler(messageEvent) {
  5529. messageHandler(messageEvent, topicHandler);
  5530. };
  5531. window.addEventListener('message', handler, false);
  5532. return function() {
  5533. window.removeEventListener('message', handler, false);
  5534. };
  5535. },
  5536. post: function post(win, data2, replyHandler) {
  5537. if (typeof window.addEventListener !== 'function') {
  5538. return false;
  5539. }
  5540. return postMessage(win, data2, false, replyHandler);
  5541. }
  5542. };
  5543. function setDefaultFrameMessenger(respondable5) {
  5544. respondable5.updateMessenger(frameMessenger);
  5545. }
  5546. function aggregate(map, values, initial) {
  5547. values = values.slice();
  5548. if (initial) {
  5549. values.push(initial);
  5550. }
  5551. var sorting = values.map(function(val) {
  5552. return map.indexOf(val);
  5553. }).sort();
  5554. return map[sorting.pop()];
  5555. }
  5556. var aggregate_default = aggregate;
  5557. var CANTTELL_PRIO = constants_default.CANTTELL_PRIO, FAIL_PRIO = constants_default.FAIL_PRIO;
  5558. var checkMap = [];
  5559. checkMap[constants_default.PASS_PRIO] = true;
  5560. checkMap[constants_default.CANTTELL_PRIO] = null;
  5561. checkMap[constants_default.FAIL_PRIO] = false;
  5562. var checkTypes = [ 'any', 'all', 'none' ];
  5563. function anyAllNone(obj, functor) {
  5564. return checkTypes.reduce(function(out, type) {
  5565. out[type] = (obj[type] || []).map(function(val) {
  5566. return functor(val, type);
  5567. });
  5568. return out;
  5569. }, {});
  5570. }
  5571. function aggregateChecks(nodeResOriginal) {
  5572. var nodeResult = Object.assign({}, nodeResOriginal);
  5573. anyAllNone(nodeResult, function(check4, type) {
  5574. var i = typeof check4.result === 'undefined' ? -1 : checkMap.indexOf(check4.result);
  5575. check4.priority = i !== -1 ? i : constants_default.CANTTELL_PRIO;
  5576. if (type === 'none') {
  5577. if (check4.priority === constants_default.PASS_PRIO) {
  5578. check4.priority = constants_default.FAIL_PRIO;
  5579. } else if (check4.priority === constants_default.FAIL_PRIO) {
  5580. check4.priority = constants_default.PASS_PRIO;
  5581. }
  5582. }
  5583. });
  5584. var priorities = {
  5585. all: nodeResult.all.reduce(function(a, b) {
  5586. return Math.max(a, b.priority);
  5587. }, 0),
  5588. none: nodeResult.none.reduce(function(a, b) {
  5589. return Math.max(a, b.priority);
  5590. }, 0),
  5591. any: nodeResult.any.reduce(function(a, b) {
  5592. return Math.min(a, b.priority);
  5593. }, 4) % 4
  5594. };
  5595. nodeResult.priority = Math.max(priorities.all, priorities.none, priorities.any);
  5596. var impacts = [];
  5597. checkTypes.forEach(function(type) {
  5598. nodeResult[type] = nodeResult[type].filter(function(check4) {
  5599. return check4.priority === nodeResult.priority && check4.priority === priorities[type];
  5600. });
  5601. nodeResult[type].forEach(function(check4) {
  5602. return impacts.push(check4.impact);
  5603. });
  5604. });
  5605. if ([ CANTTELL_PRIO, FAIL_PRIO ].includes(nodeResult.priority)) {
  5606. nodeResult.impact = aggregate_default(constants_default.impact, impacts);
  5607. } else {
  5608. nodeResult.impact = null;
  5609. }
  5610. anyAllNone(nodeResult, function(c) {
  5611. delete c.result;
  5612. delete c.priority;
  5613. });
  5614. nodeResult.result = constants_default.results[nodeResult.priority];
  5615. delete nodeResult.priority;
  5616. return nodeResult;
  5617. }
  5618. var aggregate_checks_default = aggregateChecks;
  5619. function finalizeRuleResult(ruleResult) {
  5620. var rule3 = axe._audit.rules.find(function(rule4) {
  5621. return rule4.id === ruleResult.id;
  5622. });
  5623. if (rule3 && rule3.impact) {
  5624. ruleResult.nodes.forEach(function(node) {
  5625. [ 'any', 'all', 'none' ].forEach(function(checkType) {
  5626. (node[checkType] || []).forEach(function(checkResult) {
  5627. checkResult.impact = rule3.impact;
  5628. });
  5629. });
  5630. });
  5631. }
  5632. Object.assign(ruleResult, aggregate_node_results_default(ruleResult.nodes));
  5633. delete ruleResult.nodes;
  5634. return ruleResult;
  5635. }
  5636. var finalize_result_default = finalizeRuleResult;
  5637. function aggregateNodeResults(nodeResults) {
  5638. var ruleResult = {};
  5639. nodeResults = nodeResults.map(function(nodeResult) {
  5640. if (nodeResult.any && nodeResult.all && nodeResult.none) {
  5641. return aggregate_checks_default(nodeResult);
  5642. } else if (Array.isArray(nodeResult.node)) {
  5643. return finalize_result_default(nodeResult);
  5644. } else {
  5645. throw new TypeError('Invalid Result type');
  5646. }
  5647. });
  5648. if (nodeResults && nodeResults.length) {
  5649. var resultList = nodeResults.map(function(node) {
  5650. return node.result;
  5651. });
  5652. ruleResult.result = aggregate_default(constants_default.results, resultList, ruleResult.result);
  5653. } else {
  5654. ruleResult.result = 'inapplicable';
  5655. }
  5656. constants_default.resultGroups.forEach(function(group) {
  5657. return ruleResult[group] = [];
  5658. });
  5659. nodeResults.forEach(function(nodeResult) {
  5660. var groupName = constants_default.resultGroupMap[nodeResult.result];
  5661. ruleResult[groupName].push(nodeResult);
  5662. });
  5663. var impactGroup = constants_default.FAIL_GROUP;
  5664. if (ruleResult[impactGroup].length === 0) {
  5665. impactGroup = constants_default.CANTTELL_GROUP;
  5666. }
  5667. if (ruleResult[impactGroup].length > 0) {
  5668. var impactList = ruleResult[impactGroup].map(function(failure) {
  5669. return failure.impact;
  5670. });
  5671. ruleResult.impact = aggregate_default(constants_default.impact, impactList) || null;
  5672. } else {
  5673. ruleResult.impact = null;
  5674. }
  5675. return ruleResult;
  5676. }
  5677. var aggregate_node_results_default = aggregateNodeResults;
  5678. function copyToGroup(resultObject, subResult, group) {
  5679. var resultCopy = Object.assign({}, subResult);
  5680. resultCopy.nodes = (resultCopy[group] || []).concat();
  5681. constants_default.resultGroups.forEach(function(group2) {
  5682. delete resultCopy[group2];
  5683. });
  5684. resultObject[group].push(resultCopy);
  5685. }
  5686. function aggregateResult(results) {
  5687. var resultObject = {};
  5688. constants_default.resultGroups.forEach(function(groupName) {
  5689. return resultObject[groupName] = [];
  5690. });
  5691. results.forEach(function(subResult) {
  5692. if (subResult.error) {
  5693. copyToGroup(resultObject, subResult, constants_default.CANTTELL_GROUP);
  5694. } else if (subResult.result === constants_default.NA) {
  5695. copyToGroup(resultObject, subResult, constants_default.NA_GROUP);
  5696. } else {
  5697. constants_default.resultGroups.forEach(function(group) {
  5698. if (Array.isArray(subResult[group]) && subResult[group].length > 0) {
  5699. copyToGroup(resultObject, subResult, group);
  5700. }
  5701. });
  5702. }
  5703. });
  5704. return resultObject;
  5705. }
  5706. var aggregate_result_default = aggregateResult;
  5707. function areStylesSet(el, styles, stopAt) {
  5708. var styl = window.getComputedStyle(el, null);
  5709. if (!styl) {
  5710. return false;
  5711. }
  5712. for (var i = 0; i < styles.length; ++i) {
  5713. var att = styles[i];
  5714. if (styl.getPropertyValue(att.property) === att.value) {
  5715. return true;
  5716. }
  5717. }
  5718. if (!el.parentNode || el.nodeName.toUpperCase() === stopAt.toUpperCase()) {
  5719. return false;
  5720. }
  5721. return areStylesSet(el.parentNode, styles, stopAt);
  5722. }
  5723. var are_styles_set_default = areStylesSet;
  5724. function toArray(thing) {
  5725. return Array.prototype.slice.call(thing);
  5726. }
  5727. var to_array_default = toArray;
  5728. function escapeSelector(value) {
  5729. var string = String(value);
  5730. var length = string.length;
  5731. var index = -1;
  5732. var codeUnit;
  5733. var result = '';
  5734. var firstCodeUnit = string.charCodeAt(0);
  5735. while (++index < length) {
  5736. codeUnit = string.charCodeAt(index);
  5737. if (codeUnit == 0) {
  5738. result += '\ufffd';
  5739. continue;
  5740. }
  5741. if (codeUnit >= 1 && codeUnit <= 31 || codeUnit == 127 || index == 0 && codeUnit >= 48 && codeUnit <= 57 || index == 1 && codeUnit >= 48 && codeUnit <= 57 && firstCodeUnit == 45) {
  5742. result += '\\' + codeUnit.toString(16) + ' ';
  5743. continue;
  5744. }
  5745. if (index == 0 && length == 1 && codeUnit == 45) {
  5746. result += '\\' + string.charAt(index);
  5747. continue;
  5748. }
  5749. if (codeUnit >= 128 || codeUnit == 45 || codeUnit == 95 || codeUnit >= 48 && codeUnit <= 57 || codeUnit >= 65 && codeUnit <= 90 || codeUnit >= 97 && codeUnit <= 122) {
  5750. result += string.charAt(index);
  5751. continue;
  5752. }
  5753. result += '\\' + string.charAt(index);
  5754. }
  5755. return result;
  5756. }
  5757. var escape_selector_default = escapeSelector;
  5758. function isMostlyNumbers() {
  5759. var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  5760. return str.length !== 0 && (str.match(/[0-9]/g) || '').length >= str.length / 2;
  5761. }
  5762. function splitString(str, splitIndex) {
  5763. return [ str.substring(0, splitIndex), str.substring(splitIndex) ];
  5764. }
  5765. function trimRight(str) {
  5766. return str.replace(/\s+$/, '');
  5767. }
  5768. function uriParser(url) {
  5769. var original = url;
  5770. var protocol = '', domain = '', port = '', path = '', query = '', hash = '';
  5771. if (url.includes('#')) {
  5772. var _splitString = splitString(url, url.indexOf('#'));
  5773. var _splitString2 = _slicedToArray(_splitString, 2);
  5774. url = _splitString2[0];
  5775. hash = _splitString2[1];
  5776. }
  5777. if (url.includes('?')) {
  5778. var _splitString3 = splitString(url, url.indexOf('?'));
  5779. var _splitString4 = _slicedToArray(_splitString3, 2);
  5780. url = _splitString4[0];
  5781. query = _splitString4[1];
  5782. }
  5783. if (url.includes('://')) {
  5784. var _url$split = url.split('://');
  5785. var _url$split2 = _slicedToArray(_url$split, 2);
  5786. protocol = _url$split2[0];
  5787. url = _url$split2[1];
  5788. var _splitString5 = splitString(url, url.indexOf('/'));
  5789. var _splitString6 = _slicedToArray(_splitString5, 2);
  5790. domain = _splitString6[0];
  5791. url = _splitString6[1];
  5792. } else if (url.substr(0, 2) === '//') {
  5793. url = url.substr(2);
  5794. var _splitString7 = splitString(url, url.indexOf('/'));
  5795. var _splitString8 = _slicedToArray(_splitString7, 2);
  5796. domain = _splitString8[0];
  5797. url = _splitString8[1];
  5798. }
  5799. if (domain.substr(0, 4) === 'www.') {
  5800. domain = domain.substr(4);
  5801. }
  5802. if (domain && domain.includes(':')) {
  5803. var _splitString9 = splitString(domain, domain.indexOf(':'));
  5804. var _splitString10 = _slicedToArray(_splitString9, 2);
  5805. domain = _splitString10[0];
  5806. port = _splitString10[1];
  5807. }
  5808. path = url;
  5809. return {
  5810. original: original,
  5811. protocol: protocol,
  5812. domain: domain,
  5813. port: port,
  5814. path: path,
  5815. query: query,
  5816. hash: hash
  5817. };
  5818. }
  5819. function getFriendlyUriEnd() {
  5820. var uri = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  5821. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  5822. if (uri.length <= 1 || uri.substr(0, 5) === 'data:' || uri.substr(0, 11) === 'javascript:' || uri.includes('?')) {
  5823. return;
  5824. }
  5825. var currentDomain = options.currentDomain, _options$maxLength = options.maxLength, maxLength = _options$maxLength === void 0 ? 25 : _options$maxLength;
  5826. var _uriParser = uriParser(uri), path = _uriParser.path, domain = _uriParser.domain, hash = _uriParser.hash;
  5827. var pathEnd = path.substr(path.substr(0, path.length - 2).lastIndexOf('/') + 1);
  5828. if (hash) {
  5829. if (pathEnd && (pathEnd + hash).length <= maxLength) {
  5830. return trimRight(pathEnd + hash);
  5831. } else if (pathEnd.length < 2 && hash.length > 2 && hash.length <= maxLength) {
  5832. return trimRight(hash);
  5833. } else {
  5834. return;
  5835. }
  5836. } else if (domain && domain.length < maxLength && path.length <= 1) {
  5837. return trimRight(domain + path);
  5838. }
  5839. if (path === '/' + pathEnd && domain && currentDomain && domain !== currentDomain && (domain + path).length <= maxLength) {
  5840. return trimRight(domain + path);
  5841. }
  5842. var lastDotIndex = pathEnd.lastIndexOf('.');
  5843. if ((lastDotIndex === -1 || lastDotIndex > 1) && (lastDotIndex !== -1 || pathEnd.length > 2) && pathEnd.length <= maxLength && !pathEnd.match(/index(\.[a-zA-Z]{2-4})?/) && !isMostlyNumbers(pathEnd)) {
  5844. return trimRight(pathEnd);
  5845. }
  5846. }
  5847. var get_friendly_uri_end_default = getFriendlyUriEnd;
  5848. function getNodeAttributes(node) {
  5849. if (node.attributes instanceof window.NamedNodeMap) {
  5850. return node.attributes;
  5851. }
  5852. return node.cloneNode(false).attributes;
  5853. }
  5854. var get_node_attributes_default = getNodeAttributes;
  5855. var matchesSelector = function() {
  5856. var method;
  5857. function getMethod(node) {
  5858. var index, candidate, candidates = [ 'matches', 'matchesSelector', 'mozMatchesSelector', 'webkitMatchesSelector', 'msMatchesSelector' ], length = candidates.length;
  5859. for (index = 0; index < length; index++) {
  5860. candidate = candidates[index];
  5861. if (node[candidate]) {
  5862. return candidate;
  5863. }
  5864. }
  5865. }
  5866. return function(node, selector) {
  5867. if (!method || !node[method]) {
  5868. method = getMethod(node);
  5869. }
  5870. if (node[method]) {
  5871. return node[method](selector);
  5872. }
  5873. return false;
  5874. };
  5875. }();
  5876. var element_matches_default = matchesSelector;
  5877. function isXHTML(doc) {
  5878. if (!doc.createElement) {
  5879. return false;
  5880. }
  5881. return doc.createElement('A').localName === 'A';
  5882. }
  5883. var is_xhtml_default = isXHTML;
  5884. function getShadowSelector(generateSelector2, elm) {
  5885. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  5886. if (!elm) {
  5887. return '';
  5888. }
  5889. var doc = elm.getRootNode && elm.getRootNode() || document;
  5890. if (doc.nodeType !== 11) {
  5891. return generateSelector2(elm, options, doc);
  5892. }
  5893. var stack = [];
  5894. while (doc.nodeType === 11) {
  5895. if (!doc.host) {
  5896. return '';
  5897. }
  5898. stack.unshift({
  5899. elm: elm,
  5900. doc: doc
  5901. });
  5902. elm = doc.host;
  5903. doc = elm.getRootNode();
  5904. }
  5905. stack.unshift({
  5906. elm: elm,
  5907. doc: doc
  5908. });
  5909. return stack.map(function(_ref4) {
  5910. var elm2 = _ref4.elm, doc2 = _ref4.doc;
  5911. return generateSelector2(elm2, options, doc2);
  5912. });
  5913. }
  5914. var get_shadow_selector_default = getShadowSelector;
  5915. var xhtml;
  5916. 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' ];
  5917. var MAXATTRIBUTELENGTH = 31;
  5918. function getAttributeNameValue(node, at) {
  5919. var name = at.name;
  5920. var atnv;
  5921. if (name.indexOf('href') !== -1 || name.indexOf('src') !== -1) {
  5922. var friendly = get_friendly_uri_end_default(node.getAttribute(name));
  5923. if (friendly) {
  5924. var value = encodeURI(friendly);
  5925. if (value) {
  5926. atnv = escape_selector_default(at.name) + '$="' + escape_selector_default(value) + '"';
  5927. } else {
  5928. return;
  5929. }
  5930. } else {
  5931. atnv = escape_selector_default(at.name) + '="' + escape_selector_default(node.getAttribute(name)) + '"';
  5932. }
  5933. } else {
  5934. atnv = escape_selector_default(name) + '="' + escape_selector_default(at.value) + '"';
  5935. }
  5936. return atnv;
  5937. }
  5938. function countSort(a, b) {
  5939. return a.count < b.count ? -1 : a.count === b.count ? 0 : 1;
  5940. }
  5941. function filterAttributes(at) {
  5942. return !ignoredAttributes.includes(at.name) && at.name.indexOf(':') === -1 && (!at.value || at.value.length < MAXATTRIBUTELENGTH);
  5943. }
  5944. function _getSelectorData(domTree) {
  5945. var data2 = {
  5946. classes: {},
  5947. tags: {},
  5948. attributes: {}
  5949. };
  5950. domTree = Array.isArray(domTree) ? domTree : [ domTree ];
  5951. var currentLevel = domTree.slice();
  5952. var stack = [];
  5953. var _loop2 = function _loop2() {
  5954. var current = currentLevel.pop();
  5955. var node = current.actualNode;
  5956. if (!!node.querySelectorAll) {
  5957. var tag = node.nodeName;
  5958. if (data2.tags[tag]) {
  5959. data2.tags[tag]++;
  5960. } else {
  5961. data2.tags[tag] = 1;
  5962. }
  5963. if (node.classList) {
  5964. Array.from(node.classList).forEach(function(cl) {
  5965. var ind = escape_selector_default(cl);
  5966. if (data2.classes[ind]) {
  5967. data2.classes[ind]++;
  5968. } else {
  5969. data2.classes[ind] = 1;
  5970. }
  5971. });
  5972. }
  5973. if (node.hasAttributes()) {
  5974. Array.from(get_node_attributes_default(node)).filter(filterAttributes).forEach(function(at) {
  5975. var atnv = getAttributeNameValue(node, at);
  5976. if (atnv) {
  5977. if (data2.attributes[atnv]) {
  5978. data2.attributes[atnv]++;
  5979. } else {
  5980. data2.attributes[atnv] = 1;
  5981. }
  5982. }
  5983. });
  5984. }
  5985. }
  5986. if (current.children.length) {
  5987. stack.push(currentLevel);
  5988. currentLevel = current.children.slice();
  5989. }
  5990. while (!currentLevel.length && stack.length) {
  5991. currentLevel = stack.pop();
  5992. }
  5993. };
  5994. while (currentLevel.length) {
  5995. _loop2();
  5996. }
  5997. return data2;
  5998. }
  5999. function uncommonClasses(node, selectorData) {
  6000. var retVal = [];
  6001. var classData = selectorData.classes;
  6002. var tagData = selectorData.tags;
  6003. if (node.classList) {
  6004. Array.from(node.classList).forEach(function(cl) {
  6005. var ind = escape_selector_default(cl);
  6006. if (classData[ind] < tagData[node.nodeName]) {
  6007. retVal.push({
  6008. name: ind,
  6009. count: classData[ind],
  6010. species: 'class'
  6011. });
  6012. }
  6013. });
  6014. }
  6015. return retVal.sort(countSort);
  6016. }
  6017. function getNthChildString(elm, selector) {
  6018. var siblings = elm.parentNode && Array.from(elm.parentNode.children || '') || [];
  6019. var hasMatchingSiblings = siblings.find(function(sibling) {
  6020. return sibling !== elm && element_matches_default(sibling, selector);
  6021. });
  6022. if (hasMatchingSiblings) {
  6023. var nthChild = 1 + siblings.indexOf(elm);
  6024. return ':nth-child(' + nthChild + ')';
  6025. } else {
  6026. return '';
  6027. }
  6028. }
  6029. function getElmId(elm) {
  6030. if (!elm.getAttribute('id')) {
  6031. return;
  6032. }
  6033. var doc = elm.getRootNode && elm.getRootNode() || document;
  6034. var id = '#' + escape_selector_default(elm.getAttribute('id') || '');
  6035. if (!id.match(/player_uid_/) && doc.querySelectorAll(id).length === 1) {
  6036. return id;
  6037. }
  6038. }
  6039. function getBaseSelector(elm) {
  6040. if (typeof xhtml === 'undefined') {
  6041. xhtml = is_xhtml_default(document);
  6042. }
  6043. return escape_selector_default(xhtml ? elm.localName : elm.nodeName.toLowerCase());
  6044. }
  6045. function uncommonAttributes(node, selectorData) {
  6046. var retVal = [];
  6047. var attData = selectorData.attributes;
  6048. var tagData = selectorData.tags;
  6049. if (node.hasAttributes()) {
  6050. Array.from(get_node_attributes_default(node)).filter(filterAttributes).forEach(function(at) {
  6051. var atnv = getAttributeNameValue(node, at);
  6052. if (atnv && attData[atnv] < tagData[node.nodeName]) {
  6053. retVal.push({
  6054. name: atnv,
  6055. count: attData[atnv],
  6056. species: 'attribute'
  6057. });
  6058. }
  6059. });
  6060. }
  6061. return retVal.sort(countSort);
  6062. }
  6063. function getThreeLeastCommonFeatures(elm, selectorData) {
  6064. var selector = '';
  6065. var features;
  6066. var clss = uncommonClasses(elm, selectorData);
  6067. var atts = uncommonAttributes(elm, selectorData);
  6068. if (clss.length && clss[0].count === 1) {
  6069. features = [ clss[0] ];
  6070. } else if (atts.length && atts[0].count === 1) {
  6071. features = [ atts[0] ];
  6072. selector = getBaseSelector(elm);
  6073. } else {
  6074. features = clss.concat(atts);
  6075. features.sort(countSort);
  6076. features = features.slice(0, 3);
  6077. if (!features.some(function(feat) {
  6078. return feat.species === 'class';
  6079. })) {
  6080. selector = getBaseSelector(elm);
  6081. } else {
  6082. features.sort(function(a, b) {
  6083. return a.species !== b.species && a.species === 'class' ? -1 : a.species === b.species ? 0 : 1;
  6084. });
  6085. }
  6086. }
  6087. return selector += features.reduce(function(val, feat) {
  6088. switch (feat.species) {
  6089. case 'class':
  6090. return val + '.' + feat.name;
  6091. case 'attribute':
  6092. return val + '[' + feat.name + ']';
  6093. }
  6094. return val;
  6095. }, '');
  6096. }
  6097. function generateSelector(elm, options, doc) {
  6098. if (!axe._selectorData) {
  6099. throw new Error('Expect axe._selectorData to be set up');
  6100. }
  6101. var _options$toRoot = options.toRoot, toRoot = _options$toRoot === void 0 ? false : _options$toRoot;
  6102. var selector;
  6103. var similar;
  6104. do {
  6105. var features = getElmId(elm);
  6106. if (!features) {
  6107. features = getThreeLeastCommonFeatures(elm, axe._selectorData);
  6108. features += getNthChildString(elm, features);
  6109. }
  6110. if (selector) {
  6111. selector = features + ' > ' + selector;
  6112. } else {
  6113. selector = features;
  6114. }
  6115. if (!similar) {
  6116. similar = Array.from(doc.querySelectorAll(selector));
  6117. } else {
  6118. similar = similar.filter(function(item) {
  6119. return element_matches_default(item, selector);
  6120. });
  6121. }
  6122. elm = elm.parentElement;
  6123. } while ((similar.length > 1 || toRoot) && elm && elm.nodeType !== 11);
  6124. if (similar.length === 1) {
  6125. return selector;
  6126. } else if (selector.indexOf(' > ') !== -1) {
  6127. return ':root' + selector.substring(selector.indexOf(' > '));
  6128. }
  6129. return ':root';
  6130. }
  6131. function _getSelector(elm, options) {
  6132. return get_shadow_selector_default(generateSelector, elm, options);
  6133. }
  6134. function generateAncestry(node) {
  6135. var nodeName2 = node.nodeName.toLowerCase();
  6136. var parent = node.parentElement;
  6137. if (!parent) {
  6138. return nodeName2;
  6139. }
  6140. var nthChild = '';
  6141. if (nodeName2 !== 'head' && nodeName2 !== 'body' && parent.children.length > 1) {
  6142. var index = Array.prototype.indexOf.call(parent.children, node) + 1;
  6143. nthChild = ':nth-child('.concat(index, ')');
  6144. }
  6145. return generateAncestry(parent) + ' > ' + nodeName2 + nthChild;
  6146. }
  6147. function _getAncestry(elm, options) {
  6148. return get_shadow_selector_default(generateAncestry, elm, options);
  6149. }
  6150. function getXPathArray(node, path) {
  6151. var sibling, count;
  6152. if (!node) {
  6153. return [];
  6154. }
  6155. if (!path && node.nodeType === 9) {
  6156. path = [ {
  6157. str: 'html'
  6158. } ];
  6159. return path;
  6160. }
  6161. path = path || [];
  6162. if (node.parentNode && node.parentNode !== node) {
  6163. path = getXPathArray(node.parentNode, path);
  6164. }
  6165. if (node.previousSibling) {
  6166. count = 1;
  6167. sibling = node.previousSibling;
  6168. do {
  6169. if (sibling.nodeType === 1 && sibling.nodeName === node.nodeName) {
  6170. count++;
  6171. }
  6172. sibling = sibling.previousSibling;
  6173. } while (sibling);
  6174. if (count === 1) {
  6175. count = null;
  6176. }
  6177. } else if (node.nextSibling) {
  6178. sibling = node.nextSibling;
  6179. do {
  6180. if (sibling.nodeType === 1 && sibling.nodeName === node.nodeName) {
  6181. count = 1;
  6182. sibling = null;
  6183. } else {
  6184. count = null;
  6185. sibling = sibling.previousSibling;
  6186. }
  6187. } while (sibling);
  6188. }
  6189. if (node.nodeType === 1) {
  6190. var element = {};
  6191. element.str = node.nodeName.toLowerCase();
  6192. var id = node.getAttribute && escape_selector_default(node.getAttribute('id'));
  6193. if (id && node.ownerDocument.querySelectorAll('#' + id).length === 1) {
  6194. element.id = node.getAttribute('id');
  6195. }
  6196. if (count > 1) {
  6197. element.count = count;
  6198. }
  6199. path.push(element);
  6200. }
  6201. return path;
  6202. }
  6203. function xpathToString(xpathArray) {
  6204. return xpathArray.reduce(function(str, elm) {
  6205. if (elm.id) {
  6206. return '/'.concat(elm.str, '[@id=\'').concat(elm.id, '\']');
  6207. } else {
  6208. return str + '/'.concat(elm.str) + (elm.count > 0 ? '['.concat(elm.count, ']') : '');
  6209. }
  6210. }, '');
  6211. }
  6212. function getXpath(node) {
  6213. var xpathArray = getXPathArray(node);
  6214. return xpathToString(xpathArray);
  6215. }
  6216. var get_xpath_default = getXpath;
  6217. function truncate(str, maxLength) {
  6218. maxLength = maxLength || 300;
  6219. if (str.length > maxLength) {
  6220. var index = str.indexOf('>');
  6221. str = str.substring(0, index + 1);
  6222. }
  6223. return str;
  6224. }
  6225. function getSource2(element) {
  6226. var source = element.outerHTML;
  6227. if (!source && typeof XMLSerializer === 'function') {
  6228. source = new XMLSerializer().serializeToString(element);
  6229. }
  6230. return truncate(source || '');
  6231. }
  6232. function DqElement(element, options, spec) {
  6233. this._fromFrame = !!spec;
  6234. this.spec = spec || {};
  6235. if (options && options.absolutePaths) {
  6236. this._options = {
  6237. toRoot: true
  6238. };
  6239. }
  6240. if (axe._audit.noHtml) {
  6241. this.source = null;
  6242. } else if (this.spec.source !== void 0) {
  6243. this.source = this.spec.source;
  6244. } else {
  6245. this.source = getSource2(element);
  6246. }
  6247. this._element = element;
  6248. }
  6249. DqElement.prototype = {
  6250. get selector() {
  6251. return this.spec.selector || [ _getSelector(this.element, this._options) ];
  6252. },
  6253. get ancestry() {
  6254. return this.spec.ancestry || [ _getAncestry(this.element) ];
  6255. },
  6256. get xpath() {
  6257. return this.spec.xpath || [ get_xpath_default(this.element) ];
  6258. },
  6259. get element() {
  6260. return this._element;
  6261. },
  6262. get fromFrame() {
  6263. return this._fromFrame;
  6264. },
  6265. toJSON: function toJSON() {
  6266. return {
  6267. selector: this.selector,
  6268. source: this.source,
  6269. xpath: this.xpath,
  6270. ancestry: this.ancestry
  6271. };
  6272. }
  6273. };
  6274. DqElement.fromFrame = function fromFrame(node, options, frame) {
  6275. var spec = _extends({}, node, {
  6276. selector: [].concat(_toConsumableArray(frame.selector), _toConsumableArray(node.selector)),
  6277. ancestry: [].concat(_toConsumableArray(frame.ancestry), _toConsumableArray(node.ancestry)),
  6278. xpath: [].concat(_toConsumableArray(frame.xpath), _toConsumableArray(node.xpath))
  6279. });
  6280. return new DqElement(frame.element, options, spec);
  6281. };
  6282. var dq_element_default = DqElement;
  6283. function checkHelper(checkResult, options, resolve, reject) {
  6284. return {
  6285. isAsync: false,
  6286. async: function async() {
  6287. this.isAsync = true;
  6288. return function(result) {
  6289. if (result instanceof Error === false) {
  6290. checkResult.result = result;
  6291. resolve(checkResult);
  6292. } else {
  6293. reject(result);
  6294. }
  6295. };
  6296. },
  6297. data: function data(data2) {
  6298. checkResult.data = data2;
  6299. },
  6300. relatedNodes: function relatedNodes(nodes) {
  6301. nodes = nodes instanceof window.Node ? [ nodes ] : to_array_default(nodes);
  6302. checkResult.relatedNodes = nodes.map(function(element) {
  6303. return new dq_element_default(element, options);
  6304. });
  6305. }
  6306. };
  6307. }
  6308. var check_helper_default = checkHelper;
  6309. function clone(obj) {
  6310. var index, length, out = obj;
  6311. if (obj !== null && _typeof(obj) === 'object') {
  6312. if (Array.isArray(obj)) {
  6313. out = [];
  6314. for (index = 0, length = obj.length; index < length; index++) {
  6315. out[index] = clone(obj[index]);
  6316. }
  6317. } else {
  6318. out = {};
  6319. for (index in obj) {
  6320. out[index] = clone(obj[index]);
  6321. }
  6322. }
  6323. }
  6324. return out;
  6325. }
  6326. var clone_default = clone;
  6327. var css_selector_parser = __toModule(require_lib());
  6328. var parser = new css_selector_parser.CssSelectorParser();
  6329. parser.registerSelectorPseudos('not');
  6330. parser.registerSelectorPseudos('is');
  6331. parser.registerNestingOperators('>');
  6332. parser.registerAttrEqualityMods('^', '$', '*', '~');
  6333. var css_parser_default = parser;
  6334. function matchesTag(vNode, exp) {
  6335. return vNode.props.nodeType === 1 && (exp.tag === '*' || vNode.props.nodeName === exp.tag);
  6336. }
  6337. function matchesClasses(vNode, exp) {
  6338. return !exp.classes || exp.classes.every(function(cl) {
  6339. return vNode.hasClass(cl.value);
  6340. });
  6341. }
  6342. function matchesAttributes(vNode, exp) {
  6343. return !exp.attributes || exp.attributes.every(function(att) {
  6344. var nodeAtt = vNode.attr(att.key);
  6345. return nodeAtt !== null && (!att.value || att.test(nodeAtt));
  6346. });
  6347. }
  6348. function matchesId(vNode, exp) {
  6349. return !exp.id || vNode.props.id === exp.id;
  6350. }
  6351. function matchesPseudos(target, exp) {
  6352. if (!exp.pseudos || exp.pseudos.every(function(pseudo) {
  6353. if (pseudo.name === 'not') {
  6354. return !pseudo.expressions.some(function(expression) {
  6355. return _matchesExpression(target, expression);
  6356. });
  6357. } else if (pseudo.name === 'is') {
  6358. return pseudo.expressions.some(function(expression) {
  6359. return _matchesExpression(target, expression);
  6360. });
  6361. }
  6362. throw new Error('the pseudo selector ' + pseudo.name + ' has not yet been implemented');
  6363. })) {
  6364. return true;
  6365. }
  6366. return false;
  6367. }
  6368. function matchExpression(vNode, expression) {
  6369. return matchesTag(vNode, expression) && matchesClasses(vNode, expression) && matchesAttributes(vNode, expression) && matchesId(vNode, expression) && matchesPseudos(vNode, expression);
  6370. }
  6371. var escapeRegExp = function() {
  6372. var from = /(?=[\-\[\]{}()*+?.\\\^$|,#\s])/g;
  6373. var to = '\\';
  6374. return function(string) {
  6375. return string.replace(from, to);
  6376. };
  6377. }();
  6378. var reUnescape = /\\/g;
  6379. function convertAttributes(atts) {
  6380. if (!atts) {
  6381. return;
  6382. }
  6383. return atts.map(function(att) {
  6384. var attributeKey = att.name.replace(reUnescape, '');
  6385. var attributeValue = (att.value || '').replace(reUnescape, '');
  6386. var test, regexp;
  6387. switch (att.operator) {
  6388. case '^=':
  6389. regexp = new RegExp('^' + escapeRegExp(attributeValue));
  6390. break;
  6391. case '$=':
  6392. regexp = new RegExp(escapeRegExp(attributeValue) + '$');
  6393. break;
  6394. case '~=':
  6395. regexp = new RegExp('(^|\\s)' + escapeRegExp(attributeValue) + '(\\s|$)');
  6396. break;
  6397. case '|=':
  6398. regexp = new RegExp('^' + escapeRegExp(attributeValue) + '(-|$)');
  6399. break;
  6400. case '=':
  6401. test = function test(value) {
  6402. return attributeValue === value;
  6403. };
  6404. break;
  6405. case '*=':
  6406. test = function test(value) {
  6407. return value && value.includes(attributeValue);
  6408. };
  6409. break;
  6410. case '!=':
  6411. test = function test(value) {
  6412. return attributeValue !== value;
  6413. };
  6414. break;
  6415. default:
  6416. test = function test(value) {
  6417. return !!value;
  6418. };
  6419. }
  6420. if (attributeValue === '' && /^[*$^]=$/.test(att.operator)) {
  6421. test = function test() {
  6422. return false;
  6423. };
  6424. }
  6425. if (!test) {
  6426. test = function test(value) {
  6427. return value && regexp.test(value);
  6428. };
  6429. }
  6430. return {
  6431. key: attributeKey,
  6432. value: attributeValue,
  6433. test: test
  6434. };
  6435. });
  6436. }
  6437. function convertClasses(classes) {
  6438. if (!classes) {
  6439. return;
  6440. }
  6441. return classes.map(function(className) {
  6442. className = className.replace(reUnescape, '');
  6443. return {
  6444. value: className,
  6445. regexp: new RegExp('(^|\\s)' + escapeRegExp(className) + '(\\s|$)')
  6446. };
  6447. });
  6448. }
  6449. function convertPseudos(pseudos) {
  6450. if (!pseudos) {
  6451. return;
  6452. }
  6453. return pseudos.map(function(p) {
  6454. var expressions;
  6455. if ([ 'is', 'not' ].includes(p.name)) {
  6456. expressions = p.value;
  6457. expressions = expressions.selectors ? expressions.selectors : [ expressions ];
  6458. expressions = convertExpressions(expressions);
  6459. }
  6460. return {
  6461. name: p.name,
  6462. expressions: expressions,
  6463. value: p.value
  6464. };
  6465. });
  6466. }
  6467. function convertExpressions(expressions) {
  6468. return expressions.map(function(exp) {
  6469. var newExp = [];
  6470. var rule3 = exp.rule;
  6471. while (rule3) {
  6472. newExp.push({
  6473. tag: rule3.tagName ? rule3.tagName.toLowerCase() : '*',
  6474. combinator: rule3.nestingOperator ? rule3.nestingOperator : ' ',
  6475. id: rule3.id,
  6476. attributes: convertAttributes(rule3.attrs),
  6477. classes: convertClasses(rule3.classNames),
  6478. pseudos: convertPseudos(rule3.pseudos)
  6479. });
  6480. rule3 = rule3.rule;
  6481. }
  6482. return newExp;
  6483. });
  6484. }
  6485. function _convertSelector(selector) {
  6486. var expressions = css_parser_default.parse(selector);
  6487. expressions = expressions.selectors ? expressions.selectors : [ expressions ];
  6488. return convertExpressions(expressions);
  6489. }
  6490. function _matchesExpression(vNode, expressions, matchAnyParent) {
  6491. var exps = [].concat(expressions);
  6492. var expression = exps.pop();
  6493. var matches14 = matchExpression(vNode, expression);
  6494. while (!matches14 && matchAnyParent && vNode.parent) {
  6495. vNode = vNode.parent;
  6496. matches14 = matchExpression(vNode, expression);
  6497. }
  6498. if (exps.length) {
  6499. if ([ ' ', '>' ].includes(expression.combinator) === false) {
  6500. throw new Error('axe.utils.matchesExpression does not support the combinator: ' + expression.combinator);
  6501. }
  6502. matches14 = matches14 && _matchesExpression(vNode.parent, exps, expression.combinator === ' ');
  6503. }
  6504. return matches14;
  6505. }
  6506. function matches(vNode, selector) {
  6507. var expressions = _convertSelector(selector);
  6508. return expressions.some(function(expression) {
  6509. return _matchesExpression(vNode, expression);
  6510. });
  6511. }
  6512. var matches_default = matches;
  6513. function closest(vNode, selector) {
  6514. while (vNode) {
  6515. if (matches_default(vNode, selector)) {
  6516. return vNode;
  6517. }
  6518. if (typeof vNode.parent === 'undefined') {
  6519. throw new TypeError('Cannot resolve parent for non-DOM nodes');
  6520. }
  6521. vNode = vNode.parent;
  6522. }
  6523. return null;
  6524. }
  6525. var closest_default = closest;
  6526. function noop() {}
  6527. function funcGuard(f) {
  6528. if (typeof f !== 'function') {
  6529. throw new TypeError('Queue methods require functions as arguments');
  6530. }
  6531. }
  6532. function queue() {
  6533. var tasks = [];
  6534. var started = 0;
  6535. var remaining = 0;
  6536. var completeQueue = noop;
  6537. var complete = false;
  6538. var err2;
  6539. var defaultFail = function defaultFail(e) {
  6540. err2 = e;
  6541. setTimeout(function() {
  6542. if (err2 !== void 0 && err2 !== null) {
  6543. log_default('Uncaught error (of queue)', err2);
  6544. }
  6545. }, 1);
  6546. };
  6547. var failed = defaultFail;
  6548. function createResolve(i) {
  6549. return function(r) {
  6550. tasks[i] = r;
  6551. remaining -= 1;
  6552. if (!remaining && completeQueue !== noop) {
  6553. complete = true;
  6554. completeQueue(tasks);
  6555. }
  6556. };
  6557. }
  6558. function abort(msg) {
  6559. completeQueue = noop;
  6560. failed(msg);
  6561. return tasks;
  6562. }
  6563. function pop() {
  6564. var length = tasks.length;
  6565. for (;started < length; started++) {
  6566. var task = tasks[started];
  6567. try {
  6568. task.call(null, createResolve(started), abort);
  6569. } catch (e) {
  6570. abort(e);
  6571. }
  6572. }
  6573. }
  6574. var q = {
  6575. defer: function defer(fn) {
  6576. if (_typeof(fn) === 'object' && fn.then && fn['catch']) {
  6577. var defer = fn;
  6578. fn = function fn(resolve, reject) {
  6579. defer.then(resolve)['catch'](reject);
  6580. };
  6581. }
  6582. funcGuard(fn);
  6583. if (err2 !== void 0) {
  6584. return;
  6585. } else if (complete) {
  6586. throw new Error('Queue already completed');
  6587. }
  6588. tasks.push(fn);
  6589. ++remaining;
  6590. pop();
  6591. return q;
  6592. },
  6593. then: function then(fn) {
  6594. funcGuard(fn);
  6595. if (completeQueue !== noop) {
  6596. throw new Error('queue `then` already set');
  6597. }
  6598. if (!err2) {
  6599. completeQueue = fn;
  6600. if (!remaining) {
  6601. complete = true;
  6602. completeQueue(tasks);
  6603. }
  6604. }
  6605. return q;
  6606. },
  6607. catch: function _catch(fn) {
  6608. funcGuard(fn);
  6609. if (failed !== defaultFail) {
  6610. throw new Error('queue `catch` already set');
  6611. }
  6612. if (!err2) {
  6613. failed = fn;
  6614. } else {
  6615. fn(err2);
  6616. err2 = null;
  6617. }
  6618. return q;
  6619. },
  6620. abort: abort
  6621. };
  6622. return q;
  6623. }
  6624. var queue_default = queue;
  6625. var closeHandler;
  6626. var postMessage2;
  6627. var topicHandlers = {};
  6628. function _respondable(win, topic, message, keepalive, replyHandler) {
  6629. var data2 = {
  6630. topic: topic,
  6631. message: message,
  6632. channelId: ''.concat(v4(), ':').concat(v4()),
  6633. keepalive: keepalive
  6634. };
  6635. return postMessage2(win, data2, replyHandler);
  6636. }
  6637. function messageListener(data2, responder) {
  6638. var topic = data2.topic, message = data2.message, keepalive = data2.keepalive;
  6639. var topicHandler = topicHandlers[topic];
  6640. if (!topicHandler) {
  6641. return;
  6642. }
  6643. try {
  6644. topicHandler(message, keepalive, responder);
  6645. } catch (error) {
  6646. axe.log(error);
  6647. responder(error, keepalive);
  6648. }
  6649. }
  6650. _respondable.updateMessenger = function updateMessenger(_ref5) {
  6651. var open = _ref5.open, post = _ref5.post;
  6652. assert_default(typeof open === 'function', 'open callback must be a function');
  6653. assert_default(typeof post === 'function', 'post callback must be a function');
  6654. if (closeHandler) {
  6655. closeHandler();
  6656. }
  6657. var close = open(messageListener);
  6658. if (close) {
  6659. assert_default(typeof close === 'function', 'open callback must return a cleanup function');
  6660. closeHandler = close;
  6661. } else {
  6662. closeHandler = null;
  6663. }
  6664. postMessage2 = post;
  6665. };
  6666. _respondable.subscribe = function subscribe(topic, topicHandler) {
  6667. assert_default(typeof topicHandler === 'function', 'Subscriber callback must be a function');
  6668. assert_default(!topicHandlers[topic], 'Topic '.concat(topic, ' is already registered to.'));
  6669. topicHandlers[topic] = topicHandler;
  6670. };
  6671. _respondable.isInFrame = function isInFrame() {
  6672. var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
  6673. return !!win.frameElement;
  6674. };
  6675. setDefaultFrameMessenger(_respondable);
  6676. function err(message, node) {
  6677. var selector;
  6678. if (axe._tree) {
  6679. selector = _getSelector(node);
  6680. }
  6681. return new Error(message + ': ' + (selector || node));
  6682. }
  6683. function sendCommandToFrame(node, parameters, resolve, reject) {
  6684. var win = node.contentWindow;
  6685. if (!win) {
  6686. log_default('Frame does not have a content window', node);
  6687. resolve(null);
  6688. return;
  6689. }
  6690. var timeout = setTimeout(function() {
  6691. timeout = setTimeout(function() {
  6692. if (!parameters.debug) {
  6693. resolve(null);
  6694. } else {
  6695. reject(err('No response from frame', node));
  6696. }
  6697. }, 0);
  6698. }, 500);
  6699. _respondable(win, 'axe.ping', null, void 0, function() {
  6700. clearTimeout(timeout);
  6701. var frameWaitTime = parameters.options && parameters.options.frameWaitTime || 6e4;
  6702. timeout = setTimeout(function collectResultFramesTimeout() {
  6703. reject(err('Axe in frame timed out', node));
  6704. }, frameWaitTime);
  6705. _respondable(win, 'axe.start', parameters, void 0, function(data2) {
  6706. clearTimeout(timeout);
  6707. if (data2 instanceof Error === false) {
  6708. resolve(data2);
  6709. } else {
  6710. reject(data2);
  6711. }
  6712. });
  6713. });
  6714. }
  6715. var send_command_to_frame_default = sendCommandToFrame;
  6716. function getAllChecks(object) {
  6717. var result = [];
  6718. return result.concat(object.any || []).concat(object.all || []).concat(object.none || []);
  6719. }
  6720. var get_all_checks_default = getAllChecks;
  6721. function nodeSorter(nodeA, nodeB) {
  6722. nodeA = nodeA.actualNode || nodeA;
  6723. nodeB = nodeB.actualNode || nodeB;
  6724. if (nodeA === nodeB) {
  6725. return 0;
  6726. }
  6727. if (nodeA.compareDocumentPosition(nodeB) & 4) {
  6728. return -1;
  6729. } else {
  6730. return 1;
  6731. }
  6732. }
  6733. var node_sorter_default = nodeSorter;
  6734. function findBy(array, key, value) {
  6735. if (Array.isArray(array)) {
  6736. return array.find(function(obj) {
  6737. return _typeof(obj) === 'object' && obj[key] === value;
  6738. });
  6739. }
  6740. }
  6741. var find_by_default = findBy;
  6742. function pushFrame(resultSet, dqFrame, options) {
  6743. resultSet.forEach(function(res) {
  6744. res.node = dq_element_default.fromFrame(res.node, options, dqFrame);
  6745. var checks = get_all_checks_default(res);
  6746. checks.forEach(function(check4) {
  6747. check4.relatedNodes = check4.relatedNodes.map(function(node) {
  6748. return dq_element_default.fromFrame(node, options, dqFrame);
  6749. });
  6750. });
  6751. });
  6752. }
  6753. function spliceNodes(target, to) {
  6754. var firstFromFrame = to[0].node;
  6755. for (var _i2 = 0; _i2 < target.length; _i2++) {
  6756. var node = target[_i2].node;
  6757. var sorterResult = node_sorter_default({
  6758. actualNode: node.element
  6759. }, {
  6760. actualNode: firstFromFrame.element
  6761. });
  6762. if (sorterResult > 0 || sorterResult === 0 && firstFromFrame.selector.length < node.selector.length) {
  6763. target.splice.apply(target, [ _i2, 0 ].concat(to));
  6764. return;
  6765. }
  6766. }
  6767. target.push.apply(target, to);
  6768. }
  6769. function normalizeResult(result) {
  6770. if (!result || !result.results) {
  6771. return null;
  6772. }
  6773. if (!Array.isArray(result.results)) {
  6774. return [ result.results ];
  6775. }
  6776. if (!result.results.length) {
  6777. return null;
  6778. }
  6779. return result.results;
  6780. }
  6781. function mergeResults(frameResults, options) {
  6782. var mergedResult = [];
  6783. frameResults.forEach(function(frameResult) {
  6784. var results = normalizeResult(frameResult);
  6785. if (!results || !results.length) {
  6786. return;
  6787. }
  6788. var dqFrame;
  6789. if (frameResult.frameElement) {
  6790. var spec = {
  6791. selector: [ frameResult.frame ]
  6792. };
  6793. dqFrame = new dq_element_default(frameResult.frameElement, options, spec);
  6794. }
  6795. results.forEach(function(ruleResult) {
  6796. if (ruleResult.nodes && dqFrame) {
  6797. pushFrame(ruleResult.nodes, dqFrame, options);
  6798. }
  6799. var res = find_by_default(mergedResult, 'id', ruleResult.id);
  6800. if (!res) {
  6801. mergedResult.push(ruleResult);
  6802. } else {
  6803. if (ruleResult.nodes.length) {
  6804. spliceNodes(res.nodes, ruleResult.nodes);
  6805. }
  6806. }
  6807. });
  6808. });
  6809. if (frameResults.length > 1 && window && window.Node) {
  6810. mergedResult.forEach(function(result) {
  6811. if (result.nodes) {
  6812. result.nodes.sort(function(a, b) {
  6813. var aNode = a.node.element;
  6814. var bNode = b.node.element;
  6815. if (aNode !== bNode && (a.node._fromFrame || b.node._fromFrame)) {
  6816. return node_sorter_default(aNode, bNode);
  6817. }
  6818. return 0;
  6819. });
  6820. }
  6821. });
  6822. }
  6823. return mergedResult;
  6824. }
  6825. var merge_results_default = mergeResults;
  6826. function collectResultsFromFrames(parentContent, options, command, parameter, resolve, reject) {
  6827. var q = queue_default();
  6828. var frames = parentContent.frames;
  6829. frames.forEach(function(frame) {
  6830. var tabindex = parseInt(frame.node.getAttribute('tabindex'), 10);
  6831. var focusable = isNaN(tabindex) || tabindex >= 0;
  6832. var rect = frame.node.getBoundingClientRect();
  6833. var width = parseInt(frame.node.getAttribute('width'), 10);
  6834. var height = parseInt(frame.node.getAttribute('height'), 10);
  6835. width = isNaN(width) ? rect.width : width;
  6836. height = isNaN(height) ? rect.height : height;
  6837. var params = {
  6838. options: options,
  6839. command: command,
  6840. parameter: parameter,
  6841. context: {
  6842. initiator: false,
  6843. focusable: parentContent.focusable === false ? false : focusable,
  6844. boundingClientRect: {
  6845. width: width,
  6846. height: height
  6847. },
  6848. page: parentContent.page,
  6849. include: frame.include || [],
  6850. exclude: frame.exclude || []
  6851. }
  6852. };
  6853. q.defer(function(res, rej) {
  6854. var node = frame.node;
  6855. send_command_to_frame_default(node, params, function(data2) {
  6856. if (data2) {
  6857. return res({
  6858. results: data2,
  6859. frameElement: node,
  6860. frame: _getSelector(node)
  6861. });
  6862. }
  6863. res(null);
  6864. }, rej);
  6865. });
  6866. });
  6867. q.then(function(data2) {
  6868. resolve(merge_results_default(data2, options));
  6869. })['catch'](reject);
  6870. }
  6871. var collect_results_from_frames_default = collectResultsFromFrames;
  6872. function contains(vNode, otherVNode) {
  6873. function containsShadowChild(vNode2, otherVNode2) {
  6874. if (vNode2.shadowId === otherVNode2.shadowId) {
  6875. return true;
  6876. }
  6877. return !!vNode2.children.find(function(child) {
  6878. return containsShadowChild(child, otherVNode2);
  6879. });
  6880. }
  6881. if (vNode.shadowId || otherVNode.shadowId) {
  6882. return containsShadowChild(vNode, otherVNode);
  6883. }
  6884. if (vNode.actualNode) {
  6885. if (typeof vNode.actualNode.contains === 'function') {
  6886. return vNode.actualNode.contains(otherVNode.actualNode);
  6887. }
  6888. return !!(vNode.actualNode.compareDocumentPosition(otherVNode.actualNode) & 16);
  6889. } else {
  6890. do {
  6891. if (otherVNode === vNode) {
  6892. return true;
  6893. }
  6894. } while (otherVNode = otherVNode && otherVNode.parent);
  6895. }
  6896. return false;
  6897. }
  6898. var contains_default = contains;
  6899. function deepMerge() {
  6900. var target = {};
  6901. for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {
  6902. sources[_key] = arguments[_key];
  6903. }
  6904. sources.forEach(function(source) {
  6905. if (!source || _typeof(source) !== 'object' || Array.isArray(source)) {
  6906. return;
  6907. }
  6908. for (var _i3 = 0, _Object$keys = Object.keys(source); _i3 < _Object$keys.length; _i3++) {
  6909. var key = _Object$keys[_i3];
  6910. if (!target.hasOwnProperty(key) || _typeof(source[key]) !== 'object' || Array.isArray(target[key])) {
  6911. target[key] = source[key];
  6912. } else {
  6913. target[key] = deepMerge(target[key], source[key]);
  6914. }
  6915. }
  6916. });
  6917. return target;
  6918. }
  6919. var deep_merge_default = deepMerge;
  6920. function extendMetaData(to, from) {
  6921. Object.assign(to, from);
  6922. Object.keys(from).filter(function(prop) {
  6923. return typeof from[prop] === 'function';
  6924. }).forEach(function(prop) {
  6925. to[prop] = null;
  6926. try {
  6927. to[prop] = from[prop](to);
  6928. } catch (e) {}
  6929. });
  6930. }
  6931. var extend_meta_data_default = extendMetaData;
  6932. var possibleShadowRoots = [ 'article', 'aside', 'blockquote', 'body', 'div', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'main', 'nav', 'p', 'section', 'span' ];
  6933. function isShadowRoot(node) {
  6934. if (node.shadowRoot) {
  6935. var nodeName2 = node.nodeName.toLowerCase();
  6936. if (possibleShadowRoots.includes(nodeName2) || /^[a-z][a-z0-9_.-]*-[a-z0-9_.-]*$/.test(nodeName2)) {
  6937. return true;
  6938. }
  6939. }
  6940. return false;
  6941. }
  6942. var is_shadow_root_default = isShadowRoot;
  6943. var dom_exports = {};
  6944. __export(dom_exports, {
  6945. findElmsInContext: function findElmsInContext() {
  6946. return find_elms_in_context_default;
  6947. },
  6948. findUp: function findUp() {
  6949. return find_up_default;
  6950. },
  6951. findUpVirtual: function findUpVirtual() {
  6952. return find_up_virtual_default;
  6953. },
  6954. getComposedParent: function getComposedParent() {
  6955. return get_composed_parent_default;
  6956. },
  6957. getElementByReference: function getElementByReference() {
  6958. return get_element_by_reference_default;
  6959. },
  6960. getElementCoordinates: function getElementCoordinates() {
  6961. return get_element_coordinates_default;
  6962. },
  6963. getElementStack: function getElementStack() {
  6964. return get_element_stack_default;
  6965. },
  6966. getRootNode: function getRootNode() {
  6967. return get_root_node_default2;
  6968. },
  6969. getScrollOffset: function getScrollOffset() {
  6970. return get_scroll_offset_default;
  6971. },
  6972. getTabbableElements: function getTabbableElements() {
  6973. return get_tabbable_elements_default;
  6974. },
  6975. getTextElementStack: function getTextElementStack() {
  6976. return get_text_element_stack_default;
  6977. },
  6978. getViewportSize: function getViewportSize() {
  6979. return get_viewport_size_default;
  6980. },
  6981. hasContent: function hasContent() {
  6982. return has_content_default;
  6983. },
  6984. hasContentVirtual: function hasContentVirtual() {
  6985. return has_content_virtual_default;
  6986. },
  6987. idrefs: function idrefs() {
  6988. return idrefs_default;
  6989. },
  6990. insertedIntoFocusOrder: function insertedIntoFocusOrder() {
  6991. return inserted_into_focus_order_default;
  6992. },
  6993. isFocusable: function isFocusable() {
  6994. return is_focusable_default;
  6995. },
  6996. isHTML5: function isHTML5() {
  6997. return is_html5_default;
  6998. },
  6999. isHiddenWithCSS: function isHiddenWithCSS() {
  7000. return is_hidden_with_css_default;
  7001. },
  7002. isInTextBlock: function isInTextBlock() {
  7003. return is_in_text_block_default;
  7004. },
  7005. isModalOpen: function isModalOpen() {
  7006. return is_modal_open_default;
  7007. },
  7008. isNativelyFocusable: function isNativelyFocusable() {
  7009. return is_natively_focusable_default;
  7010. },
  7011. isNode: function isNode() {
  7012. return is_node_default;
  7013. },
  7014. isOffscreen: function isOffscreen() {
  7015. return is_offscreen_default;
  7016. },
  7017. isOpaque: function isOpaque() {
  7018. return is_opaque_default;
  7019. },
  7020. isSkipLink: function isSkipLink() {
  7021. return is_skip_link_default;
  7022. },
  7023. isVisible: function isVisible() {
  7024. return is_visible_default;
  7025. },
  7026. isVisualContent: function isVisualContent() {
  7027. return is_visual_content_default;
  7028. },
  7029. reduceToElementsBelowFloating: function reduceToElementsBelowFloating() {
  7030. return reduce_to_elements_below_floating_default;
  7031. },
  7032. shadowElementsFromPoint: function shadowElementsFromPoint() {
  7033. return shadow_elements_from_point_default;
  7034. },
  7035. urlPropsFromAttribute: function urlPropsFromAttribute() {
  7036. return url_props_from_attribute_default;
  7037. },
  7038. visuallyContains: function visuallyContains() {
  7039. return visually_contains_default;
  7040. },
  7041. visuallyOverlaps: function visuallyOverlaps() {
  7042. return visually_overlaps_default;
  7043. }
  7044. });
  7045. function getRootNode(node) {
  7046. var doc = node.getRootNode && node.getRootNode() || document;
  7047. if (doc === node) {
  7048. doc = document;
  7049. }
  7050. return doc;
  7051. }
  7052. var get_root_node_default = getRootNode;
  7053. var get_root_node_default2 = get_root_node_default;
  7054. function findElmsInContext(_ref6) {
  7055. var context3 = _ref6.context, value = _ref6.value, attr = _ref6.attr, _ref6$elm = _ref6.elm, elm = _ref6$elm === void 0 ? '' : _ref6$elm;
  7056. var root;
  7057. var escapedValue = escape_selector_default(value);
  7058. if (context3.nodeType === 9 || context3.nodeType === 11) {
  7059. root = context3;
  7060. } else {
  7061. root = get_root_node_default2(context3);
  7062. }
  7063. return Array.from(root.querySelectorAll(elm + '[' + attr + '=' + escapedValue + ']'));
  7064. }
  7065. var find_elms_in_context_default = findElmsInContext;
  7066. function findUpVirtual(element, target) {
  7067. var parent;
  7068. parent = element.actualNode;
  7069. if (!element.shadowId && typeof element.actualNode.closest === 'function') {
  7070. var match = element.actualNode.closest(target);
  7071. if (match) {
  7072. return match;
  7073. }
  7074. return null;
  7075. }
  7076. do {
  7077. parent = parent.assignedSlot ? parent.assignedSlot : parent.parentNode;
  7078. if (parent && parent.nodeType === 11) {
  7079. parent = parent.host;
  7080. }
  7081. } while (parent && !element_matches_default(parent, target) && parent !== document.documentElement);
  7082. if (!parent) {
  7083. return null;
  7084. }
  7085. if (!element_matches_default(parent, target)) {
  7086. return null;
  7087. }
  7088. return parent;
  7089. }
  7090. var find_up_virtual_default = findUpVirtual;
  7091. function findUp(element, target) {
  7092. return find_up_virtual_default(get_node_from_tree_default(element), target);
  7093. }
  7094. var find_up_default = findUp;
  7095. function getComposedParent(element) {
  7096. if (element.assignedSlot) {
  7097. return getComposedParent(element.assignedSlot);
  7098. } else if (element.parentNode) {
  7099. var parentNode = element.parentNode;
  7100. if (parentNode.nodeType === 1) {
  7101. return parentNode;
  7102. } else if (parentNode.host) {
  7103. return parentNode.host;
  7104. }
  7105. }
  7106. return null;
  7107. }
  7108. var get_composed_parent_default = getComposedParent;
  7109. function getElementByReference(node, attr) {
  7110. var fragment = node.getAttribute(attr);
  7111. if (!fragment) {
  7112. return null;
  7113. }
  7114. if (fragment.charAt(0) === '#') {
  7115. fragment = decodeURIComponent(fragment.substring(1));
  7116. } else if (fragment.substr(0, 2) === '/#') {
  7117. fragment = decodeURIComponent(fragment.substring(2));
  7118. }
  7119. var candidate = document.getElementById(fragment);
  7120. if (candidate) {
  7121. return candidate;
  7122. }
  7123. candidate = document.getElementsByName(fragment);
  7124. if (candidate.length) {
  7125. return candidate[0];
  7126. }
  7127. return null;
  7128. }
  7129. var get_element_by_reference_default = getElementByReference;
  7130. function getScrollOffset(element) {
  7131. if (!element.nodeType && element.document) {
  7132. element = element.document;
  7133. }
  7134. if (element.nodeType === 9) {
  7135. var docElement = element.documentElement, body = element.body;
  7136. return {
  7137. left: docElement && docElement.scrollLeft || body && body.scrollLeft || 0,
  7138. top: docElement && docElement.scrollTop || body && body.scrollTop || 0
  7139. };
  7140. }
  7141. return {
  7142. left: element.scrollLeft,
  7143. top: element.scrollTop
  7144. };
  7145. }
  7146. var get_scroll_offset_default = getScrollOffset;
  7147. function getElementCoordinates(element) {
  7148. var scrollOffset = get_scroll_offset_default(document), xOffset = scrollOffset.left, yOffset = scrollOffset.top, coords = element.getBoundingClientRect();
  7149. return {
  7150. top: coords.top + yOffset,
  7151. right: coords.right + xOffset,
  7152. bottom: coords.bottom + yOffset,
  7153. left: coords.left + xOffset,
  7154. width: coords.right - coords.left,
  7155. height: coords.bottom - coords.top
  7156. };
  7157. }
  7158. var get_element_coordinates_default = getElementCoordinates;
  7159. function getViewportSize(win) {
  7160. var doc = win.document;
  7161. var docElement = doc.documentElement;
  7162. if (win.innerWidth) {
  7163. return {
  7164. width: win.innerWidth,
  7165. height: win.innerHeight
  7166. };
  7167. }
  7168. if (docElement) {
  7169. return {
  7170. width: docElement.clientWidth,
  7171. height: docElement.clientHeight
  7172. };
  7173. }
  7174. var body = doc.body;
  7175. return {
  7176. width: body.clientWidth,
  7177. height: body.clientHeight
  7178. };
  7179. }
  7180. var get_viewport_size_default = getViewportSize;
  7181. function noParentScrolled(element, offset) {
  7182. element = get_composed_parent_default(element);
  7183. while (element && element.nodeName.toLowerCase() !== 'html') {
  7184. if (element.scrollTop) {
  7185. offset += element.scrollTop;
  7186. if (offset >= 0) {
  7187. return false;
  7188. }
  7189. }
  7190. element = get_composed_parent_default(element);
  7191. }
  7192. return true;
  7193. }
  7194. function isOffscreen(element) {
  7195. var leftBoundary;
  7196. var docElement = document.documentElement;
  7197. var styl = window.getComputedStyle(element);
  7198. var dir = window.getComputedStyle(document.body || docElement).getPropertyValue('direction');
  7199. var coords = get_element_coordinates_default(element);
  7200. if (coords.bottom < 0 && (noParentScrolled(element, coords.bottom) || styl.position === 'absolute')) {
  7201. return true;
  7202. }
  7203. if (coords.left === 0 && coords.right === 0) {
  7204. return false;
  7205. }
  7206. if (dir === 'ltr') {
  7207. if (coords.right <= 0) {
  7208. return true;
  7209. }
  7210. } else {
  7211. leftBoundary = Math.max(docElement.scrollWidth, get_viewport_size_default(window).width);
  7212. if (coords.left >= leftBoundary) {
  7213. return true;
  7214. }
  7215. }
  7216. return false;
  7217. }
  7218. var is_offscreen_default = isOffscreen;
  7219. var clipRegex = /rect\s*\(([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px\s*\)/;
  7220. var clipPathRegex = /(\w+)\((\d+)/;
  7221. function isClipped(style) {
  7222. var matchesClip = style.getPropertyValue('clip').match(clipRegex);
  7223. var matchesClipPath = style.getPropertyValue('clip-path').match(clipPathRegex);
  7224. if (matchesClip && matchesClip.length === 5) {
  7225. return matchesClip[3] - matchesClip[1] <= 0 && matchesClip[2] - matchesClip[4] <= 0;
  7226. }
  7227. if (matchesClipPath) {
  7228. var type = matchesClipPath[1];
  7229. var value = parseInt(matchesClipPath[2], 10);
  7230. switch (type) {
  7231. case 'inset':
  7232. return value >= 50;
  7233. case 'circle':
  7234. return value === 0;
  7235. default:
  7236. }
  7237. }
  7238. return false;
  7239. }
  7240. function isAreaVisible(el, screenReader, recursed) {
  7241. var mapEl = find_up_default(el, 'map');
  7242. if (!mapEl) {
  7243. return false;
  7244. }
  7245. var mapElName = mapEl.getAttribute('name');
  7246. if (!mapElName) {
  7247. return false;
  7248. }
  7249. var mapElRootNode = get_root_node_default2(el);
  7250. if (!mapElRootNode || mapElRootNode.nodeType !== 9) {
  7251. return false;
  7252. }
  7253. var refs = query_selector_all_default(axe._tree, 'img[usemap="#'.concat(escape_selector_default(mapElName), '"]'));
  7254. if (!refs || !refs.length) {
  7255. return false;
  7256. }
  7257. return refs.some(function(_ref7) {
  7258. var actualNode = _ref7.actualNode;
  7259. return isVisible(actualNode, screenReader, recursed);
  7260. });
  7261. }
  7262. function isVisible(el, screenReader, recursed) {
  7263. if (!el) {
  7264. throw new TypeError('Cannot determine if element is visible for non-DOM nodes');
  7265. }
  7266. var vNode = get_node_from_tree_default(el);
  7267. var cacheName = '_isVisible' + (screenReader ? 'ScreenReader' : '');
  7268. if (el.nodeType === 9) {
  7269. return true;
  7270. }
  7271. if (el.nodeType === 11) {
  7272. el = el.host;
  7273. }
  7274. if (vNode && typeof vNode[cacheName] !== 'undefined') {
  7275. return vNode[cacheName];
  7276. }
  7277. var style = window.getComputedStyle(el, null);
  7278. if (style === null) {
  7279. return false;
  7280. }
  7281. var nodeName2 = el.nodeName.toUpperCase();
  7282. if (nodeName2 === 'AREA') {
  7283. return isAreaVisible(el, screenReader, recursed);
  7284. }
  7285. if (style.getPropertyValue('display') === 'none' || [ 'STYLE', 'SCRIPT', 'NOSCRIPT', 'TEMPLATE' ].includes(nodeName2)) {
  7286. return false;
  7287. }
  7288. if (screenReader && el.getAttribute('aria-hidden') === 'true') {
  7289. return false;
  7290. }
  7291. if (!screenReader && (isClipped(style) || style.getPropertyValue('opacity') === '0' || get_scroll_default(el) && parseInt(style.getPropertyValue('height')) === 0)) {
  7292. return false;
  7293. }
  7294. if (!recursed && (style.getPropertyValue('visibility') === 'hidden' || !screenReader && is_offscreen_default(el))) {
  7295. return false;
  7296. }
  7297. var parent = el.assignedSlot ? el.assignedSlot : el.parentNode;
  7298. var visible4 = false;
  7299. if (parent) {
  7300. visible4 = isVisible(parent, screenReader, true);
  7301. }
  7302. if (vNode) {
  7303. vNode[cacheName] = visible4;
  7304. }
  7305. return visible4;
  7306. }
  7307. var is_visible_default = isVisible;
  7308. var gridSize = 200;
  7309. function isStackingContext(vNode, parentVNode) {
  7310. var position = vNode.getComputedStylePropertyValue('position');
  7311. var zIndex = vNode.getComputedStylePropertyValue('z-index');
  7312. if (position === 'fixed' || position === 'sticky') {
  7313. return true;
  7314. }
  7315. if (zIndex !== 'auto' && position !== 'static') {
  7316. return true;
  7317. }
  7318. if (vNode.getComputedStylePropertyValue('opacity') !== '1') {
  7319. return true;
  7320. }
  7321. var transform = vNode.getComputedStylePropertyValue('-webkit-transform') || vNode.getComputedStylePropertyValue('-ms-transform') || vNode.getComputedStylePropertyValue('transform') || 'none';
  7322. if (transform !== 'none') {
  7323. return true;
  7324. }
  7325. var mixBlendMode = vNode.getComputedStylePropertyValue('mix-blend-mode');
  7326. if (mixBlendMode && mixBlendMode !== 'normal') {
  7327. return true;
  7328. }
  7329. var filter = vNode.getComputedStylePropertyValue('filter');
  7330. if (filter && filter !== 'none') {
  7331. return true;
  7332. }
  7333. var perspective = vNode.getComputedStylePropertyValue('perspective');
  7334. if (perspective && perspective !== 'none') {
  7335. return true;
  7336. }
  7337. var clipPath = vNode.getComputedStylePropertyValue('clip-path');
  7338. if (clipPath && clipPath !== 'none') {
  7339. return true;
  7340. }
  7341. var mask = vNode.getComputedStylePropertyValue('-webkit-mask') || vNode.getComputedStylePropertyValue('mask') || 'none';
  7342. if (mask !== 'none') {
  7343. return true;
  7344. }
  7345. var maskImage = vNode.getComputedStylePropertyValue('-webkit-mask-image') || vNode.getComputedStylePropertyValue('mask-image') || 'none';
  7346. if (maskImage !== 'none') {
  7347. return true;
  7348. }
  7349. var maskBorder = vNode.getComputedStylePropertyValue('-webkit-mask-border') || vNode.getComputedStylePropertyValue('mask-border') || 'none';
  7350. if (maskBorder !== 'none') {
  7351. return true;
  7352. }
  7353. if (vNode.getComputedStylePropertyValue('isolation') === 'isolate') {
  7354. return true;
  7355. }
  7356. var willChange = vNode.getComputedStylePropertyValue('will-change');
  7357. if (willChange === 'transform' || willChange === 'opacity') {
  7358. return true;
  7359. }
  7360. if (vNode.getComputedStylePropertyValue('-webkit-overflow-scrolling') === 'touch') {
  7361. return true;
  7362. }
  7363. var contain = vNode.getComputedStylePropertyValue('contain');
  7364. if ([ 'layout', 'paint', 'strict', 'content' ].includes(contain)) {
  7365. return true;
  7366. }
  7367. if (zIndex !== 'auto' && parentVNode) {
  7368. var parentDsiplay = parentVNode.getComputedStylePropertyValue('display');
  7369. if ([ 'flex', 'inline-flex', 'inline flex', 'grid', 'inline-grid', 'inline grid' ].includes(parentDsiplay)) {
  7370. return true;
  7371. }
  7372. }
  7373. return false;
  7374. }
  7375. function isFloated(vNode) {
  7376. if (!vNode) {
  7377. return false;
  7378. }
  7379. if (vNode._isFloated !== void 0) {
  7380. return vNode._isFloated;
  7381. }
  7382. var floatStyle = vNode.getComputedStylePropertyValue('float');
  7383. if (floatStyle !== 'none') {
  7384. vNode._isFloated = true;
  7385. return true;
  7386. }
  7387. var floated = isFloated(vNode.parent);
  7388. vNode._isFloated = floated;
  7389. return floated;
  7390. }
  7391. function getPositionOrder(vNode) {
  7392. if (vNode.getComputedStylePropertyValue('position') === 'static') {
  7393. if (vNode.getComputedStylePropertyValue('display').indexOf('inline') !== -1) {
  7394. return 2;
  7395. }
  7396. if (isFloated(vNode)) {
  7397. return 1;
  7398. }
  7399. return 0;
  7400. }
  7401. return 3;
  7402. }
  7403. function visuallySort(a, b) {
  7404. for (var _i4 = 0; _i4 < a._stackingOrder.length; _i4++) {
  7405. if (typeof b._stackingOrder[_i4] === 'undefined') {
  7406. return -1;
  7407. }
  7408. if (b._stackingOrder[_i4] > a._stackingOrder[_i4]) {
  7409. return 1;
  7410. }
  7411. if (b._stackingOrder[_i4] < a._stackingOrder[_i4]) {
  7412. return -1;
  7413. }
  7414. }
  7415. var aNode = a.actualNode;
  7416. var bNode = b.actualNode;
  7417. if (aNode.getRootNode && aNode.getRootNode() !== bNode.getRootNode()) {
  7418. var boundaries = [];
  7419. while (aNode) {
  7420. boundaries.push({
  7421. root: aNode.getRootNode(),
  7422. node: aNode
  7423. });
  7424. aNode = aNode.getRootNode().host;
  7425. }
  7426. while (bNode && !boundaries.find(function(boundary) {
  7427. return boundary.root === bNode.getRootNode();
  7428. })) {
  7429. bNode = bNode.getRootNode().host;
  7430. }
  7431. aNode = boundaries.find(function(boundary) {
  7432. return boundary.root === bNode.getRootNode();
  7433. }).node;
  7434. if (aNode === bNode) {
  7435. return a.actualNode.getRootNode() !== aNode.getRootNode() ? -1 : 1;
  7436. }
  7437. }
  7438. var _window$Node = window.Node, DOCUMENT_POSITION_FOLLOWING = _window$Node.DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_CONTAINS = _window$Node.DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_CONTAINED_BY = _window$Node.DOCUMENT_POSITION_CONTAINED_BY;
  7439. var docPosition = aNode.compareDocumentPosition(bNode);
  7440. var DOMOrder = docPosition & DOCUMENT_POSITION_FOLLOWING ? 1 : -1;
  7441. var isDescendant = docPosition & DOCUMENT_POSITION_CONTAINS || docPosition & DOCUMENT_POSITION_CONTAINED_BY;
  7442. var aPosition = getPositionOrder(a);
  7443. var bPosition = getPositionOrder(b);
  7444. if (aPosition === bPosition || isDescendant) {
  7445. return DOMOrder;
  7446. }
  7447. return bPosition - aPosition;
  7448. }
  7449. function getStackingOrder(vNode, parentVNode) {
  7450. var stackingOrder = parentVNode._stackingOrder.slice();
  7451. var zIndex = vNode.getComputedStylePropertyValue('z-index');
  7452. if (zIndex !== 'auto') {
  7453. stackingOrder[stackingOrder.length - 1] = parseInt(zIndex);
  7454. }
  7455. if (isStackingContext(vNode, parentVNode)) {
  7456. stackingOrder.push(0);
  7457. }
  7458. return stackingOrder;
  7459. }
  7460. function findScrollRegionParent(vNode, parentVNode) {
  7461. var scrollRegionParent = null;
  7462. var checkedNodes = [ vNode ];
  7463. while (parentVNode) {
  7464. if (parentVNode._scrollRegionParent) {
  7465. scrollRegionParent = parentVNode._scrollRegionParent;
  7466. break;
  7467. }
  7468. if (get_scroll_default(parentVNode.actualNode)) {
  7469. scrollRegionParent = parentVNode;
  7470. break;
  7471. }
  7472. checkedNodes.push(parentVNode);
  7473. parentVNode = get_node_from_tree_default(parentVNode.actualNode.parentElement || parentVNode.actualNode.parentNode);
  7474. }
  7475. checkedNodes.forEach(function(vNode2) {
  7476. return vNode2._scrollRegionParent = scrollRegionParent;
  7477. });
  7478. return scrollRegionParent;
  7479. }
  7480. function addNodeToGrid(grid, vNode) {
  7481. vNode._grid = grid;
  7482. vNode.clientRects.forEach(function(rect) {
  7483. var x = rect.left;
  7484. var y = rect.top;
  7485. var startRow = y / gridSize | 0;
  7486. var startCol = x / gridSize | 0;
  7487. var endRow = (y + rect.height) / gridSize | 0;
  7488. var endCol = (x + rect.width) / gridSize | 0;
  7489. for (var row = startRow; row <= endRow; row++) {
  7490. grid.cells[row] = grid.cells[row] || [];
  7491. for (var col = startCol; col <= endCol; col++) {
  7492. grid.cells[row][col] = grid.cells[row][col] || [];
  7493. if (!grid.cells[row][col].includes(vNode)) {
  7494. grid.cells[row][col].push(vNode);
  7495. }
  7496. }
  7497. }
  7498. });
  7499. }
  7500. function createGrid() {
  7501. var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.body;
  7502. var rootGrid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
  7503. container: null,
  7504. cells: []
  7505. };
  7506. var parentVNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  7507. if (!parentVNode) {
  7508. var vNode = get_node_from_tree_default(document.documentElement);
  7509. if (!vNode) {
  7510. vNode = new virtual_node_default(document.documentElement);
  7511. }
  7512. vNode._stackingOrder = [ 0 ];
  7513. addNodeToGrid(rootGrid, vNode);
  7514. if (get_scroll_default(vNode.actualNode)) {
  7515. var subGrid = {
  7516. container: vNode,
  7517. cells: []
  7518. };
  7519. vNode._subGrid = subGrid;
  7520. }
  7521. }
  7522. var treeWalker = document.createTreeWalker(root, window.NodeFilter.SHOW_ELEMENT, null, false);
  7523. var node = parentVNode ? treeWalker.nextNode() : treeWalker.currentNode;
  7524. while (node) {
  7525. var _vNode = get_node_from_tree_default(node);
  7526. if (node.parentElement) {
  7527. parentVNode = get_node_from_tree_default(node.parentElement);
  7528. } else if (node.parentNode && get_node_from_tree_default(node.parentNode)) {
  7529. parentVNode = get_node_from_tree_default(node.parentNode);
  7530. }
  7531. if (!_vNode) {
  7532. _vNode = new axe.VirtualNode(node, parentVNode);
  7533. }
  7534. _vNode._stackingOrder = getStackingOrder(_vNode, parentVNode);
  7535. var scrollRegionParent = findScrollRegionParent(_vNode, parentVNode);
  7536. var grid = scrollRegionParent ? scrollRegionParent._subGrid : rootGrid;
  7537. if (get_scroll_default(_vNode.actualNode)) {
  7538. var _subGrid = {
  7539. container: _vNode,
  7540. cells: []
  7541. };
  7542. _vNode._subGrid = _subGrid;
  7543. }
  7544. var rect = _vNode.boundingClientRect;
  7545. if (rect.width !== 0 && rect.height !== 0 && is_visible_default(node)) {
  7546. addNodeToGrid(grid, _vNode);
  7547. }
  7548. if (is_shadow_root_default(node)) {
  7549. createGrid(node.shadowRoot, grid, _vNode);
  7550. }
  7551. node = treeWalker.nextNode();
  7552. }
  7553. }
  7554. function getRectStack(grid, rect) {
  7555. var recursed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  7556. var x = rect.left + rect.width / 2;
  7557. var y = rect.top + rect.height / 2;
  7558. var row = y / gridSize | 0;
  7559. var col = x / gridSize | 0;
  7560. var stack = grid.cells[row][col].filter(function(gridCellNode) {
  7561. return gridCellNode.clientRects.find(function(clientRect) {
  7562. var rectX = clientRect.left;
  7563. var rectY = clientRect.top;
  7564. return x <= rectX + clientRect.width && x >= rectX && y <= rectY + clientRect.height && y >= rectY;
  7565. });
  7566. });
  7567. var gridContainer = grid.container;
  7568. if (gridContainer) {
  7569. stack = getRectStack(gridContainer._grid, gridContainer.boundingClientRect, true).concat(stack);
  7570. }
  7571. if (!recursed) {
  7572. stack = stack.sort(visuallySort).map(function(vNode) {
  7573. return vNode.actualNode;
  7574. }).concat(document.documentElement).filter(function(node, index, array) {
  7575. return array.indexOf(node) === index;
  7576. });
  7577. }
  7578. return stack;
  7579. }
  7580. var _cache = {};
  7581. var cache = {
  7582. set: function set(key, value) {
  7583. _cache[key] = value;
  7584. },
  7585. get: function get(key) {
  7586. return _cache[key];
  7587. },
  7588. clear: function clear() {
  7589. _cache = {};
  7590. }
  7591. };
  7592. var cache_default = cache;
  7593. function getElementStack(node) {
  7594. if (!cache_default.get('gridCreated')) {
  7595. createGrid();
  7596. cache_default.set('gridCreated', true);
  7597. }
  7598. var vNode = get_node_from_tree_default(node);
  7599. var grid = vNode._grid;
  7600. if (!grid) {
  7601. return [];
  7602. }
  7603. return getRectStack(grid, vNode.boundingClientRect);
  7604. }
  7605. var get_element_stack_default = getElementStack;
  7606. function getTabbableElements(virtualNode) {
  7607. var nodeAndDescendents = query_selector_all_default(virtualNode, '*');
  7608. var tabbableElements = nodeAndDescendents.filter(function(vNode) {
  7609. var isFocusable2 = vNode.isFocusable;
  7610. var tabIndex = vNode.actualNode.getAttribute('tabindex');
  7611. tabIndex = tabIndex && !isNaN(parseInt(tabIndex, 10)) ? parseInt(tabIndex) : null;
  7612. return tabIndex ? isFocusable2 && tabIndex >= 0 : isFocusable2;
  7613. });
  7614. return tabbableElements;
  7615. }
  7616. var get_tabbable_elements_default = getTabbableElements;
  7617. function sanitize(str) {
  7618. if (!str) {
  7619. return '';
  7620. }
  7621. return str.replace(/\r\n/g, '\n').replace(/\u00A0/g, ' ').replace(/[\s]{2,}/g, ' ').trim();
  7622. }
  7623. var sanitize_default = sanitize;
  7624. function getTextElementStack(node) {
  7625. if (!cache_default.get('gridCreated')) {
  7626. createGrid();
  7627. cache_default.set('gridCreated', true);
  7628. }
  7629. var vNode = get_node_from_tree_default(node);
  7630. var grid = vNode._grid;
  7631. if (!grid) {
  7632. return [];
  7633. }
  7634. var nodeRect = vNode.boundingClientRect;
  7635. var clientRects = [];
  7636. Array.from(node.childNodes).forEach(function(elm) {
  7637. if (elm.nodeType === 3 && sanitize_default(elm.textContent) !== '') {
  7638. var range = document.createRange();
  7639. range.selectNodeContents(elm);
  7640. var rects = range.getClientRects();
  7641. var outsideRectBounds = Array.from(rects).some(function(rect) {
  7642. var horizontalMidpoint = rect.left + rect.width / 2;
  7643. var verticalMidpoint = rect.top + rect.height / 2;
  7644. return horizontalMidpoint < nodeRect.left || horizontalMidpoint > nodeRect.right || verticalMidpoint < nodeRect.top || verticalMidpoint > nodeRect.bottom;
  7645. });
  7646. if (outsideRectBounds) {
  7647. return;
  7648. }
  7649. for (var _i5 = 0; _i5 < rects.length; _i5++) {
  7650. var rect = rects[_i5];
  7651. if (rect.width >= 1 && rect.height >= 1) {
  7652. clientRects.push(rect);
  7653. }
  7654. }
  7655. }
  7656. });
  7657. if (!clientRects.length) {
  7658. return [ get_element_stack_default(node) ];
  7659. }
  7660. return clientRects.map(function(rect) {
  7661. return getRectStack(grid, rect);
  7662. });
  7663. }
  7664. var get_text_element_stack_default = getTextElementStack;
  7665. var visualRoles = [ 'checkbox', 'img', 'radio', 'range', 'slider', 'spinbutton', 'textbox' ];
  7666. function isVisualContent(element) {
  7667. var role = element.getAttribute('role');
  7668. if (role) {
  7669. return visualRoles.indexOf(role) !== -1;
  7670. }
  7671. switch (element.nodeName.toUpperCase()) {
  7672. case 'IMG':
  7673. case 'IFRAME':
  7674. case 'OBJECT':
  7675. case 'VIDEO':
  7676. case 'AUDIO':
  7677. case 'CANVAS':
  7678. case 'SVG':
  7679. case 'MATH':
  7680. case 'BUTTON':
  7681. case 'SELECT':
  7682. case 'TEXTAREA':
  7683. case 'KEYGEN':
  7684. case 'PROGRESS':
  7685. case 'METER':
  7686. return true;
  7687. case 'INPUT':
  7688. return element.type !== 'hidden';
  7689. default:
  7690. return false;
  7691. }
  7692. }
  7693. var is_visual_content_default = isVisualContent;
  7694. function idrefs(node, attr) {
  7695. node = node.actualNode || node;
  7696. try {
  7697. var doc = get_root_node_default2(node);
  7698. var result = [];
  7699. var attrValue = node.getAttribute(attr);
  7700. if (attrValue) {
  7701. attrValue = token_list_default(attrValue);
  7702. for (var index = 0; index < attrValue.length; index++) {
  7703. result.push(doc.getElementById(attrValue[index]));
  7704. }
  7705. }
  7706. return result;
  7707. } catch (e) {
  7708. throw new TypeError('Cannot resolve id references for non-DOM nodes');
  7709. }
  7710. }
  7711. var idrefs_default = idrefs;
  7712. function visibleVirtual(element, screenReader, noRecursing) {
  7713. var vNode = element instanceof abstract_virtual_node_default ? element : get_node_from_tree_default(element);
  7714. var visible4 = !element.actualNode || element.actualNode && is_visible_default(element.actualNode, screenReader);
  7715. var result = vNode.children.map(function(child) {
  7716. var _child$props = child.props, nodeType = _child$props.nodeType, nodeValue = _child$props.nodeValue;
  7717. if (nodeType === 3) {
  7718. if (nodeValue && visible4) {
  7719. return nodeValue;
  7720. }
  7721. } else if (!noRecursing) {
  7722. return visibleVirtual(child, screenReader);
  7723. }
  7724. }).join('');
  7725. return sanitize_default(result);
  7726. }
  7727. var visible_virtual_default = visibleVirtual;
  7728. function labelVirtual(virtualNode) {
  7729. var ref, candidate;
  7730. if (virtualNode.attr('aria-labelledby')) {
  7731. ref = idrefs_default(virtualNode.actualNode, 'aria-labelledby');
  7732. candidate = ref.map(function(thing) {
  7733. var vNode = get_node_from_tree_default(thing);
  7734. return vNode ? visible_virtual_default(vNode, true) : '';
  7735. }).join(' ').trim();
  7736. if (candidate) {
  7737. return candidate;
  7738. }
  7739. }
  7740. candidate = virtualNode.attr('aria-label');
  7741. if (candidate) {
  7742. candidate = sanitize_default(candidate);
  7743. if (candidate) {
  7744. return candidate;
  7745. }
  7746. }
  7747. return null;
  7748. }
  7749. var label_virtual_default = labelVirtual;
  7750. var hiddenTextElms = [ 'HEAD', 'TITLE', 'TEMPLATE', 'SCRIPT', 'STYLE', 'IFRAME', 'OBJECT', 'VIDEO', 'AUDIO', 'NOSCRIPT' ];
  7751. function hasChildTextNodes(elm) {
  7752. if (!hiddenTextElms.includes(elm.actualNode.nodeName.toUpperCase())) {
  7753. return elm.children.some(function(_ref8) {
  7754. var actualNode = _ref8.actualNode;
  7755. return actualNode.nodeType === 3 && actualNode.nodeValue.trim();
  7756. });
  7757. }
  7758. }
  7759. function hasContentVirtual(elm, noRecursion, ignoreAria) {
  7760. return hasChildTextNodes(elm) || is_visual_content_default(elm.actualNode) || !ignoreAria && !!label_virtual_default(elm) || !noRecursion && elm.children.some(function(child) {
  7761. return child.actualNode.nodeType === 1 && hasContentVirtual(child);
  7762. });
  7763. }
  7764. var has_content_virtual_default = hasContentVirtual;
  7765. function hasContent(elm, noRecursion, ignoreAria) {
  7766. elm = get_node_from_tree_default(elm);
  7767. return has_content_virtual_default(elm, noRecursion, ignoreAria);
  7768. }
  7769. var has_content_default = hasContent;
  7770. function isHiddenWithCSS(el, descendentVisibilityValue) {
  7771. var vNode = get_node_from_tree_default(el);
  7772. if (!vNode) {
  7773. return _isHiddenWithCSS(el, descendentVisibilityValue);
  7774. }
  7775. if (vNode._isHiddenWithCSS === void 0) {
  7776. vNode._isHiddenWithCSS = _isHiddenWithCSS(el, descendentVisibilityValue);
  7777. }
  7778. return vNode._isHiddenWithCSS;
  7779. }
  7780. function _isHiddenWithCSS(el, descendentVisibilityValue) {
  7781. if (el.nodeType === 9) {
  7782. return false;
  7783. }
  7784. if (el.nodeType === 11) {
  7785. el = el.host;
  7786. }
  7787. if ([ 'STYLE', 'SCRIPT' ].includes(el.nodeName.toUpperCase())) {
  7788. return false;
  7789. }
  7790. var style = window.getComputedStyle(el, null);
  7791. if (!style) {
  7792. throw new Error('Style does not exist for the given element.');
  7793. }
  7794. var displayValue = style.getPropertyValue('display');
  7795. if (displayValue === 'none') {
  7796. return true;
  7797. }
  7798. var HIDDEN_VISIBILITY_VALUES = [ 'hidden', 'collapse' ];
  7799. var visibilityValue = style.getPropertyValue('visibility');
  7800. if (HIDDEN_VISIBILITY_VALUES.includes(visibilityValue) && !descendentVisibilityValue) {
  7801. return true;
  7802. }
  7803. if (HIDDEN_VISIBILITY_VALUES.includes(visibilityValue) && descendentVisibilityValue && HIDDEN_VISIBILITY_VALUES.includes(descendentVisibilityValue)) {
  7804. return true;
  7805. }
  7806. var parent = get_composed_parent_default(el);
  7807. if (parent && !HIDDEN_VISIBILITY_VALUES.includes(visibilityValue)) {
  7808. return isHiddenWithCSS(parent, visibilityValue);
  7809. }
  7810. return false;
  7811. }
  7812. var is_hidden_with_css_default = isHiddenWithCSS;
  7813. function focusDisabled(el) {
  7814. var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
  7815. if (vNode.hasAttr('disabled')) {
  7816. return true;
  7817. }
  7818. if (vNode.props.nodeName !== 'area') {
  7819. if (!vNode.actualNode) {
  7820. return false;
  7821. }
  7822. return is_hidden_with_css_default(vNode.actualNode);
  7823. }
  7824. return false;
  7825. }
  7826. var focus_disabled_default = focusDisabled;
  7827. function isNativelyFocusable(el) {
  7828. var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
  7829. if (!vNode || focus_disabled_default(vNode)) {
  7830. return false;
  7831. }
  7832. switch (vNode.props.nodeName) {
  7833. case 'a':
  7834. case 'area':
  7835. if (vNode.hasAttr('href')) {
  7836. return true;
  7837. }
  7838. break;
  7839. case 'input':
  7840. return vNode.props.type !== 'hidden';
  7841. case 'textarea':
  7842. case 'select':
  7843. case 'summary':
  7844. case 'button':
  7845. return true;
  7846. case 'details':
  7847. return !query_selector_all_default(vNode, 'summary').length;
  7848. }
  7849. return false;
  7850. }
  7851. var is_natively_focusable_default = isNativelyFocusable;
  7852. function isFocusable(el) {
  7853. var vNode = el instanceof abstract_virtual_node_default ? el : get_node_from_tree_default(el);
  7854. if (vNode.props.nodeType !== 1) {
  7855. return false;
  7856. }
  7857. if (focus_disabled_default(vNode)) {
  7858. return false;
  7859. } else if (is_natively_focusable_default(vNode)) {
  7860. return true;
  7861. }
  7862. var tabindex = vNode.attr('tabindex');
  7863. if (tabindex && !isNaN(parseInt(tabindex, 10))) {
  7864. return true;
  7865. }
  7866. return false;
  7867. }
  7868. var is_focusable_default = isFocusable;
  7869. function insertedIntoFocusOrder(el) {
  7870. var tabIndex = parseInt(el.getAttribute('tabindex'), 10);
  7871. return tabIndex > -1 && is_focusable_default(el) && !is_natively_focusable_default(el);
  7872. }
  7873. var inserted_into_focus_order_default = insertedIntoFocusOrder;
  7874. function isHTML5(doc) {
  7875. var node = doc.doctype;
  7876. if (node === null) {
  7877. return false;
  7878. }
  7879. return node.name === 'html' && !node.publicId && !node.systemId;
  7880. }
  7881. var is_html5_default = isHTML5;
  7882. function walkDomNode(node, functor) {
  7883. if (functor(node.actualNode) !== false) {
  7884. node.children.forEach(function(child) {
  7885. return walkDomNode(child, functor);
  7886. });
  7887. }
  7888. }
  7889. var blockLike = [ 'block', 'list-item', 'table', 'flex', 'grid', 'inline-block' ];
  7890. function isBlock(elm) {
  7891. var display = window.getComputedStyle(elm).getPropertyValue('display');
  7892. return blockLike.includes(display) || display.substr(0, 6) === 'table-';
  7893. }
  7894. function getBlockParent(node) {
  7895. var parentBlock = get_composed_parent_default(node);
  7896. while (parentBlock && !isBlock(parentBlock)) {
  7897. parentBlock = get_composed_parent_default(parentBlock);
  7898. }
  7899. return get_node_from_tree_default(parentBlock);
  7900. }
  7901. function isInTextBlock(node) {
  7902. if (isBlock(node)) {
  7903. return false;
  7904. }
  7905. var virtualParent = getBlockParent(node);
  7906. var parentText = '';
  7907. var linkText = '';
  7908. var inBrBlock = 0;
  7909. walkDomNode(virtualParent, function(currNode) {
  7910. if (inBrBlock === 2) {
  7911. return false;
  7912. }
  7913. if (currNode.nodeType === 3) {
  7914. parentText += currNode.nodeValue;
  7915. }
  7916. if (currNode.nodeType !== 1) {
  7917. return;
  7918. }
  7919. var nodeName2 = (currNode.nodeName || '').toUpperCase();
  7920. if ([ 'BR', 'HR' ].includes(nodeName2)) {
  7921. if (inBrBlock === 0) {
  7922. parentText = '';
  7923. linkText = '';
  7924. } else {
  7925. inBrBlock = 2;
  7926. }
  7927. } else if (currNode.style.display === 'none' || currNode.style.overflow === 'hidden' || ![ '', null, 'none' ].includes(currNode.style['float']) || ![ '', null, 'relative' ].includes(currNode.style.position)) {
  7928. return false;
  7929. } else if (nodeName2 === 'A' && currNode.href || (currNode.getAttribute('role') || '').toLowerCase() === 'link') {
  7930. if (currNode === node) {
  7931. inBrBlock = 1;
  7932. }
  7933. linkText += currNode.textContent;
  7934. return false;
  7935. }
  7936. });
  7937. parentText = sanitize_default(parentText);
  7938. linkText = sanitize_default(linkText);
  7939. return parentText.length > linkText.length;
  7940. }
  7941. var is_in_text_block_default = isInTextBlock;
  7942. function isModalOpen(options) {
  7943. options = options || {};
  7944. var modalPercent = options.modalPercent || .75;
  7945. if (cache_default.get('isModalOpen')) {
  7946. return cache_default.get('isModalOpen');
  7947. }
  7948. var definiteModals = query_selector_all_filter_default(axe._tree[0], 'dialog, [role=dialog], [aria-modal=true]', function(vNode) {
  7949. return is_visible_default(vNode.actualNode);
  7950. });
  7951. if (definiteModals.length) {
  7952. cache_default.set('isModalOpen', true);
  7953. return true;
  7954. }
  7955. var viewport = get_viewport_size_default(window);
  7956. var percentWidth = viewport.width * modalPercent;
  7957. var percentHeight = viewport.height * modalPercent;
  7958. var x = (viewport.width - percentWidth) / 2;
  7959. var y = (viewport.height - percentHeight) / 2;
  7960. var points = [ {
  7961. x: x,
  7962. y: y
  7963. }, {
  7964. x: viewport.width - x,
  7965. y: y
  7966. }, {
  7967. x: viewport.width / 2,
  7968. y: viewport.height / 2
  7969. }, {
  7970. x: x,
  7971. y: viewport.height - y
  7972. }, {
  7973. x: viewport.width - x,
  7974. y: viewport.height - y
  7975. } ];
  7976. var stacks = points.map(function(point) {
  7977. return Array.from(document.elementsFromPoint(point.x, point.y));
  7978. });
  7979. var _loop3 = function _loop3(_i6) {
  7980. var modalElement = stacks[_i6].find(function(elm) {
  7981. var style = window.getComputedStyle(elm);
  7982. return parseInt(style.width, 10) >= percentWidth && parseInt(style.height, 10) >= percentHeight && style.getPropertyValue('pointer-events') !== 'none' && (style.position === 'absolute' || style.position === 'fixed');
  7983. });
  7984. if (modalElement && stacks.every(function(stack) {
  7985. return stack.includes(modalElement);
  7986. })) {
  7987. cache_default.set('isModalOpen', true);
  7988. return {
  7989. v: true
  7990. };
  7991. }
  7992. };
  7993. for (var _i6 = 0; _i6 < stacks.length; _i6++) {
  7994. var _ret = _loop3(_i6);
  7995. if (_typeof(_ret) === 'object') {
  7996. return _ret.v;
  7997. }
  7998. }
  7999. cache_default.set('isModalOpen', void 0);
  8000. return void 0;
  8001. }
  8002. var is_modal_open_default = isModalOpen;
  8003. function isNode(element) {
  8004. return element instanceof window.Node;
  8005. }
  8006. var is_node_default = isNode;
  8007. var data = {};
  8008. var incompleteData = {
  8009. set: function set(key, reason) {
  8010. if (typeof key !== 'string') {
  8011. throw new Error('Incomplete data: key must be a string');
  8012. }
  8013. if (reason) {
  8014. data[key] = reason;
  8015. }
  8016. return data[key];
  8017. },
  8018. get: function get(key) {
  8019. return data[key];
  8020. },
  8021. clear: function clear() {
  8022. data = {};
  8023. }
  8024. };
  8025. var incomplete_data_default = incompleteData;
  8026. function elementHasImage(elm, style) {
  8027. var graphicNodes = [ 'IMG', 'CANVAS', 'OBJECT', 'IFRAME', 'VIDEO', 'SVG' ];
  8028. var nodeName2 = elm.nodeName.toUpperCase();
  8029. if (graphicNodes.includes(nodeName2)) {
  8030. incomplete_data_default.set('bgColor', 'imgNode');
  8031. return true;
  8032. }
  8033. style = style || window.getComputedStyle(elm);
  8034. var bgImageStyle = style.getPropertyValue('background-image');
  8035. var hasBgImage = bgImageStyle !== 'none';
  8036. if (hasBgImage) {
  8037. var hasGradient = /gradient/.test(bgImageStyle);
  8038. incomplete_data_default.set('bgColor', hasGradient ? 'bgGradient' : 'bgImage');
  8039. }
  8040. return hasBgImage;
  8041. }
  8042. var element_has_image_default = elementHasImage;
  8043. var ariaAttrs = {
  8044. 'aria-activedescendant': {
  8045. type: 'idref',
  8046. allowEmpty: true
  8047. },
  8048. 'aria-atomic': {
  8049. type: 'boolean',
  8050. global: true
  8051. },
  8052. 'aria-autocomplete': {
  8053. type: 'nmtoken',
  8054. values: [ 'inline', 'list', 'both', 'none' ]
  8055. },
  8056. 'aria-busy': {
  8057. type: 'boolean',
  8058. global: true
  8059. },
  8060. 'aria-checked': {
  8061. type: 'nmtoken',
  8062. values: [ 'false', 'mixed', 'true', 'undefined' ]
  8063. },
  8064. 'aria-colcount': {
  8065. type: 'int',
  8066. minValue: -1
  8067. },
  8068. 'aria-colindex': {
  8069. type: 'int',
  8070. minValue: 1
  8071. },
  8072. 'aria-colspan': {
  8073. type: 'int',
  8074. minValue: 1
  8075. },
  8076. 'aria-controls': {
  8077. type: 'idrefs',
  8078. allowEmpty: true,
  8079. global: true
  8080. },
  8081. 'aria-current': {
  8082. type: 'nmtoken',
  8083. allowEmpty: true,
  8084. values: [ 'page', 'step', 'location', 'date', 'time', 'true', 'false' ],
  8085. global: true
  8086. },
  8087. 'aria-describedby': {
  8088. type: 'idrefs',
  8089. allowEmpty: true,
  8090. global: true
  8091. },
  8092. 'aria-details': {
  8093. type: 'idref',
  8094. allowEmpty: true,
  8095. global: true
  8096. },
  8097. 'aria-disabled': {
  8098. type: 'boolean',
  8099. global: true
  8100. },
  8101. 'aria-dropeffect': {
  8102. type: 'nmtokens',
  8103. values: [ 'copy', 'execute', 'link', 'move', 'none', 'popup' ],
  8104. global: true
  8105. },
  8106. 'aria-errormessage': {
  8107. type: 'idref',
  8108. allowEmpty: true,
  8109. global: true
  8110. },
  8111. 'aria-expanded': {
  8112. type: 'nmtoken',
  8113. values: [ 'true', 'false', 'undefined' ]
  8114. },
  8115. 'aria-flowto': {
  8116. type: 'idrefs',
  8117. allowEmpty: true,
  8118. global: true
  8119. },
  8120. 'aria-grabbed': {
  8121. type: 'nmtoken',
  8122. values: [ 'true', 'false', 'undefined' ],
  8123. global: true
  8124. },
  8125. 'aria-haspopup': {
  8126. type: 'nmtoken',
  8127. allowEmpty: true,
  8128. values: [ 'true', 'false', 'menu', 'listbox', 'tree', 'grid', 'dialog' ],
  8129. global: true
  8130. },
  8131. 'aria-hidden': {
  8132. type: 'nmtoken',
  8133. values: [ 'true', 'false', 'undefined' ],
  8134. global: true
  8135. },
  8136. 'aria-invalid': {
  8137. type: 'nmtoken',
  8138. allowEmpty: true,
  8139. values: [ 'grammar', 'false', 'spelling', 'true' ],
  8140. global: true
  8141. },
  8142. 'aria-keyshortcuts': {
  8143. type: 'string',
  8144. allowEmpty: true,
  8145. global: true
  8146. },
  8147. 'aria-label': {
  8148. type: 'string',
  8149. allowEmpty: true,
  8150. global: true
  8151. },
  8152. 'aria-labelledby': {
  8153. type: 'idrefs',
  8154. allowEmpty: true,
  8155. global: true
  8156. },
  8157. 'aria-level': {
  8158. type: 'int',
  8159. minValue: 1
  8160. },
  8161. 'aria-live': {
  8162. type: 'nmtoken',
  8163. values: [ 'assertive', 'off', 'polite' ],
  8164. global: true
  8165. },
  8166. 'aria-modal': {
  8167. type: 'boolean'
  8168. },
  8169. 'aria-multiline': {
  8170. type: 'boolean'
  8171. },
  8172. 'aria-multiselectable': {
  8173. type: 'boolean'
  8174. },
  8175. 'aria-orientation': {
  8176. type: 'nmtoken',
  8177. values: [ 'horizontal', 'undefined', 'vertical' ]
  8178. },
  8179. 'aria-owns': {
  8180. type: 'idrefs',
  8181. allowEmpty: true,
  8182. global: true
  8183. },
  8184. 'aria-placeholder': {
  8185. type: 'string',
  8186. allowEmpty: true
  8187. },
  8188. 'aria-posinset': {
  8189. type: 'int',
  8190. minValue: 1
  8191. },
  8192. 'aria-pressed': {
  8193. type: 'nmtoken',
  8194. values: [ 'false', 'mixed', 'true', 'undefined' ]
  8195. },
  8196. 'aria-readonly': {
  8197. type: 'boolean'
  8198. },
  8199. 'aria-relevant': {
  8200. type: 'nmtokens',
  8201. values: [ 'additions', 'all', 'removals', 'text' ],
  8202. global: true
  8203. },
  8204. 'aria-required': {
  8205. type: 'boolean'
  8206. },
  8207. 'aria-roledescription': {
  8208. type: 'string',
  8209. allowEmpty: true,
  8210. global: true
  8211. },
  8212. 'aria-rowcount': {
  8213. type: 'int',
  8214. minValue: -1
  8215. },
  8216. 'aria-rowindex': {
  8217. type: 'int',
  8218. minValue: 1
  8219. },
  8220. 'aria-rowspan': {
  8221. type: 'int',
  8222. minValue: 0
  8223. },
  8224. 'aria-selected': {
  8225. type: 'nmtoken',
  8226. values: [ 'false', 'true', 'undefined' ]
  8227. },
  8228. 'aria-setsize': {
  8229. type: 'int',
  8230. minValue: -1
  8231. },
  8232. 'aria-sort': {
  8233. type: 'nmtoken',
  8234. values: [ 'ascending', 'descending', 'none', 'other' ]
  8235. },
  8236. 'aria-valuemax': {
  8237. type: 'decimal'
  8238. },
  8239. 'aria-valuemin': {
  8240. type: 'decimal'
  8241. },
  8242. 'aria-valuenow': {
  8243. type: 'decimal'
  8244. },
  8245. 'aria-valuetext': {
  8246. type: 'string'
  8247. }
  8248. };
  8249. var aria_attrs_default = ariaAttrs;
  8250. var ariaRoles = {
  8251. alert: {
  8252. type: 'widget',
  8253. allowedAttrs: [ 'aria-expanded' ],
  8254. superclassRole: [ 'section' ]
  8255. },
  8256. alertdialog: {
  8257. type: 'widget',
  8258. allowedAttrs: [ 'aria-expanded', 'aria-modal' ],
  8259. superclassRole: [ 'alert', 'dialog' ],
  8260. accessibleNameRequired: true
  8261. },
  8262. application: {
  8263. type: 'landmark',
  8264. allowedAttrs: [ 'aria-activedescendant', 'aria-expanded' ],
  8265. superclassRole: [ 'structure' ],
  8266. accessibleNameRequired: true
  8267. },
  8268. article: {
  8269. type: 'structure',
  8270. allowedAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded' ],
  8271. superclassRole: [ 'document' ]
  8272. },
  8273. banner: {
  8274. type: 'landmark',
  8275. allowedAttrs: [ 'aria-expanded' ],
  8276. superclassRole: [ 'landmark' ]
  8277. },
  8278. blockquote: {
  8279. type: 'structure',
  8280. superclassRole: [ 'section' ]
  8281. },
  8282. button: {
  8283. type: 'widget',
  8284. allowedAttrs: [ 'aria-expanded', 'aria-pressed' ],
  8285. superclassRole: [ 'command' ],
  8286. accessibleNameRequired: true,
  8287. nameFromContent: true,
  8288. childrenPresentational: true
  8289. },
  8290. caption: {
  8291. type: 'structure',
  8292. requiredContext: [ 'figure', 'table', 'grid', 'treegrid' ],
  8293. superclassRole: [ 'section' ],
  8294. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8295. },
  8296. cell: {
  8297. type: 'structure',
  8298. requiredContext: [ 'row' ],
  8299. allowedAttrs: [ 'aria-colindex', 'aria-colspan', 'aria-rowindex', 'aria-rowspan', 'aria-expanded' ],
  8300. superclassRole: [ 'section' ],
  8301. nameFromContent: true
  8302. },
  8303. checkbox: {
  8304. type: 'widget',
  8305. allowedAttrs: [ 'aria-checked', 'aria-readonly', 'aria-required' ],
  8306. superclassRole: [ 'input' ],
  8307. accessibleNameRequired: true,
  8308. nameFromContent: true,
  8309. childrenPresentational: true
  8310. },
  8311. code: {
  8312. type: 'structure',
  8313. superclassRole: [ 'section' ],
  8314. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8315. },
  8316. columnheader: {
  8317. type: 'structure',
  8318. requiredContext: [ 'row' ],
  8319. allowedAttrs: [ 'aria-sort', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-readonly', 'aria-required', 'aria-rowindex', 'aria-rowspan', 'aria-selected' ],
  8320. superclassRole: [ 'cell', 'gridcell', 'sectionhead' ],
  8321. accessibleNameRequired: false,
  8322. nameFromContent: true
  8323. },
  8324. combobox: {
  8325. type: 'composite',
  8326. requiredOwned: [ 'listbox', 'tree', 'grid', 'dialog', 'textbox' ],
  8327. requiredAttrs: [ 'aria-expanded' ],
  8328. allowedAttrs: [ 'aria-controls', 'aria-autocomplete', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-orientation' ],
  8329. superclassRole: [ 'select' ],
  8330. accessibleNameRequired: true
  8331. },
  8332. command: {
  8333. type: 'abstract',
  8334. superclassRole: [ 'widget' ]
  8335. },
  8336. complementary: {
  8337. type: 'landmark',
  8338. allowedAttrs: [ 'aria-expanded' ],
  8339. superclassRole: [ 'landmark' ]
  8340. },
  8341. composite: {
  8342. type: 'abstract',
  8343. superclassRole: [ 'widget' ]
  8344. },
  8345. contentinfo: {
  8346. type: 'landmark',
  8347. allowedAttrs: [ 'aria-expanded' ],
  8348. superclassRole: [ 'landmark' ]
  8349. },
  8350. definition: {
  8351. type: 'structure',
  8352. allowedAttrs: [ 'aria-expanded' ],
  8353. superclassRole: [ 'section' ]
  8354. },
  8355. deletion: {
  8356. type: 'structure',
  8357. superclassRole: [ 'section' ],
  8358. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8359. },
  8360. dialog: {
  8361. type: 'widget',
  8362. allowedAttrs: [ 'aria-expanded', 'aria-modal' ],
  8363. superclassRole: [ 'window' ],
  8364. accessibleNameRequired: true
  8365. },
  8366. directory: {
  8367. type: 'structure',
  8368. allowedAttrs: [ 'aria-expanded' ],
  8369. superclassRole: [ 'list' ],
  8370. nameFromContent: true
  8371. },
  8372. document: {
  8373. type: 'structure',
  8374. allowedAttrs: [ 'aria-expanded' ],
  8375. superclassRole: [ 'structure' ]
  8376. },
  8377. emphasis: {
  8378. type: 'structure',
  8379. superclassRole: [ 'section' ],
  8380. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8381. },
  8382. feed: {
  8383. type: 'structure',
  8384. requiredOwned: [ 'article' ],
  8385. allowedAttrs: [ 'aria-expanded' ],
  8386. superclassRole: [ 'list' ]
  8387. },
  8388. figure: {
  8389. type: 'structure',
  8390. allowedAttrs: [ 'aria-expanded' ],
  8391. superclassRole: [ 'section' ],
  8392. nameFromContent: true
  8393. },
  8394. form: {
  8395. type: 'landmark',
  8396. allowedAttrs: [ 'aria-expanded' ],
  8397. superclassRole: [ 'landmark' ]
  8398. },
  8399. grid: {
  8400. type: 'composite',
  8401. requiredOwned: [ 'rowgroup', 'row' ],
  8402. allowedAttrs: [ 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-rowcount' ],
  8403. superclassRole: [ 'composite', 'table' ],
  8404. accessibleNameRequired: false
  8405. },
  8406. gridcell: {
  8407. type: 'widget',
  8408. requiredContext: [ 'row' ],
  8409. allowedAttrs: [ 'aria-readonly', 'aria-required', 'aria-selected', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan' ],
  8410. superclassRole: [ 'cell', 'widget' ],
  8411. nameFromContent: true
  8412. },
  8413. group: {
  8414. type: 'structure',
  8415. allowedAttrs: [ 'aria-activedescendant', 'aria-expanded' ],
  8416. superclassRole: [ 'section' ]
  8417. },
  8418. heading: {
  8419. type: 'structure',
  8420. requiredAttrs: [ 'aria-level' ],
  8421. allowedAttrs: [ 'aria-expanded' ],
  8422. superclassRole: [ 'sectionhead' ],
  8423. accessibleNameRequired: false,
  8424. nameFromContent: true
  8425. },
  8426. img: {
  8427. type: 'structure',
  8428. allowedAttrs: [ 'aria-expanded' ],
  8429. superclassRole: [ 'section' ],
  8430. accessibleNameRequired: true,
  8431. childrenPresentational: true
  8432. },
  8433. input: {
  8434. type: 'abstract',
  8435. superclassRole: [ 'widget' ]
  8436. },
  8437. insertion: {
  8438. type: 'structure',
  8439. superclassRole: [ 'section' ],
  8440. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8441. },
  8442. landmark: {
  8443. type: 'abstract',
  8444. superclassRole: [ 'section' ]
  8445. },
  8446. link: {
  8447. type: 'widget',
  8448. allowedAttrs: [ 'aria-expanded' ],
  8449. superclassRole: [ 'command' ],
  8450. accessibleNameRequired: true,
  8451. nameFromContent: true
  8452. },
  8453. list: {
  8454. type: 'structure',
  8455. requiredOwned: [ 'group', 'listitem' ],
  8456. allowedAttrs: [ 'aria-expanded' ],
  8457. superclassRole: [ 'section' ]
  8458. },
  8459. listbox: {
  8460. type: 'composite',
  8461. requiredOwned: [ 'option' ],
  8462. allowedAttrs: [ 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
  8463. superclassRole: [ 'select' ],
  8464. accessibleNameRequired: true
  8465. },
  8466. listitem: {
  8467. type: 'structure',
  8468. requiredContext: [ 'list', 'group' ],
  8469. allowedAttrs: [ 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-expanded' ],
  8470. superclassRole: [ 'section' ],
  8471. nameFromContent: true
  8472. },
  8473. log: {
  8474. type: 'widget',
  8475. allowedAttrs: [ 'aria-expanded' ],
  8476. superclassRole: [ 'section' ]
  8477. },
  8478. main: {
  8479. type: 'landmark',
  8480. allowedAttrs: [ 'aria-expanded' ],
  8481. superclassRole: [ 'landmark' ]
  8482. },
  8483. marquee: {
  8484. type: 'widget',
  8485. allowedAttrs: [ 'aria-expanded' ],
  8486. superclassRole: [ 'section' ]
  8487. },
  8488. math: {
  8489. type: 'structure',
  8490. allowedAttrs: [ 'aria-expanded' ],
  8491. superclassRole: [ 'section' ],
  8492. childrenPresentational: true
  8493. },
  8494. menu: {
  8495. type: 'composite',
  8496. requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox' ],
  8497. allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
  8498. superclassRole: [ 'select' ]
  8499. },
  8500. menubar: {
  8501. type: 'composite',
  8502. requiredOwned: [ 'group', 'menuitemradio', 'menuitem', 'menuitemcheckbox' ],
  8503. allowedAttrs: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
  8504. superclassRole: [ 'menu' ]
  8505. },
  8506. menuitem: {
  8507. type: 'widget',
  8508. requiredContext: [ 'menu', 'menubar', 'group' ],
  8509. allowedAttrs: [ 'aria-posinset', 'aria-setsize', 'aria-expanded' ],
  8510. superclassRole: [ 'command' ],
  8511. accessibleNameRequired: true,
  8512. nameFromContent: true
  8513. },
  8514. menuitemcheckbox: {
  8515. type: 'widget',
  8516. requiredContext: [ 'menu', 'menubar', 'group' ],
  8517. allowedAttrs: [ 'aria-checked', 'aria-posinset', 'aria-readonly', 'aria-setsize' ],
  8518. superclassRole: [ 'checkbox', 'menuitem' ],
  8519. accessibleNameRequired: true,
  8520. nameFromContent: true,
  8521. childrenPresentational: true
  8522. },
  8523. menuitemradio: {
  8524. type: 'widget',
  8525. requiredContext: [ 'menu', 'menubar', 'group' ],
  8526. allowedAttrs: [ 'aria-checked', 'aria-posinset', 'aria-readonly', 'aria-setsize' ],
  8527. superclassRole: [ 'menuitemcheckbox', 'radio' ],
  8528. accessibleNameRequired: true,
  8529. nameFromContent: true,
  8530. childrenPresentational: true
  8531. },
  8532. meter: {
  8533. type: 'structure',
  8534. allowedAttrs: [ 'aria-valuetext' ],
  8535. requiredAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-valuenow' ],
  8536. superclassRole: [ 'range' ],
  8537. accessibleNameRequired: true,
  8538. childrenPresentational: true
  8539. },
  8540. navigation: {
  8541. type: 'landmark',
  8542. allowedAttrs: [ 'aria-expanded' ],
  8543. superclassRole: [ 'landmark' ]
  8544. },
  8545. none: {
  8546. type: 'structure',
  8547. superclassRole: [ 'structure' ],
  8548. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8549. },
  8550. note: {
  8551. type: 'structure',
  8552. allowedAttrs: [ 'aria-expanded' ],
  8553. superclassRole: [ 'section' ]
  8554. },
  8555. option: {
  8556. type: 'widget',
  8557. requiredContext: [ 'listbox' ],
  8558. allowedAttrs: [ 'aria-selected', 'aria-checked', 'aria-posinset', 'aria-setsize' ],
  8559. superclassRole: [ 'input' ],
  8560. accessibleNameRequired: true,
  8561. nameFromContent: true,
  8562. childrenPresentational: true
  8563. },
  8564. paragraph: {
  8565. type: 'structure',
  8566. superclassRole: [ 'section' ],
  8567. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8568. },
  8569. presentation: {
  8570. type: 'structure',
  8571. superclassRole: [ 'structure' ],
  8572. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8573. },
  8574. progressbar: {
  8575. type: 'widget',
  8576. allowedAttrs: [ 'aria-expanded', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext' ],
  8577. superclassRole: [ 'range' ],
  8578. accessibleNameRequired: true,
  8579. childrenPresentational: true
  8580. },
  8581. radio: {
  8582. type: 'widget',
  8583. allowedAttrs: [ 'aria-checked', 'aria-posinset', 'aria-setsize', 'aria-required' ],
  8584. superclassRole: [ 'input' ],
  8585. accessibleNameRequired: true,
  8586. nameFromContent: true,
  8587. childrenPresentational: true
  8588. },
  8589. radiogroup: {
  8590. type: 'composite',
  8591. requiredOwned: [ 'radio' ],
  8592. allowedAttrs: [ 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
  8593. superclassRole: [ 'select' ],
  8594. accessibleNameRequired: false
  8595. },
  8596. range: {
  8597. type: 'abstract',
  8598. superclassRole: [ 'widget' ]
  8599. },
  8600. region: {
  8601. type: 'landmark',
  8602. allowedAttrs: [ 'aria-expanded' ],
  8603. superclassRole: [ 'landmark' ],
  8604. accessibleNameRequired: false
  8605. },
  8606. roletype: {
  8607. type: 'abstract',
  8608. superclassRole: []
  8609. },
  8610. row: {
  8611. type: 'structure',
  8612. requiredContext: [ 'grid', 'rowgroup', 'table', 'treegrid' ],
  8613. requiredOwned: [ 'cell', 'columnheader', 'gridcell', 'rowheader' ],
  8614. allowedAttrs: [ 'aria-colindex', 'aria-level', 'aria-rowindex', 'aria-selected', 'aria-activedescendant', 'aria-expanded', 'aria-posinset', 'aria-setsize' ],
  8615. superclassRole: [ 'group', 'widget' ],
  8616. nameFromContent: true
  8617. },
  8618. rowgroup: {
  8619. type: 'structure',
  8620. requiredContext: [ 'grid', 'table', 'treegrid' ],
  8621. requiredOwned: [ 'row' ],
  8622. superclassRole: [ 'structure' ],
  8623. nameFromContent: true
  8624. },
  8625. rowheader: {
  8626. type: 'structure',
  8627. requiredContext: [ 'row' ],
  8628. allowedAttrs: [ 'aria-sort', 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-readonly', 'aria-required', 'aria-rowindex', 'aria-rowspan', 'aria-selected' ],
  8629. superclassRole: [ 'cell', 'gridcell', 'sectionhead' ],
  8630. accessibleNameRequired: false,
  8631. nameFromContent: true
  8632. },
  8633. scrollbar: {
  8634. type: 'widget',
  8635. requiredAttrs: [ 'aria-valuenow' ],
  8636. allowedAttrs: [ 'aria-controls', 'aria-orientation', 'aria-valuemax', 'aria-valuemin', 'aria-valuetext' ],
  8637. superclassRole: [ 'range' ],
  8638. childrenPresentational: true
  8639. },
  8640. search: {
  8641. type: 'landmark',
  8642. allowedAttrs: [ 'aria-expanded' ],
  8643. superclassRole: [ 'landmark' ]
  8644. },
  8645. searchbox: {
  8646. type: 'widget',
  8647. allowedAttrs: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-placeholder', 'aria-readonly', 'aria-required' ],
  8648. superclassRole: [ 'textbox' ],
  8649. accessibleNameRequired: true
  8650. },
  8651. section: {
  8652. type: 'abstract',
  8653. superclassRole: [ 'structure' ],
  8654. nameFromContent: true
  8655. },
  8656. sectionhead: {
  8657. type: 'abstract',
  8658. superclassRole: [ 'structure' ],
  8659. nameFromContent: true
  8660. },
  8661. select: {
  8662. type: 'abstract',
  8663. superclassRole: [ 'composite', 'group' ]
  8664. },
  8665. separator: {
  8666. type: 'structure',
  8667. allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-orientation', 'aria-valuetext' ],
  8668. superclassRole: [ 'structure', 'widget' ],
  8669. childrenPresentational: true
  8670. },
  8671. slider: {
  8672. type: 'widget',
  8673. requiredAttrs: [ 'aria-valuenow' ],
  8674. allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-orientation', 'aria-readonly', 'aria-valuetext' ],
  8675. superclassRole: [ 'input', 'range' ],
  8676. accessibleNameRequired: true,
  8677. childrenPresentational: true
  8678. },
  8679. spinbutton: {
  8680. type: 'widget',
  8681. requiredAttrs: [ 'aria-valuenow' ],
  8682. allowedAttrs: [ 'aria-valuemax', 'aria-valuemin', 'aria-readonly', 'aria-required', 'aria-activedescendant', 'aria-valuetext' ],
  8683. superclassRole: [ 'composite', 'input', 'range' ],
  8684. accessibleNameRequired: true
  8685. },
  8686. status: {
  8687. type: 'widget',
  8688. allowedAttrs: [ 'aria-expanded' ],
  8689. superclassRole: [ 'section' ]
  8690. },
  8691. strong: {
  8692. type: 'structure',
  8693. superclassRole: [ 'section' ],
  8694. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8695. },
  8696. structure: {
  8697. type: 'abstract',
  8698. superclassRole: [ 'roletype' ]
  8699. },
  8700. subscript: {
  8701. type: 'structure',
  8702. superclassRole: [ 'section' ],
  8703. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8704. },
  8705. superscript: {
  8706. type: 'structure',
  8707. superclassRole: [ 'section' ],
  8708. prohibitedAttrs: [ 'aria-label', 'aria-labelledby' ]
  8709. },
  8710. switch: {
  8711. type: 'widget',
  8712. requiredAttrs: [ 'aria-checked' ],
  8713. allowedAttrs: [ 'aria-readonly' ],
  8714. superclassRole: [ 'checkbox' ],
  8715. accessibleNameRequired: true,
  8716. nameFromContent: true,
  8717. childrenPresentational: true
  8718. },
  8719. tab: {
  8720. type: 'widget',
  8721. requiredContext: [ 'tablist' ],
  8722. allowedAttrs: [ 'aria-posinset', 'aria-selected', 'aria-setsize', 'aria-expanded' ],
  8723. superclassRole: [ 'sectionhead', 'widget' ],
  8724. nameFromContent: true,
  8725. childrenPresentational: true
  8726. },
  8727. table: {
  8728. type: 'structure',
  8729. requiredOwned: [ 'rowgroup', 'row' ],
  8730. allowedAttrs: [ 'aria-colcount', 'aria-rowcount', 'aria-expanded' ],
  8731. superclassRole: [ 'section' ],
  8732. accessibleNameRequired: false,
  8733. nameFromContent: true
  8734. },
  8735. tablist: {
  8736. type: 'composite',
  8737. requiredOwned: [ 'tab' ],
  8738. allowedAttrs: [ 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-activedescendant', 'aria-expanded' ],
  8739. superclassRole: [ 'composite' ]
  8740. },
  8741. tabpanel: {
  8742. type: 'widget',
  8743. allowedAttrs: [ 'aria-expanded' ],
  8744. superclassRole: [ 'section' ],
  8745. accessibleNameRequired: false
  8746. },
  8747. term: {
  8748. type: 'structure',
  8749. allowedAttrs: [ 'aria-expanded' ],
  8750. superclassRole: [ 'section' ],
  8751. nameFromContent: true
  8752. },
  8753. text: {
  8754. type: 'structure',
  8755. superclassRole: [ 'section' ],
  8756. nameFromContent: true
  8757. },
  8758. textbox: {
  8759. type: 'widget',
  8760. allowedAttrs: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-placeholder', 'aria-readonly', 'aria-required' ],
  8761. superclassRole: [ 'input' ],
  8762. accessibleNameRequired: true
  8763. },
  8764. time: {
  8765. type: 'structure',
  8766. superclassRole: [ 'section' ]
  8767. },
  8768. timer: {
  8769. type: 'widget',
  8770. allowedAttrs: [ 'aria-expanded' ],
  8771. superclassRole: [ 'status' ]
  8772. },
  8773. toolbar: {
  8774. type: 'structure',
  8775. allowedAttrs: [ 'aria-orientation', 'aria-activedescendant', 'aria-expanded' ],
  8776. superclassRole: [ 'group' ],
  8777. accessibleNameRequired: true
  8778. },
  8779. tooltip: {
  8780. type: 'structure',
  8781. allowedAttrs: [ 'aria-expanded' ],
  8782. superclassRole: [ 'section' ],
  8783. nameFromContent: true
  8784. },
  8785. tree: {
  8786. type: 'composite',
  8787. requiredOwned: [ 'group', 'treeitem' ],
  8788. allowedAttrs: [ 'aria-multiselectable', 'aria-required', 'aria-activedescendant', 'aria-expanded', 'aria-orientation' ],
  8789. superclassRole: [ 'select' ],
  8790. accessibleNameRequired: false
  8791. },
  8792. treegrid: {
  8793. type: 'composite',
  8794. requiredOwned: [ 'rowgroup', 'row' ],
  8795. allowedAttrs: [ 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-readonly', 'aria-required', 'aria-rowcount' ],
  8796. superclassRole: [ 'grid', 'tree' ],
  8797. accessibleNameRequired: false
  8798. },
  8799. treeitem: {
  8800. type: 'widget',
  8801. requiredContext: [ 'group', 'tree' ],
  8802. allowedAttrs: [ 'aria-checked', 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-selected', 'aria-setsize' ],
  8803. superclassRole: [ 'listitem', 'option' ],
  8804. accessibleNameRequired: true,
  8805. nameFromContent: true
  8806. },
  8807. widget: {
  8808. type: 'abstract',
  8809. superclassRole: [ 'roletype' ]
  8810. },
  8811. window: {
  8812. type: 'abstract',
  8813. superclassRole: [ 'roletype' ]
  8814. }
  8815. };
  8816. var aria_roles_default = ariaRoles;
  8817. var dpubRoles = {
  8818. 'doc-abstract': {
  8819. type: 'section',
  8820. allowedAttrs: [ 'aria-expanded' ],
  8821. superclassRole: [ 'section' ]
  8822. },
  8823. 'doc-acknowledgments': {
  8824. type: 'landmark',
  8825. allowedAttrs: [ 'aria-expanded' ],
  8826. superclassRole: [ 'landmark' ]
  8827. },
  8828. 'doc-afterword': {
  8829. type: 'landmark',
  8830. allowedAttrs: [ 'aria-expanded' ],
  8831. superclassRole: [ 'landmark' ]
  8832. },
  8833. 'doc-appendix': {
  8834. type: 'landmark',
  8835. allowedAttrs: [ 'aria-expanded' ],
  8836. superclassRole: [ 'landmark' ]
  8837. },
  8838. 'doc-backlink': {
  8839. type: 'link',
  8840. allowedAttrs: [ 'aria-expanded' ],
  8841. nameFromContent: true,
  8842. superclassRole: [ 'link' ]
  8843. },
  8844. 'doc-biblioentry': {
  8845. type: 'listitem',
  8846. requiredContext: [ 'doc-bibliography' ],
  8847. allowedAttrs: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ],
  8848. superclassRole: [ 'listitem' ]
  8849. },
  8850. 'doc-bibliography': {
  8851. type: 'landmark',
  8852. requiredOwned: [ 'doc-biblioentry' ],
  8853. allowedAttrs: [ 'aria-expanded' ],
  8854. superclassRole: [ 'landmark' ]
  8855. },
  8856. 'doc-biblioref': {
  8857. type: 'link',
  8858. allowedAttrs: [ 'aria-expanded' ],
  8859. nameFromContent: true,
  8860. superclassRole: [ 'link' ]
  8861. },
  8862. 'doc-chapter': {
  8863. type: 'landmark',
  8864. allowedAttrs: [ 'aria-expanded' ],
  8865. superclassRole: [ 'landmark' ]
  8866. },
  8867. 'doc-colophon': {
  8868. type: 'section',
  8869. allowedAttrs: [ 'aria-expanded' ],
  8870. superclassRole: [ 'section' ]
  8871. },
  8872. 'doc-conclusion': {
  8873. type: 'landmark',
  8874. allowedAttrs: [ 'aria-expanded' ],
  8875. superclassRole: [ 'landmark' ]
  8876. },
  8877. 'doc-cover': {
  8878. type: 'img',
  8879. allowedAttrs: [ 'aria-expanded' ],
  8880. superclassRole: [ 'img' ]
  8881. },
  8882. 'doc-credit': {
  8883. type: 'section',
  8884. allowedAttrs: [ 'aria-expanded' ],
  8885. superclassRole: [ 'section' ]
  8886. },
  8887. 'doc-credits': {
  8888. type: 'landmark',
  8889. allowedAttrs: [ 'aria-expanded' ],
  8890. superclassRole: [ 'landmark' ]
  8891. },
  8892. 'doc-dedication': {
  8893. type: 'section',
  8894. allowedAttrs: [ 'aria-expanded' ],
  8895. superclassRole: [ 'section' ]
  8896. },
  8897. 'doc-endnote': {
  8898. type: 'listitem',
  8899. requiredContext: [ 'doc-endnotes' ],
  8900. allowedAttrs: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize' ],
  8901. superclassRole: [ 'listitem' ]
  8902. },
  8903. 'doc-endnotes': {
  8904. type: 'landmark',
  8905. requiredOwned: [ 'doc-endnote' ],
  8906. allowedAttrs: [ 'aria-expanded' ],
  8907. superclassRole: [ 'landmark' ]
  8908. },
  8909. 'doc-epigraph': {
  8910. type: 'section',
  8911. allowedAttrs: [ 'aria-expanded' ],
  8912. superclassRole: [ 'section' ]
  8913. },
  8914. 'doc-epilogue': {
  8915. type: 'landmark',
  8916. allowedAttrs: [ 'aria-expanded' ],
  8917. superclassRole: [ 'landmark' ]
  8918. },
  8919. 'doc-errata': {
  8920. type: 'landmark',
  8921. allowedAttrs: [ 'aria-expanded' ],
  8922. superclassRole: [ 'landmark' ]
  8923. },
  8924. 'doc-example': {
  8925. type: 'section',
  8926. allowedAttrs: [ 'aria-expanded' ],
  8927. superclassRole: [ 'section' ]
  8928. },
  8929. 'doc-footnote': {
  8930. type: 'section',
  8931. allowedAttrs: [ 'aria-expanded' ],
  8932. superclassRole: [ 'section' ]
  8933. },
  8934. 'doc-foreword': {
  8935. type: 'landmark',
  8936. allowedAttrs: [ 'aria-expanded' ],
  8937. superclassRole: [ 'landmark' ]
  8938. },
  8939. 'doc-glossary': {
  8940. type: 'landmark',
  8941. requiredOwned: [ 'definition', 'term' ],
  8942. allowedAttrs: [ 'aria-expanded' ],
  8943. superclassRole: [ 'landmark' ]
  8944. },
  8945. 'doc-glossref': {
  8946. type: 'link',
  8947. allowedAttrs: [ 'aria-expanded' ],
  8948. nameFromContent: true,
  8949. superclassRole: [ 'link' ]
  8950. },
  8951. 'doc-index': {
  8952. type: 'navigation',
  8953. allowedAttrs: [ 'aria-expanded' ],
  8954. superclassRole: [ 'navigation' ]
  8955. },
  8956. 'doc-introduction': {
  8957. type: 'landmark',
  8958. allowedAttrs: [ 'aria-expanded' ],
  8959. superclassRole: [ 'landmark' ]
  8960. },
  8961. 'doc-noteref': {
  8962. type: 'link',
  8963. allowedAttrs: [ 'aria-expanded' ],
  8964. nameFromContent: true,
  8965. superclassRole: [ 'link' ]
  8966. },
  8967. 'doc-notice': {
  8968. type: 'note',
  8969. allowedAttrs: [ 'aria-expanded' ],
  8970. superclassRole: [ 'note' ]
  8971. },
  8972. 'doc-pagebreak': {
  8973. type: 'separator',
  8974. allowedAttrs: [ 'aria-expanded', 'aria-orientation' ],
  8975. superclassRole: [ 'separator' ],
  8976. childrenPresentational: true
  8977. },
  8978. 'doc-pagelist': {
  8979. type: 'navigation',
  8980. allowedAttrs: [ 'aria-expanded' ],
  8981. superclassRole: [ 'navigation' ]
  8982. },
  8983. 'doc-part': {
  8984. type: 'landmark',
  8985. allowedAttrs: [ 'aria-expanded' ],
  8986. superclassRole: [ 'landmark' ]
  8987. },
  8988. 'doc-preface': {
  8989. type: 'landmark',
  8990. allowedAttrs: [ 'aria-expanded' ],
  8991. superclassRole: [ 'landmark' ]
  8992. },
  8993. 'doc-prologue': {
  8994. type: 'landmark',
  8995. allowedAttrs: [ 'aria-expanded' ],
  8996. superclassRole: [ 'landmark' ]
  8997. },
  8998. 'doc-pullquote': {
  8999. type: 'none',
  9000. superclassRole: [ 'none' ]
  9001. },
  9002. 'doc-qna': {
  9003. type: 'section',
  9004. allowedAttrs: [ 'aria-expanded' ],
  9005. superclassRole: [ 'section' ]
  9006. },
  9007. 'doc-subtitle': {
  9008. type: 'sectionhead',
  9009. allowedAttrs: [ 'aria-expanded' ],
  9010. superclassRole: [ 'sectionhead' ]
  9011. },
  9012. 'doc-tip': {
  9013. type: 'note',
  9014. allowedAttrs: [ 'aria-expanded' ],
  9015. superclassRole: [ 'note' ]
  9016. },
  9017. 'doc-toc': {
  9018. type: 'navigation',
  9019. allowedAttrs: [ 'aria-expanded' ],
  9020. superclassRole: [ 'navigation' ]
  9021. }
  9022. };
  9023. var dpub_roles_default = dpubRoles;
  9024. var graphicsRoles = {
  9025. 'graphics-document': {
  9026. type: 'structure',
  9027. superclassRole: [ 'document' ],
  9028. accessibleNameRequired: true
  9029. },
  9030. 'graphics-object': {
  9031. type: 'structure',
  9032. superclassRole: [ 'group' ],
  9033. nameFromContent: true
  9034. },
  9035. 'graphics-symbol': {
  9036. type: 'structure',
  9037. superclassRole: [ 'img' ],
  9038. accessibleNameRequired: true,
  9039. childrenPresentational: true
  9040. }
  9041. };
  9042. var graphics_roles_default = graphicsRoles;
  9043. var htmlElms = {
  9044. a: {
  9045. variant: {
  9046. href: {
  9047. matches: '[href]',
  9048. contentTypes: [ 'interactive', 'phrasing', 'flow' ],
  9049. allowedRoles: [ 'button', 'checkbox', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'switch', 'tab', 'treeitem', 'doc-backlink', 'doc-biblioref', 'doc-glossref', 'doc-noteref' ],
  9050. namingMethods: [ 'subtreeText' ]
  9051. },
  9052. default: {
  9053. contentTypes: [ 'phrasing', 'flow' ],
  9054. allowedRoles: true
  9055. }
  9056. }
  9057. },
  9058. abbr: {
  9059. contentTypes: [ 'phrasing', 'flow' ],
  9060. allowedRoles: true
  9061. },
  9062. addres: {
  9063. contentTypes: [ 'flow' ],
  9064. allowedRoles: true
  9065. },
  9066. area: {
  9067. contentTypes: [ 'phrasing', 'flow' ],
  9068. allowedRoles: false,
  9069. namingMethods: [ 'altText' ]
  9070. },
  9071. article: {
  9072. contentTypes: [ 'sectioning', 'flow' ],
  9073. allowedRoles: [ 'feed', 'presentation', 'none', 'document', 'application', 'main', 'region' ],
  9074. shadowRoot: true
  9075. },
  9076. aside: {
  9077. contentTypes: [ 'sectioning', 'flow' ],
  9078. allowedRoles: [ 'feed', 'note', 'presentation', 'none', 'region', 'search', 'doc-dedication', 'doc-example', 'doc-footnote', 'doc-pullquote', 'doc-tip' ]
  9079. },
  9080. audio: {
  9081. variant: {
  9082. controls: {
  9083. matches: '[controls]',
  9084. contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ]
  9085. },
  9086. default: {
  9087. contentTypes: [ 'embedded', 'phrasing', 'flow' ]
  9088. }
  9089. },
  9090. allowedRoles: [ 'application' ],
  9091. chromiumRole: 'Audio'
  9092. },
  9093. b: {
  9094. contentTypes: [ 'phrasing', 'flow' ],
  9095. allowedRoles: false
  9096. },
  9097. base: {
  9098. allowedRoles: false,
  9099. noAriaAttrs: true
  9100. },
  9101. bdi: {
  9102. contentTypes: [ 'phrasing', 'flow' ],
  9103. allowedRoles: true
  9104. },
  9105. bdo: {
  9106. contentTypes: [ 'phrasing', 'flow' ],
  9107. allowedRoles: true
  9108. },
  9109. blockquote: {
  9110. contentTypes: [ 'flow' ],
  9111. allowedRoles: true,
  9112. shadowRoot: true
  9113. },
  9114. body: {
  9115. allowedRoles: false,
  9116. shadowRoot: true
  9117. },
  9118. br: {
  9119. contentTypes: [ 'phrasing', 'flow' ],
  9120. allowedRoles: [ 'presentation', 'none' ],
  9121. namingMethods: [ 'titleText', 'singleSpace' ]
  9122. },
  9123. button: {
  9124. contentTypes: [ 'interactive', 'phrasing', 'flow' ],
  9125. allowedRoles: [ 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'switch', 'tab' ],
  9126. namingMethods: [ 'subtreeText' ]
  9127. },
  9128. canvas: {
  9129. allowedRoles: true,
  9130. contentTypes: [ 'embedded', 'phrasing', 'flow' ],
  9131. chromiumRole: 'Canvas'
  9132. },
  9133. caption: {
  9134. allowedRoles: false
  9135. },
  9136. cite: {
  9137. contentTypes: [ 'phrasing', 'flow' ],
  9138. allowedRoles: true
  9139. },
  9140. code: {
  9141. contentTypes: [ 'phrasing', 'flow' ],
  9142. allowedRoles: true
  9143. },
  9144. col: {
  9145. allowedRoles: false,
  9146. noAriaAttrs: true
  9147. },
  9148. colgroup: {
  9149. allowedRoles: false,
  9150. noAriaAttrs: true
  9151. },
  9152. data: {
  9153. contentTypes: [ 'phrasing', 'flow' ],
  9154. allowedRoles: true
  9155. },
  9156. datalist: {
  9157. contentTypes: [ 'phrasing', 'flow' ],
  9158. allowedRoles: false,
  9159. implicitAttrs: {
  9160. 'aria-multiselectable': 'false'
  9161. }
  9162. },
  9163. dd: {
  9164. allowedRoles: false
  9165. },
  9166. del: {
  9167. contentTypes: [ 'phrasing', 'flow' ],
  9168. allowedRoles: true
  9169. },
  9170. dfn: {
  9171. contentTypes: [ 'phrasing', 'flow' ],
  9172. allowedRoles: true
  9173. },
  9174. details: {
  9175. contentTypes: [ 'interactive', 'flow' ],
  9176. allowedRoles: false
  9177. },
  9178. dialog: {
  9179. contentTypes: [ 'flow' ],
  9180. allowedRoles: [ 'alertdialog' ]
  9181. },
  9182. div: {
  9183. contentTypes: [ 'flow' ],
  9184. allowedRoles: true,
  9185. shadowRoot: true
  9186. },
  9187. dl: {
  9188. contentTypes: [ 'flow' ],
  9189. allowedRoles: [ 'group', 'list', 'presentation', 'none' ],
  9190. chromiumRole: 'DescriptionList'
  9191. },
  9192. dt: {
  9193. allowedRoles: [ 'listitem' ]
  9194. },
  9195. em: {
  9196. contentTypes: [ 'phrasing', 'flow' ],
  9197. allowedRoles: true
  9198. },
  9199. embed: {
  9200. contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ],
  9201. allowedRoles: [ 'application', 'document', 'img', 'presentation', 'none' ],
  9202. chromiumRole: 'EmbeddedObject'
  9203. },
  9204. fieldset: {
  9205. contentTypes: [ 'flow' ],
  9206. allowedRoles: [ 'none', 'presentation', 'radiogroup' ],
  9207. namingMethods: [ 'fieldsetLegendText' ]
  9208. },
  9209. figcaption: {
  9210. allowedRoles: [ 'group', 'none', 'presentation' ]
  9211. },
  9212. figure: {
  9213. contentTypes: [ 'flow' ],
  9214. allowedRoles: true,
  9215. namingMethods: [ 'figureText', 'titleText' ]
  9216. },
  9217. footer: {
  9218. contentTypes: [ 'flow' ],
  9219. allowedRoles: [ 'group', 'none', 'presentation', 'doc-footnote' ],
  9220. shadowRoot: true
  9221. },
  9222. form: {
  9223. contentTypes: [ 'flow' ],
  9224. allowedRoles: [ 'search', 'none', 'presentation' ]
  9225. },
  9226. h1: {
  9227. contentTypes: [ 'heading', 'flow' ],
  9228. allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
  9229. shadowRoot: true,
  9230. implicitAttrs: {
  9231. 'aria-level': '1'
  9232. }
  9233. },
  9234. h2: {
  9235. contentTypes: [ 'heading', 'flow' ],
  9236. allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
  9237. shadowRoot: true,
  9238. implicitAttrs: {
  9239. 'aria-level': '2'
  9240. }
  9241. },
  9242. h3: {
  9243. contentTypes: [ 'heading', 'flow' ],
  9244. allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
  9245. shadowRoot: true,
  9246. implicitAttrs: {
  9247. 'aria-level': '3'
  9248. }
  9249. },
  9250. h4: {
  9251. contentTypes: [ 'heading', 'flow' ],
  9252. allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
  9253. shadowRoot: true,
  9254. implicitAttrs: {
  9255. 'aria-level': '4'
  9256. }
  9257. },
  9258. h5: {
  9259. contentTypes: [ 'heading', 'flow' ],
  9260. allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
  9261. shadowRoot: true,
  9262. implicitAttrs: {
  9263. 'aria-level': '5'
  9264. }
  9265. },
  9266. h6: {
  9267. contentTypes: [ 'heading', 'flow' ],
  9268. allowedRoles: [ 'none', 'presentation', 'tab', 'doc-subtitle' ],
  9269. shadowRoot: true,
  9270. implicitAttrs: {
  9271. 'aria-level': '6'
  9272. }
  9273. },
  9274. head: {
  9275. allowedRoles: false,
  9276. noAriaAttrs: true
  9277. },
  9278. header: {
  9279. contentTypes: [ 'flow' ],
  9280. allowedRoles: [ 'group', 'none', 'presentation', 'doc-footnote' ],
  9281. shadowRoot: true
  9282. },
  9283. hgroup: {
  9284. contentTypes: [ 'heading', 'flow' ],
  9285. allowedRoles: true
  9286. },
  9287. hr: {
  9288. contentTypes: [ 'flow' ],
  9289. allowedRoles: [ 'none', 'presentation', 'doc-pagebreak' ],
  9290. namingMethods: [ 'titleText', 'singleSpace' ]
  9291. },
  9292. html: {
  9293. allowedRoles: false,
  9294. noAriaAttrs: true
  9295. },
  9296. i: {
  9297. contentTypes: [ 'phrasing', 'flow' ],
  9298. allowedRoles: true
  9299. },
  9300. iframe: {
  9301. contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ],
  9302. allowedRoles: [ 'application', 'document', 'img', 'none', 'presentation' ],
  9303. chromiumRole: 'Iframe'
  9304. },
  9305. img: {
  9306. variant: {
  9307. nonEmptyAlt: {
  9308. matches: {
  9309. attributes: {
  9310. alt: '/.+/'
  9311. }
  9312. },
  9313. allowedRoles: [ 'button', 'checkbox', 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'scrollbar', 'separator', 'slider', 'switch', 'tab', 'treeitem', 'doc-cover' ]
  9314. },
  9315. usemap: {
  9316. matches: '[usemap]',
  9317. contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ]
  9318. },
  9319. default: {
  9320. allowedRoles: [ 'presentation', 'none' ],
  9321. contentTypes: [ 'embedded', 'phrasing', 'flow' ]
  9322. }
  9323. },
  9324. namingMethods: [ 'altText' ]
  9325. },
  9326. input: {
  9327. variant: {
  9328. button: {
  9329. matches: {
  9330. properties: {
  9331. type: 'button'
  9332. }
  9333. },
  9334. allowedRoles: [ 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'radio', 'switch', 'tab' ]
  9335. },
  9336. buttonType: {
  9337. matches: {
  9338. properties: {
  9339. type: [ 'button', 'submit', 'reset' ]
  9340. }
  9341. },
  9342. namingMethods: [ 'valueText', 'titleText', 'buttonDefaultText' ]
  9343. },
  9344. checkboxPressed: {
  9345. matches: {
  9346. properties: {
  9347. type: 'checkbox'
  9348. },
  9349. attributes: {
  9350. 'aria-pressed': '/.*/'
  9351. }
  9352. },
  9353. allowedRoles: [ 'button', 'menuitemcheckbox', 'option', 'switch' ],
  9354. implicitAttrs: {
  9355. 'aria-checked': 'false'
  9356. }
  9357. },
  9358. checkbox: {
  9359. matches: {
  9360. properties: {
  9361. type: 'checkbox'
  9362. },
  9363. attributes: {
  9364. 'aria-pressed': null
  9365. }
  9366. },
  9367. allowedRoles: [ 'menuitemcheckbox', 'option', 'switch' ],
  9368. implicitAttrs: {
  9369. 'aria-checked': 'false'
  9370. }
  9371. },
  9372. noRoles: {
  9373. matches: {
  9374. properties: {
  9375. type: [ 'color', 'date', 'datetime-local', 'file', 'month', 'number', 'password', 'range', 'reset', 'submit', 'time', 'week' ]
  9376. }
  9377. },
  9378. allowedRoles: false
  9379. },
  9380. hidden: {
  9381. matches: {
  9382. properties: {
  9383. type: 'hidden'
  9384. }
  9385. },
  9386. contentTypes: [ 'flow' ],
  9387. allowedRoles: false,
  9388. noAriaAttrs: true
  9389. },
  9390. image: {
  9391. matches: {
  9392. properties: {
  9393. type: 'image'
  9394. }
  9395. },
  9396. allowedRoles: [ 'link', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'radio', 'switch' ],
  9397. namingMethods: [ 'altText', 'valueText', 'labelText', 'titleText', 'buttonDefaultText' ]
  9398. },
  9399. radio: {
  9400. matches: {
  9401. properties: {
  9402. type: 'radio'
  9403. }
  9404. },
  9405. allowedRoles: [ 'menuitemradio' ],
  9406. implicitAttrs: {
  9407. 'aria-checked': 'false'
  9408. }
  9409. },
  9410. textWithList: {
  9411. matches: {
  9412. properties: {
  9413. type: 'text'
  9414. },
  9415. attributes: {
  9416. list: '/.*/'
  9417. }
  9418. },
  9419. allowedRoles: false
  9420. },
  9421. default: {
  9422. contentTypes: [ 'interactive', 'flow' ],
  9423. allowedRoles: [ 'combobox', 'searchbox', 'spinbutton' ],
  9424. implicitAttrs: {
  9425. 'aria-valuenow': ''
  9426. },
  9427. namingMethods: [ 'labelText', 'placeholderText' ]
  9428. }
  9429. }
  9430. },
  9431. ins: {
  9432. contentTypes: [ 'phrasing', 'flow' ],
  9433. allowedRoles: true
  9434. },
  9435. kbd: {
  9436. contentTypes: [ 'phrasing', 'flow' ],
  9437. allowedRoles: true
  9438. },
  9439. label: {
  9440. contentTypes: [ 'interactive', 'phrasing', 'flow' ],
  9441. allowedRoles: false,
  9442. chromiumRole: 'Label'
  9443. },
  9444. legend: {
  9445. allowedRoles: false
  9446. },
  9447. li: {
  9448. allowedRoles: [ 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'none', 'presentation', 'radio', 'separator', 'tab', 'treeitem', 'doc-biblioentry', 'doc-endnote' ],
  9449. implicitAttrs: {
  9450. 'aria-setsize': '1',
  9451. 'aria-posinset': '1'
  9452. }
  9453. },
  9454. link: {
  9455. contentTypes: [ 'phrasing', 'flow' ],
  9456. allowedRoles: false,
  9457. noAriaAttrs: true
  9458. },
  9459. main: {
  9460. contentTypes: [ 'flow' ],
  9461. allowedRoles: false,
  9462. shadowRoot: true
  9463. },
  9464. map: {
  9465. contentTypes: [ 'phrasing', 'flow' ],
  9466. allowedRoles: false,
  9467. noAriaAttrs: true
  9468. },
  9469. math: {
  9470. contentTypes: [ 'embedded', 'phrasing', 'flow' ],
  9471. allowedRoles: false
  9472. },
  9473. mark: {
  9474. contentTypes: [ 'phrasing', 'flow' ],
  9475. allowedRoles: true
  9476. },
  9477. menu: {
  9478. contentTypes: [ 'flow' ],
  9479. allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ]
  9480. },
  9481. meta: {
  9482. variant: {
  9483. itemprop: {
  9484. matches: '[itemprop]',
  9485. contentTypes: [ 'phrasing', 'flow' ]
  9486. }
  9487. },
  9488. allowedRoles: false,
  9489. noAriaAttrs: true
  9490. },
  9491. meter: {
  9492. contentTypes: [ 'phrasing', 'flow' ],
  9493. allowedRoles: false,
  9494. chromiumRole: 'progressbar'
  9495. },
  9496. nav: {
  9497. contentTypes: [ 'sectioning', 'flow' ],
  9498. allowedRoles: [ 'doc-index', 'doc-pagelist', 'doc-toc' ],
  9499. shadowRoot: true
  9500. },
  9501. noscript: {
  9502. contentTypes: [ 'phrasing', 'flow' ],
  9503. allowedRoles: false,
  9504. noAriaAttrs: true
  9505. },
  9506. object: {
  9507. variant: {
  9508. usemap: {
  9509. matches: '[usemap]',
  9510. contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ]
  9511. },
  9512. default: {
  9513. contentTypes: [ 'embedded', 'phrasing', 'flow' ]
  9514. }
  9515. },
  9516. allowedRoles: [ 'application', 'document', 'img' ],
  9517. chromiumRole: 'PluginObject'
  9518. },
  9519. ol: {
  9520. contentTypes: [ 'flow' ],
  9521. allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ]
  9522. },
  9523. optgroup: {
  9524. allowedRoles: false
  9525. },
  9526. option: {
  9527. allowedRoles: false,
  9528. implicitAttrs: {
  9529. 'aria-selected': 'false'
  9530. }
  9531. },
  9532. output: {
  9533. contentTypes: [ 'phrasing', 'flow' ],
  9534. allowedRoles: true,
  9535. namingMethods: [ 'subtreeText' ]
  9536. },
  9537. p: {
  9538. contentTypes: [ 'flow' ],
  9539. allowedRoles: true,
  9540. shadowRoot: true
  9541. },
  9542. param: {
  9543. allowedRoles: false,
  9544. noAriaAttrs: true
  9545. },
  9546. picture: {
  9547. contentTypes: [ 'embedded', 'phrasing', 'flow' ],
  9548. allowedRoles: false,
  9549. noAriaAttrs: true
  9550. },
  9551. pre: {
  9552. contentTypes: [ 'flow' ],
  9553. allowedRoles: true
  9554. },
  9555. progress: {
  9556. contentTypes: [ 'phrasing', 'flow' ],
  9557. allowedRoles: true,
  9558. implicitAttrs: {
  9559. 'aria-valuemax': '100',
  9560. 'aria-valuemin': '0',
  9561. 'aria-valuenow': '0'
  9562. }
  9563. },
  9564. q: {
  9565. contentTypes: [ 'phrasing', 'flow' ],
  9566. allowedRoles: true
  9567. },
  9568. rp: {
  9569. allowedRoles: true
  9570. },
  9571. rt: {
  9572. allowedRoles: true
  9573. },
  9574. ruby: {
  9575. contentTypes: [ 'phrasing', 'flow' ],
  9576. allowedRoles: true
  9577. },
  9578. s: {
  9579. contentTypes: [ 'phrasing', 'flow' ],
  9580. allowedRoles: true
  9581. },
  9582. samp: {
  9583. contentTypes: [ 'phrasing', 'flow' ],
  9584. allowedRoles: true
  9585. },
  9586. script: {
  9587. contentTypes: [ 'phrasing', 'flow' ],
  9588. allowedRoles: false,
  9589. noAriaAttrs: true
  9590. },
  9591. section: {
  9592. contentTypes: [ 'sectioning', 'flow' ],
  9593. allowedRoles: [ 'alert', 'alertdialog', 'application', 'banner', 'complementary', 'contentinfo', 'dialog', 'document', 'feed', 'log', 'main', 'marquee', 'navigation', 'none', 'note', 'presentation', 'search', 'status', 'tabpanel', 'doc-abstract', 'doc-acknowledgments', 'doc-afterword', 'doc-appendix', 'doc-bibliography', 'doc-chapter', 'doc-colophon', 'doc-conclusion', 'doc-credit', 'doc-credits', 'doc-dedication', 'doc-endnotes', 'doc-epigraph', 'doc-epilogue', 'doc-errata', 'doc-example', 'doc-foreword', 'doc-glossary', 'doc-index', 'doc-introduction', 'doc-notice', 'doc-pagelist', 'doc-part', 'doc-preface', 'doc-prologue', 'doc-pullquote', 'doc-qna', 'doc-toc' ],
  9594. shadowRoot: true
  9595. },
  9596. select: {
  9597. variant: {
  9598. combobox: {
  9599. matches: {
  9600. attributes: {
  9601. multiple: null,
  9602. size: [ null, '1' ]
  9603. }
  9604. },
  9605. allowedRoles: [ 'menu' ]
  9606. },
  9607. default: {
  9608. allowedRoles: false
  9609. }
  9610. },
  9611. contentTypes: [ 'interactive', 'phrasing', 'flow' ],
  9612. implicitAttrs: {
  9613. 'aria-valuenow': ''
  9614. },
  9615. namingMethods: [ 'labelText' ]
  9616. },
  9617. slot: {
  9618. contentTypes: [ 'phrasing', 'flow' ],
  9619. allowedRoles: false,
  9620. noAriaAttrs: true
  9621. },
  9622. small: {
  9623. contentTypes: [ 'phrasing', 'flow' ],
  9624. allowedRoles: true
  9625. },
  9626. source: {
  9627. allowedRoles: false,
  9628. noAriaAttrs: true
  9629. },
  9630. span: {
  9631. contentTypes: [ 'phrasing', 'flow' ],
  9632. allowedRoles: true,
  9633. shadowRoot: true
  9634. },
  9635. strong: {
  9636. contentTypes: [ 'phrasing', 'flow' ],
  9637. allowedRoles: true
  9638. },
  9639. style: {
  9640. allowedRoles: false,
  9641. noAriaAttrs: true
  9642. },
  9643. svg: {
  9644. contentTypes: [ 'embedded', 'phrasing', 'flow' ],
  9645. allowedRoles: [ 'application', 'document', 'img' ],
  9646. chromiumRole: 'SVGRoot',
  9647. namingMethods: [ 'svgTitleText' ]
  9648. },
  9649. sub: {
  9650. contentTypes: [ 'phrasing', 'flow' ],
  9651. allowedRoles: true
  9652. },
  9653. summary: {
  9654. allowedRoles: false,
  9655. namingMethods: [ 'subtreeText' ]
  9656. },
  9657. sup: {
  9658. contentTypes: [ 'phrasing', 'flow' ],
  9659. allowedRoles: true
  9660. },
  9661. table: {
  9662. contentTypes: [ 'flow' ],
  9663. allowedRoles: true,
  9664. namingMethods: [ 'tableCaptionText', 'tableSummaryText' ]
  9665. },
  9666. tbody: {
  9667. allowedRoles: true
  9668. },
  9669. template: {
  9670. contentTypes: [ 'phrasing', 'flow' ],
  9671. allowedRoles: false,
  9672. noAriaAttrs: true
  9673. },
  9674. textarea: {
  9675. contentTypes: [ 'interactive', 'phrasing', 'flow' ],
  9676. allowedRoles: false,
  9677. implicitAttrs: {
  9678. 'aria-valuenow': '',
  9679. 'aria-multiline': 'true'
  9680. },
  9681. namingMethods: [ 'labelText', 'placeholderText' ]
  9682. },
  9683. tfoot: {
  9684. allowedRoles: true
  9685. },
  9686. thead: {
  9687. allowedRoles: true
  9688. },
  9689. time: {
  9690. contentTypes: [ 'phrasing', 'flow' ],
  9691. allowedRoles: true
  9692. },
  9693. title: {
  9694. allowedRoles: false,
  9695. noAriaAttrs: true
  9696. },
  9697. td: {
  9698. allowedRoles: true
  9699. },
  9700. th: {
  9701. allowedRoles: true
  9702. },
  9703. tr: {
  9704. allowedRoles: true
  9705. },
  9706. track: {
  9707. allowedRoles: false,
  9708. noAriaAttrs: true
  9709. },
  9710. u: {
  9711. contentTypes: [ 'phrasing', 'flow' ],
  9712. allowedRoles: true
  9713. },
  9714. ul: {
  9715. contentTypes: [ 'flow' ],
  9716. allowedRoles: [ 'directory', 'group', 'listbox', 'menu', 'menubar', 'none', 'presentation', 'radiogroup', 'tablist', 'toolbar', 'tree' ]
  9717. },
  9718. var: {
  9719. contentTypes: [ 'phrasing', 'flow' ],
  9720. allowedRoles: true
  9721. },
  9722. video: {
  9723. variant: {
  9724. controls: {
  9725. matches: '[controls]',
  9726. contentTypes: [ 'interactive', 'embedded', 'phrasing', 'flow' ]
  9727. },
  9728. default: {
  9729. contentTypes: [ 'embedded', 'phrasing', 'flow' ]
  9730. }
  9731. },
  9732. allowedRoles: [ 'application' ],
  9733. chromiumRole: 'video'
  9734. },
  9735. wbr: {
  9736. contentTypes: [ 'phrasing', 'flow' ],
  9737. allowedRoles: true
  9738. }
  9739. };
  9740. var html_elms_default = htmlElms;
  9741. var cssColors = {
  9742. aliceblue: [ 240, 248, 255 ],
  9743. antiquewhite: [ 250, 235, 215 ],
  9744. aqua: [ 0, 255, 255 ],
  9745. aquamarine: [ 127, 255, 212 ],
  9746. azure: [ 240, 255, 255 ],
  9747. beige: [ 245, 245, 220 ],
  9748. bisque: [ 255, 228, 196 ],
  9749. black: [ 0, 0, 0 ],
  9750. blanchedalmond: [ 255, 235, 205 ],
  9751. blue: [ 0, 0, 255 ],
  9752. blueviolet: [ 138, 43, 226 ],
  9753. brown: [ 165, 42, 42 ],
  9754. burlywood: [ 222, 184, 135 ],
  9755. cadetblue: [ 95, 158, 160 ],
  9756. chartreuse: [ 127, 255, 0 ],
  9757. chocolate: [ 210, 105, 30 ],
  9758. coral: [ 255, 127, 80 ],
  9759. cornflowerblue: [ 100, 149, 237 ],
  9760. cornsilk: [ 255, 248, 220 ],
  9761. crimson: [ 220, 20, 60 ],
  9762. cyan: [ 0, 255, 255 ],
  9763. darkblue: [ 0, 0, 139 ],
  9764. darkcyan: [ 0, 139, 139 ],
  9765. darkgoldenrod: [ 184, 134, 11 ],
  9766. darkgray: [ 169, 169, 169 ],
  9767. darkgreen: [ 0, 100, 0 ],
  9768. darkgrey: [ 169, 169, 169 ],
  9769. darkkhaki: [ 189, 183, 107 ],
  9770. darkmagenta: [ 139, 0, 139 ],
  9771. darkolivegreen: [ 85, 107, 47 ],
  9772. darkorange: [ 255, 140, 0 ],
  9773. darkorchid: [ 153, 50, 204 ],
  9774. darkred: [ 139, 0, 0 ],
  9775. darksalmon: [ 233, 150, 122 ],
  9776. darkseagreen: [ 143, 188, 143 ],
  9777. darkslateblue: [ 72, 61, 139 ],
  9778. darkslategray: [ 47, 79, 79 ],
  9779. darkslategrey: [ 47, 79, 79 ],
  9780. darkturquoise: [ 0, 206, 209 ],
  9781. darkviolet: [ 148, 0, 211 ],
  9782. deeppink: [ 255, 20, 147 ],
  9783. deepskyblue: [ 0, 191, 255 ],
  9784. dimgray: [ 105, 105, 105 ],
  9785. dimgrey: [ 105, 105, 105 ],
  9786. dodgerblue: [ 30, 144, 255 ],
  9787. firebrick: [ 178, 34, 34 ],
  9788. floralwhite: [ 255, 250, 240 ],
  9789. forestgreen: [ 34, 139, 34 ],
  9790. fuchsia: [ 255, 0, 255 ],
  9791. gainsboro: [ 220, 220, 220 ],
  9792. ghostwhite: [ 248, 248, 255 ],
  9793. gold: [ 255, 215, 0 ],
  9794. goldenrod: [ 218, 165, 32 ],
  9795. gray: [ 128, 128, 128 ],
  9796. green: [ 0, 128, 0 ],
  9797. greenyellow: [ 173, 255, 47 ],
  9798. grey: [ 128, 128, 128 ],
  9799. honeydew: [ 240, 255, 240 ],
  9800. hotpink: [ 255, 105, 180 ],
  9801. indianred: [ 205, 92, 92 ],
  9802. indigo: [ 75, 0, 130 ],
  9803. ivory: [ 255, 255, 240 ],
  9804. khaki: [ 240, 230, 140 ],
  9805. lavender: [ 230, 230, 250 ],
  9806. lavenderblush: [ 255, 240, 245 ],
  9807. lawngreen: [ 124, 252, 0 ],
  9808. lemonchiffon: [ 255, 250, 205 ],
  9809. lightblue: [ 173, 216, 230 ],
  9810. lightcoral: [ 240, 128, 128 ],
  9811. lightcyan: [ 224, 255, 255 ],
  9812. lightgoldenrodyellow: [ 250, 250, 210 ],
  9813. lightgray: [ 211, 211, 211 ],
  9814. lightgreen: [ 144, 238, 144 ],
  9815. lightgrey: [ 211, 211, 211 ],
  9816. lightpink: [ 255, 182, 193 ],
  9817. lightsalmon: [ 255, 160, 122 ],
  9818. lightseagreen: [ 32, 178, 170 ],
  9819. lightskyblue: [ 135, 206, 250 ],
  9820. lightslategray: [ 119, 136, 153 ],
  9821. lightslategrey: [ 119, 136, 153 ],
  9822. lightsteelblue: [ 176, 196, 222 ],
  9823. lightyellow: [ 255, 255, 224 ],
  9824. lime: [ 0, 255, 0 ],
  9825. limegreen: [ 50, 205, 50 ],
  9826. linen: [ 250, 240, 230 ],
  9827. magenta: [ 255, 0, 255 ],
  9828. maroon: [ 128, 0, 0 ],
  9829. mediumaquamarine: [ 102, 205, 170 ],
  9830. mediumblue: [ 0, 0, 205 ],
  9831. mediumorchid: [ 186, 85, 211 ],
  9832. mediumpurple: [ 147, 112, 219 ],
  9833. mediumseagreen: [ 60, 179, 113 ],
  9834. mediumslateblue: [ 123, 104, 238 ],
  9835. mediumspringgreen: [ 0, 250, 154 ],
  9836. mediumturquoise: [ 72, 209, 204 ],
  9837. mediumvioletred: [ 199, 21, 133 ],
  9838. midnightblue: [ 25, 25, 112 ],
  9839. mintcream: [ 245, 255, 250 ],
  9840. mistyrose: [ 255, 228, 225 ],
  9841. moccasin: [ 255, 228, 181 ],
  9842. navajowhite: [ 255, 222, 173 ],
  9843. navy: [ 0, 0, 128 ],
  9844. oldlace: [ 253, 245, 230 ],
  9845. olive: [ 128, 128, 0 ],
  9846. olivedrab: [ 107, 142, 35 ],
  9847. orange: [ 255, 165, 0 ],
  9848. orangered: [ 255, 69, 0 ],
  9849. orchid: [ 218, 112, 214 ],
  9850. palegoldenrod: [ 238, 232, 170 ],
  9851. palegreen: [ 152, 251, 152 ],
  9852. paleturquoise: [ 175, 238, 238 ],
  9853. palevioletred: [ 219, 112, 147 ],
  9854. papayawhip: [ 255, 239, 213 ],
  9855. peachpuff: [ 255, 218, 185 ],
  9856. peru: [ 205, 133, 63 ],
  9857. pink: [ 255, 192, 203 ],
  9858. plum: [ 221, 160, 221 ],
  9859. powderblue: [ 176, 224, 230 ],
  9860. purple: [ 128, 0, 128 ],
  9861. rebeccapurple: [ 102, 51, 153 ],
  9862. red: [ 255, 0, 0 ],
  9863. rosybrown: [ 188, 143, 143 ],
  9864. royalblue: [ 65, 105, 225 ],
  9865. saddlebrown: [ 139, 69, 19 ],
  9866. salmon: [ 250, 128, 114 ],
  9867. sandybrown: [ 244, 164, 96 ],
  9868. seagreen: [ 46, 139, 87 ],
  9869. seashell: [ 255, 245, 238 ],
  9870. sienna: [ 160, 82, 45 ],
  9871. silver: [ 192, 192, 192 ],
  9872. skyblue: [ 135, 206, 235 ],
  9873. slateblue: [ 106, 90, 205 ],
  9874. slategray: [ 112, 128, 144 ],
  9875. slategrey: [ 112, 128, 144 ],
  9876. snow: [ 255, 250, 250 ],
  9877. springgreen: [ 0, 255, 127 ],
  9878. steelblue: [ 70, 130, 180 ],
  9879. tan: [ 210, 180, 140 ],
  9880. teal: [ 0, 128, 128 ],
  9881. thistle: [ 216, 191, 216 ],
  9882. tomato: [ 255, 99, 71 ],
  9883. turquoise: [ 64, 224, 208 ],
  9884. violet: [ 238, 130, 238 ],
  9885. wheat: [ 245, 222, 179 ],
  9886. white: [ 255, 255, 255 ],
  9887. whitesmoke: [ 245, 245, 245 ],
  9888. yellow: [ 255, 255, 0 ],
  9889. yellowgreen: [ 154, 205, 50 ]
  9890. };
  9891. var css_colors_default = cssColors;
  9892. var originals = {
  9893. ariaAttrs: aria_attrs_default,
  9894. ariaRoles: _extends({}, aria_roles_default, dpub_roles_default, graphics_roles_default),
  9895. htmlElms: html_elms_default,
  9896. cssColors: css_colors_default
  9897. };
  9898. var standards = _extends({}, originals);
  9899. function configureStandards(config) {
  9900. Object.keys(standards).forEach(function(propName) {
  9901. if (config[propName]) {
  9902. standards[propName] = deep_merge_default(standards[propName], config[propName]);
  9903. }
  9904. });
  9905. }
  9906. function resetStandards() {
  9907. Object.keys(standards).forEach(function(propName) {
  9908. standards[propName] = originals[propName];
  9909. });
  9910. }
  9911. var standards_default = standards;
  9912. function convertColorVal(colorFunc, value, index) {
  9913. if (/%$/.test(value)) {
  9914. if (index === 3) {
  9915. return parseFloat(value) / 100;
  9916. }
  9917. return parseFloat(value) * 255 / 100;
  9918. }
  9919. if (colorFunc[index] === 'h') {
  9920. if (/turn$/.test(value)) {
  9921. return parseFloat(value) * 360;
  9922. }
  9923. if (/rad$/.test(value)) {
  9924. return parseFloat(value) * 57.3;
  9925. }
  9926. }
  9927. return parseFloat(value);
  9928. }
  9929. function hslToRgb(_ref9) {
  9930. var _ref10 = _slicedToArray(_ref9, 4), hue = _ref10[0], saturation = _ref10[1], lightness = _ref10[2], alpha = _ref10[3];
  9931. saturation /= 255;
  9932. lightness /= 255;
  9933. var high = (1 - Math.abs(2 * lightness - 1)) * saturation;
  9934. var low = high * (1 - Math.abs(hue / 60 % 2 - 1));
  9935. var base = lightness - high / 2;
  9936. var colors;
  9937. if (hue < 60) {
  9938. colors = [ high, low, 0 ];
  9939. } else if (hue < 120) {
  9940. colors = [ low, high, 0 ];
  9941. } else if (hue < 180) {
  9942. colors = [ 0, high, low ];
  9943. } else if (hue < 240) {
  9944. colors = [ 0, low, high ];
  9945. } else if (hue < 300) {
  9946. colors = [ low, 0, high ];
  9947. } else {
  9948. colors = [ high, 0, low ];
  9949. }
  9950. return colors.map(function(color10) {
  9951. return Math.round((color10 + base) * 255);
  9952. }).concat(alpha);
  9953. }
  9954. function Color(red, green, blue, alpha) {
  9955. this.red = red;
  9956. this.green = green;
  9957. this.blue = blue;
  9958. this.alpha = alpha;
  9959. this.toHexString = function toHexString() {
  9960. var redString = Math.round(this.red).toString(16);
  9961. var greenString = Math.round(this.green).toString(16);
  9962. var blueString = Math.round(this.blue).toString(16);
  9963. return '#' + (this.red > 15.5 ? redString : '0' + redString) + (this.green > 15.5 ? greenString : '0' + greenString) + (this.blue > 15.5 ? blueString : '0' + blueString);
  9964. };
  9965. var hexRegex = /^#[0-9a-f]{3,8}$/i;
  9966. var colorFnRegex = /^((?:rgb|hsl)a?)\s*\(([^\)]*)\)/i;
  9967. this.parseString = function parseString(colorString) {
  9968. if (standards_default.cssColors[colorString] || colorString === 'transparent') {
  9969. var _ref11 = standards_default.cssColors[colorString] || [ 0, 0, 0 ], _ref12 = _slicedToArray(_ref11, 3), red2 = _ref12[0], green2 = _ref12[1], blue2 = _ref12[2];
  9970. this.red = red2;
  9971. this.green = green2;
  9972. this.blue = blue2;
  9973. this.alpha = colorString === 'transparent' ? 0 : 1;
  9974. return;
  9975. }
  9976. if (colorString.match(colorFnRegex)) {
  9977. this.parseColorFnString(colorString);
  9978. return;
  9979. }
  9980. if (colorString.match(hexRegex)) {
  9981. this.parseHexString(colorString);
  9982. return;
  9983. }
  9984. throw new Error('Unable to parse color "'.concat(colorString, '"'));
  9985. };
  9986. this.parseRgbString = function parseRgbString(colorString) {
  9987. if (colorString === 'transparent') {
  9988. this.red = 0;
  9989. this.green = 0;
  9990. this.blue = 0;
  9991. this.alpha = 0;
  9992. return;
  9993. }
  9994. this.parseColorFnString(colorString);
  9995. };
  9996. this.parseHexString = function parseHexString(colorString) {
  9997. if (!colorString.match(hexRegex) || [ 6, 8 ].includes(colorString.length)) {
  9998. return;
  9999. }
  10000. colorString = colorString.replace('#', '');
  10001. if (colorString.length < 6) {
  10002. var _colorString = colorString, _colorString2 = _slicedToArray(_colorString, 4), r = _colorString2[0], g = _colorString2[1], b = _colorString2[2], a = _colorString2[3];
  10003. colorString = r + r + g + g + b + b;
  10004. if (a) {
  10005. colorString += a + a;
  10006. }
  10007. }
  10008. var aRgbHex = colorString.match(/.{1,2}/g);
  10009. this.red = parseInt(aRgbHex[0], 16);
  10010. this.green = parseInt(aRgbHex[1], 16);
  10011. this.blue = parseInt(aRgbHex[2], 16);
  10012. if (aRgbHex[3]) {
  10013. this.alpha = parseInt(aRgbHex[3], 16) / 255;
  10014. } else {
  10015. this.alpha = 1;
  10016. }
  10017. };
  10018. this.parseColorFnString = function parseColorFnString(colorString) {
  10019. var _ref13 = colorString.match(colorFnRegex) || [], _ref14 = _slicedToArray(_ref13, 3), colorFunc = _ref14[1], colorValStr = _ref14[2];
  10020. if (!colorFunc || !colorValStr) {
  10021. return;
  10022. }
  10023. var colorVals = colorValStr.split(/\s*[,\/\s]\s*/).map(function(str) {
  10024. return str.replace(',', '').trim();
  10025. }).filter(function(str) {
  10026. return str !== '';
  10027. });
  10028. var colorNums = colorVals.map(function(val, index) {
  10029. return convertColorVal(colorFunc, val, index);
  10030. });
  10031. if (colorFunc.substr(0, 3) === 'hsl') {
  10032. colorNums = hslToRgb(colorNums);
  10033. }
  10034. this.red = colorNums[0];
  10035. this.green = colorNums[1];
  10036. this.blue = colorNums[2];
  10037. this.alpha = typeof colorNums[3] === 'number' ? colorNums[3] : 1;
  10038. };
  10039. this.getRelativeLuminance = function getRelativeLuminance() {
  10040. var rSRGB = this.red / 255;
  10041. var gSRGB = this.green / 255;
  10042. var bSRGB = this.blue / 255;
  10043. var r = rSRGB <= .03928 ? rSRGB / 12.92 : Math.pow((rSRGB + .055) / 1.055, 2.4);
  10044. var g = gSRGB <= .03928 ? gSRGB / 12.92 : Math.pow((gSRGB + .055) / 1.055, 2.4);
  10045. var b = bSRGB <= .03928 ? bSRGB / 12.92 : Math.pow((bSRGB + .055) / 1.055, 2.4);
  10046. return .2126 * r + .7152 * g + .0722 * b;
  10047. };
  10048. }
  10049. var color_default = Color;
  10050. function getOwnBackgroundColor(elmStyle) {
  10051. var bgColor = new color_default();
  10052. bgColor.parseString(elmStyle.getPropertyValue('background-color'));
  10053. if (bgColor.alpha !== 0) {
  10054. var opacity = elmStyle.getPropertyValue('opacity');
  10055. bgColor.alpha = bgColor.alpha * opacity;
  10056. }
  10057. return bgColor;
  10058. }
  10059. var get_own_background_color_default = getOwnBackgroundColor;
  10060. function isOpaque(node) {
  10061. var style = window.getComputedStyle(node);
  10062. return element_has_image_default(node, style) || get_own_background_color_default(style).alpha === 1;
  10063. }
  10064. var is_opaque_default = isOpaque;
  10065. var isInternalLinkRegex = /^\/?#[^/!]/;
  10066. function isSkipLink(element) {
  10067. if (!isInternalLinkRegex.test(element.getAttribute('href'))) {
  10068. return false;
  10069. }
  10070. var firstPageLink;
  10071. if (typeof cache_default.get('firstPageLink') !== 'undefined') {
  10072. firstPageLink = cache_default.get('firstPageLink');
  10073. } else {
  10074. firstPageLink = query_selector_all_default(axe._tree, 'a:not([href^="#"]):not([href^="/#"]):not([href^="javascript"])')[0];
  10075. cache_default.set('firstPageLink', firstPageLink || null);
  10076. }
  10077. if (!firstPageLink) {
  10078. return true;
  10079. }
  10080. return element.compareDocumentPosition(firstPageLink.actualNode) === element.DOCUMENT_POSITION_FOLLOWING;
  10081. }
  10082. var is_skip_link_default = isSkipLink;
  10083. function reduceToElementsBelowFloating(elements, targetNode) {
  10084. var floatingPositions = [ 'fixed', 'sticky' ];
  10085. var finalElements = [];
  10086. var targetFound = false;
  10087. for (var index = 0; index < elements.length; ++index) {
  10088. var currentNode = elements[index];
  10089. if (currentNode === targetNode) {
  10090. targetFound = true;
  10091. }
  10092. var style = window.getComputedStyle(currentNode);
  10093. if (!targetFound && floatingPositions.indexOf(style.position) !== -1) {
  10094. finalElements = [];
  10095. continue;
  10096. }
  10097. finalElements.push(currentNode);
  10098. }
  10099. return finalElements;
  10100. }
  10101. var reduce_to_elements_below_floating_default = reduceToElementsBelowFloating;
  10102. function getScrollAncestor(node) {
  10103. var vNode = get_node_from_tree_default(node);
  10104. var ancestor = vNode.parent;
  10105. while (ancestor) {
  10106. if (get_scroll_default(ancestor.actualNode)) {
  10107. return ancestor.actualNode;
  10108. }
  10109. ancestor = ancestor.parent;
  10110. }
  10111. }
  10112. function contains2(node, parent) {
  10113. var rectBound = node.getBoundingClientRect();
  10114. var margin = .01;
  10115. var rect = {
  10116. top: rectBound.top + margin,
  10117. bottom: rectBound.bottom - margin,
  10118. left: rectBound.left + margin,
  10119. right: rectBound.right - margin
  10120. };
  10121. var parentRect = parent.getBoundingClientRect();
  10122. var parentTop = parentRect.top;
  10123. var parentLeft = parentRect.left;
  10124. var parentScrollArea = {
  10125. top: parentTop - parent.scrollTop,
  10126. bottom: parentTop - parent.scrollTop + parent.scrollHeight,
  10127. left: parentLeft - parent.scrollLeft,
  10128. right: parentLeft - parent.scrollLeft + parent.scrollWidth
  10129. };
  10130. var style = window.getComputedStyle(parent);
  10131. if (style.getPropertyValue('display') === 'inline') {
  10132. return true;
  10133. }
  10134. if (rect.left < parentScrollArea.left && rect.left < parentRect.left || rect.top < parentScrollArea.top && rect.top < parentRect.top || rect.right > parentScrollArea.right && rect.right > parentRect.right || rect.bottom > parentScrollArea.bottom && rect.bottom > parentRect.bottom) {
  10135. return false;
  10136. }
  10137. if (rect.right > parentRect.right || rect.bottom > parentRect.bottom) {
  10138. return style.overflow === 'scroll' || style.overflow === 'auto' || style.overflow === 'hidden' || parent instanceof window.HTMLBodyElement || parent instanceof window.HTMLHtmlElement;
  10139. }
  10140. return true;
  10141. }
  10142. function visuallyContains(node, parent) {
  10143. var parentScrollAncestor = getScrollAncestor(parent);
  10144. do {
  10145. var nextScrollAncestor = getScrollAncestor(node);
  10146. if (nextScrollAncestor === parentScrollAncestor || nextScrollAncestor === parent) {
  10147. return contains2(node, parent);
  10148. }
  10149. node = nextScrollAncestor;
  10150. } while (node);
  10151. return false;
  10152. }
  10153. var visually_contains_default = visuallyContains;
  10154. function shadowElementsFromPoint(nodeX, nodeY) {
  10155. var root = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document;
  10156. var i = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
  10157. if (i > 999) {
  10158. throw new Error('Infinite loop detected');
  10159. }
  10160. return Array.from(root.elementsFromPoint(nodeX, nodeY) || []).filter(function(nodes) {
  10161. return get_root_node_default2(nodes) === root;
  10162. }).reduce(function(stack, elm) {
  10163. if (is_shadow_root_default(elm)) {
  10164. var shadowStack = shadowElementsFromPoint(nodeX, nodeY, elm.shadowRoot, i + 1);
  10165. stack = stack.concat(shadowStack);
  10166. if (stack.length && visually_contains_default(stack[0], elm)) {
  10167. stack.push(elm);
  10168. }
  10169. } else {
  10170. stack.push(elm);
  10171. }
  10172. return stack;
  10173. }, []);
  10174. }
  10175. var shadow_elements_from_point_default = shadowElementsFromPoint;
  10176. function urlPropsFromAttribute(node, attribute) {
  10177. if (!node.hasAttribute(attribute)) {
  10178. return void 0;
  10179. }
  10180. var nodeName2 = node.nodeName.toUpperCase();
  10181. var parser2 = node;
  10182. if (![ 'A', 'AREA' ].includes(nodeName2) || node.ownerSVGElement) {
  10183. parser2 = document.createElement('a');
  10184. parser2.href = node.getAttribute(attribute);
  10185. }
  10186. var protocol = [ 'https:', 'ftps:' ].includes(parser2.protocol) ? parser2.protocol.replace(/s:$/, ':') : parser2.protocol;
  10187. var parserPathname = /^\//.test(parser2.pathname) ? parser2.pathname : '/'.concat(parser2.pathname);
  10188. var _getPathnameOrFilenam = getPathnameOrFilename(parserPathname), pathname = _getPathnameOrFilenam.pathname, filename = _getPathnameOrFilenam.filename;
  10189. return {
  10190. protocol: protocol,
  10191. hostname: parser2.hostname,
  10192. port: getPort(parser2.port),
  10193. pathname: /\/$/.test(pathname) ? pathname : ''.concat(pathname, '/'),
  10194. search: getSearchPairs(parser2.search),
  10195. hash: getHashRoute(parser2.hash),
  10196. filename: filename
  10197. };
  10198. }
  10199. function getPort(port) {
  10200. var excludePorts = [ '443', '80' ];
  10201. return !excludePorts.includes(port) ? port : '';
  10202. }
  10203. function getPathnameOrFilename(pathname) {
  10204. var filename = pathname.split('/').pop();
  10205. if (!filename || filename.indexOf('.') === -1) {
  10206. return {
  10207. pathname: pathname,
  10208. filename: ''
  10209. };
  10210. }
  10211. return {
  10212. pathname: pathname.replace(filename, ''),
  10213. filename: /index./.test(filename) ? '' : filename
  10214. };
  10215. }
  10216. function getSearchPairs(searchStr) {
  10217. var query = {};
  10218. if (!searchStr || !searchStr.length) {
  10219. return query;
  10220. }
  10221. var pairs = searchStr.substring(1).split('&');
  10222. if (!pairs || !pairs.length) {
  10223. return query;
  10224. }
  10225. for (var index = 0; index < pairs.length; index++) {
  10226. var pair = pairs[index];
  10227. var _pair$split = pair.split('='), _pair$split2 = _slicedToArray(_pair$split, 2), key = _pair$split2[0], _pair$split2$ = _pair$split2[1], value = _pair$split2$ === void 0 ? '' : _pair$split2$;
  10228. query[decodeURIComponent(key)] = decodeURIComponent(value);
  10229. }
  10230. return query;
  10231. }
  10232. function getHashRoute(hash) {
  10233. if (!hash) {
  10234. return '';
  10235. }
  10236. var hashRegex = /#!?\/?/g;
  10237. var hasMatch = hash.match(hashRegex);
  10238. if (!hasMatch) {
  10239. return '';
  10240. }
  10241. var _hasMatch = _slicedToArray(hasMatch, 1), matchedStr = _hasMatch[0];
  10242. if (matchedStr === '#') {
  10243. return '';
  10244. }
  10245. return hash;
  10246. }
  10247. var url_props_from_attribute_default = urlPropsFromAttribute;
  10248. function visuallyOverlaps(rect, parent) {
  10249. var parentRect = parent.getBoundingClientRect();
  10250. var parentTop = parentRect.top;
  10251. var parentLeft = parentRect.left;
  10252. var parentScrollArea = {
  10253. top: parentTop - parent.scrollTop,
  10254. bottom: parentTop - parent.scrollTop + parent.scrollHeight,
  10255. left: parentLeft - parent.scrollLeft,
  10256. right: parentLeft - parent.scrollLeft + parent.scrollWidth
  10257. };
  10258. if (rect.left > parentScrollArea.right && rect.left > parentRect.right || rect.top > parentScrollArea.bottom && rect.top > parentRect.bottom || rect.right < parentScrollArea.left && rect.right < parentRect.left || rect.bottom < parentScrollArea.top && rect.bottom < parentRect.top) {
  10259. return false;
  10260. }
  10261. var style = window.getComputedStyle(parent);
  10262. if (rect.left > parentRect.right || rect.top > parentRect.bottom) {
  10263. return style.overflow === 'scroll' || style.overflow === 'auto' || parent instanceof window.HTMLBodyElement || parent instanceof window.HTMLHtmlElement;
  10264. }
  10265. return true;
  10266. }
  10267. var visually_overlaps_default = visuallyOverlaps;
  10268. var isXHTMLGlobal;
  10269. var VirtualNode = function(_abstract_virtual_nod) {
  10270. _inherits(VirtualNode, _abstract_virtual_nod);
  10271. var _super = _createSuper(VirtualNode);
  10272. function VirtualNode(node, parent, shadowId) {
  10273. var _this;
  10274. _classCallCheck(this, VirtualNode);
  10275. _this = _super.call(this);
  10276. _this.shadowId = shadowId;
  10277. _this.children = [];
  10278. _this.actualNode = node;
  10279. _this.parent = parent;
  10280. _this._isHidden = null;
  10281. _this._cache = {};
  10282. if (typeof isXHTMLGlobal === 'undefined') {
  10283. isXHTMLGlobal = is_xhtml_default(node.ownerDocument);
  10284. }
  10285. _this._isXHTML = isXHTMLGlobal;
  10286. if (node.nodeName.toLowerCase() === 'input') {
  10287. var type = node.getAttribute('type');
  10288. type = _this._isXHTML ? type : (type || '').toLowerCase();
  10289. if (!valid_input_type_default().includes(type)) {
  10290. type = 'text';
  10291. }
  10292. _this._type = type;
  10293. }
  10294. if (cache_default.get('nodeMap')) {
  10295. cache_default.get('nodeMap').set(node, _assertThisInitialized(_this));
  10296. }
  10297. return _this;
  10298. }
  10299. _createClass(VirtualNode, [ {
  10300. key: 'attr',
  10301. value: function attr(attrName) {
  10302. if (typeof this.actualNode.getAttribute !== 'function') {
  10303. return null;
  10304. }
  10305. return this.actualNode.getAttribute(attrName);
  10306. }
  10307. }, {
  10308. key: 'hasAttr',
  10309. value: function hasAttr(attrName) {
  10310. if (typeof this.actualNode.hasAttribute !== 'function') {
  10311. return false;
  10312. }
  10313. return this.actualNode.hasAttribute(attrName);
  10314. }
  10315. }, {
  10316. key: 'getComputedStylePropertyValue',
  10317. value: function getComputedStylePropertyValue(property) {
  10318. var key = 'computedStyle_' + property;
  10319. if (!this._cache.hasOwnProperty(key)) {
  10320. if (!this._cache.hasOwnProperty('computedStyle')) {
  10321. this._cache.computedStyle = window.getComputedStyle(this.actualNode);
  10322. }
  10323. this._cache[key] = this._cache.computedStyle.getPropertyValue(property);
  10324. }
  10325. return this._cache[key];
  10326. }
  10327. }, {
  10328. key: 'props',
  10329. get: function get() {
  10330. var _this$actualNode = this.actualNode, nodeType = _this$actualNode.nodeType, nodeName2 = _this$actualNode.nodeName, id = _this$actualNode.id, multiple = _this$actualNode.multiple, nodeValue = _this$actualNode.nodeValue, value = _this$actualNode.value;
  10331. return {
  10332. nodeType: nodeType,
  10333. nodeName: this._isXHTML ? nodeName2 : nodeName2.toLowerCase(),
  10334. id: id,
  10335. type: this._type,
  10336. multiple: multiple,
  10337. nodeValue: nodeValue,
  10338. value: value
  10339. };
  10340. }
  10341. }, {
  10342. key: 'attrNames',
  10343. get: function get() {
  10344. if (!this._cache.hasOwnProperty('attrNames')) {
  10345. var attrs;
  10346. if (this.actualNode.attributes instanceof window.NamedNodeMap) {
  10347. attrs = this.actualNode.attributes;
  10348. } else {
  10349. attrs = this.actualNode.cloneNode(false).attributes;
  10350. }
  10351. this._cache.attrNames = Array.from(attrs).map(function(attr) {
  10352. return attr.name;
  10353. });
  10354. }
  10355. return this._cache.attrNames;
  10356. }
  10357. }, {
  10358. key: 'isFocusable',
  10359. get: function get() {
  10360. if (!this._cache.hasOwnProperty('isFocusable')) {
  10361. this._cache.isFocusable = is_focusable_default(this.actualNode);
  10362. }
  10363. return this._cache.isFocusable;
  10364. }
  10365. }, {
  10366. key: 'tabbableElements',
  10367. get: function get() {
  10368. if (!this._cache.hasOwnProperty('tabbableElements')) {
  10369. this._cache.tabbableElements = get_tabbable_elements_default(this);
  10370. }
  10371. return this._cache.tabbableElements;
  10372. }
  10373. }, {
  10374. key: 'clientRects',
  10375. get: function get() {
  10376. if (!this._cache.hasOwnProperty('clientRects')) {
  10377. this._cache.clientRects = Array.from(this.actualNode.getClientRects()).filter(function(rect) {
  10378. return rect.width > 0;
  10379. });
  10380. }
  10381. return this._cache.clientRects;
  10382. }
  10383. }, {
  10384. key: 'boundingClientRect',
  10385. get: function get() {
  10386. if (!this._cache.hasOwnProperty('boundingClientRect')) {
  10387. this._cache.boundingClientRect = this.actualNode.getBoundingClientRect();
  10388. }
  10389. return this._cache.boundingClientRect;
  10390. }
  10391. } ]);
  10392. return VirtualNode;
  10393. }(abstract_virtual_node_default);
  10394. var virtual_node_default = VirtualNode;
  10395. function getSlotChildren(node) {
  10396. var retVal = [];
  10397. node = node.firstChild;
  10398. while (node) {
  10399. retVal.push(node);
  10400. node = node.nextSibling;
  10401. }
  10402. return retVal;
  10403. }
  10404. function flattenTree(node, shadowId, parent) {
  10405. var retVal, realArray, nodeName2;
  10406. function reduceShadowDOM(res, child, parent2) {
  10407. var replacements = flattenTree(child, shadowId, parent2);
  10408. if (replacements) {
  10409. res = res.concat(replacements);
  10410. }
  10411. return res;
  10412. }
  10413. if (node.documentElement) {
  10414. node = node.documentElement;
  10415. }
  10416. nodeName2 = node.nodeName.toLowerCase();
  10417. if (is_shadow_root_default(node)) {
  10418. retVal = new virtual_node_default(node, parent, shadowId);
  10419. shadowId = 'a' + Math.random().toString().substring(2);
  10420. realArray = Array.from(node.shadowRoot.childNodes);
  10421. retVal.children = realArray.reduce(function(res, child) {
  10422. return reduceShadowDOM(res, child, retVal);
  10423. }, []);
  10424. return [ retVal ];
  10425. } else {
  10426. if (nodeName2 === 'content' && typeof node.getDistributedNodes === 'function') {
  10427. realArray = Array.from(node.getDistributedNodes());
  10428. return realArray.reduce(function(res, child) {
  10429. return reduceShadowDOM(res, child, parent);
  10430. }, []);
  10431. } else if (nodeName2 === 'slot' && typeof node.assignedNodes === 'function') {
  10432. realArray = Array.from(node.assignedNodes());
  10433. if (!realArray.length) {
  10434. realArray = getSlotChildren(node);
  10435. }
  10436. var styl = window.getComputedStyle(node);
  10437. if (false) {
  10438. retVal = new virtual_node_default(node, parent, shadowId);
  10439. retVal.children = realArray.reduce(function(res, child) {
  10440. return reduceShadowDOM(res, child, retVal);
  10441. }, []);
  10442. return [ retVal ];
  10443. } else {
  10444. return realArray.reduce(function(res, child) {
  10445. return reduceShadowDOM(res, child, parent);
  10446. }, []);
  10447. }
  10448. } else {
  10449. if (node.nodeType === 1) {
  10450. retVal = new virtual_node_default(node, parent, shadowId);
  10451. realArray = Array.from(node.childNodes);
  10452. retVal.children = realArray.reduce(function(res, child) {
  10453. return reduceShadowDOM(res, child, retVal);
  10454. }, []);
  10455. return [ retVal ];
  10456. } else if (node.nodeType === 3) {
  10457. return [ new virtual_node_default(node, parent) ];
  10458. }
  10459. return void 0;
  10460. }
  10461. }
  10462. }
  10463. function getFlattenedTree() {
  10464. var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.documentElement;
  10465. var shadowId = arguments.length > 1 ? arguments[1] : undefined;
  10466. cache_default.set('nodeMap', new WeakMap());
  10467. return flattenTree(node, shadowId, null);
  10468. }
  10469. var get_flattened_tree_default = getFlattenedTree;
  10470. function getBaseLang(lang) {
  10471. if (!lang) {
  10472. return '';
  10473. }
  10474. return lang.trim().split('-')[0].toLowerCase();
  10475. }
  10476. var get_base_lang_default = getBaseLang;
  10477. function failureSummary(nodeData) {
  10478. var failingChecks = {};
  10479. failingChecks.none = nodeData.none.concat(nodeData.all);
  10480. failingChecks.any = nodeData.any;
  10481. return Object.keys(failingChecks).map(function(key) {
  10482. if (!failingChecks[key].length) {
  10483. return;
  10484. }
  10485. var sum = axe._audit.data.failureSummaries[key];
  10486. if (sum && typeof sum.failureMessage === 'function') {
  10487. return sum.failureMessage(failingChecks[key].map(function(check4) {
  10488. return check4.message || '';
  10489. }));
  10490. }
  10491. }).filter(function(i) {
  10492. return i !== void 0;
  10493. }).join('\n\n');
  10494. }
  10495. var failure_summary_default = failureSummary;
  10496. function getEnvironmentData() {
  10497. var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
  10498. 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;
  10499. var orientation = screen.msOrientation || screen.orientation || screen.mozOrientation || {};
  10500. return {
  10501. testEngine: {
  10502. name: 'axe-core',
  10503. version: axe.version
  10504. },
  10505. testRunner: {
  10506. name: axe._audit.brand
  10507. },
  10508. testEnvironment: {
  10509. userAgent: navigator.userAgent,
  10510. windowWidth: innerWidth,
  10511. windowHeight: innerHeight,
  10512. orientationAngle: orientation.angle,
  10513. orientationType: orientation.type
  10514. },
  10515. timestamp: new Date().toISOString(),
  10516. url: location.href
  10517. };
  10518. }
  10519. var get_environment_data_default = getEnvironmentData;
  10520. function incompleteFallbackMessage() {
  10521. return typeof axe._audit.data.incompleteFallbackMessage === 'function' ? axe._audit.data.incompleteFallbackMessage() : axe._audit.data.incompleteFallbackMessage;
  10522. }
  10523. var incomplete_fallback_msg_default = incompleteFallbackMessage;
  10524. function normalizeRelatedNodes(node, options) {
  10525. [ 'any', 'all', 'none' ].forEach(function(type) {
  10526. if (!Array.isArray(node[type])) {
  10527. return;
  10528. }
  10529. node[type].filter(function(checkRes) {
  10530. return Array.isArray(checkRes.relatedNodes);
  10531. }).forEach(function(checkRes) {
  10532. checkRes.relatedNodes = checkRes.relatedNodes.map(function(relatedNode) {
  10533. var res = {
  10534. html: relatedNode.source
  10535. };
  10536. if (options.elementRef && !relatedNode.fromFrame) {
  10537. res.element = relatedNode.element;
  10538. }
  10539. if (options.selectors !== false || relatedNode.fromFrame) {
  10540. res.target = relatedNode.selector;
  10541. }
  10542. if (options.ancestry) {
  10543. res.ancestry = relatedNode.ancestry;
  10544. }
  10545. if (options.xpath) {
  10546. res.xpath = relatedNode.xpath;
  10547. }
  10548. return res;
  10549. });
  10550. });
  10551. });
  10552. }
  10553. var resultKeys = constants_default.resultGroups;
  10554. function processAggregate(results, options) {
  10555. var resultObject = axe.utils.aggregateResult(results);
  10556. resultKeys.forEach(function(key) {
  10557. if (options.resultTypes && !options.resultTypes.includes(key)) {
  10558. (resultObject[key] || []).forEach(function(ruleResult) {
  10559. if (Array.isArray(ruleResult.nodes) && ruleResult.nodes.length > 0) {
  10560. ruleResult.nodes = [ ruleResult.nodes[0] ];
  10561. }
  10562. });
  10563. }
  10564. resultObject[key] = (resultObject[key] || []).map(function(ruleResult) {
  10565. ruleResult = Object.assign({}, ruleResult);
  10566. if (Array.isArray(ruleResult.nodes) && ruleResult.nodes.length > 0) {
  10567. ruleResult.nodes = ruleResult.nodes.map(function(subResult) {
  10568. if (_typeof(subResult.node) === 'object') {
  10569. subResult.html = subResult.node.source;
  10570. if (options.elementRef && !subResult.node.fromFrame) {
  10571. subResult.element = subResult.node.element;
  10572. }
  10573. if (options.selectors !== false || subResult.node.fromFrame) {
  10574. subResult.target = subResult.node.selector;
  10575. }
  10576. if (options.ancestry) {
  10577. subResult.ancestry = subResult.node.ancestry;
  10578. }
  10579. if (options.xpath) {
  10580. subResult.xpath = subResult.node.xpath;
  10581. }
  10582. }
  10583. delete subResult.result;
  10584. delete subResult.node;
  10585. normalizeRelatedNodes(subResult, options);
  10586. return subResult;
  10587. });
  10588. }
  10589. resultKeys.forEach(function(key2) {
  10590. return delete ruleResult[key2];
  10591. });
  10592. delete ruleResult.pageLevel;
  10593. delete ruleResult.result;
  10594. return ruleResult;
  10595. });
  10596. });
  10597. return resultObject;
  10598. }
  10599. var process_aggregate_default = processAggregate;
  10600. axe._thisWillBeDeletedDoNotUse = axe._thisWillBeDeletedDoNotUse || {};
  10601. axe._thisWillBeDeletedDoNotUse.helpers = {
  10602. failureSummary: failure_summary_default,
  10603. getEnvironmentData: get_environment_data_default,
  10604. incompleteFallbackMessage: incomplete_fallback_msg_default,
  10605. processAggregate: process_aggregate_default
  10606. };
  10607. var dataRegex = /\$\{\s?data\s?\}/g;
  10608. function substitute(str, data2) {
  10609. if (typeof data2 === 'string') {
  10610. return str.replace(dataRegex, data2);
  10611. }
  10612. for (var prop in data2) {
  10613. if (data2.hasOwnProperty(prop)) {
  10614. var regex = new RegExp('\\${\\s?data\\.' + prop + '\\s?}', 'g');
  10615. var replace = typeof data2[prop] === 'undefined' ? '' : String(data2[prop]);
  10616. str = str.replace(regex, replace);
  10617. }
  10618. }
  10619. return str;
  10620. }
  10621. function processMessage(message, data2) {
  10622. if (!message) {
  10623. return;
  10624. }
  10625. if (Array.isArray(data2)) {
  10626. data2.values = data2.join(', ');
  10627. if (typeof message.singular === 'string' && typeof message.plural === 'string') {
  10628. var str2 = data2.length === 1 ? message.singular : message.plural;
  10629. return substitute(str2, data2);
  10630. }
  10631. return substitute(message, data2);
  10632. }
  10633. if (typeof message === 'string') {
  10634. return substitute(message, data2);
  10635. }
  10636. if (typeof data2 === 'string') {
  10637. var _str = message[data2];
  10638. return substitute(_str, data2);
  10639. }
  10640. var str = message['default'] || incomplete_fallback_msg_default();
  10641. if (data2 && data2.messageKey && message[data2.messageKey]) {
  10642. str = message[data2.messageKey];
  10643. }
  10644. return processMessage(str, data2);
  10645. }
  10646. var process_message_default = processMessage;
  10647. function getCheckMessage(checkId, type, data2) {
  10648. var check4 = axe._audit.data.checks[checkId];
  10649. if (!check4) {
  10650. throw new Error('Cannot get message for unknown check: '.concat(checkId, '.'));
  10651. }
  10652. if (!check4.messages[type]) {
  10653. throw new Error('Check "'.concat(checkId, '"" does not have a "').concat(type, '" message.'));
  10654. }
  10655. return process_message_default(check4.messages[type], data2);
  10656. }
  10657. var get_check_message_default = getCheckMessage;
  10658. function getCheckOption(check4, ruleID, options) {
  10659. var ruleCheckOption = ((options.rules && options.rules[ruleID] || {}).checks || {})[check4.id];
  10660. var checkOption = (options.checks || {})[check4.id];
  10661. var enabled = check4.enabled;
  10662. var opts = check4.options;
  10663. if (checkOption) {
  10664. if (checkOption.hasOwnProperty('enabled')) {
  10665. enabled = checkOption.enabled;
  10666. }
  10667. if (checkOption.hasOwnProperty('options')) {
  10668. opts = checkOption.options;
  10669. }
  10670. }
  10671. if (ruleCheckOption) {
  10672. if (ruleCheckOption.hasOwnProperty('enabled')) {
  10673. enabled = ruleCheckOption.enabled;
  10674. }
  10675. if (ruleCheckOption.hasOwnProperty('options')) {
  10676. opts = ruleCheckOption.options;
  10677. }
  10678. }
  10679. return {
  10680. enabled: enabled,
  10681. options: opts,
  10682. absolutePaths: options.absolutePaths
  10683. };
  10684. }
  10685. var get_check_option_default = getCheckOption;
  10686. function getNodeFromTree(vNode, node) {
  10687. var el = node || vNode;
  10688. return cache_default.get('nodeMap') ? cache_default.get('nodeMap').get(el) : null;
  10689. }
  10690. var get_node_from_tree_default = getNodeFromTree;
  10691. function getRule(ruleId) {
  10692. var rule3 = axe._audit.rules.find(function(rule4) {
  10693. return rule4.id === ruleId;
  10694. });
  10695. if (!rule3) {
  10696. throw new Error('Cannot find rule by id: '.concat(ruleId));
  10697. }
  10698. return rule3;
  10699. }
  10700. var get_rule_default = getRule;
  10701. function getScroll(elm) {
  10702. var buffer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  10703. var overflowX = elm.scrollWidth > elm.clientWidth + buffer;
  10704. var overflowY = elm.scrollHeight > elm.clientHeight + buffer;
  10705. if (!(overflowX || overflowY)) {
  10706. return;
  10707. }
  10708. var style = window.getComputedStyle(elm);
  10709. var overflowXStyle = style.getPropertyValue('overflow-x');
  10710. var overflowYStyle = style.getPropertyValue('overflow-y');
  10711. var scrollableX = overflowXStyle !== 'visible' && overflowXStyle !== 'hidden';
  10712. var scrollableY = overflowYStyle !== 'visible' && overflowYStyle !== 'hidden';
  10713. if (overflowX && scrollableX || overflowY && scrollableY) {
  10714. return {
  10715. elm: elm,
  10716. top: elm.scrollTop,
  10717. left: elm.scrollLeft
  10718. };
  10719. }
  10720. }
  10721. var get_scroll_default = getScroll;
  10722. function getElmScrollRecursive(root) {
  10723. return Array.from(root.children || root.childNodes || []).reduce(function(scrolls, elm) {
  10724. var scroll = get_scroll_default(elm);
  10725. if (scroll) {
  10726. scrolls.push(scroll);
  10727. }
  10728. return scrolls.concat(getElmScrollRecursive(elm));
  10729. }, []);
  10730. }
  10731. function getScrollState() {
  10732. var win = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
  10733. var root = win.document.documentElement;
  10734. var windowScroll = [ win.pageXOffset !== void 0 ? {
  10735. elm: win,
  10736. top: win.pageYOffset,
  10737. left: win.pageXOffset
  10738. } : {
  10739. elm: root,
  10740. top: root.scrollTop,
  10741. left: root.scrollLeft
  10742. } ];
  10743. return windowScroll.concat(getElmScrollRecursive(document.body));
  10744. }
  10745. var get_scroll_state_default = getScrollState;
  10746. function _getStandards() {
  10747. return clone_default(standards_default);
  10748. }
  10749. function getStyleSheetFactory(dynamicDoc) {
  10750. if (!dynamicDoc) {
  10751. throw new Error('axe.utils.getStyleSheetFactory should be invoked with an argument');
  10752. }
  10753. return function(options) {
  10754. var data2 = 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;
  10755. var style = dynamicDoc.createElement('style');
  10756. if (isLink) {
  10757. var text32 = dynamicDoc.createTextNode('@import "'.concat(data2.href, '"'));
  10758. style.appendChild(text32);
  10759. } else {
  10760. style.appendChild(dynamicDoc.createTextNode(data2));
  10761. }
  10762. dynamicDoc.head.appendChild(style);
  10763. return {
  10764. sheet: style.sheet,
  10765. isCrossOrigin: isCrossOrigin,
  10766. shadowId: shadowId,
  10767. root: root,
  10768. priority: priority
  10769. };
  10770. };
  10771. }
  10772. var get_stylesheet_factory_default = getStyleSheetFactory;
  10773. var styleSheet;
  10774. function injectStyle(style) {
  10775. if (styleSheet && styleSheet.parentNode) {
  10776. if (styleSheet.styleSheet === void 0) {
  10777. styleSheet.appendChild(document.createTextNode(style));
  10778. } else {
  10779. styleSheet.styleSheet.cssText += style;
  10780. }
  10781. return styleSheet;
  10782. }
  10783. if (!style) {
  10784. return;
  10785. }
  10786. var head = document.head || document.getElementsByTagName('head')[0];
  10787. styleSheet = document.createElement('style');
  10788. styleSheet.type = 'text/css';
  10789. if (styleSheet.styleSheet === void 0) {
  10790. styleSheet.appendChild(document.createTextNode(style));
  10791. } else {
  10792. styleSheet.styleSheet.cssText = style;
  10793. }
  10794. head.appendChild(styleSheet);
  10795. return styleSheet;
  10796. }
  10797. var inject_style_default = injectStyle;
  10798. function isHidden(el, recursed) {
  10799. var node = get_node_from_tree_default(el);
  10800. if (el.nodeType === 9) {
  10801. return false;
  10802. }
  10803. if (el.nodeType === 11) {
  10804. el = el.host;
  10805. }
  10806. if (node && node._isHidden !== null) {
  10807. return node._isHidden;
  10808. }
  10809. var style = window.getComputedStyle(el, null);
  10810. if (!style || !el.parentNode || style.getPropertyValue('display') === 'none' || !recursed && style.getPropertyValue('visibility') === 'hidden' || el.getAttribute('aria-hidden') === 'true') {
  10811. return true;
  10812. }
  10813. var parent = el.assignedSlot ? el.assignedSlot : el.parentNode;
  10814. var hidden = isHidden(parent, true);
  10815. if (node) {
  10816. node._isHidden = hidden;
  10817. }
  10818. return hidden;
  10819. }
  10820. var is_hidden_default = isHidden;
  10821. 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' ];
  10822. function isHtmlElement(node) {
  10823. if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
  10824. return false;
  10825. }
  10826. return htmlTags.includes(node.nodeName.toLowerCase());
  10827. }
  10828. var is_html_element_default = isHtmlElement;
  10829. function getDeepest(collection) {
  10830. return collection.sort(function(a, b) {
  10831. if (contains_default(a, b)) {
  10832. return 1;
  10833. }
  10834. return -1;
  10835. })[0];
  10836. }
  10837. function isNodeInContext(node, context3) {
  10838. var include = context3.include && getDeepest(context3.include.filter(function(candidate) {
  10839. return contains_default(candidate, node);
  10840. }));
  10841. var exclude = context3.exclude && getDeepest(context3.exclude.filter(function(candidate) {
  10842. return contains_default(candidate, node);
  10843. }));
  10844. if (!exclude && include || exclude && contains_default(exclude, include)) {
  10845. return true;
  10846. }
  10847. return false;
  10848. }
  10849. var is_node_in_context_default = isNodeInContext;
  10850. var memoizee = __toModule(require_memoizee());
  10851. axe._memoizedFns = [];
  10852. function memoizeImplementation(fn) {
  10853. var memoized = memoizee['default'](fn);
  10854. axe._memoizedFns.push(memoized);
  10855. return memoized;
  10856. }
  10857. var memoize_default = memoizeImplementation;
  10858. function parseSameOriginStylesheet(sheet, options, priority, importedUrls) {
  10859. var isCrossOrigin = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  10860. var rules = Array.from(sheet.cssRules);
  10861. if (!rules) {
  10862. return Promise.resolve();
  10863. }
  10864. var cssImportRules = rules.filter(function(r) {
  10865. return r.type === 3;
  10866. });
  10867. if (!cssImportRules.length) {
  10868. return Promise.resolve({
  10869. isCrossOrigin: isCrossOrigin,
  10870. priority: priority,
  10871. root: options.rootNode,
  10872. shadowId: options.shadowId,
  10873. sheet: sheet
  10874. });
  10875. }
  10876. var cssImportUrlsNotAlreadyImported = cssImportRules.filter(function(rule3) {
  10877. return rule3.href;
  10878. }).map(function(rule3) {
  10879. return rule3.href;
  10880. }).filter(function(url) {
  10881. return !importedUrls.includes(url);
  10882. });
  10883. var promises = cssImportUrlsNotAlreadyImported.map(function(importUrl, cssRuleIndex) {
  10884. var newPriority = [].concat(_toConsumableArray(priority), [ cssRuleIndex ]);
  10885. var isCrossOriginRequest = /^https?:\/\/|^\/\//i.test(importUrl);
  10886. return parse_crossorigin_stylesheet_default(importUrl, options, newPriority, importedUrls, isCrossOriginRequest);
  10887. });
  10888. var nonImportCSSRules = rules.filter(function(r) {
  10889. return r.type !== 3;
  10890. });
  10891. if (!nonImportCSSRules.length) {
  10892. return Promise.all(promises);
  10893. }
  10894. promises.push(Promise.resolve(options.convertDataToStylesheet({
  10895. data: nonImportCSSRules.map(function(rule3) {
  10896. return rule3.cssText;
  10897. }).join(),
  10898. isCrossOrigin: isCrossOrigin,
  10899. priority: priority,
  10900. root: options.rootNode,
  10901. shadowId: options.shadowId
  10902. })));
  10903. return Promise.all(promises);
  10904. }
  10905. var parse_sameorigin_stylesheet_default = parseSameOriginStylesheet;
  10906. function parseStylesheet(sheet, options, priority, importedUrls) {
  10907. var isCrossOrigin = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  10908. var isSameOrigin = isSameOriginStylesheet(sheet);
  10909. if (isSameOrigin) {
  10910. return parse_sameorigin_stylesheet_default(sheet, options, priority, importedUrls, isCrossOrigin);
  10911. }
  10912. return parse_crossorigin_stylesheet_default(sheet.href, options, priority, importedUrls, true);
  10913. }
  10914. function isSameOriginStylesheet(sheet) {
  10915. try {
  10916. var rules = sheet.cssRules;
  10917. if (!rules && sheet.href) {
  10918. return false;
  10919. }
  10920. return true;
  10921. } catch (e) {
  10922. return false;
  10923. }
  10924. }
  10925. var parse_stylesheet_default = parseStylesheet;
  10926. function parseCrossOriginStylesheet(url, options, priority, importedUrls, isCrossOrigin) {
  10927. importedUrls.push(url);
  10928. return new Promise(function(resolve, reject) {
  10929. var request = new XMLHttpRequest();
  10930. request.open('GET', url);
  10931. request.timeout = constants_default.preload.timeout;
  10932. request.addEventListener('error', reject);
  10933. request.addEventListener('timeout', reject);
  10934. request.addEventListener('loadend', function(event) {
  10935. if (event.loaded && request.responseText) {
  10936. return resolve(request.responseText);
  10937. }
  10938. reject(request.responseText);
  10939. });
  10940. request.send();
  10941. }).then(function(data2) {
  10942. var result = options.convertDataToStylesheet({
  10943. data: data2,
  10944. isCrossOrigin: isCrossOrigin,
  10945. priority: priority,
  10946. root: options.rootNode,
  10947. shadowId: options.shadowId
  10948. });
  10949. return parse_stylesheet_default(result.sheet, options, priority, importedUrls, result.isCrossOrigin);
  10950. });
  10951. }
  10952. var parse_crossorigin_stylesheet_default = parseCrossOriginStylesheet;
  10953. var performanceTimer = function() {
  10954. function now() {
  10955. if (window.performance && window.performance) {
  10956. return window.performance.now();
  10957. }
  10958. }
  10959. var originalTime = null;
  10960. var lastRecordedTime = now();
  10961. return {
  10962. start: function start() {
  10963. this.mark('mark_axe_start');
  10964. },
  10965. end: function end() {
  10966. this.mark('mark_axe_end');
  10967. this.measure('axe', 'mark_axe_start', 'mark_axe_end');
  10968. this.logMeasures('axe');
  10969. },
  10970. auditStart: function auditStart() {
  10971. this.mark('mark_audit_start');
  10972. },
  10973. auditEnd: function auditEnd() {
  10974. this.mark('mark_audit_end');
  10975. this.measure('audit_start_to_end', 'mark_audit_start', 'mark_audit_end');
  10976. this.logMeasures();
  10977. },
  10978. mark: function mark(markName) {
  10979. if (window.performance && window.performance.mark !== void 0) {
  10980. window.performance.mark(markName);
  10981. }
  10982. },
  10983. measure: function measure(measureName, startMark, endMark) {
  10984. if (window.performance && window.performance.measure !== void 0) {
  10985. window.performance.measure(measureName, startMark, endMark);
  10986. }
  10987. },
  10988. logMeasures: function logMeasures(measureName) {
  10989. function logMeasure(req2) {
  10990. log_default('Measure ' + req2.name + ' took ' + req2.duration + 'ms');
  10991. }
  10992. if (window.performance && window.performance.getEntriesByType !== void 0) {
  10993. var axeStart = window.performance.getEntriesByName('mark_axe_start')[0];
  10994. var measures = window.performance.getEntriesByType('measure').filter(function(measure) {
  10995. return measure.startTime >= axeStart.startTime;
  10996. });
  10997. for (var i = 0; i < measures.length; ++i) {
  10998. var req = measures[i];
  10999. if (req.name === measureName) {
  11000. logMeasure(req);
  11001. return;
  11002. }
  11003. logMeasure(req);
  11004. }
  11005. }
  11006. },
  11007. timeElapsed: function timeElapsed() {
  11008. return now() - lastRecordedTime;
  11009. },
  11010. reset: function reset() {
  11011. if (!originalTime) {
  11012. originalTime = now();
  11013. }
  11014. lastRecordedTime = now();
  11015. }
  11016. };
  11017. }();
  11018. var performance_timer_default = performanceTimer;
  11019. if (typeof Object.assign !== 'function') {
  11020. (function() {
  11021. Object.assign = function(target) {
  11022. if (target === void 0 || target === null) {
  11023. throw new TypeError('Cannot convert undefined or null to object');
  11024. }
  11025. var output = Object(target);
  11026. for (var index = 1; index < arguments.length; index++) {
  11027. var source = arguments[index];
  11028. if (source !== void 0 && source !== null) {
  11029. for (var nextKey in source) {
  11030. if (source.hasOwnProperty(nextKey)) {
  11031. output[nextKey] = source[nextKey];
  11032. }
  11033. }
  11034. }
  11035. }
  11036. return output;
  11037. };
  11038. })();
  11039. }
  11040. if (!Array.prototype.find) {
  11041. Object.defineProperty(Array.prototype, 'find', {
  11042. value: function value(predicate) {
  11043. if (this === null) {
  11044. throw new TypeError('Array.prototype.find called on null or undefined');
  11045. }
  11046. if (typeof predicate !== 'function') {
  11047. throw new TypeError('predicate must be a function');
  11048. }
  11049. var list = Object(this);
  11050. var length = list.length >>> 0;
  11051. var thisArg = arguments[1];
  11052. var value;
  11053. for (var i = 0; i < length; i++) {
  11054. value = list[i];
  11055. if (predicate.call(thisArg, value, i, list)) {
  11056. return value;
  11057. }
  11058. }
  11059. return void 0;
  11060. }
  11061. });
  11062. }
  11063. if (!Array.prototype.findIndex) {
  11064. Object.defineProperty(Array.prototype, 'findIndex', {
  11065. value: function value(predicate, thisArg) {
  11066. if (this === null) {
  11067. throw new TypeError('Array.prototype.find called on null or undefined');
  11068. }
  11069. if (typeof predicate !== 'function') {
  11070. throw new TypeError('predicate must be a function');
  11071. }
  11072. var list = Object(this);
  11073. var length = list.length >>> 0;
  11074. var value;
  11075. for (var i = 0; i < length; i++) {
  11076. value = list[i];
  11077. if (predicate.call(thisArg, value, i, list)) {
  11078. return i;
  11079. }
  11080. }
  11081. return -1;
  11082. }
  11083. });
  11084. }
  11085. function _pollyfillElementsFromPoint() {
  11086. if (document.elementsFromPoint) {
  11087. return document.elementsFromPoint;
  11088. }
  11089. if (document.msElementsFromPoint) {
  11090. return document.msElementsFromPoint;
  11091. }
  11092. var usePointer = function() {
  11093. var element = document.createElement('x');
  11094. element.style.cssText = 'pointer-events:auto';
  11095. return element.style.pointerEvents === 'auto';
  11096. }();
  11097. var cssProp = usePointer ? 'pointer-events' : 'visibility';
  11098. var cssDisableVal = usePointer ? 'none' : 'hidden';
  11099. var style = document.createElement('style');
  11100. style.innerHTML = usePointer ? '* { pointer-events: all }' : '* { visibility: visible }';
  11101. return function(x, y) {
  11102. var current, i, d;
  11103. var elements = [];
  11104. var previousPointerEvents = [];
  11105. document.head.appendChild(style);
  11106. while ((current = document.elementFromPoint(x, y)) && elements.indexOf(current) === -1) {
  11107. elements.push(current);
  11108. previousPointerEvents.push({
  11109. value: current.style.getPropertyValue(cssProp),
  11110. priority: current.style.getPropertyPriority(cssProp)
  11111. });
  11112. current.style.setProperty(cssProp, cssDisableVal, 'important');
  11113. }
  11114. if (elements.indexOf(document.documentElement) < elements.length - 1) {
  11115. elements.splice(elements.indexOf(document.documentElement), 1);
  11116. elements.push(document.documentElement);
  11117. }
  11118. for (i = previousPointerEvents.length; !!(d = previousPointerEvents[--i]); ) {
  11119. elements[i].style.setProperty(cssProp, d.value ? d.value : '', d.priority);
  11120. }
  11121. document.head.removeChild(style);
  11122. return elements;
  11123. };
  11124. }
  11125. if (typeof window.addEventListener === 'function') {
  11126. document.elementsFromPoint = _pollyfillElementsFromPoint();
  11127. }
  11128. if (!Array.prototype.includes) {
  11129. Object.defineProperty(Array.prototype, 'includes', {
  11130. value: function value(searchElement) {
  11131. var O = Object(this);
  11132. var len = parseInt(O.length, 10) || 0;
  11133. if (len === 0) {
  11134. return false;
  11135. }
  11136. var n = parseInt(arguments[1], 10) || 0;
  11137. var k;
  11138. if (n >= 0) {
  11139. k = n;
  11140. } else {
  11141. k = len + n;
  11142. if (k < 0) {
  11143. k = 0;
  11144. }
  11145. }
  11146. var currentElement;
  11147. while (k < len) {
  11148. currentElement = O[k];
  11149. if (searchElement === currentElement || searchElement !== searchElement && currentElement !== currentElement) {
  11150. return true;
  11151. }
  11152. k++;
  11153. }
  11154. return false;
  11155. }
  11156. });
  11157. }
  11158. if (!Array.prototype.some) {
  11159. Object.defineProperty(Array.prototype, 'some', {
  11160. value: function value(fun) {
  11161. if (this == null) {
  11162. throw new TypeError('Array.prototype.some called on null or undefined');
  11163. }
  11164. if (typeof fun !== 'function') {
  11165. throw new TypeError();
  11166. }
  11167. var t = Object(this);
  11168. var len = t.length >>> 0;
  11169. var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
  11170. for (var i = 0; i < len; i++) {
  11171. if (i in t && fun.call(thisArg, t[i], i, t)) {
  11172. return true;
  11173. }
  11174. }
  11175. return false;
  11176. }
  11177. });
  11178. }
  11179. if (!Array.from) {
  11180. Object.defineProperty(Array, 'from', {
  11181. value: function() {
  11182. var toStr = Object.prototype.toString;
  11183. var isCallable = function isCallable(fn) {
  11184. return typeof fn === 'function' || toStr.call(fn) === '[object Function]';
  11185. };
  11186. var toInteger = function toInteger(value) {
  11187. var number = Number(value);
  11188. if (isNaN(number)) {
  11189. return 0;
  11190. }
  11191. if (number === 0 || !isFinite(number)) {
  11192. return number;
  11193. }
  11194. return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
  11195. };
  11196. var maxSafeInteger = Math.pow(2, 53) - 1;
  11197. var toLength = function toLength(value) {
  11198. var len = toInteger(value);
  11199. return Math.min(Math.max(len, 0), maxSafeInteger);
  11200. };
  11201. return function from(arrayLike) {
  11202. var C = this;
  11203. var items = Object(arrayLike);
  11204. if (arrayLike == null) {
  11205. throw new TypeError('Array.from requires an array-like object - not null or undefined');
  11206. }
  11207. var mapFn = arguments.length > 1 ? arguments[1] : void 0;
  11208. var T;
  11209. if (typeof mapFn !== 'undefined') {
  11210. if (!isCallable(mapFn)) {
  11211. throw new TypeError('Array.from: when provided, the second argument must be a function');
  11212. }
  11213. if (arguments.length > 2) {
  11214. T = arguments[2];
  11215. }
  11216. }
  11217. var len = toLength(items.length);
  11218. var A = isCallable(C) ? Object(new C(len)) : new Array(len);
  11219. var k = 0;
  11220. var kValue;
  11221. while (k < len) {
  11222. kValue = items[k];
  11223. if (mapFn) {
  11224. A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);
  11225. } else {
  11226. A[k] = kValue;
  11227. }
  11228. k += 1;
  11229. }
  11230. A.length = len;
  11231. return A;
  11232. };
  11233. }()
  11234. });
  11235. }
  11236. if (!String.prototype.includes) {
  11237. String.prototype.includes = function(search, start) {
  11238. if (typeof start !== 'number') {
  11239. start = 0;
  11240. }
  11241. if (start + search.length > this.length) {
  11242. return false;
  11243. } else {
  11244. return this.indexOf(search, start) !== -1;
  11245. }
  11246. };
  11247. }
  11248. function uniqueArray(arr1, arr2) {
  11249. return arr1.concat(arr2).filter(function(elem, pos, arr) {
  11250. return arr.indexOf(elem) === pos;
  11251. });
  11252. }
  11253. var unique_array_default = uniqueArray;
  11254. function createLocalVariables(vNodes, anyLevel, thisLevel, parentShadowId) {
  11255. var retVal = {
  11256. vNodes: vNodes.slice(),
  11257. anyLevel: anyLevel,
  11258. thisLevel: thisLevel,
  11259. parentShadowId: parentShadowId
  11260. };
  11261. retVal.vNodes.reverse();
  11262. return retVal;
  11263. }
  11264. function matchExpressions(domTree, expressions, filter) {
  11265. var stack = [];
  11266. var vNodes = Array.isArray(domTree) ? domTree : [ domTree ];
  11267. var currentLevel = createLocalVariables(vNodes, expressions, [], domTree[0].shadowId);
  11268. var result = [];
  11269. while (currentLevel.vNodes.length) {
  11270. var vNode = currentLevel.vNodes.pop();
  11271. var childOnly = [];
  11272. var childAny = [];
  11273. var combined = currentLevel.anyLevel.slice().concat(currentLevel.thisLevel);
  11274. var added = false;
  11275. for (var _i7 = 0; _i7 < combined.length; _i7++) {
  11276. var exp = combined[_i7];
  11277. if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && _matchesExpression(vNode, exp[0])) {
  11278. if (exp.length === 1) {
  11279. if (!added && (!filter || filter(vNode))) {
  11280. result.push(vNode);
  11281. added = true;
  11282. }
  11283. } else {
  11284. var rest = exp.slice(1);
  11285. if ([ ' ', '>' ].includes(rest[0].combinator) === false) {
  11286. throw new Error('axe.utils.querySelectorAll does not support the combinator: ' + exp[1].combinator);
  11287. }
  11288. if (rest[0].combinator === '>') {
  11289. childOnly.push(rest);
  11290. } else {
  11291. childAny.push(rest);
  11292. }
  11293. }
  11294. }
  11295. if ((!exp[0].id || vNode.shadowId === currentLevel.parentShadowId) && currentLevel.anyLevel.includes(exp)) {
  11296. childAny.push(exp);
  11297. }
  11298. }
  11299. if (vNode.children && vNode.children.length) {
  11300. stack.push(currentLevel);
  11301. currentLevel = createLocalVariables(vNode.children, childAny, childOnly, vNode.shadowId);
  11302. }
  11303. while (!currentLevel.vNodes.length && stack.length) {
  11304. currentLevel = stack.pop();
  11305. }
  11306. }
  11307. return result;
  11308. }
  11309. function querySelectorAllFilter(domTree, selector, filter) {
  11310. domTree = Array.isArray(domTree) ? domTree : [ domTree ];
  11311. var expressions = _convertSelector(selector);
  11312. return matchExpressions(domTree, expressions, filter);
  11313. }
  11314. var query_selector_all_filter_default = querySelectorAllFilter;
  11315. function preloadCssom(_ref15) {
  11316. var _ref15$treeRoot = _ref15.treeRoot, treeRoot = _ref15$treeRoot === void 0 ? axe._tree[0] : _ref15$treeRoot;
  11317. var rootNodes = getAllRootNodesInTree(treeRoot);
  11318. if (!rootNodes.length) {
  11319. return Promise.resolve();
  11320. }
  11321. var dynamicDoc = document.implementation.createHTMLDocument('Dynamic document for loading cssom');
  11322. var convertDataToStylesheet = get_stylesheet_factory_default(dynamicDoc);
  11323. return getCssomForAllRootNodes(rootNodes, convertDataToStylesheet).then(function(assets) {
  11324. return flattenAssets(assets);
  11325. });
  11326. }
  11327. var preload_cssom_default = preloadCssom;
  11328. function getAllRootNodesInTree(tree) {
  11329. var ids = [];
  11330. var rootNodes = query_selector_all_filter_default(tree, '*', function(node) {
  11331. if (ids.includes(node.shadowId)) {
  11332. return false;
  11333. }
  11334. ids.push(node.shadowId);
  11335. return true;
  11336. }).map(function(node) {
  11337. return {
  11338. shadowId: node.shadowId,
  11339. rootNode: get_root_node_default(node.actualNode)
  11340. };
  11341. });
  11342. return unique_array_default(rootNodes, []);
  11343. }
  11344. function getCssomForAllRootNodes(rootNodes, convertDataToStylesheet) {
  11345. var promises = [];
  11346. rootNodes.forEach(function(_ref16, index) {
  11347. var rootNode = _ref16.rootNode, shadowId = _ref16.shadowId;
  11348. var sheets = getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet);
  11349. if (!sheets) {
  11350. return Promise.all(promises);
  11351. }
  11352. var rootIndex = index + 1;
  11353. var parseOptions = {
  11354. rootNode: rootNode,
  11355. shadowId: shadowId,
  11356. convertDataToStylesheet: convertDataToStylesheet,
  11357. rootIndex: rootIndex
  11358. };
  11359. var importedUrls = [];
  11360. var p = Promise.all(sheets.map(function(sheet, sheetIndex) {
  11361. var priority = [ rootIndex, sheetIndex ];
  11362. return parse_stylesheet_default(sheet, parseOptions, priority, importedUrls);
  11363. }));
  11364. promises.push(p);
  11365. });
  11366. return Promise.all(promises);
  11367. }
  11368. function flattenAssets(assets) {
  11369. return assets.reduce(function(acc, val) {
  11370. return Array.isArray(val) ? acc.concat(flattenAssets(val)) : acc.concat(val);
  11371. }, []);
  11372. }
  11373. function getStylesheetsOfRootNode(rootNode, shadowId, convertDataToStylesheet) {
  11374. var sheets;
  11375. if (rootNode.nodeType === 11 && shadowId) {
  11376. sheets = getStylesheetsFromDocumentFragment(rootNode, convertDataToStylesheet);
  11377. } else {
  11378. sheets = getStylesheetsFromDocument(rootNode);
  11379. }
  11380. return filterStylesheetsWithSameHref(sheets);
  11381. }
  11382. function getStylesheetsFromDocumentFragment(rootNode, convertDataToStylesheet) {
  11383. return Array.from(rootNode.children).filter(filerStyleAndLinkAttributesInDocumentFragment).reduce(function(out, node) {
  11384. var nodeName2 = node.nodeName.toUpperCase();
  11385. var data2 = nodeName2 === 'STYLE' ? node.textContent : node;
  11386. var isLink = nodeName2 === 'LINK';
  11387. var stylesheet = convertDataToStylesheet({
  11388. data: data2,
  11389. isLink: isLink,
  11390. root: rootNode
  11391. });
  11392. out.push(stylesheet.sheet);
  11393. return out;
  11394. }, []);
  11395. }
  11396. function getStylesheetsFromDocument(rootNode) {
  11397. return Array.from(rootNode.styleSheets).filter(function(sheet) {
  11398. return filterMediaIsPrint(sheet.media.mediaText);
  11399. });
  11400. }
  11401. function filerStyleAndLinkAttributesInDocumentFragment(node) {
  11402. var nodeName2 = node.nodeName.toUpperCase();
  11403. var linkHref = node.getAttribute('href');
  11404. var linkRel = node.getAttribute('rel');
  11405. var isLink = nodeName2 === 'LINK' && linkHref && linkRel && node.rel.toUpperCase().includes('STYLESHEET');
  11406. var isStyle = nodeName2 === 'STYLE';
  11407. return isStyle || isLink && filterMediaIsPrint(node.media);
  11408. }
  11409. function filterMediaIsPrint(media) {
  11410. if (!media) {
  11411. return true;
  11412. }
  11413. return !media.toUpperCase().includes('PRINT');
  11414. }
  11415. function filterStylesheetsWithSameHref(sheets) {
  11416. var hrefs = [];
  11417. return sheets.filter(function(sheet) {
  11418. if (!sheet.href) {
  11419. return true;
  11420. }
  11421. if (hrefs.includes(sheet.href)) {
  11422. return false;
  11423. }
  11424. hrefs.push(sheet.href);
  11425. return true;
  11426. });
  11427. }
  11428. function preloadMedia(_ref17) {
  11429. var _ref17$treeRoot = _ref17.treeRoot, treeRoot = _ref17$treeRoot === void 0 ? axe._tree[0] : _ref17$treeRoot;
  11430. var mediaVirtualNodes = query_selector_all_filter_default(treeRoot, 'video, audio', function(_ref18) {
  11431. var actualNode = _ref18.actualNode;
  11432. if (actualNode.hasAttribute('src')) {
  11433. return !!actualNode.getAttribute('src');
  11434. }
  11435. var sourceWithSrc = Array.from(actualNode.getElementsByTagName('source')).filter(function(source) {
  11436. return !!source.getAttribute('src');
  11437. });
  11438. if (sourceWithSrc.length <= 0) {
  11439. return false;
  11440. }
  11441. return true;
  11442. });
  11443. return Promise.all(mediaVirtualNodes.map(function(_ref19) {
  11444. var actualNode = _ref19.actualNode;
  11445. return isMediaElementReady(actualNode);
  11446. }));
  11447. }
  11448. var preload_media_default = preloadMedia;
  11449. function isMediaElementReady(elm) {
  11450. return new Promise(function(resolve) {
  11451. if (elm.readyState > 0) {
  11452. resolve(elm);
  11453. }
  11454. function onMediaReady() {
  11455. elm.removeEventListener('loadedmetadata', onMediaReady);
  11456. resolve(elm);
  11457. }
  11458. elm.addEventListener('loadedmetadata', onMediaReady);
  11459. });
  11460. }
  11461. function isValidPreloadObject(preload3) {
  11462. return _typeof(preload3) === 'object' && Array.isArray(preload3.assets);
  11463. }
  11464. function _shouldPreload(options) {
  11465. if (!options || options.preload === void 0 || options.preload === null) {
  11466. return true;
  11467. }
  11468. if (typeof options.preload === 'boolean') {
  11469. return options.preload;
  11470. }
  11471. return isValidPreloadObject(options.preload);
  11472. }
  11473. function _getPreloadConfig(options) {
  11474. var _constants_default$pr = constants_default.preload, assets = _constants_default$pr.assets, timeout = _constants_default$pr.timeout;
  11475. var config = {
  11476. assets: assets,
  11477. timeout: timeout
  11478. };
  11479. if (!options.preload) {
  11480. return config;
  11481. }
  11482. if (typeof options.preload === 'boolean') {
  11483. return config;
  11484. }
  11485. var areRequestedAssetsValid = options.preload.assets.every(function(a) {
  11486. return assets.includes(a.toLowerCase());
  11487. });
  11488. if (!areRequestedAssetsValid) {
  11489. throw new Error('Requested assets, not supported. Supported assets are: '.concat(assets.join(', '), '.'));
  11490. }
  11491. config.assets = unique_array_default(options.preload.assets.map(function(a) {
  11492. return a.toLowerCase();
  11493. }), []);
  11494. if (options.preload.timeout && typeof options.preload.timeout === 'number' && !isNaN(options.preload.timeout)) {
  11495. config.timeout = options.preload.timeout;
  11496. }
  11497. return config;
  11498. }
  11499. function preload(options) {
  11500. var preloadFunctionsMap = {
  11501. cssom: preload_cssom_default,
  11502. media: preload_media_default
  11503. };
  11504. if (!_shouldPreload(options)) {
  11505. return Promise.resolve();
  11506. }
  11507. return new Promise(function(resolve, reject) {
  11508. var _getPreloadConfig2 = _getPreloadConfig(options), assets = _getPreloadConfig2.assets, timeout = _getPreloadConfig2.timeout;
  11509. var preloadTimeout = setTimeout(function() {
  11510. return reject(new Error('Preload assets timed out.'));
  11511. }, timeout);
  11512. Promise.all(assets.map(function(asset) {
  11513. return preloadFunctionsMap[asset](options).then(function(results) {
  11514. return _defineProperty({}, asset, results);
  11515. });
  11516. })).then(function(results) {
  11517. var preloadAssets = results.reduce(function(out, result) {
  11518. return _extends({}, out, result);
  11519. }, {});
  11520. clearTimeout(preloadTimeout);
  11521. resolve(preloadAssets);
  11522. })['catch'](function(err2) {
  11523. clearTimeout(preloadTimeout);
  11524. reject(err2);
  11525. });
  11526. });
  11527. }
  11528. var preload_default = preload;
  11529. function getIncompleteReason(checkData, messages) {
  11530. function getDefaultMsg(messages2) {
  11531. if (messages2.incomplete && messages2.incomplete['default']) {
  11532. return messages2.incomplete['default'];
  11533. } else {
  11534. return incomplete_fallback_msg_default();
  11535. }
  11536. }
  11537. if (checkData && checkData.missingData) {
  11538. try {
  11539. var msg = messages.incomplete[checkData.missingData[0].reason];
  11540. if (!msg) {
  11541. throw new Error();
  11542. }
  11543. return msg;
  11544. } catch (e) {
  11545. if (typeof checkData.missingData === 'string') {
  11546. return messages.incomplete[checkData.missingData];
  11547. } else {
  11548. return getDefaultMsg(messages);
  11549. }
  11550. }
  11551. } else if (checkData && checkData.messageKey) {
  11552. return messages.incomplete[checkData.messageKey];
  11553. } else {
  11554. return getDefaultMsg(messages);
  11555. }
  11556. }
  11557. function extender(checksData, shouldBeTrue) {
  11558. return function(check4) {
  11559. var sourceData = checksData[check4.id] || {};
  11560. var messages = sourceData.messages || {};
  11561. var data2 = Object.assign({}, sourceData);
  11562. delete data2.messages;
  11563. if (check4.result === void 0) {
  11564. if (_typeof(messages.incomplete) === 'object' && !Array.isArray(check4.data)) {
  11565. data2.message = getIncompleteReason(check4.data, messages);
  11566. }
  11567. if (!data2.message) {
  11568. data2.message = messages.incomplete;
  11569. }
  11570. } else {
  11571. data2.message = check4.result === shouldBeTrue ? messages.pass : messages.fail;
  11572. }
  11573. if (typeof data2.message !== 'function') {
  11574. data2.message = process_message_default(data2.message, check4.data);
  11575. }
  11576. extend_meta_data_default(check4, data2);
  11577. };
  11578. }
  11579. function publishMetaData(ruleResult) {
  11580. var checksData = axe._audit.data.checks || {};
  11581. var rulesData = axe._audit.data.rules || {};
  11582. var rule3 = find_by_default(axe._audit.rules, 'id', ruleResult.id) || {};
  11583. ruleResult.tags = clone_default(rule3.tags || []);
  11584. var shouldBeTrue = extender(checksData, true);
  11585. var shouldBeFalse = extender(checksData, false);
  11586. ruleResult.nodes.forEach(function(detail) {
  11587. detail.any.forEach(shouldBeTrue);
  11588. detail.all.forEach(shouldBeTrue);
  11589. detail.none.forEach(shouldBeFalse);
  11590. });
  11591. extend_meta_data_default(ruleResult, clone_default(rulesData[ruleResult.id] || {}));
  11592. }
  11593. var publish_metadata_default = publishMetaData;
  11594. function querySelectorAll(domTree, selector) {
  11595. return query_selector_all_filter_default(domTree, selector);
  11596. }
  11597. var query_selector_all_default = querySelectorAll;
  11598. function matchTags(rule3, runOnly) {
  11599. var include, exclude, matching;
  11600. var defaultExclude = axe._audit && axe._audit.tagExclude ? axe._audit.tagExclude : [];
  11601. if (runOnly.hasOwnProperty('include') || runOnly.hasOwnProperty('exclude')) {
  11602. include = runOnly.include || [];
  11603. include = Array.isArray(include) ? include : [ include ];
  11604. exclude = runOnly.exclude || [];
  11605. exclude = Array.isArray(exclude) ? exclude : [ exclude ];
  11606. exclude = exclude.concat(defaultExclude.filter(function(tag) {
  11607. return include.indexOf(tag) === -1;
  11608. }));
  11609. } else {
  11610. include = Array.isArray(runOnly) ? runOnly : [ runOnly ];
  11611. exclude = defaultExclude.filter(function(tag) {
  11612. return include.indexOf(tag) === -1;
  11613. });
  11614. }
  11615. matching = include.some(function(tag) {
  11616. return rule3.tags.indexOf(tag) !== -1;
  11617. });
  11618. if (matching || include.length === 0 && rule3.enabled !== false) {
  11619. return exclude.every(function(tag) {
  11620. return rule3.tags.indexOf(tag) === -1;
  11621. });
  11622. } else {
  11623. return false;
  11624. }
  11625. }
  11626. function ruleShouldRun(rule3, context3, options) {
  11627. var runOnly = options.runOnly || {};
  11628. var ruleOptions = (options.rules || {})[rule3.id];
  11629. if (rule3.pageLevel && !context3.page) {
  11630. return false;
  11631. } else if (runOnly.type === 'rule') {
  11632. return runOnly.values.indexOf(rule3.id) !== -1;
  11633. } else if (ruleOptions && typeof ruleOptions.enabled === 'boolean') {
  11634. return ruleOptions.enabled;
  11635. } else if (runOnly.type === 'tag' && runOnly.values) {
  11636. return matchTags(rule3, runOnly.values);
  11637. } else {
  11638. return matchTags(rule3, []);
  11639. }
  11640. }
  11641. var rule_should_run_default = ruleShouldRun;
  11642. function attributeMatches(node, attrName, filterAttrs) {
  11643. if (typeof filterAttrs[attrName] === 'undefined') {
  11644. return false;
  11645. }
  11646. if (filterAttrs[attrName] === true) {
  11647. return true;
  11648. }
  11649. return element_matches_default(node, filterAttrs[attrName]);
  11650. }
  11651. function filterHtmlAttrs(element, filterAttrs) {
  11652. if (!filterAttrs) {
  11653. return element;
  11654. }
  11655. var node = element.cloneNode(false);
  11656. var outerHTML = node.outerHTML;
  11657. var attributes4 = get_node_attributes_default(node);
  11658. if (cache_default.get(outerHTML)) {
  11659. node = cache_default.get(outerHTML);
  11660. } else if (attributes4) {
  11661. node = document.createElement(node.nodeName);
  11662. Array.from(attributes4).forEach(function(attr) {
  11663. if (!attributeMatches(element, attr.name, filterAttrs)) {
  11664. node.setAttribute(attr.name, attr.value);
  11665. }
  11666. });
  11667. cache_default.set(outerHTML, node);
  11668. }
  11669. Array.from(element.childNodes).forEach(function(child) {
  11670. node.appendChild(filterHtmlAttrs(child, filterAttrs));
  11671. });
  11672. return node;
  11673. }
  11674. var filter_html_attrs_default = filterHtmlAttrs;
  11675. function pushNode(result, nodes) {
  11676. var temp;
  11677. if (result.length === 0) {
  11678. return nodes;
  11679. }
  11680. if (result.length < nodes.length) {
  11681. temp = result;
  11682. result = nodes;
  11683. nodes = temp;
  11684. }
  11685. for (var _i8 = 0, l = nodes.length; _i8 < l; _i8++) {
  11686. if (!result.includes(nodes[_i8])) {
  11687. result.push(nodes[_i8]);
  11688. }
  11689. }
  11690. return result;
  11691. }
  11692. function reduceIncludes(includes) {
  11693. return includes.reduce(function(res, el) {
  11694. if (!res.length || !contains_default(res[res.length - 1], el)) {
  11695. res.push(el);
  11696. }
  11697. return res;
  11698. }, []);
  11699. }
  11700. function select(selector, context3) {
  11701. var result = [];
  11702. var candidate;
  11703. if (axe._selectCache) {
  11704. for (var j = 0, l = axe._selectCache.length; j < l; j++) {
  11705. var item = axe._selectCache[j];
  11706. if (item.selector === selector) {
  11707. return item.result;
  11708. }
  11709. }
  11710. }
  11711. var curried = function(context4) {
  11712. return function(node) {
  11713. return is_node_in_context_default(node, context4);
  11714. };
  11715. }(context3);
  11716. var reducedIncludes = reduceIncludes(context3.include);
  11717. for (var _i9 = 0; _i9 < reducedIncludes.length; _i9++) {
  11718. candidate = reducedIncludes[_i9];
  11719. result = pushNode(result, query_selector_all_filter_default(candidate, selector, curried));
  11720. }
  11721. if (axe._selectCache) {
  11722. axe._selectCache.push({
  11723. selector: selector,
  11724. result: result
  11725. });
  11726. }
  11727. return result;
  11728. }
  11729. var select_default = select;
  11730. function setScroll(elm, top, left) {
  11731. if (elm === window) {
  11732. return elm.scroll(left, top);
  11733. } else {
  11734. elm.scrollTop = top;
  11735. elm.scrollLeft = left;
  11736. }
  11737. }
  11738. function setScrollState(scrollState) {
  11739. scrollState.forEach(function(_ref21) {
  11740. var elm = _ref21.elm, top = _ref21.top, left = _ref21.left;
  11741. return setScroll(elm, top, left);
  11742. });
  11743. }
  11744. var set_scroll_state_default = setScrollState;
  11745. function tokenList(str) {
  11746. return (str || '').trim().replace(/\s{2,}/g, ' ').split(' ');
  11747. }
  11748. var token_list_default = tokenList;
  11749. function validInputTypes() {
  11750. return [ 'hidden', 'text', 'search', 'tel', 'url', 'email', 'password', 'date', 'month', 'week', 'time', 'datetime-local', 'number', 'range', 'color', 'checkbox', 'radio', 'file', 'submit', 'image', 'reset', 'button' ];
  11751. }
  11752. var valid_input_type_default = validInputTypes;
  11753. var langs = [ , [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, , , , , , 1, 1, 1, 1, , , 1, 1, 1, , 1, , 1, , 1, 1 ], [ 1, 1, 1, , 1, 1, , 1, 1, 1, , 1, , , 1, 1, 1, , , 1, 1, 1, , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , , , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1 ], [ , 1, , , , , , 1, , 1, , , , , 1, , 1, , , , 1, 1, , 1, , , 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, , , 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, 1, , , 1, , , , , 1, 1, 1, , 1, , 1, , 1, , , , , , 1 ], [ 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, , 1, , 1, , , , , 1, , 1, 1, 1, 1, 1, , , , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, , , 1, , 1, , , , 1, 1, 1, , , , , , , , , , , 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1 ], [ 1, 1, 1, 1, 1, , , 1, , , 1, , , 1, 1, 1, , , , , 1, , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1 ], [ , 1, , 1, 1, 1, , 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, , , 1, 1, , , , , , 1, 1 ], [ 1, 1, 1, , , , , 1, , , , 1, 1, , 1, , , , , , 1, , , , , 1 ], [ , 1, , , 1, , , 1, , , , , , 1 ], [ , 1, , 1, , , , 1, , , , 1 ], [ 1, , 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , , 1, , , 1, , 1, 1, , 1, , 1, , , , , 1, , 1 ], [ , 1, , , , 1, , , 1, 1, , 1, , 1, 1, 1, 1, , 1, 1, , , 1, , , 1 ], [ , 1, 1, , , , , , 1, , , , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ , 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, 1, , 1, , , , , 1, 1, , 1, , 1 ], [ , 1, , 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, , , 1, 1, 1 ], [ , 1, 1, 1, , , , 1, 1, 1, , 1, 1, , , 1, 1, , 1, 1, 1, 1, , 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, , 1, 1, 1, , 1, , , , , 1, 1, 1, , , 1, , 1, , , 1, 1 ], [ , , , , 1, , , , , , , , , , , , , , , , , 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, , 1, 1, 1, , 1, 1, , , , 1, 1, 1, 1, 1, , , 1, 1, 1, , , , , 1 ], [ 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , , , , , , 1, , , , , , , 1 ], [ , 1, 1, , 1, 1, , 1, , , , , , , , , , , , , 1 ], , [ 1, 1, 1, , , , , , , , , , , , , 1 ], [ , , , , , , , , 1, , , 1, , , 1, 1, , , , , 1 ] ], [ , [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , , , 1, , , , , , , , , , , , , , , 1 ], [ , 1, , , 1, 1, , 1, , 1, 1, , , , 1, 1, , , 1, 1, , , , 1 ], [ 1, , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , , 1, , , , 1 ], , [ , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, , , 1, 1, 1, 1, , 1, 1, , 1 ], [ , 1, , , 1, , , 1, , 1, , , 1, 1, 1, 1, , , 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, , , 1, , , 1, , 1 ], [ , 1, , , , , , , , , , 1, 1, , , , , , 1, 1, , , , , 1 ], [ , , , , , , , 1, , , , 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, , , 1, 1, , 1, 1, 1, 1, 1 ], [ , 1, , , 1, 1, , 1, , 1, 1, 1, , , 1, 1, , , 1, , 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, , 1, 1, , 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ , , , , , , , , , , , , , , , , 1 ], , [ , 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, , 1, 1, , 1, 1, 1, 1, 1, , 1, , 1 ], [ , , 1, , , 1, , , 1, 1, , , 1, , 1, 1, , 1 ], [ , 1, 1, , 1, , , , 1, 1, , 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ 1, 1 ], [ , 1, , , , , , , , , , 1, 1, , , , , , 1, 1, , 1, , 1, , 1, 1 ], , [ , 1, 1, , 1, , , 1, , 1, , , , 1, 1, 1, , , , , , 1, , , , 1 ], [ 1, 1, , , 1, 1, , 1, , , , , 1, , 1 ] ], [ , [ , 1 ], [ , , , 1, , , , 1, , , , 1, , , , 1, , , 1, , , 1 ], [ , , , , , , , , , , , , , , , , , , 1, 1, , , , , , 1 ], , [ 1, , , , , 1 ], [ , 1, , , , 1, , , , 1 ], [ , 1, , , , , , , , , , , 1, , , 1, , , , , , , , , 1, 1 ], [ , , , , , , , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , 1, , , , 1, , 1 ], [ , 1 ], [ , 1, , 1, , 1, , 1, , 1, , 1, 1, 1, , 1, 1, , 1, , , , , , , 1 ], [ 1, , , , , 1, , , 1, 1, , 1, , 1, , 1, 1, , , , , 1, , , 1 ], [ , 1, 1, , , 1, , 1, , 1, , 1, , 1, 1, 1, 1, , , 1, , 1, , 1, 1, 1 ], [ 1, 1, 1, 1, 1, , 1, , 1, , , , 1, 1, 1, 1, , 1, 1, , , 1, 1, 1, 1 ], [ 1, , , , , , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , 1 ], , [ , 1, , , , , , 1, 1, 1, , 1, , , , 1, , , 1, 1, 1, , , 1 ], [ 1, , , , , 1, , 1, 1, 1, , 1, 1, 1, 1, 1, , 1, , 1, , 1, , , 1, 1 ], [ 1, , 1, 1, , , , , 1, , , , , , 1, 1, , , 1, 1, 1, 1, , , 1, , 1 ], [ 1, , , , , , , , , , , , , , , , , 1 ], [ , , , , , 1, , , 1, , , , , , 1 ], [ , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , , 1 ], [ , 1, , , , , , , , , , , , , , 1 ], [ , 1, , , , 1 ] ], [ , [ 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , 1, 1, , , 1, 1, 1 ], [ , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , 1 ], , [ , , , , , , , , , , , , , , , , , , 1 ], [ 1, , , , , , , , , 1, , , , 1 ], [ , , , , , , , , , , , , , , , , , , 1 ], , [ 1, 1, , , , 1, 1, , , , , , 1, , , , 1, , 1, , 1, 1, , 1 ], [ 1 ], [ , , , , , , , , , , , 1, , , , , , , , , , , 1 ], [ , 1, , , , , , , 1, 1, , , 1, , 1, , , , 1, , , , , , , 1 ], [ , , , , , , , , , , , , , , , , 1, , , , , 1 ], [ , , 1, , , , , 1, , 1 ], [ 1, , , , 1, , , , , 1, , , , 1, 1, , , , 1, 1, , , , , 1 ], [ , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , 1 ], [ 1, , , 1, 1, , , , , , , 1, , 1, , 1, 1, 1, 1, 1, 1 ], [ , , , , , 1, , , , , , , 1, , , , , , , 1 ], , [ , , 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, 1, , , 1, 1, , 1, 1, 1, , , 1 ], [ , , , , , , , , , , , , , , , , , , 1 ], [ , 1, , , , 1 ], , [ 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , , , 1, 1, 1, 1, , , , , , 1, , 1, , , , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , , 1 ], [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, , 1, , , 1, 1, 1, 1, 1 ], [ , , , , , , , , , , , 1, , , , , , , , , 1, , , , 1 ], [ , 1, 1, , 1, 1, , 1, , , , 1, 1, , 1, 1, , , 1, , 1, 1, , 1 ], [ , 1, , 1, , 1, , , 1, , , 1, 1, , 1, 1, , , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, , , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , , , , , , , , , 1, , 1, , 1, 1, , , , 1, , , 1 ], [ , 1, , , 1, 1, , , , , , , , , 1, 1, 1, , , , , 1 ], [ 1, , , 1, 1, , , , 1, 1, 1, 1, 1, , , 1, , , 1, , , 1, , 1, , 1 ], [ , 1, 1, , 1, 1, , 1, 1, , , , 1, 1, 1, , , 1, 1, , , 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, , 1, , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, , , , 1, , , , , , , , , 1 ], [ , 1, , , , , , , , 1, , , , , 1, , , , 1, , , 1 ], [ , 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , , 1, , 1, , , , , 1, 1, 1, 1, 1, , , 1, , , , 1 ], [ , 1, , , , , , , , 1, , , , , , , , , , , , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, , 1, , 1, 1, , , , 1, , 1, 1, 1, 1, 1, , 1, 1, , , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , , 1, 1, , , , 1, , 1, 1, , 1, 1 ], [ , , , , , , , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, , 1, 1, 1, 1, , 1, , , 1, 1, 1, 1, , , 1, , , , , , , 1 ], [ , 1, , , , , , , , 1, , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1 ], [ , 1, 1, , , , , , , , , , , , 1, 1, , , , , , 1 ], [ , 1, , , , , , , 1 ], [ , , , , , , , , , , , , , , 1, , , , , 1, , , , , , 1 ], [ 1, 1, , , 1, , , 1, 1, 1, , , , 1 ], , [ , , , , , , , , , , , , , 1, , , , , , , , , , 1 ], [ , , , , , , , , , 1, , , , , , , , , 1, , , , , , , 1 ], [ 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, , , 1, , 1, , , 1, 1 ], [ , , , , , , , , , 1 ], [ , 1, , , , 1, , , , , , 1, , , 1, , , , , 1 ], [ , 1, 1, , 1, 1, , , , , , , , , , , , , , , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , 1, 1, , 1, 1, 1, 1, , , , 1, 1, , , , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, , 1, 1, , 1, 1 ], [ , , , , , , , , , , , , , , , 1, , , , 1 ], , [ 1, 1, , 1, , 1, , , , , , 1, , 1, , 1, 1, , 1, , 1, 1, , 1, 1, , 1 ], [ , , 1, , , , , , 1, , , , 1, , 1, , , , , 1 ], [ 1, , , , , , , , , 1, , , , , , 1, , , , 1, , 1, , , 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , 1, , 1, , , , , , 1, , , 1, , , , , , , , 1 ], [ , 1, , 1, , , , , , , , , , , , 1 ], , [ 1, 1, , , , , , , , , , , , , , , , , , , , , , 1, 1 ], [ 1 ] ], [ , [ 1, , , , , , , , , 1, , , , , 1, , 1, , 1 ], [ , 1, 1, , 1, 1, , 1, 1, 1, , , 1, 1, 1, , , , 1, , , 1, , , , 1 ], [ , 1, , , , , , , 1, , , , 1, , , , , , 1 ], [ 1, 1, 1, 1, 1, 1, , , , 1, , , , , , , , , 1, 1, 1, 1 ], [ 1 ], [ , 1, 1, , , 1, 1, , , , , 1, , 1, , , , , , , , 1, , , , 1 ], [ 1, , 1, , , 1, , 1, , , , , 1, 1, 1, 1, , , , 1, , , , 1 ], [ , , 1, , , , , , , 1, , , , , , , 1, , , , , , , 1 ], [ 1, , , , , , , , , , , , , , 1, , , , 1 ], [ , , , 1, , 1, , , , , 1, , , , 1, 1, , , , 1 ], [ 1, , , , , 1, , , , 1, , 1, 1, , , 1, 1, , 1, 1, 1, , 1, 1, 1, , 1 ], [ , 1, 1, , , , , 1, , 1, , 1, 1, 1, , 1, 1, , , 1, , 1, 1, 1 ], [ , 1, , , , 1, , , , 1, , , 1, , 1, 1, , , 1, 1, , , , , , 1 ], [ 1, , 1, 1, , 1, , 1, 1, , 1, , 1, 1, 1, 1, 1, , , 1, 1, , , , , , 1 ], [ 1, , , , , , , , , , , , , , , , , , 1, , , 1, , 1 ], [ , , , , , , , , , 1, , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , , , 1, , 1 ], [ , 1, , , , 1, , , 1, 1, , 1, , , 1, 1, , , 1, , , 1, , , 1, 1 ], [ 1, 1, , 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, , , 1, , 1, 1 ], [ 1, , 1, 1, 1, 1, , , , 1, , 1, 1, 1, , 1, , , 1, 1, 1, , 1, 1, 1, 1, 1 ], [ 1, , , , , , , , , , , , , 1 ], [ , , 1, , , , , , , , , , , , , , , , , , , , 1 ], [ 1, , , , , , , , , , , 1, , 1, , 1, , , , 1 ], [ , , , 1, , , , , , , , , 1 ], [ , 1, , , , , , , , , , , , , , 1, , , , , , , , , 1 ], [ , , , , , , , , 1, 1, , , , , , , , , 1, , , , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, 1, 1 ], [ , , , , , 1, , , , 1, 1, 1, , , 1, 1, , , 1, , 1, 1, , 1 ], [ , , , , , , , , , , , , , , , , , , , 1, 1 ], [ , 1, , , , , , 1, , , , , , , , , , , , , 1 ], [ , , 1, , , 1, , 1, 1, 1, , 1, 1, , 1, , , , 1, , 1, 1 ], , [ , , 1, , , 1, , , , , , 1, , , , 1 ], [ , , , , , , , , , 1, , , , , , , , , , 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, , , 1, 1, , 1, , 1, , , 1, 1, 1, , , 1 ], [ , , , , , 1, , , , , , , , , , , , , 1 ], [ , 1, , , , , , , , , , , , 1, , 1, 1, , 1, , , 1 ], [ , , , , , 1, , , , , , , , , , , , , , 1 ], [ , 1, 1, 1, 1, , , , , 1, , , 1, , 1, , , , 1, 1, , , , 1, 1 ], [ , 1, , , 1, , , 1, , 1, 1, , 1, , , , , , , 1 ], [ , , 1, , 1, , , 1, , , , , , , , , , , 1, 1, , , , 1 ], [ , 1, , , , , , , , , , , , , , , , , 1, , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, , , , , , , , , , , , , , , , 1, , 1, 1 ], [ , , , , , , , , , , , , 1 ], , [ , 1, 1, 1, 1, , , , 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, , 1 ], [ 1, , , , 1, , , , , , , , , , 1 ], [ 1, , , , , , , , , 1 ], , [ , 1, , , , 1, , , , , , , , , , , , , , , , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, , , , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , 1, 1, 1, 1, , 1, , , , 1, 1, , , 1, 1, , 1 ], [ , 1, 1, , 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , , , , , , , , 1 ], [ 1, 1, 1, , , , , 1, 1, 1, , 1, 1, 1, 1, , , 1, 1, , 1, 1, , , , , 1 ], [ , 1, , , , , , , 1, 1, , , 1, 1, 1, , 1, , , 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, , , , 1, , , , 1, , , 1, , , , 1, , , , , , , 1, 1 ], [ , 1, 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, , 1, , , 1, 1, 1, 1, , 1, 1, 1, 1, , , , 1, , 1, , 1, , , 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , 1, , , , , , , , , 1, 1, , , , , , , , , 1 ], , [ , 1, , 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, , , 1, , 1, , 1, , , , 1 ], [ , 1, , , 1, 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, , , 1 ], [ 1, , , 1, , , , 1, 1, 1, , , , , 1, 1, , , , 1, , 1 ], [ 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ 1, 1, , , , , , , , 1, , 1, , , , , , , , 1, , 1 ], [ , 1, , , , 1, , 1, 1, , , , 1, 1, , 1, , , , 1, 1, 1, , 1 ], , [ , 1, , , , , , 1, , , , , , , 1 ], [ , , , , , , , , 1, , , , 1, , 1, , , , , , , , , , , , 1 ] ], [ , [ , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ , 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, , 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , 1, , , , , , , , 1, , , , , , 1, , , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, , , , 1, 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, , , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , , 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, , , , , 1, 1, 1, , , 1, , 1, 1, , , , 1, , 1, , , 1, 1 ], [ , , , , , , , 1, , , , 1, 1, 1, 1, 1, , 1, , , , , , , , 1 ], [ 1, 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, 1, , 1, , 1, , 1, 1, , , 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , 1, 1, , 1, , 1, 1, 1, , 1, , 1, 1, , 1, 1, , 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , , , , , , , 1, , , , , 1, , 1 ], [ , 1, 1, 1, , 1, , 1, , 1, , , , 1, , 1, , , 1, , , , , , 1, 1 ], [ , 1, , , 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, , 1, 1, , , 1, , , 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, , , , , 1, , 1, , 1, , , , , , 1, , 1, , , , 1, 1 ] ], [ , [ , 1, , 1, , , , , , , , , , , , , , , 1, , , , 1 ], [ , , , , , , , , , 1, , 1, 1, 1, , 1, , , 1, , 1, 1 ], [ 1, 1, , , , , , , 1, , , , , , , 1, , , , , , 1 ], [ , 1, , , , , , , , , , 1, , , , , , , , , 1, 1 ], , [ , , , , , , , , , , , , , , , 1, , , , 1, , 1 ], [ , , 1, 1, , 1, , 1, , , , , , , , 1, , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , , 1, 1 ], [ , 1, , , , , , , , , , , , , 1 ], [ 1, , 1, 1, , , , 1, , , , , , , , , 1, , , 1, , , 1, 1 ], [ , 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, , 1, 1, , 1 ], [ , 1, , , 1, 1, , , , , , 1, , 1, , 1, , , 1, , 1, 1 ], [ 1, 1, 1, 1, , 1, , 1, , 1, , 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ , 1, 1, , , 1, , 1, , 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, , 1, 1 ], [ , , , , 1, , , 1, , , , , , , 1, , , , 1, 1 ], [ , 1, , , , , , , , , , 1, , 1, , 1, , , , , 1, , , , , 1 ], , [ 1, 1, , 1, , 1, , 1, 1, , , , , , 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, , , , , , 1, , , , , , 1, 1, , , , 1, 1, , , 1 ], [ , 1, 1, , 1, 1, , , , 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, , , 1, , , , 1, , , , 1, 1 ], [ , , , , 1 ], [ , , , , , , , , , 1, , , 1 ], , [ , , 1, , 1, , , , , , , , , 1, , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, 1, , 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , , , , 1 ], [ , 1, , 1, , , , , , 1, , , , , 1, 1, , , , , 1, 1 ], [ , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, , , 1, , 1, 1, 1 ], [ , 1, , , , 1, , , , , , , 1 ], [ , 1, , , 1, , , 1, , 1, , 1, 1, , 1, , , , , 1, , 1, , , , 1, 1 ], [ , 1, , , 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, 1, , , , 1, 1, , , , , , 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1 ], [ , 1, , , , 1, , , , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , 1, , , , , , , , 1, , , , , , , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, , 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1 ], [ 1, 1, , , , , , , 1, 1, , , , , 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, , 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1 ], , [ , 1, 1, , , , , 1, , 1, , , , 1, 1, 1, , , 1, , , , , 1 ], [ , , , , , , , , , , , , , 1 ], [ , , , , , 1, , , , , , , , 1, 1, , , , , 1, , 1, , , 1, 1 ], [ , , , , , , , , , , , , , , 1 ] ], [ , [ , 1 ], , , , , , , , , , , , , , , , , , , , [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, , , 1, 1, 1, 1, 1 ], [ , 1, , 1, , 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, , , , 1, , 1, 1 ], [ , 1, , 1, , 1, , , 1, , , , , 1, , , , , , 1, 1 ], [ , 1, , 1, , , , , 1, , , , 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ , 1, , , , , , , , , , , , , , , 1 ] ], [ , [ , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, , , , , , , , , 1, 1, , , , 1 ], [ , , , , , , 1 ], [ , , 1 ], [ , 1, 1, , , 1, , 1, , 1, 1, , 1, 1, 1, , , , 1, 1, 1, , , , , 1 ], , [ , 1, , , , 1, , , , , , 1, , , 1, , , , 1, 1, , 1 ], [ , , , , , , , 1, , , , , , , , , 1 ], [ , 1, , , , 1, 1, , , , , , 1, 1, 1, , , , 1, , 1, 1 ], [ , , , , , , , 1, , 1, , , , , , , , , , 1 ], [ , 1, 1, , , , , , 1, 1, , , , 1, , , , , , , 1, , , 1 ], , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , , 1, , , 1, , , , , 1, , 1, , 1, , 1, , , , , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , , , , 1, 1, , 1, 1, , 1, , , 1, , 1 ], [ , , , , , , , , , , , , , , 1, , , , , , 1 ], , [ , , , , , , , , , 1, , , , , , 1, , , , , 1 ], [ , , 1, , , , , , , 1, , , 1, 1 ], [ , , , 1, , , , , 1, , , , , 1, , , , , , 1, , , , 1 ], [ 1, , 1, 1, , 1, 1, 1, 1, 1, , 1, , , , 1, 1, 1, , , 1, 1, , , , 1, 1 ], , [ 1, 1, , , , , , , , , , 1, , 1, , 1, , , 1 ], [ , , , , 1, , , , , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , 1, , , , , 1, , 1 ], [ , , , , , , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , , 1, , , 1, , , , , , , , 1, , , , , , 1, , , , 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, 1, , 1, , , , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , , 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ 1, 1, , , , , , , 1, , 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], [ 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, , 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, , 1, , , , , , 1, , 1, , , , , 1, 1, , , , , 1 ], [ 1, , 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, 1, , 1, , 1, , , , 1, 1, 1, 1, 1, , , 1, 1, , 1, , 1 ], [ , 1, 1, 1, 1, , , , , 1, , 1, 1, 1, 1, 1, , , 1, 1, , , , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, , , , , 1, , 1, , 1, , , 1, , , 1, 1, , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , , , , , , 1, , , , , 1, 1, , , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , , 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , 1, , 1, 1, , 1, 1, 1, 1, 1, , , 1, , 1, , 1 ], [ 1, 1, 1, , 1, 1, 1, 1, , , , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , , 1, , , , , , , , , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , 1, 1, , , , , , 1, 1, 1, 1, 1, , , , 1, 1, 1, , 1, 1, 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1 ], [ , 1, 1, 1, , 1, , 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, , , 1, 1 ], [ 1, 1, , , , 1, , , 1, 1, 1, , 1, , 1, , 1, , 1, 1, 1, 1, 1, , 1, , 1 ], [ , 1, , , , , , , 1, , 1, , 1, 1, 1, 1, , , , , , , , , 1 ] ], [ , [ , , , , , , , , , , , , , 1, 1, , , , 1 ], [ , 1, , , , , , , , 1, , , 1, , , , , , 1, , , 1, , , , 1 ], , [ , 1, , , , 1, , 1, , 1, 1, , 1, 1, , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , 1 ], [ 1, 1, 1, , , 1, , , , , , , , , 1, 1, , , , , , , , , , 1 ], [ , 1, , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , , , , , , 1, , , 1 ], [ , , , , , , , , , 1 ], [ 1, 1, , , , , , 1, 1, 1, , 1, 1, , , , 1, 1, , 1, , 1, 1, 1, , 1 ], [ , 1, 1, 1, , 1, 1, , , 1, , 1, 1, 1, 1, , , , , , , 1, , 1 ], [ , 1, 1, 1, 1, , , 1, , 1, , , , 1, 1, 1, 1, , 1, 1, , 1 ], [ , 1, , , 1, 1, , 1, , , , 1, , 1, 1, , 1, , 1, , , 1, , , 1, , 1 ], [ , , , , , , , , , , , 1 ], [ , , , , , , , , , 1, , , , , , , , , , , , , 1 ], , [ 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , , 1, 1, , 1, , , , , 1, , , 1, , 1 ], [ , 1, , , , 1, , , 1, , , , , , , , 1, , 1, , , 1 ], [ , , , , , , , , , , , , , 1, 1, , , , 1, , , 1 ], [ , , , , , 1, , , 1, , , , 1 ], [ , 1 ], , [ , 1 ], [ 1, , , , , , , , , , , , , , 1, , , , , 1 ] ], [ , [ , 1, , , , 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, , 1, 1, , 1, 1, , , 1 ], [ , , 1, , , , , , , , , 1 ], , , [ 1, , , 1, 1, , , , , , , , 1, 1, , 1, 1, , 1 ], , [ , , , , , , , , , , , , , , , , , , 1, , 1 ], , [ 1, , , 1, 1, , 1, 1, , , , , 1, , 1, , , , , 1, 1, , 1 ], , [ , 1, , , , , , , , 1, 1, 1, 1, 1, , 1, 1, , , , 1, 1 ], [ , , , , , , , , , , , , , , , , 1, , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , , , , , , , , , , , 1, , 1, , , 1 ], [ 1, , , , , , , , , , , , , , , , , , 1, , 1 ], , , [ , 1, , , , , , , , , , , , , , 1, , , , 1, 1 ], [ , , , , , , , , , 1, , , 1, , , , , , , , , , 1 ], [ , , , , , , , , , , , , , , , 1 ], [ , , , , , , , , , , , , , 1, 1, , , , , , 1 ], , [ , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , , 1, 1, , 1, 1, 1, 1, 1, 1, , , 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, , , , , , , , 1 ], [ , , , , 1, , , 1, , , 1, 1, , , , , , , , , , 1, , , , 1 ], [ , 1, , 1, 1, , , 1, 1, 1, , , , 1, 1, 1, 1, , 1, 1, 1, 1, , 1 ], [ , , , , , , , 1 ], [ , 1, 1, , , , , 1, , 1, , , , , , 1, , , , , , 1, , 1, , 1 ], [ , 1, , , , , , 1, , , , 1, , , , , , , , , , 1 ], [ , , 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, , 1, 1, 1, 1, , 1 ], [ , 1, , , , , , , , 1 ], [ , 1, 1, , 1, , , , , , , , 1, , , , , , 1, , , 1, , 1, , 1 ], [ , 1, , 1, , 1, , 1, 1, 1, , 1, 1, 1, , 1, , , 1, 1, , 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , , 1, 1, , , , 1, 1, 1, , , , 1, 1, , , 1, 1 ], [ , , 1, 1, 1, 1, , 1, , 1, , 1, , 1, 1, 1, 1, , , , , 1, , 1, , 1 ], [ 1, 1, 1, 1, 1, 1, 1, 1, , 1, , 1, , 1, 1, 1, , , 1, 1, , , , 1, , 1 ], [ , , , 1 ], , [ , 1, 1, , 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, , 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , 1, , 1, , 1, , , , , , , 1, 1, , 1, 1 ], [ , , , , , , 1, , 1, 1, , 1, , 1, , , , , , , , , , 1 ], [ , 1, 1, , 1, , , , 1, , , , 1, 1, 1, , , , 1, , 1, 1, 1, , 1, 1 ], , [ , 1, 1, , , , , , , , , , , , , 1, , , 1, , , , , 1 ], [ , 1, , , , , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, , , , , , , 1, , , , 1, , , , , 1, , , , , , , 1 ] ], [ , [ , 1, 1, 1, 1, 1, , 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, , 1, , 1, 1, , , 1, 1, 1, 1, , 1, , , , , 1, 1, 1 ], [ , , 1, 1, , 1, , 1, 1, , , , 1, 1, 1, 1, , , 1, , 1, 1, 1, 1, , 1 ], [ , 1, , 1, , , , , , , , 1, , 1, , 1, , , , , , , , , , 1 ], [ , , 1, , 1, , , 1, , , , , 1, 1, , , 1, , 1, 1, 1, 1 ], [ , 1 ], [ , 1, 1, , 1, , 1, 1, , 1, , , 1, 1, 1, , , , 1, , , 1, , 1 ], [ 1, 1, , 1, 1, 1, , , , , , , , , , , , , 1, , 1, 1, 1 ], [ , 1, 1, , , , , , , 1, , , 1, , 1, , 1, , 1, 1, , , 1, , , 1 ], [ , , 1, , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, 1, 1, 1, , 1, , 1, , , , , 1, 1, 1, , , 1, , 1, , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, , , 1, 1, 1, , 1, , 1, 1, 1, , , 1, 1, 1, 1, , , , 1, 1 ], [ , , , 1, 1, , , 1, , 1, , 1, , 1, 1, 1, 1, , 1, , , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , , , , , , , , , , , , , , , , , 1 ], [ , 1, 1, , 1, 1, , 1, , 1, , , , 1, 1, , , 1, 1, , 1, 1, , 1 ], [ , 1, 1, 1, 1, 1, , , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, , , 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1 ], [ , 1, 1, , 1, , , 1, , , 1, , 1, 1, 1, 1, 1, , 1, , 1, 1 ], [ , , , , , 1, , , , 1, , , , , 1, 1, , , , 1 ], [ , 1, , 1, 1, 1, , 1, , , 1, 1, 1, , , 1, , , 1, , 1, , , 1 ], [ , , 1, , , , , , , , , 1, , 1, , , , , 1, , 1 ], [ , 1, 1, , , , , , , , 1, 1, 1, , , , , , , , 1, , , , , 1 ], [ , , , , , , , , 1, , , , , 1, , , 1 ] ], [ , [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, 1, , 1, 1, , , 1, 1, 1, 1, 1, 1, 1, 1, , , , , , , , , 1, 1 ], [ , , , , , , , , 1, , , , 1, , 1, , 1 ], [ , 1, , , 1, 1, , 1, , , , 1, , , , , , , , 1 ], [ , 1, , 1, , 1, , , , 1, 1, , 1, , 1, , , , 1, 1, 1, 1, 1, , , 1 ], , [ , 1, , , , , , , , 1, , , 1, 1, , , 1, , 1, 1, , 1, , 1 ], [ , 1, , , 1, , , , , , , , 1, , , , , , , 1 ], [ 1, 1, , , , , 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1 ], , [ , 1, , , , , , 1, , 1, , 1, 1, 1, 1, 1, , , 1, , 1, 1, , , , 1 ], [ , 1, 1, , , 1, , 1, , 1, , , 1, 1, 1, 1, , , 1, , , 1, , , , 1 ], [ , 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , , , 1, , 1 ], [ , 1, , , 1, 1, , 1, 1, , , 1, 1, , 1, 1, , 1, , 1, , 1 ], [ 1, , 1, , , , , 1, , 1, , 1, 1, 1, 1, , , , , 1, 1, , , , 1, 1 ], [ , 1, 1, , , , , 1, 1, , , 1, , 1, 1, 1, 1, , , , , , , , , , 1 ], , [ , 1, 1, , , 1, , , , 1, , 1, 1, 1, 1, 1, , , , 1, , , , 1, , 1 ], [ , , , 1, 1, , , 1, , , , , 1, , 1, 1, 1, , 1, 1, , , , , , 1 ], [ , 1, , , , , , , , , , , 1, , , , 1, , , , , , , 1, , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, , 1, 1, 1, , 1, 1, , 1, 1, 1, 1 ], [ , 1, , , , , , , , , , , , , , , , , , , 1 ], [ , 1, , , , , , 1, , , , , 1, , 1, , , 1, 1, , 1, 1, , 1 ], [ , 1, , , , , , 1, , , , , 1, 1, , , , , , , , 1, , , , 1 ], [ , , , , , , , , , , , , , , , , , , 1, , , 1, , , , , 1 ], [ , , , , , , , 1, , , , 1 ] ], [ , [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , 1, , 1, , , , , , , 1, , , , , , , , 1, , , 1 ], [ , 1, , , , , , , 1 ], [ , , , , , , , , , , 1 ], [ , 1, , , , , , 1, 1, , , , , , 1 ], , [ , 1, 1, , , , , , 1, , , , , 1, 1, , , , 1 ], [ 1, , 1, , 1, , , , , 1, , , , , 1, , , , , , , , , 1, 1 ], [ , 1, 1, , , , , , , , , 1, 1, 1, 1, , , , 1, , , , , 1, , , 1 ], , [ , 1, 1, , 1, , , 1, 1, , , 1, , , 1, 1, 1, , 1, , 1, 1, 1, , , , 1 ], [ , , , , , 1, , , , , 1, , , 1, 1, , , 1, , 1, , , , 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , 1, , , 1, 1, , 1, , , , 1, , , , , , , , 1 ], [ , , , 1, , , , , 1, , , , , 1, , 1, , 1, 1, 1 ], [ , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], [ , , , , , 1 ], [ , 1, , , , , , 1, , , , , , , 1, 1, 1, , , 1 ], [ , 1, , , , , , , , , , 1, 1, 1, , , , , 1, , , 1 ], [ , , , , , 1, , 1, , , , , 1, 1, 1, , 1, 1, , 1, 1, 1, , , 1, 1 ], [ 1, 1, , , , , , , 1, , , , , 1, 1, , , , , , , , , , , 1 ], , [ , 1 ], [ , , , , , , , , , , , , , , , , , , , , , , , , 1 ], [ , , 1, , , , , 1, , , 1, , , , 1, , 1 ], [ , 1, , , , , , , , , 1 ] ] ];
  11754. function isValidLang(lang) {
  11755. var array = langs;
  11756. while (lang.length < 3) {
  11757. lang += '`';
  11758. }
  11759. for (var _i10 = 0; _i10 <= lang.length - 1; _i10++) {
  11760. var index = lang.charCodeAt(_i10) - 96;
  11761. array = array[index];
  11762. if (!array) {
  11763. return false;
  11764. }
  11765. }
  11766. return true;
  11767. }
  11768. function _validLangs(langArray) {
  11769. langArray = Array.isArray(langArray) ? langArray : langs;
  11770. var codes = [];
  11771. langArray.forEach(function(lang, index) {
  11772. var _char2 = String.fromCharCode(index + 96).replace('`', '');
  11773. if (Array.isArray(lang)) {
  11774. codes = codes.concat(_validLangs(lang).map(function(newLang) {
  11775. return _char2 + newLang;
  11776. }));
  11777. } else {
  11778. codes.push(_char2);
  11779. }
  11780. });
  11781. return codes;
  11782. }
  11783. var valid_langs_default = isValidLang;
  11784. axe._thisWillBeDeletedDoNotUse = axe._thisWillBeDeletedDoNotUse || {};
  11785. axe._thisWillBeDeletedDoNotUse.utils = {
  11786. setDefaultFrameMessenger: setDefaultFrameMessenger
  11787. };
  11788. var SerialVirtualNode = function(_abstract_virtual_nod2) {
  11789. _inherits(SerialVirtualNode, _abstract_virtual_nod2);
  11790. var _super2 = _createSuper(SerialVirtualNode);
  11791. function SerialVirtualNode(serialNode) {
  11792. var _this2;
  11793. _classCallCheck(this, SerialVirtualNode);
  11794. _this2 = _super2.call(this);
  11795. _this2._props = normaliseProps(serialNode);
  11796. _this2._attrs = normaliseAttrs(serialNode);
  11797. return _this2;
  11798. }
  11799. _createClass(SerialVirtualNode, [ {
  11800. key: 'attr',
  11801. value: function attr(attrName) {
  11802. return this._attrs[attrName] || null;
  11803. }
  11804. }, {
  11805. key: 'hasAttr',
  11806. value: function hasAttr(attrName) {
  11807. return this._attrs[attrName] !== void 0;
  11808. }
  11809. }, {
  11810. key: 'props',
  11811. get: function get() {
  11812. return this._props;
  11813. }
  11814. }, {
  11815. key: 'attrNames',
  11816. get: function get() {
  11817. return Object.keys(this._attrs);
  11818. }
  11819. } ]);
  11820. return SerialVirtualNode;
  11821. }(abstract_virtual_node_default);
  11822. function normaliseProps(serialNode) {
  11823. var nodeName2 = serialNode.nodeName;
  11824. var _serialNode$nodeType = serialNode.nodeType, nodeType = _serialNode$nodeType === void 0 ? 1 : _serialNode$nodeType;
  11825. assert_default(typeof nodeType === 'number', 'nodeType has to be a number, got \''.concat(nodeType, '\''));
  11826. assert_default(typeof nodeName2 === 'string', 'nodeName has to be a string, got \''.concat(nodeName2, '\''));
  11827. nodeName2 = nodeName2.toLowerCase();
  11828. var type = null;
  11829. if (nodeName2 === 'input') {
  11830. type = (serialNode.type || serialNode.attributes && serialNode.attributes.type || '').toLowerCase();
  11831. if (!valid_input_type_default().includes(type)) {
  11832. type = 'text';
  11833. }
  11834. }
  11835. var props = _extends({}, serialNode, {
  11836. nodeType: nodeType,
  11837. nodeName: nodeName2
  11838. });
  11839. if (type) {
  11840. props.type = type;
  11841. }
  11842. delete props.attributes;
  11843. return Object.freeze(props);
  11844. }
  11845. function normaliseAttrs(_ref22) {
  11846. var _ref22$attributes = _ref22.attributes, attributes4 = _ref22$attributes === void 0 ? {} : _ref22$attributes;
  11847. var attrMap = {
  11848. htmlFor: 'for',
  11849. className: 'class'
  11850. };
  11851. return Object.keys(attributes4).reduce(function(attrs, attrName) {
  11852. var value = attributes4[attrName];
  11853. assert_default(_typeof(value) !== 'object' || value === null, 'expects attributes not to be an object, \''.concat(attrName, '\' was'));
  11854. if (value !== void 0) {
  11855. var mappedName = attrMap[attrName] || attrName;
  11856. attrs[mappedName] = value !== null ? String(value) : null;
  11857. }
  11858. return attrs;
  11859. }, {});
  11860. }
  11861. var serial_virtual_node_default = SerialVirtualNode;
  11862. var aria_exports = {};
  11863. __export(aria_exports, {
  11864. allowedAttr: function allowedAttr() {
  11865. return allowed_attr_default;
  11866. },
  11867. arialabelText: function arialabelText() {
  11868. return arialabel_text_default;
  11869. },
  11870. arialabelledbyText: function arialabelledbyText() {
  11871. return arialabelledby_text_default;
  11872. },
  11873. getAccessibleRefs: function getAccessibleRefs() {
  11874. return get_accessible_refs_default;
  11875. },
  11876. getElementUnallowedRoles: function getElementUnallowedRoles() {
  11877. return get_element_unallowed_roles_default;
  11878. },
  11879. getExplicitRole: function getExplicitRole() {
  11880. return get_explicit_role_default;
  11881. },
  11882. getImplicitRole: function getImplicitRole() {
  11883. return implicit_role_default;
  11884. },
  11885. getOwnedVirtual: function getOwnedVirtual() {
  11886. return get_owned_virtual_default;
  11887. },
  11888. getRole: function getRole() {
  11889. return get_role_default;
  11890. },
  11891. getRoleType: function getRoleType() {
  11892. return get_role_type_default;
  11893. },
  11894. getRolesByType: function getRolesByType() {
  11895. return get_roles_by_type_default;
  11896. },
  11897. getRolesWithNameFromContents: function getRolesWithNameFromContents() {
  11898. return get_roles_with_name_from_contents_default;
  11899. },
  11900. implicitNodes: function implicitNodes() {
  11901. return implicit_nodes_default;
  11902. },
  11903. implicitRole: function implicitRole() {
  11904. return implicit_role_default;
  11905. },
  11906. isAccessibleRef: function isAccessibleRef() {
  11907. return is_accessible_ref_default;
  11908. },
  11909. isAriaRoleAllowedOnElement: function isAriaRoleAllowedOnElement() {
  11910. return is_aria_role_allowed_on_element_default;
  11911. },
  11912. isUnsupportedRole: function isUnsupportedRole() {
  11913. return is_unsupported_role_default;
  11914. },
  11915. isValidRole: function isValidRole() {
  11916. return is_valid_role_default;
  11917. },
  11918. label: function label() {
  11919. return label_default2;
  11920. },
  11921. labelVirtual: function labelVirtual() {
  11922. return label_virtual_default;
  11923. },
  11924. lookupTable: function lookupTable() {
  11925. return lookup_table_default;
  11926. },
  11927. namedFromContents: function namedFromContents() {
  11928. return named_from_contents_default;
  11929. },
  11930. requiredAttr: function requiredAttr() {
  11931. return required_attr_default;
  11932. },
  11933. requiredContext: function requiredContext() {
  11934. return required_context_default;
  11935. },
  11936. requiredOwned: function requiredOwned() {
  11937. return required_owned_default;
  11938. },
  11939. validateAttr: function validateAttr() {
  11940. return validate_attr_default;
  11941. },
  11942. validateAttrValue: function validateAttrValue() {
  11943. return validate_attr_value_default;
  11944. }
  11945. });
  11946. function getGlobalAriaAttrs() {
  11947. if (cache_default.get('globalAriaAttrs')) {
  11948. return cache_default.get('globalAriaAttrs');
  11949. }
  11950. var globalAttrs = Object.keys(standards_default.ariaAttrs).filter(function(attrName) {
  11951. return standards_default.ariaAttrs[attrName].global;
  11952. });
  11953. cache_default.set('globalAriaAttrs', globalAttrs);
  11954. return globalAttrs;
  11955. }
  11956. var get_global_aria_attrs_default = getGlobalAriaAttrs;
  11957. function allowedAttr(role) {
  11958. var roleDef = standards_default.ariaRoles[role];
  11959. var attrs = _toConsumableArray(get_global_aria_attrs_default());
  11960. if (!roleDef) {
  11961. return attrs;
  11962. }
  11963. if (roleDef.allowedAttrs) {
  11964. attrs.push.apply(attrs, _toConsumableArray(roleDef.allowedAttrs));
  11965. }
  11966. if (roleDef.requiredAttrs) {
  11967. attrs.push.apply(attrs, _toConsumableArray(roleDef.requiredAttrs));
  11968. }
  11969. return attrs;
  11970. }
  11971. var allowed_attr_default = allowedAttr;
  11972. function arialabelText(vNode) {
  11973. if (!(vNode instanceof abstract_virtual_node_default)) {
  11974. if (vNode.nodeType !== 1) {
  11975. return '';
  11976. }
  11977. vNode = get_node_from_tree_default(vNode);
  11978. }
  11979. return vNode.attr('aria-label') || '';
  11980. }
  11981. var arialabel_text_default = arialabelText;
  11982. function isUnsupportedRole(role) {
  11983. var roleDefinition = standards_default.ariaRoles[role];
  11984. return roleDefinition ? !!roleDefinition.unsupported : false;
  11985. }
  11986. var is_unsupported_role_default = isUnsupportedRole;
  11987. function isValidRole(role) {
  11988. var _ref23 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, allowAbstract = _ref23.allowAbstract, _ref23$flagUnsupporte = _ref23.flagUnsupported, flagUnsupported = _ref23$flagUnsupporte === void 0 ? false : _ref23$flagUnsupporte;
  11989. var roleDefinition = standards_default.ariaRoles[role];
  11990. var isRoleUnsupported = is_unsupported_role_default(role);
  11991. if (!roleDefinition || flagUnsupported && isRoleUnsupported) {
  11992. return false;
  11993. }
  11994. return allowAbstract ? true : roleDefinition.type !== 'abstract';
  11995. }
  11996. var is_valid_role_default = isValidRole;
  11997. function getExplicitRole(vNode) {
  11998. var _ref24 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, fallback = _ref24.fallback, abstracts = _ref24.abstracts, dpub = _ref24.dpub;
  11999. vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
  12000. if (vNode.props.nodeType !== 1) {
  12001. return null;
  12002. }
  12003. var roleAttr = (vNode.attr('role') || '').trim().toLowerCase();
  12004. var roleList = fallback ? token_list_default(roleAttr) : [ roleAttr ];
  12005. var firstValidRole = roleList.find(function(role) {
  12006. if (!dpub && role.substr(0, 4) === 'doc-') {
  12007. return false;
  12008. }
  12009. return is_valid_role_default(role, {
  12010. allowAbstract: abstracts
  12011. });
  12012. });
  12013. return firstValidRole || null;
  12014. }
  12015. var get_explicit_role_default = getExplicitRole;
  12016. function getElementsByContentType(type) {
  12017. return Object.keys(standards_default.htmlElms).filter(function(nodeName2) {
  12018. var elm = standards_default.htmlElms[nodeName2];
  12019. if (elm.contentTypes) {
  12020. return elm.contentTypes.includes(type);
  12021. }
  12022. if (!elm.variant) {
  12023. return false;
  12024. }
  12025. if (elm.variant['default'] && elm.variant['default'].contentTypes) {
  12026. return elm.variant['default'].contentTypes.includes(type);
  12027. }
  12028. return false;
  12029. });
  12030. }
  12031. var get_elements_by_content_type_default = getElementsByContentType;
  12032. function toGrid(node) {
  12033. var table5 = [];
  12034. var rows = node.rows;
  12035. for (var i = 0, rowLength = rows.length; i < rowLength; i++) {
  12036. var cells = rows[i].cells;
  12037. table5[i] = table5[i] || [];
  12038. var columnIndex = 0;
  12039. for (var j = 0, cellLength = cells.length; j < cellLength; j++) {
  12040. for (var colSpan = 0; colSpan < cells[j].colSpan; colSpan++) {
  12041. var rowspanAttr = cells[j].getAttribute('rowspan');
  12042. var rowspanValue = parseInt(rowspanAttr) === 0 || cells[j].rowspan === 0 ? rows.length : cells[j].rowSpan;
  12043. for (var rowSpan = 0; rowSpan < rowspanValue; rowSpan++) {
  12044. table5[i + rowSpan] = table5[i + rowSpan] || [];
  12045. while (table5[i + rowSpan][columnIndex]) {
  12046. columnIndex++;
  12047. }
  12048. table5[i + rowSpan][columnIndex] = cells[j];
  12049. }
  12050. columnIndex++;
  12051. }
  12052. }
  12053. }
  12054. return table5;
  12055. }
  12056. var to_grid_default = memoize_default(toGrid);
  12057. function getCellPosition(cell, tableGrid) {
  12058. var rowIndex, index;
  12059. if (!tableGrid) {
  12060. tableGrid = to_grid_default(find_up_default(cell, 'table'));
  12061. }
  12062. for (rowIndex = 0; rowIndex < tableGrid.length; rowIndex++) {
  12063. if (tableGrid[rowIndex]) {
  12064. index = tableGrid[rowIndex].indexOf(cell);
  12065. if (index !== -1) {
  12066. return {
  12067. x: index,
  12068. y: rowIndex
  12069. };
  12070. }
  12071. }
  12072. }
  12073. }
  12074. var get_cell_position_default = memoize_default(getCellPosition);
  12075. function getScope(cell) {
  12076. var scope = cell.getAttribute('scope');
  12077. var role = cell.getAttribute('role');
  12078. if (cell instanceof window.Element === false || [ 'TD', 'TH' ].indexOf(cell.nodeName.toUpperCase()) === -1) {
  12079. throw new TypeError('Expected TD or TH element');
  12080. }
  12081. if (role === 'columnheader') {
  12082. return 'col';
  12083. } else if (role === 'rowheader') {
  12084. return 'row';
  12085. } else if (scope === 'col' || scope === 'row') {
  12086. return scope;
  12087. } else if (cell.nodeName.toUpperCase() !== 'TH') {
  12088. return false;
  12089. }
  12090. var tableGrid = to_grid_default(find_up_default(cell, 'table'));
  12091. var pos = get_cell_position_default(cell, tableGrid);
  12092. var headerRow = tableGrid[pos.y].reduce(function(headerRow2, cell2) {
  12093. return headerRow2 && cell2.nodeName.toUpperCase() === 'TH';
  12094. }, true);
  12095. if (headerRow) {
  12096. return 'col';
  12097. }
  12098. var headerCol = tableGrid.map(function(col) {
  12099. return col[pos.x];
  12100. }).reduce(function(headerCol2, cell2) {
  12101. return headerCol2 && cell2 && cell2.nodeName.toUpperCase() === 'TH';
  12102. }, true);
  12103. if (headerCol) {
  12104. return 'row';
  12105. }
  12106. return 'auto';
  12107. }
  12108. var get_scope_default = getScope;
  12109. function isColumnHeader(element) {
  12110. return [ 'col', 'auto' ].indexOf(get_scope_default(element)) !== -1;
  12111. }
  12112. var is_column_header_default = isColumnHeader;
  12113. function isRowHeader(cell) {
  12114. return [ 'row', 'auto' ].includes(get_scope_default(cell));
  12115. }
  12116. var is_row_header_default = isRowHeader;
  12117. var sectioningElementSelector = get_elements_by_content_type_default('sectioning').map(function(nodeName2) {
  12118. return ''.concat(nodeName2, ':not([role])');
  12119. }).join(', ') + ' , main:not([role]), [role=article], [role=complementary], [role=main], [role=navigation], [role=region]';
  12120. function hasAccessibleName(vNode) {
  12121. var ariaLabelledby = sanitize_default(arialabelledby_text_default(vNode));
  12122. var ariaLabel = sanitize_default(arialabel_text_default(vNode));
  12123. return !!(ariaLabelledby || ariaLabel);
  12124. }
  12125. var implicitHtmlRoles = {
  12126. a: function a(vNode) {
  12127. return vNode.hasAttr('href') ? 'link' : null;
  12128. },
  12129. area: function area(vNode) {
  12130. return vNode.hasAttr('href') ? 'link' : null;
  12131. },
  12132. article: 'article',
  12133. aside: 'complementary',
  12134. body: 'document',
  12135. button: 'button',
  12136. datalist: 'listbox',
  12137. dd: 'definition',
  12138. dfn: 'term',
  12139. details: 'group',
  12140. dialog: 'dialog',
  12141. dt: 'term',
  12142. fieldset: 'group',
  12143. figure: 'figure',
  12144. footer: function footer(vNode) {
  12145. var sectioningElement = closest_default(vNode, sectioningElementSelector);
  12146. return !sectioningElement ? 'contentinfo' : null;
  12147. },
  12148. form: function form(vNode) {
  12149. return hasAccessibleName(vNode) ? 'form' : null;
  12150. },
  12151. h1: 'heading',
  12152. h2: 'heading',
  12153. h3: 'heading',
  12154. h4: 'heading',
  12155. h5: 'heading',
  12156. h6: 'heading',
  12157. header: function header(vNode) {
  12158. var sectioningElement = closest_default(vNode, sectioningElementSelector);
  12159. return !sectioningElement ? 'banner' : null;
  12160. },
  12161. hr: 'separator',
  12162. img: function img(vNode) {
  12163. var emptyAlt = vNode.hasAttr('alt') && !vNode.attr('alt');
  12164. var hasGlobalAria = get_global_aria_attrs_default().find(function(attr) {
  12165. return vNode.hasAttr(attr);
  12166. });
  12167. return emptyAlt && !hasGlobalAria && !is_focusable_default(vNode) ? 'presentation' : 'img';
  12168. },
  12169. input: function input(vNode) {
  12170. var suggestionsSourceElement;
  12171. if (vNode.hasAttr('list')) {
  12172. var listElement = idrefs_default(vNode.actualNode, 'list').filter(function(node) {
  12173. return !!node;
  12174. })[0];
  12175. suggestionsSourceElement = listElement && listElement.nodeName.toLowerCase() === 'datalist';
  12176. }
  12177. switch (vNode.props.type) {
  12178. case 'checkbox':
  12179. return 'checkbox';
  12180. case 'number':
  12181. return 'spinbutton';
  12182. case 'radio':
  12183. return 'radio';
  12184. case 'range':
  12185. return 'slider';
  12186. case 'search':
  12187. return !suggestionsSourceElement ? 'searchbox' : 'combobox';
  12188. case 'button':
  12189. case 'image':
  12190. case 'reset':
  12191. case 'submit':
  12192. return 'button';
  12193. case 'text':
  12194. case 'tel':
  12195. case 'url':
  12196. case 'email':
  12197. case '':
  12198. return !suggestionsSourceElement ? 'textbox' : 'combobox';
  12199. default:
  12200. return 'textbox';
  12201. }
  12202. },
  12203. li: 'listitem',
  12204. main: 'main',
  12205. math: 'math',
  12206. menu: 'list',
  12207. nav: 'navigation',
  12208. ol: 'list',
  12209. optgroup: 'group',
  12210. option: 'option',
  12211. output: 'status',
  12212. progress: 'progressbar',
  12213. section: function section(vNode) {
  12214. return hasAccessibleName(vNode) ? 'region' : null;
  12215. },
  12216. select: function select(vNode) {
  12217. return vNode.hasAttr('multiple') || parseInt(vNode.attr('size')) > 1 ? 'listbox' : 'combobox';
  12218. },
  12219. summary: 'button',
  12220. table: 'table',
  12221. tbody: 'rowgroup',
  12222. td: function td(vNode) {
  12223. var table5 = closest_default(vNode, 'table');
  12224. var role = get_explicit_role_default(table5);
  12225. return [ 'grid', 'treegrid' ].includes(role) ? 'gridcell' : 'cell';
  12226. },
  12227. textarea: 'textbox',
  12228. tfoot: 'rowgroup',
  12229. th: function th(vNode) {
  12230. if (is_column_header_default(vNode.actualNode)) {
  12231. return 'columnheader';
  12232. }
  12233. if (is_row_header_default(vNode.actualNode)) {
  12234. return 'rowheader';
  12235. }
  12236. },
  12237. thead: 'rowgroup',
  12238. tr: 'row',
  12239. ul: 'list'
  12240. };
  12241. var implicit_html_roles_default = implicitHtmlRoles;
  12242. function fromPrimative(someString, matcher) {
  12243. var matcherType = _typeof(matcher);
  12244. if (Array.isArray(matcher) && typeof someString !== 'undefined') {
  12245. return matcher.includes(someString);
  12246. }
  12247. if (matcherType === 'function') {
  12248. return !!matcher(someString);
  12249. }
  12250. if (someString !== null && someString !== void 0) {
  12251. if (matcher instanceof RegExp) {
  12252. return matcher.test(someString);
  12253. }
  12254. if (/^\/.*\/$/.test(matcher)) {
  12255. var pattern = matcher.substring(1, matcher.length - 1);
  12256. return new RegExp(pattern).test(someString);
  12257. }
  12258. }
  12259. return matcher === someString;
  12260. }
  12261. var from_primative_default = fromPrimative;
  12262. function fromFunction(getValue, matcher) {
  12263. var matcherType = _typeof(matcher);
  12264. if (matcherType !== 'object' || Array.isArray(matcher) || matcher instanceof RegExp) {
  12265. throw new Error('Expect matcher to be an object');
  12266. }
  12267. return Object.keys(matcher).every(function(propName) {
  12268. return from_primative_default(getValue(propName), matcher[propName]);
  12269. });
  12270. }
  12271. var from_function_default = fromFunction;
  12272. function attributes(vNode, matcher) {
  12273. if (!(vNode instanceof abstract_virtual_node_default)) {
  12274. vNode = get_node_from_tree_default(vNode);
  12275. }
  12276. return from_function_default(function(attrName) {
  12277. return vNode.attr(attrName);
  12278. }, matcher);
  12279. }
  12280. var attributes_default = attributes;
  12281. function condition(arg, condition4) {
  12282. return !!condition4(arg);
  12283. }
  12284. var condition_default = condition;
  12285. function explicitRole(vNode, matcher) {
  12286. return from_primative_default(get_explicit_role_default(vNode), matcher);
  12287. }
  12288. var explicit_role_default = explicitRole;
  12289. function implicitRole(vNode, matcher) {
  12290. return from_primative_default(implicit_role_default(vNode), matcher);
  12291. }
  12292. var implicit_role_default2 = implicitRole;
  12293. function nodeName(vNode, matcher) {
  12294. if (!(vNode instanceof abstract_virtual_node_default)) {
  12295. vNode = get_node_from_tree_default(vNode);
  12296. }
  12297. return from_primative_default(vNode.props.nodeName, matcher);
  12298. }
  12299. var node_name_default = nodeName;
  12300. function properties(vNode, matcher) {
  12301. if (!(vNode instanceof abstract_virtual_node_default)) {
  12302. vNode = get_node_from_tree_default(vNode);
  12303. }
  12304. return from_function_default(function(propName) {
  12305. return vNode.props[propName];
  12306. }, matcher);
  12307. }
  12308. var properties_default = properties;
  12309. function semanticRole(vNode, matcher) {
  12310. return from_primative_default(get_role_default(vNode), matcher);
  12311. }
  12312. var semantic_role_default = semanticRole;
  12313. var matchers = {
  12314. attributes: attributes_default,
  12315. condition: condition_default,
  12316. explicitRole: explicit_role_default,
  12317. implicitRole: implicit_role_default2,
  12318. nodeName: node_name_default,
  12319. properties: properties_default,
  12320. semanticRole: semantic_role_default
  12321. };
  12322. function fromDefinition(vNode, definition) {
  12323. if (!(vNode instanceof abstract_virtual_node_default)) {
  12324. vNode = get_node_from_tree_default(vNode);
  12325. }
  12326. if (Array.isArray(definition)) {
  12327. return definition.some(function(definitionItem) {
  12328. return fromDefinition(vNode, definitionItem);
  12329. });
  12330. }
  12331. if (typeof definition === 'string') {
  12332. return matches_default(vNode, definition);
  12333. }
  12334. return Object.keys(definition).every(function(matcherName) {
  12335. if (!matchers[matcherName]) {
  12336. throw new Error('Unknown matcher type "'.concat(matcherName, '"'));
  12337. }
  12338. var matchMethod = matchers[matcherName];
  12339. var matcher = definition[matcherName];
  12340. return matchMethod(vNode, matcher);
  12341. });
  12342. }
  12343. var from_definition_default = fromDefinition;
  12344. function matches5(vNode, definition) {
  12345. return from_definition_default(vNode, definition);
  12346. }
  12347. var matches_default2 = matches5;
  12348. matches_default2.attributes = attributes_default;
  12349. matches_default2.condition = condition_default;
  12350. matches_default2.explicitRole = explicit_role_default;
  12351. matches_default2.fromDefinition = from_definition_default;
  12352. matches_default2.fromFunction = from_function_default;
  12353. matches_default2.fromPrimative = from_primative_default;
  12354. matches_default2.implicitRole = implicit_role_default2;
  12355. matches_default2.nodeName = node_name_default;
  12356. matches_default2.properties = properties_default;
  12357. matches_default2.semanticRole = semantic_role_default;
  12358. var matches_default3 = matches_default2;
  12359. function getElementSpec(vNode) {
  12360. var standard = standards_default.htmlElms[vNode.props.nodeName];
  12361. if (!standard) {
  12362. return {};
  12363. }
  12364. if (!standard.variant) {
  12365. return standard;
  12366. }
  12367. var variant = standard.variant, spec = _objectWithoutProperties(standard, [ 'variant' ]);
  12368. for (var variantName in variant) {
  12369. if (!variant.hasOwnProperty(variantName) || variantName === 'default') {
  12370. continue;
  12371. }
  12372. var _variant$variantName = variant[variantName], matches14 = _variant$variantName.matches, props = _objectWithoutProperties(_variant$variantName, [ 'matches' ]);
  12373. if (matches_default3(vNode, matches14)) {
  12374. for (var propName in props) {
  12375. if (props.hasOwnProperty(propName)) {
  12376. spec[propName] = props[propName];
  12377. }
  12378. }
  12379. }
  12380. }
  12381. for (var _propName in variant['default']) {
  12382. if (variant['default'].hasOwnProperty(_propName) && typeof spec[_propName] === 'undefined') {
  12383. spec[_propName] = variant['default'][_propName];
  12384. }
  12385. }
  12386. return spec;
  12387. }
  12388. var get_element_spec_default = getElementSpec;
  12389. function implicitRole2(node) {
  12390. var _ref25 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, chromium = _ref25.chromium;
  12391. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  12392. node = vNode.actualNode;
  12393. if (!vNode) {
  12394. throw new ReferenceError('Cannot get implicit role of a node outside the current scope.');
  12395. }
  12396. var nodeName2 = vNode.props.nodeName;
  12397. var role = implicit_html_roles_default[nodeName2];
  12398. if (!role && chromium) {
  12399. var _get_element_spec_def = get_element_spec_default(vNode), chromiumRole = _get_element_spec_def.chromiumRole;
  12400. return chromiumRole || null;
  12401. }
  12402. if (typeof role === 'function') {
  12403. return role(vNode);
  12404. }
  12405. return role || null;
  12406. }
  12407. var implicit_role_default = implicitRole2;
  12408. var inheritsPresentationChain = {
  12409. td: [ 'tr' ],
  12410. th: [ 'tr' ],
  12411. tr: [ 'thead', 'tbody', 'tfoot', 'table' ],
  12412. thead: [ 'table' ],
  12413. tbody: [ 'table' ],
  12414. tfoot: [ 'table' ],
  12415. li: [ 'ol', 'ul' ],
  12416. dt: [ 'dl', 'div' ],
  12417. dd: [ 'dl', 'div' ],
  12418. div: [ 'dl' ]
  12419. };
  12420. function getInheritedRole(vNode, explicitRoleOptions) {
  12421. var parentNodeNames = inheritsPresentationChain[vNode.props.nodeName];
  12422. if (!parentNodeNames) {
  12423. return null;
  12424. }
  12425. if (!vNode.parent) {
  12426. throw new ReferenceError('Cannot determine role presentational inheritance of a required parent outside the current scope.');
  12427. }
  12428. if (!parentNodeNames.includes(vNode.parent.props.nodeName)) {
  12429. return null;
  12430. }
  12431. var parentRole = get_explicit_role_default(vNode.parent, explicitRoleOptions);
  12432. if ([ 'none', 'presentation' ].includes(parentRole) && !hasConflictResolution(vNode.parent)) {
  12433. return parentRole;
  12434. }
  12435. if (parentRole) {
  12436. return null;
  12437. }
  12438. return getInheritedRole(vNode.parent, explicitRoleOptions);
  12439. }
  12440. function resolveImplicitRole(vNode, _ref26) {
  12441. var chromium = _ref26.chromium, explicitRoleOptions = _objectWithoutProperties(_ref26, [ 'chromium' ]);
  12442. var implicitRole3 = implicit_role_default(vNode, {
  12443. chromium: chromium
  12444. });
  12445. if (!implicitRole3) {
  12446. return null;
  12447. }
  12448. var presentationalRole = getInheritedRole(vNode, explicitRoleOptions);
  12449. if (presentationalRole) {
  12450. return presentationalRole;
  12451. }
  12452. return implicitRole3;
  12453. }
  12454. function hasConflictResolution(vNode) {
  12455. var hasGlobalAria = get_global_aria_attrs_default().some(function(attr) {
  12456. return vNode.hasAttr(attr);
  12457. });
  12458. return hasGlobalAria || is_focusable_default(vNode);
  12459. }
  12460. function resolveRole(node) {
  12461. var _ref27 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12462. var noImplicit = _ref27.noImplicit, roleOptions = _objectWithoutProperties(_ref27, [ 'noImplicit' ]);
  12463. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  12464. if (vNode.props.nodeType !== 1) {
  12465. return null;
  12466. }
  12467. var explicitRole2 = get_explicit_role_default(vNode, roleOptions);
  12468. if (!explicitRole2) {
  12469. return noImplicit ? null : resolveImplicitRole(vNode, roleOptions);
  12470. }
  12471. if (![ 'presentation', 'none' ].includes(explicitRole2)) {
  12472. return explicitRole2;
  12473. }
  12474. if (hasConflictResolution(vNode)) {
  12475. return noImplicit ? null : resolveImplicitRole(vNode, roleOptions);
  12476. }
  12477. return explicitRole2;
  12478. }
  12479. function getRole(node) {
  12480. var _ref28 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12481. var noPresentational = _ref28.noPresentational, options = _objectWithoutProperties(_ref28, [ 'noPresentational' ]);
  12482. var role = resolveRole(node, options);
  12483. if (noPresentational && [ 'presentation', 'none' ].includes(role)) {
  12484. return null;
  12485. }
  12486. return role;
  12487. }
  12488. var get_role_default = getRole;
  12489. var alwaysTitleElements = [ 'iframe' ];
  12490. function titleText(node) {
  12491. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  12492. if (vNode.props.nodeType !== 1 || !node.hasAttr('title')) {
  12493. return '';
  12494. }
  12495. if (!matches_default2(vNode, alwaysTitleElements) && [ 'none', 'presentation' ].includes(get_role_default(vNode))) {
  12496. return '';
  12497. }
  12498. return vNode.attr('title');
  12499. }
  12500. var title_text_default = titleText;
  12501. function namedFromContents(vNode) {
  12502. var _ref29 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, strict = _ref29.strict;
  12503. vNode = vNode instanceof abstract_virtual_node_default ? vNode : get_node_from_tree_default(vNode);
  12504. if (vNode.props.nodeType !== 1) {
  12505. return false;
  12506. }
  12507. var role = get_role_default(vNode);
  12508. var roleDef = standards_default.ariaRoles[role];
  12509. if (roleDef && roleDef.nameFromContent) {
  12510. return true;
  12511. }
  12512. if (strict) {
  12513. return false;
  12514. }
  12515. return !roleDef || [ 'presentation', 'none' ].includes(role);
  12516. }
  12517. var named_from_contents_default = namedFromContents;
  12518. function getOwnedVirtual(virtualNode) {
  12519. var actualNode = virtualNode.actualNode, children = virtualNode.children;
  12520. if (!children) {
  12521. throw new Error('getOwnedVirtual requires a virtual node');
  12522. }
  12523. if (virtualNode.hasAttr('aria-owns')) {
  12524. var owns = idrefs_default(actualNode, 'aria-owns').filter(function(element) {
  12525. return !!element;
  12526. }).map(function(element) {
  12527. return axe.utils.getNodeFromTree(element);
  12528. });
  12529. return [].concat(_toConsumableArray(children), _toConsumableArray(owns));
  12530. }
  12531. return _toConsumableArray(children);
  12532. }
  12533. var get_owned_virtual_default = getOwnedVirtual;
  12534. function subtreeText(virtualNode) {
  12535. var context3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12536. var alreadyProcessed2 = accessible_text_virtual_default.alreadyProcessed;
  12537. context3.startNode = context3.startNode || virtualNode;
  12538. var _context = context3, strict = _context.strict, inControlContext = _context.inControlContext, inLabelledByContext = _context.inLabelledByContext;
  12539. if (alreadyProcessed2(virtualNode, context3) || virtualNode.props.nodeType !== 1) {
  12540. return '';
  12541. }
  12542. if (!named_from_contents_default(virtualNode, {
  12543. strict: strict
  12544. }) && !context3.subtreeDescendant) {
  12545. return '';
  12546. }
  12547. if (!strict) {
  12548. var subtreeDescendant = !inControlContext && !inLabelledByContext;
  12549. context3 = _extends({
  12550. subtreeDescendant: subtreeDescendant
  12551. }, context3);
  12552. }
  12553. return get_owned_virtual_default(virtualNode).reduce(function(contentText, child) {
  12554. return appendAccessibleText(contentText, child, context3);
  12555. }, '');
  12556. }
  12557. var phrasingElements = get_elements_by_content_type_default('phrasing').concat([ '#text' ]);
  12558. function appendAccessibleText(contentText, virtualNode, context3) {
  12559. var nodeName2 = virtualNode.props.nodeName;
  12560. var contentTextAdd = accessible_text_virtual_default(virtualNode, context3);
  12561. if (!contentTextAdd) {
  12562. return contentText;
  12563. }
  12564. if (!phrasingElements.includes(nodeName2)) {
  12565. if (contentTextAdd[0] !== ' ') {
  12566. contentTextAdd += ' ';
  12567. }
  12568. if (contentText && contentText[contentText.length - 1] !== ' ') {
  12569. contentTextAdd = ' ' + contentTextAdd;
  12570. }
  12571. }
  12572. return contentText + contentTextAdd;
  12573. }
  12574. var subtree_text_default = subtreeText;
  12575. function labelText(virtualNode) {
  12576. var context3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12577. var alreadyProcessed2 = accessible_text_virtual_default.alreadyProcessed;
  12578. if (context3.inControlContext || context3.inLabelledByContext || alreadyProcessed2(virtualNode, context3)) {
  12579. return '';
  12580. }
  12581. if (!context3.startNode) {
  12582. context3.startNode = virtualNode;
  12583. }
  12584. var labelContext = _extends({
  12585. inControlContext: true
  12586. }, context3);
  12587. var explicitLabels = getExplicitLabels(virtualNode);
  12588. var implicitLabel = closest_default(virtualNode, 'label');
  12589. var labels;
  12590. if (implicitLabel) {
  12591. labels = [].concat(_toConsumableArray(explicitLabels), [ implicitLabel.actualNode ]);
  12592. labels.sort(node_sorter_default);
  12593. } else {
  12594. labels = explicitLabels;
  12595. }
  12596. return labels.map(function(label5) {
  12597. return accessible_text_default(label5, labelContext);
  12598. }).filter(function(text32) {
  12599. return text32 !== '';
  12600. }).join(' ');
  12601. }
  12602. function getExplicitLabels(virtualNode) {
  12603. if (!virtualNode.attr('id')) {
  12604. return [];
  12605. }
  12606. if (!virtualNode.actualNode) {
  12607. throw new TypeError('Cannot resolve explicit label reference for non-DOM nodes');
  12608. }
  12609. return find_elms_in_context_default({
  12610. elm: 'label',
  12611. attr: 'for',
  12612. value: virtualNode.attr('id'),
  12613. context: virtualNode.actualNode
  12614. });
  12615. }
  12616. var label_text_default = labelText;
  12617. var defaultButtonValues = {
  12618. submit: 'Submit',
  12619. image: 'Submit',
  12620. reset: 'Reset',
  12621. button: ''
  12622. };
  12623. var nativeTextMethods = {
  12624. valueText: function valueText(_ref30) {
  12625. var actualNode = _ref30.actualNode;
  12626. return actualNode.value || '';
  12627. },
  12628. buttonDefaultText: function buttonDefaultText(_ref31) {
  12629. var actualNode = _ref31.actualNode;
  12630. return defaultButtonValues[actualNode.type] || '';
  12631. },
  12632. tableCaptionText: descendantText.bind(null, 'caption'),
  12633. figureText: descendantText.bind(null, 'figcaption'),
  12634. svgTitleText: descendantText.bind(null, 'title'),
  12635. fieldsetLegendText: descendantText.bind(null, 'legend'),
  12636. altText: attrText.bind(null, 'alt'),
  12637. tableSummaryText: attrText.bind(null, 'summary'),
  12638. titleText: title_text_default,
  12639. subtreeText: subtree_text_default,
  12640. labelText: label_text_default,
  12641. singleSpace: function singleSpace() {
  12642. return ' ';
  12643. },
  12644. placeholderText: attrText.bind(null, 'placeholder')
  12645. };
  12646. function attrText(attr, vNode) {
  12647. return vNode.attr(attr) || '';
  12648. }
  12649. function descendantText(nodeName2, _ref32, context3) {
  12650. var actualNode = _ref32.actualNode;
  12651. nodeName2 = nodeName2.toLowerCase();
  12652. var nodeNames = [ nodeName2, actualNode.nodeName.toLowerCase() ].join(',');
  12653. var candidate = actualNode.querySelector(nodeNames);
  12654. if (!candidate || candidate.nodeName.toLowerCase() !== nodeName2) {
  12655. return '';
  12656. }
  12657. return accessible_text_default(candidate, context3);
  12658. }
  12659. var native_text_methods_default = nativeTextMethods;
  12660. function nativeTextAlternative(virtualNode) {
  12661. var context3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12662. var actualNode = virtualNode.actualNode;
  12663. if (virtualNode.props.nodeType !== 1 || [ 'presentation', 'none' ].includes(get_role_default(virtualNode))) {
  12664. return '';
  12665. }
  12666. var textMethods = findTextMethods(virtualNode);
  12667. var accName = textMethods.reduce(function(accName2, step) {
  12668. return accName2 || step(virtualNode, context3);
  12669. }, '');
  12670. if (context3.debug) {
  12671. axe.log(accName || '{empty-value}', actualNode, context3);
  12672. }
  12673. return accName;
  12674. }
  12675. function findTextMethods(virtualNode) {
  12676. var elmSpec = get_element_spec_default(virtualNode);
  12677. var methods = elmSpec.namingMethods || [];
  12678. return methods.map(function(methodName) {
  12679. return native_text_methods_default[methodName];
  12680. });
  12681. }
  12682. var native_text_alternative_default = nativeTextAlternative;
  12683. var unsupported = {
  12684. accessibleNameFromFieldValue: [ 'combobox', 'listbox', 'progressbar' ]
  12685. };
  12686. var unsupported_default = unsupported;
  12687. var nonTextInputTypes = [ 'button', 'checkbox', 'color', 'file', 'hidden', 'image', 'password', 'radio', 'reset', 'submit' ];
  12688. function isNativeTextbox(node) {
  12689. node = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  12690. var nodeName2 = node.props.nodeName;
  12691. return nodeName2 === 'textarea' || nodeName2 === 'input' && !nonTextInputTypes.includes((node.attr('type') || '').toLowerCase());
  12692. }
  12693. var is_native_textbox_default = isNativeTextbox;
  12694. function isNativeSelect(node) {
  12695. node = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  12696. var nodeName2 = node.props.nodeName;
  12697. return nodeName2 === 'select';
  12698. }
  12699. var is_native_select_default = isNativeSelect;
  12700. function isAriaTextbox(node) {
  12701. var role = get_explicit_role_default(node);
  12702. return role === 'textbox';
  12703. }
  12704. var is_aria_textbox_default = isAriaTextbox;
  12705. function isAriaListbox(node) {
  12706. var role = get_explicit_role_default(node);
  12707. return role === 'listbox';
  12708. }
  12709. var is_aria_listbox_default = isAriaListbox;
  12710. function isAriaCombobox(node) {
  12711. var role = get_explicit_role_default(node);
  12712. return role === 'combobox';
  12713. }
  12714. var is_aria_combobox_default = isAriaCombobox;
  12715. var rangeRoles = [ 'progressbar', 'scrollbar', 'slider', 'spinbutton' ];
  12716. function isAriaRange(node) {
  12717. var role = get_explicit_role_default(node);
  12718. return rangeRoles.includes(role);
  12719. }
  12720. var is_aria_range_default = isAriaRange;
  12721. var controlValueRoles = [ 'textbox', 'progressbar', 'scrollbar', 'slider', 'spinbutton', 'combobox', 'listbox' ];
  12722. var _formControlValueMethods = {
  12723. nativeTextboxValue: nativeTextboxValue,
  12724. nativeSelectValue: nativeSelectValue,
  12725. ariaTextboxValue: ariaTextboxValue,
  12726. ariaListboxValue: ariaListboxValue,
  12727. ariaComboboxValue: ariaComboboxValue,
  12728. ariaRangeValue: ariaRangeValue
  12729. };
  12730. function formControlValue(virtualNode) {
  12731. var context3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12732. var actualNode = virtualNode.actualNode;
  12733. var unsupportedRoles = unsupported_default.accessibleNameFromFieldValue || [];
  12734. var role = get_role_default(virtualNode);
  12735. if (context3.startNode === virtualNode || !controlValueRoles.includes(role) || unsupportedRoles.includes(role)) {
  12736. return '';
  12737. }
  12738. var valueMethods = Object.keys(_formControlValueMethods).map(function(name) {
  12739. return _formControlValueMethods[name];
  12740. });
  12741. var valueString = valueMethods.reduce(function(accName, step) {
  12742. return accName || step(virtualNode, context3);
  12743. }, '');
  12744. if (context3.debug) {
  12745. log_default(valueString || '{empty-value}', actualNode, context3);
  12746. }
  12747. return valueString;
  12748. }
  12749. function nativeTextboxValue(node) {
  12750. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  12751. if (is_native_textbox_default(vNode)) {
  12752. return vNode.props.value || '';
  12753. }
  12754. return '';
  12755. }
  12756. function nativeSelectValue(node) {
  12757. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  12758. if (!is_native_select_default(vNode)) {
  12759. return '';
  12760. }
  12761. var options = query_selector_all_default(vNode, 'option');
  12762. var selectedOptions = options.filter(function(option) {
  12763. return option.hasAttr('selected');
  12764. });
  12765. if (!selectedOptions.length) {
  12766. selectedOptions.push(options[0]);
  12767. }
  12768. return selectedOptions.map(function(option) {
  12769. return visible_virtual_default(option);
  12770. }).join(' ') || '';
  12771. }
  12772. function ariaTextboxValue(node) {
  12773. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  12774. var actualNode = vNode.actualNode;
  12775. if (!is_aria_textbox_default(vNode)) {
  12776. return '';
  12777. }
  12778. if (!actualNode || actualNode && !is_hidden_with_css_default(actualNode)) {
  12779. return visible_virtual_default(vNode, true);
  12780. } else {
  12781. return actualNode.textContent;
  12782. }
  12783. }
  12784. function ariaListboxValue(node, context3) {
  12785. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  12786. if (!is_aria_listbox_default(vNode)) {
  12787. return '';
  12788. }
  12789. var selected = get_owned_virtual_default(vNode).filter(function(owned) {
  12790. return get_role_default(owned) === 'option' && owned.attr('aria-selected') === 'true';
  12791. });
  12792. if (selected.length === 0) {
  12793. return '';
  12794. }
  12795. return accessible_text_virtual_default(selected[0], context3);
  12796. }
  12797. function ariaComboboxValue(node, context3) {
  12798. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  12799. if (!is_aria_combobox_default(vNode)) {
  12800. return '';
  12801. }
  12802. var listbox = get_owned_virtual_default(vNode).filter(function(elm) {
  12803. return get_role_default(elm) === 'listbox';
  12804. })[0];
  12805. return listbox ? ariaListboxValue(listbox, context3) : '';
  12806. }
  12807. function ariaRangeValue(node) {
  12808. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  12809. if (!is_aria_range_default(vNode) || !vNode.hasAttr('aria-valuenow')) {
  12810. return '';
  12811. }
  12812. var valueNow = +vNode.attr('aria-valuenow');
  12813. return !isNaN(valueNow) ? String(valueNow) : '0';
  12814. }
  12815. var form_control_value_default = formControlValue;
  12816. function accessibleTextVirtual(virtualNode) {
  12817. var context3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12818. var actualNode = virtualNode.actualNode;
  12819. context3 = prepareContext(virtualNode, context3);
  12820. if (shouldIgnoreHidden(virtualNode, context3)) {
  12821. return '';
  12822. }
  12823. var computationSteps = [ arialabelledby_text_default, arialabel_text_default, native_text_alternative_default, form_control_value_default, subtree_text_default, textNodeValue, title_text_default ];
  12824. var accName = computationSteps.reduce(function(accName2, step) {
  12825. if (context3.startNode === virtualNode) {
  12826. accName2 = sanitize_default(accName2);
  12827. }
  12828. if (accName2 !== '') {
  12829. return accName2;
  12830. }
  12831. return step(virtualNode, context3);
  12832. }, '');
  12833. if (context3.debug) {
  12834. axe.log(accName || '{empty-value}', actualNode, context3);
  12835. }
  12836. return accName;
  12837. }
  12838. function textNodeValue(virtualNode) {
  12839. if (virtualNode.props.nodeType !== 3) {
  12840. return '';
  12841. }
  12842. return virtualNode.props.nodeValue;
  12843. }
  12844. function shouldIgnoreHidden(_ref33, context3) {
  12845. var actualNode = _ref33.actualNode;
  12846. if (!actualNode) {
  12847. return false;
  12848. }
  12849. if (actualNode.nodeType !== 1 || context3.includeHidden) {
  12850. return false;
  12851. }
  12852. return !is_visible_default(actualNode, true);
  12853. }
  12854. function prepareContext(virtualNode, context3) {
  12855. var actualNode = virtualNode.actualNode;
  12856. if (!context3.startNode) {
  12857. context3 = _extends({
  12858. startNode: virtualNode
  12859. }, context3);
  12860. }
  12861. if (!actualNode) {
  12862. return context3;
  12863. }
  12864. if (actualNode.nodeType === 1 && context3.inLabelledByContext && context3.includeHidden === void 0) {
  12865. context3 = _extends({
  12866. includeHidden: !is_visible_default(actualNode, true)
  12867. }, context3);
  12868. }
  12869. return context3;
  12870. }
  12871. accessibleTextVirtual.alreadyProcessed = function alreadyProcessed(virtualnode, context3) {
  12872. context3.processed = context3.processed || [];
  12873. if (context3.processed.includes(virtualnode)) {
  12874. return true;
  12875. }
  12876. context3.processed.push(virtualnode);
  12877. return false;
  12878. };
  12879. var accessible_text_virtual_default = accessibleTextVirtual;
  12880. function accessibleText(element, context3) {
  12881. var virtualNode = get_node_from_tree_default(element);
  12882. return accessible_text_virtual_default(virtualNode, context3);
  12883. }
  12884. var accessible_text_default = accessibleText;
  12885. function arialabelledbyText(vNode) {
  12886. var context3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12887. if (!(vNode instanceof abstract_virtual_node_default)) {
  12888. if (vNode.nodeType !== 1) {
  12889. return '';
  12890. }
  12891. vNode = get_node_from_tree_default(vNode);
  12892. }
  12893. if (vNode.props.nodeType !== 1 || context3.inLabelledByContext || context3.inControlContext || !vNode.attr('aria-labelledby')) {
  12894. return '';
  12895. }
  12896. var refs = idrefs_default(vNode, 'aria-labelledby').filter(function(elm) {
  12897. return elm;
  12898. });
  12899. return refs.reduce(function(accessibleName, elm) {
  12900. var accessibleNameAdd = accessible_text_default(elm, _extends({
  12901. inLabelledByContext: true,
  12902. startNode: context3.startNode || vNode
  12903. }, context3));
  12904. if (!accessibleName) {
  12905. return accessibleNameAdd;
  12906. } else {
  12907. return ''.concat(accessibleName, ' ').concat(accessibleNameAdd);
  12908. }
  12909. }, '');
  12910. }
  12911. var arialabelledby_text_default = arialabelledbyText;
  12912. var text_exports = {};
  12913. __export(text_exports, {
  12914. accessibleText: function accessibleText() {
  12915. return accessible_text_default;
  12916. },
  12917. accessibleTextVirtual: function accessibleTextVirtual() {
  12918. return accessible_text_virtual_default;
  12919. },
  12920. autocomplete: function autocomplete() {
  12921. return _autocomplete;
  12922. },
  12923. formControlValue: function formControlValue() {
  12924. return form_control_value_default;
  12925. },
  12926. formControlValueMethods: function formControlValueMethods() {
  12927. return _formControlValueMethods;
  12928. },
  12929. hasUnicode: function hasUnicode() {
  12930. return has_unicode_default;
  12931. },
  12932. isHumanInterpretable: function isHumanInterpretable() {
  12933. return is_human_interpretable_default;
  12934. },
  12935. isIconLigature: function isIconLigature() {
  12936. return is_icon_ligature_default;
  12937. },
  12938. isValidAutocomplete: function isValidAutocomplete() {
  12939. return is_valid_autocomplete_default;
  12940. },
  12941. label: function label() {
  12942. return label_default;
  12943. },
  12944. labelText: function labelText() {
  12945. return label_text_default;
  12946. },
  12947. labelVirtual: function labelVirtual() {
  12948. return label_virtual_default2;
  12949. },
  12950. nativeElementType: function nativeElementType() {
  12951. return native_element_type_default;
  12952. },
  12953. nativeTextAlternative: function nativeTextAlternative() {
  12954. return native_text_alternative_default;
  12955. },
  12956. nativeTextMethods: function nativeTextMethods() {
  12957. return native_text_methods_default;
  12958. },
  12959. removeUnicode: function removeUnicode() {
  12960. return remove_unicode_default;
  12961. },
  12962. sanitize: function sanitize() {
  12963. return sanitize_default;
  12964. },
  12965. subtreeText: function subtreeText() {
  12966. return subtree_text_default;
  12967. },
  12968. titleText: function titleText() {
  12969. return title_text_default;
  12970. },
  12971. unsupported: function unsupported() {
  12972. return unsupported_default;
  12973. },
  12974. visible: function visible() {
  12975. return visible_default;
  12976. },
  12977. visibleTextNodes: function visibleTextNodes() {
  12978. return visible_text_nodes_default;
  12979. },
  12980. visibleVirtual: function visibleVirtual() {
  12981. return visible_virtual_default;
  12982. }
  12983. });
  12984. function getUnicodeNonBmpRegExp() {
  12985. return /[\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u20A0-\u20CF\u20D0-\u20FF\u2100-\u214F\u2150-\u218F\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u2400-\u243F\u2440-\u245F\u2460-\u24FF\u2500-\u257F\u2580-\u259F\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\uE000-\uF8FF]/g;
  12986. }
  12987. function getPunctuationRegExp() {
  12988. return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&\xa3\xa2\xa5\xa7\u20ac()*+,\-.\/:;<=>?@\[\]^_`{|}~\xb1]/g;
  12989. }
  12990. function getSupplementaryPrivateUseRegExp() {
  12991. return /[\uDB80-\uDBBF][\uDC00-\uDFFF]/g;
  12992. }
  12993. var emoji_regex = __toModule(require_emoji_regex());
  12994. function hasUnicode(str, options) {
  12995. var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
  12996. if (emoji) {
  12997. return emoji_regex['default']().test(str);
  12998. }
  12999. if (nonBmp) {
  13000. return getUnicodeNonBmpRegExp().test(str) || getSupplementaryPrivateUseRegExp().test(str);
  13001. }
  13002. if (punctuations) {
  13003. return getPunctuationRegExp().test(str);
  13004. }
  13005. return false;
  13006. }
  13007. var has_unicode_default = hasUnicode;
  13008. var emoji_regex2 = __toModule(require_emoji_regex());
  13009. function removeUnicode(str, options) {
  13010. var emoji = options.emoji, nonBmp = options.nonBmp, punctuations = options.punctuations;
  13011. if (emoji) {
  13012. str = str.replace(emoji_regex2['default'](), '');
  13013. }
  13014. if (nonBmp) {
  13015. str = str.replace(getUnicodeNonBmpRegExp(), '');
  13016. str = str.replace(getSupplementaryPrivateUseRegExp(), '');
  13017. }
  13018. if (punctuations) {
  13019. str = str.replace(getPunctuationRegExp(), '');
  13020. }
  13021. return str;
  13022. }
  13023. var remove_unicode_default = removeUnicode;
  13024. function isHumanInterpretable(str) {
  13025. if (!str.length) {
  13026. return 0;
  13027. }
  13028. var alphaNumericIconMap = [ 'x', 'i' ];
  13029. if (alphaNumericIconMap.includes(str)) {
  13030. return 0;
  13031. }
  13032. var noUnicodeStr = remove_unicode_default(str, {
  13033. emoji: true,
  13034. nonBmp: true,
  13035. punctuations: true
  13036. });
  13037. if (!sanitize_default(noUnicodeStr)) {
  13038. return 0;
  13039. }
  13040. return 1;
  13041. }
  13042. var is_human_interpretable_default = isHumanInterpretable;
  13043. function isIconLigature(textVNode) {
  13044. var differenceThreshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .15;
  13045. var occuranceThreshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
  13046. var nodeValue = textVNode.actualNode.nodeValue.trim();
  13047. if (!sanitize_default(nodeValue) || has_unicode_default(nodeValue, {
  13048. emoji: true,
  13049. nonBmp: true
  13050. })) {
  13051. return false;
  13052. }
  13053. if (!cache_default.get('canvasContext')) {
  13054. cache_default.set('canvasContext', document.createElement('canvas').getContext('2d'));
  13055. }
  13056. var canvasContext = cache_default.get('canvasContext');
  13057. var canvas = canvasContext.canvas;
  13058. if (!cache_default.get('fonts')) {
  13059. cache_default.set('fonts', {});
  13060. }
  13061. var fonts = cache_default.get('fonts');
  13062. var style = window.getComputedStyle(textVNode.parent.actualNode);
  13063. var fontFamily = style.getPropertyValue('font-family');
  13064. if (!fonts[fontFamily]) {
  13065. fonts[fontFamily] = {
  13066. occurances: 0,
  13067. numLigatures: 0
  13068. };
  13069. }
  13070. var font = fonts[fontFamily];
  13071. if (font.occurances >= occuranceThreshold) {
  13072. if (font.numLigatures / font.occurances === 1) {
  13073. return true;
  13074. } else if (font.numLigatures === 0) {
  13075. return false;
  13076. }
  13077. }
  13078. font.occurances++;
  13079. var fontSize = 30;
  13080. var fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
  13081. canvasContext.font = fontStyle;
  13082. var firstChar = nodeValue.charAt(0);
  13083. var width = canvasContext.measureText(firstChar).width;
  13084. if (width < 30) {
  13085. var diff = 30 / width;
  13086. width *= diff;
  13087. fontSize *= diff;
  13088. fontStyle = ''.concat(fontSize, 'px ').concat(fontFamily);
  13089. }
  13090. canvas.width = width;
  13091. canvas.height = fontSize;
  13092. canvasContext.font = fontStyle;
  13093. canvasContext.textAlign = 'left';
  13094. canvasContext.textBaseline = 'top';
  13095. canvasContext.fillText(firstChar, 0, 0);
  13096. var compareData = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
  13097. if (!compareData.some(function(pixel) {
  13098. return pixel;
  13099. })) {
  13100. font.numLigatures++;
  13101. return true;
  13102. }
  13103. canvasContext.clearRect(0, 0, width, fontSize);
  13104. canvasContext.fillText(nodeValue, 0, 0);
  13105. var compareWith = new Uint32Array(canvasContext.getImageData(0, 0, width, fontSize).data.buffer);
  13106. var differences = compareData.reduce(function(diff, pixel, i) {
  13107. if (pixel === 0 && compareWith[i] === 0) {
  13108. return diff;
  13109. }
  13110. if (pixel !== 0 && compareWith[i] !== 0) {
  13111. return diff;
  13112. }
  13113. return ++diff;
  13114. }, 0);
  13115. var expectedWidth = nodeValue.split('').reduce(function(width2, _char3) {
  13116. return width2 + canvasContext.measureText(_char3).width;
  13117. }, 0);
  13118. var actualWidth = canvasContext.measureText(nodeValue).width;
  13119. var pixelDifference = differences / compareData.length;
  13120. var sizeDifference = 1 - actualWidth / expectedWidth;
  13121. if (pixelDifference >= differenceThreshold && sizeDifference >= differenceThreshold) {
  13122. font.numLigatures++;
  13123. return true;
  13124. }
  13125. return false;
  13126. }
  13127. var is_icon_ligature_default = isIconLigature;
  13128. var _autocomplete = {
  13129. stateTerms: [ 'on', 'off' ],
  13130. 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', 'one-time-code' ],
  13131. qualifiers: [ 'home', 'work', 'mobile', 'fax', 'pager' ],
  13132. qualifiedTerms: [ 'tel', 'tel-country-code', 'tel-national', 'tel-area-code', 'tel-local', 'tel-local-prefix', 'tel-local-suffix', 'tel-extension', 'email', 'impp' ],
  13133. locations: [ 'billing', 'shipping' ]
  13134. };
  13135. function isValidAutocomplete(autocompleteValue) {
  13136. var _ref34 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref34$looseTyped = _ref34.looseTyped, looseTyped = _ref34$looseTyped === void 0 ? false : _ref34$looseTyped, _ref34$stateTerms = _ref34.stateTerms, stateTerms = _ref34$stateTerms === void 0 ? [] : _ref34$stateTerms, _ref34$locations = _ref34.locations, locations = _ref34$locations === void 0 ? [] : _ref34$locations, _ref34$qualifiers = _ref34.qualifiers, qualifiers = _ref34$qualifiers === void 0 ? [] : _ref34$qualifiers, _ref34$standaloneTerm = _ref34.standaloneTerms, standaloneTerms = _ref34$standaloneTerm === void 0 ? [] : _ref34$standaloneTerm, _ref34$qualifiedTerms = _ref34.qualifiedTerms, qualifiedTerms = _ref34$qualifiedTerms === void 0 ? [] : _ref34$qualifiedTerms;
  13137. autocompleteValue = autocompleteValue.toLowerCase().trim();
  13138. stateTerms = stateTerms.concat(_autocomplete.stateTerms);
  13139. if (stateTerms.includes(autocompleteValue) || autocompleteValue === '') {
  13140. return true;
  13141. }
  13142. qualifiers = qualifiers.concat(_autocomplete.qualifiers);
  13143. locations = locations.concat(_autocomplete.locations);
  13144. standaloneTerms = standaloneTerms.concat(_autocomplete.standaloneTerms);
  13145. qualifiedTerms = qualifiedTerms.concat(_autocomplete.qualifiedTerms);
  13146. var autocompleteTerms = autocompleteValue.split(/\s+/g);
  13147. if (!looseTyped) {
  13148. if (autocompleteTerms[0].length > 8 && autocompleteTerms[0].substr(0, 8) === 'section-') {
  13149. autocompleteTerms.shift();
  13150. }
  13151. if (locations.includes(autocompleteTerms[0])) {
  13152. autocompleteTerms.shift();
  13153. }
  13154. if (qualifiers.includes(autocompleteTerms[0])) {
  13155. autocompleteTerms.shift();
  13156. standaloneTerms = [];
  13157. }
  13158. if (autocompleteTerms.length !== 1) {
  13159. return false;
  13160. }
  13161. }
  13162. var purposeTerm = autocompleteTerms[autocompleteTerms.length - 1];
  13163. return standaloneTerms.includes(purposeTerm) || qualifiedTerms.includes(purposeTerm);
  13164. }
  13165. var is_valid_autocomplete_default = isValidAutocomplete;
  13166. function visible(element, screenReader, noRecursing) {
  13167. element = get_node_from_tree_default(element);
  13168. return visible_virtual_default(element, screenReader, noRecursing);
  13169. }
  13170. var visible_default = visible;
  13171. function labelVirtual2(virtualNode) {
  13172. var ref, candidate, doc;
  13173. candidate = label_virtual_default(virtualNode);
  13174. if (candidate) {
  13175. return candidate;
  13176. }
  13177. if (virtualNode.attr('id')) {
  13178. if (!virtualNode.actualNode) {
  13179. throw new TypeError('Cannot resolve explicit label reference for non-DOM nodes');
  13180. }
  13181. var id = escape_selector_default(virtualNode.attr('id'));
  13182. doc = get_root_node_default2(virtualNode.actualNode);
  13183. ref = doc.querySelector('label[for="' + id + '"]');
  13184. candidate = ref && visible_default(ref, true);
  13185. if (candidate) {
  13186. return candidate;
  13187. }
  13188. }
  13189. ref = closest_default(virtualNode, 'label');
  13190. candidate = ref && visible_virtual_default(ref, true);
  13191. if (candidate) {
  13192. return candidate;
  13193. }
  13194. return null;
  13195. }
  13196. var label_virtual_default2 = labelVirtual2;
  13197. function label(node) {
  13198. node = get_node_from_tree_default(node);
  13199. return label_virtual_default2(node);
  13200. }
  13201. var label_default = label;
  13202. var nativeElementType = [ {
  13203. matches: [ {
  13204. nodeName: 'textarea'
  13205. }, {
  13206. nodeName: 'input',
  13207. properties: {
  13208. type: [ 'text', 'password', 'search', 'tel', 'email', 'url' ]
  13209. }
  13210. } ],
  13211. namingMethods: 'labelText'
  13212. }, {
  13213. matches: {
  13214. nodeName: 'input',
  13215. properties: {
  13216. type: [ 'button', 'submit', 'reset' ]
  13217. }
  13218. },
  13219. namingMethods: [ 'valueText', 'titleText', 'buttonDefaultText' ]
  13220. }, {
  13221. matches: {
  13222. nodeName: 'input',
  13223. properties: {
  13224. type: 'image'
  13225. }
  13226. },
  13227. namingMethods: [ 'altText', 'valueText', 'labelText', 'titleText', 'buttonDefaultText' ]
  13228. }, {
  13229. matches: 'button',
  13230. namingMethods: 'subtreeText'
  13231. }, {
  13232. matches: 'fieldset',
  13233. namingMethods: 'fieldsetLegendText'
  13234. }, {
  13235. matches: 'OUTPUT',
  13236. namingMethods: 'subtreeText'
  13237. }, {
  13238. matches: [ {
  13239. nodeName: 'select'
  13240. }, {
  13241. nodeName: 'input',
  13242. properties: {
  13243. type: /^(?!text|password|search|tel|email|url|button|submit|reset)/
  13244. }
  13245. } ],
  13246. namingMethods: 'labelText'
  13247. }, {
  13248. matches: 'summary',
  13249. namingMethods: 'subtreeText'
  13250. }, {
  13251. matches: 'figure',
  13252. namingMethods: [ 'figureText', 'titleText' ]
  13253. }, {
  13254. matches: 'img',
  13255. namingMethods: 'altText'
  13256. }, {
  13257. matches: 'table',
  13258. namingMethods: [ 'tableCaptionText', 'tableSummaryText' ]
  13259. }, {
  13260. matches: [ 'hr', 'br' ],
  13261. namingMethods: [ 'titleText', 'singleSpace' ]
  13262. } ];
  13263. var native_element_type_default = nativeElementType;
  13264. function visibleTextNodes(vNode) {
  13265. var parentVisible = is_visible_default(vNode.actualNode);
  13266. var nodes = [];
  13267. vNode.children.forEach(function(child) {
  13268. if (child.actualNode.nodeType === 3) {
  13269. if (parentVisible) {
  13270. nodes.push(child);
  13271. }
  13272. } else {
  13273. nodes = nodes.concat(visibleTextNodes(child));
  13274. }
  13275. });
  13276. return nodes;
  13277. }
  13278. var visible_text_nodes_default = visibleTextNodes;
  13279. var idRefsRegex = /^idrefs?$/;
  13280. function cacheIdRefs(node, idRefs, refAttrs) {
  13281. if (node.hasAttribute) {
  13282. if (node.nodeName.toUpperCase() === 'LABEL' && node.hasAttribute('for')) {
  13283. var id = node.getAttribute('for');
  13284. idRefs[id] = idRefs[id] || [];
  13285. idRefs[id].push(node);
  13286. }
  13287. for (var _i11 = 0; _i11 < refAttrs.length; ++_i11) {
  13288. var attr = refAttrs[_i11];
  13289. var attrValue = sanitize_default(node.getAttribute(attr) || '');
  13290. if (!attrValue) {
  13291. continue;
  13292. }
  13293. var tokens = token_list_default(attrValue);
  13294. for (var k = 0; k < tokens.length; ++k) {
  13295. idRefs[tokens[k]] = idRefs[tokens[k]] || [];
  13296. idRefs[tokens[k]].push(node);
  13297. }
  13298. }
  13299. }
  13300. for (var _i12 = 0; _i12 < node.children.length; _i12++) {
  13301. cacheIdRefs(node.children[_i12], idRefs, refAttrs);
  13302. }
  13303. }
  13304. function getAccessibleRefs(node) {
  13305. node = node.actualNode || node;
  13306. var root = get_root_node_default2(node);
  13307. root = root.documentElement || root;
  13308. var idRefsByRoot = cache_default.get('idRefsByRoot');
  13309. if (!idRefsByRoot) {
  13310. idRefsByRoot = new WeakMap();
  13311. cache_default.set('idRefsByRoot', idRefsByRoot);
  13312. }
  13313. var idRefs = idRefsByRoot.get(root);
  13314. if (!idRefs) {
  13315. idRefs = {};
  13316. idRefsByRoot.set(root, idRefs);
  13317. var refAttrs = Object.keys(standards_default.ariaAttrs).filter(function(attr) {
  13318. var type = standards_default.ariaAttrs[attr].type;
  13319. return idRefsRegex.test(type);
  13320. });
  13321. cacheIdRefs(root, idRefs, refAttrs);
  13322. }
  13323. return idRefs[node.id] || [];
  13324. }
  13325. var get_accessible_refs_default = getAccessibleRefs;
  13326. function getRoleType(role) {
  13327. var roleDef = standards_default.ariaRoles[role];
  13328. if (!roleDef) {
  13329. return null;
  13330. }
  13331. return roleDef.type;
  13332. }
  13333. var get_role_type_default = getRoleType;
  13334. function isAriaRoleAllowedOnElement(node, role) {
  13335. var vNode = node instanceof abstract_virtual_node_default ? node : get_node_from_tree_default(node);
  13336. var implicitRole3 = implicit_role_default(vNode);
  13337. if (role === implicitRole3) {
  13338. return true;
  13339. }
  13340. var spec = get_element_spec_default(vNode);
  13341. if (Array.isArray(spec.allowedRoles)) {
  13342. return spec.allowedRoles.includes(role);
  13343. }
  13344. return !!spec.allowedRoles;
  13345. }
  13346. var is_aria_role_allowed_on_element_default = isAriaRoleAllowedOnElement;
  13347. var dpubRoles2 = [ 'doc-backlink', 'doc-biblioentry', 'doc-biblioref', 'doc-cover', 'doc-endnote', 'doc-glossref', 'doc-noteref' ];
  13348. function getRoleSegments(node) {
  13349. var roles = [];
  13350. if (!node) {
  13351. return roles;
  13352. }
  13353. if (node.hasAttribute('role')) {
  13354. var nodeRoles = token_list_default(node.getAttribute('role').toLowerCase());
  13355. roles = roles.concat(nodeRoles);
  13356. }
  13357. if (node.hasAttributeNS('http://www.idpf.org/2007/ops', 'type')) {
  13358. var epubRoles = token_list_default(node.getAttributeNS('http://www.idpf.org/2007/ops', 'type').toLowerCase()).map(function(role) {
  13359. return 'doc-'.concat(role);
  13360. });
  13361. roles = roles.concat(epubRoles);
  13362. }
  13363. roles = roles.filter(function(role) {
  13364. return is_valid_role_default(role);
  13365. });
  13366. return roles;
  13367. }
  13368. function getElementUnallowedRoles(node) {
  13369. var allowImplicit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  13370. var tagName = node.nodeName.toUpperCase();
  13371. if (!is_html_element_default(node)) {
  13372. return [];
  13373. }
  13374. var roleSegments = getRoleSegments(node);
  13375. var implicitRole3 = implicit_role_default(node);
  13376. var unallowedRoles = roleSegments.filter(function(role) {
  13377. if (allowImplicit && role === implicitRole3) {
  13378. return false;
  13379. }
  13380. if (allowImplicit && dpubRoles2.includes(role)) {
  13381. var roleType = get_role_type_default(role);
  13382. if (implicitRole3 !== roleType) {
  13383. return true;
  13384. }
  13385. }
  13386. if (!allowImplicit && !(role === 'row' && tagName === 'TR' && element_matches_default(node, 'table[role="grid"] > tr'))) {
  13387. return true;
  13388. }
  13389. return !is_aria_role_allowed_on_element_default(node, role);
  13390. });
  13391. return unallowedRoles;
  13392. }
  13393. var get_element_unallowed_roles_default = getElementUnallowedRoles;
  13394. function getAriaRolesByType(type) {
  13395. return Object.keys(standards_default.ariaRoles).filter(function(roleName) {
  13396. return standards_default.ariaRoles[roleName].type === type;
  13397. });
  13398. }
  13399. var get_aria_roles_by_type_default = getAriaRolesByType;
  13400. function getRolesByType(roleType) {
  13401. return get_aria_roles_by_type_default(roleType);
  13402. }
  13403. var get_roles_by_type_default = getRolesByType;
  13404. function getAriaRolesSupportingNameFromContent() {
  13405. if (cache_default.get('ariaRolesNameFromContent')) {
  13406. return cache_default.get('ariaRolesNameFromContent');
  13407. }
  13408. var contentRoles = Object.keys(standards_default.ariaRoles).filter(function(roleName) {
  13409. return standards_default.ariaRoles[roleName].nameFromContent;
  13410. });
  13411. cache_default.set('ariaRolesNameFromContent', contentRoles);
  13412. return contentRoles;
  13413. }
  13414. var get_aria_roles_supporting_name_from_content_default = getAriaRolesSupportingNameFromContent;
  13415. function getRolesWithNameFromContents() {
  13416. return get_aria_roles_supporting_name_from_content_default();
  13417. }
  13418. var get_roles_with_name_from_contents_default = getRolesWithNameFromContents;
  13419. var isNull = function isNull(value) {
  13420. return value === null;
  13421. };
  13422. var isNotNull = function isNotNull(value) {
  13423. return value !== null;
  13424. };
  13425. var lookupTable = {};
  13426. lookupTable.attributes = {
  13427. 'aria-activedescendant': {
  13428. type: 'idref',
  13429. allowEmpty: true,
  13430. unsupported: false
  13431. },
  13432. 'aria-atomic': {
  13433. type: 'boolean',
  13434. values: [ 'true', 'false' ],
  13435. unsupported: false
  13436. },
  13437. 'aria-autocomplete': {
  13438. type: 'nmtoken',
  13439. values: [ 'inline', 'list', 'both', 'none' ],
  13440. unsupported: false
  13441. },
  13442. 'aria-busy': {
  13443. type: 'boolean',
  13444. values: [ 'true', 'false' ],
  13445. unsupported: false
  13446. },
  13447. 'aria-checked': {
  13448. type: 'nmtoken',
  13449. values: [ 'true', 'false', 'mixed', 'undefined' ],
  13450. unsupported: false
  13451. },
  13452. 'aria-colcount': {
  13453. type: 'int',
  13454. unsupported: false
  13455. },
  13456. 'aria-colindex': {
  13457. type: 'int',
  13458. unsupported: false
  13459. },
  13460. 'aria-colspan': {
  13461. type: 'int',
  13462. unsupported: false
  13463. },
  13464. 'aria-controls': {
  13465. type: 'idrefs',
  13466. allowEmpty: true,
  13467. unsupported: false
  13468. },
  13469. 'aria-current': {
  13470. type: 'nmtoken',
  13471. allowEmpty: true,
  13472. values: [ 'page', 'step', 'location', 'date', 'time', 'true', 'false' ],
  13473. unsupported: false
  13474. },
  13475. 'aria-describedby': {
  13476. type: 'idrefs',
  13477. allowEmpty: true,
  13478. unsupported: false
  13479. },
  13480. 'aria-describedat': {
  13481. unsupported: true,
  13482. unstandardized: true
  13483. },
  13484. 'aria-details': {
  13485. type: 'idref',
  13486. allowEmpty: true,
  13487. unsupported: false
  13488. },
  13489. 'aria-disabled': {
  13490. type: 'boolean',
  13491. values: [ 'true', 'false' ],
  13492. unsupported: false
  13493. },
  13494. 'aria-dropeffect': {
  13495. type: 'nmtokens',
  13496. values: [ 'copy', 'move', 'reference', 'execute', 'popup', 'none' ],
  13497. unsupported: false
  13498. },
  13499. 'aria-errormessage': {
  13500. type: 'idref',
  13501. allowEmpty: true,
  13502. unsupported: false
  13503. },
  13504. 'aria-expanded': {
  13505. type: 'nmtoken',
  13506. values: [ 'true', 'false', 'undefined' ],
  13507. unsupported: false
  13508. },
  13509. 'aria-flowto': {
  13510. type: 'idrefs',
  13511. allowEmpty: true,
  13512. unsupported: false
  13513. },
  13514. 'aria-grabbed': {
  13515. type: 'nmtoken',
  13516. values: [ 'true', 'false', 'undefined' ],
  13517. unsupported: false
  13518. },
  13519. 'aria-haspopup': {
  13520. type: 'nmtoken',
  13521. allowEmpty: true,
  13522. values: [ 'true', 'false', 'menu', 'listbox', 'tree', 'grid', 'dialog' ],
  13523. unsupported: false
  13524. },
  13525. 'aria-hidden': {
  13526. type: 'boolean',
  13527. values: [ 'true', 'false' ],
  13528. unsupported: false
  13529. },
  13530. 'aria-invalid': {
  13531. type: 'nmtoken',
  13532. allowEmpty: true,
  13533. values: [ 'true', 'false', 'spelling', 'grammar' ],
  13534. unsupported: false
  13535. },
  13536. 'aria-keyshortcuts': {
  13537. type: 'string',
  13538. allowEmpty: true,
  13539. unsupported: false
  13540. },
  13541. 'aria-label': {
  13542. type: 'string',
  13543. allowEmpty: true,
  13544. unsupported: false
  13545. },
  13546. 'aria-labelledby': {
  13547. type: 'idrefs',
  13548. allowEmpty: true,
  13549. unsupported: false
  13550. },
  13551. 'aria-level': {
  13552. type: 'int',
  13553. unsupported: false
  13554. },
  13555. 'aria-live': {
  13556. type: 'nmtoken',
  13557. values: [ 'off', 'polite', 'assertive' ],
  13558. unsupported: false
  13559. },
  13560. 'aria-modal': {
  13561. type: 'boolean',
  13562. values: [ 'true', 'false' ],
  13563. unsupported: false
  13564. },
  13565. 'aria-multiline': {
  13566. type: 'boolean',
  13567. values: [ 'true', 'false' ],
  13568. unsupported: false
  13569. },
  13570. 'aria-multiselectable': {
  13571. type: 'boolean',
  13572. values: [ 'true', 'false' ],
  13573. unsupported: false
  13574. },
  13575. 'aria-orientation': {
  13576. type: 'nmtoken',
  13577. values: [ 'horizontal', 'vertical' ],
  13578. unsupported: false
  13579. },
  13580. 'aria-owns': {
  13581. type: 'idrefs',
  13582. allowEmpty: true,
  13583. unsupported: false
  13584. },
  13585. 'aria-placeholder': {
  13586. type: 'string',
  13587. allowEmpty: true,
  13588. unsupported: false
  13589. },
  13590. 'aria-posinset': {
  13591. type: 'int',
  13592. unsupported: false
  13593. },
  13594. 'aria-pressed': {
  13595. type: 'nmtoken',
  13596. values: [ 'true', 'false', 'mixed', 'undefined' ],
  13597. unsupported: false
  13598. },
  13599. 'aria-readonly': {
  13600. type: 'boolean',
  13601. values: [ 'true', 'false' ],
  13602. unsupported: false
  13603. },
  13604. 'aria-relevant': {
  13605. type: 'nmtokens',
  13606. values: [ 'additions', 'removals', 'text', 'all' ],
  13607. unsupported: false
  13608. },
  13609. 'aria-required': {
  13610. type: 'boolean',
  13611. values: [ 'true', 'false' ],
  13612. unsupported: false
  13613. },
  13614. 'aria-roledescription': {
  13615. type: 'string',
  13616. allowEmpty: true,
  13617. unsupported: false
  13618. },
  13619. 'aria-rowcount': {
  13620. type: 'int',
  13621. unsupported: false
  13622. },
  13623. 'aria-rowindex': {
  13624. type: 'int',
  13625. unsupported: false
  13626. },
  13627. 'aria-rowspan': {
  13628. type: 'int',
  13629. unsupported: false
  13630. },
  13631. 'aria-selected': {
  13632. type: 'nmtoken',
  13633. values: [ 'true', 'false', 'undefined' ],
  13634. unsupported: false
  13635. },
  13636. 'aria-setsize': {
  13637. type: 'int',
  13638. unsupported: false
  13639. },
  13640. 'aria-sort': {
  13641. type: 'nmtoken',
  13642. values: [ 'ascending', 'descending', 'other', 'none' ],
  13643. unsupported: false
  13644. },
  13645. 'aria-valuemax': {
  13646. type: 'decimal',
  13647. unsupported: false
  13648. },
  13649. 'aria-valuemin': {
  13650. type: 'decimal',
  13651. unsupported: false
  13652. },
  13653. 'aria-valuenow': {
  13654. type: 'decimal',
  13655. unsupported: false
  13656. },
  13657. 'aria-valuetext': {
  13658. type: 'string',
  13659. unsupported: false
  13660. }
  13661. };
  13662. lookupTable.globalAttributes = [ 'aria-atomic', 'aria-busy', 'aria-controls', 'aria-current', 'aria-describedby', 'aria-details', 'aria-disabled', 'aria-dropeffect', 'aria-flowto', 'aria-grabbed', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-keyshortcuts', 'aria-label', 'aria-labelledby', 'aria-live', 'aria-owns', 'aria-relevant', 'aria-roledescription' ];
  13663. lookupTable.role = {
  13664. alert: {
  13665. type: 'widget',
  13666. attributes: {
  13667. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13668. },
  13669. owned: null,
  13670. nameFrom: [ 'author' ],
  13671. context: null,
  13672. unsupported: false,
  13673. allowedElements: [ 'section' ]
  13674. },
  13675. alertdialog: {
  13676. type: 'widget',
  13677. attributes: {
  13678. allowed: [ 'aria-expanded', 'aria-modal', 'aria-errormessage' ]
  13679. },
  13680. owned: null,
  13681. nameFrom: [ 'author' ],
  13682. context: null,
  13683. unsupported: false,
  13684. allowedElements: [ 'dialog', 'section' ]
  13685. },
  13686. application: {
  13687. type: 'landmark',
  13688. attributes: {
  13689. allowed: [ 'aria-expanded', 'aria-errormessage', 'aria-activedescendant' ]
  13690. },
  13691. owned: null,
  13692. nameFrom: [ 'author' ],
  13693. context: null,
  13694. unsupported: false,
  13695. allowedElements: [ 'article', 'audio', 'embed', 'iframe', 'object', 'section', 'svg', 'video' ]
  13696. },
  13697. article: {
  13698. type: 'structure',
  13699. attributes: {
  13700. allowed: [ 'aria-expanded', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
  13701. },
  13702. owned: null,
  13703. nameFrom: [ 'author' ],
  13704. context: null,
  13705. implicit: [ 'article' ],
  13706. unsupported: false
  13707. },
  13708. banner: {
  13709. type: 'landmark',
  13710. attributes: {
  13711. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13712. },
  13713. owned: null,
  13714. nameFrom: [ 'author' ],
  13715. context: null,
  13716. implicit: [ 'header' ],
  13717. unsupported: false,
  13718. allowedElements: [ 'section' ]
  13719. },
  13720. button: {
  13721. type: 'widget',
  13722. attributes: {
  13723. allowed: [ 'aria-expanded', 'aria-pressed', 'aria-errormessage' ]
  13724. },
  13725. owned: null,
  13726. nameFrom: [ 'author', 'contents' ],
  13727. context: null,
  13728. implicit: [ 'button', 'input[type="button"]', 'input[type="image"]', 'input[type="reset"]', 'input[type="submit"]', 'summary' ],
  13729. unsupported: false,
  13730. allowedElements: [ {
  13731. nodeName: 'a',
  13732. attributes: {
  13733. href: isNotNull
  13734. }
  13735. } ]
  13736. },
  13737. cell: {
  13738. type: 'structure',
  13739. attributes: {
  13740. allowed: [ 'aria-colindex', 'aria-colspan', 'aria-rowindex', 'aria-rowspan', 'aria-errormessage' ]
  13741. },
  13742. owned: null,
  13743. nameFrom: [ 'author', 'contents' ],
  13744. context: [ 'row' ],
  13745. implicit: [ 'td', 'th' ],
  13746. unsupported: false
  13747. },
  13748. checkbox: {
  13749. type: 'widget',
  13750. attributes: {
  13751. allowed: [ 'aria-checked', 'aria-required', 'aria-readonly', 'aria-errormessage' ]
  13752. },
  13753. owned: null,
  13754. nameFrom: [ 'author', 'contents' ],
  13755. context: null,
  13756. implicit: [ 'input[type="checkbox"]' ],
  13757. unsupported: false,
  13758. allowedElements: [ 'button' ]
  13759. },
  13760. columnheader: {
  13761. type: 'structure',
  13762. attributes: {
  13763. allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort', 'aria-errormessage' ]
  13764. },
  13765. owned: null,
  13766. nameFrom: [ 'author', 'contents' ],
  13767. context: [ 'row' ],
  13768. implicit: [ 'th' ],
  13769. unsupported: false
  13770. },
  13771. combobox: {
  13772. type: 'composite',
  13773. attributes: {
  13774. allowed: [ 'aria-autocomplete', 'aria-required', 'aria-activedescendant', 'aria-orientation', 'aria-errormessage' ],
  13775. required: [ 'aria-expanded' ]
  13776. },
  13777. owned: {
  13778. all: [ 'listbox', 'tree', 'grid', 'dialog', 'textbox' ]
  13779. },
  13780. nameFrom: [ 'author' ],
  13781. context: null,
  13782. unsupported: false,
  13783. allowedElements: [ {
  13784. nodeName: 'input',
  13785. properties: {
  13786. type: [ 'text', 'search', 'tel', 'url', 'email' ]
  13787. }
  13788. } ]
  13789. },
  13790. command: {
  13791. nameFrom: [ 'author' ],
  13792. type: 'abstract',
  13793. unsupported: false
  13794. },
  13795. complementary: {
  13796. type: 'landmark',
  13797. attributes: {
  13798. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13799. },
  13800. owned: null,
  13801. nameFrom: [ 'author' ],
  13802. context: null,
  13803. implicit: [ 'aside' ],
  13804. unsupported: false,
  13805. allowedElements: [ 'section' ]
  13806. },
  13807. composite: {
  13808. nameFrom: [ 'author' ],
  13809. type: 'abstract',
  13810. unsupported: false
  13811. },
  13812. contentinfo: {
  13813. type: 'landmark',
  13814. attributes: {
  13815. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13816. },
  13817. owned: null,
  13818. nameFrom: [ 'author' ],
  13819. context: null,
  13820. implicit: [ 'footer' ],
  13821. unsupported: false,
  13822. allowedElements: [ 'section' ]
  13823. },
  13824. definition: {
  13825. type: 'structure',
  13826. attributes: {
  13827. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13828. },
  13829. owned: null,
  13830. nameFrom: [ 'author' ],
  13831. context: null,
  13832. implicit: [ 'dd', 'dfn' ],
  13833. unsupported: false
  13834. },
  13835. dialog: {
  13836. type: 'widget',
  13837. attributes: {
  13838. allowed: [ 'aria-expanded', 'aria-modal', 'aria-errormessage' ]
  13839. },
  13840. owned: null,
  13841. nameFrom: [ 'author' ],
  13842. context: null,
  13843. implicit: [ 'dialog' ],
  13844. unsupported: false,
  13845. allowedElements: [ 'section' ]
  13846. },
  13847. directory: {
  13848. type: 'structure',
  13849. attributes: {
  13850. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13851. },
  13852. owned: null,
  13853. nameFrom: [ 'author', 'contents' ],
  13854. context: null,
  13855. unsupported: false,
  13856. allowedElements: [ 'ol', 'ul' ]
  13857. },
  13858. document: {
  13859. type: 'structure',
  13860. attributes: {
  13861. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13862. },
  13863. owned: null,
  13864. nameFrom: [ 'author' ],
  13865. context: null,
  13866. implicit: [ 'body' ],
  13867. unsupported: false,
  13868. allowedElements: [ 'article', 'embed', 'iframe', 'object', 'section', 'svg' ]
  13869. },
  13870. 'doc-abstract': {
  13871. type: 'section',
  13872. attributes: {
  13873. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13874. },
  13875. owned: null,
  13876. nameFrom: [ 'author' ],
  13877. context: null,
  13878. unsupported: false,
  13879. allowedElements: [ 'section' ]
  13880. },
  13881. 'doc-acknowledgments': {
  13882. type: 'landmark',
  13883. attributes: {
  13884. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13885. },
  13886. owned: null,
  13887. nameFrom: [ 'author' ],
  13888. context: null,
  13889. unsupported: false,
  13890. allowedElements: [ 'section' ]
  13891. },
  13892. 'doc-afterword': {
  13893. type: 'landmark',
  13894. attributes: {
  13895. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13896. },
  13897. owned: null,
  13898. nameFrom: [ 'author' ],
  13899. context: null,
  13900. unsupported: false,
  13901. allowedElements: [ 'section' ]
  13902. },
  13903. 'doc-appendix': {
  13904. type: 'landmark',
  13905. attributes: {
  13906. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13907. },
  13908. owned: null,
  13909. nameFrom: [ 'author' ],
  13910. context: null,
  13911. unsupported: false,
  13912. allowedElements: [ 'section' ]
  13913. },
  13914. 'doc-backlink': {
  13915. type: 'link',
  13916. attributes: {
  13917. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13918. },
  13919. owned: null,
  13920. nameFrom: [ 'author', 'contents' ],
  13921. context: null,
  13922. unsupported: false,
  13923. allowedElements: [ {
  13924. nodeName: 'a',
  13925. attributes: {
  13926. href: isNotNull
  13927. }
  13928. } ]
  13929. },
  13930. 'doc-biblioentry': {
  13931. type: 'listitem',
  13932. attributes: {
  13933. allowed: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
  13934. },
  13935. owned: null,
  13936. nameFrom: [ 'author' ],
  13937. context: [ 'doc-bibliography' ],
  13938. unsupported: false,
  13939. allowedElements: [ 'li' ]
  13940. },
  13941. 'doc-bibliography': {
  13942. type: 'landmark',
  13943. attributes: {
  13944. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13945. },
  13946. owned: {
  13947. one: [ 'doc-biblioentry' ]
  13948. },
  13949. nameFrom: [ 'author' ],
  13950. context: null,
  13951. unsupported: false,
  13952. allowedElements: [ 'section' ]
  13953. },
  13954. 'doc-biblioref': {
  13955. type: 'link',
  13956. attributes: {
  13957. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13958. },
  13959. owned: null,
  13960. nameFrom: [ 'author', 'contents' ],
  13961. context: null,
  13962. unsupported: false,
  13963. allowedElements: [ {
  13964. nodeName: 'a',
  13965. attributes: {
  13966. href: isNotNull
  13967. }
  13968. } ]
  13969. },
  13970. 'doc-chapter': {
  13971. type: 'landmark',
  13972. attributes: {
  13973. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13974. },
  13975. owned: null,
  13976. namefrom: [ 'author' ],
  13977. context: null,
  13978. unsupported: false,
  13979. allowedElements: [ 'section' ]
  13980. },
  13981. 'doc-colophon': {
  13982. type: 'section',
  13983. attributes: {
  13984. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13985. },
  13986. owned: null,
  13987. namefrom: [ 'author' ],
  13988. context: null,
  13989. unsupported: false,
  13990. allowedElements: [ 'section' ]
  13991. },
  13992. 'doc-conclusion': {
  13993. type: 'landmark',
  13994. attributes: {
  13995. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  13996. },
  13997. owned: null,
  13998. namefrom: [ 'author' ],
  13999. context: null,
  14000. unsupported: false,
  14001. allowedElements: [ 'section' ]
  14002. },
  14003. 'doc-cover': {
  14004. type: 'img',
  14005. attributes: {
  14006. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14007. },
  14008. owned: null,
  14009. namefrom: [ 'author' ],
  14010. context: null,
  14011. unsupported: false
  14012. },
  14013. 'doc-credit': {
  14014. type: 'section',
  14015. attributes: {
  14016. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14017. },
  14018. owned: null,
  14019. namefrom: [ 'author' ],
  14020. context: null,
  14021. unsupported: false,
  14022. allowedElements: [ 'section' ]
  14023. },
  14024. 'doc-credits': {
  14025. type: 'landmark',
  14026. attributes: {
  14027. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14028. },
  14029. owned: null,
  14030. namefrom: [ 'author' ],
  14031. context: null,
  14032. unsupported: false,
  14033. allowedElements: [ 'section' ]
  14034. },
  14035. 'doc-dedication': {
  14036. type: 'section',
  14037. attributes: {
  14038. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14039. },
  14040. owned: null,
  14041. namefrom: [ 'author' ],
  14042. context: null,
  14043. unsupported: false,
  14044. allowedElements: [ 'section' ]
  14045. },
  14046. 'doc-endnote': {
  14047. type: 'listitem',
  14048. attributes: {
  14049. allowed: [ 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
  14050. },
  14051. owned: null,
  14052. namefrom: [ 'author' ],
  14053. context: [ 'doc-endnotes' ],
  14054. unsupported: false,
  14055. allowedElements: [ 'li' ]
  14056. },
  14057. 'doc-endnotes': {
  14058. type: 'landmark',
  14059. attributes: {
  14060. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14061. },
  14062. owned: {
  14063. one: [ 'doc-endnote' ]
  14064. },
  14065. namefrom: [ 'author' ],
  14066. context: null,
  14067. unsupported: false,
  14068. allowedElements: [ 'section' ]
  14069. },
  14070. 'doc-epigraph': {
  14071. type: 'section',
  14072. attributes: {
  14073. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14074. },
  14075. owned: null,
  14076. namefrom: [ 'author' ],
  14077. context: null,
  14078. unsupported: false
  14079. },
  14080. 'doc-epilogue': {
  14081. type: 'landmark',
  14082. attributes: {
  14083. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14084. },
  14085. owned: null,
  14086. namefrom: [ 'author' ],
  14087. context: null,
  14088. unsupported: false,
  14089. allowedElements: [ 'section' ]
  14090. },
  14091. 'doc-errata': {
  14092. type: 'landmark',
  14093. attributes: {
  14094. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14095. },
  14096. owned: null,
  14097. namefrom: [ 'author' ],
  14098. context: null,
  14099. unsupported: false,
  14100. allowedElements: [ 'section' ]
  14101. },
  14102. 'doc-example': {
  14103. type: 'section',
  14104. attributes: {
  14105. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14106. },
  14107. owned: null,
  14108. namefrom: [ 'author' ],
  14109. context: null,
  14110. unsupported: false,
  14111. allowedElements: [ 'aside', 'section' ]
  14112. },
  14113. 'doc-footnote': {
  14114. type: 'section',
  14115. attributes: {
  14116. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14117. },
  14118. owned: null,
  14119. namefrom: [ 'author' ],
  14120. context: null,
  14121. unsupported: false,
  14122. allowedElements: [ 'aside', 'footer', 'header' ]
  14123. },
  14124. 'doc-foreword': {
  14125. type: 'landmark',
  14126. attributes: {
  14127. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14128. },
  14129. owned: null,
  14130. namefrom: [ 'author' ],
  14131. context: null,
  14132. unsupported: false,
  14133. allowedElements: [ 'section' ]
  14134. },
  14135. 'doc-glossary': {
  14136. type: 'landmark',
  14137. attributes: {
  14138. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14139. },
  14140. owned: [ 'term', 'definition' ],
  14141. namefrom: [ 'author' ],
  14142. context: null,
  14143. unsupported: false,
  14144. allowedElements: [ 'dl' ]
  14145. },
  14146. 'doc-glossref': {
  14147. type: 'link',
  14148. attributes: {
  14149. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14150. },
  14151. owned: null,
  14152. namefrom: [ 'author', 'contents' ],
  14153. context: null,
  14154. unsupported: false,
  14155. allowedElements: [ {
  14156. nodeName: 'a',
  14157. attributes: {
  14158. href: isNotNull
  14159. }
  14160. } ]
  14161. },
  14162. 'doc-index': {
  14163. type: 'navigation',
  14164. attributes: {
  14165. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14166. },
  14167. owned: null,
  14168. namefrom: [ 'author' ],
  14169. context: null,
  14170. unsupported: false,
  14171. allowedElements: [ 'nav', 'section' ]
  14172. },
  14173. 'doc-introduction': {
  14174. type: 'landmark',
  14175. attributes: {
  14176. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14177. },
  14178. owned: null,
  14179. namefrom: [ 'author' ],
  14180. context: null,
  14181. unsupported: false,
  14182. allowedElements: [ 'section' ]
  14183. },
  14184. 'doc-noteref': {
  14185. type: 'link',
  14186. attributes: {
  14187. allowed: [ 'aria-expanded' ]
  14188. },
  14189. owned: null,
  14190. namefrom: [ 'author', 'contents' ],
  14191. context: null,
  14192. unsupported: false,
  14193. allowedElements: [ {
  14194. nodeName: 'a',
  14195. attributes: {
  14196. href: isNotNull
  14197. }
  14198. } ]
  14199. },
  14200. 'doc-notice': {
  14201. type: 'note',
  14202. attributes: {
  14203. allowed: [ 'aria-expanded' ]
  14204. },
  14205. owned: null,
  14206. namefrom: [ 'author' ],
  14207. context: null,
  14208. unsupported: false,
  14209. allowedElements: [ 'section' ]
  14210. },
  14211. 'doc-pagebreak': {
  14212. type: 'separator',
  14213. attributes: {
  14214. allowed: [ 'aria-expanded' ]
  14215. },
  14216. owned: null,
  14217. namefrom: [ 'author' ],
  14218. context: null,
  14219. unsupported: false,
  14220. allowedElements: [ 'hr' ]
  14221. },
  14222. 'doc-pagelist': {
  14223. type: 'navigation',
  14224. attributes: {
  14225. allowed: [ 'aria-expanded' ]
  14226. },
  14227. owned: null,
  14228. namefrom: [ 'author' ],
  14229. context: null,
  14230. unsupported: false,
  14231. allowedElements: [ 'nav', 'section' ]
  14232. },
  14233. 'doc-part': {
  14234. type: 'landmark',
  14235. attributes: {
  14236. allowed: [ 'aria-expanded' ]
  14237. },
  14238. owned: null,
  14239. namefrom: [ 'author' ],
  14240. context: null,
  14241. unsupported: false,
  14242. allowedElements: [ 'section' ]
  14243. },
  14244. 'doc-preface': {
  14245. type: 'landmark',
  14246. attributes: {
  14247. allowed: [ 'aria-expanded' ]
  14248. },
  14249. owned: null,
  14250. namefrom: [ 'author' ],
  14251. context: null,
  14252. unsupported: false,
  14253. allowedElements: [ 'section' ]
  14254. },
  14255. 'doc-prologue': {
  14256. type: 'landmark',
  14257. attributes: {
  14258. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14259. },
  14260. owned: null,
  14261. namefrom: [ 'author' ],
  14262. context: null,
  14263. unsupported: false,
  14264. allowedElements: [ 'section' ]
  14265. },
  14266. 'doc-pullquote': {
  14267. type: 'none',
  14268. attributes: {
  14269. allowed: [ 'aria-expanded' ]
  14270. },
  14271. owned: null,
  14272. namefrom: [ 'author' ],
  14273. context: null,
  14274. unsupported: false,
  14275. allowedElements: [ 'aside', 'section' ]
  14276. },
  14277. 'doc-qna': {
  14278. type: 'section',
  14279. attributes: {
  14280. allowed: [ 'aria-expanded' ]
  14281. },
  14282. owned: null,
  14283. namefrom: [ 'author' ],
  14284. context: null,
  14285. unsupported: false,
  14286. allowedElements: [ 'section' ]
  14287. },
  14288. 'doc-subtitle': {
  14289. type: 'sectionhead',
  14290. attributes: {
  14291. allowed: [ 'aria-expanded' ]
  14292. },
  14293. owned: null,
  14294. namefrom: [ 'author' ],
  14295. context: null,
  14296. unsupported: false,
  14297. allowedElements: {
  14298. nodeName: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ]
  14299. }
  14300. },
  14301. 'doc-tip': {
  14302. type: 'note',
  14303. attributes: {
  14304. allowed: [ 'aria-expanded' ]
  14305. },
  14306. owned: null,
  14307. namefrom: [ 'author' ],
  14308. context: null,
  14309. unsupported: false,
  14310. allowedElements: [ 'aside' ]
  14311. },
  14312. 'doc-toc': {
  14313. type: 'navigation',
  14314. attributes: {
  14315. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14316. },
  14317. owned: null,
  14318. namefrom: [ 'author' ],
  14319. context: null,
  14320. unsupported: false,
  14321. allowedElements: [ 'nav', 'section' ]
  14322. },
  14323. feed: {
  14324. type: 'structure',
  14325. attributes: {
  14326. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14327. },
  14328. owned: {
  14329. one: [ 'article' ]
  14330. },
  14331. nameFrom: [ 'author' ],
  14332. context: null,
  14333. unsupported: false,
  14334. allowedElements: [ 'article', 'aside', 'section' ]
  14335. },
  14336. figure: {
  14337. type: 'structure',
  14338. attributes: {
  14339. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14340. },
  14341. owned: null,
  14342. nameFrom: [ 'author', 'contents' ],
  14343. context: null,
  14344. implicit: [ 'figure' ],
  14345. unsupported: false
  14346. },
  14347. form: {
  14348. type: 'landmark',
  14349. attributes: {
  14350. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14351. },
  14352. owned: null,
  14353. nameFrom: [ 'author' ],
  14354. context: null,
  14355. implicit: [ 'form' ],
  14356. unsupported: false
  14357. },
  14358. grid: {
  14359. type: 'composite',
  14360. attributes: {
  14361. allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-colcount', 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-rowcount', 'aria-errormessage' ]
  14362. },
  14363. owned: {
  14364. one: [ 'rowgroup', 'row' ]
  14365. },
  14366. nameFrom: [ 'author' ],
  14367. context: null,
  14368. implicit: [ 'table' ],
  14369. unsupported: false
  14370. },
  14371. gridcell: {
  14372. type: 'widget',
  14373. attributes: {
  14374. allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-selected', 'aria-readonly', 'aria-required', 'aria-errormessage' ]
  14375. },
  14376. owned: null,
  14377. nameFrom: [ 'author', 'contents' ],
  14378. context: [ 'row' ],
  14379. implicit: [ 'td', 'th' ],
  14380. unsupported: false
  14381. },
  14382. group: {
  14383. type: 'structure',
  14384. attributes: {
  14385. allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-errormessage' ]
  14386. },
  14387. owned: null,
  14388. nameFrom: [ 'author' ],
  14389. context: null,
  14390. implicit: [ 'details', 'optgroup' ],
  14391. unsupported: false,
  14392. allowedElements: [ 'dl', 'figcaption', 'fieldset', 'figure', 'footer', 'header', 'ol', 'ul' ]
  14393. },
  14394. heading: {
  14395. type: 'structure',
  14396. attributes: {
  14397. required: [ 'aria-level' ],
  14398. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14399. },
  14400. owned: null,
  14401. nameFrom: [ 'author', 'contents' ],
  14402. context: null,
  14403. implicit: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ],
  14404. unsupported: false
  14405. },
  14406. img: {
  14407. type: 'structure',
  14408. attributes: {
  14409. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14410. },
  14411. owned: null,
  14412. nameFrom: [ 'author' ],
  14413. context: null,
  14414. implicit: [ 'img' ],
  14415. unsupported: false,
  14416. allowedElements: [ 'embed', 'iframe', 'object', 'svg' ]
  14417. },
  14418. input: {
  14419. nameFrom: [ 'author' ],
  14420. type: 'abstract',
  14421. unsupported: false
  14422. },
  14423. landmark: {
  14424. nameFrom: [ 'author' ],
  14425. type: 'abstract',
  14426. unsupported: false
  14427. },
  14428. link: {
  14429. type: 'widget',
  14430. attributes: {
  14431. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14432. },
  14433. owned: null,
  14434. nameFrom: [ 'author', 'contents' ],
  14435. context: null,
  14436. implicit: [ 'a[href]', 'area[href]' ],
  14437. unsupported: false,
  14438. allowedElements: [ 'button', {
  14439. nodeName: 'input',
  14440. properties: {
  14441. type: [ 'image', 'button' ]
  14442. }
  14443. } ]
  14444. },
  14445. list: {
  14446. type: 'structure',
  14447. attributes: {
  14448. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14449. },
  14450. owned: {
  14451. all: [ 'listitem' ]
  14452. },
  14453. nameFrom: [ 'author' ],
  14454. context: null,
  14455. implicit: [ 'ol', 'ul', 'dl' ],
  14456. unsupported: false
  14457. },
  14458. listbox: {
  14459. type: 'composite',
  14460. attributes: {
  14461. allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
  14462. },
  14463. owned: {
  14464. all: [ 'option' ]
  14465. },
  14466. nameFrom: [ 'author' ],
  14467. context: null,
  14468. implicit: [ 'select' ],
  14469. unsupported: false,
  14470. allowedElements: [ 'ol', 'ul' ]
  14471. },
  14472. listitem: {
  14473. type: 'structure',
  14474. attributes: {
  14475. allowed: [ 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-errormessage' ]
  14476. },
  14477. owned: null,
  14478. nameFrom: [ 'author', 'contents' ],
  14479. context: [ 'list' ],
  14480. implicit: [ 'li', 'dt' ],
  14481. unsupported: false
  14482. },
  14483. log: {
  14484. type: 'widget',
  14485. attributes: {
  14486. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14487. },
  14488. owned: null,
  14489. nameFrom: [ 'author' ],
  14490. context: null,
  14491. unsupported: false,
  14492. allowedElements: [ 'section' ]
  14493. },
  14494. main: {
  14495. type: 'landmark',
  14496. attributes: {
  14497. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14498. },
  14499. owned: null,
  14500. nameFrom: [ 'author' ],
  14501. context: null,
  14502. implicit: [ 'main' ],
  14503. unsupported: false,
  14504. allowedElements: [ 'article', 'section' ]
  14505. },
  14506. marquee: {
  14507. type: 'widget',
  14508. attributes: {
  14509. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14510. },
  14511. owned: null,
  14512. nameFrom: [ 'author' ],
  14513. context: null,
  14514. unsupported: false,
  14515. allowedElements: [ 'section' ]
  14516. },
  14517. math: {
  14518. type: 'structure',
  14519. attributes: {
  14520. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14521. },
  14522. owned: null,
  14523. nameFrom: [ 'author' ],
  14524. context: null,
  14525. implicit: [ 'math' ],
  14526. unsupported: false
  14527. },
  14528. menu: {
  14529. type: 'composite',
  14530. attributes: {
  14531. allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
  14532. },
  14533. owned: {
  14534. one: [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ]
  14535. },
  14536. nameFrom: [ 'author' ],
  14537. context: null,
  14538. implicit: [ 'menu[type="context"]' ],
  14539. unsupported: false,
  14540. allowedElements: [ 'ol', 'ul' ]
  14541. },
  14542. menubar: {
  14543. type: 'composite',
  14544. attributes: {
  14545. allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
  14546. },
  14547. owned: {
  14548. one: [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ]
  14549. },
  14550. nameFrom: [ 'author' ],
  14551. context: null,
  14552. unsupported: false,
  14553. allowedElements: [ 'ol', 'ul' ]
  14554. },
  14555. menuitem: {
  14556. type: 'widget',
  14557. attributes: {
  14558. allowed: [ 'aria-posinset', 'aria-setsize', 'aria-expanded', 'aria-errormessage' ]
  14559. },
  14560. owned: null,
  14561. nameFrom: [ 'author', 'contents' ],
  14562. context: [ 'menu', 'menubar' ],
  14563. implicit: [ 'menuitem[type="command"]' ],
  14564. unsupported: false,
  14565. allowedElements: [ 'button', 'li', {
  14566. nodeName: 'iput',
  14567. properties: {
  14568. type: [ 'image', 'button' ]
  14569. }
  14570. }, {
  14571. nodeName: 'a',
  14572. attributes: {
  14573. href: isNotNull
  14574. }
  14575. } ]
  14576. },
  14577. menuitemcheckbox: {
  14578. type: 'widget',
  14579. attributes: {
  14580. allowed: [ 'aria-checked', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
  14581. },
  14582. owned: null,
  14583. nameFrom: [ 'author', 'contents' ],
  14584. context: [ 'menu', 'menubar' ],
  14585. implicit: [ 'menuitem[type="checkbox"]' ],
  14586. unsupported: false,
  14587. allowedElements: [ {
  14588. nodeName: [ 'button', 'li' ]
  14589. }, {
  14590. nodeName: 'input',
  14591. properties: {
  14592. type: [ 'checkbox', 'image', 'button' ]
  14593. }
  14594. }, {
  14595. nodeName: 'a',
  14596. attributes: {
  14597. href: isNotNull
  14598. }
  14599. } ]
  14600. },
  14601. menuitemradio: {
  14602. type: 'widget',
  14603. attributes: {
  14604. allowed: [ 'aria-checked', 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
  14605. },
  14606. owned: null,
  14607. nameFrom: [ 'author', 'contents' ],
  14608. context: [ 'menu', 'menubar' ],
  14609. implicit: [ 'menuitem[type="radio"]' ],
  14610. unsupported: false,
  14611. allowedElements: [ {
  14612. nodeName: [ 'button', 'li' ]
  14613. }, {
  14614. nodeName: 'input',
  14615. properties: {
  14616. type: [ 'image', 'button', 'radio' ]
  14617. }
  14618. }, {
  14619. nodeName: 'a',
  14620. attributes: {
  14621. href: isNotNull
  14622. }
  14623. } ]
  14624. },
  14625. navigation: {
  14626. type: 'landmark',
  14627. attributes: {
  14628. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14629. },
  14630. owned: null,
  14631. nameFrom: [ 'author' ],
  14632. context: null,
  14633. implicit: [ 'nav' ],
  14634. unsupported: false,
  14635. allowedElements: [ 'section' ]
  14636. },
  14637. none: {
  14638. type: 'structure',
  14639. attributes: null,
  14640. owned: null,
  14641. nameFrom: [ 'author' ],
  14642. context: null,
  14643. unsupported: false,
  14644. allowedElements: [ {
  14645. nodeName: [ 'article', 'aside', 'dl', 'embed', 'figcaption', 'fieldset', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'iframe', 'li', 'ol', 'section', 'ul' ]
  14646. }, {
  14647. nodeName: 'img',
  14648. attributes: {
  14649. alt: isNotNull
  14650. }
  14651. } ]
  14652. },
  14653. note: {
  14654. type: 'structure',
  14655. attributes: {
  14656. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14657. },
  14658. owned: null,
  14659. nameFrom: [ 'author' ],
  14660. context: null,
  14661. unsupported: false,
  14662. allowedElements: [ 'aside' ]
  14663. },
  14664. option: {
  14665. type: 'widget',
  14666. attributes: {
  14667. allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-checked', 'aria-errormessage' ]
  14668. },
  14669. owned: null,
  14670. nameFrom: [ 'author', 'contents' ],
  14671. context: [ 'listbox' ],
  14672. implicit: [ 'option' ],
  14673. unsupported: false,
  14674. allowedElements: [ {
  14675. nodeName: [ 'button', 'li' ]
  14676. }, {
  14677. nodeName: 'input',
  14678. properties: {
  14679. type: [ 'checkbox', 'button' ]
  14680. }
  14681. }, {
  14682. nodeName: 'a',
  14683. attributes: {
  14684. href: isNotNull
  14685. }
  14686. } ]
  14687. },
  14688. presentation: {
  14689. type: 'structure',
  14690. attributes: null,
  14691. owned: null,
  14692. nameFrom: [ 'author' ],
  14693. context: null,
  14694. unsupported: false,
  14695. allowedElements: [ {
  14696. nodeName: [ 'article', 'aside', 'dl', 'embed', 'figcaption', 'fieldset', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'iframe', 'li', 'ol', 'section', 'ul' ]
  14697. }, {
  14698. nodeName: 'img',
  14699. attributes: {
  14700. alt: isNotNull
  14701. }
  14702. } ]
  14703. },
  14704. progressbar: {
  14705. type: 'widget',
  14706. attributes: {
  14707. allowed: [ 'aria-valuetext', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin', 'aria-expanded', 'aria-errormessage' ]
  14708. },
  14709. owned: null,
  14710. nameFrom: [ 'author' ],
  14711. context: null,
  14712. implicit: [ 'progress' ],
  14713. unsupported: false
  14714. },
  14715. radio: {
  14716. type: 'widget',
  14717. attributes: {
  14718. allowed: [ 'aria-selected', 'aria-posinset', 'aria-setsize', 'aria-required', 'aria-errormessage', 'aria-checked' ]
  14719. },
  14720. owned: null,
  14721. nameFrom: [ 'author', 'contents' ],
  14722. context: null,
  14723. implicit: [ 'input[type="radio"]' ],
  14724. unsupported: false,
  14725. allowedElements: [ {
  14726. nodeName: [ 'button', 'li' ]
  14727. }, {
  14728. nodeName: 'input',
  14729. properties: {
  14730. type: [ 'image', 'button' ]
  14731. }
  14732. } ]
  14733. },
  14734. radiogroup: {
  14735. type: 'composite',
  14736. attributes: {
  14737. allowed: [ 'aria-activedescendant', 'aria-required', 'aria-expanded', 'aria-readonly', 'aria-errormessage', 'aria-orientation' ]
  14738. },
  14739. owned: {
  14740. all: [ 'radio' ]
  14741. },
  14742. nameFrom: [ 'author' ],
  14743. context: null,
  14744. unsupported: false,
  14745. allowedElements: {
  14746. nodeName: [ 'ol', 'ul', 'fieldset' ]
  14747. }
  14748. },
  14749. range: {
  14750. nameFrom: [ 'author' ],
  14751. type: 'abstract',
  14752. unsupported: false
  14753. },
  14754. region: {
  14755. type: 'landmark',
  14756. attributes: {
  14757. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14758. },
  14759. owned: null,
  14760. nameFrom: [ 'author' ],
  14761. context: null,
  14762. implicit: [ 'section[aria-label]', 'section[aria-labelledby]', 'section[title]' ],
  14763. unsupported: false,
  14764. allowedElements: {
  14765. nodeName: [ 'article', 'aside' ]
  14766. }
  14767. },
  14768. roletype: {
  14769. type: 'abstract',
  14770. unsupported: false
  14771. },
  14772. row: {
  14773. type: 'structure',
  14774. attributes: {
  14775. allowed: [ 'aria-activedescendant', 'aria-colindex', 'aria-expanded', 'aria-level', 'aria-selected', 'aria-rowindex', 'aria-errormessage' ]
  14776. },
  14777. owned: {
  14778. one: [ 'cell', 'columnheader', 'rowheader', 'gridcell' ]
  14779. },
  14780. nameFrom: [ 'author', 'contents' ],
  14781. context: [ 'rowgroup', 'grid', 'treegrid', 'table' ],
  14782. implicit: [ 'tr' ],
  14783. unsupported: false
  14784. },
  14785. rowgroup: {
  14786. type: 'structure',
  14787. attributes: {
  14788. allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-errormessage' ]
  14789. },
  14790. owned: {
  14791. all: [ 'row' ]
  14792. },
  14793. nameFrom: [ 'author', 'contents' ],
  14794. context: [ 'grid', 'table', 'treegrid' ],
  14795. implicit: [ 'tbody', 'thead', 'tfoot' ],
  14796. unsupported: false
  14797. },
  14798. rowheader: {
  14799. type: 'structure',
  14800. attributes: {
  14801. allowed: [ 'aria-colindex', 'aria-colspan', 'aria-expanded', 'aria-rowindex', 'aria-rowspan', 'aria-required', 'aria-readonly', 'aria-selected', 'aria-sort', 'aria-errormessage' ]
  14802. },
  14803. owned: null,
  14804. nameFrom: [ 'author', 'contents' ],
  14805. context: [ 'row' ],
  14806. implicit: [ 'th' ],
  14807. unsupported: false
  14808. },
  14809. scrollbar: {
  14810. type: 'widget',
  14811. attributes: {
  14812. required: [ 'aria-controls', 'aria-valuenow' ],
  14813. allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ]
  14814. },
  14815. owned: null,
  14816. nameFrom: [ 'author' ],
  14817. context: null,
  14818. unsupported: false
  14819. },
  14820. search: {
  14821. type: 'landmark',
  14822. attributes: {
  14823. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14824. },
  14825. owned: null,
  14826. nameFrom: [ 'author' ],
  14827. context: null,
  14828. unsupported: false,
  14829. allowedElements: {
  14830. nodeName: [ 'aside', 'form', 'section' ]
  14831. }
  14832. },
  14833. searchbox: {
  14834. type: 'widget',
  14835. attributes: {
  14836. allowed: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required', 'aria-placeholder', 'aria-errormessage' ]
  14837. },
  14838. owned: null,
  14839. nameFrom: [ 'author' ],
  14840. context: null,
  14841. implicit: [ 'input[type="search"]' ],
  14842. unsupported: false,
  14843. allowedElements: {
  14844. nodeName: 'input',
  14845. properties: {
  14846. type: 'text'
  14847. }
  14848. }
  14849. },
  14850. section: {
  14851. nameFrom: [ 'author', 'contents' ],
  14852. type: 'abstract',
  14853. unsupported: false
  14854. },
  14855. sectionhead: {
  14856. nameFrom: [ 'author', 'contents' ],
  14857. type: 'abstract',
  14858. unsupported: false
  14859. },
  14860. select: {
  14861. nameFrom: [ 'author' ],
  14862. type: 'abstract',
  14863. unsupported: false
  14864. },
  14865. separator: {
  14866. type: 'structure',
  14867. attributes: {
  14868. allowed: [ 'aria-expanded', 'aria-orientation', 'aria-valuenow', 'aria-valuemax', 'aria-valuemin', 'aria-valuetext', 'aria-errormessage' ]
  14869. },
  14870. owned: null,
  14871. nameFrom: [ 'author' ],
  14872. context: null,
  14873. implicit: [ 'hr' ],
  14874. unsupported: false,
  14875. allowedElements: [ 'li' ]
  14876. },
  14877. slider: {
  14878. type: 'widget',
  14879. attributes: {
  14880. allowed: [ 'aria-valuetext', 'aria-orientation', 'aria-readonly', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ],
  14881. required: [ 'aria-valuenow' ]
  14882. },
  14883. owned: null,
  14884. nameFrom: [ 'author' ],
  14885. context: null,
  14886. implicit: [ 'input[type="range"]' ],
  14887. unsupported: false
  14888. },
  14889. spinbutton: {
  14890. type: 'widget',
  14891. attributes: {
  14892. allowed: [ 'aria-valuetext', 'aria-required', 'aria-readonly', 'aria-errormessage', 'aria-valuemax', 'aria-valuemin' ],
  14893. required: [ 'aria-valuenow' ]
  14894. },
  14895. owned: null,
  14896. nameFrom: [ 'author' ],
  14897. context: null,
  14898. implicit: [ 'input[type="number"]' ],
  14899. unsupported: false,
  14900. allowedElements: {
  14901. nodeName: 'input',
  14902. properties: {
  14903. type: [ 'text', 'tel' ]
  14904. }
  14905. }
  14906. },
  14907. status: {
  14908. type: 'widget',
  14909. attributes: {
  14910. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14911. },
  14912. owned: null,
  14913. nameFrom: [ 'author' ],
  14914. context: null,
  14915. implicit: [ 'output' ],
  14916. unsupported: false,
  14917. allowedElements: [ 'section' ]
  14918. },
  14919. structure: {
  14920. type: 'abstract',
  14921. unsupported: false
  14922. },
  14923. switch: {
  14924. type: 'widget',
  14925. attributes: {
  14926. allowed: [ 'aria-errormessage' ],
  14927. required: [ 'aria-checked' ]
  14928. },
  14929. owned: null,
  14930. nameFrom: [ 'author', 'contents' ],
  14931. context: null,
  14932. unsupported: false,
  14933. allowedElements: [ 'button', {
  14934. nodeName: 'input',
  14935. properties: {
  14936. type: [ 'checkbox', 'image', 'button' ]
  14937. }
  14938. }, {
  14939. nodeName: 'a',
  14940. attributes: {
  14941. href: isNotNull
  14942. }
  14943. } ]
  14944. },
  14945. tab: {
  14946. type: 'widget',
  14947. attributes: {
  14948. allowed: [ 'aria-selected', 'aria-expanded', 'aria-setsize', 'aria-posinset', 'aria-errormessage' ]
  14949. },
  14950. owned: null,
  14951. nameFrom: [ 'author', 'contents' ],
  14952. context: [ 'tablist' ],
  14953. unsupported: false,
  14954. allowedElements: [ {
  14955. nodeName: [ 'button', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'li' ]
  14956. }, {
  14957. nodeName: 'input',
  14958. properties: {
  14959. type: 'button'
  14960. }
  14961. }, {
  14962. nodeName: 'a',
  14963. attributes: {
  14964. href: isNotNull
  14965. }
  14966. } ]
  14967. },
  14968. table: {
  14969. type: 'structure',
  14970. attributes: {
  14971. allowed: [ 'aria-colcount', 'aria-rowcount', 'aria-errormessage' ]
  14972. },
  14973. owned: {
  14974. one: [ 'rowgroup', 'row' ]
  14975. },
  14976. nameFrom: [ 'author', 'contents' ],
  14977. context: null,
  14978. implicit: [ 'table' ],
  14979. unsupported: false
  14980. },
  14981. tablist: {
  14982. type: 'composite',
  14983. attributes: {
  14984. allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-orientation', 'aria-errormessage' ]
  14985. },
  14986. owned: {
  14987. all: [ 'tab' ]
  14988. },
  14989. nameFrom: [ 'author' ],
  14990. context: null,
  14991. unsupported: false,
  14992. allowedElements: [ 'ol', 'ul' ]
  14993. },
  14994. tabpanel: {
  14995. type: 'widget',
  14996. attributes: {
  14997. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  14998. },
  14999. owned: null,
  15000. nameFrom: [ 'author' ],
  15001. context: null,
  15002. unsupported: false,
  15003. allowedElements: [ 'section' ]
  15004. },
  15005. term: {
  15006. type: 'structure',
  15007. attributes: {
  15008. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15009. },
  15010. owned: null,
  15011. nameFrom: [ 'author', 'contents' ],
  15012. context: null,
  15013. implicit: [ 'dt' ],
  15014. unsupported: false
  15015. },
  15016. textbox: {
  15017. type: 'widget',
  15018. attributes: {
  15019. allowed: [ 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-readonly', 'aria-required', 'aria-placeholder', 'aria-errormessage' ]
  15020. },
  15021. owned: null,
  15022. nameFrom: [ 'author' ],
  15023. context: null,
  15024. implicit: [ 'input[type="text"]', 'input[type="email"]', 'input[type="password"]', 'input[type="tel"]', 'input[type="url"]', 'input:not([type])', 'textarea' ],
  15025. unsupported: false
  15026. },
  15027. timer: {
  15028. type: 'widget',
  15029. attributes: {
  15030. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15031. },
  15032. owned: null,
  15033. nameFrom: [ 'author' ],
  15034. context: null,
  15035. unsupported: false
  15036. },
  15037. toolbar: {
  15038. type: 'structure',
  15039. attributes: {
  15040. allowed: [ 'aria-activedescendant', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
  15041. },
  15042. owned: null,
  15043. nameFrom: [ 'author' ],
  15044. context: null,
  15045. implicit: [ 'menu[type="toolbar"]' ],
  15046. unsupported: false,
  15047. allowedElements: [ 'ol', 'ul' ]
  15048. },
  15049. tooltip: {
  15050. type: 'structure',
  15051. attributes: {
  15052. allowed: [ 'aria-expanded', 'aria-errormessage' ]
  15053. },
  15054. owned: null,
  15055. nameFrom: [ 'author', 'contents' ],
  15056. context: null,
  15057. unsupported: false
  15058. },
  15059. tree: {
  15060. type: 'composite',
  15061. attributes: {
  15062. allowed: [ 'aria-activedescendant', 'aria-multiselectable', 'aria-required', 'aria-expanded', 'aria-orientation', 'aria-errormessage' ]
  15063. },
  15064. owned: {
  15065. all: [ 'treeitem' ]
  15066. },
  15067. nameFrom: [ 'author' ],
  15068. context: null,
  15069. unsupported: false,
  15070. allowedElements: [ 'ol', 'ul' ]
  15071. },
  15072. treegrid: {
  15073. type: 'composite',
  15074. attributes: {
  15075. allowed: [ 'aria-activedescendant', 'aria-colcount', 'aria-expanded', 'aria-level', 'aria-multiselectable', 'aria-readonly', 'aria-required', 'aria-rowcount', 'aria-orientation', 'aria-errormessage' ]
  15076. },
  15077. owned: {
  15078. one: [ 'rowgroup', 'row' ]
  15079. },
  15080. nameFrom: [ 'author' ],
  15081. context: null,
  15082. unsupported: false
  15083. },
  15084. treeitem: {
  15085. type: 'widget',
  15086. attributes: {
  15087. allowed: [ 'aria-checked', 'aria-selected', 'aria-expanded', 'aria-level', 'aria-posinset', 'aria-setsize', 'aria-errormessage' ]
  15088. },
  15089. owned: null,
  15090. nameFrom: [ 'author', 'contents' ],
  15091. context: [ 'group', 'tree' ],
  15092. unsupported: false,
  15093. allowedElements: [ 'li', {
  15094. nodeName: 'a',
  15095. attributes: {
  15096. href: isNotNull
  15097. }
  15098. } ]
  15099. },
  15100. widget: {
  15101. type: 'abstract',
  15102. unsupported: false
  15103. },
  15104. window: {
  15105. nameFrom: [ 'author' ],
  15106. type: 'abstract',
  15107. unsupported: false
  15108. }
  15109. };
  15110. lookupTable.implicitHtmlRole = implicit_html_roles_default;
  15111. lookupTable.elementsAllowedNoRole = [ {
  15112. nodeName: [ 'base', 'body', 'caption', 'col', 'colgroup', 'datalist', 'dd', 'details', 'dt', 'head', 'html', 'keygen', 'label', 'legend', 'main', 'map', 'math', 'meta', 'meter', 'noscript', 'optgroup', 'param', 'picture', 'progress', 'script', 'source', 'style', 'template', 'textarea', 'title', 'track' ]
  15113. }, {
  15114. nodeName: 'area',
  15115. attributes: {
  15116. href: isNotNull
  15117. }
  15118. }, {
  15119. nodeName: 'input',
  15120. properties: {
  15121. type: [ 'color', 'data', 'datatime', 'file', 'hidden', 'month', 'number', 'password', 'range', 'reset', 'submit', 'time', 'week' ]
  15122. }
  15123. }, {
  15124. nodeName: 'link',
  15125. attributes: {
  15126. href: isNotNull
  15127. }
  15128. }, {
  15129. nodeName: 'menu',
  15130. attributes: {
  15131. type: 'context'
  15132. }
  15133. }, {
  15134. nodeName: 'menuitem',
  15135. attributes: {
  15136. type: [ 'command', 'checkbox', 'radio' ]
  15137. }
  15138. }, {
  15139. nodeName: 'select',
  15140. condition: function condition(vNode) {
  15141. if (!(vNode instanceof axe.AbstractVirtualNode)) {
  15142. vNode = axe.utils.getNodeFromTree(vNode);
  15143. }
  15144. return Number(vNode.attr('size')) > 1;
  15145. },
  15146. properties: {
  15147. multiple: true
  15148. }
  15149. }, {
  15150. nodeName: [ 'clippath', 'cursor', 'defs', 'desc', 'feblend', 'fecolormatrix', 'fecomponenttransfer', 'fecomposite', 'feconvolvematrix', 'fediffuselighting', 'fedisplacementmap', 'fedistantlight', 'fedropshadow', 'feflood', 'fefunca', 'fefuncb', 'fefuncg', 'fefuncr', 'fegaussianblur', 'feimage', 'femerge', 'femergenode', 'femorphology', 'feoffset', 'fepointlight', 'fespecularlighting', 'fespotlight', 'fetile', 'feturbulence', 'filter', 'hatch', 'hatchpath', 'lineargradient', 'marker', 'mask', 'meshgradient', 'meshpatch', 'meshrow', 'metadata', 'mpath', 'pattern', 'radialgradient', 'solidcolor', 'stop', 'switch', 'view' ]
  15151. } ];
  15152. lookupTable.elementsAllowedAnyRole = [ {
  15153. nodeName: 'a',
  15154. attributes: {
  15155. href: isNull
  15156. }
  15157. }, {
  15158. nodeName: 'img',
  15159. attributes: {
  15160. alt: isNull
  15161. }
  15162. }, {
  15163. 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' ]
  15164. } ];
  15165. lookupTable.evaluateRoleForElement = {
  15166. A: function A(_ref35) {
  15167. var node = _ref35.node, out = _ref35.out;
  15168. if (node.namespaceURI === 'http://www.w3.org/2000/svg') {
  15169. return true;
  15170. }
  15171. if (node.href.length) {
  15172. return out;
  15173. }
  15174. return true;
  15175. },
  15176. AREA: function AREA(_ref36) {
  15177. var node = _ref36.node;
  15178. return !node.href;
  15179. },
  15180. BUTTON: function BUTTON(_ref37) {
  15181. var node = _ref37.node, role = _ref37.role, out = _ref37.out;
  15182. if (node.getAttribute('type') === 'menu') {
  15183. return role === 'menuitem';
  15184. }
  15185. return out;
  15186. },
  15187. IMG: function IMG(_ref38) {
  15188. var node = _ref38.node, role = _ref38.role, out = _ref38.out;
  15189. switch (node.alt) {
  15190. case null:
  15191. return out;
  15192. case '':
  15193. return role === 'presentation' || role === 'none';
  15194. default:
  15195. return role !== 'presentation' && role !== 'none';
  15196. }
  15197. },
  15198. INPUT: function INPUT(_ref39) {
  15199. var node = _ref39.node, role = _ref39.role, out = _ref39.out;
  15200. switch (node.type) {
  15201. case 'button':
  15202. case 'image':
  15203. return out;
  15204. case 'checkbox':
  15205. if (role === 'button' && node.hasAttribute('aria-pressed')) {
  15206. return true;
  15207. }
  15208. return out;
  15209. case 'radio':
  15210. return role === 'menuitemradio';
  15211. case 'text':
  15212. return role === 'combobox' || role === 'searchbox' || role === 'spinbutton';
  15213. case 'tel':
  15214. return role === 'combobox' || role === 'spinbutton';
  15215. case 'url':
  15216. case 'search':
  15217. case 'email':
  15218. return role === 'combobox';
  15219. default:
  15220. return false;
  15221. }
  15222. },
  15223. LI: function LI(_ref40) {
  15224. var node = _ref40.node, out = _ref40.out;
  15225. var hasImplicitListitemRole = axe.utils.matchesSelector(node, 'ol li, ul li');
  15226. if (hasImplicitListitemRole) {
  15227. return out;
  15228. }
  15229. return true;
  15230. },
  15231. MENU: function MENU(_ref41) {
  15232. var node = _ref41.node;
  15233. if (node.getAttribute('type') === 'context') {
  15234. return false;
  15235. }
  15236. return true;
  15237. },
  15238. OPTION: function OPTION(_ref42) {
  15239. var node = _ref42.node;
  15240. var withinOptionList = axe.utils.matchesSelector(node, 'select > option, datalist > option, optgroup > option');
  15241. return !withinOptionList;
  15242. },
  15243. SELECT: function SELECT(_ref43) {
  15244. var node = _ref43.node, role = _ref43.role;
  15245. return !node.multiple && node.size <= 1 && role === 'menu';
  15246. },
  15247. SVG: function SVG(_ref44) {
  15248. var node = _ref44.node, out = _ref44.out;
  15249. if (node.parentNode && node.parentNode.namespaceURI === 'http://www.w3.org/2000/svg') {
  15250. return true;
  15251. }
  15252. return out;
  15253. }
  15254. };
  15255. lookupTable.rolesOfType = {
  15256. widget: [ 'button', 'checkbox', 'dialog', 'gridcell', 'link', 'log', 'marquee', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'scrollbar', 'searchbox', 'slider', 'spinbutton', 'status', 'switch', 'tab', 'tabpanel', 'textbox', 'timer', 'tooltip', 'tree', 'treeitem' ]
  15257. };
  15258. var lookup_table_default = lookupTable;
  15259. function implicitNodes(role) {
  15260. var implicit = null;
  15261. var roles = lookup_table_default.role[role];
  15262. if (roles && roles.implicit) {
  15263. implicit = clone_default(roles.implicit);
  15264. }
  15265. return implicit;
  15266. }
  15267. var implicit_nodes_default = implicitNodes;
  15268. function isAccessibleRef(node) {
  15269. return !!get_accessible_refs_default(node).length;
  15270. }
  15271. var is_accessible_ref_default = isAccessibleRef;
  15272. function label3(node) {
  15273. node = get_node_from_tree_default(node);
  15274. return label_virtual_default(node);
  15275. }
  15276. var label_default2 = label3;
  15277. function requiredAttr(role) {
  15278. var roleDef = standards_default.ariaRoles[role];
  15279. if (!roleDef || !Array.isArray(roleDef.requiredAttrs)) {
  15280. return [];
  15281. }
  15282. return _toConsumableArray(roleDef.requiredAttrs);
  15283. }
  15284. var required_attr_default = requiredAttr;
  15285. function requiredContext(role) {
  15286. var roleDef = standards_default.ariaRoles[role];
  15287. if (!roleDef || !Array.isArray(roleDef.requiredContext)) {
  15288. return null;
  15289. }
  15290. return _toConsumableArray(roleDef.requiredContext);
  15291. }
  15292. var required_context_default = requiredContext;
  15293. function requiredOwned(role) {
  15294. var roleDef = standards_default.ariaRoles[role];
  15295. if (!roleDef || !Array.isArray(roleDef.requiredOwned)) {
  15296. return null;
  15297. }
  15298. return _toConsumableArray(roleDef.requiredOwned);
  15299. }
  15300. var required_owned_default = requiredOwned;
  15301. function validateAttrValue(node, attr) {
  15302. var matches14;
  15303. var list;
  15304. var value = node.getAttribute(attr);
  15305. var attrInfo = standards_default.ariaAttrs[attr];
  15306. var doc = get_root_node_default2(node);
  15307. if (!attrInfo) {
  15308. return true;
  15309. }
  15310. if (attrInfo.allowEmpty && (!value || value.trim() === '')) {
  15311. return true;
  15312. }
  15313. switch (attrInfo.type) {
  15314. case 'boolean':
  15315. return [ 'true', 'false' ].includes(value.toLowerCase());
  15316. case 'nmtoken':
  15317. return typeof value === 'string' && attrInfo.values.includes(value.toLowerCase());
  15318. case 'nmtokens':
  15319. list = token_list_default(value);
  15320. return list.reduce(function(result, token) {
  15321. return result && attrInfo.values.includes(token);
  15322. }, list.length !== 0);
  15323. case 'idref':
  15324. return !!(value && doc.getElementById(value));
  15325. case 'idrefs':
  15326. list = token_list_default(value);
  15327. return list.some(function(token) {
  15328. return doc.getElementById(token);
  15329. });
  15330. case 'string':
  15331. return value.trim() !== '';
  15332. case 'decimal':
  15333. matches14 = value.match(/^[-+]?([0-9]*)\.?([0-9]*)$/);
  15334. return !!(matches14 && (matches14[1] || matches14[2]));
  15335. case 'int':
  15336. var minValue = typeof attrInfo.minValue !== 'undefined' ? attrInfo.minValue : -Infinity;
  15337. return /^[-+]?[0-9]+$/.test(value) && parseInt(value) >= minValue;
  15338. }
  15339. }
  15340. var validate_attr_value_default = validateAttrValue;
  15341. function validateAttr(att) {
  15342. var attrDefinition = standards_default.ariaAttrs[att];
  15343. return !!attrDefinition;
  15344. }
  15345. var validate_attr_default = validateAttr;
  15346. function abstractroleEvaluate(node, options, virtualNode) {
  15347. var abstractRoles = token_list_default(virtualNode.attr('role')).filter(function(role) {
  15348. return get_role_type_default(role) === 'abstract';
  15349. });
  15350. if (abstractRoles.length > 0) {
  15351. this.data(abstractRoles);
  15352. return true;
  15353. }
  15354. return false;
  15355. }
  15356. var abstractrole_evaluate_default = abstractroleEvaluate;
  15357. function ariaAllowedAttrEvaluate(node, options, virtualNode) {
  15358. var invalid = [];
  15359. var role = get_role_default(virtualNode);
  15360. var attrs = virtualNode.attrNames;
  15361. var allowed = allowed_attr_default(role);
  15362. if (Array.isArray(options[role])) {
  15363. allowed = unique_array_default(options[role].concat(allowed));
  15364. }
  15365. if (role && allowed) {
  15366. for (var _i13 = 0; _i13 < attrs.length; _i13++) {
  15367. var attrName = attrs[_i13];
  15368. if (validate_attr_default(attrName) && !allowed.includes(attrName)) {
  15369. invalid.push(attrName + '="' + virtualNode.attr(attrName) + '"');
  15370. }
  15371. }
  15372. }
  15373. if (invalid.length) {
  15374. this.data(invalid);
  15375. return false;
  15376. }
  15377. return true;
  15378. }
  15379. var aria_allowed_attr_evaluate_default = ariaAllowedAttrEvaluate;
  15380. function ariaAllowedRoledEvaluate(node) {
  15381. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  15382. var _options$allowImplici = options.allowImplicit, allowImplicit = _options$allowImplici === void 0 ? true : _options$allowImplici, _options$ignoredTags = options.ignoredTags, ignoredTags = _options$ignoredTags === void 0 ? [] : _options$ignoredTags;
  15383. var tagName = node.nodeName.toUpperCase();
  15384. if (ignoredTags.map(function(t) {
  15385. return t.toUpperCase();
  15386. }).includes(tagName)) {
  15387. return true;
  15388. }
  15389. var unallowedRoles = get_element_unallowed_roles_default(node, allowImplicit);
  15390. if (unallowedRoles.length) {
  15391. this.data(unallowedRoles);
  15392. if (!is_visible_default(node, true)) {
  15393. return void 0;
  15394. }
  15395. return false;
  15396. }
  15397. return true;
  15398. }
  15399. var aria_allowed_role_evaluate_default = ariaAllowedRoledEvaluate;
  15400. function ariaErrormessageEvaluate(node, options) {
  15401. options = Array.isArray(options) ? options : [];
  15402. var attr = node.getAttribute('aria-errormessage');
  15403. var hasAttr = node.hasAttribute('aria-errormessage');
  15404. var invaid = node.getAttribute('aria-invalid');
  15405. var hasInvallid = node.hasAttribute('aria-invalid');
  15406. if (!hasInvallid || invaid === 'false') {
  15407. return true;
  15408. }
  15409. var doc = get_root_node_default2(node);
  15410. function validateAttrValue2(attr2) {
  15411. if (attr2.trim() === '') {
  15412. return standards_default.ariaAttrs['aria-errormessage'].allowEmpty;
  15413. }
  15414. var idref = attr2 && doc.getElementById(attr2);
  15415. if (idref) {
  15416. return idref.getAttribute('role') === 'alert' || idref.getAttribute('aria-live') === 'assertive' || idref.getAttribute('aria-live') === 'polite' || token_list_default(node.getAttribute('aria-describedby')).indexOf(attr2) > -1;
  15417. }
  15418. return;
  15419. }
  15420. if (options.indexOf(attr) === -1 && hasAttr) {
  15421. this.data(token_list_default(attr));
  15422. return validateAttrValue2(attr);
  15423. }
  15424. return true;
  15425. }
  15426. var aria_errormessage_evaluate_default = ariaErrormessageEvaluate;
  15427. function ariaHiddenBodyEvaluate(node, options, virtualNode) {
  15428. return virtualNode.attr('aria-hidden') !== 'true';
  15429. }
  15430. var aria_hidden_body_evaluate_default = ariaHiddenBodyEvaluate;
  15431. function ariaProhibitedAttrEvaluate(node) {
  15432. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  15433. var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
  15434. var extraElementsAllowedAriaLabel = options.elementsAllowedAriaLabel || [];
  15435. var prohibitedList = listProhibitedAttrs(virtualNode, extraElementsAllowedAriaLabel);
  15436. var prohibited = prohibitedList.filter(function(attrName) {
  15437. if (!virtualNode.attrNames.includes(attrName)) {
  15438. return false;
  15439. }
  15440. return sanitize_default(virtualNode.attr(attrName)) !== '';
  15441. });
  15442. if (prohibited.length === 0) {
  15443. return false;
  15444. }
  15445. this.data(prohibited);
  15446. var hasTextContent = sanitize_default(subtree_text_default(virtualNode)) !== '';
  15447. return hasTextContent ? void 0 : true;
  15448. }
  15449. function listProhibitedAttrs(virtualNode, elementsAllowedAriaLabel) {
  15450. var role = get_role_default(virtualNode, {
  15451. chromium: true
  15452. });
  15453. var roleSpec = standards_default.ariaRoles[role];
  15454. if (roleSpec) {
  15455. return roleSpec.prohibitedAttrs || [];
  15456. }
  15457. var nodeName2 = virtualNode.props.nodeName;
  15458. if (!!role || elementsAllowedAriaLabel.includes(nodeName2)) {
  15459. return [];
  15460. }
  15461. return [ 'aria-label', 'aria-labelledby' ];
  15462. }
  15463. var aria_prohibited_attr_evaluate_default = ariaProhibitedAttrEvaluate;
  15464. var standards_exports = {};
  15465. __export(standards_exports, {
  15466. getAriaRolesByType: function getAriaRolesByType() {
  15467. return get_aria_roles_by_type_default;
  15468. },
  15469. getAriaRolesSupportingNameFromContent: function getAriaRolesSupportingNameFromContent() {
  15470. return get_aria_roles_supporting_name_from_content_default;
  15471. },
  15472. getElementSpec: function getElementSpec() {
  15473. return get_element_spec_default;
  15474. },
  15475. getElementsByContentType: function getElementsByContentType() {
  15476. return get_elements_by_content_type_default;
  15477. },
  15478. getGlobalAriaAttrs: function getGlobalAriaAttrs() {
  15479. return get_global_aria_attrs_default;
  15480. },
  15481. implicitHtmlRoles: function implicitHtmlRoles() {
  15482. return implicit_html_roles_default;
  15483. }
  15484. });
  15485. function ariaRequiredAttrEvaluate(node) {
  15486. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  15487. var virtualNode = arguments.length > 2 ? arguments[2] : undefined;
  15488. var missing = [];
  15489. var attrs = virtualNode.attrNames;
  15490. if (attrs.length) {
  15491. var role = get_explicit_role_default(virtualNode);
  15492. var required = required_attr_default(role);
  15493. var elmSpec = get_element_spec_default(virtualNode);
  15494. if (Array.isArray(options[role])) {
  15495. required = unique_array_default(options[role], required);
  15496. }
  15497. if (role && required) {
  15498. for (var _i14 = 0, l = required.length; _i14 < l; _i14++) {
  15499. var attr = required[_i14];
  15500. if (!virtualNode.attr(attr) && !(elmSpec.implicitAttrs && typeof elmSpec.implicitAttrs[attr] !== 'undefined')) {
  15501. missing.push(attr);
  15502. }
  15503. }
  15504. }
  15505. }
  15506. if (missing.length) {
  15507. this.data(missing);
  15508. return false;
  15509. }
  15510. return true;
  15511. }
  15512. var aria_required_attr_evaluate_default = ariaRequiredAttrEvaluate;
  15513. function getOwnedRoles(virtualNode, required) {
  15514. var ownedRoles = [];
  15515. var ownedElements = get_owned_virtual_default(virtualNode);
  15516. var _loop4 = function _loop4(_i15) {
  15517. var ownedElement = ownedElements[_i15];
  15518. var role = get_role_default(ownedElement, {
  15519. noPresentational: true
  15520. });
  15521. if (!role || [ 'group', 'rowgroup' ].includes(role) && required.some(function(requiredRole) {
  15522. return requiredRole === role;
  15523. })) {
  15524. ownedElements.push.apply(ownedElements, _toConsumableArray(ownedElement.children));
  15525. } else if (role) {
  15526. ownedRoles.push(role);
  15527. }
  15528. };
  15529. for (var _i15 = 0; _i15 < ownedElements.length; _i15++) {
  15530. _loop4(_i15);
  15531. }
  15532. return ownedRoles;
  15533. }
  15534. function missingRequiredChildren(virtualNode, role, required, ownedRoles) {
  15535. var isCombobox = role === 'combobox';
  15536. if (isCombobox) {
  15537. var textTypeInputs = [ 'text', 'search', 'email', 'url', 'tel' ];
  15538. if (virtualNode.props.nodeName === 'input' && textTypeInputs.includes(virtualNode.props.type) || ownedRoles.includes('searchbox')) {
  15539. required = required.filter(function(requiredRole) {
  15540. return requiredRole !== 'textbox';
  15541. });
  15542. }
  15543. var expandedChildRoles = [ 'listbox', 'tree', 'grid', 'dialog' ];
  15544. var expandedValue = virtualNode.attr('aria-expanded');
  15545. var expanded = expandedValue && expandedValue.toLowerCase() !== 'false';
  15546. var popupRole = (virtualNode.attr('aria-haspopup') || 'listbox').toLowerCase();
  15547. required = required.filter(function(requiredRole) {
  15548. return !expandedChildRoles.includes(requiredRole) || expanded && requiredRole === popupRole;
  15549. });
  15550. }
  15551. for (var _i16 = 0; _i16 < ownedRoles.length; _i16++) {
  15552. var ownedRole = ownedRoles[_i16];
  15553. if (required.includes(ownedRole)) {
  15554. required = required.filter(function(requiredRole) {
  15555. return requiredRole !== ownedRole;
  15556. });
  15557. if (!isCombobox) {
  15558. return null;
  15559. }
  15560. }
  15561. }
  15562. if (required.length) {
  15563. return required;
  15564. }
  15565. return null;
  15566. }
  15567. function ariaRequiredChildrenEvaluate(node, options, virtualNode) {
  15568. var reviewEmpty = options && Array.isArray(options.reviewEmpty) ? options.reviewEmpty : [];
  15569. var role = get_explicit_role_default(virtualNode, {
  15570. dpub: true
  15571. });
  15572. var required = required_owned_default(role);
  15573. if (required === null) {
  15574. return true;
  15575. }
  15576. var ownedRoles = getOwnedRoles(virtualNode, required);
  15577. var missing = missingRequiredChildren(virtualNode, role, required, ownedRoles);
  15578. if (!missing) {
  15579. return true;
  15580. }
  15581. this.data(missing);
  15582. if (reviewEmpty.includes(role) && !has_content_virtual_default(virtualNode, false, true) && !ownedRoles.length && (!virtualNode.hasAttr('aria-owns') || !idrefs_default(node, 'aria-owns').length)) {
  15583. return void 0;
  15584. }
  15585. return false;
  15586. }
  15587. var aria_required_children_evaluate_default = ariaRequiredChildrenEvaluate;
  15588. function getMissingContext(virtualNode, ownGroupRoles, reqContext, includeElement) {
  15589. var explicitRole2 = get_explicit_role_default(virtualNode);
  15590. if (!reqContext) {
  15591. reqContext = required_context_default(explicitRole2);
  15592. }
  15593. if (!reqContext) {
  15594. return null;
  15595. }
  15596. var vNode = includeElement ? virtualNode : virtualNode.parent;
  15597. while (vNode) {
  15598. var parentRole = get_role_default(vNode);
  15599. if (reqContext.includes('group') && parentRole === 'group') {
  15600. if (ownGroupRoles.includes(explicitRole2)) {
  15601. reqContext.push(explicitRole2);
  15602. }
  15603. vNode = vNode.parent;
  15604. continue;
  15605. }
  15606. if (reqContext.includes(parentRole)) {
  15607. return null;
  15608. } else if (parentRole && ![ 'presentation', 'none' ].includes(parentRole)) {
  15609. return reqContext;
  15610. }
  15611. vNode = vNode.parent;
  15612. }
  15613. return reqContext;
  15614. }
  15615. function getAriaOwners(element) {
  15616. var owners = [], o = null;
  15617. while (element) {
  15618. if (element.getAttribute('id')) {
  15619. var id = escape_selector_default(element.getAttribute('id'));
  15620. var doc = get_root_node_default2(element);
  15621. o = doc.querySelector('[aria-owns~='.concat(id, ']'));
  15622. if (o) {
  15623. owners.push(o);
  15624. }
  15625. }
  15626. element = element.parentElement;
  15627. }
  15628. return owners.length ? owners : null;
  15629. }
  15630. function ariaRequiredParentEvaluate(node, options, virtualNode) {
  15631. var ownGroupRoles = options && Array.isArray(options.ownGroupRoles) ? options.ownGroupRoles : [];
  15632. var missingParents = getMissingContext(virtualNode, ownGroupRoles);
  15633. if (!missingParents) {
  15634. return true;
  15635. }
  15636. var owners = getAriaOwners(node);
  15637. if (owners) {
  15638. for (var _i17 = 0, l = owners.length; _i17 < l; _i17++) {
  15639. missingParents = getMissingContext(get_node_from_tree_default(owners[_i17]), ownGroupRoles, missingParents, true);
  15640. if (!missingParents) {
  15641. return true;
  15642. }
  15643. }
  15644. }
  15645. this.data(missingParents);
  15646. return false;
  15647. }
  15648. var aria_required_parent_evaluate_default = ariaRequiredParentEvaluate;
  15649. function ariaRoledescriptionEvaluate(node) {
  15650. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  15651. var role = get_role_default(node);
  15652. var supportedRoles = options.supportedRoles || [];
  15653. if (supportedRoles.includes(role)) {
  15654. return true;
  15655. }
  15656. if (role && role !== 'presentation' && role !== 'none') {
  15657. return void 0;
  15658. }
  15659. return false;
  15660. }
  15661. var aria_roledescription_evaluate_default = ariaRoledescriptionEvaluate;
  15662. function ariaUnsupportedAttrEvaluate(node, options, virtualNode) {
  15663. var unsupportedAttrs = virtualNode.attrNames.filter(function(name) {
  15664. var attribute = standards_default.ariaAttrs[name];
  15665. if (!validate_attr_default(name)) {
  15666. return false;
  15667. }
  15668. var unsupported4 = attribute.unsupported;
  15669. if (_typeof(unsupported4) !== 'object') {
  15670. return !!unsupported4;
  15671. }
  15672. return !matches_default3(node, unsupported4.exceptions);
  15673. });
  15674. if (unsupportedAttrs.length) {
  15675. this.data(unsupportedAttrs);
  15676. return true;
  15677. }
  15678. return false;
  15679. }
  15680. var aria_unsupported_attr_evaluate_default = ariaUnsupportedAttrEvaluate;
  15681. function ariaValidAttrEvaluate(node, options) {
  15682. options = Array.isArray(options.value) ? options.value : [];
  15683. var invalid = [], aria44 = /^aria-/;
  15684. var attr, attrs = get_node_attributes_default(node);
  15685. for (var i = 0, l = attrs.length; i < l; i++) {
  15686. attr = attrs[i].name;
  15687. if (options.indexOf(attr) === -1 && aria44.test(attr) && !validate_attr_default(attr)) {
  15688. invalid.push(attr);
  15689. }
  15690. }
  15691. if (invalid.length) {
  15692. this.data(invalid);
  15693. return false;
  15694. }
  15695. return true;
  15696. }
  15697. var aria_valid_attr_evaluate_default = ariaValidAttrEvaluate;
  15698. function ariaValidAttrValueEvaluate(node, options) {
  15699. options = Array.isArray(options.value) ? options.value : [];
  15700. var needsReview = '';
  15701. var messageKey = '';
  15702. var invalid = [];
  15703. var aria44 = /^aria-/;
  15704. var attrs = get_node_attributes_default(node);
  15705. var skipAttrs = [ 'aria-errormessage' ];
  15706. var preChecks = {
  15707. 'aria-controls': function ariaControls() {
  15708. return node.getAttribute('aria-expanded') !== 'false' && node.getAttribute('aria-selected') !== 'false';
  15709. },
  15710. 'aria-current': function ariaCurrent() {
  15711. if (!validate_attr_value_default(node, 'aria-current')) {
  15712. needsReview = 'aria-current="'.concat(node.getAttribute('aria-current'), '"');
  15713. messageKey = 'ariaCurrent';
  15714. }
  15715. return;
  15716. },
  15717. 'aria-owns': function ariaOwns() {
  15718. return node.getAttribute('aria-expanded') !== 'false';
  15719. },
  15720. 'aria-describedby': function ariaDescribedby() {
  15721. if (!validate_attr_value_default(node, 'aria-describedby')) {
  15722. needsReview = 'aria-describedby="'.concat(node.getAttribute('aria-describedby'), '"');
  15723. messageKey = 'noId';
  15724. }
  15725. return;
  15726. },
  15727. 'aria-labelledby': function ariaLabelledby() {
  15728. if (!validate_attr_value_default(node, 'aria-labelledby')) {
  15729. needsReview = 'aria-labelledby="'.concat(node.getAttribute('aria-labelledby'), '"');
  15730. messageKey = 'noId';
  15731. }
  15732. }
  15733. };
  15734. for (var _i18 = 0, l = attrs.length; _i18 < l; _i18++) {
  15735. var attr = attrs[_i18];
  15736. var attrName = attr.name;
  15737. if (!skipAttrs.includes(attrName) && options.indexOf(attrName) === -1 && aria44.test(attrName) && (preChecks[attrName] ? preChecks[attrName]() : true) && !validate_attr_value_default(node, attrName)) {
  15738. invalid.push(''.concat(attrName, '="').concat(attr.nodeValue, '"'));
  15739. }
  15740. }
  15741. if (needsReview) {
  15742. this.data({
  15743. messageKey: messageKey,
  15744. needsReview: needsReview
  15745. });
  15746. return void 0;
  15747. }
  15748. if (invalid.length) {
  15749. this.data(invalid);
  15750. return false;
  15751. }
  15752. return true;
  15753. }
  15754. var aria_valid_attr_value_evaluate_default = ariaValidAttrValueEvaluate;
  15755. function fallbackroleEvaluate(node, options, virtualNode) {
  15756. return token_list_default(virtualNode.attr('role')).length > 1;
  15757. }
  15758. var fallbackrole_evaluate_default = fallbackroleEvaluate;
  15759. function hasGlobalAriaAttributeEvaluate(node, options, virtualNode) {
  15760. var globalAttrs = get_global_aria_attrs_default().filter(function(attr) {
  15761. return virtualNode.hasAttr(attr);
  15762. });
  15763. this.data(globalAttrs);
  15764. return globalAttrs.length > 0;
  15765. }
  15766. var has_global_aria_attribute_evaluate_default = hasGlobalAriaAttributeEvaluate;
  15767. function hasImplicitChromiumRoleMatches(node, virtualNode) {
  15768. return implicit_role_default(virtualNode, {
  15769. chromium: true
  15770. }) !== null;
  15771. }
  15772. var has_implicit_chromium_role_matches_default = hasImplicitChromiumRoleMatches;
  15773. function hasWidgetRoleEvaluate(node) {
  15774. var role = node.getAttribute('role');
  15775. if (role === null) {
  15776. return false;
  15777. }
  15778. var roleType = get_role_type_default(role);
  15779. return roleType === 'widget' || roleType === 'composite';
  15780. }
  15781. var has_widget_role_evaluate_default = hasWidgetRoleEvaluate;
  15782. function invalidroleEvaluate(node, options, virtualNode) {
  15783. var allRoles = token_list_default(virtualNode.attr('role'));
  15784. var allInvalid = allRoles.every(function(role) {
  15785. return !is_valid_role_default(role, {
  15786. allowAbstract: true
  15787. });
  15788. });
  15789. if (allInvalid) {
  15790. this.data(allRoles);
  15791. return true;
  15792. }
  15793. return false;
  15794. }
  15795. var invalidrole_evaluate_default = invalidroleEvaluate;
  15796. function isElementFocusableEvaluate(node, options, virtualNode) {
  15797. return is_focusable_default(virtualNode);
  15798. }
  15799. var is_element_focusable_evaluate_default = isElementFocusableEvaluate;
  15800. function noImplicitExplicitLabelEvaluate(node, options, virtualNode) {
  15801. var role = get_role_default(virtualNode, {
  15802. noImplicit: true
  15803. });
  15804. this.data(role);
  15805. var label5;
  15806. var accText;
  15807. try {
  15808. label5 = sanitize_default(label_text_default(virtualNode)).toLowerCase();
  15809. accText = sanitize_default(accessible_text_virtual_default(virtualNode)).toLowerCase();
  15810. } catch (e) {
  15811. return void 0;
  15812. }
  15813. if (!accText && !label5) {
  15814. return false;
  15815. }
  15816. if (!accText && label5) {
  15817. return void 0;
  15818. }
  15819. if (!accText.includes(label5)) {
  15820. return void 0;
  15821. }
  15822. return false;
  15823. }
  15824. var no_implicit_explicit_label_evaluate_default = noImplicitExplicitLabelEvaluate;
  15825. function unsupportedroleEvaluate(node, options, virtualNode) {
  15826. return is_unsupported_role_default(get_role_default(virtualNode));
  15827. }
  15828. var unsupportedrole_evaluate_default = unsupportedroleEvaluate;
  15829. var VALID_TAG_NAMES_FOR_SCROLLABLE_REGIONS = {
  15830. ARTICLE: true,
  15831. ASIDE: true,
  15832. NAV: true,
  15833. SECTION: true
  15834. };
  15835. var VALID_ROLES_FOR_SCROLLABLE_REGIONS = {
  15836. application: true,
  15837. banner: false,
  15838. complementary: true,
  15839. contentinfo: true,
  15840. form: true,
  15841. main: true,
  15842. navigation: true,
  15843. region: true,
  15844. search: false
  15845. };
  15846. function validScrollableTagName(node) {
  15847. var nodeName2 = node.nodeName.toUpperCase();
  15848. return VALID_TAG_NAMES_FOR_SCROLLABLE_REGIONS[nodeName2] || false;
  15849. }
  15850. function validScrollableRole(node, options) {
  15851. var role = get_explicit_role_default(node);
  15852. if (!role) {
  15853. return false;
  15854. }
  15855. return VALID_ROLES_FOR_SCROLLABLE_REGIONS[role] || options.roles.includes(role) || false;
  15856. }
  15857. function validScrollableSemanticsEvaluate(node, options) {
  15858. return validScrollableRole(node, options) || validScrollableTagName(node);
  15859. }
  15860. var valid_scrollable_semantics_evaluate_default = validScrollableSemanticsEvaluate;
  15861. var table_exports = {};
  15862. __export(table_exports, {
  15863. getAllCells: function getAllCells() {
  15864. return get_all_cells_default;
  15865. },
  15866. getCellPosition: function getCellPosition() {
  15867. return get_cell_position_default;
  15868. },
  15869. getHeaders: function getHeaders() {
  15870. return get_headers_default;
  15871. },
  15872. getScope: function getScope() {
  15873. return get_scope_default;
  15874. },
  15875. isColumnHeader: function isColumnHeader() {
  15876. return is_column_header_default;
  15877. },
  15878. isDataCell: function isDataCell() {
  15879. return is_data_cell_default;
  15880. },
  15881. isDataTable: function isDataTable() {
  15882. return is_data_table_default;
  15883. },
  15884. isHeader: function isHeader() {
  15885. return is_header_default;
  15886. },
  15887. isRowHeader: function isRowHeader() {
  15888. return is_row_header_default;
  15889. },
  15890. toArray: function toArray() {
  15891. return to_grid_default;
  15892. },
  15893. toGrid: function toGrid() {
  15894. return to_grid_default;
  15895. },
  15896. traverse: function traverse() {
  15897. return traverse_default;
  15898. }
  15899. });
  15900. function getAllCells(tableElm) {
  15901. var rowIndex, cellIndex, rowLength, cellLength;
  15902. var cells = [];
  15903. for (rowIndex = 0, rowLength = tableElm.rows.length; rowIndex < rowLength; rowIndex++) {
  15904. for (cellIndex = 0, cellLength = tableElm.rows[rowIndex].cells.length; cellIndex < cellLength; cellIndex++) {
  15905. cells.push(tableElm.rows[rowIndex].cells[cellIndex]);
  15906. }
  15907. }
  15908. return cells;
  15909. }
  15910. var get_all_cells_default = getAllCells;
  15911. function traverseForHeaders(headerType, position, tableGrid) {
  15912. var property = headerType === 'row' ? '_rowHeaders' : '_colHeaders';
  15913. var predicate = headerType === 'row' ? is_row_header_default : is_column_header_default;
  15914. var startCell = tableGrid[position.y][position.x];
  15915. var colspan = startCell.colSpan - 1;
  15916. var rowspanAttr = startCell.getAttribute('rowspan');
  15917. var rowspanValue = parseInt(rowspanAttr) === 0 || startCell.rowspan === 0 ? tableGrid.length : startCell.rowSpan;
  15918. var rowspan = rowspanValue - 1;
  15919. var rowStart = position.y + rowspan;
  15920. var colStart = position.x + colspan;
  15921. var rowEnd = headerType === 'row' ? position.y : 0;
  15922. var colEnd = headerType === 'row' ? 0 : position.x;
  15923. var headers;
  15924. var cells = [];
  15925. for (var row = rowStart; row >= rowEnd && !headers; row--) {
  15926. for (var col = colStart; col >= colEnd; col--) {
  15927. var cell = tableGrid[row] ? tableGrid[row][col] : void 0;
  15928. if (!cell) {
  15929. continue;
  15930. }
  15931. var vNode = axe.utils.getNodeFromTree(cell);
  15932. if (vNode[property]) {
  15933. headers = vNode[property];
  15934. break;
  15935. }
  15936. cells.push(cell);
  15937. }
  15938. }
  15939. headers = (headers || []).concat(cells.filter(predicate));
  15940. cells.forEach(function(tableCell) {
  15941. var vNode = axe.utils.getNodeFromTree(tableCell);
  15942. vNode[property] = headers;
  15943. });
  15944. return headers;
  15945. }
  15946. function getHeaders(cell, tableGrid) {
  15947. if (cell.getAttribute('headers')) {
  15948. var headers = idrefs_default(cell, 'headers');
  15949. if (headers.filter(function(header) {
  15950. return header;
  15951. }).length) {
  15952. return headers;
  15953. }
  15954. }
  15955. if (!tableGrid) {
  15956. tableGrid = to_grid_default(find_up_default(cell, 'table'));
  15957. }
  15958. var position = get_cell_position_default(cell, tableGrid);
  15959. var rowHeaders = traverseForHeaders('row', position, tableGrid);
  15960. var colHeaders = traverseForHeaders('col', position, tableGrid);
  15961. return [].concat(rowHeaders, colHeaders).reverse();
  15962. }
  15963. var get_headers_default = getHeaders;
  15964. function isDataCell(cell) {
  15965. if (!cell.children.length && !cell.textContent.trim()) {
  15966. return false;
  15967. }
  15968. var role = cell.getAttribute('role');
  15969. if (is_valid_role_default(role)) {
  15970. return [ 'cell', 'gridcell' ].includes(role);
  15971. } else {
  15972. return cell.nodeName.toUpperCase() === 'TD';
  15973. }
  15974. }
  15975. var is_data_cell_default = isDataCell;
  15976. function isDataTable(node) {
  15977. var role = (node.getAttribute('role') || '').toLowerCase();
  15978. if ((role === 'presentation' || role === 'none') && !is_focusable_default(node)) {
  15979. return false;
  15980. }
  15981. if (node.getAttribute('contenteditable') === 'true' || find_up_default(node, '[contenteditable="true"]')) {
  15982. return true;
  15983. }
  15984. if (role === 'grid' || role === 'treegrid' || role === 'table') {
  15985. return true;
  15986. }
  15987. if (get_role_type_default(role) === 'landmark') {
  15988. return true;
  15989. }
  15990. if (node.getAttribute('datatable') === '0') {
  15991. return false;
  15992. }
  15993. if (node.getAttribute('summary')) {
  15994. return true;
  15995. }
  15996. if (node.tHead || node.tFoot || node.caption) {
  15997. return true;
  15998. }
  15999. for (var childIndex = 0, childLength = node.children.length; childIndex < childLength; childIndex++) {
  16000. if (node.children[childIndex].nodeName.toUpperCase() === 'COLGROUP') {
  16001. return true;
  16002. }
  16003. }
  16004. var cells = 0;
  16005. var rowLength = node.rows.length;
  16006. var row, cell;
  16007. var hasBorder = false;
  16008. for (var rowIndex = 0; rowIndex < rowLength; rowIndex++) {
  16009. row = node.rows[rowIndex];
  16010. for (var cellIndex = 0, cellLength = row.cells.length; cellIndex < cellLength; cellIndex++) {
  16011. cell = row.cells[cellIndex];
  16012. if (cell.nodeName.toUpperCase() === 'TH') {
  16013. return true;
  16014. }
  16015. if (!hasBorder && (cell.offsetWidth !== cell.clientWidth || cell.offsetHeight !== cell.clientHeight)) {
  16016. hasBorder = true;
  16017. }
  16018. if (cell.getAttribute('scope') || cell.getAttribute('headers') || cell.getAttribute('abbr')) {
  16019. return true;
  16020. }
  16021. if ([ 'columnheader', 'rowheader' ].includes((cell.getAttribute('role') || '').toLowerCase())) {
  16022. return true;
  16023. }
  16024. if (cell.children.length === 1 && cell.children[0].nodeName.toUpperCase() === 'ABBR') {
  16025. return true;
  16026. }
  16027. cells++;
  16028. }
  16029. }
  16030. if (node.getElementsByTagName('table').length) {
  16031. return false;
  16032. }
  16033. if (rowLength < 2) {
  16034. return false;
  16035. }
  16036. var sampleRow = node.rows[Math.ceil(rowLength / 2)];
  16037. if (sampleRow.cells.length === 1 && sampleRow.cells[0].colSpan === 1) {
  16038. return false;
  16039. }
  16040. if (sampleRow.cells.length >= 5) {
  16041. return true;
  16042. }
  16043. if (hasBorder) {
  16044. return true;
  16045. }
  16046. var bgColor, bgImage;
  16047. for (rowIndex = 0; rowIndex < rowLength; rowIndex++) {
  16048. row = node.rows[rowIndex];
  16049. if (bgColor && bgColor !== window.getComputedStyle(row).getPropertyValue('background-color')) {
  16050. return true;
  16051. } else {
  16052. bgColor = window.getComputedStyle(row).getPropertyValue('background-color');
  16053. }
  16054. if (bgImage && bgImage !== window.getComputedStyle(row).getPropertyValue('background-image')) {
  16055. return true;
  16056. } else {
  16057. bgImage = window.getComputedStyle(row).getPropertyValue('background-image');
  16058. }
  16059. }
  16060. if (rowLength >= 20) {
  16061. return true;
  16062. }
  16063. if (get_element_coordinates_default(node).width > get_viewport_size_default(window).width * .95) {
  16064. return false;
  16065. }
  16066. if (cells < 10) {
  16067. return false;
  16068. }
  16069. if (node.querySelector('object, embed, iframe, applet')) {
  16070. return false;
  16071. }
  16072. return true;
  16073. }
  16074. var is_data_table_default = isDataTable;
  16075. function isHeader(cell) {
  16076. if (is_column_header_default(cell) || is_row_header_default(cell)) {
  16077. return true;
  16078. }
  16079. if (cell.getAttribute('id')) {
  16080. var id = escape_selector_default(cell.getAttribute('id'));
  16081. return !!document.querySelector('[headers~="'.concat(id, '"]'));
  16082. }
  16083. return false;
  16084. }
  16085. var is_header_default = isHeader;
  16086. function traverseTable(dir, position, tableGrid, callback) {
  16087. var result;
  16088. var cell = tableGrid[position.y] ? tableGrid[position.y][position.x] : void 0;
  16089. if (!cell) {
  16090. return [];
  16091. }
  16092. if (typeof callback === 'function') {
  16093. result = callback(cell, position, tableGrid);
  16094. if (result === true) {
  16095. return [ cell ];
  16096. }
  16097. }
  16098. result = traverseTable(dir, {
  16099. x: position.x + dir.x,
  16100. y: position.y + dir.y
  16101. }, tableGrid, callback);
  16102. result.unshift(cell);
  16103. return result;
  16104. }
  16105. function traverse(dir, startPos, tableGrid, callback) {
  16106. if (Array.isArray(startPos)) {
  16107. callback = tableGrid;
  16108. tableGrid = startPos;
  16109. startPos = {
  16110. x: 0,
  16111. y: 0
  16112. };
  16113. }
  16114. if (typeof dir === 'string') {
  16115. switch (dir) {
  16116. case 'left':
  16117. dir = {
  16118. x: -1,
  16119. y: 0
  16120. };
  16121. break;
  16122. case 'up':
  16123. dir = {
  16124. x: 0,
  16125. y: -1
  16126. };
  16127. break;
  16128. case 'right':
  16129. dir = {
  16130. x: 1,
  16131. y: 0
  16132. };
  16133. break;
  16134. case 'down':
  16135. dir = {
  16136. x: 0,
  16137. y: 1
  16138. };
  16139. break;
  16140. }
  16141. }
  16142. return traverseTable(dir, {
  16143. x: startPos.x + dir.x,
  16144. y: startPos.y + dir.y
  16145. }, tableGrid, callback);
  16146. }
  16147. var traverse_default = traverse;
  16148. function captionFakedEvaluate(node) {
  16149. var table5 = to_grid_default(node);
  16150. var firstRow = table5[0];
  16151. if (table5.length <= 1 || firstRow.length <= 1 || node.rows.length <= 1) {
  16152. return true;
  16153. }
  16154. return firstRow.reduce(function(out, curr, i) {
  16155. return out || curr !== firstRow[i + 1] && firstRow[i + 1] !== void 0;
  16156. }, false);
  16157. }
  16158. var caption_faked_evaluate_default = captionFakedEvaluate;
  16159. function html5ScopeEvaluate(node) {
  16160. if (!is_html5_default(document)) {
  16161. return true;
  16162. }
  16163. return node.nodeName.toUpperCase() === 'TH';
  16164. }
  16165. var html5_scope_evaluate_default = html5ScopeEvaluate;
  16166. function sameCaptionSummaryEvaluate(node) {
  16167. return !!(node.summary && node.caption) && node.summary.toLowerCase() === accessible_text_default(node.caption).toLowerCase();
  16168. }
  16169. var same_caption_summary_evaluate_default = sameCaptionSummaryEvaluate;
  16170. function scopeValueEvaluate(node, options) {
  16171. var value = node.getAttribute('scope').toLowerCase();
  16172. return options.values.indexOf(value) !== -1;
  16173. }
  16174. var scope_value_evaluate_default = scopeValueEvaluate;
  16175. function tdHasHeaderEvaluate(node) {
  16176. var badCells = [];
  16177. var cells = get_all_cells_default(node);
  16178. var tableGrid = to_grid_default(node);
  16179. cells.forEach(function(cell) {
  16180. if (has_content_default(cell) && is_data_cell_default(cell) && !label_default2(cell)) {
  16181. var hasHeaders = get_headers_default(cell, tableGrid).some(function(header) {
  16182. return header !== null && !!has_content_default(header);
  16183. });
  16184. if (!hasHeaders) {
  16185. badCells.push(cell);
  16186. }
  16187. }
  16188. });
  16189. if (badCells.length) {
  16190. this.relatedNodes(badCells);
  16191. return false;
  16192. }
  16193. return true;
  16194. }
  16195. var td_has_header_evaluate_default = tdHasHeaderEvaluate;
  16196. function tdHeadersAttrEvaluate(node) {
  16197. var cells = [];
  16198. var reviewCells = [];
  16199. var badCells = [];
  16200. for (var rowIndex = 0; rowIndex < node.rows.length; rowIndex++) {
  16201. var row = node.rows[rowIndex];
  16202. for (var cellIndex = 0; cellIndex < row.cells.length; cellIndex++) {
  16203. cells.push(row.cells[cellIndex]);
  16204. }
  16205. }
  16206. var ids = cells.reduce(function(ids2, cell) {
  16207. if (cell.getAttribute('id')) {
  16208. ids2.push(cell.getAttribute('id'));
  16209. }
  16210. return ids2;
  16211. }, []);
  16212. cells.forEach(function(cell) {
  16213. var isSelf = false;
  16214. var notOfTable = false;
  16215. if (!cell.hasAttribute('headers')) {
  16216. return;
  16217. }
  16218. var headersAttr = cell.getAttribute('headers').trim();
  16219. if (!headersAttr) {
  16220. return reviewCells.push(cell);
  16221. }
  16222. var headers = token_list_default(headersAttr);
  16223. if (headers.length !== 0) {
  16224. if (cell.getAttribute('id')) {
  16225. isSelf = headers.indexOf(cell.getAttribute('id').trim()) !== -1;
  16226. }
  16227. notOfTable = headers.some(function(header) {
  16228. return !ids.includes(header);
  16229. });
  16230. if (isSelf || notOfTable) {
  16231. badCells.push(cell);
  16232. }
  16233. }
  16234. });
  16235. if (badCells.length > 0) {
  16236. this.relatedNodes(badCells);
  16237. return false;
  16238. }
  16239. if (reviewCells.length) {
  16240. this.relatedNodes(reviewCells);
  16241. return void 0;
  16242. }
  16243. return true;
  16244. }
  16245. var td_headers_attr_evaluate_default = tdHeadersAttrEvaluate;
  16246. function thHasDataCellsEvaluate(node) {
  16247. var cells = get_all_cells_default(node);
  16248. var checkResult = this;
  16249. var reffedHeaders = [];
  16250. cells.forEach(function(cell) {
  16251. var headers2 = cell.getAttribute('headers');
  16252. if (headers2) {
  16253. reffedHeaders = reffedHeaders.concat(headers2.split(/\s+/));
  16254. }
  16255. var ariaLabel = cell.getAttribute('aria-labelledby');
  16256. if (ariaLabel) {
  16257. reffedHeaders = reffedHeaders.concat(ariaLabel.split(/\s+/));
  16258. }
  16259. });
  16260. var headers = cells.filter(function(cell) {
  16261. if (sanitize_default(cell.textContent) === '') {
  16262. return false;
  16263. }
  16264. return cell.nodeName.toUpperCase() === 'TH' || [ 'rowheader', 'columnheader' ].indexOf(cell.getAttribute('role')) !== -1;
  16265. });
  16266. var tableGrid = to_grid_default(node);
  16267. var out = true;
  16268. headers.forEach(function(header) {
  16269. if (header.getAttribute('id') && reffedHeaders.includes(header.getAttribute('id'))) {
  16270. return;
  16271. }
  16272. var pos = get_cell_position_default(header, tableGrid);
  16273. var hasCell = false;
  16274. if (is_column_header_default(header)) {
  16275. hasCell = traverse_default('down', pos, tableGrid).find(function(cell) {
  16276. return !is_column_header_default(cell) && get_headers_default(cell, tableGrid).includes(header);
  16277. });
  16278. }
  16279. if (!hasCell && is_row_header_default(header)) {
  16280. hasCell = traverse_default('right', pos, tableGrid).find(function(cell) {
  16281. return !is_row_header_default(cell) && get_headers_default(cell, tableGrid).includes(header);
  16282. });
  16283. }
  16284. if (!hasCell) {
  16285. checkResult.relatedNodes(header);
  16286. }
  16287. out = out && hasCell;
  16288. });
  16289. return out ? true : void 0;
  16290. }
  16291. var th_has_data_cells_evaluate_default = thHasDataCellsEvaluate;
  16292. function hiddenContentEvaluate(node, options, virtualNode) {
  16293. var whitelist = [ 'SCRIPT', 'HEAD', 'TITLE', 'NOSCRIPT', 'STYLE', 'TEMPLATE' ];
  16294. if (!whitelist.includes(node.nodeName.toUpperCase()) && has_content_virtual_default(virtualNode)) {
  16295. var styles = window.getComputedStyle(node);
  16296. if (styles.getPropertyValue('display') === 'none') {
  16297. return void 0;
  16298. } else if (styles.getPropertyValue('visibility') === 'hidden') {
  16299. var parent = get_composed_parent_default(node);
  16300. var parentStyle = parent && window.getComputedStyle(parent);
  16301. if (!parentStyle || parentStyle.getPropertyValue('visibility') !== 'hidden') {
  16302. return void 0;
  16303. }
  16304. }
  16305. }
  16306. return true;
  16307. }
  16308. var hidden_content_evaluate_default = hiddenContentEvaluate;
  16309. var color_exports = {};
  16310. __export(color_exports, {
  16311. Color: function Color() {
  16312. return color_default;
  16313. },
  16314. centerPointOfRect: function centerPointOfRect() {
  16315. return center_point_of_rect_default;
  16316. },
  16317. elementHasImage: function elementHasImage() {
  16318. return element_has_image_default;
  16319. },
  16320. elementIsDistinct: function elementIsDistinct() {
  16321. return element_is_distinct_default;
  16322. },
  16323. filteredRectStack: function filteredRectStack() {
  16324. return filtered_rect_stack_default;
  16325. },
  16326. flattenColors: function flattenColors() {
  16327. return flatten_colors_default;
  16328. },
  16329. getBackgroundColor: function getBackgroundColor() {
  16330. return get_background_color_default;
  16331. },
  16332. getBackgroundStack: function getBackgroundStack() {
  16333. return get_background_stack_default;
  16334. },
  16335. getContrast: function getContrast() {
  16336. return get_contrast_default;
  16337. },
  16338. getForegroundColor: function getForegroundColor() {
  16339. return get_foreground_color_default;
  16340. },
  16341. getOwnBackgroundColor: function getOwnBackgroundColor() {
  16342. return get_own_background_color_default;
  16343. },
  16344. getRectStack: function getRectStack() {
  16345. return get_rect_stack_default;
  16346. },
  16347. getTextShadowColors: function getTextShadowColors() {
  16348. return get_text_shadow_colors_default;
  16349. },
  16350. hasValidContrastRatio: function hasValidContrastRatio() {
  16351. return has_valid_contrast_ratio_default;
  16352. },
  16353. incompleteData: function incompleteData() {
  16354. return incomplete_data_default;
  16355. }
  16356. });
  16357. function centerPointOfRect(rect) {
  16358. if (rect.left > window.innerWidth) {
  16359. return void 0;
  16360. }
  16361. if (rect.top > window.innerHeight) {
  16362. return void 0;
  16363. }
  16364. var x = Math.min(Math.ceil(rect.left + rect.width / 2), window.innerWidth - 1);
  16365. var y = Math.min(Math.ceil(rect.top + rect.height / 2), window.innerHeight - 1);
  16366. return {
  16367. x: x,
  16368. y: y
  16369. };
  16370. }
  16371. var center_point_of_rect_default = centerPointOfRect;
  16372. function _getFonts(style) {
  16373. return style.getPropertyValue('font-family').split(/[,;]/g).map(function(font) {
  16374. return font.trim().toLowerCase();
  16375. });
  16376. }
  16377. function elementIsDistinct(node, ancestorNode) {
  16378. var nodeStyle = window.getComputedStyle(node);
  16379. if (nodeStyle.getPropertyValue('background-image') !== 'none') {
  16380. return true;
  16381. }
  16382. var hasBorder = [ 'border-bottom', 'border-top', 'outline' ].reduce(function(result, edge) {
  16383. var borderClr = new color_default();
  16384. borderClr.parseString(nodeStyle.getPropertyValue(edge + '-color'));
  16385. return result || nodeStyle.getPropertyValue(edge + '-style') !== 'none' && parseFloat(nodeStyle.getPropertyValue(edge + '-width')) > 0 && borderClr.alpha !== 0;
  16386. }, false);
  16387. if (hasBorder) {
  16388. return true;
  16389. }
  16390. var parentStyle = window.getComputedStyle(ancestorNode);
  16391. if (_getFonts(nodeStyle)[0] !== _getFonts(parentStyle)[0]) {
  16392. return true;
  16393. }
  16394. var hasStyle = [ 'text-decoration-line', 'text-decoration-style', 'font-weight', 'font-style', 'font-size' ].reduce(function(result, cssProp) {
  16395. return result || nodeStyle.getPropertyValue(cssProp) !== parentStyle.getPropertyValue(cssProp);
  16396. }, false);
  16397. var tDec = nodeStyle.getPropertyValue('text-decoration');
  16398. if (tDec.split(' ').length < 3) {
  16399. hasStyle = hasStyle || tDec !== parentStyle.getPropertyValue('text-decoration');
  16400. }
  16401. return hasStyle;
  16402. }
  16403. var element_is_distinct_default = elementIsDistinct;
  16404. function getRectStack2(elm) {
  16405. var boundingStack = get_element_stack_default(elm);
  16406. var filteredArr = get_text_element_stack_default(elm);
  16407. if (!filteredArr || filteredArr.length <= 1) {
  16408. return [ boundingStack ];
  16409. }
  16410. if (filteredArr.some(function(stack) {
  16411. return stack === void 0;
  16412. })) {
  16413. return null;
  16414. }
  16415. filteredArr.splice(0, 0, boundingStack);
  16416. return filteredArr;
  16417. }
  16418. var get_rect_stack_default = getRectStack2;
  16419. function filteredRectStack(elm) {
  16420. var rectStack = get_rect_stack_default(elm);
  16421. if (rectStack && rectStack.length === 1) {
  16422. return rectStack[0];
  16423. }
  16424. if (rectStack && rectStack.length > 1) {
  16425. var boundingStack = rectStack.shift();
  16426. var isSame;
  16427. rectStack.forEach(function(rectList, index) {
  16428. if (index === 0) {
  16429. return;
  16430. }
  16431. var rectA = rectStack[index - 1], rectB = rectStack[index];
  16432. isSame = rectA.every(function(element, elementIndex) {
  16433. return element === rectB[elementIndex];
  16434. }) || boundingStack.includes(elm);
  16435. });
  16436. if (!isSame) {
  16437. incomplete_data_default.set('bgColor', 'elmPartiallyObscuring');
  16438. return null;
  16439. }
  16440. return rectStack[0];
  16441. }
  16442. incomplete_data_default.set('bgColor', 'outsideViewport');
  16443. return null;
  16444. }
  16445. var filtered_rect_stack_default = filteredRectStack;
  16446. function flattenColors(fgColor, bgColor) {
  16447. var alpha = fgColor.alpha;
  16448. var r = (1 - alpha) * bgColor.red + alpha * fgColor.red;
  16449. var g = (1 - alpha) * bgColor.green + alpha * fgColor.green;
  16450. var b = (1 - alpha) * bgColor.blue + alpha * fgColor.blue;
  16451. var a = fgColor.alpha + bgColor.alpha * (1 - fgColor.alpha);
  16452. return new color_default(r, g, b, a);
  16453. }
  16454. var flatten_colors_default = flattenColors;
  16455. function contentOverlapping(targetElement, bgNode) {
  16456. var targetRect = targetElement.getClientRects()[0];
  16457. var obscuringElements = shadow_elements_from_point_default(targetRect.left, targetRect.top);
  16458. if (obscuringElements) {
  16459. for (var i = 0; i < obscuringElements.length; i++) {
  16460. if (obscuringElements[i] !== targetElement && obscuringElements[i] === bgNode) {
  16461. return true;
  16462. }
  16463. }
  16464. }
  16465. return false;
  16466. }
  16467. function calculateObscuringElement(elmIndex, elmStack, originalElm) {
  16468. if (elmIndex > 0) {
  16469. for (var i = elmIndex - 1; i >= 0; i--) {
  16470. var bgElm = elmStack[i];
  16471. if (contentOverlapping(originalElm, bgElm)) {
  16472. return true;
  16473. } else {
  16474. elmStack.splice(i, 1);
  16475. }
  16476. }
  16477. }
  16478. return false;
  16479. }
  16480. function sortPageBackground(elmStack) {
  16481. var bodyIndex = elmStack.indexOf(document.body);
  16482. var bgNodes = elmStack;
  16483. var sortBodyElement = bodyIndex > 1 || bodyIndex === -1;
  16484. if (sortBodyElement && !element_has_image_default(document.documentElement) && get_own_background_color_default(window.getComputedStyle(document.documentElement)).alpha === 0) {
  16485. if (bodyIndex > 1) {
  16486. bgNodes.splice(bodyIndex, 1);
  16487. }
  16488. bgNodes.splice(elmStack.indexOf(document.documentElement), 1);
  16489. bgNodes.push(document.body);
  16490. }
  16491. return bgNodes;
  16492. }
  16493. function getBackgroundStack(elm) {
  16494. var elmStack = filtered_rect_stack_default(elm);
  16495. if (elmStack === null) {
  16496. return null;
  16497. }
  16498. elmStack = reduce_to_elements_below_floating_default(elmStack, elm);
  16499. elmStack = sortPageBackground(elmStack);
  16500. var elmIndex = elmStack.indexOf(elm);
  16501. if (calculateObscuringElement(elmIndex, elmStack, elm)) {
  16502. incomplete_data_default.set('bgColor', 'bgOverlap');
  16503. return null;
  16504. }
  16505. return elmIndex !== -1 ? elmStack : null;
  16506. }
  16507. var get_background_stack_default = getBackgroundStack;
  16508. function getTextShadowColors(node) {
  16509. var _ref45 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, minRatio = _ref45.minRatio, maxRatio = _ref45.maxRatio;
  16510. var style = window.getComputedStyle(node);
  16511. var textShadow = style.getPropertyValue('text-shadow');
  16512. if (textShadow === 'none') {
  16513. return [];
  16514. }
  16515. var fontSizeStr = style.getPropertyValue('font-size');
  16516. var fontSize = parseInt(fontSizeStr);
  16517. assert_default(isNaN(fontSize) === false, 'Unable to determine font-size value '.concat(fontSizeStr));
  16518. var shadowColors = [];
  16519. var shadows = parseTextShadows(textShadow);
  16520. shadows.forEach(function(_ref46) {
  16521. var colorStr = _ref46.colorStr, pixels = _ref46.pixels;
  16522. colorStr = colorStr || style.getPropertyValue('color');
  16523. var _pixels = _slicedToArray(pixels, 3), offsetY = _pixels[0], offsetX = _pixels[1], _pixels$ = _pixels[2], blurRadius = _pixels$ === void 0 ? 0 : _pixels$;
  16524. if ((!minRatio || blurRadius >= fontSize * minRatio) && (!maxRatio || blurRadius < fontSize * maxRatio)) {
  16525. var color10 = textShadowColor({
  16526. colorStr: colorStr,
  16527. offsetY: offsetY,
  16528. offsetX: offsetX,
  16529. blurRadius: blurRadius,
  16530. fontSize: fontSize
  16531. });
  16532. shadowColors.push(color10);
  16533. }
  16534. });
  16535. return shadowColors;
  16536. }
  16537. function parseTextShadows(textShadow) {
  16538. var current = {
  16539. pixels: []
  16540. };
  16541. var str = textShadow.trim();
  16542. var shadows = [ current ];
  16543. if (!str) {
  16544. return [];
  16545. }
  16546. while (str) {
  16547. var colorMatch = str.match(/^rgba?\([0-9,.\s]+\)/i) || str.match(/^[a-z]+/i) || str.match(/^#[0-9a-f]+/i);
  16548. var pixelMatch = str.match(/^([0-9.-]+)px/i) || str.match(/^(0)/);
  16549. if (colorMatch) {
  16550. assert_default(!current.colorStr, 'Multiple colors identified in text-shadow: '.concat(textShadow));
  16551. str = str.replace(colorMatch[0], '').trim();
  16552. current.colorStr = colorMatch[0];
  16553. } else if (pixelMatch) {
  16554. assert_default(current.pixels.length < 3, 'Too many pixel units in text-shadow: '.concat(textShadow));
  16555. str = str.replace(pixelMatch[0], '').trim();
  16556. var pixelUnit = parseFloat((pixelMatch[1][0] === '.' ? '0' : '') + pixelMatch[1]);
  16557. current.pixels.push(pixelUnit);
  16558. } else if (str[0] === ',') {
  16559. assert_default(current.pixels.length >= 2, 'Missing pixel value in text-shadow: '.concat(textShadow));
  16560. current = {
  16561. pixels: []
  16562. };
  16563. shadows.push(current);
  16564. str = str.substr(1).trim();
  16565. } else {
  16566. throw new Error('Unable to process text-shadows: '.concat(textShadow));
  16567. }
  16568. }
  16569. return shadows;
  16570. }
  16571. function textShadowColor(_ref47) {
  16572. var colorStr = _ref47.colorStr, offsetX = _ref47.offsetX, offsetY = _ref47.offsetY, blurRadius = _ref47.blurRadius, fontSize = _ref47.fontSize;
  16573. if (offsetX > blurRadius || offsetY > blurRadius) {
  16574. return new color_default(0, 0, 0, 0);
  16575. }
  16576. var shadowColor = new color_default();
  16577. shadowColor.parseString(colorStr);
  16578. shadowColor.alpha *= blurRadiusToAlpha(blurRadius, fontSize);
  16579. return shadowColor;
  16580. }
  16581. function blurRadiusToAlpha(blurRadius, fontSize) {
  16582. var relativeBlur = blurRadius / fontSize;
  16583. return .185 / (relativeBlur + .4);
  16584. }
  16585. var get_text_shadow_colors_default = getTextShadowColors;
  16586. function elmPartiallyObscured(elm, bgElm, bgColor) {
  16587. var obscured = elm !== bgElm && !visually_contains_default(elm, bgElm) && bgColor.alpha !== 0;
  16588. if (obscured) {
  16589. incomplete_data_default.set('bgColor', 'elmPartiallyObscured');
  16590. }
  16591. return obscured;
  16592. }
  16593. function getBackgroundColor(elm) {
  16594. var bgElms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  16595. var shadowOutlineEmMax = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : .1;
  16596. var bgColors = get_text_shadow_colors_default(elm, {
  16597. minRatio: shadowOutlineEmMax
  16598. });
  16599. var elmStack = get_background_stack_default(elm);
  16600. (elmStack || []).some(function(bgElm) {
  16601. var bgElmStyle = window.getComputedStyle(bgElm);
  16602. var bgColor = get_own_background_color_default(bgElmStyle);
  16603. if (elmPartiallyObscured(elm, bgElm, bgColor) || element_has_image_default(bgElm, bgElmStyle)) {
  16604. bgColors = null;
  16605. bgElms.push(bgElm);
  16606. return true;
  16607. }
  16608. if (bgColor.alpha !== 0) {
  16609. bgElms.push(bgElm);
  16610. bgColors.push(bgColor);
  16611. return bgColor.alpha === 1;
  16612. } else {
  16613. return false;
  16614. }
  16615. });
  16616. if (bgColors === null || elmStack === null) {
  16617. return null;
  16618. }
  16619. bgColors.push(new color_default(255, 255, 255, 1));
  16620. var colors = bgColors.reduce(flatten_colors_default);
  16621. return colors;
  16622. }
  16623. var get_background_color_default = getBackgroundColor;
  16624. function getContrast(bgColor, fgColor) {
  16625. if (!fgColor || !bgColor) {
  16626. return null;
  16627. }
  16628. if (fgColor.alpha < 1) {
  16629. fgColor = flatten_colors_default(fgColor, bgColor);
  16630. }
  16631. var bL = bgColor.getRelativeLuminance();
  16632. var fL = fgColor.getRelativeLuminance();
  16633. return (Math.max(fL, bL) + .05) / (Math.min(fL, bL) + .05);
  16634. }
  16635. var get_contrast_default = getContrast;
  16636. function getOpacity(node) {
  16637. if (!node) {
  16638. return 1;
  16639. }
  16640. var vNode = get_node_from_tree_default(node);
  16641. if (vNode && vNode._opacity !== void 0 && vNode._opacity !== null) {
  16642. return vNode._opacity;
  16643. }
  16644. var nodeStyle = window.getComputedStyle(node);
  16645. var opacity = nodeStyle.getPropertyValue('opacity');
  16646. var finalOpacity = opacity * getOpacity(node.parentElement);
  16647. if (vNode) {
  16648. vNode._opacity = finalOpacity;
  16649. }
  16650. return finalOpacity;
  16651. }
  16652. function getForegroundColor(node, _, bgColor) {
  16653. var nodeStyle = window.getComputedStyle(node);
  16654. var fgColor = new color_default();
  16655. fgColor.parseString(nodeStyle.getPropertyValue('color'));
  16656. var opacity = getOpacity(node);
  16657. fgColor.alpha = fgColor.alpha * opacity;
  16658. if (fgColor.alpha === 1) {
  16659. return fgColor;
  16660. }
  16661. if (!bgColor) {
  16662. bgColor = get_background_color_default(node, []);
  16663. }
  16664. if (bgColor === null) {
  16665. var reason = incomplete_data_default.get('bgColor');
  16666. incomplete_data_default.set('fgColor', reason);
  16667. return null;
  16668. }
  16669. return flatten_colors_default(fgColor, bgColor);
  16670. }
  16671. var get_foreground_color_default = getForegroundColor;
  16672. function hasValidContrastRatio(bg, fg, fontSize, isBold) {
  16673. var contrast = get_contrast_default(bg, fg);
  16674. var isSmallFont = isBold && Math.ceil(fontSize * 72) / 96 < 14 || !isBold && Math.ceil(fontSize * 72) / 96 < 18;
  16675. var expectedContrastRatio = isSmallFont ? 4.5 : 3;
  16676. return {
  16677. isValid: contrast > expectedContrastRatio,
  16678. contrastRatio: contrast,
  16679. expectedContrastRatio: expectedContrastRatio
  16680. };
  16681. }
  16682. var has_valid_contrast_ratio_default = hasValidContrastRatio;
  16683. var hasPsuedoElement = memoize_default(function hasPsuedoElement2(node, pseudo) {
  16684. var style = window.getComputedStyle(node, pseudo);
  16685. var backgroundColor = get_own_background_color_default(style);
  16686. return style.getPropertyValue('content') !== 'none' && style.getPropertyValue('position') === 'absolute' && parseInt(style.getPropertyValue('width')) !== 0 && parseInt(style.getPropertyValue('height')) !== 0 && (backgroundColor.alpha !== 0 || style.getPropertyValue('background-image') !== 'none');
  16687. });
  16688. function colorContrastEvaluate(node, options, virtualNode) {
  16689. if (!is_visible_default(node, false)) {
  16690. return true;
  16691. }
  16692. var ignoreUnicode = options.ignoreUnicode, ignoreLength = options.ignoreLength, boldValue = options.boldValue, boldTextPt = options.boldTextPt, largeTextPt = options.largeTextPt, contrastRatio = options.contrastRatio, shadowOutlineEmMax = options.shadowOutlineEmMax;
  16693. var visibleText = visible_virtual_default(virtualNode, false, true);
  16694. var textContainsOnlyUnicode = has_unicode_default(visibleText, {
  16695. nonBmp: true
  16696. }) && sanitize_default(remove_unicode_default(visibleText, {
  16697. nonBmp: true
  16698. })) === '';
  16699. if (textContainsOnlyUnicode && ignoreUnicode) {
  16700. this.data({
  16701. messageKey: 'nonBmp'
  16702. });
  16703. return void 0;
  16704. }
  16705. var bgNodes = [];
  16706. var bgColor = get_background_color_default(node, bgNodes, shadowOutlineEmMax);
  16707. var fgColor = get_foreground_color_default(node, false, bgColor);
  16708. var shadowColors = get_text_shadow_colors_default(node, {
  16709. maxRatio: shadowOutlineEmMax
  16710. });
  16711. var nodeStyle = window.getComputedStyle(node);
  16712. var fontSize = parseFloat(nodeStyle.getPropertyValue('font-size'));
  16713. var fontWeight = nodeStyle.getPropertyValue('font-weight');
  16714. var bold = parseFloat(fontWeight) >= boldValue || fontWeight === 'bold';
  16715. var contrast = null;
  16716. if (shadowColors.length === 0) {
  16717. contrast = get_contrast_default(bgColor, fgColor);
  16718. } else if (fgColor && bgColor) {
  16719. var shadowColor = [].concat(_toConsumableArray(shadowColors), [ bgColor ]).reduce(flatten_colors_default);
  16720. var bgContrast = get_contrast_default(bgColor, shadowColor);
  16721. var fgContrast = get_contrast_default(shadowColor, fgColor);
  16722. contrast = Math.max(bgContrast, fgContrast);
  16723. }
  16724. var ptSize = Math.ceil(fontSize * 72) / 96;
  16725. var isSmallFont = bold && ptSize < boldTextPt || !bold && ptSize < largeTextPt;
  16726. var _ref48 = isSmallFont ? contrastRatio.normal : contrastRatio.large, expected = _ref48.expected, minThreshold = _ref48.minThreshold, maxThreshold = _ref48.maxThreshold;
  16727. var isValid = contrast > expected;
  16728. var parentNode = node.parentElement;
  16729. while (parentNode) {
  16730. if (hasPsuedoElement(parentNode, ':before') || hasPsuedoElement(parentNode, ':after')) {
  16731. this.data({
  16732. messageKey: 'pseudoContent'
  16733. });
  16734. this.relatedNodes(parentNode);
  16735. return void 0;
  16736. }
  16737. parentNode = parentNode.parentElement;
  16738. }
  16739. if (typeof minThreshold === 'number' && contrast < minThreshold || typeof maxThreshold === 'number' && contrast > maxThreshold) {
  16740. return true;
  16741. }
  16742. var truncatedResult = Math.floor(contrast * 100) / 100;
  16743. var missing;
  16744. if (bgColor === null) {
  16745. missing = incomplete_data_default.get('bgColor');
  16746. }
  16747. var equalRatio = truncatedResult === 1;
  16748. var shortTextContent = visibleText.length === 1;
  16749. if (equalRatio) {
  16750. missing = incomplete_data_default.set('bgColor', 'equalRatio');
  16751. } else if (shortTextContent && !ignoreLength) {
  16752. missing = 'shortTextContent';
  16753. }
  16754. var data2 = {
  16755. fgColor: fgColor ? fgColor.toHexString() : void 0,
  16756. bgColor: bgColor ? bgColor.toHexString() : void 0,
  16757. contrastRatio: truncatedResult,
  16758. fontSize: ''.concat((fontSize * 72 / 96).toFixed(1), 'pt (').concat(fontSize, 'px)'),
  16759. fontWeight: bold ? 'bold' : 'normal',
  16760. messageKey: missing,
  16761. expectedContrastRatio: expected + ':1'
  16762. };
  16763. this.data(data2);
  16764. if (fgColor === null || bgColor === null || equalRatio || shortTextContent && !ignoreLength && !isValid) {
  16765. missing = null;
  16766. incomplete_data_default.clear();
  16767. this.relatedNodes(bgNodes);
  16768. return void 0;
  16769. }
  16770. if (!isValid) {
  16771. this.relatedNodes(bgNodes);
  16772. }
  16773. return isValid;
  16774. }
  16775. var color_contrast_evaluate_default = colorContrastEvaluate;
  16776. function getContrast2(color1, color22) {
  16777. var c1lum = color1.getRelativeLuminance();
  16778. var c2lum = color22.getRelativeLuminance();
  16779. return (Math.max(c1lum, c2lum) + .05) / (Math.min(c1lum, c2lum) + .05);
  16780. }
  16781. var blockLike2 = [ 'block', 'list-item', 'table', 'flex', 'grid', 'inline-block' ];
  16782. function isBlock2(elm) {
  16783. var display = window.getComputedStyle(elm).getPropertyValue('display');
  16784. return blockLike2.indexOf(display) !== -1 || display.substr(0, 6) === 'table-';
  16785. }
  16786. function linkInTextBlockEvaluate(node) {
  16787. if (isBlock2(node)) {
  16788. return false;
  16789. }
  16790. var parentBlock = get_composed_parent_default(node);
  16791. while (parentBlock.nodeType === 1 && !isBlock2(parentBlock)) {
  16792. parentBlock = get_composed_parent_default(parentBlock);
  16793. }
  16794. this.relatedNodes([ parentBlock ]);
  16795. if (element_is_distinct_default(node, parentBlock)) {
  16796. return true;
  16797. } else {
  16798. var nodeColor, parentColor;
  16799. nodeColor = get_foreground_color_default(node);
  16800. parentColor = get_foreground_color_default(parentBlock);
  16801. if (!nodeColor || !parentColor) {
  16802. return void 0;
  16803. }
  16804. var contrast = getContrast2(nodeColor, parentColor);
  16805. if (contrast === 1) {
  16806. return true;
  16807. } else if (contrast >= 3) {
  16808. incomplete_data_default.set('fgColor', 'bgContrast');
  16809. this.data({
  16810. messageKey: incomplete_data_default.get('fgColor')
  16811. });
  16812. incomplete_data_default.clear();
  16813. return void 0;
  16814. }
  16815. nodeColor = get_background_color_default(node);
  16816. parentColor = get_background_color_default(parentBlock);
  16817. if (!nodeColor || !parentColor || getContrast2(nodeColor, parentColor) >= 3) {
  16818. var reason;
  16819. if (!nodeColor || !parentColor) {
  16820. reason = incomplete_data_default.get('bgColor');
  16821. } else {
  16822. reason = 'bgContrast';
  16823. }
  16824. incomplete_data_default.set('fgColor', reason);
  16825. this.data({
  16826. messageKey: incomplete_data_default.get('fgColor')
  16827. });
  16828. incomplete_data_default.clear();
  16829. return void 0;
  16830. }
  16831. }
  16832. return false;
  16833. }
  16834. var link_in_text_block_evaluate_default = linkInTextBlockEvaluate;
  16835. function autocompleteAppropriateEvaluate(node, options, virtualNode) {
  16836. if (virtualNode.props.nodeName !== 'input') {
  16837. return true;
  16838. }
  16839. var number = [ 'text', 'search', 'number', 'tel' ];
  16840. var url = [ 'text', 'search', 'url' ];
  16841. var allowedTypesMap = {
  16842. bday: [ 'text', 'search', 'date' ],
  16843. email: [ 'text', 'search', 'email' ],
  16844. username: [ 'text', 'search', 'email' ],
  16845. 'street-address': [ 'text' ],
  16846. tel: [ 'text', 'search', 'tel' ],
  16847. 'tel-country-code': [ 'text', 'search', 'tel' ],
  16848. 'tel-national': [ 'text', 'search', 'tel' ],
  16849. 'tel-area-code': [ 'text', 'search', 'tel' ],
  16850. 'tel-local': [ 'text', 'search', 'tel' ],
  16851. 'tel-local-prefix': [ 'text', 'search', 'tel' ],
  16852. 'tel-local-suffix': [ 'text', 'search', 'tel' ],
  16853. 'tel-extension': [ 'text', 'search', 'tel' ],
  16854. 'cc-number': number,
  16855. 'cc-exp': [ 'text', 'search', 'month', 'tel' ],
  16856. 'cc-exp-month': number,
  16857. 'cc-exp-year': number,
  16858. 'cc-csc': number,
  16859. 'transaction-amount': number,
  16860. 'bday-day': number,
  16861. 'bday-month': number,
  16862. 'bday-year': number,
  16863. 'new-password': [ 'text', 'search', 'password' ],
  16864. 'current-password': [ 'text', 'search', 'password' ],
  16865. url: url,
  16866. photo: url,
  16867. impp: url
  16868. };
  16869. if (_typeof(options) === 'object') {
  16870. Object.keys(options).forEach(function(key) {
  16871. if (!allowedTypesMap[key]) {
  16872. allowedTypesMap[key] = [];
  16873. }
  16874. allowedTypesMap[key] = allowedTypesMap[key].concat(options[key]);
  16875. });
  16876. }
  16877. var autocompleteAttr = virtualNode.attr('autocomplete');
  16878. var autocompleteTerms = autocompleteAttr.split(/\s+/g).map(function(term) {
  16879. return term.toLowerCase();
  16880. });
  16881. var purposeTerm = autocompleteTerms[autocompleteTerms.length - 1];
  16882. if (_autocomplete.stateTerms.includes(purposeTerm)) {
  16883. return true;
  16884. }
  16885. var allowedTypes = allowedTypesMap[purposeTerm];
  16886. var type = virtualNode.hasAttr('type') ? sanitize_default(virtualNode.attr('type')).toLowerCase() : 'text';
  16887. type = valid_input_type_default().includes(type) ? type : 'text';
  16888. if (typeof allowedTypes === 'undefined') {
  16889. return type === 'text';
  16890. }
  16891. return allowedTypes.includes(type);
  16892. }
  16893. var autocomplete_appropriate_evaluate_default = autocompleteAppropriateEvaluate;
  16894. function autocompleteValidEvaluate(node, options, virtualNode) {
  16895. var autocomplete2 = virtualNode.attr('autocomplete') || '';
  16896. return is_valid_autocomplete_default(autocomplete2, options);
  16897. }
  16898. var autocomplete_valid_evaluate_default = autocompleteValidEvaluate;
  16899. function attrNonSpaceContentEvaluate(node) {
  16900. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16901. var vNode = arguments.length > 2 ? arguments[2] : undefined;
  16902. if (!options.attribute || typeof options.attribute !== 'string') {
  16903. throw new TypeError('attr-non-space-content requires options.attribute to be a string');
  16904. }
  16905. if (!vNode.hasAttr(options.attribute)) {
  16906. this.data({
  16907. messageKey: 'noAttr'
  16908. });
  16909. return false;
  16910. }
  16911. var attribute = vNode.attr(options.attribute);
  16912. var attributeIsEmpty = !sanitize_default(attribute);
  16913. if (attributeIsEmpty) {
  16914. this.data({
  16915. messageKey: 'emptyAttr'
  16916. });
  16917. return false;
  16918. }
  16919. return true;
  16920. }
  16921. var attr_non_space_content_evaluate_default = attrNonSpaceContentEvaluate;
  16922. function pageHasElmAfter(results) {
  16923. var elmUsedAnywhere = results.some(function(frameResult) {
  16924. return frameResult.result === true;
  16925. });
  16926. if (elmUsedAnywhere) {
  16927. results.forEach(function(result) {
  16928. result.result = true;
  16929. });
  16930. }
  16931. return results;
  16932. }
  16933. var has_descendant_after_default = pageHasElmAfter;
  16934. function hasDescendant(node, options, virtualNode) {
  16935. if (!options || !options.selector || typeof options.selector !== 'string') {
  16936. throw new TypeError('has-descendant requires options.selector to be a string');
  16937. }
  16938. var matchingElms = query_selector_all_filter_default(virtualNode, options.selector, function(vNode) {
  16939. return is_visible_default(vNode.actualNode, true);
  16940. });
  16941. this.relatedNodes(matchingElms.map(function(vNode) {
  16942. return vNode.actualNode;
  16943. }));
  16944. return matchingElms.length > 0;
  16945. }
  16946. var has_descendant_evaluate_default = hasDescendant;
  16947. function hasTextContentEvaluate(node, options, virtualNode) {
  16948. try {
  16949. return sanitize_default(subtree_text_default(virtualNode)) !== '';
  16950. } catch (e) {
  16951. return void 0;
  16952. }
  16953. }
  16954. var has_text_content_evaluate_default = hasTextContentEvaluate;
  16955. function matchesDefinitionEvaluate(_, options, virtualNode) {
  16956. return matches_default3(virtualNode, options.matcher);
  16957. }
  16958. var matches_definition_evaluate_default = matchesDefinitionEvaluate;
  16959. function pageNoDuplicateAfter(results) {
  16960. return results.filter(function(checkResult) {
  16961. return checkResult.data !== 'ignored';
  16962. });
  16963. }
  16964. var page_no_duplicate_after_default = pageNoDuplicateAfter;
  16965. function pageNoDuplicateEvaluate(node, options, virtualNode) {
  16966. if (!options || !options.selector || typeof options.selector !== 'string') {
  16967. throw new TypeError('page-no-duplicate requires options.selector to be a string');
  16968. }
  16969. var key = 'page-no-duplicate;' + options.selector;
  16970. if (cache_default.get(key)) {
  16971. this.data('ignored');
  16972. return;
  16973. }
  16974. cache_default.set(key, true);
  16975. var elms = query_selector_all_filter_default(axe._tree[0], options.selector, function(elm) {
  16976. return is_visible_default(elm.actualNode);
  16977. });
  16978. if (typeof options.nativeScopeFilter === 'string') {
  16979. elms = elms.filter(function(elm) {
  16980. return elm.actualNode.hasAttribute('role') || !find_up_virtual_default(elm, options.nativeScopeFilter);
  16981. });
  16982. }
  16983. this.relatedNodes(elms.filter(function(elm) {
  16984. return elm !== virtualNode;
  16985. }).map(function(elm) {
  16986. return elm.actualNode;
  16987. }));
  16988. return elms.length <= 1;
  16989. }
  16990. var page_no_duplicate_evaluate_default = pageNoDuplicateEvaluate;
  16991. function headingOrderAfter(results) {
  16992. var headingOrder = getHeadingOrder(results);
  16993. results.forEach(function(result) {
  16994. result.result = getHeadingOrderOutcome(result, headingOrder);
  16995. });
  16996. return results;
  16997. }
  16998. function getHeadingOrderOutcome(result, headingOrder) {
  16999. var _headingOrder$index$l, _headingOrder$index, _headingOrder$level, _headingOrder;
  17000. var index = findHeadingOrderIndex(headingOrder, result.node.ancestry);
  17001. var currLevel = (_headingOrder$index$l = (_headingOrder$index = headingOrder[index]) === null || _headingOrder$index === void 0 ? void 0 : _headingOrder$index.level) !== null && _headingOrder$index$l !== void 0 ? _headingOrder$index$l : -1;
  17002. var prevLevel = (_headingOrder$level = (_headingOrder = headingOrder[index - 1]) === null || _headingOrder === void 0 ? void 0 : _headingOrder.level) !== null && _headingOrder$level !== void 0 ? _headingOrder$level : -1;
  17003. if (index === 0) {
  17004. return true;
  17005. }
  17006. if (currLevel === -1) {
  17007. return void 0;
  17008. }
  17009. return currLevel - prevLevel <= 1;
  17010. }
  17011. function getHeadingOrder(results) {
  17012. results = _toConsumableArray(results);
  17013. results.sort(function(_ref49, _ref50) {
  17014. var nodeA = _ref49.node;
  17015. var nodeB = _ref50.node;
  17016. return nodeA.ancestry.length - nodeB.ancestry.length;
  17017. });
  17018. var headingOrder = results.reduce(mergeHeadingOrder, []);
  17019. return headingOrder.filter(function(_ref51) {
  17020. var level = _ref51.level;
  17021. return level !== -1;
  17022. });
  17023. }
  17024. function mergeHeadingOrder(mergedHeadingOrder, result) {
  17025. var _result$data;
  17026. var frameHeadingOrder = (_result$data = result.data) === null || _result$data === void 0 ? void 0 : _result$data.headingOrder;
  17027. var frameAncestry = shortenArray(result.node.ancestry, 1);
  17028. if (!frameHeadingOrder) {
  17029. return mergedHeadingOrder;
  17030. }
  17031. var normalizedHeadingOrder = frameHeadingOrder.map(function(heading) {
  17032. return addFrameToHeadingAncestry(heading, frameAncestry);
  17033. });
  17034. var index = getFrameIndex(mergedHeadingOrder, frameAncestry);
  17035. if (index === -1) {
  17036. mergedHeadingOrder.push.apply(mergedHeadingOrder, _toConsumableArray(normalizedHeadingOrder));
  17037. } else {
  17038. mergedHeadingOrder.splice.apply(mergedHeadingOrder, [ index, 0 ].concat(_toConsumableArray(normalizedHeadingOrder)));
  17039. }
  17040. return mergedHeadingOrder;
  17041. }
  17042. function getFrameIndex(headingOrder, frameAncestry) {
  17043. while (frameAncestry.length) {
  17044. var index = findHeadingOrderIndex(headingOrder, frameAncestry);
  17045. if (index !== -1) {
  17046. return index;
  17047. }
  17048. frameAncestry = shortenArray(frameAncestry, 1);
  17049. }
  17050. return -1;
  17051. }
  17052. function findHeadingOrderIndex(headingOrder, ancestry) {
  17053. return headingOrder.findIndex(function(heading) {
  17054. return matchAncestry(heading.ancestry, ancestry);
  17055. });
  17056. }
  17057. function addFrameToHeadingAncestry(heading, frameAncestry) {
  17058. var ancestry = frameAncestry.concat(heading.ancestry);
  17059. return _extends({}, heading, {
  17060. ancestry: ancestry
  17061. });
  17062. }
  17063. function matchAncestry(ancestryA, ancestryB) {
  17064. if (ancestryA.length !== ancestryB.length) {
  17065. return false;
  17066. }
  17067. return ancestryA.every(function(selectorA, index) {
  17068. var selectorB = ancestryB[index];
  17069. if (!Array.isArray(selectorA)) {
  17070. return selectorA === selectorB;
  17071. }
  17072. if (selectorA.length !== selectorB.length) {
  17073. return false;
  17074. }
  17075. return selectorA.every(function(str, index2) {
  17076. return selectorB[index2] === str;
  17077. });
  17078. });
  17079. }
  17080. function shortenArray(arr, spliceLength) {
  17081. return arr.slice(0, arr.length - spliceLength);
  17082. }
  17083. function getLevel(vNode) {
  17084. var role = vNode.attr('role');
  17085. if (role && role.includes('heading')) {
  17086. var ariaHeadingLevel = vNode.attr('aria-level');
  17087. var level = parseInt(ariaHeadingLevel, 10);
  17088. if (isNaN(level) || level < 1 || level > 6) {
  17089. return 2;
  17090. }
  17091. return level;
  17092. }
  17093. var headingLevel = vNode.props.nodeName.match(/h(\d)/);
  17094. if (headingLevel) {
  17095. return parseInt(headingLevel[1], 10);
  17096. }
  17097. return -1;
  17098. }
  17099. function headingOrderEvaluate() {
  17100. var headingOrder = cache_default.get('headingOrder');
  17101. if (headingOrder) {
  17102. return true;
  17103. }
  17104. var selector = 'h1, h2, h3, h4, h5, h6, [role=heading], iframe, frame';
  17105. var vNodes = query_selector_all_filter_default(axe._tree[0], selector, function(vNode) {
  17106. return is_visible_default(vNode.actualNode, true);
  17107. });
  17108. headingOrder = vNodes.map(function(vNode) {
  17109. return {
  17110. ancestry: [ _getAncestry(vNode.actualNode) ],
  17111. level: getLevel(vNode)
  17112. };
  17113. });
  17114. this.data({
  17115. headingOrder: headingOrder
  17116. });
  17117. cache_default.set('headingOrder', vNodes);
  17118. return true;
  17119. }
  17120. var heading_order_evaluate_default = headingOrderEvaluate;
  17121. function isIdenticalObject(a, b) {
  17122. if (!a || !b) {
  17123. return false;
  17124. }
  17125. var aProps = Object.getOwnPropertyNames(a);
  17126. var bProps = Object.getOwnPropertyNames(b);
  17127. if (aProps.length !== bProps.length) {
  17128. return false;
  17129. }
  17130. var result = aProps.every(function(propName) {
  17131. var aValue = a[propName];
  17132. var bValue = b[propName];
  17133. if (_typeof(aValue) !== _typeof(bValue)) {
  17134. return false;
  17135. }
  17136. if (typeof aValue === 'object' || typeof bValue === 'object') {
  17137. return isIdenticalObject(aValue, bValue);
  17138. }
  17139. return aValue === bValue;
  17140. });
  17141. return result;
  17142. }
  17143. function identicalLinksSamePurposeAfter(results) {
  17144. if (results.length < 2) {
  17145. return results;
  17146. }
  17147. var incompleteResults = results.filter(function(_ref52) {
  17148. var result = _ref52.result;
  17149. return result !== void 0;
  17150. });
  17151. var uniqueResults = [];
  17152. var nameMap = {};
  17153. var _loop5 = function _loop5(index) {
  17154. var _currentResult$relate;
  17155. var currentResult = incompleteResults[index];
  17156. var _currentResult$data = currentResult.data, name = _currentResult$data.name, urlProps = _currentResult$data.urlProps;
  17157. if (nameMap[name]) {
  17158. return 'continue';
  17159. }
  17160. var sameNameResults = incompleteResults.filter(function(_ref53, resultNum) {
  17161. var data2 = _ref53.data;
  17162. return data2.name === name && resultNum !== index;
  17163. });
  17164. var isSameUrl = sameNameResults.every(function(_ref54) {
  17165. var data2 = _ref54.data;
  17166. return isIdenticalObject(data2.urlProps, urlProps);
  17167. });
  17168. if (sameNameResults.length && !isSameUrl) {
  17169. currentResult.result = void 0;
  17170. }
  17171. currentResult.relatedNodes = [];
  17172. (_currentResult$relate = currentResult.relatedNodes).push.apply(_currentResult$relate, _toConsumableArray(sameNameResults.map(function(node) {
  17173. return node.relatedNodes[0];
  17174. })));
  17175. nameMap[name] = sameNameResults;
  17176. uniqueResults.push(currentResult);
  17177. };
  17178. for (var index = 0; index < incompleteResults.length; index++) {
  17179. var _ret2 = _loop5(index);
  17180. if (_ret2 === 'continue') {
  17181. continue;
  17182. }
  17183. }
  17184. return uniqueResults;
  17185. }
  17186. var identical_links_same_purpose_after_default = identicalLinksSamePurposeAfter;
  17187. var commons_exports = {};
  17188. __export(commons_exports, {
  17189. aria: function aria() {
  17190. return aria_exports;
  17191. },
  17192. color: function color() {
  17193. return color_exports;
  17194. },
  17195. dom: function dom() {
  17196. return dom_exports;
  17197. },
  17198. forms: function forms() {
  17199. return forms_exports;
  17200. },
  17201. matches: function matches() {
  17202. return matches_default3;
  17203. },
  17204. standards: function standards() {
  17205. return standards_exports;
  17206. },
  17207. table: function table() {
  17208. return table_exports;
  17209. },
  17210. text: function text() {
  17211. return text_exports;
  17212. },
  17213. utils: function utils() {
  17214. return utils_exports;
  17215. }
  17216. });
  17217. var forms_exports = {};
  17218. __export(forms_exports, {
  17219. isAriaCombobox: function isAriaCombobox() {
  17220. return is_aria_combobox_default;
  17221. },
  17222. isAriaListbox: function isAriaListbox() {
  17223. return is_aria_listbox_default;
  17224. },
  17225. isAriaRange: function isAriaRange() {
  17226. return is_aria_range_default;
  17227. },
  17228. isAriaTextbox: function isAriaTextbox() {
  17229. return is_aria_textbox_default;
  17230. },
  17231. isDisabled: function isDisabled() {
  17232. return is_disabled_default;
  17233. },
  17234. isNativeSelect: function isNativeSelect() {
  17235. return is_native_select_default;
  17236. },
  17237. isNativeTextbox: function isNativeTextbox() {
  17238. return is_native_textbox_default;
  17239. }
  17240. });
  17241. var disabledNodeNames = [ 'fieldset', 'button', 'select', 'input', 'textarea' ];
  17242. function isDisabled(virtualNode) {
  17243. var disabledState = virtualNode._isDisabled;
  17244. if (typeof disabledState === 'boolean') {
  17245. return disabledState;
  17246. }
  17247. var nodeName2 = virtualNode.props.nodeName;
  17248. var ariaDisabled = virtualNode.attr('aria-disabled');
  17249. if (disabledNodeNames.includes(nodeName2) && virtualNode.hasAttr('disabled')) {
  17250. disabledState = true;
  17251. } else if (ariaDisabled) {
  17252. disabledState = ariaDisabled.toLowerCase() === 'true';
  17253. } else if (virtualNode.parent) {
  17254. disabledState = isDisabled(virtualNode.parent);
  17255. } else {
  17256. disabledState = false;
  17257. }
  17258. virtualNode._isDisabled = disabledState;
  17259. return disabledState;
  17260. }
  17261. var is_disabled_default = isDisabled;
  17262. var commons = {
  17263. aria: aria_exports,
  17264. color: color_exports,
  17265. dom: dom_exports,
  17266. forms: forms_exports,
  17267. matches: matches_default3,
  17268. standards: standards_exports,
  17269. table: table_exports,
  17270. text: text_exports,
  17271. utils: utils_exports
  17272. };
  17273. function identicalLinksSamePurposeEvaluate(node, options, virtualNode) {
  17274. var accText = text_exports.accessibleTextVirtual(virtualNode);
  17275. var name = text_exports.sanitize(text_exports.removeUnicode(accText, {
  17276. emoji: true,
  17277. nonBmp: true,
  17278. punctuations: true
  17279. })).toLowerCase();
  17280. if (!name) {
  17281. return void 0;
  17282. }
  17283. var afterData = {
  17284. name: name,
  17285. urlProps: dom_exports.urlPropsFromAttribute(node, 'href')
  17286. };
  17287. this.data(afterData);
  17288. this.relatedNodes([ node ]);
  17289. return true;
  17290. }
  17291. var identical_links_same_purpose_evaluate_default = identicalLinksSamePurposeEvaluate;
  17292. function internalLinkPresentEvaluate(node, options, virtualNode) {
  17293. var links = query_selector_all_default(virtualNode, 'a[href]');
  17294. return links.some(function(vLink) {
  17295. return /^#[^/!]/.test(vLink.actualNode.getAttribute('href'));
  17296. });
  17297. }
  17298. var internal_link_present_evaluate_default = internalLinkPresentEvaluate;
  17299. function metaRefreshEvaluate(node, options, virtualNode) {
  17300. var content = virtualNode.attr('content') || '', parsedParams = content.split(/[;,]/);
  17301. return content === '' || parsedParams[0] === '0';
  17302. }
  17303. var meta_refresh_evaluate_default = metaRefreshEvaluate;
  17304. function normalizeFontWeight(weight) {
  17305. switch (weight) {
  17306. case 'lighter':
  17307. return 100;
  17308. case 'normal':
  17309. return 400;
  17310. case 'bold':
  17311. return 700;
  17312. case 'bolder':
  17313. return 900;
  17314. }
  17315. weight = parseInt(weight);
  17316. return !isNaN(weight) ? weight : 400;
  17317. }
  17318. function getTextContainer(elm) {
  17319. var nextNode = elm;
  17320. var outerText = elm.textContent.trim();
  17321. var innerText = outerText;
  17322. while (innerText === outerText && nextNode !== void 0) {
  17323. var _i19 = -1;
  17324. elm = nextNode;
  17325. if (elm.children.length === 0) {
  17326. return elm;
  17327. }
  17328. do {
  17329. _i19++;
  17330. innerText = elm.children[_i19].textContent.trim();
  17331. } while (innerText === '' && _i19 + 1 < elm.children.length);
  17332. nextNode = elm.children[_i19];
  17333. }
  17334. return elm;
  17335. }
  17336. function getStyleValues(node) {
  17337. var style = window.getComputedStyle(getTextContainer(node));
  17338. return {
  17339. fontWeight: normalizeFontWeight(style.getPropertyValue('font-weight')),
  17340. fontSize: parseInt(style.getPropertyValue('font-size')),
  17341. isItalic: style.getPropertyValue('font-style') === 'italic'
  17342. };
  17343. }
  17344. function isHeaderStyle(styleA, styleB, margins) {
  17345. return margins.reduce(function(out, margin) {
  17346. return out || (!margin.size || styleA.fontSize / margin.size > styleB.fontSize) && (!margin.weight || styleA.fontWeight - margin.weight > styleB.fontWeight) && (!margin.italic || styleA.isItalic && !styleB.isItalic);
  17347. }, false);
  17348. }
  17349. function pAsHeadingEvaluate(node, options, virtualNode) {
  17350. var siblings = Array.from(node.parentNode.children);
  17351. var currentIndex = siblings.indexOf(node);
  17352. options = options || {};
  17353. var margins = options.margins || [];
  17354. var nextSibling = siblings.slice(currentIndex + 1).find(function(elm) {
  17355. return elm.nodeName.toUpperCase() === 'P';
  17356. });
  17357. var prevSibling = siblings.slice(0, currentIndex).reverse().find(function(elm) {
  17358. return elm.nodeName.toUpperCase() === 'P';
  17359. });
  17360. var currStyle = getStyleValues(node);
  17361. var nextStyle = nextSibling ? getStyleValues(nextSibling) : null;
  17362. var prevStyle = prevSibling ? getStyleValues(prevSibling) : null;
  17363. if (!nextStyle || !isHeaderStyle(currStyle, nextStyle, margins)) {
  17364. return true;
  17365. }
  17366. var blockquote = find_up_virtual_default(virtualNode, 'blockquote');
  17367. if (blockquote && blockquote.nodeName.toUpperCase() === 'BLOCKQUOTE') {
  17368. return void 0;
  17369. }
  17370. if (prevStyle && !isHeaderStyle(currStyle, prevStyle, margins)) {
  17371. return void 0;
  17372. }
  17373. return false;
  17374. }
  17375. var p_as_heading_evaluate_default = pAsHeadingEvaluate;
  17376. var landmarkRoles = get_aria_roles_by_type_default('landmark');
  17377. var implicitAriaLiveRoles = [ 'alert', 'log', 'status' ];
  17378. function isRegion(virtualNode, options) {
  17379. var node = virtualNode.actualNode;
  17380. var role = get_role_default(virtualNode);
  17381. var ariaLive = (node.getAttribute('aria-live') || '').toLowerCase().trim();
  17382. if ([ 'assertive', 'polite' ].includes(ariaLive) || implicitAriaLiveRoles.includes(role)) {
  17383. return true;
  17384. }
  17385. if (landmarkRoles.includes(role)) {
  17386. return true;
  17387. }
  17388. if (options.regionMatcher && matches_default3(virtualNode, options.regionMatcher)) {
  17389. return true;
  17390. }
  17391. return false;
  17392. }
  17393. function findRegionlessElms(virtualNode, options) {
  17394. var node = virtualNode.actualNode;
  17395. if (isRegion(virtualNode, options) || is_skip_link_default(virtualNode.actualNode) && get_element_by_reference_default(virtualNode.actualNode, 'href') || !is_visible_default(node, true)) {
  17396. var vNode = virtualNode;
  17397. while (vNode) {
  17398. vNode._hasRegionDescendant = true;
  17399. vNode = vNode.parent;
  17400. }
  17401. return [];
  17402. } else if (node !== document.body && has_content_default(node, true)) {
  17403. return [ virtualNode ];
  17404. } else {
  17405. return virtualNode.children.filter(function(_ref55) {
  17406. var actualNode = _ref55.actualNode;
  17407. return actualNode.nodeType === 1;
  17408. }).map(function(vNode) {
  17409. return findRegionlessElms(vNode, options);
  17410. }).reduce(function(a, b) {
  17411. return a.concat(b);
  17412. }, []);
  17413. }
  17414. }
  17415. function regionEvaluate(node, options, virtualNode) {
  17416. var regionlessNodes = cache_default.get('regionlessNodes');
  17417. if (regionlessNodes) {
  17418. return !regionlessNodes.includes(virtualNode);
  17419. }
  17420. var tree = axe._tree;
  17421. regionlessNodes = findRegionlessElms(tree[0], options).map(function(vNode) {
  17422. while (vNode.parent && !vNode.parent._hasRegionDescendant && vNode.parent.actualNode !== document.body) {
  17423. vNode = vNode.parent;
  17424. }
  17425. return vNode;
  17426. }).filter(function(vNode, index, array) {
  17427. return array.indexOf(vNode) === index;
  17428. });
  17429. cache_default.set('regionlessNodes', regionlessNodes);
  17430. return !regionlessNodes.includes(virtualNode);
  17431. }
  17432. var region_evaluate_default = regionEvaluate;
  17433. function skipLinkEvaluate(node) {
  17434. var target = get_element_by_reference_default(node, 'href');
  17435. if (target) {
  17436. return is_visible_default(target, true) || void 0;
  17437. }
  17438. return false;
  17439. }
  17440. var skip_link_evaluate_default = skipLinkEvaluate;
  17441. function uniqueFrameTitleAfter(results) {
  17442. var titles = {};
  17443. results.forEach(function(r) {
  17444. titles[r.data] = titles[r.data] !== void 0 ? ++titles[r.data] : 0;
  17445. });
  17446. results.forEach(function(r) {
  17447. r.result = !!titles[r.data];
  17448. });
  17449. return results;
  17450. }
  17451. var unique_frame_title_after_default = uniqueFrameTitleAfter;
  17452. function uniqueFrameTitleEvaluate(node, options, vNode) {
  17453. var title = sanitize_default(vNode.attr('title')).toLowerCase();
  17454. this.data(title);
  17455. return true;
  17456. }
  17457. var unique_frame_title_evaluate_default = uniqueFrameTitleEvaluate;
  17458. function ariaLabelEvaluate(node, options, virtualNode) {
  17459. return !!sanitize_default(arialabel_text_default(virtualNode));
  17460. }
  17461. var aria_label_evaluate_default = ariaLabelEvaluate;
  17462. function ariaLabelledbyEvaluate(node, options, virtualNode) {
  17463. try {
  17464. return !!sanitize_default(arialabelledby_text_default(virtualNode));
  17465. } catch (e) {
  17466. return void 0;
  17467. }
  17468. }
  17469. var aria_labelledby_evaluate_default = ariaLabelledbyEvaluate;
  17470. function avoidInlineSpacingEvaluate(node, options) {
  17471. var overriddenProperties = options.cssProperties.filter(function(property) {
  17472. if (node.style.getPropertyPriority(property) === 'important') {
  17473. return property;
  17474. }
  17475. });
  17476. if (overriddenProperties.length > 0) {
  17477. this.data(overriddenProperties);
  17478. return false;
  17479. }
  17480. return true;
  17481. }
  17482. var avoid_inline_spacing_evaluate_default = avoidInlineSpacingEvaluate;
  17483. function docHasTitleEvaluate() {
  17484. var title = document.title;
  17485. return !!sanitize_default(title);
  17486. }
  17487. var doc_has_title_evaluate_default = docHasTitleEvaluate;
  17488. function existsEvaluate() {
  17489. return void 0;
  17490. }
  17491. var exists_evaluate_default = existsEvaluate;
  17492. function hasAltEvaluate(node, options, virtualNode) {
  17493. var nodeName2 = virtualNode.props.nodeName;
  17494. if (![ 'img', 'input', 'area' ].includes(nodeName2)) {
  17495. return false;
  17496. }
  17497. return virtualNode.hasAttr('alt');
  17498. }
  17499. var has_alt_evaluate_default = hasAltEvaluate;
  17500. function isOnScreenEvaluate(node) {
  17501. return is_visible_default(node, false) && !is_offscreen_default(node);
  17502. }
  17503. var is_on_screen_evaluate_default = isOnScreenEvaluate;
  17504. function nonEmptyIfPresentEvaluate(node, options, virtualNode) {
  17505. var nodeName2 = virtualNode.props.nodeName;
  17506. var type = (virtualNode.attr('type') || '').toLowerCase();
  17507. var label5 = virtualNode.attr('value');
  17508. if (label5) {
  17509. this.data({
  17510. messageKey: 'has-label'
  17511. });
  17512. }
  17513. if (nodeName2 === 'input' && [ 'submit', 'reset' ].includes(type)) {
  17514. return label5 === null;
  17515. }
  17516. return false;
  17517. }
  17518. var non_empty_if_present_evaluate_default = nonEmptyIfPresentEvaluate;
  17519. function presentationalRoleEvaluate(node, options, virtualNode) {
  17520. var role = get_role_default(virtualNode);
  17521. var explicitRole2 = get_explicit_role_default(virtualNode);
  17522. if ([ 'presentation', 'none' ].includes(role)) {
  17523. this.data({
  17524. role: role
  17525. });
  17526. return true;
  17527. }
  17528. if (![ 'presentation', 'none' ].includes(explicitRole2)) {
  17529. return false;
  17530. }
  17531. var hasGlobalAria = get_global_aria_attrs_default().some(function(attr) {
  17532. return virtualNode.hasAttr(attr);
  17533. });
  17534. var focusable = is_focusable_default(virtualNode);
  17535. var messageKey;
  17536. if (hasGlobalAria && !focusable) {
  17537. messageKey = 'globalAria';
  17538. } else if (!hasGlobalAria && focusable) {
  17539. messageKey = 'focusable';
  17540. } else {
  17541. messageKey = 'both';
  17542. }
  17543. this.data({
  17544. messageKey: messageKey,
  17545. role: role
  17546. });
  17547. return false;
  17548. }
  17549. var presentational_role_evaluate_default = presentationalRoleEvaluate;
  17550. function svgNonEmptyTitleEvaluate(node, options, virtualNode) {
  17551. if (!virtualNode.children) {
  17552. return void 0;
  17553. }
  17554. var titleNode = virtualNode.children.find(function(_ref56) {
  17555. var props = _ref56.props;
  17556. return props.nodeName === 'title';
  17557. });
  17558. if (!titleNode) {
  17559. this.data({
  17560. messageKey: 'noTitle'
  17561. });
  17562. return false;
  17563. }
  17564. try {
  17565. if (visible_virtual_default(titleNode) === '') {
  17566. this.data({
  17567. messageKey: 'emptyTitle'
  17568. });
  17569. return false;
  17570. }
  17571. } catch (e) {
  17572. return void 0;
  17573. }
  17574. return true;
  17575. }
  17576. var svg_non_empty_title_evaluate_default = svgNonEmptyTitleEvaluate;
  17577. function cssOrientationLockEvaluate(node, options, virtualNode, context3) {
  17578. var _ref57 = context3 || {}, _ref57$cssom = _ref57.cssom, cssom = _ref57$cssom === void 0 ? void 0 : _ref57$cssom;
  17579. var _ref58 = options || {}, _ref58$degreeThreshol = _ref58.degreeThreshold, degreeThreshold = _ref58$degreeThreshol === void 0 ? 0 : _ref58$degreeThreshol;
  17580. if (!cssom || !cssom.length) {
  17581. return void 0;
  17582. }
  17583. var isLocked = false;
  17584. var relatedElements = [];
  17585. var rulesGroupByDocumentFragment = groupCssomByDocument(cssom);
  17586. var _loop6 = function _loop6() {
  17587. var key = _Object$keys2[_i20];
  17588. var _rulesGroupByDocument = rulesGroupByDocumentFragment[key], root = _rulesGroupByDocument.root, rules = _rulesGroupByDocument.rules;
  17589. var orientationRules = rules.filter(isMediaRuleWithOrientation);
  17590. if (!orientationRules.length) {
  17591. return 'continue';
  17592. }
  17593. orientationRules.forEach(function(_ref59) {
  17594. var cssRules = _ref59.cssRules;
  17595. Array.from(cssRules).forEach(function(cssRule) {
  17596. var locked = getIsOrientationLocked(cssRule);
  17597. if (locked && cssRule.selectorText.toUpperCase() !== 'HTML') {
  17598. var elms = Array.from(root.querySelectorAll(cssRule.selectorText)) || [];
  17599. relatedElements = relatedElements.concat(elms);
  17600. }
  17601. isLocked = isLocked || locked;
  17602. });
  17603. });
  17604. };
  17605. for (var _i20 = 0, _Object$keys2 = Object.keys(rulesGroupByDocumentFragment); _i20 < _Object$keys2.length; _i20++) {
  17606. var _ret3 = _loop6();
  17607. if (_ret3 === 'continue') {
  17608. continue;
  17609. }
  17610. }
  17611. if (!isLocked) {
  17612. return true;
  17613. }
  17614. if (relatedElements.length) {
  17615. this.relatedNodes(relatedElements);
  17616. }
  17617. return false;
  17618. function groupCssomByDocument(cssObjectModel) {
  17619. return cssObjectModel.reduce(function(out, _ref60) {
  17620. var sheet = _ref60.sheet, root = _ref60.root, shadowId = _ref60.shadowId;
  17621. var key = shadowId ? shadowId : 'topDocument';
  17622. if (!out[key]) {
  17623. out[key] = {
  17624. root: root,
  17625. rules: []
  17626. };
  17627. }
  17628. if (!sheet || !sheet.cssRules) {
  17629. return out;
  17630. }
  17631. var rules = Array.from(sheet.cssRules);
  17632. out[key].rules = out[key].rules.concat(rules);
  17633. return out;
  17634. }, {});
  17635. }
  17636. function isMediaRuleWithOrientation(_ref61) {
  17637. var type = _ref61.type, cssText = _ref61.cssText;
  17638. if (type !== 4) {
  17639. return false;
  17640. }
  17641. return /orientation:\s*landscape/i.test(cssText) || /orientation:\s*portrait/i.test(cssText);
  17642. }
  17643. function getIsOrientationLocked(_ref62) {
  17644. var selectorText = _ref62.selectorText, style = _ref62.style;
  17645. if (!selectorText || style.length <= 0) {
  17646. return false;
  17647. }
  17648. var transformStyle = style.transform || style.webkitTransform || style.msTransform || false;
  17649. if (!transformStyle) {
  17650. return false;
  17651. }
  17652. var matches14 = transformStyle.match(/(rotate|rotateZ|rotate3d|matrix|matrix3d)\(([^)]+)\)(?!.*(rotate|rotateZ|rotate3d|matrix|matrix3d))/);
  17653. if (!matches14) {
  17654. return false;
  17655. }
  17656. var _matches = _slicedToArray(matches14, 3), transformFn = _matches[1], transformFnValue = _matches[2];
  17657. var degrees = getRotationInDegrees(transformFn, transformFnValue);
  17658. if (!degrees) {
  17659. return false;
  17660. }
  17661. degrees = Math.abs(degrees);
  17662. if (Math.abs(degrees - 180) % 180 <= degreeThreshold) {
  17663. return false;
  17664. }
  17665. return Math.abs(degrees - 90) % 90 <= degreeThreshold;
  17666. }
  17667. function getRotationInDegrees(transformFunction, transformFnValue) {
  17668. switch (transformFunction) {
  17669. case 'rotate':
  17670. case 'rotateZ':
  17671. return getAngleInDegrees(transformFnValue);
  17672. case 'rotate3d':
  17673. var _transformFnValue$spl = transformFnValue.split(',').map(function(value) {
  17674. return value.trim();
  17675. }), _transformFnValue$spl2 = _slicedToArray(_transformFnValue$spl, 4), z = _transformFnValue$spl2[2], angleWithUnit = _transformFnValue$spl2[3];
  17676. if (parseInt(z) === 0) {
  17677. return;
  17678. }
  17679. return getAngleInDegrees(angleWithUnit);
  17680. case 'matrix':
  17681. case 'matrix3d':
  17682. return getAngleInDegreesFromMatrixTransform(transformFnValue);
  17683. default:
  17684. return;
  17685. }
  17686. }
  17687. function getAngleInDegrees(angleWithUnit) {
  17688. var _ref63 = angleWithUnit.match(/(deg|grad|rad|turn)/) || [], _ref64 = _slicedToArray(_ref63, 1), unit = _ref64[0];
  17689. if (!unit) {
  17690. return;
  17691. }
  17692. var angle = parseFloat(angleWithUnit.replace(unit, ''));
  17693. switch (unit) {
  17694. case 'rad':
  17695. return convertRadToDeg(angle);
  17696. case 'grad':
  17697. return convertGradToDeg(angle);
  17698. case 'turn':
  17699. return convertTurnToDeg(angle);
  17700. case 'deg':
  17701. default:
  17702. return parseInt(angle);
  17703. }
  17704. }
  17705. function getAngleInDegreesFromMatrixTransform(transformFnValue) {
  17706. var values = transformFnValue.split(',');
  17707. if (values.length <= 6) {
  17708. var _values = _slicedToArray(values, 2), a = _values[0], b2 = _values[1];
  17709. var radians = Math.atan2(parseFloat(b2), parseFloat(a));
  17710. return convertRadToDeg(radians);
  17711. }
  17712. var sinB = parseFloat(values[8]);
  17713. var b = Math.asin(sinB);
  17714. var cosB = Math.cos(b);
  17715. var rotateZRadians = Math.acos(parseFloat(values[0]) / cosB);
  17716. return convertRadToDeg(rotateZRadians);
  17717. }
  17718. function convertRadToDeg(radians) {
  17719. return Math.round(radians * (180 / Math.PI));
  17720. }
  17721. function convertGradToDeg(grad) {
  17722. grad = grad % 400;
  17723. if (grad < 0) {
  17724. grad += 400;
  17725. }
  17726. return Math.round(grad / 400 * 360);
  17727. }
  17728. function convertTurnToDeg(turn) {
  17729. return Math.round(360 / (1 / turn));
  17730. }
  17731. }
  17732. var css_orientation_lock_evaluate_default = cssOrientationLockEvaluate;
  17733. function metaViewportScaleEvaluate(node, options, virtualNode) {
  17734. var _ref65 = options || {}, _ref65$scaleMinimum = _ref65.scaleMinimum, scaleMinimum = _ref65$scaleMinimum === void 0 ? 2 : _ref65$scaleMinimum, _ref65$lowerBound = _ref65.lowerBound, lowerBound = _ref65$lowerBound === void 0 ? false : _ref65$lowerBound;
  17735. var content = virtualNode.attr('content') || '';
  17736. if (!content) {
  17737. return true;
  17738. }
  17739. var result = content.split(/[;,]/).reduce(function(out, item) {
  17740. var contentValue = item.trim();
  17741. if (!contentValue) {
  17742. return out;
  17743. }
  17744. var _contentValue$split = contentValue.split('='), _contentValue$split2 = _slicedToArray(_contentValue$split, 2), key = _contentValue$split2[0], value = _contentValue$split2[1];
  17745. if (!key || !value) {
  17746. return out;
  17747. }
  17748. var curatedKey = key.toLowerCase().trim();
  17749. var curatedValue = value.toLowerCase().trim();
  17750. if (curatedKey === 'maximum-scale' && curatedValue === 'yes') {
  17751. curatedValue = 1;
  17752. }
  17753. if (curatedKey === 'maximum-scale' && parseFloat(curatedValue) < 0) {
  17754. return out;
  17755. }
  17756. out[curatedKey] = curatedValue;
  17757. return out;
  17758. }, {});
  17759. if (lowerBound && result['maximum-scale'] && parseFloat(result['maximum-scale']) < lowerBound) {
  17760. return true;
  17761. }
  17762. if (!lowerBound && result['user-scalable'] === 'no') {
  17763. this.data('user-scalable=no');
  17764. return false;
  17765. }
  17766. var userScalableAsFloat = parseFloat(result['user-scalable']);
  17767. if (!lowerBound && result['user-scalable'] && (userScalableAsFloat || userScalableAsFloat === 0) && userScalableAsFloat > -1 && userScalableAsFloat < 1) {
  17768. this.data('user-scalable');
  17769. return false;
  17770. }
  17771. if (result['maximum-scale'] && parseFloat(result['maximum-scale']) < scaleMinimum) {
  17772. this.data('maximum-scale');
  17773. return false;
  17774. }
  17775. return true;
  17776. }
  17777. var meta_viewport_scale_evaluate_default = metaViewportScaleEvaluate;
  17778. function duplicateIdAfter(results) {
  17779. var uniqueIds = [];
  17780. return results.filter(function(r) {
  17781. if (uniqueIds.indexOf(r.data) === -1) {
  17782. uniqueIds.push(r.data);
  17783. return true;
  17784. }
  17785. return false;
  17786. });
  17787. }
  17788. var duplicate_id_after_default = duplicateIdAfter;
  17789. function duplicateIdEvaluate(node) {
  17790. var id = node.getAttribute('id').trim();
  17791. if (!id) {
  17792. return true;
  17793. }
  17794. var root = get_root_node_default2(node);
  17795. var matchingNodes = Array.from(root.querySelectorAll('[id="'.concat(escape_selector_default(id), '"]'))).filter(function(foundNode) {
  17796. return foundNode !== node;
  17797. });
  17798. if (matchingNodes.length) {
  17799. this.relatedNodes(matchingNodes);
  17800. }
  17801. this.data(id);
  17802. return matchingNodes.length === 0;
  17803. }
  17804. var duplicate_id_evaluate_default = duplicateIdEvaluate;
  17805. function accesskeysAfter(results) {
  17806. var seen = {};
  17807. return results.filter(function(r) {
  17808. if (!r.data) {
  17809. return false;
  17810. }
  17811. var key = r.data.toUpperCase();
  17812. if (!seen[key]) {
  17813. seen[key] = r;
  17814. r.relatedNodes = [];
  17815. return true;
  17816. }
  17817. seen[key].relatedNodes.push(r.relatedNodes[0]);
  17818. return false;
  17819. }).map(function(r) {
  17820. r.result = !!r.relatedNodes.length;
  17821. return r;
  17822. });
  17823. }
  17824. var accesskeys_after_default = accesskeysAfter;
  17825. function accesskeysEvaluate(node) {
  17826. if (is_visible_default(node, false)) {
  17827. this.data(node.getAttribute('accesskey'));
  17828. this.relatedNodes([ node ]);
  17829. }
  17830. return true;
  17831. }
  17832. var accesskeys_evaluate_default = accesskeysEvaluate;
  17833. function focusableContentEvaluate(node, options, virtualNode) {
  17834. var tabbableElements = virtualNode.tabbableElements;
  17835. if (!tabbableElements) {
  17836. return false;
  17837. }
  17838. var tabbableContentElements = tabbableElements.filter(function(el) {
  17839. return el !== virtualNode;
  17840. });
  17841. return tabbableContentElements.length > 0;
  17842. }
  17843. var focusable_content_evaluate_default = focusableContentEvaluate;
  17844. function focusableDisabledEvaluate(node, options, virtualNode) {
  17845. var elementsThatCanBeDisabled = [ 'BUTTON', 'FIELDSET', 'INPUT', 'SELECT', 'TEXTAREA' ];
  17846. var tabbableElements = virtualNode.tabbableElements;
  17847. if (!tabbableElements || !tabbableElements.length) {
  17848. return true;
  17849. }
  17850. var relatedNodes = tabbableElements.reduce(function(out, _ref66) {
  17851. var el = _ref66.actualNode;
  17852. var nodeName2 = el.nodeName.toUpperCase();
  17853. if (elementsThatCanBeDisabled.includes(nodeName2)) {
  17854. out.push(el);
  17855. }
  17856. return out;
  17857. }, []);
  17858. this.relatedNodes(relatedNodes);
  17859. if (relatedNodes.length && is_modal_open_default()) {
  17860. return true;
  17861. }
  17862. return relatedNodes.length === 0;
  17863. }
  17864. var focusable_disabled_evaluate_default = focusableDisabledEvaluate;
  17865. function focusableElementEvaluate(node, options, virtualNode) {
  17866. if (virtualNode.hasAttr('contenteditable') && isContenteditable(virtualNode)) {
  17867. return true;
  17868. }
  17869. var isFocusable2 = virtualNode.isFocusable;
  17870. var tabIndex = parseInt(virtualNode.attr('tabindex'), 10);
  17871. tabIndex = !isNaN(tabIndex) ? tabIndex : null;
  17872. return tabIndex ? isFocusable2 && tabIndex >= 0 : isFocusable2;
  17873. function isContenteditable(vNode) {
  17874. var contenteditable = vNode.attr('contenteditable');
  17875. if (contenteditable === 'true' || contenteditable === '') {
  17876. return true;
  17877. }
  17878. if (contenteditable === 'false') {
  17879. return false;
  17880. }
  17881. var ancestor = closest_default(virtualNode.parent, '[contenteditable]');
  17882. if (!ancestor) {
  17883. return false;
  17884. }
  17885. return isContenteditable(ancestor);
  17886. }
  17887. }
  17888. var focusable_element_evaluate_default = focusableElementEvaluate;
  17889. function focusableModalOpenEvaluate(node, options, virtualNode) {
  17890. var tabbableElements = virtualNode.tabbableElements.map(function(_ref67) {
  17891. var actualNode = _ref67.actualNode;
  17892. return actualNode;
  17893. });
  17894. if (!tabbableElements || !tabbableElements.length) {
  17895. return true;
  17896. }
  17897. if (is_modal_open_default()) {
  17898. this.relatedNodes(tabbableElements);
  17899. return void 0;
  17900. }
  17901. return true;
  17902. }
  17903. var focusable_modal_open_evaluate_default = focusableModalOpenEvaluate;
  17904. function focusableNoNameEvaluate(node, options, virtualNode) {
  17905. var tabIndex = virtualNode.attr('tabindex');
  17906. var inFocusOrder = is_focusable_default(virtualNode) && tabIndex > -1;
  17907. if (!inFocusOrder) {
  17908. return false;
  17909. }
  17910. try {
  17911. return !accessible_text_virtual_default(virtualNode);
  17912. } catch (e) {
  17913. return void 0;
  17914. }
  17915. }
  17916. var focusable_no_name_evaluate_default = focusableNoNameEvaluate;
  17917. function focusableNotTabbableEvaluate(node, options, virtualNode) {
  17918. var elementsThatCanBeDisabled = [ 'BUTTON', 'FIELDSET', 'INPUT', 'SELECT', 'TEXTAREA' ];
  17919. var tabbableElements = virtualNode.tabbableElements;
  17920. if (!tabbableElements || !tabbableElements.length) {
  17921. return true;
  17922. }
  17923. var relatedNodes = tabbableElements.reduce(function(out, _ref68) {
  17924. var el = _ref68.actualNode;
  17925. var nodeName2 = el.nodeName.toUpperCase();
  17926. if (!elementsThatCanBeDisabled.includes(nodeName2)) {
  17927. out.push(el);
  17928. }
  17929. return out;
  17930. }, []);
  17931. this.relatedNodes(relatedNodes);
  17932. if (relatedNodes.length > 0 && is_modal_open_default()) {
  17933. return true;
  17934. }
  17935. return relatedNodes.length === 0;
  17936. }
  17937. var focusable_not_tabbable_evaluate_default = focusableNotTabbableEvaluate;
  17938. function landmarkIsTopLevelEvaluate(node) {
  17939. var landmarks = get_aria_roles_by_type_default('landmark');
  17940. var parent = get_composed_parent_default(node);
  17941. var nodeRole = get_role_default(node);
  17942. this.data({
  17943. role: nodeRole
  17944. });
  17945. while (parent) {
  17946. var role = parent.getAttribute('role');
  17947. if (!role && parent.nodeName.toUpperCase() !== 'FORM') {
  17948. role = implicit_role_default(parent);
  17949. }
  17950. if (role && landmarks.includes(role) && !(role === 'main' && nodeRole === 'complementary')) {
  17951. return false;
  17952. }
  17953. parent = get_composed_parent_default(parent);
  17954. }
  17955. return true;
  17956. }
  17957. var landmark_is_top_level_evaluate_default = landmarkIsTopLevelEvaluate;
  17958. function focusableDescendants(vNode) {
  17959. if (is_focusable_default(vNode)) {
  17960. return true;
  17961. }
  17962. if (!vNode.children) {
  17963. if (vNode.props.nodeType === 1) {
  17964. throw new Error('Cannot determine children');
  17965. }
  17966. return false;
  17967. }
  17968. return vNode.children.some(function(child) {
  17969. return focusableDescendants(child);
  17970. });
  17971. }
  17972. function noFocusbleContentEvaluate(node, options, virtualNode) {
  17973. if (!virtualNode.children) {
  17974. return void 0;
  17975. }
  17976. try {
  17977. return !virtualNode.children.some(function(child) {
  17978. return focusableDescendants(child);
  17979. });
  17980. } catch (e) {
  17981. return void 0;
  17982. }
  17983. }
  17984. var no_focusable_content_evaluate_default = noFocusbleContentEvaluate;
  17985. function tabindexEvaluate(node, options, virtualNode) {
  17986. var tabIndex = parseInt(virtualNode.attr('tabindex'), 10);
  17987. return isNaN(tabIndex) ? true : tabIndex <= 0;
  17988. }
  17989. var tabindex_evaluate_default = tabindexEvaluate;
  17990. function altSpaceValueEvaluate(node, options, virtualNode) {
  17991. var alt = virtualNode.attr('alt');
  17992. var isOnlySpace = /^\s+$/;
  17993. return typeof alt === 'string' && isOnlySpace.test(alt);
  17994. }
  17995. var alt_space_value_evaluate_default = altSpaceValueEvaluate;
  17996. function duplicateImgLabelEvaluate(node, options, virtualNode) {
  17997. if ([ 'none', 'presentation' ].includes(get_role_default(virtualNode))) {
  17998. return false;
  17999. }
  18000. var parentVNode = closest_default(virtualNode, options.parentSelector);
  18001. if (!parentVNode) {
  18002. return false;
  18003. }
  18004. var visibleText = visible_virtual_default(parentVNode, true).toLowerCase();
  18005. if (visibleText === '') {
  18006. return false;
  18007. }
  18008. return visibleText === accessible_text_virtual_default(virtualNode).toLowerCase();
  18009. }
  18010. var duplicate_img_label_evaluate_default = duplicateImgLabelEvaluate;
  18011. function explicitEvaluate(node, options, virtualNode) {
  18012. if (virtualNode.attr('id')) {
  18013. if (!virtualNode.actualNode) {
  18014. return void 0;
  18015. }
  18016. var root = get_root_node_default2(virtualNode.actualNode);
  18017. var id = escape_selector_default(virtualNode.attr('id'));
  18018. var labels = Array.from(root.querySelectorAll('label[for="'.concat(id, '"]')));
  18019. if (labels.length) {
  18020. try {
  18021. return labels.some(function(label5) {
  18022. if (!is_visible_default(label5)) {
  18023. return true;
  18024. } else {
  18025. return !!accessible_text_default(label5);
  18026. }
  18027. });
  18028. } catch (e) {
  18029. return void 0;
  18030. }
  18031. }
  18032. }
  18033. return false;
  18034. }
  18035. var explicit_evaluate_default = explicitEvaluate;
  18036. function helpSameAsLabelEvaluate(node, options, virtualNode) {
  18037. var labelText2 = label_virtual_default2(virtualNode), check4 = node.getAttribute('title');
  18038. if (!labelText2) {
  18039. return false;
  18040. }
  18041. if (!check4) {
  18042. check4 = '';
  18043. if (node.getAttribute('aria-describedby')) {
  18044. var ref = idrefs_default(node, 'aria-describedby');
  18045. check4 = ref.map(function(thing) {
  18046. return thing ? accessible_text_default(thing) : '';
  18047. }).join('');
  18048. }
  18049. }
  18050. return sanitize_default(check4) === sanitize_default(labelText2);
  18051. }
  18052. var help_same_as_label_evaluate_default = helpSameAsLabelEvaluate;
  18053. function hiddenExplicitLabelEvaluate(node, options, virtualNode) {
  18054. if (virtualNode.hasAttr('id')) {
  18055. if (!virtualNode.actualNode) {
  18056. return void 0;
  18057. }
  18058. var root = get_root_node_default2(node);
  18059. var id = escape_selector_default(node.getAttribute('id'));
  18060. var label5 = root.querySelector('label[for="'.concat(id, '"]'));
  18061. if (label5 && !is_visible_default(label5, true)) {
  18062. var name;
  18063. try {
  18064. name = accessible_text_virtual_default(virtualNode).trim();
  18065. } catch (e) {
  18066. return void 0;
  18067. }
  18068. var isNameEmpty = name === '';
  18069. return isNameEmpty;
  18070. }
  18071. }
  18072. return false;
  18073. }
  18074. var hidden_explicit_label_evaluate_default = hiddenExplicitLabelEvaluate;
  18075. function implicitEvaluate(node, options, virtualNode) {
  18076. try {
  18077. var label5 = closest_default(virtualNode, 'label');
  18078. if (label5) {
  18079. return !!accessible_text_virtual_default(label5, {
  18080. inControlContext: true
  18081. });
  18082. }
  18083. return false;
  18084. } catch (e) {
  18085. return void 0;
  18086. }
  18087. }
  18088. var implicit_evaluate_default = implicitEvaluate;
  18089. function isStringContained(compare, compareWith) {
  18090. var curatedCompareWith = curateString(compareWith);
  18091. var curatedCompare = curateString(compare);
  18092. if (!curatedCompareWith || !curatedCompare) {
  18093. return false;
  18094. }
  18095. return curatedCompareWith.includes(curatedCompare);
  18096. }
  18097. function curateString(str) {
  18098. var noUnicodeStr = remove_unicode_default(str, {
  18099. emoji: true,
  18100. nonBmp: true,
  18101. punctuations: true
  18102. });
  18103. return sanitize_default(noUnicodeStr);
  18104. }
  18105. function labelContentNameMismatchEvaluate(node, options, virtualNode) {
  18106. var _ref69 = options || {}, pixelThreshold = _ref69.pixelThreshold, occuranceThreshold = _ref69.occuranceThreshold;
  18107. var accText = accessible_text_default(node).toLowerCase();
  18108. if (is_human_interpretable_default(accText) < 1) {
  18109. return void 0;
  18110. }
  18111. var textVNodes = visible_text_nodes_default(virtualNode);
  18112. var nonLigatureText = textVNodes.filter(function(textVNode) {
  18113. return !is_icon_ligature_default(textVNode, pixelThreshold, occuranceThreshold);
  18114. }).map(function(textVNode) {
  18115. return textVNode.actualNode.nodeValue;
  18116. }).join('');
  18117. var visibleText = sanitize_default(nonLigatureText).toLowerCase();
  18118. if (!visibleText) {
  18119. return true;
  18120. }
  18121. if (is_human_interpretable_default(visibleText) < 1) {
  18122. if (isStringContained(visibleText, accText)) {
  18123. return true;
  18124. }
  18125. return void 0;
  18126. }
  18127. return isStringContained(visibleText, accText);
  18128. }
  18129. var label_content_name_mismatch_evaluate_default = labelContentNameMismatchEvaluate;
  18130. function multipleLabelEvaluate(node) {
  18131. var id = escape_selector_default(node.getAttribute('id'));
  18132. var parent = node.parentNode;
  18133. var root = get_root_node_default2(node);
  18134. root = root.documentElement || root;
  18135. var labels = Array.from(root.querySelectorAll('label[for="'.concat(id, '"]')));
  18136. if (labels.length) {
  18137. labels = labels.filter(function(label5) {
  18138. return is_visible_default(label5);
  18139. });
  18140. }
  18141. while (parent) {
  18142. if (parent.nodeName.toUpperCase() === 'LABEL' && labels.indexOf(parent) === -1) {
  18143. labels.push(parent);
  18144. }
  18145. parent = parent.parentNode;
  18146. }
  18147. this.relatedNodes(labels);
  18148. if (labels.length > 1) {
  18149. var ATVisibleLabels = labels.filter(function(label5) {
  18150. return is_visible_default(label5, true);
  18151. });
  18152. if (ATVisibleLabels.length > 1) {
  18153. return void 0;
  18154. }
  18155. var labelledby = idrefs_default(node, 'aria-labelledby');
  18156. return !labelledby.includes(ATVisibleLabels[0]) ? void 0 : false;
  18157. }
  18158. return false;
  18159. }
  18160. var multiple_label_evaluate_default = multipleLabelEvaluate;
  18161. function titleOnlyEvaluate(node, options, virtualNode) {
  18162. var labelText2 = label_virtual_default2(virtualNode);
  18163. var title = title_text_default(virtualNode);
  18164. var ariaDescribedBy = virtualNode.attr('aria-describedby');
  18165. return !labelText2 && !!(title || ariaDescribedBy);
  18166. }
  18167. var title_only_evaluate_default = titleOnlyEvaluate;
  18168. function landmarkIsUniqueAfter(results) {
  18169. var uniqueLandmarks = [];
  18170. return results.filter(function(currentResult) {
  18171. var findMatch = function findMatch(someResult) {
  18172. return currentResult.data.role === someResult.data.role && currentResult.data.accessibleText === someResult.data.accessibleText;
  18173. };
  18174. var matchedResult = uniqueLandmarks.find(findMatch);
  18175. if (matchedResult) {
  18176. matchedResult.result = false;
  18177. matchedResult.relatedNodes.push(currentResult.relatedNodes[0]);
  18178. return false;
  18179. }
  18180. uniqueLandmarks.push(currentResult);
  18181. currentResult.relatedNodes = [];
  18182. return true;
  18183. });
  18184. }
  18185. var landmark_is_unique_after_default = landmarkIsUniqueAfter;
  18186. function landmarkIsUniqueEvaluate(node, options, virtualNode) {
  18187. var role = get_role_default(node);
  18188. var accessibleText2 = accessible_text_virtual_default(virtualNode);
  18189. accessibleText2 = accessibleText2 ? accessibleText2.toLowerCase() : null;
  18190. this.data({
  18191. role: role,
  18192. accessibleText: accessibleText2
  18193. });
  18194. this.relatedNodes([ node ]);
  18195. return true;
  18196. }
  18197. var landmark_is_unique_evaluate_default = landmarkIsUniqueEvaluate;
  18198. function hasValue(value) {
  18199. return (value || '').trim() !== '';
  18200. }
  18201. function hasLangEvaluate(node, options, virtualNode) {
  18202. var xhtml2 = typeof document !== 'undefined' ? is_xhtml_default(document) : false;
  18203. if (options.attributes.includes('xml:lang') && options.attributes.includes('lang') && hasValue(virtualNode.attr('xml:lang')) && !hasValue(virtualNode.attr('lang')) && !xhtml2) {
  18204. this.data({
  18205. messageKey: 'noXHTML'
  18206. });
  18207. return false;
  18208. }
  18209. var hasLang = options.attributes.some(function(name) {
  18210. return hasValue(virtualNode.attr(name));
  18211. });
  18212. if (!hasLang) {
  18213. this.data({
  18214. messageKey: 'noLang'
  18215. });
  18216. return false;
  18217. }
  18218. return true;
  18219. }
  18220. var has_lang_evaluate_default = hasLangEvaluate;
  18221. function validLangEvaluate(node, options, virtualNode) {
  18222. var invalid = [];
  18223. options.attributes.forEach(function(langAttr) {
  18224. var langVal = virtualNode.attr(langAttr);
  18225. if (typeof langVal !== 'string') {
  18226. return;
  18227. }
  18228. var baselangVal = get_base_lang_default(langVal);
  18229. var invalidLang = options.value ? !options.value.map(get_base_lang_default).includes(baselangVal) : !valid_langs_default(baselangVal);
  18230. if (baselangVal !== '' && invalidLang || langVal !== '' && !sanitize_default(langVal)) {
  18231. invalid.push(langAttr + '="' + virtualNode.attr(langAttr) + '"');
  18232. }
  18233. });
  18234. if (invalid.length) {
  18235. this.data(invalid);
  18236. return true;
  18237. }
  18238. return false;
  18239. }
  18240. var valid_lang_evaluate_default = validLangEvaluate;
  18241. function xmlLangMismatchEvaluate(node, options, vNode) {
  18242. var primaryLangValue = get_base_lang_default(vNode.attr('lang'));
  18243. var primaryXmlLangValue = get_base_lang_default(vNode.attr('xml:lang'));
  18244. return primaryLangValue === primaryXmlLangValue;
  18245. }
  18246. var xml_lang_mismatch_evaluate_default = xmlLangMismatchEvaluate;
  18247. function dlitemEvaluate(node) {
  18248. var parent = get_composed_parent_default(node);
  18249. var parentTagName = parent.nodeName.toUpperCase();
  18250. var parentRole = get_explicit_role_default(parent);
  18251. if (parentTagName === 'DIV' && [ 'presentation', 'none', null ].includes(parentRole)) {
  18252. parent = get_composed_parent_default(parent);
  18253. parentTagName = parent.nodeName.toUpperCase();
  18254. parentRole = get_explicit_role_default(parent);
  18255. }
  18256. if (parentTagName !== 'DL') {
  18257. return false;
  18258. }
  18259. if (!parentRole || [ 'presentation', 'none', 'list' ].includes(parentRole)) {
  18260. return true;
  18261. }
  18262. return false;
  18263. }
  18264. var dlitem_evaluate_default = dlitemEvaluate;
  18265. function listitemEvaluate(node) {
  18266. var parent = get_composed_parent_default(node);
  18267. if (!parent) {
  18268. return void 0;
  18269. }
  18270. var parentTagName = parent.nodeName.toUpperCase();
  18271. var parentRole = (parent.getAttribute('role') || '').toLowerCase();
  18272. if ([ 'presentation', 'none', 'list' ].includes(parentRole)) {
  18273. return true;
  18274. }
  18275. if (parentRole && is_valid_role_default(parentRole)) {
  18276. this.data({
  18277. messageKey: 'roleNotValid'
  18278. });
  18279. return false;
  18280. }
  18281. return [ 'UL', 'OL' ].includes(parentTagName);
  18282. }
  18283. var listitem_evaluate_default = listitemEvaluate;
  18284. function onlyDlitemsEvaluate(node, options, virtualNode) {
  18285. var ALLOWED_ROLES = [ 'definition', 'term', 'list' ];
  18286. var base = {
  18287. badNodes: [],
  18288. hasNonEmptyTextNode: false
  18289. };
  18290. var content = virtualNode.children.reduce(function(content2, child) {
  18291. var actualNode = child.actualNode;
  18292. if (actualNode.nodeName.toUpperCase() === 'DIV' && get_role_default(actualNode) === null) {
  18293. return content2.concat(child.children);
  18294. }
  18295. return content2.concat(child);
  18296. }, []);
  18297. var result = content.reduce(function(out, childNode) {
  18298. var actualNode = childNode.actualNode;
  18299. var tagName = actualNode.nodeName.toUpperCase();
  18300. if (actualNode.nodeType === 1 && is_visible_default(actualNode, true, false)) {
  18301. var explicitRole2 = get_explicit_role_default(actualNode);
  18302. if (tagName !== 'DT' && tagName !== 'DD' || explicitRole2) {
  18303. if (!ALLOWED_ROLES.includes(explicitRole2)) {
  18304. out.badNodes.push(actualNode);
  18305. }
  18306. }
  18307. } else if (actualNode.nodeType === 3 && actualNode.nodeValue.trim() !== '') {
  18308. out.hasNonEmptyTextNode = true;
  18309. }
  18310. return out;
  18311. }, base);
  18312. if (result.badNodes.length) {
  18313. this.relatedNodes(result.badNodes);
  18314. }
  18315. return !!result.badNodes.length || result.hasNonEmptyTextNode;
  18316. }
  18317. var only_dlitems_evaluate_default = onlyDlitemsEvaluate;
  18318. function onlyListitemsEvaluate(node, options, virtualNode) {
  18319. var hasNonEmptyTextNode = false;
  18320. var atLeastOneListitem = false;
  18321. var isEmpty = true;
  18322. var badNodes = [];
  18323. var badRoleNodes = [];
  18324. var badRoles = [];
  18325. virtualNode.children.forEach(function(vNode) {
  18326. var actualNode = vNode.actualNode;
  18327. if (actualNode.nodeType === 3 && actualNode.nodeValue.trim() !== '') {
  18328. hasNonEmptyTextNode = true;
  18329. return;
  18330. }
  18331. if (actualNode.nodeType !== 1 || !is_visible_default(actualNode, true, false)) {
  18332. return;
  18333. }
  18334. isEmpty = false;
  18335. var isLi = actualNode.nodeName.toUpperCase() === 'LI';
  18336. var role = get_role_default(vNode);
  18337. var isListItemRole = role === 'listitem';
  18338. if (!isLi && !isListItemRole) {
  18339. badNodes.push(actualNode);
  18340. }
  18341. if (isLi && !isListItemRole) {
  18342. badRoleNodes.push(actualNode);
  18343. if (!badRoles.includes(role)) {
  18344. badRoles.push(role);
  18345. }
  18346. }
  18347. if (isListItemRole) {
  18348. atLeastOneListitem = true;
  18349. }
  18350. });
  18351. if (hasNonEmptyTextNode || badNodes.length) {
  18352. this.relatedNodes(badNodes);
  18353. return true;
  18354. }
  18355. if (isEmpty || atLeastOneListitem) {
  18356. return false;
  18357. }
  18358. this.relatedNodes(badRoleNodes);
  18359. this.data({
  18360. messageKey: 'roleNotValid',
  18361. roles: badRoles.join(', ')
  18362. });
  18363. return true;
  18364. }
  18365. var only_listitems_evaluate_default = onlyListitemsEvaluate;
  18366. function structuredDlitemsEvaluate(node, options, virtualNode) {
  18367. var children = virtualNode.children;
  18368. if (!children || !children.length) {
  18369. return false;
  18370. }
  18371. var hasDt = false, hasDd = false, nodeName2;
  18372. for (var i = 0; i < children.length; i++) {
  18373. nodeName2 = children[i].props.nodeName.toUpperCase();
  18374. if (nodeName2 === 'DT') {
  18375. hasDt = true;
  18376. }
  18377. if (hasDt && nodeName2 === 'DD') {
  18378. return false;
  18379. }
  18380. if (nodeName2 === 'DD') {
  18381. hasDd = true;
  18382. }
  18383. }
  18384. return hasDt || hasDd;
  18385. }
  18386. var structured_dlitems_evaluate_default = structuredDlitemsEvaluate;
  18387. function captionEvaluate(node, options, virtualNode) {
  18388. var tracks = query_selector_all_default(virtualNode, 'track');
  18389. var hasCaptions = tracks.some(function(vNode) {
  18390. return (vNode.attr('kind') || '').toLowerCase() === 'captions';
  18391. });
  18392. return hasCaptions ? false : void 0;
  18393. }
  18394. var caption_evaluate_default = captionEvaluate;
  18395. function frameTestedEvaluate(node, options) {
  18396. var resolve = this.async();
  18397. var _Object$assign = Object.assign({
  18398. isViolation: false,
  18399. timeout: 500
  18400. }, options), isViolation = _Object$assign.isViolation, timeout = _Object$assign.timeout;
  18401. var timer = setTimeout(function() {
  18402. timer = setTimeout(function() {
  18403. timer = null;
  18404. resolve(isViolation ? false : void 0);
  18405. }, 0);
  18406. }, timeout);
  18407. _respondable(node.contentWindow, 'axe.ping', null, void 0, function() {
  18408. if (timer !== null) {
  18409. clearTimeout(timer);
  18410. resolve(true);
  18411. }
  18412. });
  18413. }
  18414. var frame_tested_evaluate_default = frameTestedEvaluate;
  18415. function noAutoplayAudioEvaluate(node, options) {
  18416. if (!node.duration) {
  18417. console.warn('axe.utils.preloadMedia did not load metadata');
  18418. return void 0;
  18419. }
  18420. var _options$allowedDurat = options.allowedDuration, allowedDuration = _options$allowedDurat === void 0 ? 3 : _options$allowedDurat;
  18421. var playableDuration = getPlayableDuration(node);
  18422. if (playableDuration <= allowedDuration && !node.hasAttribute('loop')) {
  18423. return true;
  18424. }
  18425. if (!node.hasAttribute('controls')) {
  18426. return false;
  18427. }
  18428. return true;
  18429. function getPlayableDuration(elm) {
  18430. if (!elm.currentSrc) {
  18431. return 0;
  18432. }
  18433. var playbackRange = getPlaybackRange(elm.currentSrc);
  18434. if (!playbackRange) {
  18435. return Math.abs(elm.duration - (elm.currentTime || 0));
  18436. }
  18437. if (playbackRange.length === 1) {
  18438. return Math.abs(elm.duration - playbackRange[0]);
  18439. }
  18440. return Math.abs(playbackRange[1] - playbackRange[0]);
  18441. }
  18442. function getPlaybackRange(src) {
  18443. var match = src.match(/#t=(.*)/);
  18444. if (!match) {
  18445. return;
  18446. }
  18447. var _match = _slicedToArray(match, 2), value = _match[1];
  18448. var ranges = value.split(',');
  18449. return ranges.map(function(range) {
  18450. if (/:/.test(range)) {
  18451. return convertHourMinSecToSeconds(range);
  18452. }
  18453. return parseFloat(range);
  18454. });
  18455. }
  18456. function convertHourMinSecToSeconds(hhMmSs) {
  18457. var parts = hhMmSs.split(':');
  18458. var secs = 0;
  18459. var mins = 1;
  18460. while (parts.length > 0) {
  18461. secs += mins * parseInt(parts.pop(), 10);
  18462. mins *= 60;
  18463. }
  18464. return parseFloat(secs);
  18465. }
  18466. }
  18467. var no_autoplay_audio_evaluate_default = noAutoplayAudioEvaluate;
  18468. function ariaAllowedAttrMatches(node, virtualNode) {
  18469. var aria44 = /^aria-/;
  18470. var attrs = virtualNode.attrNames;
  18471. if (attrs.length) {
  18472. for (var _i21 = 0, l = attrs.length; _i21 < l; _i21++) {
  18473. if (aria44.test(attrs[_i21])) {
  18474. return true;
  18475. }
  18476. }
  18477. }
  18478. return false;
  18479. }
  18480. var aria_allowed_attr_matches_default = ariaAllowedAttrMatches;
  18481. function ariaAllowedRoleMatches(node) {
  18482. return get_explicit_role_default(node, {
  18483. dpub: true,
  18484. fallback: true
  18485. }) !== null;
  18486. }
  18487. var aria_allowed_role_matches_default = ariaAllowedRoleMatches;
  18488. function ariaHasAttrMatches(node) {
  18489. var aria44 = /^aria-/;
  18490. if (node.hasAttributes()) {
  18491. var attrs = get_node_attributes_default(node);
  18492. for (var i = 0, l = attrs.length; i < l; i++) {
  18493. if (aria44.test(attrs[i].name)) {
  18494. return true;
  18495. }
  18496. }
  18497. }
  18498. return false;
  18499. }
  18500. var aria_has_attr_matches_default = ariaHasAttrMatches;
  18501. function shouldMatchElement(el) {
  18502. if (!el) {
  18503. return true;
  18504. }
  18505. if (el.getAttribute('aria-hidden') === 'true') {
  18506. return false;
  18507. }
  18508. return shouldMatchElement(get_composed_parent_default(el));
  18509. }
  18510. function ariaHiddenFocusMatches(node) {
  18511. return shouldMatchElement(get_composed_parent_default(node));
  18512. }
  18513. var aria_hidden_focus_matches_default = ariaHiddenFocusMatches;
  18514. function ariaRequiredChildrenMatches(node, virtualNode) {
  18515. var role = get_explicit_role_default(virtualNode, {
  18516. dpub: true
  18517. });
  18518. return !!required_owned_default(role);
  18519. }
  18520. var aria_required_children_matches_default = ariaRequiredChildrenMatches;
  18521. function ariaRequiredParentMatches(node, virtualNode) {
  18522. var role = get_explicit_role_default(virtualNode);
  18523. return !!required_context_default(role);
  18524. }
  18525. var aria_required_parent_matches_default = ariaRequiredParentMatches;
  18526. function autocompleteMatches(node, virtualNode) {
  18527. var autocomplete2 = virtualNode.attr('autocomplete');
  18528. if (!autocomplete2 || sanitize_default(autocomplete2) === '') {
  18529. return false;
  18530. }
  18531. var nodeName2 = virtualNode.props.nodeName;
  18532. if ([ 'textarea', 'input', 'select' ].includes(nodeName2) === false) {
  18533. return false;
  18534. }
  18535. var excludedInputTypes = [ 'submit', 'reset', 'button', 'hidden' ];
  18536. if (nodeName2 === 'input' && excludedInputTypes.includes(virtualNode.props.type)) {
  18537. return false;
  18538. }
  18539. var ariaDisabled = virtualNode.attr('aria-disabled') || 'false';
  18540. if (virtualNode.hasAttr('disabled') || ariaDisabled.toLowerCase() === 'true') {
  18541. return false;
  18542. }
  18543. var role = virtualNode.attr('role');
  18544. var tabIndex = virtualNode.attr('tabindex');
  18545. if (tabIndex === '-1' && role) {
  18546. var roleDef = standards_default.ariaRoles[role];
  18547. if (roleDef === void 0 || roleDef.type !== 'widget') {
  18548. return false;
  18549. }
  18550. }
  18551. if (tabIndex === '-1' && virtualNode.actualNode && !is_visible_default(virtualNode.actualNode, false) && !is_visible_default(virtualNode.actualNode, true)) {
  18552. return false;
  18553. }
  18554. return true;
  18555. }
  18556. var autocomplete_matches_default = autocompleteMatches;
  18557. function isInitiatorMatches(node, virtualNode, context3) {
  18558. return context3.initiator;
  18559. }
  18560. var is_initiator_matches_default = isInitiatorMatches;
  18561. function bypassMatches(node, virtualNode, context3) {
  18562. if (is_initiator_matches_default(node, virtualNode, context3)) {
  18563. return !!node.querySelector('a[href]');
  18564. }
  18565. return true;
  18566. }
  18567. var bypass_matches_default = bypassMatches;
  18568. function colorContrastMatches(node, virtualNode) {
  18569. var _virtualNode$props = virtualNode.props, nodeName2 = _virtualNode$props.nodeName, inputType = _virtualNode$props.type;
  18570. if (nodeName2 === 'option') {
  18571. return false;
  18572. }
  18573. if (nodeName2 === 'select' && !node.options.length) {
  18574. return false;
  18575. }
  18576. var nonTextInput = [ 'hidden', 'range', 'color', 'checkbox', 'radio', 'image' ];
  18577. if (nodeName2 === 'input' && nonTextInput.includes(inputType)) {
  18578. return false;
  18579. }
  18580. if (is_disabled_default(virtualNode)) {
  18581. return false;
  18582. }
  18583. var formElements = [ 'input', 'select', 'textarea' ];
  18584. if (formElements.includes(nodeName2)) {
  18585. var style = window.getComputedStyle(node);
  18586. var textIndent = parseInt(style.getPropertyValue('text-indent'), 10);
  18587. if (textIndent) {
  18588. var rect = node.getBoundingClientRect();
  18589. rect = {
  18590. top: rect.top,
  18591. bottom: rect.bottom,
  18592. left: rect.left + textIndent,
  18593. right: rect.right + textIndent
  18594. };
  18595. if (!visually_overlaps_default(rect, node)) {
  18596. return false;
  18597. }
  18598. }
  18599. return true;
  18600. }
  18601. var nodeParentLabel = find_up_virtual_default(virtualNode, 'label');
  18602. if (nodeName2 === 'label' || nodeParentLabel) {
  18603. var labelNode = nodeParentLabel || node;
  18604. var labelVirtual3 = nodeParentLabel ? get_node_from_tree_default(nodeParentLabel) : virtualNode;
  18605. if (labelNode.htmlFor) {
  18606. var doc = get_root_node_default2(labelNode);
  18607. var explicitControl = doc.getElementById(labelNode.htmlFor);
  18608. var explicitControlVirtual = explicitControl && get_node_from_tree_default(explicitControl);
  18609. if (explicitControlVirtual && is_disabled_default(explicitControlVirtual)) {
  18610. return false;
  18611. }
  18612. }
  18613. var query = 'input:not([type="hidden"],[type="image"],[type="button"],[type="submit"],[type="reset"]), select, textarea';
  18614. var implicitControl = query_selector_all_default(labelVirtual3, query)[0];
  18615. if (implicitControl && is_disabled_default(implicitControl)) {
  18616. return false;
  18617. }
  18618. }
  18619. var ariaLabelledbyControls = [];
  18620. var ancestorNode = virtualNode;
  18621. while (ancestorNode) {
  18622. if (ancestorNode.props.id) {
  18623. var virtualControls = get_accessible_refs_default(ancestorNode).filter(function(control) {
  18624. return token_list_default(control.getAttribute('aria-labelledby') || '').includes(ancestorNode.props.id);
  18625. }).map(function(control) {
  18626. return get_node_from_tree_default(control);
  18627. });
  18628. ariaLabelledbyControls.push.apply(ariaLabelledbyControls, _toConsumableArray(virtualControls));
  18629. }
  18630. ancestorNode = ancestorNode.parent;
  18631. }
  18632. if (ariaLabelledbyControls.length > 0 && ariaLabelledbyControls.every(is_disabled_default)) {
  18633. return false;
  18634. }
  18635. var visibleText = visible_virtual_default(virtualNode, false, true);
  18636. var removeUnicodeOptions = {
  18637. emoji: true,
  18638. nonBmp: false,
  18639. punctuations: true
  18640. };
  18641. if (!visibleText || !remove_unicode_default(visibleText, removeUnicodeOptions)) {
  18642. return false;
  18643. }
  18644. var range = document.createRange();
  18645. var childNodes = virtualNode.children;
  18646. for (var index = 0; index < childNodes.length; index++) {
  18647. var child = childNodes[index];
  18648. if (child.actualNode.nodeType === 3 && sanitize_default(child.actualNode.nodeValue) !== '') {
  18649. range.selectNodeContents(child.actualNode);
  18650. }
  18651. }
  18652. var rects = range.getClientRects();
  18653. for (var _index = 0; _index < rects.length; _index++) {
  18654. if (visually_overlaps_default(rects[_index], node)) {
  18655. return true;
  18656. }
  18657. }
  18658. return false;
  18659. }
  18660. var color_contrast_matches_default = colorContrastMatches;
  18661. function dataTableLargeMatches(node) {
  18662. if (is_data_table_default(node)) {
  18663. var tableArray = to_grid_default(node);
  18664. return tableArray.length >= 3 && tableArray[0].length >= 3 && tableArray[1].length >= 3 && tableArray[2].length >= 3;
  18665. }
  18666. return false;
  18667. }
  18668. var data_table_large_matches_default = dataTableLargeMatches;
  18669. function dataTableMatches(node) {
  18670. return is_data_table_default(node);
  18671. }
  18672. var data_table_matches_default = dataTableMatches;
  18673. function duplicateIdActiveMatches(node) {
  18674. var id = node.getAttribute('id').trim();
  18675. var idSelector = '*[id="'.concat(escape_selector_default(id), '"]');
  18676. var idMatchingElms = Array.from(get_root_node_default2(node).querySelectorAll(idSelector));
  18677. return !is_accessible_ref_default(node) && idMatchingElms.some(is_focusable_default);
  18678. }
  18679. var duplicate_id_active_matches_default = duplicateIdActiveMatches;
  18680. function duplicateIdAriaMatches(node) {
  18681. return is_accessible_ref_default(node);
  18682. }
  18683. var duplicate_id_aria_matches_default = duplicateIdAriaMatches;
  18684. function duplicateIdMiscMatches(node) {
  18685. var id = node.getAttribute('id').trim();
  18686. var idSelector = '*[id="'.concat(escape_selector_default(id), '"]');
  18687. var idMatchingElms = Array.from(get_root_node_default2(node).querySelectorAll(idSelector));
  18688. return !is_accessible_ref_default(node) && idMatchingElms.every(function(elm) {
  18689. return !is_focusable_default(elm);
  18690. });
  18691. }
  18692. var duplicate_id_misc_matches_default = duplicateIdMiscMatches;
  18693. function frameFocusableContentMatches(node, virtualNode, context3) {
  18694. return !context3.initiator && !context3.focusable && context3.boundingClientRect.width * context3.boundingClientRect.height > 1;
  18695. }
  18696. var frame_focusable_content_matches_default = frameFocusableContentMatches;
  18697. function frameTitleHasTextMatches(node) {
  18698. var title = node.getAttribute('title');
  18699. return !!sanitize_default(title);
  18700. }
  18701. var frame_title_has_text_matches_default = frameTitleHasTextMatches;
  18702. function headingMatches(node) {
  18703. var explicitRoles;
  18704. if (node.hasAttribute('role')) {
  18705. explicitRoles = node.getAttribute('role').split(/\s+/i).filter(axe.commons.aria.isValidRole);
  18706. }
  18707. if (explicitRoles && explicitRoles.length > 0) {
  18708. return explicitRoles.includes('heading');
  18709. } else {
  18710. return axe.commons.aria.implicitRole(node) === 'heading';
  18711. }
  18712. }
  18713. var heading_matches_default = headingMatches;
  18714. function svgNamespaceMatches(node, virtualNode) {
  18715. try {
  18716. var nodeName2 = virtualNode.props.nodeName;
  18717. if (nodeName2 === 'svg') {
  18718. return true;
  18719. }
  18720. return !!closest_default(virtualNode, 'svg');
  18721. } catch (e) {
  18722. return false;
  18723. }
  18724. }
  18725. var svg_namespace_matches_default = svgNamespaceMatches;
  18726. function htmlNamespaceMatches(node, virtualNode) {
  18727. return !svg_namespace_matches_default(node, virtualNode);
  18728. }
  18729. var html_namespace_matches_default = htmlNamespaceMatches;
  18730. function identicalLinksSamePurposeMatches(node, virtualNode) {
  18731. var hasAccName = !!accessible_text_virtual_default(virtualNode);
  18732. if (!hasAccName) {
  18733. return false;
  18734. }
  18735. var role = get_role_default(node);
  18736. if (role && role !== 'link') {
  18737. return false;
  18738. }
  18739. return true;
  18740. }
  18741. var identical_links_same_purpose_matches_default = identicalLinksSamePurposeMatches;
  18742. function insertedIntoFocusOrderMatches(node) {
  18743. return inserted_into_focus_order_default(node);
  18744. }
  18745. var inserted_into_focus_order_matches_default = insertedIntoFocusOrderMatches;
  18746. function labelContentNameMismatchMatches(node, virtualNode) {
  18747. var role = get_role_default(node);
  18748. if (!role) {
  18749. return false;
  18750. }
  18751. var widgetRoles = get_aria_roles_by_type_default('widget');
  18752. var isWidgetType = widgetRoles.includes(role);
  18753. if (!isWidgetType) {
  18754. return false;
  18755. }
  18756. var rolesWithNameFromContents = get_aria_roles_supporting_name_from_content_default();
  18757. if (!rolesWithNameFromContents.includes(role)) {
  18758. return false;
  18759. }
  18760. if (!sanitize_default(arialabel_text_default(virtualNode)) && !sanitize_default(arialabelledby_text_default(node))) {
  18761. return false;
  18762. }
  18763. if (!sanitize_default(visible_virtual_default(virtualNode))) {
  18764. return false;
  18765. }
  18766. return true;
  18767. }
  18768. var label_content_name_mismatch_matches_default = labelContentNameMismatchMatches;
  18769. function labelMatches(node, virtualNode) {
  18770. if (virtualNode.props.nodeName !== 'input' || virtualNode.hasAttr('type') === false) {
  18771. return true;
  18772. }
  18773. var type = virtualNode.attr('type').toLowerCase();
  18774. return [ 'hidden', 'image', 'button', 'submit', 'reset' ].includes(type) === false;
  18775. }
  18776. var label_matches_default = labelMatches;
  18777. function landmarkHasBodyContextMatches(node, virtualNode) {
  18778. var nativeScopeFilter = 'article, aside, main, nav, section';
  18779. return node.hasAttribute('role') || !find_up_virtual_default(virtualNode, nativeScopeFilter);
  18780. }
  18781. var landmark_has_body_context_matches_default = landmarkHasBodyContextMatches;
  18782. function landmarkUniqueMatches(node, virtualNode) {
  18783. var excludedParentsForHeaderFooterLandmarks = [ 'article', 'aside', 'main', 'nav', 'section' ].join(',');
  18784. function isHeaderFooterLandmark(headerFooterElement) {
  18785. return !find_up_virtual_default(headerFooterElement, excludedParentsForHeaderFooterLandmarks);
  18786. }
  18787. function isLandmarkVirtual(virtualNode2) {
  18788. var actualNode = virtualNode2.actualNode;
  18789. var landmarkRoles2 = get_aria_roles_by_type_default('landmark');
  18790. var role = get_role_default(actualNode);
  18791. if (!role) {
  18792. return false;
  18793. }
  18794. var nodeName2 = actualNode.nodeName.toUpperCase();
  18795. if (nodeName2 === 'HEADER' || nodeName2 === 'FOOTER') {
  18796. return isHeaderFooterLandmark(virtualNode2);
  18797. }
  18798. if (nodeName2 === 'SECTION' || nodeName2 === 'FORM') {
  18799. var accessibleText2 = accessible_text_virtual_default(virtualNode2);
  18800. return !!accessibleText2;
  18801. }
  18802. return landmarkRoles2.indexOf(role) >= 0 || role === 'region';
  18803. }
  18804. return isLandmarkVirtual(virtualNode) && is_visible_default(node, true);
  18805. }
  18806. var landmark_unique_matches_default = landmarkUniqueMatches;
  18807. function dataTableMatches2(node) {
  18808. return !is_data_table_default(node) && !is_focusable_default(node);
  18809. }
  18810. var layout_table_matches_default = dataTableMatches2;
  18811. function linkInTextBlockMatches(node) {
  18812. var text32 = sanitize_default(node.textContent);
  18813. var role = node.getAttribute('role');
  18814. if (role && role !== 'link') {
  18815. return false;
  18816. }
  18817. if (!text32) {
  18818. return false;
  18819. }
  18820. if (!is_visible_default(node, false)) {
  18821. return false;
  18822. }
  18823. return is_in_text_block_default(node);
  18824. }
  18825. var link_in_text_block_matches_default = linkInTextBlockMatches;
  18826. function nestedInteractiveMatches(node, virtualNode) {
  18827. var role = get_role_default(virtualNode);
  18828. if (!role) {
  18829. return false;
  18830. }
  18831. return !!standards_default.ariaRoles[role].childrenPresentational;
  18832. }
  18833. var nested_interactive_matches_default = nestedInteractiveMatches;
  18834. function noAutoplayAudioMatches(node) {
  18835. if (!node.currentSrc) {
  18836. return false;
  18837. }
  18838. if (node.hasAttribute('paused') || node.hasAttribute('muted')) {
  18839. return false;
  18840. }
  18841. return true;
  18842. }
  18843. var no_autoplay_audio_matches_default = noAutoplayAudioMatches;
  18844. function noEmptyRoleMatches(node, virtualNode) {
  18845. if (!virtualNode.hasAttr('role')) {
  18846. return false;
  18847. }
  18848. if (!virtualNode.attr('role').trim()) {
  18849. return false;
  18850. }
  18851. return true;
  18852. }
  18853. var no_empty_role_matches_default = noEmptyRoleMatches;
  18854. function noExplicitNameRequired(node, virtualNode) {
  18855. var role = get_explicit_role_default(virtualNode);
  18856. if (!role || [ 'none', 'presentation' ].includes(role)) {
  18857. return true;
  18858. }
  18859. var _ref70 = aria_roles_default[role] || {}, accessibleNameRequired = _ref70.accessibleNameRequired;
  18860. if (accessibleNameRequired || is_focusable_default(virtualNode)) {
  18861. return true;
  18862. }
  18863. return false;
  18864. }
  18865. var no_explicit_name_required_matches_default = noExplicitNameRequired;
  18866. function noNamingMethodMatches(node, virtualNode) {
  18867. var _get_element_spec_def2 = get_element_spec_default(virtualNode), namingMethods = _get_element_spec_def2.namingMethods;
  18868. if (namingMethods && namingMethods.length !== 0) {
  18869. return false;
  18870. }
  18871. if (get_explicit_role_default(virtualNode) === 'combobox' && query_selector_all_default(virtualNode, 'input:not([type="hidden"])').length) {
  18872. return false;
  18873. }
  18874. return true;
  18875. }
  18876. var no_naming_method_matches_default = noNamingMethodMatches;
  18877. function noRoleMatches(node) {
  18878. return !node.getAttribute('role');
  18879. }
  18880. var no_role_matches_default = noRoleMatches;
  18881. function notHtmlMatches(node, virtualNode) {
  18882. return virtualNode.props.nodeName !== 'html';
  18883. }
  18884. var not_html_matches_default = notHtmlMatches;
  18885. function pAsHeadingMatches(node) {
  18886. var children = Array.from(node.parentNode.childNodes);
  18887. var nodeText = node.textContent.trim();
  18888. var isSentence = /[.!?:;](?![.!?:;])/g;
  18889. if (nodeText.length === 0 || (nodeText.match(isSentence) || []).length >= 2) {
  18890. return false;
  18891. }
  18892. var siblingsAfter = children.slice(children.indexOf(node) + 1).filter(function(elm) {
  18893. return elm.nodeName.toUpperCase() === 'P' && elm.textContent.trim() !== '';
  18894. });
  18895. return siblingsAfter.length !== 0;
  18896. }
  18897. var p_as_heading_matches_default = pAsHeadingMatches;
  18898. function scrollableRegionFocusableMatches(node, virtualNode) {
  18899. if (!!get_scroll_default(node, 13) === false) {
  18900. return false;
  18901. }
  18902. var role = get_explicit_role_default(virtualNode);
  18903. if (standards_default.ariaRoles.combobox.requiredOwned.includes(role)) {
  18904. if (closest_default(virtualNode, '[role~="combobox"]')) {
  18905. return false;
  18906. }
  18907. var id = virtualNode.attr('id');
  18908. if (id) {
  18909. var doc = get_root_node_default(node);
  18910. var owned = Array.from(doc.querySelectorAll('[aria-owns~="'.concat(id, '"], [aria-controls~="').concat(id, '"]')));
  18911. var comboboxOwned = owned.some(function(el) {
  18912. var roles = token_list_default(el.getAttribute('role'));
  18913. return roles.includes('combobox');
  18914. });
  18915. if (comboboxOwned) {
  18916. return false;
  18917. }
  18918. }
  18919. }
  18920. var nodeAndDescendents = query_selector_all_default(virtualNode, '*');
  18921. var hasVisibleChildren = nodeAndDescendents.some(function(elm) {
  18922. return has_content_virtual_default(elm, true, true);
  18923. });
  18924. if (!hasVisibleChildren) {
  18925. return false;
  18926. }
  18927. return true;
  18928. }
  18929. var scrollable_region_focusable_matches_default = scrollableRegionFocusableMatches;
  18930. function skipLinkMatches(node) {
  18931. return is_skip_link_default(node) && is_offscreen_default(node);
  18932. }
  18933. var skip_link_matches_default = skipLinkMatches;
  18934. function windowIsTopMatches(node) {
  18935. return node.ownerDocument.defaultView.self === node.ownerDocument.defaultView.top;
  18936. }
  18937. var window_is_top_matches_default = windowIsTopMatches;
  18938. function xmlLangMismatchMatches(node) {
  18939. var primaryLangValue = get_base_lang_default(node.getAttribute('lang'));
  18940. var primaryXmlLangValue = get_base_lang_default(node.getAttribute('xml:lang'));
  18941. return valid_langs_default(primaryLangValue) && valid_langs_default(primaryXmlLangValue);
  18942. }
  18943. var xml_lang_mismatch_matches_default = xmlLangMismatchMatches;
  18944. var metadataFunctionMap = {
  18945. 'abstractrole-evaluate': abstractrole_evaluate_default,
  18946. 'aria-allowed-attr-evaluate': aria_allowed_attr_evaluate_default,
  18947. 'aria-allowed-role-evaluate': aria_allowed_role_evaluate_default,
  18948. 'aria-errormessage-evaluate': aria_errormessage_evaluate_default,
  18949. 'aria-hidden-body-evaluate': aria_hidden_body_evaluate_default,
  18950. 'aria-prohibited-attr-evaluate': aria_prohibited_attr_evaluate_default,
  18951. 'aria-required-attr-evaluate': aria_required_attr_evaluate_default,
  18952. 'aria-required-children-evaluate': aria_required_children_evaluate_default,
  18953. 'aria-required-parent-evaluate': aria_required_parent_evaluate_default,
  18954. 'aria-roledescription-evaluate': aria_roledescription_evaluate_default,
  18955. 'aria-unsupported-attr-evaluate': aria_unsupported_attr_evaluate_default,
  18956. 'aria-valid-attr-evaluate': aria_valid_attr_evaluate_default,
  18957. 'aria-valid-attr-value-evaluate': aria_valid_attr_value_evaluate_default,
  18958. 'fallbackrole-evaluate': fallbackrole_evaluate_default,
  18959. 'has-global-aria-attribute-evaluate': has_global_aria_attribute_evaluate_default,
  18960. 'has-implicit-chromium-role-matches': has_implicit_chromium_role_matches_default,
  18961. 'has-widget-role-evaluate': has_widget_role_evaluate_default,
  18962. 'invalidrole-evaluate': invalidrole_evaluate_default,
  18963. 'is-element-focusable-evaluate': is_element_focusable_evaluate_default,
  18964. 'no-implicit-explicit-label-evaluate': no_implicit_explicit_label_evaluate_default,
  18965. 'unsupportedrole-evaluate': unsupportedrole_evaluate_default,
  18966. 'valid-scrollable-semantics-evaluate': valid_scrollable_semantics_evaluate_default,
  18967. 'caption-faked-evaluate': caption_faked_evaluate_default,
  18968. 'html5-scope-evaluate': html5_scope_evaluate_default,
  18969. 'same-caption-summary-evaluate': same_caption_summary_evaluate_default,
  18970. 'scope-value-evaluate': scope_value_evaluate_default,
  18971. 'td-has-header-evaluate': td_has_header_evaluate_default,
  18972. 'td-headers-attr-evaluate': td_headers_attr_evaluate_default,
  18973. 'th-has-data-cells-evaluate': th_has_data_cells_evaluate_default,
  18974. 'hidden-content-evaluate': hidden_content_evaluate_default,
  18975. 'color-contrast-evaluate': color_contrast_evaluate_default,
  18976. 'link-in-text-block-evaluate': link_in_text_block_evaluate_default,
  18977. 'autocomplete-appropriate-evaluate': autocomplete_appropriate_evaluate_default,
  18978. 'autocomplete-valid-evaluate': autocomplete_valid_evaluate_default,
  18979. 'attr-non-space-content-evaluate': attr_non_space_content_evaluate_default,
  18980. 'has-descendant-after': has_descendant_after_default,
  18981. 'has-descendant-evaluate': has_descendant_evaluate_default,
  18982. 'has-text-content-evaluate': has_text_content_evaluate_default,
  18983. 'matches-definition-evaluate': matches_definition_evaluate_default,
  18984. 'page-no-duplicate-after': page_no_duplicate_after_default,
  18985. 'page-no-duplicate-evaluate': page_no_duplicate_evaluate_default,
  18986. 'heading-order-after': headingOrderAfter,
  18987. 'heading-order-evaluate': heading_order_evaluate_default,
  18988. 'identical-links-same-purpose-after': identical_links_same_purpose_after_default,
  18989. 'identical-links-same-purpose-evaluate': identical_links_same_purpose_evaluate_default,
  18990. 'internal-link-present-evaluate': internal_link_present_evaluate_default,
  18991. 'meta-refresh-evaluate': meta_refresh_evaluate_default,
  18992. 'p-as-heading-evaluate': p_as_heading_evaluate_default,
  18993. 'region-evaluate': region_evaluate_default,
  18994. 'skip-link-evaluate': skip_link_evaluate_default,
  18995. 'unique-frame-title-after': unique_frame_title_after_default,
  18996. 'unique-frame-title-evaluate': unique_frame_title_evaluate_default,
  18997. 'aria-label-evaluate': aria_label_evaluate_default,
  18998. 'aria-labelledby-evaluate': aria_labelledby_evaluate_default,
  18999. 'avoid-inline-spacing-evaluate': avoid_inline_spacing_evaluate_default,
  19000. 'doc-has-title-evaluate': doc_has_title_evaluate_default,
  19001. 'exists-evaluate': exists_evaluate_default,
  19002. 'has-alt-evaluate': has_alt_evaluate_default,
  19003. 'is-on-screen-evaluate': is_on_screen_evaluate_default,
  19004. 'non-empty-if-present-evaluate': non_empty_if_present_evaluate_default,
  19005. 'presentational-role-evaluate': presentational_role_evaluate_default,
  19006. 'svg-non-empty-title-evaluate': svg_non_empty_title_evaluate_default,
  19007. 'css-orientation-lock-evaluate': css_orientation_lock_evaluate_default,
  19008. 'meta-viewport-scale-evaluate': meta_viewport_scale_evaluate_default,
  19009. 'duplicate-id-after': duplicate_id_after_default,
  19010. 'duplicate-id-evaluate': duplicate_id_evaluate_default,
  19011. 'accesskeys-after': accesskeys_after_default,
  19012. 'accesskeys-evaluate': accesskeys_evaluate_default,
  19013. 'focusable-content-evaluate': focusable_content_evaluate_default,
  19014. 'focusable-disabled-evaluate': focusable_disabled_evaluate_default,
  19015. 'focusable-element-evaluate': focusable_element_evaluate_default,
  19016. 'focusable-modal-open-evaluate': focusable_modal_open_evaluate_default,
  19017. 'focusable-no-name-evaluate': focusable_no_name_evaluate_default,
  19018. 'focusable-not-tabbable-evaluate': focusable_not_tabbable_evaluate_default,
  19019. 'landmark-is-top-level-evaluate': landmark_is_top_level_evaluate_default,
  19020. 'no-focusable-content-evaluate': no_focusable_content_evaluate_default,
  19021. 'tabindex-evaluate': tabindex_evaluate_default,
  19022. 'alt-space-value-evaluate': alt_space_value_evaluate_default,
  19023. 'duplicate-img-label-evaluate': duplicate_img_label_evaluate_default,
  19024. 'explicit-evaluate': explicit_evaluate_default,
  19025. 'help-same-as-label-evaluate': help_same_as_label_evaluate_default,
  19026. 'hidden-explicit-label-evaluate': hidden_explicit_label_evaluate_default,
  19027. 'implicit-evaluate': implicit_evaluate_default,
  19028. 'label-content-name-mismatch-evaluate': label_content_name_mismatch_evaluate_default,
  19029. 'multiple-label-evaluate': multiple_label_evaluate_default,
  19030. 'title-only-evaluate': title_only_evaluate_default,
  19031. 'landmark-is-unique-after': landmark_is_unique_after_default,
  19032. 'landmark-is-unique-evaluate': landmark_is_unique_evaluate_default,
  19033. 'has-lang-evaluate': has_lang_evaluate_default,
  19034. 'valid-lang-evaluate': valid_lang_evaluate_default,
  19035. 'xml-lang-mismatch-evaluate': xml_lang_mismatch_evaluate_default,
  19036. 'dlitem-evaluate': dlitem_evaluate_default,
  19037. 'listitem-evaluate': listitem_evaluate_default,
  19038. 'only-dlitems-evaluate': only_dlitems_evaluate_default,
  19039. 'only-listitems-evaluate': only_listitems_evaluate_default,
  19040. 'structured-dlitems-evaluate': structured_dlitems_evaluate_default,
  19041. 'caption-evaluate': caption_evaluate_default,
  19042. 'frame-tested-evaluate': frame_tested_evaluate_default,
  19043. 'no-autoplay-audio-evaluate': no_autoplay_audio_evaluate_default,
  19044. 'aria-allowed-attr-matches': aria_allowed_attr_matches_default,
  19045. 'aria-allowed-role-matches': aria_allowed_role_matches_default,
  19046. 'aria-form-field-name-matches': no_naming_method_matches_default,
  19047. 'aria-has-attr-matches': aria_has_attr_matches_default,
  19048. 'aria-hidden-focus-matches': aria_hidden_focus_matches_default,
  19049. 'aria-required-children-matches': aria_required_children_matches_default,
  19050. 'aria-required-parent-matches': aria_required_parent_matches_default,
  19051. 'autocomplete-matches': autocomplete_matches_default,
  19052. 'bypass-matches': bypass_matches_default,
  19053. 'color-contrast-matches': color_contrast_matches_default,
  19054. 'data-table-large-matches': data_table_large_matches_default,
  19055. 'data-table-matches': data_table_matches_default,
  19056. 'duplicate-id-active-matches': duplicate_id_active_matches_default,
  19057. 'duplicate-id-aria-matches': duplicate_id_aria_matches_default,
  19058. 'duplicate-id-misc-matches': duplicate_id_misc_matches_default,
  19059. 'frame-focusable-content-matches': frame_focusable_content_matches_default,
  19060. 'frame-title-has-text-matches': frame_title_has_text_matches_default,
  19061. 'heading-matches': heading_matches_default,
  19062. 'html-namespace-matches': html_namespace_matches_default,
  19063. 'identical-links-same-purpose-matches': identical_links_same_purpose_matches_default,
  19064. 'inserted-into-focus-order-matches': inserted_into_focus_order_matches_default,
  19065. 'is-initiator-matches': is_initiator_matches_default,
  19066. 'label-content-name-mismatch-matches': label_content_name_mismatch_matches_default,
  19067. 'label-matches': label_matches_default,
  19068. 'landmark-has-body-context-matches': landmark_has_body_context_matches_default,
  19069. 'landmark-unique-matches': landmark_unique_matches_default,
  19070. 'layout-table-matches': layout_table_matches_default,
  19071. 'link-in-text-block-matches': link_in_text_block_matches_default,
  19072. 'nested-interactive-matches': nested_interactive_matches_default,
  19073. 'no-autoplay-audio-matches': no_autoplay_audio_matches_default,
  19074. 'no-empty-role-matches': no_empty_role_matches_default,
  19075. 'no-explicit-name-required-matches': no_explicit_name_required_matches_default,
  19076. 'no-naming-method-matches': no_naming_method_matches_default,
  19077. 'no-role-matches': no_role_matches_default,
  19078. 'not-html-matches': not_html_matches_default,
  19079. 'p-as-heading-matches': p_as_heading_matches_default,
  19080. 'scrollable-region-focusable-matches': scrollable_region_focusable_matches_default,
  19081. 'skip-link-matches': skip_link_matches_default,
  19082. 'svg-namespace-matches': svg_namespace_matches_default,
  19083. 'window-is-top-matches': window_is_top_matches_default,
  19084. 'xml-lang-mismatch-matches': xml_lang_mismatch_matches_default
  19085. };
  19086. var metadata_function_map_default = metadataFunctionMap;
  19087. function CheckResult(check4) {
  19088. this.id = check4.id;
  19089. this.data = null;
  19090. this.relatedNodes = [];
  19091. this.result = null;
  19092. }
  19093. var check_result_default = CheckResult;
  19094. function createExecutionContext(spec) {
  19095. if (typeof spec === 'string') {
  19096. if (metadata_function_map_default[spec]) {
  19097. return metadata_function_map_default[spec];
  19098. }
  19099. if (/^\s*function[\s\w]*\(/.test(spec)) {
  19100. return new Function('return ' + spec + ';')();
  19101. }
  19102. throw new ReferenceError('Function ID does not exist in the metadata-function-map: '.concat(spec));
  19103. }
  19104. return spec;
  19105. }
  19106. function normalizeOptions() {
  19107. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  19108. if (Array.isArray(options) || _typeof(options) !== 'object') {
  19109. options = {
  19110. value: options
  19111. };
  19112. }
  19113. return options;
  19114. }
  19115. function Check(spec) {
  19116. if (spec) {
  19117. this.id = spec.id;
  19118. this.configure(spec);
  19119. }
  19120. }
  19121. Check.prototype.enabled = true;
  19122. Check.prototype.run = function run(node, options, context3, resolve, reject) {
  19123. options = options || {};
  19124. var enabled = options.hasOwnProperty('enabled') ? options.enabled : this.enabled;
  19125. var checkOptions = this.getOptions(options.options);
  19126. if (enabled) {
  19127. var checkResult = new check_result_default(this);
  19128. var helper = check_helper_default(checkResult, options, resolve, reject);
  19129. var result;
  19130. try {
  19131. result = this.evaluate.call(helper, node.actualNode, checkOptions, node, context3);
  19132. } catch (e) {
  19133. if (node && node.actualNode) {
  19134. e.errorNode = new dq_element_default(node.actualNode).toJSON();
  19135. }
  19136. reject(e);
  19137. return;
  19138. }
  19139. if (!helper.isAsync) {
  19140. checkResult.result = result;
  19141. resolve(checkResult);
  19142. }
  19143. } else {
  19144. resolve(null);
  19145. }
  19146. };
  19147. Check.prototype.runSync = function runSync(node, options, context3) {
  19148. options = options || {};
  19149. var _options = options, _options$enabled = _options.enabled, enabled = _options$enabled === void 0 ? this.enabled : _options$enabled;
  19150. if (!enabled) {
  19151. return null;
  19152. }
  19153. var checkOptions = this.getOptions(options.options);
  19154. var checkResult = new check_result_default(this);
  19155. var helper = check_helper_default(checkResult, options);
  19156. helper.async = function async() {
  19157. throw new Error('Cannot run async check while in a synchronous run');
  19158. };
  19159. var result;
  19160. try {
  19161. result = this.evaluate.call(helper, node.actualNode, checkOptions, node, context3);
  19162. } catch (e) {
  19163. if (node && node.actualNode) {
  19164. e.errorNode = new dq_element_default(node.actualNode).toJSON();
  19165. }
  19166. throw e;
  19167. }
  19168. checkResult.result = result;
  19169. return checkResult;
  19170. };
  19171. Check.prototype.configure = function configure(spec) {
  19172. var _this3 = this;
  19173. if (!spec.evaluate || metadata_function_map_default[spec.evaluate]) {
  19174. this._internalCheck = true;
  19175. }
  19176. if (spec.hasOwnProperty('enabled')) {
  19177. this.enabled = spec.enabled;
  19178. }
  19179. if (spec.hasOwnProperty('options')) {
  19180. if (this._internalCheck) {
  19181. this.options = normalizeOptions(spec.options);
  19182. } else {
  19183. this.options = spec.options;
  19184. }
  19185. }
  19186. [ 'evaluate', 'after' ].filter(function(prop) {
  19187. return spec.hasOwnProperty(prop);
  19188. }).forEach(function(prop) {
  19189. return _this3[prop] = createExecutionContext(spec[prop]);
  19190. });
  19191. };
  19192. Check.prototype.getOptions = function getOptions(options) {
  19193. if (this._internalCheck) {
  19194. return deep_merge_default(this.options, normalizeOptions(options || {}));
  19195. } else {
  19196. return options || this.options;
  19197. }
  19198. };
  19199. var check_default = Check;
  19200. function RuleResult(rule3) {
  19201. this.id = rule3.id;
  19202. this.result = constants_default.NA;
  19203. this.pageLevel = rule3.pageLevel;
  19204. this.impact = null;
  19205. this.nodes = [];
  19206. }
  19207. var rule_result_default = RuleResult;
  19208. function Rule(spec, parentAudit) {
  19209. this._audit = parentAudit;
  19210. this.id = spec.id;
  19211. this.selector = spec.selector || '*';
  19212. if (spec.impact) {
  19213. assert_default(constants_default.impact.includes(spec.impact), 'Impact '.concat(spec.impact, ' is not a valid impact'));
  19214. this.impact = spec.impact;
  19215. }
  19216. this.excludeHidden = typeof spec.excludeHidden === 'boolean' ? spec.excludeHidden : true;
  19217. this.enabled = typeof spec.enabled === 'boolean' ? spec.enabled : true;
  19218. this.pageLevel = typeof spec.pageLevel === 'boolean' ? spec.pageLevel : false;
  19219. this.reviewOnFail = typeof spec.reviewOnFail === 'boolean' ? spec.reviewOnFail : false;
  19220. this.any = spec.any || [];
  19221. this.all = spec.all || [];
  19222. this.none = spec.none || [];
  19223. this.tags = spec.tags || [];
  19224. this.preload = spec.preload ? true : false;
  19225. if (spec.matches) {
  19226. this.matches = createExecutionContext(spec.matches);
  19227. }
  19228. }
  19229. Rule.prototype.matches = function matches13() {
  19230. return true;
  19231. };
  19232. Rule.prototype.gather = function gather(context3) {
  19233. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19234. var markStart = 'mark_gather_start_' + this.id;
  19235. var markEnd = 'mark_gather_end_' + this.id;
  19236. var markHiddenStart = 'mark_isHidden_start_' + this.id;
  19237. var markHiddenEnd = 'mark_isHidden_end_' + this.id;
  19238. if (options.performanceTimer) {
  19239. performance_timer_default.mark(markStart);
  19240. }
  19241. var elements = select_default(this.selector, context3);
  19242. if (this.excludeHidden) {
  19243. if (options.performanceTimer) {
  19244. performance_timer_default.mark(markHiddenStart);
  19245. }
  19246. elements = elements.filter(function(element) {
  19247. return !is_hidden_default(element.actualNode);
  19248. });
  19249. if (options.performanceTimer) {
  19250. performance_timer_default.mark(markHiddenEnd);
  19251. performance_timer_default.measure('rule_' + this.id + '#gather_axe.utils.isHidden', markHiddenStart, markHiddenEnd);
  19252. }
  19253. }
  19254. if (options.performanceTimer) {
  19255. performance_timer_default.mark(markEnd);
  19256. performance_timer_default.measure('rule_' + this.id + '#gather', markStart, markEnd);
  19257. }
  19258. return elements;
  19259. };
  19260. Rule.prototype.runChecks = function runChecks(type, node, options, context3, resolve, reject) {
  19261. var self2 = this;
  19262. var checkQueue = queue_default();
  19263. this[type].forEach(function(c) {
  19264. var check4 = self2._audit.checks[c.id || c];
  19265. var option = get_check_option_default(check4, self2.id, options);
  19266. checkQueue.defer(function(res, rej) {
  19267. check4.run(node, option, context3, res, rej);
  19268. });
  19269. });
  19270. checkQueue.then(function(results) {
  19271. results = results.filter(function(check4) {
  19272. return check4;
  19273. });
  19274. resolve({
  19275. type: type,
  19276. results: results
  19277. });
  19278. })['catch'](reject);
  19279. };
  19280. Rule.prototype.runChecksSync = function runChecksSync(type, node, options, context3) {
  19281. var self2 = this;
  19282. var results = [];
  19283. this[type].forEach(function(c) {
  19284. var check4 = self2._audit.checks[c.id || c];
  19285. var option = get_check_option_default(check4, self2.id, options);
  19286. results.push(check4.runSync(node, option, context3));
  19287. });
  19288. results = results.filter(function(check4) {
  19289. return check4;
  19290. });
  19291. return {
  19292. type: type,
  19293. results: results
  19294. };
  19295. };
  19296. Rule.prototype.run = function run2(context3) {
  19297. var _this4 = this;
  19298. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19299. var resolve = arguments.length > 2 ? arguments[2] : undefined;
  19300. var reject = arguments.length > 3 ? arguments[3] : undefined;
  19301. if (options.performanceTimer) {
  19302. this._trackPerformance();
  19303. }
  19304. var q = queue_default();
  19305. var ruleResult = new rule_result_default(this);
  19306. var nodes;
  19307. try {
  19308. nodes = this.gatherAndMatchNodes(context3, options);
  19309. } catch (error) {
  19310. reject(new SupportError({
  19311. cause: error,
  19312. ruleId: this.id
  19313. }));
  19314. return;
  19315. }
  19316. if (options.performanceTimer) {
  19317. this._logGatherPerformance(nodes);
  19318. }
  19319. nodes.forEach(function(node) {
  19320. q.defer(function(resolveNode, rejectNode) {
  19321. var checkQueue = queue_default();
  19322. [ 'any', 'all', 'none' ].forEach(function(type) {
  19323. checkQueue.defer(function(res, rej) {
  19324. _this4.runChecks(type, node, options, context3, res, rej);
  19325. });
  19326. });
  19327. checkQueue.then(function(results) {
  19328. var result = getResult(results);
  19329. if (result) {
  19330. result.node = new dq_element_default(node.actualNode, options);
  19331. ruleResult.nodes.push(result);
  19332. if (_this4.reviewOnFail) {
  19333. [ 'any', 'all' ].forEach(function(type) {
  19334. result[type].forEach(function(checkResult) {
  19335. if (checkResult.result === false) {
  19336. checkResult.result = void 0;
  19337. }
  19338. });
  19339. });
  19340. result.none.forEach(function(checkResult) {
  19341. if (checkResult.result === true) {
  19342. checkResult.result = void 0;
  19343. }
  19344. });
  19345. }
  19346. }
  19347. resolveNode();
  19348. })['catch'](function(err2) {
  19349. return rejectNode(err2);
  19350. });
  19351. });
  19352. });
  19353. q.defer(function(resolve2) {
  19354. return setTimeout(resolve2, 0);
  19355. });
  19356. if (options.performanceTimer) {
  19357. this._logRulePerformance();
  19358. }
  19359. q.then(function() {
  19360. return resolve(ruleResult);
  19361. })['catch'](function(error) {
  19362. return reject(error);
  19363. });
  19364. };
  19365. Rule.prototype.runSync = function runSync2(context3) {
  19366. var _this5 = this;
  19367. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  19368. if (options.performanceTimer) {
  19369. this._trackPerformance();
  19370. }
  19371. var ruleResult = new rule_result_default(this);
  19372. var nodes;
  19373. try {
  19374. nodes = this.gatherAndMatchNodes(context3, options);
  19375. } catch (error) {
  19376. throw new SupportError({
  19377. cause: error,
  19378. ruleId: this.id
  19379. });
  19380. }
  19381. if (options.performanceTimer) {
  19382. this._logGatherPerformance(nodes);
  19383. }
  19384. nodes.forEach(function(node) {
  19385. var results = [];
  19386. [ 'any', 'all', 'none' ].forEach(function(type) {
  19387. results.push(_this5.runChecksSync(type, node, options, context3));
  19388. });
  19389. var result = getResult(results);
  19390. if (result) {
  19391. result.node = node.actualNode ? new dq_element_default(node.actualNode, options) : null;
  19392. ruleResult.nodes.push(result);
  19393. if (_this5.reviewOnFail) {
  19394. [ 'any', 'all' ].forEach(function(type) {
  19395. result[type].forEach(function(checkResult) {
  19396. if (checkResult.result === false) {
  19397. checkResult.result = void 0;
  19398. }
  19399. });
  19400. });
  19401. result.none.forEach(function(checkResult) {
  19402. if (checkResult.result === true) {
  19403. checkResult.result = void 0;
  19404. }
  19405. });
  19406. }
  19407. }
  19408. });
  19409. if (options.performanceTimer) {
  19410. this._logRulePerformance();
  19411. }
  19412. return ruleResult;
  19413. };
  19414. Rule.prototype._trackPerformance = function _trackPerformance() {
  19415. this._markStart = 'mark_rule_start_' + this.id;
  19416. this._markEnd = 'mark_rule_end_' + this.id;
  19417. this._markChecksStart = 'mark_runchecks_start_' + this.id;
  19418. this._markChecksEnd = 'mark_runchecks_end_' + this.id;
  19419. };
  19420. Rule.prototype._logGatherPerformance = function _logGatherPerformance(nodes) {
  19421. log_default('gather (', nodes.length, '):', performance_timer_default.timeElapsed() + 'ms');
  19422. performance_timer_default.mark(this._markChecksStart);
  19423. };
  19424. Rule.prototype._logRulePerformance = function _logRulePerformance() {
  19425. performance_timer_default.mark(this._markChecksEnd);
  19426. performance_timer_default.mark(this._markEnd);
  19427. performance_timer_default.measure('runchecks_' + this.id, this._markChecksStart, this._markChecksEnd);
  19428. performance_timer_default.measure('rule_' + this.id, this._markStart, this._markEnd);
  19429. };
  19430. function getResult(results) {
  19431. if (results.length) {
  19432. var hasResults = false;
  19433. var result = {};
  19434. results.forEach(function(r) {
  19435. var res = r.results.filter(function(result2) {
  19436. return result2;
  19437. });
  19438. result[r.type] = res;
  19439. if (res.length) {
  19440. hasResults = true;
  19441. }
  19442. });
  19443. if (hasResults) {
  19444. return result;
  19445. }
  19446. return null;
  19447. }
  19448. }
  19449. Rule.prototype.gatherAndMatchNodes = function gatherAndMatchNodes(context3, options) {
  19450. var _this6 = this;
  19451. var markMatchesStart = 'mark_matches_start_' + this.id;
  19452. var markMatchesEnd = 'mark_matches_end_' + this.id;
  19453. var nodes = this.gather(context3, options);
  19454. if (options.performanceTimer) {
  19455. performance_timer_default.mark(markMatchesStart);
  19456. }
  19457. nodes = nodes.filter(function(node) {
  19458. return _this6.matches(node.actualNode, node, context3);
  19459. });
  19460. if (options.performanceTimer) {
  19461. performance_timer_default.mark(markMatchesEnd);
  19462. performance_timer_default.measure('rule_' + this.id + '#matches', markMatchesStart, markMatchesEnd);
  19463. }
  19464. return nodes;
  19465. };
  19466. function findAfterChecks(rule3) {
  19467. return get_all_checks_default(rule3).map(function(c) {
  19468. var check4 = rule3._audit.checks[c.id || c];
  19469. return check4 && typeof check4.after === 'function' ? check4 : null;
  19470. }).filter(Boolean);
  19471. }
  19472. function findCheckResults(nodes, checkID) {
  19473. var checkResults = [];
  19474. nodes.forEach(function(nodeResult) {
  19475. var checks = get_all_checks_default(nodeResult);
  19476. checks.forEach(function(checkResult) {
  19477. if (checkResult.id === checkID) {
  19478. checkResult.node = nodeResult.node;
  19479. checkResults.push(checkResult);
  19480. }
  19481. });
  19482. });
  19483. return checkResults;
  19484. }
  19485. function filterChecks(checks) {
  19486. return checks.filter(function(check4) {
  19487. return check4.filtered !== true;
  19488. });
  19489. }
  19490. function sanitizeNodes(result) {
  19491. var checkTypes2 = [ 'any', 'all', 'none' ];
  19492. var nodes = result.nodes.filter(function(detail) {
  19493. var length = 0;
  19494. checkTypes2.forEach(function(type) {
  19495. detail[type] = filterChecks(detail[type]);
  19496. length += detail[type].length;
  19497. });
  19498. return length > 0;
  19499. });
  19500. if (result.pageLevel && nodes.length) {
  19501. nodes = [ nodes.reduce(function(a, b) {
  19502. if (a) {
  19503. checkTypes2.forEach(function(type) {
  19504. a[type].push.apply(a[type], b[type]);
  19505. });
  19506. return a;
  19507. }
  19508. }) ];
  19509. }
  19510. return nodes;
  19511. }
  19512. Rule.prototype.after = function after(result, options) {
  19513. var afterChecks = findAfterChecks(this);
  19514. var ruleID = this.id;
  19515. afterChecks.forEach(function(check4) {
  19516. var beforeResults = findCheckResults(result.nodes, check4.id);
  19517. var option = get_check_option_default(check4, ruleID, options);
  19518. var afterResults = check4.after(beforeResults, option);
  19519. beforeResults.forEach(function(item) {
  19520. delete item.node;
  19521. if (afterResults.indexOf(item) === -1) {
  19522. item.filtered = true;
  19523. }
  19524. });
  19525. });
  19526. result.nodes = sanitizeNodes(result);
  19527. return result;
  19528. };
  19529. Rule.prototype.configure = function configure2(spec) {
  19530. if (spec.hasOwnProperty('selector')) {
  19531. this.selector = spec.selector;
  19532. }
  19533. if (spec.hasOwnProperty('excludeHidden')) {
  19534. this.excludeHidden = typeof spec.excludeHidden === 'boolean' ? spec.excludeHidden : true;
  19535. }
  19536. if (spec.hasOwnProperty('enabled')) {
  19537. this.enabled = typeof spec.enabled === 'boolean' ? spec.enabled : true;
  19538. }
  19539. if (spec.hasOwnProperty('pageLevel')) {
  19540. this.pageLevel = typeof spec.pageLevel === 'boolean' ? spec.pageLevel : false;
  19541. }
  19542. if (spec.hasOwnProperty('reviewOnFail')) {
  19543. this.reviewOnFail = typeof spec.reviewOnFail === 'boolean' ? spec.reviewOnFail : false;
  19544. }
  19545. if (spec.hasOwnProperty('any')) {
  19546. this.any = spec.any;
  19547. }
  19548. if (spec.hasOwnProperty('all')) {
  19549. this.all = spec.all;
  19550. }
  19551. if (spec.hasOwnProperty('none')) {
  19552. this.none = spec.none;
  19553. }
  19554. if (spec.hasOwnProperty('tags')) {
  19555. this.tags = spec.tags;
  19556. }
  19557. if (spec.hasOwnProperty('matches')) {
  19558. this.matches = createExecutionContext(spec.matches);
  19559. }
  19560. if (spec.impact) {
  19561. assert_default(constants_default.impact.includes(spec.impact), 'Impact '.concat(spec.impact, ' is not a valid impact'));
  19562. this.impact = spec.impact;
  19563. }
  19564. };
  19565. var rule_default = Rule;
  19566. var dot = __toModule(require_doT());
  19567. var dotRegex = /\{\{.+?\}\}/g;
  19568. function getDefaultOrigin() {
  19569. if (window.origin) {
  19570. return window.origin;
  19571. }
  19572. if (window.location && window.location.origin) {
  19573. return window.location.origin;
  19574. }
  19575. }
  19576. function getDefaultConfiguration(audit3) {
  19577. var config;
  19578. if (audit3) {
  19579. config = clone_default(audit3);
  19580. config.commons = audit3.commons;
  19581. } else {
  19582. config = {};
  19583. }
  19584. config.reporter = config.reporter || null;
  19585. config.noHtml = config.noHtml || false;
  19586. if (!config.allowedOrigins) {
  19587. var defaultOrigin = getDefaultOrigin();
  19588. config.allowedOrigins = defaultOrigin ? [ defaultOrigin ] : [];
  19589. }
  19590. config.rules = config.rules || [];
  19591. config.checks = config.checks || [];
  19592. config.data = _extends({
  19593. checks: {},
  19594. rules: {}
  19595. }, config.data);
  19596. return config;
  19597. }
  19598. function unpackToObject(collection, audit3, method) {
  19599. var i, l;
  19600. for (i = 0, l = collection.length; i < l; i++) {
  19601. audit3[method](collection[i]);
  19602. }
  19603. }
  19604. var mergeCheckLocale = function mergeCheckLocale(a, b) {
  19605. var pass = b.pass, fail = b.fail;
  19606. if (typeof pass === 'string' && dotRegex.test(pass)) {
  19607. pass = dot['default'].compile(pass);
  19608. }
  19609. if (typeof fail === 'string' && dotRegex.test(fail)) {
  19610. fail = dot['default'].compile(fail);
  19611. }
  19612. return _extends({}, a, {
  19613. messages: {
  19614. pass: pass || a.messages.pass,
  19615. fail: fail || a.messages.fail,
  19616. incomplete: _typeof(a.messages.incomplete) === 'object' ? _extends({}, a.messages.incomplete, b.incomplete) : b.incomplete
  19617. }
  19618. });
  19619. };
  19620. var mergeRuleLocale = function mergeRuleLocale(a, b) {
  19621. var help = b.help, description = b.description;
  19622. if (typeof help === 'string' && dotRegex.test(help)) {
  19623. help = dot['default'].compile(help);
  19624. }
  19625. if (typeof description === 'string' && dotRegex.test(description)) {
  19626. description = dot['default'].compile(description);
  19627. }
  19628. return _extends({}, a, {
  19629. help: help || a.help,
  19630. description: description || a.description
  19631. });
  19632. };
  19633. var mergeFailureMessage = function mergeFailureMessage(a, b) {
  19634. var failureMessage = b.failureMessage;
  19635. if (typeof failureMessage === 'string' && dotRegex.test(failureMessage)) {
  19636. failureMessage = dot['default'].compile(failureMessage);
  19637. }
  19638. return _extends({}, a, {
  19639. failureMessage: failureMessage || a.failureMessage
  19640. });
  19641. };
  19642. var mergeFallbackMessage = function mergeFallbackMessage(a, b) {
  19643. if (typeof b === 'string' && dotRegex.test(b)) {
  19644. b = dot['default'].compile(b);
  19645. }
  19646. return b || a;
  19647. };
  19648. var Audit = function() {
  19649. function Audit(audit3) {
  19650. _classCallCheck(this, Audit);
  19651. this.lang = 'en';
  19652. this.defaultConfig = audit3;
  19653. this.standards = standards_default;
  19654. this._init();
  19655. this._defaultLocale = null;
  19656. }
  19657. _createClass(Audit, [ {
  19658. key: '_setDefaultLocale',
  19659. value: function _setDefaultLocale() {
  19660. if (this._defaultLocale) {
  19661. return;
  19662. }
  19663. var locale = {
  19664. checks: {},
  19665. rules: {},
  19666. failureSummaries: {},
  19667. incompleteFallbackMessage: '',
  19668. lang: this.lang
  19669. };
  19670. var checkIDs = Object.keys(this.data.checks);
  19671. for (var _i22 = 0; _i22 < checkIDs.length; _i22++) {
  19672. var id = checkIDs[_i22];
  19673. var check4 = this.data.checks[id];
  19674. var _check4$messages = check4.messages, pass = _check4$messages.pass, fail = _check4$messages.fail, incomplete = _check4$messages.incomplete;
  19675. locale.checks[id] = {
  19676. pass: pass,
  19677. fail: fail,
  19678. incomplete: incomplete
  19679. };
  19680. }
  19681. var ruleIDs = Object.keys(this.data.rules);
  19682. for (var _i23 = 0; _i23 < ruleIDs.length; _i23++) {
  19683. var _id = ruleIDs[_i23];
  19684. var rule3 = this.data.rules[_id];
  19685. var description = rule3.description, help = rule3.help;
  19686. locale.rules[_id] = {
  19687. description: description,
  19688. help: help
  19689. };
  19690. }
  19691. var failureSummaries = Object.keys(this.data.failureSummaries);
  19692. for (var _i24 = 0; _i24 < failureSummaries.length; _i24++) {
  19693. var type = failureSummaries[_i24];
  19694. var failureSummary2 = this.data.failureSummaries[type];
  19695. var failureMessage = failureSummary2.failureMessage;
  19696. locale.failureSummaries[type] = {
  19697. failureMessage: failureMessage
  19698. };
  19699. }
  19700. locale.incompleteFallbackMessage = this.data.incompleteFallbackMessage;
  19701. this._defaultLocale = locale;
  19702. }
  19703. }, {
  19704. key: '_resetLocale',
  19705. value: function _resetLocale() {
  19706. var defaultLocale = this._defaultLocale;
  19707. if (!defaultLocale) {
  19708. return;
  19709. }
  19710. this.applyLocale(defaultLocale);
  19711. }
  19712. }, {
  19713. key: '_applyCheckLocale',
  19714. value: function _applyCheckLocale(checks) {
  19715. var keys = Object.keys(checks);
  19716. for (var _i25 = 0; _i25 < keys.length; _i25++) {
  19717. var id = keys[_i25];
  19718. if (!this.data.checks[id]) {
  19719. throw new Error('Locale provided for unknown check: "'.concat(id, '"'));
  19720. }
  19721. this.data.checks[id] = mergeCheckLocale(this.data.checks[id], checks[id]);
  19722. }
  19723. }
  19724. }, {
  19725. key: '_applyRuleLocale',
  19726. value: function _applyRuleLocale(rules) {
  19727. var keys = Object.keys(rules);
  19728. for (var _i26 = 0; _i26 < keys.length; _i26++) {
  19729. var id = keys[_i26];
  19730. if (!this.data.rules[id]) {
  19731. throw new Error('Locale provided for unknown rule: "'.concat(id, '"'));
  19732. }
  19733. this.data.rules[id] = mergeRuleLocale(this.data.rules[id], rules[id]);
  19734. }
  19735. }
  19736. }, {
  19737. key: '_applyFailureSummaries',
  19738. value: function _applyFailureSummaries(messages) {
  19739. var keys = Object.keys(messages);
  19740. for (var _i27 = 0; _i27 < keys.length; _i27++) {
  19741. var key = keys[_i27];
  19742. if (!this.data.failureSummaries[key]) {
  19743. throw new Error('Locale provided for unknown failureMessage: "'.concat(key, '"'));
  19744. }
  19745. this.data.failureSummaries[key] = mergeFailureMessage(this.data.failureSummaries[key], messages[key]);
  19746. }
  19747. }
  19748. }, {
  19749. key: 'applyLocale',
  19750. value: function applyLocale(locale) {
  19751. this._setDefaultLocale();
  19752. if (locale.checks) {
  19753. this._applyCheckLocale(locale.checks);
  19754. }
  19755. if (locale.rules) {
  19756. this._applyRuleLocale(locale.rules);
  19757. }
  19758. if (locale.failureSummaries) {
  19759. this._applyFailureSummaries(locale.failureSummaries, 'failureSummaries');
  19760. }
  19761. if (locale.incompleteFallbackMessage) {
  19762. this.data.incompleteFallbackMessage = mergeFallbackMessage(this.data.incompleteFallbackMessage, locale.incompleteFallbackMessage);
  19763. }
  19764. if (locale.lang) {
  19765. this.lang = locale.lang;
  19766. }
  19767. }
  19768. }, {
  19769. key: 'setAllowedOrigins',
  19770. value: function setAllowedOrigins(allowedOrigins) {
  19771. var defaultOrigin = getDefaultOrigin();
  19772. this.allowedOrigins = [];
  19773. var _iterator2 = _createForOfIteratorHelper(allowedOrigins), _step2;
  19774. try {
  19775. for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) {
  19776. var origin = _step2.value;
  19777. if (origin === constants_default.allOrigins) {
  19778. this.allowedOrigins = [ '*' ];
  19779. return;
  19780. } else if (origin !== constants_default.sameOrigin) {
  19781. this.allowedOrigins.push(origin);
  19782. } else if (defaultOrigin) {
  19783. this.allowedOrigins.push(defaultOrigin);
  19784. }
  19785. }
  19786. } catch (err) {
  19787. _iterator2.e(err);
  19788. } finally {
  19789. _iterator2.f();
  19790. }
  19791. }
  19792. }, {
  19793. key: '_init',
  19794. value: function _init() {
  19795. var audit3 = getDefaultConfiguration(this.defaultConfig);
  19796. this.lang = audit3.lang || 'en';
  19797. this.reporter = audit3.reporter;
  19798. this.commands = {};
  19799. this.rules = [];
  19800. this.checks = {};
  19801. this.brand = 'axe';
  19802. this.application = 'axeAPI';
  19803. this.tagExclude = [ 'experimental' ];
  19804. this.noHtml = audit3.noHtml;
  19805. this.allowedOrigins = audit3.allowedOrigins;
  19806. unpackToObject(audit3.rules, this, 'addRule');
  19807. unpackToObject(audit3.checks, this, 'addCheck');
  19808. this.data = {};
  19809. this.data.checks = audit3.data && audit3.data.checks || {};
  19810. this.data.rules = audit3.data && audit3.data.rules || {};
  19811. this.data.failureSummaries = audit3.data && audit3.data.failureSummaries || {};
  19812. this.data.incompleteFallbackMessage = audit3.data && audit3.data.incompleteFallbackMessage || '';
  19813. this._constructHelpUrls();
  19814. }
  19815. }, {
  19816. key: 'registerCommand',
  19817. value: function registerCommand(command) {
  19818. this.commands[command.id] = command.callback;
  19819. }
  19820. }, {
  19821. key: 'addRule',
  19822. value: function addRule(spec) {
  19823. if (spec.metadata) {
  19824. this.data.rules[spec.id] = spec.metadata;
  19825. }
  19826. var rule3 = this.getRule(spec.id);
  19827. if (rule3) {
  19828. rule3.configure(spec);
  19829. } else {
  19830. this.rules.push(new rule_default(spec, this));
  19831. }
  19832. }
  19833. }, {
  19834. key: 'addCheck',
  19835. value: function addCheck(spec) {
  19836. var metadata = spec.metadata;
  19837. if (_typeof(metadata) === 'object') {
  19838. this.data.checks[spec.id] = metadata;
  19839. if (_typeof(metadata.messages) === 'object') {
  19840. Object.keys(metadata.messages).filter(function(prop) {
  19841. return metadata.messages.hasOwnProperty(prop) && typeof metadata.messages[prop] === 'string';
  19842. }).forEach(function(prop) {
  19843. if (metadata.messages[prop].indexOf('function') === 0) {
  19844. metadata.messages[prop] = new Function('return ' + metadata.messages[prop] + ';')();
  19845. }
  19846. });
  19847. }
  19848. }
  19849. if (this.checks[spec.id]) {
  19850. this.checks[spec.id].configure(spec);
  19851. } else {
  19852. this.checks[spec.id] = new check_default(spec);
  19853. }
  19854. }
  19855. }, {
  19856. key: 'run',
  19857. value: function run(context3, options, resolve, reject) {
  19858. this.normalizeOptions(options);
  19859. axe._selectCache = [];
  19860. var allRulesToRun = getRulesToRun(this.rules, context3, options);
  19861. var runNowRules = allRulesToRun.now;
  19862. var runLaterRules = allRulesToRun.later;
  19863. var nowRulesQueue = queue_default();
  19864. runNowRules.forEach(function(rule3) {
  19865. nowRulesQueue.defer(getDefferedRule(rule3, context3, options));
  19866. });
  19867. var preloaderQueue = queue_default();
  19868. if (runLaterRules.length) {
  19869. preloaderQueue.defer(function(resolve2) {
  19870. preload_default(options).then(function(assets) {
  19871. return resolve2(assets);
  19872. })['catch'](function(err2) {
  19873. console.warn('Couldn\'t load preload assets: ', err2);
  19874. resolve2(void 0);
  19875. });
  19876. });
  19877. }
  19878. var queueForNowRulesAndPreloader = queue_default();
  19879. queueForNowRulesAndPreloader.defer(nowRulesQueue);
  19880. queueForNowRulesAndPreloader.defer(preloaderQueue);
  19881. queueForNowRulesAndPreloader.then(function(nowRulesAndPreloaderResults) {
  19882. var assetsFromQueue = nowRulesAndPreloaderResults.pop();
  19883. if (assetsFromQueue && assetsFromQueue.length) {
  19884. var assets = assetsFromQueue[0];
  19885. if (assets) {
  19886. context3 = _extends({}, context3, assets);
  19887. }
  19888. }
  19889. var nowRulesResults = nowRulesAndPreloaderResults[0];
  19890. if (!runLaterRules.length) {
  19891. axe._selectCache = void 0;
  19892. resolve(nowRulesResults.filter(function(result) {
  19893. return !!result;
  19894. }));
  19895. return;
  19896. }
  19897. var laterRulesQueue = queue_default();
  19898. runLaterRules.forEach(function(rule3) {
  19899. var deferredRule = getDefferedRule(rule3, context3, options);
  19900. laterRulesQueue.defer(deferredRule);
  19901. });
  19902. laterRulesQueue.then(function(laterRuleResults) {
  19903. axe._selectCache = void 0;
  19904. resolve(nowRulesResults.concat(laterRuleResults).filter(function(result) {
  19905. return !!result;
  19906. }));
  19907. })['catch'](reject);
  19908. })['catch'](reject);
  19909. }
  19910. }, {
  19911. key: 'after',
  19912. value: function after(results, options) {
  19913. var rules = this.rules;
  19914. return results.map(function(ruleResult) {
  19915. var rule3 = find_by_default(rules, 'id', ruleResult.id);
  19916. if (!rule3) {
  19917. throw new Error('Result for unknown rule. You may be running mismatch axe-core versions');
  19918. }
  19919. return rule3.after(ruleResult, options);
  19920. });
  19921. }
  19922. }, {
  19923. key: 'getRule',
  19924. value: function getRule(ruleId) {
  19925. return this.rules.find(function(rule3) {
  19926. return rule3.id === ruleId;
  19927. });
  19928. }
  19929. }, {
  19930. key: 'normalizeOptions',
  19931. value: function normalizeOptions(options) {
  19932. var audit3 = this;
  19933. var tags = [];
  19934. var ruleIds = [];
  19935. audit3.rules.forEach(function(rule3) {
  19936. ruleIds.push(rule3.id);
  19937. rule3.tags.forEach(function(tag) {
  19938. if (!tags.includes(tag)) {
  19939. tags.push(tag);
  19940. }
  19941. });
  19942. });
  19943. if (_typeof(options.runOnly) === 'object') {
  19944. if (Array.isArray(options.runOnly)) {
  19945. var hasTag = options.runOnly.find(function(value) {
  19946. return tags.includes(value);
  19947. });
  19948. var hasRule = options.runOnly.find(function(value) {
  19949. return ruleIds.includes(value);
  19950. });
  19951. if (hasTag && hasRule) {
  19952. throw new Error('runOnly cannot be both rules and tags');
  19953. }
  19954. if (hasRule) {
  19955. options.runOnly = {
  19956. type: 'rule',
  19957. values: options.runOnly
  19958. };
  19959. } else {
  19960. options.runOnly = {
  19961. type: 'tag',
  19962. values: options.runOnly
  19963. };
  19964. }
  19965. }
  19966. var only = options.runOnly;
  19967. if (only.value && !only.values) {
  19968. only.values = only.value;
  19969. delete only.value;
  19970. }
  19971. if (!Array.isArray(only.values) || only.values.length === 0) {
  19972. throw new Error('runOnly.values must be a non-empty array');
  19973. }
  19974. if ([ 'rule', 'rules' ].includes(only.type)) {
  19975. only.type = 'rule';
  19976. only.values.forEach(function(ruleId) {
  19977. if (!ruleIds.includes(ruleId)) {
  19978. throw new Error('unknown rule `' + ruleId + '` in options.runOnly');
  19979. }
  19980. });
  19981. } else if ([ 'tag', 'tags', void 0 ].includes(only.type)) {
  19982. only.type = 'tag';
  19983. var unmatchedTags = only.values.filter(function(tag) {
  19984. return !tags.includes(tag);
  19985. });
  19986. if (unmatchedTags.length !== 0) {
  19987. log_default('Could not find tags `' + unmatchedTags.join('`, `') + '`');
  19988. }
  19989. } else {
  19990. throw new Error('Unknown runOnly type \''.concat(only.type, '\''));
  19991. }
  19992. }
  19993. if (_typeof(options.rules) === 'object') {
  19994. Object.keys(options.rules).forEach(function(ruleId) {
  19995. if (!ruleIds.includes(ruleId)) {
  19996. throw new Error('unknown rule `' + ruleId + '` in options.rules');
  19997. }
  19998. });
  19999. }
  20000. return options;
  20001. }
  20002. }, {
  20003. key: 'setBranding',
  20004. value: function setBranding(branding) {
  20005. var previous = {
  20006. brand: this.brand,
  20007. application: this.application
  20008. };
  20009. if (branding && branding.hasOwnProperty('brand') && branding.brand && typeof branding.brand === 'string') {
  20010. this.brand = branding.brand;
  20011. }
  20012. if (branding && branding.hasOwnProperty('application') && branding.application && typeof branding.application === 'string') {
  20013. this.application = branding.application;
  20014. }
  20015. this._constructHelpUrls(previous);
  20016. }
  20017. }, {
  20018. key: '_constructHelpUrls',
  20019. value: function _constructHelpUrls() {
  20020. var _this7 = this;
  20021. var previous = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  20022. var version = (axe.version.match(/^[1-9][0-9]*\.[0-9]+/) || [ 'x.y' ])[0];
  20023. this.rules.forEach(function(rule3) {
  20024. if (!_this7.data.rules[rule3.id]) {
  20025. _this7.data.rules[rule3.id] = {};
  20026. }
  20027. var metaData = _this7.data.rules[rule3.id];
  20028. if (typeof metaData.helpUrl !== 'string' || previous && metaData.helpUrl === getHelpUrl(previous, rule3.id, version)) {
  20029. metaData.helpUrl = getHelpUrl(_this7, rule3.id, version);
  20030. }
  20031. });
  20032. }
  20033. }, {
  20034. key: 'resetRulesAndChecks',
  20035. value: function resetRulesAndChecks() {
  20036. this._init();
  20037. this._resetLocale();
  20038. }
  20039. } ]);
  20040. return Audit;
  20041. }();
  20042. function getRulesToRun(rules, context3, options) {
  20043. var base = {
  20044. now: [],
  20045. later: []
  20046. };
  20047. var splitRules = rules.reduce(function(out, rule3) {
  20048. if (!rule_should_run_default(rule3, context3, options)) {
  20049. return out;
  20050. }
  20051. if (rule3.preload) {
  20052. out.later.push(rule3);
  20053. return out;
  20054. }
  20055. out.now.push(rule3);
  20056. return out;
  20057. }, base);
  20058. return splitRules;
  20059. }
  20060. function getDefferedRule(rule3, context3, options) {
  20061. if (options.performanceTimer) {
  20062. performance_timer_default.mark('mark_rule_start_' + rule3.id);
  20063. }
  20064. return function(resolve, reject) {
  20065. rule3.run(context3, options, function(ruleResult) {
  20066. resolve(ruleResult);
  20067. }, function(err2) {
  20068. if (!options.debug) {
  20069. var errResult = Object.assign(new rule_result_default(rule3), {
  20070. result: constants_default.CANTTELL,
  20071. description: 'An error occured while running this rule',
  20072. message: err2.message,
  20073. stack: err2.stack,
  20074. error: err2,
  20075. errorNode: err2.errorNode
  20076. });
  20077. resolve(errResult);
  20078. } else {
  20079. reject(err2);
  20080. }
  20081. });
  20082. };
  20083. }
  20084. function getHelpUrl(_ref71, ruleId, version) {
  20085. var brand = _ref71.brand, application = _ref71.application, lang = _ref71.lang;
  20086. return constants_default.helpUrlBase + brand + '/' + (version || axe.version.substring(0, axe.version.lastIndexOf('.'))) + '/' + ruleId + '?application=' + encodeURIComponent(application) + (lang && lang !== 'en' ? '&lang=' + encodeURIComponent(lang) : '');
  20087. }
  20088. var audit_default = Audit;
  20089. function pushUniqueFrame(collection, frame) {
  20090. if (is_hidden_default(frame)) {
  20091. return;
  20092. }
  20093. var fr = find_by_default(collection, 'node', frame);
  20094. if (!fr) {
  20095. collection.push({
  20096. node: frame,
  20097. include: [],
  20098. exclude: []
  20099. });
  20100. }
  20101. }
  20102. function pushUniqueFrameSelector(context3, type, selectorArray) {
  20103. context3.frames = context3.frames || [];
  20104. var result, frame;
  20105. var frames = document.querySelectorAll(selectorArray.shift());
  20106. frameloop: for (var i = 0, l = frames.length; i < l; i++) {
  20107. frame = frames[i];
  20108. for (var j = 0, l2 = context3.frames.length; j < l2; j++) {
  20109. if (context3.frames[j].node === frame) {
  20110. context3.frames[j][type].push(selectorArray);
  20111. break frameloop;
  20112. }
  20113. }
  20114. result = {
  20115. node: frame,
  20116. include: [],
  20117. exclude: []
  20118. };
  20119. if (selectorArray) {
  20120. result[type].push(selectorArray);
  20121. }
  20122. context3.frames.push(result);
  20123. }
  20124. }
  20125. function normalizeContext(context3) {
  20126. if (context3 && _typeof(context3) === 'object' || context3 instanceof window.NodeList) {
  20127. if (context3 instanceof window.Node) {
  20128. return {
  20129. include: [ context3 ],
  20130. exclude: []
  20131. };
  20132. }
  20133. if (context3.hasOwnProperty('include') || context3.hasOwnProperty('exclude')) {
  20134. return {
  20135. include: context3.include && +context3.include.length ? context3.include : [ document ],
  20136. exclude: context3.exclude || []
  20137. };
  20138. }
  20139. if (context3.length === +context3.length) {
  20140. return {
  20141. include: context3,
  20142. exclude: []
  20143. };
  20144. }
  20145. }
  20146. if (typeof context3 === 'string') {
  20147. return {
  20148. include: [ context3 ],
  20149. exclude: []
  20150. };
  20151. }
  20152. return {
  20153. include: [ document ],
  20154. exclude: []
  20155. };
  20156. }
  20157. function parseSelectorArray(context3, type) {
  20158. var item, result = [], nodeList;
  20159. for (var i = 0, l = context3[type].length; i < l; i++) {
  20160. item = context3[type][i];
  20161. if (typeof item === 'string') {
  20162. nodeList = Array.from(document.querySelectorAll(item));
  20163. result = result.concat(nodeList.map(function(node) {
  20164. return get_node_from_tree_default(node);
  20165. }));
  20166. break;
  20167. } else if (item && item.length && !(item instanceof window.Node)) {
  20168. if (item.length > 1) {
  20169. pushUniqueFrameSelector(context3, type, item);
  20170. } else {
  20171. nodeList = Array.from(document.querySelectorAll(item[0]));
  20172. result = result.concat(nodeList.map(function(node) {
  20173. return get_node_from_tree_default(node);
  20174. }));
  20175. }
  20176. } else if (item instanceof window.Node) {
  20177. if (item.documentElement instanceof window.Node) {
  20178. result.push(context3.flatTree[0]);
  20179. } else {
  20180. result.push(get_node_from_tree_default(item));
  20181. }
  20182. }
  20183. }
  20184. return result.filter(function(r) {
  20185. return r;
  20186. });
  20187. }
  20188. function validateContext(context3) {
  20189. if (context3.include.length === 0) {
  20190. if (context3.frames.length === 0) {
  20191. var env = _respondable.isInFrame() ? 'frame' : 'page';
  20192. return new Error('No elements found for include in ' + env + ' Context');
  20193. }
  20194. context3.frames.forEach(function(frame, i) {
  20195. if (frame.include.length === 0) {
  20196. return new Error('No elements found for include in Context of frame ' + i);
  20197. }
  20198. });
  20199. }
  20200. }
  20201. function getRootNode2(_ref72) {
  20202. var include = _ref72.include, exclude = _ref72.exclude;
  20203. var selectors = Array.from(include).concat(Array.from(exclude));
  20204. for (var i = 0; i < selectors.length; ++i) {
  20205. var item = selectors[i];
  20206. if (item instanceof window.Element) {
  20207. return item.ownerDocument.documentElement;
  20208. }
  20209. if (item instanceof window.Document) {
  20210. return item.documentElement;
  20211. }
  20212. }
  20213. return document.documentElement;
  20214. }
  20215. function Context(spec) {
  20216. var _this8 = this;
  20217. this.frames = [];
  20218. this.initiator = spec && typeof spec.initiator === 'boolean' ? spec.initiator : true;
  20219. this.focusable = spec && typeof spec.focusable === 'boolean' ? spec.focusable : true;
  20220. this.boundingClientRect = spec && _typeof(spec.boundingClientRect) === 'object' ? spec.boundingClientRect : {};
  20221. this.page = false;
  20222. spec = normalizeContext(spec);
  20223. this.flatTree = get_flattened_tree_default(getRootNode2(spec));
  20224. this.exclude = spec.exclude;
  20225. this.include = spec.include;
  20226. this.include = parseSelectorArray(this, 'include');
  20227. this.exclude = parseSelectorArray(this, 'exclude');
  20228. select_default('frame, iframe', this).forEach(function(frame) {
  20229. if (is_node_in_context_default(frame, _this8)) {
  20230. pushUniqueFrame(_this8.frames, frame.actualNode);
  20231. }
  20232. });
  20233. if (this.include.length === 1 && this.include[0].actualNode === document.documentElement) {
  20234. this.page = true;
  20235. }
  20236. var err2 = validateContext(this);
  20237. if (err2 instanceof Error) {
  20238. throw err2;
  20239. }
  20240. if (!Array.isArray(this.include)) {
  20241. this.include = Array.from(this.include);
  20242. }
  20243. this.include.sort(node_sorter_default);
  20244. }
  20245. var context_default = Context;
  20246. var imports_exports = {};
  20247. __export(imports_exports, {
  20248. CssSelectorParser: function CssSelectorParser() {
  20249. return css_selector_parser2.CssSelectorParser;
  20250. },
  20251. doT: function doT() {
  20252. return dot2['default'];
  20253. },
  20254. emojiRegexText: function emojiRegexText() {
  20255. return emoji_regex3['default'];
  20256. },
  20257. memoize: function memoize() {
  20258. return memoizee2['default'];
  20259. }
  20260. });
  20261. var css_selector_parser2 = __toModule(require_lib());
  20262. var dot2 = __toModule(require_doT());
  20263. var emoji_regex3 = __toModule(require_emoji_regex());
  20264. var memoizee2 = __toModule(require_memoizee());
  20265. var es6_promise = __toModule(require_es6_promise());
  20266. var typedarray = __toModule(require_typedarray());
  20267. var weakmap_polyfill = __toModule(require_weakmap_polyfill());
  20268. if (!('Promise' in window)) {
  20269. es6_promise['default'].polyfill();
  20270. }
  20271. if (!('Uint32Array' in window)) {
  20272. window.Uint32Array = typedarray.Uint32Array;
  20273. }
  20274. if (window.Uint32Array) {
  20275. if (!('some' in window.Uint32Array.prototype)) {
  20276. Object.defineProperty(window.Uint32Array.prototype, 'some', {
  20277. value: Array.prototype.some
  20278. });
  20279. }
  20280. if (!('reduce' in window.Uint32Array.prototype)) {
  20281. Object.defineProperty(window.Uint32Array.prototype, 'reduce', {
  20282. value: Array.prototype.reduce
  20283. });
  20284. }
  20285. }
  20286. function cleanup(resolve, reject) {
  20287. resolve = resolve || function res() {};
  20288. reject = reject || axe.log;
  20289. if (!axe._audit) {
  20290. throw new Error('No audit configured');
  20291. }
  20292. var q = axe.utils.queue();
  20293. var cleanupErrors = [];
  20294. Object.keys(axe.plugins).forEach(function(key) {
  20295. q.defer(function(res) {
  20296. var rej = function rej2(err2) {
  20297. cleanupErrors.push(err2);
  20298. res();
  20299. };
  20300. try {
  20301. axe.plugins[key].cleanup(res, rej);
  20302. } catch (err2) {
  20303. rej(err2);
  20304. }
  20305. });
  20306. });
  20307. var flattenedTree = axe.utils.getFlattenedTree(document.body);
  20308. axe.utils.querySelectorAll(flattenedTree, 'iframe, frame').forEach(function(node) {
  20309. q.defer(function(res, rej) {
  20310. return axe.utils.sendCommandToFrame(node.actualNode, {
  20311. command: 'cleanup-plugin'
  20312. }, res, rej);
  20313. });
  20314. });
  20315. q.then(function(results) {
  20316. if (cleanupErrors.length === 0) {
  20317. resolve(results);
  20318. } else {
  20319. reject(cleanupErrors);
  20320. }
  20321. })['catch'](reject);
  20322. }
  20323. var cleanup_default = cleanup;
  20324. var reporters = {};
  20325. var defaultReporter;
  20326. function hasReporter(reporterName) {
  20327. return reporters.hasOwnProperty(reporterName);
  20328. }
  20329. function getReporter(reporter4) {
  20330. if (typeof reporter4 === 'string' && reporters[reporter4]) {
  20331. return reporters[reporter4];
  20332. }
  20333. if (typeof reporter4 === 'function') {
  20334. return reporter4;
  20335. }
  20336. return defaultReporter;
  20337. }
  20338. function addReporter(name, cb, isDefault) {
  20339. reporters[name] = cb;
  20340. if (isDefault) {
  20341. defaultReporter = cb;
  20342. }
  20343. }
  20344. function configure3(spec) {
  20345. var audit3;
  20346. audit3 = axe._audit;
  20347. if (!audit3) {
  20348. throw new Error('No audit configured');
  20349. }
  20350. if (spec.axeVersion || spec.ver) {
  20351. var specVersion = spec.axeVersion || spec.ver;
  20352. if (!/^\d+\.\d+\.\d+(-canary)?/.test(specVersion)) {
  20353. throw new Error('Invalid configured version '.concat(specVersion));
  20354. }
  20355. var _specVersion$split = specVersion.split('-'), _specVersion$split2 = _slicedToArray(_specVersion$split, 2), version = _specVersion$split2[0], canary = _specVersion$split2[1];
  20356. 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];
  20357. 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];
  20358. 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];
  20359. if (major !== axeMajor || axeMinor < minor || axeMinor === minor && axePatch < patch || major === axeMajor && minor === axeMinor && patch === axePatch && canary && canary !== axeCanary) {
  20360. throw new Error('Configured version '.concat(specVersion, ' is not compatible with current axe version ').concat(axe.version));
  20361. }
  20362. }
  20363. if (spec.reporter && (typeof spec.reporter === 'function' || hasReporter(spec.reporter))) {
  20364. audit3.reporter = spec.reporter;
  20365. }
  20366. if (spec.checks) {
  20367. if (!Array.isArray(spec.checks)) {
  20368. throw new TypeError('Checks property must be an array');
  20369. }
  20370. spec.checks.forEach(function(check4) {
  20371. if (!check4.id) {
  20372. throw new TypeError('Configured check '.concat(JSON.stringify(check4), ' is invalid. Checks must be an object with at least an id property'));
  20373. }
  20374. audit3.addCheck(check4);
  20375. });
  20376. }
  20377. var modifiedRules = [];
  20378. if (spec.rules) {
  20379. if (!Array.isArray(spec.rules)) {
  20380. throw new TypeError('Rules property must be an array');
  20381. }
  20382. spec.rules.forEach(function(rule3) {
  20383. if (!rule3.id) {
  20384. throw new TypeError('Configured rule '.concat(JSON.stringify(rule3), ' is invalid. Rules must be an object with at least an id property'));
  20385. }
  20386. modifiedRules.push(rule3.id);
  20387. audit3.addRule(rule3);
  20388. });
  20389. }
  20390. if (spec.disableOtherRules) {
  20391. audit3.rules.forEach(function(rule3) {
  20392. if (modifiedRules.includes(rule3.id) === false) {
  20393. rule3.enabled = false;
  20394. }
  20395. });
  20396. }
  20397. if (typeof spec.branding !== 'undefined') {
  20398. audit3.setBranding(spec.branding);
  20399. } else {
  20400. audit3._constructHelpUrls();
  20401. }
  20402. if (spec.tagExclude) {
  20403. audit3.tagExclude = spec.tagExclude;
  20404. }
  20405. if (spec.locale) {
  20406. audit3.applyLocale(spec.locale);
  20407. }
  20408. if (spec.standards) {
  20409. configureStandards(spec.standards);
  20410. }
  20411. if (spec.noHtml) {
  20412. audit3.noHtml = true;
  20413. }
  20414. if (spec.allowedOrigins) {
  20415. if (!Array.isArray(spec.allowedOrigins)) {
  20416. throw new TypeError('Allowed origins property must be an array');
  20417. }
  20418. if (spec.allowedOrigins.includes('*')) {
  20419. throw new Error('"*" is not allowed. Use "'.concat(constants_default.allOrigins, '" instead'));
  20420. }
  20421. audit3.setAllowedOrigins(spec.allowedOrigins);
  20422. }
  20423. }
  20424. var configure_default = configure3;
  20425. function frameMessenger2(frameHandler) {
  20426. _respondable.updateMessenger(frameHandler);
  20427. }
  20428. function getRules(tags) {
  20429. tags = tags || [];
  20430. var matchingRules = !tags.length ? axe._audit.rules : axe._audit.rules.filter(function(item) {
  20431. return !!tags.filter(function(tag) {
  20432. return item.tags.indexOf(tag) !== -1;
  20433. }).length;
  20434. });
  20435. var ruleData = axe._audit.data.rules || {};
  20436. return matchingRules.map(function(matchingRule) {
  20437. var rd = ruleData[matchingRule.id] || {};
  20438. return {
  20439. ruleId: matchingRule.id,
  20440. description: rd.description,
  20441. help: rd.help,
  20442. helpUrl: rd.helpUrl,
  20443. tags: matchingRule.tags
  20444. };
  20445. });
  20446. }
  20447. var get_rules_default = getRules;
  20448. function teardown() {
  20449. if (cache_default.get('globalDocumentSet')) {
  20450. document = null;
  20451. }
  20452. if (cache_default.get('globalWindowSet')) {
  20453. window = null;
  20454. }
  20455. axe._memoizedFns.forEach(function(fn) {
  20456. return fn.clear();
  20457. });
  20458. cache_default.clear();
  20459. axe._tree = void 0;
  20460. axe._selectorData = void 0;
  20461. axe._selectCache = void 0;
  20462. }
  20463. var teardown_default = teardown;
  20464. function runRules(context3, options, resolve, reject) {
  20465. try {
  20466. context3 = new context_default(context3);
  20467. axe._tree = context3.flatTree;
  20468. axe._selectorData = _getSelectorData(context3.flatTree);
  20469. } catch (e) {
  20470. teardown_default();
  20471. return reject(e);
  20472. }
  20473. var q = queue_default();
  20474. var audit3 = axe._audit;
  20475. if (options.performanceTimer) {
  20476. performance_timer_default.auditStart();
  20477. }
  20478. if (context3.frames.length && options.iframes !== false) {
  20479. q.defer(function(res, rej) {
  20480. collect_results_from_frames_default(context3, options, 'rules', null, res, rej);
  20481. });
  20482. }
  20483. q.defer(function(res, rej) {
  20484. audit3.run(context3, options, res, rej);
  20485. });
  20486. q.then(function(data2) {
  20487. try {
  20488. if (options.performanceTimer) {
  20489. performance_timer_default.auditEnd();
  20490. }
  20491. var results = merge_results_default(data2.map(function(results2) {
  20492. return {
  20493. results: results2
  20494. };
  20495. }));
  20496. if (context3.initiator) {
  20497. results = audit3.after(results, options);
  20498. results.forEach(publish_metadata_default);
  20499. results = results.map(finalize_result_default);
  20500. }
  20501. try {
  20502. resolve(results, teardown_default);
  20503. } catch (e) {
  20504. teardown_default();
  20505. log_default(e);
  20506. }
  20507. } catch (e) {
  20508. teardown_default();
  20509. reject(e);
  20510. }
  20511. })['catch'](function(e) {
  20512. teardown_default();
  20513. reject(e);
  20514. });
  20515. }
  20516. var run_rules_default = runRules;
  20517. function runCommand(data2, keepalive, callback) {
  20518. var resolve = callback;
  20519. var reject = function reject2(err2) {
  20520. if (err2 instanceof Error === false) {
  20521. err2 = new Error(err2);
  20522. }
  20523. callback(err2);
  20524. };
  20525. var context3 = data2 && data2.context || {};
  20526. if (context3.hasOwnProperty('include') && !context3.include.length) {
  20527. context3.include = [ document ];
  20528. }
  20529. var options = data2 && data2.options || {};
  20530. switch (data2.command) {
  20531. case 'rules':
  20532. return run_rules_default(context3, options, function(results, cleanup5) {
  20533. resolve(results);
  20534. cleanup5();
  20535. }, reject);
  20536. case 'cleanup-plugin':
  20537. return cleanup_default(resolve, reject);
  20538. default:
  20539. if (axe._audit && axe._audit.commands && axe._audit.commands[data2.command]) {
  20540. return axe._audit.commands[data2.command](data2, callback);
  20541. }
  20542. }
  20543. }
  20544. if (window.top !== window) {
  20545. _respondable.subscribe('axe.start', runCommand);
  20546. _respondable.subscribe('axe.ping', function(data2, keepalive, respond) {
  20547. respond({
  20548. axe: true
  20549. });
  20550. });
  20551. }
  20552. function load(audit3) {
  20553. axe._audit = new audit_default(audit3);
  20554. }
  20555. var load_default = load;
  20556. function Plugin(spec) {
  20557. this._run = spec.run;
  20558. this._collect = spec.collect;
  20559. this._registry = {};
  20560. spec.commands.forEach(function(command) {
  20561. axe._audit.registerCommand(command);
  20562. });
  20563. }
  20564. Plugin.prototype.run = function run3() {
  20565. return this._run.apply(this, arguments);
  20566. };
  20567. Plugin.prototype.collect = function collect() {
  20568. return this._collect.apply(this, arguments);
  20569. };
  20570. Plugin.prototype.cleanup = function cleanup3(done) {
  20571. var q = axe.utils.queue();
  20572. var that = this;
  20573. Object.keys(this._registry).forEach(function(key) {
  20574. q.defer(function(_done) {
  20575. that._registry[key].cleanup(_done);
  20576. });
  20577. });
  20578. q.then(done);
  20579. };
  20580. Plugin.prototype.add = function add(impl) {
  20581. this._registry[impl.id] = impl;
  20582. };
  20583. function registerPlugin(plugin) {
  20584. axe.plugins[plugin.id] = new Plugin(plugin);
  20585. }
  20586. var plugins_default = registerPlugin;
  20587. function reset() {
  20588. var audit3 = axe._audit;
  20589. if (!audit3) {
  20590. throw new Error('No audit configured');
  20591. }
  20592. audit3.resetRulesAndChecks();
  20593. resetStandards();
  20594. }
  20595. var reset_default = reset;
  20596. function runVirtualRule(ruleId, vNode) {
  20597. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  20598. options.reporter = options.reporter || axe._audit.reporter || 'v1';
  20599. axe._selectorData = {};
  20600. if (!(vNode instanceof abstract_virtual_node_default)) {
  20601. vNode = new serial_virtual_node_default(vNode);
  20602. }
  20603. var rule3 = get_rule_default(ruleId);
  20604. if (!rule3) {
  20605. throw new Error('unknown rule `' + ruleId + '`');
  20606. }
  20607. rule3 = Object.create(rule3, {
  20608. excludeHidden: {
  20609. value: false
  20610. }
  20611. });
  20612. var context3 = {
  20613. initiator: true,
  20614. include: [ vNode ]
  20615. };
  20616. var rawResults = rule3.runSync(context3, options);
  20617. publish_metadata_default(rawResults);
  20618. finalize_result_default(rawResults);
  20619. var results = aggregate_result_default([ rawResults ]);
  20620. results.violations.forEach(function(result) {
  20621. return result.nodes.forEach(function(nodeResult) {
  20622. nodeResult.failureSummary = failure_summary_default(nodeResult);
  20623. });
  20624. });
  20625. return _extends({}, get_environment_data_default(), results, {
  20626. toolOptions: options
  20627. });
  20628. }
  20629. var run_virtual_rule_default = runVirtualRule;
  20630. function isContext(potential) {
  20631. switch (true) {
  20632. case typeof potential === 'string':
  20633. case Array.isArray(potential):
  20634. case window.Node && potential instanceof window.Node:
  20635. case window.NodeList && potential instanceof window.NodeList:
  20636. return true;
  20637. case _typeof(potential) !== 'object':
  20638. return false;
  20639. case potential.include !== void 0:
  20640. case potential.exclude !== void 0:
  20641. case typeof potential.length === 'number':
  20642. return true;
  20643. default:
  20644. return false;
  20645. }
  20646. }
  20647. var noop2 = function noop3() {};
  20648. function normalizeRunParams(context3, options, callback) {
  20649. var typeErr = new TypeError('axe.run arguments are invalid');
  20650. if (!isContext(context3)) {
  20651. if (callback !== void 0) {
  20652. throw typeErr;
  20653. }
  20654. callback = options;
  20655. options = context3;
  20656. context3 = document;
  20657. }
  20658. if (_typeof(options) !== 'object') {
  20659. if (callback !== void 0) {
  20660. throw typeErr;
  20661. }
  20662. callback = options;
  20663. options = {};
  20664. }
  20665. if (typeof callback !== 'function' && callback !== void 0) {
  20666. throw typeErr;
  20667. }
  20668. return {
  20669. context: context3,
  20670. options: options,
  20671. callback: callback || noop2
  20672. };
  20673. }
  20674. function run4(context3, options, callback) {
  20675. if (!axe._audit) {
  20676. throw new Error('No audit configured');
  20677. }
  20678. var hasWindow = window && 'Node' in window && 'NodeList' in window;
  20679. var hasDoc = !!document;
  20680. if (!hasWindow || !hasDoc) {
  20681. if (!context3 || !context3.ownerDocument) {
  20682. throw new Error('Required "window" or "document" globals not defined and cannot be deduced from the context. Either set the globals before running or pass in a valid Element.');
  20683. }
  20684. if (!hasDoc) {
  20685. cache_default.set('globalDocumentSet', true);
  20686. document = context3.ownerDocument;
  20687. }
  20688. if (!hasWindow) {
  20689. cache_default.set('globalWindowSet', true);
  20690. window = document.defaultView;
  20691. }
  20692. }
  20693. var args = normalizeRunParams(context3, options, callback);
  20694. context3 = args.context;
  20695. options = args.options;
  20696. callback = args.callback;
  20697. options.reporter = options.reporter || axe._audit.reporter || 'v1';
  20698. if (options.performanceTimer) {
  20699. axe.utils.performanceTimer.start();
  20700. }
  20701. var p;
  20702. var reject = noop2;
  20703. var resolve = noop2;
  20704. if (typeof Promise === 'function' && callback === noop2) {
  20705. p = new Promise(function(_resolve, _reject) {
  20706. reject = _reject;
  20707. resolve = _resolve;
  20708. });
  20709. }
  20710. if (axe._running) {
  20711. var err2 = 'Axe is already running. Use `await axe.run()` to wait for the previous run to finish before starting a new run.';
  20712. callback(err2);
  20713. reject(err2);
  20714. return p;
  20715. }
  20716. axe._running = true;
  20717. axe._runRules(context3, options, function(rawResults, cleanup5) {
  20718. var respond = function respond(results) {
  20719. axe._running = false;
  20720. cleanup5();
  20721. try {
  20722. callback(null, results);
  20723. } catch (e) {
  20724. axe.log(e);
  20725. }
  20726. resolve(results);
  20727. };
  20728. if (options.performanceTimer) {
  20729. axe.utils.performanceTimer.end();
  20730. }
  20731. try {
  20732. var reporter4 = getReporter(options.reporter);
  20733. var results = reporter4(rawResults, options, respond);
  20734. if (results !== void 0) {
  20735. respond(results);
  20736. }
  20737. } catch (err2) {
  20738. axe._running = false;
  20739. cleanup5();
  20740. callback(err2);
  20741. reject(err2);
  20742. }
  20743. }, function(err2) {
  20744. axe._running = false;
  20745. callback(err2);
  20746. reject(err2);
  20747. });
  20748. return p;
  20749. }
  20750. var run_default = run4;
  20751. function setup(node) {
  20752. if (axe._tree) {
  20753. throw new Error('Axe is already setup. Call `axe.teardown()` before calling `axe.setup` again.');
  20754. }
  20755. axe._tree = get_flattened_tree_default(node);
  20756. axe._selectorData = _getSelectorData(axe._tree);
  20757. return axe._tree[0];
  20758. }
  20759. var setup_default = setup;
  20760. var naReporter = function naReporter(results, options, callback) {
  20761. console.warn('"na" reporter will be deprecated in axe v4.0. Use the "v2" reporter instead.');
  20762. if (typeof options === 'function') {
  20763. callback = options;
  20764. options = {};
  20765. }
  20766. var out = process_aggregate_default(results, options);
  20767. callback(_extends({}, get_environment_data_default(), {
  20768. toolOptions: options,
  20769. violations: out.violations,
  20770. passes: out.passes,
  20771. incomplete: out.incomplete,
  20772. inapplicable: out.inapplicable
  20773. }));
  20774. };
  20775. var na_default = naReporter;
  20776. var noPassesReporter = function noPassesReporter(results, options, callback) {
  20777. if (typeof options === 'function') {
  20778. callback = options;
  20779. options = {};
  20780. }
  20781. options.resultTypes = [ 'violations' ];
  20782. var out = process_aggregate_default(results, options);
  20783. callback(_extends({}, get_environment_data_default(), {
  20784. toolOptions: options,
  20785. violations: out.violations
  20786. }));
  20787. };
  20788. var no_passes_default = noPassesReporter;
  20789. var rawReporter = function rawReporter(results, options, callback) {
  20790. if (typeof options === 'function') {
  20791. callback = options;
  20792. options = {};
  20793. }
  20794. if (!results || !Array.isArray(results)) {
  20795. return callback(results);
  20796. }
  20797. var transformedResults = results.map(function(result) {
  20798. var transformedResult = _extends({}, result);
  20799. var types = [ 'passes', 'violations', 'incomplete', 'inapplicable' ];
  20800. for (var _i28 = 0, _types = types; _i28 < _types.length; _i28++) {
  20801. var type = _types[_i28];
  20802. if (transformedResult[type] && Array.isArray(transformedResult[type])) {
  20803. transformedResult[type] = transformedResult[type].map(function(typeResult) {
  20804. return _extends({}, typeResult, {
  20805. node: typeResult.node.toJSON()
  20806. });
  20807. });
  20808. }
  20809. }
  20810. return transformedResult;
  20811. });
  20812. callback(transformedResults);
  20813. };
  20814. var raw_default = rawReporter;
  20815. var rawEnvReporter = function rawEnvReporter(results, options, callback) {
  20816. if (typeof options === 'function') {
  20817. callback = options;
  20818. options = {};
  20819. }
  20820. function rawCallback(raw3) {
  20821. var env = get_environment_data_default();
  20822. callback({
  20823. raw: raw3,
  20824. env: env
  20825. });
  20826. }
  20827. raw_default(results, options, rawCallback);
  20828. };
  20829. var raw_env_default = rawEnvReporter;
  20830. var v1Reporter = function v1Reporter(results, options, callback) {
  20831. if (typeof options === 'function') {
  20832. callback = options;
  20833. options = {};
  20834. }
  20835. var out = process_aggregate_default(results, options);
  20836. var addFailureSummaries = function addFailureSummaries(result) {
  20837. result.nodes.forEach(function(nodeResult) {
  20838. nodeResult.failureSummary = failure_summary_default(nodeResult);
  20839. });
  20840. };
  20841. out.incomplete.forEach(addFailureSummaries);
  20842. out.violations.forEach(addFailureSummaries);
  20843. callback(_extends({}, get_environment_data_default(), {
  20844. toolOptions: options,
  20845. violations: out.violations,
  20846. passes: out.passes,
  20847. incomplete: out.incomplete,
  20848. inapplicable: out.inapplicable
  20849. }));
  20850. };
  20851. var v1_default = v1Reporter;
  20852. var v2Reporter = function v2Reporter(results, options, callback) {
  20853. if (typeof options === 'function') {
  20854. callback = options;
  20855. options = {};
  20856. }
  20857. var out = process_aggregate_default(results, options);
  20858. callback(_extends({}, get_environment_data_default(), {
  20859. toolOptions: options,
  20860. violations: out.violations,
  20861. passes: out.passes,
  20862. incomplete: out.incomplete,
  20863. inapplicable: out.inapplicable
  20864. }));
  20865. };
  20866. var v2_default = v2Reporter;
  20867. axe.constants = constants_default;
  20868. axe.log = log_default;
  20869. axe.AbstractVirtualNode = abstract_virtual_node_default;
  20870. axe.SerialVirtualNode = serial_virtual_node_default;
  20871. axe.VirtualNode = virtual_node_default;
  20872. axe._cache = cache_default;
  20873. axe._thisWillBeDeletedDoNotUse = axe._thisWillBeDeletedDoNotUse || {};
  20874. axe._thisWillBeDeletedDoNotUse.base = {
  20875. Audit: audit_default,
  20876. CheckResult: check_result_default,
  20877. Check: check_default,
  20878. Context: context_default,
  20879. RuleResult: rule_result_default,
  20880. Rule: rule_default,
  20881. metadataFunctionMap: metadata_function_map_default
  20882. };
  20883. axe.imports = imports_exports;
  20884. axe.cleanup = cleanup_default;
  20885. axe.configure = configure_default;
  20886. axe.frameMessenger = frameMessenger2;
  20887. axe.getRules = get_rules_default;
  20888. axe._load = load_default;
  20889. axe.plugins = {};
  20890. axe.registerPlugin = plugins_default;
  20891. axe.hasReporter = hasReporter;
  20892. axe.getReporter = getReporter;
  20893. axe.addReporter = addReporter;
  20894. axe.reset = reset_default;
  20895. axe._runRules = run_rules_default;
  20896. axe.runVirtualRule = run_virtual_rule_default;
  20897. axe.run = run_default;
  20898. axe.setup = setup_default;
  20899. axe.teardown = teardown_default;
  20900. axe.commons = commons_exports;
  20901. axe.utils = utils_exports;
  20902. axe.addReporter('na', na_default);
  20903. axe.addReporter('no-passes', no_passes_default);
  20904. axe.addReporter('rawEnv', raw_env_default);
  20905. axe.addReporter('raw', raw_default);
  20906. axe.addReporter('v1', v1_default);
  20907. axe.addReporter('v2', v2_default, true);
  20908. })();
  20909. 'use strict';
  20910. axe._load({
  20911. lang: 'en',
  20912. data: {
  20913. rules: {
  20914. accesskeys: {
  20915. description: 'Ensures every accesskey attribute value is unique',
  20916. help: 'accesskey attribute value should be unique'
  20917. },
  20918. 'area-alt': {
  20919. description: 'Ensures <area> elements of image maps have alternate text',
  20920. help: 'Active <area> elements must have alternate text'
  20921. },
  20922. 'aria-allowed-attr': {
  20923. description: 'Ensures ARIA attributes are allowed for an element\'s role',
  20924. help: 'Elements must only use allowed ARIA attributes'
  20925. },
  20926. 'aria-allowed-role': {
  20927. description: 'Ensures role attribute has an appropriate value for the element',
  20928. help: 'ARIA role should be appropriate for the element'
  20929. },
  20930. 'aria-command-name': {
  20931. description: 'Ensures every ARIA button, link and menuitem has an accessible name',
  20932. help: 'ARIA commands must have an accessible name'
  20933. },
  20934. 'aria-dialog-name': {
  20935. description: 'Ensures every ARIA dialog and alertdialog node has an accessible name',
  20936. help: 'ARIA dialog and alertdialog nodes should have an accessible name'
  20937. },
  20938. 'aria-hidden-body': {
  20939. description: 'Ensures aria-hidden=\'true\' is not present on the document body.',
  20940. help: 'aria-hidden=\'true\' must not be present on the document body'
  20941. },
  20942. 'aria-hidden-focus': {
  20943. description: 'Ensures aria-hidden elements do not contain focusable elements',
  20944. help: 'ARIA hidden element must not contain focusable elements'
  20945. },
  20946. 'aria-input-field-name': {
  20947. description: 'Ensures every ARIA input field has an accessible name',
  20948. help: 'ARIA input fields must have an accessible name'
  20949. },
  20950. 'aria-meter-name': {
  20951. description: 'Ensures every ARIA meter node has an accessible name',
  20952. help: 'ARIA meter nodes must have an accessible name'
  20953. },
  20954. 'aria-progressbar-name': {
  20955. description: 'Ensures every ARIA progressbar node has an accessible name',
  20956. help: 'ARIA progressbar nodes must have an accessible name'
  20957. },
  20958. 'aria-required-attr': {
  20959. description: 'Ensures elements with ARIA roles have all required ARIA attributes',
  20960. help: 'Required ARIA attributes must be provided'
  20961. },
  20962. 'aria-required-children': {
  20963. description: 'Ensures elements with an ARIA role that require child roles contain them',
  20964. help: 'Certain ARIA roles must contain particular children'
  20965. },
  20966. 'aria-required-parent': {
  20967. description: 'Ensures elements with an ARIA role that require parent roles are contained by them',
  20968. help: 'Certain ARIA roles must be contained by particular parents'
  20969. },
  20970. 'aria-roledescription': {
  20971. description: 'Ensure aria-roledescription is only used on elements with an implicit or explicit role',
  20972. help: 'Use aria-roledescription on elements with a semantic role'
  20973. },
  20974. 'aria-roles': {
  20975. description: 'Ensures all elements with a role attribute use a valid value',
  20976. help: 'ARIA roles used must conform to valid values'
  20977. },
  20978. 'aria-text': {
  20979. description: 'Ensures "role=text" is used on elements with no focusable descendants',
  20980. help: '"role=text" should have no focusable descendants'
  20981. },
  20982. 'aria-toggle-field-name': {
  20983. description: 'Ensures every ARIA toggle field has an accessible name',
  20984. help: 'ARIA toggle fields have an accessible name'
  20985. },
  20986. 'aria-tooltip-name': {
  20987. description: 'Ensures every ARIA tooltip node has an accessible name',
  20988. help: 'ARIA tooltip nodes must have an accessible name'
  20989. },
  20990. 'aria-treeitem-name': {
  20991. description: 'Ensures every ARIA treeitem node has an accessible name',
  20992. help: 'ARIA treeitem nodes should have an accessible name'
  20993. },
  20994. 'aria-valid-attr-value': {
  20995. description: 'Ensures all ARIA attributes have valid values',
  20996. help: 'ARIA attributes must conform to valid values'
  20997. },
  20998. 'aria-valid-attr': {
  20999. description: 'Ensures attributes that begin with aria- are valid ARIA attributes',
  21000. help: 'ARIA attributes must conform to valid names'
  21001. },
  21002. 'audio-caption': {
  21003. description: 'Ensures <audio> elements have captions',
  21004. help: '<audio> elements must have a captions track'
  21005. },
  21006. 'autocomplete-valid': {
  21007. description: 'Ensure the autocomplete attribute is correct and suitable for the form field',
  21008. help: 'autocomplete attribute must be used correctly'
  21009. },
  21010. 'avoid-inline-spacing': {
  21011. description: 'Ensure that text spacing set through style attributes can be adjusted with custom stylesheets',
  21012. help: 'Inline text spacing must be adjustable with custom stylesheets'
  21013. },
  21014. blink: {
  21015. description: 'Ensures <blink> elements are not used',
  21016. help: '<blink> elements are deprecated and must not be used'
  21017. },
  21018. 'button-name': {
  21019. description: 'Ensures buttons have discernible text',
  21020. help: 'Buttons must have discernible text'
  21021. },
  21022. bypass: {
  21023. description: 'Ensures each page has at least one mechanism for a user to bypass navigation and jump straight to the content',
  21024. help: 'Page must have means to bypass repeated blocks'
  21025. },
  21026. 'color-contrast': {
  21027. description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds',
  21028. help: 'Elements must have sufficient color contrast'
  21029. },
  21030. 'css-orientation-lock': {
  21031. description: 'Ensures content is not locked to any specific display orientation, and the content is operable in all display orientations',
  21032. help: 'CSS Media queries are not used to lock display orientation'
  21033. },
  21034. 'definition-list': {
  21035. description: 'Ensures <dl> elements are structured correctly',
  21036. help: '<dl> elements must only directly contain properly-ordered <dt> and <dd> groups, <script>, <template> or <div> elements'
  21037. },
  21038. dlitem: {
  21039. description: 'Ensures <dt> and <dd> elements are contained by a <dl>',
  21040. help: '<dt> and <dd> elements must be contained by a <dl>'
  21041. },
  21042. 'document-title': {
  21043. description: 'Ensures each HTML document contains a non-empty <title> element',
  21044. help: 'Documents must have <title> element to aid in navigation'
  21045. },
  21046. 'duplicate-id-active': {
  21047. description: 'Ensures every id attribute value of active elements is unique',
  21048. help: 'IDs of active elements must be unique'
  21049. },
  21050. 'duplicate-id-aria': {
  21051. description: 'Ensures every id attribute value used in ARIA and in labels is unique',
  21052. help: 'IDs used in ARIA and labels must be unique'
  21053. },
  21054. 'duplicate-id': {
  21055. description: 'Ensures every id attribute value is unique',
  21056. help: 'id attribute value must be unique'
  21057. },
  21058. 'empty-heading': {
  21059. description: 'Ensures headings have discernible text',
  21060. help: 'Headings should not be empty'
  21061. },
  21062. 'empty-table-header': {
  21063. description: 'Ensures table headers have discernible text',
  21064. help: 'Table header text must not be empty'
  21065. },
  21066. 'focus-order-semantics': {
  21067. description: 'Ensures elements in the focus order have an appropriate role',
  21068. help: 'Elements in the focus order need a role appropriate for interactive content'
  21069. },
  21070. 'form-field-multiple-labels': {
  21071. description: 'Ensures form field does not have multiple label elements',
  21072. help: 'Form field must not have multiple label elements'
  21073. },
  21074. 'frame-focusable-content': {
  21075. description: 'Ensures <frame> and <iframe> elements with focusable content do not have tabindex=-1',
  21076. help: 'Frames with focusable content must not have tabindex=-1'
  21077. },
  21078. 'frame-tested': {
  21079. description: 'Ensures <iframe> and <frame> elements contain the axe-core script',
  21080. help: 'Frames should be tested with axe-core'
  21081. },
  21082. 'frame-title-unique': {
  21083. description: 'Ensures <iframe> and <frame> elements contain a unique title attribute',
  21084. help: 'Frames should have a unique title attribute'
  21085. },
  21086. 'frame-title': {
  21087. description: 'Ensures <iframe> and <frame> elements have an accessible name',
  21088. help: 'Frames must have an accessible name'
  21089. },
  21090. 'heading-order': {
  21091. description: 'Ensures the order of headings is semantically correct',
  21092. help: 'Heading levels should only increase by one'
  21093. },
  21094. 'hidden-content': {
  21095. description: 'Informs users about hidden content.',
  21096. help: 'Hidden content on the page cannot be analyzed'
  21097. },
  21098. 'html-has-lang': {
  21099. description: 'Ensures every HTML document has a lang attribute',
  21100. help: '<html> element must have a lang attribute'
  21101. },
  21102. 'html-lang-valid': {
  21103. description: 'Ensures the lang attribute of the <html> element has a valid value',
  21104. help: '<html> element must have a valid value for the lang attribute'
  21105. },
  21106. 'html-xml-lang-mismatch': {
  21107. description: 'Ensure that HTML elements with both valid lang and xml:lang attributes agree on the base language of the page',
  21108. help: 'HTML elements with lang and xml:lang must have the same base language'
  21109. },
  21110. 'identical-links-same-purpose': {
  21111. description: 'Ensure that links with the same accessible name serve a similar purpose',
  21112. help: 'Links with the same name have a similar purpose'
  21113. },
  21114. 'image-alt': {
  21115. description: 'Ensures <img> elements have alternate text or a role of none or presentation',
  21116. help: 'Images must have alternate text'
  21117. },
  21118. 'image-redundant-alt': {
  21119. description: 'Ensure image alternative is not repeated as text',
  21120. help: 'Alternative text of images should not be repeated as text'
  21121. },
  21122. 'input-button-name': {
  21123. description: 'Ensures input buttons have discernible text',
  21124. help: 'Input buttons must have discernible text'
  21125. },
  21126. 'input-image-alt': {
  21127. description: 'Ensures <input type="image"> elements have alternate text',
  21128. help: 'Image buttons must have alternate text'
  21129. },
  21130. 'label-content-name-mismatch': {
  21131. description: 'Ensures that elements labelled through their content must have their visible text as part of their accessible name',
  21132. help: 'Elements must have their visible text as part of their accessible name'
  21133. },
  21134. 'label-title-only': {
  21135. description: 'Ensures that every form element is not solely labeled using the title or aria-describedby attributes',
  21136. help: 'Form elements should have a visible label'
  21137. },
  21138. label: {
  21139. description: 'Ensures every form element has a label',
  21140. help: 'Form elements must have labels'
  21141. },
  21142. 'landmark-banner-is-top-level': {
  21143. description: 'Ensures the banner landmark is at top level',
  21144. help: 'Banner landmark should not be contained in another landmark'
  21145. },
  21146. 'landmark-complementary-is-top-level': {
  21147. description: 'Ensures the complementary landmark or aside is at top level',
  21148. help: 'Aside should not be contained in another landmark'
  21149. },
  21150. 'landmark-contentinfo-is-top-level': {
  21151. description: 'Ensures the contentinfo landmark is at top level',
  21152. help: 'Contentinfo landmark should not be contained in another landmark'
  21153. },
  21154. 'landmark-main-is-top-level': {
  21155. description: 'Ensures the main landmark is at top level',
  21156. help: 'Main landmark should not be contained in another landmark'
  21157. },
  21158. 'landmark-no-duplicate-banner': {
  21159. description: 'Ensures the document has at most one banner landmark',
  21160. help: 'Document should not have more than one banner landmark'
  21161. },
  21162. 'landmark-no-duplicate-contentinfo': {
  21163. description: 'Ensures the document has at most one contentinfo landmark',
  21164. help: 'Document should not have more than one contentinfo landmark'
  21165. },
  21166. 'landmark-no-duplicate-main': {
  21167. description: 'Ensures the document has at most one main landmark',
  21168. help: 'Document should not have more than one main landmark'
  21169. },
  21170. 'landmark-one-main': {
  21171. description: 'Ensures the document has a main landmark',
  21172. help: 'Document should have one main landmark'
  21173. },
  21174. 'landmark-unique': {
  21175. help: 'Ensures landmarks are unique',
  21176. description: 'Landmarks should have a unique role or role/label/title (i.e. accessible name) combination'
  21177. },
  21178. 'link-in-text-block': {
  21179. description: 'Links can be distinguished without relying on color',
  21180. help: 'Links must be distinguished from surrounding text in a way that does not rely on color'
  21181. },
  21182. 'link-name': {
  21183. description: 'Ensures links have discernible text',
  21184. help: 'Links must have discernible text'
  21185. },
  21186. list: {
  21187. description: 'Ensures that lists are structured correctly',
  21188. help: '<ul> and <ol> must only directly contain <li>, <script> or <template> elements'
  21189. },
  21190. listitem: {
  21191. description: 'Ensures <li> elements are used semantically',
  21192. help: '<li> elements must be contained in a <ul> or <ol>'
  21193. },
  21194. marquee: {
  21195. description: 'Ensures <marquee> elements are not used',
  21196. help: '<marquee> elements are deprecated and must not be used'
  21197. },
  21198. 'meta-refresh': {
  21199. description: 'Ensures <meta http-equiv="refresh"> is not used',
  21200. help: 'Timed refresh must not exist'
  21201. },
  21202. 'meta-viewport-large': {
  21203. description: 'Ensures <meta name="viewport"> can scale a significant amount',
  21204. help: 'Users should be able to zoom and scale the text up to 500%'
  21205. },
  21206. 'meta-viewport': {
  21207. description: 'Ensures <meta name="viewport"> does not disable text scaling and zooming',
  21208. help: 'Zooming and scaling should not be disabled'
  21209. },
  21210. 'nested-interactive': {
  21211. description: 'Nested interactive controls are not announced by screen readers',
  21212. help: 'Ensure interactive controls are not nested'
  21213. },
  21214. 'no-autoplay-audio': {
  21215. description: 'Ensures <video> or <audio> elements do not autoplay audio for more than 3 seconds without a control mechanism to stop or mute the audio',
  21216. help: '<video> or <audio> elements do not autoplay audio'
  21217. },
  21218. 'object-alt': {
  21219. description: 'Ensures <object> elements have alternate text',
  21220. help: '<object> elements must have alternate text'
  21221. },
  21222. 'p-as-heading': {
  21223. description: 'Ensure p elements are not used to style headings',
  21224. help: 'Bold, italic text and font-size are not used to style p elements as a heading'
  21225. },
  21226. 'page-has-heading-one': {
  21227. description: 'Ensure that the page, or at least one of its frames contains a level-one heading',
  21228. help: 'Page should contain a level-one heading'
  21229. },
  21230. 'presentation-role-conflict': {
  21231. description: 'Flags elements whose role is none or presentation and which cause the role conflict resolution to trigger.',
  21232. help: 'Elements of role none or presentation should be flagged'
  21233. },
  21234. region: {
  21235. description: 'Ensures all page content is contained by landmarks',
  21236. help: 'All page content should be contained by landmarks'
  21237. },
  21238. 'role-img-alt': {
  21239. description: 'Ensures [role=\'img\'] elements have alternate text',
  21240. help: '[role=\'img\'] elements have an alternative text'
  21241. },
  21242. 'scope-attr-valid': {
  21243. description: 'Ensures the scope attribute is used correctly on tables',
  21244. help: 'scope attribute should be used correctly'
  21245. },
  21246. 'scrollable-region-focusable': {
  21247. description: 'Elements that have scrollable content must be accessible by keyboard',
  21248. help: 'Ensure that scrollable region has keyboard access'
  21249. },
  21250. 'select-name': {
  21251. description: 'Ensures select element has an accessible name',
  21252. help: 'Select element must have an accessible name'
  21253. },
  21254. 'server-side-image-map': {
  21255. description: 'Ensures that server-side image maps are not used',
  21256. help: 'Server-side image maps must not be used'
  21257. },
  21258. 'skip-link': {
  21259. description: 'Ensure all skip links have a focusable target',
  21260. help: 'The skip-link target should exist and be focusable'
  21261. },
  21262. 'svg-img-alt': {
  21263. description: 'Ensures svg elements with an img, graphics-document or graphics-symbol role have an accessible text',
  21264. help: 'svg elements with an img role have an alternative text'
  21265. },
  21266. tabindex: {
  21267. description: 'Ensures tabindex attribute values are not greater than 0',
  21268. help: 'Elements should not have tabindex greater than zero'
  21269. },
  21270. 'table-duplicate-name': {
  21271. description: 'Ensure that tables do not have the same summary and caption',
  21272. help: 'The <caption> element should not contain the same text as the summary attribute'
  21273. },
  21274. 'table-fake-caption': {
  21275. description: 'Ensure that tables with a caption use the <caption> element.',
  21276. help: 'Data or header cells must not be used to give caption to a data table.'
  21277. },
  21278. 'td-has-header': {
  21279. description: 'Ensure that each non-empty data cell in a large table has one or more table headers',
  21280. help: 'All non-empty td element in table larger than 3 by 3 must have an associated table header'
  21281. },
  21282. 'td-headers-attr': {
  21283. description: 'Ensure that each cell in a table using the headers refers to another cell in that table',
  21284. help: 'All cells in a table element that use the headers attribute must only refer to other cells of that same table'
  21285. },
  21286. 'th-has-data-cells': {
  21287. description: 'Ensure that each table header in a data table refers to data cells',
  21288. help: 'All th elements and elements with role=columnheader/rowheader must have data cells they describe'
  21289. },
  21290. 'valid-lang': {
  21291. description: 'Ensures lang attributes have valid values',
  21292. help: 'lang attribute must have a valid value'
  21293. },
  21294. 'video-caption': {
  21295. description: 'Ensures <video> elements have captions',
  21296. help: '<video> elements must have captions'
  21297. }
  21298. },
  21299. checks: {
  21300. abstractrole: {
  21301. impact: 'serious',
  21302. messages: {
  21303. pass: 'Abstract roles are not used',
  21304. fail: {
  21305. singular: 'Abstract role cannot be directly used: ${data.values}',
  21306. plural: 'Abstract roles cannot be directly used: ${data.values}'
  21307. }
  21308. }
  21309. },
  21310. 'aria-allowed-attr': {
  21311. impact: 'critical',
  21312. messages: {
  21313. pass: 'ARIA attributes are used correctly for the defined role',
  21314. fail: {
  21315. singular: 'ARIA attribute is not allowed: ${data.values}',
  21316. plural: 'ARIA attributes are not allowed: ${data.values}'
  21317. }
  21318. }
  21319. },
  21320. 'aria-allowed-role': {
  21321. impact: 'minor',
  21322. messages: {
  21323. pass: 'ARIA role is allowed for given element',
  21324. fail: {
  21325. singular: 'ARIA role ${data.values} is not allowed for given element',
  21326. plural: 'ARIA roles ${data.values} are not allowed for given element'
  21327. },
  21328. incomplete: {
  21329. singular: 'ARIA role ${data.values} must be removed when the element is made visible, as it is not allowed for the element',
  21330. plural: 'ARIA roles ${data.values} must be removed when the element is made visible, as they are not allowed for the element'
  21331. }
  21332. }
  21333. },
  21334. 'aria-errormessage': {
  21335. impact: 'critical',
  21336. messages: {
  21337. pass: 'aria-errormessage exists and references elements visible to screen readers that use a supported aria-errormessage technique',
  21338. fail: {
  21339. singular: 'aria-errormessage value `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)',
  21340. plural: 'aria-errormessage values `${data.values}` must use a technique to announce the message (e.g., aria-live, aria-describedby, role=alert, etc.)'
  21341. },
  21342. incomplete: {
  21343. singular: 'ensure aria-errormessage value `${data.values}` references an existing element',
  21344. plural: 'ensure aria-errormessage values `${data.values}` reference existing elements'
  21345. }
  21346. }
  21347. },
  21348. 'aria-hidden-body': {
  21349. impact: 'critical',
  21350. messages: {
  21351. pass: 'No aria-hidden attribute is present on document body',
  21352. fail: 'aria-hidden=true should not be present on the document body'
  21353. }
  21354. },
  21355. 'aria-prohibited-attr': {
  21356. impact: 'serious',
  21357. messages: {
  21358. pass: 'ARIA attribute is allowed',
  21359. fail: 'ARIA attribute cannot be used, add a role attribute or use a different element: ${data.values}',
  21360. incomplete: 'ARIA attribute is not well supported on the element and the text content will be used instead: ${data.values}'
  21361. }
  21362. },
  21363. 'aria-required-attr': {
  21364. impact: 'critical',
  21365. messages: {
  21366. pass: 'All required ARIA attributes are present',
  21367. fail: {
  21368. singular: 'Required ARIA attribute not present: ${data.values}',
  21369. plural: 'Required ARIA attributes not present: ${data.values}'
  21370. }
  21371. }
  21372. },
  21373. 'aria-required-children': {
  21374. impact: 'critical',
  21375. messages: {
  21376. pass: 'Required ARIA children are present',
  21377. fail: {
  21378. singular: 'Required ARIA child role not present: ${data.values}',
  21379. plural: 'Required ARIA children role not present: ${data.values}'
  21380. },
  21381. incomplete: {
  21382. singular: 'Expecting ARIA child role to be added: ${data.values}',
  21383. plural: 'Expecting ARIA children role to be added: ${data.values}'
  21384. }
  21385. }
  21386. },
  21387. 'aria-required-parent': {
  21388. impact: 'critical',
  21389. messages: {
  21390. pass: 'Required ARIA parent role present',
  21391. fail: {
  21392. singular: 'Required ARIA parent role not present: ${data.values}',
  21393. plural: 'Required ARIA parents role not present: ${data.values}'
  21394. }
  21395. }
  21396. },
  21397. 'aria-roledescription': {
  21398. impact: 'serious',
  21399. messages: {
  21400. pass: 'aria-roledescription used on a supported semantic role',
  21401. incomplete: 'Check that the aria-roledescription is announced by supported screen readers',
  21402. fail: 'Give the element a role that supports aria-roledescription'
  21403. }
  21404. },
  21405. 'aria-unsupported-attr': {
  21406. impact: 'critical',
  21407. messages: {
  21408. pass: 'ARIA attribute is supported',
  21409. fail: 'ARIA attribute is not widely supported in screen readers and assistive technologies: ${data.values}'
  21410. }
  21411. },
  21412. 'aria-valid-attr-value': {
  21413. impact: 'critical',
  21414. messages: {
  21415. pass: 'ARIA attribute values are valid',
  21416. fail: {
  21417. singular: 'Invalid ARIA attribute value: ${data.values}',
  21418. plural: 'Invalid ARIA attribute values: ${data.values}'
  21419. },
  21420. incomplete: {
  21421. noId: 'ARIA attribute element ID does not exist on the page: ${data.needsReview}',
  21422. ariaCurrent: 'ARIA attribute value is invalid and will be treated as "aria-current=true": ${data.needsReview}'
  21423. }
  21424. }
  21425. },
  21426. 'aria-valid-attr': {
  21427. impact: 'critical',
  21428. messages: {
  21429. pass: 'ARIA attribute name is valid',
  21430. fail: {
  21431. singular: 'Invalid ARIA attribute name: ${data.values}',
  21432. plural: 'Invalid ARIA attribute names: ${data.values}'
  21433. }
  21434. }
  21435. },
  21436. fallbackrole: {
  21437. impact: 'serious',
  21438. messages: {
  21439. pass: 'Only one role value used',
  21440. fail: 'Use only one role value, since fallback roles are not supported in older browsers'
  21441. }
  21442. },
  21443. 'has-global-aria-attribute': {
  21444. impact: 'minor',
  21445. messages: {
  21446. pass: {
  21447. singular: 'Element has global ARIA attribute: ${data.values}',
  21448. plural: 'Element has global ARIA attributes: ${data.values}'
  21449. },
  21450. fail: 'Element does not have global ARIA attribute'
  21451. }
  21452. },
  21453. 'has-widget-role': {
  21454. impact: 'minor',
  21455. messages: {
  21456. pass: 'Element has a widget role.',
  21457. fail: 'Element does not have a widget role.'
  21458. }
  21459. },
  21460. invalidrole: {
  21461. impact: 'critical',
  21462. messages: {
  21463. pass: 'ARIA role is valid',
  21464. fail: {
  21465. singular: 'Role must be one of the valid ARIA roles: ${data.values}',
  21466. plural: 'Roles must be one of the valid ARIA roles: ${data.values}'
  21467. }
  21468. }
  21469. },
  21470. 'is-element-focusable': {
  21471. impact: 'minor',
  21472. messages: {
  21473. pass: 'Element is focusable.',
  21474. fail: 'Element is not focusable.'
  21475. }
  21476. },
  21477. 'no-implicit-explicit-label': {
  21478. impact: 'moderate',
  21479. messages: {
  21480. pass: 'There is no mismatch between a <label> and accessible name',
  21481. incomplete: 'Check that the <label> does not need be part of the ARIA ${data} field\'s name'
  21482. }
  21483. },
  21484. unsupportedrole: {
  21485. impact: 'critical',
  21486. messages: {
  21487. pass: 'ARIA role is supported',
  21488. fail: 'The role used is not widely supported in screen readers and assistive technologies: ${data.values}'
  21489. }
  21490. },
  21491. 'valid-scrollable-semantics': {
  21492. impact: 'minor',
  21493. messages: {
  21494. pass: 'Element has valid semantics for an element in the focus order.',
  21495. fail: 'Element has invalid semantics for an element in the focus order.'
  21496. }
  21497. },
  21498. 'color-contrast': {
  21499. impact: 'serious',
  21500. messages: {
  21501. pass: 'Element has sufficient color contrast of ${data.contrastRatio}',
  21502. fail: 'Element has insufficient color contrast of ${data.contrastRatio} (foreground color: ${data.fgColor}, background color: ${data.bgColor}, font size: ${data.fontSize}, font weight: ${data.fontWeight}). Expected contrast ratio of ${data.expectedContrastRatio}',
  21503. incomplete: {
  21504. default: 'Unable to determine contrast ratio',
  21505. bgImage: 'Element\'s background color could not be determined due to a background image',
  21506. bgGradient: 'Element\'s background color could not be determined due to a background gradient',
  21507. imgNode: 'Element\'s background color could not be determined because element contains an image node',
  21508. bgOverlap: 'Element\'s background color could not be determined because it is overlapped by another element',
  21509. fgAlpha: 'Element\'s foreground color could not be determined because of alpha transparency',
  21510. elmPartiallyObscured: 'Element\'s background color could not be determined because it\'s partially obscured by another element',
  21511. elmPartiallyObscuring: 'Element\'s background color could not be determined because it partially overlaps other elements',
  21512. outsideViewport: 'Element\'s background color could not be determined because it\'s outside the viewport',
  21513. equalRatio: 'Element has a 1:1 contrast ratio with the background',
  21514. shortTextContent: 'Element content is too short to determine if it is actual text content',
  21515. nonBmp: 'Element content contains only non-text characters',
  21516. pseudoContent: 'Element\'s background color could not be determined due to a pseudo element'
  21517. }
  21518. }
  21519. },
  21520. 'link-in-text-block': {
  21521. impact: 'serious',
  21522. messages: {
  21523. pass: 'Links can be distinguished from surrounding text in some way other than by color',
  21524. fail: 'Links need to be distinguished from surrounding text in some way other than by color',
  21525. incomplete: {
  21526. default: 'Unable to determine contrast ratio',
  21527. bgContrast: 'Element\'s contrast ratio could not be determined. Check for a distinct hover/focus style',
  21528. bgImage: 'Element\'s contrast ratio could not be determined due to a background image',
  21529. bgGradient: 'Element\'s contrast ratio could not be determined due to a background gradient',
  21530. imgNode: 'Element\'s contrast ratio could not be determined because element contains an image node',
  21531. bgOverlap: 'Element\'s contrast ratio could not be determined because of element overlap'
  21532. }
  21533. }
  21534. },
  21535. 'autocomplete-appropriate': {
  21536. impact: 'serious',
  21537. messages: {
  21538. pass: 'the autocomplete value is on an appropriate element',
  21539. fail: 'the autocomplete value is inappropriate for this type of input'
  21540. }
  21541. },
  21542. 'autocomplete-valid': {
  21543. impact: 'serious',
  21544. messages: {
  21545. pass: 'the autocomplete attribute is correctly formatted',
  21546. fail: 'the autocomplete attribute is incorrectly formatted'
  21547. }
  21548. },
  21549. accesskeys: {
  21550. impact: 'serious',
  21551. messages: {
  21552. pass: 'Accesskey attribute value is unique',
  21553. fail: 'Document has multiple elements with the same accesskey'
  21554. }
  21555. },
  21556. 'focusable-content': {
  21557. impact: 'moderate',
  21558. messages: {
  21559. pass: 'Element contains focusable elements',
  21560. fail: 'Element should have focusable content'
  21561. }
  21562. },
  21563. 'focusable-disabled': {
  21564. impact: 'serious',
  21565. messages: {
  21566. pass: 'No focusable elements contained within element',
  21567. fail: 'Focusable content should be disabled or be removed from the DOM'
  21568. }
  21569. },
  21570. 'focusable-element': {
  21571. impact: 'moderate',
  21572. messages: {
  21573. pass: 'Element is focusable',
  21574. fail: 'Element should be focusable'
  21575. }
  21576. },
  21577. 'focusable-modal-open': {
  21578. impact: 'serious',
  21579. messages: {
  21580. pass: 'No focusable elements while a modal is open',
  21581. incomplete: 'Check that focusable elements are not tabbable in the current state'
  21582. }
  21583. },
  21584. 'focusable-no-name': {
  21585. impact: 'serious',
  21586. messages: {
  21587. pass: 'Element is not in tab order or has accessible text',
  21588. fail: 'Element is in tab order and does not have accessible text',
  21589. incomplete: 'Unable to determine if element has an accessible name'
  21590. }
  21591. },
  21592. 'focusable-not-tabbable': {
  21593. impact: 'serious',
  21594. messages: {
  21595. pass: 'No focusable elements contained within element',
  21596. fail: 'Focusable content should have tabindex=\'-1\' or be removed from the DOM'
  21597. }
  21598. },
  21599. 'frame-focusable-content': {
  21600. impact: 'serious',
  21601. messages: {
  21602. pass: 'Element does not have focusable descendants',
  21603. fail: 'Element has focusable descendants',
  21604. incomplete: 'Could not determine if element has descendants'
  21605. }
  21606. },
  21607. 'landmark-is-top-level': {
  21608. impact: 'moderate',
  21609. messages: {
  21610. pass: 'The ${data.role} landmark is at the top level.',
  21611. fail: 'The ${data.role} landmark is contained in another landmark.'
  21612. }
  21613. },
  21614. 'no-focusable-content': {
  21615. impact: 'serious',
  21616. messages: {
  21617. pass: 'Element does not have focusable descendants',
  21618. fail: 'Element has focusable descendants',
  21619. incomplete: 'Could not determine if element has descendants'
  21620. }
  21621. },
  21622. 'page-has-heading-one': {
  21623. impact: 'moderate',
  21624. messages: {
  21625. pass: 'Page has at least one level-one heading',
  21626. fail: 'Page must have a level-one heading'
  21627. }
  21628. },
  21629. 'page-has-main': {
  21630. impact: 'moderate',
  21631. messages: {
  21632. pass: 'Document has at least one main landmark',
  21633. fail: 'Document does not have a main landmark'
  21634. }
  21635. },
  21636. 'page-no-duplicate-banner': {
  21637. impact: 'moderate',
  21638. messages: {
  21639. pass: 'Document does not have more than one banner landmark',
  21640. fail: 'Document has more than one banner landmark'
  21641. }
  21642. },
  21643. 'page-no-duplicate-contentinfo': {
  21644. impact: 'moderate',
  21645. messages: {
  21646. pass: 'Document does not have more than one contentinfo landmark',
  21647. fail: 'Document has more than one contentinfo landmark'
  21648. }
  21649. },
  21650. 'page-no-duplicate-main': {
  21651. impact: 'moderate',
  21652. messages: {
  21653. pass: 'Document does not have more than one main landmark',
  21654. fail: 'Document has more than one main landmark'
  21655. }
  21656. },
  21657. tabindex: {
  21658. impact: 'serious',
  21659. messages: {
  21660. pass: 'Element does not have a tabindex greater than 0',
  21661. fail: 'Element has a tabindex greater than 0'
  21662. }
  21663. },
  21664. 'alt-space-value': {
  21665. impact: 'critical',
  21666. messages: {
  21667. pass: 'Element has a valid alt attribute value',
  21668. fail: 'Element has an alt attribute containing only a space character, which is not ignored by all screen readers'
  21669. }
  21670. },
  21671. 'duplicate-img-label': {
  21672. impact: 'minor',
  21673. messages: {
  21674. pass: 'Element does not duplicate existing text in <img> alt text',
  21675. fail: 'Element contains <img> element with alt text that duplicates existing text'
  21676. }
  21677. },
  21678. 'explicit-label': {
  21679. impact: 'critical',
  21680. messages: {
  21681. pass: 'Form element has an explicit <label>',
  21682. fail: 'Form element does not have an explicit <label>',
  21683. incomplete: 'Unable to determine if form element has an explicit <label>'
  21684. }
  21685. },
  21686. 'help-same-as-label': {
  21687. impact: 'minor',
  21688. messages: {
  21689. pass: 'Help text (title or aria-describedby) does not duplicate label text',
  21690. fail: 'Help text (title or aria-describedby) text is the same as the label text'
  21691. }
  21692. },
  21693. 'hidden-explicit-label': {
  21694. impact: 'critical',
  21695. messages: {
  21696. pass: 'Form element has a visible explicit <label>',
  21697. fail: 'Form element has explicit <label> that is hidden',
  21698. incomplete: 'Unable to determine if form element has explicit <label> that is hidden'
  21699. }
  21700. },
  21701. 'implicit-label': {
  21702. impact: 'critical',
  21703. messages: {
  21704. pass: 'Form element has an implicit (wrapped) <label>',
  21705. fail: 'Form element does not have an implicit (wrapped) <label>',
  21706. incomplete: 'Unable to determine if form element has an implicit (wrapped} <label>'
  21707. }
  21708. },
  21709. 'label-content-name-mismatch': {
  21710. impact: 'serious',
  21711. messages: {
  21712. pass: 'Element contains visible text as part of it\'s accessible name',
  21713. fail: 'Text inside the element is not included in the accessible name'
  21714. }
  21715. },
  21716. 'multiple-label': {
  21717. impact: 'moderate',
  21718. messages: {
  21719. pass: 'Form field does not have multiple label elements',
  21720. incomplete: 'Multiple label elements is not widely supported in assistive technologies. Ensure the first label contains all necessary information.'
  21721. }
  21722. },
  21723. 'title-only': {
  21724. impact: 'serious',
  21725. messages: {
  21726. pass: 'Form element does not solely use title attribute for its label',
  21727. fail: 'Only title used to generate label for form element'
  21728. }
  21729. },
  21730. 'landmark-is-unique': {
  21731. impact: 'moderate',
  21732. messages: {
  21733. pass: 'Landmarks must have a unique role or role/label/title (i.e. accessible name) combination',
  21734. fail: 'The landmark must have a unique aria-label, aria-labelledby, or title to make landmarks distinguishable'
  21735. }
  21736. },
  21737. 'has-lang': {
  21738. impact: 'serious',
  21739. messages: {
  21740. pass: 'The <html> element has a lang attribute',
  21741. fail: {
  21742. noXHTML: 'The xml:lang attribute is not valid on HTML pages, use the lang attribute.',
  21743. noLang: 'The <html> element does not have a lang attribute'
  21744. }
  21745. }
  21746. },
  21747. 'valid-lang': {
  21748. impact: 'serious',
  21749. messages: {
  21750. pass: 'Value of lang attribute is included in the list of valid languages',
  21751. fail: 'Value of lang attribute not included in the list of valid languages'
  21752. }
  21753. },
  21754. 'xml-lang-mismatch': {
  21755. impact: 'moderate',
  21756. messages: {
  21757. pass: 'Lang and xml:lang attributes have the same base language',
  21758. fail: 'Lang and xml:lang attributes do not have the same base language'
  21759. }
  21760. },
  21761. dlitem: {
  21762. impact: 'serious',
  21763. messages: {
  21764. pass: 'Description list item has a <dl> parent element',
  21765. fail: 'Description list item does not have a <dl> parent element'
  21766. }
  21767. },
  21768. listitem: {
  21769. impact: 'serious',
  21770. messages: {
  21771. pass: 'List item has a <ul>, <ol> or role="list" parent element',
  21772. fail: {
  21773. default: 'List item does not have a <ul>, <ol> parent element',
  21774. roleNotValid: 'List item does not have a <ul>, <ol> parent element without a role, or a role="list"'
  21775. }
  21776. }
  21777. },
  21778. 'only-dlitems': {
  21779. impact: 'serious',
  21780. messages: {
  21781. pass: 'List element only has direct children that are allowed inside <dt> or <dd> elements',
  21782. fail: 'List element has direct children that are not allowed inside <dt> or <dd> elements'
  21783. }
  21784. },
  21785. 'only-listitems': {
  21786. impact: 'serious',
  21787. messages: {
  21788. pass: 'List element only has direct children that are allowed inside <li> elements',
  21789. fail: {
  21790. default: 'List element has direct children that are not allowed inside <li> elements',
  21791. roleNotValid: 'List element has direct children with a role that is not allowed: ${data.roles}'
  21792. }
  21793. }
  21794. },
  21795. 'structured-dlitems': {
  21796. impact: 'serious',
  21797. messages: {
  21798. pass: 'When not empty, element has both <dt> and <dd> elements',
  21799. fail: 'When not empty, element does not have at least one <dt> element followed by at least one <dd> element'
  21800. }
  21801. },
  21802. caption: {
  21803. impact: 'critical',
  21804. messages: {
  21805. pass: 'The multimedia element has a captions track',
  21806. incomplete: 'Check that captions is available for the element'
  21807. }
  21808. },
  21809. 'frame-tested': {
  21810. impact: 'critical',
  21811. messages: {
  21812. pass: 'The iframe was tested with axe-core',
  21813. fail: 'The iframe could not be tested with axe-core',
  21814. incomplete: 'The iframe still has to be tested with axe-core'
  21815. }
  21816. },
  21817. 'no-autoplay-audio': {
  21818. impact: 'moderate',
  21819. messages: {
  21820. pass: '<video> or <audio> does not output audio for more than allowed duration or has controls mechanism',
  21821. fail: '<video> or <audio> outputs audio for more than allowed duration and does not have a controls mechanism',
  21822. incomplete: 'Check that the <video> or <audio> does not output audio for more than allowed duration or provides a controls mechanism'
  21823. }
  21824. },
  21825. 'css-orientation-lock': {
  21826. impact: 'serious',
  21827. messages: {
  21828. pass: 'Display is operable, and orientation lock does not exist',
  21829. fail: 'CSS Orientation lock is applied, and makes display inoperable',
  21830. incomplete: 'CSS Orientation lock cannot be determined'
  21831. }
  21832. },
  21833. 'meta-viewport-large': {
  21834. impact: 'minor',
  21835. messages: {
  21836. pass: '<meta> tag does not prevent significant zooming on mobile devices',
  21837. fail: '<meta> tag limits zooming on mobile devices'
  21838. }
  21839. },
  21840. 'meta-viewport': {
  21841. impact: 'critical',
  21842. messages: {
  21843. pass: '<meta> tag does not disable zooming on mobile devices',
  21844. fail: '${data} on <meta> tag disables zooming on mobile devices'
  21845. }
  21846. },
  21847. 'header-present': {
  21848. impact: 'serious',
  21849. messages: {
  21850. pass: 'Page has a heading',
  21851. fail: 'Page does not have a heading'
  21852. }
  21853. },
  21854. 'heading-order': {
  21855. impact: 'moderate',
  21856. messages: {
  21857. pass: 'Heading order valid',
  21858. fail: 'Heading order invalid',
  21859. incomplete: 'Unable to determine previous heading'
  21860. }
  21861. },
  21862. 'identical-links-same-purpose': {
  21863. impact: 'minor',
  21864. messages: {
  21865. pass: 'There are no other links with the same name, that go to a different URL',
  21866. incomplete: 'Check that links have the same purpose, or are intentionally ambiguous.'
  21867. }
  21868. },
  21869. 'internal-link-present': {
  21870. impact: 'serious',
  21871. messages: {
  21872. pass: 'Valid skip link found',
  21873. fail: 'No valid skip link found'
  21874. }
  21875. },
  21876. landmark: {
  21877. impact: 'serious',
  21878. messages: {
  21879. pass: 'Page has a landmark region',
  21880. fail: 'Page does not have a landmark region'
  21881. }
  21882. },
  21883. 'meta-refresh': {
  21884. impact: 'critical',
  21885. messages: {
  21886. pass: '<meta> tag does not immediately refresh the page',
  21887. fail: '<meta> tag forces timed refresh of page'
  21888. }
  21889. },
  21890. 'p-as-heading': {
  21891. impact: 'serious',
  21892. messages: {
  21893. pass: '<p> elements are not styled as headings',
  21894. fail: 'Heading elements should be used instead of styled p elements'
  21895. }
  21896. },
  21897. region: {
  21898. impact: 'moderate',
  21899. messages: {
  21900. pass: 'All page content is contained by landmarks',
  21901. fail: 'Some page content is not contained by landmarks'
  21902. }
  21903. },
  21904. 'skip-link': {
  21905. impact: 'moderate',
  21906. messages: {
  21907. pass: 'Skip link target exists',
  21908. incomplete: 'Skip link target should become visible on activation',
  21909. fail: 'No skip link target'
  21910. }
  21911. },
  21912. 'unique-frame-title': {
  21913. impact: 'serious',
  21914. messages: {
  21915. pass: 'Element\'s title attribute is unique',
  21916. fail: 'Element\'s title attribute is not unique'
  21917. }
  21918. },
  21919. 'duplicate-id-active': {
  21920. impact: 'serious',
  21921. messages: {
  21922. pass: 'Document has no active elements that share the same id attribute',
  21923. fail: 'Document has active elements with the same id attribute: ${data}'
  21924. }
  21925. },
  21926. 'duplicate-id-aria': {
  21927. impact: 'critical',
  21928. messages: {
  21929. pass: 'Document has no elements referenced with ARIA or labels that share the same id attribute',
  21930. fail: 'Document has multiple elements referenced with ARIA with the same id attribute: ${data}'
  21931. }
  21932. },
  21933. 'duplicate-id': {
  21934. impact: 'minor',
  21935. messages: {
  21936. pass: 'Document has no static elements that share the same id attribute',
  21937. fail: 'Document has multiple static elements with the same id attribute: ${data}'
  21938. }
  21939. },
  21940. 'aria-label': {
  21941. impact: 'serious',
  21942. messages: {
  21943. pass: 'aria-label attribute exists and is not empty',
  21944. fail: 'aria-label attribute does not exist or is empty'
  21945. }
  21946. },
  21947. 'aria-labelledby': {
  21948. impact: 'serious',
  21949. messages: {
  21950. pass: 'aria-labelledby attribute exists and references elements that are visible to screen readers',
  21951. fail: 'aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty',
  21952. incomplete: 'ensure aria-labelledby references an existing element'
  21953. }
  21954. },
  21955. 'avoid-inline-spacing': {
  21956. impact: 'serious',
  21957. messages: {
  21958. pass: 'No inline styles with \'!important\' that affect text spacing has been specified',
  21959. fail: {
  21960. singular: 'Remove \'!important\' from inline style ${data.values}, as overriding this is not supported by most browsers',
  21961. plural: 'Remove \'!important\' from inline styles ${data.values}, as overriding this is not supported by most browsers'
  21962. }
  21963. }
  21964. },
  21965. 'button-has-visible-text': {
  21966. impact: 'critical',
  21967. messages: {
  21968. pass: 'Element has inner text that is visible to screen readers',
  21969. fail: 'Element does not have inner text that is visible to screen readers',
  21970. incomplete: 'Unable to determine if element has children'
  21971. }
  21972. },
  21973. 'doc-has-title': {
  21974. impact: 'serious',
  21975. messages: {
  21976. pass: 'Document has a non-empty <title> element',
  21977. fail: 'Document does not have a non-empty <title> element'
  21978. }
  21979. },
  21980. exists: {
  21981. impact: 'minor',
  21982. messages: {
  21983. pass: 'Element does not exist',
  21984. incomplete: 'Element exists'
  21985. }
  21986. },
  21987. 'has-alt': {
  21988. impact: 'critical',
  21989. messages: {
  21990. pass: 'Element has an alt attribute',
  21991. fail: 'Element does not have an alt attribute'
  21992. }
  21993. },
  21994. 'has-visible-text': {
  21995. impact: 'minor',
  21996. messages: {
  21997. pass: 'Element has text that is visible to screen readers',
  21998. fail: 'Element does not have text that is visible to screen readers',
  21999. incomplete: 'Unable to determine if element has children'
  22000. }
  22001. },
  22002. 'is-on-screen': {
  22003. impact: 'serious',
  22004. messages: {
  22005. pass: 'Element is not visible',
  22006. fail: 'Element is visible'
  22007. }
  22008. },
  22009. 'non-empty-alt': {
  22010. impact: 'critical',
  22011. messages: {
  22012. pass: 'Element has a non-empty alt attribute',
  22013. fail: {
  22014. noAttr: 'Element has no alt attribute',
  22015. emptyAttr: 'Element has an empty alt attribute'
  22016. }
  22017. }
  22018. },
  22019. 'non-empty-if-present': {
  22020. impact: 'critical',
  22021. messages: {
  22022. pass: {
  22023. default: 'Element does not have a value attribute',
  22024. 'has-label': 'Element has a non-empty value attribute'
  22025. },
  22026. fail: 'Element has a value attribute and the value attribute is empty'
  22027. }
  22028. },
  22029. 'non-empty-placeholder': {
  22030. impact: 'serious',
  22031. messages: {
  22032. pass: 'Element has a placeholder attribute',
  22033. fail: {
  22034. noAttr: 'Element has no placeholder attribute',
  22035. emptyAttr: 'Element has an empty placeholder attribute'
  22036. }
  22037. }
  22038. },
  22039. 'non-empty-title': {
  22040. impact: 'serious',
  22041. messages: {
  22042. pass: 'Element has a title attribute',
  22043. fail: {
  22044. noAttr: 'Element has no title attribute',
  22045. emptyAttr: 'Element has an empty title attribute'
  22046. }
  22047. }
  22048. },
  22049. 'non-empty-value': {
  22050. impact: 'critical',
  22051. messages: {
  22052. pass: 'Element has a non-empty value attribute',
  22053. fail: {
  22054. noAttr: 'Element has no value attribute',
  22055. emptyAttr: 'Element has an empty value attribute'
  22056. }
  22057. }
  22058. },
  22059. 'presentational-role': {
  22060. impact: 'minor',
  22061. messages: {
  22062. pass: 'Element\'s default semantics were overriden with role="${data.role}"',
  22063. fail: {
  22064. default: 'Element\'s default semantics were not overridden with role="none" or role="presentation"',
  22065. globalAria: 'Element\'s role is not presentational because it has a global ARIA attribute',
  22066. focusable: 'Element\'s role is not presentational because it is focusable',
  22067. both: 'Element\'s role is not presentational because it has a global ARIA attribute and is focusable'
  22068. }
  22069. }
  22070. },
  22071. 'role-none': {
  22072. impact: 'minor',
  22073. messages: {
  22074. pass: 'Element\'s default semantics were overriden with role="none"',
  22075. fail: 'Element\'s default semantics were not overridden with role="none"'
  22076. }
  22077. },
  22078. 'role-presentation': {
  22079. impact: 'minor',
  22080. messages: {
  22081. pass: 'Element\'s default semantics were overriden with role="presentation"',
  22082. fail: 'Element\'s default semantics were not overridden with role="presentation"'
  22083. }
  22084. },
  22085. 'svg-non-empty-title': {
  22086. impact: 'serious',
  22087. messages: {
  22088. pass: 'Element has a child that is a title',
  22089. fail: {
  22090. noTitle: 'Element has no child that is a title',
  22091. emptyTitle: 'Element child title is empty'
  22092. },
  22093. incomplete: 'Unable to determine element has a child that is a title'
  22094. }
  22095. },
  22096. 'caption-faked': {
  22097. impact: 'serious',
  22098. messages: {
  22099. pass: 'The first row of a table is not used as a caption',
  22100. fail: 'The first child of the table should be a caption instead of a table cell'
  22101. }
  22102. },
  22103. 'html5-scope': {
  22104. impact: 'moderate',
  22105. messages: {
  22106. pass: 'Scope attribute is only used on table header elements (<th>)',
  22107. fail: 'In HTML 5, scope attributes may only be used on table header elements (<th>)'
  22108. }
  22109. },
  22110. 'same-caption-summary': {
  22111. impact: 'minor',
  22112. messages: {
  22113. pass: 'Content of summary attribute and <caption> are not duplicated',
  22114. fail: 'Content of summary attribute and <caption> element are identical'
  22115. }
  22116. },
  22117. 'scope-value': {
  22118. impact: 'critical',
  22119. messages: {
  22120. pass: 'Scope attribute is used correctly',
  22121. fail: 'The value of the scope attribute may only be \'row\' or \'col\''
  22122. }
  22123. },
  22124. 'td-has-header': {
  22125. impact: 'critical',
  22126. messages: {
  22127. pass: 'All non-empty data cells have table headers',
  22128. fail: 'Some non-empty data cells do not have table headers'
  22129. }
  22130. },
  22131. 'td-headers-attr': {
  22132. impact: 'serious',
  22133. messages: {
  22134. pass: 'The headers attribute is exclusively used to refer to other cells in the table',
  22135. incomplete: 'The headers attribute is empty',
  22136. fail: 'The headers attribute is not exclusively used to refer to other cells in the table'
  22137. }
  22138. },
  22139. 'th-has-data-cells': {
  22140. impact: 'serious',
  22141. messages: {
  22142. pass: 'All table header cells refer to data cells',
  22143. fail: 'Not all table header cells refer to data cells',
  22144. incomplete: 'Table data cells are missing or empty'
  22145. }
  22146. },
  22147. 'hidden-content': {
  22148. impact: 'minor',
  22149. messages: {
  22150. pass: 'All content on the page has been analyzed.',
  22151. fail: 'There were problems analyzing the content on this page.',
  22152. incomplete: 'There is hidden content on the page that was not analyzed. You will need to trigger the display of this content in order to analyze it.'
  22153. }
  22154. }
  22155. },
  22156. failureSummaries: {
  22157. any: {
  22158. failureMessage: function anonymous(it) {
  22159. var out = 'Fix any of the following:';
  22160. var arr1 = it;
  22161. if (arr1) {
  22162. var value, i1 = -1, l1 = arr1.length - 1;
  22163. while (i1 < l1) {
  22164. value = arr1[i1 += 1];
  22165. out += '\n ' + value.split('\n').join('\n ');
  22166. }
  22167. }
  22168. return out;
  22169. }
  22170. },
  22171. none: {
  22172. failureMessage: function anonymous(it) {
  22173. var out = 'Fix all of the following:';
  22174. var arr1 = it;
  22175. if (arr1) {
  22176. var value, i1 = -1, l1 = arr1.length - 1;
  22177. while (i1 < l1) {
  22178. value = arr1[i1 += 1];
  22179. out += '\n ' + value.split('\n').join('\n ');
  22180. }
  22181. }
  22182. return out;
  22183. }
  22184. }
  22185. },
  22186. incompleteFallbackMessage: {}
  22187. },
  22188. rules: [ {
  22189. id: 'accesskeys',
  22190. selector: '[accesskey]',
  22191. excludeHidden: false,
  22192. tags: [ 'cat.keyboard', 'best-practice' ],
  22193. all: [],
  22194. any: [],
  22195. none: [ 'accesskeys' ]
  22196. }, {
  22197. id: 'area-alt',
  22198. selector: 'map area[href]',
  22199. excludeHidden: false,
  22200. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'wcag244', 'wcag412', 'section508', 'section508.22.a', 'ACT' ],
  22201. all: [],
  22202. any: [ {
  22203. options: {
  22204. attribute: 'alt'
  22205. },
  22206. id: 'non-empty-alt'
  22207. }, 'aria-label', 'aria-labelledby', {
  22208. options: {
  22209. attribute: 'title'
  22210. },
  22211. id: 'non-empty-title'
  22212. } ],
  22213. none: []
  22214. }, {
  22215. id: 'aria-allowed-attr',
  22216. matches: 'aria-allowed-attr-matches',
  22217. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  22218. all: [],
  22219. any: [ 'aria-allowed-attr' ],
  22220. none: [ 'aria-unsupported-attr', {
  22221. options: {
  22222. elementsAllowedAriaLabel: [ 'applet', 'input' ]
  22223. },
  22224. id: 'aria-prohibited-attr'
  22225. } ]
  22226. }, {
  22227. id: 'aria-allowed-role',
  22228. excludeHidden: false,
  22229. selector: '[role]',
  22230. matches: 'aria-allowed-role-matches',
  22231. tags: [ 'cat.aria', 'best-practice' ],
  22232. all: [],
  22233. any: [ {
  22234. options: {
  22235. allowImplicit: true,
  22236. ignoredTags: []
  22237. },
  22238. id: 'aria-allowed-role'
  22239. } ],
  22240. none: []
  22241. }, {
  22242. id: 'aria-command-name',
  22243. selector: '[role="link"], [role="button"], [role="menuitem"]',
  22244. matches: 'no-naming-method-matches',
  22245. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  22246. all: [],
  22247. any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
  22248. options: {
  22249. attribute: 'title'
  22250. },
  22251. id: 'non-empty-title'
  22252. } ],
  22253. none: []
  22254. }, {
  22255. id: 'aria-dialog-name',
  22256. selector: '[role="dialog"], [role="alertdialog"]',
  22257. matches: 'no-naming-method-matches',
  22258. tags: [ 'cat.aria', 'best-practice' ],
  22259. all: [],
  22260. any: [ 'aria-label', 'aria-labelledby', {
  22261. options: {
  22262. attribute: 'title'
  22263. },
  22264. id: 'non-empty-title'
  22265. } ],
  22266. none: []
  22267. }, {
  22268. id: 'aria-hidden-body',
  22269. selector: 'body',
  22270. excludeHidden: false,
  22271. matches: 'is-initiator-matches',
  22272. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  22273. all: [],
  22274. any: [ 'aria-hidden-body' ],
  22275. none: []
  22276. }, {
  22277. id: 'aria-hidden-focus',
  22278. selector: '[aria-hidden="true"]',
  22279. matches: 'aria-hidden-focus-matches',
  22280. excludeHidden: false,
  22281. tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'wcag131' ],
  22282. all: [ 'focusable-modal-open', 'focusable-disabled', 'focusable-not-tabbable' ],
  22283. any: [],
  22284. none: []
  22285. }, {
  22286. id: 'aria-input-field-name',
  22287. selector: '[role="combobox"], [role="listbox"], [role="searchbox"], [role="slider"], [role="spinbutton"], [role="textbox"]',
  22288. matches: 'no-naming-method-matches',
  22289. tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'ACT' ],
  22290. all: [],
  22291. any: [ 'aria-label', 'aria-labelledby', {
  22292. options: {
  22293. attribute: 'title'
  22294. },
  22295. id: 'non-empty-title'
  22296. } ],
  22297. none: [ 'no-implicit-explicit-label' ]
  22298. }, {
  22299. id: 'aria-meter-name',
  22300. selector: '[role="meter"]',
  22301. matches: 'no-naming-method-matches',
  22302. tags: [ 'cat.aria', 'wcag2a', 'wcag111' ],
  22303. all: [],
  22304. any: [ 'aria-label', 'aria-labelledby', {
  22305. options: {
  22306. attribute: 'title'
  22307. },
  22308. id: 'non-empty-title'
  22309. } ],
  22310. none: []
  22311. }, {
  22312. id: 'aria-progressbar-name',
  22313. selector: '[role="progressbar"]',
  22314. matches: 'no-naming-method-matches',
  22315. tags: [ 'cat.aria', 'wcag2a', 'wcag111' ],
  22316. all: [],
  22317. any: [ 'aria-label', 'aria-labelledby', {
  22318. options: {
  22319. attribute: 'title'
  22320. },
  22321. id: 'non-empty-title'
  22322. } ],
  22323. none: []
  22324. }, {
  22325. id: 'aria-required-attr',
  22326. selector: '[role]',
  22327. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  22328. all: [],
  22329. any: [ 'aria-required-attr' ],
  22330. none: []
  22331. }, {
  22332. id: 'aria-required-children',
  22333. selector: '[role]',
  22334. matches: 'aria-required-children-matches',
  22335. tags: [ 'cat.aria', 'wcag2a', 'wcag131' ],
  22336. all: [],
  22337. any: [ {
  22338. options: {
  22339. reviewEmpty: [ 'doc-bibliography', 'doc-endnotes', 'grid', 'list', 'listbox', 'table', 'tablist', 'tree', 'treegrid', 'rowgroup' ]
  22340. },
  22341. id: 'aria-required-children'
  22342. } ],
  22343. none: []
  22344. }, {
  22345. id: 'aria-required-parent',
  22346. selector: '[role]',
  22347. matches: 'aria-required-parent-matches',
  22348. tags: [ 'cat.aria', 'wcag2a', 'wcag131' ],
  22349. all: [],
  22350. any: [ {
  22351. options: {
  22352. ownGroupRoles: [ 'listitem', 'treeitem' ]
  22353. },
  22354. id: 'aria-required-parent'
  22355. } ],
  22356. none: []
  22357. }, {
  22358. id: 'aria-roledescription',
  22359. selector: '[aria-roledescription]',
  22360. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  22361. all: [],
  22362. any: [ {
  22363. options: {
  22364. supportedRoles: [ 'button', 'img', 'checkbox', 'radio', 'combobox', 'menuitemcheckbox', 'menuitemradio' ]
  22365. },
  22366. id: 'aria-roledescription'
  22367. } ],
  22368. none: []
  22369. }, {
  22370. id: 'aria-roles',
  22371. selector: '[role]',
  22372. matches: 'no-empty-role-matches',
  22373. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  22374. all: [],
  22375. any: [],
  22376. none: [ 'fallbackrole', 'invalidrole', 'abstractrole', 'unsupportedrole' ]
  22377. }, {
  22378. id: 'aria-text',
  22379. selector: '[role=text]',
  22380. tags: [ 'cat.aria', 'best-practice' ],
  22381. all: [],
  22382. any: [ 'no-focusable-content' ],
  22383. none: []
  22384. }, {
  22385. id: 'aria-toggle-field-name',
  22386. selector: '[role="checkbox"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="radio"], [role="switch"], [role="option"]',
  22387. matches: 'no-naming-method-matches',
  22388. tags: [ 'cat.aria', 'wcag2a', 'wcag412', 'ACT' ],
  22389. all: [],
  22390. any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
  22391. options: {
  22392. attribute: 'title'
  22393. },
  22394. id: 'non-empty-title'
  22395. } ],
  22396. none: [ 'no-implicit-explicit-label' ]
  22397. }, {
  22398. id: 'aria-tooltip-name',
  22399. selector: '[role="tooltip"]',
  22400. matches: 'no-naming-method-matches',
  22401. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  22402. all: [],
  22403. any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
  22404. options: {
  22405. attribute: 'title'
  22406. },
  22407. id: 'non-empty-title'
  22408. } ],
  22409. none: []
  22410. }, {
  22411. id: 'aria-treeitem-name',
  22412. selector: '[role="treeitem"]',
  22413. matches: 'no-naming-method-matches',
  22414. tags: [ 'cat.aria', 'best-practice' ],
  22415. all: [],
  22416. any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
  22417. options: {
  22418. attribute: 'title'
  22419. },
  22420. id: 'non-empty-title'
  22421. } ],
  22422. none: []
  22423. }, {
  22424. id: 'aria-valid-attr-value',
  22425. matches: 'aria-has-attr-matches',
  22426. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  22427. all: [ {
  22428. options: [],
  22429. id: 'aria-valid-attr-value'
  22430. }, 'aria-errormessage' ],
  22431. any: [],
  22432. none: []
  22433. }, {
  22434. id: 'aria-valid-attr',
  22435. matches: 'aria-has-attr-matches',
  22436. tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
  22437. all: [],
  22438. any: [ {
  22439. options: [],
  22440. id: 'aria-valid-attr'
  22441. } ],
  22442. none: []
  22443. }, {
  22444. id: 'audio-caption',
  22445. selector: 'audio',
  22446. enabled: false,
  22447. excludeHidden: false,
  22448. tags: [ 'cat.time-and-media', 'wcag2a', 'wcag121', 'section508', 'section508.22.a' ],
  22449. all: [],
  22450. any: [],
  22451. none: [ 'caption' ]
  22452. }, {
  22453. id: 'autocomplete-valid',
  22454. matches: 'autocomplete-matches',
  22455. tags: [ 'cat.forms', 'wcag21aa', 'wcag135' ],
  22456. all: [ 'autocomplete-valid', 'autocomplete-appropriate' ],
  22457. any: [],
  22458. none: []
  22459. }, {
  22460. id: 'avoid-inline-spacing',
  22461. selector: '[style]',
  22462. tags: [ 'cat.structure', 'wcag21aa', 'wcag1412' ],
  22463. all: [ {
  22464. options: {
  22465. cssProperties: [ 'line-height', 'letter-spacing', 'word-spacing' ]
  22466. },
  22467. id: 'avoid-inline-spacing'
  22468. } ],
  22469. any: [],
  22470. none: []
  22471. }, {
  22472. id: 'blink',
  22473. selector: 'blink',
  22474. excludeHidden: false,
  22475. tags: [ 'cat.time-and-media', 'wcag2a', 'wcag222', 'section508', 'section508.22.j' ],
  22476. all: [],
  22477. any: [],
  22478. none: [ 'is-on-screen' ]
  22479. }, {
  22480. id: 'button-name',
  22481. selector: 'button',
  22482. matches: 'no-explicit-name-required-matches',
  22483. tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'section508', 'section508.22.a', 'ACT' ],
  22484. all: [],
  22485. any: [ 'button-has-visible-text', 'aria-label', 'aria-labelledby', {
  22486. options: {
  22487. attribute: 'title'
  22488. },
  22489. id: 'non-empty-title'
  22490. }, 'presentational-role' ],
  22491. none: []
  22492. }, {
  22493. id: 'bypass',
  22494. selector: 'html',
  22495. pageLevel: true,
  22496. matches: 'bypass-matches',
  22497. reviewOnFail: true,
  22498. tags: [ 'cat.keyboard', 'wcag2a', 'wcag241', 'section508', 'section508.22.o' ],
  22499. all: [],
  22500. any: [ 'internal-link-present', {
  22501. options: {
  22502. selector: ':is(h1, h2, h3, h4, h5, h6):not([role]), [role=heading]'
  22503. },
  22504. id: 'header-present'
  22505. }, {
  22506. options: {
  22507. selector: 'main, [role=main]'
  22508. },
  22509. id: 'landmark'
  22510. } ],
  22511. none: []
  22512. }, {
  22513. id: 'color-contrast',
  22514. matches: 'color-contrast-matches',
  22515. excludeHidden: false,
  22516. tags: [ 'cat.color', 'wcag2aa', 'wcag143' ],
  22517. all: [],
  22518. any: [ {
  22519. options: {
  22520. ignoreUnicode: true,
  22521. ignoreLength: false,
  22522. boldValue: 700,
  22523. boldTextPt: 14,
  22524. largeTextPt: 18,
  22525. contrastRatio: {
  22526. normal: {
  22527. expected: 4.5
  22528. },
  22529. large: {
  22530. expected: 3
  22531. }
  22532. },
  22533. shadowOutlineEmMax: .1
  22534. },
  22535. id: 'color-contrast'
  22536. } ],
  22537. none: []
  22538. }, {
  22539. id: 'css-orientation-lock',
  22540. selector: 'html',
  22541. tags: [ 'cat.structure', 'wcag134', 'wcag21aa', 'experimental' ],
  22542. all: [ {
  22543. options: {
  22544. degreeThreshold: 2
  22545. },
  22546. id: 'css-orientation-lock'
  22547. } ],
  22548. any: [],
  22549. none: [],
  22550. preload: true
  22551. }, {
  22552. id: 'definition-list',
  22553. selector: 'dl',
  22554. matches: 'no-role-matches',
  22555. tags: [ 'cat.structure', 'wcag2a', 'wcag131' ],
  22556. all: [],
  22557. any: [],
  22558. none: [ 'structured-dlitems', 'only-dlitems' ]
  22559. }, {
  22560. id: 'dlitem',
  22561. selector: 'dd, dt',
  22562. matches: 'no-role-matches',
  22563. tags: [ 'cat.structure', 'wcag2a', 'wcag131' ],
  22564. all: [],
  22565. any: [ 'dlitem' ],
  22566. none: []
  22567. }, {
  22568. id: 'document-title',
  22569. selector: 'html',
  22570. matches: 'is-initiator-matches',
  22571. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag242', 'ACT' ],
  22572. all: [],
  22573. any: [ 'doc-has-title' ],
  22574. none: []
  22575. }, {
  22576. id: 'duplicate-id-active',
  22577. selector: '[id]',
  22578. matches: 'duplicate-id-active-matches',
  22579. excludeHidden: false,
  22580. tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ],
  22581. all: [],
  22582. any: [ 'duplicate-id-active' ],
  22583. none: []
  22584. }, {
  22585. id: 'duplicate-id-aria',
  22586. selector: '[id]',
  22587. matches: 'duplicate-id-aria-matches',
  22588. excludeHidden: false,
  22589. tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ],
  22590. all: [],
  22591. any: [ 'duplicate-id-aria' ],
  22592. none: []
  22593. }, {
  22594. id: 'duplicate-id',
  22595. selector: '[id]',
  22596. matches: 'duplicate-id-misc-matches',
  22597. excludeHidden: false,
  22598. tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ],
  22599. all: [],
  22600. any: [ 'duplicate-id' ],
  22601. none: []
  22602. }, {
  22603. id: 'empty-heading',
  22604. selector: 'h1, h2, h3, h4, h5, h6, [role="heading"]',
  22605. matches: 'heading-matches',
  22606. tags: [ 'cat.name-role-value', 'best-practice' ],
  22607. impact: 'minor',
  22608. all: [],
  22609. any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
  22610. options: {
  22611. attribute: 'title'
  22612. },
  22613. id: 'non-empty-title'
  22614. } ],
  22615. none: []
  22616. }, {
  22617. id: 'empty-table-header',
  22618. selector: 'th, [role="rowheader"], [role="columnheader"]',
  22619. tags: [ 'wcag131', 'cat.aria' ],
  22620. reviewOnFail: true,
  22621. all: [],
  22622. any: [ 'has-visible-text' ],
  22623. none: []
  22624. }, {
  22625. id: 'focus-order-semantics',
  22626. selector: 'div, h1, h2, h3, h4, h5, h6, [role=heading], p, span',
  22627. matches: 'inserted-into-focus-order-matches',
  22628. tags: [ 'cat.keyboard', 'best-practice', 'experimental' ],
  22629. all: [],
  22630. any: [ {
  22631. options: [],
  22632. id: 'has-widget-role'
  22633. }, {
  22634. options: {
  22635. roles: [ 'tooltip' ]
  22636. },
  22637. id: 'valid-scrollable-semantics'
  22638. } ],
  22639. none: []
  22640. }, {
  22641. id: 'form-field-multiple-labels',
  22642. selector: 'input, select, textarea',
  22643. matches: 'label-matches',
  22644. tags: [ 'cat.forms', 'wcag2a', 'wcag332' ],
  22645. all: [],
  22646. any: [],
  22647. none: [ 'multiple-label' ]
  22648. }, {
  22649. id: 'frame-focusable-content',
  22650. selector: 'html',
  22651. matches: 'frame-focusable-content-matches',
  22652. tags: [ 'cat.keyboard', 'wcag2a', 'wcag211' ],
  22653. all: [],
  22654. any: [ 'frame-focusable-content' ],
  22655. none: []
  22656. }, {
  22657. id: 'frame-tested',
  22658. selector: 'frame, iframe',
  22659. tags: [ 'cat.structure', 'review-item', 'best-practice' ],
  22660. all: [ {
  22661. options: {
  22662. isViolation: false
  22663. },
  22664. id: 'frame-tested'
  22665. } ],
  22666. any: [],
  22667. none: []
  22668. }, {
  22669. id: 'frame-title-unique',
  22670. selector: 'frame[title], iframe[title]',
  22671. matches: 'frame-title-has-text-matches',
  22672. tags: [ 'cat.text-alternatives', 'best-practice' ],
  22673. all: [],
  22674. any: [],
  22675. none: [ 'unique-frame-title' ]
  22676. }, {
  22677. id: 'frame-title',
  22678. selector: 'frame, iframe',
  22679. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag241', 'wcag412', 'section508', 'section508.22.i' ],
  22680. all: [],
  22681. any: [ {
  22682. options: {
  22683. attribute: 'title'
  22684. },
  22685. id: 'non-empty-title'
  22686. }, 'aria-label', 'aria-labelledby', 'presentational-role' ],
  22687. none: []
  22688. }, {
  22689. id: 'heading-order',
  22690. selector: 'h1, h2, h3, h4, h5, h6, [role=heading]',
  22691. matches: 'heading-matches',
  22692. tags: [ 'cat.semantics', 'best-practice' ],
  22693. all: [],
  22694. any: [ 'heading-order' ],
  22695. none: []
  22696. }, {
  22697. id: 'hidden-content',
  22698. selector: '*',
  22699. excludeHidden: false,
  22700. tags: [ 'cat.structure', 'experimental', 'review-item', 'best-practice' ],
  22701. all: [],
  22702. any: [ 'hidden-content' ],
  22703. none: []
  22704. }, {
  22705. id: 'html-has-lang',
  22706. selector: 'html',
  22707. matches: 'is-initiator-matches',
  22708. tags: [ 'cat.language', 'wcag2a', 'wcag311', 'ACT' ],
  22709. all: [],
  22710. any: [ {
  22711. options: {
  22712. attributes: [ 'lang', 'xml:lang' ]
  22713. },
  22714. id: 'has-lang'
  22715. } ],
  22716. none: []
  22717. }, {
  22718. id: 'html-lang-valid',
  22719. selector: 'html[lang], html[xml\\:lang]',
  22720. tags: [ 'cat.language', 'wcag2a', 'wcag311', 'ACT' ],
  22721. all: [],
  22722. any: [],
  22723. none: [ {
  22724. options: {
  22725. attributes: [ 'lang', 'xml:lang' ]
  22726. },
  22727. id: 'valid-lang'
  22728. } ]
  22729. }, {
  22730. id: 'html-xml-lang-mismatch',
  22731. selector: 'html[lang][xml\\:lang]',
  22732. matches: 'xml-lang-mismatch-matches',
  22733. tags: [ 'cat.language', 'wcag2a', 'wcag311', 'ACT' ],
  22734. all: [ 'xml-lang-mismatch' ],
  22735. any: [],
  22736. none: []
  22737. }, {
  22738. id: 'identical-links-same-purpose',
  22739. selector: 'a[href], area[href], [role="link"]',
  22740. excludeHidden: false,
  22741. matches: 'identical-links-same-purpose-matches',
  22742. tags: [ 'cat.semantics', 'wcag2aaa', 'wcag249', 'best-practice' ],
  22743. all: [ 'identical-links-same-purpose' ],
  22744. any: [],
  22745. none: []
  22746. }, {
  22747. id: 'image-alt',
  22748. selector: 'img',
  22749. matches: 'no-explicit-name-required-matches',
  22750. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ],
  22751. all: [],
  22752. any: [ 'has-alt', 'aria-label', 'aria-labelledby', {
  22753. options: {
  22754. attribute: 'title'
  22755. },
  22756. id: 'non-empty-title'
  22757. }, 'presentational-role' ],
  22758. none: [ 'alt-space-value' ]
  22759. }, {
  22760. id: 'image-redundant-alt',
  22761. selector: 'img',
  22762. tags: [ 'cat.text-alternatives', 'best-practice' ],
  22763. all: [],
  22764. any: [],
  22765. none: [ {
  22766. options: {
  22767. parentSelector: 'button, [role=button], a[href], p, li, td, th'
  22768. },
  22769. id: 'duplicate-img-label'
  22770. } ]
  22771. }, {
  22772. id: 'input-button-name',
  22773. selector: 'input[type="button"], input[type="submit"], input[type="reset"]',
  22774. matches: 'no-explicit-name-required-matches',
  22775. tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'section508', 'section508.22.a' ],
  22776. all: [],
  22777. any: [ 'non-empty-if-present', {
  22778. options: {
  22779. attribute: 'value'
  22780. },
  22781. id: 'non-empty-value'
  22782. }, 'aria-label', 'aria-labelledby', {
  22783. options: {
  22784. attribute: 'title'
  22785. },
  22786. id: 'non-empty-title'
  22787. }, 'presentational-role' ],
  22788. none: []
  22789. }, {
  22790. id: 'input-image-alt',
  22791. selector: 'input[type="image"]',
  22792. matches: 'no-explicit-name-required-matches',
  22793. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ],
  22794. all: [],
  22795. any: [ {
  22796. options: {
  22797. attribute: 'alt'
  22798. },
  22799. id: 'non-empty-alt'
  22800. }, 'aria-label', 'aria-labelledby', {
  22801. options: {
  22802. attribute: 'title'
  22803. },
  22804. id: 'non-empty-title'
  22805. } ],
  22806. none: []
  22807. }, {
  22808. id: 'label-content-name-mismatch',
  22809. matches: 'label-content-name-mismatch-matches',
  22810. tags: [ 'cat.semantics', 'wcag21a', 'wcag253', 'experimental' ],
  22811. all: [],
  22812. any: [ {
  22813. options: {
  22814. pixelThreshold: .1,
  22815. occuranceThreshold: 3
  22816. },
  22817. id: 'label-content-name-mismatch'
  22818. } ],
  22819. none: []
  22820. }, {
  22821. id: 'label-title-only',
  22822. selector: 'input, select, textarea',
  22823. matches: 'label-matches',
  22824. tags: [ 'cat.forms', 'best-practice' ],
  22825. all: [],
  22826. any: [],
  22827. none: [ 'title-only' ]
  22828. }, {
  22829. id: 'label',
  22830. selector: 'input, textarea',
  22831. matches: 'label-matches',
  22832. tags: [ 'cat.forms', 'wcag2a', 'wcag412', 'wcag131', 'section508', 'section508.22.n', 'ACT' ],
  22833. all: [],
  22834. any: [ 'implicit-label', 'explicit-label', 'aria-label', 'aria-labelledby', {
  22835. options: {
  22836. attribute: 'title'
  22837. },
  22838. id: 'non-empty-title'
  22839. }, {
  22840. options: {
  22841. attribute: 'placeholder'
  22842. },
  22843. id: 'non-empty-placeholder'
  22844. }, 'presentational-role' ],
  22845. none: [ 'help-same-as-label', 'hidden-explicit-label' ]
  22846. }, {
  22847. id: 'landmark-banner-is-top-level',
  22848. selector: 'header:not([role]), [role=banner]',
  22849. matches: 'landmark-has-body-context-matches',
  22850. tags: [ 'cat.semantics', 'best-practice' ],
  22851. all: [],
  22852. any: [ 'landmark-is-top-level' ],
  22853. none: []
  22854. }, {
  22855. id: 'landmark-complementary-is-top-level',
  22856. selector: 'aside:not([role]), [role=complementary]',
  22857. tags: [ 'cat.semantics', 'best-practice' ],
  22858. all: [],
  22859. any: [ 'landmark-is-top-level' ],
  22860. none: []
  22861. }, {
  22862. id: 'landmark-contentinfo-is-top-level',
  22863. selector: 'footer:not([role]), [role=contentinfo]',
  22864. matches: 'landmark-has-body-context-matches',
  22865. tags: [ 'cat.semantics', 'best-practice' ],
  22866. all: [],
  22867. any: [ 'landmark-is-top-level' ],
  22868. none: []
  22869. }, {
  22870. id: 'landmark-main-is-top-level',
  22871. selector: 'main:not([role]), [role=main]',
  22872. tags: [ 'cat.semantics', 'best-practice' ],
  22873. all: [],
  22874. any: [ 'landmark-is-top-level' ],
  22875. none: []
  22876. }, {
  22877. id: 'landmark-no-duplicate-banner',
  22878. selector: 'header:not([role]), [role=banner]',
  22879. tags: [ 'cat.semantics', 'best-practice' ],
  22880. all: [],
  22881. any: [ {
  22882. options: {
  22883. selector: 'header:not([role]), [role=banner]',
  22884. nativeScopeFilter: 'article, aside, main, nav, section'
  22885. },
  22886. id: 'page-no-duplicate-banner'
  22887. } ],
  22888. none: []
  22889. }, {
  22890. id: 'landmark-no-duplicate-contentinfo',
  22891. selector: 'footer:not([role]), [role=contentinfo]',
  22892. tags: [ 'cat.semantics', 'best-practice' ],
  22893. all: [],
  22894. any: [ {
  22895. options: {
  22896. selector: 'footer:not([role]), [role=contentinfo]',
  22897. nativeScopeFilter: 'article, aside, main, nav, section'
  22898. },
  22899. id: 'page-no-duplicate-contentinfo'
  22900. } ],
  22901. none: []
  22902. }, {
  22903. id: 'landmark-no-duplicate-main',
  22904. selector: 'main:not([role]), [role=main]',
  22905. tags: [ 'cat.semantics', 'best-practice' ],
  22906. all: [],
  22907. any: [ {
  22908. options: {
  22909. selector: 'main:not([role]), [role=\'main\']'
  22910. },
  22911. id: 'page-no-duplicate-main'
  22912. } ],
  22913. none: []
  22914. }, {
  22915. id: 'landmark-one-main',
  22916. selector: 'html',
  22917. tags: [ 'cat.semantics', 'best-practice' ],
  22918. all: [ {
  22919. options: {
  22920. selector: 'main:not([role]), [role=\'main\']'
  22921. },
  22922. id: 'page-has-main'
  22923. } ],
  22924. any: [],
  22925. none: []
  22926. }, {
  22927. id: 'landmark-unique',
  22928. selector: '[role=banner], [role=complementary], [role=contentinfo], [role=main], [role=navigation], [role=region], [role=search], [role=form], form, footer, header, aside, main, nav, section',
  22929. tags: [ 'cat.semantics', 'best-practice' ],
  22930. matches: 'landmark-unique-matches',
  22931. all: [],
  22932. any: [ 'landmark-is-unique' ],
  22933. none: []
  22934. }, {
  22935. id: 'link-in-text-block',
  22936. selector: 'a[href], [role=link]',
  22937. matches: 'link-in-text-block-matches',
  22938. excludeHidden: false,
  22939. tags: [ 'cat.color', 'experimental', 'wcag2a', 'wcag141' ],
  22940. all: [ 'link-in-text-block' ],
  22941. any: [],
  22942. none: []
  22943. }, {
  22944. id: 'link-name',
  22945. selector: 'a[href]',
  22946. tags: [ 'cat.name-role-value', 'wcag2a', 'wcag412', 'wcag244', 'section508', 'section508.22.a', 'ACT' ],
  22947. all: [],
  22948. any: [ 'has-visible-text', 'aria-label', 'aria-labelledby', {
  22949. options: {
  22950. attribute: 'title'
  22951. },
  22952. id: 'non-empty-title'
  22953. } ],
  22954. none: [ 'focusable-no-name' ]
  22955. }, {
  22956. id: 'list',
  22957. selector: 'ul, ol',
  22958. matches: 'no-role-matches',
  22959. tags: [ 'cat.structure', 'wcag2a', 'wcag131' ],
  22960. all: [],
  22961. any: [],
  22962. none: [ 'only-listitems' ]
  22963. }, {
  22964. id: 'listitem',
  22965. selector: 'li',
  22966. matches: 'no-role-matches',
  22967. tags: [ 'cat.structure', 'wcag2a', 'wcag131' ],
  22968. all: [],
  22969. any: [ 'listitem' ],
  22970. none: []
  22971. }, {
  22972. id: 'marquee',
  22973. selector: 'marquee',
  22974. excludeHidden: false,
  22975. tags: [ 'cat.parsing', 'wcag2a', 'wcag222' ],
  22976. all: [],
  22977. any: [],
  22978. none: [ 'is-on-screen' ]
  22979. }, {
  22980. id: 'meta-refresh',
  22981. selector: 'meta[http-equiv="refresh"]',
  22982. excludeHidden: false,
  22983. tags: [ 'cat.time-and-media', 'wcag2a', 'wcag2aaa', 'wcag221', 'wcag224', 'wcag325' ],
  22984. all: [],
  22985. any: [ 'meta-refresh' ],
  22986. none: []
  22987. }, {
  22988. id: 'meta-viewport-large',
  22989. selector: 'meta[name="viewport"]',
  22990. matches: 'is-initiator-matches',
  22991. excludeHidden: false,
  22992. tags: [ 'cat.sensory-and-visual-cues', 'best-practice' ],
  22993. all: [],
  22994. any: [ {
  22995. options: {
  22996. scaleMinimum: 5,
  22997. lowerBound: 2
  22998. },
  22999. id: 'meta-viewport-large'
  23000. } ],
  23001. none: []
  23002. }, {
  23003. id: 'meta-viewport',
  23004. selector: 'meta[name="viewport"]',
  23005. matches: 'is-initiator-matches',
  23006. excludeHidden: false,
  23007. tags: [ 'cat.sensory-and-visual-cues', 'best-practice', 'ACT' ],
  23008. all: [],
  23009. any: [ {
  23010. options: {
  23011. scaleMinimum: 2
  23012. },
  23013. id: 'meta-viewport'
  23014. } ],
  23015. none: []
  23016. }, {
  23017. id: 'nested-interactive',
  23018. matches: 'nested-interactive-matches',
  23019. tags: [ 'cat.keyboard', 'wcag2a', 'wcag412' ],
  23020. all: [],
  23021. any: [ 'no-focusable-content' ],
  23022. none: []
  23023. }, {
  23024. id: 'no-autoplay-audio',
  23025. excludeHidden: false,
  23026. selector: 'audio[autoplay], video[autoplay]',
  23027. matches: 'no-autoplay-audio-matches',
  23028. tags: [ 'cat.time-and-media', 'wcag2a', 'wcag142', 'experimental' ],
  23029. preload: true,
  23030. all: [ {
  23031. options: {
  23032. allowedDuration: 3
  23033. },
  23034. id: 'no-autoplay-audio'
  23035. } ],
  23036. any: [],
  23037. none: []
  23038. }, {
  23039. id: 'object-alt',
  23040. selector: 'object',
  23041. matches: 'no-explicit-name-required-matches',
  23042. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a' ],
  23043. all: [],
  23044. any: [ 'aria-label', 'aria-labelledby', {
  23045. options: {
  23046. attribute: 'title'
  23047. },
  23048. id: 'non-empty-title'
  23049. }, 'presentational-role' ],
  23050. none: []
  23051. }, {
  23052. id: 'p-as-heading',
  23053. selector: 'p',
  23054. matches: 'p-as-heading-matches',
  23055. tags: [ 'cat.semantics', 'wcag2a', 'wcag131', 'experimental' ],
  23056. all: [ {
  23057. options: {
  23058. margins: [ {
  23059. weight: 150,
  23060. italic: true
  23061. }, {
  23062. weight: 150,
  23063. size: 1.15
  23064. }, {
  23065. italic: true,
  23066. size: 1.15
  23067. }, {
  23068. size: 1.4
  23069. } ]
  23070. },
  23071. id: 'p-as-heading'
  23072. } ],
  23073. any: [],
  23074. none: []
  23075. }, {
  23076. id: 'page-has-heading-one',
  23077. selector: 'html',
  23078. tags: [ 'cat.semantics', 'best-practice' ],
  23079. all: [ {
  23080. options: {
  23081. selector: 'h1:not([role], [aria-level]), :is(h1, h2, h3, h4, h5, h6):not([role])[aria-level=1], [role=heading][aria-level=1]'
  23082. },
  23083. id: 'page-has-heading-one'
  23084. } ],
  23085. any: [],
  23086. none: []
  23087. }, {
  23088. id: 'presentation-role-conflict',
  23089. matches: 'has-implicit-chromium-role-matches',
  23090. selector: '[role="none"], [role="presentation"]',
  23091. tags: [ 'cat.aria', 'best-practice' ],
  23092. all: [],
  23093. any: [],
  23094. none: [ 'is-element-focusable', 'has-global-aria-attribute' ]
  23095. }, {
  23096. id: 'region',
  23097. selector: 'body *',
  23098. tags: [ 'cat.keyboard', 'best-practice' ],
  23099. all: [],
  23100. any: [ {
  23101. options: {
  23102. regionMatcher: 'dialog, [role=dialog], [role=alertdialog], svg, iframe'
  23103. },
  23104. id: 'region'
  23105. } ],
  23106. none: []
  23107. }, {
  23108. id: 'role-img-alt',
  23109. selector: '[role=\'img\']:not(img, area, input, object)',
  23110. matches: 'html-namespace-matches',
  23111. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ],
  23112. all: [],
  23113. any: [ 'aria-label', 'aria-labelledby', {
  23114. options: {
  23115. attribute: 'title'
  23116. },
  23117. id: 'non-empty-title'
  23118. } ],
  23119. none: []
  23120. }, {
  23121. id: 'scope-attr-valid',
  23122. selector: 'td[scope], th[scope]',
  23123. tags: [ 'cat.tables', 'best-practice' ],
  23124. all: [ 'html5-scope', {
  23125. options: {
  23126. values: [ 'row', 'col', 'rowgroup', 'colgroup' ]
  23127. },
  23128. id: 'scope-value'
  23129. } ],
  23130. any: [],
  23131. none: []
  23132. }, {
  23133. id: 'scrollable-region-focusable',
  23134. matches: 'scrollable-region-focusable-matches',
  23135. tags: [ 'cat.keyboard', 'wcag2a', 'wcag211' ],
  23136. all: [],
  23137. any: [ 'focusable-content', 'focusable-element' ],
  23138. none: []
  23139. }, {
  23140. id: 'select-name',
  23141. selector: 'select',
  23142. tags: [ 'cat.forms', 'wcag2a', 'wcag412', 'wcag131', 'section508', 'section508.22.n', 'ACT' ],
  23143. all: [],
  23144. any: [ 'implicit-label', 'explicit-label', 'aria-label', 'aria-labelledby', {
  23145. options: {
  23146. attribute: 'title'
  23147. },
  23148. id: 'non-empty-title'
  23149. }, 'presentational-role' ],
  23150. none: [ 'help-same-as-label', 'hidden-explicit-label' ]
  23151. }, {
  23152. id: 'server-side-image-map',
  23153. selector: 'img[ismap]',
  23154. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag211', 'section508', 'section508.22.f' ],
  23155. all: [],
  23156. any: [],
  23157. none: [ 'exists' ]
  23158. }, {
  23159. id: 'skip-link',
  23160. selector: 'a[href^="#"], a[href^="/#"]',
  23161. matches: 'skip-link-matches',
  23162. tags: [ 'cat.keyboard', 'best-practice' ],
  23163. all: [],
  23164. any: [ 'skip-link' ],
  23165. none: []
  23166. }, {
  23167. id: 'svg-img-alt',
  23168. selector: '[role="img"], [role="graphics-symbol"], svg[role="graphics-document"]',
  23169. matches: 'svg-namespace-matches',
  23170. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag111', 'section508', 'section508.22.a', 'ACT' ],
  23171. all: [],
  23172. any: [ 'svg-non-empty-title', 'aria-label', 'aria-labelledby', {
  23173. options: {
  23174. attribute: 'title'
  23175. },
  23176. id: 'non-empty-title'
  23177. } ],
  23178. none: []
  23179. }, {
  23180. id: 'tabindex',
  23181. selector: '[tabindex]',
  23182. tags: [ 'cat.keyboard', 'best-practice' ],
  23183. all: [],
  23184. any: [ 'tabindex' ],
  23185. none: []
  23186. }, {
  23187. id: 'table-duplicate-name',
  23188. selector: 'table',
  23189. tags: [ 'cat.tables', 'best-practice' ],
  23190. all: [],
  23191. any: [],
  23192. none: [ 'same-caption-summary' ]
  23193. }, {
  23194. id: 'table-fake-caption',
  23195. selector: 'table',
  23196. matches: 'data-table-matches',
  23197. tags: [ 'cat.tables', 'experimental', 'wcag2a', 'wcag131', 'section508', 'section508.22.g' ],
  23198. all: [ 'caption-faked' ],
  23199. any: [],
  23200. none: []
  23201. }, {
  23202. id: 'td-has-header',
  23203. selector: 'table',
  23204. matches: 'data-table-large-matches',
  23205. tags: [ 'cat.tables', 'experimental', 'wcag2a', 'wcag131', 'section508', 'section508.22.g' ],
  23206. all: [ 'td-has-header' ],
  23207. any: [],
  23208. none: []
  23209. }, {
  23210. id: 'td-headers-attr',
  23211. selector: 'table',
  23212. tags: [ 'cat.tables', 'wcag2a', 'wcag131', 'section508', 'section508.22.g' ],
  23213. all: [ 'td-headers-attr' ],
  23214. any: [],
  23215. none: []
  23216. }, {
  23217. id: 'th-has-data-cells',
  23218. selector: 'table',
  23219. matches: 'data-table-matches',
  23220. tags: [ 'cat.tables', 'wcag2a', 'wcag131', 'section508', 'section508.22.g' ],
  23221. all: [ 'th-has-data-cells' ],
  23222. any: [],
  23223. none: []
  23224. }, {
  23225. id: 'valid-lang',
  23226. selector: '[lang], [xml\\:lang]',
  23227. matches: 'not-html-matches',
  23228. tags: [ 'cat.language', 'wcag2aa', 'wcag312' ],
  23229. all: [],
  23230. any: [],
  23231. none: [ {
  23232. options: {
  23233. attributes: [ 'lang', 'xml:lang' ]
  23234. },
  23235. id: 'valid-lang'
  23236. } ]
  23237. }, {
  23238. id: 'video-caption',
  23239. selector: 'video',
  23240. excludeHidden: false,
  23241. tags: [ 'cat.text-alternatives', 'wcag2a', 'wcag122', 'section508', 'section508.22.a' ],
  23242. all: [],
  23243. any: [],
  23244. none: [ 'caption' ]
  23245. } ],
  23246. checks: [ {
  23247. id: 'abstractrole',
  23248. evaluate: 'abstractrole-evaluate'
  23249. }, {
  23250. id: 'aria-allowed-attr',
  23251. evaluate: 'aria-allowed-attr-evaluate'
  23252. }, {
  23253. id: 'aria-allowed-role',
  23254. evaluate: 'aria-allowed-role-evaluate',
  23255. options: {
  23256. allowImplicit: true,
  23257. ignoredTags: []
  23258. }
  23259. }, {
  23260. id: 'aria-errormessage',
  23261. evaluate: 'aria-errormessage-evaluate'
  23262. }, {
  23263. id: 'aria-hidden-body',
  23264. evaluate: 'aria-hidden-body-evaluate'
  23265. }, {
  23266. id: 'aria-prohibited-attr',
  23267. evaluate: 'aria-prohibited-attr-evaluate',
  23268. options: {
  23269. elementsAllowedAriaLabel: [ 'applet', 'input' ]
  23270. }
  23271. }, {
  23272. id: 'aria-required-attr',
  23273. evaluate: 'aria-required-attr-evaluate'
  23274. }, {
  23275. id: 'aria-required-children',
  23276. evaluate: 'aria-required-children-evaluate',
  23277. options: {
  23278. reviewEmpty: [ 'doc-bibliography', 'doc-endnotes', 'grid', 'list', 'listbox', 'table', 'tablist', 'tree', 'treegrid', 'rowgroup' ]
  23279. }
  23280. }, {
  23281. id: 'aria-required-parent',
  23282. evaluate: 'aria-required-parent-evaluate',
  23283. options: {
  23284. ownGroupRoles: [ 'listitem', 'treeitem' ]
  23285. }
  23286. }, {
  23287. id: 'aria-roledescription',
  23288. evaluate: 'aria-roledescription-evaluate',
  23289. options: {
  23290. supportedRoles: [ 'button', 'img', 'checkbox', 'radio', 'combobox', 'menuitemcheckbox', 'menuitemradio' ]
  23291. }
  23292. }, {
  23293. id: 'aria-unsupported-attr',
  23294. evaluate: 'aria-unsupported-attr-evaluate'
  23295. }, {
  23296. id: 'aria-valid-attr-value',
  23297. evaluate: 'aria-valid-attr-value-evaluate',
  23298. options: []
  23299. }, {
  23300. id: 'aria-valid-attr',
  23301. evaluate: 'aria-valid-attr-evaluate',
  23302. options: []
  23303. }, {
  23304. id: 'fallbackrole',
  23305. evaluate: 'fallbackrole-evaluate'
  23306. }, {
  23307. id: 'has-global-aria-attribute',
  23308. evaluate: 'has-global-aria-attribute-evaluate'
  23309. }, {
  23310. id: 'has-widget-role',
  23311. evaluate: 'has-widget-role-evaluate',
  23312. options: []
  23313. }, {
  23314. id: 'invalidrole',
  23315. evaluate: 'invalidrole-evaluate'
  23316. }, {
  23317. id: 'is-element-focusable',
  23318. evaluate: 'is-element-focusable-evaluate'
  23319. }, {
  23320. id: 'no-implicit-explicit-label',
  23321. evaluate: 'no-implicit-explicit-label-evaluate'
  23322. }, {
  23323. id: 'unsupportedrole',
  23324. evaluate: 'unsupportedrole-evaluate'
  23325. }, {
  23326. id: 'valid-scrollable-semantics',
  23327. evaluate: 'valid-scrollable-semantics-evaluate',
  23328. options: {
  23329. roles: [ 'tooltip' ]
  23330. }
  23331. }, {
  23332. id: 'color-contrast',
  23333. evaluate: 'color-contrast-evaluate',
  23334. options: {
  23335. ignoreUnicode: true,
  23336. ignoreLength: false,
  23337. boldValue: 700,
  23338. boldTextPt: 14,
  23339. largeTextPt: 18,
  23340. contrastRatio: {
  23341. normal: {
  23342. expected: 4.5
  23343. },
  23344. large: {
  23345. expected: 3
  23346. }
  23347. },
  23348. shadowOutlineEmMax: .1
  23349. }
  23350. }, {
  23351. id: 'link-in-text-block',
  23352. evaluate: 'link-in-text-block-evaluate'
  23353. }, {
  23354. id: 'autocomplete-appropriate',
  23355. evaluate: 'autocomplete-appropriate-evaluate'
  23356. }, {
  23357. id: 'autocomplete-valid',
  23358. evaluate: 'autocomplete-valid-evaluate'
  23359. }, {
  23360. id: 'accesskeys',
  23361. evaluate: 'accesskeys-evaluate',
  23362. after: 'accesskeys-after'
  23363. }, {
  23364. id: 'focusable-content',
  23365. evaluate: 'focusable-content-evaluate'
  23366. }, {
  23367. id: 'focusable-disabled',
  23368. evaluate: 'focusable-disabled-evaluate'
  23369. }, {
  23370. id: 'focusable-element',
  23371. evaluate: 'focusable-element-evaluate'
  23372. }, {
  23373. id: 'focusable-modal-open',
  23374. evaluate: 'focusable-modal-open-evaluate'
  23375. }, {
  23376. id: 'focusable-no-name',
  23377. evaluate: 'focusable-no-name-evaluate'
  23378. }, {
  23379. id: 'focusable-not-tabbable',
  23380. evaluate: 'focusable-not-tabbable-evaluate'
  23381. }, {
  23382. id: 'frame-focusable-content',
  23383. evaluate: 'no-focusable-content-evaluate'
  23384. }, {
  23385. id: 'landmark-is-top-level',
  23386. evaluate: 'landmark-is-top-level-evaluate'
  23387. }, {
  23388. id: 'no-focusable-content',
  23389. evaluate: 'no-focusable-content-evaluate'
  23390. }, {
  23391. id: 'page-has-heading-one',
  23392. evaluate: 'has-descendant-evaluate',
  23393. after: 'has-descendant-after',
  23394. options: {
  23395. selector: 'h1:not([role], [aria-level]), :is(h1, h2, h3, h4, h5, h6):not([role])[aria-level=1], [role=heading][aria-level=1]'
  23396. }
  23397. }, {
  23398. id: 'page-has-main',
  23399. evaluate: 'has-descendant-evaluate',
  23400. after: 'has-descendant-after',
  23401. options: {
  23402. selector: 'main:not([role]), [role=\'main\']'
  23403. }
  23404. }, {
  23405. id: 'page-no-duplicate-banner',
  23406. evaluate: 'page-no-duplicate-evaluate',
  23407. after: 'page-no-duplicate-after',
  23408. options: {
  23409. selector: 'header:not([role]), [role=banner]',
  23410. nativeScopeFilter: 'article, aside, main, nav, section'
  23411. }
  23412. }, {
  23413. id: 'page-no-duplicate-contentinfo',
  23414. evaluate: 'page-no-duplicate-evaluate',
  23415. after: 'page-no-duplicate-after',
  23416. options: {
  23417. selector: 'footer:not([role]), [role=contentinfo]',
  23418. nativeScopeFilter: 'article, aside, main, nav, section'
  23419. }
  23420. }, {
  23421. id: 'page-no-duplicate-main',
  23422. evaluate: 'page-no-duplicate-evaluate',
  23423. after: 'page-no-duplicate-after',
  23424. options: {
  23425. selector: 'main:not([role]), [role=\'main\']'
  23426. }
  23427. }, {
  23428. id: 'tabindex',
  23429. evaluate: 'tabindex-evaluate'
  23430. }, {
  23431. id: 'alt-space-value',
  23432. evaluate: 'alt-space-value-evaluate'
  23433. }, {
  23434. id: 'duplicate-img-label',
  23435. evaluate: 'duplicate-img-label-evaluate',
  23436. options: {
  23437. parentSelector: 'button, [role=button], a[href], p, li, td, th'
  23438. }
  23439. }, {
  23440. id: 'explicit-label',
  23441. evaluate: 'explicit-evaluate'
  23442. }, {
  23443. id: 'help-same-as-label',
  23444. evaluate: 'help-same-as-label-evaluate',
  23445. enabled: false
  23446. }, {
  23447. id: 'hidden-explicit-label',
  23448. evaluate: 'hidden-explicit-label-evaluate'
  23449. }, {
  23450. id: 'implicit-label',
  23451. evaluate: 'implicit-evaluate'
  23452. }, {
  23453. id: 'label-content-name-mismatch',
  23454. evaluate: 'label-content-name-mismatch-evaluate',
  23455. options: {
  23456. pixelThreshold: .1,
  23457. occuranceThreshold: 3
  23458. }
  23459. }, {
  23460. id: 'multiple-label',
  23461. evaluate: 'multiple-label-evaluate'
  23462. }, {
  23463. id: 'title-only',
  23464. evaluate: 'title-only-evaluate'
  23465. }, {
  23466. id: 'landmark-is-unique',
  23467. evaluate: 'landmark-is-unique-evaluate',
  23468. after: 'landmark-is-unique-after'
  23469. }, {
  23470. id: 'has-lang',
  23471. evaluate: 'has-lang-evaluate',
  23472. options: {
  23473. attributes: [ 'lang', 'xml:lang' ]
  23474. }
  23475. }, {
  23476. id: 'valid-lang',
  23477. evaluate: 'valid-lang-evaluate',
  23478. options: {
  23479. attributes: [ 'lang', 'xml:lang' ]
  23480. }
  23481. }, {
  23482. id: 'xml-lang-mismatch',
  23483. evaluate: 'xml-lang-mismatch-evaluate'
  23484. }, {
  23485. id: 'dlitem',
  23486. evaluate: 'dlitem-evaluate'
  23487. }, {
  23488. id: 'listitem',
  23489. evaluate: 'listitem-evaluate'
  23490. }, {
  23491. id: 'only-dlitems',
  23492. evaluate: 'only-dlitems-evaluate'
  23493. }, {
  23494. id: 'only-listitems',
  23495. evaluate: 'only-listitems-evaluate'
  23496. }, {
  23497. id: 'structured-dlitems',
  23498. evaluate: 'structured-dlitems-evaluate'
  23499. }, {
  23500. id: 'caption',
  23501. evaluate: 'caption-evaluate'
  23502. }, {
  23503. id: 'frame-tested',
  23504. evaluate: 'frame-tested-evaluate',
  23505. options: {
  23506. isViolation: false
  23507. }
  23508. }, {
  23509. id: 'no-autoplay-audio',
  23510. evaluate: 'no-autoplay-audio-evaluate',
  23511. options: {
  23512. allowedDuration: 3
  23513. }
  23514. }, {
  23515. id: 'css-orientation-lock',
  23516. evaluate: 'css-orientation-lock-evaluate',
  23517. options: {
  23518. degreeThreshold: 2
  23519. }
  23520. }, {
  23521. id: 'meta-viewport-large',
  23522. evaluate: 'meta-viewport-scale-evaluate',
  23523. options: {
  23524. scaleMinimum: 5,
  23525. lowerBound: 2
  23526. }
  23527. }, {
  23528. id: 'meta-viewport',
  23529. evaluate: 'meta-viewport-scale-evaluate',
  23530. options: {
  23531. scaleMinimum: 2
  23532. }
  23533. }, {
  23534. id: 'header-present',
  23535. evaluate: 'has-descendant-evaluate',
  23536. after: 'has-descendant-after',
  23537. options: {
  23538. selector: ':is(h1, h2, h3, h4, h5, h6):not([role]), [role=heading]'
  23539. }
  23540. }, {
  23541. id: 'heading-order',
  23542. evaluate: 'heading-order-evaluate',
  23543. after: 'heading-order-after'
  23544. }, {
  23545. id: 'identical-links-same-purpose',
  23546. evaluate: 'identical-links-same-purpose-evaluate',
  23547. after: 'identical-links-same-purpose-after'
  23548. }, {
  23549. id: 'internal-link-present',
  23550. evaluate: 'internal-link-present-evaluate'
  23551. }, {
  23552. id: 'landmark',
  23553. evaluate: 'has-descendant-evaluate',
  23554. options: {
  23555. selector: 'main, [role=main]'
  23556. }
  23557. }, {
  23558. id: 'meta-refresh',
  23559. evaluate: 'meta-refresh-evaluate'
  23560. }, {
  23561. id: 'p-as-heading',
  23562. evaluate: 'p-as-heading-evaluate',
  23563. options: {
  23564. margins: [ {
  23565. weight: 150,
  23566. italic: true
  23567. }, {
  23568. weight: 150,
  23569. size: 1.15
  23570. }, {
  23571. italic: true,
  23572. size: 1.15
  23573. }, {
  23574. size: 1.4
  23575. } ]
  23576. }
  23577. }, {
  23578. id: 'region',
  23579. evaluate: 'region-evaluate',
  23580. options: {
  23581. regionMatcher: 'dialog, [role=dialog], [role=alertdialog], svg, iframe'
  23582. }
  23583. }, {
  23584. id: 'skip-link',
  23585. evaluate: 'skip-link-evaluate'
  23586. }, {
  23587. id: 'unique-frame-title',
  23588. evaluate: 'unique-frame-title-evaluate',
  23589. after: 'unique-frame-title-after'
  23590. }, {
  23591. id: 'duplicate-id-active',
  23592. evaluate: 'duplicate-id-evaluate',
  23593. after: 'duplicate-id-after'
  23594. }, {
  23595. id: 'duplicate-id-aria',
  23596. evaluate: 'duplicate-id-evaluate',
  23597. after: 'duplicate-id-after'
  23598. }, {
  23599. id: 'duplicate-id',
  23600. evaluate: 'duplicate-id-evaluate',
  23601. after: 'duplicate-id-after'
  23602. }, {
  23603. id: 'aria-label',
  23604. evaluate: 'aria-label-evaluate'
  23605. }, {
  23606. id: 'aria-labelledby',
  23607. evaluate: 'aria-labelledby-evaluate'
  23608. }, {
  23609. id: 'avoid-inline-spacing',
  23610. evaluate: 'avoid-inline-spacing-evaluate',
  23611. options: {
  23612. cssProperties: [ 'line-height', 'letter-spacing', 'word-spacing' ]
  23613. }
  23614. }, {
  23615. id: 'button-has-visible-text',
  23616. evaluate: 'has-text-content-evaluate'
  23617. }, {
  23618. id: 'doc-has-title',
  23619. evaluate: 'doc-has-title-evaluate'
  23620. }, {
  23621. id: 'exists',
  23622. evaluate: 'exists-evaluate'
  23623. }, {
  23624. id: 'has-alt',
  23625. evaluate: 'has-alt-evaluate'
  23626. }, {
  23627. id: 'has-visible-text',
  23628. evaluate: 'has-text-content-evaluate'
  23629. }, {
  23630. id: 'is-on-screen',
  23631. evaluate: 'is-on-screen-evaluate'
  23632. }, {
  23633. id: 'non-empty-alt',
  23634. evaluate: 'attr-non-space-content-evaluate',
  23635. options: {
  23636. attribute: 'alt'
  23637. }
  23638. }, {
  23639. id: 'non-empty-if-present',
  23640. evaluate: 'non-empty-if-present-evaluate'
  23641. }, {
  23642. id: 'non-empty-placeholder',
  23643. evaluate: 'attr-non-space-content-evaluate',
  23644. options: {
  23645. attribute: 'placeholder'
  23646. }
  23647. }, {
  23648. id: 'non-empty-title',
  23649. evaluate: 'attr-non-space-content-evaluate',
  23650. options: {
  23651. attribute: 'title'
  23652. }
  23653. }, {
  23654. id: 'non-empty-value',
  23655. evaluate: 'attr-non-space-content-evaluate',
  23656. options: {
  23657. attribute: 'value'
  23658. }
  23659. }, {
  23660. id: 'presentational-role',
  23661. evaluate: 'presentational-role-evaluate'
  23662. }, {
  23663. id: 'role-none',
  23664. evaluate: 'matches-definition-evaluate',
  23665. deprecated: true,
  23666. options: {
  23667. matcher: {
  23668. attributes: {
  23669. role: 'none'
  23670. }
  23671. }
  23672. }
  23673. }, {
  23674. id: 'role-presentation',
  23675. evaluate: 'matches-definition-evaluate',
  23676. deprecated: true,
  23677. options: {
  23678. matcher: {
  23679. attributes: {
  23680. role: 'presentation'
  23681. }
  23682. }
  23683. }
  23684. }, {
  23685. id: 'svg-non-empty-title',
  23686. evaluate: 'svg-non-empty-title-evaluate'
  23687. }, {
  23688. id: 'caption-faked',
  23689. evaluate: 'caption-faked-evaluate'
  23690. }, {
  23691. id: 'html5-scope',
  23692. evaluate: 'html5-scope-evaluate'
  23693. }, {
  23694. id: 'same-caption-summary',
  23695. evaluate: 'same-caption-summary-evaluate'
  23696. }, {
  23697. id: 'scope-value',
  23698. evaluate: 'scope-value-evaluate',
  23699. options: {
  23700. values: [ 'row', 'col', 'rowgroup', 'colgroup' ]
  23701. }
  23702. }, {
  23703. id: 'td-has-header',
  23704. evaluate: 'td-has-header-evaluate'
  23705. }, {
  23706. id: 'td-headers-attr',
  23707. evaluate: 'td-headers-attr-evaluate'
  23708. }, {
  23709. id: 'th-has-data-cells',
  23710. evaluate: 'th-has-data-cells-evaluate'
  23711. }, {
  23712. id: 'hidden-content',
  23713. evaluate: 'hidden-content-evaluate'
  23714. } ]
  23715. });
  23716. })(typeof window === 'object' ? window : this);