Repository: quailjs/quail Branch: master Commit: 18c40889876b Files: 1097 Total size: 2.8 MB Directory structure: gitextract_r5hs_4ma/ ├── .babelrc ├── .editorconfig ├── .eslintrc ├── .gitignore ├── .jscsrc ├── .jshintrc ├── .nvmrc ├── .quailrc ├── .travis.yml ├── CHANGELOG.md ├── LICENSE-MIT ├── README.md ├── bin/ │ └── quail.js ├── config/ │ └── all_assessments.json ├── dist/ │ ├── bundle.js │ └── runInBrowser.js ├── docs/ │ ├── Makefile │ ├── building.rst │ ├── conf.py │ ├── index.rst │ ├── make.bat │ ├── server-scanning.rst │ └── tests/ │ ├── aAdjacentWithSameResourceShouldBeCombined.rst │ ├── aImgAltNotRepetative.rst │ ├── aLinkTextDoesNotBeginWithRedundantWord.rst │ ├── aLinksAreSeperatedByPrintableCharacters.rst │ ├── aLinksDontOpenNewWindow.rst │ ├── aLinksMakeSenseOutOfContext.rst │ ├── aLinksToMultiMediaRequireTranscript.rst │ ├── aLinksToSoundFilesNeedTranscripts.rst │ ├── aMustContainText.rst │ ├── aMustHaveTitle.rst │ ├── aMustNotHaveJavascriptHref.rst │ ├── aSuspiciousLinkText.rst │ ├── aTitleDescribesDestination.rst │ ├── addressForAuthor.rst │ ├── addressForAuthorMustBeValid.rst │ ├── appletContainsTextEquivalent.rst │ ├── appletContainsTextEquivalentInAlt.rst │ ├── appletProvidesMechanismToReturnToParent.rst │ ├── appletUIMustBeAccessible.rst │ ├── appletsDoNotFlicker.rst │ ├── appletsDoneUseColorAlone.rst │ ├── areaAltIdentifiesDestination.rst │ ├── areaAltRefersToText.rst │ ├── areaDontOpenNewWindow.rst │ ├── areaHasAltValue.rst │ ├── areaLinksToSoundFile.rst │ ├── ariaOrphanedContent.rst │ ├── basefontIsNotUsed.rst │ ├── blinkIsNotUsed.rst │ ├── blockquoteNotUsedForIndentation.rst │ ├── blockquoteUseForQuotations.rst │ ├── bodyActiveLinkColorContrast.rst │ ├── bodyColorContrast.rst │ ├── bodyLinkColorContrast.rst │ ├── bodyMustNotHaveBackground.rst │ ├── bodyVisitedLinkColorContrast.rst │ ├── boldIsNotUsed.rst │ ├── checkboxHasLabel.rst │ ├── cssDocumentMakesSenseStyleTurnedOff.rst │ ├── cssTextHasContrast.rst │ ├── doctypeProvided.rst │ ├── documentAbbrIsUsed.rst │ ├── documentAcronymsHaveElement.rst │ ├── documentAllColorsAreSet.rst │ ├── documentAutoRedirectNotUsed.rst │ ├── documentColorWaiActiveLinkAlgorithim.rst │ ├── documentColorWaiAlgorithim.rst │ ├── documentColorWaiLinkAlgorithim.rst │ ├── documentColorWaiVisitedLinkAlgorithim.rst │ ├── documentContentReadableWithoutStylesheets.rst │ ├── documentHasTitleElement.rst │ ├── documentIDsMustBeUnique.rst │ ├── documentIsWrittenClearly.rst │ ├── documentLangIsISO639Standard.rst │ ├── documentLangNotIdentified.rst │ ├── documentMetaNotUsedWithTimeout.rst │ ├── documentReadingDirection.rst │ ├── documentStrictDocType.rst │ ├── documentTitleDescribesDocument.rst │ ├── documentTitleIsNotPlaceholder.rst │ ├── documentTitleIsShort.rst │ ├── documentTitleNotEmpty.rst │ ├── documentVisualListsAreMarkedUp.rst │ ├── documentWordsNotInLanguageAreMarked.rst │ ├── embedHasAssociatedNoEmbed.rst │ ├── embedMustHaveAltAttribute.rst │ ├── embedMustNotHaveEmptyAlt.rst │ ├── embedProvidesMechanismToReturnToParent.rst │ ├── fileHasLabel.rst │ ├── fontIsNotUsed.rst │ ├── formDeleteIsReversable.rst │ ├── formErrorMessageHelpsUser.rst │ ├── formHasGoodErrorMessage.rst │ ├── formWithRequiredLabel.rst │ ├── frameIsNotUsed.rst │ ├── frameRelationshipsMustBeDescribed.rst │ ├── frameSrcIsAccessible.rst │ ├── frameTitlesDescribeFunction.rst │ ├── frameTitlesNotEmpty.rst │ ├── frameTitlesNotPlaceholder.rst │ ├── framesHaveATitle.rst │ ├── framesetIsNotUsed.rst │ ├── framesetMustHaveNoFramesSection.rst │ ├── headerH1.rst │ ├── headerH1Format.rst │ ├── headerH2.rst │ ├── headerH2Format.rst │ ├── headerH3.rst │ ├── headerH3Format.rst │ ├── headerH4.rst │ ├── headerH4Format.rst │ ├── headerH5.rst │ ├── headerH5Format.rst │ ├── headerH6Format.rst │ ├── headersHaveText.rst │ ├── headersUseToMarkSections.rst │ ├── iIsNotUsed.rst │ ├── iframeMustNotHaveLongdesc.rst │ ├── imageMapServerSide.rst │ ├── imgAltEmptyForDecorativeImages.rst │ ├── imgAltIdentifiesLinkDestination.rst │ ├── imgAltIsDifferent.rst │ ├── imgAltIsSameInText.rst │ ├── imgAltIsTooLong.rst │ ├── imgAltNotEmptyInAnchor.rst │ ├── imgAltNotPlaceHolder.rst │ ├── imgHasAlt.rst │ ├── imgHasLongDesc.rst │ ├── imgImportantNoSpacerAlt.rst │ ├── imgMapAreasHaveDuplicateLink.rst │ ├── imgNeedsLongDescWDlink.rst │ ├── imgNonDecorativeHasAlt.rst │ ├── imgNotReferredToByColorAlone.rst │ ├── imgServerSideMapNotUsed.rst │ ├── imgShouldNotHaveTitle.rst │ ├── imgWithMapHasUseMap.rst │ ├── inputCheckboxRequiresFieldset.rst │ ├── inputElementsDontHaveAlt.rst │ ├── inputImageAltIsNotFileName.rst │ ├── inputImageAltIsNotPlaceholder.rst │ ├── inputImageAltIsShort.rst │ ├── inputImageAltNotRedundant.rst │ ├── inputImageHasAlt.rst │ ├── inputTextHasLabel.rst │ ├── inputTextHasValue.rst │ ├── inputTextValueNotEmpty.rst │ ├── labelDoesNotContainInput.rst │ ├── labelMustBeUnique.rst │ ├── labelMustNotBeEmpty.rst │ ├── labelsAreAssignedToAnInput.rst │ ├── legendTextNotEmpty.rst │ ├── legendTextNotPlaceholder.rst │ ├── linkUsedForAlternateContent.rst │ ├── linkUsedToDescribeNavigation.rst │ ├── listNotUsedForFormatting.rst │ ├── marqueeIsNotUsed.rst │ ├── noembedHasEquivalentContent.rst │ ├── noframesSectionMustHaveTextEquivalent.rst │ ├── objectContentUsableWhenDisabled.rst │ ├── objectDoesNotFlicker.rst │ ├── objectDoesNotUseColorAlone.rst │ ├── objectInterfaceIsAccessible.rst │ ├── objectLinkToMultimediaHasTextTranscript.rst │ ├── objectMustContainText.rst │ ├── objectMustHaveEmbed.rst │ ├── objectMustHaveTitle.rst │ ├── objectMustHaveValidTitle.rst │ ├── objectProvidesMechanismToReturnToParent.rst │ ├── objectShouldHaveLongDescription.rst │ ├── objectTextUpdatesWhenObjectChanges.rst │ ├── objectUIMustBeAccessible.rst │ ├── objectWithClassIDHasNoText.rst │ ├── pNotUsedAsHeader.rst │ ├── passwordHasLabel.rst │ ├── preShouldNotBeUsedForTabularLayout.rst │ ├── radioHasLabel.rst │ ├── radioMarkedWithFieldgroupAndLegend.rst │ ├── scriptContentAccessibleWithScriptsTurnedOff.rst │ ├── scriptInBodyMustHaveNoscript.rst │ ├── scriptOnclickRequiresOnKeypress.rst │ ├── scriptOndblclickRequiresOnKeypress.rst │ ├── scriptOnmousedownRequiresOnKeypress.rst │ ├── scriptOnmousemove.rst │ ├── scriptOnmouseoutHasOnmouseblur.rst │ ├── scriptOnmouseoverHasOnfocus.rst │ ├── scriptOnmouseupHasOnkeyup.rst │ ├── scriptsDoNotFlicker.rst │ ├── scriptsDoNotUseColorAlone.rst │ ├── selectDoesNotChangeContext.rst │ ├── selectHasAssociatedLabel.rst │ ├── selectJumpMenu.rst │ ├── siteMap.rst │ ├── skipToContentLinkProvided.rst │ ├── svgContainsTitle.rst │ ├── tabIndexFollowsLogicalOrder.rst │ ├── tableCaptionIdentifiesTable.rst │ ├── tableComplexHasSummary.rst │ ├── tableDataShouldHaveTh.rst │ ├── tableIsGrouped.rst │ ├── tableLayoutDataShouldNotHaveTh.rst │ ├── tableLayoutHasNoCaption.rst │ ├── tableLayoutHasNoSummary.rst │ ├── tableLayoutMakesSenseLinearized.rst │ ├── tableSummaryDoesNotDuplicateCaption.rst │ ├── tableSummaryIsEmpty.rst │ ├── tableUseColGroup.rst │ ├── tableUsesAbbreviationForHeader.rst │ ├── tableUsesCaption.rst │ ├── tableUsesScopeForRow.rst │ ├── tableWithBothHeadersUseScope.rst │ ├── tabularDataIsInTable.rst │ ├── textIsNotSmall.rst │ ├── textareaHasAssociatedLabel.rst │ ├── videoProvidesCaptions.rst │ └── videosEmbeddedOrLinkedNeedCaptions.rst ├── examples/ │ ├── common/ │ │ └── style.css │ ├── editors/ │ │ ├── aloha.html │ │ ├── ckeditor.html │ │ ├── plugins/ │ │ │ ├── aloha/ │ │ │ │ └── quail/ │ │ │ │ ├── css/ │ │ │ │ │ └── quail.css │ │ │ │ ├── package.json │ │ │ │ └── vendor/ │ │ │ │ └── tipsy.js │ │ │ ├── ckeditor/ │ │ │ │ └── quail/ │ │ │ │ └── plugin.js │ │ │ └── tinymce/ │ │ │ └── quail/ │ │ │ ├── css/ │ │ │ │ └── content.css │ │ │ ├── editor_plugin.js │ │ │ └── langs/ │ │ │ └── en.js │ │ └── tinymce.html │ ├── php/ │ │ ├── README.md │ │ ├── data/ │ │ │ ├── guideline.json │ │ │ └── stats.json │ │ ├── edit.html │ │ ├── index.php │ │ ├── sample.html │ │ ├── script.js │ │ └── stats.php │ └── simple/ │ ├── index.html │ └── wcag2.html ├── package.json ├── scripts/ │ ├── addCaseToAssessments.js │ ├── componentToIndividualFile.js │ ├── covertTestYmlToHtml.js │ ├── eachToForEachWithParams.js │ ├── modulifyAssessments.js │ ├── modulifyTransform.js │ ├── moveTestMetadataToAssessmentFiles.js │ ├── pushingMetaDataToAssessments.js │ ├── regexes.txt │ ├── removeQuailFromAssessments.js │ ├── selectorToIndividualFile.js │ ├── upperCaseIt.py │ └── wrapScriesInGetScope.js ├── src/ │ ├── assessments/ │ │ ├── AAdjacentWithSameResourceShouldBeCombined.js │ │ ├── AImgAltNotRepetitive.js │ │ ├── AInPHasADistinctStyle.js │ │ ├── ALinkTextDoesNotBeginWithRedundantWord.js │ │ ├── ALinkWithNonText.js │ │ ├── ALinksAreSeparatedByPrintableCharacters.js │ │ ├── ALinksDontOpenNewWindow.js │ │ ├── ALinksNotSeparatedBySymbols.js │ │ ├── ALinksToMultiMediaRequireTranscript.js │ │ ├── ALinksToSoundFilesNeedTranscripts.js │ │ ├── AMultimediaTextAlternative.js │ │ ├── AMustContainText.js │ │ ├── AMustHaveTitle.js │ │ ├── AMustNotHaveJavascriptHref.js │ │ ├── ASuspiciousLinkText.js │ │ ├── ATitleDescribesDestination.js │ │ ├── AnimatedGifMayBePresent.js │ │ ├── AppletContainsTextEquivalent.js │ │ ├── AppletContainsTextEquivalentInAlt.js │ │ ├── AppletProvidesMechanismToReturnToParent.js │ │ ├── AppletTextEquivalentsGetUpdated.js │ │ ├── AppletUIMustBeAccessible.js │ │ ├── AppletsDoNotFlicker.js │ │ ├── AppletsDonotUseColorAlone.js │ │ ├── AreaAltIdentifiesDestination.js │ │ ├── AreaAltRefersToText.js │ │ ├── AreaDontOpenNewWindow.js │ │ ├── AreaHasAltValue.js │ │ ├── AreaLinksToSoundFile.js │ │ ├── AudioMayBePresent.js │ │ ├── BasefontIsNotUsed.js │ │ ├── BlinkIsNotUsed.js │ │ ├── BlockquoteNotUsedForIndentation.js │ │ ├── BlockquoteUseForQuotations.js │ │ ├── BoldIsNotUsed.js │ │ ├── ButtonDoesNotChangeContextOnFocus.js │ │ ├── ButtonHasName.js │ │ ├── CheckboxHasLabel.js │ │ ├── ClosingTagsAreUsed.js │ │ ├── ColorBackgroundGradientContrast.js │ │ ├── ColorBackgroundImageContrast.js │ │ ├── ColorElementBehindBackgroundGradientContrast.js │ │ ├── ColorElementBehindBackgroundImageContrast.js │ │ ├── ColorElementBehindContrast.js │ │ ├── ColorFontContrast.js │ │ ├── CssDocumentMakesSenseStyleTurnedOff.js │ │ ├── DefinitionListsAreUsed.js │ │ ├── DoNotUseGraphicalSymbolToConveyInformation.js │ │ ├── DoctypeProvided.js │ │ ├── DocumentAbbrIsUsed.js │ │ ├── DocumentAcronymsHaveElement.js │ │ ├── DocumentAutoRedirectNotUsed.js │ │ ├── DocumentContentReadableWithoutStylesheets.js │ │ ├── DocumentHasTitleElement.js │ │ ├── DocumentIDsMustBeUnique.js │ │ ├── DocumentIsWrittenClearly.js │ │ ├── DocumentLangIsISO639Standard.js │ │ ├── DocumentLangNotIdentified.js │ │ ├── DocumentMetaNotUsedWithTimeout.js │ │ ├── DocumentReadingDirection.js │ │ ├── DocumentStrictDocType.js │ │ ├── DocumentTitleDescribesDocument.js │ │ ├── DocumentTitleIsNotPlaceholder.js │ │ ├── DocumentTitleIsShort.js │ │ ├── DocumentTitleNotEmpty.js │ │ ├── DocumentVisualListsAreMarkedUp.js │ │ ├── ElementAttributesAreValid.js │ │ ├── ElementsDoNotHaveDuplicateAttributes.js │ │ ├── EmbedHasAssociatedNoEmbed.js │ │ ├── EmbedMustHaveAltAttribute.js │ │ ├── FieldsetHasLabel.js │ │ ├── FileHasLabel.js │ │ ├── FocusIndicatorVisible.js │ │ ├── FontIsNotUsed.js │ │ ├── FormButtonsHaveValue.js │ │ ├── FormErrorMessageHelpsUser.js │ │ ├── FormHasGoodErrorMessage.js │ │ ├── FormHasSubmitButton.js │ │ ├── FormWithRequiredLabel.js │ │ ├── FrameIsNotUsed.js │ │ ├── FrameRelationshipsMustBeDescribed.js │ │ ├── FrameSrcIsAccessible.js │ │ ├── FrameTitlesDescribeFunction.js │ │ ├── FrameTitlesNotEmpty.js │ │ ├── FrameTitlesNotPlaceholder.js │ │ ├── FramesAreUsedToGroupContent.js │ │ ├── FramesHaveATitle.js │ │ ├── FramesetIsNotUsed.js │ │ ├── FramesetMustHaveNoFramesSection.js │ │ ├── HeaderH1.js │ │ ├── HeaderH1Format.js │ │ ├── HeaderH2.js │ │ ├── HeaderH2Format.js │ │ ├── HeaderH3.js │ │ ├── HeaderH3Format.js │ │ ├── HeaderH4.js │ │ ├── HeaderH4Format.js │ │ ├── HeaderH5Format.js │ │ ├── HeaderH6Format.js │ │ ├── HeadersAttrRefersToATableCell.js │ │ ├── HeadersHaveText.js │ │ ├── HeadersUseToMarkSections.js │ │ ├── IIsNotUsed.js │ │ ├── IdrefsHasCorrespondingId.js │ │ ├── IframeMustNotHaveLongdesc.js │ │ ├── ImageMapServerSide.js │ │ ├── ImgAltEmptyForDecorativeImages.js │ │ ├── ImgAltIdentifiesLinkDestination.js │ │ ├── ImgAltIsDifferent.js │ │ ├── ImgAltIsSameInText.js │ │ ├── ImgAltIsTooLong.js │ │ ├── ImgAltNotEmptyInAnchor.js │ │ ├── ImgAltNotPlaceHolder.js │ │ ├── ImgGifNoFlicker.js │ │ ├── ImgHasAlt.js │ │ ├── ImgHasLongDesc.js │ │ ├── ImgImportantNoSpacerAlt.js │ │ ├── ImgMapAreasHaveDuplicateLink.js │ │ ├── ImgNonDecorativeHasAlt.js │ │ ├── ImgNotReferredToByColorAlone.js │ │ ├── ImgServerSideMapNotUsed.js │ │ ├── ImgShouldNotHaveTitle.js │ │ ├── ImgWithMapHasUseMap.js │ │ ├── InputCheckboxRequiresFieldset.js │ │ ├── InputDoesNotUseColorAlone.js │ │ ├── InputElementsDontHaveAlt.js │ │ ├── InputImageAltIdentifiesPurpose.js │ │ ├── InputImageAltIsNotFileName.js │ │ ├── InputImageAltIsNotPlaceholder.js │ │ ├── InputImageAltIsShort.js │ │ ├── InputImageAltNotRedundant.js │ │ ├── InputImageHasAlt.js │ │ ├── InputImageNotDecorative.js │ │ ├── InputTextHasLabel.js │ │ ├── InputTextHasValue.js │ │ ├── InputTextValueNotEmpty.js │ │ ├── InputWithoutLabelHasTitle.js │ │ ├── KINGStrongList.js │ │ ├── KINGUseCurrencyAsSymbol.js │ │ ├── KINGUseLongDateFormat.js │ │ ├── KINGUsePercentageWithSymbol.js │ │ ├── LabelDoesNotContainInput.js │ │ ├── LabelMustBeUnique.js │ │ ├── LabelMustNotBeEmpty.js │ │ ├── LabelsAreAssignedToAnInput.js │ │ ├── LanguageChangesAreIdentified.js │ │ ├── LanguageDirAttributeIsUsed.js │ │ ├── LanguageDirectionPunctuation.js │ │ ├── LanguageUnicodeDirection.js │ │ ├── LegendTextNotEmpty.js │ │ ├── LegendTextNotPlaceholder.js │ │ ├── LiDontUseImageForBullet.js │ │ ├── LinkDoesNotChangeContextOnFocus.js │ │ ├── LinkHasAUniqueContext.js │ │ ├── LinkUsedForAlternateContent.js │ │ ├── LinkUsedToDescribeNavigation.js │ │ ├── ListNotUsedForFormatting.js │ │ ├── ListOfLinksUseList.js │ │ ├── MarqueeIsNotUsed.js │ │ ├── NewWindowIsOpened.js │ │ ├── NoembedHasEquivalentContent.js │ │ ├── NoframesSectionMustHaveTextEquivalent.js │ │ ├── ObjectContentUsableWhenDisabled.js │ │ ├── ObjectDoesNotFlicker.js │ │ ├── ObjectDoesNotUseColorAlone.js │ │ ├── ObjectInterfaceIsAccessible.js │ │ ├── ObjectLinkToMultimediaHasTextTranscript.js │ │ ├── ObjectMustContainText.js │ │ ├── ObjectMustHaveEmbed.js │ │ ├── ObjectMustHaveTitle.js │ │ ├── ObjectMustHaveValidTitle.js │ │ ├── ObjectProvidesMechanismToReturnToParent.js │ │ ├── ObjectShouldHaveLongDescription.js │ │ ├── ObjectTextUpdatesWhenObjectChanges.js │ │ ├── ObjectUIMustBeAccessible.js │ │ ├── ObjectWithClassIDHasNoText.js │ │ ├── PNotUsedAsHeader.js │ │ ├── ParagarphIsWrittenClearly.js │ │ ├── PasswordHasLabel.js │ │ ├── PreShouldNotBeUsedForTabularLayout.js │ │ ├── RadioHasLabel.js │ │ ├── RadioMarkedWithFieldgroupAndLegend.js │ │ ├── ScriptContentAccessibleWithScriptsTurnedOff.js │ │ ├── ScriptFocusIndicatorVisible.js │ │ ├── ScriptInBodyMustHaveNoscript.js │ │ ├── ScriptOnFocusChangeBackgroundOrBorder.js │ │ ├── ScriptOnclickRequiresOnKeypress.js │ │ ├── ScriptOndblclickRequiresOnKeypress.js │ │ ├── ScriptOnmousedownRequiresOnKeypress.js │ │ ├── ScriptOnmousemove.js │ │ ├── ScriptOnmouseoutHasOnmouseblur.js │ │ ├── ScriptOnmouseoverHasOnfocus.js │ │ ├── ScriptOnmouseupHasOnkeyup.js │ │ ├── ScriptsDoNotFlicker.js │ │ ├── ScriptsDoNotUseColorAlone.js │ │ ├── SelectDoesNotChangeContext.js │ │ ├── SelectHasAssociatedLabel.js │ │ ├── SelectJumpMenu.js │ │ ├── SiteMap.js │ │ ├── SkipToContentLinkProvided.js │ │ ├── SvgContainsTitle.js │ │ ├── TabIndexFollowsLogicalOrder.js │ │ ├── TableCaptionIdentifiesTable.js │ │ ├── TableComplexHasSummary.js │ │ ├── TableDataShouldHaveTh.js │ │ ├── TableIsGrouped.js │ │ ├── TableLayoutDataShouldNotHaveTh.js │ │ ├── TableLayoutHasNoCaption.js │ │ ├── TableLayoutHasNoSummary.js │ │ ├── TableLayoutMakesSenseLinearized.js │ │ ├── TableNotUsedForLayout.js │ │ ├── TableShouldUseHeaderIDs.js │ │ ├── TableSummaryDescribesTable.js │ │ ├── TableSummaryDoesNotDuplicateCaption.js │ │ ├── TableSummaryIsEmpty.js │ │ ├── TableSummaryIsNotTooLong.js │ │ ├── TableUseColGroup.js │ │ ├── TableUsesAbbreviationForHeader.js │ │ ├── TableUsesCaption.js │ │ ├── TableUsesScopeForRow.js │ │ ├── TableWithBothHeadersUseScope.js │ │ ├── TabularDataIsInTable.js │ │ ├── TagsAreNestedCorrectly.js │ │ ├── TextIsNotSmall.js │ │ ├── TextareaHasAssociatedLabel.js │ │ ├── VideoMayBePresent.js │ │ ├── VideoProvidesCaptions.js │ │ ├── VideosEmbeddedOrLinkedNeedCaptions.js │ │ ├── WhiteSpaceInWord.js │ │ └── WhiteSpaceNotUsedForFormatting.js │ └── wcag/ │ ├── SuccessCriteria-1.1.1.js │ ├── SuccessCriteria-1.2.1.js │ ├── SuccessCriteria-1.2.2.js │ ├── SuccessCriteria-1.2.3.js │ ├── SuccessCriteria-1.2.4.js │ ├── SuccessCriteria-1.2.5.js │ ├── SuccessCriteria-1.2.7.js │ ├── SuccessCriteria-1.2.8.js │ ├── SuccessCriteria-1.2.9.js │ ├── SuccessCriteria-1.3.1.js │ ├── SuccessCriteria-1.3.2.js │ ├── SuccessCriteria-1.3.3.js │ ├── SuccessCriteria-1.4.1.js │ ├── SuccessCriteria-1.4.2.js │ ├── SuccessCriteria-1.4.3.js │ ├── SuccessCriteria-1.4.4.js │ ├── SuccessCriteria-1.4.5.js │ ├── SuccessCriteria-1.4.6.js │ ├── SuccessCriteria-1.4.7.js │ ├── SuccessCriteria-1.4.8.js │ ├── SuccessCriteria-1.4.9.js │ ├── SuccessCriteria-2.1.1.js │ ├── SuccessCriteria-2.1.2.js │ ├── SuccessCriteria-2.1.3.js │ ├── SuccessCriteria-2.2.1.js │ ├── SuccessCriteria-2.2.2.js │ ├── SuccessCriteria-2.2.3.js │ ├── SuccessCriteria-2.2.4.js │ ├── SuccessCriteria-2.2.5.js │ ├── SuccessCriteria-2.3.1.js │ ├── SuccessCriteria-2.3.2.js │ ├── SuccessCriteria-2.4.1.js │ ├── SuccessCriteria-2.4.10.js │ ├── SuccessCriteria-2.4.2.js │ ├── SuccessCriteria-2.4.3.js │ ├── SuccessCriteria-2.4.4.js │ ├── SuccessCriteria-2.4.5.js │ ├── SuccessCriteria-2.4.6.js │ ├── SuccessCriteria-2.4.7.js │ ├── SuccessCriteria-2.4.8.js │ ├── SuccessCriteria-2.4.9.js │ ├── SuccessCriteria-3.1.1.js │ ├── SuccessCriteria-3.1.2.js │ ├── SuccessCriteria-3.1.3.js │ ├── SuccessCriteria-3.1.4.js │ ├── SuccessCriteria-3.1.5.js │ ├── SuccessCriteria-3.1.6.js │ ├── SuccessCriteria-3.2.1.js │ ├── SuccessCriteria-3.2.2.js │ ├── SuccessCriteria-3.2.3.js │ ├── SuccessCriteria-3.2.4.js │ ├── SuccessCriteria-3.2.5.js │ ├── SuccessCriteria-3.3.1.js │ ├── SuccessCriteria-3.3.2.js │ ├── SuccessCriteria-3.3.3.js │ ├── SuccessCriteria-3.3.4.js │ ├── SuccessCriteria-3.3.5.js │ ├── SuccessCriteria-3.3.6.js │ ├── SuccessCriteria-4.1.1.js │ └── SuccessCriteria-4.1.2.js └── test/ ├── assessmentSpecs/ │ ├── specs/ │ │ ├── KINGStrongList/ │ │ │ ├── KINGStrongList.html │ │ │ └── KINGStrongListSpec.js │ │ ├── KINGUseCurrencyAsSymbol/ │ │ │ ├── KINGUseCurrencyAsSymbol.html │ │ │ └── KINGUseCurrencyAsSymbolSpec.js │ │ ├── KINGUseLongDateFormat/ │ │ │ ├── KINGUseLongDateFormat.html │ │ │ └── KINGUseLongDateFormatSpec.js │ │ ├── KINGUsePercentageWithSymbol/ │ │ │ ├── KINGUsePercentageWithSymbol.html │ │ │ └── KINGUsePercentageWithSymbolSpec.js │ │ ├── aAdjacentWithSameResourceShouldBeCombined/ │ │ │ ├── aAdjacentWithSameResourceShouldBeCombined.html │ │ │ └── aAdjacentWithSameResourceShouldBeCombinedSpec.js │ │ ├── aImgAltNotRepetitive/ │ │ │ ├── aImgAltNotRepetitive.html │ │ │ └── aImgAltNotRepetitiveSpec.js │ │ ├── aInPHasADistinctStyle/ │ │ │ ├── aInPHasADistinctStyle.html │ │ │ └── aInPHasADistinctStyleSpec.js │ │ ├── aLinkTextDoesNotBeginWithRedundantWord/ │ │ │ ├── aLinkTextDoesNotBeginWithRedundantWord.html │ │ │ └── aLinkTextDoesNotBeginWithRedundantWordSpec.js │ │ ├── aLinkWithNonText/ │ │ │ ├── aLinkWithNonText.html │ │ │ └── aLinkWithNonTextSpec.js │ │ ├── aLinksAreSeparatedByPrintableCharacters/ │ │ │ ├── aLinksAreSeparatedByPrintableCharacters.html │ │ │ └── aLinksAreSeparatedByPrintableCharactersSpec.js │ │ ├── aLinksDontOpenNewWindow/ │ │ │ ├── aLinksDontOpenNewWindow.html │ │ │ └── aLinksDontOpenNewWindowSpec.js │ │ ├── aLinksNotSeparatedBySymbols/ │ │ │ ├── aLinksNotSeparatedBySymbols.html │ │ │ └── aLinksNotSeparatedBySymbolsSpec.js │ │ ├── aLinksToMultiMediaRequireTranscript/ │ │ │ ├── aLinksToMultiMediaRequireTranscript-inapplicable.html │ │ │ ├── aLinksToMultiMediaRequireTranscript.html │ │ │ └── aLinksToMultiMediaRequireTranscriptSpec.js │ │ ├── aLinksToSoundFilesNeedTranscripts/ │ │ │ ├── aLinksToSoundFilesNeedTranscripts-inapplicable.html │ │ │ ├── aLinksToSoundFilesNeedTranscripts.html │ │ │ └── aLinksToSoundFilesNeedTranscriptsSpec.js │ │ ├── aMultimediaTextAlternative/ │ │ │ ├── aMultimediaTextAlternative-inapplicable.html │ │ │ ├── aMultimediaTextAlternative.html │ │ │ └── aMultimediaTextAlternativeSpec.js │ │ ├── aMustContainText/ │ │ │ ├── aMustContainText.html │ │ │ └── aMustContainTextSpec.js │ │ ├── aMustHaveTitle/ │ │ │ ├── aMustHaveTitle.html │ │ │ └── aMustHaveTitleSpec.js │ │ ├── aMustNotHaveJavascriptHref/ │ │ │ ├── aMustNotHaveJavascriptHref-nomatch.html │ │ │ ├── aMustNotHaveJavascriptHref.html │ │ │ └── aMustNotHaveJavascriptHrefSpec.js │ │ ├── aSuspiciousLinkText/ │ │ │ ├── aSuspiciousLinkText.html │ │ │ └── aSuspiciousLinkTextSpec.js │ │ ├── aTitleDescribesDestination/ │ │ │ ├── aTitleDescribesDestination-nomatch.html │ │ │ ├── aTitleDescribesDestination.html │ │ │ └── aTitleDescribesDestinationSpec.js │ │ ├── animatedGifMayBePresent/ │ │ │ ├── animatedGifMayBePresent.html │ │ │ └── animatedGifMayBePresentSpec.js │ │ ├── appletContainsTextEquivalent/ │ │ │ ├── appletContainsTextEquivalent.html │ │ │ └── appletContainsTextEquivalentSpec.js │ │ ├── appletContainsTextEquivalentInAlt/ │ │ │ ├── appletContainsTextEquivalentInAlt.html │ │ │ └── appletContainsTextEquivalentInAltSpec.js │ │ ├── appletProvidesMechanismToReturnToParent/ │ │ │ ├── appletProvidesMechanismToReturnToParent-nomatch.html │ │ │ ├── appletProvidesMechanismToReturnToParent.html │ │ │ └── appletProvidesMechanismToReturnToParentSpec.js │ │ ├── appletTextEquivalentsGetUpdated/ │ │ │ ├── appletTextEquivalentsGetUpdated-nomatch.html │ │ │ ├── appletTextEquivalentsGetUpdated.html │ │ │ └── appletTextEquivalentsGetUpdatedSpec.js │ │ ├── appletUIMustBeAccessible/ │ │ │ ├── appletUIMustBeAccessible-nomatch.html │ │ │ ├── appletUIMustBeAccessible.html │ │ │ └── appletUIMustBeAccessibleSpec.js │ │ ├── appletsDoNotFlicker/ │ │ │ ├── appletsDoNotFlicker-nomatch.html │ │ │ ├── appletsDoNotFlicker.html │ │ │ └── appletsDoNotFlickerSpec.js │ │ ├── appletsDonotUseColorAlone/ │ │ │ ├── appletsDonotUseColorAlone-nomatch.html │ │ │ ├── appletsDonotUseColorAlone.html │ │ │ └── appletsDonotUseColorAloneSpec.js │ │ ├── areaAltIdentifiesDestination/ │ │ │ ├── areaAltIdentifiesDestination-nomatch.html │ │ │ ├── areaAltIdentifiesDestination.html │ │ │ └── areaAltIdentifiesDestinationSpec.js │ │ ├── areaAltRefersToText/ │ │ │ ├── areaAltRefersToText-nomatch.html │ │ │ ├── areaAltRefersToText.html │ │ │ └── areaAltRefersToTextSpec.js │ │ ├── areaDontOpenNewWindow/ │ │ │ ├── areaDontOpenNewWindow.html │ │ │ └── areaDontOpenNewWindowSpec.js │ │ ├── areaHasAltValue/ │ │ │ ├── areaHasAltValue-nomatch.html │ │ │ ├── areaHasAltValue.html │ │ │ └── areaHasAltValueSpec.js │ │ ├── areaLinksToSoundFile/ │ │ │ ├── areaLinksToSoundFile-nomatch.html │ │ │ ├── areaLinksToSoundFile.html │ │ │ └── areaLinksToSoundFileSpec.js │ │ ├── audioMayBePresent/ │ │ │ ├── audioMayBePresent.html │ │ │ └── audioMayBePresentSpec.js │ │ ├── basefontIsNotUsed/ │ │ │ ├── basefontIsNotUsed-nomatch.html │ │ │ ├── basefontIsNotUsed.html │ │ │ └── basefontIsNotUsedSpec.js │ │ ├── blinkIsNotUsed/ │ │ │ ├── blinkIsNotUsed-nomatch.html │ │ │ ├── blinkIsNotUsed.html │ │ │ └── blinkIsNotUsedSpec.js │ │ ├── blockquoteNotUsedForIndentation/ │ │ │ ├── blockquoteNotUsedForIndentation-nomatch.html │ │ │ ├── blockquoteNotUsedForIndentation.html │ │ │ └── blockquoteNotUsedForIndentationSpec.js │ │ ├── blockquoteUseForQuotations/ │ │ │ ├── blockquoteUseForQuotations.html │ │ │ └── blockquoteUseForQuotationsSpec.js │ │ ├── boldIsNotUsed/ │ │ │ ├── boldIsNotUsed-nomatch.html │ │ │ ├── boldIsNotUsed.html │ │ │ └── boldIsNotUsedSpec.js │ │ ├── buttonDoesNotChangeContextOnFocus/ │ │ │ ├── buttonDoesNotChangeContextOnFocus.html │ │ │ └── buttonDoesNotChangeContextOnFocusSpec.js │ │ ├── buttonHasName/ │ │ │ ├── buttonHasName.html │ │ │ └── buttonHasNameSpec.js │ │ ├── checkboxHasLabel/ │ │ │ ├── checkboxHasLabel.html │ │ │ └── checkboxHasLabelSpec.js │ │ ├── colorBackgroundGradientContrast/ │ │ │ ├── colorBackgroundGradientContrast.html │ │ │ └── colorBackgroundGradientContrastSpec.js │ │ ├── colorBackgroundImageContrast/ │ │ │ ├── colorBackgroundImageContrast.html │ │ │ └── colorBackgroundImageContrastSpec.js │ │ ├── colorElementBehindBackgroundGradientContrast/ │ │ │ ├── colorElementBehindBackgroundGradientContrast.html │ │ │ └── colorElementBehindBackgroundGradientContrastSpec.js │ │ ├── colorElementBehindBackgroundImageContrast/ │ │ │ ├── colorElementBehindBackgroundImageContrast.html │ │ │ └── colorElementBehindBackgroundImageContrastSpec.js │ │ ├── colorElementBehindContrast/ │ │ │ ├── colorElementBehindContrast.html │ │ │ └── colorElementBehindContrastSpec.js │ │ ├── colorFontContrast/ │ │ │ ├── colorFontContrast.html │ │ │ └── colorFontContrastSpec.js │ │ ├── cssDocumentMakesSenseStyleTurnedOff/ │ │ │ ├── cssDocumentMakesSenseStyleTurnedOff.html │ │ │ └── cssDocumentMakesSenseStyleTurnedOffSpec.js │ │ ├── definitionListsAreUsed/ │ │ │ ├── definitionListsAreUsed.html │ │ │ └── definitionListsAreUsedSpec.js │ │ ├── doNotUseGraphicalSymbolToConveyInformation/ │ │ │ ├── doNotUseGraphicalSymbolToConveyInformation.html │ │ │ └── doNotUseGraphicalSymbolToConveyInformationSpec.js │ │ ├── doctypeProvided/ │ │ │ ├── doctypeProvided-fail.html │ │ │ ├── doctypeProvided.html │ │ │ └── doctypeProvidedSpec.js │ │ ├── documentAbbrIsUsed/ │ │ │ ├── documentAbbrIsUsed.html │ │ │ └── documentAbbrIsUsedSpec.js │ │ ├── documentAcronymsHaveElement/ │ │ │ ├── documentAcronymsHaveElement.html │ │ │ └── documentAcronymsHaveElementSpec.js │ │ ├── documentAutoRedirectNotUsed/ │ │ │ ├── documentAutoRedirectNotUsed-fail.html │ │ │ ├── documentAutoRedirectNotUsed-nomatch.html │ │ │ ├── documentAutoRedirectNotUsed-pass.html │ │ │ └── documentAutoRedirectNotUsedSpec.js │ │ ├── documentContentReadableWithoutStylesheets/ │ │ │ ├── documentContentReadableWithoutStylesheets.html │ │ │ └── documentContentReadableWithoutStylesheetsSpec.js │ │ ├── documentHasTitleElement/ │ │ │ ├── documentHasTitleElement-fail.html │ │ │ ├── documentHasTitleElement-nomatch.html │ │ │ ├── documentHasTitleElement-pass.html │ │ │ └── documentHasTitleElementSpec.js │ │ ├── documentIDsMustBeUnique/ │ │ │ ├── documentIDsMustBeUnique.html │ │ │ └── documentIDsMustBeUniqueSpec.js │ │ ├── documentIsWrittenClearly/ │ │ │ ├── documentIsWrittenClearly.html │ │ │ └── documentIsWrittenClearlySpec.js │ │ ├── documentLangIsISO639Standard/ │ │ │ ├── documentLangIsISO639Standard-fail.html │ │ │ ├── documentLangIsISO639Standard-inapplicable.html │ │ │ ├── documentLangIsISO639Standard.html │ │ │ └── documentLangIsISO639StandardSpec.js │ │ ├── documentLangNotIdentified/ │ │ │ ├── documentLangNotIdentified-fail.html │ │ │ ├── documentLangNotIdentified.html │ │ │ └── documentLangNotIdentifiedSpec.js │ │ ├── documentMetaNotUsedWithTimeout/ │ │ │ ├── documentMetaNotUsedWithTimeout-nomatch.html │ │ │ ├── documentMetaNotUsedWithTimeout.html │ │ │ └── documentMetaNotUsedWithTimeoutSpec.js │ │ ├── documentReadingDirection/ │ │ │ ├── documentReadingDirection-nomatch.html │ │ │ ├── documentReadingDirection.html │ │ │ └── documentReadingDirectionSpec.js │ │ ├── documentStrictDocType/ │ │ │ ├── documentStrictDocType-fail-2.html │ │ │ ├── documentStrictDocType-fail-3.html │ │ │ ├── documentStrictDocType-fail.html │ │ │ ├── documentStrictDocType-pass-2.html │ │ │ ├── documentStrictDocType.html │ │ │ └── documentStrictDocTypeSpec.js │ │ ├── documentTitleDescribesDocument/ │ │ │ ├── documentTitleDescribesDocument-nomatch.html │ │ │ ├── documentTitleDescribesDocument.html │ │ │ └── documentTitleDescribesDocumentSpec.js │ │ ├── documentTitleIsNotPlaceholder/ │ │ │ ├── documentTitleIsNotPlaceholder-fail-2.html │ │ │ ├── documentTitleIsNotPlaceholder-fail-3.html │ │ │ ├── documentTitleIsNotPlaceholder-fail.html │ │ │ ├── documentTitleIsNotPlaceholder.html │ │ │ └── documentTitleIsNotPlaceholderSpec.js │ │ ├── documentTitleIsShort/ │ │ │ ├── documentTitleIsShort-fail.html │ │ │ ├── documentTitleIsShort.html │ │ │ └── documentTitleIsShortSpec.js │ │ ├── documentTitleNotEmpty/ │ │ │ ├── documentTitleNotEmpty-fail.html │ │ │ ├── documentTitleNotEmpty.html │ │ │ └── documentTitleNotEmptySpec.js │ │ ├── documentVisualListsAreMarkedUp/ │ │ │ ├── documentVisualListsAreMarkedUp.html │ │ │ └── documentVisualListsAreMarkedUpSpec.js │ │ ├── embedHasAssociatedNoEmbed/ │ │ │ ├── assets/ │ │ │ │ └── transcript_history_rome.htm │ │ │ ├── embedHasAssociatedNoEmbed.html │ │ │ └── embedHasAssociatedNoEmbedSpec.js │ │ ├── embedMustHaveAltAttribute/ │ │ │ ├── embedMustHaveAltAttribute-nomatch.html │ │ │ ├── embedMustHaveAltAttribute.html │ │ │ └── embedMustHaveAltAttributeSpec.js │ │ ├── fieldsetHasLabel/ │ │ │ ├── fieldsetHasLabel-nomatch.html │ │ │ ├── fieldsetHasLabel.html │ │ │ └── fieldsetHasLabelSpec.js │ │ ├── fileHasLabel/ │ │ │ ├── fileHasLabel.html │ │ │ └── fileHasLabelSpec.js │ │ ├── focusIndicatorVisible/ │ │ │ ├── focusIndicatorVisible.html │ │ │ └── focusIndicatorVisibleSpec.js │ │ ├── fontIsNotUsed/ │ │ │ ├── fontIsNotUsed-nomatch.html │ │ │ ├── fontIsNotUsed.html │ │ │ └── fontIsNotUsedSpec.js │ │ ├── formButtonsHaveValue/ │ │ │ ├── formButtonsHaveValue-nomatch.html │ │ │ ├── formButtonsHaveValue.html │ │ │ └── formButtonsHaveValueSpec.js │ │ ├── formErrorMessageHelpsUser/ │ │ │ ├── formErrorMessageHelpsUser-nomatch.html │ │ │ ├── formErrorMessageHelpsUser.html │ │ │ └── formErrorMessageHelpsUserSpec.js │ │ ├── formHasGoodErrorMessage/ │ │ │ ├── formHasGoodErrorMessage-nomatch.html │ │ │ ├── formHasGoodErrorMessage.html │ │ │ └── formHasGoodErrorMessageSpec.js │ │ ├── formHasSubmitButton/ │ │ │ ├── formHasSubmitButton-nomatch.html │ │ │ ├── formHasSubmitButton.html │ │ │ └── formHasSubmitButtonSpec.js │ │ ├── formWithRequiredLabel/ │ │ │ ├── formWithRequiredLabel.html │ │ │ └── formWithRequiredLabelSpec.js │ │ ├── frameIsNotUsed/ │ │ │ ├── assets/ │ │ │ │ └── frame-a.html │ │ │ ├── frameIsNotUsed-nomatch.html │ │ │ ├── frameIsNotUsed.html │ │ │ └── frameIsNotUsedSpec.js │ │ ├── frameRelationshipsMustBeDescribed/ │ │ │ ├── frameRelationshipsMustBeDescribed-nomatch.html │ │ │ └── frameRelationshipsMustBeDescribedSpec.js │ │ ├── frameSrcIsAccessible/ │ │ │ ├── frameSrcIsAccessible-nomatch.html │ │ │ └── frameSrcIsAccessibleSpec.js │ │ ├── frameTitlesDescribeFunction/ │ │ │ └── frameTitlesDescribeFunctionSpec.js │ │ ├── frameTitlesNotEmpty/ │ │ │ ├── frameTitlesNotEmpty-nomatch.html │ │ │ └── frameTitlesNotEmptySpec.js │ │ ├── frameTitlesNotPlaceholder/ │ │ │ ├── frameTitlesNotPlaceholder.html │ │ │ └── frameTitlesNotPlaceholderSpec.js │ │ ├── framesAreUsedToGroupContent/ │ │ │ ├── framesAreUsedToGroupContent-fail.html │ │ │ ├── framesAreUsedToGroupContent-nomatch.html │ │ │ └── framesAreUsedToGroupContentSpec.js │ │ ├── framesHaveATitle/ │ │ │ ├── framesHaveATitle-nomatch.html │ │ │ ├── framesHaveATitle.html │ │ │ └── framesHaveATitleSpec.js │ │ ├── framesetIsNotUsed/ │ │ │ ├── framesetIsNotUsed-nomatch.html │ │ │ └── framesetIsNotUsedSpec.js │ │ ├── framesetMustHaveNoFramesSection/ │ │ │ ├── framesetMustHaveNoFramesSection-nomatch.html │ │ │ └── framesetMustHaveNoFramesSectionSpec.js │ │ ├── headerH1/ │ │ │ ├── headerH1.html │ │ │ └── headerH1Spec.js │ │ ├── headerH1Format/ │ │ │ ├── headerH1Format-nomatch.html │ │ │ ├── headerH1Format.html │ │ │ └── headerH1FormatSpec.js │ │ ├── headerH2/ │ │ │ ├── headerH2.html │ │ │ └── headerH2Spec.js │ │ ├── headerH2Format/ │ │ │ ├── headerH2Format-nomatch.html │ │ │ ├── headerH2Format.html │ │ │ └── headerH2FormatSpec.js │ │ ├── headerH3/ │ │ │ ├── headerH3.html │ │ │ └── headerH3Spec.js │ │ ├── headerH3Format/ │ │ │ ├── headerH3Format-nomatch.html │ │ │ ├── headerH3Format.html │ │ │ └── headerH3FormatSpec.js │ │ ├── headerH4/ │ │ │ ├── headerH4.html │ │ │ └── headerH4Spec.js │ │ ├── headerH4Format/ │ │ │ ├── headerH4Format-nomatch.html │ │ │ ├── headerH4Format.html │ │ │ └── headerH4FormatSpec.js │ │ ├── headerH5Format/ │ │ │ ├── headerH5Format-nomatch.html │ │ │ ├── headerH5Format.html │ │ │ └── headerH5FormatSpec.js │ │ ├── headerH6Format/ │ │ │ ├── headerH6Format-nomatch.html │ │ │ ├── headerH6Format.html │ │ │ └── headerH6FormatSpec.js │ │ ├── headersAttrRefersToATableCell/ │ │ │ ├── headersAttrRefersToATableCell.html │ │ │ └── headersAttrRefersToATableCellSpec.js │ │ ├── headersHaveText/ │ │ │ ├── headersHaveText.html │ │ │ └── headersHaveTextSpec.js │ │ ├── headersUseToMarkSections/ │ │ │ ├── headersUseToMarkSections.html │ │ │ └── headersUseToMarkSectionsSpec.js │ │ ├── iIsNotUsed/ │ │ │ ├── iIsNotUsed-nomatch.html │ │ │ ├── iIsNotUsed.html │ │ │ └── iIsNotUsedSpec.js │ │ ├── idrefsHasCorrespondingId/ │ │ │ ├── idrefsHasCorrespondingId.html │ │ │ └── idrefsHasCorrespondingIdSpec.js │ │ ├── iframeMustNotHaveLongdesc/ │ │ │ ├── iframeMustNotHaveLongdesc-nomatch.html │ │ │ ├── iframeMustNotHaveLongdesc.html │ │ │ └── iframeMustNotHaveLongdescSpec.js │ │ ├── imageMapServerSide/ │ │ │ ├── imageMapServerSide-nomatch.html │ │ │ ├── imageMapServerSide.html │ │ │ └── imageMapServerSideSpec.js │ │ ├── imgAltEmptyForDecorativeImages/ │ │ │ ├── imgAltEmptyForDecorativeImages-nomatch.html │ │ │ ├── imgAltEmptyForDecorativeImages.html │ │ │ └── imgAltEmptyForDecorativeImagesSpec.js │ │ ├── imgAltIdentifiesLinkDestination/ │ │ │ ├── imgAltIdentifiesLinkDestination-nomatch.html │ │ │ ├── imgAltIdentifiesLinkDestination.html │ │ │ └── imgAltIdentifiesLinkDestinationSpec.js │ │ ├── imgAltIsDifferent/ │ │ │ ├── imgAltIsDifferent.html │ │ │ └── imgAltIsDifferentSpec.js │ │ ├── imgAltIsSameInText/ │ │ │ ├── imgAltIsSameInText-nomatch.html │ │ │ ├── imgAltIsSameInText.html │ │ │ └── imgAltIsSameInTextSpec.js │ │ ├── imgAltIsTooLong/ │ │ │ ├── imgAltIsTooLong.html │ │ │ └── imgAltIsTooLongSpec.js │ │ ├── imgAltNotEmptyInAnchor/ │ │ │ ├── imgAltNotEmptyInAnchor.html │ │ │ └── imgAltNotEmptyInAnchorSpec.js │ │ ├── imgAltNotPlaceHolder/ │ │ │ ├── imgAltNotPlaceHolder.html │ │ │ └── imgAltNotPlaceHolderSpec.js │ │ ├── imgHasAlt/ │ │ │ ├── imgHasAlt-nomatch.html │ │ │ ├── imgHasAlt.html │ │ │ └── imgHasAltSpec.js │ │ ├── imgHasLongDesc/ │ │ │ ├── imgHasLongDesc.html │ │ │ └── imgHasLongDescSpec.js │ │ ├── imgImportantNoSpacerAlt/ │ │ │ ├── imgImportantNoSpacerAlt.html │ │ │ └── imgImportantNoSpacerAltSpec.js │ │ ├── imgMapAreasHaveDuplicateLink/ │ │ │ ├── imgMapAreasHaveDuplicateLink.html │ │ │ └── imgMapAreasHaveDuplicateLinkSpec.js │ │ ├── imgNonDecorativeHasAlt/ │ │ │ ├── imgNonDecorativeHasAlt.html │ │ │ └── imgNonDecorativeHasAltSpec.js │ │ ├── imgNotReferredToByColorAlone/ │ │ │ ├── imgNotReferredToByColorAlone-nomatch.html │ │ │ ├── imgNotReferredToByColorAlone.html │ │ │ └── imgNotReferredToByColorAloneSpec.js │ │ ├── imgServerSideMapNotUsed/ │ │ │ ├── imgServerSideMapNotUsed-nomatch.html │ │ │ ├── imgServerSideMapNotUsed.html │ │ │ └── imgServerSideMapNotUsedSpec.js │ │ ├── imgShouldNotHaveTitle/ │ │ │ ├── imgShouldNotHaveTitle-nomatch.html │ │ │ ├── imgShouldNotHaveTitle.html │ │ │ └── imgShouldNotHaveTitleSpec.js │ │ ├── imgWithMapHasUseMap/ │ │ │ ├── imgWithMapHasUseMap-nomatch.html │ │ │ ├── imgWithMapHasUseMap.html │ │ │ └── imgWithMapHasUseMapSpec.js │ │ ├── inputCheckboxRequiresFieldset/ │ │ │ ├── inputCheckboxRequiresFieldset.html │ │ │ └── inputCheckboxRequiresFieldsetSpec.js │ │ ├── inputElementsDontHaveAlt/ │ │ │ ├── inputElementsDontHaveAlt-nomatch.html │ │ │ ├── inputElementsDontHaveAlt.html │ │ │ └── inputElementsDontHaveAltSpec.js │ │ ├── inputImageAltIsNotFileName/ │ │ │ ├── inputImageAltIsNotFileName.html │ │ │ └── inputImageAltIsNotFileNameSpec.js │ │ ├── inputImageAltIsNotPlaceholder/ │ │ │ ├── inputImageAltIsNotPlaceholder.html │ │ │ └── inputImageAltIsNotPlaceholderSpec.js │ │ ├── inputImageAltIsShort/ │ │ │ ├── inputImageAltIsShort.html │ │ │ └── inputImageAltIsShortSpec.js │ │ ├── inputImageAltNotRedundant/ │ │ │ ├── inputImageAltNotRedundant.html │ │ │ └── inputImageAltNotRedundantSpec.js │ │ ├── inputImageHasAlt/ │ │ │ ├── inputImageHasAlt-nomatch.html │ │ │ ├── inputImageHasAlt.html │ │ │ └── inputImageHasAltSpec.js │ │ ├── inputTextHasLabel/ │ │ │ ├── inputTextHasLabel.html │ │ │ └── inputTextHasLabelSpec.js │ │ ├── inputTextHasValue/ │ │ │ ├── inputTextHasValue.html │ │ │ └── inputTextHasValueSpec.js │ │ ├── inputTextValueNotEmpty/ │ │ │ ├── inputTextValueNotEmpty.html │ │ │ └── inputTextValueNotEmptySpec.js │ │ ├── inputWithoutLabelHasTitle/ │ │ │ ├── inputWithoutLabelHasTitle.html │ │ │ └── inputWithoutLabelHasTitleSpec.js │ │ ├── labelDoesNotContainInput/ │ │ │ ├── labelDoesNotContainInput-nomatch.html │ │ │ ├── labelDoesNotContainInput.html │ │ │ └── labelDoesNotContainInputSpec.js │ │ ├── labelMustBeUnique/ │ │ │ ├── labelMustBeUnique.html │ │ │ └── labelMustBeUniqueSpec.js │ │ ├── labelMustNotBeEmpty/ │ │ │ ├── labelMustNotBeEmpty.html │ │ │ └── labelMustNotBeEmptySpec.js │ │ ├── labelsAreAssignedToAnInput/ │ │ │ ├── labelsAreAssignedToAnInput.html │ │ │ └── labelsAreAssignedToAnInputSpec.js │ │ ├── languageChangesAreIdentified/ │ │ │ ├── languageChangesAreIdentified.html │ │ │ └── languageChangesAreIdentifiedSpec.js │ │ ├── languageDirAttributeIsUsed/ │ │ │ ├── languageDirAttributeIsUsed.html │ │ │ └── languageDirAttributeIsUsedSpec.js │ │ ├── languageDirectionPunctuation/ │ │ │ ├── languageDirectionPunctuation.html │ │ │ └── languageDirectionPunctuationSpec.js │ │ ├── languageUnicodeDirection/ │ │ │ ├── languageUnicodeDirection.html │ │ │ └── languageUnicodeDirectionSpec.js │ │ ├── legendTextNotEmpty/ │ │ │ ├── legendTextNotEmpty-nomatch.html │ │ │ ├── legendTextNotEmpty.html │ │ │ └── legendTextNotEmptySpec.js │ │ ├── legendTextNotPlaceholder/ │ │ │ ├── legendTextNotPlaceholder.html │ │ │ └── legendTextNotPlaceholderSpec.js │ │ ├── liDontUseImageForBullet/ │ │ │ ├── liDontUseImageForBullet-nomatch.html │ │ │ ├── liDontUseImageForBullet.html │ │ │ └── liDontUseImageForBulletSpec.js │ │ ├── linkDoesNotChangeContextOnFocus/ │ │ │ ├── linkDoesNotChangeContextOnFocus.html │ │ │ └── linkDoesNotChangeContextOnFocusSpec.js │ │ ├── linkHasAUniqueContext/ │ │ │ ├── linkHasAUniqueContext.html │ │ │ └── linkHasAUniqueContextSpec.js │ │ ├── linkUsedForAlternateContent/ │ │ │ ├── linkUsedForAlternateContent-fail.html │ │ │ ├── linkUsedForAlternateContent-nomatch.html │ │ │ ├── linkUsedForAlternateContent-pass.html │ │ │ └── linkUsedForAlternateContentSpec.js │ │ ├── linkUsedToDescribeNavigation/ │ │ │ ├── linkUsedToDescribeNavigation-nomatch.html │ │ │ └── linkUsedToDescribeNavigationSpec.js │ │ ├── listNotUsedForFormatting/ │ │ │ ├── listNotUsedForFormatting.html │ │ │ └── listNotUsedForFormattingSpec.js │ │ ├── listOfLinksUseList/ │ │ │ ├── listOfLinksUseList.html │ │ │ └── listOfLinksUseListSpec.js │ │ ├── marqueeIsNotUsed/ │ │ │ ├── marqueeIsNotUsed-nomatch.html │ │ │ ├── marqueeIsNotUsed.html │ │ │ └── marqueeIsNotUsedSpec.js │ │ ├── newWindowIsOpened/ │ │ │ ├── newWindowIsOpened.html │ │ │ └── newWindowIsOpenedSpec.js │ │ ├── noembedHasEquivalentContent/ │ │ │ ├── noembedHasEquivalentContent-nomatch.html │ │ │ ├── noembedHasEquivalentContent.html │ │ │ └── noembedHasEquivalentContentSpec.js │ │ ├── noframesSectionMustHaveTextEquivalent/ │ │ │ ├── noframesSectionMustHaveTextEquivalent-nomatch.html │ │ │ └── noframesSectionMustHaveTextEquivalentSpec.js │ │ ├── objectContentUsableWhenDisabled/ │ │ │ ├── objectContentUsableWhenDisabled-nomatch.html │ │ │ ├── objectContentUsableWhenDisabled.html │ │ │ └── objectContentUsableWhenDisabledSpec.js │ │ ├── objectDoesNotFlicker/ │ │ │ ├── objectDoesNotFlicker-nomatch.html │ │ │ ├── objectDoesNotFlicker.html │ │ │ └── objectDoesNotFlickerSpec.js │ │ ├── objectDoesNotUseColorAlone/ │ │ │ ├── objectDoesNotUseColorAlone-nomatch.html │ │ │ ├── objectDoesNotUseColorAlone.html │ │ │ └── objectDoesNotUseColorAloneSpec.js │ │ ├── objectInterfaceIsAccessible/ │ │ │ ├── objectInterfaceIsAccessible-nomatch.html │ │ │ ├── objectInterfaceIsAccessible.html │ │ │ └── objectInterfaceIsAccessibleSpec.js │ │ ├── objectLinkToMultimediaHasTextTranscript/ │ │ │ ├── objectLinkToMultimediaHasTextTranscript-nomatch.html │ │ │ ├── objectLinkToMultimediaHasTextTranscript.html │ │ │ └── objectLinkToMultimediaHasTextTranscriptSpec.js │ │ ├── objectMustContainText/ │ │ │ ├── objectMustContainText.html │ │ │ └── objectMustContainTextSpec.js │ │ ├── objectMustHaveEmbed/ │ │ │ ├── objectMustHaveEmbed-nomatch.html │ │ │ ├── objectMustHaveEmbed.html │ │ │ └── objectMustHaveEmbedSpec.js │ │ ├── objectMustHaveTitle/ │ │ │ ├── objectMustHaveTitle-nomatch.html │ │ │ ├── objectMustHaveTitle.html │ │ │ └── objectMustHaveTitleSpec.js │ │ ├── objectMustHaveValidTitle/ │ │ │ ├── objectMustHaveValidTitle.html │ │ │ └── objectMustHaveValidTitleSpec.js │ │ ├── objectProvidesMechanismToReturnToParent/ │ │ │ ├── objectProvidesMechanismToReturnToParent-nomatch.html │ │ │ ├── objectProvidesMechanismToReturnToParent.html │ │ │ └── objectProvidesMechanismToReturnToParentSpec.js │ │ ├── objectShouldHaveLongDescription/ │ │ │ ├── objectShouldHaveLongDescription-nomatch.html │ │ │ ├── objectShouldHaveLongDescription.html │ │ │ └── objectShouldHaveLongDescriptionSpec.js │ │ ├── objectTextUpdatesWhenObjectChanges/ │ │ │ ├── objectTextUpdatesWhenObjectChanges-nomatch.html │ │ │ ├── objectTextUpdatesWhenObjectChanges.html │ │ │ └── objectTextUpdatesWhenObjectChangesSpec.js │ │ ├── objectUIMustBeAccessible/ │ │ │ ├── objectUIMustBeAccessible-nomatch.html │ │ │ ├── objectUIMustBeAccessible.html │ │ │ └── objectUIMustBeAccessibleSpec.js │ │ ├── objectWithClassIDHasNoText/ │ │ │ ├── objectWithClassIDHasNoText-nomatch.html │ │ │ ├── objectWithClassIDHasNoText.html │ │ │ └── objectWithClassIDHasNoTextSpec.js │ │ ├── pNotUsedAsHeader/ │ │ │ ├── pNotUsedAsHeader.html │ │ │ └── pNotUsedAsHeaderSpec.js │ │ ├── passwordHasLabel/ │ │ │ ├── passwordHasLabel.html │ │ │ └── passwordHasLabelSpec.js │ │ ├── preShouldNotBeUsedForTabularLayout/ │ │ │ ├── preShouldNotBeUsedForTabularLayout.html │ │ │ └── preShouldNotBeUsedForTabularLayoutSpec.js │ │ ├── radioHasLabel/ │ │ │ ├── radioHasLabel.html │ │ │ └── radioHasLabelSpec.js │ │ ├── radioMarkedWithFieldgroupAndLegend/ │ │ │ ├── radioMarkedWithFieldgroupAndLegend-nomatch.html │ │ │ ├── radioMarkedWithFieldgroupAndLegend.html │ │ │ └── radioMarkedWithFieldgroupAndLegendSpec.js │ │ ├── scriptContentAccessibleWithScriptsTurnedOff/ │ │ │ ├── scriptContentAccessibleWithScriptsTurnedOff-nomatch.html │ │ │ ├── scriptContentAccessibleWithScriptsTurnedOff.html │ │ │ └── scriptContentAccessibleWithScriptsTurnedOffSpec.js │ │ ├── scriptInBodyMustHaveNoscript/ │ │ │ ├── scriptInBodyMustHaveNoscript-fail.html │ │ │ ├── scriptInBodyMustHaveNoscript-nomatch.html │ │ │ ├── scriptInBodyMustHaveNoscript-pass.html │ │ │ └── scriptInBodyMustHaveNoscriptSpec.js │ │ ├── scriptOnFocusChangeBackgroundOrBorder/ │ │ │ ├── scriptOnFocusChangeBackgroundOrBorder.html │ │ │ └── scriptOnFocusChangeBackgroundOrBorderSpec.js │ │ ├── scriptOnclickRequiresOnKeypress/ │ │ │ ├── scriptOnclickRequiresOnKeypress.html │ │ │ └── scriptOnclickRequiresOnKeypressSpec.js │ │ ├── scriptOndblclickRequiresOnKeypress/ │ │ │ ├── scriptOndblclickRequiresOnKeypress.html │ │ │ └── scriptOndblclickRequiresOnKeypressSpec.js │ │ ├── scriptOnmousedownRequiresOnKeypress/ │ │ │ ├── scriptOnmousedownRequiresOnKeypress.html │ │ │ └── scriptOnmousedownRequiresOnKeypressSpec.js │ │ ├── scriptOnmousemove/ │ │ │ ├── scriptOnmousemove.html │ │ │ └── scriptOnmousemoveSpec.js │ │ ├── scriptOnmouseoutHasOnmouseblur/ │ │ │ ├── scriptOnmouseoutHasOnmouseblur.html │ │ │ └── scriptOnmouseoutHasOnmouseblurSpec.js │ │ ├── scriptOnmouseoverHasOnfocus/ │ │ │ ├── scriptOnmouseoverHasOnfocus.html │ │ │ └── scriptOnmouseoverHasOnfocusSpec.js │ │ ├── scriptOnmouseupHasOnkeyup/ │ │ │ ├── scriptOnmouseupHasOnkeyup.html │ │ │ └── scriptOnmouseupHasOnkeyupSpec.js │ │ ├── scriptsDoNotFlicker/ │ │ │ ├── scriptsDoNotFlicker-nomatch.html │ │ │ ├── scriptsDoNotFlicker.html │ │ │ └── scriptsDoNotFlickerSpec.js │ │ ├── scriptsDoNotUseColorAlone/ │ │ │ ├── scriptsDoNotUseColorAlone-nomatch.html │ │ │ ├── scriptsDoNotUseColorAlone.html │ │ │ └── scriptsDoNotUseColorAloneSpec.js │ │ ├── selectDoesNotChangeContext/ │ │ │ ├── selectDoesNotChangeContext.html │ │ │ └── selectDoesNotChangeContextSpec.js │ │ ├── selectHasAssociatedLabel/ │ │ │ ├── selectHasAssociatedLabel.html │ │ │ └── selectHasAssociatedLabelSpec.js │ │ ├── selectJumpMenu/ │ │ │ ├── selectJumpMenu.html │ │ │ └── selectJumpMenuSpec.js │ │ ├── siteMap/ │ │ │ ├── siteMap.html │ │ │ └── siteMapSpec.js │ │ ├── skipToContentLinkProvided/ │ │ │ ├── skipToContentLinkProvided-fail-2.html │ │ │ ├── skipToContentLinkProvided-fail.html │ │ │ ├── skipToContentLinkProvided-pass-2.html │ │ │ ├── skipToContentLinkProvided.html │ │ │ └── skipToContentLinkProvidedSpec.js │ │ ├── svgContainsTitle/ │ │ │ ├── svgContainsTitle-nomatch.html │ │ │ ├── svgContainsTitle.html │ │ │ └── svgContainsTitleSpec.js │ │ ├── tabIndexFollowsLogicalOrder/ │ │ │ ├── tabIndexFollowsLogicalOrder-fail.html │ │ │ ├── tabIndexFollowsLogicalOrder.html │ │ │ └── tabIndexFollowsLogicalOrderSpec.js │ │ ├── tableCaptionIdentifiesTable/ │ │ │ ├── tableCaptionIdentifiesTable-nomatch.html │ │ │ ├── tableCaptionIdentifiesTable.html │ │ │ └── tableCaptionIdentifiesTableSpec.js │ │ ├── tableComplexHasSummary/ │ │ │ ├── tableComplexHasSummary-nomatch.html │ │ │ ├── tableComplexHasSummary.html │ │ │ └── tableComplexHasSummarySpec.js │ │ ├── tableDataShouldHaveTh/ │ │ │ ├── tableDataShouldHaveTh-nomatch.html │ │ │ ├── tableDataShouldHaveTh.html │ │ │ └── tableDataShouldHaveThSpec.js │ │ ├── tableIsGrouped/ │ │ │ ├── tableIsGrouped-nomatch.html │ │ │ ├── tableIsGrouped.html │ │ │ └── tableIsGroupedSpec.js │ │ ├── tableLayoutDataShouldNotHaveTh/ │ │ │ ├── tableLayoutDataShouldNotHaveTh.html │ │ │ └── tableLayoutDataShouldNotHaveThSpec.js │ │ ├── tableLayoutHasNoCaption/ │ │ │ ├── tableLayoutHasNoCaption.html │ │ │ └── tableLayoutHasNoCaptionSpec.js │ │ ├── tableLayoutHasNoSummary/ │ │ │ ├── tableLayoutHasNoSummary.html │ │ │ └── tableLayoutHasNoSummarySpec.js │ │ ├── tableLayoutMakesSenseLinearized/ │ │ │ ├── tableLayoutMakesSenseLinearized.html │ │ │ └── tableLayoutMakesSenseLinearizedSpec.js │ │ ├── tableNotUsedForLayout/ │ │ │ ├── tableNotUsedForLayout.html │ │ │ └── tableNotUsedForLayoutSpec.js │ │ ├── tableShouldUseHeaderIDs/ │ │ │ ├── tableShouldUseHeaderIDs.html │ │ │ └── tableShouldUseHeaderIDsSpec.js │ │ ├── tableSummaryDoesNotDuplicateCaption/ │ │ │ ├── tableSummaryDoesNotDuplicateCaption.html │ │ │ └── tableSummaryDoesNotDuplicateCaptionSpec.js │ │ ├── tableSummaryIsEmpty/ │ │ │ ├── tableSummaryIsEmpty.html │ │ │ └── tableSummaryIsEmptySpec.js │ │ ├── tableSummaryIsNotTooLong/ │ │ │ ├── tableSummaryIsNotTooLong.html │ │ │ └── tableSummaryIsNotTooLongSpec.js │ │ ├── tableUseColGroup/ │ │ │ ├── tableUseColGroup.html │ │ │ └── tableUseColGroupSpec.js │ │ ├── tableUsesAbbreviationForHeader/ │ │ │ ├── tableUsesAbbreviationForHeader.html │ │ │ └── tableUsesAbbreviationForHeaderSpec.js │ │ ├── tableUsesCaption/ │ │ │ ├── tableUsesCaption-nomatch.html │ │ │ ├── tableUsesCaption.html │ │ │ └── tableUsesCaptionSpec.js │ │ ├── tableUsesScopeForRow/ │ │ │ ├── tableUsesScopeForRow.html │ │ │ └── tableUsesScopeForRowSpec.js │ │ ├── tableWithBothHeadersUseScope/ │ │ │ ├── tableWithBothHeadersUseScope-nomatch.html │ │ │ ├── tableWithBothHeadersUseScope.html │ │ │ └── tableWithBothHeadersUseScopeSpec.js │ │ ├── tabularDataIsInTable/ │ │ │ ├── tabularDataIsInTable.html │ │ │ └── tabularDataIsInTableSpec.js │ │ ├── textIsNotSmall/ │ │ │ ├── textIsNotSmall.html │ │ │ └── textIsNotSmallSpec.js │ │ ├── textareaHasAssociatedLabel/ │ │ │ ├── textareaHasAssociatedLabel.html │ │ │ └── textareaHasAssociatedLabelSpec.js │ │ ├── videoMayBePresent/ │ │ │ ├── videoMayBePresent.html │ │ │ └── videoMayBePresentSpec.js │ │ ├── videoProvidesCaptions/ │ │ │ ├── videoProvidesCaptions-nomatch.html │ │ │ └── videoProvidesCaptionsSpec.js │ │ ├── videosEmbeddedOrLinkedNeedCaptions/ │ │ │ ├── videosEmbeddedOrLinkedNeedCaptions.html │ │ │ └── videosEmbeddedOrLinkedNeedCaptionsSpec.js │ │ ├── whiteSpaceInWord/ │ │ │ ├── whiteSpaceInWord.html │ │ │ └── whiteSpaceInWordSpec.js │ │ └── whiteSpaceNotUsedForFormatting/ │ │ ├── whiteSpaceNotUsedForFormattingSpec.js │ │ └── whitespaceNotUsedForFormatting.html │ ├── templates/ │ │ ├── assessmentHtmlTemplate.html │ │ ├── assessmentTestTemplate.js │ │ ├── componentTemplate.js │ │ ├── htmlTemplate.html │ │ ├── selectorTemplate.js │ │ └── specTemplate.js │ └── testRunner.js └── config/ ├── assessmentsToRun.json ├── defaults.js ├── index.js ├── local.js ├── mobile.js └── travis-ci.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .babelrc ================================================ { "presets": [ "es2015" ], "plugins": [ "transform-object-rest-spread" ] } ================================================ FILE: .editorconfig ================================================ # This file is for unifying the coding style for different editors and IDEs # editorconfig.org root = true [*] charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true indent_style = space indent_size = 2 ================================================ FILE: .eslintrc ================================================ { "parser": "babel-eslint", "extends": "eslint:recommended", "rules": { "quotes": [2, "single", "avoid-escape"], "strict": 0, "no-underscore-dangle": 0, "curly": 2, "no-multi-spaces": 2, "key-spacing": 2, "no-return-assign": 0, "consistent-return": 0, "no-shadow": 0, "comma-dangle": 1, "no-use-before-define": 0, "no-empty": 2, "new-parens": 2, "no-cond-assign": 0, "no-fallthrough": 0, "new-cap": 0, "no-loop-func": 0, "no-unreachable": 0, "no-labels": 0, "no-process-exit": 0, "camelcase": 0, "no-console": 0 }, "env": { "node": true }, "globals": { "window": true, "Node": true, "XMLHttpRequest": true, "document": true, "jQuery": true, "$": true, "globalQuail": true, "guessLanguage": true, "process": true, "quailBuilderTests": true, "require": true, "phantom": true, "console": true, "module": true, "define": true, "chai": true, "__dirname": true, "global": true, "before": true, "beforeEach": true, "after": true, "afterEach": true, "describe": true, "it": true, "expect": true, "assert": true, "should": true } } ================================================ FILE: .gitignore ================================================ _site/* .htaccess .idea *.DS_Store examples/wysiwyg/editors/aloha/* examples/wysiwyg/editors/tinymce/* examples/wysiwyg/editors/ckeditor/* examples/wysiwyg/editors/ckeditor4/* node_modules/* .grunt/* lib test/quail-testing.jquery.js test/accessibility-tests/_tests.json test/quail-testrunner.js test/accessibility-tests/_tests.json test/core/_tests.json analyses/* karma_html/* tmp/* logs/* phantomjsdriver.log vendor/* ================================================ FILE: .jscsrc ================================================ { "disallowKeywords": ["with"], "disallowMixedSpacesAndTabs": true, "disallowMultipleLineBreaks": true, "disallowMultipleSpaces": true, "disallowNewlineBeforeBlockStatements": true, "disallowQuotedKeysInObjects": "allButReserved", "disallowSpaceAfterObjectKeys": true, "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "~", "!"], "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], "disallowSpacesInCallExpression": true, "disallowSpacesInsideArrayBrackets": "all", "disallowSpacesInsideObjectBrackets": "all", "disallowSpacesInsideParentheses": true, "disallowTrailingComma": true, "disallowTrailingWhitespace": true, "disallowYodaConditions": true, // "jsDoc": { // "checkAnnotations": "JSDoc3", // "checkParamNames": true, // "checkRedundantAccess": true, // "checkRedundantParams": true, // "checkRedundantReturns": true, // "checkTypes": "strictNativeCase", // "enforceExistence": "exceptExports", // "leadingUnderscoreAccess": "private", // "requireHyphenBeforeDescription": true, // "requireNewlineAfterDescription": true, // "requireDescriptionCompleteSentence": true, // "requireParamDescription": true, // "requireParamTypes": true, // "requireReturnTypes": true // }, "requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties", "requireCapitalizedConstructors": true, "requireCommaBeforeLineBreak": true, "requireCurlyBraces": [ "if", "else", "for", "while", "do", "try", "catch" ], "requireDotNotation": true, "requireKeywordsOnNewLine": ["else"], "requireLineFeedAtFileEnd": true, "requireLineBreakAfterVariableAssignment": true, "requireOperatorBeforeLineBreak": [ "?", "=", "+", "-", "/", "*", "==", "===", "!=", "!==", ">", ">=", "<", "<=" ], "requireParenthesesAroundIIFE": true, "requireSpaceAfterBinaryOperators": [ "=", ",", "+", "-", "/", "*", "==", "===", "!=", "!==" ], "requireSpaceAfterKeywords": [ "do", "for", "if", "else", "switch", "case", "try", "catch", "void", "while", "with", "return", "typeof" ], "requireSpaceAfterLineComment": true, "requireSpaceBeforeBinaryOperators": [ "=", "+", "-", "/", "*", "==", "===", "!=", "!==" ], "requireSpaceBeforeBlockStatements": true, "requireSpaceBeforeObjectValues": true, "requireSpacesInConditionalExpression": { "afterTest": true, "beforeConsequent": true, "afterConsequent": true, "beforeAlternate": true }, "requireSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, "requireSpacesInFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, "requireSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, "safeContextKeyword": ["self", "that"], "validateIndentation": 2, "validateQuoteMarks": "'", "validateParameterSeparator": ", " } ================================================ FILE: .jshintrc ================================================ { "boss": true, "browser": true, "curly": true, "eqeqeq": true, "eqnull": true, "expr": true, "forin": true, "loopfunc": true, "globals": { "guessLanguage": true, "process": true, "quail": true, "quailBuilderTests": true, "require": true, "phantom": true, "console": true, "module": true, "define": true, "chai": true, "__dirname": true, "global": true, "before": true, "beforeEach": true, "after": true, "afterEach": true, "describe": true, "it": true, "expect": true, "assert": true }, "immed": true, "indent": 2, "jquery": true, "latedef": true, "noarg": true, "node": true, "smarttabs": true, "sub": true, "trailing": true, "undef": true } ================================================ FILE: .nvmrc ================================================ 0.12 ================================================ FILE: .quailrc ================================================ { "assessmentSpecsPath": "test/assessmentSpecs/specs", "quail": "dist/runInBrowser.js", "requireModules": [], "requireAssessmentModules": [ "config/all_assessments.json" ], "requirePaths": [ "./src/assessments" ] } ================================================ FILE: .travis.yml ================================================ language: node_js node_js: - 0.12 # Selenium 2.44.0 does not work with PhantomJS. Use 2.43.0 # @see https://code.google.com/p/selenium/issues/detail?id=8088 before_script: - "curl -O http://selenium-release.storage.googleapis.com/2.43/selenium-server-standalone-2.43.1.jar" - "java -jar selenium-server-standalone-2.43.1.jar 2>&1 >/dev/null &" # Use Travis' new container-based running system. sudo: false install: - npm install addons: sauce_connect: true env: global: - secure: DkVmhBxHBkRFeVwfAifwjYzPGgj2TO/wX27zchhE9cTaS9kWnmn6W7p/m5Pps6yhZocZhSfSedL31501L94zIGCivM2Svi0mlAbEoXFaBhbOvFEy3dHwLmnzR36hdcdkzXqPxymw0o14lw2DwBGrsldGOnFetlux/7G8+i0NYDk= - secure: LNqb5VmAhD1mJsdBbkgc68d8e93QyRLWTlBfX9wksV09a4PJ+UVTncG/L52yDh3jpQ7je2SAzMiauZ/mXiPTveTAhioC4SA6f8NUJX2FhkUUfeMmxfzFMI3KkFr+Q9WPw+iAPxCkdpgxiVdbTDqi6p9NjDYxgaFP71KQy75aq2c= matrix: # - _BROWSER: "chrome" # _PLATFORM: "Windows_8" # _VERSION: "34" # _ENV: "desktop" # - _BROWSER: "firefox" # _PLATFORM: "Windows_8" # _VERSION: "29" # _ENV: "desktop" # - _BROWSER: "internet_explorer" # _PLATFORM: "Windows_8" # _VERSION: "10" # _ENV: "desktop" # - _BROWSER: "safari" # _PLATFORM: "OS X 10.9" # _VERSION: "7" # _ENV: "desktop" - _BROWSER: phantomjs _ENV: functional ================================================ FILE: CHANGELOG.md ================================================ QUAIL Changelog =============== 3.0.0 ------ - The order of the arguments to the test runners has changed. It was ``` // args[0]: The test runner script. // args[1]: The URL to evaluate. // args[2]: The current working directory. // args[3]: The file to write analysis to. ``` and it is now ``` // args[0]: The test runner script. // args[1]: The URL to evaluate. // args[2]: The current working directory. // args[3]: The configuration for the phantomjs instance. // args[4]: The file to write analysis to. ``` 2.2.17 ------ - Added --output option to the commandline 2.2.16 ------ - Fixes for pNotUsedAsHeader (@mlewand) 2.2.15 ------ - Downgraded the testability of pNotUsedAsHeader to 0.5 from 1.0 2.2.14 ------ - Fixes for videosEmbeddedOrLinkedNeedCaptions 2.2.13 ------ - Flubbed up version, please ignore. 2.2.12 ------ - Make the address to test available to page.evaluate 2.2.11 ------ - Pulled the color tests into separate tests (PR #296) - Introduction WCAG2 test runner option - Implemented tableHeaders in linkHasAUniqueContext - Added tableHeaders.js - Fixed inputImageHasAlt test - Refactored tagsAreNestCorrectly to be a pass/fail test - Rewrote aInPHasADistinctStyle 2.2.10 ------ - No release, skipped. 2.1 --- - Changed license to MIT - Quail is now split into various components and custom callbacks that are build using `grunt build` - Configuration is now in YAML format - Tests are explicitly aligned with WCAG techniques or success criteria. - Tests can have translatable titles and default descriptions. - Tests now support different configurations based on guideline alignment. 2.0.4 ----- - Moved source files to different files in `/src`, `/dist` is now built versions of quail. - Renamed all test files to match their accessibility tests. - Updated most test files to HTML5 doctype. - Got rid of dependencies for pxtoem and hasEvent libraries. - Made strings build into JS instead of needing ajax calls. 2.0.3 ----- - Added tags to tests so that they could be categorized by implementations. - Cleaned up some Grunt linting. 2.0.2 ----- - Added filtering as an extra option. - Allowed for adding custom tests through a customTests option. - Bug fixes on CSS color contrast 2.0.1 ----- - Removed unused tests from OAC - A few bug fixes on test reporting 2.0.0 ----- Rebuild of QUAIL as a jQuery plugin instead of being a PHP library. ================================================ FILE: LICENSE-MIT ================================================ Copyright 2015 Jesse Beach and other contributors http://quailjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ [![Build Status](https://secure.travis-ci.org/quailjs/quail.png?branch=master)](http://travis-ci.org/quailjs/quail) # Deprecation All projects have a useful lifespan. Quail was born during a time when accessibility testing, as a discipline, was maturing. There were numerous teams building solutions in parallel -- Quail was just one of these. In the end, we were all orbiting around the same general approach. Technology may have been a distinguishing factor a couple years ago, but even these advantages have largely dissolved as solutions have evolved and improved over time. Given the realities of the market and the limited time that the Quail team can devote to this project, we are initializing deprecation for this project. Folks are welcome to fork it or volunteer to maintain it, but realistically, there are better options out there. If you are looking for one, we recommend [aXe: the Accessibility Engine](https://github.com/dequelabs/axe-core) by [Deque Labs](https://github.com/dequelabs). # Quail: Accessibility Information Library **The project website is [quailjs.io](http://quailjs.io/).** Quail is a Node module and a jQuery plugin that lets you easily check HTML for adherence to accessibility standards. It comes with over 200 tests which implement Open Accessibility Tests and comes with WCAG 1.0, WCAG 2.0, and Section 508 guidelines. Developers can build their own guidelines, or easily build a custom guideline that integrates with their project. While the project supports checking entire HTML pages, integration with a CMS to check partial HTML content is probably the most popular use case. **Notice for developers working in the 2.2.x version.** Please base your changes on the [```master-2.2.x```](https://github.com/quailjs/quail/tree/master-2.2.x) branch. ## Requirements You will need the following installed on your system to run Quail. 1. [Node.js](https://nodejs.org/download/) 1. [Grunt & Grunt CLI](http://gruntjs.com/installing-grunt) 1. [Bower](http://bower.io/) 1. [Java JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) (To run Selenium Server) 1. [Karma](http://karma-runner.github.io/0.8/intro/installation.html) ## Using Quail ### Setup Run the following commands to build Quail. ```bash git clone https://github.com/quailjs/quail.git cd quail npm install bower install grunt build ``` ### Using Quail from the command line To see the Quail CLI API, run the following. You can also add the Quail bin directory to your PATH if you are so inclined. ```bash ./bin/quail --help ``` Once the command is set up, you can run the following to test any addressable web page. ```bash ./bin/quail eval http://placekitten.com ``` Write the results as a JSON object out to file in an existing directory. ```bash ./bin/quail evaluate http://placekitten.com -o ./analyses ``` You can also pass configurations to the evaluator. ```bash ./bin/quail evaluate http://placekitten.com -c ~/path/to/myconfig.json -o ./analyses ``` This is the default set of configurations. Your configurations will replace the defaults. ```json { "phantomjs": { "resourceTimeout": 5000 }, "blacklists": { "domains": [ "fbstatic.com", "facebook.com", "twitter.com", "google-analytics.com", "googleadservices.com", "googlesyndication.com", "perfectaudience.com", "typekit.com", "sharethis.com", "doubleclick.com", "optimizely.com", "gigya.com" ], "mimetypes": [ "application/x-shockwave-flash", "application/(ms)?(word|powerpoint|excel)" ], "headers": [] } } ``` The ```phantomjs``` configurations affect the PhantomJS runtime. The ```blacklists``` block resource resource requests from PhantomJS by the resource's domain, its mime type or a header name in the request. Currently the only header value that can be blocked is the value of Accept (mime type). To work on an existing assessment in a browser (so that breakpoints can be set in the console), run the following. ```bash ./bin/quail dev aMustHaveTitle ``` The following is experimental, which means it probably won\'t work. You can generate a new assessment with this command. ```bash ./bin/quail gen someNewAssessment ``` ## Testing ### Core unit tests in Karma ```bash ./node_modules/karma/bin/karma start ./config/karma-unit.conf.js ``` ### Testing assessments in Selenium All assessments. This takes about 10 minutes to run. ```bash node ./test/assessmentSpecs/testRunner.js ``` An individual assessment. This takes about 2 seconds to run. ```bash node ./test/assessmentSpecs/testRunner.js -I aMustHaveTitle ``` In a specific browser. ```bash _BROWSER=chrome node ./test/assessmentSpecs/testRunner.js ``` ## Documentation [Full documentation is available via readthedocs.org](https://quail.readthedocs.org/en/latest/). ## Contributing Pull requests should be made against the **master** branch. We are currently looking for the following types of contritions. 1. Help with our current [Milestone objectives](https://github.com/quailjs/quail/milestones/Refactoring%20to%20a%20Selenium-based%20test%20runner%20and%20Mocha/Chai%20assessment%20tests). 1. JavaScript enthusiasts who want a chance to build out: 1. A dependency injection load pattern: [Replace our load-order-depending spinup with an Inversion of Control pattern](https://github.com/quailjs/quail/issues/297) 1. A pub/sub pattern: [Refactor the custom event bubbling code in the core Classes (e.g. TestCollection) to use a real event pub/sub library](https://github.com/quailjs/quail/issues/351) 1. Improve an NPM package, better build and test scripts, etc: [Improve the Quail NPM package](https://github.com/quailjs/quail/issues/352) ## Credits - Quail is maintained by [Jesse Renée Beach](http://twitter.com/jessebeach) - The [Kwaliteitsinstituut Nederlandse Gemeenten (KING)](https://www.kinggemeenten.nl/), who have funded many developer hours. - The [CKEditor development team](http://ckeditor.com/about) for their contributions. ## References [HTML Test Suite for WCAG 2.0, Sorted by Guideline](http://www.w3.org/WAI/GL/WCAG20/tests/) ## Legal QUAIL is covered under the MIT License, and is copyright (c) 2015 by Jesse Beach. Current license is at http://quailjs.org/license. ================================================ FILE: bin/quail.js ================================================ #!/usr/bin/env node console.error("The CLI has been moved into the package `@quailjs/quail-cli`."); console.log(); console.log("$ npm install -g @quailjs/quail-cli"); console.log(); process.exit(1); ================================================ FILE: config/all_assessments.json ================================================ [ "AAdjacentWithSameResourceShouldBeCombined", "AImgAltNotRepetitive", "AInPHasADistinctStyle", "ALinkTextDoesNotBeginWithRedundantWord", "ALinkWithNonText", "ALinksAreSeparatedByPrintableCharacters", "ALinksDontOpenNewWindow", "ALinksNotSeparatedBySymbols", "ALinksToMultiMediaRequireTranscript", "ALinksToSoundFilesNeedTranscripts", "AMultimediaTextAlternative", "AMustContainText", "AMustHaveTitle", "AMustNotHaveJavascriptHref", "AppletContainsTextEquivalent", "AppletContainsTextEquivalentInAlt", "AppletProvidesMechanismToReturnToParent", "AppletTextEquivalentsGetUpdated", "AppletUIMustBeAccessible", "AppletsDoNotFlicker", "AppletsDonotUseColorAlone", "ASuspiciousLinkText", "ATitleDescribesDestination", "AnimatedGifMayBePresent", "AreaAltIdentifiesDestination", "AreaAltRefersToText", "AreaDontOpenNewWindow", "AreaHasAltValue", "AreaLinksToSoundFile", "AudioMayBePresent", "BasefontIsNotUsed", "BlinkIsNotUsed", "BlockquoteNotUsedForIndentation", "BlockquoteUseForQuotations", "BoldIsNotUsed", "ButtonHasName", "CheckboxHasLabel", "ColorBackgroundGradientContrast", "ColorBackgroundImageContrast", "ColorElementBehindBackgroundGradientContrast", "ColorElementBehindBackgroundImageContrast", "ColorElementBehindContrast", "ColorFontContrast", "CssDocumentMakesSenseStyleTurnedOff", "DefinitionListsAreUsed", "DoctypeProvided", "DocumentAcronymsHaveElement", "DocumentAutoRedirectNotUsed", "DocumentContentReadableWithoutStylesheets", "DocumentHasTitleElement", "DocumentIsWrittenClearly", "DocumentLangIsISO639Standard", "DocumentLangNotIdentified", "DocumentMetaNotUsedWithTimeout", "DocumentReadingDirection", "DocumentStrictDocType", "DocumentTitleDescribesDocument", "DocumentTitleIsNotPlaceholder", "DocumentTitleIsShort", "DocumentTitleNotEmpty", "DocumentVisualListsAreMarkedUp", "EmbedHasAssociatedNoEmbed", "EmbedMustHaveAltAttribute", "FieldsetHasLabel", "FileHasLabel", "FontIsNotUsed", "FormButtonsHaveValue", "FormErrorMessageHelpsUser", "FormHasGoodErrorMessage", "FormHasSubmitButton", "FormWithRequiredLabel", "HeaderH1", "HeaderH1Format", "HeaderH2", "HeaderH2Format", "HeaderH3", "HeaderH3Format", "HeaderH4", "HeaderH4Format", "HeaderH5Format", "HeaderH6Format", "HeadersAttrRefersToATableCell", "HeadersHaveText", "HeadersUseToMarkSections", "IIsNotUsed", "IdrefsHasCorrespondingId", "IframeMustNotHaveLongdesc", "ImageMapServerSide", "ImgAltIsDifferent", "ImgAltIsTooLong", "ImgAltNotEmptyInAnchor", "ImgAltNotPlaceHolder", "ImgHasAlt", "ImgHasLongDesc", "ImgImportantNoSpacerAlt", "ImgNonDecorativeHasAlt", "ImgServerSideMapNotUsed", "ImgShouldNotHaveTitle", "ImgWithMapHasUseMap", "InputCheckboxRequiresFieldset", "InputElementsDontHaveAlt", "InputImageAltIsNotFileName", "InputImageAltIsNotPlaceholder", "InputImageAltIsShort", "InputImageAltNotRedundant", "InputImageHasAlt", "InputTextHasLabel", "InputTextHasValue", "InputTextValueNotEmpty", "InputWithoutLabelHasTitle", "LabelDoesNotContainInput", "LabelMustBeUnique", "LabelMustNotBeEmpty", "LabelsAreAssignedToAnInput", "LanguageDirAttributeIsUsed", "LanguageDirectionPunctuation", "LanguageUnicodeDirection", "LegendTextNotEmpty", "LegendTextNotPlaceholder", "LiDontUseImageForBullet", "LinkHasAUniqueContext", "ListNotUsedForFormatting", "ListOfLinksUseList", "MarqueeIsNotUsed", "NewWindowIsOpened", "ObjectMustContainText", "ObjectMustHaveEmbed", "ObjectMustHaveTitle", "ObjectMustHaveValidTitle", "PNotUsedAsHeader", "PasswordHasLabel", "PreShouldNotBeUsedForTabularLayout", "RadioHasLabel", "ScriptOnclickRequiresOnKeypress", "ScriptOndblclickRequiresOnKeypress", "ScriptOnmousedownRequiresOnKeypress", "ScriptOnmousemove", "ScriptOnmouseoutHasOnmouseblur", "ScriptOnmouseoverHasOnfocus", "ScriptOnmouseupHasOnkeyup", "SelectHasAssociatedLabel", "SelectJumpMenu", "SiteMap", "SkipToContentLinkProvided", "SvgContainsTitle", "TabIndexFollowsLogicalOrder", "TableDataShouldHaveTh", "TableLayoutDataShouldNotHaveTh", "TableLayoutHasNoCaption", "TableLayoutHasNoSummary", "TableLayoutMakesSenseLinearized", "TableNotUsedForLayout", "TableShouldUseHeaderIDs", "TableSummaryDoesNotDuplicateCaption", "TableSummaryIsEmpty", "TableSummaryIsNotTooLong", "TableUseColGroup", "TableUsesAbbreviationForHeader", "TableUsesCaption", "TableUsesScopeForRow", "TabularDataIsInTable", "TextIsNotSmall", "TextareaHasAssociatedLabel", "VideoMayBePresent", "VideosEmbeddedOrLinkedNeedCaptions", "WhiteSpaceInWord", "WhiteSpaceNotUsedForFormatting" ] ================================================ FILE: dist/bundle.js ================================================ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 1 && text.toUpperCase() !== text) { // Check each word. words.forEach(function (word) { // Only consider words great than one character. if (word.length < 2) { return; } // Only consider words that have not been predefined. // Remove any non-alpha characters. word = word.replace(/[^a-zA-Zs]/, ''); // If this is an uppercase word that has not been defined, it fails. if (word.toUpperCase() === word && typeof predefined[word.toUpperCase().trim()] === 'undefined') { if (typeof alreadyReported[word.toUpperCase()] === 'undefined') { infractions.push(word); } alreadyReported[word.toUpperCase()] = word; } }); // If undefined acronyms are discovered, fail this case. if (infractions.length) { test.add(Case({ element: self, info: { acronyms: infractions }, status: 'failed' })); } else { test.add(Case({ element: self, status: 'passed' })); } } else { test.add(Case({ element: self, status: 'passed' })); } }); }); }; module.exports = AcronymComponent; },{"Case":33,"DOM":34}],2:[function(require,module,exports){ 'use strict'; var DOM = require('DOM'); var BorderDetailsComponent = function BorderDetailsComponent(element) { var borders = new Map(); ['top', 'right', 'bottom', 'left'].forEach(function (side) { var width = DOM.getComputedStyle(element, 'border-' + side + '-width'); width = parseInt(width.slice(0, -2), 10); var style = DOM.getComputedStyle(element, 'border-' + side + '-style'); var color = DOM.getComputedStyle(element, 'border-' + side + '-color'); borders.set(side, { width: width, style: style, color: color }); }); return borders; }; module.exports = BorderDetailsComponent; },{"DOM":34}],3:[function(require,module,exports){ 'use strict'; var CleanStringComponent = function CleanStringComponent(string) { return string.toLowerCase().replace(/^\s\s*/, ''); }; module.exports = CleanStringComponent; },{}],4:[function(require,module,exports){ 'use strict'; var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj); } /** * Test callback for color tests. This handles both WAI and WCAG * color contrast/luminosity. */ var ConvertToPx = require('ConvertToPxComponent'); var DOM = require('DOM'); var IsUnreadable = require('IsUnreadable'); var ColorComponent = function () { function buildCase(test, Case, element, status, id, message) { test.add(Case({ element: element, message: message, status: status })); } var colors = { cache: {}, /** * Returns the lumosity of a given foreground and background object, * in the format of {r: red, g: green, b: blue } in rgb color values. */ getLuminosity: function getLuminosity(foreground, background) { var cacheKey = 'getLuminosity_' + foreground + '_' + background; foreground = colors.parseColor(foreground); background = colors.parseColor(background); if (colors.cache[cacheKey] !== undefined) { return colors.cache[cacheKey]; } var RsRGB = foreground.r / 255; var GsRGB = foreground.g / 255; var BsRGB = foreground.b / 255; var R = RsRGB <= 0.03928 ? RsRGB / 12.92 : Math.pow((RsRGB + 0.055) / 1.055, 2.4); var G = GsRGB <= 0.03928 ? GsRGB / 12.92 : Math.pow((GsRGB + 0.055) / 1.055, 2.4); var B = BsRGB <= 0.03928 ? BsRGB / 12.92 : Math.pow((BsRGB + 0.055) / 1.055, 2.4); var RsRGB2 = background.r / 255; var GsRGB2 = background.g / 255; var BsRGB2 = background.b / 255; var R2 = RsRGB2 <= 0.03928 ? RsRGB2 / 12.92 : Math.pow((RsRGB2 + 0.055) / 1.055, 2.4); var G2 = GsRGB2 <= 0.03928 ? GsRGB2 / 12.92 : Math.pow((GsRGB2 + 0.055) / 1.055, 2.4); var B2 = BsRGB2 <= 0.03928 ? BsRGB2 / 12.92 : Math.pow((BsRGB2 + 0.055) / 1.055, 2.4); var l1, l2; l1 = 0.2126 * R + 0.7152 * G + 0.0722 * B; l2 = 0.2126 * R2 + 0.7152 * G2 + 0.0722 * B2; colors.cache[cacheKey] = Math.round((Math.max(l1, l2) + 0.05) / (Math.min(l1, l2) + 0.05) * 10) / 10; return colors.cache[cacheKey]; }, /** * Returns the average color for a given image * using a canvas element. */ fetchImageColorAtPixel: function fetchImageColorAtPixel(img, x, y) { x = typeof x !== 'undefined' ? x : 1; y = typeof y !== 'undefined' ? y : 1; var can = document.createElement('canvas'); var context = can.getContext('2d'); context.drawImage(img, 0, 0); var data = context.getImageData(x, y, 1, 1).data; return 'rgb(' + data[0] + ',' + data[1] + ',' + data[2] + ')'; }, /** * Returns whether an element's color passes * WCAG at a certain contrast ratio. */ passesWCAG: function passesWCAG(element, level) { return this.passesWCAGColor(element, this.getColor(element, 'foreground'), this.getColor(element, 'background'), level); }, testElmContrast: function testElmContrast(algorithm, element, level) { var background = colors.getColor(element, 'background'); return colors.testElmBackground(algorithm, element, background, level); }, testElmBackground: function testElmBackground(algorithm, element, background, level) { var foreground = colors.getColor(element, 'foreground'); var res; if (algorithm === 'wcag') { res = colors.passesWCAGColor(element, foreground, background, level); } else if (algorithm === 'wai') { res = colors.passesWAIColor(foreground, background); } return res; }, /** * Returns whether an element's color passes * WCAG at a certain contrast ratio. */ passesWCAGColor: function passesWCAGColor(element, foreground, background, level) { var pxfsize = ConvertToPx(DOM.getComputedStyle(element, 'font-size')); if (typeof level === 'undefined') { if (pxfsize >= 18) { level = 3; } else { var fweight = DOM.getComputedStyle(element, 'font-weight'); if (pxfsize >= 14 && (fweight === 'bold' || parseInt(fweight, 10) >= 700)) { level = 3; } else { level = 4.5; } } } return this.getLuminosity(foreground, background) > level; }, /** * Returns whether an element's color passes * WAI brightness levels. */ passesWAI: function passesWAI(element) { var foreground = this.parseColor(this.getColor(element, 'foreground')); var background = this.parseColor(this.getColor(element, 'background')); return this.passesWAIColor(foreground, background); }, /** * Returns whether an element's color passes * WAI brightness levels. */ passesWAIColor: function passesWAIColor(foreground, background) { var contrast = colors.getWAIErtContrast(foreground, background); var brightness = colors.getWAIErtBrightness(foreground, background); return contrast > 500 && brightness > 125; }, /** * Compused contrast of a foreground and background * per the ERT contrast spec. */ getWAIErtContrast: function getWAIErtContrast(foreground, background) { var diffs = colors.getWAIDiffs(foreground, background); return diffs.red + diffs.green + diffs.blue; }, /** * Computed contrast of a foreground and background * per the ERT brightness spec. */ getWAIErtBrightness: function getWAIErtBrightness(foreground, background) { var diffs = colors.getWAIDiffs(foreground, background); return (diffs.red * 299 + diffs.green * 587 + diffs.blue * 114) / 1000; }, /** * Returns differences between two colors. */ getWAIDiffs: function getWAIDiffs(foreground, background) { return { red: Math.abs(foreground.r - background.r), green: Math.abs(foreground.g - background.g), blue: Math.abs(foreground.b - background.b) }; }, /** * Retrieves the background or foreground of an element. * There are some normalizations here for the way * different browsers can return colors, and handling transparencies. */ getColor: function getColor(element, type) { var self = colors; var cacheId = DOM.getData(element, 'quail-cache-id'); if (!cacheId) { cacheId = 'id_' + Math.random(); DOM.setData(element, 'quail-cache-id', cacheId); } var cacheKey = 'getColor_' + type + '_' + cacheId; if (colors.cache[cacheKey] !== undefined) { return colors.cache[cacheKey]; } if (type === 'foreground') { colors.cache[cacheKey] = DOM.getComputedStyle(element, 'color') ? DOM.getComputedStyle(element, 'color') : 'rgb(0,0,0)'; return colors.cache[cacheKey]; } var bcolor = DOM.getComputedStyle(element, 'background-color'); if (colors.hasBackgroundColor(bcolor)) { colors.cache[cacheKey] = bcolor; return colors.cache[cacheKey]; } DOM.parents(element).forEach(function (element) { var pcolor = DOM.getComputedStyle(element, 'background-color'); if (colors.hasBackgroundColor(pcolor)) { return self.cache[cacheKey] = pcolor; } }); // Assume the background is white. colors.cache[cacheKey] = 'rgb(255,255,255)'; return colors.cache[cacheKey]; }, getForeground: function getForeground(element) { return colors.getColor(element, 'foreground'); }, /** * Returns an object with rgba taken from a string. */ parseColor: function parseColor(color) { if ((typeof color === 'undefined' ? 'undefined' : _typeof(color)) === 'object') { return color; } if (color.substr(0, 1) === '#') { return { r: parseInt(color.substr(1, 2), 16), g: parseInt(color.substr(3, 2), 16), b: parseInt(color.substr(5, 2), 16), a: false }; } if (color.substr(0, 3) === 'rgb') { color = color.replace('rgb(', '').replace('rgba(', '').replace(')', '').split(','); return { r: color[0], g: color[1], b: color[2], a: typeof color[3] === 'undefined' ? false : color[3] }; } }, /** * Returns background image of an element or its parents. */ getBackgroundImage: function getBackgroundImage(element) { var cacheId = DOM.getData(element, 'quail-cache-id'); if (!cacheId) { cacheId = 'id_' + Math.random(); DOM.setData(element, 'quail-cache-id', cacheId); } var cacheKey = 'getBackgroundImage_' + cacheId; if (colors.cache[cacheKey] !== undefined) { return colors.cache[cacheKey]; } while (element && element.nodeType === 1 && element.nodeName !== 'BODY' && element.nodeName !== 'HTML') { var bimage = DOM.getComputedStyle(element, 'background-image'); if (bimage && bimage !== 'none' && bimage.search(/^(.*?)url(.*?)$/i) !== -1) { colors.cache[cacheKey] = bimage.replace('url(', '').replace(/['"]/g, '').replace(')', ''); return colors.cache[cacheKey]; } element = element.parentNode; } colors.cache[cacheKey] = false; return false; }, /** * Returns background image of an element or its parents. */ getBackgroundGradient: function getBackgroundGradient(element) { var cacheId = DOM.getData(element, 'quail-cache-id'); if (!cacheId) { cacheId = 'id_' + Math.random(); DOM.setData(element, 'quail-cache-id', cacheId); } var cacheKey = 'getBackgroundGradient_' + cacheId; if (colors.cache[cacheKey] !== undefined) { return colors.cache[cacheKey]; } var notEmpty = function notEmpty(s) { return typeof s === 'string' && s.trim() !== ''; }; while (element && element.nodeType === 1 && element.nodeName !== 'BODY' && element.nodeName !== 'HTML') { // Exit if element has a background color. if (colors.hasBackgroundColor(DOM.getComputedStyle(element, 'background-color'))) { colors.cache[cacheKey] = false; return false; } var bimage = DOM.getComputedStyle(element, 'background-image'); if (bimage && bimage !== 'none' && bimage.search(/^(.*?)gradient(.*?)$/i) !== -1) { var gradient = bimage.match(/gradient(\(.*\))/g); if (gradient.length > 0) { gradient = gradient[0].replace(/(linear|radial|\d+deg|from|\bto\b|gradient|top|left|bottom|right|color-stop|center|\d*%)/g, ''); colors.cache[cacheKey] = gradient.match(/(rgb\([^\)]+\)|#[a-z\d]*|[a-z]*)/g).filter(notEmpty); return colors.cache[cacheKey]; } } element = element.parentNode; } colors.cache[cacheKey] = false; return false; }, /** * Calculates average color of an image. */ getAverageRGB: function getAverageRGB(img) { var cacheKey = img.src; if (colors.cache[cacheKey] !== undefined) { return colors.cache[cacheKey]; } var blockSize = 5, // only visit every 5 pixels defaultRGB = { r: 0, g: 0, b: 0 }, // for non-supporting envs canvas = document.createElement('canvas'), context = canvas.getContext && canvas.getContext('2d'), data, width, height, i = -4, length, rgb = { r: 0, g: 0, b: 0, a: 0 }, count = 0; if (!context) { colors.cache[cacheKey] = defaultRGB; return defaultRGB; } height = canvas.height = img.height; width = canvas.width = img.width; context.drawImage(img, 0, 0); try { data = context.getImageData(0, 0, width, height); } catch (e) { colors.cache[cacheKey] = defaultRGB; return defaultRGB; } length = data.data.length; while ((i += blockSize * 4) < length) { ++count; rgb.r += data.data[i]; rgb.g += data.data[i + 1]; rgb.b += data.data[i + 2]; } // ~~ used to floor values rgb.r = ~ ~(rgb.r / count); rgb.g = ~ ~(rgb.g / count); rgb.b = ~ ~(rgb.b / count); colors.cache[cacheKey] = rgb; return rgb; }, /** * Convert color to hex value. */ colorToHex: function colorToHex(c) { var m = /rgba?\((\d+), (\d+), (\d+)/.exec(c); return m ? '#' + (1 << 24 | m[1] << 16 | m[2] << 8 | m[3]).toString(16).substr(1) : c; }, /** * Check if element has a background color. */ hasBackgroundColor: function hasBackgroundColor(bcolor) { return bcolor !== 'rgba(0, 0, 0, 0)' && bcolor !== 'transparent'; }, /** * Traverse visual tree for background property. */ traverseVisualTreeForBackground: function traverseVisualTreeForBackground(element, property) { var cacheId = DOM.getData(element, 'quail-cache-id'); if (!cacheId) { cacheId = 'id_' + Math.random(); DOM.setData(element, 'quail-cache-id', cacheId); } var cacheKey = 'traverseVisualTreeForBackground_' + cacheId + '_' + property; if (colors.cache[cacheKey] !== undefined) { return colors.cache[cacheKey]; } var notempty = function notempty(s) { return typeof s === 'string' && s.trim() !== ''; }; var foundIt; var scannedElements = []; // Scroll to make sure element is visible. element.scrollIntoView(); // Get relative x and y. var x = DOM.offset(element).left - window.scrollX; var y = DOM.offset(element).top - window.scrollY; // Hide current element. scannedElements.push({ element: element, visibility: DOM.getComputedStyle(element, 'visibility') }); DOM.setAttributes(element, { style: { visibility: 'hidden' } }); // Get element at position x, y. This only selects visible elements. var el = document.elementFromPoint(x, y); var MAX_LOOPS = 200; var count = 1; while (foundIt === undefined && el && el.tagName !== 'BODY' && el.tagName !== 'HTML' && count <= MAX_LOOPS) { count++; var bcolor = DOM.getComputedStyle(el, 'background-color'); var bimage; // Only check visible elements. switch (property) { case 'background-color': if (colors.hasBackgroundColor(bcolor)) { foundIt = bcolor; } break; case 'background-gradient': // Bail out if the element has a background color. if (colors.hasBackgroundColor(bcolor)) { foundIt = false; continue; } bimage = DOM.getComputedStyle(el, 'background-image'); if (bimage && bimage !== 'none' && bimage.search(/^(.*?)gradient(.*?)$/i) !== -1) { var gradient = bimage.match(/gradient(\(.*\))/g); if (gradient.length > 0) { gradient = gradient[0].replace(/(linear|radial|\d+deg|from|\bto\b|gradient|top|left|bottom|right|color-stop|center|\d*%)/g, ''); foundIt = gradient.match(/(rgb\([^\)]+\)|#[a-z\d]*|[a-z]*)/g).filter(notempty); } } break; case 'background-image': // Bail out if the element has a background color. if (colors.hasBackgroundColor(bcolor)) { foundIt = false; continue; } bimage = DOM.getComputedStyle(el, 'background-image'); if (bimage && bimage !== 'none' && bimage.search(/^(.*?)url(.*?)$/i) !== -1) { foundIt = bimage.replace('url(', '').replace(/['"]/g, '').replace(')', ''); } break; } scannedElements.push({ element: el, visibility: DOM.getComputedStyle(el, 'visibility') }); DOM.setAttributes(el, { style: { visibility: 'hidden' } }); el = document.elementFromPoint(x, y); } // Reset visibility. for (var i = 0; i < scannedElements.length; i++) { DOM.setAttributes(scannedElements[i].element, { style: { visibility: scannedElements[i].visibility } }); } colors.cache[cacheKey] = foundIt; return foundIt; }, /** * Get first element behind current with a background color. */ getBehindElementBackgroundColor: function getBehindElementBackgroundColor(element) { return colors.traverseVisualTreeForBackground(element, 'background-color'); }, /** * Get first element behind current with a background gradient. */ getBehindElementBackgroundGradient: function getBehindElementBackgroundGradient(element) { return colors.traverseVisualTreeForBackground(element, 'background-gradient'); }, /** * Get first element behind current with a background image. */ getBehindElementBackgroundImage: function getBehindElementBackgroundImage(element) { return colors.traverseVisualTreeForBackground(element, 'background-image'); } }; function textShouldBeTested(textNode) { // We want a tag, not just the text node. var element = textNode.parentNode; var $this = element; // The nodeType of the element must be 1. Nodes of type 1 implement the Element // interface which is required of the first argument passed to window.getComputedStyle. // Failure to pass an Element to window.getComputedStyle will raised an exception // if Firefox. if (element.nodeType !== 1) { return false; } else if (['script', 'style', 'title', 'object', 'applet', 'embed', 'template', 'noscript'].indexOf(element.nodeName.toLowerCase()) !== -1) { // Ignore elements whose content isn't displayed to the page. return false; } else if (IsUnreadable(DOM.text($this))) { // Bail out if the text is not readable. return false; } else { return true; } } /** * For the color test, if any case passes for a given element, then all the * cases for that element pass. */ function postInvoke(test) { var passed = {}; var groupsBySelector = test.groupCasesBySelector(); /** * Determine the length of an object. * * @param object obj * The object whose size will be determined. * * @return number * The size of the object determined by the number of keys. */ function size(obj) { return Object.keys(obj).length; } // Go through each selector group. var nub = ''; for (var selector in groupsBySelector) { if (groupsBySelector.hasOwnProperty(selector)) { var cases = groupsBySelector[selector]; cases.forEach(function (_case) { if (_case.get('status') === passed) { // This can just be an empty string. We only need the passed hash // to contain keys, not values. passed[selector] = nub; } }); } } return size(passed) === size(groupsBySelector); } return { colors: colors, textShouldBeTested: textShouldBeTested, postInvoke: postInvoke, buildCase: buildCase }; }(); module.exports = ColorComponent; },{"ConvertToPxComponent":5,"DOM":34,"IsUnreadable":12}],5:[function(require,module,exports){ 'use strict'; /** * Converts units to pixels. */ var DOM = require('DOM'); var ConvertToPxComponent = function ConvertToPxComponent(unit) { if (unit.search('px') > -1) { return parseInt(unit, 10); } var div = document.createElement('div'); div.style.display = 'none'; div.style.height = unit; document.body.appendChild(div); var height = DOM.getComputedStyle(div, 'height'); document.body.removeChild(div); return parseInt(height, 10); }; module.exports = ConvertToPxComponent; },{"DOM":34}],6:[function(require,module,exports){ 'use strict'; /** * Test callback for tests that look for script events * (like a mouse event has a keyboard event as well). */ var Case = require('Case'); var HasEventListenerComponent = require('HasEventListenerComponent'); var DOM = require('DOM'); var EventComponent = function EventComponent(test, options) { test.get('scope').forEach(function (scope) { var $items = options.selector && DOM.scry(options.selector, scope); // Bail if nothing was found. if ($items.length === 0) { test.add(Case({ element: scope, status: 'inapplicable' })); return; } var searchEvent = options.searchEvent || ''; var correspondingEvent = options.correspondingEvent || ''; $items.forEach(function (item) { var eventName = searchEvent.replace('on', ''); var hasOnListener = HasEventListenerComponent(item, eventName); // Determine if the element has jQuery listeners for the event. var jqevents; var $ = window.jQuery || window.$ || {}; if ($._data) { jqevents = $._data(this, 'events'); } var hasjQueryOnListener = jqevents && jqevents[eventName] && !!jqevents[eventName].length; var hasCorrespondingEvent = !!correspondingEvent.length; var hasSpecificCorrespondingEvent = HasEventListenerComponent(item, correspondingEvent.replace('on', '')); var _case = test.add(Case({ element: item })); if ((hasOnListener || hasjQueryOnListener) && (!hasCorrespondingEvent || !hasSpecificCorrespondingEvent)) { _case.set({ status: 'failed' }); } else { _case.set({ status: 'passed' }); } }); }); }; module.exports = EventComponent; },{"Case":33,"DOM":34,"HasEventListenerComponent":8}],7:[function(require,module,exports){ 'use strict'; /** * Returns text contents for nodes depending on their semantics */ var DOM = require('DOM'); var getTextContentsComponent = function getTextContentsComponent($element) { if (DOM.is($element, 'p, pre, blockquote, ol, ul, li, dl, dt, dd, figure, figcaption')) { return DOM.text($element); } // Loop through all text nodes to get everything around children. var text = ''; var children = $element.childNodes; for (var i = 0, il = children.length; i < il; i += 1) { // Only text nodes. if (children[i].nodeType === 3) { text += children[i].nodeValue; } } return text; }; module.exports = getTextContentsComponent; },{"DOM":34}],8:[function(require,module,exports){ 'use strict'; /** * Returns whether an element has an event handler or not. */ var DOM = require('DOM'); var HasEventListenerComponent = function HasEventListenerComponent(element, event) { var onEventAttr = DOM.getAttribute(element, 'on' + event); if (onEventAttr) { return true; } // jQuery events are stored in private objects var $ = window.jQuery || window.$ || {}; if ($._data) { if ($._data(element, 'events') && typeof $._data(element, 'events')[event] !== 'undefined') { return true; } } // Certain elements always have default events, so we create a new element to compare default events. if (DOM.is(element, 'a[href], input, button, video, textarea') && typeof element[event] !== 'undefined' && (event === 'click' || event === 'focus')) { if (element[event].toString().search(/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code\]\s*}\s*$/i) > -1) { return false; } } return typeof element[event] !== 'undefined'; }; module.exports = HasEventListenerComponent; },{"DOM":34}],9:[function(require,module,exports){ 'use strict'; var Case = require('Case'); var HeadingSelectorComponent = require('HeadingSelectorComponent'); var HeadingLevelComponent = function HeadingLevelComponent(test, options) { var priorLevel = false; test.get('scope').forEach(function (scope) { HeadingSelectorComponent(scope).forEach(function (element) { var level = parseInt(element.tagName.substr(-1, 1), 10); if (priorLevel === options.headingLevel && level > priorLevel + 1) { test.add(Case({ element: element, status: 'failed' })); } else { test.add(Case({ element: element, status: 'passed' })); } priorLevel = level; }); }); }; module.exports = HeadingLevelComponent; },{"Case":33,"HeadingSelectorComponent":10}],10:[function(require,module,exports){ 'use strict'; var DOM = require('DOM'); var selector = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].join(', '); var HeadingSelectorComponent = function HeadingSelectorComponent(context) { return DOM.scry(selector, context); }; module.exports = HeadingSelectorComponent; },{"DOM":34}],11:[function(require,module,exports){ 'use strict'; /** * Read more about this function here: https://github.com/quailjs/quail/wiki/Layout-versus-data-tables */ var DOM = require('DOM'); var IsDataTableComponent = function IsDataTableComponent(table) { // If there are less than three rows, why do a table? if (DOM.scry('tr', table).length < 3) { return false; } // If you are scoping a table, it's probably not being used for layout if (DOM.scry('th[scope]', table).length) { return true; } var index; var numberRows = DOM.scry('tr', table).filter(function (element) { return DOM.scry('td', element).length > 0; }).length; // Check for odd cell spanning var spanCells = DOM.scry('td[rowspan], td[colspan]', table); var isDataTable = true; if (spanCells.length) { var spanIndex = {}; spanCells.forEach(function (cell) { index = DOM.index(cell); if (typeof spanIndex[index] === 'undefined') { spanIndex[index] = 0; } spanIndex[index]++; }); for (var ii in spanIndex) { if (spanIndex.hasOwnProperty(ii)) { var count = spanIndex[ii]; if (count < numberRows) { isDataTable = false; } } } } // If there are sub tables, but not in the same column row after row, this is a layout table var subTables = DOM.scry('table', table); if (subTables.length) { var subTablesIndexes = {}; subTables.forEach(function (table) { var td = DOM.parent(table, 'td'); var parentIndex = DOM.index(td); if (parentIndex !== false && typeof subTablesIndexes[parentIndex] === 'undefined') { subTablesIndexes[parentIndex] = 0; } subTablesIndexes[parentIndex]++; }); for (var sii in subTablesIndexes) { if (subTablesIndexes.hasOwnProperty(sii)) { var count = subTablesIndexes[sii]; if (count < numberRows) { isDataTable = false; } } } } return isDataTable; }; module.exports = IsDataTableComponent; },{"DOM":34}],12:[function(require,module,exports){ 'use strict'; /** * Helper function to determine if a string of text is even readable. * @todo - This will be added to in the future... we should also include * phonetic tests. */ var IsUnreadable = function IsUnreadable(text) { if (typeof text !== 'string') { return true; } return text.trim().length ? false : true; }; module.exports = IsUnreadable; },{}],13:[function(require,module,exports){ 'use strict'; var Case = require('Case'); var DOM = require('DOM'); var LabelComponent = function LabelComponent(test, options) { options = options || {}; test.get('scope').forEach(function (scope) { DOM.scry(options.selector, scope).forEach(function (element) { var label = DOM.scry('label[for=\"' + element.getAttribute('id') + '\"]', scope)[0]; var labelParent = DOM.parents(element).find(function (parent) { return DOM.is(parent, 'label'); }); var hasLabelText = false; var hasLabelParentText = false; if (label) { hasLabelText = /\S/.test(label.innerText); } if (labelParent) { hasLabelParentText = /\S/.test(labelParent.innerText); } if (!hasLabelText && !hasLabelParentText) { test.add(Case({ element: element, status: 'failed' })); } else { test.add(Case({ element: element, status: 'passed' })); } }); }); }; module.exports = LabelComponent; },{"Case":33,"DOM":34}],14:[function(require,module,exports){ 'use strict'; var LanguageCodesStringsComponent = ['bh', 'bi', 'nb', 'bs', 'br', 'bg', 'my', 'es', 'ca', 'km', 'ch', 'ce', 'ny', 'ny', 'zh', 'za', 'cu', 'cu', 'cv', 'kw', 'co', 'cr', 'hr', 'cs', 'da', 'dv', 'dv', 'nl', 'dz', 'en', 'eo', 'et', 'ee', 'fo', 'fj', 'fi', 'nl', 'fr', 'ff', 'gd', 'gl', 'lg', 'ka', 'de', 'ki', 'el', 'kl', 'gn', 'gu', 'ht', 'ht', 'ha', 'he', 'hz', 'hi', 'ho', 'hu', 'is', 'io', 'ig', 'id', 'ia', 'ie', 'iu', 'ik', 'ga', 'it', 'ja', 'jv', 'kl', 'kn', 'kr', 'ks', 'kk', 'ki', 'rw', 'ky', 'kv', 'kg', 'ko', 'kj', 'ku', 'kj', 'ky', 'lo', 'la', 'lv', 'lb', 'li', 'li', 'li', 'ln', 'lt', 'lu', 'lb', 'mk', 'mg', 'ms', 'ml', 'dv', 'mt', 'gv', 'mi', 'mr', 'mh', 'ro', 'ro', 'mn', 'na', 'nv', 'nv', 'nd', 'nr', 'ng', 'ne', 'nd', 'se', 'no', 'nb', 'nn', 'ii', 'ny', 'nn', 'ie', 'oc', 'oj', 'cu', 'cu', 'cu', 'or', 'om', 'os', 'os', 'pi', 'pa', 'ps', 'fa', 'pl', 'pt', 'pa', 'ps', 'qu', 'ro', 'rm', 'rn', 'ru', 'sm', 'sg', 'sa', 'sc', 'gd', 'sr', 'sn', 'ii', 'sd', 'si', 'si', 'sk', 'sl', 'so', 'st', 'nr', 'es', 'su', 'sw', 'ss', 'sv', 'tl', 'ty', 'tg', 'ta', 'tt', 'te', 'th', 'bo', 'ti', 'to', 'ts', 'tn', 'tr', 'tk', 'tw', 'ug', 'uk', 'ur', 'ug', 'uz', 'ca', 've', 'vi', 'vo', 'wa', 'cy', 'fy', 'wo', 'xh', 'yi', 'yo', 'za', 'zu']; module.exports = LanguageCodesStringsComponent; },{}],15:[function(require,module,exports){ 'use strict'; var DOM = require('DOM'); var LanguageComponent = { /** * The maximum distance possible between two trigram models. */ maximumDistance: 300, /** * Regular expressions to capture unicode blocks that are either * explicitly right-to-left or left-to-right. */ textDirection: { rtl: /[\u0600-\u06FF]|[\u0750-\u077F]|[\u0590-\u05FF]|[\uFE70-\uFEFF]/mg, ltr: /[\u0041-\u007A]|[\u00C0-\u02AF]|[\u0388-\u058F]/mg }, /** * Special characters that indicate text direction changes. */ textDirectionChanges: { rtl: /[\u200E]|‏/mg, ltr: /[\u200F]|‎/mg }, /** * List of single-script blocks that encapsulate a list of languages. */ scripts: { basicLatin: { regularExpression: /[\u0041-\u007F]/g, languages: ['ceb', 'en', 'eu', 'ha', 'haw', 'id', 'la', 'nr', 'nso', 'so', 'ss', 'st', 'sw', 'tlh', 'tn', 'ts', 'xh', 'zu', 'af', 'az', 'ca', 'cs', 'cy', 'da', 'de', 'es', 'et', 'fi', 'fr', 'hr', 'hu', 'is', 'it', 'lt', 'lv', 'nl', 'no', 'pl', 'pt', 'ro', 'sk', 'sl', 'sq', 'sv', 'tl', 'tr', 've', 'vi'] }, arabic: { regularExpression: /[\u0600-\u06FF]/g, languages: ['ar', 'fa', 'ps', 'ur'] }, cryllic: { regularExpression: /[\u0400-\u04FF]|[\u0500-\u052F]/g, languages: ['bg', 'kk', 'ky', 'mk', 'mn', 'ru', 'sr', 'uk', 'uz'] } }, /** * List of regular expressions that capture only unicode text blocks that are * associated with a single language. */ scriptSingletons: { bn: /[\u0980-\u09FF]/g, bo: /[\u0F00-\u0FFF]/g, el: /[\u0370-\u03FF]/g, gu: /[\u0A80-\u0AFF]/g, he: /[\u0590-\u05FF]/g, hy: /[\u0530-\u058F]/g, ja: /[\u3040-\u309F]|[\u30A0-\u30FF]/g, ka: /[\u10A0-\u10FF]/g, km: /[\u1780-\u17FF]|[\u19E0-\u19FF]/g, kn: /[\u0C80-\u0CFF]/g, ko: /[\u1100-\u11FF]|[\u3130-\u318F]|[\uAC00-\uD7AF]/g, lo: /[\u0E80-\u0EFF]/g, ml: /[\u0D00-\u0D7F]/g, mn: /[\u1800-\u18AF]/g, or: /[\u0B00-\u0B7F]/g, pa: /[\u0A00-\u0A7F]/g, si: /[\u0D80-\u0DFF]/g, ta: /[\u0B80-\u0BFF]/g, te: /[\u0C00-\u0C7F]/g, th: /[\u0E00-\u0E7F]/g, zh: /[\u3100-\u312F]|[\u2F00-\u2FDF]/g }, /** * Determines the document's language by looking at * first the browser's default, then the HTML element's 'lang' attribute, * then the 'lang' attribute of the element passed to quail. */ getDocumentLanguage: function getDocumentLanguage(scope, returnIso) { var language = navigator.language || navigator.userLanguage; var langScope = DOM.parents(scope).find(function (parent) { return DOM.hasAttribute(parent, 'lang'); })[0]; if (langScope) { language = DOM.getAttribute(langScope, 'lang'); } var langAttr = DOM.getAttribute(scope, 'lang'); language = langAttr || language || ''; language = language.toLowerCase().trim(); if (returnIso) { return language.split('-')[0]; } return language; } }; module.exports = LanguageComponent; },{"DOM":34}],16:[function(require,module,exports){ "use strict"; var NewWindowStringsComponent = [/new (browser )?(window|frame)/, /popup (window|frame)/]; module.exports = NewWindowStringsComponent; },{}],17:[function(require,module,exports){ 'use strict'; /** * Placeholder test - checks that an attribute or the content of an * element itself is not a placeholder (i.e. 'click here' for links). */ var Case = require('Case'); var CleanStringComponent = require('CleanStringComponent'); var IsUnreadable = require('IsUnreadable'); var PlaceholdersStringsComponent = require('PlaceholdersStringsComponent'); var DOM = require('DOM'); var PlaceholderComponent = function PlaceholderComponent(test, options) { var resolve = function resolve(element, resolution) { test.add(Case({ element: element, status: resolution })); }; test.get('scope').forEach(function (scope) { DOM.scry(options.selector, scope).forEach(function (element) { var text = ''; if (element.style.display === 'none' && !DOM.is(element, 'title')) { resolve(element, 'inapplicable'); return; } if (typeof options.attribute !== 'undefined') { if ((typeof DOM.getAttribute(element, options.attribute) === 'undefined' || options.attribute === 'tabindex' && DOM.getAttribute(element, options.attribute) <= 0) && !options.content) { resolve(element, 'failed'); return; } else { if (DOM.getAttribute(element, options.attribute) && DOM.getAttribute(element, options.attribute) !== 'undefined') { text += DOM.getAttribute(element, options.attribute); } } } if (typeof options.attribute === 'undefined' || !options.attribute || options.content) { text += DOM.text(element); DOM.scry('img[alt]', element).forEach(function (element) { text += element.getAttribute('alt'); }); } if (typeof text === 'string' && text.length > 0) { text = CleanStringComponent(text); var regex = /^([0-9]*)(k|kb|mb|k bytes|k byte)$/g; var regexResults = regex.exec(text.toLowerCase()); if (regexResults && regexResults[0].length) { resolve(element, 'failed'); } else if (options.empty && IsUnreadable(text)) { resolve(element, 'failed'); } else if (PlaceholdersStringsComponent.indexOf(text) > -1) { resolve(element, 'failed'); } // It passes. else { resolve(element, 'passed'); } } else { if (options.empty && typeof text !== 'number') { resolve(element, 'failed'); } } }); }); }; module.exports = PlaceholderComponent; },{"Case":33,"CleanStringComponent":3,"DOM":34,"IsUnreadable":12,"PlaceholdersStringsComponent":18}],18:[function(require,module,exports){ 'use strict'; var PlaceholdersStringsComponent = ['title', 'untitled', 'untitled document', 'this is the title', 'the title', 'content', ' ', 'new page', 'new', 'nbsp', ' ', 'spacer', 'image', 'img', 'photo', 'frame', 'frame title', 'iframe', 'iframe title', 'legend']; module.exports = PlaceholdersStringsComponent; },{}],19:[function(require,module,exports){ 'use strict'; var RedundantStringsComponent = { inputImage: ['submit', 'button'], link: ['link to', 'link', 'go to', 'click here', 'link', 'click', 'more'], required: ['*'] }; module.exports = RedundantStringsComponent; },{}],20:[function(require,module,exports){ 'use strict'; var SiteMapStringsComponent = ['site map', 'map', 'sitemap']; module.exports = SiteMapStringsComponent; },{}],21:[function(require,module,exports){ "use strict"; var SkipContentStringsComponent = [/(jump|skip) (.*) (content|main|post)/i]; module.exports = SkipContentStringsComponent; },{}],22:[function(require,module,exports){ 'use strict'; /** * Suspect CSS styles that might indicate a paragraph tag is being used as a header. */ var SuspectPCSSStyles = ['color', 'font-weight', 'font-size', 'font-family']; module.exports = SuspectPCSSStyles; },{}],23:[function(require,module,exports){ 'use strict'; /** * Suspect tags that would indicate a paragraph is being used as a header. */ var SuspectPHeaderTags = ['strong', 'b', 'em', 'i', 'u', 'font']; module.exports = SuspectPHeaderTags; },{}],24:[function(require,module,exports){ 'use strict'; var SuspiciousLinksStringsComponent = ['click here', 'click', 'more', 'here', 'read more', 'download', 'add', 'delete', 'clone', 'order', 'view', 'read', 'clic aquí', 'clic', 'haga clic', 'más', 'aquí', 'image']; module.exports = SuspiciousLinksStringsComponent; },{}],25:[function(require,module,exports){ 'use strict'; var SymbolsStringsComponent = ['|', '*', /\*/g, '
*', '•', '•', '♦', '›', '»', '‣', '▶', '.', '◦', '✓', '◽', '•', '—', '◾']; module.exports = SymbolsStringsComponent; },{}],26:[function(require,module,exports){ 'use strict'; var DOM = require('DOM'); var scopeValues = ['row', 'col', 'rowgroup', 'colgroup']; function isColumnHeader(tableMap, cell, x, y) { var height = cell.getAttribute('rowspan') || 1; var scope = cell.getAttribute('scope'); if (scope === 'col') { return true; } else if (scopeValues.indexOf(scope) !== -1) { return false; } for (var i = 0; i < height * tableMap[y].length - 1; i += 1) { var currCell = tableMap[y + i % height][~ ~(i / height)]; if (DOM.is(currCell, 'td')) { return false; } } return true; } function isRowHeader(tableMap, cell, x, y) { var width = cell.getAttribute('colspan') || 1; var scope = cell.getAttribute('scope'); if (scope === 'row') { return true; } else if (scopeValues.indexOf(scope) !== -1 || isColumnHeader(tableMap, cell, x, y)) { return false; } for (var i = 0; i < width * tableMap.length - 1; i += 1) { var currCell = tableMap[~ ~(i / width)][x + i % width]; if (DOM.is(currCell, 'td')) { return false; } } return true; } function scanHeaders(tableMap, x, y, deltaX, deltaY) { var headerList = []; var cell = tableMap[y][x]; var opaqueHeaders = []; var inHeaderBlock; var headersFromCurrBlock; if (DOM.is(cell, 'th')) { headersFromCurrBlock = [{ cell: cell, x: x, y: y }]; inHeaderBlock = true; } else { inHeaderBlock = false; headersFromCurrBlock = []; } for (; x >= 0 && y >= 0; x += deltaX, y += deltaY) { var currCell = tableMap[y][x]; var dir = deltaX === 0 ? 'col' : 'row'; if (DOM.is(currCell, 'th')) { inHeaderBlock = true; headersFromCurrBlock.push({ cell: currCell, x: x, y: y }); var blocked = false; if (deltaY === -1 && isRowHeader(tableMap, currCell, x, y) || deltaX === -1 && isColumnHeader(tableMap, currCell, x, y)) { blocked = true; } else { opaqueHeaders.forEach(function (opaqueHeader) { var currSize = +currCell.getAttribute(dir + 'span') || 1; var opaqueSize = +DOM.getAttribute(opaqueHeader.cell, dir + 'span') || 1; if (currSize === opaqueSize) { if (deltaY === -1 && opaqueHeader.x === x || deltaX === -1 && opaqueHeader.y === y) { blocked = true; } } }); } if (blocked === false) { headerList.push(currCell); } } else if (DOM.is(currCell, 'td') && inHeaderBlock === true) { inHeaderBlock = false; opaqueHeaders.push(headersFromCurrBlock); headersFromCurrBlock = []; } } return headerList; } /** * Get header cells based on the headers getAttributeibute of a cell */ function getHeadersFromAttr(cell) { var table = DOM.parents(cell).find(function (parent) { return DOM.is(parent, 'table'); })[0]; var ids = cell.getAttribute('headers').split(/\s/); var headerCells = []; // For each IDREF select an element with that ID from the table // Only th/td cells in the same table can be headers ids.forEach(function (id) { headerCells.push(DOM.scry('th#' + id + ', td#' + id, table)); }); return headerCells; } function findCellInTableMap(tableMap, cell) { var i = 0; var y = 0; var x; // Locate the x and y coordinates of the current cell while (x === undefined) { if (tableMap[y] === undefined) { return; } else if (tableMap[y][i] === cell[0]) { x = i; } else if (i + 1 === tableMap[y].length) { y += 1; i = 0; } else { i += 1; } } return { x: x, y: y }; } function getHeadersFromScope(cell, tableMap) { var i; var headerCells = []; var coords = findCellInTableMap(tableMap, cell); // Grab the width and height, undefined, invalid or 0 become 1 var height = +cell.getAttribute('rowspan') || 1; var width = +cell.getAttribute('colspan') || 1; for (i = 0; i < width; i++) { headerCells.push(scanHeaders(tableMap, coords.x + i, coords.y, 0, -1)); } for (i = 0; i < height; i++) { headerCells.push(scanHeaders(tableMap, coords.x, coords.y + i, -1, 0)); } return headerCells; } function getHeadersFromGroups(cell, tableMap) { var cellCoords = findCellInTableMap(tableMap, cell); var headers = []; var parents = DOM.parents(cell); var thead = parents.find(function (parent) { return DOM.is(parent, 'thead'); }); var tbody = parents.find(function (parent) { return DOM.is(parent, 'tbody'); }); var tfoot = parents.find(function (parent) { return DOM.is(parent, 'tfoot'); }); DOM.scry('th[scope=rowgroup]', [thead, tbody, tfoot]).forEach(function (element) { var headerCoords = findCellInTableMap(tableMap, element); if (headerCoords.x <= cellCoords.x && headerCoords.y <= cellCoords.y) { headers.push(element); } }); // TODO colgroups } var TableHeadersComponent = { getTableMap: function getTableMap(table) { var map = []; DOM.scry('tr', table).forEach(function (element, y) { if (typeof map[y] === 'undefined') { map[y] = []; } var row = map[y]; DOM.children(element).forEach(function (cell) { var x; var i, il; // Grab the width and height, undefined, invalid or 0 become 1 var height = +cell.getAttribute('rowspan') || 1; var width = +cell.getAttribute('colspan') || 1; // Make x the first undefined cell in the row for (i = 0, il = row.length; i <= il; i += 1) { if (x === undefined && row[i] === undefined) { x = i; } } // add 'this' to each coordinate in the map based on width and height for (i = 0, il = width * height; i < il; i += 1) { // Create a new row if it doesn't exist yet if (map[y + ~ ~(i / width)] === undefined) { map[y + ~ ~(i / width)] = []; } // Add the cell to the correct x / y coordinates map[y + ~ ~(i / width)][x + i % width] = cell; } }); }); return map; }, tableHeaders: function tableHeaders(elements) { var headers = []; elements.forEach(function (element) { if (!DOM.is(element, 'td, th')) { return; } if (element.hasAttribute('headers')) { headers.push(getHeadersFromAttr(element)); } else { var table = DOM.closest(element, 'table'); var map = TableHeadersComponent.getTableMap(table); headers.push(getHeadersFromScope(element, map)); headers.push(getHeadersFromGroups(element, map)); } }); return headers.filter(function (header) { return (/\S/.test(header.innerHTML) ); }); } }; module.exports = TableHeadersComponent; },{"DOM":34}],27:[function(require,module,exports){ "use strict"; /** * Returns DOM nodes that contain at least one text node. */ var TextNodeFilterComponent = function TextNodeFilterComponent(element) { var nodes = Array.prototype.slice.call(element.childNodes); var hasTextNode = false; var node; for (var i = 0, il = nodes.length; i < il; ++i) { node = nodes[i]; // Determine if, // 1) this is a text node, and // 2) it has content other than whitespace. if (node.nodeType === 3 && /\S/.test(node.textContent)) { hasTextNode = true; break; } } return hasTextNode; }; module.exports = TextNodeFilterComponent; },{}],28:[function(require,module,exports){ 'use strict'; /** * A list of HTML elements that can contain actual text. */ var TextSelectorComponent = ['tt', 'i', 'b', 'big', 'small', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'sub', 'sup', 'span', 'bdo', 'address', 'div', 'a', 'object', 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'pre', 'q', 'ins', 'del', 'dt', 'dd', 'li', 'label', 'option', 'textarea', 'fieldset', 'legend', 'button', 'caption', 'td', 'th'].join(', '); module.exports = TextSelectorComponent; },{}],29:[function(require,module,exports){ 'use strict'; /** * Utility object that runs text statistics, like sentence count, * reading level, etc. */ var TextStatisticsComponent = { cleanText: function cleanText(text) { return text.replace(/[,:;()\-]/, ' ').replace(/[\.!?]/, '.').replace(/[ ]*(\n|\r\n|\r)[ ]*/, ' ').replace(/([\.])[\. ]+/, '$1').replace(/[ ]*([\.])/, '$1').replace(/[ ]+/, ' ').toLowerCase(); }, sentenceCount: function sentenceCount(text) { return text.split('.').length + 1; }, wordCount: function wordCount(text) { return text.split(' ').length + 1; }, averageWordsPerSentence: function averageWordsPerSentence(text) { return this.wordCount(text) / this.sentenceCount(text); }, averageSyllablesPerWord: function averageSyllablesPerWord(text) { var that = this; var count = 0; var wordCount = that.wordCount(text); if (!wordCount) { return 0; } text.split(' ').forEach(function (word) { count += that.syllableCount(word); }); return count / wordCount; }, syllableCount: function syllableCount(word) { var matchedWord = word.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/, '').match(/[aeiouy]{1,2}/g); if (!matchedWord || matchedWord.length === 0) { return 1; } return matchedWord.length; } }; module.exports = TextStatisticsComponent; },{}],30:[function(require,module,exports){ 'use strict'; /** * Helper function to determine if a given URL is even valid. */ var ValidURLComponent = function ValidURLComponent(url) { return url.search(' ') === -1; }; module.exports = ValidURLComponent; },{}],31:[function(require,module,exports){ 'use strict'; /** * Helper object that tests videos. * @todo - allow this to be exteded more easily. */ var AJAX = require('AJAX'); var DOM = require('DOM'); var Language = require('LanguageComponent'); var VideoComponent = { /** * Iterates over listed video providers and runs their `isVideo` method. * @param Element element * * @return Boolean * Whether the element is a video. */ isVideo: function isVideo(element) { var isVideo = false; for (var name in this.providers) { if (this.providers.hasOwnProperty(name)) { var provider = this.providers[name]; if (DOM.is(element, provider.selector) && provider.isVideo(element)) { isVideo = true; } } } return isVideo; }, findVideos: function findVideos(element, callback) { for (var name in this.providers) { if (this.providers.hasOwnProperty(name)) { var provider = this.providers[name]; DOM.scry(provider.selector, element).forEach(function (video) { if (provider.isVideo(video)) { provider.hasCaptions(video, callback); } }); } } }, providers: { youTube: { selector: 'a, iframe', apiUrl: 'http://gdata.youtube.com/feeds/api/videos/?q=%video&caption&v=2&alt=json', isVideo: function isVideo(element) { return this.getVideoId(element) !== false ? true : false; }, getVideoId: function getVideoId(element) { var attribute = DOM.is(element, 'iframe') ? 'src' : 'href'; var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&\?]*).*/; var match = DOM.getAttribute(element, attribute).match(regExp); if (match && match[7].length === 11) { return match[7]; } return false; }, hasCaptions: function hasCaptions(element, callback) { var videoId = this.getVideoId(element); var request = new AJAX(this.apiUrl.replace('%video', videoId)); request.then(function (raw) { var data = JSON.parse(raw); callback(element, data.feed.openSearch$totalResults.$t > 0); }); } }, flash: { selector: 'object', isVideo: function isVideo(element) { var isVideo = false; if (DOM.scry('param', element).length === 0) { return false; } DOM.scry('param[name=flashvars]', element).forEach(function (element) { if (element.getAttribute('value').search(/\.(flv|mp4)/i) > -1) { isVideo = true; } }); return isVideo; }, hasCaptions: function hasCaptions(element, callback) { var hasCaptions = false; DOM.scry('param[name=flashvars]', element).forEach(function (element) { var val = element.getAttribute('value') || ''; if (val.search('captions') > -1 && val.search('.srt') > -1 || val.search('captions.pluginmode') > -1) { hasCaptions = true; } }); callback(element, hasCaptions); } }, videoElement: { selector: 'video', isVideo: function isVideo(element) { return DOM.is(element, 'video'); }, hasCaptions: function hasCaptions(element, callback) { var $captions = DOM.scry('track[kind=subtitles], track[kind=captions]', element); if (!$captions.length) { callback(element, false); return; } var language = Language.getDocumentLanguage(element, true); var langScope = DOM.parents(element).find(function (parent) { return DOM.hasAttribute(parent, 'lang'); })[0]; if (langScope) { language = DOM.getAttribute(langScope, 'lang').split('-')[0]; } $captions.forEach(function (caption) { var srclang = caption.getAttribute('srclang'); if (!srclang || srclang.toLowerCase() === language) { var request = new AJAX(DOM.getAttribute(caption, 'src')); request.then(function () { callback(element, true); }, function () { callback(element, false); }); } }); } } } }; module.exports = VideoComponent; },{"AJAX":32,"DOM":34,"LanguageComponent":15}],32:[function(require,module,exports){ 'use strict'; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor); } }return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Q = require('q'); var AJAX = function () { function AJAX(url, type) { _classCallCheck(this, AJAX); var contentType = this._resolveContentType(type); return Q.Promise(function (resolve, reject, notify) { var request = new XMLHttpRequest(); function onReadyStateChange() { if (type === 'HEAD' && request.readyState === 2) { resolve(request.getAllResponseHeaders()); } else if (request.readyState === 4) { if ([200, 301, 302].indexOf(request.status) > -1) { resolve(request.responseText); } else { reject('Request failed: ' + request.status); } } } function onError() { reject('AJAX request to \'' + url + '\' failed: ' + JSON.stringify(url)); } function onProgress(event) { notify(event.loaded / event.total); } request.open('GET', url, true); request.setRequestHeader('Content-Type', contentType); request.onreadystatechange = onReadyStateChange; request.onerror = onError; request.onprogress = onProgress; request.send(); }); } _createClass(AJAX, [{ key: '_resolveContentType', value: function _resolveContentType(name) { var type = undefined; switch (name) { case 'json': type = 'application/json'; break; default: type = 'text/html'; } return type; } }]); return AJAX; }(); module.exports = AJAX; },{"q":238}],33:[function(require,module,exports){ 'use strict'; var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj); } /** * @providesModule Case */ var DOM = require('DOM'); var Case = function () { /** * A Case is a test against an element. */ function Case(attributes) { return new Case.fn.init(attributes); } // Prototype object of the Case. Case.fn = Case.prototype = { constructor: Case, init: function init(attributes) { this.listeners = {}; this.timeout = null; this.attributes = attributes || {}; var that = this; // Dispatch a resolve event if the case is initiated with a status. if (this.attributes.status) { // Delay the status dispatch to the next execution cycle so that the // Case will register listeners in this execution cycle first. setTimeout(function () { that.resolve(); }, 0); } // Set up a time out for this case to resolve within. else { this.attributes.status = 'untested'; this.timeout = setTimeout(function () { that.giveup(); }, 350); } return this; }, // Details of the Case. attributes: null, get: function get(attr) { return this.attributes[attr]; }, set: function set(attr, value) { var isStatusChanged = false; // Allow an object of attributes to be passed in. if ((typeof attr === 'undefined' ? 'undefined' : _typeof(attr)) === 'object') { for (var prop in attr) { if (attr.hasOwnProperty(prop)) { if (prop === 'status') { isStatusChanged = true; } this.attributes[prop] = attr[prop]; } } } // Assign a single attribute value. else { if (attr === 'status') { isStatusChanged = true; } this.attributes[attr] = value; } if (isStatusChanged) { this.resolve(); } return this; }, /** * A test that determines if a case has one of a set of statuses. * * @return boolean * A bit that indicates if the case has one of the supplied statuses. */ hasStatus: function hasStatus(statuses) { // This is a rought test of arrayness. if ((typeof statuses === 'undefined' ? 'undefined' : _typeof(statuses)) !== 'object') { statuses = [statuses]; } var status = this.get('status'); for (var i = 0, il = statuses.length; i < il; ++i) { if (statuses[i] === status) { return true; } } return false; }, /** * Dispatches the resolve event; clears the timeout fallback event. */ resolve: function resolve() { clearTimeout(this.timeout); var el = this.attributes.element; var outerEl; // Get a selector and HTML if an element is provided. if (el && el.nodeType && el.nodeType === 1) { // Allow a test to provide a selector. Programmatically find one if none // is provided. this.attributes.selector = this.defineUniqueSelector(el); // Get a serialized HTML representation of the element the raised the error // if the Test did not provide it. if (!this.attributes.html) { this.attributes.html = ''; // If the element is either the or elements, // just report that. Otherwise we might be returning the entire page // as a string. if (el.nodeName === 'HTML' || el.nodeName === 'BODY') { this.attributes.html = '<' + el.nodeName + '>'; } // Get the parent node in order to get the innerHTML for the selected // element. Trim wrapping whitespace, remove linebreaks and spaces. else if (typeof el.outerHTML === 'string') { outerEl = el.outerHTML.trim().replace(/(\r\n|\n|\r)/gm, '').replace(/>\s+<'); // Guard against insanely long elements. // @todo, make this length configurable eventually. if (outerEl.length > 200) { outerEl = outerEl.substr(0, 200) + '... [truncated]'; } this.attributes.html = outerEl; } } } this.dispatch('resolve', this); }, /** * Abandons the Case if it not resolved within the timeout period. */ giveup: function giveup() { clearTimeout(this.timeout); // @todo, the set method should really have a 'silent' option. this.attributes.status = 'untested'; this.dispatch('timeout', this); }, // @todo, make this a set of methods that all classes extend. listenTo: function listenTo(dispatcher, eventName, handler) { handler = handler.bind(this); dispatcher.registerListener.call(dispatcher, eventName, handler); }, registerListener: function registerListener(eventName, handler) { if (!this.listeners[eventName]) { this.listeners[eventName] = []; } this.listeners[eventName].push(handler); }, dispatch: function dispatch(eventName) { if (this.listeners[eventName] && this.listeners[eventName].length) { var eventArgs = [].slice.call(arguments); this.listeners[eventName].forEach(function (handler) { // Pass any additional arguments from the event dispatcher to the // handler function. handler.apply(null, eventArgs); }); } }, /** * Creates a page-unique selector for the selected DOM element. * * @param {jQuery} element * An element in a jQuery wrapper. * * @return {string} * A unique selector for this element. */ defineUniqueSelector: function defineUniqueSelector(element) { /** * Indicates whether the selector string represents a unique DOM element. * * @param {string} selector * A string selector that can be used to query a DOM element. * * @return Boolean * Whether or not the selector string represents a unique DOM element. */ function isUniquePath(selector) { return DOM.scry(selector).length === 1; } /** * Creates a selector from the element's id attribute. * * Temporary IDs created by the module that contain "visitorActions" are excluded. * * @param {HTMLElement} element * * @return {string} * An id selector or an empty string. */ function applyID(element) { var selector = ''; var id = element.id || ''; if (id.length > 0) { selector = '#' + id; } return selector; } /** * Creates a selector from classes on the element. * * Classes with known functional components like the word 'active' are * excluded because these often denote state, not identity. * * @param {HTMLElement} element * * @return {string} * A selector of classes or an empty string. */ function applyClasses(element) { var selector = ''; // Try to make a selector from the element's classes. var classes = element.className || ''; if (classes.length > 0) { classes = classes.split(/\s+/); // Filter out classes that might represent state. classes = reject(classes, function (cl) { return (/active|enabled|disabled|first|last|only|collapsed|open|clearfix|processed/.test(cl) ); }); if (classes.length > 0) { return '.' + classes.join('.'); } } return selector; } /** * Finds attributes on the element and creates a selector from them. * * @param {HTMLElement} element * * @return {string} * A selector of attributes or an empty string. */ function applyAttributes(element) { var selector = ''; // Whitelisted attributes to include in a selector to disambiguate it. var attributes = ['href', 'type', 'title', 'alt']; var value; if (typeof element === 'undefined' || typeof element.attributes === 'undefined' || element.attributes === null) { return selector; } // Try to make a selector from the element's classes. for (var i = 0, len = attributes.length; i < len; i++) { value = element.attributes[attributes[i]] && element.attributes[attributes[i]].value; if (value) { selector += '[' + attributes[i] + '="' + value + '"]'; } } return selector; } /** * Creates a unique selector using id, classes and attributes. * * It is possible that the selector will not be unique if there is no * unique description using only ids, classes and attributes of an * element that exist on the page already. If uniqueness cannot be * determined and is required, you will need to add a unique identifier * to the element through theming development. * * @param {HTMLElement} element * * @return {string} * A unique selector for the element. */ function generateSelector(element) { var selector = ''; var scopeSelector = ''; var pseudoUnique = false; var firstPass = true; do { scopeSelector = ''; // Try to apply an ID. if ((scopeSelector = applyID(element)).length > 0) { selector = scopeSelector + ' ' + selector; // Assume that a selector with an ID in the string is unique. break; } // Try to apply classes. if (!pseudoUnique && (scopeSelector = applyClasses(element)).length > 0) { // If the classes don't create a unique path, tack them on and // continue. selector = scopeSelector + ' ' + selector; // If the classes do create a unique path, mark this selector as // pseudo unique. We will keep attempting to find an ID to really // guarantee uniqueness. if (isUniquePath(selector)) { pseudoUnique = true; } } // Process the original element. if (firstPass) { // Try to add attributes. if ((scopeSelector = applyAttributes(element)).length > 0) { // Do not include a space because the attributes qualify the // element. Append classes if they exist. selector = scopeSelector + selector; } // Add the element nodeName. selector = element.nodeName.toLowerCase() + selector; // The original element has been processed. firstPass = false; } // Try the parent element to apply some scope. element = element.parentNode; } while (element && element.nodeType === 1 && element.nodeName !== 'BODY' && element.nodeName !== 'HTML'); return selector.trim(); } /** * Helper function to filter items from a list that pass the comparator * test. * * @param {Array} list * @param {function} comparator * A function that return a boolean. True means the list item will be * discarded from the list. * @return array * A list of items the excludes items that passed the comparator test. */ function reject(list, comparator) { var keepers = []; for (var i = 0, il = list.length; i < il; i++) { if (!comparator.call(null, list[i])) { keepers.push(list[i]); } } return keepers; } return element && generateSelector(element); }, push: [].push, sort: [].sort, concat: [].concat, splice: [].splice }; // Give the init function the Case prototype. Case.fn.init.prototype = Case.fn; return Case; }(); module.exports = Case; },{"DOM":34}],34:[function(require,module,exports){ 'use strict'; /** * Wrapper library for DOM operations. */ var DataSet = require('data-set'); var documentOffset = require('document-offset'); var isDom = require('is-dom'); var select = require('dom-select'); var _isDomError = function _isDomError(methodName) { throw new Error('Non-DOM object passed to the method DOM.' + methodName); }; var _assertIsDom = function _assertIsDom(element, methodName) { var isObjectNode = typeof element === 'function' && element.nodeName === 'OBJECT'; if (!element || !isDom(element) && !isObjectNode) { _isDomError(methodName); } }; var DOM = { scry: function scry(selector, context) { var elements = []; if (Array.isArray(context)) { context.forEach(function (ct) { ct && _assertIsDom(ct, 'scry'); elements = elements.concat(select.all(selector, ct)); }); } else if (context && context.constructor === NodeList) { for (var i = 0, il = context.length; i < il; i++) { var ct = context[i]; ct && _assertIsDom(ct, 'scry'); elements = elements.concat(select.all(selector, ct)); } } else { context && _assertIsDom(context, 'scry'); elements = elements.concat(select.all(selector, context)); } return elements; }, parent: function parent(element) { _assertIsDom(element, 'parent'); return element.parentElement; }, parents: function parents(element) { _assertIsDom(element, 'parents'); var parentElements = []; var node = element; while (node.parentElement) { parentElements.push(node.parentElement); node = node.parentElement; } return parentElements; }, children: function children(element) { _assertIsDom(element, 'children'); return Array.prototype.slice.call(element.children); }, hasAttribute: function hasAttribute(element, attrName) { _assertIsDom(element, 'hasAttribute'); return typeof element[attrName] !== 'undefined'; }, /** * Sets attributes on a node. */ setAttributes: function setAttributes(element, attributes) { _assertIsDom(element, 'setAttributes'); // The type attribute needs to be set first in IE, so we special case it. if (attributes.type) { element.type = attributes.type; } for (var attribute in attributes) { var value = attributes[attribute]; if (attribute == 'type') { continue; // The type attribute needs to be set first in IE. } else if (attribute == 'style') { if (typeof value == 'string') { element.style.cssText = value; } else { Object.assign(element.style, value); } } else if (attribute in element) { element[attribute] = value; } else if (element.setAttribute) { element.setAttribute(attribute, value); } } }, getAttribute: function getAttribute(element, name) { _assertIsDom(element, 'getAttribute'); return element.getAttribute(name); }, getStyle: function getStyle(element, name) { _assertIsDom(element, 'getStyle'); var value; try { value = element.style[name]; } catch (error) { throw new Error(error); } return value; }, getComputedStyle: function getComputedStyle(element, name) { _assertIsDom(element, 'getComputedStyle'); var value; try { value = window.getComputedStyle(element).getPropertyValue(name); } catch (error) { throw new Error(error); } return value; }, next: function next(element) { _assertIsDom(element, 'next'); var parentElement = element.parentElement; var children; var index; if (parentElement) { children = DOM.children(parentElement); index = children.indexOf(element); } if (index > -1 && index <= children.length - 2) { return children[index + 1]; } }, prev: function prev(element) { _assertIsDom(element, 'prev'); var parentElement = element.parentElement; var children; var index; if (parentElement) { children = DOM.children(parentElement); index = children.indexOf(element); } if (index > 0) { return children[index - 1]; } }, nextAll: function nextAll(element) { _assertIsDom(element, 'nextAll'); var parentElement = element.parentElement; var children; var index; if (parentElement) { children = DOM.children(parentElement); index = children.indexOf(element); } return children.slice(index + 1); }, prevAll: function prevAll(element) { _assertIsDom(element, 'prevAll'); var parentElement = element.parentElement; var children; var index; if (parentElement) { children = DOM.children(parentElement); index = children.indexOf(element); } return children.slice(0, index); }, index: function index(element) { var siblings = DOM.children(element.parentElement); return siblings.indexOf(element); }, is: function is(element, nodeName) { _assertIsDom(element, 'is'); var elementNodeName = element.nodeName.toLowerCase(); var names; if (typeof nodeName === 'string') { names = nodeName.split(/, ?/); } else { // Assume it is an Array. Promptly shoot self in foot. names = nodeName; } names = names.map(function (name) { return name.toLowerCase(); }); var expandedNames = []; // Expand colon-prefixed selectors to sets of selectors. names.forEach(function (name) { switch (name) { case ':input': expandedNames = expandedNames.concat(['input', 'button', 'select', 'textarea']); break; default: expandedNames.push(name); } }); return expandedNames.indexOf(elementNodeName) > -1; }, setData: function setData(element, key, value) { _assertIsDom(element, 'setData'); var dataKey = 'data-' + key; var attrs = []; attrs[dataKey] = value; DOM.setAttributes(element, attrs); DataSet(element); }, getData: function getData(element, key) { _assertIsDom(element, 'getData'); return DataSet(element)[key]; }, removeData: function removeData(element, key) { _assertIsDom(element, 'removeData'); var dataKey = 'data-' + key; element.removeAttribute(dataKey); DataSet(element); }, text: function text(element) { _assertIsDom(element, 'text'); return element.textContent || element.innerText; }, offset: function offset(element) { _assertIsDom(element, 'offset'); return documentOffset(element); }, isVisible: function isVisible(element) { _assertIsDom(element, 'isVisible'); var display = DOM.getComputedStyle(element, 'display'); var visibility = DOM.getComputedStyle(element, 'visibility'); return !(display === 'none') && !(visibility === 'hidden'); } }; module.exports = DOM; },{"data-set":230,"document-offset":231,"dom-select":232,"is-dom":236}],35:[function(require,module,exports){ 'use strict'; var Guideline = { guidelines: { wcag: { /** * Perform WCAG specific setup. */ setup: function setup(tests, listener, callbacks) { callbacks = callbacks || {}; // Associate Success Criteria with the TestCollection. for (var sc in this.successCriteria) { if (this.successCriteria.hasOwnProperty(sc)) { var criteria = this.successCriteria[sc]; criteria.registerTests(tests); if (listener && listener.listenTo && typeof listener.listenTo === 'function') { // Allow the invoker to listen to successCriteriaEvaluated events // on each SuccessCriteria. if (callbacks.successCriteriaEvaluated) { listener.listenTo(criteria, 'successCriteriaEvaluated', callbacks.successCriteriaEvaluated); } } } } }, successCriteria: {} } } }; module.exports = Guideline; },{}],36:[function(require,module,exports){ /** * @providesModule Quail */ 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i];for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }return target; }; require('babel-polyfill'); var globalQuail = window.globalQuail || {}; var DOM = require('DOM'); var Guideline = require('Guideline'); var TestCollection = require('TestCollection'); var _Assessments = require('_Assessments'); var Quail = { /** * Main run function for Quail. */ run: function run(options) { function buildTests(assessmentList, options) { var htmlElement = options.html || DOM.scry('html'); var keys = undefined; // Create an empty TestCollection. var testCollection = TestCollection([], { scope: htmlElement }); var assessmentsToRun = []; if (assessmentList && assessmentList.length) { assessmentsToRun = assessmentList; } else { keys = _Assessments.keys(); var key = undefined, next = undefined; do { next = keys.next(); key = next.value; assessmentsToRun.push(key); } while (!next.done); } assessmentsToRun.forEach(function (name) { var mod = _Assessments.get(name); if (mod) { testCollection.set(name, _extends({ scope: htmlElement, callback: mod.run }, mod.meta)); } }); return testCollection; } /** * A private, internal run function. * * This function is called when the tests are collected, which might occur * after an AJAX request for a test JSON file. */ function _run(testCollection) { // Set up Guideline-specific behaviors. var noop = function noop() {}; for (var guideline in Guideline) { if (Guideline[guideline] && typeof Guideline[guideline].setup === 'function') { Guideline[guideline].setup(testCollection, Quail, { successCriteriaEvaluated: options.successCriteriaEvaluated || noop }); } } // Invoke all the registered tests. testCollection.run({ preFilter: options.preFilter || function () {}, caseResolve: options.caseResolve || function () {}, testComplete: options.testComplete || function () {}, testCollectionComplete: options.testCollectionComplete || function () {}, complete: options.complete || function () {} }); } // Let wcag2 run itself, will call Quail again when it knows what // to // if (options.guideline === 'wcag2') { // wcag2.run(options); // } // If a list of specific tests is provided, use them. _run(buildTests(options.assessments, options)); }, // @todo, make this a set of methods that all classes extend. listenTo: function listenTo(dispatcher, eventName, handler) { handler = handler.bind(this); dispatcher.registerListener.call(dispatcher, eventName, handler); }, getConfiguration: function getConfiguration(testName) { var test = this.tests.find(testName); var guidelines = test && test.get('guidelines'); var guideline = guidelines && this.options.guidelineName && guidelines[this.options.guidelineName]; var configuration = guideline && guideline.configuration; if (configuration) { return configuration; } return false; } }; globalQuail.run = globalQuail.run || function () { Quail.run.apply(Quail, arguments); }; window.globalQuail = globalQuail; module.exports = Quail; },{"DOM":34,"Guideline":35,"TestCollection":38,"_Assessments":39,"babel-polyfill":40}],37:[function(require,module,exports){ 'use strict'; var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj); } var Case = require('Case'); var Test = function () { /** * A collection of Cases. */ function Test(name, attributes) { return new Test.fn.init(name, attributes); } // Prototype object of the Test. Test.fn = Test.prototype = { constructor: Test, init: function init(name, attributes) { this.listeners = {}; this.length = 0; if (!name) { return this; } this.attributes = attributes || {}; this.attributes.name = name; this.attributes.status = 'untested'; this.attributes.complete = false; return this; }, // Setting a length property makes it behave like an array. length: 0, // Details of the test. attributes: null, get: function get(attr) { return this.attributes[attr]; }, set: function set(attr, value) { var isStatusChanged = false; // Allow an object of attributes to be passed in. if ((typeof attr === 'undefined' ? 'undefined' : _typeof(attr)) === 'object') { for (var prop in attr) { if (attr.hasOwnProperty(prop)) { if (prop === 'status') { isStatusChanged = true; } this.attributes[prop] = attr[prop]; } } } // Assign a single attribute value. else { if (attr === 'status') { isStatusChanged = true; } this.attributes[attr] = value; } if (isStatusChanged) { this.resolve(); } return this; }, add: function add(_case) { this.listenTo(_case, 'resolve', this.caseResponded); this.listenTo(_case, 'timeout', this.caseResponded); // If the case is already resolved because it has a status, then trigger // its resolve event. if (_case.status) { _case.dispatch('resolve', _case); } this.push(_case); return _case; }, invoke: function invoke() { var name = this.get('name'); // This test is already running. if (this.testComplete) { throw new Error('The test ' + name + ' is already running.'); } // This test has already been run. if (this.attributes.complete) { throw new Error('The test ' + name + ' has already been run.'); } var options = this.get('options'); var callback = this.get('callback'); var self = this; // Set the test complete method to the closure function that dispatches // the complete event. This method needs to be debounced so it is only // called after a pause of invocations. this.testComplete = debounce(testComplete.bind(this), 400); // Invoke the complete dispatcher to prevent the test from never // completing in the off chance that no Cases are created. this.testComplete(false); // Record the time the test started for performance monitoring. var start = new Date(); this.set('startTime', start); if (callback && typeof callback.call === 'function') { try { callback.call(self, self, options); } catch (error) { if (window.console && window.console.error) { window.console.error(error.stack); } } } else { window.console.log('Skipping ' + name + ' because it does not have an associated method on Quail'); } // Invoke the complete dispatcher to prevent the test from never // completing in the off chance that no Cases are created. this.testComplete(); return this; }, /** * Finds cases by their status. */ findByStatus: function findByStatus(statuses) { if (!statuses) { return; } var test = new Test(); // A single status or an array of statuses is allowed. Always act on an // array. if (typeof statuses === 'string') { statuses = [statuses]; } // Loop the through the statuses and find tests with them. for (var i = 0, il = statuses.length; i < il; ++i) { var status = statuses[i]; // Loop through the cases. this.forEach(function (_case) { var caseStatus = _case.get('status'); if (caseStatus === status) { test.add(_case); } }); } return test; }, /** * Returns a set of cases with corresponding to th supplied selector. */ findCasesBySelector: function findCasesBySelector(selector) { var cases = this.groupCasesBySelector(); if (cases.hasOwnProperty(selector)) { return cases[selector]; } return new Test(); }, /** * Returns a single Case object the matches the supplied HTML. * * We make the assumption, rightly or wrongly, that if the HTML is the * same for a number of cases in a Test, then the outcome will also * be the same, so only use this method if you are probing the result * of the case, not other specifics of it. * * @param string html * A string representing an HTML structure. * * @needstests */ findCaseByHtml: function findCaseByHtml(html) { var _case; for (var i = 0, il = this.length; i < il; ++i) { _case = this[i]; if (html === _case.get('html')) { return _case; } } // Always return a Case object. return Case(); }, /** * Groups the cases by element selector. * * @return object * A hash of cases, keyed by the element selector. */ groupCasesBySelector: function groupCasesBySelector() { var casesBySelector = {}; // Loop through the cases. this.forEach(function (_case) { var selector = _case.get('selector'); if (!casesBySelector[selector]) { casesBySelector[selector] = new Test(); } casesBySelector[selector].add(_case); }); return casesBySelector; }, /** * Groups the cases by serialized HTML string. * * @todo, the html string index needs to be hashed to a uniform length. * * @return object * A hash of cases, keyed by the element selector. */ groupCasesByHtml: function groupCasesByHtml() { var casesByHtml = {}; // Loop through the cases. this.forEach(function (_case) { var html = _case.get('html'); if (!casesByHtml[html]) { casesByHtml[html] = new Test(); } casesByHtml[html].add(_case); }); return casesByHtml; }, /** * @needsdoc */ getGuidelineCoverage: function getGuidelineCoverage(name) { var config = this.get('guidelines'); return config && config[name] || {}; }, /** * Adds the test that owns the Case to the set of arguments passed up to * listeners of this test's cases. */ caseResponded: function caseResponded(eventName, _case) { this.dispatch(eventName, this, _case); // Attempt to declare the Test complete. if (typeof this.testComplete === 'function') { this.testComplete(); } }, /** * Evaluates the test's cases and sets the test's status. */ determineStatus: function determineStatus() { // CantTell. if (this.findByStatus(['cantTell']).length === this.length) { this.set({ status: 'cantTell' }); } // inapplicable. else if (this.findByStatus(['inapplicable']).length === this.length) { this.set({ status: 'inapplicable' }); } // Failed. else if (this.findByStatus(['failed', 'untested']).length) { this.set({ status: 'failed' }); } else { this.set({ status: 'passed' }); } }, resolve: function resolve() { this.dispatch('complete', this); }, /** * A stub method implementation. * * It is assigned a function value when the Test is invoked. See the * testComplete function in outer scope. */ testComplete: null, // @todo, make this a set of methods that all classes extend. listenTo: function listenTo(dispatcher, eventName, handler) { handler = handler.bind(this); dispatcher.registerListener.call(dispatcher, eventName, handler); }, registerListener: function registerListener(eventName, handler) { // nb: 'this' is the dispatcher object, not the one that invoked listenTo. if (!this.listeners[eventName]) { this.listeners[eventName] = []; } this.listeners[eventName].push(handler); }, dispatch: function dispatch(eventName) { if (this.listeners[eventName] && this.listeners[eventName].length) { var eventArgs = [].slice.call(arguments); this.listeners[eventName].forEach(function (handler) { // Pass any additional arguments from the event dispatcher to the // handler function. handler.apply(null, eventArgs); }); } }, concat: [].concat, forEach: [].forEach, push: [].push, sort: [].sort, splice: [].splice }; /** * Dispatches the complete event. * * This function is meant to be bound to a Test as a method through * a debounced proxy function. */ function testComplete(complete) { complete = typeof complete === 'undefined' ? true : complete; // @todo, this iteration would be faster with _.findWhere, that breaks on // the first match. this.forEach(function (_case) { if (!_case.get('status')) { complete = false; } }); // If all the Cases have been evaluated, dispatch the event. if (complete) { // Set the end time for performance monitoring. var end = new Date(); this.set('endTime', end); // Null out the testComplete callback on this test. this.testComplete = null; // @todo, this should be set with the set method and a silent flag. this.attributes.complete = true; this.determineStatus(); } // Otherwise attempt to the complete the Test again after the debounce // period has expired. else { this.testComplete(); } } /** * Limits the invocations of a function in a given time frame. * * Adapted from underscore.js. Replace with debounce from underscore once class * loading with modules is in place. * * @param {Function} callback * The function to be invoked. * * @param {Number} wait * The time period within which the callback function should only be * invoked once. For example if the wait period is 250ms, then the callback * will only be called at most 4 times per second. */ function debounce(func, wait, immediate) { 'use strict'; var timeout, result; return function () { var self = this; var args = arguments; var later = function later() { timeout = null; if (!immediate) { result = func.apply(self, args); } }; var callNow = immediate && !timeout; clearTimeout(timeout); timeout = setTimeout(later, wait); if (callNow) { result = func.apply(self, args); } return result; }; } // Give the init function the Test prototype. Test.fn.init.prototype = Test.fn; return Test; }(); module.exports = Test; },{"Case":33}],38:[function(require,module,exports){ 'use strict'; var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj); } var Test = require('Test'); var TestCollection = function () { /** * A Collection of Tests. */ function TestCollection(tests) { return new TestCollection.fn.init(tests); } // Prototype object of the TestCollection. TestCollection.fn = TestCollection.prototype = { constructor: TestCollection, init: function init(tests, options) { this.listeners = {}; options = options || {}; if (!tests) { return this; } if ((typeof tests === 'undefined' ? 'undefined' : _typeof(tests)) === 'object') { var test; for (var name in tests) { if (tests.hasOwnProperty(name)) { tests[name].scope = tests[name].scope || options.scope; test = new Test(name, tests[name]); this.listenTo(test, 'results', this.report); this.push(test); } } return this; } return this; }, // Setting a length property makes it behave like an array. length: 0, // Invoke all the tests in a set. run: function run(callbacks) { var self = this; callbacks = callbacks || {}; this.forEach(function (test) { // Allow a prefilter to remove a case. if (callbacks.preFilter) { self.listenTo(test, 'resolve', function (eventName, test, _case) { var result = callbacks.preFilter(eventName, test, _case); if (result === false) { // Manipulate the attributes directly so that change events // are not triggered. _case.attributes.status = 'untested'; } }); } // Allow the invoker to listen to resolve events on each Case. if (callbacks.caseResolve) { self.listenTo(test, 'resolve', callbacks.caseResolve); } // Allow the invoker to listen to complete events on each Test. if (callbacks.testComplete) { self.listenTo(test, 'complete', callbacks.testComplete); } }); // Allow the invoker to listen to complete events for the // TestCollection. if (callbacks.testCollectionComplete) { self.listenTo(self, 'complete', callbacks.testCollectionComplete); } // Set the test complete method to the closure function that dispatches // the complete event. This method needs to be debounced so it is // only called after a pause of invocations. this.testsComplete = debounce(testsComplete.bind(this), 500); // Invoke each test. this.forEach(function (test) { test.invoke(); }); // Invoke the complete dispatcher to prevent the collection from never // completing in the off chance that no Tests are run. this.testsComplete(); return this; }, /** * Add a Test object to the set. */ add: function add(test) { // Don't add a test that already exists in this set. if (!this.find(test.get('name'))) { this.push(test); } }, /** * Finds a test by its name. */ find: function find(testname) { for (var i = 0, il = this.length; i < il; ++i) { if (this[i].get('name') === testname) { return this[i]; } } return null; }, /** * @info, this should be a static method. */ findByGuideline: function findByGuideline(guidelineName) { var methods = { wcag: function wcag(section, technique) { function findAllTestsForTechnique(guidelineName, sectionId, techniqueName) { // Return a TestCollection instance. var tests = new TestCollection(); this.forEach(function (test) { // Get the configured guidelines for the test. var guidelines = test.get('guidelines'); // If this test is configured for this section and it has // associated techniques, then loop thorugh them. var testTechniques = guidelines[guidelineName] && guidelines[guidelineName][sectionId] && guidelines[guidelineName][sectionId].techniques; if (testTechniques) { for (var i = 0, il = testTechniques.length; i < il; ++i) { // If this test is configured for the techniqueName, add it // to the list of tests. if (testTechniques[i] === techniqueName) { tests.listenTo(test, 'results', tests.report); tests.add(test); } } } }); return tests; } var sectionId = section.id; var techniqueName = technique.get('name'); if (sectionId && techniqueName) { return findAllTestsForTechnique.call(this, guidelineName, sectionId, techniqueName); } } }; // Process the request using a specific guideline finding method. // @todo, make these pluggable eventually. if (methods[guidelineName]) { var args = [].slice.call(arguments, 1); return methods[guidelineName].apply(this, args); } }, /** * Finds tests by their status. */ findByStatus: function findByStatus(statuses) { if (!statuses) { return; } var tests = new TestCollection(); // A single status or an array of statuses is allowed. Always act on an // array. if (typeof statuses === 'string') { statuses = [statuses]; } // Loop the through the statuses and find tests with them. for (var i = 0, il = statuses.length; i < il; ++i) { var status = statuses[i]; // Loop through the tests. this.forEach(function (test) { var testStatus = test.get('status'); if (testStatus === status) { tests.add(test); } }); } return tests; }, /** * Create a new test from a name and details. */ set: function set(testname, details) { for (var i = 0, il = this.length; i < il; ++i) { if (this[i].get('name') === testname) { this[i].set(details); return this[i]; } } var test = Test(testname, details); this.push(test); return test; }, /** * A stub method implementation. * * It is assigned a function value when the collection is run. See the * testsComplete function in outer scope. */ testsComplete: null, report: function report() { this.dispatch.apply(this, arguments); }, // @todo, make this a set of methods that all classes extend. listenTo: function listenTo(dispatcher, eventName, handler) { handler = handler.bind(this); dispatcher.registerListener.call(dispatcher, eventName, handler); }, registerListener: function registerListener(eventName, handler) { // nb: 'this' is the dispatcher object, not the one that invoked listenTo. if (!this.listeners[eventName]) { this.listeners[eventName] = []; } this.listeners[eventName].push(handler); }, dispatch: function dispatch(eventName) { if (this.listeners[eventName] && this.listeners[eventName].length) { var eventArgs = [].slice.call(arguments); this.listeners[eventName].forEach(function (handler) { // Pass any additional arguments from the event dispatcher to the // handler function. handler.apply(null, eventArgs); }); } }, forEach: [].forEach, push: [].push, sort: [].sort, splice: [].splice }; /** * Dispatches the complete event. * * This function is meant to be bound to a Test as a method through * a debounced proxy function. */ function testsComplete() { var complete = true; // @todo, this iteration would be faster with _.findWhere, that breaks on // the first match. this.forEach(function (test) { if (!test.get('complete')) { complete = false; } }); // If all the Tests have completed, dispatch the event. if (complete) { this.testsComplete = null; this.dispatch('complete', this); } // Otherwise attempt to the complete the Tests again after the debounce // period has expired. else { this.testsComplete(); } } /** * Limits the invocations of a function in a given time frame. * * Adapted from underscore.js. Replace with debounce from underscore once class * loading with modules is in place. * * @param {Function} callback * The function to be invoked. * * @param {Number} wait * The time period within which the callback function should only be * invoked once. For example if the wait period is 250ms, then the callback * will only be called at most 4 times per second. */ function debounce(func, wait, immediate) { 'use strict'; var timeout, result; return function () { var self = this; var args = arguments; var later = function later() { timeout = null; if (!immediate) { result = func.apply(self, args); } }; var callNow = immediate && !timeout; clearTimeout(timeout); timeout = setTimeout(later, wait); if (callNow) { result = func.apply(self, args); } return result; }; } // Give the init function the TestCollection prototype. TestCollection.fn.init.prototype = TestCollection.fn; return TestCollection; }(); module.exports = TestCollection; },{"Test":37}],39:[function(require,module,exports){ 'use strict'; var WhiteSpaceNotUsedForFormatting = require('WhiteSpaceNotUsedForFormatting'); var WhiteSpaceInWord = require('WhiteSpaceInWord'); var VideosEmbeddedOrLinkedNeedCaptions = require('VideosEmbeddedOrLinkedNeedCaptions'); var VideoMayBePresent = require('VideoMayBePresent'); var TextareaHasAssociatedLabel = require('TextareaHasAssociatedLabel'); var TextIsNotSmall = require('TextIsNotSmall'); var TabularDataIsInTable = require('TabularDataIsInTable'); var TableUsesScopeForRow = require('TableUsesScopeForRow'); var TableUsesCaption = require('TableUsesCaption'); var TableUsesAbbreviationForHeader = require('TableUsesAbbreviationForHeader'); var TableUseColGroup = require('TableUseColGroup'); var TableSummaryIsNotTooLong = require('TableSummaryIsNotTooLong'); var TableSummaryIsEmpty = require('TableSummaryIsEmpty'); var TableSummaryDoesNotDuplicateCaption = require('TableSummaryDoesNotDuplicateCaption'); var TableShouldUseHeaderIDs = require('TableShouldUseHeaderIDs'); var TableNotUsedForLayout = require('TableNotUsedForLayout'); var TableLayoutMakesSenseLinearized = require('TableLayoutMakesSenseLinearized'); var TableLayoutHasNoSummary = require('TableLayoutHasNoSummary'); var TableLayoutHasNoCaption = require('TableLayoutHasNoCaption'); var TableLayoutDataShouldNotHaveTh = require('TableLayoutDataShouldNotHaveTh'); var TableDataShouldHaveTh = require('TableDataShouldHaveTh'); var TabIndexFollowsLogicalOrder = require('TabIndexFollowsLogicalOrder'); var SvgContainsTitle = require('SvgContainsTitle'); var SkipToContentLinkProvided = require('SkipToContentLinkProvided'); var SiteMap = require('SiteMap'); var SelectJumpMenu = require('SelectJumpMenu'); var SelectHasAssociatedLabel = require('SelectHasAssociatedLabel'); var ScriptOnmouseupHasOnkeyup = require('ScriptOnmouseupHasOnkeyup'); var ScriptOnmouseoverHasOnfocus = require('ScriptOnmouseoverHasOnfocus'); var ScriptOnmouseoutHasOnmouseblur = require('ScriptOnmouseoutHasOnmouseblur'); var ScriptOnmousemove = require('ScriptOnmousemove'); var ScriptOnmousedownRequiresOnKeypress = require('ScriptOnmousedownRequiresOnKeypress'); var ScriptOndblclickRequiresOnKeypress = require('ScriptOndblclickRequiresOnKeypress'); var ScriptOnclickRequiresOnKeypress = require('ScriptOnclickRequiresOnKeypress'); var RadioHasLabel = require('RadioHasLabel'); var PreShouldNotBeUsedForTabularLayout = require('PreShouldNotBeUsedForTabularLayout'); var PasswordHasLabel = require('PasswordHasLabel'); var PNotUsedAsHeader = require('PNotUsedAsHeader'); var ObjectMustHaveValidTitle = require('ObjectMustHaveValidTitle'); var ObjectMustHaveTitle = require('ObjectMustHaveTitle'); var ObjectMustHaveEmbed = require('ObjectMustHaveEmbed'); var ObjectMustContainText = require('ObjectMustContainText'); var NewWindowIsOpened = require('NewWindowIsOpened'); var MarqueeIsNotUsed = require('MarqueeIsNotUsed'); var ListOfLinksUseList = require('ListOfLinksUseList'); var ListNotUsedForFormatting = require('ListNotUsedForFormatting'); var LinkHasAUniqueContext = require('LinkHasAUniqueContext'); var LiDontUseImageForBullet = require('LiDontUseImageForBullet'); var LegendTextNotPlaceholder = require('LegendTextNotPlaceholder'); var LegendTextNotEmpty = require('LegendTextNotEmpty'); var LanguageUnicodeDirection = require('LanguageUnicodeDirection'); var LanguageDirectionPunctuation = require('LanguageDirectionPunctuation'); var LanguageDirAttributeIsUsed = require('LanguageDirAttributeIsUsed'); var LabelsAreAssignedToAnInput = require('LabelsAreAssignedToAnInput'); var LabelMustNotBeEmpty = require('LabelMustNotBeEmpty'); var LabelMustBeUnique = require('LabelMustBeUnique'); var LabelDoesNotContainInput = require('LabelDoesNotContainInput'); var InputWithoutLabelHasTitle = require('InputWithoutLabelHasTitle'); var InputTextValueNotEmpty = require('InputTextValueNotEmpty'); var InputTextHasValue = require('InputTextHasValue'); var InputTextHasLabel = require('InputTextHasLabel'); var InputImageHasAlt = require('InputImageHasAlt'); var InputImageAltNotRedundant = require('InputImageAltNotRedundant'); var InputImageAltIsShort = require('InputImageAltIsShort'); var InputImageAltIsNotPlaceholder = require('InputImageAltIsNotPlaceholder'); var InputImageAltIsNotFileName = require('InputImageAltIsNotFileName'); var InputElementsDontHaveAlt = require('InputElementsDontHaveAlt'); var InputCheckboxRequiresFieldset = require('InputCheckboxRequiresFieldset'); var ImgWithMapHasUseMap = require('ImgWithMapHasUseMap'); var ImgShouldNotHaveTitle = require('ImgShouldNotHaveTitle'); var ImgServerSideMapNotUsed = require('ImgServerSideMapNotUsed'); var ImgNonDecorativeHasAlt = require('ImgNonDecorativeHasAlt'); var ImgImportantNoSpacerAlt = require('ImgImportantNoSpacerAlt'); var ImgHasLongDesc = require('ImgHasLongDesc'); var ImgHasAlt = require('ImgHasAlt'); var ImgAltNotPlaceHolder = require('ImgAltNotPlaceHolder'); var ImgAltNotEmptyInAnchor = require('ImgAltNotEmptyInAnchor'); var ImgAltIsTooLong = require('ImgAltIsTooLong'); var ImgAltIsDifferent = require('ImgAltIsDifferent'); var ImageMapServerSide = require('ImageMapServerSide'); var IframeMustNotHaveLongdesc = require('IframeMustNotHaveLongdesc'); var IdrefsHasCorrespondingId = require('IdrefsHasCorrespondingId'); var IIsNotUsed = require('IIsNotUsed'); var HeadersUseToMarkSections = require('HeadersUseToMarkSections'); var HeadersHaveText = require('HeadersHaveText'); var HeadersAttrRefersToATableCell = require('HeadersAttrRefersToATableCell'); var HeaderH6Format = require('HeaderH6Format'); var HeaderH5Format = require('HeaderH5Format'); var HeaderH4Format = require('HeaderH4Format'); var HeaderH4 = require('HeaderH4'); var HeaderH3Format = require('HeaderH3Format'); var HeaderH3 = require('HeaderH3'); var HeaderH2Format = require('HeaderH2Format'); var HeaderH2 = require('HeaderH2'); var HeaderH1Format = require('HeaderH1Format'); var HeaderH1 = require('HeaderH1'); var FormWithRequiredLabel = require('FormWithRequiredLabel'); var FormHasSubmitButton = require('FormHasSubmitButton'); var FormHasGoodErrorMessage = require('FormHasGoodErrorMessage'); var FormErrorMessageHelpsUser = require('FormErrorMessageHelpsUser'); var FormButtonsHaveValue = require('FormButtonsHaveValue'); var FontIsNotUsed = require('FontIsNotUsed'); var FileHasLabel = require('FileHasLabel'); var FieldsetHasLabel = require('FieldsetHasLabel'); var EmbedMustHaveAltAttribute = require('EmbedMustHaveAltAttribute'); var EmbedHasAssociatedNoEmbed = require('EmbedHasAssociatedNoEmbed'); var DocumentVisualListsAreMarkedUp = require('DocumentVisualListsAreMarkedUp'); var DocumentTitleNotEmpty = require('DocumentTitleNotEmpty'); var DocumentTitleIsShort = require('DocumentTitleIsShort'); var DocumentTitleIsNotPlaceholder = require('DocumentTitleIsNotPlaceholder'); var DocumentTitleDescribesDocument = require('DocumentTitleDescribesDocument'); var DocumentStrictDocType = require('DocumentStrictDocType'); var DocumentReadingDirection = require('DocumentReadingDirection'); var DocumentMetaNotUsedWithTimeout = require('DocumentMetaNotUsedWithTimeout'); var DocumentLangNotIdentified = require('DocumentLangNotIdentified'); var DocumentLangIsISO639Standard = require('DocumentLangIsISO639Standard'); var DocumentIsWrittenClearly = require('DocumentIsWrittenClearly'); var DocumentHasTitleElement = require('DocumentHasTitleElement'); var DocumentContentReadableWithoutStylesheets = require('DocumentContentReadableWithoutStylesheets'); var DocumentAutoRedirectNotUsed = require('DocumentAutoRedirectNotUsed'); var DocumentAcronymsHaveElement = require('DocumentAcronymsHaveElement'); var DoctypeProvided = require('DoctypeProvided'); var DefinitionListsAreUsed = require('DefinitionListsAreUsed'); var CssDocumentMakesSenseStyleTurnedOff = require('CssDocumentMakesSenseStyleTurnedOff'); var ColorFontContrast = require('ColorFontContrast'); var ColorElementBehindContrast = require('ColorElementBehindContrast'); var ColorElementBehindBackgroundImageContrast = require('ColorElementBehindBackgroundImageContrast'); var ColorElementBehindBackgroundGradientContrast = require('ColorElementBehindBackgroundGradientContrast'); var ColorBackgroundImageContrast = require('ColorBackgroundImageContrast'); var ColorBackgroundGradientContrast = require('ColorBackgroundGradientContrast'); var CheckboxHasLabel = require('CheckboxHasLabel'); var ButtonHasName = require('ButtonHasName'); var BoldIsNotUsed = require('BoldIsNotUsed'); var BlockquoteUseForQuotations = require('BlockquoteUseForQuotations'); var BlockquoteNotUsedForIndentation = require('BlockquoteNotUsedForIndentation'); var BlinkIsNotUsed = require('BlinkIsNotUsed'); var BasefontIsNotUsed = require('BasefontIsNotUsed'); var AudioMayBePresent = require('AudioMayBePresent'); var AreaLinksToSoundFile = require('AreaLinksToSoundFile'); var AreaHasAltValue = require('AreaHasAltValue'); var AreaDontOpenNewWindow = require('AreaDontOpenNewWindow'); var AreaAltRefersToText = require('AreaAltRefersToText'); var AreaAltIdentifiesDestination = require('AreaAltIdentifiesDestination'); var AnimatedGifMayBePresent = require('AnimatedGifMayBePresent'); var ATitleDescribesDestination = require('ATitleDescribesDestination'); var ASuspiciousLinkText = require('ASuspiciousLinkText'); var AppletsDonotUseColorAlone = require('AppletsDonotUseColorAlone'); var AppletsDoNotFlicker = require('AppletsDoNotFlicker'); var AppletUIMustBeAccessible = require('AppletUIMustBeAccessible'); var AppletTextEquivalentsGetUpdated = require('AppletTextEquivalentsGetUpdated'); var AppletProvidesMechanismToReturnToParent = require('AppletProvidesMechanismToReturnToParent'); var AppletContainsTextEquivalentInAlt = require('AppletContainsTextEquivalentInAlt'); var AppletContainsTextEquivalent = require('AppletContainsTextEquivalent'); var AMustNotHaveJavascriptHref = require('AMustNotHaveJavascriptHref'); var AMustHaveTitle = require('AMustHaveTitle'); var AMustContainText = require('AMustContainText'); var AMultimediaTextAlternative = require('AMultimediaTextAlternative'); var ALinksToSoundFilesNeedTranscripts = require('ALinksToSoundFilesNeedTranscripts'); var ALinksToMultiMediaRequireTranscript = require('ALinksToMultiMediaRequireTranscript'); var ALinksNotSeparatedBySymbols = require('ALinksNotSeparatedBySymbols'); var ALinksDontOpenNewWindow = require('ALinksDontOpenNewWindow'); var ALinksAreSeparatedByPrintableCharacters = require('ALinksAreSeparatedByPrintableCharacters'); var ALinkWithNonText = require('ALinkWithNonText'); var ALinkTextDoesNotBeginWithRedundantWord = require('ALinkTextDoesNotBeginWithRedundantWord'); var AInPHasADistinctStyle = require('AInPHasADistinctStyle'); var AImgAltNotRepetitive = require('AImgAltNotRepetitive'); var AAdjacentWithSameResourceShouldBeCombined = require('AAdjacentWithSameResourceShouldBeCombined'); var map = new Map(); map.set('aAdjacentWithSameResourceShouldBeCombined', AAdjacentWithSameResourceShouldBeCombined); map.set('aImgAltNotRepetitive', AImgAltNotRepetitive); map.set('aInPHasADistinctStyle', AInPHasADistinctStyle); map.set('aLinkTextDoesNotBeginWithRedundantWord', ALinkTextDoesNotBeginWithRedundantWord); map.set('aLinkWithNonText', ALinkWithNonText); map.set('aLinksAreSeparatedByPrintableCharacters', ALinksAreSeparatedByPrintableCharacters); map.set('aLinksDontOpenNewWindow', ALinksDontOpenNewWindow); map.set('aLinksNotSeparatedBySymbols', ALinksNotSeparatedBySymbols); map.set('aLinksToMultiMediaRequireTranscript', ALinksToMultiMediaRequireTranscript); map.set('aLinksToSoundFilesNeedTranscripts', ALinksToSoundFilesNeedTranscripts); map.set('aMultimediaTextAlternative', AMultimediaTextAlternative); map.set('aMustContainText', AMustContainText); map.set('aMustHaveTitle', AMustHaveTitle); map.set('aMustNotHaveJavascriptHref', AMustNotHaveJavascriptHref); map.set('appletContainsTextEquivalent', AppletContainsTextEquivalent); map.set('appletContainsTextEquivalentInAlt', AppletContainsTextEquivalentInAlt); map.set('appletProvidesMechanismToReturnToParent', AppletProvidesMechanismToReturnToParent); map.set('appletTextEquivalentsGetUpdated', AppletTextEquivalentsGetUpdated); map.set('appletUIMustBeAccessible', AppletUIMustBeAccessible); map.set('appletsDoNotFlicker', AppletsDoNotFlicker); map.set('appletsDonotUseColorAlone', AppletsDonotUseColorAlone); map.set('aSuspiciousLinkText', ASuspiciousLinkText); map.set('aTitleDescribesDestination', ATitleDescribesDestination); map.set('animatedGifMayBePresent', AnimatedGifMayBePresent); map.set('areaAltIdentifiesDestination', AreaAltIdentifiesDestination); map.set('areaAltRefersToText', AreaAltRefersToText); map.set('areaDontOpenNewWindow', AreaDontOpenNewWindow); map.set('areaHasAltValue', AreaHasAltValue); map.set('areaLinksToSoundFile', AreaLinksToSoundFile); map.set('audioMayBePresent', AudioMayBePresent); map.set('basefontIsNotUsed', BasefontIsNotUsed); map.set('blinkIsNotUsed', BlinkIsNotUsed); map.set('blockquoteNotUsedForIndentation', BlockquoteNotUsedForIndentation); map.set('blockquoteUseForQuotations', BlockquoteUseForQuotations); map.set('boldIsNotUsed', BoldIsNotUsed); map.set('buttonHasName', ButtonHasName); map.set('checkboxHasLabel', CheckboxHasLabel); map.set('colorBackgroundGradientContrast', ColorBackgroundGradientContrast); map.set('colorBackgroundImageContrast', ColorBackgroundImageContrast); map.set('colorElementBehindBackgroundGradientContrast', ColorElementBehindBackgroundGradientContrast); map.set('colorElementBehindBackgroundImageContrast', ColorElementBehindBackgroundImageContrast); map.set('colorElementBehindContrast', ColorElementBehindContrast); map.set('colorFontContrast', ColorFontContrast); map.set('cssDocumentMakesSenseStyleTurnedOff', CssDocumentMakesSenseStyleTurnedOff); map.set('definitionListsAreUsed', DefinitionListsAreUsed); map.set('doctypeProvided', DoctypeProvided); map.set('documentAcronymsHaveElement', DocumentAcronymsHaveElement); map.set('documentAutoRedirectNotUsed', DocumentAutoRedirectNotUsed); map.set('documentContentReadableWithoutStylesheets', DocumentContentReadableWithoutStylesheets); map.set('documentHasTitleElement', DocumentHasTitleElement); map.set('documentIsWrittenClearly', DocumentIsWrittenClearly); map.set('documentLangIsISO639Standard', DocumentLangIsISO639Standard); map.set('documentLangNotIdentified', DocumentLangNotIdentified); map.set('documentMetaNotUsedWithTimeout', DocumentMetaNotUsedWithTimeout); map.set('documentReadingDirection', DocumentReadingDirection); map.set('documentStrictDocType', DocumentStrictDocType); map.set('documentTitleDescribesDocument', DocumentTitleDescribesDocument); map.set('documentTitleIsNotPlaceholder', DocumentTitleIsNotPlaceholder); map.set('documentTitleIsShort', DocumentTitleIsShort); map.set('documentTitleNotEmpty', DocumentTitleNotEmpty); map.set('documentVisualListsAreMarkedUp', DocumentVisualListsAreMarkedUp); map.set('embedHasAssociatedNoEmbed', EmbedHasAssociatedNoEmbed); map.set('embedMustHaveAltAttribute', EmbedMustHaveAltAttribute); map.set('fieldsetHasLabel', FieldsetHasLabel); map.set('fileHasLabel', FileHasLabel); map.set('fontIsNotUsed', FontIsNotUsed); map.set('formButtonsHaveValue', FormButtonsHaveValue); map.set('formErrorMessageHelpsUser', FormErrorMessageHelpsUser); map.set('formHasGoodErrorMessage', FormHasGoodErrorMessage); map.set('formHasSubmitButton', FormHasSubmitButton); map.set('formWithRequiredLabel', FormWithRequiredLabel); map.set('headerH1', HeaderH1); map.set('headerH1Format', HeaderH1Format); map.set('headerH2', HeaderH2); map.set('headerH2Format', HeaderH2Format); map.set('headerH3', HeaderH3); map.set('headerH3Format', HeaderH3Format); map.set('headerH4', HeaderH4); map.set('headerH4Format', HeaderH4Format); map.set('headerH5Format', HeaderH5Format); map.set('headerH6Format', HeaderH6Format); map.set('headersAttrRefersToATableCell', HeadersAttrRefersToATableCell); map.set('headersHaveText', HeadersHaveText); map.set('headersUseToMarkSections', HeadersUseToMarkSections); map.set('iIsNotUsed', IIsNotUsed); map.set('idrefsHasCorrespondingId', IdrefsHasCorrespondingId); map.set('iframeMustNotHaveLongdesc', IframeMustNotHaveLongdesc); map.set('imageMapServerSide', ImageMapServerSide); map.set('imgAltIsDifferent', ImgAltIsDifferent); map.set('imgAltIsTooLong', ImgAltIsTooLong); map.set('imgAltNotEmptyInAnchor', ImgAltNotEmptyInAnchor); map.set('imgAltNotPlaceHolder', ImgAltNotPlaceHolder); map.set('imgHasAlt', ImgHasAlt); map.set('imgHasLongDesc', ImgHasLongDesc); map.set('imgImportantNoSpacerAlt', ImgImportantNoSpacerAlt); map.set('imgNonDecorativeHasAlt', ImgNonDecorativeHasAlt); map.set('imgServerSideMapNotUsed', ImgServerSideMapNotUsed); map.set('imgShouldNotHaveTitle', ImgShouldNotHaveTitle); map.set('imgWithMapHasUseMap', ImgWithMapHasUseMap); map.set('inputCheckboxRequiresFieldset', InputCheckboxRequiresFieldset); map.set('inputElementsDontHaveAlt', InputElementsDontHaveAlt); map.set('inputImageAltIsNotFileName', InputImageAltIsNotFileName); map.set('inputImageAltIsNotPlaceholder', InputImageAltIsNotPlaceholder); map.set('inputImageAltIsShort', InputImageAltIsShort); map.set('inputImageAltNotRedundant', InputImageAltNotRedundant); map.set('inputImageHasAlt', InputImageHasAlt); map.set('inputTextHasLabel', InputTextHasLabel); map.set('inputTextHasValue', InputTextHasValue); map.set('inputTextValueNotEmpty', InputTextValueNotEmpty); map.set('inputWithoutLabelHasTitle', InputWithoutLabelHasTitle); map.set('labelDoesNotContainInput', LabelDoesNotContainInput); map.set('labelMustBeUnique', LabelMustBeUnique); map.set('labelMustNotBeEmpty', LabelMustNotBeEmpty); map.set('labelsAreAssignedToAnInput', LabelsAreAssignedToAnInput); map.set('languageDirAttributeIsUsed', LanguageDirAttributeIsUsed); map.set('languageDirectionPunctuation', LanguageDirectionPunctuation); map.set('languageUnicodeDirection', LanguageUnicodeDirection); map.set('legendTextNotEmpty', LegendTextNotEmpty); map.set('legendTextNotPlaceholder', LegendTextNotPlaceholder); map.set('liDontUseImageForBullet', LiDontUseImageForBullet); map.set('linkHasAUniqueContext', LinkHasAUniqueContext); map.set('listNotUsedForFormatting', ListNotUsedForFormatting); map.set('listOfLinksUseList', ListOfLinksUseList); map.set('marqueeIsNotUsed', MarqueeIsNotUsed); map.set('newWindowIsOpened', NewWindowIsOpened); map.set('objectMustContainText', ObjectMustContainText); map.set('objectMustHaveEmbed', ObjectMustHaveEmbed); map.set('objectMustHaveTitle', ObjectMustHaveTitle); map.set('objectMustHaveValidTitle', ObjectMustHaveValidTitle); map.set('pNotUsedAsHeader', PNotUsedAsHeader); map.set('passwordHasLabel', PasswordHasLabel); map.set('preShouldNotBeUsedForTabularLayout', PreShouldNotBeUsedForTabularLayout); map.set('radioHasLabel', RadioHasLabel); map.set('scriptOnclickRequiresOnKeypress', ScriptOnclickRequiresOnKeypress); map.set('scriptOndblclickRequiresOnKeypress', ScriptOndblclickRequiresOnKeypress); map.set('scriptOnmousedownRequiresOnKeypress', ScriptOnmousedownRequiresOnKeypress); map.set('scriptOnmousemove', ScriptOnmousemove); map.set('scriptOnmouseoutHasOnmouseblur', ScriptOnmouseoutHasOnmouseblur); map.set('scriptOnmouseoverHasOnfocus', ScriptOnmouseoverHasOnfocus); map.set('scriptOnmouseupHasOnkeyup', ScriptOnmouseupHasOnkeyup); map.set('selectHasAssociatedLabel', SelectHasAssociatedLabel); map.set('selectJumpMenu', SelectJumpMenu); map.set('siteMap', SiteMap); map.set('skipToContentLinkProvided', SkipToContentLinkProvided); map.set('svgContainsTitle', SvgContainsTitle); map.set('tabIndexFollowsLogicalOrder', TabIndexFollowsLogicalOrder); map.set('tableDataShouldHaveTh', TableDataShouldHaveTh); map.set('tableLayoutDataShouldNotHaveTh', TableLayoutDataShouldNotHaveTh); map.set('tableLayoutHasNoCaption', TableLayoutHasNoCaption); map.set('tableLayoutHasNoSummary', TableLayoutHasNoSummary); map.set('tableLayoutMakesSenseLinearized', TableLayoutMakesSenseLinearized); map.set('tableNotUsedForLayout', TableNotUsedForLayout); map.set('tableShouldUseHeaderIDs', TableShouldUseHeaderIDs); map.set('tableSummaryDoesNotDuplicateCaption', TableSummaryDoesNotDuplicateCaption); map.set('tableSummaryIsEmpty', TableSummaryIsEmpty); map.set('tableSummaryIsNotTooLong', TableSummaryIsNotTooLong); map.set('tableUseColGroup', TableUseColGroup); map.set('tableUsesAbbreviationForHeader', TableUsesAbbreviationForHeader); map.set('tableUsesCaption', TableUsesCaption); map.set('tableUsesScopeForRow', TableUsesScopeForRow); map.set('tabularDataIsInTable', TabularDataIsInTable); map.set('textIsNotSmall', TextIsNotSmall); map.set('textareaHasAssociatedLabel', TextareaHasAssociatedLabel); map.set('videoMayBePresent', VideoMayBePresent); map.set('videosEmbeddedOrLinkedNeedCaptions', VideosEmbeddedOrLinkedNeedCaptions); map.set('whiteSpaceInWord', WhiteSpaceInWord); map.set('whiteSpaceNotUsedForFormatting', WhiteSpaceNotUsedForFormatting); module.exports = map; },{"AAdjacentWithSameResourceShouldBeCombined":241,"AImgAltNotRepetitive":242,"AInPHasADistinctStyle":243,"ALinkTextDoesNotBeginWithRedundantWord":244,"ALinkWithNonText":245,"ALinksAreSeparatedByPrintableCharacters":246,"ALinksDontOpenNewWindow":247,"ALinksNotSeparatedBySymbols":248,"ALinksToMultiMediaRequireTranscript":249,"ALinksToSoundFilesNeedTranscripts":250,"AMultimediaTextAlternative":251,"AMustContainText":252,"AMustHaveTitle":253,"AMustNotHaveJavascriptHref":254,"ASuspiciousLinkText":255,"ATitleDescribesDestination":256,"AnimatedGifMayBePresent":257,"AppletContainsTextEquivalent":258,"AppletContainsTextEquivalentInAlt":259,"AppletProvidesMechanismToReturnToParent":260,"AppletTextEquivalentsGetUpdated":261,"AppletUIMustBeAccessible":262,"AppletsDoNotFlicker":263,"AppletsDonotUseColorAlone":264,"AreaAltIdentifiesDestination":265,"AreaAltRefersToText":266,"AreaDontOpenNewWindow":267,"AreaHasAltValue":268,"AreaLinksToSoundFile":269,"AudioMayBePresent":270,"BasefontIsNotUsed":271,"BlinkIsNotUsed":272,"BlockquoteNotUsedForIndentation":273,"BlockquoteUseForQuotations":274,"BoldIsNotUsed":275,"ButtonHasName":276,"CheckboxHasLabel":277,"ColorBackgroundGradientContrast":278,"ColorBackgroundImageContrast":279,"ColorElementBehindBackgroundGradientContrast":280,"ColorElementBehindBackgroundImageContrast":281,"ColorElementBehindContrast":282,"ColorFontContrast":283,"CssDocumentMakesSenseStyleTurnedOff":284,"DefinitionListsAreUsed":285,"DoctypeProvided":286,"DocumentAcronymsHaveElement":287,"DocumentAutoRedirectNotUsed":288,"DocumentContentReadableWithoutStylesheets":289,"DocumentHasTitleElement":290,"DocumentIsWrittenClearly":291,"DocumentLangIsISO639Standard":292,"DocumentLangNotIdentified":293,"DocumentMetaNotUsedWithTimeout":294,"DocumentReadingDirection":295,"DocumentStrictDocType":296,"DocumentTitleDescribesDocument":297,"DocumentTitleIsNotPlaceholder":298,"DocumentTitleIsShort":299,"DocumentTitleNotEmpty":300,"DocumentVisualListsAreMarkedUp":301,"EmbedHasAssociatedNoEmbed":302,"EmbedMustHaveAltAttribute":303,"FieldsetHasLabel":304,"FileHasLabel":305,"FontIsNotUsed":306,"FormButtonsHaveValue":307,"FormErrorMessageHelpsUser":308,"FormHasGoodErrorMessage":309,"FormHasSubmitButton":310,"FormWithRequiredLabel":311,"HeaderH1":312,"HeaderH1Format":313,"HeaderH2":314,"HeaderH2Format":315,"HeaderH3":316,"HeaderH3Format":317,"HeaderH4":318,"HeaderH4Format":319,"HeaderH5Format":320,"HeaderH6Format":321,"HeadersAttrRefersToATableCell":322,"HeadersHaveText":323,"HeadersUseToMarkSections":324,"IIsNotUsed":325,"IdrefsHasCorrespondingId":326,"IframeMustNotHaveLongdesc":327,"ImageMapServerSide":328,"ImgAltIsDifferent":329,"ImgAltIsTooLong":330,"ImgAltNotEmptyInAnchor":331,"ImgAltNotPlaceHolder":332,"ImgHasAlt":333,"ImgHasLongDesc":334,"ImgImportantNoSpacerAlt":335,"ImgNonDecorativeHasAlt":336,"ImgServerSideMapNotUsed":337,"ImgShouldNotHaveTitle":338,"ImgWithMapHasUseMap":339,"InputCheckboxRequiresFieldset":340,"InputElementsDontHaveAlt":341,"InputImageAltIsNotFileName":342,"InputImageAltIsNotPlaceholder":343,"InputImageAltIsShort":344,"InputImageAltNotRedundant":345,"InputImageHasAlt":346,"InputTextHasLabel":347,"InputTextHasValue":348,"InputTextValueNotEmpty":349,"InputWithoutLabelHasTitle":350,"LabelDoesNotContainInput":351,"LabelMustBeUnique":352,"LabelMustNotBeEmpty":353,"LabelsAreAssignedToAnInput":354,"LanguageDirAttributeIsUsed":355,"LanguageDirectionPunctuation":356,"LanguageUnicodeDirection":357,"LegendTextNotEmpty":358,"LegendTextNotPlaceholder":359,"LiDontUseImageForBullet":360,"LinkHasAUniqueContext":361,"ListNotUsedForFormatting":362,"ListOfLinksUseList":363,"MarqueeIsNotUsed":364,"NewWindowIsOpened":365,"ObjectMustContainText":366,"ObjectMustHaveEmbed":367,"ObjectMustHaveTitle":368,"ObjectMustHaveValidTitle":369,"PNotUsedAsHeader":370,"PasswordHasLabel":371,"PreShouldNotBeUsedForTabularLayout":372,"RadioHasLabel":373,"ScriptOnclickRequiresOnKeypress":374,"ScriptOndblclickRequiresOnKeypress":375,"ScriptOnmousedownRequiresOnKeypress":376,"ScriptOnmousemove":377,"ScriptOnmouseoutHasOnmouseblur":378,"ScriptOnmouseoverHasOnfocus":379,"ScriptOnmouseupHasOnkeyup":380,"SelectHasAssociatedLabel":381,"SelectJumpMenu":382,"SiteMap":383,"SkipToContentLinkProvided":384,"SvgContainsTitle":385,"TabIndexFollowsLogicalOrder":386,"TableDataShouldHaveTh":387,"TableLayoutDataShouldNotHaveTh":388,"TableLayoutHasNoCaption":389,"TableLayoutHasNoSummary":390,"TableLayoutMakesSenseLinearized":391,"TableNotUsedForLayout":392,"TableShouldUseHeaderIDs":393,"TableSummaryDoesNotDuplicateCaption":394,"TableSummaryIsEmpty":395,"TableSummaryIsNotTooLong":396,"TableUseColGroup":397,"TableUsesAbbreviationForHeader":398,"TableUsesCaption":399,"TableUsesScopeForRow":400,"TabularDataIsInTable":401,"TextIsNotSmall":402,"TextareaHasAssociatedLabel":403,"VideoMayBePresent":404,"VideosEmbeddedOrLinkedNeedCaptions":405,"WhiteSpaceInWord":406,"WhiteSpaceNotUsedForFormatting":407}],40:[function(require,module,exports){ (function (global){ "use strict"; require("core-js/shim"); require("babel-regenerator-runtime"); if (global._babelPolyfill) { throw new Error("only one instance of babel-polyfill is allowed"); } global._babelPolyfill = true; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"babel-regenerator-runtime":41,"core-js/shim":228}],41:[function(require,module,exports){ (function (process,global){ "use strict"; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; /** * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * https://raw.github.com/facebook/regenerator/master/LICENSE file. An * additional grant of patent rights can be found in the PATENTS file in * the same directory. */ !function (global) { "use strict"; var hasOwn = Object.prototype.hasOwnProperty; var undefined; // More compressible than void 0. var iteratorSymbol = typeof Symbol === "function" && Symbol.iterator || "@@iterator"; var inModule = (typeof module === "undefined" ? "undefined" : _typeof(module)) === "object"; var runtime = global.regeneratorRuntime; if (runtime) { if (inModule) { // If regeneratorRuntime is defined globally and we're in a module, // make the exports object identical to regeneratorRuntime. module.exports = runtime; } // Don't bother evaluating the rest of this file if the runtime was // already defined globally. return; } // Define the runtime globally (as expected by generated code) as either // module.exports (if we're in a module) or a new, empty object. runtime = global.regeneratorRuntime = inModule ? module.exports : {}; function wrap(innerFn, outerFn, self, tryLocsList) { // If outerFn provided, then outerFn.prototype instanceof Generator. var generator = Object.create((outerFn || Generator).prototype); var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next, // .throw, and .return methods. generator._invoke = makeInvokeMethod(innerFn, self, context); return generator; } runtime.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion // record like context.tryEntries[i].completion. This interface could // have been (and was previously) designed to take a closure to be // invoked without arguments, but in all the cases we care about we // already have an existing method we want to call, so there's no need // to create a new function object. We can even get away with assuming // the method takes exactly one argument, since that happens to be true // in every case, so we don't have to touch the arguments object. The // only additional allocation required is the completion record, which // has a stable shape and so hopefully should be cheap to allocate. function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } var GenStateSuspendedStart = "suspendedStart"; var GenStateSuspendedYield = "suspendedYield"; var GenStateExecuting = "executing"; var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as // breaking out of the dispatch switch statement. var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and // .constructor.prototype properties for functions that return Generator // objects. For full spec compliance, you may wish to configure your // minifier not to mangle the names of these two functions. function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; GeneratorFunctionPrototype.constructor = GeneratorFunction; GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the // Iterator interface in terms of a single ._invoke method. function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { prototype[method] = function (arg) { return this._invoke(method, arg); }; }); } runtime.isGeneratorFunction = function (genFun) { var ctor = typeof genFun === "function" && genFun.constructor; return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can // do is to check its .name property. (ctor.displayName || ctor.name) === "GeneratorFunction" : false; }; runtime.mark = function (genFun) { if (Object.setPrototypeOf) { Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); } else { genFun.__proto__ = GeneratorFunctionPrototype; } genFun.prototype = Object.create(Gp); return genFun; }; // Within the body of any async function, `await x` is transformed to // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test // `value instanceof AwaitArgument` to determine if the yielded value is // meant to be awaited. Some may consider the name of this method too // cutesy, but they are curmudgeons. runtime.awrap = function (arg) { return new AwaitArgument(arg); }; function AwaitArgument(arg) { this.arg = arg; } function AsyncIterator(generator) { // This invoke function is written in a style that assumes some // calling function (or Promise) will handle exceptions. function invoke(method, arg) { var result = generator[method](arg); var value = result.value; return value instanceof AwaitArgument ? Promise.resolve(value.arg).then(invokeNext, invokeThrow) : Promise.resolve(value).then(function (unwrapped) { // When a yielded Promise is resolved, its final value becomes // the .value of the Promise<{value,done}> result for the // current iteration. If the Promise is rejected, however, the // result for this iteration will be rejected with the same // reason. Note that rejections of yielded Promises are not // thrown back into the generator function, as is the case // when an awaited Promise is rejected. This difference in // behavior between yield and await is important, because it // allows the consumer to decide what to do with the yielded // rejection (swallow it and continue, manually .throw it back // into the generator, abandon iteration, whatever). With // await, by contrast, there is no opportunity to examine the // rejection reason outside the generator function, so the // only option is to throw it from the await expression, and // let the generator function handle the exception. result.value = unwrapped; return result; }); } if ((typeof process === "undefined" ? "undefined" : _typeof(process)) === "object" && process.domain) { invoke = process.domain.bind(invoke); } var invokeNext = invoke.bind(generator, "next"); var invokeThrow = invoke.bind(generator, "throw"); var invokeReturn = invoke.bind(generator, "return"); var previousPromise; function enqueue(method, arg) { function callInvokeWithMethodAndArg() { return invoke(method, arg); } return previousPromise = // If enqueue has been called before, then we want to wait until // all previous Promises have been resolved before calling invoke, // so that results are always delivered in the correct order. If // enqueue has not been called before, then it is important to // call invoke immediately, without waiting on a callback to fire, // so that the async generator function has the opportunity to do // any necessary setup in a predictable way. This predictability // is why the Promise constructor synchronously invokes its // executor callback, and why async functions synchronously // execute code before the first await. Since we implement simple // async functions in terms of async generators, it is especially // important to get this right, even though it requires care. previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later // invocations of the iterator. callInvokeWithMethodAndArg) : new Promise(function (resolve) { resolve(callInvokeWithMethodAndArg()); }); } // Define the unified helper method that is used to implement .next, // .throw, and .return (see defineIteratorMethods). this._invoke = enqueue; } defineIteratorMethods(AsyncIterator.prototype); // Note that simple async functions are implemented on top of // AsyncIterator objects; they just return a Promise for the value of // the final result produced by the iterator. runtime.async = function (innerFn, outerFn, self, tryLocsList) { var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); return runtime.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator. : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }; function makeInvokeMethod(innerFn, self, context) { var state = GenStateSuspendedStart; return function invoke(method, arg) { if (state === GenStateExecuting) { throw new Error("Generator is already running"); } if (state === GenStateCompleted) { if (method === "throw") { throw arg; } // Be forgiving, per 25.3.3.3.3 of the spec: // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume return doneResult(); } while (true) { var delegate = context.delegate; if (delegate) { if (method === "return" || method === "throw" && delegate.iterator[method] === undefined) { // A return or throw (when the delegate iterator has no throw // method) always terminates the yield* loop. context.delegate = null; // If the delegate iterator has a return method, give it a // chance to clean up. var returnMethod = delegate.iterator["return"]; if (returnMethod) { var record = tryCatch(returnMethod, delegate.iterator, arg); if (record.type === "throw") { // If the return method threw an exception, let that // exception prevail over the original return or throw. method = "throw"; arg = record.arg; continue; } } if (method === "return") { // Continue with the outer return, now that the delegate // iterator has been terminated. continue; } } var record = tryCatch(delegate.iterator[method], delegate.iterator, arg); if (record.type === "throw") { context.delegate = null; // Like returning generator.throw(uncaught), but without the // overhead of an extra function call. method = "throw"; arg = record.arg; continue; } // Delegate generator ran and handled its own exceptions so // regardless of what the method was, we continue as if it is // "next" with an undefined arg. method = "next"; arg = undefined; var info = record.arg; if (info.done) { context[delegate.resultName] = info.value; context.next = delegate.nextLoc; } else { state = GenStateSuspendedYield; return info; } context.delegate = null; } if (method === "next") { context._sent = arg; if (state === GenStateSuspendedYield) { context.sent = arg; } else { context.sent = undefined; } } else if (method === "throw") { if (state === GenStateSuspendedStart) { state = GenStateCompleted; throw arg; } if (context.dispatchException(arg)) { // If the dispatched exception was caught by a catch block, // then let that catch block handle the exception normally. method = "next"; arg = undefined; } } else if (method === "return") { context.abrupt("return", arg); } state = GenStateExecuting; var record = tryCatch(innerFn, self, context); if (record.type === "normal") { // If an exception is thrown from innerFn, we leave state === // GenStateExecuting and loop back for another invocation. state = context.done ? GenStateCompleted : GenStateSuspendedYield; var info = { value: record.arg, done: context.done }; if (record.arg === ContinueSentinel) { if (context.delegate && method === "next") { // Deliberately forget the last sent value so that we don't // accidentally pass it on to the delegate. arg = undefined; } } else { return info; } } else if (record.type === "throw") { state = GenStateCompleted; // Dispatch the exception by looping back around to the // context.dispatchException(arg) call above. method = "throw"; arg = record.arg; } } }; } // Define Generator.prototype.{next,throw,return} in terms of the // unified ._invoke helper method. defineIteratorMethods(Gp); Gp[iteratorSymbol] = function () { return this; }; Gp.toString = function () { return "[object Generator]"; }; function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; if (1 in locs) { entry.catchLoc = locs[1]; } if (2 in locs) { entry.finallyLoc = locs[2]; entry.afterLoc = locs[3]; } this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal"; delete record.arg; entry.completion = record; } function Context(tryLocsList) { // The root entry object (effectively a try statement without a catch // or a finally block) gives us a place to store values thrown from // locations where there is no enclosing try statement. this.tryEntries = [{ tryLoc: "root" }]; tryLocsList.forEach(pushTryEntry, this); this.reset(true); } runtime.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } keys.reverse(); // Rather than returning an object with a next method, we keep // things simple and return the next function itself. return function next() { while (keys.length) { var key = keys.pop(); if (key in object) { next.value = key; next.done = false; return next; } } // To avoid creating an additional object, we just hang the .value // and .done properties off the next function object itself. This // also ensures that the minifier will not anonymize the function. next.done = true; return next; }; }; function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) { return iteratorMethod.call(iterable); } if (typeof iterable.next === "function") { return iterable; } if (!isNaN(iterable.length)) { var i = -1, next = function next() { while (++i < iterable.length) { if (hasOwn.call(iterable, i)) { next.value = iterable[i]; next.done = false; return next; } } next.value = undefined; next.done = true; return next; }; return next.next = next; } } // Return an iterator with no values. return { next: doneResult }; } runtime.values = values; function doneResult() { return { value: undefined, done: true }; } Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { this.prev = 0; this.next = 0; this.sent = undefined; this.done = false; this.delegate = null; this.tryEntries.forEach(resetTryEntry); if (!skipTempReset) { for (var name in this) { // Not sure about the optimal order of these conditions: if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { this[name] = undefined; } } } }, stop: function stop() { this.done = true; var rootEntry = this.tryEntries[0]; var rootRecord = rootEntry.completion; if (rootRecord.type === "throw") { throw rootRecord.arg; } return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) { throw exception; } var context = this; function handle(loc, caught) { record.type = "throw"; record.arg = exception; context.next = loc; return !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; var record = entry.completion; if (entry.tryLoc === "root") { // Exception thrown outside of any try block that could handle // it, so set the completion value of the entire function to // throw the exception. return handle("end"); } if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"); var hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true); } else if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc); } } else if (hasCatch) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true); } } else if (hasFinally) { if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc); } } else { throw new Error("try statement without catch or finally"); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { // Ignore the finally entry if control is not jumping to a // location outside the try/catch block. finallyEntry = null; } var record = finallyEntry ? finallyEntry.completion : {}; record.type = type; record.arg = arg; if (finallyEntry) { this.next = finallyEntry.finallyLoc; } else { this.complete(record); } return ContinueSentinel; }, complete: function complete(record, afterLoc) { if (record.type === "throw") { throw record.arg; } if (record.type === "break" || record.type === "continue") { this.next = record.arg; } else if (record.type === "return") { this.rval = record.arg; this.next = "end"; } else if (record.type === "normal" && afterLoc) { this.next = afterLoc; } }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) { this.complete(entry.completion, entry.afterLoc); resetTryEntry(entry); return ContinueSentinel; } } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if (record.type === "throw") { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } // The context.catch method must only be called with a location // argument that corresponds to a known catch block. throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }; return ContinueSentinel; } }; }( // Among the various tricks for obtaining a reference to the global // object, this seems to be the most reliable technique that does not // use indirect eval (which violates Content Security Policy). (typeof global === "undefined" ? "undefined" : _typeof(global)) === "object" ? global : (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" ? window : (typeof self === "undefined" ? "undefined" : _typeof(self)) === "object" ? self : undefined); }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"_process":237}],42:[function(require,module,exports){ 'use strict'; module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; },{}],43:[function(require,module,exports){ 'use strict'; // 22.1.3.31 Array.prototype[@@unscopables] var UNSCOPABLES = require('./$.wks')('unscopables'), ArrayProto = Array.prototype; if (ArrayProto[UNSCOPABLES] == undefined) require('./$.hide')(ArrayProto, UNSCOPABLES, {}); module.exports = function (key) { ArrayProto[UNSCOPABLES][key] = true; }; },{"./$.hide":71,"./$.wks":123}],44:[function(require,module,exports){ 'use strict'; var isObject = require('./$.is-object'); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; },{"./$.is-object":78}],45:[function(require,module,exports){ // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) 'use strict'; var toObject = require('./$.to-object'), toIndex = require('./$.to-index'), toLength = require('./$.to-length'); module.exports = [].copyWithin || function copyWithin(target /*= 0*/, start /*= 0, end = @length*/) { var O = toObject(this), len = toLength(O.length), to = toIndex(target, len), from = toIndex(start, len), $$ = arguments, end = $$.length > 2 ? $$[2] : undefined, count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to), inc = 1; if (from < to && to < from + count) { inc = -1; from += count - 1; to += count - 1; } while (count-- > 0) { if (from in O) O[to] = O[from];else delete O[to]; to += inc; from += inc; }return O; }; },{"./$.to-index":116,"./$.to-length":119,"./$.to-object":120}],46:[function(require,module,exports){ // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 'use strict'; var toObject = require('./$.to-object'), toIndex = require('./$.to-index'), toLength = require('./$.to-length'); module.exports = [].fill || function fill(value /*, start = 0, end = @length */) { var O = toObject(this), length = toLength(O.length), $$ = arguments, $$len = $$.length, index = toIndex($$len > 1 ? $$[1] : undefined, length), end = $$len > 2 ? $$[2] : undefined, endPos = end === undefined ? length : toIndex(end, length); while (endPos > index) { O[index++] = value; }return O; }; },{"./$.to-index":116,"./$.to-length":119,"./$.to-object":120}],47:[function(require,module,exports){ 'use strict'; // false -> Array#indexOf // true -> Array#includes var toIObject = require('./$.to-iobject'), toLength = require('./$.to-length'), toIndex = require('./$.to-index'); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this), length = toLength(O.length), index = toIndex(fromIndex, length), value; // Array#includes uses SameValueZero equality algorithm if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; if (value != value) return true; // Array#toIndex ignores holes, Array#includes - not } else for (; length > index; index++) { if (IS_INCLUDES || index in O) { if (O[index] === el) return IS_INCLUDES || index; } }return !IS_INCLUDES && -1; }; }; },{"./$.to-index":116,"./$.to-iobject":118,"./$.to-length":119}],48:[function(require,module,exports){ 'use strict'; // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter // 3 -> Array#some // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex var ctx = require('./$.ctx'), IObject = require('./$.iobject'), toObject = require('./$.to-object'), toLength = require('./$.to-length'), asc = require('./$.array-species-create'); module.exports = function (TYPE) { var IS_MAP = TYPE == 1, IS_FILTER = TYPE == 2, IS_SOME = TYPE == 3, IS_EVERY = TYPE == 4, IS_FIND_INDEX = TYPE == 6, NO_HOLES = TYPE == 5 || IS_FIND_INDEX; return function ($this, callbackfn, that) { var O = toObject($this), self = IObject(O), f = ctx(callbackfn, that, 3), length = toLength(self.length), index = 0, result = IS_MAP ? asc($this, length) : IS_FILTER ? asc($this, 0) : undefined, val, res; for (; length > index; index++) { if (NO_HOLES || index in self) { val = self[index]; res = f(val, index, O); if (TYPE) { if (IS_MAP) result[index] = res; // map else if (res) switch (TYPE) { case 3: return true; // some case 5: return val; // find case 6: return index; // findIndex case 2: result.push(val); // filter } else if (IS_EVERY) return false; // every } } }return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; }; },{"./$.array-species-create":49,"./$.ctx":57,"./$.iobject":74,"./$.to-length":119,"./$.to-object":120}],49:[function(require,module,exports){ 'use strict'; // 9.4.2.3 ArraySpeciesCreate(originalArray, length) var isObject = require('./$.is-object'), isArray = require('./$.is-array'), SPECIES = require('./$.wks')('species'); module.exports = function (original, length) { var C; if (isArray(original)) { C = original.constructor; // cross-realm fallback if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; if (isObject(C)) { C = C[SPECIES]; if (C === null) C = undefined; } }return new (C === undefined ? Array : C)(length); }; },{"./$.is-array":76,"./$.is-object":78,"./$.wks":123}],50:[function(require,module,exports){ 'use strict'; // getting tag from 19.1.3.6 Object.prototype.toString() var cof = require('./$.cof'), TAG = require('./$.wks')('toStringTag') // ES3 wrong here , ARG = cof(function () { return arguments; }()) == 'Arguments'; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = (O = Object(it))[TAG]) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; },{"./$.cof":51,"./$.wks":123}],51:[function(require,module,exports){ "use strict"; var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; },{}],52:[function(require,module,exports){ 'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; var $ = require('./$'), hide = require('./$.hide'), redefineAll = require('./$.redefine-all'), ctx = require('./$.ctx'), strictNew = require('./$.strict-new'), defined = require('./$.defined'), forOf = require('./$.for-of'), $iterDefine = require('./$.iter-define'), step = require('./$.iter-step'), ID = require('./$.uid')('id'), $has = require('./$.has'), isObject = require('./$.is-object'), setSpecies = require('./$.set-species'), DESCRIPTORS = require('./$.descriptors'), isExtensible = Object.isExtensible || isObject, SIZE = DESCRIPTORS ? '_s' : 'size', id = 0; var fastKey = function fastKey(it, create) { // return primitive with prefix if (!isObject(it)) return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!$has(it, ID)) { // can't set id to frozen object if (!isExtensible(it)) return 'F'; // not necessary to add id if (!create) return 'E'; // add missing object id hide(it, ID, ++id); // return object id with prefix }return 'O' + it[ID]; }; var getEntry = function getEntry(that, key) { // fast case var index = fastKey(key), entry; if (index !== 'F') return that._i[index]; // frozen object case for (entry = that._f; entry; entry = entry.n) { if (entry.k == key) return entry; } }; module.exports = { getConstructor: function getConstructor(wrapper, NAME, IS_MAP, ADDER) { var C = wrapper(function (that, iterable) { strictNew(that, C, NAME); that._i = $.create(null); // index that._f = undefined; // first entry that._l = undefined; // last entry that[SIZE] = 0; // size if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.1.3.1 Map.prototype.clear() // 23.2.3.2 Set.prototype.clear() clear: function clear() { for (var that = this, data = that._i, entry = that._f; entry; entry = entry.n) { entry.r = true; if (entry.p) entry.p = entry.p.n = undefined; delete data[entry.i]; } that._f = that._l = undefined; that[SIZE] = 0; }, // 23.1.3.3 Map.prototype.delete(key) // 23.2.3.4 Set.prototype.delete(value) 'delete': function _delete(key) { var that = this, entry = getEntry(that, key); if (entry) { var next = entry.n, prev = entry.p; delete that._i[entry.i]; entry.r = true; if (prev) prev.n = next; if (next) next.p = prev; if (that._f == entry) that._f = next; if (that._l == entry) that._l = prev; that[SIZE]--; }return !!entry; }, // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) forEach: function forEach(callbackfn /*, that = undefined */) { var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3), entry; while (entry = entry ? entry.n : this._f) { f(entry.v, entry.k, this); // revert to the last existing entry while (entry && entry.r) { entry = entry.p; } } }, // 23.1.3.7 Map.prototype.has(key) // 23.2.3.7 Set.prototype.has(value) has: function has(key) { return !!getEntry(this, key); } }); if (DESCRIPTORS) $.setDesc(C.prototype, 'size', { get: function get() { return defined(this[SIZE]); } }); return C; }, def: function def(that, key, value) { var entry = getEntry(that, key), prev, index; // change existing entry if (entry) { entry.v = value; // create new entry } else { that._l = entry = { i: index = fastKey(key, true), // <- index k: key, // <- key v: value, // <- value p: prev = that._l, // <- previous entry n: undefined, // <- next entry r: false // <- removed }; if (!that._f) that._f = entry; if (prev) prev.n = entry; that[SIZE]++; // add to index if (index !== 'F') that._i[index] = entry; }return that; }, getEntry: getEntry, setStrong: function setStrong(C, NAME, IS_MAP) { // add .keys, .values, .entries, [@@iterator] // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 $iterDefine(C, NAME, function (iterated, kind) { this._t = iterated; // target this._k = kind; // kind this._l = undefined; // previous }, function () { var that = this, kind = that._k, entry = that._l; // revert to the last existing entry while (entry && entry.r) { entry = entry.p; } // get next entry if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { // or finish the iteration that._t = undefined; return step(1); } // return step by kind if (kind == 'keys') return step(0, entry.k); if (kind == 'values') return step(0, entry.v); return step(0, [entry.k, entry.v]); }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2 setSpecies(NAME); } }; },{"./$":86,"./$.ctx":57,"./$.defined":58,"./$.descriptors":59,"./$.for-of":67,"./$.has":70,"./$.hide":71,"./$.is-object":78,"./$.iter-define":82,"./$.iter-step":84,"./$.redefine-all":100,"./$.set-species":105,"./$.strict-new":109,"./$.uid":122}],53:[function(require,module,exports){ 'use strict'; // https://github.com/DavidBruant/Map-Set.prototype.toJSON var forOf = require('./$.for-of'), classof = require('./$.classof'); module.exports = function (NAME) { return function toJSON() { if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); var arr = []; forOf(this, false, arr.push, arr); return arr; }; }; },{"./$.classof":50,"./$.for-of":67}],54:[function(require,module,exports){ 'use strict'; var hide = require('./$.hide'), redefineAll = require('./$.redefine-all'), anObject = require('./$.an-object'), isObject = require('./$.is-object'), strictNew = require('./$.strict-new'), forOf = require('./$.for-of'), createArrayMethod = require('./$.array-methods'), $has = require('./$.has'), WEAK = require('./$.uid')('weak'), isExtensible = Object.isExtensible || isObject, arrayFind = createArrayMethod(5), arrayFindIndex = createArrayMethod(6), id = 0; // fallback for frozen keys var frozenStore = function frozenStore(that) { return that._l || (that._l = new FrozenStore()); }; var FrozenStore = function FrozenStore() { this.a = []; }; var findFrozen = function findFrozen(store, key) { return arrayFind(store.a, function (it) { return it[0] === key; }); }; FrozenStore.prototype = { get: function get(key) { var entry = findFrozen(this, key); if (entry) return entry[1]; }, has: function has(key) { return !!findFrozen(this, key); }, set: function set(key, value) { var entry = findFrozen(this, key); if (entry) entry[1] = value;else this.a.push([key, value]); }, 'delete': function _delete(key) { var index = arrayFindIndex(this.a, function (it) { return it[0] === key; }); if (~index) this.a.splice(index, 1); return !! ~index; } }; module.exports = { getConstructor: function getConstructor(wrapper, NAME, IS_MAP, ADDER) { var C = wrapper(function (that, iterable) { strictNew(that, C, NAME); that._i = id++; // collection id that._l = undefined; // leak store for frozen objects if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.3.3.2 WeakMap.prototype.delete(key) // 23.4.3.3 WeakSet.prototype.delete(value) 'delete': function _delete(key) { if (!isObject(key)) return false; if (!isExtensible(key)) return frozenStore(this)['delete'](key); return $has(key, WEAK) && $has(key[WEAK], this._i) && delete key[WEAK][this._i]; }, // 23.3.3.4 WeakMap.prototype.has(key) // 23.4.3.4 WeakSet.prototype.has(value) has: function has(key) { if (!isObject(key)) return false; if (!isExtensible(key)) return frozenStore(this).has(key); return $has(key, WEAK) && $has(key[WEAK], this._i); } }); return C; }, def: function def(that, key, value) { if (!isExtensible(anObject(key))) { frozenStore(that).set(key, value); } else { $has(key, WEAK) || hide(key, WEAK, {}); key[WEAK][that._i] = value; }return that; }, frozenStore: frozenStore, WEAK: WEAK }; },{"./$.an-object":44,"./$.array-methods":48,"./$.for-of":67,"./$.has":70,"./$.hide":71,"./$.is-object":78,"./$.redefine-all":100,"./$.strict-new":109,"./$.uid":122}],55:[function(require,module,exports){ 'use strict'; var global = require('./$.global'), $export = require('./$.export'), redefine = require('./$.redefine'), redefineAll = require('./$.redefine-all'), forOf = require('./$.for-of'), strictNew = require('./$.strict-new'), isObject = require('./$.is-object'), fails = require('./$.fails'), $iterDetect = require('./$.iter-detect'), setToStringTag = require('./$.set-to-string-tag'); module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { var Base = global[NAME], C = Base, ADDER = IS_MAP ? 'set' : 'add', proto = C && C.prototype, O = {}; var fixMethod = function fixMethod(KEY) { var fn = proto[KEY]; redefine(proto, KEY, KEY == 'delete' ? function (a) { return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'has' ? function has(a) { return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'get' ? function get(a) { return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a);return this; } : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b);return this; }); }; if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { new C().entries().next(); }))) { // create collection constructor C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); redefineAll(C.prototype, methods); } else { var instance = new C() // early implementations not supports chaining , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false , THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }) // most early implementations doesn't supports iterables, most modern - not close it correctly , ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }) // eslint-disable-line no-new // for early implementations -0 and +0 not the same , BUGGY_ZERO; if (!ACCEPT_ITERABLES) { C = wrapper(function (target, iterable) { strictNew(target, C, NAME); var that = new Base(); if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); return that; }); C.prototype = proto; proto.constructor = C; } IS_WEAK || instance.forEach(function (val, key) { BUGGY_ZERO = 1 / key === -Infinity; }); if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { fixMethod('delete'); fixMethod('has'); IS_MAP && fixMethod('get'); } if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); // weak collections should not contains .clear method if (IS_WEAK && proto.clear) delete proto.clear; } setToStringTag(C, NAME); O[NAME] = C; $export($export.G + $export.W + $export.F * (C != Base), O); if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); return C; }; },{"./$.export":62,"./$.fails":64,"./$.for-of":67,"./$.global":69,"./$.is-object":78,"./$.iter-detect":83,"./$.redefine":101,"./$.redefine-all":100,"./$.set-to-string-tag":106,"./$.strict-new":109}],56:[function(require,module,exports){ 'use strict'; var core = module.exports = { version: '1.2.6' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef },{}],57:[function(require,module,exports){ 'use strict'; // optional / simple context binding var aFunction = require('./$.a-function'); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function () /* ...args */{ return fn.apply(that, arguments); }; }; },{"./$.a-function":42}],58:[function(require,module,exports){ "use strict"; // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; },{}],59:[function(require,module,exports){ 'use strict'; // Thank's IE8 for his funny defineProperty module.exports = !require('./$.fails')(function () { return Object.defineProperty({}, 'a', { get: function get() { return 7; } }).a != 7; }); },{"./$.fails":64}],60:[function(require,module,exports){ 'use strict'; var isObject = require('./$.is-object'), document = require('./$.global').document // in old IE typeof document.createElement is 'object' , is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; },{"./$.global":69,"./$.is-object":78}],61:[function(require,module,exports){ 'use strict'; // all enumerable object keys, includes symbols var $ = require('./$'); module.exports = function (it) { var keys = $.getKeys(it), getSymbols = $.getSymbols; if (getSymbols) { var symbols = getSymbols(it), isEnum = $.isEnum, i = 0, key; while (symbols.length > i) { if (isEnum.call(it, key = symbols[i++])) keys.push(key); } } return keys; }; },{"./$":86}],62:[function(require,module,exports){ 'use strict'; var global = require('./$.global'), core = require('./$.core'), hide = require('./$.hide'), redefine = require('./$.redefine'), ctx = require('./$.ctx'), PROTOTYPE = 'prototype'; var $export = function $export(type, name, source) { var IS_FORCED = type & $export.F, IS_GLOBAL = type & $export.G, IS_STATIC = type & $export.S, IS_PROTO = type & $export.P, IS_BIND = type & $export.B, target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE], exports = IS_GLOBAL ? core : core[name] || (core[name] = {}), expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}), key, own, out, exp; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && key in target; // export native or passed out = (own ? target : source)[key]; // bind timers to global for call from export context exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // extend global if (target && !own) redefine(target, key, out); // export if (exports[key] != out) hide(exports, key, exp); if (IS_PROTO && expProto[key] != out) expProto[key] = out; } }; global.core = core; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap module.exports = $export; },{"./$.core":56,"./$.ctx":57,"./$.global":69,"./$.hide":71,"./$.redefine":101}],63:[function(require,module,exports){ 'use strict'; var MATCH = require('./$.wks')('match'); module.exports = function (KEY) { var re = /./; try { '/./'[KEY](re); } catch (e) { try { re[MATCH] = false; return !'/./'[KEY](re); } catch (f) {/* empty */} }return true; }; },{"./$.wks":123}],64:[function(require,module,exports){ "use strict"; module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; },{}],65:[function(require,module,exports){ 'use strict'; var hide = require('./$.hide'), redefine = require('./$.redefine'), fails = require('./$.fails'), defined = require('./$.defined'), wks = require('./$.wks'); module.exports = function (KEY, length, exec) { var SYMBOL = wks(KEY), original = ''[KEY]; if (fails(function () { var O = {}; O[SYMBOL] = function () { return 7; }; return ''[KEY](O) != 7; })) { redefine(String.prototype, KEY, exec(defined, SYMBOL, original)); hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) // 21.2.5.11 RegExp.prototype[@@split](string, limit) ? function (string, arg) { return original.call(string, this, arg); } // 21.2.5.6 RegExp.prototype[@@match](string) // 21.2.5.9 RegExp.prototype[@@search](string) : function (string) { return original.call(string, this); }); } }; },{"./$.defined":58,"./$.fails":64,"./$.hide":71,"./$.redefine":101,"./$.wks":123}],66:[function(require,module,exports){ 'use strict'; // 21.2.5.3 get RegExp.prototype.flags var anObject = require('./$.an-object'); module.exports = function () { var that = anObject(this), result = ''; if (that.global) result += 'g'; if (that.ignoreCase) result += 'i'; if (that.multiline) result += 'm'; if (that.unicode) result += 'u'; if (that.sticky) result += 'y'; return result; }; },{"./$.an-object":44}],67:[function(require,module,exports){ 'use strict'; var ctx = require('./$.ctx'), call = require('./$.iter-call'), isArrayIter = require('./$.is-array-iter'), anObject = require('./$.an-object'), toLength = require('./$.to-length'), getIterFn = require('./core.get-iterator-method'); module.exports = function (iterable, entries, fn, that) { var iterFn = getIterFn(iterable), f = ctx(fn, that, entries ? 2 : 1), index = 0, length, step, iterator; if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { call(iterator, f, step.value, entries); } }; },{"./$.an-object":44,"./$.ctx":57,"./$.is-array-iter":75,"./$.iter-call":80,"./$.to-length":119,"./core.get-iterator-method":124}],68:[function(require,module,exports){ 'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = require('./$.to-iobject'), getNames = require('./$').getNames, toString = {}.toString; var windowNames = (typeof window === 'undefined' ? 'undefined' : _typeof(window)) == 'object' && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function getWindowNames(it) { try { return getNames(it); } catch (e) { return windowNames.slice(); } }; module.exports.get = function getOwnPropertyNames(it) { if (windowNames && toString.call(it) == '[object Window]') return getWindowNames(it); return getNames(toIObject(it)); }; },{"./$":86,"./$.to-iobject":118}],69:[function(require,module,exports){ 'use strict'; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef },{}],70:[function(require,module,exports){ "use strict"; var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; },{}],71:[function(require,module,exports){ 'use strict'; var $ = require('./$'), createDesc = require('./$.property-desc'); module.exports = require('./$.descriptors') ? function (object, key, value) { return $.setDesc(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; },{"./$":86,"./$.descriptors":59,"./$.property-desc":99}],72:[function(require,module,exports){ 'use strict'; module.exports = require('./$.global').document && document.documentElement; },{"./$.global":69}],73:[function(require,module,exports){ "use strict"; // fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function (fn, args, that) { var un = that === undefined; switch (args.length) { case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) : fn.call(that, args[0]); case 2: return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); case 3: return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); }return fn.apply(that, args); }; },{}],74:[function(require,module,exports){ 'use strict'; // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = require('./$.cof'); module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; },{"./$.cof":51}],75:[function(require,module,exports){ 'use strict'; // check on default Array iterator var Iterators = require('./$.iterators'), ITERATOR = require('./$.wks')('iterator'), ArrayProto = Array.prototype; module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; },{"./$.iterators":85,"./$.wks":123}],76:[function(require,module,exports){ 'use strict'; // 7.2.2 IsArray(argument) var cof = require('./$.cof'); module.exports = Array.isArray || function (arg) { return cof(arg) == 'Array'; }; },{"./$.cof":51}],77:[function(require,module,exports){ 'use strict'; // 20.1.2.3 Number.isInteger(number) var isObject = require('./$.is-object'), floor = Math.floor; module.exports = function isInteger(it) { return !isObject(it) && isFinite(it) && floor(it) === it; }; },{"./$.is-object":78}],78:[function(require,module,exports){ 'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; module.exports = function (it) { return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) === 'object' ? it !== null : typeof it === 'function'; }; },{}],79:[function(require,module,exports){ 'use strict'; // 7.2.8 IsRegExp(argument) var isObject = require('./$.is-object'), cof = require('./$.cof'), MATCH = require('./$.wks')('match'); module.exports = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); }; },{"./$.cof":51,"./$.is-object":78,"./$.wks":123}],80:[function(require,module,exports){ 'use strict'; // call something on iterator step with safe closing on error var anObject = require('./$.an-object'); module.exports = function (iterator, fn, value, entries) { try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch (e) { var ret = iterator['return']; if (ret !== undefined) anObject(ret.call(iterator)); throw e; } }; },{"./$.an-object":44}],81:[function(require,module,exports){ 'use strict'; var $ = require('./$'), descriptor = require('./$.property-desc'), setToStringTag = require('./$.set-to-string-tag'), IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() require('./$.hide')(IteratorPrototype, require('./$.wks')('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = $.create(IteratorPrototype, { next: descriptor(1, next) }); setToStringTag(Constructor, NAME + ' Iterator'); }; },{"./$":86,"./$.hide":71,"./$.property-desc":99,"./$.set-to-string-tag":106,"./$.wks":123}],82:[function(require,module,exports){ 'use strict'; var LIBRARY = require('./$.library'), $export = require('./$.export'), redefine = require('./$.redefine'), hide = require('./$.hide'), has = require('./$.has'), Iterators = require('./$.iterators'), $iterCreate = require('./$.iter-create'), setToStringTag = require('./$.set-to-string-tag'), getProto = require('./$').getProto, ITERATOR = require('./$.wks')('iterator'), BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` , FF_ITERATOR = '@@iterator', KEYS = 'keys', VALUES = 'values'; var returnThis = function returnThis() { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function getMethod(kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; }return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator', DEF_VALUES = DEFAULT == VALUES, VALUES_BUG = false, proto = Base.prototype, $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT], $default = $native || getMethod(DEFAULT), methods, key; // Fix native if ($native) { var IteratorPrototype = getProto($default.call(new Base())); // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // FF fix if (!LIBRARY && has(proto, FF_ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); // fix Array#{values, @@iterator}.name in V8 / FF if (DEF_VALUES && $native.name !== VALUES) { VALUES_BUG = true; $default = function values() { return $native.call(this); }; } } // Define iterator if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if (DEFAULT) { methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: !DEF_VALUES ? $default : getMethod('entries') }; if (FORCED) for (key in methods) { if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; },{"./$":86,"./$.export":62,"./$.has":70,"./$.hide":71,"./$.iter-create":81,"./$.iterators":85,"./$.library":88,"./$.redefine":101,"./$.set-to-string-tag":106,"./$.wks":123}],83:[function(require,module,exports){ 'use strict'; var ITERATOR = require('./$.wks')('iterator'), SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function () { SAFE_CLOSING = true; }; Array.from(riter, function () { throw 2; }); } catch (e) {/* empty */} module.exports = function (exec, skipClosing) { if (!skipClosing && !SAFE_CLOSING) return false; var safe = false; try { var arr = [7], iter = arr[ITERATOR](); iter.next = function () { safe = true; }; arr[ITERATOR] = function () { return iter; }; exec(arr); } catch (e) {/* empty */} return safe; }; },{"./$.wks":123}],84:[function(require,module,exports){ "use strict"; module.exports = function (done, value) { return { value: value, done: !!done }; }; },{}],85:[function(require,module,exports){ "use strict"; module.exports = {}; },{}],86:[function(require,module,exports){ "use strict"; var $Object = Object; module.exports = { create: $Object.create, getProto: $Object.getPrototypeOf, isEnum: {}.propertyIsEnumerable, getDesc: $Object.getOwnPropertyDescriptor, setDesc: $Object.defineProperty, setDescs: $Object.defineProperties, getKeys: $Object.keys, getNames: $Object.getOwnPropertyNames, getSymbols: $Object.getOwnPropertySymbols, each: [].forEach }; },{}],87:[function(require,module,exports){ 'use strict'; var $ = require('./$'), toIObject = require('./$.to-iobject'); module.exports = function (object, el) { var O = toIObject(object), keys = $.getKeys(O), length = keys.length, index = 0, key; while (length > index) { if (O[key = keys[index++]] === el) return key; } }; },{"./$":86,"./$.to-iobject":118}],88:[function(require,module,exports){ "use strict"; module.exports = false; },{}],89:[function(require,module,exports){ "use strict"; // 20.2.2.14 Math.expm1(x) module.exports = Math.expm1 || function expm1(x) { return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; }; },{}],90:[function(require,module,exports){ "use strict"; // 20.2.2.20 Math.log1p(x) module.exports = Math.log1p || function log1p(x) { return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); }; },{}],91:[function(require,module,exports){ "use strict"; // 20.2.2.28 Math.sign(x) module.exports = Math.sign || function sign(x) { return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; }; },{}],92:[function(require,module,exports){ 'use strict'; var global = require('./$.global'), macrotask = require('./$.task').set, Observer = global.MutationObserver || global.WebKitMutationObserver, process = global.process, Promise = global.Promise, isNode = require('./$.cof')(process) == 'process', head, last, notify; var flush = function flush() { var parent, domain, fn; if (isNode && (parent = process.domain)) { process.domain = null; parent.exit(); } while (head) { domain = head.domain; fn = head.fn; if (domain) domain.enter(); fn(); // <- currently we use it only for Promise - try / catch not required if (domain) domain.exit(); head = head.next; }last = undefined; if (parent) parent.enter(); }; // Node.js if (isNode) { notify = function notify() { process.nextTick(flush); }; // browsers with MutationObserver } else if (Observer) { var toggle = 1, node = document.createTextNode(''); new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new notify = function notify() { node.data = toggle = -toggle; }; // environments with maybe non-completely correct, but existent Promise } else if (Promise && Promise.resolve) { notify = function notify() { Promise.resolve().then(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessag // - onreadystatechange // - setTimeout } else { notify = function notify() { // strange IE + webpack dev server bug - use .call(global) macrotask.call(global, flush); }; } module.exports = function asap(fn) { var task = { fn: fn, next: undefined, domain: isNode && process.domain }; if (last) last.next = task; if (!head) { head = task; notify(); }last = task; }; },{"./$.cof":51,"./$.global":69,"./$.task":115}],93:[function(require,module,exports){ 'use strict'; // 19.1.2.1 Object.assign(target, source, ...) var $ = require('./$'), toObject = require('./$.to-object'), IObject = require('./$.iobject'); // should work with symbols and should have deterministic property order (V8 bug) module.exports = require('./$.fails')(function () { var a = Object.assign, A = {}, B = {}, S = Symbol(), K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function (k) { B[k] = k; }); return a({}, A)[S] != 7 || Object.keys(a({}, B)).join('') != K; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars var T = toObject(target), $$ = arguments, $$len = $$.length, index = 1, getKeys = $.getKeys, getSymbols = $.getSymbols, isEnum = $.isEnum; while ($$len > index) { var S = IObject($$[index++]), keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S), length = keys.length, j = 0, key; while (length > j) { if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; } } return T; } : Object.assign; },{"./$":86,"./$.fails":64,"./$.iobject":74,"./$.to-object":120}],94:[function(require,module,exports){ 'use strict'; // most Object methods by ES6 should accept primitives var $export = require('./$.export'), core = require('./$.core'), fails = require('./$.fails'); module.exports = function (KEY, exec) { var fn = (core.Object || {})[KEY] || Object[KEY], exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; },{"./$.core":56,"./$.export":62,"./$.fails":64}],95:[function(require,module,exports){ 'use strict'; var $ = require('./$'), toIObject = require('./$.to-iobject'), isEnum = $.isEnum; module.exports = function (isEntries) { return function (it) { var O = toIObject(it), keys = $.getKeys(O), length = keys.length, i = 0, result = [], key; while (length > i) { if (isEnum.call(O, key = keys[i++])) { result.push(isEntries ? [key, O[key]] : O[key]); } }return result; }; }; },{"./$":86,"./$.to-iobject":118}],96:[function(require,module,exports){ 'use strict'; // all object keys, includes non-enumerable and symbols var $ = require('./$'), anObject = require('./$.an-object'), Reflect = require('./$.global').Reflect; module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { var keys = $.getNames(anObject(it)), getSymbols = $.getSymbols; return getSymbols ? keys.concat(getSymbols(it)) : keys; }; },{"./$":86,"./$.an-object":44,"./$.global":69}],97:[function(require,module,exports){ 'use strict'; var path = require('./$.path'), invoke = require('./$.invoke'), aFunction = require('./$.a-function'); module.exports = function () /* ...pargs */{ var fn = aFunction(this), length = arguments.length, pargs = Array(length), i = 0, _ = path._, holder = false; while (length > i) { if ((pargs[i] = arguments[i++]) === _) holder = true; }return function () /* ...args */{ var that = this, $$ = arguments, $$len = $$.length, j = 0, k = 0, args; if (!holder && !$$len) return invoke(fn, pargs, that); args = pargs.slice(); if (holder) for (; length > j; j++) { if (args[j] === _) args[j] = $$[k++]; }while ($$len > k) { args.push($$[k++]); }return invoke(fn, args, that); }; }; },{"./$.a-function":42,"./$.invoke":73,"./$.path":98}],98:[function(require,module,exports){ 'use strict'; module.exports = require('./$.global'); },{"./$.global":69}],99:[function(require,module,exports){ "use strict"; module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; },{}],100:[function(require,module,exports){ 'use strict'; var redefine = require('./$.redefine'); module.exports = function (target, src) { for (var key in src) { redefine(target, key, src[key]); }return target; }; },{"./$.redefine":101}],101:[function(require,module,exports){ 'use strict'; // add fake Function#toString // for correct work wrapped methods / constructors with methods like LoDash isNative var global = require('./$.global'), hide = require('./$.hide'), SRC = require('./$.uid')('src'), TO_STRING = 'toString', $toString = Function[TO_STRING], TPL = ('' + $toString).split(TO_STRING); require('./$.core').inspectSource = function (it) { return $toString.call(it); }; (module.exports = function (O, key, val, safe) { if (typeof val == 'function') { val.hasOwnProperty(SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); val.hasOwnProperty('name') || hide(val, 'name', key); } if (O === global) { O[key] = val; } else { if (!safe) delete O[key]; hide(O, key, val); } })(Function.prototype, TO_STRING, function toString() { return typeof this == 'function' && this[SRC] || $toString.call(this); }); },{"./$.core":56,"./$.global":69,"./$.hide":71,"./$.uid":122}],102:[function(require,module,exports){ "use strict"; module.exports = function (regExp, replace) { var replacer = replace === Object(replace) ? function (part) { return replace[part]; } : replace; return function (it) { return String(it).replace(regExp, replacer); }; }; },{}],103:[function(require,module,exports){ "use strict"; // 7.2.9 SameValue(x, y) module.exports = Object.is || function is(x, y) { return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; },{}],104:[function(require,module,exports){ 'use strict'; // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var getDesc = require('./$').getDesc, isObject = require('./$.is-object'), anObject = require('./$.an-object'); var check = function check(O, proto) { anObject(O); if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function (test, buggy, set) { try { set = require('./$.ctx')(Function.call, getDesc(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch (e) { buggy = true; } return function setPrototypeOf(O, proto) { check(O, proto); if (buggy) O.__proto__ = proto;else set(O, proto); return O; }; }({}, false) : undefined), check: check }; },{"./$":86,"./$.an-object":44,"./$.ctx":57,"./$.is-object":78}],105:[function(require,module,exports){ 'use strict'; var global = require('./$.global'), $ = require('./$'), DESCRIPTORS = require('./$.descriptors'), SPECIES = require('./$.wks')('species'); module.exports = function (KEY) { var C = global[KEY]; if (DESCRIPTORS && C && !C[SPECIES]) $.setDesc(C, SPECIES, { configurable: true, get: function get() { return this; } }); }; },{"./$":86,"./$.descriptors":59,"./$.global":69,"./$.wks":123}],106:[function(require,module,exports){ 'use strict'; var def = require('./$').setDesc, has = require('./$.has'), TAG = require('./$.wks')('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; },{"./$":86,"./$.has":70,"./$.wks":123}],107:[function(require,module,exports){ 'use strict'; var global = require('./$.global'), SHARED = '__core-js_shared__', store = global[SHARED] || (global[SHARED] = {}); module.exports = function (key) { return store[key] || (store[key] = {}); }; },{"./$.global":69}],108:[function(require,module,exports){ 'use strict'; // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = require('./$.an-object'), aFunction = require('./$.a-function'), SPECIES = require('./$.wks')('species'); module.exports = function (O, D) { var C = anObject(O).constructor, S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); }; },{"./$.a-function":42,"./$.an-object":44,"./$.wks":123}],109:[function(require,module,exports){ "use strict"; module.exports = function (it, Constructor, name) { if (!(it instanceof Constructor)) throw TypeError(name + ": use the 'new' operator!"); return it; }; },{}],110:[function(require,module,exports){ 'use strict'; var toInteger = require('./$.to-integer'), defined = require('./$.defined'); // true -> String#at // false -> String#codePointAt module.exports = function (TO_STRING) { return function (that, pos) { var s = String(defined(that)), i = toInteger(pos), l = s.length, a, b; if (i < 0 || i >= l) return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; },{"./$.defined":58,"./$.to-integer":117}],111:[function(require,module,exports){ 'use strict'; // helper for String#{startsWith, endsWith, includes} var isRegExp = require('./$.is-regexp'), defined = require('./$.defined'); module.exports = function (that, searchString, NAME) { if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); return String(defined(that)); }; },{"./$.defined":58,"./$.is-regexp":79}],112:[function(require,module,exports){ 'use strict'; // https://github.com/ljharb/proposal-string-pad-left-right var toLength = require('./$.to-length'), repeat = require('./$.string-repeat'), defined = require('./$.defined'); module.exports = function (that, maxLength, fillString, left) { var S = String(defined(that)), stringLength = S.length, fillStr = fillString === undefined ? ' ' : String(fillString), intMaxLength = toLength(maxLength); if (intMaxLength <= stringLength) return S; if (fillStr == '') fillStr = ' '; var fillLen = intMaxLength - stringLength, stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); return left ? stringFiller + S : S + stringFiller; }; },{"./$.defined":58,"./$.string-repeat":113,"./$.to-length":119}],113:[function(require,module,exports){ 'use strict'; var toInteger = require('./$.to-integer'), defined = require('./$.defined'); module.exports = function repeat(count) { var str = String(defined(this)), res = '', n = toInteger(count); if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); for (; n > 0; (n >>>= 1) && (str += str)) { if (n & 1) res += str; }return res; }; },{"./$.defined":58,"./$.to-integer":117}],114:[function(require,module,exports){ 'use strict'; var $export = require('./$.export'), defined = require('./$.defined'), fails = require('./$.fails'), spaces = '\t\n\u000b\f\r   ᠎    ' + '          \u2028\u2029', space = '[' + spaces + ']', non = '​…', ltrim = RegExp('^' + space + space + '*'), rtrim = RegExp(space + space + '*$'); var exporter = function exporter(KEY, exec) { var exp = {}; exp[KEY] = exec(trim); $export($export.P + $export.F * fails(function () { return !!spaces[KEY]() || non[KEY]() != non; }), 'String', exp); }; // 1 -> String#trimLeft // 2 -> String#trimRight // 3 -> String#trim var trim = exporter.trim = function (string, TYPE) { string = String(defined(string)); if (TYPE & 1) string = string.replace(ltrim, ''); if (TYPE & 2) string = string.replace(rtrim, ''); return string; }; module.exports = exporter; },{"./$.defined":58,"./$.export":62,"./$.fails":64}],115:[function(require,module,exports){ 'use strict'; var ctx = require('./$.ctx'), invoke = require('./$.invoke'), html = require('./$.html'), cel = require('./$.dom-create'), global = require('./$.global'), process = global.process, setTask = global.setImmediate, clearTask = global.clearImmediate, MessageChannel = global.MessageChannel, counter = 0, queue = {}, ONREADYSTATECHANGE = 'onreadystatechange', defer, channel, port; var run = function run() { var id = +this; if (queue.hasOwnProperty(id)) { var fn = queue[id]; delete queue[id]; fn(); } }; var listner = function listner(event) { run.call(event.data); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if (!setTask || !clearTask) { setTask = function setImmediate(fn) { var args = [], i = 1; while (arguments.length > i) { args.push(arguments[i++]); }queue[++counter] = function () { invoke(typeof fn == 'function' ? fn : Function(fn), args); }; defer(counter); return counter; }; clearTask = function clearImmediate(id) { delete queue[id]; }; // Node.js 0.8- if (require('./$.cof')(process) == 'process') { defer = function defer(id) { process.nextTick(ctx(run, id, 1)); }; // Browsers with MessageChannel, includes WebWorkers } else if (MessageChannel) { channel = new MessageChannel(); port = channel.port2; channel.port1.onmessage = listner; defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { defer = function defer(id) { global.postMessage(id + '', '*'); }; global.addEventListener('message', listner, false); // IE8- } else if (ONREADYSTATECHANGE in cel('script')) { defer = function defer(id) { html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { defer = function defer(id) { setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { set: setTask, clear: clearTask }; },{"./$.cof":51,"./$.ctx":57,"./$.dom-create":60,"./$.global":69,"./$.html":72,"./$.invoke":73}],116:[function(require,module,exports){ 'use strict'; var toInteger = require('./$.to-integer'), max = Math.max, min = Math.min; module.exports = function (index, length) { index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; },{"./$.to-integer":117}],117:[function(require,module,exports){ "use strict"; // 7.1.4 ToInteger var ceil = Math.ceil, floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; },{}],118:[function(require,module,exports){ 'use strict'; // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = require('./$.iobject'), defined = require('./$.defined'); module.exports = function (it) { return IObject(defined(it)); }; },{"./$.defined":58,"./$.iobject":74}],119:[function(require,module,exports){ 'use strict'; // 7.1.15 ToLength var toInteger = require('./$.to-integer'), min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; },{"./$.to-integer":117}],120:[function(require,module,exports){ 'use strict'; // 7.1.13 ToObject(argument) var defined = require('./$.defined'); module.exports = function (it) { return Object(defined(it)); }; },{"./$.defined":58}],121:[function(require,module,exports){ 'use strict'; // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = require('./$.is-object'); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; },{"./$.is-object":78}],122:[function(require,module,exports){ 'use strict'; var id = 0, px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; },{}],123:[function(require,module,exports){ 'use strict'; var store = require('./$.shared')('wks'), uid = require('./$.uid'), _Symbol = require('./$.global').Symbol; module.exports = function (name) { return store[name] || (store[name] = _Symbol && _Symbol[name] || (_Symbol || uid)('Symbol.' + name)); }; },{"./$.global":69,"./$.shared":107,"./$.uid":122}],124:[function(require,module,exports){ 'use strict'; var classof = require('./$.classof'), ITERATOR = require('./$.wks')('iterator'), Iterators = require('./$.iterators'); module.exports = require('./$.core').getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; },{"./$.classof":50,"./$.core":56,"./$.iterators":85,"./$.wks":123}],125:[function(require,module,exports){ 'use strict'; var $ = require('./$'), $export = require('./$.export'), DESCRIPTORS = require('./$.descriptors'), createDesc = require('./$.property-desc'), html = require('./$.html'), cel = require('./$.dom-create'), has = require('./$.has'), cof = require('./$.cof'), invoke = require('./$.invoke'), fails = require('./$.fails'), anObject = require('./$.an-object'), aFunction = require('./$.a-function'), isObject = require('./$.is-object'), toObject = require('./$.to-object'), toIObject = require('./$.to-iobject'), toInteger = require('./$.to-integer'), toIndex = require('./$.to-index'), toLength = require('./$.to-length'), IObject = require('./$.iobject'), IE_PROTO = require('./$.uid')('__proto__'), createArrayMethod = require('./$.array-methods'), arrayIndexOf = require('./$.array-includes')(false), ObjectProto = Object.prototype, ArrayProto = Array.prototype, arraySlice = ArrayProto.slice, arrayJoin = ArrayProto.join, defineProperty = $.setDesc, getOwnDescriptor = $.getDesc, defineProperties = $.setDescs, factories = {}, IE8_DOM_DEFINE; if (!DESCRIPTORS) { IE8_DOM_DEFINE = !fails(function () { return defineProperty(cel('div'), 'a', { get: function get() { return 7; } }).a != 7; }); $.setDesc = function (O, P, Attributes) { if (IE8_DOM_DEFINE) try { return defineProperty(O, P, Attributes); } catch (e) {/* empty */} if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) anObject(O)[P] = Attributes.value; return O; }; $.getDesc = function (O, P) { if (IE8_DOM_DEFINE) try { return getOwnDescriptor(O, P); } catch (e) {/* empty */} if (has(O, P)) return createDesc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]); }; $.setDescs = defineProperties = function defineProperties(O, Properties) { anObject(O); var keys = $.getKeys(Properties), length = keys.length, i = 0, P; while (length > i) { $.setDesc(O, P = keys[i++], Properties[P]); }return O; }; } $export($export.S + $export.F * !DESCRIPTORS, 'Object', { // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $.getDesc, // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) defineProperty: $.setDesc, // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) defineProperties: defineProperties }); // IE 8- don't enum bug keys var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' + 'toLocaleString,toString,valueOf').split(',') // Additional keys for getOwnPropertyNames , keys2 = keys1.concat('length', 'prototype'), keysLen1 = keys1.length; // Create object with `null` prototype: use iframe Object with cleared prototype var _createDict = function createDict() { // Thrash, waste and sodomy: IE GC bug var iframe = cel('iframe'), i = keysLen1, gt = '>', iframeDocument; iframe.style.display = 'none'; html.appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(' Right ----- .. code-block:: html