ece-docs-components 1.0.39 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_virtual/Parser.js +6 -0
- package/dist/cjs/_virtual/Parser.js.map +1 -0
- package/dist/cjs/_virtual/Tokenizer.js +6 -0
- package/dist/cjs/_virtual/Tokenizer.js.map +1 -0
- package/dist/cjs/_virtual/attributes-to-props.js +6 -0
- package/dist/cjs/_virtual/attributes-to-props.js.map +1 -0
- package/dist/cjs/_virtual/decode-codepoint.js +6 -0
- package/dist/cjs/_virtual/decode-codepoint.js.map +1 -0
- package/dist/cjs/_virtual/decode-data-html.js +6 -0
- package/dist/cjs/_virtual/decode-data-html.js.map +1 -0
- package/dist/cjs/_virtual/decode-data-html2.js +6 -0
- package/dist/cjs/_virtual/decode-data-html2.js.map +1 -0
- package/dist/cjs/_virtual/decode-data-xml.js +6 -0
- package/dist/cjs/_virtual/decode-data-xml.js.map +1 -0
- package/dist/cjs/_virtual/decode-data-xml2.js +6 -0
- package/dist/cjs/_virtual/decode-data-xml2.js.map +1 -0
- package/dist/cjs/_virtual/decode.js +6 -0
- package/dist/cjs/_virtual/decode.js.map +1 -0
- package/dist/cjs/_virtual/decode2.js +6 -0
- package/dist/cjs/_virtual/decode2.js.map +1 -0
- package/dist/cjs/_virtual/decode_codepoint.js +6 -0
- package/dist/cjs/_virtual/decode_codepoint.js.map +1 -0
- package/dist/cjs/_virtual/dom-to-react.js +6 -0
- package/dist/cjs/_virtual/dom-to-react.js.map +1 -0
- package/dist/cjs/_virtual/encode-html.js +6 -0
- package/dist/cjs/_virtual/encode-html.js.map +1 -0
- package/dist/cjs/_virtual/encode.js +6 -0
- package/dist/cjs/_virtual/encode.js.map +1 -0
- package/dist/cjs/_virtual/escape.js +6 -0
- package/dist/cjs/_virtual/escape.js.map +1 -0
- package/dist/cjs/_virtual/feeds.js +6 -0
- package/dist/cjs/_virtual/feeds.js.map +1 -0
- package/dist/cjs/_virtual/foreignNames.js +6 -0
- package/dist/cjs/_virtual/foreignNames.js.map +1 -0
- package/dist/cjs/_virtual/helpers.js +6 -0
- package/dist/cjs/_virtual/helpers.js.map +1 -0
- package/dist/cjs/_virtual/html-to-dom.js +6 -0
- package/dist/cjs/_virtual/html-to-dom.js.map +1 -0
- package/dist/cjs/_virtual/index.js +4 -4
- package/dist/cjs/_virtual/index10.js +6 -0
- package/dist/cjs/_virtual/index10.js.map +1 -0
- package/dist/cjs/_virtual/index11.js +6 -0
- package/dist/cjs/_virtual/index11.js.map +1 -0
- package/dist/cjs/_virtual/index2.js +2 -4
- package/dist/cjs/_virtual/index2.js.map +1 -1
- package/dist/cjs/_virtual/index3.js +2 -2
- package/dist/cjs/_virtual/index4.js +2 -2
- package/dist/cjs/_virtual/index5.js +2 -2
- package/dist/cjs/_virtual/index6.js +2 -2
- package/dist/cjs/_virtual/index7.js +6 -0
- package/dist/cjs/_virtual/index7.js.map +1 -0
- package/dist/cjs/_virtual/index8.js +6 -0
- package/dist/cjs/_virtual/index8.js.map +1 -0
- package/dist/cjs/_virtual/index9.js +6 -0
- package/dist/cjs/_virtual/index9.js.map +1 -0
- package/dist/cjs/_virtual/legacy.js +6 -0
- package/dist/cjs/_virtual/legacy.js.map +1 -0
- package/dist/cjs/_virtual/manipulation.js +6 -0
- package/dist/cjs/_virtual/manipulation.js.map +1 -0
- package/dist/cjs/_virtual/node.js +6 -0
- package/dist/cjs/_virtual/node.js.map +1 -0
- package/dist/cjs/_virtual/possibleStandardNamesOptimized.js +6 -0
- package/dist/cjs/_virtual/possibleStandardNamesOptimized.js.map +1 -0
- package/dist/cjs/_virtual/querying.js +6 -0
- package/dist/cjs/_virtual/querying.js.map +1 -0
- package/dist/cjs/_virtual/stringify.js +6 -0
- package/dist/cjs/_virtual/stringify.js.map +1 -0
- package/dist/cjs/_virtual/traversal.js +6 -0
- package/dist/cjs/_virtual/traversal.js.map +1 -0
- package/dist/cjs/_virtual/types.js +6 -0
- package/dist/cjs/_virtual/types.js.map +1 -0
- package/dist/cjs/_virtual/utilities.js +6 -0
- package/dist/cjs/_virtual/utilities.js.map +1 -0
- package/dist/cjs/_virtual/utilities2.js +6 -0
- package/dist/cjs/_virtual/utilities2.js.map +1 -0
- package/dist/cjs/_virtual/utilities3.js +6 -0
- package/dist/cjs/_virtual/utilities3.js.map +1 -0
- package/dist/cjs/components/Alert.js +2 -0
- package/dist/cjs/components/Alert.js.map +1 -1
- package/dist/cjs/components/Breadcrumb.js +4 -0
- package/dist/cjs/components/Breadcrumb.js.map +1 -1
- package/dist/cjs/components/Modal.js +7 -4
- package/dist/cjs/components/Modal.js.map +1 -1
- package/dist/cjs/components/Progress.js +9 -5
- package/dist/cjs/components/Progress.js.map +1 -1
- package/dist/cjs/components/Sidebar.js +1 -1
- package/dist/cjs/components/Sidebar.js.map +1 -1
- package/dist/cjs/components/StatusBar.js +7 -1
- package/dist/cjs/components/StatusBar.js.map +1 -1
- package/dist/cjs/node_modules/dom-serializer/lib/foreignNames.js +116 -0
- package/dist/cjs/node_modules/dom-serializer/lib/foreignNames.js.map +1 -0
- package/dist/cjs/node_modules/dom-serializer/lib/index.js +245 -0
- package/dist/cjs/node_modules/dom-serializer/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/domelementtype/lib/index.js +70 -0
- package/dist/cjs/node_modules/domelementtype/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/domhandler/lib/index.js +182 -0
- package/dist/cjs/node_modules/domhandler/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/domhandler/lib/node.js +488 -0
- package/dist/cjs/node_modules/domhandler/lib/node.js.map +1 -0
- package/dist/cjs/node_modules/domutils/lib/feeds.js +205 -0
- package/dist/cjs/node_modules/domutils/lib/feeds.js.map +1 -0
- package/dist/cjs/node_modules/domutils/lib/helpers.js +156 -0
- package/dist/cjs/node_modules/domutils/lib/helpers.js.map +1 -0
- package/dist/cjs/node_modules/domutils/lib/index.js +56 -0
- package/dist/cjs/node_modules/domutils/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/domutils/lib/legacy.js +183 -0
- package/dist/cjs/node_modules/domutils/lib/legacy.js.map +1 -0
- package/dist/cjs/node_modules/domutils/lib/manipulation.js +155 -0
- package/dist/cjs/node_modules/domutils/lib/manipulation.js.map +1 -0
- package/dist/cjs/node_modules/domutils/lib/querying.js +169 -0
- package/dist/cjs/node_modules/domutils/lib/querying.js.map +1 -0
- package/dist/cjs/node_modules/domutils/lib/stringify.js +107 -0
- package/dist/cjs/node_modules/domutils/lib/stringify.js.map +1 -0
- package/dist/cjs/node_modules/domutils/lib/traversal.js +139 -0
- package/dist/cjs/node_modules/domutils/lib/traversal.js.map +1 -0
- package/dist/cjs/node_modules/entities/lib/decode.js +554 -0
- package/dist/cjs/node_modules/entities/lib/decode.js.map +1 -0
- package/dist/cjs/node_modules/entities/lib/decode_codepoint.js +91 -0
- package/dist/cjs/node_modules/entities/lib/decode_codepoint.js.map +1 -0
- package/dist/cjs/node_modules/entities/lib/encode.js +92 -0
- package/dist/cjs/node_modules/entities/lib/encode.js.map +1 -0
- package/dist/cjs/node_modules/entities/lib/escape.js +137 -0
- package/dist/cjs/node_modules/entities/lib/escape.js.map +1 -0
- package/dist/cjs/node_modules/entities/lib/generated/decode-data-html.js +22 -0
- package/dist/cjs/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
- package/dist/cjs/node_modules/entities/lib/generated/decode-data-xml.js +22 -0
- package/dist/cjs/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
- package/dist/cjs/node_modules/entities/lib/generated/encode-html.js +25 -0
- package/dist/cjs/node_modules/entities/lib/generated/encode-html.js.map +1 -0
- package/dist/cjs/node_modules/entities/lib/index.js +144 -0
- package/dist/cjs/node_modules/entities/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/html-dom-parser/lib/index.js +47 -0
- package/dist/cjs/node_modules/html-dom-parser/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/html-dom-parser/lib/server/html-to-dom.js +46 -0
- package/dist/cjs/node_modules/html-dom-parser/lib/server/html-to-dom.js.map +1 -0
- package/dist/cjs/node_modules/html-dom-parser/lib/server/utilities.js +32 -0
- package/dist/cjs/node_modules/html-dom-parser/lib/server/utilities.js.map +1 -0
- package/dist/cjs/node_modules/html-dom-parser/lib/types.js +16 -0
- package/dist/cjs/node_modules/html-dom-parser/lib/types.js.map +1 -0
- package/dist/cjs/node_modules/html-react-parser/esm/index.js +10 -0
- package/dist/cjs/node_modules/html-react-parser/esm/index.js.map +1 -0
- package/dist/cjs/node_modules/html-react-parser/lib/attributes-to-props.js +89 -0
- package/dist/cjs/node_modules/html-react-parser/lib/attributes-to-props.js.map +1 -0
- package/dist/cjs/node_modules/html-react-parser/lib/dom-to-react.js +138 -0
- package/dist/cjs/node_modules/html-react-parser/lib/dom-to-react.js.map +1 -0
- package/dist/cjs/node_modules/html-react-parser/lib/index.js +55 -0
- package/dist/cjs/node_modules/html-react-parser/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/html-react-parser/lib/utilities.js +121 -0
- package/dist/cjs/node_modules/html-react-parser/lib/utilities.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/dist/commonjs/Parser.js +542 -0
- package/dist/cjs/node_modules/htmlparser2/dist/commonjs/Parser.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +805 -0
- package/dist/cjs/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/dist/commonjs/index.js +143 -0
- package/dist/cjs/node_modules/htmlparser2/dist/commonjs/index.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js +92 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js +529 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js +23 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +1 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +23 -0
- package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +1 -0
- package/dist/cjs/node_modules/inline-style-parser/cjs/index.js +274 -0
- package/dist/cjs/node_modules/inline-style-parser/cjs/index.js.map +1 -0
- package/dist/cjs/node_modules/react-property/lib/index.js +534 -0
- package/dist/cjs/node_modules/react-property/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/react-property/lib/possibleStandardNamesOptimized.js +507 -0
- package/dist/cjs/node_modules/react-property/lib/possibleStandardNamesOptimized.js.map +1 -0
- package/dist/cjs/node_modules/style-to-js/cjs/index.js +40 -0
- package/dist/cjs/node_modules/style-to-js/cjs/index.js.map +1 -0
- package/dist/cjs/node_modules/style-to-js/cjs/utilities.js +60 -0
- package/dist/cjs/node_modules/style-to-js/cjs/utilities.js.map +1 -0
- package/dist/cjs/node_modules/style-to-object/cjs/index.js +58 -0
- package/dist/cjs/node_modules/style-to-object/cjs/index.js.map +1 -0
- package/dist/esm/_virtual/Parser.js +4 -0
- package/dist/esm/_virtual/Parser.js.map +1 -0
- package/dist/esm/_virtual/Tokenizer.js +4 -0
- package/dist/esm/_virtual/Tokenizer.js.map +1 -0
- package/dist/esm/_virtual/_commonjsHelpers.js +6 -0
- package/dist/esm/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/esm/_virtual/attributes-to-props.js +4 -0
- package/dist/esm/_virtual/attributes-to-props.js.map +1 -0
- package/dist/esm/_virtual/decode-codepoint.js +4 -0
- package/dist/esm/_virtual/decode-codepoint.js.map +1 -0
- package/dist/esm/_virtual/decode-data-html.js +4 -0
- package/dist/esm/_virtual/decode-data-html.js.map +1 -0
- package/dist/esm/_virtual/decode-data-html2.js +4 -0
- package/dist/esm/_virtual/decode-data-html2.js.map +1 -0
- package/dist/esm/_virtual/decode-data-xml.js +4 -0
- package/dist/esm/_virtual/decode-data-xml.js.map +1 -0
- package/dist/esm/_virtual/decode-data-xml2.js +4 -0
- package/dist/esm/_virtual/decode-data-xml2.js.map +1 -0
- package/dist/esm/_virtual/decode.js +4 -0
- package/dist/esm/_virtual/decode.js.map +1 -0
- package/dist/esm/_virtual/decode2.js +4 -0
- package/dist/esm/_virtual/decode2.js.map +1 -0
- package/dist/esm/_virtual/decode_codepoint.js +4 -0
- package/dist/esm/_virtual/decode_codepoint.js.map +1 -0
- package/dist/esm/_virtual/dom-to-react.js +4 -0
- package/dist/esm/_virtual/dom-to-react.js.map +1 -0
- package/dist/esm/_virtual/encode-html.js +4 -0
- package/dist/esm/_virtual/encode-html.js.map +1 -0
- package/dist/esm/_virtual/encode.js +4 -0
- package/dist/esm/_virtual/encode.js.map +1 -0
- package/dist/esm/_virtual/escape.js +4 -0
- package/dist/esm/_virtual/escape.js.map +1 -0
- package/dist/esm/_virtual/feeds.js +4 -0
- package/dist/esm/_virtual/feeds.js.map +1 -0
- package/dist/esm/_virtual/foreignNames.js +4 -0
- package/dist/esm/_virtual/foreignNames.js.map +1 -0
- package/dist/esm/_virtual/helpers.js +4 -0
- package/dist/esm/_virtual/helpers.js.map +1 -0
- package/dist/esm/_virtual/html-to-dom.js +4 -0
- package/dist/esm/_virtual/html-to-dom.js.map +1 -0
- package/dist/esm/_virtual/index.js +8 -0
- package/dist/esm/_virtual/index.js.map +1 -0
- package/dist/esm/_virtual/index10.js +4 -0
- package/dist/esm/_virtual/index10.js.map +1 -0
- package/dist/esm/_virtual/index11.js +4 -0
- package/dist/esm/_virtual/index11.js.map +1 -0
- package/dist/esm/_virtual/index2.js +4 -0
- package/dist/esm/_virtual/index2.js.map +1 -0
- package/dist/esm/_virtual/index3.js +4 -0
- package/dist/esm/_virtual/index3.js.map +1 -0
- package/dist/esm/_virtual/index4.js +4 -0
- package/dist/esm/_virtual/index4.js.map +1 -0
- package/dist/esm/_virtual/index5.js +4 -0
- package/dist/esm/_virtual/index5.js.map +1 -0
- package/dist/esm/_virtual/index6.js +4 -0
- package/dist/esm/_virtual/index6.js.map +1 -0
- package/dist/esm/_virtual/index7.js +4 -0
- package/dist/esm/_virtual/index7.js.map +1 -0
- package/dist/esm/_virtual/index8.js +4 -0
- package/dist/esm/_virtual/index8.js.map +1 -0
- package/dist/esm/_virtual/index9.js +4 -0
- package/dist/esm/_virtual/index9.js.map +1 -0
- package/dist/esm/_virtual/legacy.js +4 -0
- package/dist/esm/_virtual/legacy.js.map +1 -0
- package/dist/esm/_virtual/manipulation.js +4 -0
- package/dist/esm/_virtual/manipulation.js.map +1 -0
- package/dist/esm/_virtual/node.js +4 -0
- package/dist/esm/_virtual/node.js.map +1 -0
- package/dist/esm/_virtual/possibleStandardNamesOptimized.js +4 -0
- package/dist/esm/_virtual/possibleStandardNamesOptimized.js.map +1 -0
- package/dist/esm/_virtual/querying.js +4 -0
- package/dist/esm/_virtual/querying.js.map +1 -0
- package/dist/esm/_virtual/stringify.js +4 -0
- package/dist/esm/_virtual/stringify.js.map +1 -0
- package/dist/esm/_virtual/traversal.js +4 -0
- package/dist/esm/_virtual/traversal.js.map +1 -0
- package/dist/esm/_virtual/types.js +4 -0
- package/dist/esm/_virtual/types.js.map +1 -0
- package/dist/esm/_virtual/utilities.js +4 -0
- package/dist/esm/_virtual/utilities.js.map +1 -0
- package/dist/esm/_virtual/utilities2.js +4 -0
- package/dist/esm/_virtual/utilities2.js.map +1 -0
- package/dist/esm/_virtual/utilities3.js +4 -0
- package/dist/esm/_virtual/utilities3.js.map +1 -0
- package/dist/esm/components/Alert.js +2 -0
- package/dist/esm/components/Alert.js.map +1 -1
- package/dist/esm/components/Breadcrumb.js +4 -0
- package/dist/esm/components/Breadcrumb.js.map +1 -1
- package/dist/esm/components/Modal.js +7 -4
- package/dist/esm/components/Modal.js.map +1 -1
- package/dist/esm/components/Progress.d.ts +1 -0
- package/dist/esm/components/Progress.js +9 -5
- package/dist/esm/components/Progress.js.map +1 -1
- package/dist/esm/components/Sidebar.js +1 -1
- package/dist/esm/components/Sidebar.js.map +1 -1
- package/dist/esm/components/StatusBar.js +7 -1
- package/dist/esm/components/StatusBar.js.map +1 -1
- package/dist/esm/node_modules/dom-serializer/lib/foreignNames.js +114 -0
- package/dist/esm/node_modules/dom-serializer/lib/foreignNames.js.map +1 -0
- package/dist/esm/node_modules/dom-serializer/lib/index.js +243 -0
- package/dist/esm/node_modules/dom-serializer/lib/index.js.map +1 -0
- package/dist/esm/node_modules/domelementtype/lib/index.js +68 -0
- package/dist/esm/node_modules/domelementtype/lib/index.js.map +1 -0
- package/dist/esm/node_modules/domhandler/lib/index.js +180 -0
- package/dist/esm/node_modules/domhandler/lib/index.js.map +1 -0
- package/dist/esm/node_modules/domhandler/lib/node.js +486 -0
- package/dist/esm/node_modules/domhandler/lib/node.js.map +1 -0
- package/dist/esm/node_modules/domutils/lib/feeds.js +203 -0
- package/dist/esm/node_modules/domutils/lib/feeds.js.map +1 -0
- package/dist/esm/node_modules/domutils/lib/helpers.js +154 -0
- package/dist/esm/node_modules/domutils/lib/helpers.js.map +1 -0
- package/dist/esm/node_modules/domutils/lib/index.js +54 -0
- package/dist/esm/node_modules/domutils/lib/index.js.map +1 -0
- package/dist/esm/node_modules/domutils/lib/legacy.js +181 -0
- package/dist/esm/node_modules/domutils/lib/legacy.js.map +1 -0
- package/dist/esm/node_modules/domutils/lib/manipulation.js +153 -0
- package/dist/esm/node_modules/domutils/lib/manipulation.js.map +1 -0
- package/dist/esm/node_modules/domutils/lib/querying.js +167 -0
- package/dist/esm/node_modules/domutils/lib/querying.js.map +1 -0
- package/dist/esm/node_modules/domutils/lib/stringify.js +105 -0
- package/dist/esm/node_modules/domutils/lib/stringify.js.map +1 -0
- package/dist/esm/node_modules/domutils/lib/traversal.js +137 -0
- package/dist/esm/node_modules/domutils/lib/traversal.js.map +1 -0
- package/dist/esm/node_modules/entities/lib/decode.js +552 -0
- package/dist/esm/node_modules/entities/lib/decode.js.map +1 -0
- package/dist/esm/node_modules/entities/lib/decode_codepoint.js +89 -0
- package/dist/esm/node_modules/entities/lib/decode_codepoint.js.map +1 -0
- package/dist/esm/node_modules/entities/lib/encode.js +90 -0
- package/dist/esm/node_modules/entities/lib/encode.js.map +1 -0
- package/dist/esm/node_modules/entities/lib/escape.js +135 -0
- package/dist/esm/node_modules/entities/lib/escape.js.map +1 -0
- package/dist/esm/node_modules/entities/lib/generated/decode-data-html.js +20 -0
- package/dist/esm/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
- package/dist/esm/node_modules/entities/lib/generated/decode-data-xml.js +20 -0
- package/dist/esm/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
- package/dist/esm/node_modules/entities/lib/generated/encode-html.js +23 -0
- package/dist/esm/node_modules/entities/lib/generated/encode-html.js.map +1 -0
- package/dist/esm/node_modules/entities/lib/index.js +142 -0
- package/dist/esm/node_modules/entities/lib/index.js.map +1 -0
- package/dist/esm/node_modules/html-dom-parser/lib/index.js +45 -0
- package/dist/esm/node_modules/html-dom-parser/lib/index.js.map +1 -0
- package/dist/esm/node_modules/html-dom-parser/lib/server/html-to-dom.js +44 -0
- package/dist/esm/node_modules/html-dom-parser/lib/server/html-to-dom.js.map +1 -0
- package/dist/esm/node_modules/html-dom-parser/lib/server/utilities.js +30 -0
- package/dist/esm/node_modules/html-dom-parser/lib/server/utilities.js.map +1 -0
- package/dist/esm/node_modules/html-dom-parser/lib/types.js +14 -0
- package/dist/esm/node_modules/html-dom-parser/lib/types.js.map +1 -0
- package/dist/esm/node_modules/html-react-parser/esm/index.js +6 -0
- package/dist/esm/node_modules/html-react-parser/esm/index.js.map +1 -0
- package/dist/esm/node_modules/html-react-parser/lib/attributes-to-props.js +87 -0
- package/dist/esm/node_modules/html-react-parser/lib/attributes-to-props.js.map +1 -0
- package/dist/esm/node_modules/html-react-parser/lib/dom-to-react.js +136 -0
- package/dist/esm/node_modules/html-react-parser/lib/dom-to-react.js.map +1 -0
- package/dist/esm/node_modules/html-react-parser/lib/index.js +53 -0
- package/dist/esm/node_modules/html-react-parser/lib/index.js.map +1 -0
- package/dist/esm/node_modules/html-react-parser/lib/utilities.js +119 -0
- package/dist/esm/node_modules/html-react-parser/lib/utilities.js.map +1 -0
- package/dist/esm/node_modules/htmlparser2/dist/commonjs/Parser.js +540 -0
- package/dist/esm/node_modules/htmlparser2/dist/commonjs/Parser.js.map +1 -0
- package/dist/esm/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +803 -0
- package/dist/esm/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +1 -0
- package/dist/esm/node_modules/htmlparser2/dist/commonjs/index.js +141 -0
- package/dist/esm/node_modules/htmlparser2/dist/commonjs/index.js.map +1 -0
- package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js +90 -0
- package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js.map +1 -0
- package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js +527 -0
- package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js.map +1 -0
- package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js +21 -0
- package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +1 -0
- package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +21 -0
- package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +1 -0
- package/dist/esm/node_modules/inline-style-parser/cjs/index.js +272 -0
- package/dist/esm/node_modules/inline-style-parser/cjs/index.js.map +1 -0
- package/dist/esm/node_modules/react-property/lib/index.js +532 -0
- package/dist/esm/node_modules/react-property/lib/index.js.map +1 -0
- package/dist/esm/node_modules/react-property/lib/possibleStandardNamesOptimized.js +505 -0
- package/dist/esm/node_modules/react-property/lib/possibleStandardNamesOptimized.js.map +1 -0
- package/dist/esm/node_modules/style-to-js/cjs/index.js +38 -0
- package/dist/esm/node_modules/style-to-js/cjs/index.js.map +1 -0
- package/dist/esm/node_modules/style-to-js/cjs/utilities.js +58 -0
- package/dist/esm/node_modules/style-to-js/cjs/utilities.js.map +1 -0
- package/dist/esm/node_modules/style-to-object/cjs/index.js +56 -0
- package/dist/esm/node_modules/style-to-object/cjs/index.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var feeds = require('../../../_virtual/feeds.js');
|
|
4
|
+
var stringify = require('./stringify.js');
|
|
5
|
+
var legacy = require('./legacy.js');
|
|
6
|
+
|
|
7
|
+
var hasRequiredFeeds;
|
|
8
|
+
|
|
9
|
+
function requireFeeds () {
|
|
10
|
+
if (hasRequiredFeeds) return feeds.__exports;
|
|
11
|
+
hasRequiredFeeds = 1;
|
|
12
|
+
Object.defineProperty(feeds.__exports, "__esModule", { value: true });
|
|
13
|
+
feeds.__exports.getFeed = getFeed;
|
|
14
|
+
var stringify_js_1 = /*@__PURE__*/ stringify.__require();
|
|
15
|
+
var legacy_js_1 = /*@__PURE__*/ legacy.__require();
|
|
16
|
+
/**
|
|
17
|
+
* Get the feed object from the root of a DOM tree.
|
|
18
|
+
*
|
|
19
|
+
* @category Feeds
|
|
20
|
+
* @param doc - The DOM to to extract the feed from.
|
|
21
|
+
* @returns The feed.
|
|
22
|
+
*/
|
|
23
|
+
function getFeed(doc) {
|
|
24
|
+
var feedRoot = getOneElement(isValidFeed, doc);
|
|
25
|
+
return !feedRoot
|
|
26
|
+
? null
|
|
27
|
+
: feedRoot.name === "feed"
|
|
28
|
+
? getAtomFeed(feedRoot)
|
|
29
|
+
: getRssFeed(feedRoot);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Parse an Atom feed.
|
|
33
|
+
*
|
|
34
|
+
* @param feedRoot The root of the feed.
|
|
35
|
+
* @returns The parsed feed.
|
|
36
|
+
*/
|
|
37
|
+
function getAtomFeed(feedRoot) {
|
|
38
|
+
var _a;
|
|
39
|
+
var childs = feedRoot.children;
|
|
40
|
+
var feed = {
|
|
41
|
+
type: "atom",
|
|
42
|
+
items: (0, legacy_js_1.getElementsByTagName)("entry", childs).map(function (item) {
|
|
43
|
+
var _a;
|
|
44
|
+
var children = item.children;
|
|
45
|
+
var entry = { media: getMediaElements(children) };
|
|
46
|
+
addConditionally(entry, "id", "id", children);
|
|
47
|
+
addConditionally(entry, "title", "title", children);
|
|
48
|
+
var href = (_a = getOneElement("link", children)) === null || _a === void 0 ? void 0 : _a.attribs["href"];
|
|
49
|
+
if (href) {
|
|
50
|
+
entry.link = href;
|
|
51
|
+
}
|
|
52
|
+
var description = fetch("summary", children) || fetch("content", children);
|
|
53
|
+
if (description) {
|
|
54
|
+
entry.description = description;
|
|
55
|
+
}
|
|
56
|
+
var pubDate = fetch("updated", children);
|
|
57
|
+
if (pubDate) {
|
|
58
|
+
entry.pubDate = new Date(pubDate);
|
|
59
|
+
}
|
|
60
|
+
return entry;
|
|
61
|
+
}),
|
|
62
|
+
};
|
|
63
|
+
addConditionally(feed, "id", "id", childs);
|
|
64
|
+
addConditionally(feed, "title", "title", childs);
|
|
65
|
+
var href = (_a = getOneElement("link", childs)) === null || _a === void 0 ? void 0 : _a.attribs["href"];
|
|
66
|
+
if (href) {
|
|
67
|
+
feed.link = href;
|
|
68
|
+
}
|
|
69
|
+
addConditionally(feed, "description", "subtitle", childs);
|
|
70
|
+
var updated = fetch("updated", childs);
|
|
71
|
+
if (updated) {
|
|
72
|
+
feed.updated = new Date(updated);
|
|
73
|
+
}
|
|
74
|
+
addConditionally(feed, "author", "email", childs, true);
|
|
75
|
+
return feed;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Parse a RSS feed.
|
|
79
|
+
*
|
|
80
|
+
* @param feedRoot The root of the feed.
|
|
81
|
+
* @returns The parsed feed.
|
|
82
|
+
*/
|
|
83
|
+
function getRssFeed(feedRoot) {
|
|
84
|
+
var _a, _b;
|
|
85
|
+
var childs = (_b = (_a = getOneElement("channel", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];
|
|
86
|
+
var feed = {
|
|
87
|
+
type: feedRoot.name.substr(0, 3),
|
|
88
|
+
id: "",
|
|
89
|
+
items: (0, legacy_js_1.getElementsByTagName)("item", feedRoot.children).map(function (item) {
|
|
90
|
+
var children = item.children;
|
|
91
|
+
var entry = { media: getMediaElements(children) };
|
|
92
|
+
addConditionally(entry, "id", "guid", children);
|
|
93
|
+
addConditionally(entry, "title", "title", children);
|
|
94
|
+
addConditionally(entry, "link", "link", children);
|
|
95
|
+
addConditionally(entry, "description", "description", children);
|
|
96
|
+
var pubDate = fetch("pubDate", children) || fetch("dc:date", children);
|
|
97
|
+
if (pubDate)
|
|
98
|
+
entry.pubDate = new Date(pubDate);
|
|
99
|
+
return entry;
|
|
100
|
+
}),
|
|
101
|
+
};
|
|
102
|
+
addConditionally(feed, "title", "title", childs);
|
|
103
|
+
addConditionally(feed, "link", "link", childs);
|
|
104
|
+
addConditionally(feed, "description", "description", childs);
|
|
105
|
+
var updated = fetch("lastBuildDate", childs);
|
|
106
|
+
if (updated) {
|
|
107
|
+
feed.updated = new Date(updated);
|
|
108
|
+
}
|
|
109
|
+
addConditionally(feed, "author", "managingEditor", childs, true);
|
|
110
|
+
return feed;
|
|
111
|
+
}
|
|
112
|
+
var MEDIA_KEYS_STRING = ["url", "type", "lang"];
|
|
113
|
+
var MEDIA_KEYS_INT = [
|
|
114
|
+
"fileSize",
|
|
115
|
+
"bitrate",
|
|
116
|
+
"framerate",
|
|
117
|
+
"samplingrate",
|
|
118
|
+
"channels",
|
|
119
|
+
"duration",
|
|
120
|
+
"height",
|
|
121
|
+
"width",
|
|
122
|
+
];
|
|
123
|
+
/**
|
|
124
|
+
* Get all media elements of a feed item.
|
|
125
|
+
*
|
|
126
|
+
* @param where Nodes to search in.
|
|
127
|
+
* @returns Media elements.
|
|
128
|
+
*/
|
|
129
|
+
function getMediaElements(where) {
|
|
130
|
+
return (0, legacy_js_1.getElementsByTagName)("media:content", where).map(function (elem) {
|
|
131
|
+
var attribs = elem.attribs;
|
|
132
|
+
var media = {
|
|
133
|
+
medium: attribs["medium"],
|
|
134
|
+
isDefault: !!attribs["isDefault"],
|
|
135
|
+
};
|
|
136
|
+
for (var _i = 0, MEDIA_KEYS_STRING_1 = MEDIA_KEYS_STRING; _i < MEDIA_KEYS_STRING_1.length; _i++) {
|
|
137
|
+
var attrib = MEDIA_KEYS_STRING_1[_i];
|
|
138
|
+
if (attribs[attrib]) {
|
|
139
|
+
media[attrib] = attribs[attrib];
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
for (var _a = 0, MEDIA_KEYS_INT_1 = MEDIA_KEYS_INT; _a < MEDIA_KEYS_INT_1.length; _a++) {
|
|
143
|
+
var attrib = MEDIA_KEYS_INT_1[_a];
|
|
144
|
+
if (attribs[attrib]) {
|
|
145
|
+
media[attrib] = parseInt(attribs[attrib], 10);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (attribs["expression"]) {
|
|
149
|
+
media.expression = attribs["expression"];
|
|
150
|
+
}
|
|
151
|
+
return media;
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Get one element by tag name.
|
|
156
|
+
*
|
|
157
|
+
* @param tagName Tag name to look for
|
|
158
|
+
* @param node Node to search in
|
|
159
|
+
* @returns The element or null
|
|
160
|
+
*/
|
|
161
|
+
function getOneElement(tagName, node) {
|
|
162
|
+
return (0, legacy_js_1.getElementsByTagName)(tagName, node, true, 1)[0];
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Get the text content of an element with a certain tag name.
|
|
166
|
+
*
|
|
167
|
+
* @param tagName Tag name to look for.
|
|
168
|
+
* @param where Node to search in.
|
|
169
|
+
* @param recurse Whether to recurse into child nodes.
|
|
170
|
+
* @returns The text content of the element.
|
|
171
|
+
*/
|
|
172
|
+
function fetch(tagName, where, recurse) {
|
|
173
|
+
if (recurse === void 0) { recurse = false; }
|
|
174
|
+
return (0, stringify_js_1.textContent)((0, legacy_js_1.getElementsByTagName)(tagName, where, recurse, 1)).trim();
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Adds a property to an object if it has a value.
|
|
178
|
+
*
|
|
179
|
+
* @param obj Object to be extended
|
|
180
|
+
* @param prop Property name
|
|
181
|
+
* @param tagName Tag name that contains the conditionally added property
|
|
182
|
+
* @param where Element to search for the property
|
|
183
|
+
* @param recurse Whether to recurse into child nodes.
|
|
184
|
+
*/
|
|
185
|
+
function addConditionally(obj, prop, tagName, where, recurse) {
|
|
186
|
+
if (recurse === void 0) { recurse = false; }
|
|
187
|
+
var val = fetch(tagName, where, recurse);
|
|
188
|
+
if (val)
|
|
189
|
+
obj[prop] = val;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Checks if an element is a feed root node.
|
|
193
|
+
*
|
|
194
|
+
* @param value The name of the element to check.
|
|
195
|
+
* @returns Whether an element is a feed root node.
|
|
196
|
+
*/
|
|
197
|
+
function isValidFeed(value) {
|
|
198
|
+
return value === "rss" || value === "feed" || value === "rdf:RDF";
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return feeds.__exports;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
exports.__require = requireFeeds;
|
|
205
|
+
//# sourceMappingURL=feeds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feeds.js","sources":["../../../../../node_modules/domutils/lib/feeds.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getFeed = getFeed;\nvar stringify_js_1 = require(\"./stringify.js\");\nvar legacy_js_1 = require(\"./legacy.js\");\n/**\n * Get the feed object from the root of a DOM tree.\n *\n * @category Feeds\n * @param doc - The DOM to to extract the feed from.\n * @returns The feed.\n */\nfunction getFeed(doc) {\n var feedRoot = getOneElement(isValidFeed, doc);\n return !feedRoot\n ? null\n : feedRoot.name === \"feed\"\n ? getAtomFeed(feedRoot)\n : getRssFeed(feedRoot);\n}\n/**\n * Parse an Atom feed.\n *\n * @param feedRoot The root of the feed.\n * @returns The parsed feed.\n */\nfunction getAtomFeed(feedRoot) {\n var _a;\n var childs = feedRoot.children;\n var feed = {\n type: \"atom\",\n items: (0, legacy_js_1.getElementsByTagName)(\"entry\", childs).map(function (item) {\n var _a;\n var children = item.children;\n var entry = { media: getMediaElements(children) };\n addConditionally(entry, \"id\", \"id\", children);\n addConditionally(entry, \"title\", \"title\", children);\n var href = (_a = getOneElement(\"link\", children)) === null || _a === void 0 ? void 0 : _a.attribs[\"href\"];\n if (href) {\n entry.link = href;\n }\n var description = fetch(\"summary\", children) || fetch(\"content\", children);\n if (description) {\n entry.description = description;\n }\n var pubDate = fetch(\"updated\", children);\n if (pubDate) {\n entry.pubDate = new Date(pubDate);\n }\n return entry;\n }),\n };\n addConditionally(feed, \"id\", \"id\", childs);\n addConditionally(feed, \"title\", \"title\", childs);\n var href = (_a = getOneElement(\"link\", childs)) === null || _a === void 0 ? void 0 : _a.attribs[\"href\"];\n if (href) {\n feed.link = href;\n }\n addConditionally(feed, \"description\", \"subtitle\", childs);\n var updated = fetch(\"updated\", childs);\n if (updated) {\n feed.updated = new Date(updated);\n }\n addConditionally(feed, \"author\", \"email\", childs, true);\n return feed;\n}\n/**\n * Parse a RSS feed.\n *\n * @param feedRoot The root of the feed.\n * @returns The parsed feed.\n */\nfunction getRssFeed(feedRoot) {\n var _a, _b;\n var childs = (_b = (_a = getOneElement(\"channel\", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];\n var feed = {\n type: feedRoot.name.substr(0, 3),\n id: \"\",\n items: (0, legacy_js_1.getElementsByTagName)(\"item\", feedRoot.children).map(function (item) {\n var children = item.children;\n var entry = { media: getMediaElements(children) };\n addConditionally(entry, \"id\", \"guid\", children);\n addConditionally(entry, \"title\", \"title\", children);\n addConditionally(entry, \"link\", \"link\", children);\n addConditionally(entry, \"description\", \"description\", children);\n var pubDate = fetch(\"pubDate\", children) || fetch(\"dc:date\", children);\n if (pubDate)\n entry.pubDate = new Date(pubDate);\n return entry;\n }),\n };\n addConditionally(feed, \"title\", \"title\", childs);\n addConditionally(feed, \"link\", \"link\", childs);\n addConditionally(feed, \"description\", \"description\", childs);\n var updated = fetch(\"lastBuildDate\", childs);\n if (updated) {\n feed.updated = new Date(updated);\n }\n addConditionally(feed, \"author\", \"managingEditor\", childs, true);\n return feed;\n}\nvar MEDIA_KEYS_STRING = [\"url\", \"type\", \"lang\"];\nvar MEDIA_KEYS_INT = [\n \"fileSize\",\n \"bitrate\",\n \"framerate\",\n \"samplingrate\",\n \"channels\",\n \"duration\",\n \"height\",\n \"width\",\n];\n/**\n * Get all media elements of a feed item.\n *\n * @param where Nodes to search in.\n * @returns Media elements.\n */\nfunction getMediaElements(where) {\n return (0, legacy_js_1.getElementsByTagName)(\"media:content\", where).map(function (elem) {\n var attribs = elem.attribs;\n var media = {\n medium: attribs[\"medium\"],\n isDefault: !!attribs[\"isDefault\"],\n };\n for (var _i = 0, MEDIA_KEYS_STRING_1 = MEDIA_KEYS_STRING; _i < MEDIA_KEYS_STRING_1.length; _i++) {\n var attrib = MEDIA_KEYS_STRING_1[_i];\n if (attribs[attrib]) {\n media[attrib] = attribs[attrib];\n }\n }\n for (var _a = 0, MEDIA_KEYS_INT_1 = MEDIA_KEYS_INT; _a < MEDIA_KEYS_INT_1.length; _a++) {\n var attrib = MEDIA_KEYS_INT_1[_a];\n if (attribs[attrib]) {\n media[attrib] = parseInt(attribs[attrib], 10);\n }\n }\n if (attribs[\"expression\"]) {\n media.expression = attribs[\"expression\"];\n }\n return media;\n });\n}\n/**\n * Get one element by tag name.\n *\n * @param tagName Tag name to look for\n * @param node Node to search in\n * @returns The element or null\n */\nfunction getOneElement(tagName, node) {\n return (0, legacy_js_1.getElementsByTagName)(tagName, node, true, 1)[0];\n}\n/**\n * Get the text content of an element with a certain tag name.\n *\n * @param tagName Tag name to look for.\n * @param where Node to search in.\n * @param recurse Whether to recurse into child nodes.\n * @returns The text content of the element.\n */\nfunction fetch(tagName, where, recurse) {\n if (recurse === void 0) { recurse = false; }\n return (0, stringify_js_1.textContent)((0, legacy_js_1.getElementsByTagName)(tagName, where, recurse, 1)).trim();\n}\n/**\n * Adds a property to an object if it has a value.\n *\n * @param obj Object to be extended\n * @param prop Property name\n * @param tagName Tag name that contains the conditionally added property\n * @param where Element to search for the property\n * @param recurse Whether to recurse into child nodes.\n */\nfunction addConditionally(obj, prop, tagName, where, recurse) {\n if (recurse === void 0) { recurse = false; }\n var val = fetch(tagName, where, recurse);\n if (val)\n obj[prop] = val;\n}\n/**\n * Checks if an element is a feed root node.\n *\n * @param value The name of the element to check.\n * @returns Whether an element is a feed root node.\n */\nfunction isValidFeed(value) {\n return value === \"rss\" || value === \"feed\" || value === \"rdf:RDF\";\n}\n//# sourceMappingURL=feeds.js.map"],"names":["feeds","require$$0","require$$1"],"mappings":";;;;;;;;;;;AACA,CAAA,MAAM,CAAC,cAAc,CAACA,eAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,CAAAA,eAAA,CAAA,OAAe,GAAG,OAAO;CACzB,IAAI,cAAc,iBAAGC,mBAAA,EAAyB;CAC9C,IAAI,WAAW,iBAAGC,gBAAA,EAAsB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;CACA,SAAS,OAAO,CAAC,GAAG,EAAE;KAClB,IAAI,QAAQ,GAAG,aAAa,CAAC,WAAW,EAAE,GAAG,CAAC;AAClD,KAAI,OAAO,CAAC;WACF;WACA,QAAQ,CAAC,IAAI,KAAK;eACd,WAAW,CAAC,QAA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A;AACA;AACA;AACA;AACA;AACA;CACA,SAAS,WAAW,CAAC,KAAK,EAAE;KACxB,OAAO,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,SAAS;AACrE,CAAA;AACA;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var helpers = require('../../../_virtual/helpers.js');
|
|
4
|
+
var index = require('../../domhandler/lib/index.js');
|
|
5
|
+
|
|
6
|
+
var hasRequiredHelpers;
|
|
7
|
+
|
|
8
|
+
function requireHelpers () {
|
|
9
|
+
if (hasRequiredHelpers) return helpers.__exports;
|
|
10
|
+
hasRequiredHelpers = 1;
|
|
11
|
+
Object.defineProperty(helpers.__exports, "__esModule", { value: true });
|
|
12
|
+
helpers.__exports.DocumentPosition = void 0;
|
|
13
|
+
helpers.__exports.removeSubsets = removeSubsets;
|
|
14
|
+
helpers.__exports.compareDocumentPosition = compareDocumentPosition;
|
|
15
|
+
helpers.__exports.uniqueSort = uniqueSort;
|
|
16
|
+
var domhandler_1 = /*@__PURE__*/ index.__require();
|
|
17
|
+
/**
|
|
18
|
+
* Given an array of nodes, remove any member that is contained by another
|
|
19
|
+
* member.
|
|
20
|
+
*
|
|
21
|
+
* @category Helpers
|
|
22
|
+
* @param nodes Nodes to filter.
|
|
23
|
+
* @returns Remaining nodes that aren't contained by other nodes.
|
|
24
|
+
*/
|
|
25
|
+
function removeSubsets(nodes) {
|
|
26
|
+
var idx = nodes.length;
|
|
27
|
+
/*
|
|
28
|
+
* Check if each node (or one of its ancestors) is already contained in the
|
|
29
|
+
* array.
|
|
30
|
+
*/
|
|
31
|
+
while (--idx >= 0) {
|
|
32
|
+
var node = nodes[idx];
|
|
33
|
+
/*
|
|
34
|
+
* Remove the node if it is not unique.
|
|
35
|
+
* We are going through the array from the end, so we only
|
|
36
|
+
* have to check nodes that preceed the node under consideration in the array.
|
|
37
|
+
*/
|
|
38
|
+
if (idx > 0 && nodes.lastIndexOf(node, idx - 1) >= 0) {
|
|
39
|
+
nodes.splice(idx, 1);
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
for (var ancestor = node.parent; ancestor; ancestor = ancestor.parent) {
|
|
43
|
+
if (nodes.includes(ancestor)) {
|
|
44
|
+
nodes.splice(idx, 1);
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return nodes;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* @category Helpers
|
|
53
|
+
* @see {@link http://dom.spec.whatwg.org/#dom-node-comparedocumentposition}
|
|
54
|
+
*/
|
|
55
|
+
var DocumentPosition;
|
|
56
|
+
(function (DocumentPosition) {
|
|
57
|
+
DocumentPosition[DocumentPosition["DISCONNECTED"] = 1] = "DISCONNECTED";
|
|
58
|
+
DocumentPosition[DocumentPosition["PRECEDING"] = 2] = "PRECEDING";
|
|
59
|
+
DocumentPosition[DocumentPosition["FOLLOWING"] = 4] = "FOLLOWING";
|
|
60
|
+
DocumentPosition[DocumentPosition["CONTAINS"] = 8] = "CONTAINS";
|
|
61
|
+
DocumentPosition[DocumentPosition["CONTAINED_BY"] = 16] = "CONTAINED_BY";
|
|
62
|
+
})(DocumentPosition || (helpers.__exports.DocumentPosition = DocumentPosition = {}));
|
|
63
|
+
/**
|
|
64
|
+
* Compare the position of one node against another node in any other document,
|
|
65
|
+
* returning a bitmask with the values from {@link DocumentPosition}.
|
|
66
|
+
*
|
|
67
|
+
* Document order:
|
|
68
|
+
* > There is an ordering, document order, defined on all the nodes in the
|
|
69
|
+
* > document corresponding to the order in which the first character of the
|
|
70
|
+
* > XML representation of each node occurs in the XML representation of the
|
|
71
|
+
* > document after expansion of general entities. Thus, the document element
|
|
72
|
+
* > node will be the first node. Element nodes occur before their children.
|
|
73
|
+
* > Thus, document order orders element nodes in order of the occurrence of
|
|
74
|
+
* > their start-tag in the XML (after expansion of entities). The attribute
|
|
75
|
+
* > nodes of an element occur after the element and before its children. The
|
|
76
|
+
* > relative order of attribute nodes is implementation-dependent.
|
|
77
|
+
*
|
|
78
|
+
* Source:
|
|
79
|
+
* http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order
|
|
80
|
+
*
|
|
81
|
+
* @category Helpers
|
|
82
|
+
* @param nodeA The first node to use in the comparison
|
|
83
|
+
* @param nodeB The second node to use in the comparison
|
|
84
|
+
* @returns A bitmask describing the input nodes' relative position.
|
|
85
|
+
*
|
|
86
|
+
* See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for
|
|
87
|
+
* a description of these values.
|
|
88
|
+
*/
|
|
89
|
+
function compareDocumentPosition(nodeA, nodeB) {
|
|
90
|
+
var aParents = [];
|
|
91
|
+
var bParents = [];
|
|
92
|
+
if (nodeA === nodeB) {
|
|
93
|
+
return 0;
|
|
94
|
+
}
|
|
95
|
+
var current = (0, domhandler_1.hasChildren)(nodeA) ? nodeA : nodeA.parent;
|
|
96
|
+
while (current) {
|
|
97
|
+
aParents.unshift(current);
|
|
98
|
+
current = current.parent;
|
|
99
|
+
}
|
|
100
|
+
current = (0, domhandler_1.hasChildren)(nodeB) ? nodeB : nodeB.parent;
|
|
101
|
+
while (current) {
|
|
102
|
+
bParents.unshift(current);
|
|
103
|
+
current = current.parent;
|
|
104
|
+
}
|
|
105
|
+
var maxIdx = Math.min(aParents.length, bParents.length);
|
|
106
|
+
var idx = 0;
|
|
107
|
+
while (idx < maxIdx && aParents[idx] === bParents[idx]) {
|
|
108
|
+
idx++;
|
|
109
|
+
}
|
|
110
|
+
if (idx === 0) {
|
|
111
|
+
return DocumentPosition.DISCONNECTED;
|
|
112
|
+
}
|
|
113
|
+
var sharedParent = aParents[idx - 1];
|
|
114
|
+
var siblings = sharedParent.children;
|
|
115
|
+
var aSibling = aParents[idx];
|
|
116
|
+
var bSibling = bParents[idx];
|
|
117
|
+
if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {
|
|
118
|
+
if (sharedParent === nodeB) {
|
|
119
|
+
return DocumentPosition.FOLLOWING | DocumentPosition.CONTAINED_BY;
|
|
120
|
+
}
|
|
121
|
+
return DocumentPosition.FOLLOWING;
|
|
122
|
+
}
|
|
123
|
+
if (sharedParent === nodeA) {
|
|
124
|
+
return DocumentPosition.PRECEDING | DocumentPosition.CONTAINS;
|
|
125
|
+
}
|
|
126
|
+
return DocumentPosition.PRECEDING;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Sort an array of nodes based on their relative position in the document,
|
|
130
|
+
* removing any duplicate nodes. If the array contains nodes that do not belong
|
|
131
|
+
* to the same document, sort order is unspecified.
|
|
132
|
+
*
|
|
133
|
+
* @category Helpers
|
|
134
|
+
* @param nodes Array of DOM nodes.
|
|
135
|
+
* @returns Collection of unique nodes, sorted in document order.
|
|
136
|
+
*/
|
|
137
|
+
function uniqueSort(nodes) {
|
|
138
|
+
nodes = nodes.filter(function (node, i, arr) { return !arr.includes(node, i + 1); });
|
|
139
|
+
nodes.sort(function (a, b) {
|
|
140
|
+
var relative = compareDocumentPosition(a, b);
|
|
141
|
+
if (relative & DocumentPosition.PRECEDING) {
|
|
142
|
+
return -1;
|
|
143
|
+
}
|
|
144
|
+
else if (relative & DocumentPosition.FOLLOWING) {
|
|
145
|
+
return 1;
|
|
146
|
+
}
|
|
147
|
+
return 0;
|
|
148
|
+
});
|
|
149
|
+
return nodes;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return helpers.__exports;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
exports.__require = requireHelpers;
|
|
156
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":["../../../../../node_modules/domutils/lib/helpers.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DocumentPosition = void 0;\nexports.removeSubsets = removeSubsets;\nexports.compareDocumentPosition = compareDocumentPosition;\nexports.uniqueSort = uniqueSort;\nvar domhandler_1 = require(\"domhandler\");\n/**\n * Given an array of nodes, remove any member that is contained by another\n * member.\n *\n * @category Helpers\n * @param nodes Nodes to filter.\n * @returns Remaining nodes that aren't contained by other nodes.\n */\nfunction removeSubsets(nodes) {\n var idx = nodes.length;\n /*\n * Check if each node (or one of its ancestors) is already contained in the\n * array.\n */\n while (--idx >= 0) {\n var node = nodes[idx];\n /*\n * Remove the node if it is not unique.\n * We are going through the array from the end, so we only\n * have to check nodes that preceed the node under consideration in the array.\n */\n if (idx > 0 && nodes.lastIndexOf(node, idx - 1) >= 0) {\n nodes.splice(idx, 1);\n continue;\n }\n for (var ancestor = node.parent; ancestor; ancestor = ancestor.parent) {\n if (nodes.includes(ancestor)) {\n nodes.splice(idx, 1);\n break;\n }\n }\n }\n return nodes;\n}\n/**\n * @category Helpers\n * @see {@link http://dom.spec.whatwg.org/#dom-node-comparedocumentposition}\n */\nvar DocumentPosition;\n(function (DocumentPosition) {\n DocumentPosition[DocumentPosition[\"DISCONNECTED\"] = 1] = \"DISCONNECTED\";\n DocumentPosition[DocumentPosition[\"PRECEDING\"] = 2] = \"PRECEDING\";\n DocumentPosition[DocumentPosition[\"FOLLOWING\"] = 4] = \"FOLLOWING\";\n DocumentPosition[DocumentPosition[\"CONTAINS\"] = 8] = \"CONTAINS\";\n DocumentPosition[DocumentPosition[\"CONTAINED_BY\"] = 16] = \"CONTAINED_BY\";\n})(DocumentPosition || (exports.DocumentPosition = DocumentPosition = {}));\n/**\n * Compare the position of one node against another node in any other document,\n * returning a bitmask with the values from {@link DocumentPosition}.\n *\n * Document order:\n * > There is an ordering, document order, defined on all the nodes in the\n * > document corresponding to the order in which the first character of the\n * > XML representation of each node occurs in the XML representation of the\n * > document after expansion of general entities. Thus, the document element\n * > node will be the first node. Element nodes occur before their children.\n * > Thus, document order orders element nodes in order of the occurrence of\n * > their start-tag in the XML (after expansion of entities). The attribute\n * > nodes of an element occur after the element and before its children. The\n * > relative order of attribute nodes is implementation-dependent.\n *\n * Source:\n * http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order\n *\n * @category Helpers\n * @param nodeA The first node to use in the comparison\n * @param nodeB The second node to use in the comparison\n * @returns A bitmask describing the input nodes' relative position.\n *\n * See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for\n * a description of these values.\n */\nfunction compareDocumentPosition(nodeA, nodeB) {\n var aParents = [];\n var bParents = [];\n if (nodeA === nodeB) {\n return 0;\n }\n var current = (0, domhandler_1.hasChildren)(nodeA) ? nodeA : nodeA.parent;\n while (current) {\n aParents.unshift(current);\n current = current.parent;\n }\n current = (0, domhandler_1.hasChildren)(nodeB) ? nodeB : nodeB.parent;\n while (current) {\n bParents.unshift(current);\n current = current.parent;\n }\n var maxIdx = Math.min(aParents.length, bParents.length);\n var idx = 0;\n while (idx < maxIdx && aParents[idx] === bParents[idx]) {\n idx++;\n }\n if (idx === 0) {\n return DocumentPosition.DISCONNECTED;\n }\n var sharedParent = aParents[idx - 1];\n var siblings = sharedParent.children;\n var aSibling = aParents[idx];\n var bSibling = bParents[idx];\n if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {\n if (sharedParent === nodeB) {\n return DocumentPosition.FOLLOWING | DocumentPosition.CONTAINED_BY;\n }\n return DocumentPosition.FOLLOWING;\n }\n if (sharedParent === nodeA) {\n return DocumentPosition.PRECEDING | DocumentPosition.CONTAINS;\n }\n return DocumentPosition.PRECEDING;\n}\n/**\n * Sort an array of nodes based on their relative position in the document,\n * removing any duplicate nodes. If the array contains nodes that do not belong\n * to the same document, sort order is unspecified.\n *\n * @category Helpers\n * @param nodes Array of DOM nodes.\n * @returns Collection of unique nodes, sorted in document order.\n */\nfunction uniqueSort(nodes) {\n nodes = nodes.filter(function (node, i, arr) { return !arr.includes(node, i + 1); });\n nodes.sort(function (a, b) {\n var relative = compareDocumentPosition(a, b);\n if (relative & DocumentPosition.PRECEDING) {\n return -1;\n }\n else if (relative & DocumentP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GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA,CAAE,CAAC;KACpF,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE;SACvB,IAAI,QAAQ,GAAG,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC;AACpD,SAAQ,IAAI,QAAQ,GAAG,gBAAgB,CAAC,SAAS,EAAE;aACvC,OAAO,EAAE;AACrB,SAAA;AACA,cAAa,IAAI,QAAQ,GAAG,gBAAgB,CAAC,SAAS,EAAE;AACxD,aAAY,OAAO,CAAC;AACpB,SAAA;AACA,SAAQ,OAAO,CAAC;AAChB,KAAA,CAAK,CAAC;AACN,KAAI,OAAO,KAAK;AAChB,CAAA;AACA;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('../../../_virtual/index8.js');
|
|
4
|
+
var stringify = require('./stringify.js');
|
|
5
|
+
var traversal = require('./traversal.js');
|
|
6
|
+
var manipulation = require('./manipulation.js');
|
|
7
|
+
var querying = require('./querying.js');
|
|
8
|
+
var legacy = require('./legacy.js');
|
|
9
|
+
var helpers = require('./helpers.js');
|
|
10
|
+
var feeds = require('./feeds.js');
|
|
11
|
+
var index$1 = require('../../domhandler/lib/index.js');
|
|
12
|
+
|
|
13
|
+
var hasRequiredLib;
|
|
14
|
+
|
|
15
|
+
function requireLib () {
|
|
16
|
+
if (hasRequiredLib) return index.__exports;
|
|
17
|
+
hasRequiredLib = 1;
|
|
18
|
+
(function (exports) {
|
|
19
|
+
var __createBinding = (index.__exports && index.__exports.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
22
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
23
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
24
|
+
}
|
|
25
|
+
Object.defineProperty(o, k2, desc);
|
|
26
|
+
}) : (function(o, m, k, k2) {
|
|
27
|
+
if (k2 === undefined) k2 = k;
|
|
28
|
+
o[k2] = m[k];
|
|
29
|
+
}));
|
|
30
|
+
var __exportStar = (index.__exports && index.__exports.__exportStar) || function(m, exports) {
|
|
31
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
32
|
+
};
|
|
33
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
+
exports.hasChildren = exports.isDocument = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = void 0;
|
|
35
|
+
__exportStar(/*@__PURE__*/ stringify.__require(), exports);
|
|
36
|
+
__exportStar(/*@__PURE__*/ traversal.__require(), exports);
|
|
37
|
+
__exportStar(/*@__PURE__*/ manipulation.__require(), exports);
|
|
38
|
+
__exportStar(/*@__PURE__*/ querying.__require(), exports);
|
|
39
|
+
__exportStar(/*@__PURE__*/ legacy.__require(), exports);
|
|
40
|
+
__exportStar(/*@__PURE__*/ helpers.__require(), exports);
|
|
41
|
+
__exportStar(/*@__PURE__*/ feeds.__require(), exports);
|
|
42
|
+
/** @deprecated Use these methods from `domhandler` directly. */
|
|
43
|
+
var domhandler_1 = /*@__PURE__*/ index$1.__require();
|
|
44
|
+
Object.defineProperty(exports, "isTag", { enumerable: true, get: function () { return domhandler_1.isTag; } });
|
|
45
|
+
Object.defineProperty(exports, "isCDATA", { enumerable: true, get: function () { return domhandler_1.isCDATA; } });
|
|
46
|
+
Object.defineProperty(exports, "isText", { enumerable: true, get: function () { return domhandler_1.isText; } });
|
|
47
|
+
Object.defineProperty(exports, "isComment", { enumerable: true, get: function () { return domhandler_1.isComment; } });
|
|
48
|
+
Object.defineProperty(exports, "isDocument", { enumerable: true, get: function () { return domhandler_1.isDocument; } });
|
|
49
|
+
Object.defineProperty(exports, "hasChildren", { enumerable: true, get: function () { return domhandler_1.hasChildren; } });
|
|
50
|
+
|
|
51
|
+
} (index.__exports));
|
|
52
|
+
return index.__exports;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
exports.__require = requireLib;
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/domutils/lib/index.js"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hasChildren = exports.isDocument = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = void 0;\n__exportStar(require(\"./stringify.js\"), exports);\n__exportStar(require(\"./traversal.js\"), exports);\n__exportStar(require(\"./manipulation.js\"), exports);\n__exportStar(require(\"./querying.js\"), exports);\n__exportStar(require(\"./legacy.js\"), exports);\n__exportStar(require(\"./helpers.js\"), exports);\n__exportStar(require(\"./feeds.js\"), exports);\n/** @deprecated Use these methods from `domhandler` directly. */\nvar domhandler_1 = require(\"domhandler\");\nObject.defineProperty(exports, \"isTag\", { enumerable: true, get: function () { return domhandler_1.isTag; } });\nObject.defineProperty(exports, \"isCDATA\", { enumerable: true, get: function () { return domhandler_1.isCDATA; } });\nObject.defineProperty(exports, \"isText\", { enumerable: true, get: function () { return domhandler_1.isText; } });\nObject.defineProperty(exports, \"isComment\", { enumerable: true, get: function () { return domhandler_1.isComment; } });\nObject.defineProperty(exports, \"isDocument\", { enumerable: true, get: function () { return domhandler_1.isDocument; } });\nObject.defineProperty(exports, \"hasChildren\", { enumerable: true, get: function () { return domhandler_1.hasChildren; } });\n//# sourceMappingURL=index.js.map"],"names":["this","require$$0","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7"],"mappings":";;;;;;;;;;;;;;;;;;EACA,IAAI,eAAe,GAAG,CAACA,eAAI,IAAIA,eAAI,CAAC,eAAe,MAAM,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE;AAChG,MAAI,IAAI,EAAE,KAAK,SAAS,EAAE,EAAE,GAAG,CAAC;MAC5B,IAAI,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC;MAChD,IAAI,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY,CAAC,EAAE;AACvF,QAAM,IAAI,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;AACnE,MAAA;MACI,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC;EACtC,CAAC,KAAK,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE;AAC5B,MAAI,IAAI,EAAE,KAAK,SAAS,EAAE,EAAE,GAAG,CAAC;MAC5B,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAChB,EAAA,CAAC,CAAC,CAAC;AACH,EAAA,IAAI,YAAY,GAAG,CAACA,eAAI,IAAIA,eAAI,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OAAO,YAAY,CAAC,OAAO,CAAC,CAAA,CAAE,EAAE,CAAC;EAClH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,MAAM,CAAC,CAAA,CAAE,EAAE,CAAC;EAChH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,SAAS,CAAC,CAAA,CAAE,EAAE,CAAC;EACtH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,UAAU,CAAC,CAAA,CAAE,EAAE,CAAC;EACxH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,WAAW,CAAC,CAAA,CAAE,EAAE,CAAC;AAC1H;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var legacy = require('../../../_virtual/legacy.js');
|
|
4
|
+
var index = require('../../domhandler/lib/index.js');
|
|
5
|
+
var querying = require('./querying.js');
|
|
6
|
+
|
|
7
|
+
var hasRequiredLegacy;
|
|
8
|
+
|
|
9
|
+
function requireLegacy () {
|
|
10
|
+
if (hasRequiredLegacy) return legacy.__exports;
|
|
11
|
+
hasRequiredLegacy = 1;
|
|
12
|
+
Object.defineProperty(legacy.__exports, "__esModule", { value: true });
|
|
13
|
+
legacy.__exports.testElement = testElement;
|
|
14
|
+
legacy.__exports.getElements = getElements;
|
|
15
|
+
legacy.__exports.getElementById = getElementById;
|
|
16
|
+
legacy.__exports.getElementsByTagName = getElementsByTagName;
|
|
17
|
+
legacy.__exports.getElementsByClassName = getElementsByClassName;
|
|
18
|
+
legacy.__exports.getElementsByTagType = getElementsByTagType;
|
|
19
|
+
var domhandler_1 = /*@__PURE__*/ index.__require();
|
|
20
|
+
var querying_js_1 = /*@__PURE__*/ querying.__require();
|
|
21
|
+
/**
|
|
22
|
+
* A map of functions to check nodes against.
|
|
23
|
+
*/
|
|
24
|
+
var Checks = {
|
|
25
|
+
tag_name: function (name) {
|
|
26
|
+
if (typeof name === "function") {
|
|
27
|
+
return function (elem) { return (0, domhandler_1.isTag)(elem) && name(elem.name); };
|
|
28
|
+
}
|
|
29
|
+
else if (name === "*") {
|
|
30
|
+
return domhandler_1.isTag;
|
|
31
|
+
}
|
|
32
|
+
return function (elem) { return (0, domhandler_1.isTag)(elem) && elem.name === name; };
|
|
33
|
+
},
|
|
34
|
+
tag_type: function (type) {
|
|
35
|
+
if (typeof type === "function") {
|
|
36
|
+
return function (elem) { return type(elem.type); };
|
|
37
|
+
}
|
|
38
|
+
return function (elem) { return elem.type === type; };
|
|
39
|
+
},
|
|
40
|
+
tag_contains: function (data) {
|
|
41
|
+
if (typeof data === "function") {
|
|
42
|
+
return function (elem) { return (0, domhandler_1.isText)(elem) && data(elem.data); };
|
|
43
|
+
}
|
|
44
|
+
return function (elem) { return (0, domhandler_1.isText)(elem) && elem.data === data; };
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Returns a function to check whether a node has an attribute with a particular
|
|
49
|
+
* value.
|
|
50
|
+
*
|
|
51
|
+
* @param attrib Attribute to check.
|
|
52
|
+
* @param value Attribute value to look for.
|
|
53
|
+
* @returns A function to check whether the a node has an attribute with a
|
|
54
|
+
* particular value.
|
|
55
|
+
*/
|
|
56
|
+
function getAttribCheck(attrib, value) {
|
|
57
|
+
if (typeof value === "function") {
|
|
58
|
+
return function (elem) { return (0, domhandler_1.isTag)(elem) && value(elem.attribs[attrib]); };
|
|
59
|
+
}
|
|
60
|
+
return function (elem) { return (0, domhandler_1.isTag)(elem) && elem.attribs[attrib] === value; };
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Returns a function that returns `true` if either of the input functions
|
|
64
|
+
* returns `true` for a node.
|
|
65
|
+
*
|
|
66
|
+
* @param a First function to combine.
|
|
67
|
+
* @param b Second function to combine.
|
|
68
|
+
* @returns A function taking a node and returning `true` if either of the input
|
|
69
|
+
* functions returns `true` for the node.
|
|
70
|
+
*/
|
|
71
|
+
function combineFuncs(a, b) {
|
|
72
|
+
return function (elem) { return a(elem) || b(elem); };
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Returns a function that executes all checks in `options` and returns `true`
|
|
76
|
+
* if any of them match a node.
|
|
77
|
+
*
|
|
78
|
+
* @param options An object describing nodes to look for.
|
|
79
|
+
* @returns A function that executes all checks in `options` and returns `true`
|
|
80
|
+
* if any of them match a node.
|
|
81
|
+
*/
|
|
82
|
+
function compileTest(options) {
|
|
83
|
+
var funcs = Object.keys(options).map(function (key) {
|
|
84
|
+
var value = options[key];
|
|
85
|
+
return Object.prototype.hasOwnProperty.call(Checks, key)
|
|
86
|
+
? Checks[key](value)
|
|
87
|
+
: getAttribCheck(key, value);
|
|
88
|
+
});
|
|
89
|
+
return funcs.length === 0 ? null : funcs.reduce(combineFuncs);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Checks whether a node matches the description in `options`.
|
|
93
|
+
*
|
|
94
|
+
* @category Legacy Query Functions
|
|
95
|
+
* @param options An object describing nodes to look for.
|
|
96
|
+
* @param node The element to test.
|
|
97
|
+
* @returns Whether the element matches the description in `options`.
|
|
98
|
+
*/
|
|
99
|
+
function testElement(options, node) {
|
|
100
|
+
var test = compileTest(options);
|
|
101
|
+
return test ? test(node) : true;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Returns all nodes that match `options`.
|
|
105
|
+
*
|
|
106
|
+
* @category Legacy Query Functions
|
|
107
|
+
* @param options An object describing nodes to look for.
|
|
108
|
+
* @param nodes Nodes to search through.
|
|
109
|
+
* @param recurse Also consider child nodes.
|
|
110
|
+
* @param limit Maximum number of nodes to return.
|
|
111
|
+
* @returns All nodes that match `options`.
|
|
112
|
+
*/
|
|
113
|
+
function getElements(options, nodes, recurse, limit) {
|
|
114
|
+
if (limit === void 0) { limit = Infinity; }
|
|
115
|
+
var test = compileTest(options);
|
|
116
|
+
return test ? (0, querying_js_1.filter)(test, nodes, recurse, limit) : [];
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Returns the node with the supplied ID.
|
|
120
|
+
*
|
|
121
|
+
* @category Legacy Query Functions
|
|
122
|
+
* @param id The unique ID attribute value to look for.
|
|
123
|
+
* @param nodes Nodes to search through.
|
|
124
|
+
* @param recurse Also consider child nodes.
|
|
125
|
+
* @returns The node with the supplied ID.
|
|
126
|
+
*/
|
|
127
|
+
function getElementById(id, nodes, recurse) {
|
|
128
|
+
if (recurse === void 0) { recurse = true; }
|
|
129
|
+
if (!Array.isArray(nodes))
|
|
130
|
+
nodes = [nodes];
|
|
131
|
+
return (0, querying_js_1.findOne)(getAttribCheck("id", id), nodes, recurse);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Returns all nodes with the supplied `tagName`.
|
|
135
|
+
*
|
|
136
|
+
* @category Legacy Query Functions
|
|
137
|
+
* @param tagName Tag name to search for.
|
|
138
|
+
* @param nodes Nodes to search through.
|
|
139
|
+
* @param recurse Also consider child nodes.
|
|
140
|
+
* @param limit Maximum number of nodes to return.
|
|
141
|
+
* @returns All nodes with the supplied `tagName`.
|
|
142
|
+
*/
|
|
143
|
+
function getElementsByTagName(tagName, nodes, recurse, limit) {
|
|
144
|
+
if (recurse === void 0) { recurse = true; }
|
|
145
|
+
if (limit === void 0) { limit = Infinity; }
|
|
146
|
+
return (0, querying_js_1.filter)(Checks["tag_name"](tagName), nodes, recurse, limit);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Returns all nodes with the supplied `className`.
|
|
150
|
+
*
|
|
151
|
+
* @category Legacy Query Functions
|
|
152
|
+
* @param className Class name to search for.
|
|
153
|
+
* @param nodes Nodes to search through.
|
|
154
|
+
* @param recurse Also consider child nodes.
|
|
155
|
+
* @param limit Maximum number of nodes to return.
|
|
156
|
+
* @returns All nodes with the supplied `className`.
|
|
157
|
+
*/
|
|
158
|
+
function getElementsByClassName(className, nodes, recurse, limit) {
|
|
159
|
+
if (recurse === void 0) { recurse = true; }
|
|
160
|
+
if (limit === void 0) { limit = Infinity; }
|
|
161
|
+
return (0, querying_js_1.filter)(getAttribCheck("class", className), nodes, recurse, limit);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Returns all nodes with the supplied `type`.
|
|
165
|
+
*
|
|
166
|
+
* @category Legacy Query Functions
|
|
167
|
+
* @param type Element type to look for.
|
|
168
|
+
* @param nodes Nodes to search through.
|
|
169
|
+
* @param recurse Also consider child nodes.
|
|
170
|
+
* @param limit Maximum number of nodes to return.
|
|
171
|
+
* @returns All nodes with the supplied `type`.
|
|
172
|
+
*/
|
|
173
|
+
function getElementsByTagType(type, nodes, recurse, limit) {
|
|
174
|
+
if (recurse === void 0) { recurse = true; }
|
|
175
|
+
if (limit === void 0) { limit = Infinity; }
|
|
176
|
+
return (0, querying_js_1.filter)(Checks["tag_type"](type), nodes, recurse, limit);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return legacy.__exports;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
exports.__require = requireLegacy;
|
|
183
|
+
//# sourceMappingURL=legacy.js.map
|