路泰科技体检小程序UI设计新版本
1
wwl
5 天以前 a6cdbcfe28fcc40ebb4919f57d60fb20122e8e57
1
829个文件已删除
18个文件已修改
212个文件已添加
428436 ■■■■■ 已修改文件
api/system/report.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/system/tjrecord.js 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/.bin/nanoid 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/.bin/nanoid.cmd 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/.bin/nanoid.ps1 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/.bin/parser 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/.bin/parser.cmd 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/.bin/parser.ps1 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/.bin/qrcode 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/.bin/qrcode.cmd 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/.bin/qrcode.ps1 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/.package-lock.json 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/helper-string-parser/LICENSE 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/helper-string-parser/README.md 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/helper-string-parser/lib/index.js 295 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/helper-string-parser/lib/index.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/helper-string-parser/package.json 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/helper-validator-identifier/LICENSE 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/helper-validator-identifier/README.md 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/helper-validator-identifier/lib/identifier.js 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/helper-validator-identifier/lib/identifier.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/helper-validator-identifier/lib/index.js 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/helper-validator-identifier/lib/index.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/helper-validator-identifier/lib/keyword.js 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/helper-validator-identifier/lib/keyword.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/helper-validator-identifier/package.json 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/parser/CHANGELOG.md 1073 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/parser/LICENSE 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/parser/README.md 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/parser/bin/babel-parser.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/parser/lib/index.js 14586 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/parser/lib/index.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/parser/package.json 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/parser/typings/babel-parser.d.ts 239 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/LICENSE 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/README.md 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/asserts/assertNode.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/asserts/assertNode.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/asserts/generated/index.js 1251 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/asserts/generated/index.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/ast-types/generated/index.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/ast-types/generated/index.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/generated/index.js 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/generated/index.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/generated/lowercase.js 2896 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/generated/lowercase.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/generated/uppercase.js 274 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/generated/uppercase.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/productions.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/productions.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/react/buildChildren.js 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/react/buildChildren.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/validateNode.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/builders/validateNode.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/clone/clone.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/clone/clone.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/clone/cloneDeep.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/clone/cloneDeep.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/clone/cloneNode.js 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/clone/cloneNode.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/clone/cloneWithoutLoc.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/clone/cloneWithoutLoc.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/comments/addComment.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/comments/addComment.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/comments/addComments.js 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/comments/addComments.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/comments/inheritInnerComments.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/comments/inheritInnerComments.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/comments/inheritLeadingComments.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/comments/inheritLeadingComments.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/comments/inheritTrailingComments.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/comments/inheritTrailingComments.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/comments/inheritsComments.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/comments/inheritsComments.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/comments/removeComments.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/comments/removeComments.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/constants/generated/index.js 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/constants/generated/index.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/constants/index.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/constants/index.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/ensureBlock.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/ensureBlock.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toBindingIdentifierName.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toBindingIdentifierName.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toBlock.js 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toBlock.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toComputedKey.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toComputedKey.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toExpression.js 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toExpression.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toIdentifier.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toIdentifier.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toKeyAlias.js 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toKeyAlias.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toSequenceExpression.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toSequenceExpression.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toStatement.js 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/toStatement.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/valueToNode.js 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/converters/valueToNode.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/core.js 1659 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/core.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/deprecated-aliases.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/deprecated-aliases.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/experimental.js 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/experimental.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/flow.js 495 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/flow.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/index.js 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/index.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/jsx.js 157 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/jsx.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/misc.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/misc.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/placeholders.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/placeholders.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/typescript.js 528 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/typescript.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/utils.js 292 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/definitions/utils.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/index-legacy.d.ts 2797 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/index.d.ts 3308 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/index.js 584 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/index.js.flow 2650 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/index.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/modifications/appendToMemberExpression.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/modifications/appendToMemberExpression.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/modifications/inherits.js 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/modifications/inherits.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/modifications/prependToMemberExpression.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/modifications/removeProperties.js 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/modifications/removeProperties.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/modifications/removePropertiesDeep.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/modifications/removePropertiesDeep.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/retrievers/getFunctionName.js 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/retrievers/getFunctionName.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/traverse/traverse.js 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/traverse/traverse.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/traverse/traverseFast.js 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/traverse/traverseFast.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/utils/deprecationWarning.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/utils/deprecationWarning.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/utils/inherit.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/utils/inherit.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/utils/shallowEqual.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/utils/shallowEqual.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/generated/index.js 2797 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/generated/index.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/is.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/is.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isBinding.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isBinding.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isBlockScoped.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isBlockScoped.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isImmutable.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isImmutable.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isLet.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isLet.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isNode.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isNode.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isNodesEquivalent.js 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isNodesEquivalent.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isPlaceholderType.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isPlaceholderType.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isReferenced.js 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isReferenced.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isScope.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isScope.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isSpecifierDefault.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isType.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isType.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isValidES3Identifier.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isValidES3Identifier.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isValidIdentifier.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isValidIdentifier.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isVar.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/isVar.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/matchesPattern.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/matchesPattern.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/react/isCompatTag.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/react/isCompatTag.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/react/isReactComponent.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/react/isReactComponent.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/validate.js 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/lib/validators/validate.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@babel/types/package.json 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@uqrcode/js/LICENSE.md 201 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@uqrcode/js/README.md 392 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@uqrcode/js/package.json 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@uqrcode/js/uqrcode.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-core/LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-core/README.md 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-core/dist/compiler-core.cjs.js 6841 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js 6718 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-core/dist/compiler-core.d.ts 1093 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js 5810 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-core/index.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-core/package.json 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-dom/LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-dom/README.md 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js 931 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js 686 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js 6620 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js 690 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-dom/dist/compiler-dom.global.js 6785 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-dom/index.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-dom/package.json 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-sfc/LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-sfc/README.md 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js 25018 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts 485 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js 50457 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-sfc/package.json 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-ssr/LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-ssr/README.md 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js 1402 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/compiler-ssr/package.json 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/reactivity/LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/reactivity/README.md 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/reactivity/dist/reactivity.cjs.js 1956 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js 1806 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/reactivity/dist/reactivity.d.ts 757 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/reactivity/dist/reactivity.esm-browser.js 1955 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js 1913 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/reactivity/dist/reactivity.global.js 2011 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/reactivity/dist/reactivity.global.prod.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/reactivity/index.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/reactivity/package.json 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-core/LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-core/README.md 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-core/dist/runtime-core.cjs.js 8557 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js 6707 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-core/dist/runtime-core.d.ts 1839 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js 8486 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-core/index.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-core/package.json 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-dom/LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-dom/README.md 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js 1828 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js 1677 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts 1397 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js 12441 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js 1869 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-dom/dist/runtime-dom.global.js 12492 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-dom/index.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/runtime-dom/package.json 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/server-renderer/LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/server-renderer/README.md 178 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/server-renderer/dist/server-renderer.cjs.js 1151 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js 879 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/server-renderer/dist/server-renderer.d.ts 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js 8468 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js 1088 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/server-renderer/index.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/server-renderer/package.json 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/shared/LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/shared/README.md 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/shared/dist/shared.cjs.js 613 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/shared/dist/shared.cjs.prod.js 605 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/shared/dist/shared.d.ts 335 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/shared/dist/shared.esm-bundler.js 537 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/shared/index.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/@vue/shared/package.json 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/ansi-regex/index.d.ts 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/ansi-regex/index.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/ansi-regex/license 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/ansi-regex/package.json 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/ansi-regex/readme.md 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/ansi-styles/index.d.ts 345 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/ansi-styles/index.js 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/ansi-styles/license 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/ansi-styles/package.json 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/ansi-styles/readme.md 152 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/camelcase/index.d.ts 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/camelcase/index.js 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/camelcase/license 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/camelcase/package.json 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/camelcase/readme.md 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/cliui/CHANGELOG.md 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/cliui/LICENSE.txt 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/cliui/README.md 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/cliui/index.js 354 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/cliui/package.json 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/color-convert/CHANGELOG.md 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/color-convert/LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/color-convert/README.md 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/color-convert/conversions.js 839 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/color-convert/index.js 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/color-convert/package.json 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/color-convert/route.js 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/color-name/LICENSE 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/color-name/README.md 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/color-name/index.js 152 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/color-name/package.json 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/csstype/LICENSE 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/csstype/README.md 277 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/csstype/index.d.ts 21297 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/csstype/index.js.flow 6612 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/csstype/package.json 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/decamelize/index.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/decamelize/license 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/decamelize/package.json 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/decamelize/readme.md 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/dijkstrajs/.travis.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/dijkstrajs/CONTRIBUTING.md 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/dijkstrajs/LICENSE.md 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/dijkstrajs/README.md 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/dijkstrajs/dijkstra.js 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/dijkstrajs/package.json 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/dijkstrajs/test/dijkstra.test.js 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/emoji-regex/LICENSE-MIT.txt 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/emoji-regex/README.md 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/emoji-regex/es2015/index.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/emoji-regex/es2015/text.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/emoji-regex/index.d.ts 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/emoji-regex/index.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/emoji-regex/package.json 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/emoji-regex/text.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/LICENSE 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/decode.d.ts 211 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/decode.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/decode.js 536 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/decode.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/decode_codepoint.d.ts 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/decode_codepoint.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/decode_codepoint.js 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/decode_codepoint.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/encode.d.ts 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/encode.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/encode.js 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/encode.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/escape.d.ts 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/escape.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/escape.js 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/escape.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/decode.d.ts 211 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/decode.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/decode.js 496 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/decode.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/decode_codepoint.d.ts 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/decode_codepoint.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/decode_codepoint.js 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/decode_codepoint.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/encode.d.ts 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/encode.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/encode.js 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/encode.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/escape.d.ts 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/escape.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/escape.js 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/escape.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/generated/decode-data-html.d.ts 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/generated/decode-data-html.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/generated/decode-data-html.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/generated/decode-data-xml.d.ts 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/generated/decode-data-xml.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/generated/decode-data-xml.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/generated/encode-html.d.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/generated/encode-html.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/generated/encode-html.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/generated/encode-html.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/index.d.ts 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/index.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/index.js 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/index.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/esm/package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/generated/decode-data-html.d.ts 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/generated/decode-data-html.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/generated/decode-data-html.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/generated/decode-data-html.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/generated/decode-data-xml.d.ts 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/generated/decode-data-xml.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/generated/decode-data-xml.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/generated/decode-data-xml.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/generated/encode-html.d.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/generated/encode-html.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/generated/encode-html.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/generated/encode-html.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/index.d.ts 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/index.d.ts.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/index.js 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/lib/index.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/package.json 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/entities/readme.md 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/CHANGELOG.md 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/LICENSE 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/README.md 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/dist/esm/estree-walker.js 333 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/dist/esm/package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/dist/umd/estree-walker.js 344 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/package.json 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/src/async.js 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/src/index.js 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/src/package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/src/sync.js 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/src/walker.js 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/types/async.d.ts 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/types/index.d.ts 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/types/sync.d.ts 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/types/tsconfig.tsbuildinfo 345 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/estree-walker/types/walker.d.ts 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/find-up/index.d.ts 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/find-up/index.js 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/find-up/license 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/find-up/package.json 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/find-up/readme.md 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/get-caller-file/LICENSE.md 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/get-caller-file/README.md 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/get-caller-file/index.d.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/get-caller-file/index.js 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/get-caller-file/index.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/get-caller-file/package.json 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/is-fullwidth-code-point/index.d.ts 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/is-fullwidth-code-point/index.js 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/is-fullwidth-code-point/license 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/is-fullwidth-code-point/package.json 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/is-fullwidth-code-point/readme.md 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/locate-path/index.d.ts 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/locate-path/index.js 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/locate-path/license 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/locate-path/package.json 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/locate-path/readme.md 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/magic-string/LICENSE 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/magic-string/README.md 324 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/magic-string/dist/magic-string.cjs.d.ts 289 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/magic-string/dist/magic-string.cjs.js 1575 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/magic-string/dist/magic-string.cjs.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/magic-string/dist/magic-string.es.d.mts 289 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/magic-string/dist/magic-string.es.mjs 1569 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/magic-string/dist/magic-string.es.mjs.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/magic-string/dist/magic-string.umd.js 1672 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/magic-string/dist/magic-string.umd.js.map 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/magic-string/package.json 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/.eslintignore 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/.eslintrc.json 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/.github/ISSUE_TEMPLATE/bug.md 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/.github/ISSUE_TEMPLATE/enhancement.md 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/.github/ISSUE_TEMPLATE/question.md 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/.stylelintrc.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/README.md 241 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-alipay/index.acss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-alipay/index.axml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-alipay/index.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-alipay/index.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-alipay/node/node.acss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-alipay/node/node.axml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-alipay/node/node.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-alipay/node/node.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-alipay/parser.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-baidu/index.css 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-baidu/index.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-baidu/index.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-baidu/index.swan 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-baidu/node/node.css 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-baidu/node/node.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-baidu/node/node.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-baidu/node/node.swan 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-baidu/parser.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-qq/index.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-qq/index.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-qq/index.qml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-qq/index.qss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-qq/node/node.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-qq/node/node.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-qq/node/node.qml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-qq/node/node.qss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-qq/parser.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-toutiao/index.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-toutiao/index.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-toutiao/index.ttml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-toutiao/index.ttss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-toutiao/node/node.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-toutiao/node/node.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-toutiao/node/node.ttml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-toutiao/node/node.ttss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-toutiao/parser.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-weixin/index.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-weixin/index.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-weixin/index.wxml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-weixin/index.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-weixin/node/node.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-weixin/node/node.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-weixin/node/node.wxml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-weixin/node/node.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/mp-weixin/parser.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/uni-app/components/mp-html/mp-html.vue 498 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/uni-app/components/mp-html/node/node.vue 597 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/uni-app/components/mp-html/parser.js 1400 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/uni-app/static/app-plus/mp-html/js/handler.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/uni-app/static/app-plus/mp-html/js/uni.webview.min.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/dist/uni-app/static/app-plus/mp-html/local.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/.nojekyll 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/README.md 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/_coverpage.md 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/_sidebar.md 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/advanced/api.md 230 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/advanced/develop.md 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/advanced/plugin.md 488 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/365刷题.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/AI瓦力.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/MiniProgram模版演示.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/优秀笔记.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/你的代码写的真棒.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/典典博客.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/古典文学名著阅读.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/同城共享书.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/多么生活.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/富文本插件.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/小莫唐尼.png 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/微慕.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/技术源share.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/欢喜商城.png 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/科学复习.png 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/程序员技术之旅.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/谛否.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/case/食法查.png 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/group.jpg 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/logo/logo.ico 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/logo/logo.png 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/plugin/card.png 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/sponsor.png 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/tutorials/01.png 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/tutorials/02.png 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/tutorials/03.png 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/assets/tutorials/04.png 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/basic/event.md 173 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/basic/prop.md 141 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/changelog/changelog.md 322 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/index.html 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/lib/docsify.min.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/lib/prism-bash.min.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/lib/search.min.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/lib/vue.css 858 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/overview/feature.md 228 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/overview/quickstart.md 287 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/question/contribution.md 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/question/faq.md 152 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/docs/question/feedback.md 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/gulpfile.js 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/lint.js 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/package.json 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/README.md 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/audio/README.md 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/audio/build.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/audio/context.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/audio/index.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/audio/miniprogram/audio.js 189 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/audio/miniprogram/audio.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/audio/miniprogram/audio.wxml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/audio/miniprogram/audio.wxss 127 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/audio/miniprogram/build.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/audio/uni-app/audio.vue 269 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/audio/uni-app/build.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/card/README.md 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/card/build.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/card/index.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/card/miniprogram/build.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/card/miniprogram/card.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/card/miniprogram/card.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/card/miniprogram/card.wxml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/card/miniprogram/card.wxss 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/card/uni-app/build.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/card/uni-app/card.vue 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/editable/README.md 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/editable/config.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/editable/miniprogram/build.js 813 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/editable/miniprogram/index.js 551 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/editable/uni-app/build.js 744 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/editable/uni-app/index.js 553 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/emoji/README.md 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/emoji/index.js 203 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/highlight/README.md 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/highlight/config.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/highlight/index.js 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/highlight/miniprogram/build.js 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/highlight/prism.css 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/highlight/prism.min.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/highlight/uni-app/build.js 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/img-cache/README.md 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/img-cache/build.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/img-cache/index.js 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/latex/README.md 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/latex/build.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/latex/index.js 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/latex/katex.css 1070 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/latex/katex.min.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/markdown/README.md 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/markdown/index.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/markdown/marked.min.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/markdown/miniprogram/build.js 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/markdown/uni-app/build.js 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/search/README.md 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/search/miniprogram/index.js 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/search/uni-app/index.js 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/style/README.md 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/style/index.js 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/style/parser.js 175 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/template/README.md 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/template/build.js 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/template/index.js 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/txv-video/README.md 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/txv-video/build.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/txv-video/index.js 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/txv-video/miniprogram/build.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/plugins/txv-video/uni-app/build.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/miniprogram/index.js 396 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/miniprogram/index.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/miniprogram/index.wxml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/miniprogram/index.wxss 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/miniprogram/node/node.js 247 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/miniprogram/node/node.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/miniprogram/node/node.wxml 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/miniprogram/node/node.wxss 164 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/miniprogram/parser.js 1276 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/uni-app/components/mp-html/mp-html.vue 498 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/uni-app/components/mp-html/node/node.vue 595 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/uni-app/components/mp-html/parser.js 1400 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/uni-app/static/app-plus/mp-html/js/handler.js 254 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/uni-app/static/app-plus/mp-html/js/uni.webview.min.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/src/uni-app/static/app-plus/mp-html/local.html 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/test/content.js 203 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/test/test.js 373 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/config.js 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/converter.js 205 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/miniprogram/app.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/miniprogram/app.json 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/miniprogram/pages/index/index.js 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/miniprogram/pages/index/index.json 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/miniprogram/pages/index/index.wxml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/miniprogram/pages/jump/jump.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/miniprogram/pages/jump/jump.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/miniprogram/pages/jump/jump.wxml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/miniprogram/project.config.json 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/uni-app/App.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/uni-app/README.md 194 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/uni-app/index.html 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/uni-app/main.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/uni-app/manifest.json 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/uni-app/pages.json 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/uni-app/pages/index/index.vue 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/demo/uni-app/pages/jump/jump.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/ifdef.js 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/minifier.js 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/mp-html/tools/plugin.js 248 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/LICENSE 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/README.md 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/async/index.browser.cjs 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/async/index.browser.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/async/index.cjs 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/async/index.d.ts 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/async/index.js 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/async/index.native.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/async/package.json 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/bin/nanoid.cjs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/index.browser.cjs 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/index.browser.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/index.cjs 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/index.d.cts 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/index.d.ts 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/index.js 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/nanoid.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/non-secure/index.cjs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/non-secure/index.d.ts 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/non-secure/index.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/non-secure/package.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/package.json 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/url-alphabet/index.cjs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/url-alphabet/index.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/nanoid/url-alphabet/package.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-limit/index.d.ts 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-limit/index.js 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-limit/license 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-limit/package.json 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-limit/readme.md 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-locate/index.d.ts 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-locate/index.js 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-locate/license 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-locate/package.json 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-locate/readme.md 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-try/index.d.ts 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-try/index.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-try/license 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-try/package.json 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/p-try/readme.md 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/path-exists/index.d.ts 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/path-exists/index.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/path-exists/license 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/path-exists/package.json 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/path-exists/readme.md 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/.eslintignore 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/.eslintrc.json 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/.prettierignore 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/LICENSE 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/README.md 429 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/browser.js 16096 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/base.css 354 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/bitmapper.js.html 881 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/bitpacker.js.html 554 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/block-navigation.js 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/chunkstream.js.html 647 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/constants.js.html 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/crc.js.html 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/favicon.png 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/filter-pack.js.html 593 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/filter-parse-async.js.html 152 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/filter-parse-sync.js.html 143 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/filter-parse.js.html 611 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/format-normaliser.js.html 359 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/index.html 426 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/interlace.js.html 365 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/packer-async.js.html 230 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/packer-sync.js.html 248 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/packer.js.html 467 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/paeth-predictor.js.html 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/parser-async.js.html 575 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/parser-sync.js.html 404 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/parser.js.html 950 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/png-sync.js.html 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/png.js.html 662 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/prettify.css 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/prettify.js 1007 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/sort-arrow-sprite.png 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/sorter.js 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/sync-inflate.js.html 584 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov-report/sync-reader.js.html 215 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/coverage/lcov.info 2177 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/bitmapper.js 267 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/bitpacker.js 158 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/chunkstream.js 189 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/constants.js 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/crc.js 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/filter-pack.js 171 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/filter-parse-async.js 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/filter-parse-sync.js 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/filter-parse.js 177 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/format-normaliser.js 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/interlace.js 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/packer-async.js 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/packer-sync.js 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/packer.js 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/paeth-predictor.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/parser-async.js 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/parser-sync.js 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/parser.js 290 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/png-sync.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/png.js 194 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/sync-inflate.js 168 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/lib/sync-reader.js 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/pngjs/package.json 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/LICENSE 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/README.md 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/at-rule.d.ts 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/at-rule.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/comment.d.ts 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/comment.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/container.d.ts 483 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/container.js 447 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/css-syntax-error.d.ts 248 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/css-syntax-error.js 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/declaration.d.ts 151 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/declaration.js 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/document.d.ts 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/document.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/fromJSON.d.ts 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/fromJSON.js 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/input.d.ts 227 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/input.js 265 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/lazy-result.d.ts 190 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/lazy-result.js 550 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/list.d.ts 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/list.js 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/map-generator.js 368 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/no-work-result.d.ts 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/no-work-result.js 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/node.d.ts 556 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/node.js 449 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/parse.d.ts 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/parse.js 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/parser.js 611 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/postcss.d.mts 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/postcss.d.ts 458 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/postcss.js 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/postcss.mjs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/previous-map.d.ts 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/previous-map.js 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/processor.d.ts 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/processor.js 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/result.d.ts 205 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/result.js 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/root.d.ts 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/root.js 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/rule.d.ts 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/rule.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/stringifier.d.ts 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/stringifier.js 353 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/stringify.d.ts 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/stringify.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/symbols.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/terminal-highlight.js 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/tokenize.js 266 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/warn-once.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/warning.d.ts 147 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/lib/warning.js 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/postcss/package.json 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode.vue/CHANGELOG.md 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode.vue/LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode.vue/README-ja.md 267 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode.vue/README-zh_cn.md 268 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode.vue/README.md 267 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode.vue/dist/index.d.ts 393 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode.vue/dist/qrcode.vue.browser.js 1259 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode.vue/dist/qrcode.vue.browser.min.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode.vue/dist/qrcode.vue.cjs.js 1255 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode.vue/dist/qrcode.vue.esm.js 1249 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode.vue/dist/qrcodegen.d.ts 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode.vue/package.json 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/README.md 770 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/bin/qrcode 159 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/helper/to-sjis-browser.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/helper/to-sjis.js 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/browser.js 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/can-promise.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/alignment-pattern.js 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/alphanumeric-data.js 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/bit-buffer.js 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/bit-matrix.js 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/byte-data.js 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/error-correction-code.js 135 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/error-correction-level.js 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/finder-pattern.js 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/format-info.js 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/galois-field.js 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/kanji-data.js 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/mask-pattern.js 234 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/mode.js 167 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/numeric-data.js 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/polynomial.js 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/qrcode.js 495 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/reed-solomon-encoder.js 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/regex.js 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/segments.js 330 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/utils.js 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/version-check.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/core/version.js 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/index.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/renderer/canvas.js 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/renderer/png.js 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/renderer/svg-tag.js 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/renderer/svg.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/renderer/terminal.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/renderer/terminal/terminal-small.js 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/renderer/terminal/terminal.js 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/renderer/utf8.js 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/renderer/utils.js 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/lib/server.js 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/license 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/qrcode/package.json 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/require-directory/.jshintrc 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/require-directory/.npmignore 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/require-directory/.travis.yml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/require-directory/LICENSE 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/require-directory/README.markdown 184 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/require-directory/index.js 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/require-directory/package.json 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/require-main-filename/CHANGELOG.md 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/require-main-filename/LICENSE.txt 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/require-main-filename/README.md 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/require-main-filename/index.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/require-main-filename/package.json 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/set-blocking/CHANGELOG.md 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/set-blocking/LICENSE.txt 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/set-blocking/README.md 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/set-blocking/index.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/set-blocking/package.json 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/string-width/index.d.ts 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/string-width/index.js 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/string-width/license 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/string-width/package.json 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/string-width/readme.md 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/strip-ansi/index.d.ts 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/strip-ansi/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/strip-ansi/license 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/strip-ansi/package.json 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/strip-ansi/readme.md 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/uqrcodejs/LICENSE.md 201 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/uqrcodejs/README.md 392 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/uqrcodejs/package.json 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/uqrcodejs/uqrcode.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/README.md 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/compiler-sfc/index.browser.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/compiler-sfc/index.browser.mjs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/compiler-sfc/index.d.mts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/compiler-sfc/index.d.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/compiler-sfc/index.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/compiler-sfc/index.mjs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/compiler-sfc/package.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/compiler-sfc/register-ts.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/dist/vue.cjs.js 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/dist/vue.cjs.prod.js 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/dist/vue.d.mts 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/dist/vue.d.ts 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/dist/vue.esm-browser.js 18347 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/dist/vue.esm-browser.prod.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/dist/vue.esm-bundler.js 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/dist/vue.global.js 18227 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/dist/vue.global.prod.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/dist/vue.runtime.esm-browser.js 12464 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/dist/vue.runtime.esm-browser.prod.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/dist/vue.runtime.esm-bundler.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/dist/vue.runtime.global.js 12516 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/dist/vue.runtime.global.prod.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/index.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/index.mjs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/jsx-runtime/index.d.ts 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/jsx-runtime/index.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/jsx-runtime/index.mjs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/jsx-runtime/package.json 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/jsx.d.ts 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/package.json 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/server-renderer/index.d.mts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/server-renderer/index.d.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/server-renderer/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/server-renderer/index.mjs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/vue/server-renderer/package.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/which-module/LICENSE 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/which-module/README.md 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/which-module/index.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/which-module/package.json 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/wrap-ansi/index.js 186 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/wrap-ansi/license 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/wrap-ansi/package.json 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/wrap-ansi/readme.md 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/y18n/CHANGELOG.md 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/y18n/LICENSE 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/y18n/README.md 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/y18n/index.js 188 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/y18n/package.json 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs-parser/CHANGELOG.md 601 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs-parser/LICENSE.txt 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs-parser/README.md 449 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs-parser/index.js 1032 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs-parser/lib/tokenize-arg-string.js 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs-parser/package.json 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/CHANGELOG.md 420 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/LICENSE 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/README.md 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/apply-extends.d.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/apply-extends.js 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/argsert.d.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/argsert.js 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/command.d.ts 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/command.js 416 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/common-types.d.ts 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/common-types.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/completion-templates.d.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/completion-templates.js 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/completion.d.ts 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/completion.js 135 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/is-promise.d.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/is-promise.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/levenshtein.d.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/levenshtein.js 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/middleware.d.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/middleware.js 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/obj-filter.d.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/obj-filter.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/parse-command.d.ts 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/parse-command.js 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/process-argv.d.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/process-argv.js 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/usage.d.ts 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/usage.js 540 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/validation.d.ts 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/validation.js 330 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/yargs.d.ts 274 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/yargs.js 1190 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/yerror.d.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/build/lib/yerror.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/index.js 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/be.json 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/de.json 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/en.json 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/es.json 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/fi.json 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/fr.json 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/hi.json 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/hu.json 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/id.json 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/it.json 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/ja.json 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/ko.json 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/nb.json 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/nl.json 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/nn.json 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/pirate.json 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/pl.json 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/pt.json 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/pt_BR.json 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/ru.json 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/th.json 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/tr.json 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/zh_CN.json 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/locales/zh_TW.json 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/package.json 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
node_modules/yargs/yargs.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/fg/fg.vue 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/history/history.vue 381 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index.vue 789 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mine/index.vue 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tjrecord/tjrecord.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/tjrecorddetail/tjrecorddetail.vue 578 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pagesA/Examiner/Examiner.vue 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pagesA/ReportDetails/ReportDetails.vue 659 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pagesA/ReportOverview/ReportOverview.vue 551 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pagesA/appointment/appointment.vue 761 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pagesA/goHosp/goHosp.vue 141 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pagesA/hospIntroduce/hospIntroduce.vue 220 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pagesB/mine/xuanzeyuanqv/xuanzeyuanqv.vue 305 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/system/report.js
@@ -3,10 +3,10 @@
// æŸ¥è¯¢ä½“检报告存储列表
export function getReportList(cusPhone) {
    return request({
        url: '/cus/getReport/getReportList',
        method: 'get',
        params: {
            cusPhone: cusPhone
        url: '/cus/getReport/tijianjilu',
        method: 'post',
        data: {
            idCard:cusPhone
        }
    })
}
@@ -125,3 +125,11 @@
        data:data
    })
}
// æŸ¥è¯¢ä½“检报告存储详细
export function getwenzhenxinxi(data) {
    return request({
        url: '/cus/wx/wenzhenxinxi',
        method: 'post',
        data:data
    })
}
api/system/tjrecord.js
@@ -1,17 +1,18 @@
import request from '@/utils/request'
// æŸ¥è¯¢é™¢åŒºä¿¡æ¯åˆ—表
export function getTiJianList(cusIdCard) {
export function getTiJianList(data) {
    return request({    
        url: '/cus/appOrder/getTiJianList?cusIdCard=' + cusIdCard ,
        method: 'get',
        url: '/cus/wx/tijianjilu',
        method: 'post',
        data: data
    })
}
export function getPaiDuiList(data) {
    return request({
        url: '/cus/wx/tijianjiluxiangqing',
        method: 'post',
        data: data
    })
}
// ä¿®æ”¹é—®è¯Š
export function getPaiDuiList(tjNumber) {
    return request({
       url: '/cus/appOrder/getPaiDuiList?tjNumber=' + tjNumber ,
       method: 'get',
    })
}
config.js
@@ -3,7 +3,7 @@
    // baseUrl: 'https://ltpeis.xaltjdkj.cn:5011/ltkj-admin',
    // baseUrl: 'https://ltpeis.xaltjdkj.cn:5021',
    // baseUrl: 'http://ltpeis.xaltjdkj.cn:5801',
    baseUrl: 'http://192.168.1.113:5011',
    baseUrl: 'http://192.168.1.244:5011',
    
  // åº”用信息
  appInfo: {
node_modules/.bin/nanoid
File was deleted
node_modules/.bin/nanoid.cmd
File was deleted
node_modules/.bin/nanoid.ps1
File was deleted
node_modules/.bin/parser
File was deleted
node_modules/.bin/parser.cmd
File was deleted
node_modules/.bin/parser.ps1
File was deleted
node_modules/.bin/qrcode
File was deleted
node_modules/.bin/qrcode.cmd
File was deleted
node_modules/.bin/qrcode.ps1
File was deleted
node_modules/.package-lock.json
@@ -890,6 +890,11 @@
        "node": ">= 0.6"
      }
    },
    "node_modules/mp-html": {
      "version": "2.5.1",
      "resolved": "https://registry.npmmirror.com/mp-html/-/mp-html-2.5.1.tgz",
      "integrity": "sha512-7BEH8dnQ89kOIyjdoYni8zcc0QAg+lgEWg0n9or9q2D4l26JNG+KPzHfttDyisC/5S7aPBblpXrFTYQv475w/Q=="
    },
    "node_modules/neo-async": {
      "version": "2.6.2",
      "resolved": "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz",
node_modules/@babel/helper-string-parser/LICENSE
File was deleted
node_modules/@babel/helper-string-parser/README.md
File was deleted
node_modules/@babel/helper-string-parser/lib/index.js
File was deleted
node_modules/@babel/helper-string-parser/lib/index.js.map
File was deleted
node_modules/@babel/helper-string-parser/package.json
File was deleted
node_modules/@babel/helper-validator-identifier/LICENSE
File was deleted
node_modules/@babel/helper-validator-identifier/README.md
File was deleted
node_modules/@babel/helper-validator-identifier/lib/identifier.js
File was deleted
node_modules/@babel/helper-validator-identifier/lib/identifier.js.map
File was deleted
node_modules/@babel/helper-validator-identifier/lib/index.js
File was deleted
node_modules/@babel/helper-validator-identifier/lib/index.js.map
File was deleted
node_modules/@babel/helper-validator-identifier/lib/keyword.js
File was deleted
node_modules/@babel/helper-validator-identifier/lib/keyword.js.map
File was deleted
node_modules/@babel/helper-validator-identifier/package.json
File was deleted
node_modules/@babel/parser/CHANGELOG.md
File was deleted
node_modules/@babel/parser/LICENSE
File was deleted
node_modules/@babel/parser/README.md
File was deleted
node_modules/@babel/parser/bin/babel-parser.js
File was deleted
node_modules/@babel/parser/lib/index.js
File was deleted
node_modules/@babel/parser/lib/index.js.map
File was deleted
node_modules/@babel/parser/package.json
File was deleted
node_modules/@babel/parser/typings/babel-parser.d.ts
File was deleted
node_modules/@babel/types/LICENSE
File was deleted
node_modules/@babel/types/README.md
File was deleted
node_modules/@babel/types/lib/asserts/assertNode.js
File was deleted
node_modules/@babel/types/lib/asserts/assertNode.js.map
File was deleted
node_modules/@babel/types/lib/asserts/generated/index.js
File was deleted
node_modules/@babel/types/lib/asserts/generated/index.js.map
File was deleted
node_modules/@babel/types/lib/ast-types/generated/index.js
File was deleted
node_modules/@babel/types/lib/ast-types/generated/index.js.map
File was deleted
node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
File was deleted
node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map
File was deleted
node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
File was deleted
node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map
File was deleted
node_modules/@babel/types/lib/builders/generated/index.js
File was deleted
node_modules/@babel/types/lib/builders/generated/index.js.map
File was deleted
node_modules/@babel/types/lib/builders/generated/lowercase.js
File was deleted
node_modules/@babel/types/lib/builders/generated/lowercase.js.map
File was deleted
node_modules/@babel/types/lib/builders/generated/uppercase.js
File was deleted
node_modules/@babel/types/lib/builders/generated/uppercase.js.map
File was deleted
node_modules/@babel/types/lib/builders/productions.js
File was deleted
node_modules/@babel/types/lib/builders/productions.js.map
File was deleted
node_modules/@babel/types/lib/builders/react/buildChildren.js
File was deleted
node_modules/@babel/types/lib/builders/react/buildChildren.js.map
File was deleted
node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
File was deleted
node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map
File was deleted
node_modules/@babel/types/lib/builders/validateNode.js
File was deleted
node_modules/@babel/types/lib/builders/validateNode.js.map
File was deleted
node_modules/@babel/types/lib/clone/clone.js
File was deleted
node_modules/@babel/types/lib/clone/clone.js.map
File was deleted
node_modules/@babel/types/lib/clone/cloneDeep.js
File was deleted
node_modules/@babel/types/lib/clone/cloneDeep.js.map
File was deleted
node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
File was deleted
node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map
File was deleted
node_modules/@babel/types/lib/clone/cloneNode.js
File was deleted
node_modules/@babel/types/lib/clone/cloneNode.js.map
File was deleted
node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
File was deleted
node_modules/@babel/types/lib/clone/cloneWithoutLoc.js.map
File was deleted
node_modules/@babel/types/lib/comments/addComment.js
File was deleted
node_modules/@babel/types/lib/comments/addComment.js.map
File was deleted
node_modules/@babel/types/lib/comments/addComments.js
File was deleted
node_modules/@babel/types/lib/comments/addComments.js.map
File was deleted
node_modules/@babel/types/lib/comments/inheritInnerComments.js
File was deleted
node_modules/@babel/types/lib/comments/inheritInnerComments.js.map
File was deleted
node_modules/@babel/types/lib/comments/inheritLeadingComments.js
File was deleted
node_modules/@babel/types/lib/comments/inheritLeadingComments.js.map
File was deleted
node_modules/@babel/types/lib/comments/inheritTrailingComments.js
File was deleted
node_modules/@babel/types/lib/comments/inheritTrailingComments.js.map
File was deleted
node_modules/@babel/types/lib/comments/inheritsComments.js
File was deleted
node_modules/@babel/types/lib/comments/inheritsComments.js.map
File was deleted
node_modules/@babel/types/lib/comments/removeComments.js
File was deleted
node_modules/@babel/types/lib/comments/removeComments.js.map
File was deleted
node_modules/@babel/types/lib/constants/generated/index.js
File was deleted
node_modules/@babel/types/lib/constants/generated/index.js.map
File was deleted
node_modules/@babel/types/lib/constants/index.js
File was deleted
node_modules/@babel/types/lib/constants/index.js.map
File was deleted
node_modules/@babel/types/lib/converters/ensureBlock.js
File was deleted
node_modules/@babel/types/lib/converters/ensureBlock.js.map
File was deleted
node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
File was deleted
node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map
File was deleted
node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
File was deleted
node_modules/@babel/types/lib/converters/toBindingIdentifierName.js.map
File was deleted
node_modules/@babel/types/lib/converters/toBlock.js
File was deleted
node_modules/@babel/types/lib/converters/toBlock.js.map
File was deleted
node_modules/@babel/types/lib/converters/toComputedKey.js
File was deleted
node_modules/@babel/types/lib/converters/toComputedKey.js.map
File was deleted
node_modules/@babel/types/lib/converters/toExpression.js
File was deleted
node_modules/@babel/types/lib/converters/toExpression.js.map
File was deleted
node_modules/@babel/types/lib/converters/toIdentifier.js
File was deleted
node_modules/@babel/types/lib/converters/toIdentifier.js.map
File was deleted
node_modules/@babel/types/lib/converters/toKeyAlias.js
File was deleted
node_modules/@babel/types/lib/converters/toKeyAlias.js.map
File was deleted
node_modules/@babel/types/lib/converters/toSequenceExpression.js
File was deleted
node_modules/@babel/types/lib/converters/toSequenceExpression.js.map
File was deleted
node_modules/@babel/types/lib/converters/toStatement.js
File was deleted
node_modules/@babel/types/lib/converters/toStatement.js.map
File was deleted
node_modules/@babel/types/lib/converters/valueToNode.js
File was deleted
node_modules/@babel/types/lib/converters/valueToNode.js.map
File was deleted
node_modules/@babel/types/lib/definitions/core.js
File was deleted
node_modules/@babel/types/lib/definitions/core.js.map
File was deleted
node_modules/@babel/types/lib/definitions/deprecated-aliases.js
File was deleted
node_modules/@babel/types/lib/definitions/deprecated-aliases.js.map
File was deleted
node_modules/@babel/types/lib/definitions/experimental.js
File was deleted
node_modules/@babel/types/lib/definitions/experimental.js.map
File was deleted
node_modules/@babel/types/lib/definitions/flow.js
File was deleted
node_modules/@babel/types/lib/definitions/flow.js.map
File was deleted
node_modules/@babel/types/lib/definitions/index.js
File was deleted
node_modules/@babel/types/lib/definitions/index.js.map
File was deleted
node_modules/@babel/types/lib/definitions/jsx.js
File was deleted
node_modules/@babel/types/lib/definitions/jsx.js.map
File was deleted
node_modules/@babel/types/lib/definitions/misc.js
File was deleted
node_modules/@babel/types/lib/definitions/misc.js.map
File was deleted
node_modules/@babel/types/lib/definitions/placeholders.js
File was deleted
node_modules/@babel/types/lib/definitions/placeholders.js.map
File was deleted
node_modules/@babel/types/lib/definitions/typescript.js
File was deleted
node_modules/@babel/types/lib/definitions/typescript.js.map
File was deleted
node_modules/@babel/types/lib/definitions/utils.js
File was deleted
node_modules/@babel/types/lib/definitions/utils.js.map
File was deleted
node_modules/@babel/types/lib/index-legacy.d.ts
File was deleted
node_modules/@babel/types/lib/index.d.ts
File was deleted
node_modules/@babel/types/lib/index.js
File was deleted
node_modules/@babel/types/lib/index.js.flow
File was deleted
node_modules/@babel/types/lib/index.js.map
File was deleted
node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
File was deleted
node_modules/@babel/types/lib/modifications/appendToMemberExpression.js.map
File was deleted
node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
File was deleted
node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js.map
File was deleted
node_modules/@babel/types/lib/modifications/inherits.js
File was deleted
node_modules/@babel/types/lib/modifications/inherits.js.map
File was deleted
node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
File was deleted
node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map
File was deleted
node_modules/@babel/types/lib/modifications/removeProperties.js
File was deleted
node_modules/@babel/types/lib/modifications/removeProperties.js.map
File was deleted
node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
File was deleted
node_modules/@babel/types/lib/modifications/removePropertiesDeep.js.map
File was deleted
node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
File was deleted
node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map
File was deleted
node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js
File was deleted
node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js.map
File was deleted
node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
File was deleted
node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map
File was deleted
node_modules/@babel/types/lib/retrievers/getFunctionName.js
File was deleted
node_modules/@babel/types/lib/retrievers/getFunctionName.js.map
File was deleted
node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
File was deleted
node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js.map
File was deleted
node_modules/@babel/types/lib/traverse/traverse.js
File was deleted
node_modules/@babel/types/lib/traverse/traverse.js.map
File was deleted
node_modules/@babel/types/lib/traverse/traverseFast.js
File was deleted
node_modules/@babel/types/lib/traverse/traverseFast.js.map
File was deleted
node_modules/@babel/types/lib/utils/deprecationWarning.js
File was deleted
node_modules/@babel/types/lib/utils/deprecationWarning.js.map
File was deleted
node_modules/@babel/types/lib/utils/inherit.js
File was deleted
node_modules/@babel/types/lib/utils/inherit.js.map
File was deleted
node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
File was deleted
node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js.map
File was deleted
node_modules/@babel/types/lib/utils/shallowEqual.js
File was deleted
node_modules/@babel/types/lib/utils/shallowEqual.js.map
File was deleted
node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
File was deleted
node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js.map
File was deleted
node_modules/@babel/types/lib/validators/generated/index.js
File was deleted
node_modules/@babel/types/lib/validators/generated/index.js.map
File was deleted
node_modules/@babel/types/lib/validators/is.js
File was deleted
node_modules/@babel/types/lib/validators/is.js.map
File was deleted
node_modules/@babel/types/lib/validators/isBinding.js
File was deleted
node_modules/@babel/types/lib/validators/isBinding.js.map
File was deleted
node_modules/@babel/types/lib/validators/isBlockScoped.js
File was deleted
node_modules/@babel/types/lib/validators/isBlockScoped.js.map
File was deleted
node_modules/@babel/types/lib/validators/isImmutable.js
File was deleted
node_modules/@babel/types/lib/validators/isImmutable.js.map
File was deleted
node_modules/@babel/types/lib/validators/isLet.js
File was deleted
node_modules/@babel/types/lib/validators/isLet.js.map
File was deleted
node_modules/@babel/types/lib/validators/isNode.js
File was deleted
node_modules/@babel/types/lib/validators/isNode.js.map
File was deleted
node_modules/@babel/types/lib/validators/isNodesEquivalent.js
File was deleted
node_modules/@babel/types/lib/validators/isNodesEquivalent.js.map
File was deleted
node_modules/@babel/types/lib/validators/isPlaceholderType.js
File was deleted
node_modules/@babel/types/lib/validators/isPlaceholderType.js.map
File was deleted
node_modules/@babel/types/lib/validators/isReferenced.js
File was deleted
node_modules/@babel/types/lib/validators/isReferenced.js.map
File was deleted
node_modules/@babel/types/lib/validators/isScope.js
File was deleted
node_modules/@babel/types/lib/validators/isScope.js.map
File was deleted
node_modules/@babel/types/lib/validators/isSpecifierDefault.js
File was deleted
node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map
File was deleted
node_modules/@babel/types/lib/validators/isType.js
File was deleted
node_modules/@babel/types/lib/validators/isType.js.map
File was deleted
node_modules/@babel/types/lib/validators/isValidES3Identifier.js
File was deleted
node_modules/@babel/types/lib/validators/isValidES3Identifier.js.map
File was deleted
node_modules/@babel/types/lib/validators/isValidIdentifier.js
File was deleted
node_modules/@babel/types/lib/validators/isValidIdentifier.js.map
File was deleted
node_modules/@babel/types/lib/validators/isVar.js
File was deleted
node_modules/@babel/types/lib/validators/isVar.js.map
File was deleted
node_modules/@babel/types/lib/validators/matchesPattern.js
File was deleted
node_modules/@babel/types/lib/validators/matchesPattern.js.map
File was deleted
node_modules/@babel/types/lib/validators/react/isCompatTag.js
File was deleted
node_modules/@babel/types/lib/validators/react/isCompatTag.js.map
File was deleted
node_modules/@babel/types/lib/validators/react/isReactComponent.js
File was deleted
node_modules/@babel/types/lib/validators/react/isReactComponent.js.map
File was deleted
node_modules/@babel/types/lib/validators/validate.js
File was deleted
node_modules/@babel/types/lib/validators/validate.js.map
File was deleted
node_modules/@babel/types/package.json
File was deleted
node_modules/@uqrcode/js/LICENSE.md
File was deleted
node_modules/@uqrcode/js/README.md
File was deleted
node_modules/@uqrcode/js/package.json
File was deleted
node_modules/@uqrcode/js/uqrcode.js
File was deleted
node_modules/@vue/compiler-core/LICENSE
File was deleted
node_modules/@vue/compiler-core/README.md
File was deleted
node_modules/@vue/compiler-core/dist/compiler-core.cjs.js
File was deleted
node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js
File was deleted
node_modules/@vue/compiler-core/dist/compiler-core.d.ts
File was deleted
node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js
File was deleted
node_modules/@vue/compiler-core/index.js
File was deleted
node_modules/@vue/compiler-core/package.json
File was deleted
node_modules/@vue/compiler-dom/LICENSE
File was deleted
node_modules/@vue/compiler-dom/README.md
File was deleted
node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js
File was deleted
node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js
File was deleted
node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts
File was deleted
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js
File was deleted
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js
File was deleted
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js
File was deleted
node_modules/@vue/compiler-dom/dist/compiler-dom.global.js
File was deleted
node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js
File was deleted
node_modules/@vue/compiler-dom/index.js
File was deleted
node_modules/@vue/compiler-dom/package.json
File was deleted
node_modules/@vue/compiler-sfc/LICENSE
File was deleted
node_modules/@vue/compiler-sfc/README.md
File was deleted
node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js
File was deleted
node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts
File was deleted
node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js
File was deleted
node_modules/@vue/compiler-sfc/package.json
File was deleted
node_modules/@vue/compiler-ssr/LICENSE
File was deleted
node_modules/@vue/compiler-ssr/README.md
File was deleted
node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js
File was deleted
node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts
File was deleted
node_modules/@vue/compiler-ssr/package.json
File was deleted
node_modules/@vue/reactivity/LICENSE
File was deleted
node_modules/@vue/reactivity/README.md
File was deleted
node_modules/@vue/reactivity/dist/reactivity.cjs.js
File was deleted
node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js
File was deleted
node_modules/@vue/reactivity/dist/reactivity.d.ts
File was deleted
node_modules/@vue/reactivity/dist/reactivity.esm-browser.js
File was deleted
node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js
File was deleted
node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
File was deleted
node_modules/@vue/reactivity/dist/reactivity.global.js
File was deleted
node_modules/@vue/reactivity/dist/reactivity.global.prod.js
File was deleted
node_modules/@vue/reactivity/index.js
File was deleted
node_modules/@vue/reactivity/package.json
File was deleted
node_modules/@vue/runtime-core/LICENSE
File was deleted
node_modules/@vue/runtime-core/README.md
File was deleted
node_modules/@vue/runtime-core/dist/runtime-core.cjs.js
File was deleted
node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js
File was deleted
node_modules/@vue/runtime-core/dist/runtime-core.d.ts
File was deleted
node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
File was deleted
node_modules/@vue/runtime-core/index.js
File was deleted
node_modules/@vue/runtime-core/package.json
File was deleted
node_modules/@vue/runtime-dom/LICENSE
File was deleted
node_modules/@vue/runtime-dom/README.md
File was deleted
node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js
File was deleted
node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js
File was deleted
node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
File was deleted
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js
File was deleted
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js
File was deleted
node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
File was deleted
node_modules/@vue/runtime-dom/dist/runtime-dom.global.js
File was deleted
node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js
File was deleted
node_modules/@vue/runtime-dom/index.js
File was deleted
node_modules/@vue/runtime-dom/package.json
File was deleted
node_modules/@vue/server-renderer/LICENSE
File was deleted
node_modules/@vue/server-renderer/README.md
File was deleted
node_modules/@vue/server-renderer/dist/server-renderer.cjs.js
File was deleted
node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js
File was deleted
node_modules/@vue/server-renderer/dist/server-renderer.d.ts
File was deleted
node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js
File was deleted
node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js
File was deleted
node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js
File was deleted
node_modules/@vue/server-renderer/index.js
File was deleted
node_modules/@vue/server-renderer/package.json
File was deleted
node_modules/@vue/shared/LICENSE
File was deleted
node_modules/@vue/shared/README.md
File was deleted
node_modules/@vue/shared/dist/shared.cjs.js
File was deleted
node_modules/@vue/shared/dist/shared.cjs.prod.js
File was deleted
node_modules/@vue/shared/dist/shared.d.ts
File was deleted
node_modules/@vue/shared/dist/shared.esm-bundler.js
File was deleted
node_modules/@vue/shared/index.js
File was deleted
node_modules/@vue/shared/package.json
File was deleted
node_modules/ansi-regex/index.d.ts
File was deleted
node_modules/ansi-regex/index.js
File was deleted
node_modules/ansi-regex/license
File was deleted
node_modules/ansi-regex/package.json
File was deleted
node_modules/ansi-regex/readme.md
File was deleted
node_modules/ansi-styles/index.d.ts
File was deleted
node_modules/ansi-styles/index.js
File was deleted
node_modules/ansi-styles/license
File was deleted
node_modules/ansi-styles/package.json
File was deleted
node_modules/ansi-styles/readme.md
File was deleted
node_modules/camelcase/index.d.ts
File was deleted
node_modules/camelcase/index.js
File was deleted
node_modules/camelcase/license
File was deleted
node_modules/camelcase/package.json
File was deleted
node_modules/camelcase/readme.md
File was deleted
node_modules/cliui/CHANGELOG.md
File was deleted
node_modules/cliui/LICENSE.txt
File was deleted
node_modules/cliui/README.md
File was deleted
node_modules/cliui/index.js
File was deleted
node_modules/cliui/package.json
File was deleted
node_modules/color-convert/CHANGELOG.md
File was deleted
node_modules/color-convert/LICENSE
File was deleted
node_modules/color-convert/README.md
File was deleted
node_modules/color-convert/conversions.js
File was deleted
node_modules/color-convert/index.js
File was deleted
node_modules/color-convert/package.json
File was deleted
node_modules/color-convert/route.js
File was deleted
node_modules/color-name/LICENSE
File was deleted
node_modules/color-name/README.md
File was deleted
node_modules/color-name/index.js
File was deleted
node_modules/color-name/package.json
File was deleted
node_modules/csstype/LICENSE
File was deleted
node_modules/csstype/README.md
File was deleted
node_modules/csstype/index.d.ts
File was deleted
node_modules/csstype/index.js.flow
File was deleted
node_modules/csstype/package.json
File was deleted
node_modules/decamelize/index.js
File was deleted
node_modules/decamelize/license
File was deleted
node_modules/decamelize/package.json
File was deleted
node_modules/decamelize/readme.md
File was deleted
node_modules/dijkstrajs/.travis.yml
File was deleted
node_modules/dijkstrajs/CONTRIBUTING.md
File was deleted
node_modules/dijkstrajs/LICENSE.md
File was deleted
node_modules/dijkstrajs/README.md
File was deleted
node_modules/dijkstrajs/dijkstra.js
File was deleted
node_modules/dijkstrajs/package.json
File was deleted
node_modules/dijkstrajs/test/dijkstra.test.js
File was deleted
node_modules/emoji-regex/LICENSE-MIT.txt
File was deleted
node_modules/emoji-regex/README.md
File was deleted
node_modules/emoji-regex/es2015/index.js
File was deleted
node_modules/emoji-regex/es2015/text.js
File was deleted
node_modules/emoji-regex/index.d.ts
File was deleted
node_modules/emoji-regex/index.js
File was deleted
node_modules/emoji-regex/package.json
File was deleted
node_modules/emoji-regex/text.js
File was deleted
node_modules/entities/LICENSE
File was deleted
node_modules/entities/lib/decode.d.ts
File was deleted
node_modules/entities/lib/decode.d.ts.map
File was deleted
node_modules/entities/lib/decode.js
File was deleted
node_modules/entities/lib/decode.js.map
File was deleted
node_modules/entities/lib/decode_codepoint.d.ts
File was deleted
node_modules/entities/lib/decode_codepoint.d.ts.map
File was deleted
node_modules/entities/lib/decode_codepoint.js
File was deleted
node_modules/entities/lib/decode_codepoint.js.map
File was deleted
node_modules/entities/lib/encode.d.ts
File was deleted
node_modules/entities/lib/encode.d.ts.map
File was deleted
node_modules/entities/lib/encode.js
File was deleted
node_modules/entities/lib/encode.js.map
File was deleted
node_modules/entities/lib/escape.d.ts
File was deleted
node_modules/entities/lib/escape.d.ts.map
File was deleted
node_modules/entities/lib/escape.js
File was deleted
node_modules/entities/lib/escape.js.map
File was deleted
node_modules/entities/lib/esm/decode.d.ts
File was deleted
node_modules/entities/lib/esm/decode.d.ts.map
File was deleted
node_modules/entities/lib/esm/decode.js
File was deleted
node_modules/entities/lib/esm/decode.js.map
File was deleted
node_modules/entities/lib/esm/decode_codepoint.d.ts
File was deleted
node_modules/entities/lib/esm/decode_codepoint.d.ts.map
File was deleted
node_modules/entities/lib/esm/decode_codepoint.js
File was deleted
node_modules/entities/lib/esm/decode_codepoint.js.map
File was deleted
node_modules/entities/lib/esm/encode.d.ts
File was deleted
node_modules/entities/lib/esm/encode.d.ts.map
File was deleted
node_modules/entities/lib/esm/encode.js
File was deleted
node_modules/entities/lib/esm/encode.js.map
File was deleted
node_modules/entities/lib/esm/escape.d.ts
File was deleted
node_modules/entities/lib/esm/escape.d.ts.map
File was deleted
node_modules/entities/lib/esm/escape.js
File was deleted
node_modules/entities/lib/esm/escape.js.map
File was deleted
node_modules/entities/lib/esm/generated/decode-data-html.d.ts
File was deleted
node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map
File was deleted
node_modules/entities/lib/esm/generated/decode-data-html.js
File was deleted
node_modules/entities/lib/esm/generated/decode-data-html.js.map
File was deleted
node_modules/entities/lib/esm/generated/decode-data-xml.d.ts
File was deleted
node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map
File was deleted
node_modules/entities/lib/esm/generated/decode-data-xml.js
File was deleted
node_modules/entities/lib/esm/generated/decode-data-xml.js.map
File was deleted
node_modules/entities/lib/esm/generated/encode-html.d.ts
File was deleted
node_modules/entities/lib/esm/generated/encode-html.d.ts.map
File was deleted
node_modules/entities/lib/esm/generated/encode-html.js
File was deleted
node_modules/entities/lib/esm/generated/encode-html.js.map
File was deleted
node_modules/entities/lib/esm/index.d.ts
File was deleted
node_modules/entities/lib/esm/index.d.ts.map
File was deleted
node_modules/entities/lib/esm/index.js
File was deleted
node_modules/entities/lib/esm/index.js.map
File was deleted
node_modules/entities/lib/esm/package.json
File was deleted
node_modules/entities/lib/generated/decode-data-html.d.ts
File was deleted
node_modules/entities/lib/generated/decode-data-html.d.ts.map
File was deleted
node_modules/entities/lib/generated/decode-data-html.js
File was deleted
node_modules/entities/lib/generated/decode-data-html.js.map
File was deleted
node_modules/entities/lib/generated/decode-data-xml.d.ts
File was deleted
node_modules/entities/lib/generated/decode-data-xml.d.ts.map
File was deleted
node_modules/entities/lib/generated/decode-data-xml.js
File was deleted
node_modules/entities/lib/generated/decode-data-xml.js.map
File was deleted
node_modules/entities/lib/generated/encode-html.d.ts
File was deleted
node_modules/entities/lib/generated/encode-html.d.ts.map
File was deleted
node_modules/entities/lib/generated/encode-html.js
File was deleted
node_modules/entities/lib/generated/encode-html.js.map
File was deleted
node_modules/entities/lib/index.d.ts
File was deleted
node_modules/entities/lib/index.d.ts.map
File was deleted
node_modules/entities/lib/index.js
File was deleted
node_modules/entities/lib/index.js.map
File was deleted
node_modules/entities/package.json
File was deleted
node_modules/entities/readme.md
File was deleted
node_modules/estree-walker/CHANGELOG.md
File was deleted
node_modules/estree-walker/LICENSE
File was deleted
node_modules/estree-walker/README.md
File was deleted
node_modules/estree-walker/dist/esm/estree-walker.js
File was deleted
node_modules/estree-walker/dist/esm/package.json
File was deleted
node_modules/estree-walker/dist/umd/estree-walker.js
File was deleted
node_modules/estree-walker/package.json
File was deleted
node_modules/estree-walker/src/async.js
File was deleted
node_modules/estree-walker/src/index.js
File was deleted
node_modules/estree-walker/src/package.json
File was deleted
node_modules/estree-walker/src/sync.js
File was deleted
node_modules/estree-walker/src/walker.js
File was deleted
node_modules/estree-walker/types/async.d.ts
File was deleted
node_modules/estree-walker/types/index.d.ts
File was deleted
node_modules/estree-walker/types/sync.d.ts
File was deleted
node_modules/estree-walker/types/tsconfig.tsbuildinfo
File was deleted
node_modules/estree-walker/types/walker.d.ts
File was deleted
node_modules/find-up/index.d.ts
File was deleted
node_modules/find-up/index.js
File was deleted
node_modules/find-up/license
File was deleted
node_modules/find-up/package.json
File was deleted
node_modules/find-up/readme.md
File was deleted
node_modules/get-caller-file/LICENSE.md
File was deleted
node_modules/get-caller-file/README.md
File was deleted
node_modules/get-caller-file/index.d.ts
File was deleted
node_modules/get-caller-file/index.js
File was deleted
node_modules/get-caller-file/index.js.map
File was deleted
node_modules/get-caller-file/package.json
File was deleted
node_modules/is-fullwidth-code-point/index.d.ts
File was deleted
node_modules/is-fullwidth-code-point/index.js
File was deleted
node_modules/is-fullwidth-code-point/license
File was deleted
node_modules/is-fullwidth-code-point/package.json
File was deleted
node_modules/is-fullwidth-code-point/readme.md
File was deleted
node_modules/locate-path/index.d.ts
File was deleted
node_modules/locate-path/index.js
File was deleted
node_modules/locate-path/license
File was deleted
node_modules/locate-path/package.json
File was deleted
node_modules/locate-path/readme.md
File was deleted
node_modules/magic-string/LICENSE
File was deleted
node_modules/magic-string/README.md
File was deleted
node_modules/magic-string/dist/magic-string.cjs.d.ts
File was deleted
node_modules/magic-string/dist/magic-string.cjs.js
File was deleted
node_modules/magic-string/dist/magic-string.cjs.js.map
File was deleted
node_modules/magic-string/dist/magic-string.es.d.mts
File was deleted
node_modules/magic-string/dist/magic-string.es.mjs
File was deleted
node_modules/magic-string/dist/magic-string.es.mjs.map
File was deleted
node_modules/magic-string/dist/magic-string.umd.js
File was deleted
node_modules/magic-string/dist/magic-string.umd.js.map
File was deleted
node_modules/magic-string/package.json
File was deleted
node_modules/mp-html/.eslintignore
New file
@@ -0,0 +1 @@
*.min.js
node_modules/mp-html/.eslintrc.json
New file
@@ -0,0 +1,30 @@
{
  "env": {
    "browser": true,
    "es6": true,
    "node": true
  },
  "extends": [
    "eslint:recommended",
    "plugin:vue/essential"
  ],
  "globals": {
    "Component": "readonly",
    "wx": "readonly",
    "qq": "readonly",
    "swan": "readonly",
    "my": "readonly",
    "tt": "readonly",
    "uni": "readonly",
    "plus": "readonly",
    "weex": "readonly",
    "requirePlugin": "readonly"
  },
  "rules": {
    "semi": [
      "error",
      "never"
    ],
    "no-console": "error"
  }
}
node_modules/mp-html/.github/ISSUE_TEMPLATE/bug.md
New file
@@ -0,0 +1,23 @@
---
name: æäº¤ Bug
about: å¦‚果发现某部分功能表现与文档描述不符或出错,请选择此模板反馈
title: ''
labels: ''
assignees: ''
---
<!--注意:必须严格按照下列要求反馈 bug,以便尽快确定问题并修复,不符合要求的反馈不予处理-->
## ä½¿ç”¨çŽ¯å¢ƒ
<!--请注明使用的小程序平台和基础库版本等环境信息-->
## é—®é¢˜æè¿°
<!--请详细描述遇到的问题,可以附上截图-->
## å¤çŽ°æ–¹å¼
<!--
注意:无法复现的问题将不予处理
如果将您使用的 html å†…容拷贝到示例项目中就能复现问题,请在下方附上您使用的 html å†…容
如果在示例项目中无法复现,请附上能够复现的 demo é¡¹ç›®å¹¶è¯´æ˜Žå¤çŽ°æ–¹å¼
-->
node_modules/mp-html/.github/ISSUE_TEMPLATE/enhancement.md
New file
@@ -0,0 +1,14 @@
---
name: æ–°åŠŸèƒ½éœ€æ±‚
about: å¦‚果需要某些新功能或有改进建议,请选择此模板反馈
title: ''
labels: ''
assignees: ''
---
<!--注意:提出的新功能或改进建议应有一定的应用场景和通用性,如果您已经实现了改进可以直接提交 pr-->
## æ–°åŠŸèƒ½æè¿°
## åº”用场景
node_modules/mp-html/.github/ISSUE_TEMPLATE/question.md
New file
@@ -0,0 +1,12 @@
---
name: å’¨è¯¢é—®é¢˜
about: å¦‚果找不到文档对某功能的描述或描述不清,请选择此模板咨询
title: ''
labels: ''
assignees: ''
---
<!--注意:提问前请确认已经在文档中查找过没有相关资料或文档没有描述清楚-->
## é—®é¢˜æè¿°
node_modules/mp-html/.stylelintrc.json
New file
@@ -0,0 +1,6 @@
{
  "extends": [
    "stylelint-config-standard",
    "stylelint-config-recess-order"
  ]
}
node_modules/mp-html/LICENSE
New file
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019-present Jin Yufeng
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.
node_modules/mp-html/README.md
New file
@@ -0,0 +1,241 @@
# mp-html
> ä¸€ä¸ªå¼ºå¤§çš„小程序富文本组件
![star](https://img.shields.io/github/stars/jin-yufeng/mp-html)
![forks](https://img.shields.io/github/forks/jin-yufeng/mp-html)
[![npm](https://img.shields.io/npm/v/mp-html)](https://www.npmjs.com/package/mp-html)
![downloads](https://img.shields.io/npm/dt/mp-html)
[![Coverage Status](https://coveralls.io/repos/github/jin-yufeng/mp-html/badge.svg?branch=master)](https://coveralls.io/github/jin-yufeng/mp-html?branch=master)
![license](https://img.shields.io/github/license/jin-yufeng/mp-html)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
## åŠŸèƒ½ä»‹ç»
- æ”¯æŒåœ¨å¤šä¸ªä¸»æµçš„小程序平台和 `uni-app` ä¸­ä½¿ç”¨
- æ”¯æŒä¸°å¯Œçš„æ ‡ç­¾ï¼ˆåŒ…括 `table`、`video`、`svg` ç­‰ï¼‰
- æ”¯æŒä¸°å¯Œçš„事件效果(自动预览图片、链接处理等)
- æ”¯æŒè®¾ç½®å ä½å›¾ï¼ˆåŠ è½½ä¸­ã€å‡ºé”™æ—¶ã€é¢„è§ˆæ—¶ï¼‰
- æ”¯æŒé”šç‚¹è·³è½¬ã€é•¿æŒ‰å¤åˆ¶ç­‰ä¸°å¯ŒåŠŸèƒ½
- æ”¯æŒå¤§éƒ¨åˆ† *html* å®žä½“
- ä¸°å¯Œçš„æ’件(关键词搜索、内容编辑、`latex` å…¬å¼ç­‰ï¼‰
- æ•ˆçŽ‡é«˜ã€å®¹é”™æ€§å¼ºä¸”è½»é‡åŒ–ï¼ˆ`≈25KB`,`9KB gzipped`)
查看 [功能介绍](https://jin-yufeng.github.io/mp-html/#/overview/feature) äº†è§£æ›´å¤š
## ä½¿ç”¨æ–¹æ³•
### åŽŸç”Ÿå¹³å°
- `npm` æ–¹å¼
  1. åœ¨é¡¹ç›®ç›®å½•下安装组件包
     ```bash
     npm install mp-html
     ```
  2. å¼€å‘者工具中勾选 `使用 npm æ¨¡å—`(若没有此选项则不需要)并点击 `工具 - æž„建 npm`
  3. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ `json` æ–‡ä»¶ä¸­æ·»åŠ 
     ```json
     {
       "usingComponents": {
         "mp-html": "mp-html"
       }
     }
     ```
  4. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ `wxml` æ–‡ä»¶ä¸­æ·»åŠ 
     ```html
     <mp-html content="{{html}}" />
     ```
  5. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ `js` æ–‡ä»¶ä¸­æ·»åŠ 
     ```javascript
     Page({
       onLoad () {
         this.setData({
           html: '<div>Hello World!</div>'
         })
       }
     })
     ```
- æºç æ–¹å¼
  1. å°†æºç ä¸­å¯¹åº”平台的代码包(`dist/platform`)拷贝到 `components` ç›®å½•下,更名为 `mp-html`
  2. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ `json` æ–‡ä»¶ä¸­æ·»åŠ 
     ```json
     {
       "usingComponents": {
         "mp-html": "/components/mp-html/index"
       }
     }
     ```
  åŽç»­æ­¥éª¤åŒä¸Š
查看 [快速开始](https://jin-yufeng.github.io/mp-html/#/overview/quickstart) äº†è§£æ›´å¤š
### uni-app
- æºç æ–¹å¼
  1. å°†æºç ä¸­ `dist/uni-app` å†…的内容拷贝到项目根目录下
     å¯ä»¥ç›´æŽ¥é€šè¿‡ [插件市场](https://ext.dcloud.net.cn/plugin?id=805) å¼•å…¥
  2. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ `vue` æ–‡ä»¶ä¸­æ·»åŠ 
     ```vue
     <template>
       <view>
         <mp-html :content="html" />
       </view>
     </template>
     <script>
       import mpHtml from '@/components/mp-html/mp-html'
       export default {
         // HBuilderX 2.5.5+ å¯ä»¥é€šè¿‡ easycom è‡ªåЍ引入
         components: {
           mpHtml
         },
         data () {
           return {
             html: '<div>Hello World!</div>'
           }
         }
       }
     </script>
     ```
- `npm` æ–¹å¼
  1. åœ¨é¡¹ç›®ç›®å½•下安装组件包
     ```bash
     npm install mp-html
     ```
  2. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ `vue` æ–‡ä»¶ä¸­æ·»åŠ 
     ```vue
     <template>
       <view>
         <mp-html :content="html" />
       </view>
     </template>
     <script>
       import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html'
       export default {
         // ä¸å¯çœç•¥
         components: {
           mpHtml
         },
         data () {
           return {
             html: '<div>Hello World!</div>'
           }
         }
       }
     </script>
     ```
  ä½¿ç”¨ `cli` æ–¹å¼è¿è¡Œçš„项目,通过 `npm` æ–¹å¼å¼•入时,需要在 `vue.config.js` ä¸­é…ç½® `transpileDependencies`,详情可见 [#330](https://github.com/jin-yufeng/mp-html/issues/330#issuecomment-913617687)
  å¦‚果在 `nvue` ä¸­ä½¿ç”¨è¿˜è¦å°† `dist/uni-app/static` ç›®å½•下的内容拷贝到项目的 `static` ç›®å½•下,否则无法运行
查看 [快速开始](https://jin-yufeng.github.io/mp-html/#/overview/quickstart) äº†è§£æ›´å¤š
## ç»„件属性
| å±žæ€§ | ç±»åž‹ | é»˜è®¤å€¼ | è¯´æ˜Ž |
|:---:|:---:|:---:|---|
| container-style | String |  | å®¹å™¨çš„æ ·å¼ï¼ˆ[2.1.0+](https://jin-yufeng.github.io/mp-html/#/changelog/changelog#v210)) |
| content | String |  | ç”¨äºŽæ¸²æŸ“çš„ html å­—符串 |
| copy-link | Boolean | true | æ˜¯å¦å…è®¸å¤–部链接被点击时自动复制 |
| domain | String |  | ä¸»åŸŸåï¼ˆç”¨äºŽé“¾æŽ¥æ‹¼æŽ¥ï¼‰ |
| error-img | String |  | å›¾ç‰‡å‡ºé”™æ—¶çš„占位图链接 |
| lazy-load | Boolean | false | æ˜¯å¦å¼€å¯å›¾ç‰‡æ‡’加载 |
| loading-img | String |  | å›¾ç‰‡åŠ è½½è¿‡ç¨‹ä¸­çš„å ä½å›¾é“¾æŽ¥ |
| pause-video | Boolean | true | æ˜¯å¦åœ¨æ’­æ”¾ä¸€ä¸ªè§†é¢‘时自动暂停其他视频 |
| preview-img | Boolean | true | æ˜¯å¦å…è®¸å›¾ç‰‡è¢«ç‚¹å‡»æ—¶è‡ªåŠ¨é¢„è§ˆ |
| scroll-table | Boolean | false | æ˜¯å¦ç»™æ¯ä¸ªè¡¨æ ¼æ·»åŠ ä¸€ä¸ªæ»šåŠ¨å±‚ä½¿å…¶èƒ½å•ç‹¬æ¨ªå‘æ»šåŠ¨ |
| selectable | Boolean | false | æ˜¯å¦å¼€å¯æ–‡æœ¬é•¿æŒ‰å¤åˆ¶ |
| set-title | Boolean | true | æ˜¯å¦å°† title æ ‡ç­¾çš„内容设置到页面标题 |
| show-img-menu | Boolean | true | æ˜¯å¦å…è®¸å›¾ç‰‡è¢«é•¿æŒ‰æ—¶æ˜¾ç¤ºèœå• |
| tag-style | Object |  | è®¾ç½®æ ‡ç­¾çš„默认样式 |
| use-anchor | Boolean | false | æ˜¯å¦ä½¿ç”¨é”šç‚¹é“¾æŽ¥ |
查看 [属性](https://jin-yufeng.github.io/mp-html/#/basic/prop) äº†è§£æ›´å¤š
## ç»„件事件
| åç§° | è§¦å‘时机 |
|:---:|---|
| load | dom æ ‘加载完毕时 |
| ready | å›¾ç‰‡åŠ è½½å®Œæ¯•æ—¶ |
| error | å‘生渲染错误时 |
| imgtap | å›¾ç‰‡è¢«ç‚¹å‡»æ—¶ |
| linktap | é“¾æŽ¥è¢«ç‚¹å‡»æ—¶ |
查看 [事件](https://jin-yufeng.github.io/mp-html/#/basic/event) äº†è§£æ›´å¤š
## api
组件实例上提供了一些 `api` æ–¹æ³•可供调用
| åç§° | ä½œç”¨ |
|:---:|---|
| in | å°†é”šç‚¹è·³è½¬çš„范围限定在一个 scroll-view å†… |
| navigateTo | é”šç‚¹è·³è½¬ |
| getText | èŽ·å–æ–‡æœ¬å†…å®¹ |
| getRect | èŽ·å–å¯Œæ–‡æœ¬å†…å®¹çš„ä½ç½®å’Œå¤§å° |
| setContent | è®¾ç½®å¯Œæ–‡æœ¬å†…容 |
| imgList | èŽ·å–æ‰€æœ‰å›¾ç‰‡çš„æ•°ç»„ |
| pauseMedia | æš‚停播放音视频([2.2.2+](https://jin-yufeng.github.io/mp-html/#/changelog/changelog#v222)) |
| setPlaybackRate | è®¾ç½®éŸ³è§†é¢‘播放速率([2.4.0+](https://jin-yufeng.github.io/mp-html/#/changelog/changelog#v240)) |
查看 [api](https://jin-yufeng.github.io/mp-html/#/advanced/api) äº†è§£æ›´å¤š
## æ’件扩展
除基本功能外,本组件还提供了丰富的扩展,可按照需要选用
| åç§° | ä½œç”¨ |
|:---:|---|
| audio | éŸ³ä¹æ’­æ”¾å™¨ |
| editable | å¯Œæ–‡æœ¬ç¼–辑 |
| emoji | è§£æž emoji |
| highlight | ä»£ç å—高亮显示 |
| markdown | æ¸²æŸ“ markdown |
| search | å…³é”®è¯æœç´¢ |
| style | åŒ¹é… style æ ‡ç­¾ä¸­çš„æ ·å¼ |
| txv-video | ä½¿ç”¨è…¾è®¯è§†é¢‘ |
| img-cache | å›¾ç‰‡ç¼“å­˜ by [@PentaTea](https://github.com/PentaTea) |
| latex | æ¸²æŸ“ latex å…¬å¼ by [@Zeng-J](https://github.com/Zeng-J) |
| card | å¡ç‰‡å±•示 by [@whoooami](https://github.com/whoooami) |
查看 [插件](https://jin-yufeng.github.io/mp-html/#/advanced/plugin) äº†è§£æ›´å¤š
## è®¸å¯ä¸Žæ”¯æŒ
- è®¸å¯
  æ‚¨å¯ä»¥å…è´¹çš„使用(包括商用)、复制或修改本组件 [MIT License](https://github.com/jin-yufeng/mp-html/blob/master/LICENSE)
  åœ¨ç”¨äºŽç”Ÿäº§çŽ¯å¢ƒå‰åŠ¡å¿…ç»è¿‡å……åˆ†æµ‹è¯•ï¼Œç”±æ’ä»¶ `bug` å¸¦æ¥çš„æŸå¤±æ¦‚不负责(可以自行修改源码)
- è”ç³»
  æ¬¢è¿ŽåŠ å…¥ `QQ` äº¤æµç¾¤ï¼š
  ç¾¤1(已满):`699734691`
  ç¾¤2(已满):`778239129`
  ç¾¤3:`960265313`
## æ›´æ–°æ—¥å¿—
- v2.5.1 (20250420)
  1. `U` `uni-app` åŒ…适配鸿蒙 `APP` [详细](https://github.com/jin-yufeng/mp-html/issues/615)
  2. `U` å¾®ä¿¡å°ç¨‹åºæ›¿æ¢åºŸå¼ƒ `api` `getSystemInfoSync` [详细](https://github.com/jin-yufeng/mp-html/issues/613)
  3. `F` ä¿®å¤äº†å¾®ä¿¡å°ç¨‹åº `glass-easel` æ¡†æž¶ä¸‹çœŸæœºæ¢è¡Œå¼‚常的问题 [详细](https://github.com/jin-yufeng/mp-html/pull/607) by [@PaperStrike](https://github.com/PaperStrike)
  4. `F` ä¿®å¤äº† `uni-app` åŒ… `app` ç«¯æ’­æ”¾è§†é¢‘可能报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/617)
  5. `F` ä¿®å¤äº† `latex` æ’件可能出现 `xxx can be used only in display mode` çš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/632)
  6. `F` ä¿®å¤äº† `uni-app` åŒ… `latex` å…¬å¼å¯èƒ½ä¸æ˜¾ç¤ºçš„问题  [#599](https://github.com/jin-yufeng/mp-html/issues/599)、[#627](https://github.com/jin-yufeng/mp-html/issues/627)
- v2.5.0 (20240422)
  1. `U` `play` äº‹ä»¶å¢žåŠ è¿”å›ž `src` ç­‰ä¿¡æ¯ [详细](https://github.com/jin-yufeng/mp-html/issues/526)
  2. `U` `preview-img` å±žæ€§æ”¯æŒè®¾ç½®ä¸º `all` å¼€å¯ `base64` å›¾ç‰‡é¢„览 [详细](https://github.com/jin-yufeng/mp-html/issues/536)
  3. `U` `editable` æ’件增加简易模式(点击文字直接编辑)
  4. `U` `latex` æ’件支持块级公式 [详细](https://github.com/jin-yufeng/mp-html/issues/582)
  5. `F` ä¿®å¤äº†è¡¨æ ¼éƒ¨åˆ†æƒ…况下背景丢失的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/587)
  6. `F` ä¿®å¤äº†éƒ¨åˆ† `svg` æ— æ³•显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/591)
  7. `F` ä¿®å¤äº† `uni-app` åŒ… `h5` å’Œ `app` ç«¯éƒ¨åˆ†æƒ…况下样式无法识别的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/518)
  8. `F` ä¿®å¤äº† `latex` æ’件部分情况下显示不正确的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/580)
  9. `F` ä¿®å¤äº† `editable` æ’件表格无法删除的问题
  10. `F` ä¿®å¤äº† `editable` æ’ä»¶ `uni-app` åŒ… `vue3` `h5` ç«¯ç‚¹å‡»å›¾ç‰‡æŠ¥é”™çš„问题
  11. `F` ä¿®å¤äº† `editable` æ’ä»¶ `uni-app` åŒ…点击表格没有菜单栏的问题
  ä»Ž `1.x` çš„升级方法可见 [更新指南](https://jin-yufeng.github.io/mp-html/#/changelog/changelog?id=v200)
查看 [更新日志](https://jin-yufeng.github.io/mp-html/#/changelog/changelog) äº†è§£æ›´å¤š
node_modules/mp-html/dist/mp-alipay/index.acss
New file
@@ -0,0 +1 @@
._root{padding:1px 0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}._select{-webkit-user-select:text;user-select:text}
node_modules/mp-html/dist/mp-alipay/index.axml
New file
@@ -0,0 +1 @@
<view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}"><slot a:if="{{!nodes[0]}}"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu,selectable]}}" onAdd="_add"/></view>
node_modules/mp-html/dist/mp-alipay/index.js
New file
@@ -0,0 +1,8 @@
"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}/*!
 * mp-html v2.5.1
 * https://github.com/jin-yufeng/mp-html
 *
 * Released under the MIT license
 * Author: Jin Yufeng
 */
var t=require("./parser"),n=[];Component({data:{nodes:[]},props:{containerStyle:"",content:"",copyLink:!0,domain:"",errorImg:"",lazyLoad:!1,loadingImg:"",pauseVideo:!0,previewImg:!0,scrollTable:!1,setTitle:!0,showImgMenu:!0,tagStyle:{}},didMount:function(){this.plugins=[];for(var e=n.length;e--;)this.plugins.push(new n[e](this));this.props.content&&this.setContent(this.props.content)},didUpdate:function(e){e.content!==this.props.content&&this.setContent(this.props.content)},didUnmount:function(){this._hook("onDetached")},methods:{in:function(e,t,n){e&&t&&n&&(this._in={page:e,selector:t,scrollTop:n})},navigateTo:function(t,n){var i=this;return new Promise(function(o,r){if(!i.props.useAnchor)return void r(Error("Anchor is disabled"));var s=my.createSelectorQuery().select((i._in?i._in.selector:"._root")+(t?"".concat(" ","#").concat(t):"")).boundingClientRect();i._in?s.select(i._in.selector).scrollOffset().select(i._in.selector).boundingClientRect():s.selectViewport().scrollOffset(),s.exec(function(t){if(!t[0])return void r(Error("Label not found"));var s=t[1].scrollTop+t[0].top-(t[2]?t[2].top:0)+(n||parseInt(i.props.useAnchor)||0);i._in?i._in.page.setData(e({},i._in.scrollTop,s)):my.pageScrollTo({scrollTop:s,duration:300}),o()})})},getText:function(e){var t="";return function e(n){for(var i=0;i<n.length;i++){var o=n[i];if("text"===o.type)t+=o.text.replace(/&amp;/g,"&");else if("br"===o.name)t+="\n";else{var r="p"===o.name||"div"===o.name||"tr"===o.name||"li"===o.name||"h"===o.name[0]&&o.name[1]>"0"&&o.name[1]<"7";r&&t&&"\n"!==t[t.length-1]&&(t+="\n"),o.children&&e(o.children),r&&"\n"!==t[t.length-1]?t+="\n":"td"!==o.name&&"th"!==o.name||(t+="\t")}}}(e||this.data.nodes),t},getRect:function(){return new Promise(function(e,t){my.createSelectorQuery().select("._root").boundingClientRect().exec(function(n){return n[0]?e(n[0]):t(Error("Root label not found"))})})},pauseMedia:function(){for(var e=(this._videos||[]).length;e--;)this._videos[e].pause()},setPlaybackRate:function(e){this.playbackRate=e;for(var t=(this._videos||[]).length;t--;)this._videos[t].playbackRate(e)},setContent:function(e,n){var i=this;this.imgList&&n||(this.imgList=[]),this._videos=[];var o={},r=new t(this).parse(e);if(n)for(var s=this.data.nodes.length,a=r.length;a--;)o["nodes[".concat(s+a,"]")]=r[a];else o.nodes=r;if(this.setData(o,function(){i._hook("onLoad"),i.props.onLoad&&i.props.onLoad()}),this.props.lazyLoad||this.imgList._unloadimgs<this.imgList.length/2){var l=0,c=function e(t){t&&t.height||(t={}),t.height===l?i.props.onReady&&i.props.onReady(t):(l=t.height,setTimeout(function(){i.getRect().then(e).catch(e)},350))};this.getRect().then(c).catch(c)}else this.imgList._unloadimgs||this.getRect().then(function(e){i.props.onReady&&i.props.onReady(e)}).catch(function(){i.props.onReady&&i.props.onReady({})})},_hook:function(e){for(var t=n.length;t--;)this.plugins[t][e]&&this.plugins[t][e]()},_add:function(e){e.root=this}}});
node_modules/mp-html/dist/mp-alipay/index.json
New file
@@ -0,0 +1 @@
{"component":true,"usingComponents":{"node":"./node/node"}}
node_modules/mp-html/dist/mp-alipay/node/node.acss
New file
@@ -0,0 +1 @@
._a{padding:1.5px 0 1.5px 0;color:#366092;word-break:break-all}._hover{text-decoration:underline;opacity:.7}._img{max-width:100%;-webkit-touch-callout:none}._b,._strong{font-weight:700}._code{font-family:monospace}._del{text-decoration:line-through}._em,._i{font-style:italic}._h1{font-size:2em}._h2{font-size:1.5em}._h3{font-size:1.17em}._h5{font-size:.83em}._h6{font-size:.67em}._h1,._h2,._h3,._h4,._h5,._h6{display:block;font-weight:700}._ins{text-decoration:underline}._li{display:list-item}._ol{list-style-type:decimal}._ol,._ul{display:block;padding-left:40px;margin:1em 0}._q::before{content:'"'}._q::after{content:'"'}._sub{font-size:smaller;vertical-align:sub}._sup{font-size:smaller;vertical-align:super}._tbody,._tfoot,._thead{display:table-row-group}._tr{display:table-row}._td,._th{display:table-cell;vertical-align:middle}._th{font-weight:700;text-align:center}._ul{list-style-type:disc}._ul ._ul{margin:0;list-style-type:circle}._ul ._ul ._ul{list-style-type:square}._abbr,._b,._code,._del,._em,._i,._ins,._label,._q,._span,._strong,._sub,._sup{display:inline}
node_modules/mp-html/dist/mp-alipay/node/node.axml
New file
@@ -0,0 +1 @@
<template name="el"><block a:if="{{n.name==='img'}}"><rich-text a:if="{{n.t}}" style="display:{{n.t}}" nodes="<img class='_img' style='{{n.attrs.style}}' src='{{n.attrs.src}}'>" data-i="{{i}}" catchTap="imgTap"/><block a:else><image a:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))}}" lazy-load="{{opts[0]}}" data-i="{{i}}" onLoad="imgLoad" onError="mediaError" catchTap="imgTap" onLongTap="noop"/></block></block><text a:elif="{{n.name==='br'}}">{{'\n'}}</text><view a:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchTap="linkTap"><template is="node" data="{{childs:n.children,path:i+'_',opts:opts,ctrl:ctrl}}"></template></view><video a:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" object-fit="{{n.attrs['object-fit']}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" onPlay="play" onError="mediaError"/><audio a:elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" onPlay="play" onError="mediaError"/><rich-text a:else id="{{n.attrs.id}}" style="display:inline;{{n.f}}" nodes="{{[n]}}"/></template><template name="node"><block a:for="{{childs}}" a:for-item="n" a:for-index="i" a:key="i"><template a:if="{{!n.c}}" is="el" data="{{n:n,i:path+i,opts:opts,ctrl:ctrl}}"/><view a:else id="{{n.attrs.id}}" class="_{{n.name}} {{n.attrs.class}}" style="{{n.attrs.style}}"><template is="node" data="{{childs:n.children,path:path+i+'_',opts:opts,ctrl:ctrl}}"></template></view></block></template><template is="node" data="{{childs:childs,path:'',opts:opts,ctrl:ctrl}}"></template>
node_modules/mp-html/dist/mp-alipay/node/node.js
New file
@@ -0,0 +1 @@
"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function e(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?t(Object(o),!0).forEach(function(t){r(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Component({data:{ctrl:{}},props:{childs:[],opts:[]},options:{addGlobalClass:!0},didMount:function(){this.props.onAdd(this)},methods:{noop:function(){},getNode:function(t){try{for(var e=t.split("_"),r=this.props.childs[e[0]],i=1;i<e.length;i++)r=r.children[e[i]];return r}catch(t){return{text:"",attrs:{},children:[]}}},play:function(t){var r=t.target.dataset.i,i=this.getNode(r);if(this.root.props.onPlay&&this.root.props.onPlay({source:i.name,attrs:e(e({},i.attrs),{},{src:i.src[this.data.ctrl[r]||0]})}),this.root.props.pauseVideo){for(var o=!1,a=t.target.id,s=this.root._videos.length;s--;)this.root._videos[s].id===a?o=!0:this.root._videos[s].pause();if(!o){var n=my.createVideoContext(a,this);n.id=a,this.root.playbackRate&&n.playbackRate(this.root.playbackRate),this.root._videos.push(n)}}},imgTap:function(t){var e=this.getNode(t.target.dataset.i);if(e.a)return this.linkTap(e.a);if(!e.attrs.ignore&&(this.root.props.onImgtap&&this.root.props.onImgtap(e.attrs),this.root.props.previewImg)){var r=e.i;my.previewImage({enablesavephoto:this.root.props.showImgMenu,enableShowPhotoDownload:this.root.props.showImgMenu,current:r,urls:this.root.imgList})}},imgLoad:function(t){var e,i=t.target.dataset.i,o=this.getNode(i);o.w?(this.props.opts[1]&&!this.data.ctrl[i]||-1===this.data.ctrl[i])&&(e=1):e=t.detail.width,e&&this.setData(r({},"ctrl."+i,e)),this.checkReady()},checkReady:function(){var t=this;this.root.props.lazyLoad||(this.root.imgList._unloadimgs-=1,this.root.imgList._unloadimgs||setTimeout(function(){t.root.getRect().then(function(e){t.root.props.onReady&&t.root.props.onReady(e)}).catch(function(){t.root.props.onReady&&t.root.props.onReady({})})},350))},linkTap:function(t){var e=t.currentTarget?this.getNode(t.currentTarget.dataset.i):{},r=e.attrs||t,i=r.href;this.root.props.onLinktap&&this.root.props.onLinktap(Object.assign({innerText:this.root.getText(e.children||[])},r)),i&&("#"===i[0]?this.root.navigateTo(i.substring(1)).catch(function(){}):i.split("?")[0].includes("://")?this.root.props.copyLink&&my.setClipboard({text:i,success:function(){return my.showToast({content:"链接已复制"})}}):my.navigateTo({url:i,fail:function(){my.switchTab({url:i,fail:function(){}})}}))},mediaError:function(t){var e=t.target.dataset.i,i=this.getNode(e);if("video"===i.name||"audio"===i.name){var o=(this.data.ctrl[e]||0)+1;if(o>i.src.length&&(o=0),o<i.src.length)return this.setData(r({},"ctrl."+e,o))}else"img"===i.name&&(this.props.opts[2]&&this.setData(r({},"ctrl."+e,-1)),this.checkReady());this.root&&this.root.props.onError&&this.root.props.onError({source:i.name,attrs:i.attrs,errMsg:t.detail.errMsg})}}});
node_modules/mp-html/dist/mp-alipay/node/node.json
New file
@@ -0,0 +1 @@
{"component":true,"usingComponents":{"node":"./node"}}
node_modules/mp-html/dist/mp-alipay/parser.js
New file
@@ -0,0 +1 @@
"use strict";function t(t,e){var s;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(s=i(t))||e&&t&&"number"==typeof t.length){s&&(t=s);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,l=!1;return{s:function(){s=t[Symbol.iterator]()},n:function(){var t=s.next();return o=t.done,t},e:function(t){l=!0,r=t},f:function(){try{o||null==s.return||s.return()}finally{if(l)throw r}}}}function i(t,i){if(t){if("string"==typeof t)return e(t,i);var s=Object.prototype.toString.call(t).slice(8,-1);return"Object"===s&&t.constructor&&(s=t.constructor.name),"Map"===s||"Set"===s?Array.from(t):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?e(t,i):void 0}}function e(t,i){(null==i||i>t.length)&&(i=t.length);for(var e=0,s=new Array(i);e<i;e++)s[e]=t[e];return s}function s(t){for(var i=Object.create(null),e=t.split(","),s=e.length;s--;)i[e[s]]=!0;return i}function n(t,i){for(var e=t.indexOf("&");-1!==e;){var s=t.indexOf(";",e+3),n=void 0;if(-1===s)break;"#"===t[e+1]?(n=parseInt(("x"===t[e+2]?"0":"")+t.substring(e+2,s)),isNaN(n)||(t=t.substr(0,e)+String.fromCharCode(n)+t.substr(s+1))):(n=t.substring(e+1,s),(l.entities[n]||"amp"===n&&i)&&(t=t.substr(0,e)+(l.entities[n]||"&")+t.substr(s+1))),e=t.indexOf("&",e+1)}return t}function a(t){for(var i=t.length-1,e=i;e>=-1;e--)(-1===e||t[e].c||!t[e].name||"div"!==t[e].name&&"p"!==t[e].name&&"h"!==t[e].name[0]||(t[e].attrs.style||"").includes("inline"))&&(i-e>=5&&t.splice(e+1,i-e,{name:"div",attrs:{},children:t.slice(e+1,i+1)}),i=e-1)}function r(t){this.options=t.props||{},this.tagStyle=Object.assign({},l.tagStyle,this.options.tagStyle),this.imgList=t.imgList||[],this.imgList._unloadimgs=0,this.plugins=t.plugins||[],this.attrs=Object.create(null),this.stack=[],this.nodes=[],this.pre=(this.options.containerStyle||"").includes("white-space")&&this.options.containerStyle.includes("pre")?2:0}function o(t){this.handler=t}var l={trustTags:s("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"),blockTags:s("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"),ignoreTags:s("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"),voidTags:s("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"),entities:{lt:"<",gt:">",quot:'"',apos:"'",ensp:" ",emsp:" ",nbsp:" ",semi:";",ndash:"–",mdash:"—",middot:"·",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",hellip:"…",larr:"←",uarr:"↑",rarr:"→",darr:"↓"},tagStyle:{address:"font-style:italic",big:"display:inline;font-size:1.2em",caption:"display:table-caption;text-align:center",center:"text-align:center",cite:"font-style:italic",dd:"margin-left:40px",mark:"background-color:yellow",pre:"font-family:monospace;white-space:pre",s:"text-decoration:line-through",small:"display:inline;font-size:0.8em",strike:"text-decoration:line-through",u:"text-decoration:underline"},svgDict:{animatetransform:"animateTransform",lineargradient:"linearGradient",viewbox:"viewBox",attributename:"attributeName",repeatcount:"repeatCount",repeatdur:"repeatDur",foreignobject:"foreignObject"}},h={},c,d,p=my.getSystemInfoSync();c=p.windowWidth;var u=s(" ,\r,\n,\t,\f"),f=0;r.prototype.parse=function(t){for(var i=this.plugins.length;i--;)this.plugins[i].onUpdate&&(t=this.plugins[i].onUpdate(t,l)||t);for(new o(this).parse(t);this.stack.length;)this.popNode();return this.nodes.length>50&&a(this.nodes),this.nodes},r.prototype.expose=function(){for(var t=this.stack.length;t--;){var i=this.stack[t];if(i.c||"a"===i.name||"video"===i.name||"audio"===i.name)return;i.c=1}},r.prototype.hook=function(t){for(var i=this.plugins.length;i--;)if(this.plugins[i].onParse&&!1===this.plugins[i].onParse(t,this))return!1;return!0},r.prototype.getUrl=function(t){var i=this.options.domain;return"/"===t[0]?"/"===t[1]?t=(i?i.split("://")[0]:"http")+":"+t:i&&(t=i+t):!i||t.includes("data:")||t.includes("://")||(t=i+"/"+t),t},r.prototype.parseStyle=function(t){var i=t.attrs,e=(this.tagStyle[t.name]||"").split(";").concat((i.style||"").split(";")),s={},n="";i.id&&!this.xml&&(this.options.useAnchor?this.expose():"img"!==t.name&&"a"!==t.name&&"video"!==t.name&&"audio"!==t.name&&(i.id=void 0)),i.width&&(s.width=parseFloat(i.width)+(i.width.includes("%")?"%":"px"),i.width=void 0),i.height&&(s.height=parseFloat(i.height)+(i.height.includes("%")?"%":"px"),i.height=void 0);for(var a=0,r=e.length;a<r;a++){var o=e[a].split(":");if(!(o.length<2)){var l=o.shift().trim().toLowerCase(),h=o.join(":").trim();if("-"===h[0]&&h.lastIndexOf("-")>0||h.includes("safe"))n+=";".concat(l,":").concat(h);else if(!s[l]||h.includes("import")||!s[l].includes("import")){if(h.includes("url")){var d=h.indexOf("(")+1;if(d){for(;'"'===h[d]||"'"===h[d]||u[h[d]];)d++;h=h.substr(0,d)+this.getUrl(h.substr(d))}}else h.includes("rpx")&&(h=h.replace(/[0-9.]+\s*rpx/g,function(t){return parseFloat(t)*c/750+"px"}));s[l]=h}}}return t.attrs.style=n,s},r.prototype.onTagName=function(t){this.tagName=this.xml?t:t.toLowerCase(),"svg"===this.tagName&&(this.xml=(this.xml||0)+1,l.ignoreTags.style=void 0)},r.prototype.onAttrName=function(t){t=this.xml?t:t.toLowerCase(),"data-"===t.substr(0,5)?"data-src"!==t||this.attrs.src?"img"===this.tagName||"a"===this.tagName?this.attrName=t:this.attrName=void 0:this.attrName="src":(this.attrName=t,this.attrs[t]="T")},r.prototype.onAttrVal=function(t){var i=this.attrName||"";"style"===i||"href"===i?this.attrs[i]=n(t,!0):i.includes("src")?this.attrs[i]=this.getUrl(n(t,!0)):i&&(this.attrs[i]=t)},r.prototype.onOpenTag=function(t){var i=Object.create(null);i.name=this.tagName,i.attrs=this.attrs,this.attrs=Object.create(null);var e=i.attrs,s=this.stack[this.stack.length-1],n=s?s.children:this.nodes,a=this.xml?t:l.voidTags[i.name];if(h[i.name]&&(e.class=h[i.name]+(e.class?" "+e.class:"")),"embed"===i.name){var r=e.src||"";r.includes(".mp4")||r.includes(".3gp")||r.includes(".m3u8")||(e.type||"").includes("video")?i.name="video":(r.includes(".mp3")||r.includes(".wav")||r.includes(".aac")||r.includes(".m4a")||(e.type||"").includes("audio"))&&(i.name="audio"),e.autostart&&(e.autoplay="T"),e.controls="T"}if("video"!==i.name&&"audio"!==i.name||("video"!==i.name||e.id||(e.id="v"+f++),e.controls||e.autoplay||(e.controls="T"),i.src=[],e.src&&(i.src.push(e.src),e.src=void 0),this.expose()),a){if(!this.hook(i)||l.ignoreTags[i.name])return void("base"!==i.name||this.options.domain?"source"===i.name&&s&&("video"===s.name||"audio"===s.name)&&e.src&&s.src.push(e.src):this.options.domain=e.href);var o=this.parseStyle(i);if("img"===i.name){if(e.src&&(e.src.includes("webp")&&(i.webp="T"),e.src.includes("data:")&&"all"!==this.options.previewImg&&!e["original-src"]&&(e.ignore="T"),!e.ignore||i.webp||e.src.includes("cloud://"))){for(var d=this.stack.length;d--;){var p=this.stack[d];"table"!==p.name||i.webp||e.src.includes("cloud://")||(!o.display||o.display.includes("inline")?i.t="inline-block":i.t=o.display,o.display=void 0);var u=p.attrs.style||"";if(!u.includes("flex:")||u.includes("flex:0")||u.includes("flex: 0")||o.width&&!(parseInt(o.width)>100))if(u.includes("flex")&&"100%"===o.width)for(var g=d+1;g<this.stack.length;g++){var m=this.stack[g].attrs.style||"";if(!m.includes(";width")&&!m.includes(" width")&&0!==m.indexOf("width")){o.width="";break}}else u.includes("inline-block")&&(o.width&&"%"===o.width[o.width.length-1]?(p.attrs.style+=";max-width:"+o.width,o.width=""):p.attrs.style+=";max-width:100%");else{o.width="100% !important",o.height="";for(var v=d+1;v<this.stack.length;v++)this.stack[v].attrs.style=(this.stack[v].attrs.style||"").replace("inline-","")}"a"===p.name?i.a=p.attrs:p.c=1}i.i=this.imgList.length;var y=e["original-src"]||e.src;this.imgList.push(y),i.t||(this.imgList._unloadimgs+=1)}"inline"===o.display&&(o.display=""),e.ignore&&(o["max-width"]=o["max-width"]||"100%",e.style+=";-webkit-touch-callout:none"),parseInt(o.width)>c&&(o.height=void 0),isNaN(parseInt(o.width))||(i.w="T"),!isNaN(parseInt(o.height))&&(!o.height.includes("%")||s&&(s.attrs.style||"").includes("height"))&&(i.h="T"),i.w&&i.h&&o["object-fit"]&&("contain"===o["object-fit"]?i.m="aspectFit":"cover"===o["object-fit"]&&(i.m="aspectFill"))}else if("svg"===i.name)return n.push(i),this.stack.push(i),void this.popNode();for(var b in o)o[b]&&(e.style+=";".concat(b,":").concat(o[b].replace(" !important","")));e.style=e.style.substr(1)||void 0}else("pre"===i.name||(e.style||"").includes("white-space")&&e.style.includes("pre"))&&2!==this.pre&&(this.pre=i.pre=1),i.children=[],this.stack.push(i);n.push(i)},r.prototype.onCloseTag=function(t){t=this.xml?t:t.toLowerCase();var i;for(i=this.stack.length;i--&&this.stack[i].name!==t;);if(-1!==i)for(;this.stack.length>i;)this.popNode();else if("p"===t||"br"===t){var e=this.stack.length?this.stack[this.stack.length-1].children:this.nodes;e.push({name:t,attrs:{class:h[t],style:this.tagStyle[t]}})}},r.prototype.popNode=function(){var i=this.stack.pop(),e=i.attrs,s=i.children,n=this.stack[this.stack.length-1],r=n?n.children:this.nodes;if(!this.hook(i)||l.ignoreTags[i.name])return"title"===i.name&&s.length&&"text"===s[0].type&&this.options.setTitle&&my.setNavigationBar({title:s[0].text}),void r.pop();if(i.pre&&2!==this.pre){this.pre=i.pre=void 0;for(var o=this.stack.length;o--;)this.stack[o].pre&&(this.pre=1)}if("svg"===i.name){if(this.xml>1)return void this.xml--;var h="",d=e.style;return e.style="",e.xmlns="http://www.w3.org/2000/svg",function i(e){if("text"===e.type)return void(h+=e.text);var s=l.svgDict[e.name]||e.name;if("foreignObject"===s){var n,a=t(e.children||[]);try{for(a.s();!(n=a.n()).done;){var r=n.value;if(r.attrs&&!r.attrs.xmlns){r.attrs.xmlns="http://www.w3.org/1999/xhtml";break}}}catch(t){a.e(t)}finally{a.f()}}h+="<"+s;for(var o in e.attrs){var c=e.attrs[o];c&&(h+=" ".concat(l.svgDict[o]||o,'="').concat(c.replace(/"/g,""),'"'))}if(e.children){h+=">";for(var d=0;d<e.children.length;d++)i(e.children[d]);h+="</"+s+">"}else h+="/>"}(i),i.name="img",i.attrs={src:"data:image/svg+xml;utf8,"+h.replace(/#/g,"%23"),style:d,ignore:"T"},i.children=void 0,this.xml=!1,void(l.ignoreTags.style=!0)}var p={};if(e.align&&("table"===i.name?"center"===e.align?p["margin-inline-start"]=p["margin-inline-end"]="auto":p.float=e.align:p["text-align"]=e.align,e.align=void 0),e.dir&&(p.direction=e.dir,e.dir=void 0),"font"===i.name&&(e.color&&(p.color=e.color,e.color=void 0),e.face&&(p["font-family"]=e.face,e.face=void 0),e.size)){var u=parseInt(e.size);isNaN(u)||(u<1?u=1:u>7&&(u=7),p["font-size"]=["x-small","small","medium","large","x-large","xx-large","xxx-large"][u-1]),e.size=void 0}if((e.class||"").includes("align-center")&&(p["text-align"]="center"),Object.assign(p,this.parseStyle(i)),"table"!==i.name&&parseInt(p.width)>c&&(p["max-width"]="100%",p["box-sizing"]="border-box"),l.blockTags[i.name])i.name="div";else if(l.trustTags[i.name]||this.xml)if("a"===i.name||"ad"===i.name)this.expose();else if("video"===i.name||"audio"===i.name)(p.height||"").includes("auto")&&(p.height=void 0),i.children=void 0;else if("ul"!==i.name&&"ol"!==i.name||!i.c)if("table"===i.name){var f=parseFloat(e.cellpadding),g=parseFloat(e.cellspacing),m=parseFloat(e.border),v=p["border-color"],y=p["border-style"];if(i.c&&(isNaN(f)&&(f=2),isNaN(g)&&(g=2)),m&&(e.style+=";border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray")),i.flag&&i.c){i.flag=void 0,p.display="grid","collapse"===p["border-collapse"]&&(p["border-collapse"]=void 0,g=0),g?(p["grid-gap"]=g+"px",p.padding=g+"px"):m&&(e.style+=";border-left:0;border-top:0");var b=[],x=[],w=[],k={};!function i(e){for(var s=0;s<e.length;s++)if("tr"===e[s].name)x.push(e[s]);else if("colgroup"===e[s].name){var n,a=1,r=t(e[s].children||[]);try{for(r.s();!(n=r.n()).done;){var o=n.value;if("col"===o.name){var l=o.attrs.style||"",h=l.indexOf("width")?l.indexOf(";width"):0;if(-1!==h){var c=l.indexOf(";",h+6);-1===c&&(c=l.length),b[a]=l.substring(h?h+7:6,c)}a+=1}}}catch(t){r.e(t)}finally{r.f()}}else i(e[s].children||[])}(s);for(var N=1;N<=x.length;N++){for(var T=1,O=0;O<x[N-1].children.length;O++){var j=x[N-1].children[O];if("td"===j.name||"th"===j.name){for(;k[N+"."+T];)T++;j.c=1;var S=j.attrs.style||"",A=S.indexOf("width")?S.indexOf(";width"):0;if(-1!==A){var C=S.indexOf(";",A+6);-1===C&&(C=S.length),j.attrs.colspan||(b[T]=S.substring(A?A+7:6,C)),S=S.substr(0,A)+S.substr(C)}if(S+=";display:flex;flex-direction:column",-1!==(A=S.indexOf("vertical-align"))){var I=S.substr(A+15,10);I.includes("middle")?S+=";justify-content:center":I.includes("bottom")&&(S+=";justify-content:flex-end")}else S+=";justify-content:center";if(-1!==(A=S.indexOf("text-align"))){var z=S.substr(A+11,10);z.includes("center")?S+=";justify-content: center":z.includes("right")&&(S+=";justify-content: right")}if(S=(m?";border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray")+(g?"":";border-right:0;border-bottom:0"):"")+(f?";padding:".concat(f,"px"):"")+";"+S,j.attrs.colspan&&(S+=";grid-column-start:".concat(T,";grid-column-end:").concat(T+parseInt(j.attrs.colspan)),j.attrs.rowspan||(S+=";grid-row-start:".concat(N,";grid-row-end:").concat(N+1)),T+=parseInt(j.attrs.colspan)-1),j.attrs.rowspan){S+=";grid-row-start:".concat(N,";grid-row-end:").concat(N+parseInt(j.attrs.rowspan)),j.attrs.colspan||(S+=";grid-column-start:".concat(T,";grid-column-end:").concat(T+1));for(var L=1;L<j.attrs.rowspan;L++)for(var F=0;F<(j.attrs.colspan||1);F++)k[N+L+"."+(T-F)]=1}S&&(j.attrs.style=S),w.push(j),T++}}if(1===N){for(var q="",U=1;U<T;U++)q+=(b[U]?b[U]:"auto")+" ";p["grid-template-columns"]=q}}i.children=w}else i.c&&(p.display="table"),isNaN(g)||(p["border-spacing"]=g+"px"),(m||f||i.c)&&function t(e){for(var s=0;s<e.length;s++){var n=e[s];i.c&&(n.c=1),"th"===n.name||"td"===n.name?(m&&(n.attrs.style="border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray",";").concat(n.attrs.style||"")),f&&(n.attrs.style="padding:".concat(f,"px;").concat(n.attrs.style||""))):n.children&&t(n.children)}}(s);if(this.options.scrollTable&&!(e.style||"").includes("inline")){var V=Object.assign({},i);i.name="div",i.attrs={style:"overflow-x:auto;padding:1px"},i.children=[V],e=V.attrs}}else if(("tbody"===i.name||"tr"===i.name)&&i.flag&&i.c)i.flag=void 0,function t(i){for(var e=0;e<i.length;e++)if("td"===i[e].name)for(var s=0,n=["color","background","background-color"];s<n.length;s++){var a=n[s];p[a]&&(i[e].attrs.style=a+":"+p[a]+";"+(i[e].attrs.style||""))}else t(i[e].children||[])}(s);else if("td"!==i.name&&"th"!==i.name||!e.colspan&&!e.rowspan){if("ruby"===i.name){i.name="span";for(var D=0;D<s.length-1;D++)"text"===s[D].type&&"rt"===s[D+1].name&&(s[D]={name:"span",attrs:{style:"display:inline-block;text-align:center"},children:[{name:"div",attrs:{style:"font-size:50%;"+(s[D+1].attrs.style||"")},children:s[D+1].children},s[D]]},s.splice(D+1,1))}}else for(var B=this.stack.length;B--;)"table"!==this.stack[B].name&&"tbody"!==this.stack[B].name&&"tr"!==this.stack[B].name||(this.stack[B].flag=1);else{var P={a:"lower-alpha",A:"upper-alpha",i:"lower-roman",I:"upper-roman"};P[e.type]&&(e.style+=";list-style-type:"+P[e.type],e.type=void 0),i.c=1;for(var Z=s.length;Z--;)"li"===s[Z].name&&(s[Z].c=1)}else i.name="span";if((p.display||"").includes("flex")&&!i.c)for(var _=s.length;_--;){var E=s[_];E.f&&(E.attrs.style=(E.attrs.style||"")+E.f,E.f=void 0)}var G=n&&((n.attrs.style||"").includes("flex")||(n.attrs.style||"").includes("grid"))&&!i.c;G&&(i.f=";max-width:100%"),s.length>=50&&i.c&&!(p.display||"").includes("flex")&&a(s);for(var M in p)if(p[M]){var W=";".concat(M,":").concat(p[M].replace(" !important",""));G&&(M.includes("flex")&&"flex-direction"!==M||"align-self"===M||M.includes("grid")||"-"===p[M][0]||M.includes("width")&&W.includes("%"))?(i.f+=W,"width"===M&&(e.style+=";width:100%")):e.style+=W}e.style=e.style.substr(1)||void 0},r.prototype.onText=function(t){if(!this.pre){for(var i,e="",s=0,a=t.length;s<a;s++)u[t[s]]?(" "!==e[e.length-1]&&(e+=" "),"\n"!==t[s]||i||(i=!0)):e+=t[s];if(" "===e&&i)return;t=e}var r=Object.create(null);if(r.type="text",r.text=n(t),this.hook(r)){(this.stack.length?this.stack[this.stack.length-1].children:this.nodes).push(r)}},o.prototype.parse=function(t){this.content=t||"",this.i=0,this.start=0,this.state=this.text;for(var i=this.content.length;-1!==this.i&&this.i<i;)this.state()},o.prototype.checkClose=function(t){var i="/"===this.content[this.i];return!!(">"===this.content[this.i]||i&&">"===this.content[this.i+1])&&(t&&this.handler[t](this.content.substring(this.start,this.i)),this.i+=i?2:1,this.start=this.i,this.handler.onOpenTag(i),"script"===this.handler.tagName?(this.i=this.content.indexOf("</",this.i),-1!==this.i&&(this.i+=2,this.start=this.i),this.state=this.endTag):this.state=this.text,!0)},o.prototype.text=function(){if(this.i=this.content.indexOf("<",this.i),-1===this.i)return void(this.start<this.content.length&&this.handler.onText(this.content.substring(this.start,this.content.length)));var t=this.content[this.i+1];if(t>="a"&&t<="z"||t>="A"&&t<="Z")this.start!==this.i&&this.handler.onText(this.content.substring(this.start,this.i)),this.start=++this.i,this.state=this.tagName;else if("/"===t||"!"===t||"?"===t){this.start!==this.i&&this.handler.onText(this.content.substring(this.start,this.i));var i=this.content[this.i+2];if("/"===t&&(i>="a"&&i<="z"||i>="A"&&i<="Z"))return this.i+=2,this.start=this.i,void(this.state=this.endTag);var e="--\x3e";"!"===t&&"-"===this.content[this.i+2]&&"-"===this.content[this.i+3]||(e=">"),this.i=this.content.indexOf(e,this.i),-1!==this.i&&(this.i+=e.length,this.start=this.i)}else this.i++},o.prototype.tagName=function(){if(u[this.content[this.i]]){for(this.handler.onTagName(this.content.substring(this.start,this.i));u[this.content[++this.i]];);this.i<this.content.length&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)}else this.checkClose("onTagName")||this.i++},o.prototype.attrName=function(){var t=this.content[this.i];if(u[t]||"="===t){this.handler.onAttrName(this.content.substring(this.start,this.i));for(var i="="===t,e=this.content.length;++this.i<e;)if(t=this.content[this.i],!u[t]){if(this.checkClose())return;if(i)return this.start=this.i,void(this.state=this.attrVal);if("="!==this.content[this.i])return this.start=this.i,void(this.state=this.attrName);i=!0}}else this.checkClose("onAttrName")||this.i++},o.prototype.attrVal=function(){var t=this.content[this.i],i=this.content.length;if('"'===t||"'"===t){if(this.start=++this.i,this.i=this.content.indexOf(t,this.i),-1===this.i)return;this.handler.onAttrVal(this.content.substring(this.start,this.i))}else for(;this.i<i;this.i++){if(u[this.content[this.i]]){this.handler.onAttrVal(this.content.substring(this.start,this.i));break}if(this.checkClose("onAttrVal"))return}for(;u[this.content[++this.i]];);this.i<i&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)},o.prototype.endTag=function(){var t=this.content[this.i];if(u[t]||">"===t||"/"===t){if(this.handler.onCloseTag(this.content.substring(this.start,this.i)),">"!==t&&(this.i=this.content.indexOf(">",this.i),-1===this.i))return;this.start=++this.i,this.state=this.text}else this.i++},module.exports=r;
node_modules/mp-html/dist/mp-baidu/index.css
New file
@@ -0,0 +1 @@
._root{padding:1px 0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}._select{-webkit-user-select:text;user-select:text}
node_modules/mp-html/dist/mp-baidu/index.js
New file
@@ -0,0 +1,8 @@
"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}/*!
 * mp-html v2.5.1
 * https://github.com/jin-yufeng/mp-html
 *
 * Released under the MIT license
 * Author: Jin Yufeng
 */
var t=require("./parser"),n=[];Component({data:{nodes:[]},properties:{containerStyle:String,content:{type:String,value:"",observer:function(e){this.setContent(e)}},copyLink:{type:Boolean,value:!0},domain:String,errorImg:String,lazyLoad:Boolean,loadingImg:String,pauseVideo:{type:Boolean,value:!0},previewImg:{type:null,value:!0},scrollTable:Boolean,selectable:null,setTitle:{type:Boolean,value:!0},showImgMenu:{type:Boolean,value:!0},tagStyle:Object,useAnchor:null},created:function(){this.plugins=[];for(var e=n.length;e--;)this.plugins.push(new n[e](this))},detached:function(){this._hook("onDetached")},methods:{in:function(e,t,n){e&&t&&n&&(this._in={page:e,selector:t,scrollTop:n})},navigateTo:function(t,n){var i=this;return new Promise(function(o,r){if(!i.data.useAnchor)return void r(Error("Anchor is disabled"));var a=swan.createSelectorQuery().in(i._in?i._in.page:i).select((i._in?i._in.selector:"._root")+(t?"".concat(" ","#").concat(t):"")).boundingClientRect();i._in?a.select(i._in.selector).scrollOffset().select(i._in.selector).boundingClientRect():a.selectViewport().scrollOffset(),a.exec(function(t){if(!t[0])return void r(Error("Label not found"));var a=t[1].scrollTop+t[0].top-(t[2]?t[2].top:0)+(n||parseInt(i.data.useAnchor)||0);i._in?i._in.page.setData(e({},i._in.scrollTop,a)):swan.pageScrollTo({scrollTop:a,duration:300}),o()})})},getText:function(e){var t="";return function e(n){for(var i=0;i<n.length;i++){var o=n[i];if("text"===o.type)t+=o.text.replace(/&amp;/g,"&");else if("br"===o.name)t+="\n";else{var r="p"===o.name||"div"===o.name||"tr"===o.name||"li"===o.name||"h"===o.name[0]&&o.name[1]>"0"&&o.name[1]<"7";r&&t&&"\n"!==t[t.length-1]&&(t+="\n"),o.children&&e(o.children),r&&"\n"!==t[t.length-1]?t+="\n":"td"!==o.name&&"th"!==o.name||(t+="\t")}}}(e||this.data.nodes),t},getRect:function(){var e=this;return new Promise(function(t,n){swan.createSelectorQuery().in(e).select("._root").boundingClientRect().exec(function(e){return e[0]?t(e[0]):n(Error("Root label not found"))})})},pauseMedia:function(){for(var e=(this._videos||[]).length;e--;)this._videos[e].pause()},setPlaybackRate:function(e){this.playbackRate=e;for(var t=(this._videos||[]).length;t--;)this._videos[t].playbackRate(e)},setContent:function(e,n){var i=this;this.imgList&&n||(this.imgList=[]),this._videos=[];var o={},r=new t(this).parse(e);if(n)for(var a=this.data.nodes.length,s=r.length;s--;)o["nodes[".concat(a+s,"]")]=r[s];else o.nodes=r;if(this.setData(o,function(){i._hook("onLoad"),i.triggerEvent("load")}),this.data.lazyLoad||this.imgList._unloadimgs<this.imgList.length/2){var l=0,c=function e(t){t&&t.height||(t={}),t.height===l?i.triggerEvent("ready",t):(l=t.height,setTimeout(function(){i.getRect().then(e).catch(e)},350))};this.getRect().then(c).catch(c)}else this.imgList._unloadimgs||this.getRect().then(function(e){i.triggerEvent("ready",e)}).catch(function(){i.triggerEvent("ready",{})})},_hook:function(e){for(var t=n.length;t--;)this.plugins[t][e]&&this.plugins[t][e]()},_add:function(e){e.detail.root=this}}});
node_modules/mp-html/dist/mp-baidu/index.json
New file
@@ -0,0 +1 @@
{"component":true,"usingComponents":{"node":"./node/node"}}
node_modules/mp-html/dist/mp-baidu/index.swan
New file
@@ -0,0 +1 @@
<view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}"><slot s-if="!nodes[0]"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu,selectable]}}" catchadd="_add"/></view>
node_modules/mp-html/dist/mp-baidu/node/node.css
New file
@@ -0,0 +1 @@
._a{padding:1.5px 0 1.5px 0;color:#366092;word-break:break-all}._hover{text-decoration:underline;opacity:.7}._img{max-width:100%;-webkit-touch-callout:none}._b,._strong{font-weight:700}._code{font-family:monospace}._del{text-decoration:line-through}._em,._i{font-style:italic}._h1{font-size:2em}._h2{font-size:1.5em}._h3{font-size:1.17em}._h5{font-size:.83em}._h6{font-size:.67em}._h1,._h2,._h3,._h4,._h5,._h6{display:block;font-weight:700}._ins{text-decoration:underline}._li{display:list-item}._ol{list-style-type:decimal}._ol,._ul{display:block;padding-left:40px;margin:1em 0}._q::before{content:'"'}._q::after{content:'"'}._sub{font-size:smaller;vertical-align:sub}._sup{font-size:smaller;vertical-align:super}._tbody,._tfoot,._thead{display:table-row-group}._tr{display:table-row}._td,._th{display:table-cell;vertical-align:middle}._th{font-weight:700;text-align:center}._ul{list-style-type:disc}._ul ._ul{margin:0;list-style-type:circle}._ul ._ul ._ul{list-style-type:square}._abbr,._b,._code,._del,._em,._i,._ins,._label,._q,._span,._strong,._sub,._sup{display:inline}._blockquote,._div,._p{display:block}
node_modules/mp-html/dist/mp-baidu/node/node.js
New file
@@ -0,0 +1 @@
"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function e(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?t(Object(o),!0).forEach(function(t){r(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Component({data:{ctrl:{}},properties:{childs:Array,opts:Array},options:{addGlobalClass:!0},attached:function(){this.triggerEvent("add",this,{bubbles:!0,composed:!0})},methods:{noop:function(){},getNode:function(t){try{for(var e=t.split("_"),r=this.data.childs[e[0]],i=1;i<e.length;i++)r=r.children[e[i]];return r}catch(t){return{text:"",attrs:{},children:[]}}},play:function(t){var r=t.target.dataset.i,i=this.getNode(r);if(this.root.triggerEvent("play",{source:i.name,attrs:e(e({},i.attrs),{},{src:i.src[this.data.ctrl[r]||0]})}),this.root.data.pauseVideo){for(var o=!1,a=t.target.id,s=this.root._videos.length;s--;)this.root._videos[s].id===a?o=!0:this.root._videos[s].pause();if(!o){var n=swan.createVideoContext(a);n.id=a,this.root.playbackRate&&n.playbackRate(this.root.playbackRate),this.root._videos.push(n)}}},imgTap:function(t){var e=this.getNode(t.target.dataset.i);if(e.a)return this.linkTap(e.a);if(!e.attrs.ignore&&(this.root.triggerEvent("imgtap",e.attrs),this.root.data.previewImg)){var r=this.root.imgList[e.i];swan.previewImage({current:r,urls:this.root.imgList})}},imgLoad:function(t){var e,i=t.target.dataset.i,o=this.getNode(i);o.w?(this.data.opts[1]&&!this.data.ctrl[i]||-1===this.data.ctrl[i])&&(e=1):e=t.detail.width,e&&this.setData(r({},"ctrl."+i,e)),this.checkReady()},checkReady:function(){var t=this;this.root.data.lazyLoad||(this.root.imgList._unloadimgs-=1,this.root.imgList._unloadimgs||setTimeout(function(){t.root.getRect().then(function(e){t.root.triggerEvent("ready",e)}).catch(function(){t.root.triggerEvent("ready",{})})},350))},linkTap:function(t){var e=t.currentTarget?this.getNode(t.currentTarget.dataset.i):{},r=e.attrs||t,i=r.href;this.root.triggerEvent("linktap",Object.assign({innerText:this.root.getText(e.children||[])},r)),i&&("#"===i[0]?this.root.navigateTo(i.substring(1)).catch(function(){}):i.split("?")[0].includes("://")?this.root.data.copyLink&&swan.setClipboardData({data:i,success:function(){return swan.showToast({title:"链接已复制"})}}):swan.navigateTo({url:i,fail:function(){swan.switchTab({url:i,fail:function(){}})}}))},mediaError:function(t){var e=t.target.dataset.i,i=this.getNode(e);if("video"===i.name||"audio"===i.name){var o=(this.data.ctrl[e]||0)+1;if(o>i.src.length&&(o=0),o<i.src.length)return this.setData(r({},"ctrl."+e,o))}else"img"===i.name&&(this.data.opts[2]&&this.setData(r({},"ctrl."+e,-1)),this.checkReady());this.root&&this.root.triggerEvent("error",{source:i.name,attrs:i.attrs,errMsg:t.detail.errMsg})}}});
node_modules/mp-html/dist/mp-baidu/node/node.json
New file
@@ -0,0 +1 @@
{"component":true,"usingComponents":{"node":"./node"}}
node_modules/mp-html/dist/mp-baidu/node/node.swan
New file
@@ -0,0 +1 @@
<template name="el"><block s-if="n.name==='img'"><rich-text s-if="n.t" style="display:{{n.t}}" nodes="<img class='_img' style='{{n.attrs.style}}' src='{{n.attrs.src}}'>" data-i="{{i}}" catchtap="imgTap"/><block s-else><image s-if="(opts[1]&&!ctrl[i])||ctrl[i]<0" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))}}" lazy-load="{{opts[0]}}" webp="{{n.webp}}" image-menu-prevent="{{!opts[3]||n.attrs.ignore}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="imgTap" bindlongpress="noop"/></block></block><text s-elif="{{n.name==='br'}}">{{'\n'}}</text><view s-elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap"><block s-for="n.children" s-key="index"><template is="el" data="{{{n:item,i:i+'_'+index,opts:opts,ctrl:ctrl}}}"></template></block></view><video s-elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" object-fit="{{n.attrs['object-fit']}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><audio s-elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><rich-text s-else id="{{n.attrs.id}}" style="{{n.f}}" selectable="{{opts[4]}}" nodes="{{[n]}}"/></template><block s-for="childs" s-for-item="n1" s-for-index="i1" s-key="i1"><template s-if="!n1.c" is="el" data="{{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}}"/><view s-else id="{{n1.attrs.id}}" class="_{{n1.name}} {{n1.attrs.class}}" style="{{n1.attrs.style}}"><block s-for="n1.children" s-for-item="n2" s-for-index="i2" s-key="i2"><template s-if="!n2.c" is="el" data="{{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}}"/><view s-else id="{{n2.attrs.id}}" class="_{{n2.name}} {{n2.attrs.class}}" style="{{n2.attrs.style}}"><block s-for="n2.children" s-for-item="n3" s-for-index="i3" s-key="i3"><template s-if="!n3.c" is="el" data="{{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}}"/><view s-else id="{{n3.attrs.id}}" class="_{{n3.name}} {{n3.attrs.class}}" style="{{n3.attrs.style}}"><block s-for="n3.children" s-for-item="n4" s-for-index="i4" s-key="i4"><template s-if="!n4.c" is="el" data="{{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}}"/><view s-else id="{{n4.attrs.id}}" class="_{{n4.name}} {{n4.attrs.class}}" style="{{n4.attrs.style}}"><block s-for="n4.children" s-for-item="n5" s-for-index="i5" s-key="i5"><template s-if="!n5.c" is="el" data="{{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}}"/><node s-else id="{{n5.attrs.id}}" class="_{{n5.name}} {{n5.attrs.class}}" style="{{n5.attrs.style}}" childs="{{n5.children}}" opts="{{opts}}"/></block></view></block></view></block></view></block></view></block>
node_modules/mp-html/dist/mp-baidu/parser.js
New file
@@ -0,0 +1 @@
"use strict";function t(t,e){var s;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(s=i(t))||e&&t&&"number"==typeof t.length){s&&(t=s);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,l=!1;return{s:function(){s=t[Symbol.iterator]()},n:function(){var t=s.next();return o=t.done,t},e:function(t){l=!0,r=t},f:function(){try{o||null==s.return||s.return()}finally{if(l)throw r}}}}function i(t,i){if(t){if("string"==typeof t)return e(t,i);var s=Object.prototype.toString.call(t).slice(8,-1);return"Object"===s&&t.constructor&&(s=t.constructor.name),"Map"===s||"Set"===s?Array.from(t):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?e(t,i):void 0}}function e(t,i){(null==i||i>t.length)&&(i=t.length);for(var e=0,s=new Array(i);e<i;e++)s[e]=t[e];return s}function s(t){for(var i=Object.create(null),e=t.split(","),s=e.length;s--;)i[e[s]]=!0;return i}function n(t,i){for(var e=t.indexOf("&");-1!==e;){var s=t.indexOf(";",e+3),n=void 0;if(-1===s)break;"#"===t[e+1]?(n=parseInt(("x"===t[e+2]?"0":"")+t.substring(e+2,s)),isNaN(n)||(t=t.substr(0,e)+String.fromCharCode(n)+t.substr(s+1))):(n=t.substring(e+1,s),(l.entities[n]||"amp"===n&&i)&&(t=t.substr(0,e)+(l.entities[n]||"&")+t.substr(s+1))),e=t.indexOf("&",e+1)}return t}function a(t){for(var i=t.length-1,e=i;e>=-1;e--)(-1===e||t[e].c||!t[e].name||"div"!==t[e].name&&"p"!==t[e].name&&"h"!==t[e].name[0]||(t[e].attrs.style||"").includes("inline"))&&(i-e>=5&&t.splice(e+1,i-e,{name:"div",attrs:{},children:t.slice(e+1,i+1)}),i=e-1)}function r(t){this.options=t.data||{},this.tagStyle=Object.assign({},l.tagStyle,this.options.tagStyle),this.imgList=t.imgList||[],this.imgList._unloadimgs=0,this.plugins=t.plugins||[],this.attrs=Object.create(null),this.stack=[],this.nodes=[],this.pre=(this.options.containerStyle||"").includes("white-space")&&this.options.containerStyle.includes("pre")?2:0}function o(t){this.handler=t}var l={trustTags:s("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"),blockTags:s("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"),ignoreTags:s("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"),voidTags:s("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"),entities:{lt:"<",gt:">",quot:'"',apos:"'",ensp:" ",emsp:" ",nbsp:" ",semi:";",ndash:"–",mdash:"—",middot:"·",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",hellip:"…",larr:"←",uarr:"↑",rarr:"→",darr:"↓"},tagStyle:{address:"font-style:italic",big:"display:inline;font-size:1.2em",caption:"display:table-caption;text-align:center",center:"text-align:center",cite:"font-style:italic",dd:"margin-left:40px",mark:"background-color:yellow",pre:"font-family:monospace;white-space:pre",s:"text-decoration:line-through",small:"display:inline;font-size:0.8em",strike:"text-decoration:line-through",u:"text-decoration:underline"},svgDict:{animatetransform:"animateTransform",lineargradient:"linearGradient",viewbox:"viewBox",attributename:"attributeName",repeatcount:"repeatCount",repeatdur:"repeatDur",foreignobject:"foreignObject"}},h={},c,d,p=swan.getSystemInfoSync();c=p.windowWidth;var u=s(" ,\r,\n,\t,\f"),f=0;r.prototype.parse=function(t){for(var i=this.plugins.length;i--;)this.plugins[i].onUpdate&&(t=this.plugins[i].onUpdate(t,l)||t);for(new o(this).parse(t);this.stack.length;)this.popNode();return this.nodes.length>50&&a(this.nodes),this.nodes},r.prototype.expose=function(){for(var t=this.stack.length;t--;){var i=this.stack[t];if(i.c||"a"===i.name||"video"===i.name||"audio"===i.name)return;i.c=1}},r.prototype.hook=function(t){for(var i=this.plugins.length;i--;)if(this.plugins[i].onParse&&!1===this.plugins[i].onParse(t,this))return!1;return!0},r.prototype.getUrl=function(t){var i=this.options.domain;return"/"===t[0]?"/"===t[1]?t=(i?i.split("://")[0]:"http")+":"+t:i&&(t=i+t):!i||t.includes("data:")||t.includes("://")||(t=i+"/"+t),t},r.prototype.parseStyle=function(t){var i=t.attrs,e=(this.tagStyle[t.name]||"").split(";").concat((i.style||"").split(";")),s={},n="";i.id&&!this.xml&&(this.options.useAnchor?this.expose():"img"!==t.name&&"a"!==t.name&&"video"!==t.name&&"audio"!==t.name&&(i.id=void 0)),i.width&&(s.width=parseFloat(i.width)+(i.width.includes("%")?"%":"px"),i.width=void 0),i.height&&(s.height=parseFloat(i.height)+(i.height.includes("%")?"%":"px"),i.height=void 0);for(var a=0,r=e.length;a<r;a++){var o=e[a].split(":");if(!(o.length<2)){var l=o.shift().trim().toLowerCase(),h=o.join(":").trim();if("-"===h[0]&&h.lastIndexOf("-")>0||h.includes("safe"))n+=";".concat(l,":").concat(h);else if(!s[l]||h.includes("import")||!s[l].includes("import")){if(h.includes("url")){var d=h.indexOf("(")+1;if(d){for(;'"'===h[d]||"'"===h[d]||u[h[d]];)d++;h=h.substr(0,d)+this.getUrl(h.substr(d))}}else h.includes("rpx")&&(h=h.replace(/[0-9.]+\s*rpx/g,function(t){return parseFloat(t)*c/750+"px"}));s[l]=h}}}return t.attrs.style=n,s},r.prototype.onTagName=function(t){this.tagName=this.xml?t:t.toLowerCase(),"svg"===this.tagName&&(this.xml=(this.xml||0)+1,l.ignoreTags.style=void 0)},r.prototype.onAttrName=function(t){t=this.xml?t:t.toLowerCase(),"data-"===t.substr(0,5)?"data-src"!==t||this.attrs.src?"img"===this.tagName||"a"===this.tagName?this.attrName=t:this.attrName=void 0:this.attrName="src":(this.attrName=t,this.attrs[t]="T")},r.prototype.onAttrVal=function(t){var i=this.attrName||"";"style"===i||"href"===i?this.attrs[i]=n(t,!0):i.includes("src")?this.attrs[i]=this.getUrl(n(t,!0)):i&&(this.attrs[i]=t)},r.prototype.onOpenTag=function(t){var i=Object.create(null);i.name=this.tagName,i.attrs=this.attrs,this.attrs=Object.create(null);var e=i.attrs,s=this.stack[this.stack.length-1],n=s?s.children:this.nodes,a=this.xml?t:l.voidTags[i.name];if(h[i.name]&&(e.class=h[i.name]+(e.class?" "+e.class:"")),"embed"===i.name){var r=e.src||"";r.includes(".mp4")||r.includes(".3gp")||r.includes(".m3u8")||(e.type||"").includes("video")?i.name="video":(r.includes(".mp3")||r.includes(".wav")||r.includes(".aac")||r.includes(".m4a")||(e.type||"").includes("audio"))&&(i.name="audio"),e.autostart&&(e.autoplay="T"),e.controls="T"}if("video"!==i.name&&"audio"!==i.name||("video"!==i.name||e.id||(e.id="v"+f++),e.controls||e.autoplay||(e.controls="T"),i.src=[],e.src&&(i.src.push(e.src),e.src=void 0),this.expose()),a){if(!this.hook(i)||l.ignoreTags[i.name])return void("base"!==i.name||this.options.domain?"source"===i.name&&s&&("video"===s.name||"audio"===s.name)&&e.src&&s.src.push(e.src):this.options.domain=e.href);var o=this.parseStyle(i);if("img"===i.name){if(e.src&&(e.src.includes("webp")&&(i.webp="T"),e.src.includes("data:")&&"all"!==this.options.previewImg&&!e["original-src"]&&(e.ignore="T"),!e.ignore||i.webp||e.src.includes("cloud://"))){for(var d=this.stack.length;d--;){var p=this.stack[d];"table"!==p.name||i.webp||e.src.includes("cloud://")||(!o.display||o.display.includes("inline")?i.t="inline-block":i.t=o.display,o.display=void 0);var u=p.attrs.style||"";if(!u.includes("flex:")||u.includes("flex:0")||u.includes("flex: 0")||o.width&&!(parseInt(o.width)>100))if(u.includes("flex")&&"100%"===o.width)for(var g=d+1;g<this.stack.length;g++){var m=this.stack[g].attrs.style||"";if(!m.includes(";width")&&!m.includes(" width")&&0!==m.indexOf("width")){o.width="";break}}else u.includes("inline-block")&&(o.width&&"%"===o.width[o.width.length-1]?(p.attrs.style+=";max-width:"+o.width,o.width=""):p.attrs.style+=";max-width:100%");else{o.width="100% !important",o.height="";for(var v=d+1;v<this.stack.length;v++)this.stack[v].attrs.style=(this.stack[v].attrs.style||"").replace("inline-","")}"a"===p.name?i.a=p.attrs:p.c=1}i.i=this.imgList.length;var y=e["original-src"]||e.src;if(this.imgList.includes(y)){var b=y.indexOf("://");if(-1!==b){b+=3;for(var x=y.substr(0,b);b<y.length&&"/"!==y[b];b++)x+=Math.random()>.5?y[b].toUpperCase():y[b];x+=y.substr(b),y=x}}this.imgList.push(y),i.t||(this.imgList._unloadimgs+=1)}"inline"===o.display&&(o.display=""),e.ignore&&(o["max-width"]=o["max-width"]||"100%",e.style+=";-webkit-touch-callout:none"),parseInt(o.width)>c&&(o.height=void 0),isNaN(parseInt(o.width))||(i.w="T"),!isNaN(parseInt(o.height))&&(!o.height.includes("%")||s&&(s.attrs.style||"").includes("height"))&&(i.h="T"),i.w&&i.h&&o["object-fit"]&&("contain"===o["object-fit"]?i.m="aspectFit":"cover"===o["object-fit"]&&(i.m="aspectFill"))}else if("svg"===i.name)return n.push(i),this.stack.push(i),void this.popNode();for(var w in o)o[w]&&(e.style+=";".concat(w,":").concat(o[w].replace(" !important","")));e.style=e.style.substr(1)||void 0,e.style||delete e.style}else("pre"===i.name||(e.style||"").includes("white-space")&&e.style.includes("pre"))&&2!==this.pre&&(this.pre=i.pre=1),i.children=[],this.stack.push(i);n.push(i)},r.prototype.onCloseTag=function(t){t=this.xml?t:t.toLowerCase();var i;for(i=this.stack.length;i--&&this.stack[i].name!==t;);if(-1!==i)for(;this.stack.length>i;)this.popNode();else if("p"===t||"br"===t){var e=this.stack.length?this.stack[this.stack.length-1].children:this.nodes;e.push({name:t,attrs:{class:h[t],style:this.tagStyle[t]}})}},r.prototype.popNode=function(){var i=this.stack.pop(),e=i.attrs,s=i.children,n=this.stack[this.stack.length-1],r=n?n.children:this.nodes;if(!this.hook(i)||l.ignoreTags[i.name])return"title"===i.name&&s.length&&"text"===s[0].type&&this.options.setTitle&&swan.setNavigationBarTitle({title:s[0].text}),void r.pop();if(i.pre&&2!==this.pre){this.pre=i.pre=void 0;for(var o=this.stack.length;o--;)this.stack[o].pre&&(this.pre=1)}if("svg"===i.name){if(this.xml>1)return void this.xml--;var h="",d=e.style;return e.style="",e.xmlns="http://www.w3.org/2000/svg",function i(e){if("text"===e.type)return void(h+=e.text);var s=l.svgDict[e.name]||e.name;if("foreignObject"===s){var n,a=t(e.children||[]);try{for(a.s();!(n=a.n()).done;){var r=n.value;if(r.attrs&&!r.attrs.xmlns){r.attrs.xmlns="http://www.w3.org/1999/xhtml";break}}}catch(t){a.e(t)}finally{a.f()}}h+="<"+s;for(var o in e.attrs){var c=e.attrs[o];c&&(h+=" ".concat(l.svgDict[o]||o,'="').concat(c.replace(/"/g,""),'"'))}if(e.children){h+=">";for(var d=0;d<e.children.length;d++)i(e.children[d]);h+="</"+s+">"}else h+="/>"}(i),i.name="img",i.attrs={src:"data:image/svg+xml;utf8,"+h.replace(/#/g,"%23"),style:d,ignore:"T"},i.children=void 0,this.xml=!1,void(l.ignoreTags.style=!0)}var p={};if(e.align&&("table"===i.name?"center"===e.align?p["margin-inline-start"]=p["margin-inline-end"]="auto":p.float=e.align:p["text-align"]=e.align,e.align=void 0),e.dir&&(p.direction=e.dir,e.dir=void 0),"font"===i.name&&(e.color&&(p.color=e.color,e.color=void 0),e.face&&(p["font-family"]=e.face,e.face=void 0),e.size)){var u=parseInt(e.size);isNaN(u)||(u<1?u=1:u>7&&(u=7),p["font-size"]=["x-small","small","medium","large","x-large","xx-large","xxx-large"][u-1]),e.size=void 0}if((e.class||"").includes("align-center")&&(p["text-align"]="center"),Object.assign(p,this.parseStyle(i)),"table"!==i.name&&parseInt(p.width)>c&&(p["max-width"]="100%",p["box-sizing"]="border-box"),l.blockTags[i.name])i.name="div";else if(l.trustTags[i.name]||this.xml)if("a"===i.name||"ad"===i.name)this.expose();else if("video"===i.name||"audio"===i.name)(p.height||"").includes("auto")&&(p.height=void 0),i.children=void 0;else if("ul"!==i.name&&"ol"!==i.name||!i.c)if("table"===i.name){var f=parseFloat(e.cellpadding),g=parseFloat(e.cellspacing),m=parseFloat(e.border),v=p["border-color"],y=p["border-style"];if(i.c&&(isNaN(f)&&(f=2),isNaN(g)&&(g=2)),m&&(e.style+=";border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray")),i.flag&&i.c){i.flag=void 0,p.display="grid","collapse"===p["border-collapse"]&&(p["border-collapse"]=void 0,g=0),g?(p["grid-gap"]=g+"px",p.padding=g+"px"):m&&(e.style+=";border-left:0;border-top:0");var b=[],x=[],w=[],k={};!function i(e){for(var s=0;s<e.length;s++)if("tr"===e[s].name)x.push(e[s]);else if("colgroup"===e[s].name){var n,a=1,r=t(e[s].children||[]);try{for(r.s();!(n=r.n()).done;){var o=n.value;if("col"===o.name){var l=o.attrs.style||"",h=l.indexOf("width")?l.indexOf(";width"):0;if(-1!==h){var c=l.indexOf(";",h+6);-1===c&&(c=l.length),b[a]=l.substring(h?h+7:6,c)}a+=1}}}catch(t){r.e(t)}finally{r.f()}}else i(e[s].children||[])}(s);for(var N=1;N<=x.length;N++){for(var T=1,O=0;O<x[N-1].children.length;O++){var j=x[N-1].children[O];if("td"===j.name||"th"===j.name){for(;k[N+"."+T];)T++;j.c=1;var S=j.attrs.style||"",C=S.indexOf("width")?S.indexOf(";width"):0;if(-1!==C){var A=S.indexOf(";",C+6);-1===A&&(A=S.length),j.attrs.colspan||(b[T]=S.substring(C?C+7:6,A)),S=S.substr(0,C)+S.substr(A)}if(S+=";display:flex;flex-direction:column",-1!==(C=S.indexOf("vertical-align"))){var I=S.substr(C+15,10);I.includes("middle")?S+=";justify-content:center":I.includes("bottom")&&(S+=";justify-content:flex-end")}else S+=";justify-content:center";if(-1!==(C=S.indexOf("text-align"))){var L=S.substr(C+11,10);L.includes("center")?S+=";justify-content: center":L.includes("right")&&(S+=";justify-content: right")}if(S=(m?";border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray")+(g?"":";border-right:0;border-bottom:0"):"")+(f?";padding:".concat(f,"px"):"")+";"+S,j.attrs.colspan&&(S+=";grid-column-start:".concat(T,";grid-column-end:").concat(T+parseInt(j.attrs.colspan)),j.attrs.rowspan||(S+=";grid-row-start:".concat(N,";grid-row-end:").concat(N+1)),T+=parseInt(j.attrs.colspan)-1),j.attrs.rowspan){S+=";grid-row-start:".concat(N,";grid-row-end:").concat(N+parseInt(j.attrs.rowspan)),j.attrs.colspan||(S+=";grid-column-start:".concat(T,";grid-column-end:").concat(T+1));for(var z=1;z<j.attrs.rowspan;z++)for(var F=0;F<(j.attrs.colspan||1);F++)k[N+z+"."+(T-F)]=1}S&&(j.attrs.style=S),w.push(j),T++}}if(1===N){for(var q="",U=1;U<T;U++)q+=(b[U]?b[U]:"auto")+" ";p["grid-template-columns"]=q}}i.children=w}else i.c&&(p.display="table"),isNaN(g)||(p["border-spacing"]=g+"px"),(m||f||i.c)&&function t(e){for(var s=0;s<e.length;s++){var n=e[s];i.c&&(n.c=1),"th"===n.name||"td"===n.name?(m&&(n.attrs.style="border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray",";").concat(n.attrs.style||"")),f&&(n.attrs.style="padding:".concat(f,"px;").concat(n.attrs.style||""))):n.children&&t(n.children)}}(s);if(this.options.scrollTable&&!(e.style||"").includes("inline")){var V=Object.assign({},i);i.name="div",i.attrs={style:"overflow-x:auto;padding:1px"},i.children=[V],e=V.attrs}}else if(("tbody"===i.name||"tr"===i.name)&&i.flag&&i.c)i.flag=void 0,function t(i){for(var e=0;e<i.length;e++)if("td"===i[e].name)for(var s=0,n=["color","background","background-color"];s<n.length;s++){var a=n[s];p[a]&&(i[e].attrs.style=a+":"+p[a]+";"+(i[e].attrs.style||""))}else t(i[e].children||[])}(s);else if("td"!==i.name&&"th"!==i.name||!e.colspan&&!e.rowspan){if("ruby"===i.name){i.name="span";for(var D=0;D<s.length-1;D++)"text"===s[D].type&&"rt"===s[D+1].name&&(s[D]={name:"span",attrs:{style:"display:inline-block;text-align:center"},children:[{name:"div",attrs:{style:"font-size:50%;"+(s[D+1].attrs.style||"")},children:s[D+1].children},s[D]]},s.splice(D+1,1))}}else for(var B=this.stack.length;B--;)"table"!==this.stack[B].name&&"tbody"!==this.stack[B].name&&"tr"!==this.stack[B].name||(this.stack[B].flag=1);else{var M={a:"lower-alpha",A:"upper-alpha",i:"lower-roman",I:"upper-roman"};M[e.type]&&(e.style+=";list-style-type:"+M[e.type],e.type=void 0),i.c=1;for(var P=s.length;P--;)"li"===s[P].name&&(s[P].c=1)}else i.name="span";if((p.display||"").includes("flex")&&!i.c)for(var Z=s.length;Z--;){var _=s[Z];_.f&&(_.attrs.style=(_.attrs.style||"")+_.f,_.f=void 0)}var E=n&&((n.attrs.style||"").includes("flex")||(n.attrs.style||"").includes("grid"))&&!i.c;E&&(i.f=";max-width:100%"),s.length>=50&&i.c&&!(p.display||"").includes("flex")&&a(s);for(var G in p)if(p[G]){var W=";".concat(G,":").concat(p[G].replace(" !important",""));E&&(G.includes("flex")&&"flex-direction"!==G||"align-self"===G||G.includes("grid")||"-"===p[G][0]||G.includes("width")&&W.includes("%"))?(i.f+=W,"width"===G&&(e.style+=";width:100%")):e.style+=W}e.style=e.style.substr(1)||void 0,e.style||delete e.style},r.prototype.onText=function(t){if(!this.pre){for(var i,e="",s=0,a=t.length;s<a;s++)u[t[s]]?(" "!==e[e.length-1]&&(e+=" "),"\n"!==t[s]||i||(i=!0)):e+=t[s];if(" "===e&&i)return;t=e}var r=Object.create(null);if(r.type="text",r.text=n(t),this.hook(r)){(this.stack.length?this.stack[this.stack.length-1].children:this.nodes).push(r)}},o.prototype.parse=function(t){this.content=t||"",this.i=0,this.start=0,this.state=this.text;for(var i=this.content.length;-1!==this.i&&this.i<i;)this.state()},o.prototype.checkClose=function(t){var i="/"===this.content[this.i];return!!(">"===this.content[this.i]||i&&">"===this.content[this.i+1])&&(t&&this.handler[t](this.content.substring(this.start,this.i)),this.i+=i?2:1,this.start=this.i,this.handler.onOpenTag(i),"script"===this.handler.tagName?(this.i=this.content.indexOf("</",this.i),-1!==this.i&&(this.i+=2,this.start=this.i),this.state=this.endTag):this.state=this.text,!0)},o.prototype.text=function(){if(this.i=this.content.indexOf("<",this.i),-1===this.i)return void(this.start<this.content.length&&this.handler.onText(this.content.substring(this.start,this.content.length)));var t=this.content[this.i+1];if(t>="a"&&t<="z"||t>="A"&&t<="Z")this.start!==this.i&&this.handler.onText(this.content.substring(this.start,this.i)),this.start=++this.i,this.state=this.tagName;else if("/"===t||"!"===t||"?"===t){this.start!==this.i&&this.handler.onText(this.content.substring(this.start,this.i));var i=this.content[this.i+2];if("/"===t&&(i>="a"&&i<="z"||i>="A"&&i<="Z"))return this.i+=2,this.start=this.i,void(this.state=this.endTag);var e="--\x3e";"!"===t&&"-"===this.content[this.i+2]&&"-"===this.content[this.i+3]||(e=">"),this.i=this.content.indexOf(e,this.i),-1!==this.i&&(this.i+=e.length,this.start=this.i)}else this.i++},o.prototype.tagName=function(){if(u[this.content[this.i]]){for(this.handler.onTagName(this.content.substring(this.start,this.i));u[this.content[++this.i]];);this.i<this.content.length&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)}else this.checkClose("onTagName")||this.i++},o.prototype.attrName=function(){var t=this.content[this.i];if(u[t]||"="===t){this.handler.onAttrName(this.content.substring(this.start,this.i));for(var i="="===t,e=this.content.length;++this.i<e;)if(t=this.content[this.i],!u[t]){if(this.checkClose())return;if(i)return this.start=this.i,void(this.state=this.attrVal);if("="!==this.content[this.i])return this.start=this.i,void(this.state=this.attrName);i=!0}}else this.checkClose("onAttrName")||this.i++},o.prototype.attrVal=function(){var t=this.content[this.i],i=this.content.length;if('"'===t||"'"===t){if(this.start=++this.i,this.i=this.content.indexOf(t,this.i),-1===this.i)return;this.handler.onAttrVal(this.content.substring(this.start,this.i))}else for(;this.i<i;this.i++){if(u[this.content[this.i]]){this.handler.onAttrVal(this.content.substring(this.start,this.i));break}if(this.checkClose("onAttrVal"))return}for(;u[this.content[++this.i]];);this.i<i&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)},o.prototype.endTag=function(){var t=this.content[this.i];if(u[t]||">"===t||"/"===t){if(this.handler.onCloseTag(this.content.substring(this.start,this.i)),">"!==t&&(this.i=this.content.indexOf(">",this.i),-1===this.i))return;this.start=++this.i,this.state=this.text}else this.i++},module.exports=r;
node_modules/mp-html/dist/mp-qq/index.js
New file
@@ -0,0 +1,8 @@
"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}/*!
 * mp-html v2.5.1
 * https://github.com/jin-yufeng/mp-html
 *
 * Released under the MIT license
 * Author: Jin Yufeng
 */
var t=require("./parser"),n=[];Component({data:{nodes:[]},properties:{containerStyle:String,content:{type:String,value:"",observer:function(e){this.setContent(e)}},copyLink:{type:Boolean,value:!0},domain:String,errorImg:String,lazyLoad:Boolean,loadingImg:String,pauseVideo:{type:Boolean,value:!0},previewImg:{type:null,value:!0},scrollTable:Boolean,selectable:null,setTitle:{type:Boolean,value:!0},showImgMenu:{type:Boolean,value:!0},tagStyle:Object,useAnchor:null},created:function(){this.plugins=[];for(var e=n.length;e--;)this.plugins.push(new n[e](this))},detached:function(){this._hook("onDetached")},methods:{in:function(e,t,n){e&&t&&n&&(this._in={page:e,selector:t,scrollTop:n})},navigateTo:function(t,n){var i=this;return new Promise(function(o,r){if(!i.data.useAnchor)return void r(Error("Anchor is disabled"));var a=qq.createSelectorQuery().in(i._in?i._in.page:i).select((i._in?i._in.selector:"._root")+(t?"".concat(">>>","#").concat(t):"")).boundingClientRect();i._in?a.select(i._in.selector).scrollOffset().select(i._in.selector).boundingClientRect():a.selectViewport().scrollOffset(),a.exec(function(t){if(!t[0])return void r(Error("Label not found"));var a=t[1].scrollTop+t[0].top-(t[2]?t[2].top:0)+(n||parseInt(i.data.useAnchor)||0);i._in?i._in.page.setData(e({},i._in.scrollTop,a)):qq.pageScrollTo({scrollTop:a,duration:300}),o()})})},getText:function(e){var t="";return function e(n){for(var i=0;i<n.length;i++){var o=n[i];if("text"===o.type)t+=o.text.replace(/&amp;/g,"&");else if("br"===o.name)t+="\n";else{var r="p"===o.name||"div"===o.name||"tr"===o.name||"li"===o.name||"h"===o.name[0]&&o.name[1]>"0"&&o.name[1]<"7";r&&t&&"\n"!==t[t.length-1]&&(t+="\n"),o.children&&e(o.children),r&&"\n"!==t[t.length-1]?t+="\n":"td"!==o.name&&"th"!==o.name||(t+="\t")}}}(e||this.data.nodes),t},getRect:function(){var e=this;return new Promise(function(t,n){qq.createSelectorQuery().in(e).select("._root").boundingClientRect().exec(function(e){return e[0]?t(e[0]):n(Error("Root label not found"))})})},pauseMedia:function(){for(var e=(this._videos||[]).length;e--;)this._videos[e].pause()},setPlaybackRate:function(e){this.playbackRate=e;for(var t=(this._videos||[]).length;t--;)this._videos[t].playbackRate(e)},setContent:function(e,n){var i=this;this.imgList&&n||(this.imgList=[]),this._videos=[];var o={},r=new t(this).parse(e);if(n)for(var a=this.data.nodes.length,s=r.length;s--;)o["nodes[".concat(a+s,"]")]=r[s];else o.nodes=r;if(this.setData(o,function(){i._hook("onLoad"),i.triggerEvent("load")}),this.data.lazyLoad||this.imgList._unloadimgs<this.imgList.length/2){var l=0,c=function e(t){t&&t.height||(t={}),t.height===l?i.triggerEvent("ready",t):(l=t.height,setTimeout(function(){i.getRect().then(e).catch(e)},350))};this.getRect().then(c).catch(c)}else this.imgList._unloadimgs||this.getRect().then(function(e){i.triggerEvent("ready",e)}).catch(function(){i.triggerEvent("ready",{})})},_hook:function(e){for(var t=n.length;t--;)this.plugins[t][e]&&this.plugins[t][e]()},_add:function(e){e.detail.root=this}}});
node_modules/mp-html/dist/mp-qq/index.json
New file
@@ -0,0 +1 @@
{"component":true,"usingComponents":{"node":"./node/node"}}
node_modules/mp-html/dist/mp-qq/index.qml
New file
@@ -0,0 +1 @@
<view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}"><slot qq:if="{{!nodes[0]}}"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu,selectable]}}" catchadd="_add"/></view>
node_modules/mp-html/dist/mp-qq/index.qss
New file
@@ -0,0 +1 @@
._root{padding:1px 0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}._select{-webkit-user-select:text;user-select:text}
node_modules/mp-html/dist/mp-qq/node/node.js
New file
@@ -0,0 +1 @@
"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function e(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?t(Object(o),!0).forEach(function(t){r(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Component({data:{ctrl:{}},properties:{childs:Array,opts:Array},options:{addGlobalClass:!0},attached:function(){this.triggerEvent("add",this,{bubbles:!0,composed:!0})},methods:{noop:function(){},getNode:function(t){try{for(var e=t.split("_"),r=this.data.childs[e[0]],i=1;i<e.length;i++)r=r.children[e[i]];return r}catch(t){return{text:"",attrs:{},children:[]}}},play:function(t){var r=t.target.dataset.i,i=this.getNode(r);if(this.root.triggerEvent("play",{source:i.name,attrs:e(e({},i.attrs),{},{src:i.src[this.data.ctrl[r]||0]})}),this.root.data.pauseVideo){for(var o=!1,a=t.target.id,s=this.root._videos.length;s--;)this.root._videos[s].id===a?o=!0:this.root._videos[s].pause();if(!o){var n=qq.createVideoContext(a,this);n.id=a,this.root.playbackRate&&n.playbackRate(this.root.playbackRate),this.root._videos.push(n)}}},imgTap:function(t){var e=this.getNode(t.target.dataset.i);if(e.a)return this.linkTap(e.a);if(!e.attrs.ignore&&(this.root.triggerEvent("imgtap",e.attrs),this.root.data.previewImg)){var r=this.root.imgList[e.i];qq.previewImage({current:r,urls:this.root.imgList})}},imgLoad:function(t){var e,i=t.target.dataset.i,o=this.getNode(i);o.w?(this.data.opts[1]&&!this.data.ctrl[i]||-1===this.data.ctrl[i])&&(e=1):e=t.detail.width,e&&this.setData(r({},"ctrl."+i,e)),this.checkReady()},checkReady:function(){var t=this;this.root.data.lazyLoad||(this.root.imgList._unloadimgs-=1,this.root.imgList._unloadimgs||setTimeout(function(){t.root.getRect().then(function(e){t.root.triggerEvent("ready",e)}).catch(function(){t.root.triggerEvent("ready",{})})},350))},linkTap:function(t){var e=t.currentTarget?this.getNode(t.currentTarget.dataset.i):{},r=e.attrs||t,i=r.href;this.root.triggerEvent("linktap",Object.assign({innerText:this.root.getText(e.children||[])},r)),i&&("#"===i[0]?this.root.navigateTo(i.substring(1)).catch(function(){}):i.split("?")[0].includes("://")?this.root.data.copyLink&&qq.setClipboardData({data:i,success:function(){return qq.showToast({title:"链接已复制"})}}):qq.navigateTo({url:i,fail:function(){qq.switchTab({url:i,fail:function(){}})}}))},mediaError:function(t){var e=t.target.dataset.i,i=this.getNode(e);if("video"===i.name||"audio"===i.name){var o=(this.data.ctrl[e]||0)+1;if(o>i.src.length&&(o=0),o<i.src.length)return this.setData(r({},"ctrl."+e,o))}else"img"===i.name&&(this.data.opts[2]&&this.setData(r({},"ctrl."+e,-1)),this.checkReady());this.root&&this.root.triggerEvent("error",{source:i.name,attrs:i.attrs,errMsg:t.detail.errMsg})}}});
node_modules/mp-html/dist/mp-qq/node/node.json
New file
@@ -0,0 +1 @@
{"component":true,"usingComponents":{"node":"./node"}}
node_modules/mp-html/dist/mp-qq/node/node.qml
New file
@@ -0,0 +1 @@
<qs module="isInline">var e={abbr:!0,b:!0,big:!0,code:!0,del:!0,em:!0,i:!0,ins:!0,label:!0,q:!0,small:!0,span:!0,strong:!0,sub:!0,sup:!0};module.exports=function(n,i){return e[n]||-1!==(i||"").indexOf("inline")};</qs><template name="el"><block qq:if="{{n.name==='img'}}"><rich-text qq:if="{{n.t}}" style="display:{{n.t}}" nodes="<img class='_img' style='{{n.attrs.style}}' src='{{n.attrs.src}}'>" data-i="{{i}}" catchtap="imgTap"/><block qq:else><image qq:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))}}" lazy-load="{{opts[0]}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="imgTap" bindlongpress="noop"/></block></block><text qq:elif="{{n.text}}" decode>{{n.text}}</text><text qq:elif="{{n.name==='br'}}">{{'\n'}}</text><view qq:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap"><node childs="{{n.children}}" opts="{{opts}}" style="display:inherit"/></view><video qq:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" object-fit="{{n.attrs['object-fit']}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><audio qq:elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><rich-text qq:else id="{{n.attrs.id}}" style="{{n.f}}" nodes="{{[n]}}"/></template><block qq:for="{{childs}}" qq:for-item="n1" qq:for-index="i1" qq:key="i1"><template qq:if="{{!n1.c&&(!n1.children||n1.name==='a'||!isInline(n1.name,n1.attrs.style))}}" is="el" data="{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}"/><view qq:else id="{{n1.attrs.id}}" class="_{{n1.name}} {{n1.attrs.class}}" style="{{n1.attrs.style}}"><block qq:for="{{n1.children}}" qq:for-item="n2" qq:for-index="i2" qq:key="i2"><template qq:if="{{!n2.c&&(!n2.children||n2.name==='a'||!isInline(n2.name,n2.attrs.style))}}" is="el" data="{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}"/><view qq:else id="{{n2.attrs.id}}" class="_{{n2.name}} {{n2.attrs.class}}" style="{{n2.attrs.style}}"><block qq:for="{{n2.children}}" qq:for-item="n3" qq:for-index="i3" qq:key="i3"><template qq:if="{{!n3.c&&(!n3.children||n3.name==='a'||!isInline(n3.name,n3.attrs.style))}}" is="el" data="{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}"/><view qq:else id="{{n3.attrs.id}}" class="_{{n3.name}} {{n3.attrs.class}}" style="{{n3.attrs.style}}"><block qq:for="{{n3.children}}" qq:for-item="n4" qq:for-index="i4" qq:key="i4"><template qq:if="{{!n4.c&&(!n4.children||n4.name==='a'||!isInline(n4.name,n4.attrs.style))}}" is="el" data="{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}"/><view qq:else id="{{n4.attrs.id}}" class="_{{n4.name}} {{n4.attrs.class}}" style="{{n4.attrs.style}}"><block qq:for="{{n4.children}}" qq:for-item="n5" qq:for-index="i5" qq:key="i5"><template qq:if="{{!n5.c&&(!n5.children||n5.name==='a'||!isInline(n5.name,n5.attrs.style))}}" is="el" data="{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}"/><node qq:else id="{{n5.attrs.id}}" class="_{{n5.name}} {{n5.attrs.class}}" style="{{n5.attrs.style}}" childs="{{n5.children}}" opts="{{opts}}"/></block></view></block></view></block></view></block></view></block>
node_modules/mp-html/dist/mp-qq/node/node.qss
New file
@@ -0,0 +1 @@
._a{padding:1.5px 0 1.5px 0;color:#366092;word-break:break-all}._hover{text-decoration:underline;opacity:.7}._img{max-width:100%;-webkit-touch-callout:none}._b,._strong{font-weight:700}._code{font-family:monospace}._del{text-decoration:line-through}._em,._i{font-style:italic}._h1{font-size:2em}._h2{font-size:1.5em}._h3{font-size:1.17em}._h5{font-size:.83em}._h6{font-size:.67em}._h1,._h2,._h3,._h4,._h5,._h6{display:block;font-weight:700}._ins{text-decoration:underline}._li{display:list-item}._ol{list-style-type:decimal}._ol,._ul{display:block;padding-left:40px;margin:1em 0}._q::before{content:'"'}._q::after{content:'"'}._sub{font-size:smaller;vertical-align:sub}._sup{font-size:smaller;vertical-align:super}._tbody,._tfoot,._thead{display:table-row-group}._tr{display:table-row}._td,._th{display:table-cell;vertical-align:middle}._th{font-weight:700;text-align:center}._ul{list-style-type:disc}._ul ._ul{margin:0;list-style-type:circle}._ul ._ul ._ul{list-style-type:square}._abbr,._b,._code,._del,._em,._i,._ins,._label,._q,._span,._strong,._sub,._sup{display:inline}._blockquote,._div,._p{display:block}
node_modules/mp-html/dist/mp-qq/parser.js
New file
@@ -0,0 +1 @@
"use strict";function t(t,e){var s;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(s=i(t))||e&&t&&"number"==typeof t.length){s&&(t=s);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,l=!1;return{s:function(){s=t[Symbol.iterator]()},n:function(){var t=s.next();return o=t.done,t},e:function(t){l=!0,r=t},f:function(){try{o||null==s.return||s.return()}finally{if(l)throw r}}}}function i(t,i){if(t){if("string"==typeof t)return e(t,i);var s=Object.prototype.toString.call(t).slice(8,-1);return"Object"===s&&t.constructor&&(s=t.constructor.name),"Map"===s||"Set"===s?Array.from(t):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?e(t,i):void 0}}function e(t,i){(null==i||i>t.length)&&(i=t.length);for(var e=0,s=new Array(i);e<i;e++)s[e]=t[e];return s}function s(t){for(var i=Object.create(null),e=t.split(","),s=e.length;s--;)i[e[s]]=!0;return i}function n(t,i){for(var e=t.indexOf("&");-1!==e;){var s=t.indexOf(";",e+3),n=void 0;if(-1===s)break;"#"===t[e+1]?(n=parseInt(("x"===t[e+2]?"0":"")+t.substring(e+2,s)),isNaN(n)||(t=t.substr(0,e)+String.fromCharCode(n)+t.substr(s+1))):(n=t.substring(e+1,s),(l.entities[n]||"amp"===n&&i)&&(t=t.substr(0,e)+(l.entities[n]||"&")+t.substr(s+1))),e=t.indexOf("&",e+1)}return t}function a(t){for(var i=t.length-1,e=i;e>=-1;e--)(-1===e||t[e].c||!t[e].name||"div"!==t[e].name&&"p"!==t[e].name&&"h"!==t[e].name[0]||(t[e].attrs.style||"").includes("inline"))&&(i-e>=5&&t.splice(e+1,i-e,{name:"div",attrs:{},children:t.slice(e+1,i+1)}),i=e-1)}function r(t){this.options=t.data||{},this.tagStyle=Object.assign({},l.tagStyle,this.options.tagStyle),this.imgList=t.imgList||[],this.imgList._unloadimgs=0,this.plugins=t.plugins||[],this.attrs=Object.create(null),this.stack=[],this.nodes=[],this.pre=(this.options.containerStyle||"").includes("white-space")&&this.options.containerStyle.includes("pre")?2:0}function o(t){this.handler=t}var l={trustTags:s("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"),blockTags:s("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"),ignoreTags:s("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"),voidTags:s("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"),entities:{lt:"<",gt:">",quot:'"',apos:"'",ensp:" ",emsp:" ",nbsp:" ",semi:";",ndash:"–",mdash:"—",middot:"·",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",hellip:"…",larr:"←",uarr:"↑",rarr:"→",darr:"↓"},tagStyle:{address:"font-style:italic",big:"display:inline;font-size:1.2em",caption:"display:table-caption;text-align:center",center:"text-align:center",cite:"font-style:italic",dd:"margin-left:40px",mark:"background-color:yellow",pre:"font-family:monospace;white-space:pre",s:"text-decoration:line-through",small:"display:inline;font-size:0.8em",strike:"text-decoration:line-through",u:"text-decoration:underline"},svgDict:{animatetransform:"animateTransform",lineargradient:"linearGradient",viewbox:"viewBox",attributename:"attributeName",repeatcount:"repeatCount",repeatdur:"repeatDur",foreignobject:"foreignObject"}},h={},c,d,p=qq.getSystemInfoSync();c=p.windowWidth;var u=s(" ,\r,\n,\t,\f"),f=0;r.prototype.parse=function(t){for(var i=this.plugins.length;i--;)this.plugins[i].onUpdate&&(t=this.plugins[i].onUpdate(t,l)||t);for(new o(this).parse(t);this.stack.length;)this.popNode();return this.nodes.length>50&&a(this.nodes),this.nodes},r.prototype.expose=function(){for(var t=this.stack.length;t--;){var i=this.stack[t];if(i.c||"a"===i.name||"video"===i.name||"audio"===i.name)return;i.c=1}},r.prototype.hook=function(t){for(var i=this.plugins.length;i--;)if(this.plugins[i].onParse&&!1===this.plugins[i].onParse(t,this))return!1;return!0},r.prototype.getUrl=function(t){var i=this.options.domain;return"/"===t[0]?"/"===t[1]?t=(i?i.split("://")[0]:"http")+":"+t:i&&(t=i+t):!i||t.includes("data:")||t.includes("://")||(t=i+"/"+t),t},r.prototype.parseStyle=function(t){var i=t.attrs,e=(this.tagStyle[t.name]||"").split(";").concat((i.style||"").split(";")),s={},n="";i.id&&!this.xml&&(this.options.useAnchor?this.expose():"img"!==t.name&&"a"!==t.name&&"video"!==t.name&&"audio"!==t.name&&(i.id=void 0)),i.width&&(s.width=parseFloat(i.width)+(i.width.includes("%")?"%":"px"),i.width=void 0),i.height&&(s.height=parseFloat(i.height)+(i.height.includes("%")?"%":"px"),i.height=void 0);for(var a=0,r=e.length;a<r;a++){var o=e[a].split(":");if(!(o.length<2)){var l=o.shift().trim().toLowerCase(),h=o.join(":").trim();if("-"===h[0]&&h.lastIndexOf("-")>0||h.includes("safe"))n+=";".concat(l,":").concat(h);else if(!s[l]||h.includes("import")||!s[l].includes("import")){if(h.includes("url")){var d=h.indexOf("(")+1;if(d){for(;'"'===h[d]||"'"===h[d]||u[h[d]];)d++;h=h.substr(0,d)+this.getUrl(h.substr(d))}}else h.includes("rpx")&&(h=h.replace(/[0-9.]+\s*rpx/g,function(t){return parseFloat(t)*c/750+"px"}));s[l]=h}}}return t.attrs.style=n,s},r.prototype.onTagName=function(t){this.tagName=this.xml?t:t.toLowerCase(),"svg"===this.tagName&&(this.xml=(this.xml||0)+1,l.ignoreTags.style=void 0)},r.prototype.onAttrName=function(t){t=this.xml?t:t.toLowerCase(),"data-"===t.substr(0,5)?"data-src"!==t||this.attrs.src?"img"===this.tagName||"a"===this.tagName?this.attrName=t:this.attrName=void 0:this.attrName="src":(this.attrName=t,this.attrs[t]="T")},r.prototype.onAttrVal=function(t){var i=this.attrName||"";"style"===i||"href"===i?this.attrs[i]=n(t,!0):i.includes("src")?this.attrs[i]=this.getUrl(n(t,!0)):i&&(this.attrs[i]=t)},r.prototype.onOpenTag=function(t){var i=Object.create(null);i.name=this.tagName,i.attrs=this.attrs,this.attrs=Object.create(null);var e=i.attrs,s=this.stack[this.stack.length-1],n=s?s.children:this.nodes,a=this.xml?t:l.voidTags[i.name];if(h[i.name]&&(e.class=h[i.name]+(e.class?" "+e.class:"")),"embed"===i.name){var r=e.src||"";r.includes(".mp4")||r.includes(".3gp")||r.includes(".m3u8")||(e.type||"").includes("video")?i.name="video":(r.includes(".mp3")||r.includes(".wav")||r.includes(".aac")||r.includes(".m4a")||(e.type||"").includes("audio"))&&(i.name="audio"),e.autostart&&(e.autoplay="T"),e.controls="T"}if("video"!==i.name&&"audio"!==i.name||("video"!==i.name||e.id||(e.id="v"+f++),e.controls||e.autoplay||(e.controls="T"),i.src=[],e.src&&(i.src.push(e.src),e.src=void 0),this.expose()),a){if(!this.hook(i)||l.ignoreTags[i.name])return void("base"!==i.name||this.options.domain?"source"===i.name&&s&&("video"===s.name||"audio"===s.name)&&e.src&&s.src.push(e.src):this.options.domain=e.href);var o=this.parseStyle(i);if("img"===i.name){if(e.src&&(e.src.includes("webp")&&(i.webp="T"),e.src.includes("data:")&&"all"!==this.options.previewImg&&!e["original-src"]&&(e.ignore="T"),!e.ignore||i.webp||e.src.includes("cloud://"))){for(var d=this.stack.length;d--;){var p=this.stack[d];"table"!==p.name||i.webp||e.src.includes("cloud://")||(!o.display||o.display.includes("inline")?i.t="inline-block":i.t=o.display,o.display=void 0);var u=p.attrs.style||"";if(!u.includes("flex:")||u.includes("flex:0")||u.includes("flex: 0")||o.width&&!(parseInt(o.width)>100))if(u.includes("flex")&&"100%"===o.width)for(var g=d+1;g<this.stack.length;g++){var m=this.stack[g].attrs.style||"";if(!m.includes(";width")&&!m.includes(" width")&&0!==m.indexOf("width")){o.width="";break}}else u.includes("inline-block")&&(o.width&&"%"===o.width[o.width.length-1]?(p.attrs.style+=";max-width:"+o.width,o.width=""):p.attrs.style+=";max-width:100%");else{o.width="100% !important",o.height="";for(var v=d+1;v<this.stack.length;v++)this.stack[v].attrs.style=(this.stack[v].attrs.style||"").replace("inline-","")}"a"===p.name?i.a=p.attrs:p.c=1}i.i=this.imgList.length;var y=e["original-src"]||e.src;if(this.imgList.includes(y)){var b=y.indexOf("://");if(-1!==b){b+=3;for(var x=y.substr(0,b);b<y.length&&"/"!==y[b];b++)x+=Math.random()>.5?y[b].toUpperCase():y[b];x+=y.substr(b),y=x}}this.imgList.push(y),i.t||(this.imgList._unloadimgs+=1)}"inline"===o.display&&(o.display=""),e.ignore&&(o["max-width"]=o["max-width"]||"100%",e.style+=";-webkit-touch-callout:none"),parseInt(o.width)>c&&(o.height=void 0),isNaN(parseInt(o.width))||(i.w="T"),!isNaN(parseInt(o.height))&&(!o.height.includes("%")||s&&(s.attrs.style||"").includes("height"))&&(i.h="T"),i.w&&i.h&&o["object-fit"]&&("contain"===o["object-fit"]?i.m="aspectFit":"cover"===o["object-fit"]&&(i.m="aspectFill"))}else if("svg"===i.name)return n.push(i),this.stack.push(i),void this.popNode();for(var w in o)o[w]&&(e.style+=";".concat(w,":").concat(o[w].replace(" !important","")));e.style=e.style.substr(1)||void 0}else("pre"===i.name||(e.style||"").includes("white-space")&&e.style.includes("pre"))&&2!==this.pre&&(this.pre=i.pre=1),i.children=[],this.stack.push(i);n.push(i)},r.prototype.onCloseTag=function(t){t=this.xml?t:t.toLowerCase();var i;for(i=this.stack.length;i--&&this.stack[i].name!==t;);if(-1!==i)for(;this.stack.length>i;)this.popNode();else if("p"===t||"br"===t){var e=this.stack.length?this.stack[this.stack.length-1].children:this.nodes;e.push({name:t,attrs:{class:h[t],style:this.tagStyle[t]}})}},r.prototype.popNode=function(){var i=this.stack.pop(),e=i.attrs,s=i.children,n=this.stack[this.stack.length-1],r=n?n.children:this.nodes;if(!this.hook(i)||l.ignoreTags[i.name])return"title"===i.name&&s.length&&"text"===s[0].type&&this.options.setTitle&&qq.setNavigationBarTitle({title:s[0].text}),void r.pop();if(i.pre&&2!==this.pre){this.pre=i.pre=void 0;for(var o=this.stack.length;o--;)this.stack[o].pre&&(this.pre=1)}if("svg"===i.name){if(this.xml>1)return void this.xml--;var h="",d=e.style;return e.style="",e.xmlns="http://www.w3.org/2000/svg",function i(e){if("text"===e.type)return void(h+=e.text);var s=l.svgDict[e.name]||e.name;if("foreignObject"===s){var n,a=t(e.children||[]);try{for(a.s();!(n=a.n()).done;){var r=n.value;if(r.attrs&&!r.attrs.xmlns){r.attrs.xmlns="http://www.w3.org/1999/xhtml";break}}}catch(t){a.e(t)}finally{a.f()}}h+="<"+s;for(var o in e.attrs){var c=e.attrs[o];c&&(h+=" ".concat(l.svgDict[o]||o,'="').concat(c.replace(/"/g,""),'"'))}if(e.children){h+=">";for(var d=0;d<e.children.length;d++)i(e.children[d]);h+="</"+s+">"}else h+="/>"}(i),i.name="img",i.attrs={src:"data:image/svg+xml;utf8,"+h.replace(/#/g,"%23"),style:d,ignore:"T"},i.children=void 0,this.xml=!1,void(l.ignoreTags.style=!0)}var p={};if(e.align&&("table"===i.name?"center"===e.align?p["margin-inline-start"]=p["margin-inline-end"]="auto":p.float=e.align:p["text-align"]=e.align,e.align=void 0),e.dir&&(p.direction=e.dir,e.dir=void 0),"font"===i.name&&(e.color&&(p.color=e.color,e.color=void 0),e.face&&(p["font-family"]=e.face,e.face=void 0),e.size)){var u=parseInt(e.size);isNaN(u)||(u<1?u=1:u>7&&(u=7),p["font-size"]=["x-small","small","medium","large","x-large","xx-large","xxx-large"][u-1]),e.size=void 0}if((e.class||"").includes("align-center")&&(p["text-align"]="center"),Object.assign(p,this.parseStyle(i)),"table"!==i.name&&parseInt(p.width)>c&&(p["max-width"]="100%",p["box-sizing"]="border-box"),l.blockTags[i.name])i.name="div";else if(l.trustTags[i.name]||this.xml)if("a"===i.name||"ad"===i.name)this.expose();else if("video"===i.name||"audio"===i.name)(p.height||"").includes("auto")&&(p.height=void 0),i.children=void 0;else if("ul"!==i.name&&"ol"!==i.name||!i.c)if("table"===i.name){var f=parseFloat(e.cellpadding),g=parseFloat(e.cellspacing),m=parseFloat(e.border),v=p["border-color"],y=p["border-style"];if(i.c&&(isNaN(f)&&(f=2),isNaN(g)&&(g=2)),m&&(e.style+=";border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray")),i.flag&&i.c){i.flag=void 0,p.display="grid","collapse"===p["border-collapse"]&&(p["border-collapse"]=void 0,g=0),g?(p["grid-gap"]=g+"px",p.padding=g+"px"):m&&(e.style+=";border-left:0;border-top:0");var b=[],x=[],w=[],k={};!function i(e){for(var s=0;s<e.length;s++)if("tr"===e[s].name)x.push(e[s]);else if("colgroup"===e[s].name){var n,a=1,r=t(e[s].children||[]);try{for(r.s();!(n=r.n()).done;){var o=n.value;if("col"===o.name){var l=o.attrs.style||"",h=l.indexOf("width")?l.indexOf(";width"):0;if(-1!==h){var c=l.indexOf(";",h+6);-1===c&&(c=l.length),b[a]=l.substring(h?h+7:6,c)}a+=1}}}catch(t){r.e(t)}finally{r.f()}}else i(e[s].children||[])}(s);for(var N=1;N<=x.length;N++){for(var T=1,O=0;O<x[N-1].children.length;O++){var j=x[N-1].children[O];if("td"===j.name||"th"===j.name){for(;k[N+"."+T];)T++;j.c=1;var S=j.attrs.style||"",C=S.indexOf("width")?S.indexOf(";width"):0;if(-1!==C){var A=S.indexOf(";",C+6);-1===A&&(A=S.length),j.attrs.colspan||(b[T]=S.substring(C?C+7:6,A)),S=S.substr(0,C)+S.substr(A)}if(S+=";display:flex;flex-direction:column",-1!==(C=S.indexOf("vertical-align"))){var I=S.substr(C+15,10);I.includes("middle")?S+=";justify-content:center":I.includes("bottom")&&(S+=";justify-content:flex-end")}else S+=";justify-content:center";if(-1!==(C=S.indexOf("text-align"))){var L=S.substr(C+11,10);L.includes("center")?S+=";justify-content: center":L.includes("right")&&(S+=";justify-content: right")}if(S=(m?";border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray")+(g?"":";border-right:0;border-bottom:0"):"")+(f?";padding:".concat(f,"px"):"")+";"+S,j.attrs.colspan&&(S+=";grid-column-start:".concat(T,";grid-column-end:").concat(T+parseInt(j.attrs.colspan)),j.attrs.rowspan||(S+=";grid-row-start:".concat(N,";grid-row-end:").concat(N+1)),T+=parseInt(j.attrs.colspan)-1),j.attrs.rowspan){S+=";grid-row-start:".concat(N,";grid-row-end:").concat(N+parseInt(j.attrs.rowspan)),j.attrs.colspan||(S+=";grid-column-start:".concat(T,";grid-column-end:").concat(T+1));for(var z=1;z<j.attrs.rowspan;z++)for(var F=0;F<(j.attrs.colspan||1);F++)k[N+z+"."+(T-F)]=1}S&&(j.attrs.style=S),w.push(j),T++}}if(1===N){for(var q="",U=1;U<T;U++)q+=(b[U]?b[U]:"auto")+" ";p["grid-template-columns"]=q}}i.children=w}else i.c&&(p.display="table"),isNaN(g)||(p["border-spacing"]=g+"px"),(m||f||i.c)&&function t(e){for(var s=0;s<e.length;s++){var n=e[s];i.c&&(n.c=1),"th"===n.name||"td"===n.name?(m&&(n.attrs.style="border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray",";").concat(n.attrs.style||"")),f&&(n.attrs.style="padding:".concat(f,"px;").concat(n.attrs.style||""))):n.children&&t(n.children)}}(s);if(this.options.scrollTable&&!(e.style||"").includes("inline")){var V=Object.assign({},i);i.name="div",i.attrs={style:"overflow-x:auto;padding:1px"},i.children=[V],e=V.attrs}}else if(("tbody"===i.name||"tr"===i.name)&&i.flag&&i.c)i.flag=void 0,function t(i){for(var e=0;e<i.length;e++)if("td"===i[e].name)for(var s=0,n=["color","background","background-color"];s<n.length;s++){var a=n[s];p[a]&&(i[e].attrs.style=a+":"+p[a]+";"+(i[e].attrs.style||""))}else t(i[e].children||[])}(s);else if("td"!==i.name&&"th"!==i.name||!e.colspan&&!e.rowspan){if("ruby"===i.name){i.name="span";for(var D=0;D<s.length-1;D++)"text"===s[D].type&&"rt"===s[D+1].name&&(s[D]={name:"span",attrs:{style:"display:inline-block;text-align:center"},children:[{name:"div",attrs:{style:"font-size:50%;"+(s[D+1].attrs.style||"")},children:s[D+1].children},s[D]]},s.splice(D+1,1))}}else for(var B=this.stack.length;B--;)"table"!==this.stack[B].name&&"tbody"!==this.stack[B].name&&"tr"!==this.stack[B].name||(this.stack[B].flag=1);else{var M={a:"lower-alpha",A:"upper-alpha",i:"lower-roman",I:"upper-roman"};M[e.type]&&(e.style+=";list-style-type:"+M[e.type],e.type=void 0),i.c=1;for(var P=s.length;P--;)"li"===s[P].name&&(s[P].c=1)}else i.name="span";if((p.display||"").includes("flex")&&!i.c)for(var Z=s.length;Z--;){var _=s[Z];_.f&&(_.attrs.style=(_.attrs.style||"")+_.f,_.f=void 0)}var E=n&&((n.attrs.style||"").includes("flex")||(n.attrs.style||"").includes("grid"))&&!i.c&&!(p.display||"").includes("inline");E&&(i.f=";max-width:100%"),s.length>=50&&i.c&&!(p.display||"").includes("flex")&&a(s);for(var G in p)if(p[G]){var W=";".concat(G,":").concat(p[G].replace(" !important",""));E&&(G.includes("flex")&&"flex-direction"!==G||"align-self"===G||G.includes("grid")||"-"===p[G][0]||G.includes("width")&&W.includes("%"))?(i.f+=W,"width"===G&&(e.style+=";width:100%")):e.style+=W}e.style=e.style.substr(1)||void 0},r.prototype.onText=function(t){if(!this.pre){for(var i,e="",s=0,a=t.length;s<a;s++)u[t[s]]?(" "!==e[e.length-1]&&(e+=" "),"\n"!==t[s]||i||(i=!0)):e+=t[s];if(" "===e&&i)return;t=e}var r=Object.create(null);if(r.type="text",r.text=n(t),this.hook(r)){(this.stack.length?this.stack[this.stack.length-1].children:this.nodes).push(r)}},o.prototype.parse=function(t){this.content=t||"",this.i=0,this.start=0,this.state=this.text;for(var i=this.content.length;-1!==this.i&&this.i<i;)this.state()},o.prototype.checkClose=function(t){var i="/"===this.content[this.i];return!!(">"===this.content[this.i]||i&&">"===this.content[this.i+1])&&(t&&this.handler[t](this.content.substring(this.start,this.i)),this.i+=i?2:1,this.start=this.i,this.handler.onOpenTag(i),"script"===this.handler.tagName?(this.i=this.content.indexOf("</",this.i),-1!==this.i&&(this.i+=2,this.start=this.i),this.state=this.endTag):this.state=this.text,!0)},o.prototype.text=function(){if(this.i=this.content.indexOf("<",this.i),-1===this.i)return void(this.start<this.content.length&&this.handler.onText(this.content.substring(this.start,this.content.length)));var t=this.content[this.i+1];if(t>="a"&&t<="z"||t>="A"&&t<="Z")this.start!==this.i&&this.handler.onText(this.content.substring(this.start,this.i)),this.start=++this.i,this.state=this.tagName;else if("/"===t||"!"===t||"?"===t){this.start!==this.i&&this.handler.onText(this.content.substring(this.start,this.i));var i=this.content[this.i+2];if("/"===t&&(i>="a"&&i<="z"||i>="A"&&i<="Z"))return this.i+=2,this.start=this.i,void(this.state=this.endTag);var e="--\x3e";"!"===t&&"-"===this.content[this.i+2]&&"-"===this.content[this.i+3]||(e=">"),this.i=this.content.indexOf(e,this.i),-1!==this.i&&(this.i+=e.length,this.start=this.i)}else this.i++},o.prototype.tagName=function(){if(u[this.content[this.i]]){for(this.handler.onTagName(this.content.substring(this.start,this.i));u[this.content[++this.i]];);this.i<this.content.length&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)}else this.checkClose("onTagName")||this.i++},o.prototype.attrName=function(){var t=this.content[this.i];if(u[t]||"="===t){this.handler.onAttrName(this.content.substring(this.start,this.i));for(var i="="===t,e=this.content.length;++this.i<e;)if(t=this.content[this.i],!u[t]){if(this.checkClose())return;if(i)return this.start=this.i,void(this.state=this.attrVal);if("="!==this.content[this.i])return this.start=this.i,void(this.state=this.attrName);i=!0}}else this.checkClose("onAttrName")||this.i++},o.prototype.attrVal=function(){var t=this.content[this.i],i=this.content.length;if('"'===t||"'"===t){if(this.start=++this.i,this.i=this.content.indexOf(t,this.i),-1===this.i)return;this.handler.onAttrVal(this.content.substring(this.start,this.i))}else for(;this.i<i;this.i++){if(u[this.content[this.i]]){this.handler.onAttrVal(this.content.substring(this.start,this.i));break}if(this.checkClose("onAttrVal"))return}for(;u[this.content[++this.i]];);this.i<i&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)},o.prototype.endTag=function(){var t=this.content[this.i];if(u[t]||">"===t||"/"===t){if(this.handler.onCloseTag(this.content.substring(this.start,this.i)),">"!==t&&(this.i=this.content.indexOf(">",this.i),-1===this.i))return;this.start=++this.i,this.state=this.text}else this.i++},module.exports=r;
node_modules/mp-html/dist/mp-toutiao/index.js
New file
@@ -0,0 +1,8 @@
"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}/*!
 * mp-html v2.5.1
 * https://github.com/jin-yufeng/mp-html
 *
 * Released under the MIT license
 * Author: Jin Yufeng
 */
var t=require("./parser"),n=[];Component({data:{nodes:[]},properties:{containerStyle:String,content:{type:String,value:"",observer:function(e){this.setContent(e)}},copyLink:{type:Boolean,value:!0},domain:String,errorImg:String,lazyLoad:Boolean,loadingImg:String,pauseVideo:{type:Boolean,value:!0},previewImg:{type:null,value:!0},scrollTable:Boolean,selectable:null,setTitle:{type:Boolean,value:!0},showImgMenu:{type:Boolean,value:!0},tagStyle:Object,useAnchor:null},created:function(){this.plugins=[];for(var e=n.length;e--;)this.plugins.push(new n[e](this))},detached:function(){this._hook("onDetached")},methods:{in:function(e,t,n){e&&t&&n&&(this._in={page:e,selector:t,scrollTop:n})},navigateTo:function(t,n){var i=this;return new Promise(function(o,r){if(!i.data.useAnchor)return void r(Error("Anchor is disabled"));var a=tt.createSelectorQuery().in(i._in?i._in.page:i).select((i._in?i._in.selector:"._root")+(t?"".concat(">>>","#").concat(t):"")).boundingClientRect();i._in?a.select(i._in.selector).scrollOffset().select(i._in.selector).boundingClientRect():a.selectViewport().scrollOffset(),a.exec(function(t){if(!t[0])return void r(Error("Label not found"));var a=t[1].scrollTop+t[0].top-(t[2]?t[2].top:0)+(n||parseInt(i.data.useAnchor)||0);i._in?i._in.page.setData(e({},i._in.scrollTop,a)):tt.pageScrollTo({scrollTop:a,duration:300}),o()})})},getText:function(e){var t="";return function e(n){for(var i=0;i<n.length;i++){var o=n[i];if("text"===o.type)t+=o.text.replace(/&amp;/g,"&");else if("br"===o.name)t+="\n";else{var r="p"===o.name||"div"===o.name||"tr"===o.name||"li"===o.name||"h"===o.name[0]&&o.name[1]>"0"&&o.name[1]<"7";r&&t&&"\n"!==t[t.length-1]&&(t+="\n"),o.children&&e(o.children),r&&"\n"!==t[t.length-1]?t+="\n":"td"!==o.name&&"th"!==o.name||(t+="\t")}}}(e||this.data.nodes),t},getRect:function(){var e=this;return new Promise(function(t,n){tt.createSelectorQuery().in(e).select("._root").boundingClientRect().exec(function(e){return e[0]?t(e[0]):n(Error("Root label not found"))})})},pauseMedia:function(){for(var e=(this._videos||[]).length;e--;)this._videos[e].pause()},setPlaybackRate:function(e){this.playbackRate=e;for(var t=(this._videos||[]).length;t--;)this._videos[t].playbackRate(e)},setContent:function(e,n){var i=this;this.imgList&&n||(this.imgList=[]),this._videos=[];var o={},r=new t(this).parse(e);if(n)for(var a=this.data.nodes.length,s=r.length;s--;)o["nodes[".concat(a+s,"]")]=r[s];else o.nodes=r;if(this.setData(o),this.selectComponent("#_root",function(e){e.root=i,i._hook("onLoad"),i.triggerEvent("load")}),this.data.lazyLoad||this.imgList._unloadimgs<this.imgList.length/2){var l=0,c=function e(t){t&&t.height||(t={}),t.height===l?i.triggerEvent("ready",t):(l=t.height,setTimeout(function(){i.getRect().then(e).catch(e)},350))};this.getRect().then(c).catch(c)}else this.imgList._unloadimgs||this.getRect().then(function(e){i.triggerEvent("ready",e)}).catch(function(){i.triggerEvent("ready",{})})},_hook:function(e){for(var t=n.length;t--;)this.plugins[t][e]&&this.plugins[t][e]()}}});
node_modules/mp-html/dist/mp-toutiao/index.json
New file
@@ -0,0 +1 @@
{"component":true,"usingComponents":{"node":"./node/node"}}
node_modules/mp-html/dist/mp-toutiao/index.ttml
New file
@@ -0,0 +1 @@
<view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}"><slot tt:if="{{!nodes[0]}}"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu,selectable]}}"/></view>
node_modules/mp-html/dist/mp-toutiao/index.ttss
New file
@@ -0,0 +1 @@
._root{padding:1px 0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}._select{-webkit-user-select:text;user-select:text}
node_modules/mp-html/dist/mp-toutiao/node/node.js
New file
@@ -0,0 +1 @@
"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function e(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?t(Object(o),!0).forEach(function(t){r(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Component({data:{ctrl:{}},properties:{childs:Array,opts:Array},options:{addGlobalClass:!0},methods:{noop:function(){},getNode:function(t){try{for(var e=t.split("_"),r=this.data.childs[e[0]],i=1;i<e.length;i++)r=r.children[e[i]];return r}catch(t){return{text:"",attrs:{},children:[]}}},play:function(t){var r=t.target.dataset.i,i=this.getNode(r);if(this.root.triggerEvent("play",{source:i.name,attrs:e(e({},i.attrs),{},{src:i.src[this.data.ctrl[r]||0]})}),this.root.data.pauseVideo){for(var o=!1,a=t.target.id,s=this.root._videos.length;s--;)this.root._videos[s].id===a?o=!0:this.root._videos[s].pause();if(!o){var n=tt.createVideoContext(a,this);n.id=a,this.root.playbackRate&&n.playbackRate(this.root.playbackRate),this.root._videos.push(n)}}},imgTap:function(t){var e=this.getNode(t.target.dataset.i);if(e.a)return this.linkTap(e.a);if(!e.attrs.ignore&&(this.root.triggerEvent("imgtap",e.attrs),this.root.data.previewImg)){var r=this.root.imgList[e.i];tt.previewImage({current:r,urls:this.root.imgList})}},imgLoad:function(t){var e,i=t.target.dataset.i,o=this.getNode(i);o.w?(this.data.opts[1]&&!this.data.ctrl[i]||-1===this.data.ctrl[i])&&(e=1):e=t.detail.width,e&&e!==this.data.ctrl[i]&&this.setData(r({},"ctrl."+i,e)),this.checkReady()},checkReady:function(){var t=this;this.root.data.lazyLoad||(this.root.imgList._unloadimgs-=1,this.root.imgList._unloadimgs||setTimeout(function(){t.root.getRect().then(function(e){t.root.triggerEvent("ready",e)}).catch(function(){t.root.triggerEvent("ready",{})})},350))},linkTap:function(t){var e=t.currentTarget?this.getNode(t.currentTarget.dataset.i):{},r=e.attrs||t,i=r.href;this.root.triggerEvent("linktap",Object.assign({innerText:this.root.getText(e.children||[])},r)),i&&("#"===i[0]?this.root.navigateTo(i.substring(1)).catch(function(){}):i.split("?")[0].includes("://")?this.root.data.copyLink&&tt.setClipboardData({data:i,success:function(){return tt.showToast({title:"链接已复制"})}}):tt.navigateTo({url:i,fail:function(){tt.switchTab({url:i,fail:function(){}})}}))},mediaError:function(t){var e=t.target.dataset.i,i=this.getNode(e);if("video"===i.name||"audio"===i.name){var o=(this.data.ctrl[e]||0)+1;if(o>i.src.length&&(o=0),o<i.src.length)return this.setData(r({},"ctrl."+e,o))}else"img"===i.name&&(this.data.opts[2]&&this.setData(r({},"ctrl."+e,-1)),this.checkReady());this.root&&this.root.triggerEvent("error",{source:i.name,attrs:i.attrs,errMsg:t.detail.errMsg})}}});
node_modules/mp-html/dist/mp-toutiao/node/node.json
New file
@@ -0,0 +1 @@
{"component":true,"usingComponents":{"node":"./node"}}
node_modules/mp-html/dist/mp-toutiao/node/node.ttml
New file
@@ -0,0 +1 @@
<template name="el"><block tt:if="{{n.name==='img'}}"><rich-text tt:if="{{n.t}}" style="display:{{n.t}}" nodes="<img class='_img' style='{{n.attrs.style}}' src='{{n.attrs.src}}'>" data-i="{{i}}" catchtap="imgTap"/><block tt:else><image tt:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))}}" lazy-load="{{opts[0]}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="imgTap" bindlongpress="noop"/></block></block><text tt:elif="{{n.text}}" decode>{{n.text}}</text><text tt:elif="{{n.name==='br'}}">{{'\n'}}</text><view tt:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap"><template is="node" data="{{childs:n.children,path:i+'_',opts:opts,ctrl:ctrl}}"></template></view><video tt:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" object-fit="{{n.attrs['object-fit']}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><rich-text tt:else id="{{n.attrs.id}}" style="{{n.f}}" nodes="{{[n]}}"/></template><template name="node"><block tt:for="{{childs}}" tt:for-item="n" tt:for-index="i" tt:key="i"><template tt:if="{{!n.c}}" is="el" data="{{n:n,i:path+i,opts:opts,ctrl:ctrl}}"/><view tt:else id="{{n.attrs.id}}" class="_{{n.name}} {{n.attrs.class}}" style="{{n.attrs.style}}"><template is="node" data="{{childs:n.children,path:path+i+'_',opts:opts,ctrl:ctrl}}"></template></view></block></template><template is="node" data="{{childs:childs,path:'',opts:opts,ctrl:ctrl}}"></template>
node_modules/mp-html/dist/mp-toutiao/node/node.ttss
New file
@@ -0,0 +1 @@
._a{padding:1.5px 0 1.5px 0;color:#366092;word-break:break-all}._hover{text-decoration:underline;opacity:.7}._img{max-width:100%;-webkit-touch-callout:none}._b,._strong{font-weight:700}._code{font-family:monospace}._del{text-decoration:line-through}._em,._i{font-style:italic}._h1{font-size:2em}._h2{font-size:1.5em}._h3{font-size:1.17em}._h5{font-size:.83em}._h6{font-size:.67em}._h1,._h2,._h3,._h4,._h5,._h6{display:block;font-weight:700}._ins{text-decoration:underline}._li{display:list-item}._ol{list-style-type:decimal}._ol,._ul{display:block;padding-left:40px;margin:1em 0}._q::before{content:'"'}._q::after{content:'"'}._sub{font-size:smaller;vertical-align:sub}._sup{font-size:smaller;vertical-align:super}._tbody,._tfoot,._thead{display:table-row-group}._tr{display:table-row}._td,._th{display:table-cell;vertical-align:middle}._th{font-weight:700;text-align:center}._ul{list-style-type:disc}._ul ._ul{margin:0;list-style-type:circle}._ul ._ul ._ul{list-style-type:square}._abbr,._b,._code,._del,._em,._i,._ins,._label,._q,._span,._strong,._sub,._sup{display:inline}
node_modules/mp-html/dist/mp-toutiao/parser.js
New file
@@ -0,0 +1 @@
"use strict";function t(t,e){var s;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(s=i(t))||e&&t&&"number"==typeof t.length){s&&(t=s);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,l=!1;return{s:function(){s=t[Symbol.iterator]()},n:function(){var t=s.next();return o=t.done,t},e:function(t){l=!0,r=t},f:function(){try{o||null==s.return||s.return()}finally{if(l)throw r}}}}function i(t,i){if(t){if("string"==typeof t)return e(t,i);var s=Object.prototype.toString.call(t).slice(8,-1);return"Object"===s&&t.constructor&&(s=t.constructor.name),"Map"===s||"Set"===s?Array.from(t):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?e(t,i):void 0}}function e(t,i){(null==i||i>t.length)&&(i=t.length);for(var e=0,s=new Array(i);e<i;e++)s[e]=t[e];return s}function s(t){for(var i=Object.create(null),e=t.split(","),s=e.length;s--;)i[e[s]]=!0;return i}function n(t,i){for(var e=t.indexOf("&");-1!==e;){var s=t.indexOf(";",e+3),n=void 0;if(-1===s)break;"#"===t[e+1]?(n=parseInt(("x"===t[e+2]?"0":"")+t.substring(e+2,s)),isNaN(n)||(t=t.substr(0,e)+String.fromCharCode(n)+t.substr(s+1))):(n=t.substring(e+1,s),(l.entities[n]||"amp"===n&&i)&&(t=t.substr(0,e)+(l.entities[n]||"&")+t.substr(s+1))),e=t.indexOf("&",e+1)}return t}function a(t){for(var i=t.length-1,e=i;e>=-1;e--)(-1===e||t[e].c||!t[e].name||"div"!==t[e].name&&"p"!==t[e].name&&"h"!==t[e].name[0]||(t[e].attrs.style||"").includes("inline"))&&(i-e>=5&&t.splice(e+1,i-e,{name:"div",attrs:{},children:t.slice(e+1,i+1)}),i=e-1)}function r(t){this.options=t.data||{},this.tagStyle=Object.assign({},l.tagStyle,this.options.tagStyle),this.imgList=t.imgList||[],this.imgList._unloadimgs=0,this.plugins=t.plugins||[],this.attrs=Object.create(null),this.stack=[],this.nodes=[],this.pre=(this.options.containerStyle||"").includes("white-space")&&this.options.containerStyle.includes("pre")?2:0}function o(t){this.handler=t}var l={trustTags:s("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"),blockTags:s("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"),ignoreTags:s("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"),voidTags:s("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"),entities:{lt:"<",gt:">",quot:'"',apos:"'",ensp:" ",emsp:" ",nbsp:" ",semi:";",ndash:"–",mdash:"—",middot:"·",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",hellip:"…",larr:"←",uarr:"↑",rarr:"→",darr:"↓"},tagStyle:{address:"font-style:italic",big:"display:inline;font-size:1.2em",caption:"display:table-caption;text-align:center",center:"text-align:center",cite:"font-style:italic",dd:"margin-left:40px",mark:"background-color:yellow",pre:"font-family:monospace;white-space:pre",s:"text-decoration:line-through",small:"display:inline;font-size:0.8em",strike:"text-decoration:line-through",u:"text-decoration:underline"},svgDict:{animatetransform:"animateTransform",lineargradient:"linearGradient",viewbox:"viewBox",attributename:"attributeName",repeatcount:"repeatCount",repeatdur:"repeatDur",foreignobject:"foreignObject"}},h={},c,d,p=tt.getSystemInfoSync();c=p.windowWidth;var u=s(" ,\r,\n,\t,\f"),f=0;r.prototype.parse=function(t){for(var i=this.plugins.length;i--;)this.plugins[i].onUpdate&&(t=this.plugins[i].onUpdate(t,l)||t);for(new o(this).parse(t);this.stack.length;)this.popNode();return this.nodes.length>50&&a(this.nodes),this.nodes},r.prototype.expose=function(){for(var t=this.stack.length;t--;){var i=this.stack[t];if(i.c||"a"===i.name||"video"===i.name||"audio"===i.name)return;i.c=1}},r.prototype.hook=function(t){for(var i=this.plugins.length;i--;)if(this.plugins[i].onParse&&!1===this.plugins[i].onParse(t,this))return!1;return!0},r.prototype.getUrl=function(t){var i=this.options.domain;return"/"===t[0]?"/"===t[1]?t=(i?i.split("://")[0]:"http")+":"+t:i&&(t=i+t):!i||t.includes("data:")||t.includes("://")||(t=i+"/"+t),t},r.prototype.parseStyle=function(t){var i=t.attrs,e=(this.tagStyle[t.name]||"").split(";").concat((i.style||"").split(";")),s={},n="";i.id&&!this.xml&&(this.options.useAnchor?this.expose():"img"!==t.name&&"a"!==t.name&&"video"!==t.name&&"audio"!==t.name&&(i.id=void 0)),i.width&&(s.width=parseFloat(i.width)+(i.width.includes("%")?"%":"px"),i.width=void 0),i.height&&(s.height=parseFloat(i.height)+(i.height.includes("%")?"%":"px"),i.height=void 0);for(var a=0,r=e.length;a<r;a++){var o=e[a].split(":");if(!(o.length<2)){var l=o.shift().trim().toLowerCase(),h=o.join(":").trim();if("-"===h[0]&&h.lastIndexOf("-")>0||h.includes("safe"))n+=";".concat(l,":").concat(h);else if(!s[l]||h.includes("import")||!s[l].includes("import")){if(h.includes("url")){var d=h.indexOf("(")+1;if(d){for(;'"'===h[d]||"'"===h[d]||u[h[d]];)d++;h=h.substr(0,d)+this.getUrl(h.substr(d))}}else h.includes("rpx")&&(h=h.replace(/[0-9.]+\s*rpx/g,function(t){return parseFloat(t)*c/750+"px"}));s[l]=h}}}return t.attrs.style=n,s},r.prototype.onTagName=function(t){this.tagName=this.xml?t:t.toLowerCase(),"svg"===this.tagName&&(this.xml=(this.xml||0)+1,l.ignoreTags.style=void 0)},r.prototype.onAttrName=function(t){t=this.xml?t:t.toLowerCase(),"data-"===t.substr(0,5)?"data-src"!==t||this.attrs.src?"img"===this.tagName||"a"===this.tagName?this.attrName=t:this.attrName=void 0:this.attrName="src":(this.attrName=t,this.attrs[t]="T")},r.prototype.onAttrVal=function(t){var i=this.attrName||"";"style"===i||"href"===i?this.attrs[i]=n(t,!0):i.includes("src")?this.attrs[i]=this.getUrl(n(t,!0)):i&&(this.attrs[i]=t)},r.prototype.onOpenTag=function(t){var i=Object.create(null);i.name=this.tagName,i.attrs=this.attrs,this.attrs=Object.create(null);var e=i.attrs,s=this.stack[this.stack.length-1],n=s?s.children:this.nodes,a=this.xml?t:l.voidTags[i.name];if(h[i.name]&&(e.class=h[i.name]+(e.class?" "+e.class:"")),"embed"===i.name){var r=e.src||"";r.includes(".mp4")||r.includes(".3gp")||r.includes(".m3u8")||(e.type||"").includes("video")?i.name="video":(r.includes(".mp3")||r.includes(".wav")||r.includes(".aac")||r.includes(".m4a")||(e.type||"").includes("audio"))&&(i.name="audio"),e.autostart&&(e.autoplay="T"),e.controls="T"}if("video"!==i.name&&"audio"!==i.name||("video"!==i.name||e.id||(e.id="v"+f++),e.controls||e.autoplay||(e.controls="T"),i.src=[],e.src&&(i.src.push(e.src),e.src=void 0),this.expose()),a){if(!this.hook(i)||l.ignoreTags[i.name])return void("base"!==i.name||this.options.domain?"source"===i.name&&s&&("video"===s.name||"audio"===s.name)&&e.src&&s.src.push(e.src):this.options.domain=e.href);var o=this.parseStyle(i);if("img"===i.name){if(e.src&&(e.src.includes("webp")&&(i.webp="T"),e.src.includes("data:")&&"all"!==this.options.previewImg&&!e["original-src"]&&(e.ignore="T"),!e.ignore||i.webp||e.src.includes("cloud://"))){for(var d=this.stack.length;d--;){var p=this.stack[d];"table"!==p.name||i.webp||e.src.includes("cloud://")||(!o.display||o.display.includes("inline")?i.t="inline-block":i.t=o.display,o.display=void 0);var u=p.attrs.style||"";if(!u.includes("flex:")||u.includes("flex:0")||u.includes("flex: 0")||o.width&&!(parseInt(o.width)>100))if(u.includes("flex")&&"100%"===o.width)for(var g=d+1;g<this.stack.length;g++){var m=this.stack[g].attrs.style||"";if(!m.includes(";width")&&!m.includes(" width")&&0!==m.indexOf("width")){o.width="";break}}else u.includes("inline-block")&&(o.width&&"%"===o.width[o.width.length-1]?(p.attrs.style+=";max-width:"+o.width,o.width=""):p.attrs.style+=";max-width:100%");else{o.width="100% !important",o.height="";for(var v=d+1;v<this.stack.length;v++)this.stack[v].attrs.style=(this.stack[v].attrs.style||"").replace("inline-","")}"a"===p.name?i.a=p.attrs:p.c=1}i.i=this.imgList.length;var y=e["original-src"]||e.src;if(this.imgList.includes(y)){var b=y.indexOf("://");if(-1!==b){b+=3;for(var x=y.substr(0,b);b<y.length&&"/"!==y[b];b++)x+=Math.random()>.5?y[b].toUpperCase():y[b];x+=y.substr(b),y=x}}this.imgList.push(y),i.t||(this.imgList._unloadimgs+=1)}"inline"===o.display&&(o.display=""),e.ignore&&(o["max-width"]=o["max-width"]||"100%",e.style+=";-webkit-touch-callout:none"),parseInt(o.width)>c&&(o.height=void 0),isNaN(parseInt(o.width))||(i.w="T"),!isNaN(parseInt(o.height))&&(!o.height.includes("%")||s&&(s.attrs.style||"").includes("height"))&&(i.h="T"),i.w&&i.h&&o["object-fit"]&&("contain"===o["object-fit"]?i.m="aspectFit":"cover"===o["object-fit"]&&(i.m="aspectFill"))}else if("svg"===i.name)return n.push(i),this.stack.push(i),void this.popNode();for(var w in o)o[w]&&(e.style+=";".concat(w,":").concat(o[w].replace(" !important","")));e.style=e.style.substr(1)||void 0}else("pre"===i.name||(e.style||"").includes("white-space")&&e.style.includes("pre"))&&2!==this.pre&&(this.pre=i.pre=1),i.children=[],this.stack.push(i);n.push(i)},r.prototype.onCloseTag=function(t){t=this.xml?t:t.toLowerCase();var i;for(i=this.stack.length;i--&&this.stack[i].name!==t;);if(-1!==i)for(;this.stack.length>i;)this.popNode();else if("p"===t||"br"===t){var e=this.stack.length?this.stack[this.stack.length-1].children:this.nodes;e.push({name:t,attrs:{class:h[t],style:this.tagStyle[t]}})}},r.prototype.popNode=function(){var i=this.stack.pop(),e=i.attrs,s=i.children,n=this.stack[this.stack.length-1],r=n?n.children:this.nodes;if(!this.hook(i)||l.ignoreTags[i.name])return"title"===i.name&&s.length&&"text"===s[0].type&&this.options.setTitle&&tt.setNavigationBarTitle({title:s[0].text}),void r.pop();if(i.pre&&2!==this.pre){this.pre=i.pre=void 0;for(var o=this.stack.length;o--;)this.stack[o].pre&&(this.pre=1)}if("svg"===i.name){if(this.xml>1)return void this.xml--;var h="",d=e.style;return e.style="",e.xmlns="http://www.w3.org/2000/svg",function i(e){if("text"===e.type)return void(h+=e.text);var s=l.svgDict[e.name]||e.name;if("foreignObject"===s){var n,a=t(e.children||[]);try{for(a.s();!(n=a.n()).done;){var r=n.value;if(r.attrs&&!r.attrs.xmlns){r.attrs.xmlns="http://www.w3.org/1999/xhtml";break}}}catch(t){a.e(t)}finally{a.f()}}h+="<"+s;for(var o in e.attrs){var c=e.attrs[o];c&&(h+=" ".concat(l.svgDict[o]||o,'="').concat(c.replace(/"/g,""),'"'))}if(e.children){h+=">";for(var d=0;d<e.children.length;d++)i(e.children[d]);h+="</"+s+">"}else h+="/>"}(i),i.name="img",i.attrs={src:"data:image/svg+xml;utf8,"+h.replace(/#/g,"%23"),style:d,ignore:"T"},i.children=void 0,this.xml=!1,void(l.ignoreTags.style=!0)}var p={};if(e.align&&("table"===i.name?"center"===e.align?p["margin-inline-start"]=p["margin-inline-end"]="auto":p.float=e.align:p["text-align"]=e.align,e.align=void 0),e.dir&&(p.direction=e.dir,e.dir=void 0),"font"===i.name&&(e.color&&(p.color=e.color,e.color=void 0),e.face&&(p["font-family"]=e.face,e.face=void 0),e.size)){var u=parseInt(e.size);isNaN(u)||(u<1?u=1:u>7&&(u=7),p["font-size"]=["x-small","small","medium","large","x-large","xx-large","xxx-large"][u-1]),e.size=void 0}if((e.class||"").includes("align-center")&&(p["text-align"]="center"),Object.assign(p,this.parseStyle(i)),"table"!==i.name&&parseInt(p.width)>c&&(p["max-width"]="100%",p["box-sizing"]="border-box"),l.blockTags[i.name])i.name="div";else if(l.trustTags[i.name]||this.xml)if("a"===i.name||"ad"===i.name)this.expose();else if("video"===i.name||"audio"===i.name)(p.height||"").includes("auto")&&(p.height=void 0),i.children=void 0;else if("ul"!==i.name&&"ol"!==i.name||!i.c)if("table"===i.name){var f=parseFloat(e.cellpadding),g=parseFloat(e.cellspacing),m=parseFloat(e.border),v=p["border-color"],y=p["border-style"];if(i.c&&(isNaN(f)&&(f=2),isNaN(g)&&(g=2)),m&&(e.style+=";border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray")),i.flag&&i.c){i.flag=void 0,p.display="grid","collapse"===p["border-collapse"]&&(p["border-collapse"]=void 0,g=0),g?(p["grid-gap"]=g+"px",p.padding=g+"px"):m&&(e.style+=";border-left:0;border-top:0");var b=[],x=[],w=[],k={};!function i(e){for(var s=0;s<e.length;s++)if("tr"===e[s].name)x.push(e[s]);else if("colgroup"===e[s].name){var n,a=1,r=t(e[s].children||[]);try{for(r.s();!(n=r.n()).done;){var o=n.value;if("col"===o.name){var l=o.attrs.style||"",h=l.indexOf("width")?l.indexOf(";width"):0;if(-1!==h){var c=l.indexOf(";",h+6);-1===c&&(c=l.length),b[a]=l.substring(h?h+7:6,c)}a+=1}}}catch(t){r.e(t)}finally{r.f()}}else i(e[s].children||[])}(s);for(var N=1;N<=x.length;N++){for(var T=1,O=0;O<x[N-1].children.length;O++){var j=x[N-1].children[O];if("td"===j.name||"th"===j.name){for(;k[N+"."+T];)T++;j.c=1;var S=j.attrs.style||"",C=S.indexOf("width")?S.indexOf(";width"):0;if(-1!==C){var A=S.indexOf(";",C+6);-1===A&&(A=S.length),j.attrs.colspan||(b[T]=S.substring(C?C+7:6,A)),S=S.substr(0,C)+S.substr(A)}if(S+=";display:flex;flex-direction:column",-1!==(C=S.indexOf("vertical-align"))){var I=S.substr(C+15,10);I.includes("middle")?S+=";justify-content:center":I.includes("bottom")&&(S+=";justify-content:flex-end")}else S+=";justify-content:center";if(-1!==(C=S.indexOf("text-align"))){var L=S.substr(C+11,10);L.includes("center")?S+=";justify-content: center":L.includes("right")&&(S+=";justify-content: right")}if(S=(m?";border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray")+(g?"":";border-right:0;border-bottom:0"):"")+(f?";padding:".concat(f,"px"):"")+";"+S,j.attrs.colspan&&(S+=";grid-column-start:".concat(T,";grid-column-end:").concat(T+parseInt(j.attrs.colspan)),j.attrs.rowspan||(S+=";grid-row-start:".concat(N,";grid-row-end:").concat(N+1)),T+=parseInt(j.attrs.colspan)-1),j.attrs.rowspan){S+=";grid-row-start:".concat(N,";grid-row-end:").concat(N+parseInt(j.attrs.rowspan)),j.attrs.colspan||(S+=";grid-column-start:".concat(T,";grid-column-end:").concat(T+1));for(var z=1;z<j.attrs.rowspan;z++)for(var F=0;F<(j.attrs.colspan||1);F++)k[N+z+"."+(T-F)]=1}S&&(j.attrs.style=S),w.push(j),T++}}if(1===N){for(var q="",U=1;U<T;U++)q+=(b[U]?b[U]:"auto")+" ";p["grid-template-columns"]=q}}i.children=w}else i.c&&(p.display="table"),isNaN(g)||(p["border-spacing"]=g+"px"),(m||f||i.c)&&function t(e){for(var s=0;s<e.length;s++){var n=e[s];i.c&&(n.c=1),"th"===n.name||"td"===n.name?(m&&(n.attrs.style="border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray",";").concat(n.attrs.style||"")),f&&(n.attrs.style="padding:".concat(f,"px;").concat(n.attrs.style||""))):n.children&&t(n.children)}}(s);if(this.options.scrollTable&&!(e.style||"").includes("inline")){var V=Object.assign({},i);i.name="div",i.attrs={style:"overflow-x:auto;padding:1px"},i.children=[V],e=V.attrs}}else if(("tbody"===i.name||"tr"===i.name)&&i.flag&&i.c)i.flag=void 0,function t(i){for(var e=0;e<i.length;e++)if("td"===i[e].name)for(var s=0,n=["color","background","background-color"];s<n.length;s++){var a=n[s];p[a]&&(i[e].attrs.style=a+":"+p[a]+";"+(i[e].attrs.style||""))}else t(i[e].children||[])}(s);else if("td"!==i.name&&"th"!==i.name||!e.colspan&&!e.rowspan){if("ruby"===i.name){i.name="span";for(var D=0;D<s.length-1;D++)"text"===s[D].type&&"rt"===s[D+1].name&&(s[D]={name:"span",attrs:{style:"display:inline-block;text-align:center"},children:[{name:"div",attrs:{style:"font-size:50%;"+(s[D+1].attrs.style||"")},children:s[D+1].children},s[D]]},s.splice(D+1,1))}}else for(var B=this.stack.length;B--;)"table"!==this.stack[B].name&&"tbody"!==this.stack[B].name&&"tr"!==this.stack[B].name||(this.stack[B].flag=1);else{var M={a:"lower-alpha",A:"upper-alpha",i:"lower-roman",I:"upper-roman"};M[e.type]&&(e.style+=";list-style-type:"+M[e.type],e.type=void 0),i.c=1;for(var P=s.length;P--;)"li"===s[P].name&&(s[P].c=1)}else i.name="span";if((p.display||"").includes("flex")&&!i.c)for(var Z=s.length;Z--;){var _=s[Z];_.f&&(_.attrs.style=(_.attrs.style||"")+_.f,_.f=void 0)}var E=n&&((n.attrs.style||"").includes("flex")||(n.attrs.style||"").includes("grid"))&&!i.c;E&&(i.f=";max-width:100%"),s.length>=50&&i.c&&!(p.display||"").includes("flex")&&a(s);for(var G in p)if(p[G]){var W=";".concat(G,":").concat(p[G].replace(" !important",""));E&&(G.includes("flex")&&"flex-direction"!==G||"align-self"===G||G.includes("grid")||"-"===p[G][0]||G.includes("width")&&W.includes("%"))?(i.f+=W,"width"===G&&(e.style+=";width:100%")):e.style+=W}e.style=e.style.substr(1)||void 0},r.prototype.onText=function(t){if(!this.pre){for(var i,e="",s=0,a=t.length;s<a;s++)u[t[s]]?(" "!==e[e.length-1]&&(e+=" "),"\n"!==t[s]||i||(i=!0)):e+=t[s];if(" "===e&&i)return;t=e}var r=Object.create(null);if(r.type="text",r.text=n(t),this.hook(r)){(this.stack.length?this.stack[this.stack.length-1].children:this.nodes).push(r)}},o.prototype.parse=function(t){this.content=t||"",this.i=0,this.start=0,this.state=this.text;for(var i=this.content.length;-1!==this.i&&this.i<i;)this.state()},o.prototype.checkClose=function(t){var i="/"===this.content[this.i];return!!(">"===this.content[this.i]||i&&">"===this.content[this.i+1])&&(t&&this.handler[t](this.content.substring(this.start,this.i)),this.i+=i?2:1,this.start=this.i,this.handler.onOpenTag(i),"script"===this.handler.tagName?(this.i=this.content.indexOf("</",this.i),-1!==this.i&&(this.i+=2,this.start=this.i),this.state=this.endTag):this.state=this.text,!0)},o.prototype.text=function(){if(this.i=this.content.indexOf("<",this.i),-1===this.i)return void(this.start<this.content.length&&this.handler.onText(this.content.substring(this.start,this.content.length)));var t=this.content[this.i+1];if(t>="a"&&t<="z"||t>="A"&&t<="Z")this.start!==this.i&&this.handler.onText(this.content.substring(this.start,this.i)),this.start=++this.i,this.state=this.tagName;else if("/"===t||"!"===t||"?"===t){this.start!==this.i&&this.handler.onText(this.content.substring(this.start,this.i));var i=this.content[this.i+2];if("/"===t&&(i>="a"&&i<="z"||i>="A"&&i<="Z"))return this.i+=2,this.start=this.i,void(this.state=this.endTag);var e="--\x3e";"!"===t&&"-"===this.content[this.i+2]&&"-"===this.content[this.i+3]||(e=">"),this.i=this.content.indexOf(e,this.i),-1!==this.i&&(this.i+=e.length,this.start=this.i)}else this.i++},o.prototype.tagName=function(){if(u[this.content[this.i]]){for(this.handler.onTagName(this.content.substring(this.start,this.i));u[this.content[++this.i]];);this.i<this.content.length&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)}else this.checkClose("onTagName")||this.i++},o.prototype.attrName=function(){var t=this.content[this.i];if(u[t]||"="===t){this.handler.onAttrName(this.content.substring(this.start,this.i));for(var i="="===t,e=this.content.length;++this.i<e;)if(t=this.content[this.i],!u[t]){if(this.checkClose())return;if(i)return this.start=this.i,void(this.state=this.attrVal);if("="!==this.content[this.i])return this.start=this.i,void(this.state=this.attrName);i=!0}}else this.checkClose("onAttrName")||this.i++},o.prototype.attrVal=function(){var t=this.content[this.i],i=this.content.length;if('"'===t||"'"===t){if(this.start=++this.i,this.i=this.content.indexOf(t,this.i),-1===this.i)return;this.handler.onAttrVal(this.content.substring(this.start,this.i))}else for(;this.i<i;this.i++){if(u[this.content[this.i]]){this.handler.onAttrVal(this.content.substring(this.start,this.i));break}if(this.checkClose("onAttrVal"))return}for(;u[this.content[++this.i]];);this.i<i&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)},o.prototype.endTag=function(){var t=this.content[this.i];if(u[t]||">"===t||"/"===t){if(this.handler.onCloseTag(this.content.substring(this.start,this.i)),">"!==t&&(this.i=this.content.indexOf(">",this.i),-1===this.i))return;this.start=++this.i,this.state=this.text}else this.i++},module.exports=r;
node_modules/mp-html/dist/mp-weixin/index.js
New file
@@ -0,0 +1,8 @@
"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}/*!
 * mp-html v2.5.1
 * https://github.com/jin-yufeng/mp-html
 *
 * Released under the MIT license
 * Author: Jin Yufeng
 */
var t=require("./parser"),n=[];Component({data:{nodes:[]},properties:{containerStyle:String,content:{type:String,value:"",observer:function(e){this.setContent(e)}},copyLink:{type:Boolean,value:!0},domain:String,errorImg:String,lazyLoad:Boolean,loadingImg:String,pauseVideo:{type:Boolean,value:!0},previewImg:{type:null,value:!0},scrollTable:Boolean,selectable:null,setTitle:{type:Boolean,value:!0},showImgMenu:{type:Boolean,value:!0},tagStyle:Object,useAnchor:null},created:function(){this.plugins=[];for(var e=n.length;e--;)this.plugins.push(new n[e](this))},detached:function(){this._hook("onDetached")},methods:{in:function(e,t,n){e&&t&&n&&(this._in={page:e,selector:t,scrollTop:n})},navigateTo:function(t,n){var i=this;return new Promise(function(o,r){if(!i.data.useAnchor)return void r(Error("Anchor is disabled"));var a=wx.createSelectorQuery().in(i._in?i._in.page:i).select((i._in?i._in.selector:"._root")+(t?"".concat(">>>","#").concat(t):"")).boundingClientRect();i._in?a.select(i._in.selector).scrollOffset().select(i._in.selector).boundingClientRect():a.selectViewport().scrollOffset(),a.exec(function(t){if(!t[0])return void r(Error("Label not found"));var a=t[1].scrollTop+t[0].top-(t[2]?t[2].top:0)+(n||parseInt(i.data.useAnchor)||0);i._in?i._in.page.setData(e({},i._in.scrollTop,a)):wx.pageScrollTo({scrollTop:a,duration:300}),o()})})},getText:function(e){var t="";return function e(n){for(var i=0;i<n.length;i++){var o=n[i];if("text"===o.type)t+=o.text.replace(/&amp;/g,"&");else if("br"===o.name)t+="\n";else{var r="p"===o.name||"div"===o.name||"tr"===o.name||"li"===o.name||"h"===o.name[0]&&o.name[1]>"0"&&o.name[1]<"7";r&&t&&"\n"!==t[t.length-1]&&(t+="\n"),o.children&&e(o.children),r&&"\n"!==t[t.length-1]?t+="\n":"td"!==o.name&&"th"!==o.name||(t+="\t")}}}(e||this.data.nodes),t},getRect:function(){var e=this;return new Promise(function(t,n){wx.createSelectorQuery().in(e).select("._root").boundingClientRect().exec(function(e){return e[0]?t(e[0]):n(Error("Root label not found"))})})},pauseMedia:function(){for(var e=(this._videos||[]).length;e--;)this._videos[e].pause()},setPlaybackRate:function(e){this.playbackRate=e;for(var t=(this._videos||[]).length;t--;)this._videos[t].playbackRate(e)},setContent:function(e,n){var i=this;this.imgList&&n||(this.imgList=[]),this._videos=[];var o={},r=new t(this).parse(e);if(n)for(var a=this.data.nodes.length,s=r.length;s--;)o["nodes[".concat(a+s,"]")]=r[s];else o.nodes=r;if(this.setData(o,function(){i._hook("onLoad"),i.triggerEvent("load")}),this.data.lazyLoad||this.imgList._unloadimgs<this.imgList.length/2){var l=0,c=function e(t){t&&t.height||(t={}),t.height===l?i.triggerEvent("ready",t):(l=t.height,setTimeout(function(){i.getRect().then(e).catch(e)},350))};this.getRect().then(c).catch(c)}else this.imgList._unloadimgs||this.getRect().then(function(e){i.triggerEvent("ready",e)}).catch(function(){i.triggerEvent("ready",{})})},_hook:function(e){for(var t=n.length;t--;)this.plugins[t][e]&&this.plugins[t][e]()},_add:function(e){e.detail.root=this}}});
node_modules/mp-html/dist/mp-weixin/index.json
New file
@@ -0,0 +1 @@
{"component":true,"usingComponents":{"node":"./node/node"}}
node_modules/mp-html/dist/mp-weixin/index.wxml
New file
@@ -0,0 +1 @@
<view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}"><slot wx:if="{{!nodes[0]}}"/><node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu,selectable]}}" catchadd="_add"/></view>
node_modules/mp-html/dist/mp-weixin/index.wxss
New file
@@ -0,0 +1 @@
._root{padding:1px 0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}._select{-webkit-user-select:text;user-select:text}
node_modules/mp-html/dist/mp-weixin/node/node.js
New file
@@ -0,0 +1 @@
"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function e(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?t(Object(o),!0).forEach(function(t){r(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Component({data:{ctrl:{},isiOS:wx.getSystemInfoSync().system.includes("iOS")},properties:{childs:Array,opts:Array},options:{addGlobalClass:!0},attached:function(){this.triggerEvent("add",this,{bubbles:!0,composed:!0})},methods:{noop:function(){},getNode:function(t){try{for(var e=t.split("_"),r=this.data.childs[e[0]],i=1;i<e.length;i++)r=r.children[e[i]];return r}catch(t){return{text:"",attrs:{},children:[]}}},play:function(t){var r=t.target.dataset.i,i=this.getNode(r);if(this.root.triggerEvent("play",{source:i.name,attrs:e(e({},i.attrs),{},{src:i.src[this.data.ctrl[r]||0]})}),this.root.data.pauseVideo){for(var o=!1,s=t.target.id,a=this.root._videos.length;a--;)this.root._videos[a].id===s?o=!0:this.root._videos[a].pause();if(!o){var n=wx.createVideoContext(s,this);n.id=s,this.root.playbackRate&&n.playbackRate(this.root.playbackRate),this.root._videos.push(n)}}},imgTap:function(t){var e=this.getNode(t.target.dataset.i);if(e.a)return this.linkTap(e.a);if(!e.attrs.ignore&&(this.root.triggerEvent("imgtap",e.attrs),this.root.data.previewImg)){var r=this.root.imgList[e.i];wx.previewImage({showmenu:this.root.data.showImgMenu,current:r,urls:this.root.imgList})}},imgLoad:function(t){var e,i=t.target.dataset.i,o=this.getNode(i);o.w?(this.data.opts[1]&&!this.data.ctrl[i]||-1===this.data.ctrl[i])&&(e=1):e=t.detail.width,e&&this.setData(r({},"ctrl."+i,e)),this.checkReady()},checkReady:function(){var t=this;this.root.data.lazyLoad||(this.root.imgList._unloadimgs-=1,this.root.imgList._unloadimgs||setTimeout(function(){t.root.getRect().then(function(e){t.root.triggerEvent("ready",e)}).catch(function(){t.root.triggerEvent("ready",{})})},350))},linkTap:function(t){var e=t.currentTarget?this.getNode(t.currentTarget.dataset.i):{},r=e.attrs||t,i=r.href;this.root.triggerEvent("linktap",Object.assign({innerText:this.root.getText(e.children||[])},r)),i&&("#"===i[0]?this.root.navigateTo(i.substring(1)).catch(function(){}):i.split("?")[0].includes("://")?this.root.data.copyLink&&wx.setClipboardData({data:i,success:function(){return wx.showToast({title:"链接已复制"})}}):wx.navigateTo({url:i,fail:function(){wx.switchTab({url:i,fail:function(){}})}}))},mediaError:function(t){var e=t.target.dataset.i,i=this.getNode(e);if("video"===i.name||"audio"===i.name){var o=(this.data.ctrl[e]||0)+1;if(o>i.src.length&&(o=0),o<i.src.length)return this.setData(r({},"ctrl."+e,o))}else"img"===i.name&&(this.data.opts[2]&&this.setData(r({},"ctrl."+e,-1)),this.checkReady());this.root&&this.root.triggerEvent("error",{source:i.name,attrs:i.attrs,errMsg:t.detail.errMsg})}}});
node_modules/mp-html/dist/mp-weixin/node/node.json
New file
@@ -0,0 +1 @@
{"component":true,"usingComponents":{"node":"./node"}}
node_modules/mp-html/dist/mp-weixin/node/node.wxml
New file
@@ -0,0 +1 @@
<wxs module="isInline">var e={abbr:!0,b:!0,big:!0,code:!0,del:!0,em:!0,i:!0,ins:!0,label:!0,q:!0,small:!0,span:!0,strong:!0,sub:!0,sup:!0};module.exports=function(n,i){return e[n]||-1!==(i||"").indexOf("inline")};</wxs><template name="el"><block wx:if="{{n.name==='img'}}"><rich-text wx:if="{{n.t}}" style="display:{{n.t}}" nodes="<img class='_img' style='{{n.attrs.style}}' src='{{n.attrs.src}}'>" data-i="{{i}}" catchtap="imgTap"/><block wx:else><image wx:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix"/><image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))}}" lazy-load="{{opts[0]}}" webp="{{n.webp}}" show-menu-by-longpress="{{opts[3]&&!n.attrs.ignore}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="imgTap" bindlongpress="noop"/></block></block><text wx:elif="{{n.text}}" user-select="{{opts[4]=='force'&&isiOS}}" decode>{{n.text}}</text><text wx:elif="{{n.name==='br'}}">{{'\n'}}</text><view wx:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap"><node childs="{{n.children}}" opts="{{opts}}" style="display:inherit"/></view><video wx:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" object-fit="{{n.attrs['object-fit']}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><audio wx:elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError"/><rich-text wx:else id="{{n.attrs.id}}" style="{{n.f}}" user-select="{{opts[4]}}" nodes="{{[n]}}"/></template><block wx:for="{{childs}}" wx:for-item="n1" wx:for-index="i1" wx:key="i1"><template wx:if="{{!n1.c&&(!n1.children||n1.name==='a'||!isInline(n1.name,n1.attrs.style))}}" is="el" data="{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n1.attrs.id}}" class="_{{n1.name}} {{n1.attrs.class}}" style="{{n1.attrs.style}}"><block wx:for="{{n1.children}}" wx:for-item="n2" wx:for-index="i2" wx:key="i2"><template wx:if="{{!n2.c&&(!n2.children||n2.name==='a'||!isInline(n2.name,n2.attrs.style))}}" is="el" data="{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n2.attrs.id}}" class="_{{n2.name}} {{n2.attrs.class}}" style="{{n2.attrs.style}}"><block wx:for="{{n2.children}}" wx:for-item="n3" wx:for-index="i3" wx:key="i3"><template wx:if="{{!n3.c&&(!n3.children||n3.name==='a'||!isInline(n3.name,n3.attrs.style))}}" is="el" data="{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n3.attrs.id}}" class="_{{n3.name}} {{n3.attrs.class}}" style="{{n3.attrs.style}}"><block wx:for="{{n3.children}}" wx:for-item="n4" wx:for-index="i4" wx:key="i4"><template wx:if="{{!n4.c&&(!n4.children||n4.name==='a'||!isInline(n4.name,n4.attrs.style))}}" is="el" data="{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}"/><view wx:else id="{{n4.attrs.id}}" class="_{{n4.name}} {{n4.attrs.class}}" style="{{n4.attrs.style}}"><block wx:for="{{n4.children}}" wx:for-item="n5" wx:for-index="i5" wx:key="i5"><template wx:if="{{!n5.c&&(!n5.children||n5.name==='a'||!isInline(n5.name,n5.attrs.style))}}" is="el" data="{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}"/><node wx:else id="{{n5.attrs.id}}" class="_{{n5.name}} {{n5.attrs.class}}" style="{{n5.attrs.style}}" childs="{{n5.children}}" opts="{{opts}}"/></block></view></block></view></block></view></block></view></block>
node_modules/mp-html/dist/mp-weixin/node/node.wxss
New file
@@ -0,0 +1 @@
._a{padding:1.5px 0 1.5px 0;color:#366092;word-break:break-all}._hover{text-decoration:underline;opacity:.7}._img{max-width:100%;-webkit-touch-callout:none}._b,._strong{font-weight:700}._code{font-family:monospace}._del{text-decoration:line-through}._em,._i{font-style:italic}._h1{font-size:2em}._h2{font-size:1.5em}._h3{font-size:1.17em}._h5{font-size:.83em}._h6{font-size:.67em}._h1,._h2,._h3,._h4,._h5,._h6{display:block;font-weight:700}._ins{text-decoration:underline}._li{display:list-item}._ol{list-style-type:decimal}._ol,._ul{display:block;padding-left:40px;margin:1em 0}._q::before{content:'"'}._q::after{content:'"'}._sub{font-size:smaller;vertical-align:sub}._sup{font-size:smaller;vertical-align:super}._tbody,._tfoot,._thead{display:table-row-group}._tr{display:table-row}._td,._th{display:table-cell;vertical-align:middle}._th{font-weight:700;text-align:center}._ul{list-style-type:disc}._ul ._ul{margin:0;list-style-type:circle}._ul ._ul ._ul{list-style-type:square}._abbr,._b,._code,._del,._em,._i,._ins,._label,._q,._span,._strong,._sub,._sup{display:inline}._blockquote,._div,._p{display:block}
node_modules/mp-html/dist/mp-weixin/parser.js
New file
@@ -0,0 +1 @@
"use strict";function t(t,e){var s;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(s=i(t))||e&&t&&"number"==typeof t.length){s&&(t=s);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,l=!1;return{s:function(){s=t[Symbol.iterator]()},n:function(){var t=s.next();return o=t.done,t},e:function(t){l=!0,r=t},f:function(){try{o||null==s.return||s.return()}finally{if(l)throw r}}}}function i(t,i){if(t){if("string"==typeof t)return e(t,i);var s=Object.prototype.toString.call(t).slice(8,-1);return"Object"===s&&t.constructor&&(s=t.constructor.name),"Map"===s||"Set"===s?Array.from(t):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?e(t,i):void 0}}function e(t,i){(null==i||i>t.length)&&(i=t.length);for(var e=0,s=new Array(i);e<i;e++)s[e]=t[e];return s}function s(t){for(var i=Object.create(null),e=t.split(","),s=e.length;s--;)i[e[s]]=!0;return i}function n(t,i){for(var e=t.indexOf("&");-1!==e;){var s=t.indexOf(";",e+3),n=void 0;if(-1===s)break;"#"===t[e+1]?(n=parseInt(("x"===t[e+2]?"0":"")+t.substring(e+2,s)),isNaN(n)||(t=t.substr(0,e)+String.fromCharCode(n)+t.substr(s+1))):(n=t.substring(e+1,s),(l.entities[n]||"amp"===n&&i)&&(t=t.substr(0,e)+(l.entities[n]||"&")+t.substr(s+1))),e=t.indexOf("&",e+1)}return t}function a(t){for(var i=t.length-1,e=i;e>=-1;e--)(-1===e||t[e].c||!t[e].name||"div"!==t[e].name&&"p"!==t[e].name&&"h"!==t[e].name[0]||(t[e].attrs.style||"").includes("inline"))&&(i-e>=5&&t.splice(e+1,i-e,{name:"div",attrs:{},children:t.slice(e+1,i+1)}),i=e-1)}function r(t){this.options=t.data||{},this.tagStyle=Object.assign({},l.tagStyle,this.options.tagStyle),this.imgList=t.imgList||[],this.imgList._unloadimgs=0,this.plugins=t.plugins||[],this.attrs=Object.create(null),this.stack=[],this.nodes=[],this.pre=(this.options.containerStyle||"").includes("white-space")&&this.options.containerStyle.includes("pre")?2:0}function o(t){this.handler=t}var l={trustTags:s("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"),blockTags:s("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"),ignoreTags:s("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"),voidTags:s("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"),entities:{lt:"<",gt:">",quot:'"',apos:"'",ensp:" ",emsp:" ",nbsp:" ",semi:";",ndash:"–",mdash:"—",middot:"·",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",hellip:"…",larr:"←",uarr:"↑",rarr:"→",darr:"↓"},tagStyle:{address:"font-style:italic",big:"display:inline;font-size:1.2em",caption:"display:table-caption;text-align:center",center:"text-align:center",cite:"font-style:italic",dd:"margin-left:40px",mark:"background-color:yellow",pre:"font-family:monospace;white-space:pre",s:"text-decoration:line-through",small:"display:inline;font-size:0.8em",strike:"text-decoration:line-through",u:"text-decoration:underline"},svgDict:{animatetransform:"animateTransform",lineargradient:"linearGradient",viewbox:"viewBox",attributename:"attributeName",repeatcount:"repeatCount",repeatdur:"repeatDur",foreignobject:"foreignObject"}},h={},c,d;if(wx.canIUse("getWindowInfo"))c=wx.getWindowInfo().windowWidth,d=wx.getDeviceInfo().system;else{var p=wx.getSystemInfoSync();c=p.windowWidth,d=p.system}var u=s(" ,\r,\n,\t,\f"),f=0;r.prototype.parse=function(t){for(var i=this.plugins.length;i--;)this.plugins[i].onUpdate&&(t=this.plugins[i].onUpdate(t,l)||t);for(new o(this).parse(t);this.stack.length;)this.popNode();return this.nodes.length>50&&a(this.nodes),this.nodes},r.prototype.expose=function(){for(var t=this.stack.length;t--;){var i=this.stack[t];if(i.c||"a"===i.name||"video"===i.name||"audio"===i.name)return;i.c=1}},r.prototype.hook=function(t){for(var i=this.plugins.length;i--;)if(this.plugins[i].onParse&&!1===this.plugins[i].onParse(t,this))return!1;return!0},r.prototype.getUrl=function(t){var i=this.options.domain;return"/"===t[0]?"/"===t[1]?t=(i?i.split("://")[0]:"http")+":"+t:i&&(t=i+t):!i||t.includes("data:")||t.includes("://")||(t=i+"/"+t),t},r.prototype.parseStyle=function(t){var i=t.attrs,e=(this.tagStyle[t.name]||"").split(";").concat((i.style||"").split(";")),s={},n="";i.id&&!this.xml&&(this.options.useAnchor?this.expose():"img"!==t.name&&"a"!==t.name&&"video"!==t.name&&"audio"!==t.name&&(i.id=void 0)),i.width&&(s.width=parseFloat(i.width)+(i.width.includes("%")?"%":"px"),i.width=void 0),i.height&&(s.height=parseFloat(i.height)+(i.height.includes("%")?"%":"px"),i.height=void 0);for(var a=0,r=e.length;a<r;a++){var o=e[a].split(":");if(!(o.length<2)){var l=o.shift().trim().toLowerCase(),h=o.join(":").trim();if("-"===h[0]&&h.lastIndexOf("-")>0||h.includes("safe"))n+=";".concat(l,":").concat(h);else if(!s[l]||h.includes("import")||!s[l].includes("import")){if(h.includes("url")){var d=h.indexOf("(")+1;if(d){for(;'"'===h[d]||"'"===h[d]||u[h[d]];)d++;h=h.substr(0,d)+this.getUrl(h.substr(d))}}else h.includes("rpx")&&(h=h.replace(/[0-9.]+\s*rpx/g,function(t){return parseFloat(t)*c/750+"px"}));s[l]=h}}}return t.attrs.style=n,s},r.prototype.onTagName=function(t){this.tagName=this.xml?t:t.toLowerCase(),"svg"===this.tagName&&(this.xml=(this.xml||0)+1,l.ignoreTags.style=void 0)},r.prototype.onAttrName=function(t){t=this.xml?t:t.toLowerCase(),"data-"===t.substr(0,5)?"data-src"!==t||this.attrs.src?"img"===this.tagName||"a"===this.tagName?this.attrName=t:this.attrName=void 0:this.attrName="src":(this.attrName=t,this.attrs[t]="T")},r.prototype.onAttrVal=function(t){var i=this.attrName||"";"style"===i||"href"===i?this.attrs[i]=n(t,!0):i.includes("src")?this.attrs[i]=this.getUrl(n(t,!0)):i&&(this.attrs[i]=t)},r.prototype.onOpenTag=function(t){var i=Object.create(null);i.name=this.tagName,i.attrs=this.attrs,this.attrs=Object.create(null);var e=i.attrs,s=this.stack[this.stack.length-1],n=s?s.children:this.nodes,a=this.xml?t:l.voidTags[i.name];if(h[i.name]&&(e.class=h[i.name]+(e.class?" "+e.class:"")),"embed"===i.name){var r=e.src||"";r.includes(".mp4")||r.includes(".3gp")||r.includes(".m3u8")||(e.type||"").includes("video")?i.name="video":(r.includes(".mp3")||r.includes(".wav")||r.includes(".aac")||r.includes(".m4a")||(e.type||"").includes("audio"))&&(i.name="audio"),e.autostart&&(e.autoplay="T"),e.controls="T"}if("video"!==i.name&&"audio"!==i.name||("video"!==i.name||e.id||(e.id="v"+f++),e.controls||e.autoplay||(e.controls="T"),i.src=[],e.src&&(i.src.push(e.src),e.src=void 0),this.expose()),a){if(!this.hook(i)||l.ignoreTags[i.name])return void("base"!==i.name||this.options.domain?"source"===i.name&&s&&("video"===s.name||"audio"===s.name)&&e.src&&s.src.push(e.src):this.options.domain=e.href);var o=this.parseStyle(i);if("img"===i.name){if(e.src&&(e.src.includes("webp")&&(i.webp="T"),e.src.includes("data:")&&"all"!==this.options.previewImg&&!e["original-src"]&&(e.ignore="T"),!e.ignore||i.webp||e.src.includes("cloud://"))){for(var d=this.stack.length;d--;){var p=this.stack[d];"table"!==p.name||i.webp||e.src.includes("cloud://")||(!o.display||o.display.includes("inline")?i.t="inline-block":i.t=o.display,o.display=void 0);var u=p.attrs.style||"";if(!u.includes("flex:")||u.includes("flex:0")||u.includes("flex: 0")||o.width&&!(parseInt(o.width)>100))if(u.includes("flex")&&"100%"===o.width)for(var g=d+1;g<this.stack.length;g++){var m=this.stack[g].attrs.style||"";if(!m.includes(";width")&&!m.includes(" width")&&0!==m.indexOf("width")){o.width="";break}}else u.includes("inline-block")&&(o.width&&"%"===o.width[o.width.length-1]?(p.attrs.style+=";max-width:"+o.width,o.width=""):p.attrs.style+=";max-width:100%");else{o.width="100% !important",o.height="";for(var v=d+1;v<this.stack.length;v++)this.stack[v].attrs.style=(this.stack[v].attrs.style||"").replace("inline-","")}"a"===p.name?i.a=p.attrs:p.c=1}i.i=this.imgList.length;var y=e["original-src"]||e.src;if(this.imgList.includes(y)){var b=y.indexOf("://");if(-1!==b){b+=3;for(var x=y.substr(0,b);b<y.length&&"/"!==y[b];b++)x+=Math.random()>.5?y[b].toUpperCase():y[b];x+=y.substr(b),y=x}}this.imgList.push(y),i.t||(this.imgList._unloadimgs+=1)}"inline"===o.display&&(o.display=""),e.ignore&&(o["max-width"]=o["max-width"]||"100%",e.style+=";-webkit-touch-callout:none"),parseInt(o.width)>c&&(o.height=void 0),isNaN(parseInt(o.width))||(i.w="T"),!isNaN(parseInt(o.height))&&(!o.height.includes("%")||s&&(s.attrs.style||"").includes("height"))&&(i.h="T"),i.w&&i.h&&o["object-fit"]&&("contain"===o["object-fit"]?i.m="aspectFit":"cover"===o["object-fit"]&&(i.m="aspectFill"))}else if("svg"===i.name)return n.push(i),this.stack.push(i),void this.popNode();for(var w in o)o[w]&&(e.style+=";".concat(w,":").concat(o[w].replace(" !important","")));e.style=e.style.substr(1)||void 0}else("pre"===i.name||(e.style||"").includes("white-space")&&e.style.includes("pre"))&&2!==this.pre&&(this.pre=i.pre=1),i.children=[],this.stack.push(i);n.push(i)},r.prototype.onCloseTag=function(t){t=this.xml?t:t.toLowerCase();var i;for(i=this.stack.length;i--&&this.stack[i].name!==t;);if(-1!==i)for(;this.stack.length>i;)this.popNode();else if("p"===t||"br"===t){var e=this.stack.length?this.stack[this.stack.length-1].children:this.nodes;e.push({name:t,attrs:{class:h[t],style:this.tagStyle[t]}})}},r.prototype.popNode=function(){var i=this.stack.pop(),e=i.attrs,s=i.children,n=this.stack[this.stack.length-1],r=n?n.children:this.nodes;if(!this.hook(i)||l.ignoreTags[i.name])return"title"===i.name&&s.length&&"text"===s[0].type&&this.options.setTitle&&wx.setNavigationBarTitle({title:s[0].text}),void r.pop();if(i.pre&&2!==this.pre){this.pre=i.pre=void 0;for(var o=this.stack.length;o--;)this.stack[o].pre&&(this.pre=1)}if("svg"===i.name){if(this.xml>1)return void this.xml--;var h="",d=e.style;return e.style="",e.xmlns="http://www.w3.org/2000/svg",function i(e){if("text"===e.type)return void(h+=e.text);var s=l.svgDict[e.name]||e.name;if("foreignObject"===s){var n,a=t(e.children||[]);try{for(a.s();!(n=a.n()).done;){var r=n.value;if(r.attrs&&!r.attrs.xmlns){r.attrs.xmlns="http://www.w3.org/1999/xhtml";break}}}catch(t){a.e(t)}finally{a.f()}}h+="<"+s;for(var o in e.attrs){var c=e.attrs[o];c&&(h+=" ".concat(l.svgDict[o]||o,'="').concat(c.replace(/"/g,""),'"'))}if(e.children){h+=">";for(var d=0;d<e.children.length;d++)i(e.children[d]);h+="</"+s+">"}else h+="/>"}(i),i.name="img",i.attrs={src:"data:image/svg+xml;utf8,"+h.replace(/#/g,"%23"),style:d,ignore:"T"},i.children=void 0,this.xml=!1,void(l.ignoreTags.style=!0)}var p={};if(e.align&&("table"===i.name?"center"===e.align?p["margin-inline-start"]=p["margin-inline-end"]="auto":p.float=e.align:p["text-align"]=e.align,e.align=void 0),e.dir&&(p.direction=e.dir,e.dir=void 0),"font"===i.name&&(e.color&&(p.color=e.color,e.color=void 0),e.face&&(p["font-family"]=e.face,e.face=void 0),e.size)){var u=parseInt(e.size);isNaN(u)||(u<1?u=1:u>7&&(u=7),p["font-size"]=["x-small","small","medium","large","x-large","xx-large","xxx-large"][u-1]),e.size=void 0}if((e.class||"").includes("align-center")&&(p["text-align"]="center"),Object.assign(p,this.parseStyle(i)),"table"!==i.name&&parseInt(p.width)>c&&(p["max-width"]="100%",p["box-sizing"]="border-box"),l.blockTags[i.name])i.name="div";else if(l.trustTags[i.name]||this.xml)if("a"===i.name||"ad"===i.name)this.expose();else if("video"===i.name||"audio"===i.name)(p.height||"").includes("auto")&&(p.height=void 0),i.children=void 0;else if("ul"!==i.name&&"ol"!==i.name||!i.c)if("table"===i.name){var f=parseFloat(e.cellpadding),g=parseFloat(e.cellspacing),m=parseFloat(e.border),v=p["border-color"],y=p["border-style"];if(i.c&&(isNaN(f)&&(f=2),isNaN(g)&&(g=2)),m&&(e.style+=";border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray")),i.flag&&i.c){i.flag=void 0,p.display="grid","collapse"===p["border-collapse"]&&(p["border-collapse"]=void 0,g=0),g?(p["grid-gap"]=g+"px",p.padding=g+"px"):m&&(e.style+=";border-left:0;border-top:0");var b=[],x=[],w=[],k={};!function i(e){for(var s=0;s<e.length;s++)if("tr"===e[s].name)x.push(e[s]);else if("colgroup"===e[s].name){var n,a=1,r=t(e[s].children||[]);try{for(r.s();!(n=r.n()).done;){var o=n.value;if("col"===o.name){var l=o.attrs.style||"",h=l.indexOf("width")?l.indexOf(";width"):0;if(-1!==h){var c=l.indexOf(";",h+6);-1===c&&(c=l.length),b[a]=l.substring(h?h+7:6,c)}a+=1}}}catch(t){r.e(t)}finally{r.f()}}else i(e[s].children||[])}(s);for(var N=1;N<=x.length;N++){for(var T=1,O=0;O<x[N-1].children.length;O++){var j=x[N-1].children[O];if("td"===j.name||"th"===j.name){for(;k[N+"."+T];)T++;j.c=1;var I=j.attrs.style||"",S=I.indexOf("width")?I.indexOf(";width"):0;if(-1!==S){var C=I.indexOf(";",S+6);-1===C&&(C=I.length),j.attrs.colspan||(b[T]=I.substring(S?S+7:6,C)),I=I.substr(0,S)+I.substr(C)}if(I+=";display:flex;flex-direction:column",-1!==(S=I.indexOf("vertical-align"))){var A=I.substr(S+15,10);A.includes("middle")?I+=";justify-content:center":A.includes("bottom")&&(I+=";justify-content:flex-end")}else I+=";justify-content:center";if(-1!==(S=I.indexOf("text-align"))){var L=I.substr(S+11,10);L.includes("center")?I+=";justify-content: center":L.includes("right")&&(I+=";justify-content: right")}if(I=(m?";border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray")+(g?"":";border-right:0;border-bottom:0"):"")+(f?";padding:".concat(f,"px"):"")+";"+I,j.attrs.colspan&&(I+=";grid-column-start:".concat(T,";grid-column-end:").concat(T+parseInt(j.attrs.colspan)),j.attrs.rowspan||(I+=";grid-row-start:".concat(N,";grid-row-end:").concat(N+1)),T+=parseInt(j.attrs.colspan)-1),j.attrs.rowspan){I+=";grid-row-start:".concat(N,";grid-row-end:").concat(N+parseInt(j.attrs.rowspan)),j.attrs.colspan||(I+=";grid-column-start:".concat(T,";grid-column-end:").concat(T+1));for(var z=1;z<j.attrs.rowspan;z++)for(var U=0;U<(j.attrs.colspan||1);U++)k[N+z+"."+(T-U)]=1}I&&(j.attrs.style=I),w.push(j),T++}}if(1===N){for(var F="",q=1;q<T;q++)F+=(b[q]?b[q]:"auto")+" ";p["grid-template-columns"]=F}}i.children=w}else i.c&&(p.display="table"),isNaN(g)||(p["border-spacing"]=g+"px"),(m||f||i.c)&&function t(e){for(var s=0;s<e.length;s++){var n=e[s];i.c&&(n.c=1),"th"===n.name||"td"===n.name?(m&&(n.attrs.style="border:".concat(m,"px ").concat(y||"solid"," ").concat(v||"gray",";").concat(n.attrs.style||"")),f&&(n.attrs.style="padding:".concat(f,"px;").concat(n.attrs.style||""))):n.children&&t(n.children)}}(s);if(this.options.scrollTable&&!(e.style||"").includes("inline")){var V=Object.assign({},i);i.name="div",i.attrs={style:"overflow-x:auto;padding:1px"},i.children=[V],e=V.attrs}}else if(("tbody"===i.name||"tr"===i.name)&&i.flag&&i.c)i.flag=void 0,function t(i){for(var e=0;e<i.length;e++)if("td"===i[e].name)for(var s=0,n=["color","background","background-color"];s<n.length;s++){var a=n[s];p[a]&&(i[e].attrs.style=a+":"+p[a]+";"+(i[e].attrs.style||""))}else t(i[e].children||[])}(s);else if("td"!==i.name&&"th"!==i.name||!e.colspan&&!e.rowspan){if("ruby"===i.name){i.name="span";for(var D=0;D<s.length-1;D++)"text"===s[D].type&&"rt"===s[D+1].name&&(s[D]={name:"span",attrs:{style:"display:inline-block;text-align:center"},children:[{name:"div",attrs:{style:"font-size:50%;"+(s[D+1].attrs.style||"")},children:s[D+1].children},s[D]]},s.splice(D+1,1))}}else for(var W=this.stack.length;W--;)"table"!==this.stack[W].name&&"tbody"!==this.stack[W].name&&"tr"!==this.stack[W].name||(this.stack[W].flag=1);else{var B={a:"lower-alpha",A:"upper-alpha",i:"lower-roman",I:"upper-roman"};B[e.type]&&(e.style+=";list-style-type:"+B[e.type],e.type=void 0),i.c=1;for(var M=s.length;M--;)"li"===s[M].name&&(s[M].c=1)}else i.name="span";if((p.display||"").includes("flex")&&!i.c)for(var P=s.length;P--;){var Z=s[P];Z.f&&(Z.attrs.style=(Z.attrs.style||"")+Z.f,Z.f=void 0)}var _=n&&((n.attrs.style||"").includes("flex")||(n.attrs.style||"").includes("grid"))&&!i.c&&!(p.display||"").includes("inline");_&&(i.f=";max-width:100%"),s.length>=50&&i.c&&!(p.display||"").includes("flex")&&a(s);for(var E in p)if(p[E]){var G=";".concat(E,":").concat(p[E].replace(" !important",""));_&&(E.includes("flex")&&"flex-direction"!==E||"align-self"===E||E.includes("grid")||"-"===p[E][0]||E.includes("width")&&G.includes("%"))?(i.f+=G,"width"===E&&(e.style+=";width:100%")):e.style+=G}e.style=e.style.substr(1)||void 0},r.prototype.onText=function(t){if(!this.pre){for(var i,e="",s=0,a=t.length;s<a;s++)u[t[s]]?(" "!==e[e.length-1]&&(e+=" "),"\n"!==t[s]||i||(i=!0)):e+=t[s];if(" "===e&&i)return;t=e}var r=Object.create(null);if(r.type="text",r.text=n(t),this.hook(r)){"force"===this.options.selectable&&d.includes("iOS")&&!wx.canIUse("rich-text.user-select")&&this.expose();(this.stack.length?this.stack[this.stack.length-1].children:this.nodes).push(r)}},o.prototype.parse=function(t){this.content=t||"",this.i=0,this.start=0,this.state=this.text;for(var i=this.content.length;-1!==this.i&&this.i<i;)this.state()},o.prototype.checkClose=function(t){var i="/"===this.content[this.i];return!!(">"===this.content[this.i]||i&&">"===this.content[this.i+1])&&(t&&this.handler[t](this.content.substring(this.start,this.i)),this.i+=i?2:1,this.start=this.i,this.handler.onOpenTag(i),"script"===this.handler.tagName?(this.i=this.content.indexOf("</",this.i),-1!==this.i&&(this.i+=2,this.start=this.i),this.state=this.endTag):this.state=this.text,!0)},o.prototype.text=function(){if(this.i=this.content.indexOf("<",this.i),-1===this.i)return void(this.start<this.content.length&&this.handler.onText(this.content.substring(this.start,this.content.length)));var t=this.content[this.i+1];if(t>="a"&&t<="z"||t>="A"&&t<="Z")this.start!==this.i&&this.handler.onText(this.content.substring(this.start,this.i)),this.start=++this.i,this.state=this.tagName;else if("/"===t||"!"===t||"?"===t){this.start!==this.i&&this.handler.onText(this.content.substring(this.start,this.i));var i=this.content[this.i+2];if("/"===t&&(i>="a"&&i<="z"||i>="A"&&i<="Z"))return this.i+=2,this.start=this.i,void(this.state=this.endTag);var e="--\x3e";"!"===t&&"-"===this.content[this.i+2]&&"-"===this.content[this.i+3]||(e=">"),this.i=this.content.indexOf(e,this.i),-1!==this.i&&(this.i+=e.length,this.start=this.i)}else this.i++},o.prototype.tagName=function(){if(u[this.content[this.i]]){for(this.handler.onTagName(this.content.substring(this.start,this.i));u[this.content[++this.i]];);this.i<this.content.length&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)}else this.checkClose("onTagName")||this.i++},o.prototype.attrName=function(){var t=this.content[this.i];if(u[t]||"="===t){this.handler.onAttrName(this.content.substring(this.start,this.i));for(var i="="===t,e=this.content.length;++this.i<e;)if(t=this.content[this.i],!u[t]){if(this.checkClose())return;if(i)return this.start=this.i,void(this.state=this.attrVal);if("="!==this.content[this.i])return this.start=this.i,void(this.state=this.attrName);i=!0}}else this.checkClose("onAttrName")||this.i++},o.prototype.attrVal=function(){var t=this.content[this.i],i=this.content.length;if('"'===t||"'"===t){if(this.start=++this.i,this.i=this.content.indexOf(t,this.i),-1===this.i)return;this.handler.onAttrVal(this.content.substring(this.start,this.i))}else for(;this.i<i;this.i++){if(u[this.content[this.i]]){this.handler.onAttrVal(this.content.substring(this.start,this.i));break}if(this.checkClose("onAttrVal"))return}for(;u[this.content[++this.i]];);this.i<i&&!this.checkClose()&&(this.start=this.i,this.state=this.attrName)},o.prototype.endTag=function(){var t=this.content[this.i];if(u[t]||">"===t||"/"===t){if(this.handler.onCloseTag(this.content.substring(this.start,this.i)),">"!==t&&(this.i=this.content.indexOf(">",this.i),-1===this.i))return;this.start=++this.i,this.state=this.text}else this.i++},module.exports=r;
node_modules/mp-html/dist/uni-app/components/mp-html/mp-html.vue
New file
@@ -0,0 +1,498 @@
<template>
  <view id="_root" :class="(selectable?'_select ':'')+'_root'" :style="containerStyle">
    <slot v-if="!nodes[0]" />
    <!-- #ifndef APP-PLUS-NVUE -->
    <node v-else :childs="nodes" :opts="[lazyLoad,loadingImg,errorImg,showImgMenu,selectable]" name="span" />
    <!-- #endif -->
    <!-- #ifdef APP-PLUS-NVUE -->
    <web-view ref="web" src="/static/app-plus/mp-html/local.html" :style="'margin-top:-2px;height:' + height + 'px'" @onPostMessage="_onMessage" />
    <!-- #endif -->
  </view>
</template>
<script>
/**
 * mp-html v2.5.1
 * @description å¯Œæ–‡æœ¬ç»„ä»¶
 * @tutorial https://github.com/jin-yufeng/mp-html
 * @property {String} container-style å®¹å™¨çš„æ ·å¼
 * @property {String} content ç”¨äºŽæ¸²æŸ“çš„ html å­—符串
 * @property {Boolean} copy-link æ˜¯å¦å…è®¸å¤–部链接被点击时自动复制
 * @property {String} domain ä¸»åŸŸåï¼Œç”¨äºŽæ‹¼æŽ¥é“¾æŽ¥
 * @property {String} error-img å›¾ç‰‡å‡ºé”™æ—¶çš„占位图链接
 * @property {Boolean} lazy-load æ˜¯å¦å¼€å¯å›¾ç‰‡æ‡’加载
 * @property {string} loading-img å›¾ç‰‡åŠ è½½è¿‡ç¨‹ä¸­çš„å ä½å›¾é“¾æŽ¥
 * @property {Boolean} pause-video æ˜¯å¦åœ¨æ’­æ”¾ä¸€ä¸ªè§†é¢‘时自动暂停其他视频
 * @property {Boolean} preview-img æ˜¯å¦å…è®¸å›¾ç‰‡è¢«ç‚¹å‡»æ—¶è‡ªåŠ¨é¢„è§ˆ
 * @property {Boolean} scroll-table æ˜¯å¦ç»™æ¯ä¸ªè¡¨æ ¼æ·»åŠ ä¸€ä¸ªæ»šåŠ¨å±‚ä½¿å…¶èƒ½å•ç‹¬æ¨ªå‘æ»šåŠ¨
 * @property {Boolean | String} selectable æ˜¯å¦å¼€å¯é•¿æŒ‰å¤åˆ¶
 * @property {Boolean} set-title æ˜¯å¦å°† title æ ‡ç­¾çš„内容设置到页面标题
 * @property {Boolean} show-img-menu æ˜¯å¦å…è®¸å›¾ç‰‡è¢«é•¿æŒ‰æ—¶æ˜¾ç¤ºèœå•
 * @property {Object} tag-style æ ‡ç­¾çš„默认样式
 * @property {Boolean | Number} use-anchor æ˜¯å¦ä½¿ç”¨é”šç‚¹é“¾æŽ¥
 * @event {Function} load dom ç»“构加载完毕时触发
 * @event {Function} ready æ‰€æœ‰å›¾ç‰‡åŠ è½½å®Œæ¯•æ—¶è§¦å‘
 * @event {Function} imgtap å›¾ç‰‡è¢«ç‚¹å‡»æ—¶è§¦å‘
 * @event {Function} linktap é“¾æŽ¥è¢«ç‚¹å‡»æ—¶è§¦å‘
 * @event {Function} play éŸ³è§†é¢‘播放时触发
 * @event {Function} error åª’体加载出错时触发
 */
// #ifndef APP-PLUS-NVUE
import node from './node/node'
// #endif
import Parser from './parser'
const plugins=[]
// #ifdef APP-PLUS-NVUE
const dom = weex.requireModule('dom')
// #endif
export default {
  name: 'mp-html',
  data () {
    return {
      nodes: [],
      // #ifdef APP-PLUS-NVUE
      height: 3
      // #endif
    }
  },
  props: {
    containerStyle: {
      type: String,
      default: ''
    },
    content: {
      type: String,
      default: ''
    },
    copyLink: {
      type: [Boolean, String],
      default: true
    },
    domain: String,
    errorImg: {
      type: String,
      default: ''
    },
    lazyLoad: {
      type: [Boolean, String],
      default: false
    },
    loadingImg: {
      type: String,
      default: ''
    },
    pauseVideo: {
      type: [Boolean, String],
      default: true
    },
    previewImg: {
      type: [Boolean, String],
      default: true
    },
    scrollTable: [Boolean, String],
    selectable: [Boolean, String],
    setTitle: {
      type: [Boolean, String],
      default: true
    },
    showImgMenu: {
      type: [Boolean, String],
      default: true
    },
    tagStyle: Object,
    useAnchor: [Boolean, Number]
  },
  // #ifdef VUE3
  emits: ['load', 'ready', 'imgtap', 'linktap', 'play', 'error'],
  // #endif
  // #ifndef APP-PLUS-NVUE
  components: {
    node
  },
  // #endif
  watch: {
    content (content) {
      this.setContent(content)
    }
  },
  created () {
    this.plugins = []
    for (let i = plugins.length; i--;) {
      this.plugins.push(new plugins[i](this))
    }
  },
  mounted () {
    if (this.content && !this.nodes.length) {
      this.setContent(this.content)
    }
  },
  beforeDestroy () {
    this._hook('onDetached')
  },
  methods: {
    /**
     * @description å°†é”šç‚¹è·³è½¬çš„范围限定在一个 scroll-view å†…
     * @param {Object} page scroll-view æ‰€åœ¨é¡µé¢çš„示例
     * @param {String} selector scroll-view çš„选择器
     * @param {String} scrollTop scroll-view scroll-top å±žæ€§ç»‘定的变量名
     */
    in (page, selector, scrollTop) {
      // #ifndef APP-PLUS-NVUE
      if (page && selector && scrollTop) {
        this._in = {
          page,
          selector,
          scrollTop
        }
      }
      // #endif
    },
    /**
     * @description é”šç‚¹è·³è½¬
     * @param {String} id è¦è·³è½¬çš„锚点 id
     * @param {Number} offset è·³è½¬ä½ç½®çš„偏移量
     * @returns {Promise}
     */
    navigateTo (id, offset) {
      return new Promise((resolve, reject) => {
        if (!this.useAnchor) {
          reject(Error('Anchor is disabled'))
          return
        }
        offset = offset || parseInt(this.useAnchor) || 0
        // #ifdef APP-PLUS-NVUE
        if (!id) {
          dom.scrollToElement(this.$refs.web, {
            offset
          })
          resolve()
        } else {
          this._navigateTo = {
            resolve,
            reject,
            offset
          }
          this.$refs.web.evalJs('uni.postMessage({data:{action:"getOffset",offset:(document.getElementById(' + id + ')||{}).offsetTop}})')
        }
        // #endif
        // #ifndef APP-PLUS-NVUE
        let deep = ' '
        // #ifdef MP-WEIXIN || MP-QQ || MP-TOUTIAO
        deep = '>>>'
        // #endif
        const selector = uni.createSelectorQuery()
          // #ifndef MP-ALIPAY
          .in(this._in ? this._in.page : this)
          // #endif
          .select((this._in ? this._in.selector : '._root') + (id ? `${deep}#${id}` : '')).boundingClientRect()
        if (this._in) {
          selector.select(this._in.selector).scrollOffset()
            .select(this._in.selector).boundingClientRect()
        } else {
          // èŽ·å– scroll-view çš„位置和滚动距离
          selector.selectViewport().scrollOffset() // èŽ·å–çª—å£çš„æ»šåŠ¨è·ç¦»
        }
        selector.exec(res => {
          if (!res[0]) {
            reject(Error('Label not found'))
            return
          }
          const scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset
          if (this._in) {
            // scroll-view è·³è½¬
            this._in.page[this._in.scrollTop] = scrollTop
          } else {
            // é¡µé¢è·³è½¬
            uni.pageScrollTo({
              scrollTop,
              duration: 300
            })
          }
          resolve()
        })
        // #endif
      })
    },
    /**
     * @description èŽ·å–æ–‡æœ¬å†…å®¹
     * @return {String}
     */
    getText (nodes) {
      let text = '';
      (function traversal (nodes) {
        for (let i = 0; i < nodes.length; i++) {
          const node = nodes[i]
          if (node.type === 'text') {
            text += node.text.replace(/&amp;/g, '&')
          } else if (node.name === 'br') {
            text += '\n'
          } else {
            // å—级标签前后加换行
            const isBlock = node.name === 'p' || node.name === 'div' || node.name === 'tr' || node.name === 'li' || (node.name[0] === 'h' && node.name[1] > '0' && node.name[1] < '7')
            if (isBlock && text && text[text.length - 1] !== '\n') {
              text += '\n'
            }
            // é€’归获取子节点的文本
            if (node.children) {
              traversal(node.children)
            }
            if (isBlock && text[text.length - 1] !== '\n') {
              text += '\n'
            } else if (node.name === 'td' || node.name === 'th') {
              text += '\t'
            }
          }
        }
      })(nodes || this.nodes)
      return text
    },
    /**
     * @description èŽ·å–å†…å®¹å¤§å°å’Œä½ç½®
     * @return {Promise}
     */
    getRect () {
      return new Promise((resolve, reject) => {
        uni.createSelectorQuery()
          // #ifndef MP-ALIPAY
          .in(this)
          // #endif
          .select('#_root').boundingClientRect().exec(res => res[0] ? resolve(res[0]) : reject(Error('Root label not found')))
      })
    },
    /**
     * @description æš‚停播放媒体
     */
    pauseMedia () {
      for (let i = (this._videos || []).length; i--;) {
        this._videos[i].pause()
      }
      // #ifdef APP-PLUS
      const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].pause()'
      // #ifndef APP-PLUS-NVUE
      let page = this.$parent
      while (!page.$scope) page = page.$parent
      page.$scope.$getAppWebview().evalJS(command)
      // #endif
      // #ifdef APP-PLUS-NVUE
      this.$refs.web.evalJs(command)
      // #endif
      // #endif
    },
    /**
     * @description è®¾ç½®åª’体播放速率
     * @param {Number} rate æ’­æ”¾é€Ÿçއ
     */
    setPlaybackRate (rate) {
      this.playbackRate = rate
      for (let i = (this._videos || []).length; i--;) {
        this._videos[i].playbackRate(rate)
      }
      // #ifdef APP-PLUS
      const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].playbackRate=' + rate
      // #ifndef APP-PLUS-NVUE
      let page = this.$parent
      while (!page.$scope) page = page.$parent
      page.$scope.$getAppWebview().evalJS(command)
      // #endif
      // #ifdef APP-PLUS-NVUE
      this.$refs.web.evalJs(command)
      // #endif
      // #endif
    },
    /**
     * @description è®¾ç½®å†…容
     * @param {String} content html å†…容
     * @param {Boolean} append æ˜¯å¦åœ¨å°¾éƒ¨è¿½åŠ 
     */
    setContent (content, append) {
      if (!append || !this.imgList) {
        this.imgList = []
      }
      const nodes = new Parser(this).parse(content)
      // #ifdef APP-PLUS-NVUE
      if (this._ready) {
        this._set(nodes, append)
      }
      // #endif
      this.$set(this, 'nodes', append ? (this.nodes || []).concat(nodes) : nodes)
      // #ifndef APP-PLUS-NVUE
      this._videos = []
      this.$nextTick(() => {
        this._hook('onLoad')
        this.$emit('load')
      })
      if (this.lazyLoad || this.imgList._unloadimgs < this.imgList.length / 2) {
        // è®¾ç½®æ‡’加载,每 350ms èŽ·å–é«˜åº¦ï¼Œä¸å˜åˆ™è®¤ä¸ºåŠ è½½å®Œæ¯•
        let height = 0
        const callback = rect => {
          if (!rect || !rect.height) rect = {}
          // 350ms æ€»é«˜åº¦æ— å˜åŒ–就触发 ready äº‹ä»¶
          if (rect.height === height) {
            this.$emit('ready', rect)
          } else {
            height = rect.height
            setTimeout(() => {
              this.getRect().then(callback).catch(callback)
            }, 350)
          }
        }
        this.getRect().then(callback).catch(callback)
      } else {
        // æœªè®¾ç½®æ‡’加载,等待所有图片加载完毕
        if (!this.imgList._unloadimgs) {
          this.getRect().then(rect => {
            this.$emit('ready', rect)
          }).catch(() => {
            this.$emit('ready', {})
          })
        }
      }
      // #endif
    },
    /**
     * @description è°ƒç”¨æ’件钩子函数
     */
    _hook (name) {
      for (let i = plugins.length; i--;) {
        if (this.plugins[i][name]) {
          this.plugins[i][name]()
        }
      }
    },
    // #ifdef APP-PLUS-NVUE
    /**
     * @description è®¾ç½®å†…容
     */
    _set (nodes, append) {
      this.$refs.web.evalJs('setContent(' + JSON.stringify(nodes).replace(/%22/g, '') + ',' + JSON.stringify([this.containerStyle.replace(/(?:margin|padding)[^;]+/g, ''), this.errorImg, this.loadingImg, this.pauseVideo, this.scrollTable, this.selectable]) + ',' + append + ')')
    },
    /**
     * @description æŽ¥æ”¶åˆ° web-view æ¶ˆæ¯
     */
    _onMessage (e) {
      const message = e.detail.data[0]
      switch (message.action) {
        // web-view åˆå§‹åŒ–完毕
        case 'onJSBridgeReady':
          this._ready = true
          if (this.nodes) {
            this._set(this.nodes)
          }
          break
        // å†…容 dom åŠ è½½å®Œæ¯•
        case 'onLoad':
          this.height = message.height
          this._hook('onLoad')
          this.$emit('load')
          break
        // æ‰€æœ‰å›¾ç‰‡åŠ è½½å®Œæ¯•
        case 'onReady':
          this.getRect().then(res => {
            this.$emit('ready', res)
          }).catch(() => {
            this.$emit('ready', {})
          })
          break
        // æ€»é«˜åº¦å‘生变化
        case 'onHeightChange':
          this.height = message.height
          break
        // å›¾ç‰‡ç‚¹å‡»
        case 'onImgTap':
          this.$emit('imgtap', message.attrs)
          if (this.previewImg) {
            uni.previewImage({
              current: parseInt(message.attrs.i),
              urls: this.imgList
            })
          }
          break
        // é“¾æŽ¥ç‚¹å‡»
        case 'onLinkTap': {
          const href = message.attrs.href
          this.$emit('linktap', message.attrs)
          if (href) {
            // é”šç‚¹è·³è½¬
            if (href[0] === '#') {
              if (this.useAnchor) {
                dom.scrollToElement(this.$refs.web, {
                  offset: message.offset
                })
              }
            } else if (href.includes('://')) {
              // æ‰“开外链
              if (this.copyLink) {
                plus.runtime.openWeb(href)
              }
            } else {
              uni.navigateTo({
                url: href,
                fail () {
                  uni.switchTab({
                    url: href
                  })
                }
              })
            }
          }
          break
        }
        case 'onPlay':
          this.$emit('play')
          break
        // èŽ·å–åˆ°é”šç‚¹çš„åç§»é‡
        case 'getOffset':
          if (typeof message.offset === 'number') {
            dom.scrollToElement(this.$refs.web, {
              offset: message.offset + this._navigateTo.offset
            })
            this._navigateTo.resolve()
          } else {
            this._navigateTo.reject(Error('Label not found'))
          }
          break
        // ç‚¹å‡»
        case 'onClick':
          this.$emit('tap')
          this.$emit('click')
          break
        // å‡ºé”™
        case 'onError':
          this.$emit('error', {
            source: message.source,
            attrs: message.attrs
          })
      }
    }
    // #endif
  }
}
</script>
<style>
/* #ifndef APP-PLUS-NVUE */
/* æ ¹èŠ‚ç‚¹æ ·å¼ */
._root {
  padding: 1px 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
/* é•¿æŒ‰å¤åˆ¶ */
._select {
  user-select: text;
}
/* #endif */
</style>
node_modules/mp-html/dist/uni-app/components/mp-html/node/node.vue
New file
@@ -0,0 +1,597 @@
<template>
  <view :id="attrs.id" :class="'_block _'+name+' '+attrs.class" :style="attrs.style">
    <block v-for="(n, i) in childs" v-bind:key="i">
      <!-- å›¾ç‰‡ -->
      <!-- å ä½å›¾ -->
      <image v-if="n.name==='img'&&!n.t&&((opts[1]&&!ctrl[i])||ctrl[i]<0)" class="_img" :style="n.attrs.style" :src="ctrl[i]<0?opts[2]:opts[1]" mode="widthFix" />
      <!-- æ˜¾ç¤ºå›¾ç‰‡ -->
      <!-- #ifdef H5 || (APP-PLUS && VUE2) -->
      <img v-if="n.name==='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]===-1?'display:none;':'')+n.attrs.style" :src="n.attrs.src||(ctrl.load?n.attrs['data-src']:'')" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap" @longpress="imgLongTap" />
      <!-- #endif -->
      <!-- #ifndef H5 || (APP-PLUS && VUE2) -->
      <!-- è¡¨æ ¼ä¸­çš„图片,使用 rich-text é˜²æ­¢å¤§å°ä¸æ­£ç¡® -->
      <rich-text v-if="n.name==='img'&&n.t" :style="'display:'+n.t" :nodes="[{attrs:{style:n.attrs.style||'',src:n.attrs.src},name:'img'}]" :data-i="i" @tap.stop="imgTap" />
      <!-- #endif -->
      <!-- #ifdef APP-HARMONY -->
      <image v-else-if="n.name==='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]===-1?'display:none;':'')+'width:'+ctrl[i]+'px;'+n.attrs.style" :src="n.attrs.src||(ctrl.load?n.attrs['data-src']:'')" :mode="!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap" @longpress="imgLongTap" />
      <!-- #endif -->
      <!-- #ifndef H5 || APP-PLUS || MP-KUAISHOU -->
      <image v-else-if="n.name==='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]===-1?'display:none;':'')+'width:'+(ctrl[i]||1)+'px;height:1px;'+n.attrs.style" :src="n.attrs.src" :mode="!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))" :lazy-load="opts[0]" :webp="n.webp" :show-menu-by-longpress="opts[3]&&!n.attrs.ignore" :image-menu-prevent="!opts[3]||n.attrs.ignore" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap" @longpress="imgLongTap" />
      <!-- #endif -->
      <!-- #ifdef MP-KUAISHOU -->
      <image v-else-if="n.name==='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]===-1?'display:none;':'')+n.attrs.style" :src="n.attrs.src" :lazy-load="opts[0]" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap"></image>
      <!-- #endif -->
      <!-- #ifdef APP-PLUS && VUE3 -->
      <image v-else-if="n.name==='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]===-1?'display:none;':'')+'width:'+(ctrl[i]||1)+'px;'+n.attrs.style" :src="n.attrs.src||(ctrl.load?n.attrs['data-src']:'')" :mode="!n.h?'widthFix':(!n.w?'heightFix':(n.m||''))" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap" @longpress="imgLongTap" />
      <!-- #endif -->
      <!-- æ–‡æœ¬ -->
      <!-- #ifdef MP-WEIXIN -->
      <text v-else-if="n.text" :user-select="opts[4]=='force'&&isiOS" decode>{{n.text}}</text>
      <!-- #endif -->
      <!-- #ifndef MP-WEIXIN || MP-BAIDU || MP-ALIPAY || MP-TOUTIAO -->
      <text v-else-if="n.text" decode>{{n.text}}</text>
      <!-- #endif -->
      <text v-else-if="n.name==='br'">\n</text>
      <!-- é“¾æŽ¥ -->
      <view v-else-if="n.name==='a'" :id="n.attrs.id" :class="(n.attrs.href?'_a ':'')+n.attrs.class" hover-class="_hover" :style="'display:inline;'+n.attrs.style" :data-i="i" @tap.stop="linkTap">
        <node name="span" :childs="n.children" :opts="opts" style="display:inherit" />
      </view>
      <!-- è§†é¢‘ -->
      <!-- #ifdef APP-PLUS -->
      <view v-else-if="n.html" :id="n.attrs.id" :class="'_video '+n.attrs.class" :style="n.attrs.style" v-html="n.html" :data-i="i" @vplay.stop="play" />
      <!-- #endif -->
      <!-- #ifndef APP-PLUS -->
      <video v-else-if="n.name==='video'" :id="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :autoplay="n.attrs.autoplay" :controls="n.attrs.controls" :loop="n.attrs.loop" :muted="n.attrs.muted" :object-fit="n.attrs['object-fit']" :poster="n.attrs.poster" :src="n.src[ctrl[i]||0]" :data-i="i" @play="play" @error="mediaError" />
      <!-- #endif -->
      <!-- #ifdef H5 || APP-PLUS -->
      <iframe v-else-if="n.name==='iframe'" :style="n.attrs.style" :allowfullscreen="n.attrs.allowfullscreen" :frameborder="n.attrs.frameborder" :src="n.attrs.src" />
      <embed v-else-if="n.name==='embed'" :style="n.attrs.style" :src="n.attrs.src" />
      <!-- #endif -->
      <!-- #ifndef MP-TOUTIAO || ((H5 || APP-PLUS) && VUE3) -->
      <!-- éŸ³é¢‘ -->
      <audio v-else-if="n.name==='audio'" :id="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :author="n.attrs.author" :controls="n.attrs.controls" :loop="n.attrs.loop" :name="n.attrs.name" :poster="n.attrs.poster" :src="n.src[ctrl[i]||0]" :data-i="i" @play="play" @error="mediaError" />
      <!-- #endif -->
      <view v-else-if="(n.name==='table'&&n.c)||n.name==='li'" :id="n.attrs.id" :class="'_'+n.name+' '+n.attrs.class" :style="n.attrs.style">
        <node v-if="n.name==='li'" :childs="n.children" :opts="opts" />
        <view v-else v-for="(tbody, x) in n.children" v-bind:key="x" :class="'_'+tbody.name+' '+tbody.attrs.class" :style="tbody.attrs.style">
          <node v-if="tbody.name==='td'||tbody.name==='th'" :childs="tbody.children" :opts="opts" />
          <block v-else v-for="(tr, y) in tbody.children" v-bind:key="y">
            <view v-if="tr.name==='td'||tr.name==='th'" :class="'_'+tr.name+' '+tr.attrs.class" :style="tr.attrs.style">
              <node :childs="tr.children" :opts="opts" />
            </view>
            <view v-else :class="'_'+tr.name+' '+tr.attrs.class" :style="tr.attrs.style">
              <view v-for="(td, z) in tr.children" v-bind:key="z" :class="'_'+td.name+' '+td.attrs.class" :style="td.attrs.style">
                <node :childs="td.children" :opts="opts" />
              </view>
            </view>
          </block>
        </view>
      </view>
      <!-- å¯Œæ–‡æœ¬ -->
      <!-- #ifdef H5 || ((MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE2) -->
      <rich-text v-else-if="!n.c&&!handler.isInline(n.name, n.attrs.style)" :id="n.attrs.id" :style="n.f" :user-select="opts[4]" :nodes="[n]" />
      <!-- #endif -->
      <!-- #ifndef H5 || ((MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE2) -->
      <rich-text v-else-if="!n.c" :id="n.attrs.id" :style="'display:inline;'+n.f" :preview="false" :selectable="opts[4]" :user-select="opts[4]" :nodes="[n]" />
      <!-- #endif -->
      <!-- ç»§ç»­é€’å½’ -->
      <view v-else-if="n.c===2" :id="n.attrs.id" :class="'_block _'+n.name+' '+n.attrs.class" :style="n.f+';'+n.attrs.style">
        <node v-for="(n2, j) in n.children" v-bind:key="j" :style="n2.f" :name="n2.name" :attrs="n2.attrs" :childs="n2.children" :opts="opts" />
      </view>
      <node v-else :style="n.f" :name="n.name" :attrs="n.attrs" :childs="n.children" :opts="opts" />
    </block>
  </view>
</template>
<script module="handler" lang="wxs">
// è¡Œå†…标签列表
var inlineTags = {
  abbr: true,
  b: true,
  big: true,
  code: true,
  del: true,
  em: true,
  i: true,
  ins: true,
  label: true,
  q: true,
  small: true,
  span: true,
  strong: true,
  sub: true,
  sup: true
}
/**
 * @description åˆ¤æ–­æ˜¯å¦ä¸ºè¡Œå†…标签
 */
module.exports = {
  isInline: function (tagName, style) {
    return inlineTags[tagName] || (style || '').indexOf('display:inline') !== -1
  }
}
</script>
<script>
import node from './node'
export default {
  name: 'node',
  options: {
    // #ifdef MP-WEIXIN
    virtualHost: true,
    // #endif
    // #ifdef MP-TOUTIAO
    addGlobalClass: false
    // #endif
  },
  data () {
    return {
      ctrl: {},
      // #ifdef MP-WEIXIN
      isiOS: uni.getSystemInfoSync().system.includes('iOS')
      // #endif
    }
  },
  props: {
    name: String,
    attrs: {
      type: Object,
      default () {
        return {}
      }
    },
    childs: Array,
    opts: Array
  },
  components: {
    // #ifndef ((H5 || APP-PLUS) && VUE3) || APP-HARMONY
    node
    // #endif
  },
  mounted () {
    this.$nextTick(() => {
      for (this.root = this.$parent; this.root.$options.name !== 'mp-html'; this.root = this.root.$parent);
    })
    // #ifdef H5 || APP-PLUS
    if (this.opts[0]) {
      let i
      for (i = this.childs.length; i--;) {
        if (this.childs[i].name === 'img') break
      }
      if (i !== -1) {
        this.observer = uni.createIntersectionObserver(this).relativeToViewport({
          top: 500,
          bottom: 500
        })
        this.observer.observe('._img', res => {
          if (res.intersectionRatio) {
            this.$set(this.ctrl, 'load', 1)
            this.observer.disconnect()
          }
        })
      }
    }
    // #endif
  },
  beforeDestroy () {
    // #ifdef H5 || APP-PLUS
    if (this.observer) {
      this.observer.disconnect()
    }
    // #endif
  },
  methods:{
    // #ifdef MP-WEIXIN
    toJSON () { return this },
    // #endif
    /**
     * @description æ’­æ”¾è§†é¢‘事件
     * @param {Event} e
     */
    play (e) {
      const i = e.currentTarget.dataset.i
      const node = this.childs[i]
      this.root.$emit('play', {
        source: node.name,
        attrs: {
          ...node.attrs,
          src: node.src[this.ctrl[i] || 0]
        }
      })
      // #ifndef APP-PLUS
      if (this.root.pauseVideo) {
        let flag = false
        const id = e.target.id
        for (let i = this.root._videos.length; i--;) {
          if (this.root._videos[i].id === id) {
            flag = true
          } else {
            this.root._videos[i].pause() // è‡ªåŠ¨æš‚åœå…¶ä»–è§†é¢‘
          }
        }
        // å°†è‡ªå·±åŠ å…¥åˆ—è¡¨
        if (!flag) {
          const ctx = uni.createVideoContext(id
            // #ifndef MP-BAIDU
            , this
            // #endif
          )
          ctx.id = id
          if (this.root.playbackRate) {
            ctx.playbackRate(this.root.playbackRate)
          }
          this.root._videos.push(ctx)
        }
      }
      // #endif
    },
    /**
     * @description å›¾ç‰‡ç‚¹å‡»äº‹ä»¶
     * @param {Event} e
     */
    imgTap (e) {
      const node = this.childs[e.currentTarget.dataset.i]
      if (node.a) {
        this.linkTap(node.a)
        return
      }
      if (node.attrs.ignore) return
      // #ifdef H5 || APP-PLUS
      node.attrs.src = node.attrs.src || node.attrs['data-src']
      // #endif
      // #ifndef APP-HARMONY
      this.root.$emit('imgtap', node.attrs)
      // #endif
      // #ifdef APP-HARMONY
      this.root.$emit('imgtap', {
        ...node.attrs
      })
      // #endif
      // è‡ªåŠ¨é¢„è§ˆå›¾ç‰‡
      if (this.root.previewImg) {
        uni.previewImage({
          // #ifdef MP-WEIXIN
          showmenu: this.root.showImgMenu,
          // #endif
          // #ifdef MP-ALIPAY
          enablesavephoto: this.root.showImgMenu,
          enableShowPhotoDownload: this.root.showImgMenu,
          // #endif
          current: parseInt(node.attrs.i),
          urls: this.root.imgList
        })
      }
    },
    /**
     * @description å›¾ç‰‡é•¿æŒ‰
     */
    imgLongTap (e) {
      // #ifdef APP-PLUS
      const attrs = this.childs[e.currentTarget.dataset.i].attrs
      if (this.opts[3] && !attrs.ignore) {
        uni.showActionSheet({
          itemList: ['保存图片'],
          success: () => {
            const save = path => {
              uni.saveImageToPhotosAlbum({
                filePath: path,
                success () {
                  uni.showToast({
                    title: '保存成功'
                  })
                }
              })
            }
            if (this.root.imgList[attrs.i].startsWith('http')) {
              uni.downloadFile({
                url: this.root.imgList[attrs.i],
                success: res => save(res.tempFilePath)
              })
            } else {
              save(this.root.imgList[attrs.i])
            }
          }
        })
      }
      // #endif
    },
    /**
     * @description å›¾ç‰‡åŠ è½½å®Œæˆäº‹ä»¶
     * @param {Event} e
     */
    imgLoad (e) {
      const i = e.currentTarget.dataset.i
      /* #ifndef H5 || (APP-PLUS && VUE2) */
      if (!this.childs[i].w) {
        // è®¾ç½®åŽŸå®½åº¦
        this.$set(this.ctrl, i, e.detail.width)
      } else /* #endif */ if ((this.opts[1] && !this.ctrl[i]) || this.ctrl[i] === -1) {
        // åŠ è½½å®Œæ¯•ï¼Œå–æ¶ˆåŠ è½½ä¸­å ä½å›¾
        this.$set(this.ctrl, i, 1)
      }
      this.checkReady()
    },
    /**
     * @description æ£€æŸ¥æ˜¯å¦æ‰€æœ‰å›¾ç‰‡åŠ è½½å®Œæ¯•
     */
    checkReady () {
      if (this.root && !this.root.lazyLoad) {
        this.root._unloadimgs -= 1
        if (!this.root._unloadimgs) {
          setTimeout(() => {
            this.root.getRect().then(rect => {
              this.root.$emit('ready', rect)
            }).catch(() => {
              this.root.$emit('ready', {})
            })
          }, 350)
        }
      }
    },
    /**
     * @description é“¾æŽ¥ç‚¹å‡»äº‹ä»¶
     * @param {Event} e
     */
    linkTap (e) {
      const node = e.currentTarget ? this.childs[e.currentTarget.dataset.i] : {}
      const attrs = node.attrs || e
      const href = attrs.href
      this.root.$emit('linktap', Object.assign({
        innerText: this.root.getText(node.children || []) // é“¾æŽ¥å†…的文本内容
      }, attrs))
      if (href) {
        if (href[0] === '#') {
          // è·³è½¬é”šç‚¹
          this.root.navigateTo(href.substring(1)).catch(() => { })
        } else if (href.split('?')[0].includes('://')) {
          // å¤åˆ¶å¤–部链接
          if (this.root.copyLink) {
            // #ifdef H5
            window.open(href)
            // #endif
            // #ifdef MP
            uni.setClipboardData({
              data: href,
              success: () =>
                uni.showToast({
                  title: '链接已复制'
                })
            })
            // #endif
            // #ifdef APP-PLUS
            plus.runtime.openWeb(href)
            // #endif
          }
        } else {
          // è·³è½¬é¡µé¢
          uni.navigateTo({
            url: href,
            fail () {
              uni.switchTab({
                url: href,
                fail () { }
              })
            }
          })
        }
      }
    },
    /**
     * @description é”™è¯¯äº‹ä»¶
     * @param {Event} e
     */
    mediaError (e) {
      const i = e.currentTarget.dataset.i
      const node = this.childs[i]
      // åŠ è½½å…¶ä»–æº
      if (node.name === 'video' || node.name === 'audio') {
        let index = (this.ctrl[i] || 0) + 1
        if (index > node.src.length) {
          index = 0
        }
        if (index < node.src.length) {
          this.$set(this.ctrl, i, index)
          return
        }
      } else if (node.name === 'img') {
        // #ifdef H5 && VUE3
        if (this.opts[0] && !this.ctrl.load) return
        // #endif
        // æ˜¾ç¤ºé”™è¯¯å ä½å›¾
        if (this.opts[2]) {
          this.$set(this.ctrl, i, -1)
        }
        this.checkReady()
      }
      if (this.root) {
        this.root.$emit('error', {
          source: node.name,
          attrs: node.attrs,
          // #ifndef H5 && VUE3
          errMsg: e.detail.errMsg
          // #endif
        })
      }
    }
  }
}
</script>
<style>
/* a æ ‡ç­¾é»˜è®¤æ•ˆæžœ */
._a {
  padding: 1.5px 0 1.5px 0;
  color: #366092;
  word-break: break-all;
}
/* a æ ‡ç­¾ç‚¹å‡»æ€æ•ˆæžœ */
._hover {
  text-decoration: underline;
  opacity: 0.7;
}
/* å›¾ç‰‡é»˜è®¤æ•ˆæžœ */
._img {
  max-width: 100%;
  -webkit-touch-callout: none;
}
/* å†…部样式 */
._block {
  display: block;
}
._b,
._strong {
  font-weight: bold;
}
._code {
  font-family: monospace;
}
._del {
  text-decoration: line-through;
}
._em,
._i {
  font-style: italic;
}
._h1 {
  font-size: 2em;
}
._h2 {
  font-size: 1.5em;
}
._h3 {
  font-size: 1.17em;
}
._h5 {
  font-size: 0.83em;
}
._h6 {
  font-size: 0.67em;
}
._h1,
._h2,
._h3,
._h4,
._h5,
._h6 {
  display: block;
  font-weight: bold;
}
._image {
  height: 1px;
}
._ins {
  text-decoration: underline;
}
._li {
  display: list-item;
}
._ol {
  list-style-type: decimal;
}
._ol,
._ul {
  display: block;
  padding-left: 40px;
  margin: 1em 0;
}
._q::before {
  content: '"';
}
._q::after {
  content: '"';
}
._sub {
  font-size: smaller;
  vertical-align: sub;
}
._sup {
  font-size: smaller;
  vertical-align: super;
}
._thead,
._tbody,
._tfoot {
  display: table-row-group;
}
._tr {
  display: table-row;
}
._td,
._th {
  display: table-cell;
  vertical-align: middle;
}
._th {
  font-weight: bold;
  text-align: center;
}
._ul {
  list-style-type: disc;
}
._ul ._ul {
  margin: 0;
  list-style-type: circle;
}
._ul ._ul ._ul {
  list-style-type: square;
}
._abbr,
._b,
._code,
._del,
._em,
._i,
._ins,
._label,
._q,
._span,
._strong,
._sub,
._sup {
  display: inline;
}
/* #ifdef APP-PLUS */
._video {
  width: 300px;
  height: 225px;
}
/* #endif */
</style>
node_modules/mp-html/dist/uni-app/components/mp-html/parser.js
New file
@@ -0,0 +1,1400 @@
/**
 * @fileoverview html è§£æžå™¨
 */
// é…ç½®
const config = {
  // ä¿¡ä»»çš„æ ‡ç­¾ï¼ˆä¿æŒæ ‡ç­¾åä¸å˜ï¼‰
  trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
  // å—级标签(转为 div,其他的非信任标签转为 span)
  blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  // #ifdef (MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE3
  // è¡Œå†…标签
  inlineTags: makeMap('abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup'),
  // #endif
  // è¦ç§»é™¤çš„æ ‡ç­¾
  ignoreTags: makeMap('area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr'),
  // è‡ªé—­åˆçš„æ ‡ç­¾
  voidTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  // html å®žä½“
  entities: {
    lt: '<',
    gt: '>',
    quot: '"',
    apos: "'",
    ensp: '\u2002',
    emsp: '\u2003',
    nbsp: '\xA0',
    semi: ';',
    ndash: '–',
    mdash: '—',
    middot: '·',
    lsquo: '‘',
    rsquo: '’',
    ldquo: '“',
    rdquo: '”',
    bull: '•',
    hellip: '…',
    larr: '←',
    uarr: '↑',
    rarr: '→',
    darr: '↓'
  },
  // é»˜è®¤çš„æ ‡ç­¾æ ·å¼
  tagStyle: {
    // #ifndef APP-PLUS-NVUE
    address: 'font-style:italic',
    big: 'display:inline;font-size:1.2em',
    caption: 'display:table-caption;text-align:center',
    center: 'text-align:center',
    cite: 'font-style:italic',
    dd: 'margin-left:40px',
    mark: 'background-color:yellow',
    pre: 'font-family:monospace;white-space:pre',
    s: 'text-decoration:line-through',
    small: 'display:inline;font-size:0.8em',
    strike: 'text-decoration:line-through',
    u: 'text-decoration:underline'
    // #endif
  },
  // svg å¤§å°å†™å¯¹ç…§è¡¨
  svgDict: {
    animatetransform: 'animateTransform',
    lineargradient: 'linearGradient',
    viewbox: 'viewBox',
    attributename: 'attributeName',
    repeatcount: 'repeatCount',
    repeatdur: 'repeatDur',
    foreignobject: 'foreignObject'
  }
}
const tagSelector={}
let windowWidth, system
// #ifdef MP-WEIXIN
if (uni.canIUse('getWindowInfo')) {
  windowWidth = uni.getWindowInfo().windowWidth
  system = uni.getDeviceInfo().system
} else {
// #endif
  const systemInfo = uni.getSystemInfoSync()
  windowWidth = systemInfo.windowWidth
  // #ifdef MP-WEIXIN
  system = systemInfo.system
}
// #endif
const blankChar = makeMap(' ,\r,\n,\t,\f')
let idIndex = 0
// #ifdef H5 || APP-PLUS
config.ignoreTags.iframe = undefined
config.trustTags.iframe = true
config.ignoreTags.embed = undefined
config.trustTags.embed = true
// #endif
// #ifdef APP-PLUS-NVUE
config.ignoreTags.source = undefined
config.ignoreTags.style = undefined
// #endif
/**
 * @description åˆ›å»º map
 * @param {String} str é€—号分隔
 */
function makeMap (str) {
  const map = Object.create(null)
  const list = str.split(',')
  for (let i = list.length; i--;) {
    map[list[i]] = true
  }
  return map
}
/**
 * @description è§£ç  html å®žä½“
 * @param {String} str è¦è§£ç çš„字符串
 * @param {Boolean} amp è¦ä¸è¦è§£ç  &amp;
 * @returns {String} è§£ç åŽçš„字符串
 */
function decodeEntity (str, amp) {
  let i = str.indexOf('&')
  while (i !== -1) {
    const j = str.indexOf(';', i + 3)
    let code
    if (j === -1) break
    if (str[i + 1] === '#') {
      // &#123; å½¢å¼çš„实体
      code = parseInt((str[i + 2] === 'x' ? '0' : '') + str.substring(i + 2, j))
      if (!isNaN(code)) {
        str = str.substr(0, i) + String.fromCharCode(code) + str.substr(j + 1)
      }
    } else {
      // &nbsp; å½¢å¼çš„实体
      code = str.substring(i + 1, j)
      if (config.entities[code] || (code === 'amp' && amp)) {
        str = str.substr(0, i) + (config.entities[code] || '&') + str.substr(j + 1)
      }
    }
    i = str.indexOf('&', i + 1)
  }
  return str
}
/**
 * @description åˆå¹¶å¤šä¸ªå—级标签,加快长内容渲染
 * @param {Array} nodes è¦åˆå¹¶çš„æ ‡ç­¾æ•°ç»„
 */
function mergeNodes (nodes) {
  let i = nodes.length - 1
  for (let j = i; j >= -1; j--) {
    if (j === -1 || nodes[j].c || !nodes[j].name || (nodes[j].name !== 'div' && nodes[j].name !== 'p' && nodes[j].name[0] !== 'h') || (nodes[j].attrs.style || '').includes('inline')) {
      if (i - j >= 5) {
        nodes.splice(j + 1, i - j, {
          name: 'div',
          attrs: {},
          children: nodes.slice(j + 1, i + 1)
        })
      }
      i = j - 1
    }
  }
}
/**
 * @description html è§£æžå™¨
 * @param {Object} vm ç»„件实例
 */
function Parser (vm) {
  this.options = vm || {}
  this.tagStyle = Object.assign({}, config.tagStyle, this.options.tagStyle)
  this.imgList = vm.imgList || []
  this.imgList._unloadimgs = 0
  this.plugins = vm.plugins || []
  this.attrs = Object.create(null)
  this.stack = []
  this.nodes = []
  this.pre = (this.options.containerStyle || '').includes('white-space') && this.options.containerStyle.includes('pre') ? 2 : 0
}
/**
 * @description æ‰§è¡Œè§£æž
 * @param {String} content è¦è§£æžçš„æ–‡æœ¬
 */
Parser.prototype.parse = function (content) {
  // æ’件处理
  for (let i = this.plugins.length; i--;) {
    if (this.plugins[i].onUpdate) {
      content = this.plugins[i].onUpdate(content, config) || content
    }
  }
  new Lexer(this).parse(content)
  // å‡ºæ ˆæœªé—­åˆçš„æ ‡ç­¾
  while (this.stack.length) {
    this.popNode()
  }
  if (this.nodes.length > 50) {
    mergeNodes(this.nodes)
  }
  return this.nodes
}
/**
 * @description å°†æ ‡ç­¾æš´éœ²å‡ºæ¥ï¼ˆä¸è¢« rich-text åŒ…含)
 */
Parser.prototype.expose = function () {
  // #ifndef APP-PLUS-NVUE
  for (let i = this.stack.length; i--;) {
    const item = this.stack[i]
    if (item.c || item.name === 'a' || item.name === 'video' || item.name === 'audio') return
    item.c = 1
  }
  // #endif
}
/**
 * @description å¤„理插件
 * @param {Object} node è¦å¤„理的标签
 * @returns {Boolean} æ˜¯å¦è¦ç§»é™¤æ­¤æ ‡ç­¾
 */
Parser.prototype.hook = function (node) {
  for (let i = this.plugins.length; i--;) {
    if (this.plugins[i].onParse && this.plugins[i].onParse(node, this) === false) {
      return false
    }
  }
  return true
}
/**
 * @description å°†é“¾æŽ¥æ‹¼æŽ¥ä¸Šä¸»åŸŸå
 * @param {String} url éœ€è¦æ‹¼æŽ¥çš„链接
 * @returns {String} æ‹¼æŽ¥åŽçš„链接
 */
Parser.prototype.getUrl = function (url) {
  const domain = this.options.domain
  if (url[0] === '/') {
    if (url[1] === '/') {
      // // å¼€å¤´çš„补充协议名
      url = (domain ? domain.split('://')[0] : 'http') + ':' + url
    } else if (domain) {
      // å¦åˆ™è¡¥å……整个域名
      url = domain + url
    } /* #ifdef APP-PLUS */ else {
      url = plus.io.convertLocalFileSystemURL(url)
    } /* #endif */
  } else if (!url.includes('data:') && !url.includes('://')) {
    if (domain) {
      url = domain + '/' + url
    } /* #ifdef APP-PLUS */ else {
      url = plus.io.convertLocalFileSystemURL(url)
    } /* #endif */
  }
  return url
}
/**
 * @description è§£æžæ ·å¼è¡¨
 * @param {Object} node æ ‡ç­¾
 * @returns {Object}
 */
Parser.prototype.parseStyle = function (node) {
  const attrs = node.attrs
  const list = (this.tagStyle[node.name] || '').split(';').concat((attrs.style || '').split(';'))
  const styleObj = {}
  let tmp = ''
  if (attrs.id && !this.xml) {
    // æš´éœ²é”šç‚¹
    if (this.options.useAnchor) {
      this.expose()
    } else if (node.name !== 'img' && node.name !== 'a' && node.name !== 'video' && node.name !== 'audio') {
      attrs.id = undefined
    }
  }
  // è½¬æ¢ width å’Œ height å±žæ€§
  if (attrs.width) {
    styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px')
    attrs.width = undefined
  }
  if (attrs.height) {
    styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px')
    attrs.height = undefined
  }
  for (let i = 0, len = list.length; i < len; i++) {
    const info = list[i].split(':')
    if (info.length < 2) continue
    const key = info.shift().trim().toLowerCase()
    let value = info.join(':').trim()
    if ((value[0] === '-' && value.lastIndexOf('-') > 0) || value.includes('safe')) {
      // å…¼å®¹æ€§çš„ css ä¸åŽ‹ç¼©
      tmp += `;${key}:${value}`
    } else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import')) {
      // é‡å¤çš„æ ·å¼è¿›è¡Œè¦†ç›–
      if (value.includes('url')) {
        // å¡«å……链接
        let j = value.indexOf('(') + 1
        if (j) {
          while (value[j] === '"' || value[j] === "'" || blankChar[value[j]]) {
            j++
          }
          value = value.substr(0, j) + this.getUrl(value.substr(j))
        }
      } else if (value.includes('rpx')) {
        // è½¬æ¢ rpx(rich-text å†…部不支持 rpx)
        value = value.replace(/[0-9.]+\s*rpx/g, $ => parseFloat($) * windowWidth / 750 + 'px')
      }
      styleObj[key] = value
    }
  }
  node.attrs.style = tmp
  return styleObj
}
/**
 * @description è§£æžåˆ°æ ‡ç­¾å
 * @param {String} name æ ‡ç­¾å
 * @private
 */
Parser.prototype.onTagName = function (name) {
  this.tagName = this.xml ? name : name.toLowerCase()
  if (this.tagName === 'svg') {
    this.xml = (this.xml || 0) + 1 // svg æ ‡ç­¾å†…大小写敏感
    config.ignoreTags.style = undefined // svg æ ‡ç­¾å†… style å¯ç”¨
  }
}
/**
 * @description è§£æžåˆ°å±žæ€§å
 * @param {String} name å±žæ€§å
 * @private
 */
Parser.prototype.onAttrName = function (name) {
  name = this.xml ? name : name.toLowerCase()
  // #ifdef (VUE3 && (H5 || APP-PLUS)) || APP-PLUS-NVUE
  if (name.includes('?') || name.includes(';')) {
    this.attrName = undefined
    return
  }
  // #endif
  if (name.substr(0, 5) === 'data-') {
    if (name === 'data-src' && !this.attrs.src) {
      // data-src è‡ªåŠ¨è½¬ä¸º src
      this.attrName = 'src'
    } else if (this.tagName === 'img' || this.tagName === 'a') {
      // a å’Œ img æ ‡ç­¾ä¿ç•™ data- çš„属性,可以在 imgtap å’Œ linktap äº‹ä»¶ä¸­ä½¿ç”¨
      this.attrName = name
    } else {
      // å‰©ä½™çš„移除以减小大小
      this.attrName = undefined
    }
  } else {
    this.attrName = name
    this.attrs[name] = 'T' // boolean åž‹å±žæ€§ç¼ºçœè®¾ç½®
  }
}
/**
 * @description è§£æžåˆ°å±žæ€§å€¼
 * @param {String} val å±žæ€§å€¼
 * @private
 */
Parser.prototype.onAttrVal = function (val) {
  const name = this.attrName || ''
  if (name === 'style' || name === 'href') {
    // éƒ¨åˆ†å±žæ€§è¿›è¡Œå®žä½“解码
    this.attrs[name] = decodeEntity(val, true)
  } else if (name.includes('src')) {
    // æ‹¼æŽ¥ä¸»åŸŸå
    this.attrs[name] = this.getUrl(decodeEntity(val, true))
  } else if (name) {
    this.attrs[name] = val
  }
}
/**
 * @description è§£æžåˆ°æ ‡ç­¾å¼€å§‹
 * @param {Boolean} selfClose æ˜¯å¦æœ‰è‡ªé—­åˆæ ‡è¯† />
 * @private
 */
Parser.prototype.onOpenTag = function (selfClose) {
  // æ‹¼è£… node
  const node = Object.create(null)
  node.name = this.tagName
  node.attrs = this.attrs
  // é¿å…å› ä¸ºè‡ªåЍ diff ä½¿å¾— type è¢«è®¾ç½®ä¸º null å¯¼è‡´éƒ¨åˆ†å†…容不显示
  if (this.options.nodes.length) {
    node.type = 'node'
  }
  this.attrs = Object.create(null)
  const attrs = node.attrs
  const parent = this.stack[this.stack.length - 1]
  const siblings = parent ? parent.children : this.nodes
  const close = this.xml ? selfClose : config.voidTags[node.name]
  // æ›¿æ¢æ ‡ç­¾åé€‰æ‹©å™¨
  if (tagSelector[node.name]) {
    attrs.class = tagSelector[node.name] + (attrs.class ? ' ' + attrs.class : '')
  }
  // è½¬æ¢ embed æ ‡ç­¾
  if (node.name === 'embed') {
    // #ifndef H5 || APP-PLUS
    const src = attrs.src || ''
    // æŒ‰ç…§åŽç¼€åå’Œ type å°† embed è½¬ä¸º video æˆ– audio
    if (src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8') || (attrs.type || '').includes('video')) {
      node.name = 'video'
    } else if (src.includes('.mp3') || src.includes('.wav') || src.includes('.aac') || src.includes('.m4a') || (attrs.type || '').includes('audio')) {
      node.name = 'audio'
    }
    if (attrs.autostart) {
      attrs.autoplay = 'T'
    }
    attrs.controls = 'T'
    // #endif
    // #ifdef H5 || APP-PLUS
    this.expose()
    // #endif
  }
  // #ifndef APP-PLUS-NVUE
  // å¤„理音视频
  if (node.name === 'video' || node.name === 'audio') {
    // è®¾ç½® id ä»¥ä¾¿èŽ·å– context
    if (node.name === 'video' && !attrs.id) {
      attrs.id = 'v' + idIndex++
    }
    // æ²¡æœ‰è®¾ç½® controls ä¹Ÿæ²¡æœ‰è®¾ç½® autoplay çš„自动设置 controls
    if (!attrs.controls && !attrs.autoplay) {
      attrs.controls = 'T'
    }
    // ç”¨æ•°ç»„存储所有可用的 source
    node.src = []
    if (attrs.src) {
      node.src.push(attrs.src)
      attrs.src = undefined
    }
    this.expose()
  }
  // #endif
  // å¤„理自闭合标签
  if (close) {
    if (!this.hook(node) || config.ignoreTags[node.name]) {
      // é€šè¿‡ base æ ‡ç­¾è®¾ç½®ä¸»åŸŸå
      if (node.name === 'base' && !this.options.domain) {
        this.options.domain = attrs.href
      } /* #ifndef APP-PLUS-NVUE */ else if (node.name === 'source' && parent && (parent.name === 'video' || parent.name === 'audio') && attrs.src) {
        // è®¾ç½® source æ ‡ç­¾ï¼ˆä»…父节点为 video æˆ– audio æ—¶æœ‰æ•ˆï¼‰
        parent.src.push(attrs.src)
      } /* #endif */
      return
    }
    // è§£æž style
    const styleObj = this.parseStyle(node)
    // å¤„理图片
    if (node.name === 'img') {
      if (attrs.src) {
        // æ ‡è®° webp
        if (attrs.src.includes('webp')) {
          node.webp = 'T'
        }
        // data url å›¾ç‰‡å¦‚果没有设置 original-src é»˜è®¤ä¸ºä¸å¯é¢„览的小图片
        if (attrs.src.includes('data:') && this.options.previewImg !== 'all' && !attrs['original-src']) {
          attrs.ignore = 'T'
        }
        if (!attrs.ignore || node.webp || attrs.src.includes('cloud://')) {
          for (let i = this.stack.length; i--;) {
            const item = this.stack[i]
            if (item.name === 'a') {
              node.a = item.attrs
            }
            if (item.name === 'table' && !node.webp && !attrs.src.includes('cloud://')) {
              if (!styleObj.display || styleObj.display.includes('inline')) {
                node.t = 'inline-block'
              } else {
                node.t = styleObj.display
              }
              styleObj.display = undefined
            }
            // #ifndef H5 || APP-PLUS
            const style = item.attrs.style || ''
            if (style.includes('flex:') && !style.includes('flex:0') && !style.includes('flex: 0') && (!styleObj.width || parseInt(styleObj.width) > 100)) {
              styleObj.width = '100% !important'
              styleObj.height = ''
              for (let j = i + 1; j < this.stack.length; j++) {
                this.stack[j].attrs.style = (this.stack[j].attrs.style || '').replace('inline-', '')
              }
            } else if (style.includes('flex') && styleObj.width === '100%') {
              for (let j = i + 1; j < this.stack.length; j++) {
                const style = this.stack[j].attrs.style || ''
                if (!style.includes(';width') && !style.includes(' width') && style.indexOf('width') !== 0) {
                  styleObj.width = ''
                  break
                }
              }
            } else if (style.includes('inline-block')) {
              if (styleObj.width && styleObj.width[styleObj.width.length - 1] === '%') {
                item.attrs.style += ';max-width:' + styleObj.width
                styleObj.width = ''
              } else {
                item.attrs.style += ';max-width:100%'
              }
            }
            // #endif
            item.c = 1
          }
          attrs.i = this.imgList.length.toString()
          let src = attrs['original-src'] || attrs.src
          // #ifndef H5 || MP-ALIPAY || APP-PLUS || MP-360
          if (this.imgList.includes(src)) {
            // å¦‚果有重复的链接则对域名进行随机大小写变换避免预览时错位
            let i = src.indexOf('://')
            if (i !== -1) {
              i += 3
              let newSrc = src.substr(0, i)
              for (; i < src.length; i++) {
                if (src[i] === '/') break
                newSrc += Math.random() > 0.5 ? src[i].toUpperCase() : src[i]
              }
              newSrc += src.substr(i)
              src = newSrc
            }
          }
          // #endif
          this.imgList.push(src)
          if (!node.t) {
            this.imgList._unloadimgs += 1
          }
          // #ifdef H5 || APP-PLUS
          if (this.options.lazyLoad) {
            attrs['data-src'] = attrs.src
            attrs.src = undefined
          }
          // #endif
        }
      }
      if (styleObj.display === 'inline') {
        styleObj.display = ''
      }
      // #ifndef APP-PLUS-NVUE
      if (attrs.ignore) {
        styleObj['max-width'] = styleObj['max-width'] || '100%'
        attrs.style += ';-webkit-touch-callout:none'
      }
      // #endif
      // è®¾ç½®çš„宽度超出屏幕,为避免变形,高度转为自动
      if (parseInt(styleObj.width) > windowWidth) {
        styleObj.height = undefined
      }
      // è®°å½•是否设置了宽高
      if (!isNaN(parseInt(styleObj.width))) {
        node.w = 'T'
      }
      if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes('%') || (parent && (parent.attrs.style || '').includes('height')))) {
        node.h = 'T'
      }
      if (node.w && node.h && styleObj['object-fit']) {
        if (styleObj['object-fit'] === 'contain') {
          node.m = 'aspectFit'
        } else if (styleObj['object-fit'] === 'cover') {
          node.m = 'aspectFill'
        }
      }
    } else if (node.name === 'svg') {
      siblings.push(node)
      this.stack.push(node)
      this.popNode()
      return
    }
    for (const key in styleObj) {
      if (styleObj[key]) {
        attrs.style += `;${key}:${styleObj[key].replace(' !important', '')}`
      }
    }
    attrs.style = attrs.style.substr(1) || undefined
    // #ifdef (MP-WEIXIN || MP-QQ) && VUE3
    if (!attrs.style) {
      delete attrs.style
    }
    // #endif
  } else {
    if ((node.name === 'pre' || ((attrs.style || '').includes('white-space') && attrs.style.includes('pre'))) && this.pre !== 2) {
      this.pre = node.pre = 1
    }
    node.children = []
    this.stack.push(node)
  }
  // åŠ å…¥èŠ‚ç‚¹æ ‘
  siblings.push(node)
}
/**
 * @description è§£æžåˆ°æ ‡ç­¾ç»“束
 * @param {String} name æ ‡ç­¾å
 * @private
 */
Parser.prototype.onCloseTag = function (name) {
  // ä¾æ¬¡å‡ºæ ˆåˆ°åŒ¹é…ä¸ºæ­¢
  name = this.xml ? name : name.toLowerCase()
  let i
  for (i = this.stack.length; i--;) {
    if (this.stack[i].name === name) break
  }
  if (i !== -1) {
    while (this.stack.length > i) {
      this.popNode()
    }
  } else if (name === 'p' || name === 'br') {
    const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes
    siblings.push({
      name,
      attrs: {
        class: tagSelector[name] || '',
        style: this.tagStyle[name] || ''
      }
    })
  }
}
/**
 * @description å¤„理标签出栈
 * @private
 */
Parser.prototype.popNode = function () {
  const node = this.stack.pop()
  let attrs = node.attrs
  const children = node.children
  const parent = this.stack[this.stack.length - 1]
  const siblings = parent ? parent.children : this.nodes
  if (!this.hook(node) || config.ignoreTags[node.name]) {
    // èŽ·å–æ ‡é¢˜
    if (node.name === 'title' && children.length && children[0].type === 'text' && this.options.setTitle) {
      uni.setNavigationBarTitle({
        title: children[0].text
      })
    }
    siblings.pop()
    return
  }
  if (node.pre && this.pre !== 2) {
    // æ˜¯å¦åˆå¹¶ç©ºç™½ç¬¦æ ‡è¯†
    this.pre = node.pre = undefined
    for (let i = this.stack.length; i--;) {
      if (this.stack[i].pre) {
        this.pre = 1
      }
    }
  }
  const styleObj = {}
  // è½¬æ¢ svg
  if (node.name === 'svg') {
    if (this.xml > 1) {
      // å¤šå±‚ svg åµŒå¥—
      this.xml--
      return
    }
    // #ifdef APP-PLUS-NVUE
    (function traversal (node) {
      if (node.name) {
        // è°ƒæ•´ svg çš„大小写
        node.name = config.svgDict[node.name] || node.name
        for (const item in node.attrs) {
          if (config.svgDict[item]) {
            node.attrs[config.svgDict[item]] = node.attrs[item]
            node.attrs[item] = undefined
          }
        }
        for (let i = 0; i < (node.children || []).length; i++) {
          traversal(node.children[i])
        }
      }
    })(node)
    // #endif
    // #ifndef APP-PLUS-NVUE
    let src = ''
    const style = attrs.style
    attrs.style = ''
    attrs.xmlns = 'http://www.w3.org/2000/svg';
    (function traversal (node) {
      if (node.type === 'text') {
        src += node.text
        return
      }
      const name = config.svgDict[node.name] || node.name
      if (name === 'foreignObject') {
        for (const child of (node.children || [])) {
          if (child.attrs && !child.attrs.xmlns) {
            child.attrs.xmlns = 'http://www.w3.org/1999/xhtml'
            break
          }
        }
      }
      src += '<' + name
      for (const item in node.attrs) {
        const val = node.attrs[item]
        if (val) {
          src += ` ${config.svgDict[item] || item}="${val.replace(/"/g, '')}"`
        }
      }
      if (!node.children) {
        src += '/>'
      } else {
        src += '>'
        for (let i = 0; i < node.children.length; i++) {
          traversal(node.children[i])
        }
        src += '</' + name + '>'
      }
    })(node)
    node.name = 'img'
    node.attrs = {
      src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
      style,
      ignore: 'T'
    }
    node.children = undefined
    // #endif
    this.xml = false
    config.ignoreTags.style = true
    return
  }
  // #ifndef APP-PLUS-NVUE
  // è½¬æ¢ align å±žæ€§
  if (attrs.align) {
    if (node.name === 'table') {
      if (attrs.align === 'center') {
        styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto'
      } else {
        styleObj.float = attrs.align
      }
    } else {
      styleObj['text-align'] = attrs.align
    }
    attrs.align = undefined
  }
  // è½¬æ¢ dir å±žæ€§
  if (attrs.dir) {
    styleObj.direction = attrs.dir
    attrs.dir = undefined
  }
  // è½¬æ¢ font æ ‡ç­¾çš„属性
  if (node.name === 'font') {
    if (attrs.color) {
      styleObj.color = attrs.color
      attrs.color = undefined
    }
    if (attrs.face) {
      styleObj['font-family'] = attrs.face
      attrs.face = undefined
    }
    if (attrs.size) {
      let size = parseInt(attrs.size)
      if (!isNaN(size)) {
        if (size < 1) {
          size = 1
        } else if (size > 7) {
          size = 7
        }
        styleObj['font-size'] = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', 'xxx-large'][size - 1]
      }
      attrs.size = undefined
    }
  }
  // #endif
  // ä¸€äº›ç¼–辑器的自带 class
  if ((attrs.class || '').includes('align-center')) {
    styleObj['text-align'] = 'center'
  }
  Object.assign(styleObj, this.parseStyle(node))
  if (node.name !== 'table' && parseInt(styleObj.width) > windowWidth) {
    styleObj['max-width'] = '100%'
    styleObj['box-sizing'] = 'border-box'
  }
  // #ifndef APP-PLUS-NVUE
  if (config.blockTags[node.name]) {
    node.name = 'div'
  } else if (!config.trustTags[node.name] && !this.xml) {
    // æœªçŸ¥æ ‡ç­¾è½¬ä¸º span,避免无法显示
    node.name = 'span'
  }
  if (node.name === 'a' || node.name === 'ad'
    // #ifdef H5 || APP-PLUS
    || node.name === 'iframe' // eslint-disable-line
    // #endif
  ) {
    this.expose()
  } else if (node.name === 'video') {
    if ((styleObj.height || '').includes('auto')) {
      styleObj.height = undefined
    }
    /* #ifdef APP-PLUS */
    let str = '<video style="width:100%;height:100%"'
    for (const item in attrs) {
      if (attrs[item]) {
        str += ' ' + item + '="' + attrs[item] + '"'
      }
    }
    if (this.options.pauseVideo) {
      str += ' onplay="this.dispatchEvent(new CustomEvent(\'vplay\',{bubbles:!0}));for(var e=document.getElementsByTagName(\'video\'),t=0;t<e.length;t++)e[t]!=this&&e[t].pause()"'
    }
    str += '>'
    for (let i = 0; i < node.src.length; i++) {
      str += '<source src="' + node.src[i] + '">'
    }
    str += '</video>'
    node.html = str
    /* #endif */
  } else if ((node.name === 'ul' || node.name === 'ol') && node.c) {
    // åˆ—表处理
    const types = {
      a: 'lower-alpha',
      A: 'upper-alpha',
      i: 'lower-roman',
      I: 'upper-roman'
    }
    if (types[attrs.type]) {
      attrs.style += ';list-style-type:' + types[attrs.type]
      attrs.type = undefined
    }
    for (let i = children.length; i--;) {
      if (children[i].name === 'li') {
        children[i].c = 1
      }
    }
  } else if (node.name === 'table') {
    // è¡¨æ ¼å¤„理
    // cellpadding、cellspacing、border è¿™å‡ ä¸ªå¸¸ç”¨è¡¨æ ¼å±žæ€§éœ€è¦é€šè¿‡è½¬æ¢å®žçް
    let padding = parseFloat(attrs.cellpadding)
    let spacing = parseFloat(attrs.cellspacing)
    const border = parseFloat(attrs.border)
    const bordercolor = styleObj['border-color']
    const borderstyle = styleObj['border-style']
    if (node.c) {
      // padding å’Œ spacing é»˜è®¤ 2
      if (isNaN(padding)) {
        padding = 2
      }
      if (isNaN(spacing)) {
        spacing = 2
      }
    }
    if (border) {
      attrs.style += `;border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'}`
    }
    if (node.flag && node.c) {
      // æœ‰ colspan æˆ– rowspan ä¸”含有链接的表格通过 grid å¸ƒå±€å®žçް
      styleObj.display = 'grid'
      if (styleObj['border-collapse'] === 'collapse') {
        styleObj['border-collapse'] = undefined
        spacing = 0
      }
      if (spacing) {
        styleObj['grid-gap'] = spacing + 'px'
        styleObj.padding = spacing + 'px'
      } else if (border) {
        // æ— é—´éš”的情况下避免边框重叠
        attrs.style += ';border-left:0;border-top:0'
      }
      const width = [] // è¡¨æ ¼çš„列宽
      const trList = [] // tr åˆ—表
      const cells = [] // ä¿å­˜æ–°çš„单元格
      const map = {}; // è¢«åˆå¹¶å•元格占用的格子
      (function traversal (nodes) {
        for (let i = 0; i < nodes.length; i++) {
          if (nodes[i].name === 'tr') {
            trList.push(nodes[i])
          } else if (nodes[i].name === 'colgroup') {
            let colI = 1
            for (const col of (nodes[i].children || [])) {
              if (col.name === 'col') {
                const style = col.attrs.style || ''
                const start = style.indexOf('width') ? style.indexOf(';width') : 0
                // æå–出宽度
                if (start !== -1) {
                  let end = style.indexOf(';', start + 6)
                  if (end === -1) {
                    end = style.length
                  }
                  width[colI] = style.substring(start ? start + 7 : 6, end)
                }
                colI += 1
              }
            }
          } else {
            traversal(nodes[i].children || [])
          }
        }
      })(children)
      for (let row = 1; row <= trList.length; row++) {
        let col = 1
        for (let j = 0; j < trList[row - 1].children.length; j++) {
          const td = trList[row - 1].children[j]
          if (td.name === 'td' || td.name === 'th') {
            // è¿™ä¸ªæ ¼å­è¢«ä¸Šé¢çš„单元格占用,则列号++
            while (map[row + '.' + col]) {
              col++
            }
            let style = td.attrs.style || ''
            let start = style.indexOf('width') ? style.indexOf(';width') : 0
            // æå–出 td çš„宽度
            if (start !== -1) {
              let end = style.indexOf(';', start + 6)
              if (end === -1) {
                end = style.length
              }
              if (!td.attrs.colspan) {
                width[col] = style.substring(start ? start + 7 : 6, end)
              }
              style = style.substr(0, start) + style.substr(end)
            }
            // è®¾ç½®ç«–直对齐
            style += ';display:flex'
            start = style.indexOf('vertical-align')
            if (start !== -1) {
              const val = style.substr(start + 15, 10)
              if (val.includes('middle')) {
                style += ';align-items:center'
              } else if (val.includes('bottom')) {
                style += ';align-items:flex-end'
              }
            } else {
              style += ';align-items:center'
            }
            // è®¾ç½®æ°´å¹³å¯¹é½
            start = style.indexOf('text-align')
            if (start !== -1) {
              const val = style.substr(start + 11, 10)
              if (val.includes('center')) {
                style += ';justify-content: center'
              } else if (val.includes('right')) {
                style += ';justify-content: right'
              }
            }
            style = (border ? `;border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'}` + (spacing ? '' : ';border-right:0;border-bottom:0') : '') + (padding ? `;padding:${padding}px` : '') + ';' + style
            // å¤„理列合并
            if (td.attrs.colspan) {
              style += `;grid-column-start:${col};grid-column-end:${col + parseInt(td.attrs.colspan)}`
              if (!td.attrs.rowspan) {
                style += `;grid-row-start:${row};grid-row-end:${row + 1}`
              }
              col += parseInt(td.attrs.colspan) - 1
            }
            // å¤„理行合并
            if (td.attrs.rowspan) {
              style += `;grid-row-start:${row};grid-row-end:${row + parseInt(td.attrs.rowspan)}`
              if (!td.attrs.colspan) {
                style += `;grid-column-start:${col};grid-column-end:${col + 1}`
              }
              // è®°å½•下方单元格被占用
              for (let rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) {
                for (let colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) {
                  map[(row + rowspan) + '.' + (col - colspan)] = 1
                }
              }
            }
            if (style) {
              td.attrs.style = style
            }
            cells.push(td)
            col++
          }
        }
        if (row === 1) {
          let temp = ''
          for (let i = 1; i < col; i++) {
            temp += (width[i] ? width[i] : 'auto') + ' '
          }
          styleObj['grid-template-columns'] = temp
        }
      }
      node.children = cells
    } else {
      // æ²¡æœ‰ä½¿ç”¨åˆå¹¶å•元格的表格通过 table å¸ƒå±€å®žçް
      if (node.c) {
        styleObj.display = 'table'
      }
      if (!isNaN(spacing)) {
        styleObj['border-spacing'] = spacing + 'px'
      }
      if (border || padding) {
        // éåކ
        (function traversal (nodes) {
          for (let i = 0; i < nodes.length; i++) {
            const td = nodes[i]
            if (td.name === 'th' || td.name === 'td') {
              if (border) {
                td.attrs.style = `border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'};${td.attrs.style || ''}`
              }
              if (padding) {
                td.attrs.style = `padding:${padding}px;${td.attrs.style || ''}`
              }
            } else if (td.children) {
              traversal(td.children)
            }
          }
        })(children)
      }
    }
    // ç»™è¡¨æ ¼æ·»åŠ ä¸€ä¸ªå•ç‹¬çš„æ¨ªå‘æ»šåŠ¨å±‚
    if (this.options.scrollTable && !(attrs.style || '').includes('inline')) {
      const table = Object.assign({}, node)
      node.name = 'div'
      node.attrs = {
        style: 'overflow:auto'
      }
      node.children = [table]
      attrs = table.attrs
    }
  } else if ((node.name === 'tbody' || node.name === 'tr') && node.flag && node.c) {
    node.flag = undefined;
    (function traversal (nodes) {
      for (let i = 0; i < nodes.length; i++) {
        if (nodes[i].name === 'td') {
          // é¢œè‰²æ ·å¼è®¾ç½®ç»™å•元格避免丢失
          for (const style of ['color', 'background', 'background-color']) {
            if (styleObj[style]) {
              nodes[i].attrs.style = style + ':' + styleObj[style] + ';' + (nodes[i].attrs.style || '')
            }
          }
        } else {
          traversal(nodes[i].children || [])
        }
      }
    })(children)
  } else if ((node.name === 'td' || node.name === 'th') && (attrs.colspan || attrs.rowspan)) {
    for (let i = this.stack.length; i--;) {
      if (this.stack[i].name === 'table' || this.stack[i].name === 'tbody' || this.stack[i].name === 'tr') {
        this.stack[i].flag = 1 // æŒ‡ç¤ºå«æœ‰åˆå¹¶å•元格
      }
    }
  } else if (node.name === 'ruby') {
    // è½¬æ¢ ruby
    node.name = 'span'
    for (let i = 0; i < children.length - 1; i++) {
      if (children[i].type === 'text' && children[i + 1].name === 'rt') {
        children[i] = {
          name: 'div',
          attrs: {
            style: 'display:inline-block;text-align:center'
          },
          children: [{
            name: 'div',
            attrs: {
              style: 'font-size:50%;' + (children[i + 1].attrs.style || '')
            },
            children: children[i + 1].children
          }, children[i]]
        }
        children.splice(i + 1, 1)
      }
    }
  } else if (node.c) {
    (function traversal (node) {
      node.c = 2
      for (let i = node.children.length; i--;) {
        const child = node.children[i]
        // #ifdef (MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE3
        if (child.name && (config.inlineTags[child.name] || ((child.attrs.style || '').includes('inline') && child.children)) && !child.c) {
          traversal(child)
        }
        // #endif
        if (!child.c || child.name === 'table') {
          node.c = 1
        }
      }
    })(node)
  }
  if ((styleObj.display || '').includes('flex') && !node.c) {
    for (let i = children.length; i--;) {
      const item = children[i]
      if (item.f) {
        item.attrs.style = (item.attrs.style || '') + item.f
        item.f = undefined
      }
    }
  }
  // flex å¸ƒå±€æ—¶éƒ¨åˆ†æ ·å¼éœ€è¦æå–到 rich-text å¤–层
  const flex = parent && ((parent.attrs.style || '').includes('flex') || (parent.attrs.style || '').includes('grid'))
    // #ifdef MP-WEIXIN
    // æ£€æŸ¥åŸºç¡€åº“版本 virtualHost æ˜¯å¦å¯ç”¨
    && !(node.c && wx.getNFCAdapter) // eslint-disable-line
    // #endif
    // #ifndef MP-WEIXIN || MP-QQ || MP-BAIDU || MP-TOUTIAO
    && !node.c // eslint-disable-line
  // #endif
  if (flex) {
    node.f = ';max-width:100%'
  }
  if (children.length >= 50 && node.c && !(styleObj.display || '').includes('flex')) {
    mergeNodes(children)
  }
  // #endif
  for (const key in styleObj) {
    if (styleObj[key]) {
      const val = `;${key}:${styleObj[key].replace(' !important', '')}`
      /* #ifndef APP-PLUS-NVUE */
      if (flex && ((key.includes('flex') && key !== 'flex-direction') || key === 'align-self' || key.includes('grid') || styleObj[key][0] === '-' || (key.includes('width') && val.includes('%')))) {
        node.f += val
        if (key === 'width') {
          attrs.style += ';width:100%'
        }
      } else /* #endif */ {
        attrs.style += val
      }
    }
  }
  attrs.style = attrs.style.substr(1) || undefined
  // #ifdef (MP-WEIXIN || MP-QQ) && VUE3
  for (const key in attrs) {
    if (!attrs[key]) {
      delete attrs[key]
    }
  }
  // #endif
}
/**
 * @description è§£æžåˆ°æ–‡æœ¬
 * @param {String} text æ–‡æœ¬å†…容
 */
Parser.prototype.onText = function (text) {
  if (!this.pre) {
    // åˆå¹¶ç©ºç™½ç¬¦
    let trim = ''
    let flag
    for (let i = 0, len = text.length; i < len; i++) {
      if (!blankChar[text[i]]) {
        trim += text[i]
      } else {
        if (trim[trim.length - 1] !== ' ') {
          trim += ' '
        }
        if (text[i] === '\n' && !flag) {
          flag = true
        }
      }
    }
    // åŽ»é™¤å«æœ‰æ¢è¡Œç¬¦çš„ç©ºä¸²
    if (trim === ' ') {
      if (flag) return
      // #ifdef VUE3
      else {
        const parent = this.stack[this.stack.length - 1]
        if (parent && parent.name[0] === 't') return
      }
      // #endif
    }
    text = trim
  }
  const node = Object.create(null)
  node.type = 'text'
  // #ifdef (MP-BAIDU || MP-ALIPAY || MP-TOUTIAO) && VUE3
  node.attrs = {}
  // #endif
  node.text = decodeEntity(text)
  if (this.hook(node)) {
    // #ifdef MP-WEIXIN
    if (this.options.selectable === 'force' && system.includes('iOS') && !uni.canIUse('rich-text.user-select')) {
      this.expose()
    }
    // #endif
    const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes
    siblings.push(node)
  }
}
/**
 * @description html è¯æ³•分析器
 * @param {Object} handler é«˜å±‚处理器
 */
function Lexer (handler) {
  this.handler = handler
}
/**
 * @description æ‰§è¡Œè§£æž
 * @param {String} content è¦è§£æžçš„æ–‡æœ¬
 */
Lexer.prototype.parse = function (content) {
  this.content = content || ''
  this.i = 0 // æ ‡è®°è§£æžä½ç½®
  this.start = 0 // æ ‡è®°ä¸€ä¸ªå•词的开始位置
  this.state = this.text // å½“前状态
  for (let len = this.content.length; this.i !== -1 && this.i < len;) {
    this.state()
  }
}
/**
 * @description æ£€æŸ¥æ ‡ç­¾æ˜¯å¦é—­åˆ
 * @param {String} method å¦‚果闭合要进行的操作
 * @returns {Boolean} æ˜¯å¦é—­åˆ
 * @private
 */
Lexer.prototype.checkClose = function (method) {
  const selfClose = this.content[this.i] === '/'
  if (this.content[this.i] === '>' || (selfClose && this.content[this.i + 1] === '>')) {
    if (method) {
      this.handler[method](this.content.substring(this.start, this.i))
    }
    this.i += selfClose ? 2 : 1
    this.start = this.i
    this.handler.onOpenTag(selfClose)
    if (this.handler.tagName === 'script') {
      this.i = this.content.indexOf('</', this.i)
      if (this.i !== -1) {
        this.i += 2
        this.start = this.i
      }
      this.state = this.endTag
    } else {
      this.state = this.text
    }
    return true
  }
  return false
}
/**
 * @description æ–‡æœ¬çŠ¶æ€
 * @private
 */
Lexer.prototype.text = function () {
  this.i = this.content.indexOf('<', this.i) // æŸ¥æ‰¾æœ€è¿‘的标签
  if (this.i === -1) {
    // æ²¡æœ‰æ ‡ç­¾äº†
    if (this.start < this.content.length) {
      this.handler.onText(this.content.substring(this.start, this.content.length))
    }
    return
  }
  const c = this.content[this.i + 1]
  if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
    // æ ‡ç­¾å¼€å¤´
    if (this.start !== this.i) {
      this.handler.onText(this.content.substring(this.start, this.i))
    }
    this.start = ++this.i
    this.state = this.tagName
  } else if (c === '/' || c === '!' || c === '?') {
    if (this.start !== this.i) {
      this.handler.onText(this.content.substring(this.start, this.i))
    }
    const next = this.content[this.i + 2]
    if (c === '/' && ((next >= 'a' && next <= 'z') || (next >= 'A' && next <= 'Z'))) {
      // æ ‡ç­¾ç»“å°¾
      this.i += 2
      this.start = this.i
      this.state = this.endTag
      return
    }
    // å¤„理注释
    let end = '-->'
    if (c !== '!' || this.content[this.i + 2] !== '-' || this.content[this.i + 3] !== '-') {
      end = '>'
    }
    this.i = this.content.indexOf(end, this.i)
    if (this.i !== -1) {
      this.i += end.length
      this.start = this.i
    }
  } else {
    this.i++
  }
}
/**
 * @description æ ‡ç­¾åçŠ¶æ€
 * @private
 */
Lexer.prototype.tagName = function () {
  if (blankChar[this.content[this.i]]) {
    // è§£æžåˆ°æ ‡ç­¾å
    this.handler.onTagName(this.content.substring(this.start, this.i))
    while (blankChar[this.content[++this.i]]);
    if (this.i < this.content.length && !this.checkClose()) {
      this.start = this.i
      this.state = this.attrName
    }
  } else if (!this.checkClose('onTagName')) {
    this.i++
  }
}
/**
 * @description å±žæ€§åçŠ¶æ€
 * @private
 */
Lexer.prototype.attrName = function () {
  let c = this.content[this.i]
  if (blankChar[c] || c === '=') {
    // è§£æžåˆ°å±žæ€§å
    this.handler.onAttrName(this.content.substring(this.start, this.i))
    let needVal = c === '='
    const len = this.content.length
    while (++this.i < len) {
      c = this.content[this.i]
      if (!blankChar[c]) {
        if (this.checkClose()) return
        if (needVal) {
          // ç­‰å·åŽé‡åˆ°ç¬¬ä¸€ä¸ªéžç©ºå­—符
          this.start = this.i
          this.state = this.attrVal
          return
        }
        if (this.content[this.i] === '=') {
          needVal = true
        } else {
          this.start = this.i
          this.state = this.attrName
          return
        }
      }
    }
  } else if (!this.checkClose('onAttrName')) {
    this.i++
  }
}
/**
 * @description å±žæ€§å€¼çŠ¶æ€
 * @private
 */
Lexer.prototype.attrVal = function () {
  const c = this.content[this.i]
  const len = this.content.length
  if (c === '"' || c === "'") {
    // æœ‰å†’号的属性
    this.start = ++this.i
    this.i = this.content.indexOf(c, this.i)
    if (this.i === -1) return
    this.handler.onAttrVal(this.content.substring(this.start, this.i))
  } else {
    // æ²¡æœ‰å†’号的属性
    for (; this.i < len; this.i++) {
      if (blankChar[this.content[this.i]]) {
        this.handler.onAttrVal(this.content.substring(this.start, this.i))
        break
      } else if (this.checkClose('onAttrVal')) return
    }
  }
  while (blankChar[this.content[++this.i]]);
  if (this.i < len && !this.checkClose()) {
    this.start = this.i
    this.state = this.attrName
  }
}
/**
 * @description ç»“束标签状态
 * @returns {String} ç»“束的标签名
 * @private
 */
Lexer.prototype.endTag = function () {
  const c = this.content[this.i]
  if (blankChar[c] || c === '>' || c === '/') {
    this.handler.onCloseTag(this.content.substring(this.start, this.i))
    if (c !== '>') {
      this.i = this.content.indexOf('>', this.i)
      if (this.i === -1) return
    }
    this.start = ++this.i
    this.state = this.text
  } else {
    this.i++
  }
}
export default Parser
node_modules/mp-html/dist/uni-app/static/app-plus/mp-html/js/handler.js
New file
@@ -0,0 +1 @@
"use strict";function t(t){for(var e=Object.create(null),n=t.attributes.length;n--;)e[t.attributes[n].name]=t.attributes[n].value;return e}function e(){a[1]&&(this.src=a[1],this.onerror=null),this.onclick=null,this.ontouchstart=null,uni.postMessage({data:{action:"onError",source:"img",attrs:t(this)}})}function n(){window.unloadimgs-=1,0===window.unloadimgs&&uni.postMessage({data:{action:"onReady"}})}function o(r,s,c){for(var d=0;d<r.length;d++)!function(d){var u=r[d],l=void 0;if(u.type&&"node"!==u.type)l=document.createTextNode(u.text.replace(/&amp;/g,"&"));else{var g=u.name;"svg"===g&&(c="http://www.w3.org/2000/svg"),"html"!==g&&"body"!==g||(g="div"),l=c?document.createElementNS(c,g):document.createElement(g);for(var p in u.attrs)l.setAttribute(p,u.attrs[p]);if(u.children&&o(u.children,l,c),"img"===g){if(window.unloadimgs+=1,l.onload=n,l.onerror=n,!l.src&&l.getAttribute("data-src")&&(l.src=l.getAttribute("data-src")),u.attrs.ignore||(l.onclick=function(e){e.stopPropagation(),uni.postMessage({data:{action:"onImgTap",attrs:t(this)}})}),a[2]){var h=new Image;h.src=l.src,l.src=a[2],h.onload=function(){l.src=this.src},h.onerror=function(){l.onerror()}}l.onerror=e}else if("a"===g)l.addEventListener("click",function(e){e.stopPropagation(),e.preventDefault();var n,o=this.getAttribute("href");o&&"#"===o[0]&&(n=(document.getElementById(o.substr(1))||{}).offsetTop),uni.postMessage({data:{action:"onLinkTap",attrs:t(this),offset:n}})},!0);else if("video"===g||"audio"===g)i.push(l),u.attrs.autoplay||u.attrs.controls||l.setAttribute("controls","true"),l.onplay=function(){if(uni.postMessage({data:{action:"onPlay"}}),a[3])for(var t=0;t<i.length;t++)i[t]!==this&&i[t].pause()},l.onerror=function(){uni.postMessage({data:{action:"onError",source:g,attrs:t(this)}})};else if("table"===g&&a[4]&&!l.style.cssText.includes("inline")){var f=document.createElement("div");f.style.overflow="auto",f.appendChild(l),l=f}else"svg"===g&&(c=void 0)}s.appendChild(l)}(d)}document.addEventListener("UniAppJSBridgeReady",function(){document.body.onclick=function(){return uni.postMessage({data:{action:"onClick"}})},uni.postMessage({data:{action:"onJSBridgeReady"}})});var a,i=[];window.setContent=function(t,e,n){var r=document.getElementById("content");e[0]&&(document.body.style.cssText=e[0]),e[5]||(r.style.userSelect="none"),n||(r.innerHTML="",i=[]),a=e,window.unloadimgs=0;var s=document.createDocumentFragment();o(t,s),r.appendChild(s);var c=r.scrollHeight;uni.postMessage({data:{action:"onLoad",height:c}}),window.unloadimgs||uni.postMessage({data:{action:"onReady",height:c}}),clearInterval(window.timer),window.timer=setInterval(function(){r.scrollHeight!==c&&(c=r.scrollHeight,uni.postMessage({data:{action:"onHeightChange",height:c}}))},350)},window.onunload=function(){clearInterval(window.timer)};
node_modules/mp-html/dist/uni-app/static/app-plus/mp-html/js/uni.webview.min.js
New file
@@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).uni=n()}(this,(function(){"use strict";try{var e={};Object.defineProperty(e,"passive",{get:function(){!0}}),window.addEventListener("test-passive",null,e)}catch(e){}var n=Object.prototype.hasOwnProperty;function t(e,t){return n.call(e,t)}var i=[],a=function(e,n){var t={options:{timestamp:+new Date},name:e,arg:n};if(window.__dcloud_weex_postMessage||window.__dcloud_weex_){if("postMessage"===e){var a={data:[n]};return window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessage(a):window.__dcloud_weex_.postMessage(JSON.stringify(a))}var o={type:"WEB_INVOKE_APPSERVICE",args:{data:t,webviewIds:i}};window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessageToService(o):window.__dcloud_weex_.postMessageToService(JSON.stringify(o))}if(!window.plus)return window.parent.postMessage({type:"WEB_INVOKE_APPSERVICE",data:t,pageId:""},"*");if(0===i.length){var r=plus.webview.currentWebview();if(!r)throw new Error("plus.webview.currentWebview() is undefined");var d=r.parent(),s="";s=d?d.id:r.id,i.push(s)}if(plus.webview.getWebviewById("__uniapp__service"))plus.webview.postMessageToUniNView({type:"WEB_INVOKE_APPSERVICE",args:{data:t,webviewIds:i}},"__uniapp__service");else{var w=JSON.stringify(t);plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat("WEB_INVOKE_APPSERVICE",'",').concat(w,",").concat(JSON.stringify(i),");"))}},o={navigateTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;a("navigateTo",{url:encodeURI(n)})},navigateBack:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.delta;a("navigateBack",{delta:parseInt(n)||1})},switchTab:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;a("switchTab",{url:encodeURI(n)})},reLaunch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;a("reLaunch",{url:encodeURI(n)})},redirectTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;a("redirectTo",{url:encodeURI(n)})},getEnv:function(e){window.plus?e({plus:!0}):e({h5:!0})},postMessage:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a("postMessage",e.data||{})}},r=/uni-app/i.test(navigator.userAgent),d=/Html5Plus/i.test(navigator.userAgent),s=/complete|loaded|interactive/;var w=window.my&&navigator.userAgent.indexOf("AlipayClient")>-1;var u=window.swan&&window.swan.webView&&/swan/i.test(navigator.userAgent);var c=window.qq&&window.qq.miniProgram&&/QQ/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var g=window.tt&&window.tt.miniProgram&&/toutiaomicroapp/i.test(navigator.userAgent);var v=window.wx&&window.wx.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var p=window.qa&&/quickapp/i.test(navigator.userAgent);for(var l,_=function(){window.UniAppJSBridge=!0,document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady",{bubbles:!0,cancelable:!0}))},f=[function(e){if(r||d)return window.__dcloud_weex_postMessage||window.__dcloud_weex_?document.addEventListener("DOMContentLoaded",e):window.plus&&s.test(document.readyState)?setTimeout(e,0):document.addEventListener("plusready",e),o},function(e){if(v)return window.WeixinJSBridge&&window.WeixinJSBridge.invoke?setTimeout(e,0):document.addEventListener("WeixinJSBridgeReady",e),window.wx.miniProgram},function(e){if(c)return window.QQJSBridge&&window.QQJSBridge.invoke?setTimeout(e,0):document.addEventListener("QQJSBridgeReady",e),window.qq.miniProgram},function(e){if(w){document.addEventListener("DOMContentLoaded",e);var n=window.my;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){if(u)return document.addEventListener("DOMContentLoaded",e),window.swan.webView},function(e){if(g)return document.addEventListener("DOMContentLoaded",e),window.tt.miniProgram},function(e){if(p){window.QaJSBridge&&window.QaJSBridge.invoke?setTimeout(e,0):document.addEventListener("QaJSBridgeReady",e);var n=window.qa;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){return document.addEventListener("DOMContentLoaded",e),o}],m=0;m<f.length&&!(l=f[m](_));m++);l||(l={});var E="undefined"!=typeof uni?uni:{};if(!E.navigateTo)for(var b in l)t(l,b)&&(E[b]=l[b]);return E.webView=l,E}));
node_modules/mp-html/dist/uni-app/static/app-plus/mp-html/local.html
New file
@@ -0,0 +1 @@
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><style>body,html{width:100%;height:100%;overflow-x:scroll;overflow-y:hidden}body{margin:0}video{width:300px;height:225px}img{max-width:100%;-webkit-touch-callout:none}</style></head><body><div id="content" style="overflow:hidden"></div><script type="text/javascript" src="./js/uni.webview.min.js"></script><script type="text/javascript" src="./js/handler.js"></script></body>
node_modules/mp-html/docs/.nojekyll
node_modules/mp-html/docs/README.md
New file
@@ -0,0 +1,56 @@
# mp-html
> ä¸€ä¸ªå¼ºå¤§çš„小程序富文本组件
![star](https://img.shields.io/github/stars/jin-yufeng/mp-html)
![forks](https://img.shields.io/github/forks/jin-yufeng/mp-html)
[![npm](https://img.shields.io/npm/v/mp-html)](https://www.npmjs.com/package/mp-html)
![downloads](https://img.shields.io/npm/dt/mp-html)
[![Coverage Status](https://coveralls.io/repos/github/jin-yufeng/mp-html/badge.svg?branch=master)](https://coveralls.io/github/jin-yufeng/mp-html?branch=master)
![license](https://img.shields.io/github/license/jin-yufeng/mp-html)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
## ðŸ“¢ æ¦‚况 :id=overview
显示动态 *html* å¯Œæ–‡æœ¬æ˜¯å¾ˆå¤šåº”用必要的需求,小程序平台不支持 *dom* æ“ä½œä½¿å¾—这成为一个难题,其自带的 *rich-text* ç»„件支持的标签少且屏蔽所有事件,难以实际应用。因此就有了这样一个能够便捷的在小程序平台上处理富文本的组件,还支持丰富的扩展功能。
## ðŸ“‹ ç‰¹æ€§ :id=feature
- æ”¯æŒåœ¨å¤šä¸ªä¸»æµçš„小程序平台和 *uni-app* ä¸­ä½¿ç”¨
- æ”¯æŒä¸°å¯Œçš„æ ‡ç­¾ï¼ˆåŒ…括 *table*、*video*、*svg* ç­‰ï¼‰
- æ”¯æŒä¸°å¯Œçš„事件效果(自动预览图片、链接处理等)
- æ”¯æŒè®¾ç½®å ä½å›¾ï¼ˆåŠ è½½ä¸­ã€å‡ºé”™æ—¶ã€é¢„è§ˆæ—¶ï¼‰
- æ”¯æŒé”šç‚¹è·³è½¬ã€é•¿æŒ‰å¤åˆ¶ç­‰ä¸°å¯ŒåŠŸèƒ½
- æ”¯æŒå¤§éƒ¨åˆ† *html* å®žä½“
- ä¸°å¯Œçš„æ’件(关键词搜索、内容编辑、*latex* å…¬å¼ ç­‰ï¼‰
- æ•ˆçŽ‡é«˜ã€å®¹é”™æ€§å¼ºä¸”è½»é‡åŒ–ï¼ˆ*≈25KB*,*9KB gzipped*)
查看 [功能介绍](overview/feature) äº†è§£æ›´å¤š
## ðŸŽ‰ ä½¿ç”¨æ¡ˆä¾‹ :id=case
| [官方示例](https://github.com/jin-yufeng/mp-html-demo) | æ¬¢å–œå•†åŸŽ | å¤šä¹ˆç”Ÿæ´» | é£Ÿæ³•查 | å¾®æ…• | å¤å…¸æ–‡å­¦åè‘—阅读 |
|:---:|:---:|:---:|:---:|:---:|:---:|
| ![富文本插件](assets/case/富文本插件.jpg) | ![欢喜商城](assets/case/欢喜商城.png) | ![多么生活](assets/case/多么生活.jpg) | ![食法查](assets/case/食法查.png) | ![微慕](assets/case/微慕.jpg) | ![古典文学名著阅读](assets/case/古典文学名著阅读.jpg) |
| ç§‘学复习 | [程序员技术之旅](https://github.com/fendoudebb/z-blog-wx) | å…¸å…¸åšå®¢ | ä¼˜ç§€ç¬”è®° | 365 åˆ·é¢˜ | åŒåŸŽå…±äº«ä¹¦ |
|:---:|:---:|:---:|:---:|:---:|:---:|
| ![科学复习](assets/case/科学复习.png) | ![程序员技术之旅](assets/case/程序员技术之旅.jpg) | ![典典博客](assets/case/典典博客.jpg) | ![优秀笔记](assets/case/优秀笔记.jpg) | ![365刷题](assets/case/365刷题.jpg) | ![同城共享书](assets/case/同城共享书.jpg) |
| [技术源 share](https://github.com/wangsrGit119/mini-blog-halo) | ä½ çš„代码写的真棒 | è°›å¦ | å°èޫ唐尼 | [模版演示](https://github.com/zhihuifanqiechaodan/miniprogram-template) | AI瓦力 |
|:---:|:---:|:---:|:---:|:---:|:---:|
| ![技术源share](assets/case/技术源share.jpg) | ![你的代码写的真棒](assets/case/你的代码写的真棒.jpg) | ![谛否](assets/case/谛否.jpg) | ![小莫唐尼](assets/case/小莫唐尼.png) | ![MiniProgram模版演示](assets/case/MiniProgram模版演示.jpg) | ![AI瓦力](assets/case/AI瓦力.jpg) |
以上排名不分先后,更多可见 [使用案例收集](https://github.com/jin-yufeng/mp-html/issues/27)(欢迎添加)
## ðŸŽˆ è”系与支持 :id=sponsor
![group](assets/group.jpg)
![支持](assets/sponsor.png)
## ðŸ“ƒ è®¸å¯ :id=license
[MIT License](https://github.com/jin-yufeng/mp-html/blob/master/LICENSE)
?> æ‚¨å¯ä»¥å…è´¹çš„使用(包括商用)、复制或修改本组件
!> åœ¨ç”¨äºŽç”Ÿäº§çŽ¯å¢ƒå‰ï¼ŒåŠ¡å¿…è¿›è¡Œä»”ç»†æµ‹è¯•ï¼Œç”±æœ¬ç»„ä»¶ *bug* å¸¦æ¥çš„æŸå¤±æ¦‚不负责
---
Powered by docsify
node_modules/mp-html/docs/_coverpage.md
New file
@@ -0,0 +1,12 @@
![logo](assets/logo/logo.png)
# mp-html <small>2.5.1</small>
> ä¸€ä¸ªå¼ºå¤§çš„小程序富文本组件
- å…¨é¢çš„æ ‡ç­¾æ”¯æŒ
- å¤šå¹³å°ä½¿ç”¨æ”¯æŒ
- ä¸°å¯Œçš„附加功能
[GitHub](https://github.com/jin-yufeng/mp-html)
[快速开始](/overview/quickstart)
node_modules/mp-html/docs/_sidebar.md
New file
@@ -0,0 +1,20 @@
- æ¦‚览
  - [🚀 å¿«é€Ÿå¼€å§‹](overview/quickstart)
  - [🎉 åŠŸèƒ½ä»‹ç»](overview/feature)
- åŸºæœ¬ä½¿ç”¨
  - [🔨 å±žæ€§](basic/prop)
  - [📫 äº‹ä»¶](basic/event)
- è¿›é˜¶ä½¿ç”¨
  - [🔎 api](advanced/api)
  - [📌 æ’ä»¶](advanced/plugin)
  - [🔧 äºŒæ¬¡å¼€å‘](advanced/develop)
- ç–‘问解答
  - [📘 å¸¸è§é—®é¢˜](question/faq)
  - [📩 åé¦ˆ](question/feedback)
  - [📝 è´¡çŒ®æŒ‡å—](question/contribution)
- æ›´æ–°æ—¥å¿—
  - [📖 æ›´æ–°æ—¥å¿—](changelog/changelog)
node_modules/mp-html/docs/advanced/api.md
New file
@@ -0,0 +1,230 @@
# ðŸ”Ž api
组件的实例上挂载了一些实用的 *api* æ–¹æ³•可供调用
## èŽ·å–ç»„ä»¶å®žä¾‹ :id=getCompent
- *uni-app*
  ```vue
  <template>
    <view>
      <mp-html ref="article" />
    </view>
  </template>
  <script>
    export default {
      onLoad () {
        var ctx = this.$refs.article
      }
    }
  </script>
  ```
- æ”¯ä»˜å®å°ç¨‹åº
  éœ€å¼€å¯ [component2](https://opendocs.alipay.com/mini/framework/component-ref) æ¨¡å¼
  ```axml
  <mp-html ref="article">
  ```
  ```javascript
  Page({
    article (ctx) {
      // èŽ·å¾—ç»„ä»¶å®žä¾‹
    }
  })
  ```
- å…¶ä»–小程序平台
  ```wxml
  <mp-html id="article" />
  ```
  ```javascript
  Page({
    onLoad () {
      // å¾®ä¿¡ã€QQ、百度
      var ctx = this.selectComponent('#article')
      // å¤´æ¡
      this.selectComponent('#article', ctx => {
      })
    }
  })
  ```
## in
功能:将锚点跳转的范围限定在一个 *scroll-view*(需要开启纵向滚动)内
输入值:
| å‚数名 | ç±»åž‹ | å¿…å¡« | é»˜è®¤å€¼ | è¯´æ˜Ž |
|:---:|:---:|:---:|:---:|---|
| page | object | æ˜¯ | - | scroll-view æ ‡ç­¾æ‰€åœ¨é¡µé¢å®žä¾‹ |
| selector | string | æ˜¯ | - | scroll-view æ ‡ç­¾ çš„选择器 |
| scrollTop | string | æ˜¯ | - | scroll-view æ ‡ç­¾ scrollTop å±žæ€§ç»‘定的变量名 |
返回值:无
示例:
```wxml
<scroll-view id="scroll" style="height:300px" scroll-top="{{top}}" scroll-y scroll-with-animation>
  <mp-html id="article" content="{{html}}" />
</scroll-view>
```
```javascript
Page({
  onLoad () {
    // ctx ä¸ºç»„件实例
    ctx.in(this, '#scroll', 'top')
  }
})
```
!> åœ¨ *scroll-view* ä¸­ä½¿ç”¨æ—¶éœ€è¦æ³¨æ„å¦‚果使用了视频,需要保证该平台的 *video* æ ‡ç­¾æ”¯æŒåŒå±‚渲染
## navigateTo
功能:锚点跳转
前提是 [use-anchor](basic/prop#use-anchor) å±žæ€§çš„值为 *true*
必须在 [load](basic/event#load) äº‹ä»¶è§¦å‘后使用,建议在 [ready](basic/event#ready) äº‹ä»¶è§¦å‘后使用以保证跳转位置准确
输入值:
| å‚数名 | ç±»åž‹ | å¿…å¡« | é»˜è®¤å€¼ | è¯´æ˜Ž |
|:---:|:---:|:---:|:---:|---|
| id | string | å¦ | - | è¦è·³è½¬çš„锚点 id,为空则跳转到开头 |
| offset | number | å¦ | 0 | è·³è½¬ä½ç½®çš„偏移量 |
返回值:**Promise**
该方法中传入的 *offset* ä¼˜å…ˆçº§é«˜äºŽ [use-anchor](basic/prop#use-anchor) å±žæ€§
示例:
```javascript
Page({
  ready () {
    // ctx ä¸ºç»„件实例
    ctx.navigateTo('anchor').then(() => {
      console.log('跳转成功')
    }).catch(err => {
      console.log('跳转失败:', err)
    })
  }
})
```
## getText
功能:获取文本内容
必须在 [load](basic/event#load) äº‹ä»¶è§¦å‘后使用
输入值:无
返回值:**String**
## getRect
功能:获取富文本内容的位置和大小
如果开启了 [lazy-load](basic/prop#lazy-load),[ready](basic/event#ready) äº‹ä»¶è¿”回的不是最终大小,可通过此方法获得实时的大小和位置信息
输入值:无
返回值:**Promise**
示例:
```javascript
Page({
  getRect () {
    // ctx ä¸ºç»„件实例
    ctx.getRect().then(rect => {
      console.log(rect) // boundingClientRect ä¿¡æ¯
    }).catch(err => {
      console.log('获取失败', err)
    })
  }
})
```
!> è¯¥æ–¹æ³•有小概率可能获取失败,需要做好错误处理
## setContent
功能:设置富文本内容
此方法的功能与 [content](basic/prop#content) å±žæ€§åŸºæœ¬ä¸€è‡´ï¼Œä½†æ­¤æ–¹æ³•的设置不需要经过视图层且可以从尾部追加
输入值:
| å‚数名 | ç±»åž‹ | å¿…å¡« | é»˜è®¤å€¼ | è¯´æ˜Ž |
|:---:|:---:|:---:|:---:|---|
| content | string | æ˜¯ | - | è¦æ¸²æŸ“çš„ html å­—符串 |
| append | boolean | å¦ | false | æ˜¯å¦ä»Žå°¾éƒ¨è¿½åŠ  |
返回值:无
!> è°ƒç”¨æ­¤æ–¹æ³•会触发 [load](basic/event#load) å’Œ [ready](basic/event#ready) äº‹ä»¶ï¼Œè¯·å‹¿åœ¨äº‹ä»¶å¤„理函数中调用,否则可能陷入死循环
## imgList
功能:获取所有图片的数组
该数组用于图片预览,对其进行修改可以在自动预览时生效(如修改为高清图链接或转存 *base64*)
!> è¿™æ˜¯ä¸€ä¸ªå±žæ€§ï¼Œä¸æ˜¯ä¸€ä¸ªå‡½æ•°
请不要增删此数组(可以修改),否则在自动预览时可能出现问题
```javascript
Page({
  load () {
    // ctx ä¸ºç»„件实例
    var cover = ctx.imgList[0] // é¦–张图可以作为转发封面图
    ctx.imgList.forEach((src, i, array) => {
      console.log(src)
      // æ›¿æ¢ä¸ºé«˜æ¸…图链接
      array[i] = src.replace('thumb', '')
      // è½¬å­˜ base64 ä¾¿äºŽé¢„览
      var fs = wx.getFileSystemManager && wx.getFileSystemManager()
      var info = src.match(/data:image\/(\S+?);(\S+?),(.+)/)
      if (!info) return
      var filePath = `${wx.env.USER_DATA_PATH}/${Date.now()}.${info[1]}`
      fs && fs.writeFile({
        filePath,
        data: info[3],
        encoding: info[2],
        success: () => array[i] = filePath
      })
    })
  }
})
```
## pauseMedia
?> [2.2.2](changelog/changelog#v222) ç‰ˆæœ¬èµ·æ”¯æŒ
功能:暂停正在播放的视频或音频
?> å’Œ [play](basic/event#play) äº‹ä»¶é…åˆå¯ä»¥å®žçŽ°ä¸Žé¡µé¢ä¸­å…¶ä»–éŸ³è§†é¢‘è¿›è¡Œäº’æ–¥æ’­æ”¾
输入值:无
返回值:无
示例:
```javascript
Page({
  onHide () {
    // ctx ä¸ºç»„件实例
    ctx.pauseMedia() // é¡µé¢è·³è½¬æˆ–隐藏时暂停播放
  }
})
```
## setPlaybackRate
?> [2.4.0](changelog/changelog#v240) ç‰ˆæœ¬èµ·æ”¯æŒ
功能:设置音视频的播放速率
输入值:
| å‚数名 | ç±»åž‹ | å¿…å¡« | é»˜è®¤å€¼ | è¯´æ˜Ž |
|:---:|:---:|:---:|:---:|---|
| rate | number | æ˜¯ | - | æ’­æ”¾é€ŸçŽ‡ï¼Œä¸€èˆ¬æ”¯æŒ 0.5~2.0 |
返回值:无
示例:
```javascript
Page({
  // ç‚¹å‡»è®¾ç½®é€ŸçŽ‡æŒ‰é’®
  setPlaybackRate () {
    wx.showActionSheet({
      itemList: ['0.5', '1.0', '1.25', '1.5', '2.0'],
      success: res => {
        const rate = [0.5, 1.0, 1.25, 1.5, 2.0][res.tapIndex]
        // ctx ä¸ºç»„件实例
        ctx.setPlaybackRate(rate)
      }
    })
  }
})
```
node_modules/mp-html/docs/advanced/develop.md
New file
@@ -0,0 +1,114 @@
# äºŒæ¬¡å¼€å‘ :id=develop
## ðŸ“£ è¯´æ˜Ž :id=notice
二次开发请在 *src* ç›®å½•下进行修改,修改完成后可通过下述方法自动生成各平台的代码包
为方便维护,本项目原生包多个平台共用一套源代码,在编写时直接按照微信端的写法进行编写即可,[生成代码包](#pack) æ—¶ä¼šè‡ªåŠ¨è¿›è¡Œè½¬æ¢
自动转换已经抹平了大部分平台之间的差异(文件后缀名、*api* æ ¼å¼ç­‰ï¼‰ï¼Œéœ€è¦æ³¨æ„çš„æ˜¯ **访问组件的属性** æ—¶ï¼Œè¯·é€šè¿‡ *this.properties* è®¿é—®è€Œä¸æ˜¯ *this.data*,因为在支付宝平台中两者不互通
个别问题可以自行修改 *tools/converter.js* è¿›è¡Œå¤„理
附项目结构:
```
├─dev(生成的各平台示例项目)
├─dist(生成的各平台代码包)
│  â”œâ”€mp-alipay
│  â”œâ”€mp-baidu
│  â”œâ”€mp-qq
│  â”œâ”€mp-toutiao
│  â”œâ”€mp-weixin
│  â””─uni-app
├─docs(文档,由 docsify ç”Ÿæˆï¼‰
├─plugins(插件源代码)
├─src(组件源代码)
│  â”œâ”€miniprogram(原生包源代码)
│  â””─uni-app(uni-app åŒ…源代码)
├─test(测试代码)
├─tools(构建工具)
│   â”œâ”€demo(示例项目源代码)
│   â”‚  â”œâ”€miniprogram(原生平台示例项目)
│   â”‚  â””─uni-app(uni-app å¹³å°ç¤ºä¾‹é¡¹ç›®ï¼‰
|   â”œâ”€config.js(构建工具的配置项)
|   â”œâ”€converter.js(将微信端的代码转换到各个平台)
|   â”œâ”€ifdef.js(处理条件编译)
|   â”œâ”€minifier.js(处理 json å’Œ wxs çš„压缩)
|   â””─plugin.js(处理插件构建)
├─.eslintrc.json(eslint é…ç½®ï¼‰
├─.stylelintrc.json(stylelint é…ç½®ï¼‰
├─gulpfile.js(gulp ç”Ÿæˆæ–‡ä»¶ï¼‰
├─LICENSE(许可证 MIT)
└─package.json(项目配置)
```
?> å¯¹äºŽè¾ƒå¤æ‚的修改,如果能通过 [编写插件](advanced/plugin#develop) æ–¹å¼å®žçŽ°æ›´æŽ¨èæ’ä»¶æ–¹å¼ï¼Œè¿™æ ·åœ¨ç»„ä»¶åŒ…å‡çº§çš„æ—¶å€™ä¾¿äºŽç»´æŠ¤å’Œç®¡ç†
## ðŸŽˆ æ¡ä»¶ç¼–译 :id=ifdef
不同平台之间一些差异的地方可能无法简单的通过替换解决,因此本项目中引入了一种条件编译机制解决平台差异,可在修改时加以利用(条件编译是指在生成包的过程中就仅保留本平台需要的代码,与运行过程中的 *if* åˆ¤æ–­ä¸åŒï¼‰
方式 *1*(适用于 *js*、*wxml*、*wxss* æ–‡ä»¶ï¼‰
仅在某平台下需要使用的代码放在两个注释(各种注释格式皆可)之间即可,示例:
```javascript
// #ifdef MP-WEIXIN
console.log('这是微信平台')
// #endif
// #ifndef MP-WEIXIN
console.log('这不是微信平台')
// #endif
```
方式 *2*(适用于 *wxml* æ–‡ä»¶ï¼‰
对于仅在某一平台使用的属性,可在属性名前加 *平台名:* ï¼Œç¤ºä¾‹ï¼š
```wxml
<!-- show-menu-by-longpress å±žæ€§å°†ä»…被生成到微信包中 -->
<image mp-weixin:show-menu-by-longpress="xxx" />
```
说明:
1. å¯ç”¨çš„平台名称:*mp-weixin*, *mp-qq*, *mp-baidu*, *mp-alipay*, *mp-toutiao*(不区分大小写)
2. *#if(n)def* å’Œ *#endif* å¿…须成对出现,否则会报错(可以多层嵌套)
3. å¦‚果编译过程中发现问题可以自行修改 *tools/ifdef.js* è¿›è¡Œå¤„理
## ðŸ“¦ ç”Ÿæˆç»„件包 :id=pack
修改完成后,可按以下步骤生成新的组件包
在 *mp-html* æ–‡ä»¶å¤¹ä¸‹æ‰§è¡Œï¼š
?> ä»¥ä¸‹å‘½ä»¤éœ€è¦åœ¨ç»„件包根目录下执行,即包含 [package.json](https://github.com/jin-yufeng/mp-html/blob/master/package.json) çš„目录(如果通过 *npm* èŽ·å–å°±æ˜¯ *node_modules/mp-html*)
1. å®‰è£…依赖
   ```bash
   # é€šè¿‡ npm å®‰è£…
   npm install
   # æˆ–通过 yarn å®‰è£…
   yarn
   ```
2. ç”Ÿæˆä»£ç åŒ…到 *dist* æ–‡ä»¶å¤¹
   ```bash
   # ç”Ÿæˆå¾®ä¿¡åŒ…到 dist/mp-weixin
   npm run build:weixin
   # ç”Ÿæˆ qq åŒ…到 dist/mp-qq
   npm run build:qq
   # ç”Ÿæˆç™¾åº¦åŒ…到 dist/mp-baidu
   npm run build:baidu
   # ç”Ÿæˆæ”¯ä»˜å®åŒ…到 dist/mp-alipay
   npm run build:alipay
   # ç”Ÿæˆå¤´æ¡åŒ…到 dist/mp-toutiao
   npm run build:toutiao
   # ç”Ÿæˆ uni-app åŒ…到 dist/uni-app
   npm run build:uni-app
   # ç”Ÿæˆæ‰€æœ‰åŒ…
   npm run build
   ```
?> å¦‚需修改打包过程中的配置(*babel*, *uglifyJs* ç­‰ï¼‰ï¼Œå¯ä»¥å¯¹ *tools/config.js* è¿›è¡Œä¿®æ”¹
## ðŸ”¦ æ£€æŸ¥å’Œæµ‹è¯• :id=test
假设已安装好依赖
```bash
npm run lint           # eslint æ£€æŸ¥
npm run lintcss        # stylelint æ£€æŸ¥
npm run lintcss --fix  # æ£€æŸ¥å¹¶ä¿®å¤
npm run test           # æ‰§è¡Œ jest æµ‹è¯•
npm run coverage       # æµ‹è¯•代码覆盖率
```
可以向 *test* ç›®å½•下添加新的测试用例进行测试
node_modules/mp-html/docs/advanced/plugin.md
New file
@@ -0,0 +1,488 @@
# ðŸ“Œ æ’ä»¶ :id=plugin
> å¯ä»¥åœ¨è¿™é‡Œé€‰æ‹©éœ€è¦çš„æ’件以实现更加丰富的功能
## ä½¿ç”¨æ’ä»¶ :id=use
!> ç›´æŽ¥å°†æ’件文件夹拷贝到组件包中无法生效,请通过以下方式生成包含扩展的组件包
#### å°ç¨‹åºæ–¹å¼
!> è¯¥æ–¹å¼æš‚不可用
?> è¯¥æ–¹å¼é€‚合不熟悉 *npm* çš„用户
1. é€šè¿‡ [小程序方式](overview/quickstart#mp) èŽ·å–åŒ…å«æ‰©å±•æ’ä»¶çš„ç»„ä»¶åŒ…
2. å°†ä¸‹è½½çš„组件包解压,原生小程序复制到 *components* ç›®å½•下,*uni-app* å¤åˆ¶åˆ°é¡¹ç›®æ ¹ç›®å½•下,按照源码方式引入即可,详见 [引入方式](overview/quickstart#use)
#### npm æ–¹å¼
1. èŽ·å–å®Œæ•´çš„ç»„ä»¶åŒ…
   é€šè¿‡ [npm](overview/quickstart#npm) æˆ– [git](overview/quickstart#git) ç­‰æ–¹å¼èŽ·å– **包含完整项目** çš„组件包(注意从 *uni-app* çš„æ’件市场中导入的包中仅包含构建后的组件,**不包含** æž„建工具和插件)
   ![step1](../assets/tutorials/01.png)
2. é€‰æ‹©éœ€è¦çš„æ’ä»¶
   å‚考下方插件使用说明,确定要使用的插件,将其名称填入 [tools/config.js](https://github.com/jin-yufeng/mp-html/blob/master/tools/config.js#L8) ä¸­çš„ *plugins* ä¸­
   å¦‚果想仅在部分平台使用该插件,可以在该插件目录下的 *build.js* çš„ *platform* å­—段中填入需要的平台名称
   ![step2](../assets/tutorials/02.png)
3. ç”Ÿæˆç»„件包
   è®¾ç½®å®ŒæˆåŽï¼Œå¯é€šè¿‡é¡¹ç›®æä¾›çš„命令行工具生成新的组件包,具体见 [生成组件包](advanced/develop#pack)
   ![step3_1](../assets/tutorials/03.png)
   ![step3_2](../assets/tutorials/04.png)
4. æŒ‰ç…§æºç æˆ– *npm* æ–¹å¼å¼•入构建后的组件包进行使用即可,详见 [引入方式](overview/quickstart#use)
## audio
功能:音乐播放器
大小:*≈4KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš(nvue ä¸æ”¯æŒ) |
!> ç™¾åº¦å°ç¨‹åºåŽŸç”ŸåŒ…åœ¨æ­¤ [问题](https://smartprogram.baidu.com/forum/topic/show/125787) æœªè§£å†³å‰æ— æ³•使用
说明:
在大多数小程序平台,*audio* æ ‡ç­¾å·²è¢«åºŸå¼ƒæˆ–无法使用,本插件可以代替 *audio* æ ‡ç­¾æ’­æ”¾éŸ³ä¹ï¼Œå¹¶å®žçŽ°ä»¥ä¸‹ä¼˜åŒ–ï¼š
1. [pause-video](basic/prop#pause-video) å±žæ€§ä¹Ÿå¯ä»¥åº”用于音频,即播放一个音视频时可以自动暂停其他正在播放的音视频
2. å¢žåŠ äº†ä¸€ä¸ªå¯ä»¥æ‹–åŠ¨çš„è¿›åº¦æ¡
3. ç»„件大小可以根据页面宽度自动调整
4. æ”¯æŒ *autoplay* å±žæ€§
5. æ’­æ”¾è¢«åŽå°æ‰“断时,页面显示后自动继续播放
基础库要求:
支付宝 *1.23.4+* ï¼Œå…¶ä½™å¹³å°æ»¡è¶³ [最低要求](question/faq#lib) å³å¯
第 *5* æ¡ä»…微信 *2.2.3+* ã€*QQ*、百度支持
?> å¦‚果希望页面上使用本组件,组件的路径为 *path/to/mp-html/audio/audio*
属性和事件基本同 *audio* ç»„件,组件实例上提供了 *setSrc*、*play*、*seek*、*pause*、*stop* æ–¹æ³•可供控制播放状态
## editable
功能:富文本编辑
下表列出了本插件与原生 *editor* ç»„件的功能差异,可按需选用
| ç»„ä»¶ | ä¼˜ç‚¹ | ç¼ºç‚¹ |
|:---:|:---:|:---:|
| åŽŸç”Ÿ *editor* | åº•层通过 *contenteditable* å®žçŽ°ï¼Œç¼–è¾‘æµç•… | æ”¯æŒæ ‡ç­¾å°‘(不支持音视频、表格以及 *section* ç­‰å¸¸ç”¨æ ‡ç­¾ï¼‰ã€éƒ¨åˆ†å°ç¨‹åºå¹³å°ä¸æ”¯æŒæˆ–低版本不兼容 |
| æœ¬æ’ä»¶ | æ”¯æŒæ ‡ç­¾å…¨é¢ã€æ”¯æŒå¹³å°å…¨é¢ | ç¼–辑灵活性不够强 |
大小:*≈17.5KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš(nvue ä¸æ”¯æŒ) |
##### ç¤ºä¾‹é¡¹ç›® :id=editable_demo
微信小程序点击 [代码片段](https://developers.weixin.qq.com/s/S2ZpZDm87fQP) å³å¯åœ¨å¾®ä¿¡å¼€å‘者工具中导入;*uni-app* ä¸‹è½½ [示例项目](https://mp-html.oss-cn-hangzhou.aliyuncs.com/editable.zip) åœ¨ *HBuilder X* ä¸­æ‰“开即可体验;注意示例项目中不一定包含最新版本,仅供参考使用方法
?> ä¹Ÿå¯ä»¥å‚考示例小程序 [源代码](https://github.com/jin-yufeng/mp-html-demo)
说明:
引入本插件后,会给组件添加以下属性:
| å±žæ€§å | ç±»åž‹ | é»˜è®¤å€¼ | è¯´æ˜Ž |
|:---:|:---:|:---:|:---:|
| editable | Boolean | false | æ˜¯å¦å¼€å¯å†…容编辑 |
| placeholder | String | è¯·è¾“å…¥ | è¾“入框为空时占位符([2.1.0+](changelog/changelog#v210)) |
?> [2.5.0](changelog/changelog#v250) ç‰ˆæœ¬èµ·æ”¯æŒå°† *editable* å±žæ€§è®¾ç½®ä¸º *"simple"* æ¥å¼€å¯ç®€æ˜“模式,简易模式下,点击文字内容直接进入编辑,不再弹出操作菜单栏和方框
添加以下事件:
| äº‹ä»¶å | è§¦å‘时机 | ç”¨é€” |
|:---:|:---:|:---:|
| remove([2.2.0+](changelog/changelog#v220)) | åˆ é™¤å›¾ç‰‡/视频/音频标签时 | åˆ é™¤å·²ä¸Šä¼ çš„线上文件 |
支持以下操作:
| ç±»åž‹ | æ“ä½œ |
|:---:|:---:|
| æ–‡æœ¬ | ä¿®æ”¹ |
| å›¾ç‰‡ | æ›´æ¢é“¾æŽ¥ã€è°ƒæ•´å®½åº¦ã€è®¾ç½®æˆè¶…链接([2.0.4+](changelog/changelog#v204))、设置预览图链接、禁用预览、删除 |
| é“¾æŽ¥ | æ›´æ¢é“¾æŽ¥ã€åˆ é™¤ |
| éŸ³è§†é¢‘ | è®¾ç½®å°é¢ã€è®¾ç½®å¾ªçŽ¯æ’­æ”¾ã€è®¾ç½®è‡ªåŠ¨æ’­æ”¾ï¼ˆ[2.2.0+](changelog/changelog#v220))、删除 |
| æ™®é€šæ ‡ç­¾ | è®¾ç½®å­—体大小、颜色([2.4.2+](changelog/changelog#v242))、斜体、粗体、下划线([2.0.4+](changelog/changelog#v204))、居中、缩进、删除 |
?> [2.2.1](changelog/changelog#v221) ç‰ˆæœ¬èµ·æ‰€æœ‰æ ‡ç­¾æ”¯æŒä¸Šä¸‹ç§»åŠ¨æ“ä½œï¼Œä½†ä»…é™åŒçº§æ ‡ç­¾é—´ç§»åŠ¨ï¼Œå³åœ¨æœ‰åŒçº§æ ‡ç­¾ä¸”éžç¬¬ä¸€ä¸ªï¼ˆæˆ–æœ€åŽä¸€ä¸ªï¼‰æ—¶å¯ä»¥ä¸Šç§»ï¼ˆæˆ–ä¸‹ç§»ï¼‰
?> åœ¨æ”¯ä»˜å®å°ç¨‹åºä¸­ä½¿ç”¨æ—¶éœ€è¦åœ¨é¡µé¢æ ·å¼ä¸­æ·»åŠ  *page { position: relative; }* é¿å… *tooltip* é”™ä½
?> èœå•项可以通过编辑 *plugins/editable/config.js* è¿›è¡Œä¿®æ”¹ï¼Œä»…可以删减或调整顺序,添加或更名无效(颜色设置除外)
[组件实例](advanced/api#getCompent) ä¸Šæä¾›äº†ä»¥ä¸‹æ–¹æ³•(*editable* å±žæ€§ä¸º *true* æ—¶æ‰å¯ä»¥è°ƒç”¨ï¼‰ï¼š
| åç§° | åŠŸèƒ½ |
|:---:|:---:|
| undo | æ’¤é”€ä¸€ä¸ªæ“ä½œ |
| redo | é‡åšä¸€ä¸ªæ“ä½œ |
| insertHtml | åœ¨å…‰æ ‡å¤„插入指定 html å†…容([2.1.0+](changelog/changelog#v210)) |
| insertImg | åœ¨å…‰æ ‡å¤„插入一张图片 |
| insertTable(rows, cols) | åœ¨å…‰æ ‡å¤„插入一个 rows è¡Œ cols åˆ—的表格([2.1.3+](changelog/changelog#v213)) |
| insertVideo | åœ¨å…‰æ ‡å¤„插入一个视频 |
| insertAudio | åœ¨å…‰æ ‡å¤„插入一个音频 |
| insertLink | åœ¨å…‰æ ‡å¤„插入一个链接 |
| insertText | åœ¨å…‰æ ‡å¤„插入一段文本 |
| clear | æ¸…空内容 |
| getContent | èŽ·å–ç¼–è¾‘åŽçš„ html å†…容 |
?> è€ƒè™‘到不同场景下希望获取链接的方法不同,需要在初始时给组件设置一个 *getSrc* æ–¹æ³•(否则插入图片、音视频、链接或修改链接等操作无法使用),每次组件内需要链接时会调用此方法,开发者可在此方法中自行决定如何获取链接,返回 **线上地址** å³å¯ï¼ˆå…·ä½“用法见下方示例)
[2.2.0](changelog/changelog#v220) ç‰ˆæœ¬èµ·è®¾ç½®äº† [domain](basic/prop#domain) å±žæ€§æ—¶ï¼Œè¿”回的地址可以缺省主域名
编辑完成后,通过 *getContent* æ–¹æ³•获取编辑后的 *html*,最后将 *editable* å±žæ€§è®¾ç½®ä¸º *false* å³å¯æ­£å¸¸æ¸²æŸ“
!> ç‚¹å‡»ä¿å­˜æŒ‰é’®æ—¶ï¼Œéƒ¨åˆ†å¹³å° *tap* äº‹ä»¶æ—©äºŽ *blur* äº‹ä»¶è§¦å‘,直接获取内容可能导致无法获取当前编辑的文本内容,因此建议设置一个小的延时后获取(可参考下方示例,[详细](https://github.com/jin-yufeng/mp-html/issues/368))
示例:
```javascript
Page({
  onLoad () {
    // ctx ä¸ºç»„件实例,获取方法见上
    /**
     * @description è®¾ç½®èŽ·å–é“¾æŽ¥çš„æ–¹æ³•
     * @param {String} type é“¾æŽ¥çš„类型(img/video/audio/link)
     * @param {String} value ä¿®æ”¹é“¾æŽ¥æ—¶ï¼Œè¿™é‡Œä¼šä¼ å…¥æ—§å€¼
     * @returns {Promise} è¿”回线上地址(2.2.0 ç‰ˆæœ¬èµ·è®¾ç½®äº† domain å±žæ€§æ—¶ï¼Œå¯ä»¥ç¼ºçœä¸»åŸŸåï¼‰
     *   type ä¸º audio/video æ—¶ï¼Œå¯ä»¥è¿”回一个源地址数组
     *   2.1.3 ç‰ˆæœ¬èµ· type ä¸º audio æ—¶ï¼Œå¯ä»¥è¿”回一个 object,包含 src、name、author、poster ç­‰å­—段
     *   2.2.0 ç‰ˆæœ¬èµ· type ä¸º img æ—¶ï¼Œå¯ä»¥è¿”回一个源地址数组,表示插入多张图片(修改链接时仅限一张)
     */
    this.ctx.getSrc = (type, value) => {
      return new Promise((resolve, reject) => {
        // ä»¥å›¾ç‰‡ä¸ºä¾‹
        if (type == 'img') {
          wx.chooseImage({
            count: value === undefined ? 9 : 1, // 2.2.0 ç‰ˆæœ¬èµ·æ’入图片时支持多张(修改图片链接时仅限一张)
            success: res => {
              wx.showLoading({
                title: '上传中'
              });
              (async ()=>{
                const arr = []
                for (let item of res.tempFilePaths) {
                  // ä¾æ¬¡ä¸Šä¼ 
                  const src = await upload(item)
                  arr.push(src)
                }
                return arr
              })().then(res => {
                wx.hideLoading()
                resolve(res)
              })
            },
            fail: reject
          })
        }
      })
    }
  },
  finishEdit () {
    setTimeout(() => {
      var html = ctx.getContent() // èŽ·å–ç¼–è¾‘å¥½çš„ html
      // ä¸Šä¼  html
      wx.request({
        url: 'xxx',
        data: {
          html
        },
        success: () => {
          this.setData({
            editable: false // ç»“束编辑
          })
        }
      })
    }, 50)
  }
})
```
注意事项:
不要在 *editable* å±žæ€§è¢«è®¾ç½®ä¸º *true* å‰é€šè¿‡ [setContent](advanced/api#setContent) æ–¹æ³•(用 [content](basic/prop#content) å±žæ€§ï¼‰è®¾ç½®å†…容,否则在切换为 *true* åŽä¼šå˜æˆç©ºç™½
## emoji
功能:解析 *emoji*
大小:*≈3KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš |
说明:
将形如 *[笑脸]* çš„æ–‡æœ¬æ›¿æ¢ä¸º *emoji* å­—符 ðŸ˜„
匹配模式可以通过修改 *reg* å˜é‡å®žçް
默认配置了 *177* ä¸ªå¸¸ç”¨çš„ *emoji* å°è¡¨æƒ…,可以自行按照需要修改 *data* å˜é‡
?> ä¸Ž [editable](#editable) æ’件共用时,导出编辑好的 *html* å†…容,会将 *emoji* å­—符编码为文本形式,便于存储
## highlight
功能:代码块高亮显示
大小:*≈16KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš |
说明:
编辑 *plugins/highlight/config.js* ï¼Œå¯ä»¥é€‰æ‹©æ˜¯å¦éœ€è¦ä»¥ä¸‹åŠŸèƒ½ï¼š
- *copyByLongPress* æ˜¯å¦éœ€è¦é•¿æŒ‰ä»£ç å—时显示复制代码内容菜单(*uni-app nvue* æš‚不支持)
- *showLanguageName* æ˜¯å¦åœ¨ä»£ç å—右上角显示语言的名称
- *showLineNumber* æ˜¯å¦åœ¨å·¦ä¾§æ˜¾ç¤ºè¡Œå·
!> ä¿®æ”¹è¯¥é…ç½®åŽéœ€è¦é‡æ–° [生成组件包](advanced/develop#pack),在构建后的组件包中修改配置无法生效
引入本插件后,*html* ä¸­ç¬¦åˆä»¥ä¸‹æ ¼å¼çš„ *pre* å°†è¢«é«˜äº®å¤„理:
```html
<!-- pre ä¸­å†…含一个 code,并在 pre æˆ– code çš„ class ä¸­è®¾ç½® language- -->
<pre><code class="language-css">p { color: red }</code></pre>
```
?> ä¸Ž [editable](#editable) æ’件共用时,编辑状态下,不会进行高亮,可以直接修改代码文本
?> æœ¬æ’件的高亮功能依赖于 [prismjs](https://prismjs.com/),默认配置中仅支持 *html*、*css*、*c-like*、*javascript* è¯­è¨€å’Œ *Tomorrow Night* ä¸»é¢˜ï¼Œå¦‚果需要更多语言或更换主题请前往 [官网](https://prismjs.com/download.html) ä¸‹è½½å¯¹åº”çš„ *prism.min.js* å’Œ *prism.css* å¹¶æ›¿æ¢ *plugins/highlight/* ç›®å½•下的文件(*prismjs* çš„æ’件大多涉及 *dom* æ“ä½œï¼ŒåŸºæœ¬ä¸å¯ç”¨ï¼Œè¯·å‹¿é€‰æ‹©ï¼‰
## markdown
功能:渲染 *markdown*
大小:*≈37KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš |
说明:
引入本插件后,会给组件添加一个 *markdown* å±žæ€§ï¼Œå°†è¯¥å±žæ€§è®¾ç½®ä¸º *true* åŽï¼Œå³å¯é€šè¿‡ [content](basic/prop#content) å±žæ€§æˆ– [setContent](advanced/api#setContent) æ–¹æ³•设置 *markdown* å†…容即可
?> è‹¥å¼€å¯ [use-anchor](basic/prop#use-anchor) å±žæ€§ï¼Œæ‰€æœ‰æ ‡é¢˜ `# xxx` éƒ½ä¼šè¢«è®¾ç½®ä¸ºé”šç‚¹ï¼Œé€šè¿‡é“¾æŽ¥ `[xxx](#xxx)` å¯ä»¥ç›´æŽ¥è·³è½¬
?> æœ¬æ’件通过 [marked](https://github.com/markedjs/marked) è§£æž *markdown* æ–‡æœ¬ï¼Œéƒ¨åˆ† *css* æ‘˜é€‰è‡ª [github-markdown-css](https://github.com/sindresorhus/github-markdown-css)
?> æœ¬æ’件可以和 [highlight](#highlight) æ’件共用,实现 *markdown* ä¸­ä»£ç å—的高亮效果
## search
功能:关键词搜索
大小:*≈1.5KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš(nvue ä¸æ”¯æŒ) |
说明:
引入后会在 [组件实例](advanced/api#getCompent) ä¸ŠæŒ‚载一个 *search* æ–¹æ³•,用于关键词搜索
输入值
| å‚数名 | ç±»åž‹ | é»˜è®¤å€¼ | è¯´æ˜Ž |
|:---:|:---:|:---:|---|
| key | String æˆ– RegExp | - | è¦æœç´¢çš„关键词,支持字符串和正则 |
| anchor | Boolean | false | æ˜¯å¦å°†æœç´¢ç»“果设置为锚点 |
| style | String | background-color:yellow | æ ‡è®°æœç´¢ç»“果的样式 |
返回值:*Promise*
| å±žæ€§ | ç±»åž‹ | è¯´æ˜Ž |
|:---:|:---:|---|
| num | Number | æœç´¢ç»“果数量 |
| highlight | Function(i, style='background-color:#FF9632') | é«˜äº®ç¬¬ i(1 ~ num)个结果,将其样式设置为 style |
| jump | Function(i, offset) | è·³è½¬åˆ°ç¬¬ i(1 ~ num)个结果,偏移量为 offset,anchor ä¸º true æ‰å¯ç”¨ |
示例:
```javascript
function search (key) {
  // ctx ä¸ºç»„件实例
  ctx.search(key, true).then(res => {
    res.highlight(1)
    res.jump(1, -50) // é«˜äº®ç¬¬ 1 ä¸ªç»“果并跳转到该位置,偏移量 -50
  })
}
```
?> å…·ä½“用法可以参考示例小程序 [源代码](https://github.com/jin-yufeng/mp-html-demo)
附加说明:
1. ä¸ä¼ å…¥ *key*(或为空)时即可取消搜索,取消所有的高亮,还原到原来的效果
2. è¿›è¡Œæ–°çš„æœç´¢æ—¶æ—§çš„æœç´¢ç»“果将被还原,旧的结果中的 *highlight* ç­‰æ–¹æ³•不再可用
3. è°ƒç”¨ *highlight* æ–¹æ³•高亮一个结果时,之前被高亮的结果会被还原,即始终只有一个结果被高亮
4. *key* ä¼ å…¥å­—符串时大小写敏感,如果要忽略大小写可以用正则的 *i*(字符串搜索效率高于正则)
5. è®¾ç½® *anchor* ä¸º *true* ä¼šä¸€å®šç¨‹åº¦ä¸Šé™ä½Žæ•ˆçŽ‡ï¼Œéžå¿…è¦ä¸è¦å¼€å¯
6. æš‚不支持跨标签搜索,即只有一个文本节点内包含整个关键词才能被搜索到
## style
功能:解析和匹配 *style* æ ‡ç­¾ä¸­çš„æ ·å¼
?> è¿™é‡Œçš„ *style* æ ‡ç­¾æŒ‡çš„æ˜¯ä¼ å…¥ [content](basic/prop#content) å±žæ€§ä¸­çš„ *html* é‡ŒåŒ…含的 *style* æ ‡ç­¾ï¼Œä¸” *style* æ ‡ç­¾è¦æ”¾åœ¨å…¶ä»–标签前面才能生效
大小:*≈3.5KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš (nvue ç›´æŽ¥æ”¯æŒ) |
说明:
支持以下选择器:
| åç§° | ç¤ºä¾‹ |
|:---:|---|
| æ ‡ç­¾åé€‰æ‹©å™¨ | p {} |
| class é€‰æ‹©å™¨ | .class {} |
| id é€‰æ‹©å™¨ | #id {} |
| å¤šé€‰æ‹©å™¨äº¤é›† | p.class {} |
| å¤šé€‰æ‹©å™¨å¹¶é›† | p, .class {} |
| åŽä»£é€‰æ‹©å™¨ | .class1 .class2 {} |
| å­é€‰æ‹©å™¨ | .class1 > .class2 {} |
| ä¼ªç±» | .class::before {} |
伪类仅支持 *before* å’Œ *after*,支持 *attr* æ–¹æ³•
不支持的选择器(属性选择器等)将被忽略
!> ç”±äºŽå°ç¨‹åºä¸­æ— æ³•动态写入 *css*,本插件的实现原理是通过解析,将匹配的样式添加到各标签的行内 *style* ä¸­åŽ»ï¼Œè¯·æ…Žç”¨å®½æ³›çš„é€‰æ‹©å™¨ï¼Œä»¥å…å¤§å¤§å¢žåŠ è§£æžç»“æžœå¤§å°ï¼Œå‡æ…¢æ¸²æŸ“é€Ÿåº¦
## txv-video
功能:使用腾讯视频
大小:*≈1KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš |   |   |   | âˆš (h5 å’Œ app ç›´æŽ¥æ”¯æŒ) |
说明:
引入本插件后,*html* ä¸­ç¬¦åˆä¸‹æ–¹æ ¼å¼çš„ *iframe* æ ‡ç­¾ï¼ˆ*src* ä¸­å«æœ‰ *vid*)将被转为通过腾讯视频播放:
```html
<iframe src="https://v.qq.com/txp/iframe/player.html?vid=xxxxxx" allowFullScreen="true"></iframe>
```
同时,其可以被 [pause-video](basic/prop#pause-video) å±žæ€§æŽ§åˆ¶
!> æœ¬æ’件仅用于将官方 [腾讯视频插件](https://github.com/tvfe/txv-miniprogram-plugin) åº”用于本组件,使用前请确认已经成功申请使用该插件并按要求在小程序 *app.json* ä¸­é…ç½®å®Œæˆï¼ˆ*uni-app* ä¸­çš„配置方法可以参考 [#103](https://github.com/jin-yufeng/mp-html/issues/103#issuecomment-654586246)),否则可能报错 **This application has not registered any plugins yet** ä¸”无法生效
?> è…¾è®¯è§†é¢‘插件 [v2](https://github.com/tvfe/txv-miniprogram-plugin) é»˜è®¤è‡ªåŠ¨æ’­æ”¾ï¼Œ[v1](https://github.com/tvfe/txv-miniprogram-plugin/blob/master/archieve/readme.md) ä¸ä¼šï¼Œå¯æŒ‰éœ€é€‰æ‹©
## img-cache
功能:图片本地缓存
大小:*≈4KB*
作者:[@PentaTea](https://github.com/PentaTea)
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
|  |  |  |  |  | âˆš(仅支持 app çš„ vue é¡µé¢) |
说明:
引入本插件后,会给组件添加一个 *img-cache* å±žæ€§ï¼Œå°†è¯¥å±žæ€§è®¾ç½®ä¸º *true* åŽï¼Œå°†è‡ªåŠ¨ä¸‹è½½å¼•ç”¨çš„å›¾ç‰‡å¹¶å°† *src* å±žæ€§æ›´æ¢ä¸ºæœ¬åœ°åœ°å€
同时在 [组件实例](advanced/api#getCompent) ä¸ŠæŒ‚载了 *imgCache* å¯¹è±¡ï¼Œæ‰©å……缓存控制能力
*imgCache* å¯¹è±¡å±žæ€§å’Œæ–¹æ³•:
| å±žæ€§ | åŠŸèƒ½ |
|:---:|:---:|
| list | å½“前缓存的 url åˆ—表 |
| get(url) | ä¼ å…¥ url èŽ·å¾—æœ¬åœ°åœ°å€ |
| delete(url) | ä¼ å…¥ url åˆ é™¤ç¼“存记录 |
| add(url) | ä¼ å…¥ url å¹¶ä¸‹è½½ç›®æ ‡ä¸ºç¼“å­˜ |
| clear() | æ¸…空所有缓存 |
!> è¯·å°½é‡ç¡®ä¿ *src* ä¸­å«æœ‰æ–‡ä»¶åŽç¼€åï¼Œä¸ä»¥åŽç¼€ç»“尾也没关系,插件会从路径中推测合理的图片后缀,如果完全不包含后缀信息可能会无法保存到相册
## latex
功能:渲染 *latex* å…¬å¼
大小:**≈300KB**
作者:[@Zeng-J](https://github.com/Zeng-J)
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš |
说明:
引入本插件后,会将 *$xxx$* çš„æ–‡æœ¬å†…容按照 *latex* è§„则进行解析和渲染
?> [2.5.0](changelog/changelog#v250) ç‰ˆæœ¬èµ·æ”¯æŒ *$$xxx$$* å½¢å¼çš„块级公式
?> ä¸Ž [editable](#editable) æ’件共用时,编辑状态下,公式不会渲染,可以直接修改公式文本
?> åœ¨ *js* çš„字符串中写 *latex* å…¬å¼æ—¶éœ€æ³¨æ„ *\\* ä¼šå˜æˆè½¬ä¹‰ç¬¦ï¼Œè¦ä½¿ç”¨ *\\\\* æˆ– *String.raw``* çš„æ–¹å¼
?> æœ¬æ’件通过 [katex-mini](https://github.com/rojer95/katex-mini) è§£æž *latex* æ–‡æœ¬ï¼Œ[字体文件](https://github.com/KaTeX/KaTeX/tree/main/fonts) å»ºè®®è‡ªè¡Œè½¬å­˜
## card
功能:商品(联络人)信息卡
大小:*≈7KB*
作者:[@whoooami](https://github.com/whoooami)
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš(nvue ä¸æ”¯æŒ) |
效果图:
![效果图](../assets/plugin/card.png)
参数列表:
|参数名|是否必须|类型|说明|
|:---- |:---|:----- |----- |
|src|是|String|图片Url|
|title|是|String|标题|
|desc|是|String|描述|
|url|是|String|跳转url|
|color|是|String|文字颜色|
|bgcolor|是|String|卡片背景颜色|
|border|是|String|卡片边框颜色|
说明:
1. å¯ä»¥æ˜¾ç¤ºå•†å“ä¿¡æ¯å¡ç‰‡/联络人信息卡片
基础库要求:
满足最低要求即可
?> å¦‚果希望页面上使用本组件,组件的路径为 *path/to/mp-html/card/card*
## å¼€å‘插件 :id=develop
一个插件大致需要以下文件(*plugin/template* ä¸­æä¾›äº†ä¸€ä¸ªæ¨¡æ¿ï¼‰
- *build.js*
  æž„建文件,需要导出一个 *object*,可以内含以下项:
  | åç§° | ç±»åž‹ | é»˜è®¤å€¼ | åŠŸèƒ½ |
  |:---:|:---:|:---:|---|
  | main | string | index.js | å…¥å£æ–‡ä»¶è·¯å¾„ |
  | platform | string[] | ['mp-weixin', 'mp-qq', 'mp-baidu', 'mp-alipay', 'mp-toutiao', 'uni-app'] | æ”¯æŒä½¿ç”¨çš„平台 |
  | template | string | - | è¦è¢«æ·»åŠ åˆ°æ¨¡æ¿æ–‡ä»¶ä¸­çš„æ ‡ç­¾ (nvue ä¸å¯ç”¨) |
  | methods | object | {} | ç”¨äºŽå¤„理模板中事件的方法 (nvue ä¸å¯ç”¨) |
  | style | string | - | ç”¨äºŽæ¨¡æ¿æ–‡ä»¶çš„ css æ ·å¼ |
  | import | string&#124;string[] | - | ç”¨äºŽæ¨¡æ¿æ–‡ä»¶çš„ css æ–‡ä»¶è·¯å¾„ |
  | usingComponents | object | {} | ç”¨äºŽæ¨¡æ¿çš„组件或插件列表 (nvue ä¸å¯ç”¨) |
  | handler | function | - | è‡ªå®šä¹‰æ–‡ä»¶å¤„理方法 |
- *index.js*
  å…¥å£æ–‡ä»¶ï¼Œå¯¼å‡ºä¸€ä¸ª *function*,每个组件在被创建时,会依次实例化各个插件,并传入组件实例可供调用
  æ’件实例上可以挂载以下钩子方法,将在对应时机被调用
  | åç§° | è§¦å‘时机 | å‚æ•° | è¿”回值 |
  |:---:|:---:|:---:|:---:|
  | onUpdate | æ›´æ–° html å†…容时触发 | æ›´æ–°çš„ html å†…容和解析配置 | å¦‚果对输入值进行了修改,则返回修改后的内容 |
  | onParse | è§£æžåˆ°ä¸€ä¸ªæ ‡ç­¾æ—¶è§¦å‘ | æ ‡ç­¾å’Œè§£æžå™¨å®žä¾‹ | è¿”回 false å°†ç§»é™¤è¯¥æ ‡ç­¾ |
  | onLoad | dom æ ‘加载完成时触发 | - | - |
  | onDetached | ç»„件被移除时触发 | - | - |
- *README.md*
使用说明
- *其他依赖文件*
插件目录下,除了 *.md* çš„æ–‡ä»¶ã€*build.js* å’Œ *import* å­—段中的 *css* æ–‡ä»¶ï¼Œå…¶ä»–的都会被拷贝到生成的组件包中,因此请不要放置无关文件
对于仅在原生平台中使用的内容可放在 *miniprogram* ç›®å½•下,仅在 *uni-app* ä¸­ä½¿ç”¨çš„内容可放在 *uni-app* ç›®å½•下,两个目录下可以分别放置 *build.js*
如果在插件中需要用到解析器(将 *html* å­—符串解析为 *nodes* æ•°ç»„),可以引入 *src/parser.js* ä½¿ç”¨ï¼Œæ–¹æ³•如下:
```javascript
const Parser = require('../parser.js')
var instance = new Parser(vm) // å®žä¾‹åŒ–解析器,传入组件实例将自动获取相关配置
var nodes = instance.parse(content) // è§£æžå®Œæˆ
```
!> å¦‚果编写了插件,在升级组件包时请注意备份,避免丢失
?> æ¬¢è¿Žæäº¤å®žç”¨çš„æ’ä»¶ [pull requests](https://github.com/jin-yufeng/mp-html/pulls) åˆ° *plugins* æ–‡ä»¶å¤¹
node_modules/mp-html/docs/assets/case/365Ë¢Ìâ.jpg
node_modules/mp-html/docs/assets/case/AIÍßÁ¦.jpg
node_modules/mp-html/docs/assets/case/MiniProgramÄ£°æÑÝʾ.jpg
node_modules/mp-html/docs/assets/case/ÓÅÐã±Ê¼Ç.jpg
node_modules/mp-html/docs/assets/case/ÄãµÄ´úÂëдµÄÕæ°ô.jpg
node_modules/mp-html/docs/assets/case/µäµä²©¿Í.jpg
node_modules/mp-html/docs/assets/case/¹ÅµäÎÄѧÃûÖøÔĶÁ.jpg
node_modules/mp-html/docs/assets/case/ͬ³Ç¹²ÏíÊé.jpg
node_modules/mp-html/docs/assets/case/¶àôÉú»î.jpg
node_modules/mp-html/docs/assets/case/¸»Îı¾²å¼þ.jpg
node_modules/mp-html/docs/assets/case/Ð¡ÄªÌÆÄá.png
node_modules/mp-html/docs/assets/case/΢Ľ.jpg
node_modules/mp-html/docs/assets/case/¼¼ÊõÔ´share.jpg
node_modules/mp-html/docs/assets/case/»¶Ï²É̳Ç.png
node_modules/mp-html/docs/assets/case/¿ÆÑ§¸´Ï°.png
node_modules/mp-html/docs/assets/case/³ÌÐòÔ±¼¼ÊõÖ®ÂÃ.jpg
node_modules/mp-html/docs/assets/case/Úзñ.jpg
node_modules/mp-html/docs/assets/case/ʳ·¨²é.png
node_modules/mp-html/docs/assets/group.jpg
node_modules/mp-html/docs/assets/logo/logo.ico
node_modules/mp-html/docs/assets/logo/logo.png
node_modules/mp-html/docs/assets/plugin/card.png
node_modules/mp-html/docs/assets/sponsor.png
node_modules/mp-html/docs/assets/tutorials/01.png
node_modules/mp-html/docs/assets/tutorials/02.png
node_modules/mp-html/docs/assets/tutorials/03.png
node_modules/mp-html/docs/assets/tutorials/04.png
node_modules/mp-html/docs/basic/event.md
New file
@@ -0,0 +1,173 @@
# ðŸ“« äº‹ä»¶ :id=event
## èŽ·å–æ–¹å¼ :id=method
- *uni-app*
  *@* + äº‹ä»¶å æˆ– *v-on:* + äº‹ä»¶å
  äº‹ä»¶ä¿¡æ¯ä»Ž *event* ä¸­èŽ·å–
  ```vue
  <template>
    <view>
      <mp-html @ready="ready" />
    </view>
  </template>
  <script>
    export default {
      methods: {
        ready (e) {
          console.log(e)
        }
      }
    }
  </script>
  ```
- æ”¯ä»˜å®å°ç¨‹åº
  *on* + äº‹ä»¶åï¼ˆé¦–字母大写)
  äº‹ä»¶ä¿¡æ¯ä»Ž *event* ä¸­èŽ·å–
  ```axml
  <mp-html onReady="ready">
  ```
  ```javascript
  Page({
    ready (e) {
      console.log(e)
    }
  })
  ```
- å…¶ä»–小程序平台
  *bind* + äº‹ä»¶å
  äº‹ä»¶ä¿¡æ¯ä»Ž *event.detail* ä¸­èŽ·å–
  ```wxml
  <mp-html bindready="ready" />
  ```
  ```javascript
  Page({
    ready (e) {
      console.log(e.detail)
    }
  })
  ```
## load
触发时机:*dom* æ ‘加载完毕时
返回值:无
用途:可以调用 [api](advanced/api) å‡½æ•°
## ready
触发时机:图片加载完毕时(不包含懒加载的图片)
?> åˆ¤æ–­æ–¹å¼æ˜¯ *350ms* æ€»é«˜åº¦æ— å˜åŒ–就认为加载完毕,部分情况下可能不准确;[2.4.0](changelog/changelog#v240) ç‰ˆæœ¬èµ· [lazy-load](basic/prop#lazy-load) å±žæ€§ä¸º *false* æ—¶æ ¹æ®å›¾ç‰‡çš„ *load* äº‹ä»¶åˆ¤æ–­ï¼Œå¯ä»¥åŸºæœ¬å‡†ç¡®è§¦å‘
返回值:富文本区域的 *boundingClientRect* ç»“构体,包含大小位置信息
用途:此时进行 [锚点跳转](advanced/api#navigateTo) å¯ä»¥åŸºæœ¬ä¿è¯è·³è½¬ä½ç½®æ­£ç¡®
?> å¦‚果设置了 [懒加载](basic/prop#lazy-load),此时返回的大小不一定是最终大小,如果需要实时的大小,可以调用 [getRect](advanced/api#getRect) æ–¹æ³•
## error
触发时机:发生渲染错误时
返回值:一个 *object*,其中 *source* ä¸ºé”™è¯¯æ¥æºï¼ˆåŒ…括 *img*、*video*、*audio*),*attrs* ä¸ºè¯¥æ ‡ç­¾çš„属性列表(包含 *src* ç­‰ä¿¡æ¯ï¼‰ï¼Œ*errMsg* æ˜¯é”™è¯¯ä¿¡æ¯
用途:收集错误信息,减少使用出错率高的链接
## imgtap
触发时机:图片被点击时
返回值:该 *img* æ ‡ç­¾çš„属性列表
用途:
默认情况下图片被点击时将自动预览(具体处理可见 [图片效果](overview/feature#img)),如果不希望如此,可将 [preview-img](basic/prop#preview-img) å±žæ€§è®¾ç½®ä¸º *false* å¹¶åœ¨è¿™é‡Œè‡ªå®šä¹‰å¤„理
如果需要用到富文本中所有图片的数组,可以通过 [imgList](advanced/api#imgList) çš„ *api* èŽ·å–
示例:
```javascript
Page({
  imgtap (e) {
    // å¯¹åšäº†æŸç§æ ‡è®°çš„图片进行预览
    if (e.detail['data-flag']) {
      wx.previewImage({
        urls: [e.detail.src] // ä»…预览单张图片
      })
    }
  }
})
```
## linktap
触发时机:链接被点击时
返回值:该 *a* æ ‡ç­¾çš„属性列表
?> [2.0.5](changelog/changelog#v205) ç‰ˆæœ¬èµ·å¢žåŠ è¿”å›žè¯¥æ ‡ç­¾å†…éƒ¨æ–‡æœ¬ *innerText*
用途:
默认情况下链接被点击时,对于外部链接,将被拷贝到剪贴板,如果不希望如此,可以将 [copy-link](basic/prop#copy-link) å±žæ€§çš„值设置为 *false* åŽåœ¨è¿™é‡Œè‡ªå®šä¹‰å¤„理,可参考以下方案:
1. è·³è½¬ *web-view*
   è·³è½¬åˆ°ä¸€ä¸ªæ–°çš„页面,该页面放置一个 [web-view](https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html) ç”¨äºŽæ˜¾ç¤ºå¤–部网页(需要注意 *web-view* çš„使用限制)
2. è·³è½¬å…¶ä»–小程序
   å¯¹äºŽå…¶ä»–小程序的链接(可通过自行设置的 *data-* å±žæ€§åˆ¤æ–­ï¼‰ï¼Œé€šè¿‡ [navigateToMiniProgram](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/miniprogram-navigate/wx.navigateToMiniProgram.html) æŽ¥å£è·³è½¬ï¼ˆéœ€è¦æ³¨æ„è·³è½¬é™åˆ¶ï¼‰
3. ä¸‹è½½æ–‡æ¡£
   å¯¹äºŽæ–‡æ¡£ç±»çš„链接(可通过后缀名或自行设置的 *data-* å±žæ€§åˆ¤æ–­ï¼‰ï¼Œå¯ä»¥é€šè¿‡ [downloadFile](https://developers.weixin.qq.com/miniprogram/dev/api/network/download/wx.downloadFile.html) æŽ¥å£ä¸‹è½½æ–‡ä»¶åŽé€šè¿‡ [openDocument](https://developers.weixin.qq.com/miniprogram/dev/api/file/wx.openDocument.html) æŽ¥å£æ‰“开文档(需要注意下载域名限制)
4. ä¸‹è½½åŽ‹ç¼©åŒ…
   å¯¹äºŽåŽ‹ç¼©åŒ…ç±»çš„é“¾æŽ¥ï¼ˆå¯é€šè¿‡åŽç¼€åæˆ–è‡ªè¡Œè®¾ç½®çš„ *data-* å±žæ€§åˆ¤æ–­ï¼‰ï¼Œå¯ä»¥é€šè¿‡ [downloadFile](https://developers.weixin.qq.com/miniprogram/dev/api/network/download/wx.downloadFile.html) æŽ¥å£ä¸‹è½½æ–‡ä»¶åŽé€šè¿‡ [FileSystemManager.unzip](https://developers.weixin.qq.com/miniprogram/dev/api/file/FileSystemManager.unzip.html) æŽ¥å£è§£åŽ‹ï¼Œç„¶åŽè¿›è¡Œæ‰“å¼€æ–‡æ¡£ç­‰æ“ä½œï¼ˆéœ€è¦æ³¨æ„ä¸‹è½½åŸŸåé™åˆ¶ï¼‰
   å¯¹äºŽå¤§æ–‡ä»¶ï¼ˆå¯é€šè¿‡ *data-* å±žæ€§æ ‡æ³¨ï¼‰ï¼Œè¿˜å¯ä»¥åœ¨ä¸‹è½½å‰è¿›è¡Œè¯¢é—®ï¼Œä¸‹è½½è¿‡ç¨‹ä¸­é€šè¿‡ [DownloadTask](https://developers.weixin.qq.com/miniprogram/dev/api/network/download/DownloadTask.html) æç¤ºä¸‹è½½è¿›åº¦ç­‰
示例:
```javascript
Page({
  linktap (e) {
    if (e.detail.href.includes('.doc')) {
      // ä¸‹è½½ doc æ–‡ä»¶
      wx.downloadFile({
        url: e.detail.href,
        success (res) {
          wx.hideLoading()
          wx.openDocument({
            filePath: res.tempFilePath
          })
        },
        fail (err) {
          wx.hideLoading()
          wx.showModal({
            title: '失败',
            content: err.errMsg,
            showCancel: false
          })
        }
      })
    } else if (e.detail.href.includes('xxx.com')) {
      // è·³è½¬åˆ° webview
      wx.navigateTo({
        url: 'pages/webview/webview?url=' + e.detail.href,
      })
    } else if (e.detail['data-appid']) {
      // è·³è½¬å…¶ä»–小程序
      wx.navigateToMiniProgram({
        appId: e.detail['data-appid']
      })
    }
  }
})
```
## play
?> [2.3.0](changelog/changelog#v230) ç‰ˆæœ¬èµ·æ”¯æŒ
触发时机:音视频播放时
返回值:无
?> [2.5.0](changelog/changelog#v250) ç‰ˆæœ¬èµ·è¿”回值变更为一个 *object*,其中 *source* ä¸ºæ’­æ”¾æ¥æºï¼ˆåŒ…括 *video*、*audio*),*attrs* ä¸ºè¯¥æ ‡ç­¾çš„属性列表(包含 *src* ç­‰ä¿¡æ¯ï¼‰ï¼Œå¯ä»¥ç»Ÿè®¡æ’­æ”¾é‡ç­‰ä¿¡æ¯
用途:和 [pauseMedia](advanced/api#pauseMedia) çš„ `api` é…åˆå¯ä»¥å®žçŽ°ä¸Žé¡µé¢ä¸­å…¶ä»–éŸ³è§†é¢‘è¿›è¡Œäº’æ–¥æ’­æ”¾
示例:
```javascript
Page({
  // é¡µé¢ä¸­çš„音视频播放事件
  pagePlay() {
    // ctx ä¸ºç»„件实例
    ctx.pauseMedia() // æš‚停组件内的音视频播放
  },
  // ç»„ä»¶çš„ play äº‹ä»¶
  componentPlay() {
    // media ä¸ºé¡µé¢ä¸­çš„音视频实例
    media.pause() // æš‚停页面中的音视频播放
  }
})
```
node_modules/mp-html/docs/basic/prop.md
New file
@@ -0,0 +1,141 @@
# ðŸ”¨ å±žæ€§ :id=prop
!> éœ€è¦å°†æŸä¸ªå±žæ€§è®¾ç½®ä¸º *false* æ—¶ï¼Œåº”写作 *attr="{{false}}"*
## container-style
?> [2.1.0](changelog/changelog#v210) ç‰ˆæœ¬èµ·æ”¯æŒ
功能:设置容器的样式
类型:*String*
示例:
```css
padding: 5px; /* è®¾ç½®å†…边距 */
font-size: 18px; /* è®¾ç½®é»˜è®¤çš„字体大小 */
overflow: hidden; /* ç¦ç”¨æ¨ªå‘滚动 */
display: inline; /* è¡Œå†…显示 */
white-space: pre-wrap; /* ä¿ç•™ç©ºæ ¼å’Œæ¢è¡Œç¬¦ */
white-space: pre-line; /* ä¿ç•™æ¢è¡Œç¬¦ */
```
## content
功能:用于渲染的 *html* å­—符串
类型:*String*
## copy-link
功能:是否允许外部链接被点击时自动复制
类型:*Boolean*
默认值:*true*
?> å¯¹äºŽ *uni-app* çš„ *h5* å’Œ *app* å¹³å°ï¼Œå¤–链是能够直接跳转的,这种情况下如果该属性为 *true* åˆ™ç›´æŽ¥è·³è½¬å¤–链(而不是复制链接),为 *false* åˆ™ä¸è·³è½¬
## domain
功能:主域名(用于链接拼接)
类型:*String*
示例:
```html
<!-- å‡è®¾ domain å±žæ€§è¢«è®¾ç½®ä¸º https://example.com
     ä»¥ä¸‹é“¾æŽ¥å‡ä¼šè¢«æ‹¼æŽ¥ä¸º https://example.com/path -->
<img src="//example.com/path" />
<img src="/path" />
<div style="background-image:url('path')"></div>
```
?> é€šè¿‡ *base* æ ‡ç­¾ä¹Ÿå¯ä»¥è®¾ç½®ä¸»åŸŸåï¼Œä½†ä¼˜å…ˆçº§ä½ŽäºŽæ­¤å±žæ€§
!> è¯¥å±žæ€§å¿…须填写 åè®®å://域名 çš„完整链接
暂不支持拼接含有 *../* çš„相对路径链接
*a* æ ‡ç­¾çš„ *href* å±žæ€§å¯èƒ½éœ€è¦è·³è½¬åˆ°å°ç¨‹åºå†…路径,因此不进行 *domain* æ‹¼æŽ¥
设置该属性后将无法使用本地图片
## error-img
功能:图片出错时的占位图链接
类型:*String*
!> è¯¥å±žæ€§ä¸ä¼šè¿›è¡Œæ‹¼æŽ¥ [domain](#domain),需传入完整路径(可以使用本地路径)
## lazy-load
功能:是否开启图片懒加载
类型:*Boolean*
默认值:*false*
?> ä¸åŒå¹³å°æ‡’加载的时机不同,具体参考各平台 *image* ç»„件懒加载的时机
## loading-img
功能:图片加载过程中的占位图链接
类型:*String*
!> è¯¥å±žæ€§ä¸ä¼šè¿›è¡Œæ‹¼æŽ¥ [domain](#domain),需传入完整路径(可以使用本地路径)
## pause-video
功能:是否在播放一个视频时自动暂停其他视频
类型:*Boolean*
默认值:*true*
?> å¦‚果需要多个视频同时播放的,请将此属性设置为 *false*
## preview-img
功能:是否允许图片被点击时自动预览
类型:*Boolean*
默认值:*true*
?> è‡ªåŠ¨é¢„è§ˆå…è®¸å·¦å³æ»‘åŠ¨æŸ¥çœ‹æ‰€æœ‰å›¾ç‰‡ï¼Œå¦‚æžœä¸å¸Œæœ›å¦‚æ­¤å¯ä»¥ç¦ç”¨è‡ªåŠ¨é¢„è§ˆå¹¶åœ¨ [imgtap](basic/event#imgtap) äº‹ä»¶ä¸­è‡ªè¡Œå¤„理
!> é»˜è®¤æƒ…况下 *base64* å›¾ç‰‡æ— æ³•点击预览,[2.5.0](changelog/changelog#v250) ç‰ˆæœ¬èµ·æ”¯æŒå°†æœ¬å±žæ€§è®¾ç½®ä¸º *"all"* å¼€å¯ *base64* å›¾ç‰‡çš„预览,但需要注意各平台 *previewImage* çš„ *api* å¯¹ *base64* å›¾ç‰‡æ”¯æŒåº¦ä¸é«˜ï¼Œéœ€å……分测试后使用,如果无法预览,可参考 [imgList](advanced/api#imgList) ä¸­çš„æ–¹æ³•进行转存
## scroll-table
功能:是否给每个表格添加一个滚动层使其能单独横向滚动
类型:*Boolean*
默认值:*false*
!> å¦‚果表格设置了 *inline* å¸ƒå±€ï¼Œè¯¥å±žæ€§å°†ä¸ä¼šç”Ÿæ•ˆä»¥å…ç ´åè¡Œå†…布局
## selectable
功能:是否开启文本长按复制
类型:*Boolean* / *String*
默认值:*false*
!> å°†æœ¬å±žæ€§çš„值设置为 *true* åœ¨å¾®ä¿¡ *iOS* ç«¯å¯èƒ½å¤±æ•ˆï¼Œ[2.0.5](changelog/changelog#v205) ç‰ˆæœ¬èµ·æ”¯æŒå°†æœ¬å±žæ€§è®¾ç½®ä¸º "*force*" æ¥æ”¯æŒï¼Œä½†ä¼šå¸¦æ¥ä»¥ä¸‹å½±å“ï¼š
1、所有文本块会显示为 *inline-block*(通过 [text](https://developers.weixin.qq.com/miniprogram/dev/component/text.html) æ ‡ç­¾çš„ *user-select* å±žæ€§å®žçŽ°ï¼‰ï¼Œéœ€è¦è‡ªè¡Œé€‚é…
2、文字下划线、删除线等效果将失效([详细](https://github.com/jin-yufeng/mp-html/issues/382))
3、所有文本块都无法被 *rich-text* åŒ…含,一定程度上增加标签数,减慢渲染速度
从 [2.3.1](changelog/changelog#v231) ç‰ˆæœ¬èµ·å¯¹æ­¤é—®é¢˜è¿›è¡Œä¼˜åŒ–(通过 [rich-text](https://developers.weixin.qq.com/miniprogram/dev/component/rich-text.html) æ ‡ç­¾çš„ *user-select* å±žæ€§å®žçŽ°ï¼ŒåŸºç¡€åº“ *2.24.0* åŠä»¥ä¸Šç”Ÿæ•ˆï¼‰ï¼Œç¬¬ *3* ä¸ªé—®é¢˜å·²è§£å†³ï¼Œç¬¬ *1*、*2* ä¸ªé—®é¢˜éƒ¨åˆ†æƒ…况下还会存在
## set-title
功能:是否将 *title* æ ‡ç­¾çš„内容设置到页面标题
类型:*Boolean*
默认值:*true*
## show-img-menu
?> [2.3.0](changelog/changelog#v230) ç‰ˆæœ¬èµ·æ”¯æŒæŽ§åˆ¶é¢„览时是否长按显示菜单(仅微信、百度小程序有效)
功能:是否允许图片被长按时显示菜单
类型:*Boolean*
默认值:*true*
!> è¯¥å±žæ€§ç›®å‰ä»…微信、百度和 *uni-app* çš„ *app* å¹³å°æœ‰æ•ˆ
## tag-style
功能:设置标签的默认样式
类型:*Object*
示例:
```javascript
// æ ¼å¼ä¸º æ ‡ç­¾å: æ ·å¼
{
  a: 'color:red' // a æ ‡ç­¾é»˜è®¤ä¸ºçº¢è‰²
}
```
?> è¯¥å±žæ€§éžå“åº”式,需要在设置 [content](#content) å±žæ€§å‰è®¾ç½®æ‰èƒ½ç”Ÿæ•ˆï¼ŒåŠ¨æ€ä¿®æ”¹ä¸èƒ½å®žæ—¶ç”Ÿæ•ˆ
!> è¯¥å±žæ€§çš„原理是解析到各标签的内联 *style* å±žæ€§ä¸­åŽ»ï¼Œå¦‚æžœå¯¹ç‰¹åˆ«å¸¸ç”¨çš„æ ‡ç­¾è®¾ç½®é»˜è®¤æ ·å¼ï¼Œå°†å¤§å¤§åŠ å¤§è§£æžç»“æžœå¤§å°ï¼Œå‡æ…¢æ¸²æŸ“é€Ÿåº¦ï¼Œè¿™ç§æƒ…å†µä¸‹å»ºè®®é€šè¿‡ [外部样式](overview/quickstart#setting) å¼•å…¥
## use-anchor
功能:是否使用锚点链接
类型:*Boolean* / *Number*
默认值:*false*
?> ä¼ å…¥ä¸€ä¸ªæ•°å­—时表示跳转锚点的偏移量(单位 *px*)
?> å¼€å¯è¯¥å±žæ€§ä¼šå°†æ‰€æœ‰è®¾ç½®äº† *id* å±žæ€§çš„æ ‡ç­¾éƒ½æš´éœ²å‡ºæ¥ï¼Œä¸€å®šç¨‹åº¦ä¸Šå‡æ…¢æ¸²æŸ“速度,非必要不要开启
node_modules/mp-html/docs/changelog/changelog.md
New file
@@ -0,0 +1,322 @@
# ðŸ“– æ›´æ–°æ—¥å¿— :id=changelog
## v2.5.1
发布时间:*2025-04-20*
主要更新:
1. `U` `uni-app` åŒ…适配鸿蒙 `APP` [详细](https://github.com/jin-yufeng/mp-html/issues/615)
2. `U` å¾®ä¿¡å°ç¨‹åºæ›¿æ¢åºŸå¼ƒ `api` `getSystemInfoSync` [详细](https://github.com/jin-yufeng/mp-html/issues/613)
3. `F` ä¿®å¤äº†å¾®ä¿¡å°ç¨‹åº `glass-easel` æ¡†æž¶ä¸‹çœŸæœºæ¢è¡Œå¼‚常的问题 [详细](https://github.com/jin-yufeng/mp-html/pull/607) by [@PaperStrike](https://github.com/PaperStrike)
4. `F` ä¿®å¤äº† `uni-app` åŒ… `app` ç«¯æ’­æ”¾è§†é¢‘可能报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/617)
5. `F` ä¿®å¤äº† [latex](advanced/plugin#latex) æ’件可能出现 `xxx can be used only in display mode` çš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/632)
6. `F` ä¿®å¤äº† `uni-app` åŒ… [latex](advanced/plugin#latex) å…¬å¼å¯èƒ½ä¸æ˜¾ç¤ºçš„问题  [#599](https://github.com/jin-yufeng/mp-html/issues/599)、[#627](https://github.com/jin-yufeng/mp-html/issues/627)
## v2.5.0
发布时间:*2024-04-22*
主要更新:
1. `U` [play](basic/event#play) äº‹ä»¶å¢žåŠ è¿”å›ž `src` ç­‰ä¿¡æ¯ [详细](https://github.com/jin-yufeng/mp-html/issues/526)
2. `U` [preview-img](basic/prop#preview-img) å±žæ€§æ”¯æŒè®¾ç½®ä¸º `all` å¼€å¯ `base64` å›¾ç‰‡é¢„览 [详细](https://github.com/jin-yufeng/mp-html/issues/536)
3. `U` [editable](advanced/plugin#editable) æ’件增加简易模式(点击文字直接编辑)
4. `U` [latex](advanced/plugin#latex) æ’件支持块级公式 [详细](https://github.com/jin-yufeng/mp-html/issues/582)
5. `F` ä¿®å¤äº†è¡¨æ ¼éƒ¨åˆ†æƒ…况下背景丢失的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/587)
6. `F` ä¿®å¤äº†éƒ¨åˆ† `svg` æ— æ³•显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/591)
7. `F` ä¿®å¤äº† `uni-app` åŒ… `h5` å’Œ `app` ç«¯éƒ¨åˆ†æƒ…况下样式无法识别的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/518)
8. `F` ä¿®å¤äº† [latex](advanced/plugin#latex) æ’件部分情况下显示不正确的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/580)
9. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件表格无法删除的问题
10. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’ä»¶ `uni-app` åŒ… `vue3` `h5` ç«¯ç‚¹å‡»å›¾ç‰‡æŠ¥é”™çš„问题
11. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’ä»¶ `uni-app` åŒ…点击表格没有菜单栏的问题
## v2.4.3
发布时间:*2024-01-21*
主要更新:
1. `A` å¢žåŠ  [card](advanced/plugin#card) æ’ä»¶ [详细](https://github.com/jin-yufeng/mp-html/pull/533) by [@whoooami](https://github.com/whoooami)
2. `F` ä¿®å¤äº† `svg` ä¸­åŒ…含 `foreignobject` å¯èƒ½ä¸æ˜¾ç¤ºçš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/523)
3. `F` ä¿®å¤äº†åˆå¹¶å•元格的表格部分情况下显示不正确的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/561)
4. `F` ä¿®å¤äº† `img` æ ‡ç­¾è®¾ç½® `object-fit` æ— æ•ˆçš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/567)
5. `F` ä¿®å¤äº† [latex](advanced/plugin#latex) æ’件公式会换行的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/540)
6. `F` ä¿®å¤äº† `uni-app` åŒ… [editable](advanced/plugin#editable) å’Œ [audio](advanced/plugin#audio) æ’件共用时点击 `audio` æ— æ³•编辑的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/529) by [@whoooami](https://github.com/whoooami)
7. `F` ä¿®å¤äº†æ”¯ä»˜å®å°ç¨‹åºè®¾ç½®äº†å®½é«˜çš„图片可能显示不正常的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/544)
8. `F` ä¿®å¤äº† `uni-app` åŒ…微信小程序部分情况下图片会报错 `replace of undefined` çš„问题
9. `F` ä¿®å¤äº† `uni-app` åŒ…快手小程序图片不显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/571)
## v2.4.2
发布时间:*2023-05-14*
主要更新:
1. `A` [editable](advanced/plugin#editable) æ’件支持修改文字颜色 [详细](https://github.com/jin-yufeng/mp-html/issues/254)
2. `F` ä¿®å¤äº† `svg` ä¸­æœ‰ `style` ä¸ç”Ÿæ•ˆçš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/505)
3. `F` ä¿®å¤äº† `uni-app` åŒ…使用旧版编译器可能报错 `Bad attr nodes` çš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/472)
4. `F` ä¿®å¤äº† `uni-app` åŒ… `app` ç«¯å¯èƒ½å‡ºçŽ°æ— æ³•è¯»å– `lazyLoad` çš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/513)
5. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件在点击换图时未拼接 [domain](basic/prop#domain) çš„问题 [详细](https://github.com/jin-yufeng/mp-html/pull/497) by [@TwoKe945](https://github.com/TwoKe945)
6. `F` ä¿®å¤äº† [latex](advanced/plugin#latex) æ’件部分情况下不显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/515)
7. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件点击音视频时其他标签框不消失的问题
## v2.4.1
发布时间:*2022-12-25*
主要更新:
1. `F` ä¿®å¤äº†æ²¡æœ‰å›¾ç‰‡æ—¶ [ready](basic/event#ready) äº‹ä»¶å¯èƒ½ä¸è§¦å‘的问题
2. `F` ä¿®å¤äº†åŠ è½½è¿‡ç¨‹ä¸­å¯èƒ½å‡ºçŽ° `Root label not found` é”™è¯¯çš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/470)
3. `F` ä¿®å¤äº† [audio](advanced/plugin#audio) æ’件退出页面可能会报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/457)
4. `F` ä¿®å¤äº† `uni-app` åŒ… `vue3` è¿è¡Œåˆ° `app` åœ¨ `HBuilder X 3.6.10` ä»¥ä¸ŠæŠ¥é”™çš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/480)
5. `F` ä¿®å¤äº†åŽŸç”ŸåŒ…é“¾æŽ¥å†…æœ‰å›¾ç‰‡æ—¶å¯èƒ½é”™è¯¯æ¢è¡Œçš„é—®é¢˜ [详细](https://github.com/jin-yufeng/mp-html/issues/464)
6. `F` ä¿®å¤äº† `uni-app` åŒ… `nvue` ç«¯é“¾æŽ¥ä¸­åŒ…含 `%22` æ—¶å¯èƒ½æ— æ³•显示的问题
7. `F` ä¿®å¤äº† `uni-app` åŒ… `vue3` ä½¿ç”¨ [highlight](advanced/plugin#highlight) æ’件可能报错的问题
8. `F` ä¿®å¤äº†å¤´æ¡å°ç¨‹åºä½¿ç”¨ [editable](advanced/plugin#editable) æ’件内容为空时点击会报错的问题
## v2.4.0
发布时间:*2022-08-27*
主要更新:
1. `A` å¢žåŠ äº† [setPlaybackRate](advanced/api#setPlaybackRate) çš„ `api`,可以设置音视频的播放速率 [详细](https://github.com/jin-yufeng/mp-html/issues/452)
2. `A` ç¤ºä¾‹å°ç¨‹åºä»£ç å¼€æº [详细](https://github.com/jin-yufeng/mp-html-demo)
3. `U` ä¼˜åŒ– [ready](basic/event#ready) äº‹ä»¶è§¦å‘时机,未设置懒加载的情况下基本可以准确触发 [详细](https://github.com/jin-yufeng/mp-html/issues/195)
4. `U` [highlight](advanced/plugin#highlight) æ’件在编辑状态下不进行高亮处理,便于编辑
5. `F` ä¿®å¤äº† `flex` å¸ƒå±€ä¸‹å›¾ç‰‡å¤§å°å¯èƒ½ä¸æ­£ç¡®çš„问题
6. `F` ä¿®å¤äº† [selectable](basic/prop#selectable) å±žæ€§æ²¡æœ‰è®¾ç½® `force` ä¹Ÿå¯èƒ½å‡ºçŽ°æ¸²æŸ“å¼‚å¸¸çš„é—®é¢˜
7. `F` ä¿®å¤äº†è¡¨æ ¼ä¸­çš„图片大小可能不正确的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/448)
8. `F` ä¿®å¤äº†å«æœ‰åˆå¹¶å•元格的表格可能无法设置竖直对齐的问题
9. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件在 `scroll-view` ä¸­ä½¿ç”¨æ—¶å·¥å…·æ¡ä½ç½®å¯èƒ½ä¸æ­£ç¡®çš„问题
10. `F` ä¿®å¤äº† `uni-app` åŒ… `vue3` ä½¿ç”¨ [search](advanced/plugin#search) æ’件可能导致错误换行的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/449)
## v2.3.2
发布时间:*2022-08-13*
主要更新:
1. `A` å¢žåŠ  [latex](advanced/plugin#latex) æ’件,可以渲染数学公式 [详细](https://github.com/jin-yufeng/mp-html/pull/447) by [@Zeng-J](https://github.com/Zeng-J)
2. `U` ä¼˜åŒ–根节点下有很多标签的长内容渲染速度
3. `U` [highlight](advanced/plugin#highlight) æ’件适配 `lang-xxx` æ ¼å¼
4. `F` ä¿®å¤äº† `table` æ ‡ç­¾è®¾ç½® `border` å±žæ€§åŽå¯èƒ½æ— æ³•修改边框样式的问题 [详细](https://github.com/jin-yufeng/mp-html/pull/439) by [@zouxingjie](https://github.com/zouxingjie)
5. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件输入连续空格无效的问题
6. `F` ä¿®å¤äº† `uni-app` åŒ… `vue3` å›¾ç‰‡è®¾ç½® `inline` ä¼šæŠ¥é”™çš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/438)
7. `F` ä¿®å¤äº† `uni-app` åŒ… `vue3` ä½¿ç”¨ `table` å¯èƒ½æŠ¥é”™çš„问题
## v2.3.1
发布时间:*2022-05-20*
主要更新:
1. `U` `uni-app` åŒ… `app` ç«¯æ”¯æŒä½¿ç”¨æœ¬åœ°å›¾ç‰‡
2. `U` ä¼˜åŒ–了微信小程序 [selectable](basic/prop#selectable) å±žæ€§åœ¨ `ios` ç«¯çš„处理 [详细](basic/prop#selectable)
3. `U` åŽŸç”ŸåŒ…å–æ¶ˆæ ·å¼éš”ç¦»ï¼Œéƒ¨åˆ†å¹³å°å¯ä»¥ç›´æŽ¥å¼•å…¥é¡µé¢æ ·å¼ [#376](https://github.com/jin-yufeng/mp-html/issues/376)、[详细](overview/quickstart#externStyle)
4. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件不在顶部时 `tooltip` ä½ç½®å¯èƒ½é”™è¯¯çš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/430)
5. `F` ä¿®å¤äº† `uni-app` åŒ… `vue3` è¿è¡Œåˆ°å¾®ä¿¡å°ç¨‹åºå¯èƒ½æŠ¥é”™ä¸¢å¤±å†…容的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/414)
6. `F` ä¿®å¤äº† `uni-app` åŒ… `vue3` éƒ¨åˆ†æ ‡ç­¾å¯èƒ½è¢«é”™è¯¯æ¢è¡Œçš„问题
7. `F` ä¿®å¤äº†åŽŸç”ŸåŒ…ä¸ªåˆ«æƒ…å†µä¸‹å¯èƒ½æŠ¥é”™çš„é—®é¢˜ [详细](https://github.com/jin-yufeng/mp-html/issues/428)
8. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’ä»¶ `uni-app` åŒ…çš„ `app` ç«¯æ’入视频无法预览的问题
## v2.3.0
发布时间:*2022-04-01*
主要更新:
1. `A` å¢žåŠ äº† `play` äº‹ä»¶ï¼ŒéŸ³è§†é¢‘播放时触发,可用于与页面其他音视频进行互斥播放 [详细](basic/event#play)
2. `U` [show-img-menu](basic/prop#show-img-menu) å±žæ€§æ”¯æŒæŽ§åˆ¶é¢„览时是否长按弹出菜单
3. `U` ä¼˜åŒ– `wxs` å¤„理,提高渲染性能 [详细](https://developers.weixin.qq.com/community/develop/article/doc/0006cc2b204740f601bd43fa25a413)
4. `U` `video` æ ‡ç­¾æ”¯æŒ `object-fit` å±žæ€§
5. `U` å¢žåŠ æ”¯æŒä¸€äº›å¸¸ç”¨å®žä½“ç¼–ç  [详细](https://github.com/jin-yufeng/mp-html/issues/418)
6. `F` ä¿®å¤äº†å›¾ç‰‡ä»…设置高度可能不显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/410)
7. `F` ä¿®å¤äº† `video` æ ‡ç­¾é«˜åº¦è®¾ç½®ä¸º `auto` ä¸æ˜¾ç¤ºçš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/411)
8. `F` ä¿®å¤äº†ä½¿ç”¨ `grid` å¸ƒå±€æ—¶å¯èƒ½æ ·å¼é”™è¯¯çš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/413)
9. `F` ä¿®å¤äº†å«æœ‰åˆå¹¶å•元格的表格部分情况下显示异常的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/417)
10. `F` ä¿®å¤äº†ç™¾åº¦å°ç¨‹åºä½¿ç”¨ `br` æ ‡ç­¾å¯èƒ½éƒ¨åˆ†ä¸æ˜¾ç¤ºçš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/409)
11. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件连续插入内容时顺序不正确的问题
12. `F` ä¿®å¤äº† `uni-app` åŒ… `vue3` ä½¿ç”¨ [audio](advanced/plugin#audio) æ’件报错的问题
13. `F` ä¿®å¤äº† `uni-app` åŒ… [highlight](advanced/plugin#highlight) æ’件使用自定义的 `prism.min.js` æŠ¥é”™çš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/416)
## v2.2.2
发布时间:*2022-02-26*
主要更新:
1. `A` å¢žåŠ äº† [pauseMedia](advanced/api#pauseMedia) çš„ `api`,可用于暂停播放音视频 [详细](https://github.com/jin-yufeng/mp-html/issues/317)
2. `U` ä¼˜åŒ–了长内容的加载速度
3. `U` `uni-app` åŒ…适配 `vue3` [#389](https://github.com/jin-yufeng/mp-html/issues/389)、[#398](https://github.com/jin-yufeng/mp-html/pull/398) by [@zhouhuafei](https://github.com/zhouhuafei)、[#400](https://github.com/jin-yufeng/mp-html/issues/400)
4. `F` ä¿®å¤äº†å°ç¨‹åºç«¯å›¾ç‰‡é«˜åº¦è®¾ç½®ä¸ºç™¾åˆ†æ¯”时可能不显示的问题
5. `F` ä¿®å¤äº† [highlight](advanced/plugin#highlight) æ’件部分情况下可能显示不完整的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/403)
## v2.2.1
发布时间:*2021-12-24*
主要更新:
1. `A` [editable](advanced/plugin#editable) æ’件增加上下移动标签功能
2. `U` [editable](advanced/plugin#editable) æ’件支持在文本中间光标处插入内容
3. `F` ä¿®å¤äº† `uni-app` åŒ… `nvue` ç«¯è®¾ç½® `margin` åŽå¯èƒ½å¯¼è‡´é«˜åº¦ä¸æ­£ç¡®çš„问题
4. `F` ä¿®å¤äº† [highlight](advanced/plugin#highlight) æ’件使用压缩版的 `prism.css` å¯èƒ½å¯¼è‡´èƒŒæ™¯å¤±æ•ˆçš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/367)
5. `F` ä¿®å¤äº† `uni-app` åŒ…编辑状态下使用 [emoji](advanced/plugin#emoji) æ’件内容为空时可能报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/371)
6. `F` ä¿®å¤äº†ä½¿ç”¨ [editable](advanced/plugin#editable) æ’件后将 [selectable](basic/prop#selectable) å±žæ€§è®¾ç½®ä¸º `force` ä¸ç”Ÿæ•ˆçš„问题
## v2.2.0
发布时间:*2021-10-11*
主要更新:
1. `A` å¢žåŠ  [customElements](overview/quickstart#customelements) é…ç½®é¡¹ï¼Œä¾¿äºŽæ·»åŠ è‡ªå®šä¹‰åŠŸèƒ½æ€§æ ‡ç­¾ [详细](https://github.com/jin-yufeng/mp-html/issues/350)
2. `A` [editable](advanced/plugin#editable) æ’件增加切换音视频自动播放状态的功能 [详细](https://github.com/jin-yufeng/mp-html/pull/341) by [@leeseett](https://github.com/leeseett)
3. `A` [editable](advanced/plugin#editable) æ’件删除媒体标签时触发 `remove` äº‹ä»¶ï¼Œä¾¿äºŽåˆ é™¤å·²ä¸Šä¼ çš„æ–‡ä»¶
4. `U` [editable](advanced/plugin#editable) æ’ä»¶ `insertImg` æ–¹æ³•支持同时插入多张图片 [详细](https://github.com/jin-yufeng/mp-html/issues/342)
5. `U` [editable](advanced/plugin#editable) æ’入图片和音视频时支持拼接 [domian](basic/prop#domain) ä¸»åŸŸå
6. `F` ä¿®å¤äº†å†…部链接参数中包含 `://` æ—¶è¢«è®¤ä¸ºæ˜¯å¤–部链接的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/356)
7. `F` ä¿®å¤äº†éƒ¨åˆ† `svg` æ ‡ç­¾åæˆ–属性名大小写不正确时不生效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/351)
8. `F` ä¿®å¤äº† `uni-app` åŒ… `nvue` é¡µé¢è¿è¡Œåˆ°éž `app` å¹³å°æ—¶å¯èƒ½æ ·å¼é”™è¯¯çš„问题
9. `D` ç§»é™¤äº† `ad` é…ç½®é¡¹ï¼ˆç”± [customElements](overview/quickstart#customelements) ä»£æ›¿ï¼‰
## v2.1.5
发布时间:*2021-08-13*
主要更新:
1. `A` å¢žåŠ æ”¯æŒæ ‡ç­¾çš„ `dir` å±žæ€§
2. `F` ä¿®å¤äº† `ruby` æ ‡ç­¾æ–‡å­—与拼音没有居中对齐的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/325)
3. `F` ä¿®å¤äº†éŸ³è§†é¢‘标签内有 `a` æ ‡ç­¾æ—¶å¯èƒ½æ— æ³•播放的问题
4. `F` ä¿®å¤äº† [externStyle](overview/quickstart#setting) ä¸­çš„ `class` ååŒ…含下划线或数字时可能失效的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/326)
5. `F` ä¿®å¤äº† `uni-app` åŒ… `h5` ç«¯å¼•å…¥ [externStyle](overview/quickstart#setting) å¯èƒ½ä¸ç”Ÿæ•ˆçš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/326)
6. `F` ä¿®å¤äº†å¾®ä¿¡åŽŸç”ŸåŒ… `a` æ ‡ç­¾çš„ `style` ä¸­åŒ…含 `inline` æ—¶ä¸å“åº”事件的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/332)
## v2.1.4
发布时间:*2021-07-14*
主要更新:
1. `F` ä¿®å¤äº† `rt` æ ‡ç­¾æ— æ³•设置样式的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/318)
2. `F` ä¿®å¤äº†è¡¨æ ¼ä¸­æœ‰å•元格同时合并行和列时可能显示不正确的问题
3. `F` ä¿®å¤äº† `uni-app` åŒ…çš„ `app` ç«¯æ— æ³•关闭图片长按菜单的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/322)
4. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件只能添加图片链接不能修改的问题 [详细](https://github.com/jin-yufeng/mp-html/pull/312) by [@leeseett](https://github.com/leeseett)
## v2.1.3
发布时间:*2021-06-12*
主要更新:
1. `A` [editable](advanced/plugin#editable) æ’件增加 `insertTable` æ–¹æ³•
2. `U` [editable](advanced/plugin#editable) æ’件支持编辑表格中的空白单元格 [详细](https://github.com/jin-yufeng/mp-html/issues/310)
3. `F` ä¿®å¤äº† [externStyle](overview/quickstart#setting) ä¸­ä½¿ç”¨ä¼ªç±»å¯èƒ½å¤±æ•ˆçš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/298)
4. `F` ä¿®å¤äº†å¤šä¸ªç»„件同时使用时 [tag-style](basic/prop#tag-style) å±žæ€§æ—¶å¯èƒ½äº’相影响的问题 [详细](https://github.com/jin-yufeng/mp-html/pull/305) by [@woodguoyu](https://github.com/woodguoyu)
5. `F` ä¿®å¤äº†åŒ…含 `linearGradient` çš„ `svg` å¯èƒ½æ— æ³•显示的问题
6. `F` ä¿®å¤äº† `uni-app` åŒ…编译到头条小程序时可能报错的问题
7. `F` ä¿®å¤äº† `uni-app` åŒ… `nvue` ç«¯ä¸è§¦å‘ `click` äº‹ä»¶çš„问题
8. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件尾部插入时无法撤销的问题
9. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’ä»¶çš„ `insertHtml` æ–¹æ³•只能在末尾插入的问题
10. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件插入音频不显示的问题
## v2.1.2
发布时间:*2021-04-24*
主要更新:
1. `A` å¢žåŠ äº† [img-cache](advanced/plugin#img-cache) æ’件,可以在 `uni-app` çš„ `app` ç«¯ç¼“存图片 [详细](https://github.com/jin-yufeng/mp-html/issues/292) by [@PentaTea](https://github.com/PentaTea)
2. `U` æ”¯æŒé€šè¿‡ [container-style](basic/prop#container-style) å±žæ€§è®¾ç½® `white-space` æ¥ä¿ç•™è¿žç»­ç©ºæ ¼å’Œæ¢è¡Œç¬¦ [详细](question/faq#space)
3. `U` ä»£ç é£Žæ ¼ç¬¦åˆ [standard](https://standardjs.com) æ ‡å‡†
4. `U` `uni-app` åŒ…使用 [editable](advanced/plugin#editable) æ’件编辑状态下支持预览视频 [详细](https://github.com/jin-yufeng/mp-html/issues/286)
5. `F` ä¿®å¤äº† `svg` æ ‡ç­¾å†…嵌 `svg` æ—¶æ— æ³•显示的问题
6. `F` ä¿®å¤äº†å¾®ä¿¡åŽŸç”ŸåŒ… `img` æ ‡ç­¾çš„ `style` ä¸­åŒ…含 `inline` æ—¶ä¸æ˜¾ç¤ºçš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/287)
7. `F` ä¿®å¤äº†æ”¯ä»˜å®å’Œå¤´æ¡å°ç¨‹åºéƒ¨åˆ†åŒºåŸŸä¸å¯å¤åˆ¶çš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/291)
## v2.1.1
发布时间:*2021-04-09*
主要更新:
1. `F` ä¿®å¤äº†å¯¹ `p` æ ‡ç­¾è®¾ç½® [tag-style](basic/prop#tag-style) å¯èƒ½ä¸ç”Ÿæ•ˆçš„问题
2. `F` ä¿®å¤äº† `svg` æ ‡ç­¾ä¸­çš„æ–‡æœ¬æ— æ³•显示的问题
3. `F` ä¿®å¤äº† `uni-app` åŒ…çš„ `nvue` ç«¯ä¸è®¾ç½® [container-style](basic/prop#container-style) å¯èƒ½æŠ¥é”™çš„问题
4. `F` ä¿®å¤äº† `uni-app` åŒ…使用 [editable](advanced/plugin#editable) æ’件编辑表格时可能报错的问题
5. `F` ä¿®å¤äº† `uni-app` åŒ…使用 [highlight](advanced/plugin#highlight) æ’件运行到头条小程序时可能没有样式的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/280)
6. `F` ä¿®å¤äº† `uni-app` åŒ…使用 [editable](advanced/plugin#editable) æ’ä»¶ `editable` å±žæ€§ä¸º `false` æ—¶ä¼šæŠ¥é”™çš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/284)
7. `F` ä¿®å¤äº† [style](advanced/plugin#style) æ’件连续子选择器失效的问题
8. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件无法修改图片和字体大小的问题
## v2.1.0
发布时间:*2021-03-20*
主要更新:
1. `A` å¢žåŠ äº† [container-style](basic/prop#container-style) å±žæ€§ [详细](https://gitee.com/jin-yufeng/mp-html/pulls/1)
2. `A` å¢žåŠ æ”¯æŒ `strike` æ ‡ç­¾
3. `A` `editable` æ’件增加 `placeholder` å±žæ€§ [详细](advanced/plugin#editable)
4. `A` `editable` æ’件增加 `insertHtml` æ–¹æ³• [详细](advanced/plugin#editable)
5. `U` å¤–部样式支持标签名选择器 [详细](overview/quickstart#setting)
6. `F` ä¿®å¤äº† `uni-app` åŒ… `nvue` ç«¯éƒ¨åˆ†æƒ…况下可能不显示的问题
## v2.0.5
发布时间:*2021-03-12*
主要更新:
1. `U` [linktap](basic/event#linktap) äº‹ä»¶å¢žåŠ è¿”å›žå†…éƒ¨æ–‡æœ¬å†…å®¹ `innerText` [详细](https://github.com/jin-yufeng/mp-html/issues/271)
2. `U` [selectable](basic/prop#selectable) å±žæ€§è®¾ç½®ä¸º `force` æ—¶èƒ½å¤Ÿåœ¨å¾®ä¿¡ `iOS` ç«¯ç”Ÿæ•ˆï¼ˆæ–‡æœ¬å—会变成 `inline-block`) [详细](https://github.com/jin-yufeng/mp-html/issues/267)
3. `F` ä¿®å¤äº†éƒ¨åˆ†æƒ…况下竖向无法滚动的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/182)
4. `F` ä¿®å¤äº† `uni-app` åŒ…多次修改富文本数据时部分内容可能不显示的问题
5. `F` ä¿®å¤äº†ç™¾åº¦å°ç¨‹åºçœŸæœºéƒ¨åˆ†å†…容不显示的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/272)
6. `F` ä¿®å¤äº† [腾讯视频](advanced/plugin#txv-video) æ’件可能无法播放的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/265)
7. `F` ä¿®å¤äº† [highlight](advanced/plugin#highlight) æ’件没有设置高亮语言时没有应用默认样式的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/276) by [@fuzui](https://github.com/fuzui)
## v2.0.4
发布时间:*2021-01-31*
主要更新:
1. `A` [editable](advanced/plugin#editable) æ’件增加下划线和图片超链接的功能 [详细](https://github.com/jin-yufeng/mp-html/issues/254)
2. `U` æ”¯ä»˜å®å’Œå¤´æ¡å°ç¨‹åºåŽŸç”ŸåŒ…ç›´æŽ¥é€šè¿‡ `template` é€’归实现渲染
3. `F` ä¿®å¤äº† `img` æ ‡ç­¾è®¾ç½® `data-src` å¯èƒ½å¯¼è‡´å›¾ç‰‡ä¸æ˜¾ç¤ºçš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/257)
4. `F` ä¿®å¤äº† `script` æ ‡ç­¾ä¸­çš„ `<` ä¼šè¢«è§£æžä¸ºæ ‡ç­¾çš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/259)
5. `F` ä¿®å¤äº† `uni-app` åŒ…çš„ `app` ç«¯æ’­æ”¾è§†é¢‘时可能高度突然变小的问题
6. `F` ä¿®å¤äº† `uni-app` åŒ…çš„ `app` ç«¯é•¿æŒ‰å›¾ç‰‡ä¼šæŠ¥é”™çš„问题
7. `F` ä¿®å¤äº† `uni-app` åŒ…çš„ `nvue` ç«¯ä½¿ç”¨ [editable](advanced/plugin#editable) æ’件后无法显示的问题
8. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件删除图片和切换内容时可能出现错误选择框的问题
9. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件无法编辑链接文本内容的问题
## v2.0.3
发布时间:*2021-01-15*
主要更新:
1. `U` å›¾ç‰‡è¢«ç‚¹å‡»æ—¶ä¸å†’泡(可以与整体的点击区分开,不影响链接中的图片)
2. `F` ä¿®å¤äº†å›¾ç‰‡é“¾æŽ¥ç¼ºçœåè®®åæ—¶å¯èƒ½æ— æ³•预览的问题
3. `F` ä¿®å¤äº†åŽŸç”ŸåŒ… `video` å’Œ `audio` æ ‡ç­¾å†…放置文本会报错的问题
4. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件清空内容时弹窗可能不消失的问题
5. `F` ä¿®å¤äº† [highlight](advanced/plugin#highlight) æ’件部分情况下样式不正确的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/231)
6. `F` ä¿®å¤äº†æ–‡æ¡£é¦–页跳转到快速开始页时 `404` çš„问题 by [@AnsonZnl](https://github.com/AnsonZnl)
## v2.0.2
发布时间:*2021-01-08*
主要更新:
1. `U` `uni-app` åŒ…微信端利用 `virtualHost` åŽ»é™¤å¤¹å±‚ï¼ŒåŠ å¿«æ¸²æŸ“
2. `F` ä¿®å¤äº†éƒ¨åˆ†æƒ…况下 `flex` å¸ƒå±€æ˜¾ç¤ºä¸æ­£ç¡®çš„问题
3. `F` ä¿®å¤äº†è®¾ç½® [loading-img](basic/prop#loading-img) ä¼šå¯¼è‡´æ‡’加载失效的问题
4. `F` ä¿®å¤äº†å¤´æ¡åŽŸç”ŸåŒ…éƒ¨åˆ†æƒ…å†µä¸‹è¡¨æ ¼æ˜¾ç¤ºä¸æ­£ç¡®çš„é—®é¢˜
5. `F` ä¿®å¤äº† `uni-app` çš„ `h5` å’Œ `app` ç«¯éƒ¨åˆ†æ’件样式无法应用的问题
6. `F` ä¿®å¤äº† `uni-app` åŒ…没有自动将 `data-src` è®¾ç½®ä¸º `src` çš„问题
7. `F` ä¿®å¤äº† `uni-app` åŒ…çš„ `nvue` ç«¯ [getRect](advanced/api#getRect) æ–¹æ³•无法使用的问题
8. `F` ä¿®å¤äº† `uni-app` åŒ…运行到华为快应用可能报错的问题
9. `F` ä¿®å¤äº†åœ¨ä½Žç‰ˆæœ¬ taro ä¸­ä½¿ç”¨å¯èƒ½æ— æ³•正确解析的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/248)
10. `F` ä¿®å¤äº† [highlight](advanced/plugin#highlight) æ’ä»¶ `pre` å’Œ `code` ä¹‹é—´æœ‰ç©ºç™½ç¬¦æ—¶æ— æ³•高亮的问题
11. `F` ä¿®å¤äº† [editable](advanced/plugin#editable) æ’件清空内容后插入可能报错的问题
## v2.0.1
发布时间:*2021-01-01*
主要更新:
1. `F` ä¿®å¤äº† `a` æ ‡ç­¾è‡ªåŠ¨è·³è½¬åˆ°ä¸å­˜åœ¨é¡µé¢æ—¶å¯èƒ½æŠ¥é”™çš„é—®é¢˜
2. `F` ä¿®å¤äº†å«åˆå¹¶å•元格的表格设置列宽可能导致显示不正确的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/239)
3. `F` ä¿®å¤äº†è¡¨æ ¼ä¸­çš„图片可能错位的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/194)
4. `F` ä¿®å¤äº†åŽŸç”ŸåŒ…ä½¿ç”¨ [editable](advanced/plugin#editable) æ’件点击标签时可能报错的问题
5. `F` ä¿®å¤äº† `uni-app` çš„ `h5` å’Œ `app` ç«¯å¯èƒ½æ— æ³•使用 `iframe` å’Œ `embed` æ ‡ç­¾çš„问题 [详细](https://github.com/jin-yufeng/mp-html/issues/245)
6. `F` ä¿®å¤äº† `uni-app` ä½¿ç”¨éƒ¨åˆ†æ’件会报错的问题 [详细](https://github.com/jin-yufeng/mp-html/issues/246)
## v2.0.0
发布时间:*2020-12-26*
主要更新:
1. `U` é€šè¿‡ `gulp` è¿›è¡Œæž„建,自动生成各平台压缩版代码,减小引入包大小 [详细](advanced/develop#pack)
2. `U` æ²¡æœ‰è®¾ç½® `href` å±žæ€§çš„ `a` æ ‡ç­¾ä¸åº”用链接的样式,可以用作一般标签的点击处理 [详细](question/faq#tap)
3. `U` æä¾›äº†ç»Ÿä¸€çš„æ’件接口,扩展更加方便(代码高亮、`markdown` ç­‰éƒ½å¯ä»¥ç›´æŽ¥é€šè¿‡å¼•入插件实现)[详细](advanced/plugin)
4. `U` å®žçŽ°äº†ç®€å•çš„ç¼–è¾‘åŠŸèƒ½ [详细](advanced/plugin#editable)
5. `U` æ”¯æŒç”Ÿæˆå„平台的示例项目,便于调试 [详细](overview/quickstart#demo)
6. `U` åŽŸç”ŸåŒ…å…±ç”¨ä¸€ä»½æºä»£ç ï¼ˆæž„å»ºæ—¶è¿›è¡Œè‡ªåŠ¨è½¬æ¢ï¼‰ï¼Œæ³¨é‡Šæ›´åŠ è¯¦ç»†ï¼Œä¾¿äºŽäº†è§£å’Œç»´æŠ¤
7. `U` é€šè¿‡ `jest` è¿›è¡Œå•元测试,进一步保证代码质量 [详细](advanced/develop#test)
8. `U` åŽ»é™¤äº†ä¸€äº›å†—ä½™åŠŸèƒ½ï¼Œè¿›ä¸€æ­¥å‡å°åŒ…å¤§å°ï¼ˆçº¦ `24.5KB`)
9. `U` å‡å°‘了递归节点树,加快渲染速度
10. `U` `uni-app` çš„ `app` ç«¯ä½¿ç”¨éžåŽŸç”Ÿçš„ `video` æ˜¾ç¤ºè§†é¢‘以解决无法同层带来的系列问题
11. `U` `uni-app` çš„ `nvue` ç«¯æ”¯æŒé€šè¿‡ `bgColor` å±žæ€§è®¾ç½®èƒŒæ™¯è‰²ï¼ˆé»˜è®¤ç™½è‰²ï¼Œä¸å¯è®¾ç½®ä¸ºé€æ˜Žï¼‰
12. `F` ä¿®å¤äº† `uni-app` çš„ `nvue` ç«¯ä»Žä¸å¯è§åŒºåŸŸåˆ°å¯è§æ—¶å¯èƒ½æ˜¾ç¤ºä¸æ­£ç¡®çš„问题
*v1.x* æ›´æ–°æŒ‡å—:
- ç»„件路径和名称
  *parser* -> *mp-html*
- *npm* åŒ…名
  *parser-wx* -> *mp-html*
- ç»„件属性
  æ›´åï¼š
  *html* -> [content](basic/prop#content)
  *autopause* -> [pause-video](basic/prop#pause-video)
  *autoscroll* -> [scroll-table](basic/prop#scroll-table)
  *autosetTitle* -> [set-title](basic/prop#set-title)
  ç§»é™¤ï¼š
  *compress*, *show-with-animation*, *use-cache*
  æ–°å¢žï¼š
  [copy-link](basic/prop#copy-link), [error-img](basic/prop#error-img), [preview-img](basic/prop#preview-img), [show-img-menu](basic/prop#show-img-menu)
  ä¿®æ”¹ï¼š
  [use-anchor](basic/prop#use-anchor) æ”¯æŒä¼ å…¥æ•°å­—表示跳转偏移量
- ç»„件事件
  æ›´å *linkpress* -> [linktap](basic/event#linktap)
  ç§»é™¤ *parse* äº‹ä»¶
  *imgtap* å’Œ *linktap* äº‹ä»¶ä¸­ä¸å†è¿”回 *ignore* æ–¹æ³•,可以使用 [preview-img](basic/prop#preview-img) å’Œ [copy-link](basic/prop#copy-link) å±žæ€§ç¦ç”¨è‡ªåŠ¨é¢„è§ˆ/拷贝
  é“¾æŽ¥è¢«ç‚¹å‡»æ—¶ï¼Œä¸å†æ”¯æŒè‡ªåŠ¨è·³è½¬å…¶ä»–å°ç¨‹åºï¼Œå¯ä»¥è‡ªè¡Œåœ¨ [linktap](basic/event#linktap) äº‹ä»¶ä¸­è¿›è¡Œè·³è½¬
- api
  [navigateTo](advanced/api#navigateTo) è¿”回 *Promise*,不再采用 *success* å’Œ *fail* å›žè°ƒ
  *rect* å˜æ›´ä¸º [getRect](advanced/api#getRect) æ–¹æ³•
  ç§»é™¤ *getVideoContext* æ–¹æ³•
  [imgList](advanced/api#imgList) ä¸å†åŒ…含 *setItem* å’Œ *each* æ–¹æ³•
- å…¶ä»–
  é»˜è®¤ä¸å†æ”¯æŒåŒ¹é… *style* æ ‡ç­¾ä¸­çš„æ ·å¼ï¼Œå¦‚有需要请使用 [style](advanced/plugin#style) æ’ä»¶
  ä¸å†æ”¯æŒ *base64* å›¾ç‰‡é¢„览(默认为不可预览的小图片)
  å–消了配置项(相关解析配置在 *parser.js* ä¸­ï¼Œ*filter* ç­‰æ–¹æ³•用 [插件](advanced/plugin) çš„æ–¹å¼æ›¿ä»£ï¼‰
  å–消了视频的懒加载(应避免在一个页面中使用过多视频,以免卡顿)
  *ad* æ ‡ç­¾é»˜è®¤ä¸æ·»åŠ åˆ°æ¨¡æ¿ï¼ˆè¯¦è§ [个性化](overview/quickstart#setting))
node_modules/mp-html/docs/index.html
New file
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <title>小程序富文本组件</title>
  <link rel="icon" href="assets/logo/logo.ico" type="image/x-icon">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="description" content="小程序富文本组件">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <link rel="stylesheet" href="lib/vue.css">
  <script>
    var _hmt = _hmt || [];
    (function () {
      var hm = document.createElement("script")
      hm.src = "https://hm.baidu.com/hm.js?69554d980eb5eb786919e3c3ad37b2ce"
      var s = document.getElementsByTagName("script")[0]
      s.parentNode.insertBefore(hm, s)
    })()
  </script>
</head>
<body>
  <div id="app"></div>
  <script>
    window.$docsify = {
      name: 'mp-html',
      repo: 'https://github.com/jin-yufeng/mp-html',
      coverpage: true,
      loadSidebar: true,
      subMaxLevel: 3,
      auto2top: true,
      search: {
        placeholder: '搜索',
        noData: '找不到结果'
      }
    }
    // æ¸²æŸ“测试内容
    function render () {
      document.getElementById("show").srcdoc='<meta name="viewport" content="width=device-width"><style>img{max-width:100%}</style>'+document.getElementById("input").value.replace(/<script[\s\S]+?<\/script>/g, '')
    }
    // æ¸…空测试内容
    function reset () {
      document.getElementById("input").value = ''
      document.getElementById("show").srcdoc = ''
    }
  </script>
  <script src="lib/docsify.min.js"></script>
  <script src="lib/search.min.js"></script>
  <script src="lib/prism-bash.min.js"></script>
</body>
</html>
node_modules/mp-html/docs/lib/docsify.min.js
New file
@@ -0,0 +1 @@
!function(){function s(n){var r=Object.create(null);return function(e){var t=c(e)?e:JSON.stringify(e);return r[t]||(r[t]=n(e))}}var o=s(function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),l=Object.prototype.hasOwnProperty,y=Object.assign||function(e){for(var t=arguments,n=1;n<arguments.length;n++){var r,i=Object(t[n]);for(r in i)l.call(i,r)&&(e[r]=i[r])}return e};function c(e){return"string"==typeof e||"number"==typeof e}function u(){}function r(e){return"function"==typeof e}function p(e){e=e.match(/^([^:/?#]+:)?(?:\/{2,}([^/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof e[1]&&0<e[1].length&&e[1].toLowerCase()!==location.protocol||"string"==typeof e[2]&&0<e[2].length&&e[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host}var h=document.body.clientWidth<=600,i=window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/),n={};function d(e,t){if(void 0===t&&(t=!1),"string"==typeof e){if(void 0!==window.Vue)return b(e);e=t?b(e):n[e]||(n[e]=b(e))}return e}var f=document,g=f.body,m=f.head;function b(e,t){return t?e.querySelector(t):f.querySelector(e)}function k(e,t){return[].slice.call(t?e.querySelectorAll(t):f.querySelectorAll(e))}function v(e,t){return e=f.createElement(e),t&&(e.innerHTML=t),e}function a(e,t){return e.appendChild(t)}function w(e,t){return e.insertBefore(t,e.children[0])}function x(e,t,n){r(t)?window.addEventListener(e,t):e.addEventListener(t,n)}function _(e,t,n){r(t)?window.removeEventListener(e,t):e.removeEventListener(t,n)}function S(e,t,n){e&&e.classList[n?t:"toggle"](n||t)}function e(e,t){void 0===t&&(t=document);var n=t.readyState;if("complete"===n||"interactive"===n)return setTimeout(e,0);t.addEventListener("DOMContentLoaded",e)}var t=Object.freeze({__proto__:null,getNode:d,$:f,body:g,head:m,find:b,findAll:k,create:v,appendTo:a,before:w,on:x,off:_,toggleClass:S,style:function(e){a(m,v("style",e))},documentReady:e}),A=decodeURIComponent,T=encodeURIComponent;function E(e){var t={};return(e=e.trim().replace(/^(\?|#|&)/,""))&&e.split("&").forEach(function(e){e=e.replace(/\+/g," ").split("=");t[e[0]]=e[1]&&A(e[1])}),t}function R(e,t){void 0===t&&(t=[]);var n,r=[];for(n in e)-1<t.indexOf(n)||r.push(e[n]?(T(n)+"="+T(e[n])).toLowerCase():T(n));return r.length?"?"+r.join("&"):""}var O=s(function(e){return/(:|(\/{2}))/g.test(e)}),$=s(function(e){return e.split(/[?#]/)[0]}),F=s(function(e){if(/\/$/g.test(e))return e;e=e.match(/(\S*\/)[^/]+$/);return e?e[1]:""}),C=s(function(e){return e.replace(/^\/+/,"/").replace(/([^:])\/{2,}/g,"$1/")}),L=s(function(e){for(var t=e.replace(/^\//,"").split("/"),n=[],r=0,i=t.length;r<i;r++){var o=t[r];".."===o?n.pop():"."!==o&&n.push(o)}return"/"+n.join("/")});function z(e){return e.split("/").filter(function(e){return-1===e.indexOf("#")}).join("/")}function N(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return C(e.map(z).join("/"))}var M=s(function(e){return e.replace("#","?id=")});function D(e,t){return-1!==e.indexOf(t,e.length-t.length)}var P={};var I=function(e){this.config=e};function j(e){var t=location.href.indexOf("#");location.replace(location.href.slice(0,0<=t?t:0)+"#"+e)}I.prototype.getBasePath=function(){return this.config.basePath},I.prototype.getFile=function(e,t){void 0===e&&(e=this.getCurrentPath());var n,r,i=this.config,o=this.getBasePath(),a="string"==typeof i.ext?i.ext:".md";return e=i.alias?function e(t,n,r){var i=Object.keys(n).filter(function(e){return(P[e]||(P[e]=new RegExp("^"+e+"$"))).test(t)&&t!==r})[0];return i?e(t.replace(P[i],n[i]),n,t):t}(e,i.alias):e,n=e,r=a,e=(e=new RegExp("\\.("+r.replace(/^\./,"")+"|html)$","g").test(n)?n:/\/$/g.test(n)?n+"README"+r:""+n+r)==="/README"+a&&i.homepage||e,e=O(e)?e:N(o,e),t&&(e=e.replace(new RegExp("^"+o),"")),e},I.prototype.onchange=function(e){void 0===e&&(e=u),e()},I.prototype.getCurrentPath=function(){},I.prototype.normalize=function(){},I.prototype.parse=function(){},I.prototype.toURL=function(e,t,n){var r=n&&"#"===e[0],i=this.parse(M(e));if(i.query=y({},i.query,t),e=(e=i.path+R(i.query)).replace(/\.md(\?)|\.md$/,"$1"),r&&(e=(0<(r=n.indexOf("?"))?n.substring(0,r):n)+e),this.config.relativePath&&0!==e.indexOf("/")){n=n.substring(0,n.lastIndexOf("/")+1);return C(L(n+e))}return C("/"+e)};var H=function(r){function e(e){r.call(this,e),this.mode="hash"}return r&&(e.__proto__=r),((e.prototype=Object.create(r&&r.prototype)).constructor=e).prototype.getBasePath=function(){var e=window.location.pathname||"",t=this.config.basePath,e=D(e,".html")?e+"#/"+t:e+"/"+t;return/^(\/|https?:)/g.test(t)?t:C(e)},e.prototype.getCurrentPath=function(){var e=location.href,t=e.indexOf("#");return-1===t?"":e.slice(t+1)},e.prototype.onchange=function(n){void 0===n&&(n=u);var r=!1;x("click",function(e){e="A"===e.target.tagName?e.target:e.target.parentNode;e&&"A"===e.tagName&&!/_blank/.test(e.target)&&(r=!0)}),x("hashchange",function(e){var t=r?"navigate":"history";r=!1,n({event:e,source:t})})},e.prototype.normalize=function(){var e=this.getCurrentPath();if("/"===(e=M(e)).charAt(0))return j(e);j("/"+e)},e.prototype.parse=function(e){void 0===e&&(e=location.href);var t="",n=e.indexOf("#");0<=n&&(e=e.slice(n+1));n=e.indexOf("?");return 0<=n&&(t=e.slice(n+1),e=e.slice(0,n)),{path:e,file:this.getFile(e,!0),query:E(t)}},e.prototype.toURL=function(e,t,n){return"#"+r.prototype.toURL.call(this,e,t,n)},e}(I),q=function(t){function e(e){t.call(this,e),this.mode="history"}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.getCurrentPath=function(){var e=this.getBasePath(),t=window.location.pathname;return e&&0===t.indexOf(e)&&(t=t.slice(e.length)),(t||"/")+window.location.search+window.location.hash},e.prototype.onchange=function(n){var r=this;void 0===n&&(n=u),x("click",function(e){var t="A"===e.target.tagName?e.target:e.target.parentNode;t&&"A"===t.tagName&&!/_blank/.test(t.target)&&(e.preventDefault(),t=t.href,-1!==r.config.crossOriginLinks.indexOf(t)?window.open(t,"_self"):window.history.pushState({key:t},"",t),n({event:e,source:"navigate"}))}),x("popstate",function(e){n({event:e,source:"history"})})},e.prototype.parse=function(e){void 0===e&&(e=location.href);var t="",n=e.indexOf("?");0<=n&&(t=e.slice(n+1),e=e.slice(0,n));var r=N(location.origin),n=e.indexOf(r);return-1<n&&(e=e.slice(n+r.length)),{path:e,file:this.getFile(e),query:E(t)}},e}(I),U={};var B=/([^{]*?)\w(?=\})/g,Z={YYYY:"getFullYear",YY:"getYear",MM:function(e){return e.getMonth()+1},DD:"getDate",HH:"getHours",mm:"getMinutes",ss:"getSeconds",fff:"getMilliseconds"};var G,W=Object.hasOwnProperty,V=Object.setPrototypeOf,Y=Object.isFrozen,X=Object.getPrototypeOf,K=Object.getOwnPropertyDescriptor,Fe=Object.freeze,Q=Object.seal,J=Object.create,ee="undefined"!=typeof Reflect&&Reflect,te=(te=ee.apply)||function(e,t,n){return e.apply(t,n)},Fe=Fe||function(e){return e},Q=Q||function(e){return e},ne=(ne=ee.construct)||function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))},Ce=re(Array.prototype.forEach),Le=re(Array.prototype.pop),ze=re(Array.prototype.push),Ne=re(String.prototype.toLowerCase),Me=re(String.prototype.match),De=re(String.prototype.replace),Pe=re(String.prototype.indexOf),Ie=re(String.prototype.trim),je=re(RegExp.prototype.test),He=(G=TypeError,function(){for(var e=arguments,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=e[r];return ne(G,n)});function re(o){return function(e){for(var t=arguments,n=arguments.length,r=Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=t[i];return te(o,e,r)}}function qe(e,t){V&&V(e,null);for(var n=t.length;n--;){var r,i=t[n];"string"!=typeof i||(r=Ne(i))!==i&&(Y(t)||(t[n]=r),i=r),e[i]=!0}return e}function Ue(e){var t=J(null),n=void 0;for(n in e)te(W,e,[n])&&(t[n]=e[n]);return t}function Be(e,t){for(;null!==e;){var n=K(e,t);if(n){if(n.get)return re(n.get);if("function"==typeof n.value)return re(n.value)}e=X(e)}return function(e){return console.warn("fallback value for",e),null}}var Ze=Fe(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ge=Fe(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),We=Fe(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ve=Fe(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ye=Fe(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Xe=Fe(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ke=Fe(["#text"]),Qe=Fe(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Je=Fe(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),et=Fe(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),tt=Fe(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),nt=Q(/\{\{[\s\S]*|[\s\S]*\}\}/gm),rt=Q(/<%[\s\S]*|[\s\S]*%>/gm),it=Q(/^data-[\-\w.\u00B7-\uFFFF]/),ot=Q(/^aria-[\-\w]+$/),at=Q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),st=Q(/^(?:\w+script|data):/i),lt=Q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function ut(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var pt=function(){return"undefined"==typeof window?null:window},ht=function(e,t){if("object"!==(void 0===e?"undefined":ct(e))||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};var ie,oe,ae=function t(e){function c(e){return t(e)}var s=0<arguments.length&&void 0!==e?e:pt();if(c.version="2.3.1",c.removed=[],!s||!s.document||9!==s.document.nodeType)return c.isSupported=!1,c;var l=s.document,o=s.document,u=s.DocumentFragment,n=s.HTMLTemplateElement,p=s.Node,a=s.Element,r=s.NodeFilter,i=s.NamedNodeMap,h=void 0===i?s.NamedNodeMap||s.MozNamedAttrMap:i,d=s.Text,f=s.Comment,g=s.DOMParser,e=s.trustedTypes,i=a.prototype,m=Be(i,"cloneNode"),v=Be(i,"nextSibling"),y=Be(i,"childNodes"),b=Be(i,"parentNode");"function"!=typeof n||(n=o.createElement("template")).content&&n.content.ownerDocument&&(o=n.content.ownerDocument);var k=ht(e,l),w=k&&ee?k.createHTML(""):"",x=o.implementation,_=o.createNodeIterator,S=o.createDocumentFragment,A=o.getElementsByTagName,T=l.importNode,E={};try{E=Ue(o).documentMode?o.documentMode:{}}catch(e){}var R={};c.isSupported="function"==typeof b&&x&&void 0!==x.createHTMLDocument&&9!==E;function O(e){ge&&ge===e||(e&&"object"===(void 0===e?"undefined":ct(e))||(e={}),e=Ue(e),P="ALLOWED_TAGS"in e?qe({},e.ALLOWED_TAGS):I,j="ALLOWED_ATTR"in e?qe({},e.ALLOWED_ATTR):H,le="ADD_URI_SAFE_ATTR"in e?qe(Ue(ce),e.ADD_URI_SAFE_ATTR):ce,ae="ADD_DATA_URI_TAGS"in e?qe(Ue(se),e.ADD_DATA_URI_TAGS):se,ie="FORBID_CONTENTS"in e?qe({},e.FORBID_CONTENTS):oe,q="FORBID_TAGS"in e?qe({},e.FORBID_TAGS):{},U="FORBID_ATTR"in e?qe({},e.FORBID_ATTR):{},$="USE_PROFILES"in e&&e.USE_PROFILES,B=!1!==e.ALLOW_ARIA_ATTR,Z=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,W=e.SAFE_FOR_TEMPLATES||!1,V=e.WHOLE_DOCUMENT||!1,K=e.RETURN_DOM||!1,Q=e.RETURN_DOM_FRAGMENT||!1,J=!1!==e.RETURN_DOM_IMPORT,ee=e.RETURN_TRUSTED_TYPE||!1,X=e.FORCE_BODY||!1,te=!1!==e.SANITIZE_DOM,ne=!1!==e.KEEP_CONTENT,re=e.IN_PLACE||!1,D=e.ALLOWED_URI_REGEXP||D,de=e.NAMESPACE||he,W&&(Z=!1),Q&&(K=!0),$&&(P=qe({},[].concat(ut(Ke))),j=[],!0===$.html&&(qe(P,Ze),qe(j,Qe)),!0===$.svg&&(qe(P,Ge),qe(j,Je),qe(j,tt)),!0===$.svgFilters&&(qe(P,We),qe(j,Je),qe(j,tt)),!0===$.mathMl&&(qe(P,Ye),qe(j,et),qe(j,tt))),e.ADD_TAGS&&(P===I&&(P=Ue(P)),qe(P,e.ADD_TAGS)),e.ADD_ATTR&&(j===H&&(j=Ue(j)),qe(j,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&qe(le,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(ie===oe&&(ie=Ue(ie)),qe(ie,e.FORBID_CONTENTS)),ne&&(P["#text"]=!0),V&&qe(P,["html","head","body"]),P.table&&(qe(P,["tbody"]),delete q.tbody),Fe&&Fe(e),ge=e)}var $,F=nt,C=rt,L=it,z=ot,N=st,M=lt,D=at,P=null,I=qe({},[].concat(ut(Ze),ut(Ge),ut(We),ut(Ye),ut(Ke))),j=null,H=qe({},[].concat(ut(Qe),ut(Je),ut(et),ut(tt))),q=null,U=null,B=!0,Z=!0,G=!1,W=!1,V=!1,Y=!1,X=!1,K=!1,Q=!1,J=!0,ee=!1,te=!0,ne=!0,re=!1,ie=null,oe=qe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ae=null,se=qe({},["audio","video","img","source","image","track"]),le=null,ce=qe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ue="http://www.w3.org/1998/Math/MathML",pe="http://www.w3.org/2000/svg",he="http://www.w3.org/1999/xhtml",de=he,fe=!1,ge=null,me=o.createElement("form"),ve=qe({},["mi","mo","mn","ms","mtext"]),ye=qe({},["foreignobject","desc","title","annotation-xml"]),be=qe({},Ge);qe(be,We),qe(be,Ve);var ke=qe({},Ye);qe(ke,Xe);function we(t){ze(c.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=w}catch(e){t.remove()}}}function xe(e,t){try{ze(c.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){ze(c.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!j[e])if(K||Q)try{we(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}}function _e(e){var t=void 0,n=void 0;X?e="<remove></remove>"+e:n=(i=Me(e,/^[\r\n\t ]+/))&&i[0];var r=k?k.createHTML(e):e;if(de===he)try{t=(new g).parseFromString(r,"text/html")}catch(e){}if(!t||!t.documentElement){t=x.createDocument(de,"template",null);try{t.documentElement.innerHTML=fe?"":r}catch(e){}}var i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),de===he?A.call(t,V?"html":"body")[0]:V?t.documentElement:i}function Se(e){return _.call(e.ownerDocument||e,e,r.SHOW_ELEMENT|r.SHOW_COMMENT|r.SHOW_TEXT,null,!1)}function Ae(e){return"object"===(void 0===p?"undefined":ct(p))?e instanceof p:e&&"object"===(void 0===e?"undefined":ct(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName}function Te(e,t,n){R[e]&&Ce(R[e],function(e){e.call(c,t,n,ge)})}function Ee(e){var t;if(Te("beforeSanitizeElements",e,null),!((n=e)instanceof d||n instanceof f||"string"==typeof n.nodeName&&"string"==typeof n.textContent&&"function"==typeof n.removeChild&&n.attributes instanceof h&&"function"==typeof n.removeAttribute&&"function"==typeof n.setAttribute&&"string"==typeof n.namespaceURI&&"function"==typeof n.insertBefore))return we(e),1;if(Me(e.nodeName,/[\u0080-\uFFFF]/))return we(e),1;var n=Ne(e.nodeName);if(Te("uponSanitizeElement",e,{tagName:n,allowedTags:P}),!Ae(e.firstElementChild)&&(!Ae(e.content)||!Ae(e.content.firstElementChild))&&je(/<[/\w]/g,e.innerHTML)&&je(/<[/\w]/g,e.textContent))return we(e),1;if("select"===n&&je(/<template/i,e.innerHTML))return we(e),1;if(P[n]&&!q[n])return e instanceof a&&!function(e){var t=b(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});var n=Ne(e.tagName),r=Ne(t.tagName);return e.namespaceURI===pe?t.namespaceURI===he?"svg"===n:t.namespaceURI===ue?"svg"===n&&("annotation-xml"===r||ve[r]):Boolean(be[n]):e.namespaceURI===ue?t.namespaceURI===he?"math"===n:t.namespaceURI===pe?"math"===n&&ye[r]:Boolean(ke[n]):e.namespaceURI===he&&(t.namespaceURI!==pe||ye[r])&&(t.namespaceURI!==ue||ve[r])&&(r=qe({},["title","style","font","a","script"]),!ke[n]&&(r[n]||!be[n]))}(e)||("noscript"===n||"noembed"===n)&&je(/<\/no(script|embed)/i,e.innerHTML)?(we(e),1):(W&&3===e.nodeType&&(t=e.textContent,t=De(t,F," "),t=De(t,C," "),e.textContent!==t&&(ze(c.removed,{element:e.cloneNode()}),e.textContent=t)),Te("afterSanitizeElements",e,null),0);if(ne&&!ie[n]){var r=b(e)||e.parentNode,i=y(e)||e.childNodes;if(i&&r)for(var o=i.length-1;0<=o;--o)r.insertBefore(m(i[o],!0),v(e))}return we(e),1}function Re(e,t,n){if(te&&("id"===t||"name"===t)&&(n in o||n in me))return!1;if((!Z||U[t]||!je(L,t))&&(!B||!je(z,t))){if(!j[t]||U[t])return!1;if(!le[t]&&!je(D,De(n,M,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Pe(n,"data:")||!ae[e])&&(!G||je(N,De(n,M,"")))&&n)return!1}return!0}function Oe(e){var t=void 0,n=void 0;Te("beforeSanitizeAttributes",e,null);var r=e.attributes;if(r){for(var i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j},n=r.length;n--;){var o=(l=r[n]).name,a=l.namespaceURI,t=Ie(l.value),s=Ne(o);if(i.attrName=s,i.attrValue=t,i.keepAttr=!0,i.forceKeepAttr=void 0,Te("uponSanitizeAttribute",e,i),t=i.attrValue,!i.forceKeepAttr&&(xe(o,e),i.keepAttr))if(je(/\/>/i,t))xe(o,e);else{W&&(t=De(t,F," "),t=De(t,C," "));var l=e.nodeName.toLowerCase();if(Re(l,s,t))try{a?e.setAttributeNS(a,o,t):e.setAttribute(o,t),Le(c.removed)}catch(e){}}}Te("afterSanitizeAttributes",e,null)}}function $e(e){var t,n=Se(e);for(Te("beforeSanitizeShadowDOM",e,null);t=n.nextNode();)Te("uponSanitizeShadowNode",t,null),Ee(t)||(t.content instanceof u&&$e(t.content),Oe(t));Te("afterSanitizeShadowDOM",e,null)}return c.sanitize=function(e,t){var n,r=void 0,i=void 0,o=void 0;if((fe=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ae(e)){if("function"!=typeof e.toString)throw He("toString is not a function");if("string"!=typeof(e=e.toString()))throw He("dirty is not a string, aborting")}if(!c.isSupported){if("object"===ct(s.toStaticHTML)||"function"==typeof s.toStaticHTML){if("string"==typeof e)return s.toStaticHTML(e);if(Ae(e))return s.toStaticHTML(e.outerHTML)}return e}if(Y||O(t),c.removed=[],"string"==typeof e&&(re=!1),!re)if(e instanceof p)1===(t=(r=_e("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===t.nodeName||"HTML"===t.nodeName?r=t:r.appendChild(t);else{if(!K&&!W&&!V&&-1===e.indexOf("<"))return k&&ee?k.createHTML(e):e;if(!(r=_e(e)))return K?null:w}r&&X&&we(r.firstChild);for(var a=Se(re?e:r);n=a.nextNode();)3===n.nodeType&&n===i||Ee(n)||(n.content instanceof u&&$e(n.content),Oe(n),i=n);if(i=null,re)return e;if(K){if(Q)for(o=S.call(r.ownerDocument);r.firstChild;)o.appendChild(r.firstChild);else o=r;return J&&(o=T.call(l,o,!0)),o}return e=V?r.outerHTML:r.innerHTML,W&&(e=De(e,F," "),e=De(e,C," ")),k&&ee?k.createHTML(e):e},c.setConfig=function(e){O(e),Y=!0},c.clearConfig=function(){ge=null,Y=!1},c.isValidAttribute=function(e,t,n){return ge||O({}),e=Ne(e),t=Ne(t),Re(e,t,n)},c.addHook=function(e,t){"function"==typeof t&&(R[e]=R[e]||[],ze(R[e],t))},c.removeHook=function(e){R[e]&&Le(R[e])},c.removeHooks=function(e){R[e]&&(R[e]=[])},c.removeAllHooks=function(){R={}},c}();function se(e){var t,n=e.loaded,r=e.total,i=e.step;ie||((e=v("div")).classList.add("progress"),a(g,e),ie=e),t=i?80<(t=parseInt(ie.style.width||0,10)+i)?80:t:Math.floor(n/r*100),ie.style.opacity=1,ie.style.width=95<=t?"100%":t+"%",95<=t&&(clearTimeout(oe),oe=setTimeout(function(e){ie.style.opacity=0,ie.style.width="0%"},200))}var le={};function ce(i,e,t){void 0===e&&(e=!1),void 0===t&&(t={});function o(){a.addEventListener.apply(a,arguments)}var n,a=new XMLHttpRequest,r=le[i];if(r)return{then:function(e){return e(r.content,r.opt)},abort:u};for(n in a.open("GET",i),t)l.call(t,n)&&a.setRequestHeader(n,t[n]);return a.send(),{then:function(t,n){var r;void 0===n&&(n=u),e&&(r=setInterval(function(e){return se({step:Math.floor(5*Math.random()+1)})},500),o("progress",se),o("loadend",function(e){se(e),clearInterval(r)})),o("error",n),o("load",function(e){e=e.target;400<=e.status?n(e):(e=le[i]={content:e.response,opt:{updatedAt:a.getResponseHeader("last-modified")}},t(e.content,e.opt))})},abort:function(e){return 4!==a.readyState&&a.abort()}}}function ue(e,t){e.innerHTML=e.innerHTML.replace(/var\(\s*--theme-color.*?\)/g,t)}var pe=f.title;function he(){var e,t=d("section.cover");t&&(e=t.getBoundingClientRect().height,window.pageYOffset>=e||t.classList.contains("hidden")?S(g,"add","sticky"):S(g,"remove","sticky"))}function de(e,t,r,n){var i=[];null!=(t=d(t))&&(i=k(t,"a"));var o,a=decodeURI(e.toURL(e.getCurrentPath()));return i.sort(function(e,t){return t.href.length-e.href.length}).forEach(function(e){var t=decodeURI(e.getAttribute("href")),n=r?e.parentNode:e;e.title=e.title||e.innerText,0!==a.indexOf(t)||o?S(n,"remove","active"):(o=e,S(n,"add","active"))}),n&&(f.title=o?o.title||o.innerText+" - "+pe:pe),o}function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ge=(function(e,t,n){return t&&fe(e.prototype,t),n&&fe(e,n),e}(me,[{key:"getIntermediateValue",value:function(e){return this.decimal?e:Math.round(e)}},{key:"getFinalValue",value:function(){return this.end}}]),me);function me(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,me),this.start=e.start,this.end=e.end,this.decimal=e.decimal}function ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ye=(function(e,t,n){return t&&ve(e.prototype,t),n&&ve(e,n),e}(be,[{key:"begin",value:function(){return this.isRunning||this.next===this.end||(this.frame=window.requestAnimationFrame(this._tick.bind(this))),this}},{key:"stop",value:function(){return window.cancelAnimationFrame(this.frame),this.isRunning=!1,this.frame=null,this.timeStart=null,this.next=null,this}},{key:"on",value:function(e,t){return this.events[e]=this.events[e]||[],this.events[e].push(t),this}},{key:"_emit",value:function(e,t){var n=this,e=this.events[e];e&&e.forEach(function(e){return e.call(n,t)})}},{key:"_tick",value:function(e){this.isRunning=!0;var t=this.next||this.start;this.timeStart||(this.timeStart=e),this.timeElapsed=e-this.timeStart,this.next=this.ease(this.timeElapsed,this.start,this.end-this.start,this.duration),this._shouldTick(t)?(this._emit("tick",this.tweener.getIntermediateValue(this.next)),this.frame=window.requestAnimationFrame(this._tick.bind(this))):(this._emit("tick",this.tweener.getFinalValue()),this._emit("done",null))}},{key:"_shouldTick",value:function(e){return{up:this.next<this.end&&e<=this.next,down:this.next>this.end&&e>=this.next}[this.direction]}},{key:"_defaultEase",value:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}}]),be);function be(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,be),this.duration=e.duration||1e3,this.ease=e.easing||this._defaultEase,this.tweener=e.tweener||new ge(e),this.start=this.tweener.start,this.end=this.tweener.end,this.frame=null,this.next=null,this.isRunning=!1,this.events={},this.direction=this.start<this.end?"up":"down"}var ke=document.currentScript;function we(e){var t,n=y({el:"#app",repo:"",maxLevel:6,subMaxLevel:0,loadSidebar:null,loadNavbar:null,homepage:"README.md",coverpage:"",basePath:"",auto2top:!1,name:"",themeColor:"",nameLink:window.location.pathname,autoHeader:!1,executeScript:null,noEmoji:!1,ga:"",ext:".md",mergeNavbar:!1,formatUpdated:"",externalLinkTarget:"_blank",cornerExternalLinkTarget:"_blank",externalLinkRel:"noopener",routerMode:"hash",noCompileLinks:[],crossOriginLinks:[],relativePath:!1,topMargin:0},"function"==typeof window.$docsify?window.$docsify(e):window.$docsify),r=ke||[].slice.call(document.getElementsByTagName("script")).filter(function(e){return/docsify\./.test(e.src)})[0];if(r)for(var i in n){!l.call(n,i)||c(t=r.getAttribute("data-"+o(i)))&&(n[i]=""===t||t)}return!0===n.loadSidebar&&(n.loadSidebar="_sidebar"+n.ext),!0===n.loadNavbar&&(n.loadNavbar="_navbar"+n.ext),!0===n.coverpage&&(n.coverpage="_coverpage"+n.ext),!0===n.repo&&(n.repo=""),!0===n.name&&(n.name=""),window.$docsify=n}var xe={},_e=!1,Se=null,Ae=!0,Te=0;function Ee(e){if(Ae){for(var t,n,r=d(".sidebar"),i=k(".anchor"),o=b(r,".sidebar-nav"),a=b(r,"li.active"),s=document.documentElement,l=(s&&s.scrollTop||document.body.scrollTop)-Te,c=0,u=i.length;c<u;c+=1){var p=i[c];if(p.offsetTop>l){t=t||p;break}t=p}!t||(n=xe[Re(e,t.getAttribute("data-id"))])&&n!==a&&(a&&a.classList.remove("active"),n.classList.add("active"),a=n,!_e&&g.classList.contains("sticky")&&(s=r.clientHeight,e=a.offsetTop+a.clientHeight+40,n=a.offsetTop>=o.scrollTop&&e<=o.scrollTop+s,a=+e<s,r.scrollTop=n?o.scrollTop:a?0:e-s))}}function Re(e,t){return decodeURIComponent(e)+"?id="+decodeURIComponent(t)}function Oe(e,t){var n,r;t&&(r=we().topMargin,(n=b("#"+t))&&(n=n,void 0===(r=r)&&(r=0),Se&&Se.stop(),Ae=!1,Se=new ye({start:window.pageYOffset,end:Math.round(n.getBoundingClientRect().top)+window.pageYOffset-r,duration:500}).on("tick",function(e){return window.scrollTo(0,e)}).on("done",function(){Ae=!0,Se=null}).begin()),e=xe[Re(e,t)],(t=b(d(".sidebar"),"li.active"))&&t.classList.remove("active"),e&&e.classList.add("active"))}var $e=f.scrollingElement||f.documentElement;var dt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ft(e,t){return e(t={exports:{}},t.exports),t.exports}function gt(e){return wt[e]}var mt=ft(function(t){function e(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}t.exports={defaults:e(),getDefaults:e,changeDefaults:function(e){t.exports.defaults=e}}}),vt=(mt.defaults,mt.getDefaults,mt.changeDefaults,/[&<>"']/),yt=/[&<>"']/g,bt=/[<>"']|&(?!#?\w+;)/,kt=/[<>"']|&(?!#?\w+;)/g,wt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};var xt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function _t(e){return e.replace(xt,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}var St=/(^|[^\[])\^/g;var At=/[^\w:]/g,Tt=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var Et={},Rt=/^[^:]+:\/*[^/]*$/,Ot=/^([^:]+:)[\s\S]*$/,$t=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Ft(e,t){Et[" "+e]||(Rt.test(e)?Et[" "+e]=e+"/":Et[" "+e]=Ct(e,"/",!0));var n=-1===(e=Et[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(Ot,"$1")+t:"/"===t.charAt(0)?n?t:e.replace($t,"$1")+t:e+t}function Ct(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i<r;){var o=e.charAt(r-i-1);if(o!==t||n){if(o===t||!n)break;i++}else i++}return e.substr(0,r-i)}var Lt=function(e,t){if(t){if(vt.test(e))return e.replace(yt,gt)}else if(bt.test(e))return e.replace(kt,gt);return e},zt=_t,Nt=function(n,e){n=n.source||n,e=e||"";var r={replace:function(e,t){return t=(t=t.source||t).replace(St,"$1"),n=n.replace(e,t),r},getRegex:function(){return new RegExp(n,e)}};return r},Mt=function(e,t,n){if(e){var r;try{r=decodeURIComponent(_t(n)).replace(At,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!Tt.test(n)&&(n=Ft(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},Dt={exec:function(){}},Pt=function(e){for(var t,n,r=arguments,i=1;i<arguments.length;i++)for(n in t=r[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},It=function(e,t){var n=e.replace(/\|/g,function(e,t,n){for(var r=!1,i=t;0<=--i&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},I=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&--r<0)return i;return-1},ee=function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")},Q=function(e,t){if(t<1)return"";for(var n="";1<t;)1&t&&(n+=e),t>>=1,e+=e;return n+e},jt=mt.defaults,Ht=Ct,qt=It,Ut=Lt,Bt=I;function Zt(e,t,n){var r=t.href,i=t.title?Ut(t.title):null,t=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:t}:{type:"image",raw:n,href:r,title:i,text:Ut(t)}}var Gt=function(){function e(e){this.options=e||jt}return e.prototype.space=function(e){e=this.rules.block.newline.exec(e);if(e)return 1<e[0].length?{type:"space",raw:e[0]}:{raw:"\n"}},e.prototype.code=function(e,t){e=this.rules.block.code.exec(e);if(e){t=t[t.length-1];if(t&&"paragraph"===t.type)return{raw:e[0],text:e[0].trimRight()};t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Ht(t,"\n")}}},e.prototype.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],e=function(e,t){if(null===(e=e.match(/^(\s+)(?:```)/)))return t;var n=e[1];return t.split("\n").map(function(e){var t=e.match(/^\s+/);return null!==t&&t[0].length>=n.length?e.slice(n.length):e}).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:e}}},e.prototype.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();return/#$/.test(n)&&(e=Ht(n,"#"),!this.options.pedantic&&e&&!/ $/.test(e)||(n=e.trim())),{type:"heading",raw:t[0],depth:t[1].length,text:n}}},e.prototype.nptable=function(e){e=this.rules.block.nptable.exec(e);if(e){var t={type:"table",header:qt(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(t.header.length===t.align.length){for(var n=t.align.length,r=0;r<n;r++)/^ *-+: *$/.test(t.align[r])?t.align[r]="right":/^ *:-+: *$/.test(t.align[r])?t.align[r]="center":/^ *:-+ *$/.test(t.align[r])?t.align[r]="left":t.align[r]=null;for(n=t.cells.length,r=0;r<n;r++)t.cells[r]=qt(t.cells[r],t.header.length);return t}}},e.prototype.hr=function(e){e=this.rules.block.hr.exec(e);if(e)return{type:"hr",raw:e[0]}},e.prototype.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){e=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:e}}},e.prototype.list=function(e){e=this.rules.block.list.exec(e);if(e){for(var t,n,r,i,o,a=e[0],s=e[2],l=1<s.length,c={type:"list",raw:a,ordered:l,start:l?+s.slice(0,-1):"",loose:!1,items:[]},u=e[0].match(this.rules.block.item),p=!1,h=u.length,d=this.rules.block.listItemStart.exec(u[0]),f=0;f<h;f++){if(a=t=u[f],f!==h-1){if(r=this.rules.block.listItemStart.exec(u[f+1]),this.options.pedantic?r[1].length>d[1].length:r[1].length>d[0].length||3<r[1].length){u.splice(f,2,u[f]+"\n"+u[f+1]),f--,h--;continue}(!this.options.pedantic||this.options.smartLists?r[2][r[2].length-1]!==s[s.length-1]:l==(1===r[2].length))&&(n=u.slice(f+1).join("\n"),c.raw=c.raw.substring(0,c.raw.length-n.length),f=h-1),d=r}r=t.length,~(t=t.replace(/^ *([*+-]|\d+[.)]) ?/,"")).indexOf("\n ")&&(r-=t.length,t=this.options.pedantic?t.replace(/^ {1,4}/gm,""):t.replace(new RegExp("^ {1,"+r+"}","gm"),"")),r=p||/\n\n(?!\s*$)/.test(t),f!==h-1&&(p="\n"===t.charAt(t.length-1),r=r||p),r&&(c.loose=!0),this.options.gfm&&(o=void 0,(i=/^\[[ xX]\] /.test(t))&&(o=" "!==t[1],t=t.replace(/^\[[ xX]\] +/,""))),c.items.push({type:"list_item",raw:a,task:i,checked:o,loose:r,text:t})}return c}},e.prototype.html=function(e){e=this.rules.block.html.exec(e);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):Ut(e[0]):e[0]}},e.prototype.def=function(e){e=this.rules.block.def.exec(e);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}},e.prototype.table=function(e){e=this.rules.block.table.exec(e);if(e){var t={type:"table",header:qt(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=e[0];for(var n=t.align.length,r=0;r<n;r++)/^ *-+: *$/.test(t.align[r])?t.align[r]="right":/^ *:-+: *$/.test(t.align[r])?t.align[r]="center":/^ *:-+ *$/.test(t.align[r])?t.align[r]="left":t.align[r]=null;for(n=t.cells.length,r=0;r<n;r++)t.cells[r]=qt(t.cells[r].replace(/^ *\| *| *\| *$/g,""),t.header.length);return t}}},e.prototype.lheading=function(e){e=this.rules.block.lheading.exec(e);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1]}},e.prototype.paragraph=function(e){e=this.rules.block.paragraph.exec(e);if(e)return{type:"paragraph",raw:e[0],text:"\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1]}},e.prototype.text=function(e,t){e=this.rules.block.text.exec(e);if(e){t=t[t.length-1];return t&&"text"===t.type?{raw:e[0],text:e[0]}:{type:"text",raw:e[0],text:e[0]}}},e.prototype.escape=function(e){e=this.rules.inline.escape.exec(e);if(e)return{type:"escape",raw:e[0],text:Ut(e[1])}},e.prototype.tag=function(e,t,n){e=this.rules.inline.tag.exec(e);if(e)return!t&&/^<a /i.test(e[0])?t=!0:t&&/^<\/a>/i.test(e[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):Ut(e[0]):e[0]}},e.prototype.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;e=Ht(n.slice(0,-1),"\\");if((n.length-e.length)%2==0)return}else{var r=Bt(t[2],"()");-1<r&&(o=(0===t[0].indexOf("!")?5:4)+t[1].length+r,t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,o).trim(),t[3]="")}var i,r=t[2],o="";return this.options.pedantic?(i=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r),i&&(r=i[1],o=i[3])):o=t[3]?t[3].slice(1,-1):"",r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(n)?r.slice(1):r.slice(1,-1)),Zt(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:o?o.replace(this.rules.inline._escapes,"$1"):o},t[0])}},e.prototype.reflink=function(e,t){if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){e=(n[2]||n[1]).replace(/\s+/g," ");if((e=t[e.toLowerCase()])&&e.href)return Zt(n,e,n[0]);var n=n[0].charAt(0);return{type:"text",raw:n,text:n}}},e.prototype.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},e.prototype.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},e.prototype.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),e=/^ /.test(n)&&/ $/.test(n);return r&&e&&(n=n.substring(1,n.length-1)),n=Ut(n,!0),{type:"codespan",raw:t[0],text:n}}},e.prototype.br=function(e){e=this.rules.inline.br.exec(e);if(e)return{type:"br",raw:e[0]}},e.prototype.del=function(e){e=this.rules.inline.del.exec(e);if(e)return{type:"del",raw:e[0],text:e[2]}},e.prototype.autolink=function(e,t){e=this.rules.inline.autolink.exec(e);if(e){var n,t="@"===e[2]?"mailto:"+(n=Ut(this.options.mangle?t(e[1]):e[1])):n=Ut(e[1]);return{type:"link",raw:e[0],text:n,href:t,tokens:[{type:"text",raw:n,text:n}]}}},e.prototype.url=function(e,t){var n,r,i,o;if(n=this.rules.inline.url.exec(e)){if("@"===n[2])i="mailto:"+(r=Ut(this.options.mangle?t(n[0]):n[0]));else{for(;o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0],o!==n[0];);r=Ut(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},e.prototype.inlineText=function(e,t,n){e=this.rules.inline.text.exec(e);if(e){n=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):Ut(e[0]):e[0]:Ut(this.options.smartypants?n(e[0]):e[0]);return{type:"text",raw:e[0],text:n}}},e}(),It=Dt,I=Nt,Dt=Pt,Nt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:It,table:It,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Nt.def=I(Nt.def).replace("label",Nt._label).replace("title",Nt._title).getRegex(),Nt.bullet=/(?:[*+-]|\d{1,9}[.)])/,Nt.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Nt.item=I(Nt.item,"gm").replace(/bull/g,Nt.bullet).getRegex(),Nt.listItemStart=I(/^( *)(bull)/).replace("bull",Nt.bullet).getRegex(),Nt.list=I(Nt.list).replace(/bull/g,Nt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Nt.def.source+")").getRegex(),Nt._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Nt._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Nt.html=I(Nt.html,"i").replace("comment",Nt._comment).replace("tag",Nt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Nt.paragraph=I(Nt._paragraph).replace("hr",Nt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Nt._tag).getRegex(),Nt.blockquote=I(Nt.blockquote).replace("paragraph",Nt.paragraph).getRegex(),Nt.normal=Dt({},Nt),Nt.gfm=Dt({},Nt.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Nt.gfm.nptable=I(Nt.gfm.nptable).replace("hr",Nt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Nt._tag).getRegex(),Nt.gfm.table=I(Nt.gfm.table).replace("hr",Nt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Nt._tag).getRegex(),Nt.pedantic=Dt({},Nt.normal,{html:I("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Nt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:It,paragraph:I(Nt.normal._paragraph).replace("hr",Nt.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Nt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});It={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:It,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:It,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};It.punctuation=I(It.punctuation).replace(/punctuation/g,It._punctuation).getRegex(),It._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",It._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",It._comment=I(Nt._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),It.em.start=I(It.em.start).replace(/punctuation/g,It._punctuation).getRegex(),It.em.middle=I(It.em.middle).replace(/punctuation/g,It._punctuation).replace(/overlapSkip/g,It._overlapSkip).getRegex(),It.em.endAst=I(It.em.endAst,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.em.endUnd=I(It.em.endUnd,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.strong.start=I(It.strong.start).replace(/punctuation/g,It._punctuation).getRegex(),It.strong.middle=I(It.strong.middle).replace(/punctuation/g,It._punctuation).replace(/overlapSkip/g,It._overlapSkip).getRegex(),It.strong.endAst=I(It.strong.endAst,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.strong.endUnd=I(It.strong.endUnd,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.blockSkip=I(It._blockSkip,"g").getRegex(),It.overlapSkip=I(It._overlapSkip,"g").getRegex(),It._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,It._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,It._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,It.autolink=I(It.autolink).replace("scheme",It._scheme).replace("email",It._email).getRegex(),It._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,It.tag=I(It.tag).replace("comment",It._comment).replace("attribute",It._attribute).getRegex(),It._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,It._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,It._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,It.link=I(It.link).replace("label",It._label).replace("href",It._href).replace("title",It._title).getRegex(),It.reflink=I(It.reflink).replace("label",It._label).getRegex(),It.reflinkSearch=I(It.reflinkSearch,"g").replace("reflink",It.reflink).replace("nolink",It.nolink).getRegex(),It.normal=Dt({},It),It.pedantic=Dt({},It.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",It._label).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",It._label).getRegex()}),It.gfm=Dt({},It.normal,{escape:I(It.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),It.gfm.url=I(It.gfm.url,"i").replace("email",It.gfm._extended_email).getRegex(),It.breaks=Dt({},It.gfm,{br:I(It.br).replace("{2,}","*").getRegex(),text:I(It.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var It={block:Nt,inline:It},Wt=mt.defaults,Vt=It.block,Yt=It.inline,Xt=Q;function Kt(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function Qt(e){for(var t,n="",r=e.length,i=0;i<r;i++)t=e.charCodeAt(i),.5<Math.random()&&(t="x"+t.toString(16)),n+="&#"+t+";";return n}var Jt=function(){function n(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Wt,this.options.tokenizer=this.options.tokenizer||new Gt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;e={block:Vt.normal,inline:Yt.normal};this.options.pedantic?(e.block=Vt.pedantic,e.inline=Yt.pedantic):this.options.gfm&&(e.block=Vt.gfm,this.options.breaks?e.inline=Yt.breaks:e.inline=Yt.gfm),this.tokenizer.rules=e}var e={rules:{configurable:!0}};return e.rules.get=function(){return{block:Vt,inline:Yt}},n.lex=function(e,t){return new n(t).lex(e)},n.lexInline=function(e,t){return new n(t).inlineTokens(e)},n.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g,"    "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},n.prototype.blockTokens=function(e,t,n){var r,i,o,a;for(void 0===t&&(t=[]),void 0===n&&(n=!0),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((a=t[t.length-1]).raw+="\n"+r.raw,a.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),o=r.items.length,i=0;i<o;i++)r.items[i].tokens=this.blockTokens(r.items[i].text,[],!1);t.push(r)}else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.def(e)))e=e.substring(r.raw.length),this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.paragraph(e)))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.text(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((a=t[t.length-1]).raw+="\n"+r.raw,a.text+="\n"+r.text);else if(e){var s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}throw new Error(s)}return t},n.prototype.inline=function(e){for(var t,n,r,i,o,a=e.length,s=0;s<a;s++)switch((o=e[s]).type){case"paragraph":case"text":case"heading":o.tokens=[],this.inlineTokens(o.text,o.tokens);break;case"table":for(o.tokens={header:[],cells:[]},r=o.header.length,t=0;t<r;t++)o.tokens.header[t]=[],this.inlineTokens(o.header[t],o.tokens.header[t]);for(r=o.cells.length,t=0;t<r;t++)for(i=o.cells[t],o.tokens.cells[t]=[],n=0;n<i.length;n++)o.tokens.cells[t][n]=[],this.inlineTokens(i[n],o.tokens.cells[t][n]);break;case"blockquote":this.inline(o.tokens);break;case"list":for(r=o.items.length,t=0;t<r;t++)this.inline(o.items[t].tokens)}return e},n.prototype.inlineTokens=function(e,t,n,r){var i;void 0===t&&(t=[]),void 0===n&&(n=!1),void 0===r&&(r=!1);var o,a,s,l=e;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(0<c.length)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+Xt("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+Xt("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(a||(s=""),a=!1,i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e,n,r))e=e.substring(i.raw.length),n=i.inLink,r=i.inRawBlock,t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.strong(e,l,s))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.em(e,l,s))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.autolink(e,Qt))e=e.substring(i.raw.length),t.push(i);else if(n||!(i=this.tokenizer.url(e,Qt))){if(i=this.tokenizer.inlineText(e,r,Kt))e=e.substring(i.raw.length),s=i.raw.slice(-1),a=!0,t.push(i);else if(e){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}}else e=e.substring(i.raw.length),t.push(i);return t},Object.defineProperties(n,e),n}(),en=mt.defaults,tn=Mt,nn=Lt,rn=function(){function e(e){this.options=e||en}return e.prototype.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];return!this.options.highlight||null!=(t=this.options.highlight(e,r))&&t!==e&&(n=!0,e=t),e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="'+this.options.langPrefix+nn(r,!0)+'">'+(n?e:nn(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:nn(e,!0))+"</code></pre>\n"},e.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},e.prototype.html=function(e){return e},e.prototype.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},e.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},e.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},e.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},e.prototype.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},e.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},e.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n"+(t=t&&"<tbody>"+t+"</tbody>")+"</table>\n"},e.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},e.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},e.prototype.strong=function(e){return"<strong>"+e+"</strong>"},e.prototype.em=function(e){return"<em>"+e+"</em>"},e.prototype.codespan=function(e){return"<code>"+e+"</code>"},e.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},e.prototype.del=function(e){return"<del>"+e+"</del>"},e.prototype.link=function(e,t,n){if(null===(e=tn(this.options.sanitize,this.options.baseUrl,e)))return n;e='<a href="'+nn(e)+'"';return t&&(e+=' title="'+t+'"'),e+=">"+n+"</a>"},e.prototype.image=function(e,t,n){if(null===(e=tn(this.options.sanitize,this.options.baseUrl,e)))return n;n='<img src="'+e+'" alt="'+n+'"';return t&&(n+=' title="'+t+'"'),n+=this.options.xhtml?"/>":">"},e.prototype.text=function(e){return e},e}(),on=function(){function e(){}return e.prototype.strong=function(e){return e},e.prototype.em=function(e){return e},e.prototype.codespan=function(e){return e},e.prototype.del=function(e){return e},e.prototype.html=function(e){return e},e.prototype.text=function(e){return e},e.prototype.link=function(e,t,n){return""+n},e.prototype.image=function(e,t,n){return""+n},e.prototype.br=function(){return""},e}(),an=function(){function e(){this.seen={}}return e.prototype.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},e.prototype.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n))for(r=this.seen[e];n=e+"-"+ ++r,this.seen.hasOwnProperty(n););return t||(this.seen[e]=r,this.seen[n]=0),n},e.prototype.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),sn=mt.defaults,ln=zt,cn=function(){function n(e){this.options=e||sn,this.options.renderer=this.options.renderer||new rn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new on,this.slugger=new an}return n.parse=function(e,t){return new n(t).parse(e)},n.parseInline=function(e,t){return new n(t).parseInline(e)},n.prototype.parse=function(e,t){void 0===t&&(t=!0);for(var n,r,i,o,a,s,l,c,u,p,h,d,f,g,m,v="",y=e.length,b=0;b<y;b++)switch((c=e[b]).type){case"space":continue;case"hr":v+=this.renderer.hr();continue;case"heading":v+=this.renderer.heading(this.parseInline(c.tokens),c.depth,ln(this.parseInline(c.tokens,this.textRenderer)),this.slugger);continue;case"code":v+=this.renderer.code(c.text,c.lang,c.escaped);continue;case"table":for(s=u="",i=c.header.length,n=0;n<i;n++)s+=this.renderer.tablecell(this.parseInline(c.tokens.header[n]),{header:!0,align:c.align[n]});for(u+=this.renderer.tablerow(s),l="",i=c.cells.length,n=0;n<i;n++){for(s="",o=(a=c.tokens.cells[n]).length,r=0;r<o;r++)s+=this.renderer.tablecell(this.parseInline(a[r]),{header:!1,align:c.align[r]});l+=this.renderer.tablerow(s)}v+=this.renderer.table(u,l);continue;case"blockquote":l=this.parse(c.tokens),v+=this.renderer.blockquote(l);continue;case"list":for(u=c.ordered,k=c.start,p=c.loose,i=c.items.length,l="",n=0;n<i;n++)f=(d=c.items[n]).checked,g=d.task,h="",d.task&&(m=this.renderer.checkbox(f),p?0<d.tokens.length&&"text"===d.tokens[0].type?(d.tokens[0].text=m+" "+d.tokens[0].text,d.tokens[0].tokens&&0<d.tokens[0].tokens.length&&"text"===d.tokens[0].tokens[0].type&&(d.tokens[0].tokens[0].text=m+" "+d.tokens[0].tokens[0].text)):d.tokens.unshift({type:"text",text:m}):h+=m),h+=this.parse(d.tokens,p),l+=this.renderer.listitem(h,g,f);v+=this.renderer.list(l,u,k);continue;case"html":v+=this.renderer.html(c.text);continue;case"paragraph":v+=this.renderer.paragraph(this.parseInline(c.tokens));continue;case"text":for(l=c.tokens?this.parseInline(c.tokens):c.text;b+1<y&&"text"===e[b+1].type;)l+="\n"+((c=e[++b]).tokens?this.parseInline(c.tokens):c.text);v+=t?this.renderer.paragraph(l):l;continue;default:var k='Token with "'+c.type+'" type was not found.';if(this.options.silent)return void console.error(k);throw new Error(k)}return v},n.prototype.parseInline=function(e,t){t=t||this.renderer;for(var n="",r=e.length,i=0;i<r;i++)switch((o=e[i]).type){case"escape":n+=t.text(o.text);break;case"html":n+=t.html(o.text);break;case"link":n+=t.link(o.href,o.title,this.parseInline(o.tokens,t));break;case"image":n+=t.image(o.href,o.title,o.text);break;case"strong":n+=t.strong(this.parseInline(o.tokens,t));break;case"em":n+=t.em(this.parseInline(o.tokens,t));break;case"codespan":n+=t.codespan(o.text);break;case"br":n+=t.br();break;case"del":n+=t.del(this.parseInline(o.tokens,t));break;case"text":n+=t.text(o.text);break;default:var o='Token with "'+o.type+'" type was not found.';if(this.options.silent)return void console.error(o);throw new Error(o)}return n},n}(),un=Pt,pn=ee,hn=Lt,Lt=mt.getDefaults,dn=mt.changeDefaults,mt=mt.defaults;function fn(e,n,r){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof n&&(r=n,n=null),n=un({},fn.defaults,n||{}),pn(n),r){var i,o=n.highlight;try{i=Jt.lex(e,n)}catch(e){return r(e)}function a(t){var e;if(!t)try{e=cn.parse(i,n)}catch(e){t=e}return n.highlight=o,t?r(t):r(null,e)}if(!o||o.length<3)return a();if(delete n.highlight,!i.length)return a();var s=0;return fn.walkTokens(i,function(n){"code"===n.type&&(s++,setTimeout(function(){o(n.text,n.lang,function(e,t){return e?a(e):(null!=t&&t!==n.text&&(n.text=t,n.escaped=!0),void(0===--s&&a()))})},0))}),void(0===s&&a())}try{var t=Jt.lex(e,n);return n.walkTokens&&fn.walkTokens(t,n.walkTokens),cn.parse(t,n)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",n.silent)return"<p>An error occurred:</p><pre>"+hn(e.message+"",!0)+"</pre>";throw e}}fn.options=fn.setOptions=function(e){return un(fn.defaults,e),dn(fn.defaults),fn},fn.getDefaults=Lt,fn.defaults=mt,fn.use=function(o){var t,e=un({},o);if(o.renderer){var n,a=fn.defaults.renderer||new rn;for(n in o.renderer)!function(r){var i=a[r];a[r]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=o.renderer[r].apply(a,e);return!1===n&&(n=i.apply(a,e)),n}}(n);e.renderer=a}if(o.tokenizer){var i,s=fn.defaults.tokenizer||new Gt;for(i in o.tokenizer)!function(){var r=s[i];s[i]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=o.tokenizer[i].apply(s,e);return!1===n&&(n=r.apply(s,e)),n}}();e.tokenizer=s}o.walkTokens&&(t=fn.defaults.walkTokens,e.walkTokens=function(e){o.walkTokens(e),t&&t(e)}),fn.setOptions(e)},fn.walkTokens=function(e,t){for(var n=0,r=e;n<r.length;n+=1){var i=r[n];switch(t(i),i.type){case"table":for(var o=0,a=i.tokens.header;o<a.length;o+=1){var s=a[o];fn.walkTokens(s,t)}for(var l=0,c=i.tokens.cells;l<c.length;l+=1)for(var u=0,p=c[l];u<p.length;u+=1){var h=p[u];fn.walkTokens(h,t)}break;case"list":fn.walkTokens(i.items,t);break;default:i.tokens&&fn.walkTokens(i.tokens,t)}}},fn.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=un({},fn.defaults,t||{}),pn(t);try{var n=Jt.lexInline(e,t);return t.walkTokens&&fn.walkTokens(n,t.walkTokens),cn.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+hn(e.message+"",!0)+"</pre>";throw e}},fn.Parser=cn,fn.parser=cn.parse,fn.Renderer=rn,fn.TextRenderer=on,fn.Lexer=Jt,fn.lexer=Jt.lex,fn.Tokenizer=Gt,fn.Slugger=an;var gn=fn.parse=fn;function mn(e,n){if(void 0===n&&(n='<ul class="app-sub-sidebar">{inner}</ul>'),!e||!e.length)return"";var r="";return e.forEach(function(e){var t=e.title.replace(/(<([^>]+)>)/g,"");r+='<li><a class="section-link" href="'+e.slug+'" title="'+t+'">'+e.title+"</a></li>",e.children&&(r+=mn(e.children,n))}),n.replace("{inner}",r)}function vn(e,t){return'<p class="'+e+'">'+t.slice(5).trim()+"</p>"}function yn(e,r){var i=[],o={};return e.forEach(function(e){var t=e.level||1,n=t-1;r<t||(o[n]?o[n].children=(o[n].children||[]).concat(e):i.push(e),o[t]=e)}),i}var bn={},kn=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g;function wn(e){return e.toLowerCase()}function xn(e){if("string"!=typeof e)return"";var t=e.trim().replace(/[A-Z]+/g,wn).replace(/<[^>]+>/g,"").replace(kn,"").replace(/\s/g,"-").replace(/-+/g,"-").replace(/^(\d)/,"_$1"),e=bn[t],e=l.call(bn,t)?e+1:0;return(bn[t]=e)&&(t=t+"-"+e),t}function _n(e,t){return'<img class="emoji" src="https://github.githubassets.com/images/icons/emoji/'+t+'.png" alt="'+t+'" />'}function Sn(e){void 0===e&&(e="");var r={};return{str:e=e&&e.replace(/^('|")/,"").replace(/('|")$/,"").replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/g,function(e,t,n){return-1===t.indexOf(":")?(r[t]=n&&n.replace(/&quot;/g,"")||!0,""):e}).trim(),config:r}}function An(e){return void 0===e&&(e=""),e.replace(/(<\/?a.*?>)/gi,"")}xn.clear=function(){bn={}};var Tn,En=ft(function(e){var a,s,l,c,u,r,t,i=function(l){var c=/\blang(?:uage)?-([\w-]+)\b/i,t=0,$={manual:l.Prism&&l.Prism.manual,disableWorkerMessageHandler:l.Prism&&l.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof F?new F(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function n(e,r){var i,t;switch(r=r||{},$.util.type(e)){case"Object":if(t=$.util.objId(e),r[t])return r[t];for(var o in i={},r[t]=i,e)e.hasOwnProperty(o)&&(i[o]=n(e[o],r));return i;case"Array":return(t=$.util.objId(e),r[t])?r[t]:(i=[],r[t]=i,e.forEach(function(e,t){i[t]=n(e,r)}),i);default:return e}},getLanguage:function(e){for(;e&&!c.test(e.className);)e=e.parentElement;return e?(e.className.match(c)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(e){var t=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(e.stack)||[])[1];if(t){var n,r=document.getElementsByTagName("script");for(n in r)if(r[n].src==t)return r[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{extend:function(e,t){var n,r=$.util.clone($.languages[e]);for(n in t)r[n]=t[n];return r},insertBefore:function(n,e,t,r){var i,o=(r=r||$.languages)[n],a={};for(i in o)if(o.hasOwnProperty(i)){if(i==e)for(var s in t)t.hasOwnProperty(s)&&(a[s]=t[s]);t.hasOwnProperty(i)||(a[i]=o[i])}var l=r[n];return r[n]=a,$.languages.DFS($.languages,function(e,t){t===l&&e!=n&&(this[e]=a)}),a},DFS:function e(t,n,r,i){i=i||{};var o,a,s,l=$.util.objId;for(o in t){t.hasOwnProperty(o)&&(n.call(t,o,t[o],r||o),a=t[o],"Object"!==(s=$.util.type(a))||i[l(a)]?"Array"!==s||i[l(a)]||(i[l(a)]=!0,e(a,n,o,i)):(i[l(a)]=!0,e(a,n,null,i)))}}},plugins:{},highlightAll:function(e,t){$.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};$.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),$.hooks.run("before-all-elements-highlight",r);for(var i,o=0;i=r.elements[o++];)$.highlightElement(i,!0===t,r.callback)},highlightElement:function(e,t,n){var r=$.util.getLanguage(e),i=$.languages[r];e.className=e.className.replace(c,"").replace(/\s+/g," ")+" language-"+r;var o=e.parentElement;o&&"pre"===o.nodeName.toLowerCase()&&(o.className=o.className.replace(c,"").replace(/\s+/g," ")+" language-"+r);var a={element:e,language:r,grammar:i,code:e.textContent};function s(e){a.highlightedCode=e,$.hooks.run("before-insert",a),a.element.innerHTML=a.highlightedCode,$.hooks.run("after-highlight",a),$.hooks.run("complete",a),n&&n.call(a.element)}if($.hooks.run("before-sanity-check",a),!a.code)return $.hooks.run("complete",a),void(n&&n.call(a.element));$.hooks.run("before-highlight",a),a.grammar?t&&l.Worker?((t=new Worker($.filename)).onmessage=function(e){s(e.data)},t.postMessage(JSON.stringify({language:a.language,code:a.code,immediateClose:!0}))):s($.highlight(a.code,a.grammar,a.language)):s($.util.encode(a.code))},highlight:function(e,t,n){n={code:e,grammar:t,language:n};return $.hooks.run("before-tokenize",n),n.tokens=$.tokenize(n.code,n.grammar),$.hooks.run("after-tokenize",n),F.stringify($.util.encode(n.tokens),n.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new o;return L(i,i.head,e),function e(t,n,r,i,o,a){for(var s in r)if(r.hasOwnProperty(s)&&r[s]){var l=r[s];l=Array.isArray(l)?l:[l];for(var c=0;c<l.length;++c){if(a&&a.cause==s+","+c)return;var u,p=l[c],h=p.inside,d=!!p.lookbehind,f=!!p.greedy,g=p.alias;f&&!p.pattern.global&&(u=p.pattern.toString().match(/[imsuy]*$/)[0],p.pattern=RegExp(p.pattern.source,u+"g"));for(var m=p.pattern||p,v=i.next,y=o;v!==n.tail&&!(a&&y>=a.reach);y+=v.value.length,v=v.next){var b=v.value;if(n.length>t.length)return;if(!(b instanceof F)){var k,w=1;if(f){if(!(k=C(m,y,t,d)))break;var x=k.index,_=k.index+k[0].length,S=y;for(S+=v.value.length;S<=x;)v=v.next,S+=v.value.length;if(S-=v.value.length,y=S,v.value instanceof F)continue;for(var A=v;A!==n.tail&&(S<_||"string"==typeof A.value);A=A.next)w++,S+=A.value.length;w--,b=t.slice(y,S),k.index-=y}else if(!(k=C(m,0,b,d)))continue;var x=k.index,T=k[0],E=b.slice(0,x),R=b.slice(x+T.length),O=y+b.length;a&&O>a.reach&&(a.reach=O);var b=v.prev;E&&(b=L(n,b,E),y+=E.length),z(n,b,w);var T=new F(s,h?$.tokenize(T,h):T,g,T);v=L(n,b,T),R&&L(n,v,R),1<w&&e(t,n,r,v.prev,y,{cause:s+","+c,reach:O})}}}}}(e,i,t,i.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(i)},hooks:{all:{},add:function(e,t){var n=$.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=$.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:F};function F(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function C(e,t,n,r){e.lastIndex=t;n=e.exec(n);return n&&r&&n[1]&&(r=n[1].length,n.index+=r,n[0]=n[0].slice(r)),n}function o(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function L(e,t,n){var r=t.next,n={value:n,prev:t,next:r};return t.next=n,r.prev=n,e.length++,n}function z(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;(t.next=r).prev=t,e.length-=i}if(l.Prism=$,F.stringify=function t(e,n){if("string"==typeof e)return e;if(Array.isArray(e)){var r="";return e.forEach(function(e){r+=t(e,n)}),r}var i={type:e.type,content:t(e.content,n),tag:"span",classes:["token",e.type],attributes:{},language:n},e=e.alias;e&&(Array.isArray(e)?Array.prototype.push.apply(i.classes,e):i.classes.push(e)),$.hooks.run("wrap",i);var o,a="";for(o in i.attributes)a+=" "+o+'="'+(i.attributes[o]||"").replace(/"/g,"&quot;")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+a+">"+i.content+"</"+i.tag+">"},!l.document)return l.addEventListener&&($.disableWorkerMessageHandler||l.addEventListener("message",function(e){var t=JSON.parse(e.data),n=t.language,e=t.code,t=t.immediateClose;l.postMessage($.highlight(e,$.languages[n],n)),t&&l.close()},!1)),$;var e,n=$.util.currentScript();function r(){$.manual||$.highlightAll()}return n&&($.filename=n.src,n.hasAttribute("data-manual")&&($.manual=!0)),$.manual||("loading"===(e=document.readyState)||"interactive"===e&&n&&n.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)),$}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});function p(e,t){var n=(n=e.className).replace(r," ")+" language-"+t;e.className=n.replace(/\s+/g," ").trim()}e.exports&&(e.exports=i),void 0!==dt&&(dt.Prism=i),i.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},i.languages.markup.tag.inside["attr-value"].inside.entity=i.languages.markup.entity,i.languages.markup.doctype.inside["internal-subset"].inside=i.languages.markup,i.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(i.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:i.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;n={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};n["language-"+t]={pattern:/[\s\S]+/,inside:i.languages[t]};t={};t[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},i.languages.insertBefore("markup","cdata",t)}}),i.languages.html=i.languages.markup,i.languages.mathml=i.languages.markup,i.languages.svg=i.languages.markup,i.languages.xml=i.languages.extend("markup",{}),i.languages.ssml=i.languages.xml,i.languages.atom=i.languages.xml,i.languages.rss=i.languages.xml,function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;t=e.languages.markup;t&&(t.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i,lookbehind:!0,inside:{"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{style:{pattern:/(["'])[\s\S]+(?=["']$)/,lookbehind:!0,alias:"language-css",inside:e.languages.css},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},"attr-name":/^style/i}}},t.tag))}(i),i.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},i.languages.javascript=i.languages.extend("clike",{"class-name":[i.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),i.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,i.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:i.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:i.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:i.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:i.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:i.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),i.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:i.languages.javascript}},string:/[\s\S]+/}}}),i.languages.markup&&i.languages.markup.tag.addInlined("script","javascript"),i.languages.js=i.languages.javascript,"undefined"!=typeof self&&self.Prism&&self.document&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),a=window.Prism,s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},u="pre[data-src]:not(["+(l="data-src-status")+'="loaded"]):not(['+l+'="'+(c="loading")+'"])',r=/\blang(?:uage)?-([\w-]+)\b/i,a.hooks.add("before-highlightall",function(e){e.selector+=", "+u}),a.hooks.add("before-sanity-check",function(e){var t,n,r,i,o=e.element;o.matches(u)&&(e.code="",o.setAttribute(l,c),(t=o.appendChild(document.createElement("CODE"))).textContent="Loading…",n=o.getAttribute("data-src"),"none"===(e=e.language)&&(r=(/\.(\w+)$/.exec(n)||[,"none"])[1],e=s[r]||r),p(t,e),p(o,e),(r=a.plugins.autoloader)&&r.loadLanguages(e),(i=new XMLHttpRequest).open("GET",n,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?(o.setAttribute(l,"loaded"),t.textContent=i.responseText,a.highlightElement(t)):(o.setAttribute(l,"failed"),400<=i.status?t.textContent="✖ Error "+i.status+" while fetching file: "+i.statusText:t.textContent="✖ Error: File does not exist or is empty"))},i.send(null))}),t=!(a.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(u),r=0;t=n[r++];)a.highlightElement(t)}}),a.fileHighlight=function(){t||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),t=!0),a.plugins.fileHighlight.highlight.apply(this,arguments)})});function Rn(e,t){return"___"+e.toUpperCase()+t+"___"}Tn=Prism,Object.defineProperties(Tn.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,i,e,o){var a;r.language===i&&(a=r.tokenStack=[],r.code=r.code.replace(e,function(e){if("function"==typeof o&&!o(e))return e;for(var t,n=a.length;-1!==r.code.indexOf(t=Rn(i,n));)++n;return a[n]=e,t}),r.grammar=Tn.languages.markup)}},tokenizePlaceholders:{value:function(c,u){var p,h;c.language===u&&c.tokenStack&&(c.grammar=Tn.languages[u],p=0,h=Object.keys(c.tokenStack),function e(t){for(var n=0;n<t.length&&!(p>=h.length);n++){var r,i,o,a,s,l=t[n];"string"==typeof l||l.content&&"string"==typeof l.content?(i=h[p],o=c.tokenStack[i],r="string"==typeof l?l:l.content,s=Rn(u,i),-1<(a=r.indexOf(s))&&(++p,i=r.substring(0,a),o=new Tn.Token(u,Tn.tokenize(o,c.grammar),"language-"+u,o),a=r.substring(a+s.length),s=[],i&&s.push.apply(s,e([i])),s.push(o),a&&s.push.apply(s,e([a])),"string"==typeof l?t.splice.apply(t,[n,1].concat(s)):l.content=s)):l.content&&e(l.content)}return t}(c.tokens))}}});function On(i,e){var o=this;this.config=i,this.router=e,this.cacheTree={},this.toc=[],this.cacheTOC={},this.linkTarget=i.externalLinkTarget||"_blank",this.linkRel="_blank"===this.linkTarget?i.externalLinkRel||"noopener":"",this.contentBase=e.getBasePath();var t=this._initRenderer();this.heading=t.heading;var a=r(e=i.markdown||{})?e(gn,t):(gn.setOptions(y(e,{renderer:y(t,e.renderer)})),gn);this._marked=a,this.compile=function(n){var r=!0,e=s(function(e){r=!1;var t="";return n?(t=c(n)?a(n):a.parser(n),t=i.noEmoji?t:t.replace(/:\+1:/g,":thumbsup:").replace(/:-1:/g,":thumbsdown:").replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g,function(e){return e.replace(/:/g,"__colon__")}).replace(/:(\w+?):/gi,window.emojify||_n).replace(/__colon__/g,":"),xn.clear(),t):n})(n),t=o.router.parse().file;return r?o.toc=o.cacheTOC[t]:o.cacheTOC[t]=[].concat(o.toc),e}}var $n={},Fn={markdown:function(e){return{url:e}},mermaid:function(e){return{url:e}},iframe:function(e,t){return{html:'<iframe src="'+e+'" '+(t||"width=100% height=400")+"></iframe>"}},video:function(e,t){return{html:'<video src="'+e+'" '+(t||"controls")+">Not Support</video>"}},audio:function(e,t){return{html:'<audio src="'+e+'" '+(t||"controls")+">Not Support</audio>"}},code:function(e,t){var n=e.match(/\.(\w+)$/);return"md"===(n=t||n&&n[1])&&(n="markdown"),{url:e,lang:n}}};On.prototype.compileEmbed=function(e,t){var n,r,i=Sn(t),o=i.str,i=i.config;if(t=o,i.include)return O(e)||(e=N(this.contentBase,F(this.router.getCurrentPath()),e)),i.type&&(r=Fn[i.type])?(n=r.call(this,e,t)).type=i.type:(r="code",/\.(md|markdown)/.test(e)?r="markdown":/\.mmd/.test(e)?r="mermaid":/\.html?/.test(e)?r="iframe":/\.(mp4|ogg)/.test(e)?r="video":/\.mp3/.test(e)&&(r="audio"),(n=Fn[r].call(this,e,t)).type=r),n.fragment=i.fragment,n},On.prototype._matchNotCompileLink=function(e){for(var t=this.config.noCompileLinks||[],n=0;n<t.length;n++){var r=t[n];if(($n[r]||($n[r]=new RegExp("^"+r+"$"))).test(e))return e}},On.prototype._initRenderer=function(){var a,s,l,c,u,p,e=new gn.Renderer,t=this.linkTarget,n=this.linkRel,o=this.router,r=this.contentBase,h=this,i={};return i.heading=e.heading=function(e,t){var n=Sn(e),r=n.str,i=n.config,e={level:t,title:An(r)};/<!-- {docsify-ignore} -->/g.test(r)&&(r=r.replace("\x3c!-- {docsify-ignore} --\x3e",""),e.title=An(r),e.ignoreSubHeading=!0),/{docsify-ignore}/g.test(r)&&(r=r.replace("{docsify-ignore}",""),e.title=An(r),e.ignoreSubHeading=!0),/<!-- {docsify-ignore-all} -->/g.test(r)&&(r=r.replace("\x3c!-- {docsify-ignore-all} --\x3e",""),e.title=An(r),e.ignoreAllSubs=!0),/{docsify-ignore-all}/g.test(r)&&(r=r.replace("{docsify-ignore-all}",""),e.title=An(r),e.ignoreAllSubs=!0);n=xn(i.id||r),i=o.toURL(o.getCurrentPath(),{id:n});return e.slug=i,h.toc.push(e),"<h"+t+' id="'+n+'"><a href="'+i+'" data-id="'+n+'" class="anchor"><span>'+r+"</span></a></h"+t+">"},i.code={renderer:e}.renderer.code=function(e,t){void 0===t&&(t="markup");var n=En.languages[t]||En.languages.markup;return'<pre v-pre data-lang="'+t+'"><code class="lang-'+t+'">'+En.highlight(e.replace(/@DOCSIFY_QM@/g,"`"),n,t)+"</code></pre>"},i.link=(n=(t={renderer:e,router:o,linkTarget:t,linkRel:n,compilerClass:h}).renderer,a=t.router,s=t.linkTarget,l=t.linkRel,c=t.compilerClass,n.link=function(e,t,n){void 0===t&&(t="");var r=[],i=Sn(t),o=i.str,i=i.config;return s=i.target||s,l="_blank"===s?c.config.externalLinkRel||"noopener":"",t=o,O(e)||c._matchNotCompileLink(e)||i.ignore?(O(e)||"./"!==e.slice(0,2)||(e=document.URL.replace(/\/(?!.*\/).*/,"/").replace("#/./","")+e),r.push(0===e.indexOf("mailto:")?"":'target="'+s+'"'),r.push(0!==e.indexOf("mailto:")&&""!==l?' rel="'+l+'"':"")):(e===c.config.homepage&&(e="README"),e=a.toURL(e,null,a.getCurrentPath())),i.crossorgin&&"_self"===s&&"history"===c.config.routerMode&&-1===c.config.crossOriginLinks.indexOf(e)&&c.config.crossOriginLinks.push(e),i.disabled&&(r.push("disabled"),e="javascript:void(0)"),i.class&&r.push('class="'+i.class+'"'),i.id&&r.push('id="'+i.id+'"'),t&&r.push('title="'+t+'"'),'<a href="'+e+'" '+r.join(" ")+">"+n+"</a>"}),i.paragraph={renderer:e}.renderer.paragraph=function(e){e=/^!&gt;/.test(e)?vn("tip",e):/^\?&gt;/.test(e)?vn("warn",e):"<p>"+e+"</p>";return e},i.image=(r=(n={renderer:e,contentBase:r,router:o}).renderer,u=n.contentBase,p=n.router,r.image=function(e,t,n){var r=e,i=[],o=Sn(t),a=o.str,o=o.config;return t=a,o["no-zoom"]&&i.push("data-no-zoom"),t&&i.push('title="'+t+'"'),o.size&&(t=(a=o.size.split("x"))[0],(a=a[1])?i.push('width="'+t+'" height="'+a+'"'):i.push('width="'+t+'"')),o.class&&i.push('class="'+o.class+'"'),o.id&&i.push('id="'+o.id+'"'),O(e)||(r=N(u,F(p.getCurrentPath()),e)),0<i.length?'<img src="'+r+'" data-origin="'+e+'" alt="'+n+'" '+i.join(" ")+" />":'<img src="'+r+'" data-origin="'+e+'" alt="'+n+'"'+i+">"}),i.list={renderer:e}.renderer.list=function(e,t,n){t=t?"ol":"ul";return"<"+t+" "+[/<li class="task-list-item">/.test(e.split('class="task-list"')[0])?'class="task-list"':"",n&&1<n?'start="'+n+'"':""].join(" ").trim()+">"+e+"</"+t+">"},i.listitem={renderer:e}.renderer.listitem=function(e){return/^(<input.*type="checkbox"[^>]*>)/.test(e)?'<li class="task-list-item"><label>'+e+"</label></li>":"<li>"+e+"</li>"},e.origin=i,e},On.prototype.sidebar=function(e,t){var n=this.toc,r=this.router.getCurrentPath(),i="";if(e)i=this.compile(e);else{for(var o=0;o<n.length;o++)if(n[o].ignoreSubHeading){var a=n[o].level;n.splice(o,1);for(var s=o;s<n.length&&a<n[s].level;s++)n.splice(s,1)&&s--&&o++;o--}t=this.cacheTree[r]||yn(n,t),i=mn(t,"<ul>{inner}</ul>");this.cacheTree[r]=t}return i},On.prototype.subSidebar=function(e){if(e){var t=this.router.getCurrentPath(),n=this.cacheTree,r=this.toc;r[0]&&r[0].ignoreAllSubs&&r.splice(0),r[0]&&1===r[0].level&&r.shift();for(var i=0;i<r.length;i++)r[i].ignoreSubHeading&&r.splice(i,1)&&i--;e=n[t]||yn(r,e);return n[t]=e,this.toc=[],mn(e)}this.toc=[]},On.prototype.header=function(e,t){return this.heading(e,t)},On.prototype.article=function(e){return this.compile(e)},On.prototype.cover=function(e){var t=this.toc.slice(),e=this.compile(e);return this.toc=t.slice(),e};var Cn,Ln=function(e){var t=function(e){e=e.match(/^[ \t]*(?=\S)/gm);return e?e.reduce(function(e,t){return Math.min(e,t.length)},1/0):0}(e);if(0===t)return e;t=new RegExp("^[ \\t]{"+t+"}","gm");return e.replace(t,"")},zn={};function Nn(e,r){var o=e.compiler,i=e.raw;void 0===i&&(i="");var t=e.fetch,e=zn[i];if(e){var n=e.slice();return n.links=e.links,r(n)}var n=o._marked,a=n.lexer(i),s=[],l=n.Lexer.rules.inline.link,c=a.links;a.forEach(function(e,i){"paragraph"===e.type&&(e.text=e.text.replace(new RegExp(l.source,"g"),function(e,t,n,r){r=o.compileEmbed(n,r);return r&&s.push({index:i,embed:r}),e}))});var u=[];!function(e,o){var t,n=e.embedTokens,a=e.compile,s=(e.fetch,0),l=1;if(!n.length)return o({});for(;t=n[s++];){var r=function(i){return function(e){var t,n,r;e&&("markdown"===i.embed.type?((n=i.embed.url.split("/")).pop(),n=n.join("/"),e=e.replace(/\[([^[\]]+)\]\(([^)]+)\)/g,function(e){var t=e.indexOf("(");return"(."===e.slice(t,t+2)?e.substring(0,t)+"("+window.location.protocol+"//"+window.location.host+n+"/"+e.substring(t+1,e.length-1)+")":e}),!0===(($docsify.frontMatter||{}).installed||!1)&&(e=$docsify.frontMatter.parseMarkdown(e)),t=a.lexer(e)):"code"===i.embed.type?(i.embed.fragment&&(r=i.embed.fragment,r=new RegExp("(?:###|\\/\\/\\/)\\s*\\["+r+"\\]([\\s\\S]*)(?:###|\\/\\/\\/)\\s*\\["+r+"\\]"),e=Ln((e.match(r)||[])[1]||"").trim()),t=a.lexer("```"+i.embed.lang+"\n"+e.replace(/`/g,"@DOCSIFY_QM@")+"\n```\n")):"mermaid"===i.embed.type?(t=[{type:"html",text:'<div class="mermaid">\n'+e+"\n</div>"}]).links={}:(t=[{type:"html",text:e}]).links={}),o({token:i,embedToken:t}),++l>=s&&o({})}}(t);t.embed.url?ce(t.embed.url).then(r):r(t.embed.html)}}({compile:n,embedTokens:s,fetch:t},function(e){var t,n=e.embedToken,e=e.token;e?(t=e.index,u.forEach(function(e){t>e.start&&(t+=e.length)}),y(c,n.links),a=a.slice(0,t).concat(n,a.slice(t+1)),u.push({start:t,length:n.length-1})):(zn[i]=a.concat(),a.links=zn[i].links=c,r(a))})}function Mn(e,t,n){var r,i,o,a;return t="function"==typeof n?n(t):"string"==typeof n?(o=[],a=0,(r=n).replace(B,function(t,e,n){o.push(r.substring(a,n-1)),a=n+=t.length+1,o.push(i&&i[t]||function(e){return("00"+("string"==typeof Z[t]?e[Z[t]]():Z[t](e))).slice(-t.length)})}),a!==r.length&&o.push(r.substring(a)),function(e){for(var t="",n=0,r=e||new Date;n<o.length;n++)t+="string"==typeof o[n]?o[n]:o[n](r);return t}(new Date(t))):t,e.replace(/{docsify-updated}/g,t)}function Dn(e){function t(e){var t=Boolean(e.__vue__&&e.__vue__._isVue),e=Boolean(e._vnode&&e._vnode.__v_skip);return t||e}var n=this.config,r=b(".markdown-section"),i="Vue"in window&&window.Vue.version&&Number(window.Vue.version.charAt(0));if(e=e||"<h1>404 - Not found</h1>","Vue"in window)for(var o=0,a=k(".markdown-section > *").filter(t);o<a.length;o+=1){var s=a[o];2===i?s.__vue__.$destroy():3===i&&s.__vue_app__.unmount()}if(this._renderTo(r,e),n.loadSidebar||this._renderSidebar(),(n.executeScript||"Vue"in window&&!1!==n.executeScript)&&(!(e=k(".markdown-section>script").filter(function(e){return!/template/.test(e.type)})[0])||(e=e.innerText.trim())&&new Function(e)()),"Vue"in window){var l,c,u=[],p=Object.keys(n.vueComponents||{});2===i&&p.length&&p.forEach(function(e){window.Vue.options.components[e]||window.Vue.component(e,n.vueComponents[e])}),!Cn&&n.vueGlobalOptions&&"function"==typeof n.vueGlobalOptions.data&&(Cn=n.vueGlobalOptions.data()),u.push.apply(u,Object.keys(n.vueMounts||{}).map(function(e){return[b(r,e),n.vueMounts[e]]}).filter(function(e){var t=e[0];e[1];return t})),(n.vueGlobalOptions||p.length)&&(l=/{{2}[^{}]*}{2}/,c=/<[^>/]+\s([@:]|v-)[\w-:.[\]]+[=>\s]/,u.push.apply(u,k(".markdown-section > *").filter(function(n){return!u.some(function(e){var t=e[0];e[1];return t===n})}).filter(function(e){return e.tagName.toLowerCase()in(n.vueComponents||{})||e.querySelector(p.join(",")||null)||l.test(e.outerHTML)||c.test(e.outerHTML)}).map(function(e){var t=y({},n.vueGlobalOptions||{});return Cn&&(t.data=function(){return Cn}),[e,t]})));for(var h=0,d=u;h<d.length;h+=1){var f,g=d[h],m=g[0],v=g[1],g="data-isvue";m.matches("pre, script")||t(m)||m.querySelector("["+g+"]")||(m.setAttribute(g,""),2===i?(v.el=void 0,new window.Vue(v).$mount(m)):3===i&&(f=window.Vue.createApp(v),p.forEach(function(e){var t=n.vueComponents[e];f.component(e,t)}),f.mount(m)))}}}function Pn(t,n,r,i,o,e){t=e?t:t.replace(/\/$/,""),(t=F(t))&&ce(o.router.getFile(t+r)+n,!1,o.config.requestHeaders).then(i,function(e){return Pn(t,n,r,i,o)})}var In=Object.freeze({__proto__:null,cached:s,hyphenate:o,hasOwn:l,merge:y,isPrimitive:c,noop:u,isFn:r,isExternal:p,inBrowser:!0,isMobile:h,supportsPushState:i,parseQuery:E,stringifyQuery:R,isAbsolutePath:O,removeParams:$,getParentPath:F,cleanPath:C,resolvePath:L,getPath:N,replaceSlug:M,endsWith:D});var jn,Hn,qn=function(e){function t(){e.call(this),this.config=we(this),this.initLifecycle(),this.initPlugin(),this.callHook("init"),this.initRouter(),this.initRender(),this.initEvent(),this.initFetch(),this.callHook("mounted")}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.initPlugin=function(){var t=this;[].concat(this.config.plugins).forEach(function(e){return r(e)&&e(t._lifecycle,t)})},t}((Hn=Object,function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype._loadSideAndNav=function(e,t,n,r){var i=this;return function(){if(!n)return r();Pn(e,t,n,function(e){i._renderSidebar(e),r()},i,!0)}},t.prototype._fetch=function(n){var r=this;void 0===n&&(n=u);var i,e,t,o,a,s=this.route.query,l=this.route.path;p(l)?(history.replaceState(null,"","#"),this.router.normalize()):(i=R(s,["id"]),t=(e=this.config).loadNavbar,s=e.requestHeaders,o=e.loadSidebar,a=this.router.getFile(l),s=Un(a+i,0,s),this.isRemoteUrl=p(a),this.isHTML=/\.html$/g.test(a),s.then(function(e,t){return r._renderMain(e,t,r._loadSideAndNav(l,i,o,n))},function(e){r._fetchFallbackPage(l,i,n)||r._fetch404(a,i,n)}),t&&Pn(l,i,t,function(e){return r._renderNav(e)},this,!0))},t.prototype._fetchCover=function(){var t=this,e=this.config,n=e.coverpage,r=e.requestHeaders,i=this.route.query,o=F(this.route.path);if(n){var a=null,e=this.route.path;"string"==typeof n?"/"===e&&(a=n):a=Array.isArray(n)?-1<n.indexOf(e)&&"_coverpage":!0===(e=n[e])?"_coverpage":e;var s=Boolean(a)&&this.config.onlyCover;return a?(a=this.router.getFile(o+a),this.coverIsHTML=/\.html$/g.test(a),ce(a+R(i,["id"]),!1,r).then(function(e){return t._renderCover(e,s)})):this._renderCover(null,s),s}},t.prototype.$fetch=function(e,t){var n=this;void 0===e&&(e=u),void 0===t&&(t=this.$resetEvents.bind(this));function r(){n.callHook("doneEach"),e()}this._fetchCover()?r():this._fetch(function(){t(),r()})},t.prototype._fetchFallbackPage=function(n,r,i){var o=this;void 0===i&&(i=u);var e=this.config,t=e.requestHeaders,a=e.fallbackLanguages,s=e.loadSidebar;if(!a)return!1;e=n.split("/")[1];if(-1===a.indexOf(e))return!1;e=this.router.getFile(n.replace(new RegExp("^/"+e),""));return Un(e+r,0,t).then(function(e,t){return o._renderMain(e,t,o._loadSideAndNav(n,r,s,i))},function(){return o._fetch404(n,r,i)}),!0},t.prototype._fetch404=function(e,t,n){var r=this;void 0===n&&(n=u);var i=this.config,o=i.loadSidebar,a=i.requestHeaders,i=i.notFoundPage,s=this._loadSideAndNav(e,t,o,n);if(i){e=function(t,e){var n,r=e.notFoundPage,i="_404"+(e.ext||".md");switch(typeof r){case"boolean":n=i;break;case"string":n=r;break;case"object":n=(e=Object.keys(r).sort(function(e,t){return t.length-e.length}).filter(function(e){return t.match(new RegExp("^"+e))})[0])&&r[e]||i}return n}(e,this.config);return Un(this.router.getFile(e),0,a).then(function(e,t){return r._renderMain(e,t,s)},function(){return r._renderMain(null,{},s)}),!0}return this._renderMain(null,{},s),!1},t.prototype.initFetch=function(){var e,t=this,n=this.config.loadSidebar;this.rendered?(e=de(this.router,".sidebar-nav",!0,!0),n&&e&&(e.parentNode.innerHTML+=window.__SUB_SIDEBAR__),this._bindEventOnRendered(e),this.$resetEvents(),this.callHook("doneEach"),this.callHook("ready")):this.$fetch(function(e){return t.callHook("ready")})},t}(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.$resetEvents=function(e){var t=this,n=this.config.auto2top;"history"!==e&&(t.route.query.id&&Oe(t.route.path,t.route.query.id),"navigate"===e&&n&&(void 0===(n=n)&&(n=0),$e.scrollTop=!0===n?0:Number(n))),this.config.loadNavbar&&de(this.router,"nav")},t.prototype.initEvent=function(){function t(e){return g.classList.toggle("close")}var e;e="button.sidebar-toggle",this.router,null!=(e=d(e))&&(x(e,"click",function(e){e.stopPropagation(),t()}),h&&x(g,"click",function(e){return g.classList.contains("close")&&t()})),e=".sidebar",this.router,null!=(e=d(e))&&x(e,"click",function(e){e=e.target;"A"===e.nodeName&&e.nextSibling&&e.nextSibling.classList&&e.nextSibling.classList.contains("app-sub-sidebar")&&S(e.parentNode,"collapse")}),this.config.coverpage?h||x("scroll",he):g.classList.add("sticky")},t}(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype._renderTo=function(e,t,n){e=d(e);e&&(e[n?"outerHTML":"innerHTML"]=t)},t.prototype._renderSidebar=function(e){var t=this.config,n=t.maxLevel,r=t.subMaxLevel,i=t.loadSidebar;if(t.hideSidebar)return[document.querySelector("aside.sidebar"),document.querySelector("button.sidebar-toggle")].forEach(function(e){return e.parentNode.removeChild(e)}),document.querySelector("section.content").style.right="unset",document.querySelector("section.content").style.left="unset",document.querySelector("section.content").style.position="relative",document.querySelector("section.content").style.width="100%",null;this._renderTo(".sidebar-nav",this.compiler.sidebar(e,n));n=de(this.router,".sidebar-nav",!0,!0);i&&n?n.parentNode.innerHTML+=this.compiler.subSidebar(r)||"":this.compiler.subSidebar(),this._bindEventOnRendered(n)},t.prototype._bindEventOnRendered=function(e){var t,n=this.config.autoHeader;!function(e){var t=b(".cover.show");Te=t?t.offsetHeight:0;var t=d(".sidebar"),n=[];null!=t&&(n=k(t,"li"));for(var r,i=0,o=n.length;i<o;i+=1){var a,s,l=n[i],c=l.querySelector("a");c&&("/"!==(a=c.getAttribute("href"))&&(c=(s=e.parse(a)).query.id,s=s.path,c&&(a=Re(s,c))),a&&(xe[decodeURIComponent(a)]=l))}h||(r=$(e.getCurrentPath()),_("scroll",function(){return Ee(r)}),x("scroll",function(){return Ee(r)}),x(t,"mouseover",function(){_e=!0}),x(t,"mouseleave",function(){_e=!1}))}(this.router),n&&e&&((n=(t=d("#main")).children[0])&&"H1"!==n.tagName&&w(t,v("div",this.compiler.header(e.innerText,1)).children[0]))},t.prototype._renderNav=function(e){e&&this._renderTo("nav",this.compiler.compile(e)),this.config.loadNavbar&&de(this.router,"nav")},t.prototype._renderMain=function(r,i,o){var a=this;if(void 0===i&&(i={}),!r)return Dn.call(this,r);this.callHook("beforeEach",r,function(e){function t(){i.updatedAt&&(n=Mn(n,i.updatedAt,a.config.formatUpdated)),a.callHook("afterEach",n,function(e){return Dn.call(a,e)})}var n;a.isHTML?(n=a.result=r,t(),o()):Nn({compiler:a.compiler,raw:e},function(e){n=a.compiler.compile(e),n=a.isRemoteUrl?ae.sanitize(n,{ADD_TAGS:["script"]}):n,t(),o()})})},t.prototype._renderCover=function(e,t){var n,r=d(".cover");S(d("main"),t?"add":"remove","hidden"),e?(S(r,"add","show"),(t=(n=this.coverIsHTML?e:this.compiler.cover(e)).trim().match('<p><img.*?data-origin="(.*?)"[^a]+alt="(.*?)">([^<]*?)</p>$'))&&("color"===t[2]?r.style.background=t[1]+(t[3]||""):(e=t[1],S(r,"add","has-mask"),O(t[1])||(e=N(this.router.getBasePath(),t[1])),r.style.backgroundImage="url("+e+")",r.style.backgroundSize="cover",r.style.backgroundPosition="center center"),n=n.replace(t[0],"")),this._renderTo(".cover-main",n),he()):S(r,"remove","show")},t.prototype._updateRender=function(){var e,t,n,r;e=this,t=d(".app-name-link"),n=e.config.nameLink,r=e.route.path,t&&(c(e.config.nameLink)?t.setAttribute("href",n):"object"==typeof n&&(e=Object.keys(n).filter(function(e){return-1<r.indexOf(e)})[0],t.setAttribute("href",n[e])))},t.prototype.initRender=function(){var e=this.config;this.compiler=new On(e,this.router),window.__current_docsify_compiler__=this.compiler;var t,n,r,i,o,a=e.el||"#app",s=b("nav")||v("nav"),l=b(a),c="",u=g;l?(e.repo&&(c+=(i=e.repo,a=e.cornerExternalLinkTarge,i?(/\/\//.test(i)||(i="https://github.com/"+i),'<a href="'+(i=i.replace(/^git\+/,""))+'" target="'+(a=a||"_blank")+'" class="github-corner" aria-label="View source on Github"><svg viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>'):"")),e.coverpage&&(c+=(r=", 100%, 85%",'<section class="cover show" style="background: '+("linear-gradient(to left bottom, hsl("+Math.floor(255*Math.random())+r+") 0%,hsl("+Math.floor(255*Math.random())+r+") 100%)")+'"><div class="mask"></div><div class="cover-main">\x3c!--cover--\x3e</div></section>')),e.logo&&(r=/^data:image/.test(e.logo),t=/(?:http[s]?:)?\/\//.test(e.logo),n=/^\./.test(e.logo),r||t||n||(e.logo=N(this.router.getBasePath(),e.logo))),c+=(n=(t=e).name?t.name:"","<main>"+('<button class="sidebar-toggle" aria-label="Menu"><div class="sidebar-toggle-button"><span></span><span></span><span></span></div></button><aside class="sidebar">'+(t.name?'<h1 class="app-name"><a class="app-name-link" data-nosearch>'+(t.logo?'<img alt="'+n+'" src='+t.logo+">":n)+"</a></h1>":"")+'<div class="sidebar-nav">\x3c!--sidebar--\x3e</div></aside>')+'<section class="content"><article class="markdown-section" id="main">\x3c!--main--\x3e</article></section></main>'),this._renderTo(l,c,!0)):this.rendered=!0,e.mergeNavbar&&h?u=b(".sidebar"):(s.classList.add("app-nav"),e.repo||s.classList.add("no-badge")),e.loadNavbar&&w(u,s),e.themeColor&&(f.head.appendChild(v("div","<style>:root{--theme-color: "+e.themeColor+";}</style>").firstElementChild),o=e.themeColor,window.CSS&&window.CSS.supports&&window.CSS.supports("(--v:red)")||(e=k("style:not(.inserted),link"),[].forEach.call(e,function(e){if("STYLE"===e.nodeName)ue(e,o);else if("LINK"===e.nodeName){e=e.getAttribute("href");if(!/\.css$/.test(e))return;ce(e).then(function(e){e=v("style",e);m.appendChild(e),ue(e,o)})}}))),this._updateRender(),S(g,"ready")},t}(function(n){function e(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];n.apply(this,e),this.route={}}return n&&(e.__proto__=n),((e.prototype=Object.create(n&&n.prototype)).constructor=e).prototype.updateRender=function(){this.router.normalize(),this.route=this.router.parse(),g.setAttribute("data-page",this.route.file)},e.prototype.initRouter=function(){var t=this,e=this.config,e=new("history"===(e.routerMode||"hash")&&i?q:H)(e);this.router=e,this.updateRender(),U=this.route,e.onchange(function(e){t.updateRender(),t._updateRender(),U.path!==t.route.path?(t.$fetch(u,t.$resetEvents.bind(t,e.source)),U=t.route):t.$resetEvents(e.source)})},e}(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.initLifecycle=function(){var n=this;this._hooks={},this._lifecycle={},["init","mounted","beforeEach","afterEach","doneEach","ready"].forEach(function(e){var t=n._hooks[e]=[];n._lifecycle[e]=function(e){return t.push(e)}})},t.prototype.callHook=function(e,n,r){void 0===r&&(r=u);var i=this._hooks[e],o=function(t){var e=i[t];t>=i.length?r(n):"function"==typeof e?2===e.length?e(n,function(e){n=e,o(t+1)}):(e=e(n),n=void 0===e?n:e,o(t+1)):o(t+1)};o(0)},t}(Hn)))))));function Un(e,t,n){return jn&&jn.abort&&jn.abort(),jn=ce(e,!0,n)}window.Docsify={util:In,dom:t,get:ce,slugify:xn,version:"4.12.2"},window.DocsifyCompiler=On,window.marked=gn,window.Prism=En,e(function(e){return new qn})}();
node_modules/mp-html/docs/lib/prism-bash.min.js
New file
@@ -0,0 +1 @@
!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=a.variable[1].inside,i=0;i<o.length;i++)s[o[i]]=e.languages.bash[o[i]];e.languages.shell=e.languages.bash}(Prism);
node_modules/mp-html/docs/lib/search.min.js
New file
@@ -0,0 +1 @@
!function(){var u={},m={EXPIRE_KEY:"docsify.search.expires",INDEX_KEY:"docsify.search.index"};function p(e){var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return String(e).replace(/[&<>"']/g,function(e){return n[e]})}function h(e){return e.text||"table"!==e.type||(e.cells.unshift(e.header),e.text=e.cells.map(function(e){return e.join(" | ")}).join(" |\n ")),e.text}function f(e){return e.text||"list"!==e.type||(e.text=e.raw),e.text}function g(i,e,r,o){void 0===e&&(e="");var s,e=window.marked.lexer(e),c=window.Docsify.slugify,d={},l="";return e.forEach(function(e,n){if("heading"===e.type&&e.depth<=o){var t=function(e){void 0===e&&(e="");var a={};return{str:e=e&&e.replace(/^('|")/,"").replace(/('|")$/,"").replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/g,function(e,n,t){return-1===n.indexOf(":")?(a[n]=t&&t.replace(/&quot;/g,"")||!0,""):e}).trim(),config:a}}(e.text),a=t.str,t=t.config;s=t.id?r.toURL(i,{id:c(t.id)}):r.toURL(i,{id:c(p(e.text))}),a&&(l=a.replace(/<!-- {docsify-ignore} -->/,"").replace(/{docsify-ignore}/,"").replace(/<!-- {docsify-ignore-all} -->/,"").replace(/{docsify-ignore-all}/,"").trim()),d[s]={slug:s,title:l,body:""}}else{if(0===n&&(s=r.toURL(i),d[s]={slug:s,title:"/"!==i?i.slice(1):"Home Page",body:e.text||""}),!s)return;d[s]?d[s].body?(e.text=h(e),e.text=f(e),d[s].body+="\n"+(e.text||"")):(e.text=h(e),e.text=f(e),d[s].body=d[s].body?d[s].body+e.text:e.text):d[s]={slug:s,title:"",body:""}}}),c.clear(),d}function y(e){return e&&e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function r(i,r){var t,a,n,e,o="auto"===i.paths,s=o?(t=r.router,a=[],Docsify.dom.findAll(".sidebar-nav a:not(.section-link):not([data-nosearch])").forEach(function(e){var n=e.href,e=e.getAttribute("href"),n=t.parse(n).path;n&&-1===a.indexOf(n)&&!Docsify.util.isAbsolutePath(e)&&a.push(n)}),a):i.paths,c="";s.length&&o&&i.pathNamespaces?(n=s[0],Array.isArray(i.pathNamespaces)?c=i.pathNamespaces.filter(function(e){return n.slice(0,e.length)===e})[0]||c:i.pathNamespaces instanceof RegExp&&((d=n.match(i.pathNamespaces))&&(c=d[0])),e=-1===s.indexOf(c+"/"),d=-1===s.indexOf(c+"/README"),e&&d&&s.unshift(c+"/")):-1===s.indexOf("/")&&-1===s.indexOf("/README")&&s.unshift("/");var d,l=((d=i.namespace)?m.EXPIRE_KEY+"/"+d:m.EXPIRE_KEY)+c,p=((d=i.namespace)?m.INDEX_KEY+"/"+d:m.INDEX_KEY)+c,c=localStorage.getItem(l)<Date.now();if(u=JSON.parse(localStorage.getItem(p)),c)u={};else if(!o)return;var h=s.length,f=0;s.forEach(function(a){return u[a]?f++:void Docsify.get(r.router.getFile(a),!1,r.config.requestHeaders).then(function(e){var n,t;u[a]=g(a,e,r.router,i.depth),h===++f&&(n=i.maxAge,t=l,e=p,localStorage.setItem(t,Date.now()+n),localStorage.setItem(e,JSON.stringify(u)))})})}var o,s="";function c(e){var n=Docsify.dom.find("div.search"),t=Docsify.dom.find(n,".results-panel"),a=Docsify.dom.find(n,".clear-button"),i=Docsify.dom.find(".sidebar-nav"),n=Docsify.dom.find(".app-name");if(!e)return t.classList.remove("show"),a.classList.remove("show"),t.innerHTML="",void(o.hideOtherSidebarContent&&(i&&i.classList.remove("hide"),n&&n.classList.remove("hide")));var e=function(e){var n=[],t=[];Object.keys(u).forEach(function(n){t=t.concat(Object.keys(u[n]).map(function(e){return u[n][e]}))});var a=(e=e.trim()).split(/[\s\-,\\/]+/);1!==a.length&&(a=[].concat(e,a));for(var i=0;i<t.length;i++)!function(e){var e=t[e],r=0,o="",s="",c="",d=e.title&&e.title.trim(),l=e.body&&e.body.trim(),e=e.slug||"";d&&(a.forEach(function(e){var n,t=new RegExp(p(y(e)).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"),"gi"),a=-1,i=-1;s=d?p(y(d)):d,c=l?p(y(l)):l,a=d?s.search(t):-1,i=l?c.search(t):-1,(0<=a||0<=i)&&(r+=0<=a?3:0<=i?2:0,i<0&&(i=0),a=(a=n=0)==(n=i<11?0:i-10)?70:i+e.length+60,l&&a>l.length&&(a=l.length),t="..."+c.substring(n,a).replace(t,function(e){return'<em class="search-keyword">'+e+"</em>"})+"...",o+=t)}),0<r&&(e={title:s,content:l?o:"",url:e,score:r},n.push(e)))}(i);return n.sort(function(e,n){return n.score-e.score})}(e),r="";e.forEach(function(e){r+='<div class="matching-post">\n<a href="'+e.url+'">\n<h2>'+e.title+"</h2>\n<p>"+e.content+"</p>\n</a>\n</div>"}),t.classList.add("show"),a.classList.add("show"),t.innerHTML=r||'<p class="empty">'+s+"</p>",o.hideOtherSidebarContent&&(i&&i.classList.add("hide"),n&&n.classList.add("hide"))}function d(e){o=e}function l(e,n){var t,a,i=n.router.parse().query.s;d(e),Docsify.dom.style("\n.sidebar {\n  padding-top: 0;\n}\n\n.search {\n  margin-bottom: 20px;\n  padding: 6px;\n  border-bottom: 1px solid #eee;\n}\n\n.search .input-wrap {\n  display: flex;\n  align-items: center;\n}\n\n.search .results-panel {\n  display: none;\n}\n\n.search .results-panel.show {\n  display: block;\n}\n\n.search input {\n  outline: none;\n  border: none;\n  width: 100%;\n  padding: 0 7px;\n  line-height: 36px;\n  font-size: 14px;\n  border: 1px solid transparent;\n}\n\n.search input:focus {\n  box-shadow: 0 0 5px var(--theme-color, #42b983);\n  border: 1px solid var(--theme-color, #42b983);\n}\n\n.search input::-webkit-search-decoration,\n.search input::-webkit-search-cancel-button,\n.search input {\n  -webkit-appearance: none;\n  -moz-appearance: none;\n  appearance: none;\n}\n.search .clear-button {\n  cursor: pointer;\n  width: 36px;\n  text-align: right;\n  display: none;\n}\n\n.search .clear-button.show {\n  display: block;\n}\n\n.search .clear-button svg {\n  transform: scale(.5);\n}\n\n.search h2 {\n  font-size: 17px;\n  margin: 10px 0;\n}\n\n.search a {\n  text-decoration: none;\n  color: inherit;\n}\n\n.search .matching-post {\n  border-bottom: 1px solid #eee;\n}\n\n.search .matching-post:last-child {\n  border-bottom: 0;\n}\n\n.search p {\n  font-size: 14px;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  display: -webkit-box;\n  -webkit-line-clamp: 2;\n  -webkit-box-orient: vertical;\n}\n\n.search p.empty {\n  text-align: center;\n}\n\n.app-name.hide, .sidebar-nav.hide {\n  display: none;\n}"),function(e){void 0===e&&(e="");var n='<div class="input-wrap">\n      <input type="search" value="'+e+'" aria-label="Search text" />\n      <div class="clear-button">\n        <svg width="26" height="24">\n          <circle cx="12" cy="12" r="11" fill="#ccc" />\n          <path stroke="white" stroke-width="2" d="M8.25,8.25,15.75,15.75" />\n          <path stroke="white" stroke-width="2"d="M8.25,15.75,15.75,8.25" />\n        </svg>\n      </div>\n    </div>\n    <div class="results-panel"></div>\n    </div>',e=Docsify.dom.create("div",n),n=Docsify.dom.find("aside");Docsify.dom.toggleClass(e,"search"),Docsify.dom.before(n,e)}(i),n=Docsify.dom.find("div.search"),a=Docsify.dom.find(n,"input"),e=Docsify.dom.find(n,".input-wrap"),Docsify.dom.on(n,"click",function(e){return-1===["A","H2","P","EM"].indexOf(e.target.tagName)&&e.stopPropagation()}),Docsify.dom.on(a,"input",function(n){clearTimeout(t),t=setTimeout(function(e){return c(n.target.value.trim())},100)}),Docsify.dom.on(e,"click",function(e){"INPUT"!==e.target.tagName&&(a.value="",c())}),i&&setTimeout(function(e){return c(i)},500)}function v(e,n){var t,a,i,r,o;d(e),t=e.placeholder,a=n.route.path,(r=Docsify.dom.getNode('.search input[type="search"]'))&&("string"==typeof t?r.placeholder=t:(i=Object.keys(t).filter(function(e){return-1<a.indexOf(e)})[0],r.placeholder=t[i])),e=e.noData,o=n.route.path,s="string"==typeof e?e:e[Object.keys(e).filter(function(e){return-1<o.indexOf(e)})[0]]}var b={placeholder:"Type to search",noData:"No Results!",paths:"auto",depth:2,maxAge:864e5,hideOtherSidebarContent:!1,namespace:void 0,pathNamespaces:void 0};$docsify.plugins=[].concat(function(e,n){var t=Docsify.util,a=n.config.search||b;Array.isArray(a)?b.paths=a:"object"==typeof a&&(b.paths=Array.isArray(a.paths)?a.paths:"auto",b.maxAge=(t.isPrimitive(a.maxAge)?a:b).maxAge,b.placeholder=a.placeholder||b.placeholder,b.noData=a.noData||b.noData,b.depth=a.depth||b.depth,b.hideOtherSidebarContent=a.hideOtherSidebarContent||b.hideOtherSidebarContent,b.namespace=a.namespace||b.namespace,b.pathNamespaces=a.pathNamespaces||b.pathNamespaces);var i="auto"===b.paths;e.mounted(function(e){l(b,n),i||r(b,n)}),e.doneEach(function(e){v(b,n),i&&r(b,n)})},$docsify.plugins)}();
node_modules/mp-html/docs/lib/vue.css
New file
@@ -0,0 +1,858 @@
@import url("https://fonts.googleapis.com/css?family=Roboto+Mono|Source+Sans+Pro:300,400,600");
* {
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-text-size-adjust: none;
  -webkit-touch-callout: none;
  box-sizing: border-box;
}
body:not(.ready) {
  overflow: hidden;
}
body:not(.ready) [data-cloak],
body:not(.ready) .app-nav,
body:not(.ready) > nav {
  display: none;
}
div#app {
  font-size: 30px;
  font-weight: lighter;
  margin: 40vh auto;
  text-align: center;
}
div#app:empty::before {
  content: 'Loading...';
}
.emoji {
  height: 1.2rem;
  vertical-align: middle;
}
.progress {
  background-color: var(--theme-color, #42b983);
  height: 2px;
  left: 0px;
  position: fixed;
  right: 0px;
  top: 0px;
  transition: width 0.2s, opacity 0.4s;
  width: 0%;
  z-index: 999999;
}
.search a:hover {
  color: var(--theme-color, #42b983);
}
.search .search-keyword {
  color: var(--theme-color, #42b983);
  font-style: normal;
  font-weight: bold;
}
html,
body {
  height: 100%;
}
body {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  color: #34495e;
  font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
  margin: 0;
  overflow-x: hidden;
}
img {
  max-width: 100%;
}
a[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}
kbd {
  border: solid 1px #ccc;
  border-radius: 3px;
  display: inline-block;
  font-size: 12px !important;
  line-height: 12px;
  margin-bottom: 3px;
  padding: 3px 5px;
  vertical-align: middle;
}
li input[type='checkbox'] {
  margin: 0 0.2em 0.25em 0;
  vertical-align: middle;
}
.app-nav {
  margin: 25px 60px 0 0;
  position: absolute;
  right: 0;
  text-align: right;
  z-index: 10;
/* navbar dropdown */
}
.app-nav.no-badge {
  margin-right: 25px;
}
.app-nav p {
  margin: 0;
}
.app-nav > a {
  margin: 0 1rem;
  padding: 5px 0;
}
.app-nav ul,
.app-nav li {
  display: inline-block;
  list-style: none;
  margin: 0;
}
.app-nav a {
  color: inherit;
  font-size: 16px;
  text-decoration: none;
  transition: color 0.3s;
}
.app-nav a:hover {
  color: var(--theme-color, #42b983);
}
.app-nav a.active {
  border-bottom: 2px solid var(--theme-color, #42b983);
  color: var(--theme-color, #42b983);
}
.app-nav li {
  display: inline-block;
  margin: 0 1rem;
  padding: 5px 0;
  position: relative;
  cursor: pointer;
}
.app-nav li ul {
  background-color: #fff;
  border: 1px solid #ddd;
  border-bottom-color: #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  display: none;
  max-height: calc(100vh - 61px);
  overflow-y: auto;
  padding: 10px 0;
  position: absolute;
  right: -15px;
  text-align: left;
  top: 100%;
  white-space: nowrap;
}
.app-nav li ul li {
  display: block;
  font-size: 14px;
  line-height: 1rem;
  margin: 0;
  margin: 8px 14px;
  white-space: nowrap;
}
.app-nav li ul a {
  display: block;
  font-size: inherit;
  margin: 0;
  padding: 0;
}
.app-nav li ul a.active {
  border-bottom: 0;
}
.app-nav li:hover ul {
  display: block;
}
.github-corner {
  border-bottom: 0;
  position: fixed;
  right: 0;
  text-decoration: none;
  top: 0;
  z-index: 1;
}
.github-corner:hover .octo-arm {
  -webkit-animation: octocat-wave 560ms ease-in-out;
          animation: octocat-wave 560ms ease-in-out;
}
.github-corner svg {
  color: #fff;
  fill: var(--theme-color, #42b983);
  height: 80px;
  width: 80px;
}
main {
  display: block;
  position: relative;
  width: 100vw;
  height: 100%;
  z-index: 0;
}
main.hidden {
  display: none;
}
.anchor {
  display: inline-block;
  text-decoration: none;
  transition: all 0.3s;
}
.anchor span {
  color: #34495e;
}
.anchor:hover {
  text-decoration: underline;
}
.sidebar {
  border-right: 1px solid rgba(0,0,0,0.07);
  overflow-y: auto;
  padding: 40px 0 0;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  transition: transform 250ms ease-out;
  width: 300px;
  z-index: 20;
}
.sidebar > h1 {
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  font-weight: 300;
  text-align: center;
}
.sidebar > h1 a {
  color: inherit;
  text-decoration: none;
}
.sidebar > h1 .app-nav {
  display: block;
  position: static;
}
.sidebar .sidebar-nav {
  line-height: 2em;
  padding-bottom: 40px;
}
.sidebar li.collapse .app-sub-sidebar {
  display: none;
}
.sidebar ul {
  margin: 0 0 0 15px;
  padding: 0;
}
.sidebar li > p {
  font-weight: 700;
  margin: 0;
}
.sidebar ul,
.sidebar ul li {
  list-style: none;
}
.sidebar ul li a {
  border-bottom: none;
  display: block;
}
.sidebar ul li ul {
  padding-left: 20px;
}
.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
}
.sidebar:hover::-webkit-scrollbar-thumb {
  background: rgba(136,136,136,0.4);
}
.sidebar:hover::-webkit-scrollbar-track {
  background: rgba(136,136,136,0.1);
}
.sidebar-toggle {
  background-color: transparent;
  background-color: rgba(255,255,255,0.8);
  border: 0;
  outline: none;
  padding: 10px;
  position: absolute;
  bottom: 0;
  left: 0;
  text-align: center;
  transition: opacity 0.3s;
  width: 284px;
  z-index: 30;
  cursor: pointer;
}
.sidebar-toggle:hover .sidebar-toggle-button {
  opacity: 0.4;
}
.sidebar-toggle span {
  background-color: var(--theme-color, #42b983);
  display: block;
  margin-bottom: 4px;
  width: 16px;
  height: 2px;
}
body.sticky .sidebar,
body.sticky .sidebar-toggle {
  position: fixed;
}
.content {
  padding-top: 60px;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 300px;
  transition: left 250ms ease;
}
.markdown-section {
  margin: 0 auto;
  max-width: 80%;
  padding: 30px 15px 40px 15px;
  position: relative;
}
.markdown-section > * {
  box-sizing: border-box;
  font-size: inherit;
}
.markdown-section > :first-child {
  margin-top: 0 !important;
}
.markdown-section hr {
  border: none;
  border-bottom: 1px solid #eee;
  margin: 2em 0;
}
.markdown-section iframe {
  border: 1px solid #eee;
/* fix horizontal overflow on iOS Safari */
  width: 1px;
  min-width: 100%;
}
.markdown-section table {
  border-collapse: collapse;
  border-spacing: 0;
  display: block;
  margin-bottom: 1rem;
  overflow: auto;
  width: 100%;
}
.markdown-section th {
  border: 1px solid #ddd;
  font-weight: bold;
  padding: 6px 13px;
}
.markdown-section td {
  border: 1px solid #ddd;
  padding: 6px 13px;
}
.markdown-section tr {
  border-top: 1px solid #ccc;
}
.markdown-section tr:nth-child(2n) {
  background-color: #f8f8f8;
}
.markdown-section p.tip {
  background-color: #f8f8f8;
  border-bottom-right-radius: 2px;
  border-left: 4px solid #f66;
  border-top-right-radius: 2px;
  margin: 2em 0;
  padding: 12px 24px 12px 30px;
  position: relative;
}
.markdown-section p.tip:before {
  background-color: #f66;
  border-radius: 100%;
  color: #fff;
  content: '!';
  font-family: 'Dosis', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: bold;
  left: -12px;
  line-height: 20px;
  position: absolute;
  height: 20px;
  width: 20px;
  text-align: center;
  top: 14px;
}
.markdown-section p.tip code {
  background-color: #efefef;
}
.markdown-section p.tip em {
  color: #34495e;
}
.markdown-section p.warn {
  background: rgba(66,185,131,0.1);
  border-radius: 2px;
  padding: 1rem;
}
.markdown-section ul.task-list > li {
  list-style-type: none;
}
body.close .sidebar {
  transform: translateX(-300px);
}
body.close .sidebar-toggle {
  width: auto;
}
body.close .content {
  left: 0;
}
@media print {
  .github-corner,
  .sidebar-toggle,
  .sidebar,
  .app-nav {
    display: none;
  }
}
@media screen and (max-width: 768px) {
  .github-corner,
  .sidebar-toggle,
  .sidebar {
    position: fixed;
  }
  .app-nav {
    margin-top: 16px;
  }
  .app-nav li ul {
    top: 30px;
  }
  main {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
  }
  .sidebar {
    left: -300px;
    transition: transform 250ms ease-out;
  }
  .content {
    left: 0;
    max-width: 100vw;
    position: static;
    padding-top: 20px;
    transition: transform 250ms ease;
  }
  .app-nav,
  .github-corner {
    transition: transform 250ms ease-out;
  }
  .sidebar-toggle {
    background-color: transparent;
    width: auto;
    padding: 30px 30px 10px 10px;
  }
  body.close .sidebar {
    transform: translateX(300px);
  }
  body.close .sidebar-toggle {
    background-color: rgba(255,255,255,0.8);
    transition: 1s background-color;
    width: 284px;
    padding: 10px;
  }
  body.close .content {
    transform: translateX(300px);
  }
  body.close .app-nav,
  body.close .github-corner {
    display: none;
  }
  .github-corner:hover .octo-arm {
    -webkit-animation: none;
            animation: none;
  }
  .github-corner .octo-arm {
    -webkit-animation: octocat-wave 560ms ease-in-out;
            animation: octocat-wave 560ms ease-in-out;
  }
}
@-webkit-keyframes octocat-wave {
  0%, 100% {
    transform: rotate(0);
  }
  20%, 60% {
    transform: rotate(-25deg);
  }
  40%, 80% {
    transform: rotate(10deg);
  }
}
@keyframes octocat-wave {
  0%, 100% {
    transform: rotate(0);
  }
  20%, 60% {
    transform: rotate(-25deg);
  }
  40%, 80% {
    transform: rotate(10deg);
  }
}
section.cover {
  align-items: center;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 100vh;
  width: 100vw;
  display: none;
}
section.cover.show {
  display: flex;
}
section.cover.has-mask .mask {
  background-color: #fff;
  opacity: 0.8;
  position: absolute;
  top: 0;
  height: 100%;
  width: 100%;
}
section.cover .cover-main {
  flex: 1;
  margin: -20px 16px 0;
  text-align: center;
  position: relative;
}
section.cover a {
  color: inherit;
  text-decoration: none;
}
section.cover a:hover {
  text-decoration: none;
}
section.cover p {
  line-height: 1.5rem;
  margin: 1em 0;
}
section.cover h1 {
  color: inherit;
  font-size: 2.5rem;
  font-weight: 300;
  margin: 0.625rem 0 2.5rem;
  position: relative;
  text-align: center;
}
section.cover h1 a {
  display: block;
}
section.cover h1 small {
  bottom: -0.4375rem;
  font-size: 1rem;
  position: absolute;
}
section.cover blockquote {
  font-size: 1.5rem;
  text-align: center;
}
section.cover ul {
  line-height: 1.8;
  list-style-type: none;
  margin: 1em auto;
  max-width: 500px;
  padding: 0;
}
section.cover .cover-main > p:last-child a {
  border-color: var(--theme-color, #42b983);
  border-radius: 2rem;
  border-style: solid;
  border-width: 1px;
  box-sizing: border-box;
  color: var(--theme-color, #42b983);
  display: inline-block;
  font-size: 1.05rem;
  letter-spacing: 0.1rem;
  margin: 0.5rem 1rem;
  padding: 0.75em 2rem;
  text-decoration: none;
  transition: all 0.15s ease;
}
section.cover .cover-main > p:last-child a:last-child {
  background-color: var(--theme-color, #42b983);
  color: #fff;
}
section.cover .cover-main > p:last-child a:last-child:hover {
  color: inherit;
  opacity: 0.8;
}
section.cover .cover-main > p:last-child a:hover {
  color: inherit;
}
section.cover blockquote > p > a {
  border-bottom: 2px solid var(--theme-color, #42b983);
  transition: color 0.3s;
}
section.cover blockquote > p > a:hover {
  color: var(--theme-color, #42b983);
}
body {
  background-color: #fff;
}
/* sidebar */
.sidebar {
  background-color: #fff;
  color: #364149;
}
.sidebar li {
  margin: 6px 0 6px 0;
}
.sidebar ul li a {
  color: #505d6b;
  font-size: 14px;
  font-weight: normal;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar ul li a:hover {
  text-decoration: underline;
}
.sidebar ul li ul {
  padding: 0;
}
.sidebar ul li.active > a {
  border-right: 2px solid;
  color: var(--theme-color, #42b983);
  font-weight: 600;
}
.app-sub-sidebar li::before {
  content: '-';
  padding-right: 4px;
  float: left;
}
/* markdown content found on pages */
.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4,
.markdown-section strong {
  color: #2c3e50;
  font-weight: 600;
}
.markdown-section a {
  color: var(--theme-color, #42b983);
  font-weight: 600;
}
.markdown-section h1 {
  font-size: 2rem;
  margin: 0 0 1rem;
}
.markdown-section h2 {
  font-size: 1.75rem;
  margin: 45px 0 0.8rem;
}
.markdown-section h3 {
  font-size: 1.5rem;
  margin: 40px 0 0.6rem;
}
.markdown-section h4 {
  font-size: 1.25rem;
}
.markdown-section h5 {
  font-size: 1rem;
}
.markdown-section h6 {
  color: #777;
  font-size: 1rem;
}
.markdown-section figure,
.markdown-section p {
  margin: 1.2em 0;
}
.markdown-section p,
.markdown-section ul,
.markdown-section ol {
  line-height: 1.6rem;
  word-spacing: 0.05rem;
}
.markdown-section ul,
.markdown-section ol {
  padding-left: 1.5rem;
}
.markdown-section blockquote {
  border-left: 4px solid var(--theme-color, #42b983);
  color: #858585;
  margin: 2em 0;
  padding-left: 20px;
}
.markdown-section blockquote p {
  font-weight: 600;
  margin-left: 0;
}
.markdown-section iframe {
  margin: 1em 0;
}
.markdown-section em {
  color: #7f8c8d;
}
.markdown-section code,
.markdown-section pre,
.markdown-section output::after {
  font-family: 'Roboto Mono', Monaco, courier, monospace;
}
.markdown-section code,
.markdown-section pre {
  background-color: #f8f8f8;
}
.markdown-section pre,
.markdown-section output {
  margin: 1.2em 0;
  position: relative;
}
.markdown-section pre > code,
.markdown-section output {
  border-radius: 2px;
  display: block;
}
.markdown-section pre > code,
.markdown-section output::after {
  -moz-osx-font-smoothing: initial;
  -webkit-font-smoothing: initial;
}
.markdown-section code {
  border-radius: 2px;
  color: #e96900;
  margin: 0 2px;
  padding: 3px 5px;
  white-space: pre-wrap;
}
.markdown-section > :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) code {
  font-size: 0.8rem;
}
.markdown-section pre {
  padding: 0 1.4rem;
  line-height: 1.5rem;
  overflow: auto;
  word-wrap: normal;
}
.markdown-section pre > code {
  color: #525252;
  font-size: 0.8rem;
  padding: 2.2em 5px;
  line-height: inherit;
  margin: 0 2px;
  max-width: inherit;
  overflow: inherit;
  white-space: inherit;
}
.markdown-section output {
  padding: 1.7rem 1.4rem;
  border: 1px dotted #ccc;
}
.markdown-section output > :first-child {
  margin-top: 0;
}
.markdown-section output > :last-child {
  margin-bottom: 0;
}
.markdown-section code::after,
.markdown-section code::before,
.markdown-section output::after,
.markdown-section output::before {
  letter-spacing: 0.05rem;
}
.markdown-section pre::after,
.markdown-section output::after {
  color: #ccc;
  font-size: 0.6rem;
  font-weight: 600;
  height: 15px;
  line-height: 15px;
  padding: 5px 10px 0;
  position: absolute;
  right: 0;
  text-align: right;
  top: 0;
}
.markdown-section pre::after,
.markdown-section output::after {
  content: attr(data-lang);
}
/* code highlight */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #8e908c;
}
.token.namespace {
  opacity: 0.7;
}
.token.boolean,
.token.number {
  color: #c76b29;
}
.token.punctuation {
  color: #525252;
}
.token.property {
  color: #c08b30;
}
.token.tag {
  color: #2973b7;
}
.token.string {
  color: var(--theme-color, #42b983);
}
.token.selector {
  color: #6679cc;
}
.token.attr-name {
  color: #2973b7;
}
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
  color: #22a2c9;
}
.token.attr-value,
.token.control,
.token.directive,
.token.unit {
  color: var(--theme-color, #42b983);
}
.token.keyword,
.token.function {
  color: #e96900;
}
.token.statement,
.token.regex,
.token.atrule {
  color: #22a2c9;
}
.token.placeholder,
.token.variable {
  color: #3d8fd1;
}
.token.deleted {
  text-decoration: line-through;
}
.token.inserted {
  border-bottom: 1px dotted #202746;
  text-decoration: none;
}
.token.italic {
  font-style: italic;
}
.token.important,
.token.bold {
  font-weight: bold;
}
.token.important {
  color: #c94922;
}
.token.entity {
  cursor: help;
}
code .token {
  -moz-osx-font-smoothing: initial;
  -webkit-font-smoothing: initial;
  min-height: 1.5rem;
  position: relative;
  left: auto;
}
node_modules/mp-html/docs/overview/feature.md
New file
@@ -0,0 +1,228 @@
# åŠŸèƒ½ä»‹ç»
## â³ æ¸²æŸ“效果 :id=show
1. *加载提示*
   æ”¯æŒåœ¨ *mp-html* æ ‡ç­¾å†…部放上自定义的加载提示,内容未加载完成(或为空)时将显示,加载完成后自动隐藏
   ```wxml
   <mp-html>加载中...</mp-html>
   ```
2. *自动设置标题*
   æ”¯æŒè‡ªåŠ¨æŠŠ *title* æ ‡ç­¾çš„内容设置到页面标题上,如不需要,可通过 [set-title](basic/prop#set-title) å±žæ€§å…³é—­
3. *长按复制*
   æ”¯æŒé•¿æŒ‰å¤åˆ¶æ–‡æœ¬å†…容,可通过 [selectable](basic/prop#selectable) å±žæ€§å¼€å¯
4. *支持 rpx*
   æ”¯æŒ *rpx* ä½œä¸ºå•位,自动根据屏幕宽度调整
5. *支持 html å®žä½“*
   æ”¯æŒæ‰€æœ‰å½¢å¦‚ *&amp;#123;* çš„ *html* å®žä½“和大部分常用的形如 *&amp;nbsp;* çš„实体
## ðŸ“° å›¾ç‰‡æ•ˆæžœ :id=img
1. *占位图*
   æ”¯æŒè®¾ç½®å›¾ç‰‡æœªåŠ è½½å®Œæˆæ—¶çš„å ä½å›¾ [loading-img](basic/prop#loading-img) å’ŒåŠ è½½å‡ºé”™æ—¶çš„å ä½å›¾ [error-img](basic/prop#error-img)
2. *懒加载*
   å†…容较长、图片较多时,开启懒加载有助于改善性能,需要时可通过 [lazy-load](basic/prop#lazy-load) å±žæ€§å¼€å¯
3. *自动预览*
   å›¾ç‰‡è¢«ç‚¹å‡»æ—¶ï¼Œå°†è‡ªåŠ¨æ”¾å¤§é¢„è§ˆï¼Œå¦‚ä¸éœ€è¦ï¼Œå¯é€šè¿‡ [preview-img](basic/prop#preview-img) å±žæ€§å…³é—­ã€‚还可以在 [imgtap](basic/event#imgtap) äº‹ä»¶ä¸­è¿›è¡Œè‡ªå®šä¹‰å¤„理
   è‡ªåŠ¨é¢„è§ˆé€šè¿‡ç‰¹å®šçš„å¤„ç†ï¼Œå¯ä»¥å®žçŽ°å·¦å³æ»‘åŠ¨æŸ¥çœ‹æ‰€æœ‰å›¾ç‰‡ã€é¢„è§ˆé‡å¤é“¾æŽ¥ä¸é”™ä½ç­‰æ•ˆæžœ
4. *预览高清图*
   åŒä¸€å¼ å›¾ç‰‡ï¼Œå¯ä»¥ç»™æ˜¾ç¤ºæ—¶å’Œé¢„览时设置不同的链接地址以达到最佳效果
   è®¾ç½®æ–¹å¼ 1:给 *img* æ ‡ç­¾å¢žåŠ ä¸€ä¸ª *original-src* å³å¯
   ```html
   <!-- æ˜¾ç¤ºæ—¶ä½¿ç”¨ xxx,预览时使用 yyy -->
   <img src="xxx" original-src="yyy" />
   ```
   è®¾ç½®æ–¹å¼ 2:通过 [imgList](advanced/api#imgList) çš„ *api* è¿›è¡Œè®¾ç½®
5. *长按弹出菜单*
   å¾®ä¿¡å’Œç™¾åº¦å¹³å°æ”¯æŒå›¾ç‰‡é•¿æŒ‰æ—¶å¼¹å‡ºèœå•,可以进行保存、分享等操作,如不需要,可通过 [show-img-menu](basic/prop#show-img-menu) å±žæ€§å…³é—­
6. *装饰图片处理*
   æœ‰æ—¶å¯¹äºŽä¸€äº›å°çš„装饰性图片,可能不希望产生上述效果,此时可以给 *img* æ ‡ç­¾è®¾ç½® *ignore* å±žæ€§ï¼Œå°†å±è”½é¢„览、弹出菜单等操作,提升体验
   ```html
   <!-- è®¾ç½® ignore å±žæ€§åŽè¿™å¼ å›¾ç‰‡ä¸å¯é¢„览、不会弹出菜单 -->
   <img src="xxx" ignore />
   ```
   åœ¨é“¾æŽ¥å†…的、*src* ä¸º *data url* ä¸”没有设置 *original-src* çš„图片,默认为不可预览的小图片
7. *支持原大小显示*
   æœ¬ç»„件通过合理转换,基本实现了和 *html* ä¸­ *img* çš„相同效果:没有设置宽度时按原大小显示;设置了宽度时按比例缩放;同时设置宽高时按设置的值显示。不必去考虑小程序中的 *mode* ç­‰é—®é¢˜
8. *支持 svg*
   è™½ç„¶å°ç¨‹åºä¸­ä¸æ”¯æŒ *svg* ç³»åˆ—标签,本组件通过在解析过程中转为 *data url* å›¾ç‰‡çš„æ–¹å¼å®žçŽ°äº† *svg* çš„æ˜¾ç¤º
## ðŸ”— é“¾æŽ¥æ•ˆæžœ :id=link
1. *支持设置多种状态下的样式*
   åŒ…括默认状态、点击态的样式,可以在 *src/node/node.wxss* ä¸­è¿›è¡Œä¿®æ”¹
2. *锚点跳转*
   æ”¯æŒè·³è½¬å†…部锚点,使用锚点需要开启 [use-anchor](basic/prop#use-anchor) å±žæ€§
   è·³è½¬æ–¹å¼ 1:给 *a* æ ‡ç­¾çš„ *href* å±žæ€§è®¾ç½®ä¸º *#id*,点击时即可跳转到对应 *id* çš„位置(设置为 *#* åˆ™è·³è½¬åˆ°å¼€å¤´ï¼‰
   è·³è½¬æ–¹å¼ 2:通过 [navigateTo](advanced/api#navigateTo) çš„ *api* è¿›è¡Œè·³è½¬
   é»˜è®¤æƒ…况下锚点跳转通过控制页面滚动的方式进行,如果要在 *scroll-view* å†…使用,可以通过 [in](advanced/api#in) çš„ *api* è¿›è¡Œé…ç½®
3. *跳转内部路径*
   å¦‚果需要点击 *a* æ ‡ç­¾è·³è½¬åˆ°å°ç¨‹åºå†…的一个页面,直接将其 *href* å±žæ€§è®¾ç½®ä¸ºé¡µé¢è·¯å¾„即可(包括 *tab* é¡µé¢ï¼Œéœ€è¦ä½¿ç”¨ç»å¯¹è·¯å¾„)
   ```html
   <!-- è¯¥é“¾æŽ¥è¢«ç‚¹å‡»åŽå°†è·³è½¬åˆ° /pages/test/test é¡µé¢ -->
   <a href="/pages/test/test">链接</a>
   ```
4. *复制外部链接*
   å¯¹äºŽå¤–部链接,由于小程序无法直接打开,将自动复制到剪贴板,如不需要,可通过 [copy-link](basic/prop#copy-link) å±žæ€§å…³é—­
?> è®¾ç½® *a* æ ‡ç­¾çš„ *href* å±žæ€§æ—¶ï¼Œå¦‚果是外部链接需将协议名 *http://* å†™å®Œæ•´ï¼Œå¦åˆ™ä¼šè¢«è®¤ä¸ºæ˜¯å†…部路径并尝试跳转
除这些默认的处理外,还可以在 [linktap](basic/event#linktap) äº‹ä»¶ä¸­è¿›è¡Œè‡ªå®šä¹‰å¤„理
## ðŸ“ˆ è¡¨æ ¼æ•ˆæžœ :id=table
1. *支持独立横向滚动*
   è¡¨æ ¼å®½åº¦é€šå¸¸è¾ƒå¤§ï¼Œå®¹æ˜“超出屏幕宽度,导致整体内容一起滚动,影响体验,可以通过设置 [scroll-table](basic/prop#scroll-table) å±žæ€§ç»™æ‰€æœ‰è¡¨æ ¼æ·»åŠ ä¸€ä¸ªæ»šåŠ¨å±‚ä½¿å…¶èƒ½å•ç‹¬æ¨ªå‘æ»šåŠ¨
2. *支持常用表格属性*
   æ”¯æŒ *border*, *cellspacing*, *cellpadding*, *align* ç­‰å¸¸ç”¨è¡¨æ ¼å±žæ€§
3. *支持含有合并单元格的表格*
附渲染原理:
小程序中没有 *table* æ ‡ç­¾ï¼Œä½¿å¾—显示表格一直是一个难题,本组件主要通过以下三种方式显示表格
| æ˜¾ç¤ºæ–¹å¼ | é€‚用情况 | è¯´æ˜Ž |
|:---:|:---:|:---:|
| *rich-text* æ ‡ç­¾ | è¡¨æ ¼å†…部没有链接、图片等特殊标签 | æ•ˆæžœæœ€ä½³ï¼Œå‡ ä¹Žä¸éœ€è¦è¿›è¡Œè½¬æ¢ |
| *table* å¸ƒå±€ | è¡¨æ ¼å†…有特殊标签但没有使用合并单元格 | éœ€è¦è¿›è¡Œä¸€å®šè½¬æ¢ï¼Œå°† *table*, *tr*, *td* ç­‰æ ‡ç­¾è½¬ä¸ºå¯¹åº”的布局 |
| *grid* å¸ƒå±€ | è¡¨æ ¼å†…有特殊标签且使用了合并单元格 | éœ€è¦è¿›è¡Œå¤æ‚的转换将合并单元格用 *grid* å¸ƒå±€è¡¨çŽ°å‡ºæ¥ |
## ðŸ“Š åˆ—è¡¨æ•ˆæžœ :id=list
1. *支持多层嵌套*
   æ”¯æŒåµŒå¥—多层列表,对于无序列表,不同的层级会显示不同的黑点格式
2. *支持多种有序列表格式*
   é€šè¿‡è®¾ç½® *ol* æ ‡ç­¾çš„ *type* å±žæ€§ï¼Œå¯ä»¥æ˜¾ç¤ºæ•°å­—、字母、罗马数字等多种形式的标号
3. *支持不显示标号*
   æ”¯æŒé€šè¿‡è®¾ç½® *list-style:none* çš„æ–¹å¼ä¸æ˜¾ç¤º *li* æ ‡ç­¾å¼€å¤´çš„æ ‡å·
## ðŸŽ¬ éŸ³è§†é¢‘效果 :id=video
1. *自动暂停*
   åœ¨å­˜åœ¨å¤šä¸ªè§†é¢‘的情况下,同时播放可能会影响体验,本组件支持在播放一个视频的时候自动暂停其他所有视频,如不需要,可通过 [pause-video](basic/prop#pause-video) å±žæ€§å…³é—­
   éŸ³é¢‘在引入 [audio](advanced/plugin#audio) æ’件后也可以实现此效果
2. *多源加载*
   ä¸åŒå¹³å°æ”¯æŒæ’­æ”¾çš„æ ¼å¼ä¸åŒï¼Œåªè®¾ç½®ä¸€ä¸ª *src* å¯èƒ½ä¼šå‡ºçŽ°å…¼å®¹æ€§é—®é¢˜å¯¼è‡´æ— æ³•æ’­æ”¾ï¼Œå› æ­¤æœ¬ç»„ä»¶æ”¯æŒåƒ *html* ä¸­ä¸€æ ·ç»™ *video* å’Œ *audio* è®¾ç½®å¤šä¸ª *source*,将按照顺序进行加载,直到可以播放,最大程度上避免无法播放
   ```html
   <!-- ç»„件将依次加载 xxx å’Œ yyy -->
   <video controls>
     <source src="xxx">
     <source src="yyy">
   </video>
   ```
3. *自动添加控件*
   å¯¹äºŽæ—¢æ²¡æœ‰è®¾ç½® *controls* ä¹Ÿæ²¡æœ‰è®¾ç½® *autoplay* çš„æ ‡ç­¾å°†è‡ªåŠ¨æŠŠ *controls* å±žæ€§è®¾ç½®ä¸º *true*,避免无法播放,影响体验
## ðŸ“¡ æ ·å¼è®¾ç½® :id=style
样式(*css*)是富文本中最重要的内容之一,本组件提供多种样式设置的方法,可以进行灵活的设置
1. *行内样式*
   è¿™æ˜¯æœ€å¸¸ç”¨çš„æ ·å¼è®¾ç½®æ–¹æ³•,直接将需要的样式放在对应标签的 *style* å±žæ€§ä¸­å³å¯ï¼Œè¿™ç§æ–¹å¼ä»…作用于单个标签,优先级最高
2. *tag-style*
   è¿™æ˜¯æœ¬ç»„件独有的一种样式设置方式,可以给某一种标签名设置默认的样式
   å¯ä»¥é€šè¿‡ [tag-style](basic/prop#tag-style) å±žæ€§è®¾ç½®ï¼Œå…·ä½“用法见对应说明
3. *外部样式*
   å¦‚果希望将某些样式固定的用于渲染,可以添加到 *tools/config.js* çš„ *externStyle* å­—段中,该方法仅支持 *class* é€‰æ‹©å™¨ï¼ˆ[2.1.0](changelog/changlog#v210) ç‰ˆæœ¬èµ·æ”¯æŒæ ‡ç­¾åé€‰æ‹©å™¨ï¼‰ï¼Œä¼˜å…ˆçº§æœ€ä½Žï¼Œå…·ä½“见 [个性化](overview/quickstart#setting)
需要调整优先级时,可以通过设置 *!important* å®žçް
另外,通过引入 [style](advanced/plugin#style) æ’件,还可以实现匹配 *style* æ ‡ç­¾ä¸­æ ·å¼çš„功能
## ðŸ­ å…¨é¢çš„æ ‡ç­¾æ”¯æŒ :id=tag
本组件支持以下标签和属性:
| æ ‡ç­¾ | å±žæ€§ |
|:---:|:---:|
| a | href |
| abbr |  |
| address |  |
| article |  |
| aside |  |
| audio | author, controls, loop, name, poster, src |
| b |  |
| base | href |
| big |  |
| blockquote |  |
| body |  |
| br |  |
| caption |   |
| center |  |
| cite |  |
| code |  |
| col | span |
| colgroup | span |
| dd |  |
| del |  |
| div |  |
| dl |  |
| dt |  |
| em |  |
| embed | autostart, loop, src, type |
| fieldset |  |
| font | color, face, size |
| footer |  |
| h1 |  |
| h2 |  |
| h3 |  |
| h4 |  |
| h5 |  |
| h6 |  |
| head |  |
| header |  |
| hr |  |
| html |  |
| i |  |
| img | ignore, original-src, src |
| ins |  |
| label |  |
| legend |  |
| li |  |
| mark |  |
| nav |  |
| ol | start, type |
| p |  |
| pre |  |
| q |  |
| rt |  |
| ruby |  |
| s |  |
| section |  |
| small |  |
| source | src |
| span |  |
| strike |  |
| strong |  |
| style |  |
| sub |  |
| sup |  |
| table | border, cellpadding, cellspacing |
| tbody |  |
| td | colspan, rowspan |
| tfoot |   |
| th | colspan, rowspan |
| thead |  |
| tr |  |
| tt |  |
| u |  |
| ul |  |
| video | autoplay, controls, loop, muted, object-fit, poster, src |
说明:
1. é™¤ä¸Šé¢åˆ—举的外,还支持 *svg* ç³»åˆ—的标签和 *id*、*style*、*class*、*align*、*height*、*width*、*dir* å±žæ€§
2. å¯¹äºŽä¸ä¿¡ä»»çš„æ ‡ç­¾ï¼Œé™¤ä¸ªåˆ«å°†è¢«ç›´æŽ¥ç§»é™¤ï¼Œéƒ½ä¼šè¢«è½¬ä¸ºä¸€ä¸ªè¡Œå†…标签,因此可以使用更多语义化标签
## ðŸŒŸ ç¨³å®šæ€§ :id=stable
本组件的解析脚本能够支持多种 *html* æ ¼å¼ï¼Œå…·æœ‰å¼ºå¤§çš„稳定性:
1. æ ‡ç­¾åä¸­å¯ä»¥å«æœ‰ *:* ç­‰ç‰¹æ®Šå­—符(如 *o:p*)
2. æ ‡ç­¾åå’Œå±žæ€§åå¤§å°å†™ä¸æ•æ„Ÿ
3. å±žæ€§å€¼å¯ä»¥ä¸åŠ å¼•å·ã€åŠ å•å¼•å·ã€åŠ åŒå¼•å·ï¼Œä¹Ÿå¯ä»¥ç¼ºçœï¼ˆé»˜è®¤ *true*)
4. å±žæ€§ä¹‹é—´å¯ä»¥æ²¡æœ‰ç©ºæ ¼ï¼ˆé€šè¿‡å¼•号划分)、有空格(可以多个)、有换行符
5. æ”¯æŒæ­£å¸¸æ ¼å¼ã€*CDATA* ç­‰å¤šç§å½¢å¼çš„æ³¨é‡Š
同时,对于一些错误情况,程序也能够自动处理:
1. æ ‡ç­¾é¦–尾不匹配
2. å±žæ€§å€¼ä¸­å†’号不匹配
3. æ ‡ç­¾æœªé—­åˆ
以下情况均能正确解析:
```html
<!-- ä¸åŒçš„属性格式 -->
<font face="宋体" color='green' size=7>Hello</font>
<!-- æ ‡ç­¾é¦–尾不匹配或未闭合 -->
<div> World</section>
<!-- å¤§å°å†™æ­é… -->
<dIv StYle="color:green">!</DIv>
```
node_modules/mp-html/docs/overview/quickstart.md
New file
@@ -0,0 +1,287 @@
# å¿«é€Ÿå¼€å§‹ :id=quickstart
## ðŸ“¦ æºç èŽ·å– :id=source
#### å°ç¨‹åºæ–¹å¼ :id=mp
!> è¯¥æ–¹å¼æš‚不可用
打开微信小程序 *富文本插件*,点击 *获取组件包* æŒ‰é’®ï¼Œé€‰æ‹©ä½¿ç”¨å¹³å°ã€[扩展插件](advanced/plugin) ä»¥åŠ [个性化设置](#setting) åŽå³å¯ç”Ÿæˆç»„件包
![富文本插件](../assets/case/富文本插件.jpg)
#### npm æ–¹å¼ :id=npm
   ```bash
   # é€šè¿‡ npm èŽ·å–
   npm install mp-html
   # æˆ–通过 yarn èŽ·å–
   yarn add mp-html
   ```
   éœ€è¦å‡çº§æ—¶ï¼š
   ```bash
   # é€šè¿‡ npm å‡çº§
   npm update mp-html
   # æˆ–通过 yarn å‡çº§
   yarn upgrade mp-html
   ```
#### git æ–¹å¼ :id=git
   ```bash
   # é€šè¿‡ github èŽ·å–
   git clone https://github.com/jin-yufeng/mp-html.git
   # æˆ–通过 gitee èŽ·å–
   git clone https://gitee.com/jin-yufeng/mp-html.git
   ```
#### ä¸‹è½½ zip :id=zip
   *github releases*:[https://github.com/jin-yufeng/mp-html/releases](https://github.com/jin-yufeng/mp-html/releases)
   *gitee releases*:[https://gitee.com/jin-yufeng/mp-html/releases](https://gitee.com/jin-yufeng/mp-html/releases)
#### QQ ç¾¤ :id=qqgroup
*QQ* äº¤æµç¾¤çš„群文件中也可以获取组件包
交流群1: `699734691`
交流群2: `778239129`
交流群3: `960265313`
## ðŸ“š å¼•入和使用 :id=use
### ðŸ“— åŽŸç”Ÿæ¡†æž¶ :id=miniprogram
#### å¼•å…¥ :id=mp-import
- npm æ–¹å¼
  ?> æœ¬æ–¹æ³•仅适用于微信、*QQ* å°ç¨‹åº
  1. åœ¨å°ç¨‹åºé¡¹ç›®æ ¹ç›®å½•下通过 [npm](#npm) å®‰è£…组件包
  2. å¼€å‘者工具中勾选 *使用 npm æ¨¡å—*(若没有此选项则不需要)并点击 *工具* - *构建 npm*
  3. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ *json* æ–‡ä»¶ä¸­æ·»åŠ 
     ```json
     {
       "usingComponents": {
         "mp-html": "mp-html"
       }
     }
     ```
- æºç å¼•å…¥
  ?> æœ¬æ–¹æ³•适用于所有平台
  1. å°† [源码](#source) ä¸­å¯¹åº”平台的代码包(*dist/platform*)拷贝到 *components* ç›®å½•下,更名为 *mp-html*
  2. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ *json* æ–‡ä»¶ä¸­æ·»åŠ 
     ```json
     {
       "usingComponents": {
         "mp-html": "/components/mp-html/index"
       }
     }
     ```
#### ä½¿ç”¨ :id=mp-use
1. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ *wxml* æ–‡ä»¶ä¸­æ·»åŠ 
   ```wxml
   <mp-html content="{{html}}" />
   ```
2. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ *js* æ–‡ä»¶ä¸­æ·»åŠ 
   ```javascript
   Page({
     onLoad () {
       this.setData({
         html: '<div>Hello World!</div>'
       })
     }
   })
   ```
支持的 [属性](basic/prop) å’Œ [事件](basic/event) è§å¯¹åº”文档
### ðŸ“˜ uni-app æ¡†æž¶ :id=uni-app
#### uni-modules æ–¹å¼ :id=uni-modules
?> æœ¬æ–¹æ³•需要使用 *3.1.0+* ç‰ˆæœ¬çš„ *HBuilder X* å¼€å‘
1. è¿›å…¥ [插件市场](https://ext.dcloud.net.cn/plugin?id=805),点击右上角的 *使用 HBuilder X å¯¼å…¥æ’ä»¶* æŒ‰é’®å¯¼å…¥é¡¹ç›®æˆ–点击 *下载插件ZIP* æŒ‰é’®ä¸‹è½½æ’件包并解压到项目的 *uni_modules/mp-html* ç›®å½•下
2. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ *(n)vue* æ–‡ä»¶ä¸­æ·»åŠ 
  ```vue
   <template>
     <view>
       <!-- ä¸éœ€è¦å¼•入,可直接使用 -->
       <mp-html :content="html" />
     </view>
   </template>
   <script>
     export default {
       data () {
         return {
           html: '<div>Hello World!</div>'
         }
       }
     }
   </script>
   ```
3. éœ€è¦æ›´æ–°ç‰ˆæœ¬æ—¶åœ¨ *HBuilder X* ä¸­å³é”® *uni_modules/mp-html* ç›®å½•选择 *从插件市场更新* å³å¯
#### æºç æ–¹å¼ :id=uni-app-source
1. å°† [源码](#source) ä¸­ *dist/uni-app* å†…的内容拷贝到 **项目根目录** ä¸‹
   !> [插件市场](https://ext.dcloud.net.cn/plugin?id=805) çš„ *非 uni_modules* ç‰ˆæœ¬æ— æ³•更新,请从其他方式获取 [源码](#source)
2. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ *(n)vue* æ–‡ä»¶ä¸­æ·»åŠ 
   ```vue
   <template>
     <view>
       <mp-html :content="html" />
     </view>
   </template>
   <script>
     import mpHtml from '@/components/mp-html/mp-html'
     export default {
       // HBuilderX 2.5.5+ å¯ä»¥é€šè¿‡ easycom è‡ªåЍ引入
       components: {
         mpHtml
       },
       data () {
         return {
           html: '<div>Hello World!</div>'
         }
       }
     }
   </script>
   ```
#### npm æ–¹å¼ :id=uni-app-npm
1. åœ¨é¡¹ç›®æ ¹ç›®å½•下通过 [npm](#npm) å®‰è£…组件包
2. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ *(n)vue* æ–‡ä»¶ä¸­æ·»åŠ 
   ```vue
   <template>
     <view>
       <mp-html :content="html" />
     </view>
   </template>
   <script>
     import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html'
     export default {
       // ä¸å¯çœç•¥
       components: {
         mpHtml
       },
       data () {
         return {
           html: '<div>Hello World!</div>'
         }
       }
     }
   </script>
   ```
!> ä½¿ç”¨ *cli* æ–¹å¼è¿è¡Œçš„项目,通过 *npm* æ–¹å¼å¼•入时,需要在 *vue.config.js* ä¸­é…ç½® *transpileDependencies*,详情可见 [#330](https://github.com/jin-yufeng/mp-html/issues/330#issuecomment-913617687)
!> å¦‚果在 *nvue* ä¸­ä½¿ç”¨è¿˜è¦å°† *dist/uni-app/static* ç›®å½•下的内容拷贝到项目的 *static* ç›®å½•下,否则无法运行
支持的 [属性](basic/prop) å’Œ [事件](basic/event) è§å¯¹åº”文档
由于 *uni-app* ç¼–译过程中会进行压缩,构建 *uni-app* åŒ…时基本不进行压缩,包的体积与原生包相比较大
#### å…³äºŽ nvue :id=nvue
*nvue* ä½¿ç”¨åŽŸç”Ÿæ¸²æŸ“ï¼Œä¸æ”¯æŒéƒ¨åˆ† *css* æ ·å¼ï¼Œä¸ºå®žçŽ°å’Œ *html* ç›¸åŒçš„æ•ˆæžœï¼Œç»„件内部通过 *web-view* è¿›è¡Œæ¸²æŸ“,性能上差于原生,根据 *weex* å®˜æ–¹å»ºè®®ï¼Œ*web* æ ‡ç­¾ä»…应用在非常规的降级场景。因此,如果通过原生的方式(如 *richtext*)能够满足需要,则不建议使用本组件,如果有较多的富文本内容,则可以直接使用 *vue* é¡µé¢
由于渲染方式与其他端不同,有以下限制:
1. ä¸æ”¯æŒ [lazy-load](basic/prop#lazy-load) å±žæ€§
2. è§†é¢‘不支持全屏播放
3. å¦‚果在 *flex-direction: row* çš„容器中使用,需要给组件设置宽度或设置 *flex: 1* å æ»¡å‰©ä½™å®½åº¦
### ðŸ“™ å…¶ä»–框架 :id=other
其他框架没有专用包,但也可以引入对应平台的原生包使用,具体方法参考各框架官方文档
- taro
  [https://taro-docs.jd.com/docs/hybrid#使用原生组件](https://taro-docs.jd.com/docs/hybrid#%E4%BD%BF%E7%94%A8%E5%8E%9F%E7%94%9F%E7%BB%84%E4%BB%B6)
  !> åœ¨ *taro2* ä¸­ä½¿ç”¨è¯·ä½¿ç”¨ [示例项目](#demo) ä¸­çš„非压缩组件包,否则可能出现异常,详见 [#301](https://github.com/jin-yufeng/mp-html/issues/301)
  !> åœ¨ *taro3* çš„ *vue3* ä¸­ä½¿ç”¨æ—¶éœ€è¦ä¿®æ”¹ *content* å±žæ€§çš„属性名或使用 [setContent](advanced/api#setContent) æ–¹æ³•设置内容,详见 [taro#13146](https://github.com/NervJS/taro/issues/13146)
  ?> åœ¨ *taro* ä¸­ä½¿ç”¨æ—¶å±žæ€§åéœ€ç”¨é©¼å³°å†™æ³•,如 *copy-link* å±žæ€§åº”写作 *copyLink*
  ?> éœ€è¦ *taro* ä¸“用包的开发者欢迎参与 [需求调研](https://github.com/jin-yufeng/mp-html/issues/374)
- kbone
  [https://wechat-miniprogram.github.io/kbone/docs/guide/advanced.html#使用小程序自定义组件](https://wechat-miniprogram.github.io/kbone/docs/guide/advanced.html#%E4%BD%BF%E7%94%A8%E5%B0%8F%E7%A8%8B%E5%BA%8F%E8%87%AA%E5%AE%9A%E4%B9%89%E7%BB%84%E4%BB%B6)
- chameleon
  [https://cml.js.org/docs/io.html#怎么引入微信小程序组件](https://cml.js.org/docs/io.html#%E6%80%8E%E4%B9%88%E5%BC%95%E5%85%A5%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F%E7%BB%84%E4%BB%B6)
- remax
  [https://remaxjs.org/guide/basic/custom-component](https://remaxjs.org/guide/basic/custom-component)
## ðŸ’¡ è¿è¡Œç¤ºä¾‹ :id=demo
1. å®‰è£…依赖
   ```bash
   # é€šè¿‡ npm å®‰è£…
   npm install
   # æˆ–通过 yarn å®‰è£…
   yarn
   ```
2. ç”Ÿæˆ *demo* é¡¹ç›®
   ```bash
   # ç”Ÿæˆå¾®ä¿¡ç¤ºä¾‹é¡¹ç›®åˆ° dev/mp-weixin
   npm run dev:weixin
   # ç”Ÿæˆ qq ç¤ºä¾‹é¡¹ç›®åˆ° dev/mp-qq
   npm run dev:qq
   # ç”Ÿæˆç™¾åº¦ç¤ºä¾‹é¡¹ç›®åˆ° dev/mp-baidu
   npm run dev:baidu
   # ç”Ÿæˆæ”¯ä»˜å®ç¤ºä¾‹é¡¹ç›®åˆ° dev/mp-alipay
   npm run dev:alipay
   # ç”Ÿæˆå¤´æ¡ç¤ºä¾‹é¡¹ç›®åˆ° dev/mp-toutiao
   npm run dev:toutiao
   # ç”Ÿæˆ uni-app ç¤ºä¾‹é¡¹ç›®åˆ° dev/uni-app
   npm run dev:uni-app
   ```
3. è¿è¡Œ
   ç”¨å„平台的开发者工具打开 *dev/platform* æ–‡ä»¶å¤¹å³å¯
4. ç›‘听修改
   å¦‚果要对 *demo* é¡¹ç›®è¿›è¡Œä¿®æ”¹ï¼ˆå¦‚放入自己的测试内容)可在 *tools/demo* ç›®å½•中进行修改
   å¦‚果要对组件包进行修改可在 *src* ç›®å½•中进行修改(参考 [二次开发](advanced/develop) ï¼‰
   å¯ä»¥é€šè¿‡ *watch* å‘½ä»¤ç›‘听修改并实时编译到 *dev* ç›®å½•下
   ```bash
   # ç›‘听并实时生成微信示例项目到 dev/mp-weixin
   npm run watch:weixin
   # ç›‘听并实时生成 qq ç¤ºä¾‹é¡¹ç›®åˆ° dev/mp-qq
   npm run watch:qq
   # ç›‘听并实时生成百度示例项目到 dev/mp-baidu
   npm run watch:baidu
   # ç›‘听并实时生成支付宝示例项目到 dev/mp-alipay
   npm run watch:alipay
   # ç›‘听并实时生成头条示例项目到 dev/mp-toutiao
   npm run watch:toutiao
   ```
## ðŸŽˆ ä¸ªæ€§åŒ– :id=setting
?> æœ¬ç»„件提供了以下配置项可以生成个性化的组件包,配置项可以通过 [示例小程序](#mp) è¿›è¡Œè®¾ç½®ï¼Œæˆ–参考 [使用插件包](advanced/plugin#use) ä¸­çš„ *npm* æ–¹å¼è‡ªè¡Œè®¾ç½®é…ç½®æ–‡ä»¶å¹¶è¿›è¡Œæ‰“包
#### plugins
需要使用的插件名称列表,关于插件的详细信息见 [插件](advanced/plugin)
#### externStyle
!> æš‚不支持对图片设置宽高,详见 [#426](https://github.com/jin-yufeng/mp-html/issues/426)
外部样式,一个 *css* å­—符串,将被用于 *html* çš„æ¸²æŸ“,但仅支持 *class* é€‰æ‹©å™¨
?> [2.1.0](changelog/changelog#v210) ç‰ˆæœ¬èµ·å¢žåŠ æ”¯æŒ **标签名选择器**,通过这种方式给标签设置的样式全局有效,在样式较长或作用标签数量较大时这种方法的性能要高于 [tag-style](basic/prop#tag-style) å±žæ€§ï¼Œä¸”写法更加灵活(可以与伪类、*class* é…åˆç­‰ï¼‰
需要注意的是,由于 [组件](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#%E7%BB%84%E4%BB%B6%E6%A0%B7%E5%BC%8F) å†…仅支持 *class* é€‰æ‹©å™¨ï¼Œç›´æŽ¥å°†æ ‡ç­¾åé€‰æ‹©å™¨ **写在 wxss ä¸­æ˜¯æ— æ•ˆçš„**,必须写在本字段中,构建过程中会自动转换为 *class* é€‰æ‹©å™¨
?> [2.3.1](changelog/changelog#v231) ç‰ˆæœ¬èµ·ï¼Œç»„件取消样式隔离,部分平台(微信小程序 *2.11.0+* åŸºç¡€åº“完全支持;*QQ*、百度小程序部分情况下支持)支持直接引入页面样式中的 *class* é€‰æ‹©å™¨ï¼Œæ— éœ€ä½¿ç”¨æœ¬æ–¹æ³•引入;若遇到样式无法生效或需要使用标签名选择器,则仍需要使用本方法
#### customElements
自定义标签列表([2.2.0](changelog/changelog#v220) ç‰ˆæœ¬èµ·æ”¯æŒï¼‰ï¼Œå¯ä»¥åœ¨è¿™é‡Œæ³¨å†Œéœ€è¦ä½¿ç”¨çš„小程序功能标签(如 *ad*、*ad-custom*、*official-account*、*map* ç­‰ï¼‰
每个标签为一个 *object*,需要包含以下字段,注册完成后即可在传入的 `html` ä¸­ä½¿ç”¨è¯¥ç»„ä»¶
| å­—段名 | åŠŸèƒ½ | ç±»åž‹ | å¿…å¡« | å¤‡æ³¨ |
|:---:|:---:|:---:|:---:|:---:|
| name | æ ‡ç­¾å | String | æ˜¯ |  |
| attrs | éœ€è¦ä½¿ç”¨çš„属性列表 | String[] | å¦ | class å’Œ style é»˜è®¤æ·»åŠ ï¼Œæ— éœ€å¡«å†™ |
| platforms | éœ€è¦ä½¿ç”¨çš„平台 | String[] | å¦ | é»˜è®¤æ·»åŠ åˆ°æ‰€æœ‰å¹³å°ï¼Œå¯ä»¥ä»Ž h5、mp-weixin、mp-qq、mp-baidu、mp-alipay、mp-toutiao、app-plus ä¸­é€‰æ‹©ï¼Œä¸åŒºåˆ†å¤§å°å†™ |
?> ä»…能添加没有子节点的标签,且不响应任何事件,如果需要更加复杂的功能,可以通过 [插件](advanced/plugin#develop) å®žçް
示例:
```javascript
// è®¾ç½®å®ŒæˆåŽ html ä¸­æ·»åŠ  <ad unit-id="xxx" /> å³å¯ä½¿ç”¨è¯¥æ ‡ç­¾
customElements: [{
  name: 'ad',
  attrs: ['unit-id']
}]
```
剩余的是一些编译过程中压缩工具的配置,可以按需要设置
node_modules/mp-html/docs/question/contribution.md
New file
@@ -0,0 +1,16 @@
# ðŸ“ è´¡çŒ®æŒ‡å— :id=contribution
本组件欢迎所有开发者对以下方面提交 [pr](https://github.com/jin-yufeng/mp-html/pulls),一起完善本组件
1. é’ˆå¯¹ [issue](https://github.com/jin-yufeng/mp-html/issues) ä¸­ *bug* çš„修复
2. å®žçŽ°æ–°åŠŸèƒ½
   - åœ¨ä¸»åŒ…中添加(需确保该功能适用面广且体积不大)
   - æ–°å¢žæ‰©å±•插件(参考 [开发插件](advanced/plugin#develop))
3. æ–‡æ¡£é”™è¯¯ä¿®å¤
开发过程中请注意:
1. ä¸è¦ä¿®æ”¹ [dist](https://github.com/jin-yufeng/mp-html/tree/master/dist) ç›®å½•下的文件(该文件夹在版本更新时会进行构建)和配置文件
2. ä»£ç é£Žæ ¼å‚考 [standard](https://standardjs.com)
3. å¯å‚考 [二次开发](advanced/develop) ä¸­çš„说明
感谢所有 [贡献者](https://github.com/jin-yufeng/mp-html/graphs/contributors) å¯¹æœ¬ç»„件的贡献
node_modules/mp-html/docs/question/faq.md
New file
@@ -0,0 +1,152 @@
# ðŸ“˜ å¸¸è§é—®é¢˜ :id=question
## æ— æ³•使用扩展功能 :id=plugin
由于小程序空间有限,默认组件包中仅包含基本功能,其他 [扩展](advanced/plugin) æŒ‰éœ€æ·»åŠ ã€‚
!> ç¼–辑器、*markdown*、代码高亮、关键词搜索、*latex* å…¬å¼ç­‰å±žäºŽ [扩展](advanced/plugin) åŠŸèƒ½ï¼Œç›´æŽ¥èŽ·å–çš„ç»„ä»¶åŒ…ä¸­ **不包含** è¿™äº›åŠŸèƒ½
需要使用扩展功能的,参考 [使用插件](advanced/plugin#use) çš„说明,通过示例小程序或 *npm* æ‰“包的方式获取包含扩展功能的组件包替换原组件包,然后按照各个 [扩展](advanced/plugin) æ’件的说明和示例进行使用
## å›¾ç‰‡åº•部缝隙 :id=img
由于图片的默认 *display* æ˜¯ *inline-block*,多个图片连接时底部会有一条缝隙,可以通过设置 *vertical-align: bottom*, *display:block* æˆ– *float:left* ç­‰æ–¹æ³•去除
设置以上样式后仍有一个小缝隙的,可以进一步添加 *margin-top:-1px*
设置方法参考 [样式设置](overview/feature#style)
## æ ‡ç­¾åŽŸæ ·æ˜¾ç¤º :id=entity
如果出现渲染后 *html* æ ‡ç­¾è¿˜æ˜¯åŽŸæ ·æ˜¾ç¤ºï¼Œè¯·æ£€æŸ¥ä¼ å…¥çš„ *html* æ˜¯å¦è¢«è½¬ä¹‰ï¼š
1. *&lt;* å’Œ *&gt;* è¢«è½¬ä¹‰ä¸º *&amp;lt;* å’Œ *&amp;gt;*
2. *&lt;img* è¢«è½¬ä¹‰ä¸º *< img*
如果是则需要进行替换
```javascript
// ç¬¬ä¸€ç§
html = html.replace(/&lt;/g, '<').replace(/&gt;/g, '>') // å¦‚果还转义了其他字符如 &amp; ç­‰ä¹Ÿè¦è¿›è¡Œæ›¿æ¢
// ç¬¬äºŒç§
html = html.replace(/< img/g, '<img')
```
## ç©ºç™½ç¬¦å¤±æ•ˆ :id=space
*html* ä¸­ï¼Œé»˜è®¤ä¼šå°†å¤šä¸ªç©ºç™½ç¬¦ï¼ˆåŒ…括换行)合并为一个空格,若不希望如此,可参考以下方法:
1. æ›¿æ¢ä¸ºæŒ‡å®šæ ‡ç­¾æˆ–实体编码
   æ¢è¡Œå¯ä»¥ä½¿ç”¨ *br* æ ‡ç­¾
   è¿žç»­ç©ºæ ¼å¯ä»¥ä½¿ç”¨ *&amp;nbsp;* *&amp;ensp;* *&amp;emsp;* ç­‰å®žä½“编码
   ```javascript
   html = html.replace(/\n/g, '<br>') // æ›¿æ¢æ¢è¡Œç¬¦
   ```
2. é€šè¿‡ *css* è®¾ç½® *white-space*
   å°† *css* ä¸­çš„ *white-space* è®¾ç½®ä¸º *pre-line* å¯ä»¥ä¿ç•™æ¢è¡Œç¬¦ï¼Œè®¾ç½®ä¸º *pre-wrap* å¯ä»¥ä¿ç•™ç©ºæ ¼å’Œæ¢è¡Œç¬¦
   ç»™ç‰¹å®šæ ‡ç­¾è®¾ç½®çš„æ–¹æ³•见 [样式设置](overview/feature#style),需要注意的是如果通过外部样式设置 *white-space* å°†ä¸ä¼šç”Ÿæ•ˆï¼Œå› ä¸ºåœ¨è§£æžè¿‡ç¨‹ä¸­ä¸ºå‡å°è§£æžç»“果大小提前进行了空白符合并(解析过程中无法获取外部样式)
   [2.1.2](changelog/changelog#v212) ç‰ˆæœ¬èµ·å¯ä»¥é€šè¿‡ [container-style](basic/prop#container-style) å±žæ€§å…¨å±€è®¾ç½® *white-space*
   ```html
   <mp-html container-style="white-space:pre-wrap" />
   ```
## è¡¨æ ¼æ²¡æœ‰è¾¹æ¡† :id=table
*html* ä¸­çš„ *table* æ ‡ç­¾é»˜è®¤æ²¡æœ‰è¾¹æ¡†ï¼Œä¸€äº›ç¼–辑器有自带的表格样式,没有引入就会导致表格边框缺失,可通过以下方式解决:
1. ç»™ `table` æ ‡ç­¾è®¾ç½® `border` å±žæ€§
   ```javascript
   html = html.replace(/<table/g, '<table border="1"')
   ```
2. é€šè¿‡ [tag-style](basic/prop#tag-style) å±žæ€§æˆ– [外部样式](overview/quickstart#externStyle) ç»™è¡¨æ ¼æ ‡ç­¾è®¾ç½®é»˜è®¤æ ·å¼
   ```javascript
   tagStyle: {
      table: 'border-top: 1px solid gray; border-left: 1px solid gray; border-collapse:collapse',
      th: 'border-right: 1px solid gray; border-bottom: 1px solid gray;',
      td: 'border-right: 1px solid gray; border-bottom: 1px solid gray;'
   }
   ```
## å¤šåª’体内容不显示 :id=media
若出现 å›¾ç‰‡ä¸æ˜¾ç¤º/无法预览、音频/视频无法播放 ç­‰é—®é¢˜ï¼Œå¯é€šè¿‡ä»¥ä¸‹æ–¹å¼æ£€æŸ¥ï¼š
- è‹¥è§†é¢‘不显示,请检查 *html* ä¸­çš„视频是否为 *video* æ ‡ç­¾ï¼ˆ*iframe* æ ‡ç­¾åœ¨å°ç¨‹åºç«¯ä»…微信小程序可以通过 [腾讯视频插件](advanced/plugin#txv-video) æ’­æ”¾ï¼Œå…¶ä»–不支持)
- è‹¥å›¾ç‰‡æ— æ³•预览,请检查该图片是否为 *base64* æ ¼å¼ï¼Œç›®å‰ä¸æ”¯æŒ *base64* å›¾ç‰‡é¢„览(原因参考 [#249](https://github.com/jin-yufeng/mp-html/issues/249#issuecomment-755290540);如果确需使用,可将 [parser.js#L425](https://github.com/jin-yufeng/mp-html/blob/master/src/miniprogram/parser.js#L425) åŽ»æŽ‰ï¼Œåœ¨éƒ¨åˆ†å¹³å°å¯èƒ½å¯ä»¥ä½¿ç”¨ï¼‰
- è‹¥æ˜¯ *svg* æ— æ³•显示,请检查是否包含响应式 *animate* ç­‰æ ‡ç­¾ï¼Œç›®å‰ä¸æ”¯æŒï¼ˆåŽŸå› å‚è€ƒ [#569](https://github.com/jin-yufeng/mp-html/issues/569)),除此之外可能是 *svg* æ ‡ç­¾åå’Œå±žæ€§åå¤§å°å†™é—®é¢˜ï¼Œå¯ä»¥åœ¨ [svgDict](https://github.com/jin-yufeng/mp-html/blob/master/src/miniprogram/parser.js#L61) ä¸­è¡¥å……
- è‹¥éžä»¥ä¸ŠåŽŸå› ä¾ç„¶æ— æ³•æ˜¾ç¤ºï¼Œå°†è¯¥ å›¾ç‰‡/音频/视频 çš„链接放在原生标签 [image](https://developers.weixin.qq.com/miniprogram/dev/component/image.html)、[audio](https://developers.weixin.qq.com/miniprogram/dev/component/audio.html)、[video](https://developers.weixin.qq.com/miniprogram/dev/component/video.html) æˆ– api [wx.previewImage](https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.previewImage.html) ä¸­è¿›è¡Œæµ‹è¯•,如果也不能显示,则链接存在问题
  è‹¥å‡ºçŽ°è¿™ç§æƒ…å†µï¼Œå¯æŒ‰ç…§ä»¥ä¸‹æ–¹æ³•è¿›è¡Œæ£€æŸ¥
  1. æ£€æŸ¥é“¾æŽ¥æ˜¯å¦å®Œæ•´ï¼ˆç¼ºå°‘域名可以设置 [domain](basic/prop#domain) å±žæ€§ï¼‰ã€æœ‰æ•ˆï¼ˆå¯ä»¥æ”¾åœ¨æµè§ˆå™¨ä¸­æµ‹è¯•)
  2. æ£€æŸ¥é“¾æŽ¥æ˜¯å¦å­˜åœ¨é˜²ç›—链(可以参考 [#387](https://github.com/jin-yufeng/mp-html/issues/387))
  3. æ£€æŸ¥ç¼–码和格式是否支持(参考 [音频格式](https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/InnerAudioContext.html#%E6%94%AF%E6%8C%81%E6%A0%BC%E5%BC%8F)、[视频格式和编码](https://developers.weixin.qq.com/miniprogram/dev/component/video.html#%E6%94%AF%E6%8C%81%E7%9A%84%E6%A0%BC%E5%BC%8F))
  4. æŸ¥çœ‹ *error* äº‹ä»¶ä¸­çš„错误信息
## é•¿å†…容处理 :id=long
如果富文本内容特别长,可以考虑以下方案:
1. åˆ†æ¬¡æ¸²æŸ“
   å°ç¨‹åºä¸­å•次 *setData* å¤§å°ä¸èƒ½è¶…过 *1MB*,如果内容过长,可以先将内容拆分成几段,首先渲染第一段,后续内容在适当的时机(触底等)通过 [setContent](/advanced/api#setContent) æ–¹æ³•追加到末尾
2. åˆ†é¡µæ¸²æŸ“
   ä»¥ä¸Šæ–¹æ¡ˆè™½ç„¶èƒ½è§£å†³ä¸€æ¬¡æ€§è®¾ç½®æ•°æ®è¿‡å¤§é—®é¢˜ï¼Œä½†è¿‡é•¿çš„内容仍会导致总标签数量过大,页面性能下降的问题,因此,对于过长的内容,应该分页进行显示,每页仅显示一部分
## æ‡’加载失效 :id=lazy-load
如果富文本内容全部(或大部分)是图片,由于其图片未加载时大小为零,即使数量很多也会全部进入视图范围,导致懒加载失效,若出现这种情况,可通过以下方案解决
1. é€šè¿‡ [tag-style](basic/prop#tag-style) å±žæ€§ç­‰æ–¹æ³•ç»™ *img* çˆ¶çº§æ ‡ç­¾çš„æ ·å¼é‡Œè®¾ç½® *min-height*(如果直接给图片本身设置 *min-height*,可能在加载过程中出现变形的情况)
2. é€šè¿‡ [loading-img](basic/prop#loading-img) å±žæ€§è®¾ç½®åŠ è½½è¿‡ç¨‹ä¸­çš„å ä½å›¾
## ä¸€èˆ¬æ ‡ç­¾çš„点击事件 :id=tap
默认情况下,组件仅支持 *a* å’Œ *img* æ ‡ç­¾çš„点击事件,如果希望给标签添加点击事件,又不希望应用 *a* æ ‡ç­¾çš„默认样式,可以使用没有 *href* å±žæ€§çš„ *a* æ ‡ç­¾ï¼Œè¯¥æ ‡ç­¾ä¸ä¼šåº”用链接的默认样式,但被点击时会触发 *linktap* äº‹ä»¶ï¼Œå¯ä»¥åœ¨ *data-* å±žæ€§ä¸­è®°å½•需要的信息
## åŸºç¡€åº“要求 :id=lib
本组件尽最大可能兼容低版本基础库,各平台只要满足 **最低要求** å³å¯æ­£å¸¸ä½¿ç”¨ï¼ˆä¸æŠ¥é”™ï¼Œä½†é«˜åŸºç¡€åº“支持的功能不可用),可按照实际需要设置最低基础库要求
微信:
| ç‰ˆæœ¬ | åŠŸèƒ½ | å æ¯” |
|:---:|:---:|:---:|
| 2.9.0+ | ios æ”¯æŒ webp å›¾ç‰‡ | >99.74% |
| 2.7.0+ | æ”¯æŒå›¾ç‰‡é•¿æŒ‰å¼¹å‡ºèœå• | >99.87% |
| 2.4.0+ | æ”¯æŒ video åŒå±‚渲染 | >99.90% |
| 2.3.0+ | æ”¯æŒä½¿ç”¨äº‘文件 ID | >99.98% |
| 2.2.1+ | æ”¯æŒ npm å¼•å…¥ | >99.99% |
| 1.9.94+ | æ”¯æŒä½¿ç”¨ ad | >99.99% |
| 1.6.6+ | å¯ä»¥ä½¿ç”¨ | >99.99% |
QQ:
| ç‰ˆæœ¬ | åŠŸèƒ½ |
|:---:|:---:|
| å®‰å“ 1.10.2+,ios 1.4.7+ | æ”¯æŒ video åŒå±‚渲染 |
| 1.1.7+ | å¯ä»¥ä½¿ç”¨ |
百度:
| ç‰ˆæœ¬ | åŠŸèƒ½ | å æ¯” |
|:---:|:---:|:---:|
| 3.180.1+ | ios æ”¯æŒ webp å›¾ç‰‡ | >99.04% |
| 3.170.1+ | æ”¯æŒå›¾ç‰‡é•¿æŒ‰å¼¹å‡ºèœå• | >99.19% |
| 3.90.25+ | å¯ä»¥ä½¿ç”¨ | >99.99% |
*3.240.10* - *3.260.25* åŸºç¡€åº“由于 [此问题](https://smartprogram.baidu.com/forum/topic/show/125787),需要将以下样式拷贝到 *app.css* ä»¥ä¿è¯æ­£ç¡®æ˜¾ç¤º
```css
/* a æ ‡ç­¾é»˜è®¤æ•ˆæžœ */
._a {
  padding: 1.5px 0 1.5px 0;
  color: #366092;
  word-break: break-all;
}
/* a æ ‡ç­¾ç‚¹å‡»æ€æ•ˆæžœ */
._hover {
  text-decoration: underline;
  opacity: 0.7;
}
/* å›¾ç‰‡é»˜è®¤æ•ˆæžœ */
._img {
  max-width: 100%;
  -webkit-touch-callout: none;
}
```
支付宝:
| ç‰ˆæœ¬ | åŠŸèƒ½ | å æ¯” |
|:---:|:---:|:---:|
| 1.11.0+ | å¯ä»¥ä½¿ç”¨ | >97.95% |
头条:
| ç‰ˆæœ¬ | åŠŸèƒ½ |
|:---:|:---:|
| 1.59.0+ | æ”¯æŒ video åŒå±‚渲染 |
| 1.19.0+ | æ”¯æŒä½¿ç”¨ ad |
| 1.7.0+ | å¯ä»¥ä½¿ç”¨ |
!> ä¸æ”¯æŒ *video* åŒå±‚渲染时,需要注意原生组件的限制,视频的层级最高,且不能在 *scroll-view* ä¸­ä½¿ç”¨
node_modules/mp-html/docs/question/feedback.md
New file
@@ -0,0 +1,30 @@
# ðŸ“© åé¦ˆ :id=feedback
## æ³¨æ„äº‹é¡¹ :id=notice
反馈问题前,请先确认以下方式无法解决:
1. åœ¨ [常见问题](question/faq) ä¸­æŸ¥çœ‹æ˜¯å¦å·²æœ‰è§£å†³æ–¹æ¡ˆ
2. åœ¨ [issue](https://github.com/jin-yufeng/mp-html/issues) ä¸­æŸ¥æ‰¾æ˜¯å¦å·²æœ‰ç›¸åŒæˆ–类似的问题
3. å¦‚果是对于渲染效果的问题,请先在下方的模拟器中尝试,如果在浏览器中渲染也不正常,请检查样式
<div style="display: flex;">
  <div style="flex: 1; margin: 0 40px; display: flex; flex-direction: column;">
    <textarea id="input" style="flex: 1; width: 100%; padding: 5px; resize: none;" placeholder="请输入 html å†…容"></textarea>
    <div style="text-align: center; margin-top: 10px;">
      <button onclick="reset()">清空</button>
      <button onclick="render()" style="margin-left: 20px;">渲染</button>
    </div>
  </div>
  <div style="flex: 0 0 320px; height: 568px; box-shadow: 0px 0px 10px #c0c0c0;">
    <iframe id="show" style="width: 100%; height: 100%; margin: 0;"></iframe>
  </div>
</div>
## åé¦ˆæ–¹å¼ :id=method
1. *issue* æ–¹å¼
   åœ¨ *github* ä¸­æå‡º [issue](https://github.com/jin-yufeng/mp-html/issues/new/choose)(推荐,解决方案可以给其他人参考)
2. *QQ* ç¾¤æ–¹å¼
   åŠ å…¥ *QQ* äº¤æµç¾¤ *699734691* æˆ– *778239129*,并发送和交流相关问题
3. é‚®ç®±æ–¹å¼
   å¦‚果不希望公开问题,可以通过邮箱方式联系,发送邮件到 *mp_html@126.com*,邮件格式可参考 [issue æ¨¡æ¿](https://github.com/jin-yufeng/mp-html/issues/new/choose)
!> æ³¨æ„åŠ¡å¿…æŒ‰ç…§æ¨¡æ¿è¦æ±‚å¡«å†™ï¼Œæœªæè¿°æ¸…æ¥šæˆ–æ— æ³•å¤çŽ°çš„é—®é¢˜å°†ä¸äºˆå¤„ç†
node_modules/mp-html/gulpfile.js
New file
@@ -0,0 +1,113 @@
/**
 * @fileoverview è‡ªåŠ¨æž„å»ºç¨‹åº
 * @author Jin Yufeng
 */
// è½½å…¥ gulp æ’ä»¶
const gulp = require('gulp')
const htmlmin = require('gulp-htmlmin')
const babel = require('gulp-babel')
const uglify = require('gulp-uglify')
const cleanCss = require('gulp-clean-css')
const clean = require('gulp-clean')
const gulpif = require('gulp-if')
const plumber = require('gulp-plumber')
const size = require('gulp-size')
// è½½å…¥æž„建工具
const config = require('./tools/config')
const converter = require('./tools/converter')
const ifdef = require('./tools/ifdef')
const minifier = require('./tools/minifier')
const plugin = require('./tools/plugin')
// è½½å…¥çŽ¯å¢ƒä¿¡æ¯
const isDev = process.argv.includes('--dev')
let platform = process.argv[3]
if (!platform) {
  throw Error('缺少平台信息')
}
platform = platform.substr(2)
/**
 * @description æ¸…理文件夹
 */
gulp.task('clean', () => {
  return gulp.src(`${isDev ? 'dev' : 'dist'}/${platform === 'all' ? '' : platform + '/'}*`, {
    read: false,
    allowEmpty: true
  })
    .pipe(clean())
})
/**
 * @description ç”ŸæˆåŽŸç”Ÿç»„ä»¶åŒ…ï¼ˆå«æ’ä»¶ï¼‰
 * @returns {NodeJS.ReadWriteStream}
 */
function packComp () {
  return gulp.src(['plugins/**/*', 'src/**/*'], {
    nodir: true
  })
    // å…¬å…±å¤„理
    .pipe(plumber()) // é”™è¯¯å¤„理
    .pipe(plugin.build(platform)) // æž„建插件
    .pipe(ifdef(platform)) // æ¡ä»¶ç¼–译
    // wxml å¤„理
    .pipe(gulpif(file => file.extname === '.wxml', minifier.wxs())) // åŽ‹ç¼©å†…è” wxs
    .pipe(gulpif(file => file.extname === '.wxml', htmlmin(config.htmlmin))) // åŽ‹ç¼© wxml
    .pipe(gulpif(file => file.extname === '.html', htmlmin(Object.assign({}, config.htmlmin, { // åŽ‹ç¼© html
      minifyCSS: true
    }))))
    // js å¤„理
    .pipe(gulpif(file => file.extname === '.js' && !file.stem.includes('.min') && (platform !== 'uni-app' || file.relative.includes('static')), babel(config.babel))) // es6 è½¬ es5
    .pipe(gulpif(file => file.extname === '.js' && !file.stem.includes('.min') && !isDev && (platform !== 'uni-app' || file.relative.includes('static')), uglify(config.uglify))) // åŽ‹ç¼© js
    // wxss(css)处理
    .pipe(gulpif(file => file.extname.includes('ss'), cleanCss(config.cleanCss))) // åŽ‹ç¼© wxss
    .pipe(plugin.importCss()) // å¼•入插件中的 css æ–‡ä»¶
    // json å¤„理
    .pipe(gulpif(file => file.extname === '.json', minifier.json())) // åŽ‹ç¼© json
    // å…¬å…±å¤„理
    .pipe(converter(platform)) // å°†å¾®ä¿¡ç«¯çš„代码转换到各个平台
    .pipe(gulpif(!isDev, size({
      title: `${platform} åŒ…生成完毕`
    })))
    .pipe(gulp.dest(file => {
      return `${isDev ? 'dev' : 'dist'}/${platform}/${(platform === 'uni-app' && !file.relative.includes('components') && !file.relative.includes('static')) || (platform !== 'uni-app' && isDev) ? 'components/mp-html/' : ''}`
    }))
}
gulp.task('build', gulp.series('clean', packComp))
/**
 * @description ç”ŸæˆåŽŸç”Ÿç¤ºä¾‹é¡¹ç›®
 * @returns {NodeJS.ReadWriteStream}
 */
function packDemo () {
  return gulp.src(['tools/demo/**/*', 'test/content.js'], {
    nodir: true
  })
    .pipe(ifdef(platform))
    .pipe(gulpif(platform !== 'uni-app', converter(platform)))
    .pipe(gulp.dest(`dev/${platform}/`))
}
gulp.task('dev', gulp.series('clean', gulp.parallel(packComp, packDemo)))
/**
 * @description ç›‘听文件变化
 */
gulp.task('watch-demo', () => {
  gulp.watch(['tools/demo/**/*', 'test/content.js']).on('all', (type, file) => {
    console.log(type + ':' + file)
    packDemo()
  })
})
gulp.task('watch-comp', () => {
  gulp.watch(['src/**/*', 'src/common/**/*', 'plugins/**/*']).on('all', (type, file) => {
    console.log(type + ':' + file)
    packComp()
  })
})
gulp.task('watch', gulp.parallel('watch-demo', 'watch-comp'))
node_modules/mp-html/lint.js
New file
@@ -0,0 +1,63 @@
const fs = require('fs')
const glob = require('glob')
const standard = require('standard')
// è§£æžå‚æ•°
let fix = false
let mode = '**/*.@(js|vue)'
for (let i = 2; i < process.argv.length; i++) {
  if (process.argv[i] === '--fix') {
    fix = true
  } else {
    mode = process.argv[i]
  }
}
// æ£€æŸ¥ js æ–‡ä»¶
function lintJs (filePath, content) {
  const res = standard.lintTextSync(content, {
    global: ['App', 'Page', 'Component', 'wx', 'requirePlugin', 'uni', 'test', 'expect', 'plus', 'Image'],
    fix
  }).results
  // å†™å›žä¿®å¤çš„内容
  if (fix && res[0].output) {
    fs.writeFileSync(filePath, res[0].output)
  }
  // æ‰“印错误信息
  for (let i = 0; i < res[0].messages.length; i++) {
    const item = res[0].messages[i]
    console.log(filePath + ':' + item.line + ':' + item.column + ': ' + item.message)
  }
}
// æ£€æŸ¥ vue æ–‡ä»¶
function lintVue (filePath, content) {
  // æå– script éƒ¨åˆ†
  const script = content.match(/<script>([\s\S]+?)<\/script>/)
  const line = content.substr(0, script.index).split('\n').length - 1
  const res = standard.lintTextSync(script[1], {
    global: ['uni', 'plus', 'weex'],
    fix
  }).results
  // å†™å›žä¿®å¤çš„内容
  if (fix && res[0].output) {
    fs.writeFileSync(filePath, content.replace(/<script>[\s\S]+?<\/script>/, '<script>' + res[0].output + '</script>'))
  }
  // æ‰“印错误信息
  for (let i = 0; i < res[0].messages.length; i++) {
    const item = res[0].messages[i]
    console.log(filePath + ':' + (line + item.line) + ':' + item.column + ': ' + item.message)
  }
}
glob(mode, {
  ignore: ['node_modules/**', 'coverage/**', 'dist/**', 'dev/**', '**/*.min.js']
}, (_, files) => {
  for (let i = 0; i < files.length; i++) {
    if (files[i].includes('.js')) {
      lintJs(files[i], fs.readFileSync(files[i], 'utf-8'))
    } else if (files[i].includes('.vue')) {
      lintVue(files[i], fs.readFileSync(files[i], 'utf-8'))
    }
  }
})
node_modules/mp-html/package.json
New file
@@ -0,0 +1,74 @@
{
  "name": "mp-html",
  "version": "2.5.1",
  "description": "小程序富文本组件",
  "miniprogram": "dist/mp-weixin",
  "repository": "https://github.com/jin-yufeng/mp-html",
  "author": "Jin Yufeng",
  "license": "MIT",
  "keywords": [
    "miniprogram",
    "rich-text",
    "html"
  ],
  "standard": {
    "globals": ["App", "Page", "Component", "wx", "requirePlugin", "uni", "plus", "weex"],
    "envs": ["jest", "browser"]
  },
  "jest": {
    "testEnvironment": "jsdom",
    "collectCoverageFrom": [
      "dev/mp-weixin/components/mp-html/**/*.js"
    ]
  },
  "scripts": {
    "lint": "node lint.js",
    "lintcss": "npx stylelint src/**/*.wxss",
    "build:weixin": "gulp build --mp-weixin",
    "build:qq": "gulp build --mp-qq",
    "build:baidu": "gulp build --mp-baidu",
    "build:alipay": "gulp build --mp-alipay",
    "build:toutiao": "gulp build --mp-toutiao",
    "build:uni-app": "gulp build --uni-app",
    "build": "gulp build --mp-weixin & gulp build --mp-qq & gulp build --mp-baidu & gulp build --mp-alipay & gulp build --mp-toutiao & gulp build --uni-app",
    "watch:weixin": "gulp watch --mp-weixin --dev",
    "watch:qq": "gulp watch --mp-qq --dev",
    "watch:baidu": "gulp watch --mp-baidu --dev",
    "watch:alipay": "gulp watch --mp-alipay --dev",
    "watch:toutiao": "gulp watch --mp-toutiao --dev",
    "watch:uni-app": "gulp watch --uni-app --dev",
    "dev:weixin": "gulp dev --mp-weixin --dev",
    "dev:qq": "gulp dev --mp-qq --dev",
    "dev:baidu": "gulp dev --mp-baidu --dev",
    "dev:alipay": "gulp dev --mp-alipay --dev",
    "dev:toutiao": "gulp dev --mp-toutiao --dev",
    "dev:uni-app": "gulp dev --uni-app --dev",
    "test": "gulp dev --mp-weixin --dev && npx jest",
    "coverage": "gulp dev --mp-weixin --dev && npx jest --coverage",
    "coveralls": "npx coveralls < coverage/lcov.info",
    "clean": "gulp clean --all",
    "clean:dev": "gulp clean --all --dev"
  },
  "devDependencies": {
    "@babel/preset-env": "^7.12.1",
    "coveralls": "^3.1.0",
    "gulp": "^4.0.0",
    "gulp-babel": "^8.0.0",
    "gulp-clean": "^0.4.0",
    "gulp-clean-css": "^4.3.0",
    "gulp-htmlmin": "^5.0.1",
    "gulp-if": "^3.0.0",
    "gulp-plumber": "^1.2.1",
    "gulp-size": "^3.0.0",
    "gulp-uglify": "^2.1.2",
    "jest": "^26.6.1",
    "miniprogram-simulate": "^1.2.7",
    "standard": "^16.0.3",
    "stylelint": "^13.7.2",
    "stylelint-config-recess-order": "^2.3.0",
    "stylelint-config-standard": "^20.0.0",
    "through2": "^4.0.2",
    "uglify-js": "^2.8.29"
  },
  "dependencies": {}
}
node_modules/mp-html/plugins/README.md
New file
@@ -0,0 +1,2 @@
# æ’ä»¶
本目录下是一些扩展插件,可以按照需要选用以实现更加丰富的功能
node_modules/mp-html/plugins/audio/README.md
New file
@@ -0,0 +1,25 @@
# audio
功能:音乐播放器
大小:*≈4KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš(nvue ä¸æ”¯æŒ) |
百度小程序原生包在此 [问题](https://smartprogram.baidu.com/forum/topic/show/125787) æœªè§£å†³å‰æ— æ³•使用
说明:
在大多数小程序平台,*audio* æ ‡ç­¾å·²è¢«åºŸå¼ƒæˆ–无法使用,本插件可以代替 *audio* æ ‡ç­¾æ’­æ”¾éŸ³ä¹ï¼Œå¹¶å®žçŽ°ä»¥ä¸‹ä¼˜åŒ–ï¼š
1. *pause-video* å±žæ€§ä¹Ÿå¯ä»¥åº”用于音频,即播放一个音视频时可以自动暂停其他正在播放的音视频
2. å¢žåŠ äº†ä¸€ä¸ªå¯ä»¥æ‹–åŠ¨çš„è¿›åº¦æ¡
3. ç»„件大小可以根据页面宽度自动调整
4. æ”¯æŒ *autoplay* å±žæ€§
5. æ’­æ”¾è¢«åŽå°æ‰“断时,页面显示后自动继续播放
基础库要求:
支付宝 *1.23.4+* ï¼Œå…¶ä½™å¹³å°æ»¡è¶³æœ€ä½Žè¦æ±‚即可
第 *5* æ¡ä»…微信 *2.2.3+* ã€*QQ*、百度支持
?> å¦‚果希望页面上使用本组件,组件的路径为 *path/to/mp-html/audio/audio*
属性和事件基本同 *audio* ç»„件,组件实例上提供了 *setSrc*、*play*、*seek*、*pause*、*stop* æ–¹æ³•可供控制播放状态
node_modules/mp-html/plugins/audio/build.js
New file
@@ -0,0 +1,11 @@
module.exports = {
  usingComponents: {
    'my-audio': '../audio/audio'
  },
  handler (file) {
    // åˆ åŽ»åŽŸæ¥çš„ audio æ ‡ç­¾
    if (file.basename === 'node.wxml' || file.basename === 'node.vue') {
      file.contents = Buffer.from(file.contents.toString().replace(/<audio[\s\S]+?>/, ''))
    }
  }
}
node_modules/mp-html/plugins/audio/context.js
New file
@@ -0,0 +1,7 @@
const ctx = {}
module.exports = {
  get: id => ctx[id],
  set: (id, vm) => { ctx[id] = vm },
  remove: id => { ctx[id] = undefined }
}
node_modules/mp-html/plugins/audio/index.js
New file
@@ -0,0 +1,34 @@
/**
 * @fileoverview audio æ’ä»¶
 */
const context = require('./context')
let index = 0
function Audio (vm) {
  this.vm = vm
}
Audio.prototype.onUpdate = function () {
  this.audios = []
}
Audio.prototype.onParse = function (node) {
  if (node.name === 'audio') {
    if (!node.attrs.id) {
      node.attrs.id = 'a' + index++
    }
    this.audios.push(node.attrs.id)
  }
}
Audio.prototype.onLoad = function () {
  setTimeout(() => {
    for (let i = 0; i < this.audios.length; i++) {
      const ctx = context.get(this.audios[i])
      ctx.id = this.audios[i]
      this.vm._videos.push(ctx)
    }
  }, 500)
}
module.exports = Audio
node_modules/mp-html/plugins/audio/miniprogram/audio.js
New file
@@ -0,0 +1,189 @@
/**
 * @fileoverview audio ç»„ä»¶
 */
const context = require('./context')
Component({
  data: {
    time: '00:00'
  },
  properties: {
    name: String, // éŸ³ä¹å
    author: String, // ä½œè€…
    poster: String, // æµ·æŠ¥å›¾ç‰‡åœ°å€
    autoplay: Boolean, // æ˜¯å¦è‡ªåŠ¨æ’­æ”¾
    controls: Boolean, // æ˜¯å¦æ˜¾ç¤ºæŽ§ä»¶
    loop: Boolean, // æ˜¯å¦å¾ªçŽ¯æ’­æ”¾
    src: { // æºåœ°å€
      type: String,
      observer (src) {
        this.setSrc(src)
      }
    }
  },
  created () {
    // åˆ›å»ºå†…部 context
    this._ctx = wx.createInnerAudioContext()
    this._ctx.onError(err => {
      this.setData({
        error: true
      })
      this.triggerEvent('error', err)
    })
    this._ctx.onTimeUpdate(() => {
      const time = this._ctx.currentTime
      const min = parseInt(time / 60)
      const sec = Math.ceil(time % 60)
      const data = {}
      data.time = (min > 9 ? min : '0' + min) + ':' + (sec > 9 ? sec : '0' + sec)
      // ä¸åœ¨æ‹–动状态下需要更新进度条
      if (!this.lastTime) {
        data.value = time / this._ctx.duration * 100
      }
      this.setData(data)
    })
    this._ctx.onEnded(() => {
      if (!this.properties.loop) {
        this.setData({
          playing: false
        })
      }
    })
    // #ifndef ALIPAY
  },
  attached () {
    context.set(this.id, this)
    // #endif
    // #ifdef MP-ALIPAY
    context.set(this.properties.id, this)
    this.setSrc(this.properties.src)
    // #endif
  },
  // #ifdef MP-ALIPAY
  didUpdate (e) {
    if (e.src !== this.properties.src) {
      this.setSrc(this.properties.src)
    }
  },
  // #endif
  detached () {
    this._ctx.destroy()
    // #ifndef MP-ALIPAY
    context.remove(this.id)
    // #endif
    // #ifdef MP_ALIPAY
    context.remove(this.properties.id)
    // #endif
  },
  // #ifndef ALIPAY | TOUTIAO
  pageLifetimes: {
    show () {
      // æ’­æ”¾è¢«åŽå°æ‰“断时,页面显示后自动继续播放
      if (this.data.playing && this._ctx.paused) {
        this._ctx.play()
      }
    }
  },
  // #endif
  methods: {
    /**
     * @description è®¾ç½®æº
     * @param {string} src æºåœ°å€
     */
    setSrc (src) {
      this._ctx.autoplay = this.properties.autoplay
      this._ctx.loop = this.properties.loop
      this._ctx.src = src
      if (this.properties.autoplay && !this.data.playing) {
        this.setData({
          playing: true
        })
      }
    },
    /**
     * @description æ’­æ”¾éŸ³ä¹
     */
    play () {
      this._ctx.play()
      this.setData({
        playing: true
      })
      this.triggerEvent('play'
        // #ifdef MP-ALIPAY
        , {
          target: {
            id: this.props.id
          }
        }
        // #endif
      )
    },
    /**
     * @description æš‚停音乐
     */
    pause () {
      this._ctx.pause()
      this.setData({
        playing: false
      })
      this.triggerEvent('pause')
    },
    /**
     * @description è®¾ç½®æ’­æ”¾é€Ÿçއ
     * @param {Number} rate æ’­æ”¾é€Ÿçއ
     */
    playbackRate (rate) {
      this._ctx.playbackRate = rate
    },
    /**
     * @description åœæ­¢éŸ³ä¹
     */
    stop () {
      this._ctx.stop()
      this.setData({
        playing: false,
        time: '00:00'
      })
      this.triggerEvent('stop')
    },
    /**
     * @description æŽ§åˆ¶è¿›åº¦
     * @param {number} sec ç§’æ•°
     */
    seek (sec) {
      this._ctx.seek(sec)
    },
    /**
     * @description ç§»åŠ¨è¿›åº¦æ¡
     * @param {event} e
     * @private
     */
    _seeking (e) {
      // é¿å…è¿‡äºŽé¢‘繁 setData
      if (e.timeStamp - this.lastTime < 200) return
      const time = Math.round(e.detail.value / 100 * this._ctx.duration)
      const min = parseInt(time / 60)
      const sec = time % 60
      this.setData({
        time: (min > 9 ? min : '0' + min) + ':' + (sec > 9 ? sec : '0' + sec)
      })
      this.lastTime = e.timeStamp
    },
    /**
     * @description è¿›åº¦æ¡ç§»åŠ¨å®Œæ¯•
     * @param {event} e
     * @private
     */
    _seeked (e) {
      this._ctx.seek(e.detail.value / 100 * this._ctx.duration)
      this.lastTime = undefined
    }
  }
})
node_modules/mp-html/plugins/audio/miniprogram/audio.json
New file
@@ -0,0 +1,3 @@
{
  "component": true
}
node_modules/mp-html/plugins/audio/miniprogram/audio.wxml
New file
@@ -0,0 +1,17 @@
<view wx:if="{{controls}}" class="_contain">
  <!-- æµ·æŠ¥å’ŒæŒ‰é’® -->
    <view class="_poster" style="background-image:url('{{poster}}')">
        <view class="_button" bindtap="{{playing?'pause':'play'}}">
            <view class="{{playing?'_pause':'_play'}}" />
        </view>
  </view>
  <!-- æ›²åå’Œä½œè€… -->
    <view class="_title">
        <view class="_name">{{name||'未知音频'}}</view>
        <view class="_author">{{author||'未知作者'}}</view>
  </view>
  <!-- è¿›åº¦æ¡ -->
  <slider class="_slider" activeColor="#585959" block-size="12" disabled="{{error}}" value="{{value}}" bindchanging="_seeking" bindchange="_seeked" />
  <!--播放时间-->
  <view class="_time">{{time}}</view>
</view>
node_modules/mp-html/plugins/audio/miniprogram/audio.wxss
New file
@@ -0,0 +1,127 @@
/* é¡¶å±‚容器 */
._contain {
  position: relative;
  display: inline-flex;
  width: 290px;
  background-color: #fcfcfc;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
}
/* æ’­æ”¾ã€æš‚停按钮 */
._button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  overflow: hidden;
  background-color: rgb(0, 0, 0, 0.2);
  border: 1px solid white;
  border-radius: 50%;
  opacity: 0.9;
}
._play {
  margin-left: 2px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 8px solid white;
}
._pause {
  width: 8px;
  height: 8px;
  background-color: white;
}
/* æµ·æŠ¥ */
._poster {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  background-color: #e6e6e6;
  background-size: contain;
}
/* æ ‡é¢˜æ  */
._title {
  flex: 1;
  margin: 4px 0 0 14px;
  text-align: left;
}
._author {
  width: 45px;
  font-size: 12px;
  color: #888;
}
._name {
  width: 140px;
  font-size: 15px;
  line-height: 39px;
}
._author,
._name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* è¿›åº¦æ¡ */
._slider {
  position: absolute;
  right: 16px;
  bottom: 8px;
  width: 140px;
  margin: 0;
}
/* æ’­æ”¾æ—¶é—´ */
._time {
  margin: 7px 14px 0 0;
  font-size: 12px;
  color: #888;
}
/* å“åº”式布局,大屏幕用更大的尺寸 */
@media (min-width: 400px) {
  ._contain {
    width: 380px;
  }
  ._button {
    width: 26px;
    height: 26px;
  }
  ._poster {
    width: 90px;
    height: 90px;
  }
  ._author {
    width: 60px;
    font-size: 15px;
  }
  ._name {
    width: 180px;
    font-size: 19px;
    line-height: 55px;
  }
  ._slider {
    right: 20px;
    bottom: 10px;
    width: 180px;
  }
  ._time {
    font-size: 15px;
  }
}
node_modules/mp-html/plugins/audio/miniprogram/build.js
New file
@@ -0,0 +1,3 @@
module.exports = {
  template: '<my-audio wx:if="{{n.name==\'audio\'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" autoplay="{{n.attrs.autoplay}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" data-source="audio" bindplay="play" binderror="mediaError" />'
}
node_modules/mp-html/plugins/audio/uni-app/audio.vue
New file
@@ -0,0 +1,269 @@
<template>
    <view v-if="controls" @click="onClick" class="_contain">
    <!-- æµ·æŠ¥å’ŒæŒ‰é’® -->
        <view class="_poster" :style="'background-image:url('+poster+')'">
            <view class="_button" @tap="_buttonTap">
                <view :class="playing?'_pause':'_play'" />
            </view>
        </view>
    <!-- æ›²åå’Œä½œè€… -->
        <view class="_title">
            <view class="_name">{{name||'未知音频'}}</view>
            <view class="_author">{{author||'未知作者'}}</view>
        </view>
    <!-- è¿›åº¦æ¡ -->
    <slider class="_slider" activeColor="#585959" block-size="12" handle-size="12" :disabled="error" :value="value" @changing="_seeking" @change="_seeked" />
    <!--播放时间-->
        <view class="_time">{{time||'00:00'}}</view>
    </view>
</template>
<script>
/**
 * @fileoverview audio ç»„ä»¶
 */
import context from './context'
export default {
  data () {
    return {
      error: false,
      playing: false,
      time: '00:00',
      value: 0
    }
  },
  props: {
    aid: String,
    name: String, // éŸ³ä¹å
    author: String, // ä½œè€…
    poster: String, // æµ·æŠ¥å›¾ç‰‡åœ°å€
    autoplay: [Boolean, String], // æ˜¯å¦è‡ªåŠ¨æ’­æ”¾
    controls: [Boolean, String], // æ˜¯å¦æ˜¾ç¤ºæŽ§ä»¶
    loop: [Boolean, String], // æ˜¯å¦å¾ªçŽ¯æ’­æ”¾
    src: String // æºåœ°å€
  },
  watch: {
    src (src) {
      this.setSrc(src)
    }
  },
  mounted () {
    this._ctx = uni.createInnerAudioContext()
    this._ctx.onError((err) => {
      this.error = true
      this.$emit('error', err)
    })
    this._ctx.onTimeUpdate(() => {
      const time = this._ctx.currentTime
      const min = parseInt(time / 60)
      const sec = Math.ceil(time % 60)
      this.time = (min > 9 ? min : '0' + min) + ':' + (sec > 9 ? sec : '0' + sec)
      if (!this.lastTime) {
        this.value = time / this._ctx.duration * 100 // ä¸åœ¨æ‹–动状态下
      }
    })
    this._ctx.onEnded(() => {
      if (!this.loop) {
        this.playing = false
      }
    })
    context.set(this.aid, this)
    this.setSrc(this.src)
  },
  beforeDestroy () {
    this._ctx.destroy()
    context.remove(this.aid)
  },
  onPageShow () {
    if (this.playing && this._ctx.paused) {
      this._ctx.play()
    }
  },
  methods: {
    // è®¾ç½®æº
    setSrc (src) {
      this._ctx.autoplay = this.autoplay
      this._ctx.loop = this.loop
      this._ctx.src = src
      if (this.autoplay && !this.playing) {
        this.playing = true
      }
    },
    // æ’­æ”¾
    play () {
      this._ctx.play()
      this.playing = true
      this.$emit('play', {
        target: {
          id: this.aid
        }
      })
    },
    // æš‚停
    pause () {
      this._ctx.pause()
      this.playing = false
      this.$emit('pause')
    },
    // è®¾ç½®æ’­æ”¾é€Ÿçއ
    playbackRate (rate) {
      this._ctx.playbackRate = rate
    },
    // ç§»åŠ¨è¿›åº¦æ¡
    seek (sec) {
      this._ctx.seek(sec)
    },
    // å†…部方法
    _buttonTap () {
      if (this.playing) this.pause()
      else this.play()
    },
    _seeking (e) {
      // é¿å…è¿‡äºŽé¢‘繁 setData
      if (e.timeStamp - this.lastTime < 200) return
      const time = Math.round(e.detail.value / 100 * this._ctx.duration)
      const min = parseInt(time / 60)
      const sec = time % 60
      this.time = (min > 9 ? min : '0' + min) + ':' + (sec > 9 ? sec : '0' + sec)
      this.lastTime = e.timeStamp
    },
    _seeked (e) {
      this.seek(e.detail.value / 100 * this._ctx.duration)
      this.lastTime = undefined
    },
    onClick(e) {
      this.$emit('onClick', e)
    }
  }
}
</script>
<style>
/* é¡¶å±‚容器 */
._contain {
  position: relative;
  display: inline-flex;
  width: 290px;
  background-color: #fcfcfc;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
}
/* æ’­æ”¾ã€æš‚停按钮 */
._button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  overflow: hidden;
  background-color: rgb(0, 0, 0, 0.2);
  border: 1px solid white;
  border-radius: 50%;
  opacity: 0.9;
}
._play {
  margin-left: 2px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 8px solid white;
}
._pause {
  width: 8px;
  height: 8px;
  background-color: white;
}
/* æµ·æŠ¥ */
._poster {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  background-color: #e6e6e6;
  background-size: contain;
}
/* æ ‡é¢˜æ  */
._title {
  flex: 1;
  margin: 4px 0 0 14px;
  text-align: left;
}
._author {
  width: 45px;
  font-size: 12px;
  color: #888;
}
._name {
  width: 140px;
  font-size: 15px;
  line-height: 39px;
}
._author,
._name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* è¿›åº¦æ¡ */
._slider {
  position: absolute;
  right: 16px;
  bottom: 8px;
  width: 140px;
  margin: 0;
}
/* æ’­æ”¾æ—¶é—´ */
._time {
  margin: 7px 14px 0 0;
  font-size: 12px;
  color: #888;
}
/* å“åº”式布局,大屏幕用更大的尺寸 */
@media (min-width: 400px) {
  ._contain {
    width: 380px;
  }
  ._button {
    width: 26px;
    height: 26px;
  }
  ._poster {
    width: 90px;
    height: 90px;
  }
  ._author {
    width: 60px;
    font-size: 15px;
  }
  ._name {
    width: 180px;
    font-size: 19px;
    line-height: 55px;
  }
  ._slider {
    right: 20px;
    bottom: 10px;
    width: 180px;
  }
  ._time {
    font-size: 15px;
  }
}
</style>
node_modules/mp-html/plugins/audio/uni-app/build.js
New file
@@ -0,0 +1,3 @@
module.exports = {
  template: '<my-audio v-if="n.name==\'audio\'" :class="n.attrs.class" :style="n.attrs.style" :aid="n.attrs.id" :author="n.attrs.author" :controls="n.attrs.controls" :autoplay="n.attrs.autoplay" :loop="n.attrs.loop" :name="n.attrs.name" :poster="n.attrs.poster" :src="n.src[ctrl[i]||0]" :data-i="i" data-source="audio" @play="play" @error="mediaError" />'
}
node_modules/mp-html/plugins/card/README.md
New file
@@ -0,0 +1,30 @@
# card
功能:商品(联络人)信息卡
大小:*≈7KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš(nvue ä¸æ”¯æŒ) |
### æ•ˆæžœå›¾
![效果图](../../docs/assets/plugin/card.png)
### å‚数列表
|参数名|是否必须|类型|说明|
|:---- |:---|:----- |----- |
|src|是|String|图片Url|
|title|是|String|标题|
|desc|是|String|描述|
|url|是|String|跳转url|
|color|是|String|文字颜色|
|bgcolor|是|String|卡片背景颜色|
|border|是|String|卡片边框颜色|
### è¯´æ˜Žï¼š
1. å¯ä»¥æ˜¾ç¤ºå•†å“ä¿¡æ¯å¡ç‰‡/联络人信息卡片
### åŸºç¡€åº“要求:
满足最低要求即可
?> å¦‚果希望页面上使用本组件,组件的路径为 *path/to/mp-html/card/card*
node_modules/mp-html/plugins/card/build.js
New file
@@ -0,0 +1,14 @@
module.exports = {
  usingComponents: {
    'my-card': '../card/card'
  },
  handler (file) {
    if (file.isBuffer()) {
      let content = file.contents.toString()
      if (file.path.includes('parser.js')) {
        content = content.replace(/trustTags\s*:\s*makeMap\('/, "trustTags: makeMap('card,").replace(/voidTags\s*:\s*makeMap\('/, "voidTags: makeMap('card,")
      }
      file.contents = Buffer.from(content)
    }
  }
}
node_modules/mp-html/plugins/card/index.js
New file
@@ -0,0 +1,7 @@
/**
 * @fileoverview Card æ’ä»¶
 */
function Card (vm) {
}
module.exports = Card
node_modules/mp-html/plugins/card/miniprogram/build.js
New file
@@ -0,0 +1,3 @@
module.exports = {
  template: '<my-card wx:if="{{n.name==\'card\'}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" mode="{{opts[5]}}" src="{{n.attrs.src}}" title="{{n.attrs.title}}" desc="{{n.attrs.desc}}" url="{{n.attrs.url}}" color="{{n.attrs.color}}" bgcolor="{{n.attrs.bgcolor}}" border="{{n.attrs.border}}" name="{{n.attrs.name}}" data-i="{{i}}" data-source="card" />'
}
node_modules/mp-html/plugins/card/miniprogram/card.js
New file
@@ -0,0 +1,26 @@
/**
 * @fileoverview card ç»„ä»¶
 */
Component({
  properties: {
    mode: {
      type: Boolean,
      default: false
    },
    src: String,
    title: String,
    desc: String,
    url: String,
    color: String,
    bgcolor: String,
    border: String
  },
  data: {},
  methods: {
    onClick (e) {
      if (this.properties.url && this.properties.url.trim().length > 6 && !this.properties.mode) {
        wx.navigateTo({ url: this.properties.url })
      }
    }
  }
})
node_modules/mp-html/plugins/card/miniprogram/card.json
New file
@@ -0,0 +1,3 @@
{
  "component": true
}
node_modules/mp-html/plugins/card/miniprogram/card.wxml
New file
@@ -0,0 +1,9 @@
<view class="card" bindtap="onClick" style="background-color:{{bgcolor||'#a4d0ff'}};border:{{border||'1px solid #FFF'}};color:{{color||'#000'}}">
    <image class="card-img" mode="aspectFill" src="{{src}}" />
    <view class="text-wrap text-wrap-width" wx:if="{{!!desc}}">
        <view class="title one-t">{{title}}</view>
        <view class="desc one-t">{{desc}}</view>
    </view>
    <view wx:else class="text-wrap-width title more-t">{{title}}</view>
    <image class="card-icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAABCFBMVEUAAAC/v7+qqqqZmZmLi6KJnZ2ImZmHlpaGlKGMjJmSkp6Li5eQkJuKlZ+Pj5mOjpeJkpuNjZ6IkJmHj5eLi5uKkpmGjZqJj5uLi5eIjpmIjZiKj5qKj5mJjpiHjJqJjZaGj5iKj5eIjJmKjpqHi5eGjZeIi5eHjZiIi5eHjJiIjpaHjJeIjZiGjJeIjZiGjJaGjJeIi5aGjJeHi5eHi5aHjJeHjJaHjJeGi5eHjJaHjJeGi5aGi5aHjJeHjJaGjJeGjJeHjJaHi5eGi5eHjJaHjJeGjJaGjJeHi5aHjJeHjJeHi5aGjJeHi5aGjJaHi5eGjJaHi5eHjJaGi5eGi5aHjJeGi5aGi5apAvjmAAAAV3RSTlMABAYKCw0PERMUFRYXGBkbHB0eICEjJiksLS8wMjQ1ODk7PD9ATFZXWFlaW1xdXl+Hi6msu7/Dx8vMzs/R0tTV19na3N3f4uTn6evs7e7v8PHy9PX7/P18cCTXAAABEklEQVRo3u2YWU5CQRQFn4qCM4LzhIoDAorzrIgCigiCimf/O/Gj3UIlmJxaQFXSea/T90aRMcYYY4zpG0ZPu9cZMnAi6SsLBjqS9LnJBcqSpC53Sjs/kqSPNaxwGAqtFbrQXKILjQW68DpPF17m6EI9TRdqM3TheZouVCbpQnkcK5RC4T5BF27jdOFqhC5cDtOFixhdOB+iC2cDdOEoggttLrDbk6QW5/+WJB1T/r1e+FAHWT/2q/35scsiF/w3cdZ/R13Y+8H/MMb6Hycgfz74n6ZYfzXJ+mspyF8I/vos68cep0X4eV2EB4SD4H9bZP3vy+yTtL3KjrGddXgQ34BXCVvwMmT7P69zjDHGGGP6gF83lHISOctsKQAAAABJRU5ErkJggg=="></image>
</view>
node_modules/mp-html/plugins/card/miniprogram/card.wxss
New file
@@ -0,0 +1,55 @@
.one-t {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: all linear 0.2s;
}
.more-t {
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: all linear 0.2s;
}
.card {
  width: 80%;
  margin: 10rpx auto;
  max-width: 700rpx;
  max-height: 140rpx;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20rpx 0 20rpx 10rpx;
  border-radius: 12rpx;
}
.card-img {
  width: 96rpx;
  height: 96rpx;
  border-radius: 12rpx;
  flex: 0 0 96rpx;
}
.card-icon {
  width: 30rpx;
  height: 96rpx;
}
.card .text-wrap {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card .text-wrap-width {
  width: 72%;
}
.card .title {
  font-weight: bold;
  font-size: 34rpx;
  line-height: 48rpx;
}
.card .desc {
  font-size: 27rpx;
  line-height: 37rpx;
}
node_modules/mp-html/plugins/card/uni-app/build.js
New file
@@ -0,0 +1,3 @@
module.exports = {
  template: '<my-card v-if="n.name==\'card\'" :class="n.attrs.class" :style="n.attrs.style" :mode="opts[5]" :src="n.attrs.src" :title="n.attrs.title" :desc="n.attrs.desc" :url="n.attrs.url" :color="n.attrs.color" :bgcolor="n.attrs.bgcolor" :border="n.attrs.border" :name="n.attrs.name" :data-i="i" data-source="card" />'
}
node_modules/mp-html/plugins/card/uni-app/card.vue
New file
@@ -0,0 +1,122 @@
<template>
    <view class="card" @click="onClick" :style="[customStyle]" :data-i="$attrs['data-i']">
        <image class="card-img" mode="aspectFill" :src="src" />
        <view class="text-wrap text-wrap-width" v-if="!!desc">
            <view class="title one-t">{{title}}</view>
            <view class="desc one-t">{{desc}}</view>
        </view>
        <view v-else class="text-wrap-width title more-t">{{title}}</view>
        <image class="card-icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAABCFBMVEUAAAC/v7+qqqqZmZmLi6KJnZ2ImZmHlpaGlKGMjJmSkp6Li5eQkJuKlZ+Pj5mOjpeJkpuNjZ6IkJmHj5eLi5uKkpmGjZqJj5uLi5eIjpmIjZiKj5qKj5mJjpiHjJqJjZaGj5iKj5eIjJmKjpqHi5eGjZeIi5eHjZiIi5eHjJiIjpaHjJeIjZiGjJeIjZiGjJaGjJeIi5aGjJeHi5eHi5aHjJeHjJaHjJeGi5eHjJaHjJeGi5aGi5aHjJeHjJaGjJeGjJeHjJaHi5eGi5eHjJaHjJeGjJaGjJeHi5aHjJeHjJeHi5aGjJeHi5aGjJaHi5eGjJaHi5eHjJaGi5eGi5aHjJeGi5aGi5apAvjmAAAAV3RSTlMABAYKCw0PERMUFRYXGBkbHB0eICEjJiksLS8wMjQ1ODk7PD9ATFZXWFlaW1xdXl+Hi6msu7/Dx8vMzs/R0tTV19na3N3f4uTn6evs7e7v8PHy9PX7/P18cCTXAAABEklEQVRo3u2YWU5CQRQFn4qCM4LzhIoDAorzrIgCigiCimf/O/Gj3UIlmJxaQFXSea/T90aRMcYYY4zpG0ZPu9cZMnAi6SsLBjqS9LnJBcqSpC53Sjs/kqSPNaxwGAqtFbrQXKILjQW68DpPF17m6EI9TRdqM3TheZouVCbpQnkcK5RC4T5BF27jdOFqhC5cDtOFixhdOB+iC2cDdOEoggttLrDbk6QW5/+WJB1T/r1e+FAHWT/2q/35scsiF/w3cdZ/R13Y+8H/MMb6Hycgfz74n6ZYfzXJ+mspyF8I/vos68cep0X4eV2EB4SD4H9bZP3vy+yTtL3KjrGddXgQ34BXCVvwMmT7P69zjDHGGGP6gF83lHISOctsKQAAAABJRU5ErkJggg=="></image>
    </view>
</template>
<script>
    export default {
        props: {
            mode: {
                type: Boolean,
                default: false
            },
            src: String,
            title: String,
            desc: String,
            url: String,
            color: String,
            bgcolor: String,
            border: String
        },
        data () {
            return {
            }
        },
        computed: {
            customStyle () {
                return {
                    'background-color': this.bgColor || '#a4d0ff',
                    border: this.border || '1px solid #FFF',
                    color: this.color || '#000'
                }
            }
        },
        methods: {
            onClick (e) {
              if (this.url && this.url.trim().length > 6 && !this.mode) {
                  uni.navigateTo({ url: this.url })
              }
              this.$emit('click', e)
            }
        }
    }
</script>
<style lang="scss">
    .one-t {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        transition: all linear 0.2s;
    }
    .more-t {
        overflow: hidden;
        text-overflow: ellipsis;
        word-break:break-all;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        transition: all linear 0.2s;
    }
    .card {
        width: 80%;
        margin: 10rpx auto;
        max-width: 700rpx;
        max-height: 140rpx;
        box-sizing: border-box;
        overflow: hidden;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20rpx 0 20rpx 10rpx;
        border-radius: 12rpx;
        &-img {
            width: 96rpx;
            height: 96rpx;
            border-radius: 12rpx;
            flex: 0 0 96rpx;
        }
        &-icon {
            width: 30rpx;
            height: 96rpx;
        }
        .text-wrap {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            &-width {
                width: 72%;
            }
        }
        .title {
            font-weight: bold;
            font-size: 34rpx;
            line-height: 48rpx;
        }
        .desc {
            font-size: 27rpx;
            line-height: 37rpx;
        }
    }
</style>
node_modules/mp-html/plugins/editable/README.md
New file
@@ -0,0 +1,137 @@
# editable
功能:富文本编辑
下表列出了本插件与原生 *editor* ç»„件的功能差异,可按需选用
| ç»„ä»¶ | ä¼˜ç‚¹ | ç¼ºç‚¹ |
|:---:|:---:|:---:|
| åŽŸç”Ÿ *editor* | åº•层通过 *contenteditable* å®žçŽ°ï¼Œç¼–è¾‘æµç•… | æ”¯æŒæ ‡ç­¾å°‘(不支持音视频、表格以及 *section* ç­‰å¸¸ç”¨æ ‡ç­¾ï¼‰ã€éƒ¨åˆ†å°ç¨‹åºå¹³å°ä¸æ”¯æŒæˆ–低版本不兼容 |
| æœ¬æ’ä»¶ | æ”¯æŒæ ‡ç­¾å…¨é¢ã€æ”¯æŒå¹³å°å…¨é¢ | ç¼–辑灵活性不够强 |
大小:*≈17.5KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš(nvue ä¸æ”¯æŒ) |
说明:
引入本插件后,会给组件添加以下属性:
| å±žæ€§å | ç±»åž‹ | é»˜è®¤å€¼ | è¯´æ˜Ž |
|:---:|:---:|:---:|:---:|
| editable | Boolean | false | æ˜¯å¦å¼€å¯å†…容编辑 |
| placeholder | String | è¯·è¾“å…¥ | è¾“入框为空时占位符(`2.1.0+`) |
添加以下事件:
| äº‹ä»¶å | è§¦å‘时机 | ç”¨é€” |
|:---:|:---:|:---:|
| remove(`2.2.0+`) | åˆ é™¤å›¾ç‰‡/视频/音频标签时 | åˆ é™¤å·²ä¸Šä¼ çš„线上文件 |
支持以下操作:
| ç±»åž‹ | æ“ä½œ |
|:---:|:---:|
| æ–‡æœ¬ | ä¿®æ”¹ |
| å›¾ç‰‡ | æ›´æ¢é“¾æŽ¥ã€è°ƒæ•´å®½åº¦ã€è®¾ç½®æˆè¶…链接(`2.0.4+`)、设置预览图链接、禁用预览、删除 |
| é“¾æŽ¥ | æ›´æ¢é“¾æŽ¥ã€åˆ é™¤ |
| éŸ³è§†é¢‘ | è®¾ç½®å°é¢ã€è®¾ç½®å¾ªçŽ¯æ’­æ”¾ã€è®¾ç½®è‡ªåŠ¨æ’­æ”¾ï¼ˆ`2.2.0+`)、删除 |
| æ™®é€šæ ‡ç­¾ | è®¾ç½®å­—体大小、斜体、粗体、下划线(`2.0.4+`)、居中、缩进、删除 |
> `2.2.1` ç‰ˆæœ¬èµ·æ‰€æœ‰æ ‡ç­¾æ”¯æŒä¸Šä¸‹ç§»åŠ¨æ“ä½œï¼Œä½†ä»…é™åŒçº§æ ‡ç­¾é—´ç§»åŠ¨ï¼Œå³åœ¨æœ‰åŒçº§æ ‡ç­¾ä¸”éžç¬¬ä¸€ä¸ªï¼ˆæˆ–æœ€åŽä¸€ä¸ªï¼‰æ—¶å¯ä»¥ä¸Šç§»ï¼ˆæˆ–ä¸‹ç§»ï¼‰
> åœ¨æ”¯ä»˜å®å°ç¨‹åºä¸­ä½¿ç”¨æ—¶éœ€è¦åœ¨é¡µé¢æ ·å¼ä¸­æ·»åŠ  *page { position: relative; }* é¿å… *tooltip* é”™ä½
> èœå•项可以通过编辑 *plugins/editable/config.js* è¿›è¡Œä¿®æ”¹ï¼Œä»…可以删减或调整顺序,添加或更名无效
组件实例上提供了以下方法(*editable* å±žæ€§ä¸º *true* æ—¶æ‰å¯ä»¥è°ƒç”¨ï¼‰ï¼š
| åç§° | åŠŸèƒ½ |
|:---:|:---:|
| undo | æ’¤é”€ä¸€ä¸ªæ“ä½œ |
| redo | é‡åšä¸€ä¸ªæ“ä½œ |
| insertHtml | åœ¨å…‰æ ‡å¤„插入指定 html å†…容(`2.1.0+`) |
| insertImg | åœ¨å…‰æ ‡å¤„插入一张图片 |
| insertTable(rows, cols) | åœ¨å…‰æ ‡å¤„插入一个 rows è¡Œ cols åˆ—的表格(`2.1.3+`) |
| insertVideo | åœ¨å…‰æ ‡å¤„插入一个视频 |
| insertAudio | åœ¨å…‰æ ‡å¤„插入一个音频 |
| insertLink | åœ¨å…‰æ ‡å¤„插入一个链接 |
| insertText | åœ¨å…‰æ ‡å¤„插入一段文本 |
| clear | æ¸…空内容 |
| getContent | èŽ·å–ç¼–è¾‘åŽçš„ html å†…容 |
> è€ƒè™‘到不同场景下希望获取链接的方法不同,需要在初始时给组件设置一个 *getSrc* æ–¹æ³•(否则插入图片、音视频、链接或修改链接等操作无法使用),每次组件内需要链接时会调用此方法,开发者可在此方法中自行决定如何获取链接,返回 **线上地址** å³å¯ï¼ˆå…·ä½“用法见下方示例)
编辑完成后,通过 *getContent* æ–¹æ³•获取编辑后的 *html*,最后将 *editable* å±žæ€§è®¾ç½®ä¸º *false* å³å¯æ­£å¸¸æ¸²æŸ“
> ç‚¹å‡»ä¿å­˜æŒ‰é’®æ—¶ï¼Œéƒ¨åˆ†å¹³å° *tap* äº‹ä»¶æ—©äºŽ *blur* äº‹ä»¶è§¦å‘,直接获取内容可能导致无法获取当前编辑的文本内容,因此建议设置一个小的延时后获取(可参考下方示例,[详细](https://github.com/jin-yufeng/mp-html/issues/368))
示例:
```javascript
Page({
  onLoad () {
    // ctx ä¸ºç»„件实例,获取方法见上
    /**
     * @description è®¾ç½®èŽ·å–é“¾æŽ¥çš„æ–¹æ³•
     * @param {String} type é“¾æŽ¥çš„类型(img/video/audio/link)
     * @param {String} value ä¿®æ”¹é“¾æŽ¥æ—¶ï¼Œè¿™é‡Œä¼šä¼ å…¥æ—§å€¼
     * @returns {Promise} è¿”回线上地址(2.2.0 ç‰ˆæœ¬èµ·è®¾ç½®äº† domain å±žæ€§æ—¶ï¼Œå¯ä»¥ç¼ºçœä¸»åŸŸåï¼‰
     *   type ä¸º audio/video æ—¶ï¼Œå¯ä»¥è¿”回一个源地址数组
     *   2.1.3 ç‰ˆæœ¬èµ· type ä¸º audio æ—¶ï¼Œå¯ä»¥è¿”回一个 object,包含 src、name、author、poster ç­‰å­—段
     *   2.2.0 ç‰ˆæœ¬èµ· type ä¸º img æ—¶ï¼Œå¯ä»¥è¿”回一个源地址数组,表示插入多张图片(修改链接时仅限一张)
     */
    this.ctx.getSrc = (type, value) => {
      return new Promise((resolve, reject) => {
        // ä»¥å›¾ç‰‡ä¸ºä¾‹
        if (type == 'img') {
          wx.chooseImage({
            count: value === undefined ? 9 : 1, // 2.2.0 ç‰ˆæœ¬èµ·æ’入图片时支持多张(修改图片链接时仅限一张)
            success: res => {
              wx.showLoading({
                title: '上传中'
              });
              (async ()=>{
                const arr = []
                for (let item of res.tempFilePaths) {
                  // ä¾æ¬¡ä¸Šä¼ 
                  const src = await upload(item)
                  arr.push(src)
                }
                return arr
              })().then(res => {
                wx.hideLoading()
                resolve(res)
              })
            },
            fail: reject
          })
        }
      })
    }
  },
  finishEdit () {
    setTimeout(() => {
      var html = ctx.getContent() // èŽ·å–ç¼–è¾‘å¥½çš„ html
      // ä¸Šä¼  html
      wx.request({
        url: 'xxx',
        data: {
          html
        },
        success: () => {
          this.setData({
            editable: false // ç»“束编辑
          })
        }
      })
    }, 50)
  }
})
```
**示例项目**:
微信小程序点击 [代码片段](https://developers.weixin.qq.com/s/GFbJKum77eBy) å³å¯åœ¨å¾®ä¿¡å¼€å‘者工具中导入;*uni-app* ä¸‹è½½ [示例项目](https://mp-html.oss-cn-hangzhou.aliyuncs.com/editable.zip) åœ¨ *HBuilder X* ä¸­æ‰“开即可体验;注意示例项目中不一定包含最新版本,仅供参考使用方法
注意事项:
1. ä¸è¦åœ¨ *editable* å±žæ€§è¢«è®¾ç½®ä¸º *true* å‰é€šè¿‡ *setContent* æ–¹æ³•(用 *content* å±žæ€§ï¼‰è®¾ç½®å†…容,否则在切换为 *true* åŽä¼šå˜æˆç©ºç™½
2. *editable* å±žæ€§ä¸º *true* æ—¶ä¸æ”¯æŒåœ¨ *scroll-view* ä¸­ä½¿ç”¨ï¼Œå¦åˆ™æç¤ºæ¡†çš„位置可能不正确
node_modules/mp-html/plugins/editable/config.js
New file
@@ -0,0 +1,15 @@
// ä»¥ä¸‹é¡¹ç›®å¯ä»¥åˆ å‡æˆ–更换顺序,但不能添加或更改名字
module.exports = {
  // æ™®é€šæ ‡ç­¾çš„菜单项
  node: ['大小', '颜色', '斜体', '粗体', '下划线', '居中', '缩进', '上移', '下移', '删除'],
  // å¯ä»¥è®¾ç½®çš„æ–‡å­—颜色,此项可以添加 css é¢œè‰²
  color: ['red', 'yellow', 'blue', 'green', 'gray', 'white', 'black'],
  // å›¾ç‰‡çš„菜单项
  img: ['换图', '宽度', '超链接', '预览图', '禁用预览', '上移', '下移', '删除'],
  // é“¾æŽ¥çš„菜单项
  link: ['更换链接', '上移', '下移', '删除'],
  // éŸ³è§†é¢‘的菜单项
  media: ['封面', '循环', '自动播放', '上移', '下移', '删除'],
  // å¡ç‰‡çš„菜单项
  card: ['上移', '下移', '删除']
}
node_modules/mp-html/plugins/editable/miniprogram/build.js
New file
@@ -0,0 +1,813 @@
const path = require('path')
/* global getTop */
module.exports = {
  style: `/* #ifndef MP-ALIPAY */
  ._address,
  ._article,
  ._aside,
  ._body,
  ._caption,
  ._center,
  ._cite,
  ._footer,
  ._header,
  ._html,
  ._nav,
  ._pre,
  ._section {
    display: block;
  }
  /* #endif */`,
  methods: {
    /**
     * @description å¼€å§‹ç¼–辑文本
     * @param {Event} e
     */
    editStart (e) {
      if (this.properties.opts[5]) {
        const i = e.currentTarget.dataset.i
        if (!this.data.ctrl['e' + i] && this.properties.opts[5] !== 'simple') {
          // æ˜¾ç¤ºè™šçº¿æ¡†
          this.setData({
            ['ctrl.e' + i]: 1
          })
          // ç‚¹å‡»å…¶ä»–地方则取消虚线框
          setTimeout(() => {
            this.root._mask.push(() => {
              this.setData({
                ['ctrl.e' + i]: 0
              })
            })
          }, 50)
          this.root._edit = this
          this.i = i
          this.cursor = this.getNode(i).text.length
        } else {
          if (this.properties.opts[5] === 'simple') {
            this.root._edit = this
            this.i = i
            this.cursor = this.getNode(i).text.length
          }
          this.root._mask.pop()
          this.root._maskTap()
          // å°† text è½¬ä¸º textarea
          this.setData({
            ['ctrl.e' + i]: 2
          })
          // å»¶æ—¶å¯¹ç„¦ï¼Œé¿å…é«˜åº¦é”™è¯¯
          setTimeout(() => {
            this.setData({
              ['ctrl.e' + i]: 3
            })
          }, 50)
        }
      }
    },
    /**
     * @description è¾“入文本
     * @param {Event} e
     */
    editInput (e) {
      const i = e.target.dataset.i
      // æ›¿æ¢è¿žç»­ç©ºæ ¼
      const value = e.detail.value.replace(/ {2,}/, $ => {
        let res = '\xa0'
        for (let i = 1; i < $.length; i++) {
          res += '\xa0'
        }
        return res
      })
      this.root._editVal('nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].text', this.getNode(i).text, value) // è®°å½•编辑历史
      this.cursor = e.detail.cursor
    },
    /**
     * @description å®Œæˆç¼–辑文本
     * @param {Event} e
     */
    editEnd (e) {
      const i = e.target.dataset.i
      // æ›´æ–°åˆ°è§†å›¾
      this.setData({
        ['ctrl.e' + i]: 0
      })
      this.root.setData({
        ['nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].text']: e.detail.value.replace(/ {2}/g, '\xa0 ')
      })
      if (e.detail.cursor !== undefined) {
        this.cursor = e.detail.cursor
      }
    },
    /**
     * @description æ’入一个标签
     * @param {Object} node è¦æ’入的标签
     */
    insert (node) {
      setTimeout(() => {
        const arr = this.i.split('_')
        const i = parseInt(arr.pop())
        let path = arr.join('_')
        const children = path ? this.getNode(path).children : this.properties.childs
        const childs = children.slice(0)
        if (!childs[i]) {
          childs.push(node)
        } else if (childs[i].text) {
          // åœ¨æ–‡æœ¬ä¸­æ’å…¥
          const text = childs[i].text
          if (node.type === 'text') {
            if (this.cursor) {
              childs[i].text = text.substring(0, this.cursor) + node.text + text.substring(this.cursor)
            } else {
              childs[i].text += node.text
            }
          } else {
            const list = []
            if (this.cursor) {
              list.push({
                type: 'text',
                text: text.substring(0, this.cursor)
              })
            }
            list.push(node)
            if (this.cursor < text.length) {
              list.push({
                type: 'text',
                text: text.substring(this.cursor)
              })
            }
            childs.splice(i, 1, ...list)
          }
        } else {
          childs.splice(i + 1, 0, node)
        }
        path = this.properties.opts[7] + path
        if (path[path.length - 1] === '_') {
          path = path.slice(0, -1)
        }
        this.root._editVal('nodes' + (path ? '[' + path.replace(/_/g, '].children[') + '].children' : ''), children, childs, true)
        this.i = arr.join('_') + '_' + (i + 1)
      }, 200)
    },
    /**
     * @description ç§»é™¤ç¬¬ i ä¸ªæ ‡ç­¾
     * @param {Number} i
     */
    remove (i) {
      const arr = i.split('_')
      const j = arr.pop()
      let path = arr.join('_')
      const children = path ? this.getNode(path).children : this.properties.childs
      const childs = children.slice(0)
      const delEle = childs.splice(j, 1)[0]
      if (delEle.name === 'img' || delEle.name === 'video' || delEle.name === 'audio') {
        let src = delEle.attrs.src
        if (delEle.src) {
          src = delEle.src.length === 1 ? delEle.src[0] : delEle.src
        }
        this.root.triggerEvent('remove', {
          type: delEle.name,
          src
        })
      }
      this.root._edit = undefined
      this.root._maskTap()
      path = this.properties.opts[7] + path
      if (path[path.length - 1] === '_') {
        path = path.slice(0, -1)
      }
      this.root._editVal('nodes' + (path ? '[' + path.replace(/_/g, '].children[') + '].children' : ''), children, childs, true)
    },
    /**
     * @description æ ‡ç­¾è¢«ç‚¹å‡»
     * @param {Event} e
     */
    nodeTap (e) {
      if (this.properties.opts[5]) {
        const i = e.currentTarget.dataset.i
        if (this.root._table) {
          const node = this.getNode(i)
          if (node.name === 'table') {
            this.root._table = undefined
            this.root._remove_table = () => {
              this.remove(i)
            }
          }
        }
        if (this.root._lock) return
        // é˜»æ­¢ä¸Šå±‚出现点击态
        this.root._lock = true
        setTimeout(() => {
          this.root._lock = false
        }, 50)
        const node = this.getNode(i)
        if (node.name === 'td' || node.name === 'th') {
          this.root._table = true
        }
        if (this.data.ctrl['e' + this.i] === 3) return
        this.root._maskTap()
        this.root._edit = this
        if (this.properties.opts[5] === 'simple') return
        const arr = i.split('_')
        const j = parseInt(arr.pop())
        let path = arr.join('_')
        const siblings = path ? this.getNode(path).children : this.properties.childs
        // æ˜¾ç¤ºå®žçº¿æ¡†
        this.setData({
          ['ctrl.e' + i]: 1
        })
        this.root._mask.push(() => {
          this.setData({
            ['ctrl.e' + i]: 0
          })
        })
        if (node.children.length === 1 && node.children[0].type === 'text') {
          const ii = i + '_0'
          if (!this.data.ctrl['e' + ii]) {
            this.setData({
              ['ctrl.e' + ii]: 1
            })
            this.root._mask.push(() => {
              this.setData({
                ['ctrl.e' + ii]: 0
              })
            })
            this.cursor = node.children[0].text.length
          }
          this.i = ii
        } else if (!(this.i || '').includes(i)) {
          this.i = i + '_'
        }
        const items = this.root._getItem(node, j !== 0, j !== siblings.length - 1)
        this.root._tooltip({
          top: getTop(e),
          items,
          success: tapIndex => {
            if (items[tapIndex] === '大小') {
              // æ”¹å˜å­—体大小
              const style = node.attrs.style || ''
              let value = style.match(/;font-size:([0-9]+)px/)
              if (value) {
                value = parseInt(value[1])
              } else {
                value = 16
              }
              this.root._slider({
                min: 10,
                max: 30,
                value,
                top: getTop(e),
                changing: val => {
                  if (Math.abs(val - value) > 2) {
                    // å­—号变换超过 2 æ—¶æ›´æ–°åˆ°è§†å›¾
                    this.changeStyle('font-size', i, val + 'px', value + 'px')
                    value = e.detail.value
                  }
                },
                change: val => {
                  if (val !== value) {
                    this.changeStyle('font-size', i, val + 'px', value + 'px')
                  }
                  this.root._editVal('nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].attrs.style', style, this.getNode(i).attrs.style)
                }
              })
            } else if (items[tapIndex] === '颜色') {
              // æ”¹å˜æ–‡å­—颜色
              const items = this.root._getItem('color')
              this.root._color({
                top: getTop(e),
                items,
                success: tapIndex => {
                  const style = node.attrs.style || ''
                  const value = style.match(/;color:([^;]+)/)
                  this.changeStyle('color', i, items[tapIndex], value ? value[1] : undefined)
                  this.root._editVal('nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].attrs.style', style, this.getNode(i).attrs.style)
                }
              })
            } else if (items[tapIndex] === '上移' || items[tapIndex] === '下移') {
              const arr = siblings.slice(0)
              const item = arr[j]
              if (items[tapIndex] === '上移') {
                arr[j] = arr[j - 1]
                arr[j - 1] = item
              } else {
                arr[j] = arr[j + 1]
                arr[j + 1] = item
              }
              path = this.properties.opts[7] + path
              if (path[path.length - 1] === '_') {
                path = path.slice(0, -1)
              }
              this.root._editVal('nodes' + (path ? '[' + path.replace(/_/g, '].children[') + '].children' : ''), siblings, arr, true)
            } else if (items[tapIndex] === '删除') {
              if ((node.name === 'td' || node.name === 'th') && this.root._remove_table) {
                this.root._remove_table()
                this.root._remove_table = undefined
              } else {
                this.remove(i)
              }
            } else {
              const style = node.attrs.style || ''
              let newStyle = ''
              const item = items[tapIndex]
              let name
              let value
              if (item === '斜体') {
                name = 'font-style'
                value = 'italic'
              } else if (item === '粗体') {
                name = 'font-weight'
                value = 'bold'
              } else if (item === '下划线') {
                name = 'text-decoration'
                value = 'underline'
              } else if (item === '居中') {
                name = 'text-align'
                value = 'center'
              } else if (item === '缩进') {
                name = 'text-indent'
                value = '2em'
              }
              if (style.includes(name + ':')) {
                // å·²æœ‰åˆ™å–消
                newStyle = style.replace(new RegExp(name + ':[^;]+'), '')
              } else {
                // æ²¡æœ‰åˆ™æ·»åŠ 
                newStyle = style + ';' + name + ':' + value
              }
              this.root._editVal('nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].attrs.style', style, newStyle, true)
            }
          }
        })
      }
    },
    /**
     * @description éŸ³è§†é¢‘被点击
     * @param {Event} e
     */
    mediaTap (e) {
      if (this.properties.opts[5]) {
        const i = e.target.dataset.i
        const node = this.getNode(i)
        const items = this.root._getItem(node)
        this.root._maskTap()
        this.root._edit = this
        this.i = i
        this.root._tooltip({
          top: e.target.offsetTop - 30,
          items,
          success: tapIndex => {
            switch (items[tapIndex]) {
              case '封面':
                // è®¾ç½®å°é¢
                this.root.getSrc('img', node.attrs.poster || '').then(url => {
                  this.root._editVal('nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].attrs.poster', node.attrs.poster, url instanceof Array ? url[0] : url, true)
                }).catch(() => { })
                break
              case '删除':
                this.remove(i)
                break
              case '循环':
              case '不循环':
                // åˆ‡æ¢å¾ªçŽ¯æ’­æ”¾
                this.root.setData({
                  ['nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].attrs.loop']: !node.attrs.loop
                })
                wx.showToast({
                  title: '成功'
                })
                break
              case '自动播放':
              case '不自动播放':
                // åˆ‡æ¢è‡ªåŠ¨æ’­æ”¾æ’­æ”¾
                this.root.setData({
                  ['nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].attrs.autoplay']: !node.attrs.autoplay
                })
                wx.showToast({
                  title: '成功'
                })
                break
            }
          }
        })
        // é¿å…ä¸Šå±‚出现点击态
        this.root._lock = true
        setTimeout(() => {
          this.root._lock = false
        }, 50)
      }
    },
    /**
     * æ”¹å˜æ ·å¼
     * @param {String} name å±žæ€§å
     * @param {Number} i ç¬¬å‡ ä¸ªæ ‡ç­¾
     * @param {String} value æ–°å€¼
     * @param {String} oldVal æ—§å€¼
     */
    changeStyle (name, i, value, oldVal) {
      let style = this.getNode(i).attrs.style || ''
      if (style.includes(';' + name + ':' + oldVal)) {
        // style ä¸­å·²ç»æœ‰
        style = style.replace(';' + name + ':' + oldVal, ';' + name + ':' + value)
      } else {
        // æ²¡æœ‰åˆ™æ–°å¢ž
        style += ';' + name + ':' + value
      }
      this.root.setData({
        ['nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].attrs.style']: style
      })
    }
  },
  handler (file) {
    if (file.isBuffer()) {
      let content = file.contents.toString()
      if (file.path.includes('miniprogram' + path.sep + 'index.wxml')) {
        // ä¼ é€’ editable å±žæ€§å’Œè·¯å¾„
        content = content.replace(/opts\s*=\s*"{{\[([^\]]+)\]}}"/, 'opts="{{[$1,editable,placeholder,\'\']}}"')
          .replace(/<view(.*?)style\s*=\s*"{{containerStyle}}"/, '<view$1style="{{editable?\'min-height:200px;\':\'\'}}{{containerStyle}}" bindtap="_containTap"')
          // å·¥å…·å¼¹çª—
          .replace('</view>', `  <view wx:if="{{tooltip}}" class="_tooltip_contain" style="top:{{tooltip.top}}px">
    <view class="_tooltip">
      <view wx:for="{{tooltip.items}}" wx:key="index" class="_tooltip_item" data-i="{{index}}" bindtap="_tooltipTap">{{item}}</view>
    </view>
  </view>
  <view wx:if="{{slider}}" class="_slider" style="top:{{slider.top}}px">
    <slider value="{{slider.value}}" min="{{slider.min}}" max="{{slider.max}}" block-size="14" show-value activeColor="white" mp-alipay:style="padding:10px" bindchanging="_sliderChanging" bindchange="_sliderChange" />
  </view>
  <view wx:if="{{color}}" class="_tooltip_contain" style="top:{{color.top}}px">
    <view class="_tooltip" style="overflow-y: hidden;">
      <view wx:for="{{color.items}}" wx:key="index" class="_color_item" style="background-color:{{item}}" data-i="{{index}}" bindtap="_colorTap"></view>
    </view>
  </view>
</view>`)
      } else if (file.path.includes('miniprogram' + path.sep + 'index.js')) {
        // æ·»åŠ  editable å±žæ€§ï¼Œå‘生变化时重新解析
        content = content.replace(/properties\s*:\s*{/, `properties: {
    editable: {
      type: null,
      observer (val) {
        if (this.properties.content) {
          this.setContent(val ? this.properties.content : this.getContent())
        } else if (val) {
          this.setData({
            nodes: [{
              name: 'p',
              attrs: {},
              children: [{
                type: 'text',
                text: ''
              }]
            }]
          })
          // #ifdef MP-TOUTIAO
          this.selectComponent('#_root', child => {
            child.root = this
          })
          // #endif
        }
        if (!val) {
          this._maskTap()
        }
      }
    },
    placeholder: String,`)
          .replace(/didUpdate\s*\(e\)\s*{/, `didUpdate (e) {
    if (e.editable !== this.properties.editable) {
      const val = this.properties.editable
      if (this.properties.content) {
        this.setContent(val ? this.properties.content : this.getContent())
      } else if (val) {
        this.setData({
          nodes: [{
            name: 'p',
            attrs: {},
            children: [{
              type: 'text',
              text: ''
            }]
          }]
        })
      }
      if (!val) {
        this._maskTap()
      }
    }`)
          // å¤„理各类弹窗的事件
          .replace(/methods\s*:\s*{/, `methods: {
    _containTap() {
      if (!this._lock && !this.data.slider && !this.data.color) {
        this._edit = undefined
        this._maskTap()
      }
    },
    _tooltipTap(e) {
      this._tooltipcb(e.currentTarget.dataset.i)
      this.setData({
        tooltip: null
      })
    },
    _sliderChanging(e) {
      this._slideringcb(e.detail.value)
    },
    _sliderChange(e) {
      this._slidercb(e.detail.value)
    },
    _colorTap(e) {
      this._colorcb(e.currentTarget.dataset.i)
      this.setData({
        color: null
      })
    },`)
      } else if (file.path.includes('miniprogram' + path.sep + 'index.wxss')) {
        // å·¥å…·å¼¹çª—的样式
        content += `/* æç¤ºæ¡ */
._tooltip_contain {
  position: absolute;
  right: 20px;
  left: 20px;
  text-align: center;
}
._tooltip {
  box-sizing: border-box;
  display: inline-block;
  width: auto;
  max-width: 100%;
  height: 30px;
  padding: 0 3px;
  overflow: scroll;
  font-size: 14px;
  line-height: 30px;
  white-space: nowrap;
}
._tooltip_item {
  display: inline-block;
  width: auto;
  padding: 0 2vw;
  line-height: 30px;
  background-color: black;
  color: white;
}
._color_item {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin: 5px 2vw;
  border:1px solid #dfe2e5;
  border-radius: 50%;
}
/* å›¾ç‰‡å®½åº¦æ»šåŠ¨æ¡ */
._slider {
  position: absolute;
  left: 20px;
  width: 220px;
}
._tooltip,
._slider {
  background-color: black;
  border-radius: 3px;
  opacity: 0.75;
}`
      } else if (file.path.includes('parser.js')) {
        content = content.replace(/popNode\s*=\s*function\s*\(\)\s*{/, 'popNode = function () {\n  const editable = this.options.editable')
          // ä¸è½¬æ¢æ ‡ç­¾å
          .replace(/if\s*\(config.blockTags\[node.name\]\)\s*{[\s\S]+?}/, `if (config.blockTags[node.name]) {
    if (!editable) {
      node.name = 'div'
    }
  }`)
          // è½¬æ¢è¡¨æ ¼å’Œåˆ—表
          .replace(/node.c(\)|\s*&&|\s*\n)/g, '(node.c || editable)$1')
          .replace(/while\s*\(map\[row\s*\+\s*'.'\s*\+\s*col\]\)\s*{[\s\S]+?}/, `while (map[row + '.' + col]) {
            col++
          }
          if (editable) {
            td.r = row
          }`)
          // ä¸åš expose å¤„理
          .replace(/parser.prototype.expose\s*=\s*function\s*\(\)\s*{/, `parser.prototype.expose = function () {
  if (this.options.editable) return`)
      } else if (file.path.includes('node.wxml')) {
        content = content.replace(/opts\s*=\s*"{{opts}}"/, 'opts="{{[opts[0],opts[1],opts[2],opts[3],opts[4],opts[5],opts[6],opts[7]+i+\'_\']}}"')
          .replace(/opts\s*=\s*"{{opts}}"/, 'opts="{{[opts[0],opts[1],opts[2],opts[3],opts[4],opts[5],opts[6],opts[7]+i1+\'_\'+i2+\'_\'+i3+\'_\'+i4+\'_\'+i5+\'_\']}}"')
          .replace('!n.c', "opts[5]?(!n.children||n.name=='a'):!n.c")
          .replace(/!(n.?)\.c(?![a-z])/g, '(opts[5]?true:!$1.c)')
          .replace(/isInline\((.*?)\)/g, '(opts[5]?true:isInline($1))')
          // ä¿®æ”¹æ™®é€šæ ‡ç­¾
          .replace(/<view\s*wx:else\s*id(.+?)style="/, '<view wx:else data-i="{{path+i}}" bindtap="nodeTap" id$1style="{{ctrl[\'e\'+path+i]&&opts[5]!==\'simple\'?\'border:1px solid black;padding:5px;display:block;\':\'\'}}')
          .replace(/<view\s*wx:else\s*id(.+?)style="/, '<view wx:else data-i="{{\'\'+i1}}" bindtap="nodeTap" id$1style="{{ctrl[\'e\'+i1]&&opts[5]!==\'simple\'?\'border:1px solid black;padding:5px;display:block;\':\'\'}}')
          .replace(/<view\s*wx:else\s*id(.+?)style="/, '<view wx:else data-i="{{i1+\'_\'+i2}}" bindtap="nodeTap" id$1style="{{ctrl[\'e\'+i1+\'_\'+i2]&&opts[5]!==\'simple\'?\'border:1px solid black;padding:5px;display:block;\':\'\'}}')
          .replace(/<view\s*wx:else\s*id(.+?)style="/, '<view wx:else data-i="{{i1+\'_\'+i2+\'_\'+i3}}" bindtap="nodeTap" id$1style="{{ctrl[\'e\'+i1+\'_\'+i2+\'_\'+i3]&&opts[5]!==\'simple\'?\'border:1px solid black;padding:5px;display:block;\':\'\'}}')
          .replace(/<view\s*wx:else\s*id(.+?)style="/, '<view wx:else data-i="{{i1+\'_\'+i2+\'_\'+i3+\'_\'+i4}}" bindtap="nodeTap" id$1style="{{ctrl[\'e\'+i1+\'_\'+i2+\'_\'+i3+\'_\'+i4]&&opts[5]!==\'simple\'?\'border:1px solid black;padding:5px;display:block;\':\'\'}}')
          // ä¿®æ”¹æ–‡æœ¬å—
          .replace(/<!--\s*文本\s*-->[\s\S]+?<!--\s*链接\s*-->/,
            `<block wx:elif="{{n.type==='text'}}">
    <text wx:if="{{!ctrl['e'+i]}}" data-i="{{i}}" mp-weixin:user-select="{{opts[4]}}" decode="{{!opts[5]}}" bindtap="editStart">{{n.text}}
      <text wx:if="{{!n.text}}" style="color:gray">{{opts[6]||'请输入'}}</text>
    </text>
    <text wx:elif="{{ctrl['e'+i]===1}}" data-i="{{i}}" style="border:1px dashed black;min-width:50px;width:auto;padding:5px;display:block" catchtap="editStart">{{n.text}}
      <text wx:if="{{!n.text}}" style="color:gray">{{opts[6]||'请输入'}}</text>
    </text>
    <textarea wx:else style="{{opts[5]==='simple'?'':'border:1px dashed black;'}}min-width:50px;width:auto;padding:5px" auto-height maxlength="-1" focus="{{ctrl['e'+i]===3}}" value="{{n.text}}" data-i="{{i}}" bindinput="editInput" bindblur="editEnd" />
  </block>
  <text wx:elif="{{n.name==='br'}}">\\n</text>`)
          // ä¿®æ”¹å›¾ç‰‡
          .replace(/<image(.+?)id="\{\{n.attrs.id/, '<image$1id="{{n.attrs.id||(\'n\'+i)')
          .replace('height:1px', "height:{{ctrl['h'+i]||1}}px")
          .replace('style="{{ctrl[i]', 'style="{{ctrl[\'e\'+i]&&opts[5]!==\'simple\'?\'border:1px dashed black;padding:3px;\':\'\'}}{{ctrl[i]')
          .replace(/weixin:show-menu-by-longpress\s*=\s*"{{(\S+?)}}"\s*baidu:image-menu-prevent\s*=\s*"{{(\S+?)}}"/, 'weixin:show-menu-by-longpress="{{!opts[5]&&$1}}" baidu:image-menu-prevent="{{opts[5]||$2}}"')
          // ä¿®æ”¹éŸ³è§†é¢‘
          .replace('<video', '<video bindtap="mediaTap"')
          .replace('audio ', 'audio bindtap="mediaTap" ')
          .replace('card', 'card bindtap="mediaTap"')
      } else if (file.path.includes('node.js') && file.extname === '.js') {
        content = `
        const Parser = require('../parser')
        function getTop(e) {
  let top
  // #ifndef MP-ALIPAY
  top = e.detail.y
  // #endif
  // #ifdef MP-ALIPAY
  top = top = e.detail.pageY
  // #endif
  if (top - e.currentTarget.offsetTop < 150 || top < 600) {
    top = e.currentTarget.offsetTop
  }
  if (top < 30) {
    top += 70
  }
  return top - 30
}` + content.replace('methods:', `detached () {
    if (this.root && this.root._edit === this) {
      this.root._edit = undefined
    }
  },
  methods:`)
            // è®°å½•图片宽度
            .replace(/imgLoad\s*\(e\)\s*{/, `imgLoad (e) {
      // #ifdef MP-WEIXIN || MP-QQ
      if (this.properties.opts[5]) {
        setTimeout(() => {
          const id = this.getNode(i).attrs.id || ('n' + i)
          wx.createSelectorQuery().in(this).select('#' + id).boundingClientRect().exec(res => {
            this.setData({
              ['ctrl.h'+i]: res[0].height
            })
          })
        }, 50)
      }
      // #endif`)
            .replace(/if\s*\(!node.w\)\s*{[\s\S]+?}/,
              `if (!node.w) {
        val = e.detail.width
        if (this.properties.opts[5]) {
          const data = {}
          const path = 'nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].attrs.'
          if (val < 150) {
            data[path + 'ignore'] = 'T'
          }
          data[path + 'width'] = val.toString()
          this.root.setData(data)
        }
      }`)
            // å¤„理图片点击
            .replace(/imgTap\s*\(e\)\s*{([\s\S]+?)},\s*\/\*/,
              `imgTap (e) {
      if (!this.properties.opts[5]) {$1} else {
        const i = e.target.dataset.i
        const node = this.getNode(i)
        const items = this.root._getItem(node)
        this.root._edit = this
        const parser = new Parser(this.root)
        this.i = i
        this.root._maskTap()
        this.setData({
          ['ctrl.e' + i]: 1
        })
        this.root._mask.push(() => {
          this.setData({
            ['ctrl.e' + i]: 0
          })
        })
        this.root._tooltip({
          top: getTop(e),
          items,
          success: tapIndex => {
            if (items[tapIndex] === '换图') {
              // æ¢å›¾
              this.root.getSrc('img', node.attrs.src || '').then(url => {
                this.root._editVal('nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].attrs.src', node.attrs.src, parser.getUrl(url instanceof Array ? url[0] : url), true)
              }).catch(() => { })
            } else if (items[tapIndex] === '宽度') {
              // æ›´æ”¹å®½åº¦
              const style = node.attrs.style || ''
              let value = style.match(/max-width:([0-9]+)%/)
              if (value) {
                value = parseInt(value[1])
              } else {
                value = 100
              }
              this.root._slider({
                min: 0,
                max: 100,
                value,
                top: getTop(e),
                changing: val => {
                  // å˜åŒ–超过 5% æ›´æ–°æ—¶è§†å›¾
                  if (Math.abs(val - value) > 5) {
                    this.changeStyle('max-width', i, val + '%', value + '%')
                    value = val
                  }
                },
                change: val => {
                  if (val !== value) {
                    this.changeStyle('max-width', i, val + '%', value + '%')
                    value = val
                  }
                  this.root._editVal('nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].attrs.style', style, this.getNode(i).attrs.style)
                }
              })
            } else if (items[tapIndex] === '超链接') {
              // å°†å›¾ç‰‡è®¾ç½®ä¸ºé“¾æŽ¥
              this.root.getSrc('link', node.a ? node.a.href : '').then(url => {
                // å¦‚果有 a æ ‡ç­¾åˆ™æ›¿æ¢ href
                if (node.a) {
                  this.root._editVal('nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].a.href', node.a.href, parser.getUrl(url), true)
                } else {
                  const link = {
                    name: 'a',
                    attrs: {
                      href: parser.getUrl(url)
                    },
                    children: [node]
                  }
                  node.a = link.attrs
                  this.root._editVal('nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + ']', node, link, true)
                }
                wx.showToast({
                  title: '成功'
                })
              }).catch(() => { })
            } else if (items[tapIndex] === '预览图') {
              // è®¾ç½®é¢„览图链接
              this.root.getSrc('img', node.attrs['original-src'] || '').then(url => {
                this.root._editVal('nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].attrs.original-src', node.attrs['original-src'], parser.getUrl(url instanceof Array ? url[0] : url), true)
                wx.showToast({
                  title: '成功'
                })
              }).catch(() => { })
            } else if (items[tapIndex] === '删除') {
              this.remove(i)
            } else {
              // ç¦ç”¨ / å¯ç”¨é¢„览
              this.root.setData({
                ['nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].attrs.ignore']: !node.attrs.ignore
              })
              wx.showToast({
                title: '成功'
              })
            }
          }
        })
        this.root._lock = true
        setTimeout(() => {
          this.root._lock = false
        }, 50)
      }
    },
    /*`)
            // å¤„理链接点击
            .replace(/linkTap\s*\(e\)\s*{([\s\S]+?)},\s*\/\*/,
              `linkTap (e) {
      if (!this.properties.opts[5]) {$1} else {
        const i = e.currentTarget.dataset.i
        const node = this.getNode(i)
        const items = this.root._getItem(node)
        this.root._tooltip({
          top: getTop(e),
          items,
          success: tapIndex => {
            if (items[tapIndex] === '更换链接') {
              this.root.getSrc('link', node.attrs.href).then(url => {
                this.root._editVal('nodes[' + (this.properties.opts[7] + i).replace(/_/g, '].children[') + '].attrs.href', node.attrs.href, url, true)
                wx.showToast({
                  title: '成功'
                })
              }).catch(() => { })
            } else {
              this.remove(i)
            }
          }
        })
      }
    },
    /*`)
      }
      file.contents = Buffer.from(content)
    }
  }
}
node_modules/mp-html/plugins/editable/miniprogram/index.js
New file
@@ -0,0 +1,551 @@
/**
 * @fileoverview editable æ’ä»¶
 */
const config = require('./config')
const Parser = require('../parser')
function Editable (vm) {
  this.vm = vm
  this.editHistory = [] // åŽ†å²è®°å½•
  this.editI = -1 // åŽ†å²è®°å½•æŒ‡é’ˆ
  vm._mask = [] // è’™ç‰ˆè¢«ç‚¹å‡»æ—¶è¿›è¡Œçš„æ“ä½œ
  /**
   * @description ç§»åŠ¨åŽ†å²è®°å½•æŒ‡é’ˆ
   * @param {Number} num ç§»åŠ¨è·ç¦»
   */
  const move = num => {
    const item = this.editHistory[this.editI + num]
    if (item) {
      this.editI += num
      vm.setData({
        [item.key]: item.value
      })
    }
  }
  vm.undo = () => move(-1) // æ’¤é”€
  vm.redo = () => move(1) // é‡åš
  /**
   * @description æ›´æ–°è®°å½•
   * @param {String} path è·¯å¾„
   * @param {*} oldVal æ—§å€¼
   * @param {*} newVal æ–°å€¼
   * @param {Boolean} set æ˜¯å¦æ›´æ–°åˆ°è§†å›¾
   * @private
   */
  vm._editVal = (path, oldVal, newVal, set) => {
    // å½“前指针后的内容去除
    while (this.editI < this.editHistory.length - 1) {
      this.editHistory.pop()
    }
    // æœ€å¤šå­˜å‚¨ 30 æ¡æ“ä½œè®°å½•
    while (this.editHistory.length > 30) {
      this.editHistory.pop()
      this.editI--
    }
    const last = this.editHistory[this.editHistory.length - 1]
    if (!last || last.key !== path) {
      if (last) {
        // åŽ»æŽ‰ä¸Šä¸€æ¬¡çš„æ–°å€¼
        this.editHistory.pop()
        this.editI--
      }
      // å­˜å…¥è¿™ä¸€æ¬¡çš„æ—§å€¼
      this.editHistory.push({
        key: path,
        value: oldVal
      })
      this.editI++
    }
    // å­˜å…¥æœ¬æ¬¡çš„æ–°å€¼
    this.editHistory.push({
      key: path,
      value: newVal
    })
    this.editI++
    // æ›´æ–°åˆ°è§†å›¾
    if (set) {
      vm.setData({
        [path]: newVal
      })
    }
  }
  /**
   * @description èŽ·å–èœå•é¡¹
   * @private
   */
  vm._getItem = function (node, up, down) {
    let items
    let i
    if (node === 'color') {
      return config.color
    }
    if (node.name === 'img') {
      items = config.img.slice(0)
      if (!vm.getSrc) {
        i = items.indexOf('换图')
        if (i !== -1) {
          items.splice(i, 1)
        }
        i = items.indexOf('超链接')
        if (i !== -1) {
          items.splice(i, 1)
        }
        i = items.indexOf('预览图')
        if (i !== -1) {
          items.splice(i, 1)
        }
      }
      i = items.indexOf('禁用预览')
      if (i !== -1 && node.attrs.ignore) {
        items[i] = '启用预览'
      }
    } else if (node.name === 'a') {
      items = config.link.slice(0)
      if (!vm.getSrc) {
        i = items.indexOf('更换链接')
        if (i !== -1) {
          items.splice(i, 1)
        }
      }
    } else if (node.name === 'video' || node.name === 'audio') {
      items = config.media.slice(0)
      i = items.indexOf('封面')
      if (!vm.getSrc && i !== -1) {
        items.splice(i, 1)
      }
      i = items.indexOf('循环')
      if (node.attrs.loop && i !== -1) {
        items[i] = '不循环'
      }
      i = items.indexOf('自动播放')
      if (node.attrs.autoplay && i !== -1) {
        items[i] = '不自动播放'
      }
    } else if (node.name === 'card') {
      items = config.card.slice(0)
    } else {
      items = config.node.slice(0)
    }
    if (!up) {
      i = items.indexOf('上移')
      if (i !== -1) {
        items.splice(i, 1)
      }
    }
    if (!down) {
      i = items.indexOf('下移')
      if (i !== -1) {
        items.splice(i, 1)
      }
    }
    return items
  }
  /**
   * @description æ˜¾ç¤º tooltip
   * @param {object} obj
   * @private
   */
  vm._tooltip = function (obj) {
    vm.setData({
      tooltip: {
        top: obj.top,
        items: obj.items
      }
    })
    vm._tooltipcb = obj.success
  }
  /**
   * @description æ˜¾ç¤ºæ»šåŠ¨æ¡
   * @param {object} obj
   * @private
   */
  vm._slider = function (obj) {
    vm.setData({
      slider: {
        min: obj.min,
        max: obj.max,
        value: obj.value,
        top: obj.top
      }
    })
    vm._slideringcb = obj.changing
    vm._slidercb = obj.change
  }
  /**
   * @description æ˜¾ç¤ºé¢œè‰²é€‰æ‹©
   * @param {object} obj
   * @private
   */
  vm._color = function (obj) {
    vm.setData({
      color: {
        items: obj.items,
        top: obj.top
      }
    })
    vm._colorcb = obj.success
  }
  /**
   * @description ç‚¹å‡»è’™ç‰ˆ
   * @private
   */
  vm._maskTap = function () {
    // éšè—æ‰€æœ‰æ‚¬æµ®çª—
    while (this._mask.length) {
      (this._mask.pop())()
    }
    const data = {}
    if (this.data.tooltip) {
      data.tooltip = null
    }
    if (this.data.slider) {
      data.slider = null
    }
    if (this.data.color) {
      data.color = null
    }
    if (this.data.tooltip || this.data.slider || this.data.color) {
      this.setData(data)
    }
  }
  /**
   * @description æ’入节点
   * @param {Object} node
   */
  function insert (node) {
    if (vm._edit) {
      vm._edit.insert(node)
    } else {
      const nodes = vm.data.nodes.slice(0)
      nodes.push(node)
      vm._editVal('nodes', vm.data.nodes, nodes, true)
    }
  }
  /**
   * @description åœ¨å…‰æ ‡å¤„插入指定 html å†…容
   * @param {String} html å†…容
   */
  vm.insertHtml = html => {
    this.inserting = true
    const arr = new Parser(vm).parse(html)
    this.inserting = undefined
    for (let i = 0; i < arr.length; i++) {
      insert(arr[i])
    }
  }
  /**
   * @description åœ¨å…‰æ ‡å¤„插入图片
   */
  vm.insertImg = function () {
    vm.getSrc && vm.getSrc('img').then(src => {
      if (typeof src === 'string') {
        src = [src]
      }
      const parser = new Parser(vm)
      for (let i = 0; i < src.length; i++) {
        insert({
          name: 'img',
          attrs: {
            src: parser.getUrl(src[i])
          }
        })
      }
    }).catch(() => { })
  }
  /**
   * @description åœ¨å…‰æ ‡å¤„插入一个链接
   */
  vm.insertLink = function () {
    vm.getSrc && vm.getSrc('link').then(url => {
      insert({
        name: 'a',
        attrs: {
          href: url
        },
        children: [{
          type: 'text',
          text: url
        }]
      })
    }).catch(() => { })
  }
  /**
   * @description åœ¨å…‰æ ‡å¤„插入一个表格
   * @param {Number} rows è¡Œæ•°
   * @param {Number} cols åˆ—æ•°
   */
  vm.insertTable = function (rows, cols) {
    const table = {
      name: 'table',
      attrs: {
        style: 'display:table;width:100%;margin:10px 0;text-align:center;border-spacing:0;border-collapse:collapse;border:1px solid gray'
      },
      children: []
    }
    for (let i = 0; i < rows; i++) {
      const tr = {
        name: 'tr',
        attrs: {},
        children: []
      }
      for (let j = 0; j < cols; j++) {
        tr.children.push({
          name: 'td',
          attrs: {
            style: 'padding:2px;border:1px solid gray'
          },
          children: [{
            type: 'text',
            text: ''
          }]
        })
      }
      table.children.push(tr)
    }
    insert(table)
  }
  /**
   * @description æ’入视频/音频
   * @param {Object} node
   */
  function insertMedia (node) {
    if (typeof node.src === 'string') {
      node.src = [node.src]
    }
    const parser = new Parser(vm)
    // æ‹¼æŽ¥ä¸»åŸŸå
    for (let i = 0; i < node.src.length; i++) {
      node.src[i] = parser.getUrl(node.src[i])
    }
    insert({
      name: 'div',
      attrs: {
        style: 'text-align:center'
      },
      children: [node]
    })
  }
  /**
   * @description åœ¨å…‰æ ‡å¤„插入一个视频
   */
  vm.insertVideo = function () {
    vm.getSrc && vm.getSrc('video').then(src => {
      insertMedia({
        name: 'video',
        attrs: {
          controls: 'T'
        },
        src
      })
    }).catch(() => { })
  }
  /**
   * @description åœ¨å…‰æ ‡å¤„插入一个音频
   */
  vm.insertAudio = function () {
    vm.getSrc && vm.getSrc('audio').then(attrs => {
      let src
      if (attrs.src) {
        src = attrs.src
        attrs.src = undefined
      } else {
        src = attrs
        attrs = {}
      }
      attrs.controls = 'T'
      insertMedia({
        name: 'audio',
        attrs,
        src
      })
    }).catch(() => { })
  }
  /**
   * @description åœ¨å…‰æ ‡å¤„插入一段文本
   */
  vm.insertText = function () {
    insert({
      name: 'p',
      attrs: {},
      children: [{
        type: 'text',
        text: ''
      }]
    })
  }
  /**
   * @description æ¸…空内容
   */
  vm.clear = function () {
    vm._maskTap()
    vm._edit = undefined
    vm.setData({
      nodes: [{
        name: 'p',
        attrs: {},
        children: [{
          type: 'text',
          text: ''
        }]
      }]
    })
  }
  /**
   * @description èŽ·å–ç¼–è¾‘åŽçš„ html
   */
  vm.getContent = function () {
    let html = '';
    // é€’归遍历获取
    (function traversal (nodes, table) {
      for (let i = 0; i < nodes.length; i++) {
        let item = nodes[i]
        if (item.type === 'text') {
          // ç¼–码实体
          html += item.text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\n/g, '<br>').replace(/\xa0/g, '&nbsp;')
        } else {
          // è¿˜åŽŸè¢«è½¬æ¢çš„ svg
          if (item.name === 'img' && (item.attrs.src || '').includes('data:image/svg+xml;utf8,')) {
            html += item.attrs.src.substr(24).replace(/%23/g, '#').replace('<svg', '<svg style="' + (item.attrs.style || '') + '"')
            continue
          } else if (item.name === 'video' || item.name === 'audio') {
            // è¿˜åŽŸ video å’Œ audio çš„ source
            if (item.src.length > 1) {
              item.children = []
              for (let j = 0; j < item.src.length; j++) {
                item.children.push({
                  name: 'source',
                  attrs: {
                    src: item.src[j]
                  }
                })
              }
            } else {
              item.attrs.src = item.src[0]
            }
          } else if (item.name === 'div' && (item.attrs.style || '').includes('overflow:auto') && (item.children[0] || {}).name === 'table') {
            // è¿˜åŽŸæ»šåŠ¨å±‚
            item = item.children[0]
          }
          // è¿˜åŽŸ table
          if (item.name === 'table') {
            table = item.attrs
            if ((item.attrs.style || '').includes('display:grid')) {
              item.attrs.style = item.attrs.style.split('display:grid')[0]
              const children = [{
                name: 'tr',
                attrs: {},
                children: []
              }]
              for (let j = 0; j < item.children.length; j++) {
                item.children[j].attrs.style = item.children[j].attrs.style.replace(/grid-[^;]+;*/g, '')
                if (item.children[j].r !== children.length) {
                  children.push({
                    name: 'tr',
                    attrs: {},
                    children: [item.children[j]]
                  })
                } else {
                  children[children.length - 1].children.push(item.children[j])
                }
              }
              item.children = children
            }
          }
          html += '<' + item.name
          for (const attr in item.attrs) {
            let val = item.attrs[attr]
            if (!val) continue
            // bool åž‹çœç•¥å€¼
            if (val === 'T' || val === true) {
              html += ' ' + attr
              continue
            } else if (item.name[0] === 't' && attr === 'style' && table) {
              // å–消为了显示 table æ·»åŠ çš„ style
              val = val.replace(/;*display:table[^;]*/, '')
              if (table.border) {
                val = val.replace(/border[^;]+;*/g, $ => $.includes('collapse') ? $ : '')
              }
              if (table.cellpadding) {
                val = val.replace(/padding[^;]+;*/g, '')
              }
              if (!val) continue
            }
            html += ' ' + attr + '="' + val.replace(/"/g, '&quot;') + '"'
          }
          html += '>'
          if (item.children) {
            traversal(item.children, table)
            html += '</' + item.name + '>'
          }
        }
      }
    })(vm.data.nodes)
    // å…¶ä»–插件处理
    for (let i = vm.plugins.length; i--;) {
      if (vm.plugins[i].onGetContent) {
        html = vm.plugins[i].onGetContent(html) || html
      }
    }
    return html
  }
}
Editable.prototype.onUpdate = function (content, config) {
  if (this.vm.properties.editable) {
    this.vm._maskTap()
    config.entities.amp = '&'
    if (!this.inserting) {
      this.vm._edit = undefined
      if (!content) {
        setTimeout(() => {
          this.vm.setData({
            nodes: [{
              name: 'p',
              attrs: {},
              children: [{
                type: 'text',
                text: ''
              }]
            }]
          })
        }, 0)
      }
    }
  }
}
Editable.prototype.onParse = function (node) {
  // ç©ºç™½å•元格可编辑
  if (this.vm.properties.editable && (node.name === 'td' || node.name === 'th') && !this.vm.getText(node.children)) {
    node.children.push({
      type: 'text',
      text: ''
    })
  }
}
module.exports = Editable
node_modules/mp-html/plugins/editable/uni-app/build.js
New file
@@ -0,0 +1,744 @@
/* global getTop */
module.exports = {
  style: `/* #ifndef H5 || MP-ALIPAY || APP-PLUS */
  ._address,
  ._article,
  ._aside,
  ._body,
  ._caption,
  ._center,
  ._cite,
  ._footer,
  ._header,
  ._html,
  ._nav,
  ._pre,
  ._section {
    display: block;
  }
  /* #endif */
  ._video {
    width: 300px;
    height: 225px;
    display: inline-block;
    background-color: black;
  }`,
  methods: {
    /**
     * @description å¼€å§‹ç¼–辑文本
     * @param {Event} e
     */
    editStart (e) {
      if (this.opts[5]) {
        const i = e.currentTarget.dataset.i
        if (!this.ctrl['e' + i] && this.opts[5] !== 'simple') {
          // æ˜¾ç¤ºè™šçº¿æ¡†
          this.$set(this.ctrl, 'e' + i, 1)
          setTimeout(() => {
            this.root._mask.push(() => this.$set(this.ctrl, 'e' + i, 0))
          }, 50)
          this.root._edit = this
          this.i = i
          this.cursor = this.childs[i].text.length
        } else {
          if (this.opts[5] === 'simple') {
            this.root._edit = this
            this.i = i
            this.cursor = this.childs[i].text.length
          }
          this.root._mask.pop()
          this.root._maskTap()
          // å°† text è½¬ä¸º textarea
          this.$set(this.ctrl, 'e' + i, 2)
          // å»¶æ—¶å¯¹ç„¦ï¼Œé¿å…é«˜åº¦é”™è¯¯
          setTimeout(() => {
            this.$set(this.ctrl, 'e' + i, 3)
          }, 50)
        }
      }
    },
    /**
     * @description è¾“入文本
     * @param {Event} e
     */
    editInput (e) {
      const i = e.target.dataset.i
      // æ›¿æ¢è¿žç»­ç©ºæ ¼
      const value = e.detail.value.replace(/ {2,}/, $ => {
        let res = '\xa0'
        for (let i = 1; i < $.length; i++) {
          res += '\xa0'
        }
        return res
      })
      this.root._editVal(`${this.opts[7]}.${i}.text`, this.childs[i].text, value) // è®°å½•编辑历史
      this.cursor = e.detail.cursor
    },
    /**
     * @description å®Œæˆç¼–辑文本
     * @param {Event} e
     */
    editEnd (e) {
      const i = e.target.dataset.i
      this.$set(this.ctrl, 'e' + i, 0)
      // æ›´æ–°åˆ°è§†å›¾
      this.root._setData(`${this.opts[7]}.${i}.text`, e.detail.value.replace(/ {2}/g, '\xa0 '))
      if (e.detail.cursor !== undefined) {
        this.cursor = e.detail.cursor
      }
    },
    /**
     * @description æ’入一个标签
     * @param {Object} node è¦æ’入的标签
     */
    insert (node) {
      setTimeout(() => {
        const childs = this.childs.slice(0)
        if (!childs[this.i]) {
          childs.push(node)
        } else if (childs[this.i].text) {
          // åœ¨æ–‡æœ¬ä¸­æ’å…¥
          const text = childs[this.i].text
          if (node.type === 'text') {
            if (this.cursor) {
              childs[this.i].text = text.substring(0, this.cursor) + node.text + text.substring(this.cursor)
            } else {
              childs[this.i].text += node.text
            }
          } else {
            const list = []
            if (this.cursor) {
              list.push({
                type: 'text',
                text: text.substring(0, this.cursor)
              })
            }
            list.push(node)
            if (this.cursor < text.length) {
              list.push({
                type: 'text',
                text: text.substring(this.cursor)
              })
            }
            childs.splice(this.i, 1, ...list)
          }
        } else {
          childs.splice(parseInt(this.i) + 1, 0, node)
        }
        this.root._editVal(this.opts[7], this.childs, childs, true)
        this.i = parseInt(this.i) + 1
      }, 200)
    },
    /**
     * @description ç§»é™¤ç¬¬ i ä¸ªæ ‡ç­¾
     * @param {Number} i
     */
    remove (i) {
      const arr = this.childs.slice(0)
      const delEle = arr.splice(i, 1)[0]
      if (delEle.name === 'img' || delEle.name === 'video' || delEle.name === 'audio') {
        let src = delEle.attrs.src
        if (delEle.src) {
          src = delEle.src.length === 1 ? delEle.src[0] : delEle.src
        }
        this.root.$emit('remove', {
          type: delEle.name,
          src
        })
      }
      this.root._edit = undefined
      this.root._maskTap()
      this.root._editVal(this.opts[7], this.childs, arr, true)
    },
    /**
     * @description æ ‡ç­¾è¢«ç‚¹å‡»
     * @param {Event} e
     */
    nodeTap (e) {
      if (this.opts[5]) {
        if (this.root._lock) return
        this.root._lock = true
        setTimeout(() => {
          this.root._lock = false
        }, 50)
        if (this.ctrl['e' + this.i] === 3) return
        this.root._maskTap()
        this.root._edit = this
        if (this.opts[5] === 'simple') return
        let start = this.opts[7].lastIndexOf('children.')
        if (start !== -1) {
          start += 9
        } else {
          start = 6
        }
        const i = parseInt(this.opts[7].substring(start, this.opts[7].lastIndexOf('.children')))
        let parent = this.$parent
        while (parent && parent.$options.name !== 'node') {
          parent = parent.$parent
        }
        let remove = () => {
          parent.remove(i)
        }
        if (this.opts[7].length - parent.opts[7].length > 15) {
          const parts = this.opts[7].split('.')
          let childs = parent.childs
          const i = parseInt(parts[parent.opts[7].split('.').length])
          const oldParent = parent
          // åˆ é™¤æ•´ä¸ªè¡¨æ ¼
          remove = () => {
            oldParent.remove(i)
          }
          for (let i = parent.opts[7].split('.').length; i < parts.length - 2; i++) {
            childs = childs[parts[i]]
          }
          const that = this
          parent = {
            childs,
            opts: [undefined, undefined, undefined, undefined, undefined, undefined, undefined, parts.slice(0, parts.length - 2).join('.')],
            changeStyle (name, i, value, oldVal) {
              let style = this.childs[i].attrs.style || ''
              if (style.includes(';' + name + ':' + oldVal)) {
                style = style.replace(';' + name + ':' + oldVal, ';' + name + ':' + value)
              } else {
                style += ';' + name + ':' + value
              }
              that.root._setData(`${this.opts[7]}.${i}.attrs.style`, style)
            }
          }
        }
        if (!parent) return
        // æ˜¾ç¤ºå®žçº¿æ¡†
        this.$set(this.ctrl, 'root', 1)
        this.root._mask.push(() => this.$set(this.ctrl, 'root', 0))
        if (this.childs.length === 1 && this.childs[0].type === 'text' && !this.ctrl.e0) {
          this.$set(this.ctrl, 'e0', 1)
          this.root._mask.push(() => this.$set(this.ctrl, 'e0', 0))
          this.i = 0
          this.cursor = this.childs[0].text.length
        }
        const items = this.root._getItem(parent.childs[i], i !== 0, i !== parent.childs.length - 1)
        this.root._tooltip({
          top: getTop(e),
          items,
          success: tapIndex => {
            if (items[tapIndex] === '大小') {
              // æ”¹å˜å­—体大小
              const style = parent.childs[i].attrs.style || ''
              let value = style.match(/;font-size:([0-9]+)px/)
              if (value) {
                value = parseInt(value[1])
              } else {
                value = 16
              }
              this.root._slider({
                min: 10,
                max: 30,
                value,
                top: getTop(e),
                changing: val => {
                  if (Math.abs(val - value) > 2) {
                    // å­—号变换超过 2 æ—¶æ›´æ–°åˆ°è§†å›¾
                    parent.changeStyle('font-size', i, val + 'px', value + 'px')
                    value = e.detail.value
                  }
                },
                change: val => {
                  if (val !== value) {
                    parent.changeStyle('font-size', i, val + 'px', value + 'px')
                  }
                  this.root._editVal(`${parent.opts[7]}.${i}.attrs.style`, style, parent.childs[i].attrs.style)
                }
              })
            } else if (items[tapIndex] === '颜色') {
              // æ”¹å˜æ–‡å­—颜色
              const items = this.root._getItem('color')
              this.root._color({
                top: getTop(e),
                items,
                success: tapIndex => {
                  const style = parent.childs[i].attrs.style || ''
                  const value = style.match(/;color:([^;]+)/)
                  parent.changeStyle('color', i, items[tapIndex], value ? value[1] : undefined)
                  this.root._editVal(`${parent.opts[7]}.${i}.attrs.style`, style, parent.childs[i].attrs.style)
                }
              })
            } else if (items[tapIndex] === '上移' || items[tapIndex] === '下移') {
              const arr = parent.childs.slice(0)
              const item = arr[i]
              if (items[tapIndex] === '上移') {
                arr[i] = arr[i - 1]
                arr[i - 1] = item
              } else {
                arr[i] = arr[i + 1]
                arr[i + 1] = item
              }
              this.root._editVal(parent.opts[7], parent.childs, arr, true)
            } else if (items[tapIndex] === '删除') {
              remove()
            } else {
              const style = parent.childs[i].attrs.style || ''
              let newStyle = ''
              const item = items[tapIndex]
              let name
              let value
              if (item === '斜体') {
                name = 'font-style'
                value = 'italic'
              } else if (item === '粗体') {
                name = 'font-weight'
                value = 'bold'
              } else if (item === '下划线') {
                name = 'text-decoration'
                value = 'underline'
              } else if (item === '居中') {
                name = 'text-align'
                value = 'center'
              } else if (item === '缩进') {
                name = 'text-indent'
                value = '2em'
              }
              if (style.includes(name + ':')) {
                // å·²æœ‰åˆ™å–消
                newStyle = style.replace(new RegExp(name + ':[^;]+'), '')
              } else {
                // æ²¡æœ‰åˆ™æ·»åŠ 
                newStyle = style + ';' + name + ':' + value
              }
              this.root._editVal(`${parent.opts[7]}.${i}.attrs.style`, style, newStyle, true)
            }
          }
        })
      }
    },
    /**
     * @description éŸ³è§†é¢‘被点击
     * @param {Event} e
     */
    mediaTap (e, index) {
      if (this.opts[5]) {
        const i = e.target.dataset.i || index
        const node = this.childs[i]
        const items = this.root._getItem(node)
        this.root._maskTap()
        this.root._edit = this
        this.i = i
        this.root._tooltip({
          top: e.currentTarget.offsetTop - 30,
          items,
          success: tapIndex => {
            switch (items[tapIndex]) {
              case '封面':
                // è®¾ç½®å°é¢
                this.root.getSrc('img', node.attrs.poster || '').then(url => {
                  this.root._editVal(`${this.opts[7]}.${i}.attrs.poster`, node.attrs.poster, url instanceof Array ? url[0] : url, true)
                }).catch(() => { })
                break
              case '删除':
                this.remove(i)
                break
              case '循环':
              case '不循环':
                // åˆ‡æ¢å¾ªçŽ¯æ’­æ”¾
                this.root._setData(`${this.opts[7]}.${i}.attrs.loop`, !node.attrs.loop)
                uni.showToast({
                  title: '成功'
                })
                break
              case '自动播放':
              case '不自动播放':
                // åˆ‡æ¢è‡ªåŠ¨æ’­æ”¾æ’­æ”¾
                this.root._setData(`${this.opts[7]}.${i}.attrs.autoplay`, !node.attrs.autoplay)
                uni.showToast({
                  title: '成功'
                })
                break
            }
          }
        })
        // é¿å…ä¸Šå±‚出现点击态
        this.root._lock = true
        setTimeout(() => {
          this.root._lock = false
        }, 50)
      }
    },
    /**
     * æ”¹å˜æ ·å¼
     * @param {String} name å±žæ€§å
     * @param {Number} i ç¬¬å‡ ä¸ªæ ‡ç­¾
     * @param {String} value æ–°å€¼
     * @param {String} oldVal æ—§å€¼
     */
    changeStyle (name, i, value, oldVal) {
      let style = this.childs[i].attrs.style || ''
      if (style.includes(';' + name + ':' + oldVal)) {
        // style ä¸­å·²ç»æœ‰
        style = style.replace(';' + name + ':' + oldVal, ';' + name + ':' + value)
      } else {
        // æ²¡æœ‰åˆ™æ–°å¢ž
        style += ';' + name + ':' + value
      }
      this.root._setData(`${this.opts[7]}.${i}.attrs.style`, style)
    }
  },
  handler (file) {
    if (file.isBuffer()) {
      let content = file.contents.toString()
      if (file.path.includes('mp-html.vue')) {
        // ä¼ é€’ editable å±žæ€§å’Œè·¯å¾„
        content = content.replace(/opts\s*=\s*"\[([^\]]+)\]"/, 'opts="[$1,editable,placeholder,\'nodes\']"')
          .replace(/<view(.*?):style\s*=\s*"containerStyle"/, '<view$1:style="(editable?\'min-height:200px;\':\'\')+containerStyle" @tap="_containTap"')
          // å·¥å…·å¼¹çª—
          .replace(/<\/view>\s*<\/template>/, `  <view v-if="tooltip" class="_tooltip_contain" :style="'top:'+tooltip.top+'px'">
      <view class="_tooltip">
        <view v-for="(item, index) in tooltip.items" v-bind:key="index" class="_tooltip_item" :data-i="index" @tap="_tooltipTap">{{item}}</view>
      </view>
    </view>
    <view v-if="slider" class="_slider" :style="'top:'+slider.top+'px'">
      <slider :value="slider.value" :min="slider.min" :max="slider.max" handle-size="14" block-size="14" show-value activeColor="white" style="padding:3px" @changing="_sliderChanging" @change="_sliderChange" />
    </view>
    <view v-if="color" class="_tooltip_contain" :style="'top:'+color.top+'px'">
      <view class="_tooltip" style="overflow-y: hidden;">
        <view v-for="(item, index) in color.items" v-bind:key="index" class="_color_item" :style="'background-color:'+item" :data-i="index" @tap="_colorTap"></view>
      </view>
    </view>
  </view>
</template>`)
          // æ·»åŠ  data
          .replace(/data\s*\(\)\s*{\s*return\s*{/, `data() {
    return {
      tooltip: null,
      slider: null,
      color: null,`)
          // æ·»åŠ  editable å±žæ€§
          .replace(/props\s*:\s*{/, `props: {
    editable: [Boolean, String],
    placeholder: String,`)
          // æ·»åŠ  watch
          .replace(/watch\s*:\s*{/, `watch: {
    editable(val) {
      this.setContent(val ? this.content : this.getContent())
      if (!val)
        this._maskTap()
    },`)
          .replace(/if\s*\(this.content/, 'if ((this.content || this.editable)')
          // å¤„理各类弹窗的事件
          .replace(/methods\s*:\s*{/, `methods: {
    _containTap() {
      if (!this._lock && !this.slider && !this.color) {
        this._edit = undefined
        this._maskTap()
      }
    },
    _tooltipTap(e) {
      this._tooltipcb(e.currentTarget.dataset.i)
      this.$set(this, 'tooltip', null)
    },
    _sliderChanging(e) {
      this._slideringcb(e.detail.value)
    },
    _sliderChange(e) {
      this._slidercb(e.detail.value)
    },
    _colorTap(e) {
      this._colorcb(e.currentTarget.dataset.i)
      this.$set(this, 'color', null)
    },`)
          // å·¥å…·å¼¹çª—的样式
          .replace('</style>', `
/* æç¤ºæ¡ */
._tooltip_contain {
  position: absolute;
  right: 20px;
  left: 20px;
  text-align: center;
}
._tooltip {
  box-sizing: border-box;
  display: inline-block;
  width: auto;
  max-width: 100%;
  height: 30px;
  padding: 0 3px;
  overflow: scroll;
  font-size: 14px;
  line-height: 30px;
  white-space: nowrap;
}
._tooltip_item {
  display: inline-block;
  width: auto;
  padding: 0 2vw;
  line-height: 30px;
  background-color: black;
  color: white;
}
._color_item {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin: 5px 2vw;
  border:1px solid #dfe2e5;
  border-radius: 50%;
}
/* å›¾ç‰‡å®½åº¦æ»šåŠ¨æ¡ */
._slider {
  position: absolute;
  left: 20px;
  width: 220px;
}
._tooltip,
._slider {
  background-color: black;
  border-radius: 3px;
  opacity: 0.75;
}
</style>`)
      } else if (file.path.includes('parser.js')) {
        // ä¸åš expose å¤„理
        content = content.replace(/parser.prototype.expose\s*=\s*function\s*\(\)\s*{/, `parser.prototype.expose = function () {
  if (this.options.editable) return`)
          .replace(/popNode\s*=\s*function\s*\(\)\s*{/, 'popNode = function () {\n  const editable = this.options.editable')
          // ä¸è½¬æ¢æ ‡ç­¾å
          .replace(/if\s*\(config.blockTags\[node.name\]\)\s*{[\s\S]+?}/, `if (config.blockTags[node.name]) {
    if (!editable) {
      node.name = 'div'
    }
  }`)
          // è½¬æ¢è¡¨æ ¼å’Œåˆ—表
          .replace(/else\s*if\s*\(node.c\)/, 'else if (!editable && node.c )')
          .replace(/node.c(\)|\s*&&|\s*\n)/g, '(node.c || editable)$1')
          .replace(/while\s*\(map\[row\s*\+\s*'.'\s*\+\s*col\]\)\s*{[\s\S]+?}/, `while (map[row + '.' + col]) {
            col++
          }
          if (editable) {
            td.r = row
          }`)
          .replace(/let\s+str\s*=\s*'<video style="width:100%;height:100%"'/, `let str = '<video style="width:100%;height:100%"'
    if (editable) {
      attrs.controls = ''
    }`)
      } else if (file.path.includes('node.vue')) {
        content =
          // ä¼ é€’ opts
          content.replace(/:childs\s*=\s*"tbody.children"\s*:opts="opts"/, ':childs="tbody.children" :opts="[opts[0],opts[1],opts[2],opts[3],opts[4],opts[5],opts[6],opts[7]+\'.\'+i+\'.children.\'+x+\'.children\']"')
            .replace(/:childs\s*=\s*"n2.children"\s*:opts="opts"/, ':childs="n2.children" :opts="[opts[0],opts[1],opts[2],opts[3],opts[4],opts[5],opts[6],opts[7]+\'.\'+i+\'.children.\'+j+\'.children\']"')
            .replace(/:childs\s*=\s*"tr.children"\s*:opts="opts"/, ':childs="tr.children" :opts="[opts[0],opts[1],opts[2],opts[3],opts[4],opts[5],opts[6],opts[7]+\'.\'+i+\'.children.\'+x+\'.children.\'+y+\'.children\']"')
            .replace(/:childs\s*=\s*"td.children"\s*:opts="opts"/, ':childs="td.children" :opts="[opts[0],opts[1],opts[2],opts[3],opts[4],opts[5],opts[6],opts[7]+\'.\'+i+\'.children.\'+x+\'.children.\'+y+\'.children.\'+z+\'.children\']"')
            .replace(/opts\s*=\s*"opts"/g, 'opts="[opts[0],opts[1],opts[2],opts[3],opts[4],opts[5],opts[6],opts[7]+\'.\'+i+\'.children\']"')
            // ä¸ä½¿ç”¨ rich-text
            .replace(/!n.c/g, '!opts[5]&&!n.c').replace('&&n.c', '&&(n.c||opts[5])')
            // ä¿®æ”¹æ™®é€šæ ‡ç­¾
            .replace(/<view\s+:id(.+?)style="/, '<view @tap="nodeTap" :id$1style="(ctrl.root&&opts[5]!==\'simple\'?\'border:1px solid black;padding:5px;display:block;\':\'\')+')
            // ä¿®æ”¹æ–‡æœ¬å—
            .replace(/<!--\s*文本\s*-->[\s\S]+?<!--\s*链接\s*-->/,
              `<!-- æ–‡æœ¬ -->
      <text v-else-if="n.type==='text'&&!ctrl['e'+i]" :data-i="i" :user-select="opts[4]" :decode="!opts[5]" @tap="editStart">{{n.text}}
        <text v-if="!n.text" style="color:gray">{{opts[6]||'请输入'}}</text>
      </text>
      <text v-else-if="n.type==='text'&&ctrl['e'+i]===1" :data-i="i" style="border:1px dashed black;min-width:50px;width:auto;padding:5px;display:block" @tap.stop="editStart">{{n.text}}
        <text v-if="!n.text" style="color:gray">{{opts[6]||'请输入'}}</text>
      </text>
      <textarea v-else-if="n.type==='text'" :style="opts[5]==='simple'?'':'border:1px dashed black;'+'min-width:50px;width:auto;padding:5px'" auto-height maxlength="-1" :focus="ctrl['e'+i]===3" :value="n.text" :data-i="i" @input="editInput" @blur="editEnd" />
      <text v-else-if="n.name==='br'">\\n</text>
      <!-- é“¾æŽ¥ -->`)
            // ä¿®æ”¹å›¾ç‰‡
            .replace(/<image(.+?)id="n.attrs.id/, '<image$1id="n.attrs.id||(\'n\'+i)')
            .replace('height:1px', "height:'+(ctrl['h'+i]||1)+'px")
            .replace(/:style\s*=\s*"\(ctrl\[i\]/g, ':style="(ctrl[\'e\'+i]&&opts[5]!==\'simple\'?\'border:1px dashed black;padding:3px;\':\'\')+(ctrl[i]')
            .replace(/show-menu-by-longpress\s*=\s*"(\S+?)"\s*:image-menu-prevent\s*=\s*"(\S+?)"/, 'show-menu-by-longpress="!opts[5]&&$1" :image-menu-prevent="opts[5]||$2"')
            // ä¿®æ”¹éŸ³è§†é¢‘
            .replace('v-else-if="n.html"', 'v-else-if="n.html" :data-i="i" @tap="mediaTap"')
            .replace('<video', '<video :show-center-play-btn="!opts[5]" @tap="mediaTap"')
            .replace('<audio ', '<audio @tap="mediaTap" ')
            .replace('<my-audio ', '<my-audio @onClick="mediaTap($event, i)" ')
            .replace('card ', 'card @click="mediaTap($event, i)" ')
            .replace('<script>',
              `<script>
import Parser from '../parser'
function getTop(e) {
  let top
  // #ifdef H5 && VUE3
  top = e.pageY
  // #endif
  // #ifdef (H5 && VUE2) || APP-PLUS
  top = e.touches[0].pageY
  // #endif
  // #ifdef MP-ALIPAY
  top = e.detail.pageY
  // #endif
  // #ifndef H5 || MP-ALIPAY || APP-PLUS
  top = e.detail.y
  // #endif
  if (top - e.currentTarget.offsetTop < 150 || top < 600) {
    top = e.currentTarget.offsetTop
  }
  if (top < 30) {
    top += 70
  }
  return top - 30
}`)
            // å‘¨æœŸå¤„理
            .replace(/beforeDestroy\s*\(\)\s*{/, `beforeDestroy () {
  if (this.root && this.root._edit === this) {
    this.root._edit = undefined
  }`)
            // è®°å½•图片宽度
            .replace(/imgLoad\s*\(e\)\s*{/, `imgLoad(e) {
      // #ifdef MP-WEIXIN || MP-QQ
      if (this.opts[5])
        this.$nextTick(() => {
          const id = this.childs[i].attrs.id || ('n' + i)
          uni.createSelectorQuery().in(this).select('#' + id).boundingClientRect().exec(res => {
            this.$set(this.ctrl, 'h'+i, res[0].height)
          })
        })
      // #endif`)
            .replace(/if\s*\(!this.childs\[i\].w\)\s*{[\s\S]+?}/,
              `if (!this.childs[i].w) {
        this.$set(this.ctrl, i, e.detail.width)
        if (this.opts[5]) {
          const path = this.opts[7] + '.' + i + '.attrs.'
          if (e.detail.width < 150)
            this.root._setData(path + 'ignore', 'T')
          this.root._setData(path + 'width', e.detail.width.toString())
        }
      }`)
            // å¤„理图片长按
            .replace(/imgLongTap\s*\(\)\s*{/, `imgLongTap() {
      if (this.opts[5]) return`)
            // å¤„理图片点击
            .replace(/imgTap\s*\(e\)\s*{([\s\S]+?)},\s*\/\*/,
              `imgTap (e) {
      if (!this.opts[5]) {$1} else {
        const i = e.currentTarget.dataset.i
        const node = this.childs[i]
        const items = this.root._getItem(node)
        const parser = new Parser(this.root)
        this.root._edit = this
        this.i = i
        this.root._maskTap()
        this.$set(this.ctrl, 'e' + i, 1)
        this.root._mask.push(() => this.$set(this.ctrl, 'e' + i, 0))
        this.root._tooltip({
          top: getTop(e),
          items,
          success: tapIndex => {
            if (items[tapIndex] === '换图') {
              // æ¢å›¾
              this.root.getSrc('img', node.attrs.src || '').then(url => {
                this.root._editVal(this.opts[7] + '.' + i + '.attrs.src', node.attrs.src, parser.getUrl(url instanceof Array ? url[0] : url), true)
              }).catch(() => { })
            } else if (items[tapIndex] === '宽度') {
              // æ›´æ”¹å®½åº¦
              const style = node.attrs.style || ''
              let value = style.match(/max-width:([0-9]+)%/)
              if (value) {
                value = parseInt(value[1])
              } else {
                value = 100
              }
              this.root._slider({
                min: 0,
                max: 100,
                value,
                top: getTop(e),
                changing: val => {
                  // å˜åŒ–超过 5% æ›´æ–°æ—¶è§†å›¾
                  if (Math.abs(val - value) > 5) {
                    this.changeStyle('max-width', i, val + '%', value + '%')
                    value = val
                  }
                },
                change: val => {
                  if (val !== value) {
                    this.changeStyle('max-width', i, val + '%', value + '%')
                    value = val
                  }
                  this.root._editVal(this.opts[7] + '.' + i + '.attrs.style', style, this.childs[i].attrs.style)
                }
              })
            } else if (items[tapIndex] === '超链接') {
              // å°†å›¾ç‰‡è®¾ç½®ä¸ºé“¾æŽ¥
              this.root.getSrc('link', node.a ? node.a.href : '').then(url => {
                // å¦‚果有 a æ ‡ç­¾åˆ™æ›¿æ¢ href
                if (node.a) {
                  this.root._editVal(this.opts[7] + '.' + i + '.a.href', node.a.href, parser.getUrl(url), true)
                } else {
                  const link = {
                    name: 'a',
                    attrs: {
                      href: parser.getUrl(url)
                    },
                    children: [node]
                  }
                  node.a = link.attrs
                  this.root._editVal(this.opts[7] + '.' + i, node, link, true)
                }
                wx.showToast({
                  title: '成功'
                })
              }).catch(() => { })
            } else if (items[tapIndex] === '预览图') {
              // è®¾ç½®é¢„览图链接
              this.root.getSrc('img', node.attrs['original-src'] || '').then(url => {
                this.root._editVal(this.opts[7] + '.' + i + '.attrs.original-src', node.attrs['original-src'], parser.getUrl(url instanceof Array ? url[0] : url), true)
                uni.showToast({
                  title: '成功'
                })
              }).catch(() => { })
            } else if (items[tapIndex] === '删除') {
              this.remove(i)
            } else {
              // ç¦ç”¨ / å¯ç”¨é¢„览
              this.root._setData(this.opts[7] + '.' + i + '.attrs.ignore', !node.attrs.ignore)
              uni.showToast({
                title: '成功'
              })
            }
          }
        })
        this.root._lock = true
        setTimeout(() => {
          this.root._lock = false
        }, 50)
      }
    },
    /*`)
            // å¤„理链接点击
            .replace(/linkTap\s*\(e\)\s*{([\s\S]+?)},\s*\/\*/,
              `linkTap (e) {
      if (!this.opts[5]) {$1} else {
        const i = e.currentTarget.dataset.i
        const node = this.childs[i]
        const items = this.root._getItem(node)
        this.root._tooltip({
          top: getTop(e),
          items,
          success: tapIndex => {
            if (items[tapIndex] === '更换链接') {
              this.root.getSrc('link', node.attrs.href).then(url => {
                this.root._editVal(this.opts[7] + '.' + i + '.attrs.href', node.attrs.href, url, true)
                uni.showToast({
                  title: '成功'
                })
              }).catch(() => { })
            } else {
              this.remove(i)
            }
          }
        })
      }
    },
    /*`)
      }
      file.contents = Buffer.from(content)
    }
  }
}
node_modules/mp-html/plugins/editable/uni-app/index.js
New file
@@ -0,0 +1,553 @@
/**
 * @fileoverview editable æ’ä»¶
 */
const config = require('./config')
const Parser = require('../parser')
function Editable (vm) {
  this.vm = vm
  this.editHistory = [] // åŽ†å²è®°å½•
  this.editI = -1 // åŽ†å²è®°å½•æŒ‡é’ˆ
  vm._mask = [] // è’™ç‰ˆè¢«ç‚¹å‡»æ—¶è¿›è¡Œçš„æ“ä½œ
  vm._setData = function (path, val) {
    const paths = path.split('.')
    let target = vm
    for (let i = 0; i < paths.length - 1; i++) {
      target = target[paths[i]]
    }
    vm.$set(target, paths.pop(), val)
  }
  /**
   * @description ç§»åŠ¨åŽ†å²è®°å½•æŒ‡é’ˆ
   * @param {Number} num ç§»åŠ¨è·ç¦»
   */
  const move = num => {
    setTimeout(() => {
      const item = this.editHistory[this.editI + num]
      if (item) {
        this.editI += num
        vm._setData(item.key, item.value)
      }
    }, 200)
  }
  vm.undo = () => move(-1) // æ’¤é”€
  vm.redo = () => move(1) // é‡åš
  /**
   * @description æ›´æ–°è®°å½•
   * @param {String} path æ›´æ–°å†…容路径
   * @param {*} oldVal æ—§å€¼
   * @param {*} newVal æ–°å€¼
   * @param {Boolean} set æ˜¯å¦æ›´æ–°åˆ°è§†å›¾
   * @private
   */
  vm._editVal = (path, oldVal, newVal, set) => {
    // å½“前指针后的内容去除
    while (this.editI < this.editHistory.length - 1) {
      this.editHistory.pop()
    }
    // æœ€å¤šå­˜å‚¨ 30 æ¡æ“ä½œè®°å½•
    while (this.editHistory.length > 30) {
      this.editHistory.pop()
      this.editI--
    }
    const last = this.editHistory[this.editHistory.length - 1]
    if (!last || last.key !== path) {
      if (last) {
        // åŽ»æŽ‰ä¸Šä¸€æ¬¡çš„æ–°å€¼
        this.editHistory.pop()
        this.editI--
      }
      // å­˜å…¥è¿™ä¸€æ¬¡çš„æ—§å€¼
      this.editHistory.push({
        key: path,
        value: oldVal
      })
      this.editI++
    }
    // å­˜å…¥æœ¬æ¬¡çš„æ–°å€¼
    this.editHistory.push({
      key: path,
      value: newVal
    })
    this.editI++
    // æ›´æ–°åˆ°è§†å›¾
    if (set) {
      vm._setData(path, newVal)
    }
  }
  /**
   * @description èŽ·å–èœå•é¡¹
   * @private
   */
  vm._getItem = function (node, up, down) {
    let items
    let i
    if (node === 'color') {
      return config.color
    }
    if (node.name === 'img') {
      items = config.img.slice(0)
      if (!vm.getSrc) {
        i = items.indexOf('换图')
        if (i !== -1) {
          items.splice(i, 1)
        }
        i = items.indexOf('超链接')
        if (i !== -1) {
          items.splice(i, 1)
        }
        i = items.indexOf('预览图')
        if (i !== -1) {
          items.splice(i, 1)
        }
      }
      i = items.indexOf('禁用预览')
      if (i !== -1 && node.attrs.ignore) {
        items[i] = '启用预览'
      }
    } else if (node.name === 'a') {
      items = config.link.slice(0)
      if (!vm.getSrc) {
        i = items.indexOf('更换链接')
        if (i !== -1) {
          items.splice(i, 1)
        }
      }
    } else if (node.name === 'video' || node.name === 'audio') {
      items = config.media.slice(0)
      i = items.indexOf('封面')
      if (!vm.getSrc && i !== -1) {
        items.splice(i, 1)
      }
      i = items.indexOf('循环')
      if (node.attrs.loop && i !== -1) {
        items[i] = '不循环'
      }
      i = items.indexOf('自动播放')
      if (node.attrs.autoplay && i !== -1) {
        items[i] = '不自动播放'
      }
    } else if (node.name === 'card') {
      items = config.card.slice(0)
    } else {
      items = config.node.slice(0)
    }
    if (!up) {
      i = items.indexOf('上移')
      if (i !== -1) {
        items.splice(i, 1)
      }
    }
    if (!down) {
      i = items.indexOf('下移')
      if (i !== -1) {
        items.splice(i, 1)
      }
    }
    return items
  }
  /**
   * @description æ˜¾ç¤º tooltip
   * @param {object} obj
   * @private
   */
  vm._tooltip = function (obj) {
    vm.$set(vm, 'tooltip', {
      top: obj.top,
      items: obj.items
    })
    vm._tooltipcb = obj.success
  }
  /**
   * @description æ˜¾ç¤ºæ»šåŠ¨æ¡
   * @param {object} obj
   * @private
   */
  vm._slider = function (obj) {
    vm.$set(vm, 'slider', {
      min: obj.min,
      max: obj.max,
      value: obj.value,
      top: obj.top
    })
    vm._slideringcb = obj.changing
    vm._slidercb = obj.change
  }
  /**
   * @description æ˜¾ç¤ºé¢œè‰²é€‰æ‹©
   * @param {object} obj
   * @private
   */
  vm._color = function (obj) {
    vm.$set(vm, 'color', {
      items: obj.items,
      top: obj.top
    })
    vm._colorcb = obj.success
  }
  /**
   * @description ç‚¹å‡»è’™ç‰ˆ
   * @private
   */
  vm._maskTap = function () {
    // éšè—æ‰€æœ‰æ‚¬æµ®çª—
    while (vm._mask.length) {
      (vm._mask.pop())()
    }
    if (vm.tooltip) {
      vm.$set(vm, 'tooltip', null)
    }
    if (vm.slider) {
      vm.$set(vm, 'slider', null)
    }
    if (vm.color) {
      vm.$set(vm, 'color', null)
    }
  }
  /**
   * @description æ’入节点
   * @param {Object} node
   */
  function insert (node) {
    if (vm._edit) {
      vm._edit.insert(node)
    } else {
      const nodes = vm.nodes.slice(0)
      nodes.push(node)
      vm._editVal('nodes', vm.nodes, nodes, true)
    }
  }
  /**
   * @description åœ¨å…‰æ ‡å¤„插入指定 html å†…容
   * @param {String} html å†…容
   */
  vm.insertHtml = html => {
    this.inserting = true
    const arr = new Parser(vm).parse(html)
    this.inserting = undefined
    for (let i = 0; i < arr.length; i++) {
      insert(arr[i])
    }
  }
  /**
   * @description åœ¨å…‰æ ‡å¤„插入图片
   */
  vm.insertImg = function () {
    vm.getSrc && vm.getSrc('img').then(src => {
      if (typeof src === 'string') {
        src = [src]
      }
      const parser = new Parser(vm)
      for (let i = 0; i < src.length; i++) {
        insert({
          name: 'img',
          attrs: {
            src: parser.getUrl(src[i])
          }
        })
      }
    }).catch(() => { })
  }
  /**
   * @description åœ¨å…‰æ ‡å¤„插入一个链接
   */
  vm.insertLink = function () {
    vm.getSrc && vm.getSrc('link').then(url => {
      insert({
        name: 'a',
        attrs: {
          href: url
        },
        children: [{
          type: 'text',
          text: url
        }]
      })
    }).catch(() => { })
  }
  /**
   * @description åœ¨å…‰æ ‡å¤„插入一个表格
   * @param {Number} rows è¡Œæ•°
   * @param {Number} cols åˆ—æ•°
   */
  vm.insertTable = function (rows, cols) {
    const table = {
      name: 'table',
      attrs: {
        style: 'display:table;width:100%;margin:10px 0;text-align:center;border-spacing:0;border-collapse:collapse;border:1px solid gray'
      },
      children: []
    }
    for (let i = 0; i < rows; i++) {
      const tr = {
        name: 'tr',
        attrs: {},
        children: []
      }
      for (let j = 0; j < cols; j++) {
        tr.children.push({
          name: 'td',
          attrs: {
            style: 'padding:2px;border:1px solid gray'
          },
          children: [{
            type: 'text',
            text: ''
          }]
        })
      }
      table.children.push(tr)
    }
    insert(table)
  }
  /**
   * @description æ’入视频/音频
   * @param {Object} node
   */
  function insertMedia (node) {
    if (typeof node.src === 'string') {
      node.src = [node.src]
    }
    const parser = new Parser(vm)
    // æ‹¼æŽ¥ä¸»åŸŸå
    for (let i = 0; i < node.src.length; i++) {
      node.src[i] = parser.getUrl(node.src[i])
    }
    insert({
      name: 'div',
      attrs: {
        style: 'text-align:center'
      },
      children: [node]
    })
  }
  /**
   * @description åœ¨å…‰æ ‡å¤„插入一个视频
   */
  vm.insertVideo = function () {
    vm.getSrc && vm.getSrc('video').then(src => {
      insertMedia({
        name: 'video',
        attrs: {
          controls: 'T'
        },
        children: [],
        src,
        // #ifdef APP-PLUS
        html: `<video src="${src}" style="width:100%;height:100%"></video>`
        // #endif
      })
    }).catch(() => { })
  }
  /**
   * @description åœ¨å…‰æ ‡å¤„插入一个音频
   */
  vm.insertAudio = function () {
    vm.getSrc && vm.getSrc('audio').then(attrs => {
      let src
      if (attrs.src) {
        src = attrs.src
        attrs.src = undefined
      } else {
        src = attrs
        attrs = {}
      }
      attrs.controls = 'T'
      insertMedia({
        name: 'audio',
        attrs,
        children: [],
        src
      })
    }).catch(() => { })
  }
  /**
   * @description åœ¨å…‰æ ‡å¤„插入一段文本
   */
  vm.insertText = function () {
    insert({
      name: 'p',
      attrs: {},
      children: [{
        type: 'text',
        text: ''
      }]
    })
  }
  /**
   * @description æ¸…空内容
   */
  vm.clear = function () {
    vm._maskTap()
    vm._edit = undefined
    vm.$set(vm, 'nodes', [{
      name: 'p',
      attrs: {},
      children: [{
        type: 'text',
        text: ''
      }]
    }])
  }
  /**
   * @description èŽ·å–ç¼–è¾‘åŽçš„ html
   */
  vm.getContent = function () {
    let html = '';
    // é€’归遍历获取
    (function traversal (nodes, table) {
      for (let i = 0; i < nodes.length; i++) {
        let item = nodes[i]
        if (item.type === 'text') {
          html += item.text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\n/g, '<br>').replace(/\xa0/g, '&nbsp;') // ç¼–码实体
        } else {
          if (item.name === 'img') {
            item.attrs.i = ''
            // è¿˜åŽŸè¢«è½¬æ¢çš„ svg
            if ((item.attrs.src || '').includes('data:image/svg+xml;utf8,')) {
              html += item.attrs.src.substr(24).replace(/%23/g, '#').replace('<svg', '<svg style="' + (item.attrs.style || '') + '"')
              continue
            }
          } else if (item.name === 'video' || item.name === 'audio') {
            // è¿˜åŽŸ video å’Œ audio çš„ source
            item = JSON.parse(JSON.stringify(item))
            if (item.src.length > 1) {
              item.children = []
              for (let j = 0; j < item.src.length; j++) {
                item.children.push({
                  name: 'source',
                  attrs: {
                    src: item.src[j]
                  }
                })
              }
            } else {
              item.attrs.src = item.src[0]
            }
          } else if (item.name === 'div' && (item.attrs.style || '').includes('overflow:auto') && (item.children[0] || {}).name === 'table') {
            // è¿˜åŽŸæ»šåŠ¨å±‚
            item = item.children[0]
          }
          // è¿˜åŽŸ table
          if (item.name === 'table') {
            item = JSON.parse(JSON.stringify(item))
            table = item.attrs
            if ((item.attrs.style || '').includes('display:grid')) {
              item.attrs.style = item.attrs.style.split('display:grid')[0]
              const children = [{
                name: 'tr',
                attrs: {},
                children: []
              }]
              for (let j = 0; j < item.children.length; j++) {
                item.children[j].attrs.style = item.children[j].attrs.style.replace(/grid-[^;]+;*/g, '')
                if (item.children[j].r !== children.length) {
                  children.push({
                    name: 'tr',
                    attrs: {},
                    children: [item.children[j]]
                  })
                } else {
                  children[children.length - 1].children.push(item.children[j])
                }
              }
              item.children = children
            }
          }
          html += '<' + item.name
          for (const attr in item.attrs) {
            let val = item.attrs[attr]
            if (!val) continue
            if (val === 'T' || val === true) {
              // bool åž‹çœç•¥å€¼
              html += ' ' + attr
              continue
            } else if (item.name[0] === 't' && attr === 'style' && table) {
              // å–消为了显示 table æ·»åŠ çš„ style
              val = val.replace(/;*display:table[^;]*/, '')
              if (table.border) {
                val = val.replace(/border[^;]+;*/g, $ => $.includes('collapse') ? $ : '')
              }
              if (table.cellpadding) {
                val = val.replace(/padding[^;]+;*/g, '')
              }
              if (!val) continue
            }
            html += ' ' + attr + '="' + val.replace(/"/g, '&quot;') + '"'
          }
          html += '>'
          if (item.children) {
            traversal(item.children, table)
            html += '</' + item.name + '>'
          }
        }
      }
    })(vm.nodes)
    // å…¶ä»–插件处理
    for (let i = vm.plugins.length; i--;) {
      if (vm.plugins[i].onGetContent) {
        html = vm.plugins[i].onGetContent(html) || html
      }
    }
    return html
  }
}
Editable.prototype.onUpdate = function (content, config) {
  if (this.vm.editable) {
    this.vm._maskTap()
    config.entities.amp = '&'
    if (!this.inserting) {
      this.vm._edit = undefined
      if (!content) {
        setTimeout(() => {
          this.vm.$set(this.vm, 'nodes', [{
            name: 'p',
            attrs: {},
            children: [{
              type: 'text',
              text: ''
            }]
          }])
        }, 0)
      }
    }
  }
}
Editable.prototype.onParse = function (node) {
  // ç©ºç™½å•元格可编辑
  if (this.vm.editable && (node.name === 'td' || node.name === 'th') && !this.vm.getText(node.children)) {
    node.children.push({
      type: 'text',
      text: ''
    })
  }
}
module.exports = Editable
node_modules/mp-html/plugins/emoji/README.md
New file
@@ -0,0 +1,15 @@
# emoji
功能:解析 *emoji*
大小:*≈3KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš |
说明:
将形如 *[笑脸]* çš„æ–‡æœ¬æ›¿æ¢ä¸º *emoji* å­—符 ðŸ˜„
匹配模式可以通过修改 *reg* å˜é‡å®žçް
默认配置了 *177* ä¸ªå¸¸ç”¨çš„ *emoji* å°è¡¨æƒ…,可以自行按照需要修改 *data* å˜é‡
?> ä¸Ž *editable* æ’件共用时,导出编辑好的 *html* å†…容,会将 *emoji* å­—符编码为文本形式,便于存储
node_modules/mp-html/plugins/emoji/index.js
New file
@@ -0,0 +1,203 @@
/**
 * @fileoverview emoji æ’ä»¶
 */
const reg = /\[(\S+?)\]/g
const data = {
  ç¬‘脸: '😄',
  ç”Ÿç—…: '😷',
  ç ´æ¶•为笑: '😂',
  åèˆŒ: '😝',
  è„¸çº¢: '😳',
  ææƒ§: '😱',
  å¤±æœ›: '😔',
  æ— è¯­: '😒',
  çœ¨çœ¼: '😉',
  é…·: '😎',
  å“­: '😭',
  ç—´è¿·: '😍',
  å»: '😘',
  æ€è€ƒ: '🤔',
  å›°æƒ‘: '😕',
  é¢ å€’: '🙃',
  é’±: '🤑',
  æƒŠè®¶: '😲',
  ç™½çœ¼: '🙄',
  å¹æ°”: '😤',
  ç¡è§‰: '😴',
  ä¹¦å‘†å­: '🤓',
  æ„¤æ€’: '😡',
  é¢æ— è¡¨æƒ…: '😑',
  å¼ å˜´: '😮',
  é‡ä½“温: '🤒',
  å‘•吐: '🤮',
  å…‰çޝ: '😇',
  å¹½çµ: '👻',
  å¤–星人: '👽',
  æœºå™¨äºº: '🤖',
  æ‚眼镜: '🙈',
  æ‚耳朵: '🙉',
  æ‚嘴: '🙊',
  å©´å„¿: '👶',
  ç”·å­©: '👦',
  å¥³å­©: '👧',
  ç”·äºº: '👨',
  å¥³äºº: '👩',
  è€äºº: '👴',
  è€å¦‡äºº: '👵',
  è­¦å¯Ÿ: '👮',
  çދ子: '🤴',
  å…¬ä¸»: '🤴',
  ä¸¾æ‰‹: '🙋',
  è·‘æ­¥: '🏃',
  å®¶åº­: '👪',
  çœ¼ç›: '👀',
  é¼»å­: '👃',
  è€³æœµ: '👂',
  èˆŒå¤´: '👅',
  å˜´: '👄',
  å¿ƒ: '❤️',
  å¿ƒç¢Ž: '💔',
  é›ªäºº: '☃️',
  æƒ…书: '💌',
  å¤§ä¾¿: '💩',
  é—¹é’Ÿ: '⏰',
  çœ¼é•œ: '👓',
  é›¨ä¼ž: '☂️',
  éŸ³ä¹: '🎵',
  è¯ç­’: '🎤',
  æ¸¸æˆæœº: '🎮',
  å–‡å­: '📢',
  è€³æœº: '🎧',
  ç¤¼ç‰©: '🎁',
  ç”µè¯: '📞',
  ç”µè„‘: '💻',
  æ‰“印机: '🖨️',
  æ‰‹ç”µç­’: '🔦',
  ç¯æ³¡: '💡',
  ä¹¦æœ¬: '📖',
  ä¿¡å°: '✉️',
  è¯ä¸¸: '💊',
  å£çº¢: '💄',
  æ‰‹æœº: '📱',
  ç›¸æœº: '📷',
  ç”µè§†: '📺',
  ä¸­: '🀄',
  åžƒåœ¾æ¡¶: '🚮',
  åŽ•æ‰€: '🚾',
  æ„Ÿå¹å·: '❗',
  ç¦: '🈲',
  å¯: '🉑',
  å½©è™¹: '🌈',
  æ—‹é£Ž: '🌀',
  é›·ç”µ: '⚡',
  é›ªèб: '❄️',
  æ˜Ÿæ˜Ÿ: '⭐',
  æ°´æ»´: '💧',
  çŽ«ç‘°: '🌹',
  åŠ æ²¹: '💪',
  å·¦: '👈',
  å³: '👉',
  ä¸Š: '👆',
  ä¸‹: '👇',
  æ‰‹æŽŒ: '🖐️',
  å¥½çš„: '👌',
  å¥½: '👍',
  å·®: '👎',
  èƒœåˆ©: '✌',
  æ‹³å¤´: '👊',
  æŒ¥æ‰‹: '👋',
  é¼“掌: '👏',
  çŒ´å­: '🐒',
  ç‹—: '🐶',
  ç‹¼: '🐺',
  çŒ«: '🐱',
  è€è™Ž: '🐯',
  é©¬: '🐎',
  ç‹¬è§’å…½: '🦄',
  æ–‘马: '🦓',
  é¹¿: '🦌',
  ç‰›: '🐮',
  çŒª: '🐷',
  ç¾Š: '🐏',
  é•¿é¢ˆé¹¿: '🦒',
  å¤§è±¡: '🐘',
  è€é¼ : '🐭',
  è™è : '🦇',
  åˆºçŒ¬: '🦔',
  ç†ŠçŒ«: '🐼',
  é¸½å­: '🕊️',
  é¸­å­: '🦆',
  å…”子: '🐇',
  è€é¹°: '🦅',
  é’è›™: '🐸',
  è›‡: '🐍',
  é¾™: '🐉',
  é²¸é±¼: '🐳',
  æµ·è±š: '🐬',
  è¶³çƒ: '⚽',
  æ£’球: '⚾',
  ç¯®çƒ: '🏀',
  æŽ’球: '🏐',
  æ©„榄球: '🏉',
  ç½‘球: '🎾',
  éª°å­: '🎲',
  é¸¡è…¿: '🍗',
  è›‹ç³•: '🎂',
  å•¤é…’: '🍺',
  é¥ºå­: '🥟',
  æ±‰å ¡: '🍔',
  è–¯æ¡: '🍟',
  æ„å¤§åˆ©é¢: '🍝',
  å¹²æ¯: '🥂',
  ç­·å­: '🥢',
  ç³–æžœ: '🍬',
  å¥¶ç“¶: '🍼',
  çˆ†ç±³èб: '🍿',
  é‚®å±€: '🏤',
  åŒ»é™¢: '🏥',
  é“¶è¡Œ: '🏦',
  é…’店: '🏨',
  å­¦æ ¡: '🏫',
  åŸŽå ¡: '🏰',
  ç«è½¦: '🚂',
  é«˜é“: '🚄',
  åœ°é“: '🚇',
  å…¬äº¤: '🚌',
  æ•‘护车: '🚑',
  æ¶ˆé˜²è½¦: '🚒',
  è­¦è½¦: '🚓',
  å‡ºç§Ÿè½¦: '🚕',
  æ±½è½¦: '🚗',
  è´§è½¦: '🚛',
  è‡ªè¡Œè½¦: '🚲',
  æ‘©æ‰˜: '🛵',
  çº¢ç»¿ç¯: '🚥',
  å¸†èˆ¹: '⛵',
  æ¸¸è½®: '🛳️',
  è½®èˆ¹: '⛴️',
  é£žæœº: '✈️',
  ç›´å‡æœº: '🚁',
  ç¼†è½¦: '🚠',
  è­¦å‘Š: '⚠️',
  ç¦æ­¢: '⛔'
}
function Emoji () {
}
Emoji.prototype.onUpdate = function (content) {
  return content.replace(reg, ($, $1) => {
    if (data[$1]) return data[$1]
    return $
  })
}
Emoji.prototype.onGetContent = function (content) {
  for (const item in data) {
    content = content.replace(new RegExp(data[item], 'g'), '[' + item + ']')
  }
  return content
}
module.exports = Emoji
node_modules/mp-html/plugins/highlight/README.md
New file
@@ -0,0 +1,26 @@
# highlight
功能:代码块高亮显示
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš |
说明:
大小:*≈16KB*
编辑 *plugins/highlight/config.js* é¡¶éƒ¨çš„选项,可以选择是否需要以下功能:
- *copyByLongPress* æ˜¯å¦éœ€è¦é•¿æŒ‰ä»£ç å—时显示复制代码内容菜单(*uni-app nvue* æš‚不支持)
- *showLanguageName* æ˜¯å¦åœ¨ä»£ç å—右上角显示语言的名称
- *showLineNumber* æ˜¯å¦åœ¨å·¦ä¾§æ˜¾ç¤ºè¡Œå·
> ä¿®æ”¹è¯¥é…ç½®åŽéœ€è¦é‡æ–°ç”Ÿæˆç»„件包,在构建后的组件包中修改配置无法生效
引入本插件后,*html* ä¸­ç¬¦åˆä»¥ä¸‹æ ¼å¼çš„ *pre* å°†è¢«é«˜äº®å¤„理:
```html
<!-- pre ä¸­å†…含一个 code,并在 pre æˆ– code çš„ class ä¸­è®¾ç½® language- -->
<pre><code class="language-css">p { color: red }</code></pre>
```
> ä¸Ž *editable* æ’件共用时,编辑状态下,不会进行高亮,可以直接修改代码文本
> æœ¬æ’件的高亮功能依赖于 [prismjs](https://prismjs.com/),默认配置中仅支持 *html*、*css*、*c-like*、*javascript* è¯­è¨€å’Œ *Tomorrow Night* ä¸»é¢˜ï¼Œå¦‚果需要更多语言或更换主题请前往 [官网](https://prismjs.com/download.html) ä¸‹è½½å¯¹åº”çš„ *prism.min.js* å’Œ *prism.css* å¹¶æ›¿æ¢ *plugins/highlight/* ç›®å½•下的文件
node_modules/mp-html/plugins/highlight/config.js
New file
@@ -0,0 +1,5 @@
module.exports = {
  copyByLongPress: false, // æ˜¯å¦éœ€è¦é•¿æŒ‰ä»£ç å—时显示复制代码内容菜单
  showLanguageName: false, // æ˜¯å¦åœ¨ä»£ç å—右上角显示语言的名称
  showLineNumber: false // æ˜¯å¦æ˜¾ç¤ºè¡Œå·
}
node_modules/mp-html/plugins/highlight/index.js
New file
@@ -0,0 +1,96 @@
/**
 * @fileoverview highlight æ’ä»¶
 * Include prismjs (https://prismjs.com)
 */
const prism = require('./prism.min')
const config = require('./config')
const Parser = require('../parser')
function Highlight (vm) {
  this.vm = vm
}
Highlight.prototype.onParse = function (node, vm) {
  if (node.name === 'pre') {
    if (vm.options.editable) {
      node.attrs.class = (node.attrs.class || '') + ' hl-pre'
      return
    }
    let i
    for (i = node.children.length; i--;) {
      if (node.children[i].name === 'code') break
    }
    if (i === -1) return
    const code = node.children[i]
    let className = code.attrs.class + ' ' + node.attrs.class
    i = className.indexOf('language-')
    if (i === -1) {
      i = className.indexOf('lang-')
      if (i === -1) {
        className = 'language-text'
        i = 9
      } else {
        i += 5
      }
    } else {
      i += 9
    }
    let j
    for (j = i; j < className.length; j++) {
      if (className[j] === ' ') break
    }
    const lang = className.substring(i, j)
    if (code.children.length) {
      const text = this.vm.getText(code.children).replace(/&amp;/g, '&')
      if (!text) return
      if (node.c) {
        node.c = undefined
      }
      if (prism.languages[lang]) {
        code.children = (new Parser(this.vm).parse(
          // åР䏀层 pre ä¿ç•™ç©ºç™½ç¬¦
          '<pre>' + prism.highlight(text, prism.languages[lang], lang).replace(/token /g, 'hl-') + '</pre>'))[0].children
      }
      node.attrs.class = 'hl-pre'
      code.attrs.class = 'hl-code'
      if (config.showLanguageName) {
        node.children.push({
          name: 'div',
          attrs: {
            class: 'hl-language',
            style: 'user-select:none'
          },
          children: [{
            type: 'text',
            text: lang
          }]
        })
      }
      if (config.copyByLongPress) {
        node.attrs.style += (node.attrs.style || '') + ';user-select:none'
        node.attrs['data-content'] = text
        vm.expose()
      }
      if (config.showLineNumber) {
        const line = text.split('\n').length; const children = []
        for (let k = line; k--;) {
          children.push({
            name: 'span',
            attrs: {
              class: 'span'
            }
          })
        }
        node.children.push({
          name: 'span',
          attrs: {
            class: 'line-numbers-rows'
          },
          children
        })
      }
    }
  }
}
module.exports = Highlight
node_modules/mp-html/plugins/highlight/miniprogram/build.js
New file
@@ -0,0 +1,88 @@
const config = require('../config')
const build = {
  import: 'prism.css',
  handler (file) {
    if (file.path.includes('prism.css')) {
      // å°†æ ‡ç­¾åé€‰æ‹©å™¨å’Œå±žæ€§é€‰æ‹©å™¨è½¬ä¸º class é€‰æ‹©å™¨ï¼ˆç»„件内仅支持 class é€‰æ‹©å™¨ï¼‰
      file.contents = Buffer.from(file.contents.toString().replace(/pre([[)])/g, '.hl-pre$1').replace(/code/g, '.hl-code').replace(/\[class\*="?language-"?\]/g, '').replace(/:not[^,}]+[,}]*/g, '').replace(/\.token\./g, '.hl-'))
    }
  }
}
if (config.showLanguageName || config.showLineNumber) {
  // pre å†…部的 code è¿›è¡Œæ»šåŠ¨ï¼Œé¿å…è¡Œå·å’Œè¯­è¨€åç§°è·Ÿéšæ»šåŠ¨
  build.style = `.hl-pre {
  position: relative;
}
.hl-code {
  overflow: auto;
  display: block;
}`
}
if (config.copyByLongPress) {
  build.template = '<rich-text wx:if="{{n.attrs[\'data-content\']}}" nodes="{{[n]}}" data-content="{{n.attrs[\'data-content\']}}" data-lang="{{n.attrs[\'data-lang\']}}" bindlongpress="copyCode" />'
  build.methods = {
    copyCode (e) {
      wx.showActionSheet({
        itemList: ['复制代码'],
        success: () =>
          wx.setClipboardData({
            data: e.currentTarget.dataset.content
          })
      })
    }
  }
}
if (config.showLanguageName) {
  build.style = (build.style || '') +
    `.hl-language {
  font-size: 12px;
  font-weight: 600;
  position: absolute;
  right: 8px;
  text-align: right;
  top: 3px;
}
.hl-pre {
  padding-top: 1.5em;
}`
}
if (config.showLineNumber) {
  build.style = (build.style || '') +
    `.hl-pre {
  font-size: 14px;
  padding-left: 3.8em;
  counter-reset: linenumber;
}
.line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: ${config.showLanguageName ? 1.5 : 1}em;
  font-size: 100%;
  left: 0;
  width: 3em; /* works for line-numbers below 1000 lines */
  letter-spacing: -1px;
  border-right: 1px solid #999;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.line-numbers-rows .span {
  display: block;
  counter-increment: linenumber;
}
.line-numbers-rows .span:before {
  content: counter(linenumber);
  color: #999;
  display: block;
  padding-right: 0.8em;
  text-align: right;
}`
}
module.exports = build
node_modules/mp-html/plugins/highlight/prism.css
New file
@@ -0,0 +1,125 @@
/* PrismJS 1.22.0
https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript */
/**
 * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
 * Based on https://github.com/chriskempson/tomorrow-theme
 * @author Rose Pritchard
 */
code[class*="language-"],
pre[class*="language-"] {
    color: #ccc;
    background: none;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 1em;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: 1.5;
    -moz-tab-size: 4;
    -o-tab-size: 4;
    tab-size: 4;
    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
}
/* Code blocks */
pre[class*="language-"] {
    padding: 1em;
    margin: .5em 0;
    overflow: auto;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
    background: #2d2d2d;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
    padding: .1em;
    border-radius: .3em;
    white-space: normal;
}
.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #999;
}
.token.punctuation {
    color: #ccc;
}
.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
    color: #e2777a;
}
.token.function-name {
    color: #6196cc;
}
.token.boolean,
.token.number,
.token.function {
    color: #f08d49;
}
.token.property,
.token.class-name,
.token.constant,
.token.symbol {
    color: #f8c555;
}
.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
    color: #cc99cd;
}
.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.variable {
    color: #7ec699;
}
.token.operator,
.token.entity,
.token.url {
    color: #67cdcc;
}
.token.important,
.token.bold {
    font-weight: bold;
}
.token.italic {
    font-style: italic;
}
.token.entity {
    cursor: help;
}
.token.inserted {
    color: green;
}
node_modules/mp-html/plugins/highlight/prism.min.js
New file
@@ -0,0 +1,7 @@
/*! PrismJS 1.22.0
https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript */
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function t(e,r){var a,n;switch(r=r||{},M.util.type(e)){case"Object":if(n=M.util.objId(e),r[n])return r[n];for(var i in a={},r[n]=a,e)e.hasOwnProperty(i)&&(a[i]=t(e[i],r));return a;case"Array":return n=M.util.objId(e),r[n]?r[n]:(a=[],r[n]=a,e.forEach(function(e,n){a[n]=t(e,r)}),a);default:return e}},getLanguage:function(e){for(;e&&!c.test(e.className);)e=e.parentElement;return e?(e.className.match(c)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(e){var n=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(e.stack)||[])[1];if(n){var t=document.getElementsByTagName("script");for(var r in t)if(t[r].src==n)return t[r]}return null}},isActive:function(e,n,t){for(var r="no-"+n;e;){var a=e.classList;if(a.contains(n))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!t}},languages:{extend:function(e,n){var t=M.util.clone(M.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(t,e,n,r){var a=(r=r||M.languages)[t],i={};for(var l in a)if(a.hasOwnProperty(l)){if(l==e)for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);n.hasOwnProperty(l)||(i[l]=a[l])}var s=r[t];return r[t]=i,M.languages.DFS(M.languages,function(e,n){n===s&&e!=t&&(this[e]=i)}),i},DFS:function e(n,t,r,a){a=a||{};var i=M.util.objId;for(var l in n)if(n.hasOwnProperty(l)){t.call(n,l,n[l],r||l);var o=n[l],s=M.util.type(o);"Object"!==s||a[i(o)]?"Array"!==s||a[i(o)]||(a[i(o)]=!0,e(o,t,l,a)):(a[i(o)]=!0,e(o,t,null,a))}}},plugins:{},highlightAll:function(e,n){M.highlightAllUnder(document,e,n)},highlightAllUnder:function(e,n,t){var r={callback:t,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};M.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),M.hooks.run("before-all-elements-highlight",r);for(var a,i=0;a=r.elements[i++];)M.highlightElement(a,!0===n,r.callback)},highlightElement:function(e,n,t){var r=M.util.getLanguage(e),a=M.languages[r];e.className=e.className.replace(c,"").replace(/\s+/g," ")+" language-"+r;var i=e.parentElement;i&&"pre"===i.nodeName.toLowerCase()&&(i.className=i.className.replace(c,"").replace(/\s+/g," ")+" language-"+r);var l={element:e,language:r,grammar:a,code:e.textContent};function o(e){l.highlightedCode=e,M.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,M.hooks.run("after-highlight",l),M.hooks.run("complete",l),t&&t.call(l.element)}if(M.hooks.run("before-sanity-check",l),!l.code)return M.hooks.run("complete",l),void(t&&t.call(l.element));if(M.hooks.run("before-highlight",l),l.grammar)if(n&&u.Worker){var s=new Worker(M.filename);s.onmessage=function(e){o(e.data)},s.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else o(M.highlight(l.code,l.grammar,l.language));else o(M.util.encode(l.code))},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};return M.hooks.run("before-tokenize",r),r.tokens=M.tokenize(r.code,r.grammar),M.hooks.run("after-tokenize",r),W.stringify(M.util.encode(r.tokens),r.language)},tokenize:function(e,n){var t=n.rest;if(t){for(var r in t)n[r]=t[r];delete n.rest}var a=new i;return I(a,a.head,e),function e(n,t,r,a,i,l){for(var o in r)if(r.hasOwnProperty(o)&&r[o]){var s=r[o];s=Array.isArray(s)?s:[s];for(var u=0;u<s.length;++u){if(l&&l.cause==o+","+u)return;var c=s[u],g=c.inside,f=!!c.lookbehind,h=!!c.greedy,d=0,v=c.alias;if(h&&!c.pattern.global){var p=c.pattern.toString().match(/[imsuy]*$/)[0];c.pattern=RegExp(c.pattern.source,p+"g")}for(var m=c.pattern||c,y=a.next,k=i;y!==t.tail&&!(l&&k>=l.reach);k+=y.value.length,y=y.next){var b=y.value;if(t.length>n.length)return;if(!(b instanceof W)){var x=1;if(h&&y!=t.tail.prev){m.lastIndex=k;var w=m.exec(n);if(!w)break;var A=w.index+(f&&w[1]?w[1].length:0),P=w.index+w[0].length,S=k;for(S+=y.value.length;S<=A;)y=y.next,S+=y.value.length;if(S-=y.value.length,k=S,y.value instanceof W)continue;for(var E=y;E!==t.tail&&(S<P||"string"==typeof E.value);E=E.next)x++,S+=E.value.length;x--,b=n.slice(k,S),w.index-=k}else{m.lastIndex=0;var w=m.exec(b)}if(w){f&&(d=w[1]?w[1].length:0);var A=w.index+d,O=w[0].slice(d),P=A+O.length,L=b.slice(0,A),N=b.slice(P),j=k+b.length;l&&j>l.reach&&(l.reach=j);var C=y.prev;L&&(C=I(t,C,L),k+=L.length),z(t,C,x);var _=new W(o,g?M.tokenize(O,g):O,v,O);y=I(t,C,_),N&&I(t,y,N),1<x&&e(n,t,r,y.prev,k,{cause:o+","+u,reach:j})}}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=M.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=M.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:W};function W(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function z(e,n,t){for(var r=n.next,a=0;a<t&&r!==e.tail;a++)r=r.next;(n.next=r).prev=n,e.length-=a}if(u.Prism=M,W.stringify=function n(e,t){if("string"==typeof e)return e;if(Array.isArray(e)){var r="";return e.forEach(function(e){r+=n(e,t)}),r}var a={type:e.type,content:n(e.content,t),tag:"span",classes:["token",e.type],attributes:{},language:t},i=e.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(a.classes,i):a.classes.push(i)),M.hooks.run("wrap",a);var l="";for(var o in a.attributes)l+=" "+o+'="'+(a.attributes[o]||"").replace(/"/g,"&quot;")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+l+">"+a.content+"</"+a.tag+">"},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var e=M.util.currentScript();function t(){M.manual||M.highlightAll()}if(e&&(M.filename=e.src,e.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var r=document.readyState;"loading"===r||"interactive"===r&&e&&e.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var n={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^]*?>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[^])*?(?=</__>)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml;
!function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var s=e.languages.markup;s&&(s.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i,lookbehind:!0,inside:{"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{style:{pattern:/(["'])[\s\S]+(?=["']$)/,lookbehind:!0,alias:"language-css",inside:e.languages.css},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},"attr-name":/^style/i}}},s.tag))}(Prism);
Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};
Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript;
node_modules/mp-html/plugins/highlight/uni-app/build.js
New file
@@ -0,0 +1,88 @@
const config = require('../config')
const build = {
  import: 'prism.css',
  handler (file) {
    if (file.path.includes('prism.css')) {
      // å°†æ ‡ç­¾åé€‰æ‹©å™¨å’Œå±žæ€§é€‰æ‹©å™¨è½¬ä¸º class é€‰æ‹©å™¨ï¼ˆç»„件内仅支持 class é€‰æ‹©å™¨ï¼‰
      file.contents = Buffer.from(file.contents.toString().replace(/pre([[)])/g, '.hl-pre$1').replace(/code/g, '.hl-code').replace(/\[class\*="?language-"?\]/g, '').replace(/:not[^,}]+[,}]*/g, '').replace(/\.token\./g, '.hl-'))
    }
  }
}
if (config.showLanguageName || config.showLineNumber) {
  // pre å†…部的 code è¿›è¡Œæ»šåŠ¨ï¼Œé¿å…è¡Œå·å’Œè¯­è¨€åç§°è·Ÿéšæ»šåŠ¨
  build.style = `.hl-pre {
  position: relative;
}
.hl-code {
  overflow: auto;
  display: block;
}`
}
if (config.copyByLongPress) {
  build.template = '<rich-text v-if="n.attrs&&n.attrs[\'data-content\']" :nodes="[n]" :data-content="n.attrs[\'data-content\']" :data-lang="n.attrs[\'data-lang\']" @longpress="copyCode" />'
  build.methods = {
    copyCode (e) {
      uni.showActionSheet({
        itemList: ['复制代码'],
        success: () =>
          uni.setClipboardData({
            data: e.currentTarget.dataset.content
          })
      })
    }
  }
}
if (config.showLanguageName) {
  build.style = (build.style || '') +
    `.hl-language {
  font-size: 12px;
  font-weight: 600;
  position: absolute;
  right: 8px;
  text-align: right;
  top: 3px;
}
.hl-pre {
  padding-top: 1.5em;
}`
}
if (config.showLineNumber) {
  build.style = (build.style || '') +
    `.hl-pre {
  font-size: 14px;
  padding-left: 3.8em;
  counter-reset: linenumber;
}
.line-numbers-rows {
  position: absolute;
  pointer-events: none;
  top: ${config.showLanguageName ? 1.5 : 1}em;
  font-size: 100%;
  left: 0;
  width: 3em; /* works for line-numbers below 1000 lines */
  letter-spacing: -1px;
  border-right: 1px solid #999;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.line-numbers-rows .span {
  display: block;
  counter-increment: linenumber;
}
.line-numbers-rows .span:before {
  content: counter(linenumber);
  color: #999;
  display: block;
  padding-right: 0.8em;
  text-align: right;
}`
}
module.exports = build
node_modules/mp-html/plugins/img-cache/README.md
New file
@@ -0,0 +1,24 @@
功能:图片本地缓存
大小:*≈4KB*
作者:[@PentaTea](https://github.com/PentaTea)
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
|  |  |  |  |  | âˆš(仅支持 app çš„ vue é¡µé¢) |
说明:
引入本插件后,会给组件添加一个 *img-cache* å±žæ€§ï¼Œå°†è¯¥å±žæ€§è®¾ç½®ä¸º *true* åŽï¼Œå°†è‡ªåŠ¨ä¸‹è½½å¼•ç”¨çš„å›¾ç‰‡å¹¶å°† *src* å±žæ€§æ›´æ¢ä¸ºæœ¬åœ°åœ°å€
同时在组件实例上挂载了 *imgCache* å¯¹è±¡ï¼Œæ‰©å……缓存控制能力
*imgCache* å¯¹è±¡å±žæ€§å’Œæ–¹æ³•:
| å±žæ€§ | åŠŸèƒ½ |
|:---:|:---:|
| list | å½“前缓存的 url åˆ—表 |
| get(url) | ä¼ å…¥ url èŽ·å¾—æœ¬åœ°åœ°å€ |
| delete(url) | ä¼ å…¥ url åˆ é™¤ç¼“存记录 |
| add(url) | ä¼ å…¥ url å¹¶ä¸‹è½½ç›®æ ‡ä¸ºç¼“å­˜ |
| clear() | æ¸…空所有缓存 |
!> è¯·å°½é‡ç¡®ä¿ *src* ä¸­å«æœ‰æ–‡ä»¶åŽç¼€åï¼Œä¸ä»¥åŽç¼€ç»“尾也没关系,插件会从路径中推测合理的图片后缀,如果完全不包含后缀信息可能会无法保存到相册
node_modules/mp-html/plugins/img-cache/build.js
New file
@@ -0,0 +1,16 @@
module.exports = {
  main: 'index.js',
  platform: ['uni-app'],
  handler (file, platform) {
    if (platform === 'uni-app') {
      // æ·»åŠ  img-cache å±žæ€§
      if (file.path.includes('mp-html.vue')) {
        file.contents = Buffer.from(
          file.contents
            .toString()
            .replace(/props\s*:\s*{/, 'props: {\n    ImgCache: Boolean,')
        )
      }
    }
  }
}
node_modules/mp-html/plugins/img-cache/index.js
New file
@@ -0,0 +1,138 @@
const data = {
  name: 'imgcache',
  prefix: 'imgcache_'
}
function ImgCache (vm) {
  this.vm = vm // ä¿å­˜å®žä¾‹åœ¨å…¶ä»–周期使用
  this.i = 0 // ç”¨äºŽæ ‡è®°ç¬¬å‡ å¼ å›¾
  vm.imgCache = {
    get list () {
      return uni
        .getStorageInfoSync()
        .keys.filter((key) => key.startsWith(data.prefix))
        .map((key) => key.split(data.prefix)[1])
    },
    get (url) {
      return uni.getStorageSync(data.prefix + url)
    },
    delete (url) {
      const path = uni.getStorageSync(data.prefix + url)
      if (!path) return false
      plus.io.resolveLocalFileSystemURL(path, (entry) => {
        entry.remove()
      })
      uni.removeStorageSync(data.prefix + url)
      return true
    },
    async add (url) {
      const filename = await download(url)
      if (filename) {
        uni.setStorageSync(data.prefix + url, filename)
        return 'file://' + plus.io.convertLocalFileSystemURL(filename)
      }
      return null
    },
    clear () {
      uni
        .getStorageInfoSync()
        .keys.filter((key) => key.startsWith(data.prefix))
        .forEach((key) => {
          uni.removeStorageSync(key)
        })
      plus.io.resolveLocalFileSystemURL(`_doc/${data.name}/`, (entry) => {
        entry.removeRecursively(
          (entry) => {
            console.log(`${data.name}缓存删除成功`, entry)
          },
          (e) => {
            console.log(`${data.name}缓存删除失败`, e)
          }
        )
      })
    }
  }
}
// #ifdef APP-PLUS
ImgCache.prototype.onParse = function (node, parser) {
  // å¯ç”¨æœ¬æ’ä»¶ && è§£æžå›¾ç‰‡æ ‡ç­¾ && æ‹¥æœ‰src属性 && æ˜¯ç½‘络图片
  if (
    this.vm.ImgCache &&
    node.name === 'img' &&
    node.attrs.src &&
    /^https?:\/\//.test(node.attrs.src)
  ) {
    const src = node.attrs.src
    node.attrs.src = ''
    node.attrs.i = this.vm.imgList.length + this.i++
    parser.expose()
    async function getUrl (path) {
      if (await resolveFile(path)) return path
      const filename = await download(src)
      filename && uni.setStorageSync(data.prefix + src, filename)
      return filename
    }
    uni.getStorage({
      key: data.prefix + src,
      success: async (res) => {
        const path = await getUrl(res.data)
        const url = path
          ? 'file://' + plus.io.convertLocalFileSystemURL(path)
          : src
        node.attrs.src = url
        this.vm.imgList[node.attrs.i] = path || src
      },
      fail: async () => {
        const path = await getUrl()
        const url = path
          ? 'file://' + plus.io.convertLocalFileSystemURL(path)
          : src
        node.attrs.src = url
        this.vm.imgList[node.attrs.i] = path || src
      }
    })
  }
}
const taskQueue = new Set()
function download (url) {
  return new Promise((resolve) => {
    if (taskQueue.has(url)) return
    taskQueue.add(url)
    const suffix = /.+\.(jpg|jpeg|png|bmp|gif|webp)/.exec(url)
    const name = `${makeid(8)}_${Date.now()}${suffix ? '.' + suffix[1] : ''}`
    const task = plus.downloader.createDownload(
      url,
      { filename: `_doc/${data.name}/${name}` },
      (download, status) => {
        taskQueue.delete(url)
        resolve(status === 200 ? download.filename : null)
      }
    )
    task.start()
  })
}
// åˆ¤æ–­æ–‡ä»¶å­˜åœ¨
function resolveFile (url) {
  return new Promise((resolve) => {
    plus.io.resolveLocalFileSystemURL(url, resolve, () => resolve(null))
  })
}
// ç”Ÿæˆuuid
function makeid (length) {
  let result = ''
  const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
  for (let i = 0; i < length; i++) {
    result += characters.charAt(Math.floor(Math.random() * characters.length))
  }
  return result
}
// #endif
module.exports = ImgCache
node_modules/mp-html/plugins/latex/README.md
New file
@@ -0,0 +1,16 @@
# latex
功能:渲染 *latex* å…¬å¼
大小:**≈300KB**
作者:[@Zeng-J](https://github.com/Zeng-J)
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš |
说明:
引入本插件后,会将 *$xxx$* çš„æ–‡æœ¬å†…容按照 *latex* è§„则进行解析和渲染
> ä¸Ž *editable* æ’件共用时,编辑状态下,公式不会渲染,可以直接修改公式文本
> æœ¬æ’件通过 [katex-mini](https://github.com/rojer95/katex-mini) è§£æž *latex* æ–‡æœ¬ï¼Œ[字体文件](https://github.com/KaTeX/KaTeX/tree/main/fonts) å»ºè®®è‡ªè¡Œè½¬å­˜
node_modules/mp-html/plugins/latex/build.js
New file
@@ -0,0 +1,14 @@
module.exports = {
  import: 'katex.css',
  handler (file) {
    if (file.isBuffer()) {
      let content = file.contents.toString()
      if (file.basename === 'node.wxml') {
        content = content.replace(/(n.?)\.name==='a'\|\|/g, "$1.name==='a'||$1.l||")
      } else if (file.basename === 'node.vue') {
        content = content.replace(/!handler.isInline\((.*?)\)/, '(n.l||!handler.isInline($1))')
      }
      file.contents = Buffer.from(content)
    }
  }
}
node_modules/mp-html/plugins/latex/index.js
New file
@@ -0,0 +1,80 @@
/**
 * @fileoverview latex æ’ä»¶
 * katex.min.js来源 https://github.com/rojer95/katex-mini
 */
const parse = require('./katex.min')
function Latex () {
}
Latex.prototype.onParse = function (node, vm) {
  // $...$包裹的内容为latex公式
  if (!vm.options.editable && node.type === 'text' && node.text.includes('$')) {
    const part = node.text.split(/(\${1,2})/)
    const children = []
    let status = 0
    for (let i = 0; i < part.length; i++) {
      if (i % 2 === 0) {
        // æ–‡æœ¬å†…容
        if (part[i]) {
          if (status === 0) {
            children.push({
              type: 'text',
              text: part[i]
            })
          } else {
            if (status === 1) {
              // è¡Œå†…公式
              const nodes = parse.default(part[i])
              children.push({
                name: 'span',
                attrs: {},
                l: 'T',
                f: 'display:inline-block',
                children: nodes
              })
            } else {
              // å—公式
              const nodes = parse.default(part[i], {
                displayMode: true
              })
              children.push({
                name: 'div',
                attrs: {
                  style: 'text-align:center'
                },
                children: nodes
              })
            }
          }
        }
      } else {
        // åˆ†éš”符
        if (part[i] === '$' && part[i + 2] === '$') {
          // è¡Œå†…公式
          status = 1
          part[i + 2] = ''
        } else if (part[i] === '$$' && part[i + 2] === '$$') {
          // å—公式
          status = 2
          part[i + 2] = ''
        } else {
          if (part[i] && part[i] !== '$$') {
            // æ™®é€š$符号
            part[i + 1] = part[i] + part[i + 1]
          }
          // é‡ç½®çŠ¶æ€
          status = 0
        }
      }
    }
    delete node.type
    delete node.text
    node.name = 'span'
    node.attrs = {}
    node.children = children
  }
}
module.exports = Latex
node_modules/mp-html/plugins/latex/katex.css
New file
@@ -0,0 +1,1070 @@
/* fonts字体库可自行前往 https://github.com/KaTeX/KaTeX/tree/main/fonts ä¸‹è½½ï¼Œæ”¾å…¥è‡ªå®¶çš„cdn服务上 */
@font-face {
  font-family: "KaTeX_AMS";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_AMS-Regular.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_AMS-Regular.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_AMS-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "KaTeX_Caligraphic";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Caligraphic-Bold.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Caligraphic-Bold.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Caligraphic-Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: "KaTeX_Caligraphic";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Caligraphic-Regular.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Caligraphic-Regular.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Caligraphic-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "KaTeX_Fraktur";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Fraktur-Bold.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Fraktur-Bold.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Fraktur-Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: "KaTeX_Fraktur";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Fraktur-Regular.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Fraktur-Regular.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Fraktur-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "KaTeX_Main";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Main-Bold.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Main-Bold.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Main-Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: "KaTeX_Main";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Main-BoldItalic.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Main-BoldItalic.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Main-BoldItalic.ttf") format("truetype");
  font-weight: bold;
  font-style: italic;
}
@font-face {
  font-family: "KaTeX_Main";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Main-Italic.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Main-Italic.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Main-Italic.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
}
@font-face {
  font-family: "KaTeX_Main";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Main-Regular.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Main-Regular.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Main-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "KaTeX_Math";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Math-BoldItalic.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Math-BoldItalic.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Math-BoldItalic.ttf") format("truetype");
  font-weight: bold;
  font-style: italic;
}
@font-face {
  font-family: "KaTeX_Math";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Math-Italic.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Math-Italic.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Math-Italic.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
}
@font-face {
  font-family: "KaTeX_SansSerif";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_SansSerif-Bold.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_SansSerif-Bold.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_SansSerif-Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: "KaTeX_SansSerif";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_SansSerif-Italic.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_SansSerif-Italic.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_SansSerif-Italic.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
}
@font-face {
  font-family: "KaTeX_SansSerif";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_SansSerif-Regular.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_SansSerif-Regular.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_SansSerif-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "KaTeX_Script";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Script-Regular.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Script-Regular.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Script-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "KaTeX_Size1";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Size1-Regular.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Size1-Regular.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Size1-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "KaTeX_Size2";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Size2-Regular.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Size2-Regular.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Size2-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "KaTeX_Size3";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Size3-Regular.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Size3-Regular.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Size3-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "KaTeX_Size4";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Size4-Regular.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Size4-Regular.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Size4-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "KaTeX_Typewriter";
  src: url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Typewriter-Regular.woff2") format("woff2"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Typewriter-Regular.woff") format("woff"), url("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/KaTeX/0.13.16/fonts/KaTeX_Typewriter-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
.katex {
  counter-reset: katexEqnNo mmlEqnNo;
  font: normal 1.21em KaTeX_Main, Times New Roman, serif;
  line-height: 1.2;
  text-indent: 0;
  text-rendering: auto;
}
.katex view,
.katex text {
  -ms-high-contrast-adjust: none !important;
  border-color: currentColor;
}
.katex .katex-mathml {
  /* Accessibility hack to only show to screen readers
         Found at: http://a11yproject.com/posts/how-to-hide-content/ */
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0;
  border: 0;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
.katex .katex-html {
  /* \newline is an empty block at top level, between .base elements */
}
.katex .katex-html > .newline {
  display: block;
}
.katex .base {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  width: min-content;
}
.katex .strut {
  display: inline-block;
}
.katex .textbf {
  font-weight: bold;
}
.katex .textit {
  font-style: italic;
}
.katex .textrm {
  font-family: KaTeX_Main;
}
.katex .textsf {
  font-family: KaTeX_SansSerif;
}
.katex .texttt {
  font-family: KaTeX_Typewriter;
}
.katex .mathnormal {
  font-family: KaTeX_Math;
  font-style: italic;
}
.katex .mathit {
  font-family: KaTeX_Main;
  font-style: italic;
}
.katex .mathrm {
  font-style: normal;
}
.katex .mathbf {
  font-family: KaTeX_Main;
  font-weight: bold;
}
.katex .boldsymbol {
  font-family: KaTeX_Math;
  font-weight: bold;
  font-style: italic;
}
.katex .amsrm {
  font-family: KaTeX_AMS;
}
.katex .mathbb,
.katex .textbb {
  font-family: KaTeX_AMS;
}
.katex .mathcal {
  font-family: KaTeX_Caligraphic;
}
.katex .mathfrak,
.katex .textfrak {
  font-family: KaTeX_Fraktur;
}
.katex .mathtt {
  font-family: KaTeX_Typewriter;
}
.katex .mathscr,
.katex .textscr {
  font-family: KaTeX_Script;
}
.katex .mathsf,
.katex .textsf {
  font-family: KaTeX_SansSerif;
}
.katex .mathboldsf,
.katex .textboldsf {
  font-family: KaTeX_SansSerif;
  font-weight: bold;
}
.katex .mathitsf,
.katex .textitsf {
  font-family: KaTeX_SansSerif;
  font-style: italic;
}
.katex .mainrm {
  font-family: KaTeX_Main;
  font-style: normal;
}
.katex .vlist-t {
  display: inline-table;
  table-layout: fixed;
  border-collapse: collapse;
}
.katex .vlist-r {
  display: table-row;
}
.katex .vlist {
  display: table-cell;
  vertical-align: bottom;
  position: relative;
}
.katex .vlist > .katex-span {
  display: block;
  height: 0;
  position: relative;
}
.katex .vlist > .katex-span > .katex-span {
  display: inline-block;
}
.katex .vlist > .katex-span > .pstrut {
  overflow: hidden;
  width: 0;
}
.katex .vlist-t2 {
  margin-right: -2px;
}
.katex .vlist-s {
  display: table-cell;
  vertical-align: bottom;
  font-size: 1px;
  width: 2px;
  min-width: 2px;
}
.katex .vbox {
  display: inline-flex;
  flex-direction: column;
  align-items: baseline;
}
.katex .hbox {
  display: inline-flex;
  flex-direction: row;
  width: 100%;
}
.katex .thinbox {
  display: inline-flex;
  flex-direction: row;
  width: 0;
  max-width: 0;
}
.katex .msupsub {
  text-align: left;
}
.katex .mfrac > .katex-span > .katex-span {
  text-align: center;
}
.katex .mfrac .frac-line {
  display: inline-block;
  width: 100%;
  border-bottom-style: solid;
}
.katex .mfrac .frac-line,
.katex .overline .overline-line,
.katex .underline .underline-line,
.katex .hline,
.katex .hdashline,
.katex .rule {
  min-height: 1px;
}
.katex .mspace {
  display: inline-block;
}
.katex .llap,
.katex .rlap,
.katex .clap {
  width: 0;
  position: relative;
}
.katex .llap > .inner,
.katex .rlap > .inner,
.katex .clap > .inner {
  position: absolute;
}
.katex .llap > .fix,
.katex .rlap > .fix,
.katex .clap > .fix {
  display: inline-block;
}
.katex .llap > .inner {
  right: 0;
}
.katex .rlap > .inner,
.katex .clap > .inner {
  left: 0;
}
.katex .clap > .inner > .katex-span {
  margin-left: -50%;
  margin-right: 50%;
}
.katex .rule {
  display: inline-block;
  border: solid 0;
  position: relative;
}
.katex .overline .overline-line,
.katex .underline .underline-line,
.katex .hline {
  display: inline-block;
  width: 100%;
  border-bottom-style: solid;
}
.katex .hdashline {
  display: inline-block;
  width: 100%;
  border-bottom-style: dashed;
}
.katex .sqrt > .root {
  margin-left: 0.27777778em;
  margin-right: -0.55555556em;
}
.katex .sizing.reset-size1.size1,
.katex .fontsize-ensurer.reset-size1.size1 {
  font-size: 1em;
}
.katex .sizing.reset-size1.size2,
.katex .fontsize-ensurer.reset-size1.size2 {
  font-size: 1.2em;
}
.katex .sizing.reset-size1.size3,
.katex .fontsize-ensurer.reset-size1.size3 {
  font-size: 1.4em;
}
.katex .sizing.reset-size1.size4,
.katex .fontsize-ensurer.reset-size1.size4 {
  font-size: 1.6em;
}
.katex .sizing.reset-size1.size5,
.katex .fontsize-ensurer.reset-size1.size5 {
  font-size: 1.8em;
}
.katex .sizing.reset-size1.size6,
.katex .fontsize-ensurer.reset-size1.size6 {
  font-size: 2em;
}
.katex .sizing.reset-size1.size7,
.katex .fontsize-ensurer.reset-size1.size7 {
  font-size: 2.4em;
}
.katex .sizing.reset-size1.size8,
.katex .fontsize-ensurer.reset-size1.size8 {
  font-size: 2.88em;
}
.katex .sizing.reset-size1.size9,
.katex .fontsize-ensurer.reset-size1.size9 {
  font-size: 3.456em;
}
.katex .sizing.reset-size1.size10,
.katex .fontsize-ensurer.reset-size1.size10 {
  font-size: 4.148em;
}
.katex .sizing.reset-size1.size11,
.katex .fontsize-ensurer.reset-size1.size11 {
  font-size: 4.976em;
}
.katex .sizing.reset-size2.size1,
.katex .fontsize-ensurer.reset-size2.size1 {
  font-size: 0.83333333em;
}
.katex .sizing.reset-size2.size2,
.katex .fontsize-ensurer.reset-size2.size2 {
  font-size: 1em;
}
.katex .sizing.reset-size2.size3,
.katex .fontsize-ensurer.reset-size2.size3 {
  font-size: 1.16666667em;
}
.katex .sizing.reset-size2.size4,
.katex .fontsize-ensurer.reset-size2.size4 {
  font-size: 1.33333333em;
}
.katex .sizing.reset-size2.size5,
.katex .fontsize-ensurer.reset-size2.size5 {
  font-size: 1.5em;
}
.katex .sizing.reset-size2.size6,
.katex .fontsize-ensurer.reset-size2.size6 {
  font-size: 1.66666667em;
}
.katex .sizing.reset-size2.size7,
.katex .fontsize-ensurer.reset-size2.size7 {
  font-size: 2em;
}
.katex .sizing.reset-size2.size8,
.katex .fontsize-ensurer.reset-size2.size8 {
  font-size: 2.4em;
}
.katex .sizing.reset-size2.size9,
.katex .fontsize-ensurer.reset-size2.size9 {
  font-size: 2.88em;
}
.katex .sizing.reset-size2.size10,
.katex .fontsize-ensurer.reset-size2.size10 {
  font-size: 3.45666667em;
}
.katex .sizing.reset-size2.size11,
.katex .fontsize-ensurer.reset-size2.size11 {
  font-size: 4.14666667em;
}
.katex .sizing.reset-size3.size1,
.katex .fontsize-ensurer.reset-size3.size1 {
  font-size: 0.71428571em;
}
.katex .sizing.reset-size3.size2,
.katex .fontsize-ensurer.reset-size3.size2 {
  font-size: 0.85714286em;
}
.katex .sizing.reset-size3.size3,
.katex .fontsize-ensurer.reset-size3.size3 {
  font-size: 1em;
}
.katex .sizing.reset-size3.size4,
.katex .fontsize-ensurer.reset-size3.size4 {
  font-size: 1.14285714em;
}
.katex .sizing.reset-size3.size5,
.katex .fontsize-ensurer.reset-size3.size5 {
  font-size: 1.28571429em;
}
.katex .sizing.reset-size3.size6,
.katex .fontsize-ensurer.reset-size3.size6 {
  font-size: 1.42857143em;
}
.katex .sizing.reset-size3.size7,
.katex .fontsize-ensurer.reset-size3.size7 {
  font-size: 1.71428571em;
}
.katex .sizing.reset-size3.size8,
.katex .fontsize-ensurer.reset-size3.size8 {
  font-size: 2.05714286em;
}
.katex .sizing.reset-size3.size9,
.katex .fontsize-ensurer.reset-size3.size9 {
  font-size: 2.46857143em;
}
.katex .sizing.reset-size3.size10,
.katex .fontsize-ensurer.reset-size3.size10 {
  font-size: 2.96285714em;
}
.katex .sizing.reset-size3.size11,
.katex .fontsize-ensurer.reset-size3.size11 {
  font-size: 3.55428571em;
}
.katex .sizing.reset-size4.size1,
.katex .fontsize-ensurer.reset-size4.size1 {
  font-size: 0.625em;
}
.katex .sizing.reset-size4.size2,
.katex .fontsize-ensurer.reset-size4.size2 {
  font-size: 0.75em;
}
.katex .sizing.reset-size4.size3,
.katex .fontsize-ensurer.reset-size4.size3 {
  font-size: 0.875em;
}
.katex .sizing.reset-size4.size4,
.katex .fontsize-ensurer.reset-size4.size4 {
  font-size: 1em;
}
.katex .sizing.reset-size4.size5,
.katex .fontsize-ensurer.reset-size4.size5 {
  font-size: 1.125em;
}
.katex .sizing.reset-size4.size6,
.katex .fontsize-ensurer.reset-size4.size6 {
  font-size: 1.25em;
}
.katex .sizing.reset-size4.size7,
.katex .fontsize-ensurer.reset-size4.size7 {
  font-size: 1.5em;
}
.katex .sizing.reset-size4.size8,
.katex .fontsize-ensurer.reset-size4.size8 {
  font-size: 1.8em;
}
.katex .sizing.reset-size4.size9,
.katex .fontsize-ensurer.reset-size4.size9 {
  font-size: 2.16em;
}
.katex .sizing.reset-size4.size10,
.katex .fontsize-ensurer.reset-size4.size10 {
  font-size: 2.5925em;
}
.katex .sizing.reset-size4.size11,
.katex .fontsize-ensurer.reset-size4.size11 {
  font-size: 3.11em;
}
.katex .sizing.reset-size5.size1,
.katex .fontsize-ensurer.reset-size5.size1 {
  font-size: 0.55555556em;
}
.katex .sizing.reset-size5.size2,
.katex .fontsize-ensurer.reset-size5.size2 {
  font-size: 0.66666667em;
}
.katex .sizing.reset-size5.size3,
.katex .fontsize-ensurer.reset-size5.size3 {
  font-size: 0.77777778em;
}
.katex .sizing.reset-size5.size4,
.katex .fontsize-ensurer.reset-size5.size4 {
  font-size: 0.88888889em;
}
.katex .sizing.reset-size5.size5,
.katex .fontsize-ensurer.reset-size5.size5 {
  font-size: 1em;
}
.katex .sizing.reset-size5.size6,
.katex .fontsize-ensurer.reset-size5.size6 {
  font-size: 1.11111111em;
}
.katex .sizing.reset-size5.size7,
.katex .fontsize-ensurer.reset-size5.size7 {
  font-size: 1.33333333em;
}
.katex .sizing.reset-size5.size8,
.katex .fontsize-ensurer.reset-size5.size8 {
  font-size: 1.6em;
}
.katex .sizing.reset-size5.size9,
.katex .fontsize-ensurer.reset-size5.size9 {
  font-size: 1.92em;
}
.katex .sizing.reset-size5.size10,
.katex .fontsize-ensurer.reset-size5.size10 {
  font-size: 2.30444444em;
}
.katex .sizing.reset-size5.size11,
.katex .fontsize-ensurer.reset-size5.size11 {
  font-size: 2.76444444em;
}
.katex .sizing.reset-size6.size1,
.katex .fontsize-ensurer.reset-size6.size1 {
  font-size: 0.5em;
}
.katex .sizing.reset-size6.size2,
.katex .fontsize-ensurer.reset-size6.size2 {
  font-size: 0.6em;
}
.katex .sizing.reset-size6.size3,
.katex .fontsize-ensurer.reset-size6.size3 {
  font-size: 0.7em;
}
.katex .sizing.reset-size6.size4,
.katex .fontsize-ensurer.reset-size6.size4 {
  font-size: 0.8em;
}
.katex .sizing.reset-size6.size5,
.katex .fontsize-ensurer.reset-size6.size5 {
  font-size: 0.9em;
}
.katex .sizing.reset-size6.size6,
.katex .fontsize-ensurer.reset-size6.size6 {
  font-size: 1em;
}
.katex .sizing.reset-size6.size7,
.katex .fontsize-ensurer.reset-size6.size7 {
  font-size: 1.2em;
}
.katex .sizing.reset-size6.size8,
.katex .fontsize-ensurer.reset-size6.size8 {
  font-size: 1.44em;
}
.katex .sizing.reset-size6.size9,
.katex .fontsize-ensurer.reset-size6.size9 {
  font-size: 1.728em;
}
.katex .sizing.reset-size6.size10,
.katex .fontsize-ensurer.reset-size6.size10 {
  font-size: 2.074em;
}
.katex .sizing.reset-size6.size11,
.katex .fontsize-ensurer.reset-size6.size11 {
  font-size: 2.488em;
}
.katex .sizing.reset-size7.size1,
.katex .fontsize-ensurer.reset-size7.size1 {
  font-size: 0.41666667em;
}
.katex .sizing.reset-size7.size2,
.katex .fontsize-ensurer.reset-size7.size2 {
  font-size: 0.5em;
}
.katex .sizing.reset-size7.size3,
.katex .fontsize-ensurer.reset-size7.size3 {
  font-size: 0.58333333em;
}
.katex .sizing.reset-size7.size4,
.katex .fontsize-ensurer.reset-size7.size4 {
  font-size: 0.66666667em;
}
.katex .sizing.reset-size7.size5,
.katex .fontsize-ensurer.reset-size7.size5 {
  font-size: 0.75em;
}
.katex .sizing.reset-size7.size6,
.katex .fontsize-ensurer.reset-size7.size6 {
  font-size: 0.83333333em;
}
.katex .sizing.reset-size7.size7,
.katex .fontsize-ensurer.reset-size7.size7 {
  font-size: 1em;
}
.katex .sizing.reset-size7.size8,
.katex .fontsize-ensurer.reset-size7.size8 {
  font-size: 1.2em;
}
.katex .sizing.reset-size7.size9,
.katex .fontsize-ensurer.reset-size7.size9 {
  font-size: 1.44em;
}
.katex .sizing.reset-size7.size10,
.katex .fontsize-ensurer.reset-size7.size10 {
  font-size: 1.72833333em;
}
.katex .sizing.reset-size7.size11,
.katex .fontsize-ensurer.reset-size7.size11 {
  font-size: 2.07333333em;
}
.katex .sizing.reset-size8.size1,
.katex .fontsize-ensurer.reset-size8.size1 {
  font-size: 0.34722222em;
}
.katex .sizing.reset-size8.size2,
.katex .fontsize-ensurer.reset-size8.size2 {
  font-size: 0.41666667em;
}
.katex .sizing.reset-size8.size3,
.katex .fontsize-ensurer.reset-size8.size3 {
  font-size: 0.48611111em;
}
.katex .sizing.reset-size8.size4,
.katex .fontsize-ensurer.reset-size8.size4 {
  font-size: 0.55555556em;
}
.katex .sizing.reset-size8.size5,
.katex .fontsize-ensurer.reset-size8.size5 {
  font-size: 0.625em;
}
.katex .sizing.reset-size8.size6,
.katex .fontsize-ensurer.reset-size8.size6 {
  font-size: 0.69444444em;
}
.katex .sizing.reset-size8.size7,
.katex .fontsize-ensurer.reset-size8.size7 {
  font-size: 0.83333333em;
}
.katex .sizing.reset-size8.size8,
.katex .fontsize-ensurer.reset-size8.size8 {
  font-size: 1em;
}
.katex .sizing.reset-size8.size9,
.katex .fontsize-ensurer.reset-size8.size9 {
  font-size: 1.2em;
}
.katex .sizing.reset-size8.size10,
.katex .fontsize-ensurer.reset-size8.size10 {
  font-size: 1.44027778em;
}
.katex .sizing.reset-size8.size11,
.katex .fontsize-ensurer.reset-size8.size11 {
  font-size: 1.72777778em;
}
.katex .sizing.reset-size9.size1,
.katex .fontsize-ensurer.reset-size9.size1 {
  font-size: 0.28935185em;
}
.katex .sizing.reset-size9.size2,
.katex .fontsize-ensurer.reset-size9.size2 {
  font-size: 0.34722222em;
}
.katex .sizing.reset-size9.size3,
.katex .fontsize-ensurer.reset-size9.size3 {
  font-size: 0.40509259em;
}
.katex .sizing.reset-size9.size4,
.katex .fontsize-ensurer.reset-size9.size4 {
  font-size: 0.46296296em;
}
.katex .sizing.reset-size9.size5,
.katex .fontsize-ensurer.reset-size9.size5 {
  font-size: 0.52083333em;
}
.katex .sizing.reset-size9.size6,
.katex .fontsize-ensurer.reset-size9.size6 {
  font-size: 0.5787037em;
}
.katex .sizing.reset-size9.size7,
.katex .fontsize-ensurer.reset-size9.size7 {
  font-size: 0.69444444em;
}
.katex .sizing.reset-size9.size8,
.katex .fontsize-ensurer.reset-size9.size8 {
  font-size: 0.83333333em;
}
.katex .sizing.reset-size9.size9,
.katex .fontsize-ensurer.reset-size9.size9 {
  font-size: 1em;
}
.katex .sizing.reset-size9.size10,
.katex .fontsize-ensurer.reset-size9.size10 {
  font-size: 1.20023148em;
}
.katex .sizing.reset-size9.size11,
.katex .fontsize-ensurer.reset-size9.size11 {
  font-size: 1.43981481em;
}
.katex .sizing.reset-size10.size1,
.katex .fontsize-ensurer.reset-size10.size1 {
  font-size: 0.24108004em;
}
.katex .sizing.reset-size10.size2,
.katex .fontsize-ensurer.reset-size10.size2 {
  font-size: 0.28929605em;
}
.katex .sizing.reset-size10.size3,
.katex .fontsize-ensurer.reset-size10.size3 {
  font-size: 0.33751205em;
}
.katex .sizing.reset-size10.size4,
.katex .fontsize-ensurer.reset-size10.size4 {
  font-size: 0.38572806em;
}
.katex .sizing.reset-size10.size5,
.katex .fontsize-ensurer.reset-size10.size5 {
  font-size: 0.43394407em;
}
.katex .sizing.reset-size10.size6,
.katex .fontsize-ensurer.reset-size10.size6 {
  font-size: 0.48216008em;
}
.katex .sizing.reset-size10.size7,
.katex .fontsize-ensurer.reset-size10.size7 {
  font-size: 0.57859209em;
}
.katex .sizing.reset-size10.size8,
.katex .fontsize-ensurer.reset-size10.size8 {
  font-size: 0.69431051em;
}
.katex .sizing.reset-size10.size9,
.katex .fontsize-ensurer.reset-size10.size9 {
  font-size: 0.83317261em;
}
.katex .sizing.reset-size10.size10,
.katex .fontsize-ensurer.reset-size10.size10 {
  font-size: 1em;
}
.katex .sizing.reset-size10.size11,
.katex .fontsize-ensurer.reset-size10.size11 {
  font-size: 1.19961427em;
}
.katex .sizing.reset-size11.size1,
.katex .fontsize-ensurer.reset-size11.size1 {
  font-size: 0.20096463em;
}
.katex .sizing.reset-size11.size2,
.katex .fontsize-ensurer.reset-size11.size2 {
  font-size: 0.24115756em;
}
.katex .sizing.reset-size11.size3,
.katex .fontsize-ensurer.reset-size11.size3 {
  font-size: 0.28135048em;
}
.katex .sizing.reset-size11.size4,
.katex .fontsize-ensurer.reset-size11.size4 {
  font-size: 0.32154341em;
}
.katex .sizing.reset-size11.size5,
.katex .fontsize-ensurer.reset-size11.size5 {
  font-size: 0.36173633em;
}
.katex .sizing.reset-size11.size6,
.katex .fontsize-ensurer.reset-size11.size6 {
  font-size: 0.40192926em;
}
.katex .sizing.reset-size11.size7,
.katex .fontsize-ensurer.reset-size11.size7 {
  font-size: 0.48231511em;
}
.katex .sizing.reset-size11.size8,
.katex .fontsize-ensurer.reset-size11.size8 {
  font-size: 0.57877814em;
}
.katex .sizing.reset-size11.size9,
.katex .fontsize-ensurer.reset-size11.size9 {
  font-size: 0.69453376em;
}
.katex .sizing.reset-size11.size10,
.katex .fontsize-ensurer.reset-size11.size10 {
  font-size: 0.83360129em;
}
.katex .sizing.reset-size11.size11,
.katex .fontsize-ensurer.reset-size11.size11 {
  font-size: 1em;
}
.katex .delimsizing.size1 {
  font-family: KaTeX_Size1;
}
.katex .delimsizing.size2 {
  font-family: KaTeX_Size2;
}
.katex .delimsizing.size3 {
  font-family: KaTeX_Size3;
}
.katex .delimsizing.size4 {
  font-family: KaTeX_Size4;
}
.katex .delimsizing.mult .delim-size1 > .katex-span {
  font-family: KaTeX_Size1;
}
.katex .delimsizing.mult .delim-size4 > .katex-span {
  font-family: KaTeX_Size4;
}
.katex .nulldelimiter {
  display: inline-block;
  width: 0.12em;
}
.katex .delimcenter {
  position: relative;
}
.katex .op-symbol {
  position: relative;
}
.katex .op-symbol.small-op {
  font-family: KaTeX_Size1;
}
.katex .op-symbol.large-op {
  font-family: KaTeX_Size2;
}
.katex .op-limits > .vlist-t {
  text-align: center;
}
.katex .accent > .vlist-t {
  text-align: center;
}
.katex .accent .accent-body {
  position: relative;
}
.katex .accent .accent-body:not(.accent-full) {
  width: 0;
}
.katex .overlay {
  display: block;
}
.katex .mtable .vertical-separator {
  display: inline-block;
  min-width: 1px;
}
.katex .mtable .arraycolsep {
  display: inline-block;
}
.katex .mtable .col-align-c > .vlist-t {
  text-align: center;
}
.katex .mtable .col-align-l > .vlist-t {
  text-align: left;
}
.katex .mtable .col-align-r > .vlist-t {
  text-align: right;
}
.katex .svg-align {
  text-align: left;
}
.katex .katex-svg {
  display: block;
  position: absolute;
  width: 100%;
  height: inherit;
  fill: currentColor;
  stroke: currentColor;
  fill-rule: nonzero;
  fill-opacity: 1;
  stroke-width: 1;
  stroke-linecap: butt;
  stroke-linejoin: miter;
  stroke-miterlimit: 4;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  stroke-opacity: 1;
}
.katex .katex-svg path {
  stroke: none;
}
.katex img {
  border-style: none;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
}
.katex .stretchy {
  width: 100%;
  display: block;
  position: relative;
  overflow: hidden;
}
.katex .stretchy::before,
.katex .stretchy::after {
  content: "";
}
.katex .hide-tail {
  width: 100%;
  position: relative;
  overflow: hidden;
}
.katex .halfarrow-left {
  position: absolute;
  left: 0;
  width: 50.2%;
  overflow: hidden;
}
.katex .halfarrow-right {
  position: absolute;
  right: 0;
  width: 50.2%;
  overflow: hidden;
}
.katex .brace-left {
  position: absolute;
  left: 0;
  width: 25.1%;
  overflow: hidden;
}
.katex .brace-center {
  position: absolute;
  left: 25%;
  width: 50%;
  overflow: hidden;
}
.katex .brace-right {
  position: absolute;
  right: 0;
  width: 25.1%;
  overflow: hidden;
}
.katex .x-arrow-pad {
  padding: 0 0.5em;
}
.katex .cd-arrow-pad {
  padding: 0 0.55556em 0 0.27778em;
}
.katex .x-arrow,
.katex .mover,
.katex .munder {
  text-align: center;
}
.katex .boxpad {
  padding: 0 0.3em;
}
.katex .fbox,
.katex .fcolorbox {
  box-sizing: border-box;
  border: 0.04em solid;
}
.katex .cancel-pad {
  padding: 0 0.2em;
}
.katex .cancel-lap {
  margin-left: -0.2em;
  margin-right: -0.2em;
}
.katex .sout {
  border-bottom-style: solid;
  border-bottom-width: 0.08em;
}
.katex .angl {
  box-sizing: border-box;
  border-top: 0.049em solid;
  border-right: 0.049em solid;
  margin-right: 0.03889em;
}
.katex .anglpad {
  padding: 0 0.03889em;
}
.katex .eqn-num::before {
  counter-increment: katexEqnNo;
  content: "(" counter(katexEqnNo) ")";
}
.katex .mml-eqn-num::before {
  counter-increment: mmlEqnNo;
  content: "(" counter(mmlEqnNo) ")";
}
.katex .mtr-glue {
  width: 50%;
}
.katex .cd-vert-arrow {
  display: inline-block;
  position: relative;
}
.katex .cd-label-left {
  display: inline-block;
  position: absolute;
  right: calc(50% + 0.3em);
  text-align: left;
}
.katex .cd-label-right {
  display: inline-block;
  position: absolute;
  left: calc(50% + 0.3em);
  text-align: right;
}
.katex-display {
  display: block;
  margin: 1em 0;
  text-align: center;
}
.katex-display > .katex {
  display: block;
  text-align: center;
  white-space: nowrap;
}
.katex-display > .katex > .katex-html {
  display: block;
  position: relative;
}
.katex-display > .katex > .katex-html > .tag {
  position: absolute;
  right: 0;
}
.katex-display.leqno > .katex > .katex-html > .tag {
  left: 0;
  right: auto;
}
.katex-display.fleqn > .katex {
  text-align: left;
  padding-left: 2em;
}
node_modules/mp-html/plugins/latex/katex.min.js
New file
@@ -0,0 +1 @@
function t(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createClass=void 0;var i=a(r(1));r(2);var o=/([A-Z])/g,s={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},l=/[&><"']/g;function h(e){return String(e).replace(l,(function(e){return s[e]}))}var c=function(e){return"data:image/svg+xml,"+encodeURIComponent(e.replace(/\s+/g," "))};t.createClass=function(e){var t;return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(" "))&&void 0!==t?t:""};var m=function(e,r){return e.map((function(e){var n,a=r;(null===(n=null==e?void 0:e.style)||void 0===n?void 0:n.color)&&(a=e.style.color);var s=void 0;e instanceof i.default.__domTree.Span&&(s="span"),e instanceof i.default.__domTree.Anchor&&(s="anchor"),e instanceof i.default.__domTree.LineNode&&(s="line"),e instanceof i.default.__domTree.PathNode&&(s="path"),e instanceof i.default.__domTree.SvgNode&&(s="svg",a&&(e.attributes.fill=a)),e instanceof i.default.__domTree.SymbolNode&&(s="text");var l=e.children&&e.children.length>0?m(e.children,a):[];return s?function(e,r,n){var a=!1;r.classes&&r.classes.length>0&&(a=!0);var i,s=h((0,t.createClass)(r.classes)),l="";for(var m in"text"===e&&r.italic>0&&(l+="margin-right:"+r.italic+"em;"),r.style)r.style.hasOwnProperty(m)&&(l+="".concat((i=m,i.replace(o,"-$1").toLowerCase()),":").concat(r.style[m],";"));l&&(a=!0);var u={};for(var p in r.attributes)r.attributes.hasOwnProperty(p)&&(u[p]=h(r.attributes[p]));if("span"===e)return{name:"span",attrs:{class:s+" katex-span",style:l},children:n};if("text"===e){var d=h(r.text);return a?{name:"span",attrs:{class:s,style:l},children:[{type:"text",text:d}]}:{type:"text",text:d}}if("svg"===e){var f=r.toMarkup();return{name:"img",attrs:{src:c(f),class:"katex-svg"}}}return null}(s,e,l):l})).reduce((function(e,t){return Array.isArray(t)?e.push.apply(e,t):e.push(t),e}),[]).filter((function(e){return!!e}))};t.default=function(e,t){void 0===t&&(t={});try{var r=i.default.__renderToDomTree(e,n(n({},t),{output:"html"}));return m([r])}catch(e){return[{name:"span",attrs:{style:"color:red;"},children:[{type:"text",text:e.message}]}]}}},function(e,t,r){var n;"undefined"!=typeof self&&self,n=function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return Fn}});var r=function e(t,r){this.position=void 0;var n,a="KaTeX parse error: "+t,i=r&&r.loc;if(i&&i.start<=i.end){var o=i.lexer.input;n=i.start;var s=i.end;n===o.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var l=o.slice(n,s).replace(/[^]/g,"$&̲");a+=(n>15?"…"+o.slice(n-15,n):o.slice(0,n))+l+(s+15<o.length?o.slice(s,s+15)+"…":o.slice(s))}var h=new Error(a);return h.name="ParseError",h.__proto__=e.prototype,h.position=n,h};r.prototype.__proto__=Error.prototype;var n=r,a=/([A-Z])/g,i={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},o=/[&><"']/g,s=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},l={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(o,(function(e){return i[e]}))},hyphenate:function(e){return e.replace(a,"-$1").toLowerCase()},getBaseElem:s,isCharacterBox:function(e){var t=s(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(e);return null!=t?t[1]:"_relative"}},h={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:function(e){return"#"+e}},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:function(e,t){return t.push(e),t}},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:function(e){return Math.max(0,e)},cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:function(e){return Math.max(0,e)},cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:function(e){return Math.max(0,e)},cli:"-e, --max-expand <n>",cliProcessor:function(e){return"Infinity"===e?1/0:parseInt(e)}},globalGroup:{type:"boolean",cli:!1}};function c(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var m=function(){function e(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},h)if(h.hasOwnProperty(t)){var r=h[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:c(r)}}var t=e.prototype;return t.reportNonstrict=function(e,t,r){var a=this.strict;if("function"==typeof a&&(a=a(e,t,r)),a&&"ignore"!==a){if(!0===a||"error"===a)throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===a?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]")}},t.useStrictBehavior=function(e,t,r){var n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch(e){n="error"}return!(!n||"ignore"===n||!0!==n&&"error"!==n&&("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),1)))},t.isTrusted=function(e){e.url&&!e.protocol&&(e.protocol=l.protocolFromUrl(e.url));var t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)},e}(),u=function(){function e(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}var t=e.prototype;return t.sup=function(){return p[d[this.id]]},t.sub=function(){return p[f[this.id]]},t.fracNum=function(){return p[g[this.id]]},t.fracDen=function(){return p[v[this.id]]},t.cramp=function(){return p[y[this.id]]},t.text=function(){return p[b[this.id]]},t.isTight=function(){return this.size>=2},e}(),p=[new u(0,0,!1),new u(1,0,!0),new u(2,1,!1),new u(3,1,!0),new u(4,2,!1),new u(5,2,!0),new u(6,3,!1),new u(7,3,!0)],d=[4,5,4,5,6,7,6,7],f=[5,5,5,5,7,7,7,7],g=[2,3,4,5,6,7,6,7],v=[3,3,5,5,7,7,7,7],y=[1,1,3,3,5,5,7,7],b=[0,1,2,3,2,3,2,3],x={DISPLAY:p[0],TEXT:p[2],SCRIPT:p[4],SCRIPTSCRIPT:p[6]},w=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],k=[];function S(e){for(var t=0;t<k.length;t+=2)if(e>=k[t]&&e<=k[t+1])return!0;return!1}w.forEach((function(e){return e.blocks.forEach((function(e){return k.push.apply(k,e)}))}));var M={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},z=function(){function e(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e},t.toMarkup=function(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e},t.toText=function(){var e=function(e){return e.toText()};return this.children.map(e).join("")},e}(),A={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},T={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},B={"Å":"A","Ð":"D","Þ":"o","Ã¥":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Ð¥":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function C(e,t,r){if(!A[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),a=A[t][n];if(!a&&e[0]in B&&(n=B[e[0]].charCodeAt(0),a=A[t][n]),a||"text"!==r||S(n)&&(a=A[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var N={},q=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],I=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],O=function(e,t){return t.size<2?e:q[e-1][t.size-1]},R=function(){function e(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=I[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}var t=e.prototype;return t.extend=function(t){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return new e(r)},t.havingStyle=function(e){return this.style===e?this:this.extend({style:e,size:O(this.textSize,e)})},t.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},t.havingSize=function(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:I[e-1]})},t.havingBaseStyle=function(t){t=t||this.style.text();var r=O(e.BASESIZE,t);return this.size===r&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})},t.havingBaseSizing=function(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})},t.withColor=function(e){return this.extend({color:e})},t.withPhantom=function(){return this.extend({phantom:!0})},t.withFont=function(e){return this.extend({font:e})},t.withTextFontFamily=function(e){return this.extend({fontFamily:e,font:""})},t.withTextFontWeight=function(e){return this.extend({fontWeight:e,font:""})},t.withTextFontShape=function(e){return this.extend({fontShape:e,font:""})},t.sizingClasses=function(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]},t.baseSizingClasses=function(){return this.size!==e.BASESIZE?["sizing","reset-size"+this.size,"size"+e.BASESIZE]:[]},t.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!N[t=e>=5?0:e>=3?1:2]){var r=N[t]={cssEmPerMu:T.quad[t]/18};for(var n in T)T.hasOwnProperty(n)&&(r[n]=T[n][t])}return N[t]}(this.size)),this._fontMetrics},t.getColor=function(){return this.phantom?"transparent":this.color},e}();R.BASESIZE=6;var H=R,E={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},L={ex:!0,em:!0,mu:!0},D=function(e){return"string"!=typeof e&&(e=e.unit),e in E||e in L||"ex"===e},P=function(e,t){var r;if(e.unit in E)r=E[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var a;if(a=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=a.fontMetrics().xHeight;else{if("em"!==e.unit)throw new n("Invalid unit: '"+e.unit+"'");r=a.fontMetrics().quad}a!==t&&(r*=a.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},F=function(e){return+e.toFixed(4)+"em"},V=function(e){return e.filter((function(e){return e})).join(" ")},G=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},U=function(e){var t=document.createElement(e);for(var r in t.className=V(this.classes),this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var a=0;a<this.children.length;a++)t.appendChild(this.children[a].toNode());return t},_=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+l.escape(V(this.classes))+'"');var r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=l.hyphenate(n)+":"+this.style[n]+";");for(var a in r&&(t+=' style="'+l.escape(r)+'"'),this.attributes)this.attributes.hasOwnProperty(a)&&(t+=" "+a+'="'+l.escape(this.attributes[a])+'"');t+=">";for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+="</"+e+">"},Y=function(){function e(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,G.call(this,e,r,n),this.children=t||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){return U.call(this,"span")},t.toMarkup=function(){return _.call(this,"span")},e}(),X=function(){function e(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,G.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){return U.call(this,"a")},t.toMarkup=function(){return _.call(this,"a")},e}(),W=function(){function e(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e},t.toMarkup=function(){var e="<img  src='"+this.src+" 'alt='"+this.alt+"' ",t="";for(var r in this.style)this.style.hasOwnProperty(r)&&(t+=l.hyphenate(r)+":"+this.style[r]+";");return t&&(e+=' style="'+l.escape(t)+'"'),e+="'/>"},e}(),j={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},$=function(){function e(e,t,r,n,a,i,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=n||0,this.skew=a||0,this.width=i||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<w.length;t++)for(var r=w[t],n=0;n<r.blocks.length;n++){var a=r.blocks[n];if(e>=a[0]&&e<=a[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=j[this.text])}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){var e=document.createTextNode(this.text),t=null;for(var r in this.italic>0&&((t=document.createElement("span")).style.marginRight=F(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=V(this.classes)),this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e},t.toMarkup=function(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=l.escape(V(this.classes)),t+='"');var r="";for(var n in this.italic>0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(r+=l.hyphenate(n)+":"+this.style[n]+";");r&&(e=!0,t+=' style="'+l.escape(r)+'"');var a=l.escape(this.text);return e?(t+=">",t+=a,t+="</span>"):a},e}(),Z=function(){function e(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e},t.toMarkup=function(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>"},e}(),K=function(){function e(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",M[this.pathName]),e},t.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+M[this.pathName]+"'/>"},e}(),J=function(){function e(e){this.attributes=void 0,this.attributes=e||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e},t.toMarkup=function(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");return e+="/>"},e}();function Q(e){if(e instanceof $)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var ee={bin:1,close:1,inner:1,open:1,punct:1,rel:1},te={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},re={math:{},text:{}},ne=re;function ae(e,t,r,n,a,i){re[e][a]={font:t,group:r,replace:n},i&&n&&(re[e][n]=re[e][a])}var ie="math",oe="main",se="ams",le="accent-token",he="bin",ce="mathord",me="op-token",ue="rel",pe="textord";ae(ie,oe,ue,"≡","\\equiv",!0),ae(ie,oe,ue,"≺","\\prec",!0),ae(ie,oe,ue,"≻","\\succ",!0),ae(ie,oe,ue,"∼","\\sim",!0),ae(ie,oe,ue,"⊥","\\perp"),ae(ie,oe,ue,"⪯","\\preceq",!0),ae(ie,oe,ue,"⪰","\\succeq",!0),ae(ie,oe,ue,"≃","\\simeq",!0),ae(ie,oe,ue,"∣","\\mid",!0),ae(ie,oe,ue,"≪","\\ll",!0),ae(ie,oe,ue,"≫","\\gg",!0),ae(ie,oe,ue,"≍","\\asymp",!0),ae(ie,oe,ue,"∥","\\parallel"),ae(ie,oe,ue,"⋈","\\bowtie",!0),ae(ie,oe,ue,"⌣","\\smile",!0),ae(ie,oe,ue,"⊑","\\sqsubseteq",!0),ae(ie,oe,ue,"⊒","\\sqsupseteq",!0),ae(ie,oe,ue,"≐","\\doteq",!0),ae(ie,oe,ue,"⌢","\\frown",!0),ae(ie,oe,ue,"∋","\\ni",!0),ae(ie,oe,ue,"∝","\\propto",!0),ae(ie,oe,ue,"⊢","\\vdash",!0),ae(ie,oe,ue,"⊣","\\dashv",!0),ae(ie,oe,ue,"∋","\\owns"),ae(ie,oe,"punct",".","\\ldotp"),ae(ie,oe,"punct","⋅","\\cdotp"),ae(ie,oe,pe,"#","\\#"),ae("text",oe,pe,"#","\\#"),ae(ie,oe,pe,"&","\\&"),ae("text",oe,pe,"&","\\&"),ae(ie,oe,pe,"ℵ","\\aleph",!0),ae(ie,oe,pe,"∀","\\forall",!0),ae(ie,oe,pe,"ℏ","\\hbar",!0),ae(ie,oe,pe,"∃","\\exists",!0),ae(ie,oe,pe,"∇","\\nabla",!0),ae(ie,oe,pe,"♭","\\flat",!0),ae(ie,oe,pe,"ℓ","\\ell",!0),ae(ie,oe,pe,"♮","\\natural",!0),ae(ie,oe,pe,"♣","\\clubsuit",!0),ae(ie,oe,pe,"℘","\\wp",!0),ae(ie,oe,pe,"♯","\\sharp",!0),ae(ie,oe,pe,"♢","\\diamondsuit",!0),ae(ie,oe,pe,"ℜ","\\Re",!0),ae(ie,oe,pe,"♡","\\heartsuit",!0),ae(ie,oe,pe,"ℑ","\\Im",!0),ae(ie,oe,pe,"♠","\\spadesuit",!0),ae(ie,oe,pe,"§","\\S",!0),ae("text",oe,pe,"§","\\S"),ae(ie,oe,pe,"¶","\\P",!0),ae("text",oe,pe,"¶","\\P"),ae(ie,oe,pe,"†","\\dag"),ae("text",oe,pe,"†","\\dag"),ae("text",oe,pe,"†","\\textdagger"),ae(ie,oe,pe,"‡","\\ddag"),ae("text",oe,pe,"‡","\\ddag"),ae("text",oe,pe,"‡","\\textdaggerdbl"),ae(ie,oe,"close","⎱","\\rmoustache",!0),ae(ie,oe,"open","⎰","\\lmoustache",!0),ae(ie,oe,"close","⟯","\\rgroup",!0),ae(ie,oe,"open","⟮","\\lgroup",!0),ae(ie,oe,he,"∓","\\mp",!0),ae(ie,oe,he,"⊖","\\ominus",!0),ae(ie,oe,he,"⊎","\\uplus",!0),ae(ie,oe,he,"⊓","\\sqcap",!0),ae(ie,oe,he,"∗","\\ast"),ae(ie,oe,he,"⊔","\\sqcup",!0),ae(ie,oe,he,"◯","\\bigcirc",!0),ae(ie,oe,he,"∙","\\bullet",!0),ae(ie,oe,he,"‡","\\ddagger"),ae(ie,oe,he,"≀","\\wr",!0),ae(ie,oe,he,"⨿","\\amalg"),ae(ie,oe,he,"&","\\And"),ae(ie,oe,ue,"⟵","\\longleftarrow",!0),ae(ie,oe,ue,"⇐","\\Leftarrow",!0),ae(ie,oe,ue,"⟸","\\Longleftarrow",!0),ae(ie,oe,ue,"⟶","\\longrightarrow",!0),ae(ie,oe,ue,"⇒","\\Rightarrow",!0),ae(ie,oe,ue,"⟹","\\Longrightarrow",!0),ae(ie,oe,ue,"↔","\\leftrightarrow",!0),ae(ie,oe,ue,"⟷","\\longleftrightarrow",!0),ae(ie,oe,ue,"⇔","\\Leftrightarrow",!0),ae(ie,oe,ue,"⟺","\\Longleftrightarrow",!0),ae(ie,oe,ue,"↦","\\mapsto",!0),ae(ie,oe,ue,"⟼","\\longmapsto",!0),ae(ie,oe,ue,"↗","\\nearrow",!0),ae(ie,oe,ue,"↩","\\hookleftarrow",!0),ae(ie,oe,ue,"↪","\\hookrightarrow",!0),ae(ie,oe,ue,"↘","\\searrow",!0),ae(ie,oe,ue,"↼","\\leftharpoonup",!0),ae(ie,oe,ue,"⇀","\\rightharpoonup",!0),ae(ie,oe,ue,"↙","\\swarrow",!0),ae(ie,oe,ue,"↽","\\leftharpoondown",!0),ae(ie,oe,ue,"⇁","\\rightharpoondown",!0),ae(ie,oe,ue,"↖","\\nwarrow",!0),ae(ie,oe,ue,"⇌","\\rightleftharpoons",!0),ae(ie,se,ue,"≮","\\nless",!0),ae(ie,se,ue,"","\\@nleqslant"),ae(ie,se,ue,"","\\@nleqq"),ae(ie,se,ue,"⪇","\\lneq",!0),ae(ie,se,ue,"≨","\\lneqq",!0),ae(ie,se,ue,"","\\@lvertneqq"),ae(ie,se,ue,"⋦","\\lnsim",!0),ae(ie,se,ue,"⪉","\\lnapprox",!0),ae(ie,se,ue,"⊀","\\nprec",!0),ae(ie,se,ue,"⋠","\\npreceq",!0),ae(ie,se,ue,"⋨","\\precnsim",!0),ae(ie,se,ue,"⪹","\\precnapprox",!0),ae(ie,se,ue,"≁","\\nsim",!0),ae(ie,se,ue,"","\\@nshortmid"),ae(ie,se,ue,"∤","\\nmid",!0),ae(ie,se,ue,"⊬","\\nvdash",!0),ae(ie,se,ue,"⊭","\\nvDash",!0),ae(ie,se,ue,"⋪","\\ntriangleleft"),ae(ie,se,ue,"⋬","\\ntrianglelefteq",!0),ae(ie,se,ue,"⊊","\\subsetneq",!0),ae(ie,se,ue,"","\\@varsubsetneq"),ae(ie,se,ue,"⫋","\\subsetneqq",!0),ae(ie,se,ue,"","\\@varsubsetneqq"),ae(ie,se,ue,"≯","\\ngtr",!0),ae(ie,se,ue,"","\\@ngeqslant"),ae(ie,se,ue,"","\\@ngeqq"),ae(ie,se,ue,"⪈","\\gneq",!0),ae(ie,se,ue,"≩","\\gneqq",!0),ae(ie,se,ue,"","\\@gvertneqq"),ae(ie,se,ue,"⋧","\\gnsim",!0),ae(ie,se,ue,"⪊","\\gnapprox",!0),ae(ie,se,ue,"⊁","\\nsucc",!0),ae(ie,se,ue,"⋡","\\nsucceq",!0),ae(ie,se,ue,"⋩","\\succnsim",!0),ae(ie,se,ue,"⪺","\\succnapprox",!0),ae(ie,se,ue,"≆","\\ncong",!0),ae(ie,se,ue,"","\\@nshortparallel"),ae(ie,se,ue,"∦","\\nparallel",!0),ae(ie,se,ue,"⊯","\\nVDash",!0),ae(ie,se,ue,"⋫","\\ntriangleright"),ae(ie,se,ue,"⋭","\\ntrianglerighteq",!0),ae(ie,se,ue,"","\\@nsupseteqq"),ae(ie,se,ue,"⊋","\\supsetneq",!0),ae(ie,se,ue,"","\\@varsupsetneq"),ae(ie,se,ue,"⫌","\\supsetneqq",!0),ae(ie,se,ue,"","\\@varsupsetneqq"),ae(ie,se,ue,"⊮","\\nVdash",!0),ae(ie,se,ue,"⪵","\\precneqq",!0),ae(ie,se,ue,"⪶","\\succneqq",!0),ae(ie,se,ue,"","\\@nsubseteqq"),ae(ie,se,he,"⊴","\\unlhd"),ae(ie,se,he,"⊵","\\unrhd"),ae(ie,se,ue,"↚","\\nleftarrow",!0),ae(ie,se,ue,"↛","\\nrightarrow",!0),ae(ie,se,ue,"⇍","\\nLeftarrow",!0),ae(ie,se,ue,"⇏","\\nRightarrow",!0),ae(ie,se,ue,"↮","\\nleftrightarrow",!0),ae(ie,se,ue,"⇎","\\nLeftrightarrow",!0),ae(ie,se,ue,"△","\\vartriangle"),ae(ie,se,pe,"ℏ","\\hslash"),ae(ie,se,pe,"▽","\\triangledown"),ae(ie,se,pe,"◊","\\lozenge"),ae(ie,se,pe,"Ⓢ","\\circledS"),ae(ie,se,pe,"®","\\circledR"),ae("text",se,pe,"®","\\circledR"),ae(ie,se,pe,"∡","\\measuredangle",!0),ae(ie,se,pe,"∄","\\nexists"),ae(ie,se,pe,"℧","\\mho"),ae(ie,se,pe,"Ⅎ","\\Finv",!0),ae(ie,se,pe,"⅁","\\Game",!0),ae(ie,se,pe,"‵","\\backprime"),ae(ie,se,pe,"▲","\\blacktriangle"),ae(ie,se,pe,"▼","\\blacktriangledown"),ae(ie,se,pe,"■","\\blacksquare"),ae(ie,se,pe,"â§«","\\blacklozenge"),ae(ie,se,pe,"★","\\bigstar"),ae(ie,se,pe,"∢","\\sphericalangle",!0),ae(ie,se,pe,"∁","\\complement",!0),ae(ie,se,pe,"ð","\\eth",!0),ae("text",oe,pe,"ð","ð"),ae(ie,se,pe,"╱","\\diagup"),ae(ie,se,pe,"╲","\\diagdown"),ae(ie,se,pe,"□","\\square"),ae(ie,se,pe,"□","\\Box"),ae(ie,se,pe,"◊","\\Diamond"),ae(ie,se,pe,"Â¥","\\yen",!0),ae("text",se,pe,"Â¥","\\yen",!0),ae(ie,se,pe,"✓","\\checkmark",!0),ae("text",se,pe,"✓","\\checkmark"),ae(ie,se,pe,"ℶ","\\beth",!0),ae(ie,se,pe,"ℸ","\\daleth",!0),ae(ie,se,pe,"ℷ","\\gimel",!0),ae(ie,se,pe,"ϝ","\\digamma",!0),ae(ie,se,pe,"ϰ","\\varkappa"),ae(ie,se,"open","┌","\\@ulcorner",!0),ae(ie,se,"close","┐","\\@urcorner",!0),ae(ie,se,"open","└","\\@llcorner",!0),ae(ie,se,"close","┘","\\@lrcorner",!0),ae(ie,se,ue,"≦","\\leqq",!0),ae(ie,se,ue,"⩽","\\leqslant",!0),ae(ie,se,ue,"⪕","\\eqslantless",!0),ae(ie,se,ue,"≲","\\lesssim",!0),ae(ie,se,ue,"⪅","\\lessapprox",!0),ae(ie,se,ue,"≊","\\approxeq",!0),ae(ie,se,he,"⋖","\\lessdot"),ae(ie,se,ue,"⋘","\\lll",!0),ae(ie,se,ue,"≶","\\lessgtr",!0),ae(ie,se,ue,"⋚","\\lesseqgtr",!0),ae(ie,se,ue,"⪋","\\lesseqqgtr",!0),ae(ie,se,ue,"≑","\\doteqdot"),ae(ie,se,ue,"≓","\\risingdotseq",!0),ae(ie,se,ue,"≒","\\fallingdotseq",!0),ae(ie,se,ue,"∽","\\backsim",!0),ae(ie,se,ue,"⋍","\\backsimeq",!0),ae(ie,se,ue,"⫅","\\subseteqq",!0),ae(ie,se,ue,"⋐","\\Subset",!0),ae(ie,se,ue,"⊏","\\sqsubset",!0),ae(ie,se,ue,"≼","\\preccurlyeq",!0),ae(ie,se,ue,"⋞","\\curlyeqprec",!0),ae(ie,se,ue,"≾","\\precsim",!0),ae(ie,se,ue,"⪷","\\precapprox",!0),ae(ie,se,ue,"⊲","\\vartriangleleft"),ae(ie,se,ue,"⊴","\\trianglelefteq"),ae(ie,se,ue,"⊨","\\vDash",!0),ae(ie,se,ue,"⊪","\\Vvdash",!0),ae(ie,se,ue,"⌣","\\smallsmile"),ae(ie,se,ue,"⌢","\\smallfrown"),ae(ie,se,ue,"≏","\\bumpeq",!0),ae(ie,se,ue,"≎","\\Bumpeq",!0),ae(ie,se,ue,"≧","\\geqq",!0),ae(ie,se,ue,"⩾","\\geqslant",!0),ae(ie,se,ue,"⪖","\\eqslantgtr",!0),ae(ie,se,ue,"≳","\\gtrsim",!0),ae(ie,se,ue,"⪆","\\gtrapprox",!0),ae(ie,se,he,"⋗","\\gtrdot"),ae(ie,se,ue,"⋙","\\ggg",!0),ae(ie,se,ue,"≷","\\gtrless",!0),ae(ie,se,ue,"⋛","\\gtreqless",!0),ae(ie,se,ue,"⪌","\\gtreqqless",!0),ae(ie,se,ue,"≖","\\eqcirc",!0),ae(ie,se,ue,"≗","\\circeq",!0),ae(ie,se,ue,"≜","\\triangleq",!0),ae(ie,se,ue,"∼","\\thicksim"),ae(ie,se,ue,"≈","\\thickapprox"),ae(ie,se,ue,"⫆","\\supseteqq",!0),ae(ie,se,ue,"⋑","\\Supset",!0),ae(ie,se,ue,"⊐","\\sqsupset",!0),ae(ie,se,ue,"≽","\\succcurlyeq",!0),ae(ie,se,ue,"⋟","\\curlyeqsucc",!0),ae(ie,se,ue,"≿","\\succsim",!0),ae(ie,se,ue,"⪸","\\succapprox",!0),ae(ie,se,ue,"⊳","\\vartriangleright"),ae(ie,se,ue,"⊵","\\trianglerighteq"),ae(ie,se,ue,"⊩","\\Vdash",!0),ae(ie,se,ue,"∣","\\shortmid"),ae(ie,se,ue,"∥","\\shortparallel"),ae(ie,se,ue,"≬","\\between",!0),ae(ie,se,ue,"⋔","\\pitchfork",!0),ae(ie,se,ue,"∝","\\varpropto"),ae(ie,se,ue,"◀","\\blacktriangleleft"),ae(ie,se,ue,"∴","\\therefore",!0),ae(ie,se,ue,"∍","\\backepsilon"),ae(ie,se,ue,"▶","\\blacktriangleright"),ae(ie,se,ue,"∵","\\because",!0),ae(ie,se,ue,"⋘","\\llless"),ae(ie,se,ue,"⋙","\\gggtr"),ae(ie,se,he,"⊲","\\lhd"),ae(ie,se,he,"⊳","\\rhd"),ae(ie,se,ue,"≂","\\eqsim",!0),ae(ie,oe,ue,"⋈","\\Join"),ae(ie,se,ue,"≑","\\Doteq",!0),ae(ie,se,he,"∔","\\dotplus",!0),ae(ie,se,he,"∖","\\smallsetminus"),ae(ie,se,he,"⋒","\\Cap",!0),ae(ie,se,he,"⋓","\\Cup",!0),ae(ie,se,he,"⩞","\\doublebarwedge",!0),ae(ie,se,he,"⊟","\\boxminus",!0),ae(ie,se,he,"⊞","\\boxplus",!0),ae(ie,se,he,"⋇","\\divideontimes",!0),ae(ie,se,he,"⋉","\\ltimes",!0),ae(ie,se,he,"⋊","\\rtimes",!0),ae(ie,se,he,"⋋","\\leftthreetimes",!0),ae(ie,se,he,"⋌","\\rightthreetimes",!0),ae(ie,se,he,"⋏","\\curlywedge",!0),ae(ie,se,he,"⋎","\\curlyvee",!0),ae(ie,se,he,"⊝","\\circleddash",!0),ae(ie,se,he,"⊛","\\circledast",!0),ae(ie,se,he,"⋅","\\centerdot"),ae(ie,se,he,"⊺","\\intercal",!0),ae(ie,se,he,"⋒","\\doublecap"),ae(ie,se,he,"⋓","\\doublecup"),ae(ie,se,he,"⊠","\\boxtimes",!0),ae(ie,se,ue,"⇢","\\dashrightarrow",!0),ae(ie,se,ue,"⇠","\\dashleftarrow",!0),ae(ie,se,ue,"⇇","\\leftleftarrows",!0),ae(ie,se,ue,"⇆","\\leftrightarrows",!0),ae(ie,se,ue,"⇚","\\Lleftarrow",!0),ae(ie,se,ue,"↞","\\twoheadleftarrow",!0),ae(ie,se,ue,"↢","\\leftarrowtail",!0),ae(ie,se,ue,"↫","\\looparrowleft",!0),ae(ie,se,ue,"⇋","\\leftrightharpoons",!0),ae(ie,se,ue,"↶","\\curvearrowleft",!0),ae(ie,se,ue,"↺","\\circlearrowleft",!0),ae(ie,se,ue,"↰","\\Lsh",!0),ae(ie,se,ue,"⇈","\\upuparrows",!0),ae(ie,se,ue,"↿","\\upharpoonleft",!0),ae(ie,se,ue,"⇃","\\downharpoonleft",!0),ae(ie,oe,ue,"⊶","\\origof",!0),ae(ie,oe,ue,"⊷","\\imageof",!0),ae(ie,se,ue,"⊸","\\multimap",!0),ae(ie,se,ue,"↭","\\leftrightsquigarrow",!0),ae(ie,se,ue,"⇉","\\rightrightarrows",!0),ae(ie,se,ue,"⇄","\\rightleftarrows",!0),ae(ie,se,ue,"↠","\\twoheadrightarrow",!0),ae(ie,se,ue,"↣","\\rightarrowtail",!0),ae(ie,se,ue,"↬","\\looparrowright",!0),ae(ie,se,ue,"↷","\\curvearrowright",!0),ae(ie,se,ue,"↻","\\circlearrowright",!0),ae(ie,se,ue,"↱","\\Rsh",!0),ae(ie,se,ue,"⇊","\\downdownarrows",!0),ae(ie,se,ue,"↾","\\upharpoonright",!0),ae(ie,se,ue,"⇂","\\downharpoonright",!0),ae(ie,se,ue,"⇝","\\rightsquigarrow",!0),ae(ie,se,ue,"⇝","\\leadsto"),ae(ie,se,ue,"⇛","\\Rrightarrow",!0),ae(ie,se,ue,"↾","\\restriction"),ae(ie,oe,pe,"‘","`"),ae(ie,oe,pe,"$","\\$"),ae("text",oe,pe,"$","\\$"),ae("text",oe,pe,"$","\\textdollar"),ae(ie,oe,pe,"%","\\%"),ae("text",oe,pe,"%","\\%"),ae(ie,oe,pe,"_","\\_"),ae("text",oe,pe,"_","\\_"),ae("text",oe,pe,"_","\\textunderscore"),ae(ie,oe,pe,"∠","\\angle",!0),ae(ie,oe,pe,"∞","\\infty",!0),ae(ie,oe,pe,"′","\\prime"),ae(ie,oe,pe,"△","\\triangle"),ae(ie,oe,pe,"Γ","\\Gamma",!0),ae(ie,oe,pe,"Δ","\\Delta",!0),ae(ie,oe,pe,"Θ","\\Theta",!0),ae(ie,oe,pe,"Λ","\\Lambda",!0),ae(ie,oe,pe,"Ξ","\\Xi",!0),ae(ie,oe,pe,"Π","\\Pi",!0),ae(ie,oe,pe,"Σ","\\Sigma",!0),ae(ie,oe,pe,"Î¥","\\Upsilon",!0),ae(ie,oe,pe,"Φ","\\Phi",!0),ae(ie,oe,pe,"Ψ","\\Psi",!0),ae(ie,oe,pe,"Ω","\\Omega",!0),ae(ie,oe,pe,"A","Α"),ae(ie,oe,pe,"B","Β"),ae(ie,oe,pe,"E","Ε"),ae(ie,oe,pe,"Z","Ζ"),ae(ie,oe,pe,"H","Η"),ae(ie,oe,pe,"I","Ι"),ae(ie,oe,pe,"K","Κ"),ae(ie,oe,pe,"M","Μ"),ae(ie,oe,pe,"N","Ν"),ae(ie,oe,pe,"O","Ο"),ae(ie,oe,pe,"P","Ρ"),ae(ie,oe,pe,"T","Τ"),ae(ie,oe,pe,"X","Χ"),ae(ie,oe,pe,"¬","\\neg",!0),ae(ie,oe,pe,"¬","\\lnot"),ae(ie,oe,pe,"⊤","\\top"),ae(ie,oe,pe,"⊥","\\bot"),ae(ie,oe,pe,"∅","\\emptyset"),ae(ie,se,pe,"∅","\\varnothing"),ae(ie,oe,ce,"α","\\alpha",!0),ae(ie,oe,ce,"β","\\beta",!0),ae(ie,oe,ce,"γ","\\gamma",!0),ae(ie,oe,ce,"δ","\\delta",!0),ae(ie,oe,ce,"ϵ","\\epsilon",!0),ae(ie,oe,ce,"ζ","\\zeta",!0),ae(ie,oe,ce,"η","\\eta",!0),ae(ie,oe,ce,"θ","\\theta",!0),ae(ie,oe,ce,"ι","\\iota",!0),ae(ie,oe,ce,"κ","\\kappa",!0),ae(ie,oe,ce,"λ","\\lambda",!0),ae(ie,oe,ce,"μ","\\mu",!0),ae(ie,oe,ce,"ν","\\nu",!0),ae(ie,oe,ce,"ξ","\\xi",!0),ae(ie,oe,ce,"ο","\\omicron",!0),ae(ie,oe,ce,"π","\\pi",!0),ae(ie,oe,ce,"ρ","\\rho",!0),ae(ie,oe,ce,"σ","\\sigma",!0),ae(ie,oe,ce,"τ","\\tau",!0),ae(ie,oe,ce,"υ","\\upsilon",!0),ae(ie,oe,ce,"ϕ","\\phi",!0),ae(ie,oe,ce,"χ","\\chi",!0),ae(ie,oe,ce,"ψ","\\psi",!0),ae(ie,oe,ce,"ω","\\omega",!0),ae(ie,oe,ce,"ε","\\varepsilon",!0),ae(ie,oe,ce,"ϑ","\\vartheta",!0),ae(ie,oe,ce,"ϖ","\\varpi",!0),ae(ie,oe,ce,"ϱ","\\varrho",!0),ae(ie,oe,ce,"ς","\\varsigma",!0),ae(ie,oe,ce,"φ","\\varphi",!0),ae(ie,oe,he,"∗","*",!0),ae(ie,oe,he,"+","+"),ae(ie,oe,he,"−","-",!0),ae(ie,oe,he,"⋅","\\cdot",!0),ae(ie,oe,he,"∘","\\circ",!0),ae(ie,oe,he,"÷","\\div",!0),ae(ie,oe,he,"±","\\pm",!0),ae(ie,oe,he,"×","\\times",!0),ae(ie,oe,he,"∩","\\cap",!0),ae(ie,oe,he,"∪","\\cup",!0),ae(ie,oe,he,"∖","\\setminus",!0),ae(ie,oe,he,"∧","\\land"),ae(ie,oe,he,"∨","\\lor"),ae(ie,oe,he,"∧","\\wedge",!0),ae(ie,oe,he,"∨","\\vee",!0),ae(ie,oe,pe,"√","\\surd"),ae(ie,oe,"open","⟨","\\langle",!0),ae(ie,oe,"open","∣","\\lvert"),ae(ie,oe,"open","∥","\\lVert"),ae(ie,oe,"close","?","?"),ae(ie,oe,"close","!","!"),ae(ie,oe,"close","⟩","\\rangle",!0),ae(ie,oe,"close","∣","\\rvert"),ae(ie,oe,"close","∥","\\rVert"),ae(ie,oe,ue,"=","="),ae(ie,oe,ue,":",":"),ae(ie,oe,ue,"≈","\\approx",!0),ae(ie,oe,ue,"≅","\\cong",!0),ae(ie,oe,ue,"≥","\\ge"),ae(ie,oe,ue,"≥","\\geq",!0),ae(ie,oe,ue,"←","\\gets"),ae(ie,oe,ue,">","\\gt",!0),ae(ie,oe,ue,"∈","\\in",!0),ae(ie,oe,ue,"","\\@not"),ae(ie,oe,ue,"⊂","\\subset",!0),ae(ie,oe,ue,"⊃","\\supset",!0),ae(ie,oe,ue,"⊆","\\subseteq",!0),ae(ie,oe,ue,"⊇","\\supseteq",!0),ae(ie,se,ue,"⊈","\\nsubseteq",!0),ae(ie,se,ue,"⊉","\\nsupseteq",!0),ae(ie,oe,ue,"⊨","\\models"),ae(ie,oe,ue,"←","\\leftarrow",!0),ae(ie,oe,ue,"≤","\\le"),ae(ie,oe,ue,"≤","\\leq",!0),ae(ie,oe,ue,"<","\\lt",!0),ae(ie,oe,ue,"→","\\rightarrow",!0),ae(ie,oe,ue,"→","\\to"),ae(ie,se,ue,"≱","\\ngeq",!0),ae(ie,se,ue,"≰","\\nleq",!0),ae(ie,oe,"spacing"," ","\\ "),ae(ie,oe,"spacing"," ","\\space"),ae(ie,oe,"spacing"," ","\\nobreakspace"),ae("text",oe,"spacing"," ","\\ "),ae("text",oe,"spacing"," "," "),ae("text",oe,"spacing"," ","\\space"),ae("text",oe,"spacing"," ","\\nobreakspace"),ae(ie,oe,"spacing",null,"\\nobreak"),ae(ie,oe,"spacing",null,"\\allowbreak"),ae(ie,oe,"punct",",",","),ae(ie,oe,"punct",";",";"),ae(ie,se,he,"⊼","\\barwedge",!0),ae(ie,se,he,"⊻","\\veebar",!0),ae(ie,oe,he,"⊙","\\odot",!0),ae(ie,oe,he,"⊕","\\oplus",!0),ae(ie,oe,he,"⊗","\\otimes",!0),ae(ie,oe,pe,"∂","\\partial",!0),ae(ie,oe,he,"⊘","\\oslash",!0),ae(ie,se,he,"⊚","\\circledcirc",!0),ae(ie,se,he,"⊡","\\boxdot",!0),ae(ie,oe,he,"△","\\bigtriangleup"),ae(ie,oe,he,"▽","\\bigtriangledown"),ae(ie,oe,he,"†","\\dagger"),ae(ie,oe,he,"⋄","\\diamond"),ae(ie,oe,he,"⋆","\\star"),ae(ie,oe,he,"◃","\\triangleleft"),ae(ie,oe,he,"▹","\\triangleright"),ae(ie,oe,"open","{","\\{"),ae("text",oe,pe,"{","\\{"),ae("text",oe,pe,"{","\\textbraceleft"),ae(ie,oe,"close","}","\\}"),ae("text",oe,pe,"}","\\}"),ae("text",oe,pe,"}","\\textbraceright"),ae(ie,oe,"open","{","\\lbrace"),ae(ie,oe,"close","}","\\rbrace"),ae(ie,oe,"open","[","\\lbrack",!0),ae("text",oe,pe,"[","\\lbrack",!0),ae(ie,oe,"close","]","\\rbrack",!0),ae("text",oe,pe,"]","\\rbrack",!0),ae(ie,oe,"open","(","\\lparen",!0),ae(ie,oe,"close",")","\\rparen",!0),ae("text",oe,pe,"<","\\textless",!0),ae("text",oe,pe,">","\\textgreater",!0),ae(ie,oe,"open","⌊","\\lfloor",!0),ae(ie,oe,"close","⌋","\\rfloor",!0),ae(ie,oe,"open","⌈","\\lceil",!0),ae(ie,oe,"close","⌉","\\rceil",!0),ae(ie,oe,pe,"\\","\\backslash"),ae(ie,oe,pe,"∣","|"),ae(ie,oe,pe,"∣","\\vert"),ae("text",oe,pe,"|","\\textbar",!0),ae(ie,oe,pe,"∥","\\|"),ae(ie,oe,pe,"∥","\\Vert"),ae("text",oe,pe,"∥","\\textbardbl"),ae("text",oe,pe,"~","\\textasciitilde"),ae("text",oe,pe,"\\","\\textbackslash"),ae("text",oe,pe,"^","\\textasciicircum"),ae(ie,oe,ue,"↑","\\uparrow",!0),ae(ie,oe,ue,"⇑","\\Uparrow",!0),ae(ie,oe,ue,"↓","\\downarrow",!0),ae(ie,oe,ue,"⇓","\\Downarrow",!0),ae(ie,oe,ue,"↕","\\updownarrow",!0),ae(ie,oe,ue,"⇕","\\Updownarrow",!0),ae(ie,oe,me,"∐","\\coprod"),ae(ie,oe,me,"⋁","\\bigvee"),ae(ie,oe,me,"⋀","\\bigwedge"),ae(ie,oe,me,"⨄","\\biguplus"),ae(ie,oe,me,"⋂","\\bigcap"),ae(ie,oe,me,"⋃","\\bigcup"),ae(ie,oe,me,"∫","\\int"),ae(ie,oe,me,"∫","\\intop"),ae(ie,oe,me,"∬","\\iint"),ae(ie,oe,me,"∭","\\iiint"),ae(ie,oe,me,"∏","\\prod"),ae(ie,oe,me,"∑","\\sum"),ae(ie,oe,me,"⨂","\\bigotimes"),ae(ie,oe,me,"⨁","\\bigoplus"),ae(ie,oe,me,"⨀","\\bigodot"),ae(ie,oe,me,"∮","\\oint"),ae(ie,oe,me,"∯","\\oiint"),ae(ie,oe,me,"∰","\\oiiint"),ae(ie,oe,me,"⨆","\\bigsqcup"),ae(ie,oe,me,"∫","\\smallint"),ae("text",oe,"inner","…","\\textellipsis"),ae(ie,oe,"inner","…","\\mathellipsis"),ae("text",oe,"inner","…","\\ldots",!0),ae(ie,oe,"inner","…","\\ldots",!0),ae(ie,oe,"inner","⋯","\\@cdots",!0),ae(ie,oe,"inner","⋱","\\ddots",!0),ae(ie,oe,pe,"⋮","\\varvdots"),ae(ie,oe,le,"ˊ","\\acute"),ae(ie,oe,le,"ˋ","\\grave"),ae(ie,oe,le,"¨","\\ddot"),ae(ie,oe,le,"~","\\tilde"),ae(ie,oe,le,"ˉ","\\bar"),ae(ie,oe,le,"˘","\\breve"),ae(ie,oe,le,"ˇ","\\check"),ae(ie,oe,le,"^","\\hat"),ae(ie,oe,le,"⃗","\\vec"),ae(ie,oe,le,"˙","\\dot"),ae(ie,oe,le,"˚","\\mathring"),ae(ie,oe,ce,"","\\@imath"),ae(ie,oe,ce,"","\\@jmath"),ae(ie,oe,pe,"ı","ı"),ae(ie,oe,pe,"È·","È·"),ae("text",oe,pe,"ı","\\i",!0),ae("text",oe,pe,"È·","\\j",!0),ae("text",oe,pe,"ß","\\ss",!0),ae("text",oe,pe,"æ","\\ae",!0),ae("text",oe,pe,"œ","\\oe",!0),ae("text",oe,pe,"ø","\\o",!0),ae("text",oe,pe,"Æ","\\AE",!0),ae("text",oe,pe,"Œ","\\OE",!0),ae("text",oe,pe,"Ø","\\O",!0),ae("text",oe,le,"ˊ","\\'"),ae("text",oe,le,"ˋ","\\`"),ae("text",oe,le,"ˆ","\\^"),ae("text",oe,le,"˜","\\~"),ae("text",oe,le,"ˉ","\\="),ae("text",oe,le,"˘","\\u"),ae("text",oe,le,"˙","\\."),ae("text",oe,le,"¸","\\c"),ae("text",oe,le,"˚","\\r"),ae("text",oe,le,"ˇ","\\v"),ae("text",oe,le,"¨",'\\"'),ae("text",oe,le,"˝","\\H"),ae("text",oe,le,"◯","\\textcircled");var de={"--":!0,"---":!0,"``":!0,"''":!0};ae("text",oe,pe,"–","--",!0),ae("text",oe,pe,"–","\\textendash"),ae("text",oe,pe,"—","---",!0),ae("text",oe,pe,"—","\\textemdash"),ae("text",oe,pe,"‘","`",!0),ae("text",oe,pe,"‘","\\textquoteleft"),ae("text",oe,pe,"’","'",!0),ae("text",oe,pe,"’","\\textquoteright"),ae("text",oe,pe,"“","``",!0),ae("text",oe,pe,"“","\\textquotedblleft"),ae("text",oe,pe,"”","''",!0),ae("text",oe,pe,"”","\\textquotedblright"),ae(ie,oe,pe,"°","\\degree",!0),ae("text",oe,pe,"°","\\degree"),ae("text",oe,pe,"°","\\textdegree",!0),ae(ie,oe,pe,"£","\\pounds"),ae(ie,oe,pe,"£","\\mathsterling",!0),ae("text",oe,pe,"£","\\pounds"),ae("text",oe,pe,"£","\\textsterling",!0),ae(ie,se,pe,"✠","\\maltese"),ae("text",se,pe,"✠","\\maltese");for(var fe=0;fe<'0123456789/@."'.length;fe++){var ge='0123456789/@."'.charAt(fe);ae(ie,oe,pe,ge,ge)}for(var ve=0;ve<'0123456789!@*()-=+";:?/.,'.length;ve++){var ye='0123456789!@*()-=+";:?/.,'.charAt(ve);ae("text",oe,pe,ye,ye)}for(var be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",xe=0;xe<be.length;xe++){var we=be.charAt(xe);ae(ie,oe,ce,we,we),ae("text",oe,pe,we,we)}ae(ie,se,pe,"C","ℂ"),ae("text",se,pe,"C","ℂ"),ae(ie,se,pe,"H","ℍ"),ae("text",se,pe,"H","ℍ"),ae(ie,se,pe,"N","ℕ"),ae("text",se,pe,"N","ℕ"),ae(ie,se,pe,"P","ℙ"),ae("text",se,pe,"P","ℙ"),ae(ie,se,pe,"Q","ℚ"),ae("text",se,pe,"Q","ℚ"),ae(ie,se,pe,"R","ℝ"),ae("text",se,pe,"R","ℝ"),ae(ie,se,pe,"Z","ℤ"),ae("text",se,pe,"Z","ℤ"),ae(ie,oe,ce,"h","ℎ"),ae("text",oe,ce,"h","ℎ");for(var ke="",Se=0;Se<be.length;Se++){var Me=be.charAt(Se);ae(ie,oe,ce,Me,ke=String.fromCharCode(55349,56320+Se)),ae("text",oe,pe,Me,ke),ae(ie,oe,ce,Me,ke=String.fromCharCode(55349,56372+Se)),ae("text",oe,pe,Me,ke),ae(ie,oe,ce,Me,ke=String.fromCharCode(55349,56424+Se)),ae("text",oe,pe,Me,ke),ae(ie,oe,ce,Me,ke=String.fromCharCode(55349,56580+Se)),ae("text",oe,pe,Me,ke),ae(ie,oe,ce,Me,ke=String.fromCharCode(55349,56736+Se)),ae("text",oe,pe,Me,ke),ae(ie,oe,ce,Me,ke=String.fromCharCode(55349,56788+Se)),ae("text",oe,pe,Me,ke),ae(ie,oe,ce,Me,ke=String.fromCharCode(55349,56840+Se)),ae("text",oe,pe,Me,ke),ae(ie,oe,ce,Me,ke=String.fromCharCode(55349,56944+Se)),ae("text",oe,pe,Me,ke),Se<26&&(ae(ie,oe,ce,Me,ke=String.fromCharCode(55349,56632+Se)),ae("text",oe,pe,Me,ke),ae(ie,oe,ce,Me,ke=String.fromCharCode(55349,56476+Se)),ae("text",oe,pe,Me,ke))}ae(ie,oe,ce,"k",ke=String.fromCharCode(55349,56668)),ae("text",oe,pe,"k",ke);for(var ze=0;ze<10;ze++){var Ae=ze.toString();ae(ie,oe,ce,Ae,ke=String.fromCharCode(55349,57294+ze)),ae("text",oe,pe,Ae,ke),ae(ie,oe,ce,Ae,ke=String.fromCharCode(55349,57314+ze)),ae("text",oe,pe,Ae,ke),ae(ie,oe,ce,Ae,ke=String.fromCharCode(55349,57324+ze)),ae("text",oe,pe,Ae,ke),ae(ie,oe,ce,Ae,ke=String.fromCharCode(55349,57334+ze)),ae("text",oe,pe,Ae,ke)}for(var Te=0;Te<"ÐÞþ".length;Te++){var Be="ÐÞþ".charAt(Te);ae(ie,oe,ce,Be,Be),ae("text",oe,pe,Be,Be)}var Ce=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Ne=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],qe=function(e,t,r){return ne[r][e]&&ne[r][e].replace&&(e=ne[r][e].replace),{value:e,metrics:C(e,t,r)}},Ie=function(e,t,r,n,a){var i,o=qe(e,t,r),s=o.metrics;if(e=o.value,s){var l=s.italic;("text"===r||n&&"mathit"===n.font)&&(l=0),i=new $(e,s.height,s.depth,l,s.skew,s.width,a)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),i=new $(e,0,0,0,0,0,a);if(n){i.maxFontSize=n.sizeMultiplier,n.style.isTight()&&i.classes.push("mtight");var h=n.getColor();h&&(i.style.color=h)}return i},Oe=function(e,t){if(V(e.classes)!==V(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var a in t.style)if(t.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;return!0},Re=function(e){for(var t=0,r=0,n=0,a=0;a<e.children.length;a++){var i=e.children[a];i.height>t&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>n&&(n=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},He=function(e,t,r,n){var a=new Y(e,t,r,n);return Re(a),a},Ee=function(e,t,r,n){return new Y(e,t,r,n)},Le=function(e){var t=new z(e);return Re(t),t},De=function(e,t,r){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},Pe={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Fe={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Ve={fontMap:Pe,makeSymbol:Ie,mathsym:function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&qe(e,"Main-Bold",t).metrics?Ie(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===ne[t][e].font?Ie(e,"Main-Regular",t,r,n):Ie(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},makeSpan:He,makeSvgSpan:Ee,makeLineSpan:function(e,t,r){var n=He([e],[],t);return n.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=F(n.height),n.maxFontSize=1,n},makeAnchor:function(e,t,r,n){var a=new X(e,t,r,n);return Re(a),a},makeFragment:Le,wrapFragment:function(e,t){return e instanceof z?He([],[e],t):e},makeVList:function(e,t){for(var r=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth,a=n,i=1;i<t.length;i++){var o=-t[i].shift-a-t[i].elem.depth,s=o-(t[i-1].elem.height+t[i-1].elem.depth);a+=o,r.push({type:"kern",size:s}),r.push(t[i])}return{children:r,depth:n}}var l;if("top"===e.positionType){for(var h=e.positionData,c=0;c<e.children.length;c++){var m=e.children[c];h-="kern"===m.type?m.size:m.elem.height+m.elem.depth}l=h}else if("bottom"===e.positionType)l=-e.positionData;else{var u=e.children[0];if("elem"!==u.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-u.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-u.elem.depth}}return{children:e.children,depth:l}}(e),n=r.children,a=r.depth,i=0,o=0;o<n.length;o++){var s=n[o];if("elem"===s.type){var l=s.elem;i=Math.max(i,l.maxFontSize,l.height)}}i+=2;var h=He(["pstrut"],[]);h.style.height=F(i);for(var c=[],m=a,u=a,p=a,d=0;d<n.length;d++){var f=n[d];if("kern"===f.type)p+=f.size;else{var g=f.elem,v=f.wrapperClasses||[],y=f.wrapperStyle||{},b=He(v,[h,g],void 0,y);b.style.top=F(-i-p-g.depth),f.marginLeft&&(b.style.marginLeft=f.marginLeft),f.marginRight&&(b.style.marginRight=f.marginRight),c.push(b),p+=g.height+g.depth}m=Math.min(m,p),u=Math.max(u,p)}var x,w=He(["vlist"],c);if(w.style.height=F(u),m<0){var k=He([],[]),S=He(["vlist"],[k]);S.style.height=F(-m);var M=He(["vlist-s"],[new $("​")]);x=[He(["vlist-r"],[w,M]),He(["vlist-r"],[S])]}else x=[He(["vlist-r"],[w])];var z=He(["vlist-t"],x);return 2===x.length&&z.classes.push("vlist-t2"),z.height=u,z.depth=-m,z},makeOrd:function(e,t,r){var a=e.mode,i=e.text,o=["mord"],s="math"===a||"text"===a&&t.font,l=s?t.font:t.fontFamily;if(55349===i.charCodeAt(0)){var h=function(e,t){var r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,a="math"===t?0:1;if(119808<=r&&r<120484){var i=Math.floor((r-119808)/26);return[Ce[i][2],Ce[i][a]]}if(120782<=r&&r<=120831){var o=Math.floor((r-120782)/10);return[Ne[o][2],Ne[o][a]]}if(120485===r||120486===r)return[Ce[0][2],Ce[0][a]];if(120486<r&&r<120782)return["",""];throw new n("Unsupported character: "+e)}(i,a),c=h[0],m=h[1];return Ie(i,c,a,t,o.concat(m))}if(l){var u,p;if("boldsymbol"===l){var d=function(e,t,r,n,a){return"textord"!==a&&qe(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(i,a,0,0,r);u=d.fontName,p=[d.fontClass]}else s?(u=Pe[l].fontName,p=[l]):(u=De(l,t.fontWeight,t.fontShape),p=[l,t.fontWeight,t.fontShape]);if(qe(i,u,a).metrics)return Ie(i,u,a,t,o.concat(p));if(de.hasOwnProperty(i)&&"Typewriter"===u.substr(0,10)){for(var f=[],g=0;g<i.length;g++)f.push(Ie(i[g],u,a,t,o.concat(p)));return Le(f)}}if("mathord"===r)return Ie(i,"Math-Italic",a,t,o.concat(["mathnormal"]));if("textord"===r){var v=ne[a][i]&&ne[a][i].font;if("ams"===v){var y=De("amsrm",t.fontWeight,t.fontShape);return Ie(i,y,a,t,o.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==v&&v){var b=De(v,t.fontWeight,t.fontShape);return Ie(i,b,a,t,o.concat(b,t.fontWeight,t.fontShape))}var x=De("textrm",t.fontWeight,t.fontShape);return Ie(i,x,a,t,o.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+r+" in makeOrd")},makeGlue:function(e,t){var r=He(["mspace"],[],t),n=P(e,t);return r.style.marginRight=F(n),r},staticSvg:function(e,t){var r=Fe[e],n=r[0],a=r[1],i=r[2],o=new K(n),s=new Z([o],{width:F(a),height:F(i),style:"width:"+F(a),viewBox:"0 0 "+1e3*a+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=Ee(["overlay"],[s],t);return l.height=i,l.style.height=F(i),l.style.width=F(a),l},svgData:Fe,tryCombineChars:function(e){for(var t=0;t<e.length-1;t++){var r=e[t],n=e[t+1];r instanceof $&&n instanceof $&&Oe(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e}},Ge={number:3,unit:"mu"},Ue={number:4,unit:"mu"},_e={number:5,unit:"mu"},Ye={mord:{mop:Ge,mbin:Ue,mrel:_e,minner:Ge},mop:{mord:Ge,mop:Ge,mrel:_e,minner:Ge},mbin:{mord:Ue,mop:Ue,mopen:Ue,minner:Ue},mrel:{mord:_e,mop:_e,mopen:_e,minner:_e},mopen:{},mclose:{mop:Ge,mbin:Ue,mrel:_e,minner:Ge},mpunct:{mord:Ge,mop:Ge,mrel:_e,mopen:Ge,mclose:Ge,mpunct:Ge,minner:Ge},minner:{mord:Ge,mop:Ge,mbin:Ue,mrel:_e,mopen:Ge,mpunct:Ge,minner:Ge}},Xe={mord:{mop:Ge},mop:{mord:Ge,mop:Ge},mbin:{},mrel:{},mopen:{},mclose:{mop:Ge},mpunct:{},minner:{mop:Ge}},We={},je={},$e={};function Ze(e){for(var t=e.type,r=e.names,n=e.props,a=e.handler,i=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:a},l=0;l<r.length;++l)We[r[l]]=s;t&&(i&&(je[t]=i),o&&($e[t]=o))}function Ke(e){Ze({type:e.type,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:e.htmlBuilder,mathmlBuilder:e.mathmlBuilder})}var Je=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},Qe=function(e){return"ordgroup"===e.type?e.body:[e]},et=Ve.makeSpan,tt=["leftmost","mbin","mopen","mrel","mop","mpunct"],rt=["rightmost","mrel","mclose","mpunct"],nt={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT},at={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},it=function(e,t,r,n){void 0===n&&(n=[null,null]);for(var a=[],i=0;i<e.length;i++){var o=ct(e[i],t);if(o instanceof z){var s=o.children;a.push.apply(a,s)}else a.push(o)}if(Ve.tryCombineChars(a),!r)return a;var h=t;if(1===e.length){var c=e[0];"sizing"===c.type?h=t.havingSize(c.size):"styling"===c.type&&(h=t.havingStyle(nt[c.style]))}var m=et([n[0]||"leftmost"],[],t),u=et([n[1]||"rightmost"],[],t),p="root"===r;return ot(a,(function(e,t){var r=t.classes[0],n=e.classes[0];"mbin"===r&&l.contains(rt,n)?t.classes[0]="mord":"mbin"===n&&l.contains(tt,r)&&(e.classes[0]="mord")}),{node:m},u,p),ot(a,(function(e,t){var r=lt(t),n=lt(e),a=r&&n?e.hasClass("mtight")?Xe[r][n]:Ye[r][n]:null;if(a)return Ve.makeGlue(a,h)}),{node:m},u,p),a},ot=function e(t,r,n,a,i){a&&t.push(a);for(var o=0;o<t.length;o++){var s=t[o],l=st(s);if(l)e(l.children,r,n,null,i);else{var h=!s.hasClass("mspace");if(h){var c=r(s,n.node);c&&(n.insertAfter?n.insertAfter(c):(t.unshift(c),o++))}h?n.node=s:i&&s.hasClass("newline")&&(n.node=et(["leftmost"])),n.insertAfter=function(e){return function(r){t.splice(e+1,0,r),o++}}(o)}}a&&t.pop()},st=function(e){return e instanceof z||e instanceof X||e instanceof Y&&e.hasClass("enclosing")?e:null},lt=function(e,t){return e?(t&&(e=function e(t,r){var n=st(t);if(n){var a=n.children;if(a.length){if("right"===r)return e(a[a.length-1],"right");if("left"===r)return e(a[0],"left")}}return t}(e,t)),at[e.classes[0]]||null):null},ht=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return et(t.concat(r))},ct=function(e,t,r){if(!e)return et();if(je[e.type]){var a=je[e.type](e,t);if(r&&t.size!==r.size){a=et(t.sizingClasses(r),[a],t);var i=t.sizeMultiplier/r.sizeMultiplier;a.height*=i,a.depth*=i}return a}throw new n("Got group of unknown type: '"+e.type+"'")};function mt(e,t){var r=et(["base"],e,t),n=et(["strut"]);return n.style.height=F(r.height+r.depth),r.depth&&(n.style.verticalAlign=F(-r.depth)),r.children.unshift(n),r}function ut(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var n,a=it(e,t,"root");2===a.length&&a[1].hasClass("tag")&&(n=a.pop());for(var i,o=[],s=[],l=0;l<a.length;l++)if(s.push(a[l]),a[l].hasClass("mbin")||a[l].hasClass("mrel")||a[l].hasClass("allowbreak")){for(var h=!1;l<a.length-1&&a[l+1].hasClass("mspace")&&!a[l+1].hasClass("newline");)l++,s.push(a[l]),a[l].hasClass("nobreak")&&(h=!0);h||(o.push(mt(s,t)),s=[])}else a[l].hasClass("newline")&&(s.pop(),s.length>0&&(o.push(mt(s,t)),s=[]),o.push(a[l]));s.length>0&&o.push(mt(s,t)),r?((i=mt(it(r,t,!0))).classes=["tag"],o.push(i)):n&&o.push(n);var c=et(["katex-html"],o);if(c.setAttribute("aria-hidden","true"),i){var m=i.children[0];m.style.height=F(c.height+c.depth),c.depth&&(m.style.verticalAlign=F(-c.depth))}return c}function pt(e){return new z(e)}var dt=function(){function e(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.getAttribute=function(e){return this.attributes[e]},t.toNode=function(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=V(this.classes));for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e},t.toMarkup=function(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=l.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+l.escape(V(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">"},t.toText=function(){return this.children.map((function(e){return e.toText()})).join("")},e}(),ft=function(){function e(e){this.text=void 0,this.text=e}var t=e.prototype;return t.toNode=function(){return document.createTextNode(this.text)},t.toMarkup=function(){return l.escape(this.toText())},t.toText=function(){return this.text},e}(),gt={MathNode:dt,TextNode:ft,SpaceNode:function(){function e(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?"  ":e>=-.05556&&e<=-.05555?" ⁣":e>=-.1667&&e<=-.1666?" ⁣":e>=-.2223&&e<=-.2222?" ⁣":e>=-.2778&&e<=-.2777?" ⁣":null}var t=e.prototype;return t.toNode=function(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",F(this.width)),e},t.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+F(this.width)+'"/>'},t.toText=function(){return this.character?this.character:" "},e}(),newDocumentFragment:pt},vt=function(e,t,r){return!ne[t][e]||!ne[t][e].replace||55349===e.charCodeAt(0)||de.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.substr(4,2)||r.font&&"tt"===r.font.substr(4,2))||(e=ne[t][e].replace),new gt.TextNode(e)},yt=function(e){return 1===e.length?e[0]:new gt.MathNode("mrow",e)},bt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var r=t.font;if(!r||"mathnormal"===r)return null;var n=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var a=e.text;return l.contains(["\\imath","\\jmath"],a)?null:(ne[n][a]&&ne[n][a].replace&&(a=ne[n][a].replace),C(a,Ve.fontMap[r].fontName,n)?Ve.fontMap[r].variant:null)},xt=function(e,t,r){if(1===e.length){var n=kt(e[0],t);return r&&n instanceof dt&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var a,i=[],o=0;o<e.length;o++){var s=kt(e[o],t);if(s instanceof dt&&a instanceof dt){if("mtext"===s.type&&"mtext"===a.type&&s.getAttribute("mathvariant")===a.getAttribute("mathvariant")){var l;(l=a.children).push.apply(l,s.children);continue}if("mn"===s.type&&"mn"===a.type){var h;(h=a.children).push.apply(h,s.children);continue}if("mi"===s.type&&1===s.children.length&&"mn"===a.type){var c=s.children[0];if(c instanceof ft&&"."===c.text){var m;(m=a.children).push.apply(m,s.children);continue}}else if("mi"===a.type&&1===a.children.length){var u=a.children[0];if(u instanceof ft&&"̸"===u.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var p=s.children[0];p instanceof ft&&p.text.length>0&&(p.text=p.text.slice(0,1)+"̸"+p.text.slice(1),i.pop())}}}i.push(s),a=s}return i},wt=function(e,t,r){return yt(xt(e,t,r))},kt=function(e,t){if(!e)return new gt.MathNode("mrow");if($e[e.type])return $e[e.type](e,t);throw new n("Got group of unknown type: '"+e.type+"'")};function St(e,t,r,n,a){var i,o=xt(e,r);i=1===o.length&&o[0]instanceof dt&&l.contains(["mrow","mtable"],o[0].type)?o[0]:new gt.MathNode("mrow",o);var s=new gt.MathNode("annotation",[new gt.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var h=new gt.MathNode("semantics",[i,s]),c=new gt.MathNode("math",[h]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var m=a?"katex":"katex-mathml";return Ve.makeSpan([m],[c])}var Mt=function(e){return new H({style:e.displayMode?x.DISPLAY:x.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},zt=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Ve.makeSpan(r,[e])}return e},At={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Tt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Bt=function(e,t,r,n,a){var i,o=e.height+e.depth+r+n;if(/fbox|color|angl/.test(t)){if(i=Ve.makeSpan(["stretchy",t],[],a),"fbox"===t){var s=a.color&&a.getColor();s&&(i.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new J({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new J({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new Z(l,{width:"100%",height:F(o)});i=Ve.makeSvgSpan([],[h],a)}return i.height=o,i.style.height=F(o),i},Ct=function(e){var t=new gt.MathNode("mo",[new gt.TextNode(At[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Nt=function(e,t){var r=function(){var r=4e5,n=e.label.substr(1);if(l.contains(["widehat","widecheck","widetilde","utilde"],n)){var a,i,o,s="ordgroup"===(d=e.base).type?d.body.length:1;if(s>5)"widehat"===n||"widecheck"===n?(a=420,r=2364,o=.42,i=n+"4"):(a=312,r=2340,o=.34,i="tilde4");else{var h=[1,1,2,2,3,3][s];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][h],a=[0,239,300,360,420][h],o=[0,.24,.3,.3,.36,.42][h],i=n+h):(r=[0,600,1033,2339,2340][h],a=[0,260,286,306,312][h],o=[0,.26,.286,.3,.306,.34][h],i="tilde"+h)}var c=new K(i),m=new Z([c],{width:"100%",height:F(o),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"});return{span:Ve.makeSvgSpan([],[m],t),minWidth:0,height:o}}var u,p,d,f=[],g=Tt[n],v=g[0],y=g[1],b=g[2],x=b/1e3,w=v.length;if(1===w)u=["hide-tail"],p=[g[3]];else if(2===w)u=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n                    "+w+" children.");u=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var k=0;k<w;k++){var S=new K(v[k]),M=new Z([S],{width:"400em",height:F(x),viewBox:"0 0 "+r+" "+b,preserveAspectRatio:p[k]+" slice"}),z=Ve.makeSvgSpan([u[k]],[M],t);if(1===w)return{span:z,minWidth:y,height:x};z.style.height=F(x),f.push(z)}return{span:Ve.makeSpan(["stretchy"],f,t),minWidth:y,height:x}}(),n=r.span,a=r.minWidth,i=r.height;return n.height=i,n.style.height=F(i),a>0&&(n.style.minWidth=F(a)),n};function qt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function It(e){var t=Ot(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Ot(e){return e&&("atom"===e.type||te.hasOwnProperty(e.type))?e:null}var Rt=function(e,t){var r,n,a;e&&"supsub"===e.type?(r=(n=qt(e.base,"accent")).base,e.base=r,a=function(e){if(e instanceof Y)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(ct(e,t)),e.base=n):r=(n=qt(e,"accent")).base;var i=ct(r,t.havingCrampedStyle()),o=0;if(n.isShifty&&l.isCharacterBox(r)){var s=l.getBaseElem(r);o=Q(ct(s,t.havingCrampedStyle())).skew}var h,c="\\c"===n.label,m=c?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(n.isStretchy)h=Nt(n,t),h=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+F(2*o)+")",marginLeft:F(2*o)}:void 0}]},t);else{var u,p;"\\vec"===n.label?(u=Ve.staticSvg("vec",t),p=Ve.svgData.vec[1]):((u=Q(u=Ve.makeOrd({mode:n.mode,text:n.label},t,"textord"))).italic=0,p=u.width,c&&(m+=u.depth)),h=Ve.makeSpan(["accent-body"],[u]);var d="\\textcircled"===n.label;d&&(h.classes.push("accent-full"),m=i.height);var f=o;d||(f-=p/2),h.style.left=F(f),"\\textcircled"===n.label&&(h.style.top=".2em"),h=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-m},{type:"elem",elem:h}]},t)}var g=Ve.makeSpan(["mord","accent"],[h],t);return a?(a.children[0]=g,a.height=Math.max(g.height,a.height),a.classes[0]="mord",a):g},Ht=function(e,t){var r=e.isStretchy?Ct(e.label):new gt.MathNode("mo",[vt(e.label,e.mode)]),n=new gt.MathNode("mover",[kt(e.base,t),r]);return n.setAttribute("accent","true"),n},Et=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((function(e){return"\\"+e})).join("|"));Ze({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(e,t){var r=Je(t[0]),n=!Et.test(e.funcName),a=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:a,base:r}},htmlBuilder:Rt,mathmlBuilder:Ht}),Ze({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:function(e,t){var r=t[0],n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:Rt,mathmlBuilder:Ht}),Ze({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:a}},htmlBuilder:function(e,t){var r=ct(e.base,t),n=Nt(e,t),a="\\utilde"===e.label?.12:0,i=Ve.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]},t);return Ve.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:function(e,t){var r=Ct(e.label),n=new gt.MathNode("munder",[kt(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var Lt=function(e){var t=new gt.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Ze({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,r){var n=e.parser,a=e.funcName;return{type:"xArrow",mode:n.mode,label:a,body:t[0],below:r[0]}},htmlBuilder:function(e,t){var r,n=t.style,a=t.havingStyle(n.sup()),i=Ve.wrapFragment(ct(e.body,a,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(a=t.havingStyle(n.sub()),(r=Ve.wrapFragment(ct(e.below,a,t),t)).classes.push(o+"-arrow-pad"));var s,l=Nt(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,c=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(c-=i.depth),r){var m=-t.fontMetrics().axisHeight+r.height+.5*l.height+.111;s=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:l,shift:h},{type:"elem",elem:r,shift:m}]},t)}else s=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:l,shift:h}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),Ve.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder:function(e,t){var r,n=Ct(e.label);if(n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var a=Lt(kt(e.body,t));if(e.below){var i=Lt(kt(e.below,t));r=new gt.MathNode("munderover",[n,i,a])}else r=new gt.MathNode("mover",[n,a])}else if(e.below){var o=Lt(kt(e.below,t));r=new gt.MathNode("munder",[n,o])}else r=Lt(),r=new gt.MathNode("mover",[n,r]);return r}});var Dt={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Pt=function(e){return"textord"===e.type&&"@"===e.text};function Ft(e,t,r){var n=Dt[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var a={type:"atom",text:n,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[a],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}Ze({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder:function(e,t){var r=t.havingStyle(t.style.sup()),n=Ve.wrapFragment(ct(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=F(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder:function(e,t){var r=new gt.MathNode("mrow",[kt(e.label,t)]);return(r=new gt.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new gt.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),Ze({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:function(e,t){return{type:"cdlabelparent",mode:e.parser.mode,fragment:t[0]}},htmlBuilder:function(e,t){var r=Ve.wrapFragment(ct(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:function(e,t){return new gt.MathNode("mrow",[kt(e.fragment,t)])}}),Ze({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){for(var r=e.parser,a=qt(t[0],"ordgroup").body,i="",o=0;o<a.length;o++)i+=qt(a[o],"textord").text;var s,l=parseInt(i);if(isNaN(l))throw new n("\\@char has non-numeric argument "+i);if(l<0||l>=1114111)throw new n("\\@char with invalid code point "+i);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:s}}});var Vt=function(e,t){var r=it(e.body,t.withColor(e.color),!1);return Ve.makeFragment(r)},Gt=function(e,t){var r=xt(e.body,t.withColor(e.color)),n=new gt.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};Ze({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler:function(e,t){var r=e.parser,n=qt(t[0],"color-token").color,a=t[1];return{type:"color",mode:r.mode,color:n,body:Qe(a)}},htmlBuilder:Vt,mathmlBuilder:Gt}),Ze({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler:function(e,t){var r=e.parser,n=e.breakOnTokenText,a=qt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",a);var i=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:a,body:i}},htmlBuilder:Vt,mathmlBuilder:Gt}),Ze({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(e,t,r){var n=e.parser,a=r[0],i=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:i,size:a&&qt(a,"size").value}},htmlBuilder:function(e,t){var r=Ve.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=F(P(e.size,t)))),r},mathmlBuilder:function(e,t){var r=new gt.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",F(P(e.size,t)))),r}});var Ut={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},_t=function(e){var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new n("Expected a control sequence",e);return t},Yt=function(e,t,r,n){var a=e.gullet.macros.get(r.text);null==a&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)};Ze({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler:function(e){var t=e.parser,r=e.funcName;t.consumeSpaces();var a=t.fetch();if(Ut[a.text])return"\\global"!==r&&"\\\\globallong"!==r||(a.text=Ut[a.text]),qt(t.parseFunction(),"internal");throw new n("Invalid token after macro prefix",a)}}),Ze({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,a=t.gullet.popToken(),i=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new n("Expected a control sequence",a);for(var o,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(a=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[s].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new n('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new n('Argument number "'+a.text+'" out of order');s++,l.push([])}else{if("EOF"===a.text)throw new n("Expected a macro definition");l[s].push(a.text)}var h=t.gullet.consumeArg().tokens;return o&&h.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h)).reverse(),t.gullet.macros.set(i,{tokens:h,numArgs:s,delimiters:l},r===Ut[r]),{type:"internal",mode:t.mode}}}),Ze({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,n=_t(t.gullet.popToken());t.gullet.consumeSpaces();var a=function(e){var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t}(t);return Yt(t,n,a,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),Ze({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,n=_t(t.gullet.popToken()),a=t.gullet.popToken(),i=t.gullet.popToken();return Yt(t,n,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var Xt=function(e,t,r){var n=C(ne.math[e]&&ne.math[e].replace||e,t,r);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},Wt=function(e,t,r,n){var a=r.havingBaseStyle(t),i=Ve.makeSpan(n.concat(a.sizingClasses(r)),[e],r),o=a.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=a.sizeMultiplier,i},jt=function(e,t,r){var n=t.havingBaseStyle(r),a=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=F(a),e.height-=a,e.depth+=a},$t=function(e,t,r,n,a,i){var o=function(e,t,r,n){return Ve.makeSymbol(e,"Size"+t+"-Regular",r,n)}(e,t,a,n),s=Wt(Ve.makeSpan(["delimsizing","size"+t],[o],n),x.TEXT,n,i);return r&&jt(s,n,x.TEXT),s},Zt=function(e,t,r){var n;return n="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:Ve.makeSpan(["delimsizinginner",n],[Ve.makeSpan([],[Ve.makeSymbol(e,t,r)])])}},Kt=function(e,t,r){var n=A["Size4-Regular"][e.charCodeAt(0)]?A["Size4-Regular"][e.charCodeAt(0)][4]:A["Size1-Regular"][e.charCodeAt(0)][4],a=new K("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new Z([a],{width:F(n),height:F(t),style:"width:"+F(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Ve.makeSvgSpan([],[i],r);return o.height=t,o.style.height=F(t),o.style.width=F(n),{type:"elem",elem:o}},Jt={type:"kern",size:-.008},Qt=["|","\\lvert","\\rvert","\\vert"],er=["\\|","\\lVert","\\rVert","\\Vert"],tr=function(e,t,r,n,a,i){var o,s,h,c;o=h=c=e,s=null;var m="Size1-Regular";"\\uparrow"===e?h=c="⏐":"\\Uparrow"===e?h=c="‖":"\\downarrow"===e?o=h="⏐":"\\Downarrow"===e?o=h="‖":"\\updownarrow"===e?(o="\\uparrow",h="⏐",c="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",h="‖",c="\\Downarrow"):l.contains(Qt,e)?h="∣":l.contains(er,e)?h="∥":"["===e||"\\lbrack"===e?(o="⎡",h="⎢",c="⎣",m="Size4-Regular"):"]"===e||"\\rbrack"===e?(o="⎤",h="⎥",c="⎦",m="Size4-Regular"):"\\lfloor"===e||"⌊"===e?(h=o="⎢",c="⎣",m="Size4-Regular"):"\\lceil"===e||"⌈"===e?(o="⎡",h=c="⎢",m="Size4-Regular"):"\\rfloor"===e||"⌋"===e?(h=o="⎥",c="⎦",m="Size4-Regular"):"\\rceil"===e||"⌉"===e?(o="⎤",h=c="⎥",m="Size4-Regular"):"("===e||"\\lparen"===e?(o="⎛",h="⎜",c="⎝",m="Size4-Regular"):")"===e||"\\rparen"===e?(o="⎞",h="⎟",c="⎠",m="Size4-Regular"):"\\{"===e||"\\lbrace"===e?(o="⎧",s="⎨",c="⎩",h="⎪",m="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",s="⎬",c="⎭",h="⎪",m="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",c="⎩",h="⎪",m="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",c="⎭",h="⎪",m="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",c="⎭",h="⎪",m="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",c="⎩",h="⎪",m="Size4-Regular");var u=Xt(o,m,a),p=u.height+u.depth,d=Xt(h,m,a),f=d.height+d.depth,g=Xt(c,m,a),v=g.height+g.depth,y=0,b=1;if(null!==s){var w=Xt(s,m,a);y=w.height+w.depth,b=2}var k=p+v+y,S=k+Math.max(0,Math.ceil((t-k)/(b*f)))*b*f,M=n.fontMetrics().axisHeight;r&&(M*=n.sizeMultiplier);var z=S/2-M,A=[];if(A.push(Zt(c,m,a)),A.push(Jt),null===s){var T=S-p-v+.016;A.push(Kt(h,T,n))}else{var B=(S-p-v-y)/2+.016;A.push(Kt(h,B,n)),A.push(Jt),A.push(Zt(s,m,a)),A.push(Jt),A.push(Kt(h,B,n))}A.push(Jt),A.push(Zt(o,m,a));var C=n.havingBaseStyle(x.TEXT),N=Ve.makeVList({positionType:"bottom",positionData:z,children:A},C);return Wt(Ve.makeSpan(["delimsizing","mult"],[N],C),x.TEXT,n,i)},rr=function(e,t,r,n,a){var i=function(e,t,r){t*=1e3;var n="";switch(e){case"sqrtMain":n=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,80);break;case"sqrtSize1":n=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,80);break;case"sqrtSize2":n=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,80);break;case"sqrtSize3":n=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,80);break;case"sqrtSize4":n=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,80);break;case"sqrtTall":n=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,80,r)}return n}(e,n,r),o=new K(e,i),s=new Z([o],{width:"400em",height:F(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Ve.makeSvgSpan(["hide-tail"],[s],a)},nr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],ar=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],ir=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],or=[0,1.2,1.8,2.4,3],sr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],lr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"stack"}],hr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],cr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},mr=function(e,t,r,n){for(var a=Math.min(2,3-n.style.size);a<r.length&&"stack"!==r[a].type;a++){var i=Xt(e,cr(r[a]),"math"),o=i.height+i.depth;if("small"===r[a].type&&(o*=n.havingBaseStyle(r[a].style).sizeMultiplier),o>t)return r[a]}return r[r.length-1]},ur=function(e,t,r,n,a,i){var o;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),o=l.contains(ir,e)?sr:l.contains(nr,e)?hr:lr;var s=mr(e,t,o,n);return"small"===s.type?function(e,t,r,n,a,i){var o=Ve.makeSymbol(e,"Main-Regular",a,n),s=Wt(o,t,n,i);return r&&jt(s,n,t),s}(e,s.style,r,n,a,i):"large"===s.type?$t(e,s.size,r,n,a,i):tr(e,t,r,n,a,i)},pr={sqrtImage:function(e,t){var r,n,a=t.havingBaseSizing(),i=mr("\\surd",e*a.sizeMultiplier,hr,a),o=a.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,h=0,c=0;return"small"===i.type?(e<1?o=1:e<1.4&&(o=.7),h=(1+s)/o,(r=rr("sqrtMain",l=(1+s+.08)/o,c=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",n=.833/o):"large"===i.type?(c=1080*or[i.size],h=(or[i.size]+s)/o,l=(or[i.size]+s+.08)/o,(r=rr("sqrtSize"+i.size,l,c,s,t)).style.minWidth="1.02em",n=1/o):(l=e+s+.08,h=e+s,c=Math.floor(1e3*e+s)+80,(r=rr("sqrtTall",l,c,s,t)).style.minWidth="0.742em",n=1.056),r.height=h,r.style.height=F(l),{span:r,advanceWidth:n,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},sizedDelim:function(e,t,r,a,i){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),l.contains(nr,e)||l.contains(ir,e))return $t(e,t,!1,r,a,i);if(l.contains(ar,e))return tr(e,or[t],!1,r,a,i);throw new n("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:or,customSizedDelim:ur,leftRightDelim:function(e,t,r,n,a,i){var o=n.fontMetrics().axisHeight*n.sizeMultiplier,s=5/n.fontMetrics().ptPerEm,l=Math.max(t-o,r+o),h=Math.max(l/500*901,2*l-s);return ur(e,h,!0,n,a,i)}},dr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},fr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function gr(e,t){var r=Ot(e);if(r&&l.contains(fr,r.text))return r;throw new n(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function vr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ze({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:function(e,t){var r=gr(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:dr[e.funcName].size,mclass:dr[e.funcName].mclass,delim:r.text}},htmlBuilder:function(e,t){return"."===e.delim?Ve.makeSpan([e.mclass]):pr.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:function(e){var t=[];"."!==e.delim&&t.push(vt(e.delim,e.mode));var r=new gt.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=F(pr.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}}),Ze({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new n("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:gr(t[0],e).text,color:r}}}),Ze({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=gr(t[0],e),n=e.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=qt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:function(e,t){vr(e);for(var r,n,a=it(e.body,t,!0,["mopen","mclose"]),i=0,o=0,s=!1,l=0;l<a.length;l++)a[l].isMiddle?s=!0:(i=Math.max(a[l].height,i),o=Math.max(a[l].depth,o));if(i*=t.sizeMultiplier,o*=t.sizeMultiplier,r="."===e.left?ht(t,["mopen"]):pr.leftRightDelim(e.left,i,o,t,e.mode,["mopen"]),a.unshift(r),s)for(var h=1;h<a.length;h++){var c=a[h].isMiddle;c&&(a[h]=pr.leftRightDelim(c.delim,i,o,c.options,e.mode,[]))}if("."===e.right)n=ht(t,["mclose"]);else{var m=e.rightColor?t.withColor(e.rightColor):t;n=pr.leftRightDelim(e.right,i,o,m,e.mode,["mclose"])}return a.push(n),Ve.makeSpan(["minner"],a,t)},mathmlBuilder:function(e,t){vr(e);var r=xt(e.body,t);if("."!==e.left){var n=new gt.MathNode("mo",[vt(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if("."!==e.right){var a=new gt.MathNode("mo",[vt(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),r.push(a)}return yt(r)}}),Ze({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=gr(t[0],e);if(!e.parser.leftrightDepth)throw new n("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:function(e,t){var r;if("."===e.delim)r=ht(t,[]);else{r=pr.sizedDelim(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:function(e,t){var r="\\vert"===e.delim||"|"===e.delim?vt("|","text"):vt(e.delim,e.mode),n=new gt.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var yr=function(e,t){var r,n,a,i=Ve.wrapFragment(ct(e.body,t),t),o=e.label.substr(1),s=t.sizeMultiplier,h=0,c=l.isCharacterBox(e.body);if("sout"===o)(r=Ve.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,h=-.5*t.fontMetrics().xHeight;else if("phase"===o){var m=P({number:.6,unit:"pt"},t),u=P({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var p=i.height+i.depth+m+u;i.style.paddingLeft=F(p/2+m);var d=Math.floor(1e3*p*s),f="M400000 "+(n=d)+" H0 L"+n/2+" 0 l65 45 L145 "+(n-80)+" H400000z",g=new Z([new K("phase",f)],{width:"400em",height:F(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});(r=Ve.makeSvgSpan(["hide-tail"],[g],t)).style.height=F(p),h=i.depth+m+u}else{/cancel/.test(o)?c||i.classes.push("cancel-pad"):"angl"===o?i.classes.push("anglpad"):i.classes.push("boxpad");var v=0,y=0,b=0;/box/.test(o)?(b=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),y=v=t.fontMetrics().fboxsep+("colorbox"===o?0:b)):"angl"===o?(v=4*(b=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),y=Math.max(0,.25-i.depth)):y=v=c?.2:0,r=Bt(i,o,v,y,t),/fbox|boxed|fcolorbox/.test(o)?(r.style.borderStyle="solid",r.style.borderWidth=F(b)):"angl"===o&&.049!==b&&(r.style.borderTopWidth=F(b),r.style.borderRightWidth=F(b)),h=i.depth+y,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)a=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:i,shift:0}]},t);else{var x=/cancel|phase/.test(o)?["svg-align"]:[];a=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:r,shift:h,wrapperClasses:x}]},t)}return/cancel/.test(o)&&(a.height=i.height,a.depth=i.depth),/cancel/.test(o)&&!c?Ve.makeSpan(["mord","cancel-lap"],[a],t):Ve.makeSpan(["mord"],[a],t)},br=function(e,t){var r=0,n=new gt.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[kt(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+a+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};Ze({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler:function(e,t,r){var n=e.parser,a=e.funcName,i=qt(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:n.mode,label:a,backgroundColor:i,body:o}},htmlBuilder:yr,mathmlBuilder:br}),Ze({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler:function(e,t,r){var n=e.parser,a=e.funcName,i=qt(t[0],"color-token").color,o=qt(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:n.mode,label:a,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:yr,mathmlBuilder:br}),Ze({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\fbox",body:t[0]}}}),Ze({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:yr,mathmlBuilder:br}),Ze({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\angl",body:t[0]}}});var xr={};function wr(e){for(var t=e.type,r=e.names,n=e.props,a=e.handler,i=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},l=0;l<r.length;++l)xr[r[l]]=s;i&&(je[t]=i),o&&($e[t]=o)}var kr={};function Sr(e,t){kr[e]=t}var Mr=function(){function e(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}return e.range=function(t,r){return r?t&&t.loc&&r.loc&&t.loc.lexer===r.loc.lexer?new e(t.loc.lexer,t.loc.start,r.loc.end):null:t&&t.loc},e}(),zr=function(){function e(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}return e.prototype.range=function(t,r){return new e(r,Mr.range(this,t))},e}();function Ar(e){var t=[];e.consumeSpaces();for(var r=e.fetch().text;"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}var Tr=function(e){if(!e.parser.settings.displayMode)throw new n("{"+e.envName+"} can be used only in display mode.")};function Br(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Cr(e,t,r){var a=t.hskipBeforeAndAfter,i=t.addJot,o=t.cols,s=t.arraystretch,l=t.colSeparationType,h=t.autoTag,c=t.singleRow,m=t.emptySingleRow,u=t.maxNumCols,p=t.leqno;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var d=e.gullet.expandMacroAsText("\\arraystretch");if(null==d)s=1;else if(!(s=parseFloat(d))||s<0)throw new n("Invalid \\arraystretch: "+d)}e.gullet.beginGroup();var f=[],g=[f],v=[],y=[],b=null!=h?[]:void 0;function x(){h&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){b&&(e.gullet.macros.get("\\df@tag")?(b.push(e.subparse([new zr("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):b.push(Boolean(h)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(x(),y.push(Ar(e));;){var k=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),k={type:"ordgroup",mode:e.mode,body:k},r&&(k={type:"styling",mode:e.mode,style:r,body:[k]}),f.push(k);var S=e.fetch().text;if("&"===S){if(u&&f.length===u){if(c||l)throw new n("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===S){w(),1===f.length&&"styling"===k.type&&0===k.body[0].body.length&&(g.length>1||!m)&&g.pop(),y.length<g.length+1&&y.push([]);break}if("\\\\"!==S)throw new n("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var M=void 0;" "!==e.gullet.future().text&&(M=e.parseSizeGroup(!0)),v.push(M?M.value:null),w(),y.push(Ar(e)),f=[],g.push(f),x()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:i,arraystretch:s,body:g,cols:o,rowGaps:v,hskipBeforeAndAfter:a,hLinesBeforeRow:y,colSeparationType:l,tags:b,leqno:p}}function Nr(e){return"d"===e.substr(0,1)?"display":"text"}var qr=function(e,t){var r,a,i=e.body.length,o=e.hLinesBeforeRow,s=0,h=new Array(i),c=[],m=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,p=5*u;e.colSeparationType&&"small"===e.colSeparationType&&(p=t.havingStyle(x.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var d="CD"===e.colSeparationType?P({number:3,unit:"ex"},t):12*u,f=3*u,g=e.arraystretch*d,v=.7*g,y=.3*g,b=0;function w(e){for(var t=0;t<e.length;++t)t>0&&(b+=.25),c.push({pos:b,isDashed:e[t]})}for(w(o[0]),r=0;r<e.body.length;++r){var k=e.body[r],S=v,M=y;s<k.length&&(s=k.length);var z=new Array(k.length);for(a=0;a<k.length;++a){var A=ct(k[a],t);M<A.depth&&(M=A.depth),S<A.height&&(S=A.height),z[a]=A}var T=e.rowGaps[r],B=0;T&&(B=P(T,t))>0&&(M<(B+=y)&&(M=B),B=0),e.addJot&&(M+=f),z.height=S,z.depth=M,b+=S,z.pos=b,b+=M+B,h[r]=z,w(o[r+1])}var C,N,q=b/2+t.fontMetrics().axisHeight,I=e.cols||[],O=[],R=[];if(e.tags&&e.tags.some((function(e){return e})))for(r=0;r<i;++r){var H=h[r],E=H.pos-q,L=e.tags[r],D=void 0;(D=!0===L?Ve.makeSpan(["eqn-num"],[],t):!1===L?Ve.makeSpan([],[],t):Ve.makeSpan([],it(L,t,!0),t)).depth=H.depth,D.height=H.height,R.push({type:"elem",elem:D,shift:E})}for(a=0,N=0;a<s||N<I.length;++a,++N){for(var V=I[N]||{},G=!0;"separator"===V.type;){if(G||((C=Ve.makeSpan(["arraycolsep"],[])).style.width=F(t.fontMetrics().doubleRuleSep),O.push(C)),"|"!==V.separator&&":"!==V.separator)throw new n("Invalid separator type: "+V.separator);var U="|"===V.separator?"solid":"dashed",_=Ve.makeSpan(["vertical-separator"],[],t);_.style.height=F(b),_.style.borderRightWidth=F(m),_.style.borderRightStyle=U,_.style.margin="0 "+F(-m/2);var Y=b-q;Y&&(_.style.verticalAlign=F(-Y)),O.push(_),V=I[++N]||{},G=!1}if(!(a>=s)){var X=void 0;(a>0||e.hskipBeforeAndAfter)&&0!==(X=l.deflt(V.pregap,p))&&((C=Ve.makeSpan(["arraycolsep"],[])).style.width=F(X),O.push(C));var W=[];for(r=0;r<i;++r){var j=h[r],$=j[a];if($){var Z=j.pos-q;$.depth=j.depth,$.height=j.height,W.push({type:"elem",elem:$,shift:Z})}}W=Ve.makeVList({positionType:"individualShift",children:W},t),W=Ve.makeSpan(["col-align-"+(V.align||"c")],[W]),O.push(W),(a<s-1||e.hskipBeforeAndAfter)&&0!==(X=l.deflt(V.postgap,p))&&((C=Ve.makeSpan(["arraycolsep"],[])).style.width=F(X),O.push(C))}}if(h=Ve.makeSpan(["mtable"],O),c.length>0){for(var K=Ve.makeLineSpan("hline",t,m),J=Ve.makeLineSpan("hdashline",t,m),Q=[{type:"elem",elem:h,shift:0}];c.length>0;){var ee=c.pop(),te=ee.pos-q;ee.isDashed?Q.push({type:"elem",elem:J,shift:te}):Q.push({type:"elem",elem:K,shift:te})}h=Ve.makeVList({positionType:"individualShift",children:Q},t)}if(0===R.length)return Ve.makeSpan(["mord"],[h],t);var re=Ve.makeVList({positionType:"individualShift",children:R},t);return re=Ve.makeSpan(["tag"],[re],t),Ve.makeFragment([h,re])},Ir={c:"center ",l:"left ",r:"right "},Or=function(e,t){for(var r=[],n=new gt.MathNode("mtd",[],["mtr-glue"]),a=new gt.MathNode("mtd",[],["mml-eqn-num"]),i=0;i<e.body.length;i++){for(var o=e.body[i],s=[],l=0;l<o.length;l++)s.push(new gt.MathNode("mtd",[kt(o[l],t)]));e.tags&&e.tags[i]&&(s.unshift(n),s.push(n),e.leqno?s.unshift(a):s.push(a)),r.push(new gt.MathNode("mtr",s))}var h=new gt.MathNode("mtable",r),c=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);h.setAttribute("rowspacing",F(c));var m="",u="";if(e.cols&&e.cols.length>0){var p=e.cols,d="",f=!1,g=0,v=p.length;"separator"===p[0].type&&(m+="top ",g=1),"separator"===p[p.length-1].type&&(m+="bottom ",v-=1);for(var y=g;y<v;y++)"align"===p[y].type?(u+=Ir[p[y].align],f&&(d+="none "),f=!0):"separator"===p[y].type&&f&&(d+="|"===p[y].separator?"solid ":"dashed ",f=!1);h.setAttribute("columnalign",u.trim()),/[sd]/.test(d)&&h.setAttribute("columnlines",d.trim())}if("align"===e.colSeparationType){for(var b=e.cols||[],x="",w=1;w<b.length;w++)x+=w%2?"0em ":"1em ";h.setAttribute("columnspacing",x.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?h.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?h.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?h.setAttribute("columnspacing","0.5em"):h.setAttribute("columnspacing","1em");var k="",S=e.hLinesBeforeRow;m+=S[0].length>0?"left ":"",m+=S[S.length-1].length>0?"right ":"";for(var M=1;M<S.length-1;M++)k+=0===S[M].length?"none ":S[M][0]?"dashed ":"solid ";return/[sd]/.test(k)&&h.setAttribute("rowlines",k.trim()),""!==m&&(h=new gt.MathNode("menclose",[h])).setAttribute("notation",m.trim()),e.arraystretch&&e.arraystretch<1&&(h=new gt.MathNode("mstyle",[h])).setAttribute("scriptlevel","1"),h},Rr=function(e,t){-1===e.envName.indexOf("ed")&&Tr(e);var r,a=[],i=e.envName.indexOf("at")>-1?"alignat":"align",o="split"===e.envName,s=Cr(e.parser,{cols:a,addJot:!0,autoTag:o?void 0:Br(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",m=0;m<t[0].body.length;m++)c+=qt(t[0].body[m],"textord").text;r=Number(c),l=2*r}var u=!l;s.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var a=qt(e[t],"styling");qt(a.body[0],"ordgroup").body.unshift(h)}if(u)l<e.length&&(l=e.length);else{var i=e.length/2;if(r<i)throw new n("Too many math in a row: expected "+r+", but got "+i,e[0])}}));for(var p=0;p<l;++p){var d="r",f=0;p%2==1?d="l":p>0&&u&&(f=1),a[p]={type:"align",align:d,pregap:f,postgap:0}}return s.colSeparationType=u?"align":"alignat",s};wr({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(e,t){var r=(Ot(t[0])?[t[0]]:qt(t[0],"ordgroup").body).map((function(e){var t=It(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new n("Unknown column alignment: "+t,e)})),a={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Cr(e.parser,a,Nr(e.envName))},htmlBuilder:qr,mathmlBuilder:Or}),wr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler:function(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var i=e.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,-1==="lcr".indexOf(r))throw new n("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),a.cols=[{type:"align",align:r}]}}var o=Cr(e.parser,a,Nr(e.envName)),s=Math.max.apply(Math,[0].concat(o.body.map((function(e){return e.length}))));return o.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:qr,mathmlBuilder:Or}),wr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(e){var t=Cr(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:qr,mathmlBuilder:Or}),wr({type:"array",names:["subarray"],props:{numArgs:1},handler:function(e,t){var r=(Ot(t[0])?[t[0]]:qt(t[0],"ordgroup").body).map((function(e){var t=It(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new n("Unknown column alignment: "+t,e)}));if(r.length>1)throw new n("{subarray} can contain only one column");var a={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((a=Cr(e.parser,a,"script")).body.length>0&&a.body[0].length>1)throw new n("{subarray} can contain only one column");return a},htmlBuilder:qr,mathmlBuilder:Or}),wr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(e){var t=Cr(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Nr(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:qr,mathmlBuilder:Or}),wr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Rr,htmlBuilder:qr,mathmlBuilder:Or}),wr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler:function(e){l.contains(["gather","gather*"],e.envName)&&Tr(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Br(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Cr(e.parser,t,"display")},htmlBuilder:qr,mathmlBuilder:Or}),wr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Rr,htmlBuilder:qr,mathmlBuilder:Or}),wr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler:function(e){Tr(e);var t={autoTag:Br(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Cr(e.parser,t,"display")},htmlBuilder:qr,mathmlBuilder:Or}),wr({type:"array",names:["CD"],props:{numArgs:0},handler:function(e){return Tr(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new n("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var a,i,o=[],s=[o],l=0;l<t.length;l++){for(var h=t[l],c={type:"styling",body:[],mode:"math",style:"display"},m=0;m<h.length;m++)if(Pt(h[m])){o.push(c);var u=It(h[m+=1]).text,p=new Array(2);if(p[0]={type:"ordgroup",mode:"math",body:[]},p[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(u)>-1);else{if(!("<>AV".indexOf(u)>-1))throw new n('Expected one of "<>AV=|." after @',h[m]);for(var d=0;d<2;d++){for(var f=!0,g=m+1;g<h.length;g++){if(a=h[g],i=u,("mathord"===a.type||"atom"===a.type)&&a.text===i){f=!1,m=g;break}if(Pt(h[g]))throw new n("Missing a "+u+" character to complete a CD arrow.",h[g]);p[d].body.push(h[g])}if(f)throw new n("Missing a "+u+" character to complete a CD arrow.",h[m])}}var v={type:"styling",body:[Ft(u,p,e)],mode:"math",style:"display"};o.push(v),c={type:"styling",body:[],mode:"math",style:"display"}}else c.body.push(h[m]);l%2==0?o.push(c):o.shift(),o=[],s.push(o)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}(e.parser)},htmlBuilder:qr,mathmlBuilder:Or}),Sr("\\nonumber","\\gdef\\@eqnsw{0}"),Sr("\\notag","\\nonumber"),Ze({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(e,t){throw new n(e.funcName+" valid only within array environment")}});var Hr=xr;Ze({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(e,t){var r=e.parser,a=e.funcName,i=t[0];if("ordgroup"!==i.type)throw new n("Invalid environment name",i);for(var o="",s=0;s<i.body.length;++s)o+=qt(i.body[s],"textord").text;if("\\begin"===a){if(!Hr.hasOwnProperty(o))throw new n("No such environment: "+o,i);var l=Hr[o],h=r.parseArguments("\\begin{"+o+"}",l),c=h.args,m=h.optArgs,u={mode:r.mode,envName:o,parser:r},p=l.handler(u,c,m);r.expect("\\end",!1);var d=r.nextToken,f=qt(r.parseFunction(),"environment");if(f.name!==o)throw new n("Mismatch: \\begin{"+o+"} matched by \\end{"+f.name+"}",d);return p}return{type:"environment",mode:r.mode,name:o,nameGroup:i}}});var Er=Ve.makeSpan;function Lr(e,t){var r=it(e.body,t,!0);return Er([e.mclass],r,t)}function Dr(e,t){var r,n=xt(e.body,t);return"minner"===e.mclass?r=new gt.MathNode("mpadded",n):"mord"===e.mclass?e.isCharacterBox?(r=n[0]).type="mi":r=new gt.MathNode("mi",n):(e.isCharacterBox?(r=n[0]).type="mo":r=new gt.MathNode("mo",n),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}Ze({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.substr(5),body:Qe(a),isCharacterBox:l.isCharacterBox(a)}},htmlBuilder:Lr,mathmlBuilder:Dr});var Pr=function(e){var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};Ze({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(e,t){return{type:"mclass",mode:e.parser.mode,mclass:Pr(t[0]),body:Qe(t[1]),isCharacterBox:l.isCharacterBox(t[1])}}}),Ze({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(e,t){var r,n=e.parser,a=e.funcName,i=t[1],o=t[0];r="\\stackrel"!==a?Pr(i):"mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==a,body:Qe(i)},h={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===a?null:o,sub:"\\underset"===a?o:null};return{type:"mclass",mode:n.mode,mclass:r,body:[h],isCharacterBox:l.isCharacterBox(h)}},htmlBuilder:Lr,mathmlBuilder:Dr});var Fr=function(e,t){var r=e.font,n=t.withFont(r);return ct(e.body,n)},Vr=function(e,t){var r=e.font,n=t.withFont(r);return kt(e.body,n)},Gr={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Ze({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=Je(t[0]),i=n;return i in Gr&&(i=Gr[i]),{type:"font",mode:r.mode,font:i.slice(1),body:a}},htmlBuilder:Fr,mathmlBuilder:Vr}),Ze({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=t[0],a=l.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:Pr(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:a}}}),Ze({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=e.breakOnTokenText,i=r.mode,o=r.parseExpression(!0,a);return{type:"font",mode:i,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:Fr,mathmlBuilder:Vr});var Ur=function(e,t){var r=t;return"display"===e?r=r.id>=x.SCRIPT.id?r.text():x.DISPLAY:"text"===e&&r.size===x.DISPLAY.size?r=x.TEXT:"script"===e?r=x.SCRIPT:"scriptscript"===e&&(r=x.SCRIPTSCRIPT),r},_r=function(e,t){var r,n=Ur(e.size,t.style),a=n.fracNum(),i=n.fracDen();r=t.havingStyle(a);var o=ct(e.numer,r,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<l?l:o.depth}r=t.havingStyle(i);var h,c,m,u,p,d,f,g,v,y,b=ct(e.denom,r,t);if(e.hasBarLine?(e.barSize?(c=P(e.barSize,t),h=Ve.makeLineSpan("frac-line",t,c)):h=Ve.makeLineSpan("frac-line",t),c=h.height,m=h.height):(h=null,c=0,m=t.fontMetrics().defaultRuleThickness),n.size===x.DISPLAY.size||"display"===e.size?(u=t.fontMetrics().num1,p=c>0?3*m:7*m,d=t.fontMetrics().denom1):(c>0?(u=t.fontMetrics().num2,p=m):(u=t.fontMetrics().num3,p=3*m),d=t.fontMetrics().denom2),h){var w=t.fontMetrics().axisHeight;u-o.depth-(w+.5*c)<p&&(u+=p-(u-o.depth-(w+.5*c))),w-.5*c-(b.height-d)<p&&(d+=p-(w-.5*c-(b.height-d)));var k=-(w-.5*c);f=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:d},{type:"elem",elem:h,shift:k},{type:"elem",elem:o,shift:-u}]},t)}else{var S=u-o.depth-(b.height-d);S<p&&(u+=.5*(p-S),d+=.5*(p-S)),f=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:d},{type:"elem",elem:o,shift:-u}]},t)}return r=t.havingStyle(n),f.height*=r.sizeMultiplier/t.sizeMultiplier,f.depth*=r.sizeMultiplier/t.sizeMultiplier,g=n.size===x.DISPLAY.size?t.fontMetrics().delim1:n.size===x.SCRIPTSCRIPT.size?t.havingStyle(x.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,v=null==e.leftDelim?ht(t,["mopen"]):pr.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(n),e.mode,["mopen"]),y=e.continued?Ve.makeSpan([]):null==e.rightDelim?ht(t,["mclose"]):pr.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(n),e.mode,["mclose"]),Ve.makeSpan(["mord"].concat(r.sizingClasses(t)),[v,Ve.makeSpan(["mfrac"],[f]),y],t)},Yr=function(e,t){var r=new gt.MathNode("mfrac",[kt(e.numer,t),kt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var n=P(e.barSize,t);r.setAttribute("linethickness",F(n))}}else r.setAttribute("linethickness","0px");var a=Ur(e.size,t.style);if(a.size!==t.style.size){r=new gt.MathNode("mstyle",[r]);var i=a.size===x.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",i),r.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var o=[];if(null!=e.leftDelim){var s=new gt.MathNode("mo",[new gt.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}if(o.push(r),null!=e.rightDelim){var l=new gt.MathNode("mo",[new gt.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return yt(o)}return r};Ze({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:function(e,t){var r,n=e.parser,a=e.funcName,i=t[0],o=t[1],s=null,l=null,h="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",l=")";break;case"\\\\bracefrac":r=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text"}return{type:"genfrac",mode:n.mode,continued:!1,numer:i,denom:o,hasBarLine:r,leftDelim:s,rightDelim:l,size:h,barSize:null}},htmlBuilder:_r,mathmlBuilder:Yr}),Ze({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:function(e,t){var r=e.parser,n=(e.funcName,t[0]),a=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:n,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),Ze({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(e){var t,r=e.parser,n=e.funcName,a=e.token;switch(n){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:a}}});var Xr=["display","text","script","scriptscript"],Wr=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};Ze({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var r,n=e.parser,a=t[4],i=t[5],o=Je(t[0]),s="atom"===o.type&&"open"===o.family?Wr(o.text):null,l=Je(t[1]),h="atom"===l.type&&"close"===l.family?Wr(l.text):null,c=qt(t[2],"size"),m=null;r=!!c.isBlank||(m=c.value).number>0;var u="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=qt(p.body[0],"textord");u=Xr[Number(d.text)]}}else p=qt(p,"textord"),u=Xr[Number(p.text)];return{type:"genfrac",mode:n.mode,numer:a,denom:i,continued:!1,hasBarLine:r,barSize:m,leftDelim:s,rightDelim:h,size:u}},htmlBuilder:_r,mathmlBuilder:Yr}),Ze({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var r=e.parser,n=(e.funcName,e.token);return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:qt(t[0],"size").value,token:n}}}),Ze({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var r=e.parser,n=(e.funcName,t[0]),a=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(qt(t[1],"infix").size),i=t[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:_r,mathmlBuilder:Yr});var jr=function(e,t){var r,n,a=t.style;"supsub"===e.type?(r=e.sup?ct(e.sup,t.havingStyle(a.sup()),t):ct(e.sub,t.havingStyle(a.sub()),t),n=qt(e.base,"horizBrace")):n=qt(e,"horizBrace");var i,o=ct(n.base,t.havingBaseStyle(x.DISPLAY)),s=Nt(n,t);if(n.isOver?(i=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=Ve.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Ve.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t);i=n.isOver?Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Ve.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Ve.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t)};Ze({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:jr,mathmlBuilder:function(e,t){var r=Ct(e.label);return new gt.MathNode(e.isOver?"mover":"munder",[kt(e.base,t),r])}}),Ze({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[1],a=qt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:Qe(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var r=it(e.body,t,!1);return Ve.makeAnchor(e.href,[],r,t)},mathmlBuilder:function(e,t){var r=wt(e.body,t);return r instanceof dt||(r=new dt("mrow",[r])),r.setAttribute("href",e.href),r}}),Ze({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=qt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i<n.length;i++){var o=n[i];"~"===o&&(o="\\textasciitilde"),a.push({type:"textord",mode:"text",text:o})}var s={type:"text",mode:r.mode,font:"\\texttt",body:a};return{type:"href",mode:r.mode,href:n,body:Qe(s)}}}),Ze({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler:function(e,t){return{type:"hbox",mode:e.parser.mode,body:Qe(t[0])}},htmlBuilder:function(e,t){var r=it(e.body,t,!1);return Ve.makeFragment(r)},mathmlBuilder:function(e,t){return new gt.MathNode("mrow",xt(e.body,t))}}),Ze({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:function(e,t){var r,a=e.parser,i=e.funcName,o=(e.token,qt(t[0],"raw").string),s=t[1];a.settings.strict&&a.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(i){case"\\htmlClass":l.class=o,r={command:"\\htmlClass",class:o};break;case"\\htmlId":l.id=o,r={command:"\\htmlId",id:o};break;case"\\htmlStyle":l.style=o,r={command:"\\htmlStyle",style:o};break;case"\\htmlData":for(var h=o.split(","),c=0;c<h.length;c++){var m=h[c].split("=");if(2!==m.length)throw new n("Error parsing key-value for \\htmlData");l["data-"+m[0].trim()]=m[1].trim()}r={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return a.settings.isTrusted(r)?{type:"html",mode:a.mode,attributes:l,body:Qe(s)}:a.formatUnsupportedCmd(i)},htmlBuilder:function(e,t){var r=it(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push.apply(n,e.attributes.class.trim().split(/\s+/));var a=Ve.makeSpan(n,r,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&a.setAttribute(i,e.attributes[i]);return a},mathmlBuilder:function(e,t){return wt(e.body,t)}}),Ze({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(e,t){return{type:"htmlmathml",mode:e.parser.mode,html:Qe(t[0]),mathml:Qe(t[1])}},htmlBuilder:function(e,t){var r=it(e.html,t,!1);return Ve.makeFragment(r)},mathmlBuilder:function(e,t){return wt(e.mathml,t)}});var $r=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new n("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!D(r))throw new n("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};Ze({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(e,t,r){var a=e.parser,i={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var h=qt(r[0],"raw").string.split(","),c=0;c<h.length;c++){var m=h[c].split("=");if(2===m.length){var u=m[1].trim();switch(m[0].trim()){case"alt":l=u;break;case"width":i=$r(u);break;case"height":o=$r(u);break;case"totalheight":s=$r(u);break;default:throw new n("Invalid key: '"+m[0]+"' in \\includegraphics.")}}}var p=qt(t[0],"url").url;return""===l&&(l=(l=(l=p).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:p})?{type:"includegraphics",mode:a.mode,alt:l,width:i,height:o,totalheight:s,src:p}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(e,t){var r=P(e.height,t),n=0;e.totalheight.number>0&&(n=P(e.totalheight,t)-r);var a=0;e.width.number>0&&(a=P(e.width,t));var i={height:F(r+n)};a>0&&(i.width=F(a)),n>0&&(i.verticalAlign=F(-n));var o=new W(e.src,e.alt,i);return o.height=r,o.depth=n,o},mathmlBuilder:function(e,t){var r=new gt.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var n=P(e.height,t),a=0;if(e.totalheight.number>0&&(a=P(e.totalheight,t)-n,r.setAttribute("valign",F(-a))),r.setAttribute("height",F(n+a)),e.width.number>0){var i=P(e.width,t);r.setAttribute("width",F(i))}return r.setAttribute("src",e.src),r}}),Ze({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=qt(t[0],"size");if(r.settings.strict){var i="m"===n[1],o="mu"===a.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+a.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder:function(e,t){return Ve.makeGlue(e.dimension,t)},mathmlBuilder:function(e,t){var r=P(e.dimension,t);return new gt.SpaceNode(r)}}),Ze({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:a}},htmlBuilder:function(e,t){var r;"clap"===e.alignment?(r=Ve.makeSpan([],[ct(e.body,t)]),r=Ve.makeSpan(["inner"],[r],t)):r=Ve.makeSpan(["inner"],[ct(e.body,t)]);var n=Ve.makeSpan(["fix"],[]),a=Ve.makeSpan([e.alignment],[r,n],t),i=Ve.makeSpan(["strut"]);return i.style.height=F(a.height+a.depth),a.depth&&(i.style.verticalAlign=F(-a.depth)),a.children.unshift(i),a=Ve.makeSpan(["thinbox"],[a],t),Ve.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:function(e,t){var r=new gt.MathNode("mpadded",[kt(e.body,t)]);if("rlap"!==e.alignment){var n="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),Ze({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var r=e.funcName,n=e.parser,a=n.mode;n.switchMode("math");var i="\\("===r?"\\)":"$",o=n.parseExpression(!1,i);return n.expect(i),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",body:o}}}),Ze({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){throw new n("Mismatched "+e.funcName)}});var Zr=function(e,t){switch(t.style.size){case x.DISPLAY.size:return e.display;case x.TEXT.size:return e.text;case x.SCRIPT.size:return e.script;case x.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Ze({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(e,t){return{type:"mathchoice",mode:e.parser.mode,display:Qe(t[0]),text:Qe(t[1]),script:Qe(t[2]),scriptscript:Qe(t[3])}},htmlBuilder:function(e,t){var r=Zr(e,t),n=it(r,t,!1);return Ve.makeFragment(n)},mathmlBuilder:function(e,t){var r=Zr(e,t);return wt(r,t)}});var Kr=function(e,t,r,n,a,i,o){e=Ve.makeSpan([],[e]);var s,h,c,m=r&&l.isCharacterBox(r);if(t){var u=ct(t,n.havingStyle(a.sup()),n);h={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var p=ct(r,n.havingStyle(a.sub()),n);s={elem:p,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-p.height)}}if(h&&s){var d=n.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;c=Ve.makeVList({positionType:"bottom",positionData:d,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:F(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:F(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(s){var f=e.height-o;c=Ve.makeVList({positionType:"top",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:F(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},n)}else{if(!h)return e;var g=e.depth+o;c=Ve.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:F(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}var v=[c];if(s&&0!==i&&!m){var y=Ve.makeSpan(["mspace"],[],n);y.style.marginRight=F(i),v.unshift(y)}return Ve.makeSpan(["mop","op-limits"],v,n)},Jr=["\\smallint"],Qr=function(e,t){var r,n,a,i=!1;"supsub"===e.type?(r=e.sup,n=e.sub,a=qt(e.base,"op"),i=!0):a=qt(e,"op");var o,s=t.style,h=!1;if(s.size===x.DISPLAY.size&&a.symbol&&!l.contains(Jr,a.name)&&(h=!0),a.symbol){var c=h?"Size2-Regular":"Size1-Regular",m="";if("\\oiint"!==a.name&&"\\oiiint"!==a.name||(m=a.name.substr(1),a.name="oiint"===m?"\\iint":"\\iiint"),o=Ve.makeSymbol(a.name,c,"math",t,["mop","op-symbol",h?"large-op":"small-op"]),m.length>0){var u=o.italic,p=Ve.staticSvg(m+"Size"+(h?"2":"1"),t);o=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:p,shift:h?.08:0}]},t),a.name="\\"+m,o.classes.unshift("mop"),o.italic=u}}else if(a.body){var d=it(a.body,t,!0);1===d.length&&d[0]instanceof $?(o=d[0]).classes[0]="mop":o=Ve.makeSpan(["mop"],d,t)}else{for(var f=[],g=1;g<a.name.length;g++)f.push(Ve.mathsym(a.name[g],a.mode,t));o=Ve.makeSpan(["mop"],f,t)}var v=0,y=0;return(o instanceof $||"\\oiint"===a.name||"\\oiiint"===a.name)&&!a.suppressBaseShift&&(v=(o.height-o.depth)/2-t.fontMetrics().axisHeight,y=o.italic),i?Kr(o,r,n,t,s,y,v):(v&&(o.style.position="relative",o.style.top=F(v)),o)},en=function(e,t){var r;if(e.symbol)r=new dt("mo",[vt(e.name,e.mode)]),l.contains(Jr,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new dt("mo",xt(e.body,t));else{r=new dt("mi",[new ft(e.name.slice(1))]);var n=new dt("mo",[vt("⁡","text")]);r=e.parentIsSupSub?new dt("mrow",[r,n]):pt([r,n])}return r},tn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Ze({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:function(e,t){var r=e.parser,n=e.funcName;return 1===n.length&&(n=tn[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Qr,mathmlBuilder:en}),Ze({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=e.parser,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Qe(n)}},htmlBuilder:Qr,mathmlBuilder:en});var rn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Ze({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler:function(e){var t=e.parser,r=e.funcName;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Qr,mathmlBuilder:en}),Ze({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(e){var t=e.parser,r=e.funcName;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Qr,mathmlBuilder:en}),Ze({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler:function(e){var t=e.parser,r=e.funcName;return 1===r.length&&(r=rn[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Qr,mathmlBuilder:en});var nn=function(e,t){var r,n,a,i,o=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,a=qt(e.base,"operatorname"),o=!0):a=qt(e,"operatorname"),a.body.length>0){for(var s=a.body.map((function(e){var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=it(s,t.withFont("mathrm"),!0),h=0;h<l.length;h++){var c=l[h];c instanceof $&&(c.text=c.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=Ve.makeSpan(["mop"],l,t)}else i=Ve.makeSpan(["mop"],[],t);return o?Kr(i,r,n,t,t.style,0,0):i};function an(e,t,r){for(var n=it(e,t,!1),a=t.sizeMultiplier/r.sizeMultiplier,i=0;i<n.length;i++){var o=n[i].classes.indexOf("sizing");o<0?Array.prototype.push.apply(n[i].classes,t.sizingClasses(r)):n[i].classes[o+1]==="reset-size"+t.size&&(n[i].classes[o+1]="reset-size"+r.size),n[i].height*=a,n[i].depth*=a}return Ve.makeFragment(n)}Ze({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"operatorname",mode:r.mode,body:Qe(a),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:nn,mathmlBuilder:function(e,t){for(var r=xt(e.body,t.withFont("mathrm")),n=!0,a=0;a<r.length;a++){var i=r[a];if(i instanceof gt.SpaceNode);else if(i instanceof gt.MathNode)switch(i.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var o=i.children[0];1===i.children.length&&o instanceof gt.TextNode?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}if(n){var s=r.map((function(e){return e.toText()})).join("");r=[new gt.TextNode(s)]}var l=new gt.MathNode("mi",r);l.setAttribute("mathvariant","normal");var h=new gt.MathNode("mo",[vt("⁡","text")]);return e.parentIsSupSub?new gt.MathNode("mrow",[l,h]):gt.newDocumentFragment([l,h])}}),Sr("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Ke({type:"ordgroup",htmlBuilder:function(e,t){return e.semisimple?Ve.makeFragment(it(e.body,t,!1)):Ve.makeSpan(["mord"],it(e.body,t,!0),t)},mathmlBuilder:function(e,t){return wt(e.body,t,!0)}}),Ze({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder:function(e,t){var r=ct(e.body,t.havingCrampedStyle()),n=Ve.makeLineSpan("overline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n},{type:"kern",size:a}]},t);return Ve.makeSpan(["mord","overline"],[i],t)},mathmlBuilder:function(e,t){var r=new gt.MathNode("mo",[new gt.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new gt.MathNode("mover",[kt(e.body,t),r]);return n.setAttribute("accent","true"),n}}),Ze({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[0];return{type:"phantom",mode:r.mode,body:Qe(n)}},htmlBuilder:function(e,t){var r=it(e.body,t.withPhantom(),!1);return Ve.makeFragment(r)},mathmlBuilder:function(e,t){var r=xt(e.body,t);return new gt.MathNode("mphantom",r)}}),Ze({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:function(e,t){var r=Ve.makeSpan([],[ct(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Ve.makeSpan(["mord"],[r],t)},mathmlBuilder:function(e,t){var r=xt(Qe(e.body),t),n=new gt.MathNode("mphantom",r),a=new gt.MathNode("mpadded",[n]);return a.setAttribute("height","0px"),a.setAttribute("depth","0px"),a}}),Ze({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:function(e,t){var r=Ve.makeSpan(["inner"],[ct(e.body,t.withPhantom())]),n=Ve.makeSpan(["fix"],[]);return Ve.makeSpan(["mord","rlap"],[r,n],t)},mathmlBuilder:function(e,t){var r=xt(Qe(e.body),t),n=new gt.MathNode("mphantom",r),a=new gt.MathNode("mpadded",[n]);return a.setAttribute("width","0px"),a}}),Ze({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=qt(t[0],"size").value,a=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:a}},htmlBuilder:function(e,t){var r=ct(e.body,t),n=P(e.dy,t);return Ve.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:function(e,t){var r=new gt.MathNode("mpadded",[kt(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),Ze({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler:function(e){return{type:"internal",mode:e.parser.mode}}}),Ze({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(e,t,r){var n=e.parser,a=r[0],i=qt(t[0],"size"),o=qt(t[1],"size");return{type:"rule",mode:n.mode,shift:a&&qt(a,"size").value,width:i.value,height:o.value}},htmlBuilder:function(e,t){var r=Ve.makeSpan(["mord","rule"],[],t),n=P(e.width,t),a=P(e.height,t),i=e.shift?P(e.shift,t):0;return r.style.borderRightWidth=F(n),r.style.borderTopWidth=F(a),r.style.bottom=F(i),r.width=n,r.height=a+i,r.depth=-i,r.maxFontSize=1.125*a*t.sizeMultiplier,r},mathmlBuilder:function(e,t){var r=P(e.width,t),n=P(e.height,t),a=e.shift?P(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new gt.MathNode("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",F(r)),o.setAttribute("height",F(n));var s=new gt.MathNode("mpadded",[o]);return a>=0?s.setAttribute("height",F(a)):(s.setAttribute("height",F(a)),s.setAttribute("depth",F(-a))),s.setAttribute("voffset",F(a)),s}});var on=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];Ze({type:"sizing",names:on,props:{numArgs:0,allowedInText:!0},handler:function(e,t){var r=e.breakOnTokenText,n=e.funcName,a=e.parser,i=a.parseExpression(!1,r);return{type:"sizing",mode:a.mode,size:on.indexOf(n)+1,body:i}},htmlBuilder:function(e,t){var r=t.havingSize(e.size);return an(e.body,r,t)},mathmlBuilder:function(e,t){var r=t.havingSize(e.size),n=xt(e.body,r),a=new gt.MathNode("mstyle",n);return a.setAttribute("mathsize",F(r.sizeMultiplier)),a}}),Ze({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(e,t,r){var n=e.parser,a=!1,i=!1,o=r[0]&&qt(r[0],"ordgroup");if(o)for(var s="",l=0;l<o.body.length;++l)if("t"===(s=o.body[l].text))a=!0;else{if("b"!==s){a=!1,i=!1;break}i=!0}else a=!0,i=!0;var h=t[0];return{type:"smash",mode:n.mode,body:h,smashHeight:a,smashDepth:i}},htmlBuilder:function(e,t){var r=Ve.makeSpan([],[ct(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var a=0;a<r.children.length;a++)r.children[a].depth=0;var i=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t);return Ve.makeSpan(["mord"],[i],t)},mathmlBuilder:function(e,t){var r=new gt.MathNode("mpadded",[kt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),Ze({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,r){var n=e.parser,a=r[0],i=t[0];return{type:"sqrt",mode:n.mode,body:i,index:a}},htmlBuilder:function(e,t){var r=ct(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=Ve.wrapFragment(r,t);var n=t.fontMetrics().defaultRuleThickness,a=n;t.style.id<x.TEXT.id&&(a=t.fontMetrics().xHeight);var i=n+a/4,o=r.height+r.depth+i+n,s=pr.sqrtImage(o,t),l=s.span,h=s.ruleWidth,c=s.advanceWidth,m=l.height-h;m>r.height+r.depth+i&&(i=(i+m-r.height-r.depth)/2);var u=l.height-r.height-i-h;r.style.paddingLeft=F(c);var p=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+u)},{type:"elem",elem:l},{type:"kern",size:h}]},t);if(e.index){var d=t.havingStyle(x.SCRIPTSCRIPT),f=ct(e.index,d,t),g=.6*(p.height-p.depth),v=Ve.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]},t),y=Ve.makeSpan(["root"],[v]);return Ve.makeSpan(["mord","sqrt"],[y,p],t)}return Ve.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder:function(e,t){var r=e.body,n=e.index;return n?new gt.MathNode("mroot",[kt(r,t),kt(n,t)]):new gt.MathNode("msqrt",[kt(r,t)])}});var sn={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT};Ze({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e,t){var r=e.breakOnTokenText,n=e.funcName,a=e.parser,i=a.parseExpression(!0,r),o=n.slice(1,n.length-5);return{type:"styling",mode:a.mode,style:o,body:i}},htmlBuilder:function(e,t){var r=sn[e.style],n=t.havingStyle(r).withFont("");return an(e.body,n,t)},mathmlBuilder:function(e,t){var r=sn[e.style],n=t.havingStyle(r),a=xt(e.body,n),i=new gt.MathNode("mstyle",a),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var ln=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===x.DISPLAY.size||r.alwaysHandleSupSub)?Qr:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===x.DISPLAY.size||r.limits)?nn:null:"accent"===r.type?l.isCharacterBox(r.base)?Rt:null:"horizBrace"===r.type&&!e.sub===r.isOver?jr:null:null};Ke({type:"supsub",htmlBuilder:function(e,t){var r=ln(e,t);if(r)return r(e,t);var n,a,i,o=e.base,s=e.sup,h=e.sub,c=ct(o,t),m=t.fontMetrics(),u=0,p=0,d=o&&l.isCharacterBox(o);if(s){var f=t.havingStyle(t.style.sup());n=ct(s,f,t),d||(u=c.height-f.fontMetrics().supDrop*f.sizeMultiplier/t.sizeMultiplier)}if(h){var g=t.havingStyle(t.style.sub());a=ct(h,g,t),d||(p=c.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}i=t.style===x.DISPLAY?m.sup1:t.style.cramped?m.sup3:m.sup2;var v,y=t.sizeMultiplier,b=F(.5/m.ptPerEm/y),w=null;if(a){var k=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof $||k)&&(w=F(-c.italic))}if(n&&a){u=Math.max(u,i,n.depth+.25*m.xHeight),p=Math.max(p,m.sub2);var S=4*m.defaultRuleThickness;if(u-n.depth-(a.height-p)<S){p=S-(u-n.depth)+a.height;var M=.8*m.xHeight-(u-n.depth);M>0&&(u+=M,p-=M)}var z=[{type:"elem",elem:a,shift:p,marginRight:b,marginLeft:w},{type:"elem",elem:n,shift:-u,marginRight:b}];v=Ve.makeVList({positionType:"individualShift",children:z},t)}else if(a){p=Math.max(p,m.sub1,a.height-.8*m.xHeight);var A=[{type:"elem",elem:a,marginLeft:w,marginRight:b}];v=Ve.makeVList({positionType:"shift",positionData:p,children:A},t)}else{if(!n)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,n.depth+.25*m.xHeight),v=Ve.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:n,marginRight:b}]},t)}var T=lt(c,"right")||"mord";return Ve.makeSpan([T],[c,Ve.makeSpan(["msupsub"],[v])],t)},mathmlBuilder:function(e,t){var r,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,i=[kt(e.base,t)];if(e.sub&&i.push(kt(e.sub,t)),e.sup&&i.push(kt(e.sup,t)),n)a=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;a=o&&"op"===o.type&&o.limits&&t.style===x.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===x.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===x.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===x.DISPLAY)?"munder":"msub"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===x.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===x.DISPLAY)?"mover":"msup"}return new gt.MathNode(a,i)}}),Ke({type:"atom",htmlBuilder:function(e,t){return Ve.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var r=new gt.MathNode("mo",[vt(e.text,e.mode)]);if("bin"===e.family){var n=bt(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var hn={mi:"italic",mn:"normal",mtext:"normal"};Ke({type:"mathord",htmlBuilder:function(e,t){return Ve.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var r=new gt.MathNode("mi",[vt(e.text,e.mode,t)]),n=bt(e,t)||"italic";return n!==hn[r.type]&&r.setAttribute("mathvariant",n),r}}),Ke({type:"textord",htmlBuilder:function(e,t){return Ve.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var r,n=vt(e.text,e.mode,t),a=bt(e,t)||"normal";return r="text"===e.mode?new gt.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new gt.MathNode("mn",[n]):"\\prime"===e.text?new gt.MathNode("mo",[n]):new gt.MathNode("mi",[n]),a!==hn[r.type]&&r.setAttribute("mathvariant",a),r}});var cn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},mn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ke({type:"spacing",htmlBuilder:function(e,t){if(mn.hasOwnProperty(e.text)){var r=mn[e.text].className||"";if("text"===e.mode){var a=Ve.makeOrd(e,t,"textord");return a.classes.push(r),a}return Ve.makeSpan(["mspace",r],[Ve.mathsym(e.text,e.mode,t)],t)}if(cn.hasOwnProperty(e.text))return Ve.makeSpan(["mspace",cn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!mn.hasOwnProperty(e.text)){if(cn.hasOwnProperty(e.text))return new gt.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return new gt.MathNode("mtext",[new gt.TextNode(" ")])}});var un=function(){var e=new gt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Ke({type:"tag",mathmlBuilder:function(e,t){var r=new gt.MathNode("mtable",[new gt.MathNode("mtr",[un(),new gt.MathNode("mtd",[wt(e.body,t)]),un(),new gt.MathNode("mtd",[wt(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var pn={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},dn={"\\textbf":"textbf","\\textmd":"textmd"},fn={"\\textit":"textit","\\textup":"textup"},gn=function(e,t){var r=e.font;return r?pn[r]?t.withTextFontFamily(pn[r]):dn[r]?t.withTextFontWeight(dn[r]):t.withTextFontShape(fn[r]):t};Ze({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"text",mode:r.mode,body:Qe(a),font:n}},htmlBuilder:function(e,t){var r=gn(e,t),n=it(e.body,r,!0);return Ve.makeSpan(["mord","text"],n,r)},mathmlBuilder:function(e,t){var r=gn(e,t);return wt(e.body,r)}}),Ze({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=ct(e.body,t),n=Ve.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ve.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]},t);return Ve.makeSpan(["mord","underline"],[i],t)},mathmlBuilder:function(e,t){var r=new gt.MathNode("mo",[new gt.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new gt.MathNode("munder",[kt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),Ze({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){return{type:"vcenter",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=ct(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Ve.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:function(e,t){return new gt.MathNode("mpadded",[kt(e.body,t)],["vcenter"])}}),Ze({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var r=vn(e),n=[],a=t.havingStyle(t.style.text()),i=0;i<r.length;i++){var o=r[i];"~"===o&&(o="\\textasciitilde"),n.push(Ve.makeSymbol(o,"Typewriter-Regular",e.mode,a,["mord","texttt"]))}return Ve.makeSpan(["mord","text"].concat(a.sizingClasses(t)),Ve.tryCombineChars(n),a)},mathmlBuilder:function(e,t){var r=new gt.TextNode(vn(e)),n=new gt.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var vn=function(e){return e.body.replace(/ /g,e.star?"␣":" ")},yn=We,bn=new RegExp("[̀-ͯ]+$"),xn=function(){function e(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-ï¿¿][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}var t=e.prototype;return t.setCatcode=function(e,t){this.catcodes[e]=t},t.lex=function(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new zr("EOF",new Mr(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new n("Unexpected character: '"+e[t]+"'",new zr(e[t],new Mr(this,t,t+1)));var a=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[a]){var i=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===i?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new zr(a,new Mr(this,t,this.tokenRegex.lastIndex))},e}(),wn=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}var t=e.prototype;return t.beginGroup=function(){this.undefStack.push({})},t.endGroup=function(){if(0===this.undefStack.length)throw new n("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])},t.endGroups=function(){for(;this.undefStack.length>0;)this.endGroup()},t.has=function(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)},t.get=function(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]},t.set=function(e,t,r){if(void 0===r&&(r=!1),r){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t},e}(),kn=kr;Sr("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Sr("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Sr("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Sr("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Sr("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Sr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Sr("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Sn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Sr("\\char",(function(e){var t,r=e.popToken(),a="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])a=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new n("\\char` missing argument");a=r.text.charCodeAt(0)}else t=10;if(t){if(null==(a=Sn[r.text])||a>=t)throw new n("Invalid base-"+t+" digit "+r.text);for(var i;null!=(i=Sn[e.future().text])&&i<t;)a*=t,a+=i,e.popToken()}return"\\@char{"+a+"}"}));var Mn=function(e,t,r){var a=e.consumeArg().tokens;if(1!==a.length)throw new n("\\newcommand's first argument must be a macro name");var i=a[0].text,o=e.isDefined(i);if(o&&!t)throw new n("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!o&&!r)throw new n("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var s=0;if(1===(a=e.consumeArg().tokens).length&&"["===a[0].text){for(var l="",h=e.expandNextToken();"]"!==h.text&&"EOF"!==h.text;)l+=h.text,h=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new n("Invalid number of arguments: "+l);s=parseInt(l),a=e.consumeArg().tokens}return e.macros.set(i,{tokens:a,numArgs:s}),""};Sr("\\newcommand",(function(e){return Mn(e,!1,!0)})),Sr("\\renewcommand",(function(e){return Mn(e,!0,!1)})),Sr("\\providecommand",(function(e){return Mn(e,!0,!0)})),Sr("\\message",(function(e){var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((function(e){return e.text})).join("")),""})),Sr("\\errmessage",(function(e){var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((function(e){return e.text})).join("")),""})),Sr("\\show",(function(e){var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),yn[r],ne.math[r],ne.text[r]),""})),Sr("\\bgroup","{"),Sr("\\egroup","}"),Sr("~","\\nobreakspace"),Sr("\\lq","`"),Sr("\\rq","'"),Sr("\\aa","\\r a"),Sr("\\AA","\\r A"),Sr("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Sr("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Sr("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Sr("ℬ","\\mathscr{B}"),Sr("ℰ","\\mathscr{E}"),Sr("ℱ","\\mathscr{F}"),Sr("ℋ","\\mathscr{H}"),Sr("ℐ","\\mathscr{I}"),Sr("ℒ","\\mathscr{L}"),Sr("ℳ","\\mathscr{M}"),Sr("ℛ","\\mathscr{R}"),Sr("ℭ","\\mathfrak{C}"),Sr("ℌ","\\mathfrak{H}"),Sr("ℨ","\\mathfrak{Z}"),Sr("\\Bbbk","\\Bbb{k}"),Sr("·","\\cdotp"),Sr("\\llap","\\mathllap{\\textrm{#1}}"),Sr("\\rlap","\\mathrlap{\\textrm{#1}}"),Sr("\\clap","\\mathclap{\\textrm{#1}}"),Sr("\\mathstrut","\\vphantom{(}"),Sr("\\underbar","\\underline{\\text{#1}}"),Sr("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Sr("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Sr("\\ne","\\neq"),Sr("≠","\\neq"),Sr("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Sr("∉","\\notin"),Sr("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Sr("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Sr("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Sr("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Sr("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Sr("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Sr("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Sr("⟂","\\perp"),Sr("‼","\\mathclose{!\\mkern-0.8mu!}"),Sr("∌","\\notni"),Sr("⌜","\\ulcorner"),Sr("⌝","\\urcorner"),Sr("⌞","\\llcorner"),Sr("⌟","\\lrcorner"),Sr("©","\\copyright"),Sr("®","\\textregistered"),Sr("️","\\textregistered"),Sr("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Sr("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Sr("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Sr("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Sr("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Sr("⋮","\\vdots"),Sr("\\varGamma","\\mathit{\\Gamma}"),Sr("\\varDelta","\\mathit{\\Delta}"),Sr("\\varTheta","\\mathit{\\Theta}"),Sr("\\varLambda","\\mathit{\\Lambda}"),Sr("\\varXi","\\mathit{\\Xi}"),Sr("\\varPi","\\mathit{\\Pi}"),Sr("\\varSigma","\\mathit{\\Sigma}"),Sr("\\varUpsilon","\\mathit{\\Upsilon}"),Sr("\\varPhi","\\mathit{\\Phi}"),Sr("\\varPsi","\\mathit{\\Psi}"),Sr("\\varOmega","\\mathit{\\Omega}"),Sr("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Sr("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Sr("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Sr("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Sr("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Sr("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var zn={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Sr("\\dots",(function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in zn?t=zn[r]:("\\not"===r.substr(0,4)||r in ne.math&&l.contains(["bin","rel"],ne.math[r].group))&&(t="\\dotsb"),t}));var An={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Sr("\\dotso",(function(e){return e.future().text in An?"\\ldots\\,":"\\ldots"})),Sr("\\dotsc",(function(e){var t=e.future().text;return t in An&&","!==t?"\\ldots\\,":"\\ldots"})),Sr("\\cdots",(function(e){return e.future().text in An?"\\@cdots\\,":"\\@cdots"})),Sr("\\dotsb","\\cdots"),Sr("\\dotsm","\\cdots"),Sr("\\dotsi","\\!\\cdots"),Sr("\\dotsx","\\ldots\\,"),Sr("\\DOTSI","\\relax"),Sr("\\DOTSB","\\relax"),Sr("\\DOTSX","\\relax"),Sr("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Sr("\\,","\\tmspace+{3mu}{.1667em}"),Sr("\\thinspace","\\,"),Sr("\\>","\\mskip{4mu}"),Sr("\\:","\\tmspace+{4mu}{.2222em}"),Sr("\\medspace","\\:"),Sr("\\;","\\tmspace+{5mu}{.2777em}"),Sr("\\thickspace","\\;"),Sr("\\!","\\tmspace-{3mu}{.1667em}"),Sr("\\negthinspace","\\!"),Sr("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Sr("\\negthickspace","\\tmspace-{5mu}{.277em}"),Sr("\\enspace","\\kern.5em "),Sr("\\enskip","\\hskip.5em\\relax"),Sr("\\quad","\\hskip1em\\relax"),Sr("\\qquad","\\hskip2em\\relax"),Sr("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Sr("\\tag@paren","\\tag@literal{({#1})}"),Sr("\\tag@literal",(function(e){if(e.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Sr("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Sr("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Sr("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Sr("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Sr("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Sr("\\newline","\\\\\\relax"),Sr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Tn=F(A["Main-Regular"]["T".charCodeAt(0)][1]-.7*A["Main-Regular"]["A".charCodeAt(0)][1]);Sr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Tn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Sr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Tn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Sr("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Sr("\\@hspace","\\hskip #1\\relax"),Sr("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Sr("\\ordinarycolon",":"),Sr("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Sr("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Sr("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Sr("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Sr("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Sr("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Sr("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Sr("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Sr("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Sr("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Sr("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Sr("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Sr("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Sr("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Sr("∷","\\dblcolon"),Sr("∹","\\eqcolon"),Sr("≔","\\coloneqq"),Sr("≕","\\eqqcolon"),Sr("â©´","\\Coloneqq"),Sr("\\ratio","\\vcentcolon"),Sr("\\coloncolon","\\dblcolon"),Sr("\\colonequals","\\coloneqq"),Sr("\\coloncolonequals","\\Coloneqq"),Sr("\\equalscolon","\\eqqcolon"),Sr("\\equalscoloncolon","\\Eqqcolon"),Sr("\\colonminus","\\coloneq"),Sr("\\coloncolonminus","\\Coloneq"),Sr("\\minuscolon","\\eqcolon"),Sr("\\minuscoloncolon","\\Eqcolon"),Sr("\\coloncolonapprox","\\Colonapprox"),Sr("\\coloncolonsim","\\Colonsim"),Sr("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Sr("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Sr("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Sr("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Sr("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Sr("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Sr("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Sr("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Sr("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Sr("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Sr("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Sr("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Sr("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Sr("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Sr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Sr("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Sr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Sr("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Sr("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Sr("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Sr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Sr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Sr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Sr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Sr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Sr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Sr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Sr("\\imath","\\html@mathml{\\@imath}{ı}"),Sr("\\jmath","\\html@mathml{\\@jmath}{È·}"),Sr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Sr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Sr("⟦","\\llbracket"),Sr("⟧","\\rrbracket"),Sr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Sr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Sr("⦃","\\lBrace"),Sr("⦄","\\rBrace"),Sr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Sr("⦵","\\minuso"),Sr("\\darr","\\downarrow"),Sr("\\dArr","\\Downarrow"),Sr("\\Darr","\\Downarrow"),Sr("\\lang","\\langle"),Sr("\\rang","\\rangle"),Sr("\\uarr","\\uparrow"),Sr("\\uArr","\\Uparrow"),Sr("\\Uarr","\\Uparrow"),Sr("\\N","\\mathbb{N}"),Sr("\\R","\\mathbb{R}"),Sr("\\Z","\\mathbb{Z}"),Sr("\\alef","\\aleph"),Sr("\\alefsym","\\aleph"),Sr("\\Alpha","\\mathrm{A}"),Sr("\\Beta","\\mathrm{B}"),Sr("\\bull","\\bullet"),Sr("\\Chi","\\mathrm{X}"),Sr("\\clubs","\\clubsuit"),Sr("\\cnums","\\mathbb{C}"),Sr("\\Complex","\\mathbb{C}"),Sr("\\Dagger","\\ddagger"),Sr("\\diamonds","\\diamondsuit"),Sr("\\empty","\\emptyset"),Sr("\\Epsilon","\\mathrm{E}"),Sr("\\Eta","\\mathrm{H}"),Sr("\\exist","\\exists"),Sr("\\harr","\\leftrightarrow"),Sr("\\hArr","\\Leftrightarrow"),Sr("\\Harr","\\Leftrightarrow"),Sr("\\hearts","\\heartsuit"),Sr("\\image","\\Im"),Sr("\\infin","\\infty"),Sr("\\Iota","\\mathrm{I}"),Sr("\\isin","\\in"),Sr("\\Kappa","\\mathrm{K}"),Sr("\\larr","\\leftarrow"),Sr("\\lArr","\\Leftarrow"),Sr("\\Larr","\\Leftarrow"),Sr("\\lrarr","\\leftrightarrow"),Sr("\\lrArr","\\Leftrightarrow"),Sr("\\Lrarr","\\Leftrightarrow"),Sr("\\Mu","\\mathrm{M}"),Sr("\\natnums","\\mathbb{N}"),Sr("\\Nu","\\mathrm{N}"),Sr("\\Omicron","\\mathrm{O}"),Sr("\\plusmn","\\pm"),Sr("\\rarr","\\rightarrow"),Sr("\\rArr","\\Rightarrow"),Sr("\\Rarr","\\Rightarrow"),Sr("\\real","\\Re"),Sr("\\reals","\\mathbb{R}"),Sr("\\Reals","\\mathbb{R}"),Sr("\\Rho","\\mathrm{P}"),Sr("\\sdot","\\cdot"),Sr("\\sect","\\S"),Sr("\\spades","\\spadesuit"),Sr("\\sub","\\subset"),Sr("\\sube","\\subseteq"),Sr("\\supe","\\supseteq"),Sr("\\Tau","\\mathrm{T}"),Sr("\\thetasym","\\vartheta"),Sr("\\weierp","\\wp"),Sr("\\Zeta","\\mathrm{Z}"),Sr("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Sr("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Sr("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Sr("\\bra","\\mathinner{\\langle{#1}|}"),Sr("\\ket","\\mathinner{|{#1}\\rangle}"),Sr("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Sr("\\Bra","\\left\\langle#1\\right|"),Sr("\\Ket","\\left|#1\\right\\rangle");var Bn=function(e){return function(t){var r=t.consumeArg().tokens,n=t.consumeArg().tokens,a=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=function(t){return function(r){e&&(r.macros.set("|",o),a.length&&r.macros.set("\\|",s));var i=t;return!t&&a.length&&"|"===r.future().text&&(r.popToken(),i=!0),{tokens:i?a:n,numArgs:0}}};t.macros.set("|",l(!1)),a.length&&t.macros.set("\\|",l(!0));var h=t.consumeArg().tokens,c=t.expandTokens([].concat(i,h,r));return t.macros.endGroup(),{tokens:c.reverse(),numArgs:0}}};Sr("\\bra@ket",Bn(!1)),Sr("\\bra@set",Bn(!0)),Sr("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Sr("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Sr("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Sr("\\angln","{\\angl n}"),Sr("\\blue","\\textcolor{##6495ed}{#1}"),Sr("\\orange","\\textcolor{##ffa500}{#1}"),Sr("\\pink","\\textcolor{##ff00af}{#1}"),Sr("\\red","\\textcolor{##df0030}{#1}"),Sr("\\green","\\textcolor{##28ae7b}{#1}"),Sr("\\gray","\\textcolor{gray}{#1}"),Sr("\\purple","\\textcolor{##9d38bd}{#1}"),Sr("\\blueA","\\textcolor{##ccfaff}{#1}"),Sr("\\blueB","\\textcolor{##80f6ff}{#1}"),Sr("\\blueC","\\textcolor{##63d9ea}{#1}"),Sr("\\blueD","\\textcolor{##11accd}{#1}"),Sr("\\blueE","\\textcolor{##0c7f99}{#1}"),Sr("\\tealA","\\textcolor{##94fff5}{#1}"),Sr("\\tealB","\\textcolor{##26edd5}{#1}"),Sr("\\tealC","\\textcolor{##01d1c1}{#1}"),Sr("\\tealD","\\textcolor{##01a995}{#1}"),Sr("\\tealE","\\textcolor{##208170}{#1}"),Sr("\\greenA","\\textcolor{##b6ffb0}{#1}"),Sr("\\greenB","\\textcolor{##8af281}{#1}"),Sr("\\greenC","\\textcolor{##74cf70}{#1}"),Sr("\\greenD","\\textcolor{##1fab54}{#1}"),Sr("\\greenE","\\textcolor{##0d923f}{#1}"),Sr("\\goldA","\\textcolor{##ffd0a9}{#1}"),Sr("\\goldB","\\textcolor{##ffbb71}{#1}"),Sr("\\goldC","\\textcolor{##ff9c39}{#1}"),Sr("\\goldD","\\textcolor{##e07d10}{#1}"),Sr("\\goldE","\\textcolor{##a75a05}{#1}"),Sr("\\redA","\\textcolor{##fca9a9}{#1}"),Sr("\\redB","\\textcolor{##ff8482}{#1}"),Sr("\\redC","\\textcolor{##f9685d}{#1}"),Sr("\\redD","\\textcolor{##e84d39}{#1}"),Sr("\\redE","\\textcolor{##bc2612}{#1}"),Sr("\\maroonA","\\textcolor{##ffbde0}{#1}"),Sr("\\maroonB","\\textcolor{##ff92c6}{#1}"),Sr("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Sr("\\maroonD","\\textcolor{##ca337c}{#1}"),Sr("\\maroonE","\\textcolor{##9e034e}{#1}"),Sr("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Sr("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Sr("\\purpleC","\\textcolor{##aa87ff}{#1}"),Sr("\\purpleD","\\textcolor{##7854ab}{#1}"),Sr("\\purpleE","\\textcolor{##543b78}{#1}"),Sr("\\mintA","\\textcolor{##f5f9e8}{#1}"),Sr("\\mintB","\\textcolor{##edf2df}{#1}"),Sr("\\mintC","\\textcolor{##e0e5cc}{#1}"),Sr("\\grayA","\\textcolor{##f6f7f7}{#1}"),Sr("\\grayB","\\textcolor{##f0f1f2}{#1}"),Sr("\\grayC","\\textcolor{##e3e5e6}{#1}"),Sr("\\grayD","\\textcolor{##d6d8da}{#1}"),Sr("\\grayE","\\textcolor{##babec2}{#1}"),Sr("\\grayF","\\textcolor{##888d93}{#1}"),Sr("\\grayG","\\textcolor{##626569}{#1}"),Sr("\\grayH","\\textcolor{##3b3e40}{#1}"),Sr("\\grayI","\\textcolor{##21242c}{#1}"),Sr("\\kaBlue","\\textcolor{##314453}{#1}"),Sr("\\kaGreen","\\textcolor{##71B307}{#1}");var Cn={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Nn=function(){function e(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new wn(kn,t.macros),this.mode=r,this.stack=[]}var t=e.prototype;return t.feed=function(e){this.lexer=new xn(e,this.settings)},t.switchMode=function(e){this.mode=e},t.beginGroup=function(){this.macros.beginGroup()},t.endGroup=function(){this.macros.endGroup()},t.endGroups=function(){this.macros.endGroups()},t.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},t.popToken=function(){return this.future(),this.stack.pop()},t.pushToken=function(e){this.stack.push(e)},t.pushTokens=function(e){var t;(t=this.stack).push.apply(t,e)},t.scanArgument=function(e){var t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken();var a=this.consumeArg(["]"]);n=a.tokens,r=a.end}else{var i=this.consumeArg();n=i.tokens,t=i.start,r=i.end}return this.pushToken(new zr("EOF",r.loc)),this.pushTokens(n),t.range(r,"")},t.consumeSpaces=function(){for(;" "===this.future().text;)this.stack.pop()},t.consumeArg=function(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var a,i=this.future(),o=0,s=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++o;else if("}"===a.text){if(-1==--o)throw new n("Extra }",a)}else if("EOF"===a.text)throw new n("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",a);if(e&&r)if((0===o||1===o&&"{"===e[s])&&a.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:a}},t.consumeArgs=function(e,t){if(t){if(t.length!==e+1)throw new n("The length of delimiters doesn't match the number of args!");for(var r=t[0],a=0;a<r.length;a++){var i=this.popToken();if(r[a]!==i.text)throw new n("Use of the macro doesn't match its definition",i)}}for(var o=[],s=0;s<e;s++)o.push(this.consumeArg(t&&t[s+1]).tokens);return o},t.expandOnce=function(e){var t=this.popToken(),r=t.text,a=t.noexpand?null:this._getExpansion(r);if(null==a||e&&a.unexpandable){if(e&&null==a&&"\\"===r[0]&&!this.isDefined(r))throw new n("Undefined control sequence: "+r);return this.pushToken(t),t}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting");var i=a.tokens,o=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs)for(var s=(i=i.slice()).length-1;s>=0;--s){var l=i[s];if("#"===l.text){if(0===s)throw new n("Incomplete placeholder at end of macro body",l);if("#"===(l=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new n("Not a valid argument number",l);var h;(h=i).splice.apply(h,[s,2].concat(o[+l.text-1]))}}}return this.pushTokens(i),i},t.expandAfterFuture=function(){return this.expandOnce(),this.future()},t.expandNextToken=function(){for(;;){var e=this.expandOnce();if(e instanceof zr)return e.treatAsRelax&&(e.text="\\relax"),this.stack.pop()}throw new Error},t.expandMacro=function(e){return this.macros.has(e)?this.expandTokens([new zr(e)]):void 0},t.expandTokens=function(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;){var n=this.expandOnce(!0);n instanceof zr&&(n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(this.stack.pop()))}return t},t.expandMacroAsText=function(e){var t=this.expandMacro(e);return t?t.map((function(e){return e.text})).join(""):t},t._getExpansion=function(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var n="function"==typeof t?t(this):t;if("string"==typeof n){var a=0;if(-1!==n.indexOf("#"))for(var i=n.replace(/##/g,"");-1!==i.indexOf("#"+(a+1));)++a;for(var o=new xn(n,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:a}}return n},t.isDefined=function(e){return this.macros.has(e)||yn.hasOwnProperty(e)||ne.math.hasOwnProperty(e)||ne.text.hasOwnProperty(e)||Cn.hasOwnProperty(e)},t.isExpandable=function(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:yn.hasOwnProperty(e)&&!yn[e].primitive},e}(),qn=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,In=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","áµ¢":"i","â±¼":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","áµ£":"r","ₛ":"s","ₜ":"t","ᵤ":"u","áµ¥":"v","ₓ":"x","ᵦ":"β","áµ§":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","á´¬":"A","á´®":"B","á´°":"D","á´±":"E","á´³":"G","á´´":"H","á´µ":"I","á´¶":"J","á´·":"K","á´¸":"L","á´¹":"M","á´º":"N","á´¼":"O","á´¾":"P","á´¿":"R","ᵀ":"T","ᵁ":"U","â±½":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","á¶ ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","Ë¡":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","Ë¢":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","Ê·":"w","Ë£":"x","ʸ":"y","á¶»":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","áµ ":"ϕ","ᵡ":"χ","á¶¿":"θ"}),On={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Rn={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","Ç¡":"ǡ","Ã¥":"å","Ç»":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","È©":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","Ä¡":"ġ","Ä£":"ģ","ḧ":"ḧ","ȟ":"ȟ","Ä¥":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","Ä©":"ĩ","Ä«":"ī","Ä­":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","Ç©":"ǩ","Ä·":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","È«":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","È­":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","á¹¥":"ṥ","Å¡":"š","á¹§":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","Å¥":"ť","ṫ":"ṫ","Å£":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","Å©":"ũ","á¹¹":"ṹ","Å«":"ū","á¹»":"ṻ","Å­":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","á¹½":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","Å·":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ç ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ç´":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ä ":"Ġ","Ä¢":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ä´":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ä»":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","È®":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Å ":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","á¹ ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Å¢":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Å®":"Ů","Ű":"Ű","á¹¼":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Å´":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Å»":"Ż","ά":"ά","á½°":"ὰ","á¾±":"ᾱ","á¾°":"ᾰ","έ":"έ","á½²":"ὲ","ή":"ή","á½´":"ὴ","ί":"ί","á½¶":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","á¿¢":"ῢ","á¿¡":"ῡ","á¿ ":"ῠ","ώ":"ώ","á½¼":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","á¿©":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},Hn=function(){function e(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Nn(e,t,this.mode),this.settings=t,this.leftrightDepth=0}var t=e.prototype;return t.expect=function(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new n("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()},t.consume=function(){this.nextToken=null},t.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},t.switchMode=function(e){this.mode=e,this.gullet.switchMode(e)},t.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}},t.subparse=function(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new zr("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r},t.parseExpression=function(t,r){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(-1!==e.endOfExpression.indexOf(a.text))break;if(r&&a.text===r)break;if(t&&yn[a.text]&&yn[a.text].infix)break;var i=this.parseAtom(r);if(!i)break;"internal"!==i.type&&n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)},t.handleInfixNodes=function(e){for(var t,r=-1,a=0;a<e.length;a++)if("infix"===e[a].type){if(-1!==r)throw new n("only one infix operator per group",e[a].token);r=a,t=e[a].replaceWith}if(-1!==r&&t){var i,o,s=e.slice(0,r),l=e.slice(r+1);return i=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},o=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[i,e[r],o],[]):this.callFunction(t,[i,o],[])]}return e},t.handleSupSubscript=function(e){var t=this.fetch(),r=t.text;this.consume(),this.consumeSpaces();var a=this.parseGroup(e);if(!a)throw new n("Expected group after '"+r+"'",t);return a},t.formatUnsupportedCmd=function(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var n={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]}},t.parseAtom=function(t){var r,a,i=this.parseGroup("atom",t);if("text"===this.mode)return i;for(;;){this.consumeSpaces();var o=this.fetch();if("\\limits"===o.text||"\\nolimits"===o.text){if(i&&"op"===i.type){var s="\\limits"===o.text;i.limits=s,i.alwaysHandleSupSub=!0}else{if(!i||"operatorname"!==i.type)throw new n("Limit controls must follow a math operator",o);i.alwaysHandleSupSub&&(i.limits="\\limits"===o.text)}this.consume()}else if("^"===o.text){if(r)throw new n("Double superscript",o);r=this.handleSupSubscript("superscript")}else if("_"===o.text){if(a)throw new n("Double subscript",o);a=this.handleSupSubscript("subscript")}else if("'"===o.text){if(r)throw new n("Double superscript",o);var l={type:"textord",mode:this.mode,text:"\\prime"},h=[l];for(this.consume();"'"===this.fetch().text;)h.push(l),this.consume();"^"===this.fetch().text&&h.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:h}}else{if(!In[o.text])break;var c=In[o.text],m=qn.test(o.text);for(this.consume();;){var u=this.fetch().text;if(!In[u])break;if(qn.test(u)!==m)break;this.consume(),c+=In[u]}var p=new e(c,this.settings).parse();m?a={type:"ordgroup",mode:"math",body:p}:r={type:"ordgroup",mode:"math",body:p}}}return r||a?{type:"supsub",mode:this.mode,base:i,sup:r,sub:a}:i},t.parseFunction=function(e,t){var r=this.fetch(),a=r.text,i=yn[a];if(!i)return null;if(this.consume(),t&&"atom"!==t&&!i.allowedInArgument)throw new n("Got function '"+a+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!i.allowedInText)throw new n("Can't use function '"+a+"' in text mode",r);if("math"===this.mode&&!1===i.allowedInMath)throw new n("Can't use function '"+a+"' in math mode",r);var o=this.parseArguments(a,i),s=o.args,l=o.optArgs;return this.callFunction(a,s,l,r,e)},t.callFunction=function(e,t,r,a,i){var o={funcName:e,parser:this,token:a,breakOnTokenText:i},s=yn[e];if(s&&s.handler)return s.handler(o,t,r);throw new n("No function handler for "+e)},t.parseArguments=function(e,t){var r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var a=[],i=[],o=0;o<r;o++){var s=t.argTypes&&t.argTypes[o],l=o<t.numOptionalArgs;(t.primitive&&null==s||"sqrt"===t.type&&1===o&&null==i[0])&&(s="primitive");var h=this.parseGroupOfType("argument to '"+e+"'",s,l);if(l)i.push(h);else{if(null==h)throw new n("Null argument, please report this as a bug");a.push(h)}}return{args:a,optArgs:i}},t.parseGroupOfType=function(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var a=this.parseArgumentGroup(r,"text");return null!=a?{type:"styling",mode:a.mode,body:[a],style:"text"}:null;case"raw":var i=this.parseStringGroup("raw",r);return null!=i?{type:"raw",mode:"text",string:i.text}:null;case"primitive":if(r)throw new n("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new n("Expected group as "+e,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new n("Unknown group type as "+e,this.fetch())}},t.consumeSpaces=function(){for(;" "===this.fetch().text;)this.consume()},t.parseStringGroup=function(e,t){var r=this.gullet.scanArgument(t);if(null==r)return null;for(var n,a="";"EOF"!==(n=this.fetch()).text;)a+=n.text,this.consume();return this.consume(),r.text=a,r},t.parseRegexGroup=function(e,t){for(var r,a=this.fetch(),i=a,o="";"EOF"!==(r=this.fetch()).text&&e.test(o+r.text);)o+=(i=r).text,this.consume();if(""===o)throw new n("Invalid "+t+": '"+a.text+"'",a);return a.range(i,o)},t.parseColorGroup=function(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new n("Invalid color: '"+t.text+"'",t);var a=r[0];return/^[0-9a-f]{6}$/i.test(a)&&(a="#"+a),{type:"color-token",mode:this.mode,color:a}},t.parseSizeGroup=function(e){var t,r=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",r=!0);var a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!a)throw new n("Invalid size: '"+t.text+"'",t);var i={number:+(a[1]+a[2]),unit:a[3]};if(!D(i))throw new n("Invalid unit: '"+i.unit+"'",t);return{type:"size",mode:this.mode,value:i,isBlank:r}},t.parseUrlGroup=function(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}},t.parseArgumentGroup=function(e,t){var r=this.gullet.scanArgument(e);if(null==r)return null;var n=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:r.loc,body:a};return t&&this.switchMode(n),i},t.parseGroup=function(e,t){var r,a=this.fetch(),i=a.text;if("{"===i||"\\begingroup"===i){this.consume();var o="{"===i?"}":"\\endgroup";this.gullet.beginGroup();var s=this.parseExpression(!1,o),l=this.fetch();this.expect(o),this.gullet.endGroup(),r={type:"ordgroup",mode:this.mode,loc:Mr.range(a,l),body:s,semisimple:"\\begingroup"===i||void 0}}else if(null==(r=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===i[0]&&!Cn.hasOwnProperty(i)){if(this.settings.throwOnError)throw new n("Undefined control sequence: "+i,a);r=this.formatUnsupportedCmd(i),this.consume()}return r},t.formLigatures=function(e){for(var t=e.length-1,r=0;r<t;++r){var n=e[r],a=n.text;"-"===a&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:Mr.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:Mr.range(n,e[r+1]),text:"--"}),t-=1)),"'"!==a&&"`"!==a||e[r+1].text!==a||(e.splice(r,2,{type:"textord",mode:"text",loc:Mr.range(n,e[r+1]),text:a+a}),t-=1)}},t.parseSymbol=function(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var r=t.slice(5),a="*"===r.charAt(0);if(a&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new n("\\verb assertion failed --\n                    please report what input caused this bug");return{type:"verb",mode:"text",body:r=r.slice(1,-1),star:a}}Rn.hasOwnProperty(t[0])&&!ne[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=Rn[t[0]]+t.substr(1));var i,o=bn.exec(t);if(o&&("i"===(t=t.substring(0,o.index))?t="ı":"j"===t&&(t="È·")),ne[this.mode][t]){this.settings.strict&&"math"===this.mode&&"ÐÞþ".indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s,l=ne[this.mode][t].group,h=Mr.range(e);if(ee.hasOwnProperty(l)){var c=l;s={type:"atom",mode:this.mode,family:c,loc:h,text:t}}else s={type:l,mode:this.mode,loc:h,text:t};i=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(S(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),i={type:"textord",mode:"text",loc:Mr.range(e),text:t}}if(this.consume(),o)for(var m=0;m<o[0].length;m++){var u=o[0][m];if(!On[u])throw new n("Unknown accent ' "+u+"'",e);var p=On[u][this.mode]||On[u].text;if(!p)throw new n("Accent "+u+" unsupported in "+this.mode+" mode",e);i={type:"accent",mode:this.mode,loc:Mr.range(e),label:p,isStretchy:!1,isShifty:!0,base:i}}return i},e}();Hn.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var En=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new Hn(e,t);delete r.gullet.macros.current["\\df@tag"];var a=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new n("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:r.subparse([new zr("\\df@tag")])}]}return a},Ln=function(e,t,r){t.textContent="";var n=Pn(e,r).toNode();t.appendChild(n)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Ln=function(){throw new n("KaTeX doesn't work in quirks mode.")});var Dn=function(e,t,r){if(r.throwOnError||!(e instanceof n))throw e;var a=Ve.makeSpan(["katex-error"],[new $(t)]);return a.setAttribute("title",e.toString()),a.setAttribute("style","color:"+r.errorColor),a},Pn=function(e,t){var r=new m(t);try{return function(e,t,r){var n,a=Mt(r);if("mathml"===r.output)return St(e,t,a,r.displayMode,!0);if("html"===r.output){var i=ut(e,a);n=Ve.makeSpan(["katex"],[i])}else{var o=St(e,t,a,r.displayMode,!1),s=ut(e,a);n=Ve.makeSpan(["katex"],[o,s])}return zt(n,r)}(En(e,r),e,r)}catch(t){return Dn(t,e,r)}},Fn={version:"0.16.0",render:Ln,renderToString:function(e,t){return Pn(e,t).toMarkup()},ParseError:n,SETTINGS_SCHEMA:h,__parse:function(e,t){var r=new m(t);return En(e,r)},__renderToDomTree:Pn,__renderToHTMLTree:function(e,t){var r=new m(t);try{return function(e,t,r){var n=ut(e,Mt(r)),a=Ve.makeSpan(["katex"],[n]);return zt(a,r)}(En(e,r),0,r)}catch(t){return Dn(t,e,r)}},__setFontMetrics:function(e,t){A[e]=t},__defineSymbol:ae,__defineMacro:Sr,__domTree:{Span:Y,Anchor:X,SymbolNode:$,SvgNode:Z,PathNode:K,LineNode:J}};return t=t.default}()},e.exports=n()},function(e,t,r){}])};module.exports=t();
node_modules/mp-html/plugins/markdown/README.md
New file
@@ -0,0 +1,17 @@
# markdown
功能:渲染 *markdown*
大小:*≈37KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš |
说明:
引入本插件后,会给组件添加一个 *markdown* å±žæ€§ï¼Œå°†è¯¥å±žæ€§è®¾ç½®ä¸º *true* åŽï¼Œå³å¯é€šè¿‡ *content* å±žæ€§æˆ– *setContent* æ–¹æ³•设置 *markdown* å†…容即可
若开启 *use-anchor* å±žæ€§ï¼Œæ‰€æœ‰æ ‡é¢˜ `*# xxx*` éƒ½ä¼šè¢«è®¾ç½®ä¸ºé”šç‚¹ï¼Œé€šè¿‡é“¾æŽ¥ `[xxx](#xxx)` å¯ä»¥ç›´æŽ¥è·³è½¬
> æœ¬æ’件通过 [marked](https://github.com/markedjs/marked) è§£æž *markdown* æ–‡æœ¬ï¼Œéƒ¨åˆ† *css* æ‘˜é€‰è‡ª [github-markdown-css](https://github.com/sindresorhus/github-markdown-css)
> æœ¬æ’件可以和 *highlight* æ’件共用,实现 *markdown* ä¸­ä»£ç å—的高亮效果
node_modules/mp-html/plugins/markdown/index.js
New file
@@ -0,0 +1,34 @@
/**
 * @fileoverview markdown æ’ä»¶
 * Include marked (https://github.com/markedjs/marked)
 * Include github-markdown-css (https://github.com/sindresorhus/github-markdown-css)
 */
const marked = require('./marked.min')
let index = 0
function Markdown (vm) {
  this.vm = vm
  vm._ids = {}
}
Markdown.prototype.onUpdate = function (content) {
  if (this.vm.properties.markdown) {
    return marked(content)
  }
}
Markdown.prototype.onParse = function (node, vm) {
  if (vm.options.markdown) {
    // ä¸­æ–‡ id éœ€è¦è½¬æ¢ï¼Œå¦åˆ™æ— æ³•跳转
    if (vm.options.useAnchor && node.attrs && /[\u4e00-\u9fa5]/.test(node.attrs.id)) {
      const id = 't' + index++
      this.vm._ids[node.attrs.id] = id
      node.attrs.id = id
    }
    if (node.name === 'p' || node.name === 'table' || node.name === 'tr' || node.name === 'th' || node.name === 'td' || node.name === 'blockquote' || node.name === 'pre' || node.name === 'code') {
      node.attrs.class = `md-${node.name} ${node.attrs.class || ''}`
    }
  }
}
module.exports = Markdown
node_modules/mp-html/plugins/markdown/marked.min.js
New file
@@ -0,0 +1,6 @@
/*!
 * marked - a markdown parser
 * Copyright (c) 2011-2020, Christopher Jeffrey. (MIT Licensed)
 * https://github.com/markedjs/marked
 */
function t(){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){var n;if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator])return(n=e[Symbol.iterator]()).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(e){return c[e]}var e,t=(function(t){function e(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}t.exports={defaults:e(),getDefaults:e,changeDefaults:function(e){t.exports.defaults=e}}}(e={exports:{}}),e.exports),r=(t.defaults,t.getDefaults,t.changeDefaults,/[&<>"']/),l=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(e){return e.replace(u,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}var g=/(^|[^\[])\^/g;var f=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var k={},b=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,x=/^([^:]+:\/*[^/]*)[\s\S]*$/;function w(e,t){k[" "+e]||(b.test(e)?k[" "+e]=e+"/":k[" "+e]=v(e,"/",!0));var n=-1===(e=k[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(x,"$1")+t:e+t}function v(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i<r;){var s=e.charAt(r-i-1);if(s!==t||n){if(s===t||!n)break;i++}else i++}return e.substr(0,r-i)}var _=function(e,t){if(t){if(r.test(e))return e.replace(l,n)}else if(a.test(e))return e.replace(o,n);return e},y=h,z=function(n,e){n=n.source||n,e=e||"";var r={replace:function(e,t){return t=(t=t.source||t).replace(g,"$1"),n=n.replace(e,t),r},getRegex:function(){return new RegExp(n,e)}};return r},S=function(e,t,n){if(e){var r;try{r=decodeURIComponent(h(n)).replace(f,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!d.test(n)&&(n=w(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},$={exec:function(){}},A=function(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},R=function(e,t){var n=e.replace(/\|/g,function(e,t,n){for(var r=!1,i=t;0<=--i&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},T=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&--r<0)return i;return-1},I=function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")},Z=function(e,t){if(t<1)return"";for(var n="";1<t;)1&t&&(n+=e),t>>=1,e+=e;return n+e},q=t.defaults,O=v,C=R,U=_,j=T;function E(e,t,n){var r=t.href,i=t.title?U(t.title):null,t=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:t}:{type:"image",raw:n,href:r,title:i,text:U(t)}}var D=function(){function e(e){this.options=e||q}var t=e.prototype;return t.space=function(e){e=this.rules.block.newline.exec(e);if(e)return 1<e[0].length?{type:"space",raw:e[0]}:{raw:"\n"}},t.code=function(e,t){e=this.rules.block.code.exec(e);if(e){t=t[t.length-1];if(t&&"paragraph"===t.type)return{raw:e[0],text:e[0].trimRight()};t=e[0].replace(/^ {4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:O(t,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],e=function(e,t){if(null===(e=e.match(/^(\s+)(?:```)/)))return t;var n=e[1];return t.split("\n").map(function(e){var t=e.match(/^\s+/);return null!==t&&t[0].length>=n.length?e.slice(n.length):e}).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]&&t[2].trim(),text:e}}},t.heading=function(e){e=this.rules.block.heading.exec(e);if(e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},t.nptable=function(e){e=this.rules.block.nptable.exec(e);if(e){var t={type:"table",header:C(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(t.header.length===t.align.length){for(var n=t.align.length,r=0;r<n;r++)/^ *-+: *$/.test(t.align[r])?t.align[r]="right":/^ *:-+: *$/.test(t.align[r])?t.align[r]="center":/^ *:-+ *$/.test(t.align[r])?t.align[r]="left":t.align[r]=null;for(n=t.cells.length,r=0;r<n;r++)t.cells[r]=C(t.cells[r],t.header.length);return t}}},t.hr=function(e){e=this.rules.block.hr.exec(e);if(e)return{type:"hr",raw:e[0]}},t.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){e=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:e}}},t.list=function(e){e=this.rules.block.list.exec(e);if(e){for(var t,n,r,i,s,l=e[0],a=e[2],o=1<a.length,c={type:"list",raw:l,ordered:o,start:o?+a.slice(0,-1):"",loose:!1,items:[]},u=e[0].match(this.rules.block.item),p=!1,h=u.length,g=this.rules.block.listItemStart.exec(u[0]),f=0;f<h;f++){if(l=t=u[f],f!==h-1){if((r=this.rules.block.listItemStart.exec(u[f+1]))[1].length>g[0].length||3<r[1].length){u.splice(f,2,u[f]+"\n"+u[f+1]),f--,h--;continue}(!this.options.pedantic||this.options.smartLists?r[2][r[2].length-1]!==a[a.length-1]:o==(1===r[2].length))&&(n=u.slice(f+1).join("\n"),c.raw=c.raw.substring(0,c.raw.length-n.length),f=h-1),g=r}r=t.length,~(t=t.replace(/^ *([*+-]|\d+[.)]) ?/,"")).indexOf("\n ")&&(r-=t.length,t=this.options.pedantic?t.replace(/^ {1,4}/gm,""):t.replace(new RegExp("^ {1,"+r+"}","gm"),"")),r=p||/\n\n(?!\s*$)/.test(t),f!==h-1&&(p="\n"===t.charAt(t.length-1),r=r||p),r&&(c.loose=!0),this.options.gfm&&(s=void 0,(i=/^\[[ xX]\] /.test(t))&&(s=" "!==t[1],t=t.replace(/^\[[ xX]\] +/,""))),c.items.push({type:"list_item",raw:l,task:i,checked:s,loose:r,text:t})}return c}},t.html=function(e){e=this.rules.block.html.exec(e);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):U(e[0]):e[0]}},t.def=function(e){e=this.rules.block.def.exec(e);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}},t.table=function(e){e=this.rules.block.table.exec(e);if(e){var t={type:"table",header:C(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=e[0];for(var n=t.align.length,r=0;r<n;r++)/^ *-+: *$/.test(t.align[r])?t.align[r]="right":/^ *:-+: *$/.test(t.align[r])?t.align[r]="center":/^ *:-+ *$/.test(t.align[r])?t.align[r]="left":t.align[r]=null;for(n=t.cells.length,r=0;r<n;r++)t.cells[r]=C(t.cells[r].replace(/^ *\| *| *\| *$/g,""),t.header.length);return t}}},t.lheading=function(e){e=this.rules.block.lheading.exec(e);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1]}},t.paragraph=function(e){e=this.rules.block.paragraph.exec(e);if(e)return{type:"paragraph",raw:e[0],text:"\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1]}},t.text=function(e,t){e=this.rules.block.text.exec(e);if(e){t=t[t.length-1];return t&&"text"===t.type?{raw:e[0],text:e[0]}:{type:"text",raw:e[0],text:e[0]}}},t.escape=function(e){e=this.rules.inline.escape.exec(e);if(e)return{type:"escape",raw:e[0],text:U(e[1])}},t.tag=function(e,t,n){e=this.rules.inline.tag.exec(e);if(e)return!t&&/^<a /i.test(e[0])?t=!0:t&&/^<\/a>/i.test(e[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):U(e[0]):e[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){e=j(t[2],"()");-1<e&&(r=(0===t[0].indexOf("!")?5:4)+t[1].length+e,t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]="");var n,e=t[2],r="";return r=this.options.pedantic?(n=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(e),n?(e=n[1],n[3]):""):t[3]?t[3].slice(1,-1):"",E(t,{href:(e=e.trim().replace(/^<([\s\S]*)>$/,"$1"))&&e.replace(this.rules.inline._escapes,"$1"),title:r&&r.replace(this.rules.inline._escapes,"$1")},t[0])}},t.reflink=function(e,t){if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){e=(n[2]||n[1]).replace(/\s+/g," ");if((e=t[e.toLowerCase()])&&e.href)return E(n,e,n[0]);var n=n[0].charAt(0);return{type:"text",raw:n,text:n}}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,s="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(s.lastIndex=0;null!=(r=s.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,s="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(s.lastIndex=0;null!=(r=s.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),e=n.startsWith(" ")&&n.endsWith(" ");return r&&e&&(n=n.substring(1,n.length-1)),n=U(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){e=this.rules.inline.br.exec(e);if(e)return{type:"br",raw:e[0]}},t.del=function(e){e=this.rules.inline.del.exec(e);if(e)return{type:"del",raw:e[0],text:e[2]}},t.autolink=function(e,t){e=this.rules.inline.autolink.exec(e);if(e){var n,t="@"===e[2]?"mailto:"+(n=U(this.options.mangle?t(e[1]):e[1])):n=U(e[1]);return{type:"link",raw:e[0],text:n,href:t,tokens:[{type:"text",raw:n,text:n}]}}},t.url=function(e,t){var n,r,i,s;if(n=this.rules.inline.url.exec(e)){if("@"===n[2])i="mailto:"+(r=U(this.options.mangle?t(n[0]):n[0]));else{for(;s=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0],s!==n[0];);r=U(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){e=this.rules.inline.text.exec(e);if(e){n=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):U(e[0]):e[0]:U(this.options.smartypants?n(e[0]):e[0]);return{type:"text",raw:e[0],text:n}}},e}(),R=$,T=z,$=A,z={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:R,table:R,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};z.def=T(z.def).replace("label",z._label).replace("title",z._title).getRegex(),z.bullet=/(?:[*+-]|\d{1,9}[.)])/,z.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,z.item=T(z.item,"gm").replace(/bull/g,z.bullet).getRegex(),z.listItemStart=T(/^( *)(bull)/).replace("bull",z.bullet).getRegex(),z.list=T(z.list).replace(/bull/g,z.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+z.def.source+")").getRegex(),z._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",z._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,z.html=T(z.html,"i").replace("comment",z._comment).replace("tag",z._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),z.paragraph=T(z._paragraph).replace("hr",z.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",z._tag).getRegex(),z.blockquote=T(z.blockquote).replace("paragraph",z.paragraph).getRegex(),z.normal=$({},z),z.gfm=$({},z.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),z.gfm.nptable=T(z.gfm.nptable).replace("hr",z.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",z._tag).getRegex(),z.gfm.table=T(z.gfm.table).replace("hr",z.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",z._tag).getRegex(),z.pedantic=$({},z.normal,{html:T("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",z._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:R,paragraph:T(z.normal._paragraph).replace("hr",z.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",z.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});R={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:R,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:R,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};R.punctuation=T(R.punctuation).replace(/punctuation/g,R._punctuation).getRegex(),R._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",R._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",R._comment=T(z._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),R.em.start=T(R.em.start).replace(/punctuation/g,R._punctuation).getRegex(),R.em.middle=T(R.em.middle).replace(/punctuation/g,R._punctuation).replace(/overlapSkip/g,R._overlapSkip).getRegex(),R.em.endAst=T(R.em.endAst,"g").replace(/punctuation/g,R._punctuation).getRegex(),R.em.endUnd=T(R.em.endUnd,"g").replace(/punctuation/g,R._punctuation).getRegex(),R.strong.start=T(R.strong.start).replace(/punctuation/g,R._punctuation).getRegex(),R.strong.middle=T(R.strong.middle).replace(/punctuation/g,R._punctuation).replace(/overlapSkip/g,R._overlapSkip).getRegex(),R.strong.endAst=T(R.strong.endAst,"g").replace(/punctuation/g,R._punctuation).getRegex(),R.strong.endUnd=T(R.strong.endUnd,"g").replace(/punctuation/g,R._punctuation).getRegex(),R.blockSkip=T(R._blockSkip,"g").getRegex(),R.overlapSkip=T(R._overlapSkip,"g").getRegex(),R._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,R._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,R._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,R.autolink=T(R.autolink).replace("scheme",R._scheme).replace("email",R._email).getRegex(),R._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,R.tag=T(R.tag).replace("comment",R._comment).replace("attribute",R._attribute).getRegex(),R._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,R._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,R._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,R.link=T(R.link).replace("label",R._label).replace("href",R._href).replace("title",R._title).getRegex(),R.reflink=T(R.reflink).replace("label",R._label).getRegex(),R.reflinkSearch=T(R.reflinkSearch,"g").replace("reflink",R.reflink).replace("nolink",R.nolink).getRegex(),R.normal=$({},R),R.pedantic=$({},R.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:T(/^!?\[(label)\]\((.*?)\)/).replace("label",R._label).getRegex(),reflink:T(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",R._label).getRegex()}),R.gfm=$({},R.normal,{escape:T(R.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),R.gfm.url=T(R.gfm.url,"i").replace("email",R.gfm._extended_email).getRegex(),R.breaks=$({},R.gfm,{br:T(R.br).replace("{2,}","*").getRegex(),text:T(R.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var R={block:z,inline:R},P=t.defaults,L=R.block,N=R.inline,B=Z;function F(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function M(e){for(var t,n="",r=e.length,i=0;i<r;i++)t=e.charCodeAt(i),.5<Math.random()&&(t="x"+t.toString(16)),n+="&#"+t+";";return n}var W=function(){function n(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||P,this.options.tokenizer=this.options.tokenizer||new D,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;e={block:L.normal,inline:N.normal};this.options.pedantic?(e.block=L.pedantic,e.inline=N.pedantic):this.options.gfm&&(e.block=L.gfm,this.options.breaks?e.inline=N.breaks:e.inline=N.gfm),this.tokenizer.rules=e}n.lex=function(e,t){return new n(t).lex(e)},n.lexInline=function(e,t){return new n(t).inlineTokens(e)};var e,t,r=n.prototype;return r.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g,"    "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},r.blockTokens=function(e,t,n){var r,i,s,l;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((l=t[t.length-1]).raw+="\n"+r.raw,l.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),s=r.items.length,i=0;i<s;i++)r.items[i].tokens=this.blockTokens(r.items[i].text,[],!1);t.push(r)}else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.def(e)))e=e.substring(r.raw.length),this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.paragraph(e)))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.text(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((l=t[t.length-1]).raw+="\n"+r.raw,l.text+="\n"+r.text);else if(e){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return t},r.inline=function(e){for(var t,n,r,i,s,l=e.length,a=0;a<l;a++)switch((s=e[a]).type){case"paragraph":case"text":case"heading":s.tokens=[],this.inlineTokens(s.text,s.tokens);break;case"table":for(s.tokens={header:[],cells:[]},r=s.header.length,t=0;t<r;t++)s.tokens.header[t]=[],this.inlineTokens(s.header[t],s.tokens.header[t]);for(r=s.cells.length,t=0;t<r;t++)for(i=s.cells[t],s.tokens.cells[t]=[],n=0;n<i.length;n++)s.tokens.cells[t][n]=[],this.inlineTokens(i[n],s.tokens.cells[t][n]);break;case"blockquote":this.inline(s.tokens);break;case"list":for(r=s.items.length,t=0;t<r;t++)this.inline(s.items[t].tokens)}return e},r.inlineTokens=function(e,t,n,r){var i;void 0===t&&(t=[]),void 0===n&&(n=!1),void 0===r&&(r=!1);var s,l,a,o=e;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(0<c.length)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(o));)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,s.index)+"["+B("a",s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(o));)o=o.slice(0,s.index)+"["+B("a",s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(l||(a=""),l=!1,i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e,n,r))e=e.substring(i.raw.length),n=i.inLink,r=i.inRawBlock,t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.strong(e,o,a))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.em(e,o,a))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.autolink(e,M))e=e.substring(i.raw.length),t.push(i);else if(n||!(i=this.tokenizer.url(e,M))){if(i=this.tokenizer.inlineText(e,r,F))e=e.substring(i.raw.length),a=i.raw.slice(-1),l=!0,t.push(i);else if(e){var u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}throw new Error(u)}}else e=e.substring(i.raw.length),t.push(i);return t},e=n,t=[{key:"rules",get:function(){return{block:L,inline:N}}}],(r=null)&&i(e.prototype,r),t&&i(e,t),n}(),X=t.defaults,G=S,V=_,H=function(){function e(e){this.options=e||X}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];return!this.options.highlight||null!=(t=this.options.highlight(e,r))&&t!==e&&(n=!0,e=t),r?'<pre><code class="'+this.options.langPrefix+V(r,!0)+'">'+(n?e:V(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:V(e,!0))+"</code></pre>\n"},t.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},t.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},t.listitem=function(e){return"<li>"+e+"</li>\n"},t.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},t.paragraph=function(e){return"<p>"+e+"</p>\n"},t.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n"+(t=t&&"<tbody>"+t+"</tbody>")+"</table>\n"},t.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},t.strong=function(e){return"<strong>"+e+"</strong>"},t.em=function(e){return"<em>"+e+"</em>"},t.codespan=function(e){return"<code>"+e+"</code>"},t.br=function(){return this.options.xhtml?"<br/>":"<br>"},t.del=function(e){return"<del>"+e+"</del>"},t.link=function(e,t,n){if(null===(e=G(this.options.sanitize,this.options.baseUrl,e)))return n;e='<a href="'+V(e)+'"';return t&&(e+=' title="'+t+'"'),e+=">"+n+"</a>"},t.image=function(e,t,n){if(null===(e=G(this.options.sanitize,this.options.baseUrl,e)))return n;n='<img src="'+e+'" alt="'+n+'"';return t&&(n+=' title="'+t+'"'),n+=this.options.xhtml?"/>":">"},t.text=function(e){return e},e}(),J=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),K=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n))for(r=this.seen[e];n=e+"-"+ ++r,this.seen.hasOwnProperty(n););return t||(this.seen[e]=r,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),Q=t.defaults,Y=y,ee=function(){function n(e){this.options=e||Q,this.options.renderer=this.options.renderer||new H,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new J,this.slugger=new K}n.parse=function(e,t){return new n(t).parse(e)},n.parseInline=function(e,t){return new n(t).parseInline(e)};var e=n.prototype;return e.parse=function(e,t){void 0===t&&(t=!0);for(var n,r,i,s,l,a,o,c,u,p,h,g,f,d,k,b="",m=e.length,x=0;x<m;x++)switch((c=e[x]).type){case"space":continue;case"hr":b+=this.renderer.hr();continue;case"heading":b+=this.renderer.heading(this.parseInline(c.tokens),c.depth,Y(this.parseInline(c.tokens,this.textRenderer)),this.slugger);continue;case"code":b+=this.renderer.code(c.text,c.lang,c.escaped);continue;case"table":for(a=u="",i=c.header.length,n=0;n<i;n++)a+=this.renderer.tablecell(this.parseInline(c.tokens.header[n]),{header:!0,align:c.align[n]});for(u+=this.renderer.tablerow(a),o="",i=c.cells.length,n=0;n<i;n++){for(a="",s=(l=c.tokens.cells[n]).length,r=0;r<s;r++)a+=this.renderer.tablecell(this.parseInline(l[r]),{header:!1,align:c.align[r]});o+=this.renderer.tablerow(a)}b+=this.renderer.table(u,o);continue;case"blockquote":o=this.parse(c.tokens),b+=this.renderer.blockquote(o);continue;case"list":for(u=c.ordered,w=c.start,p=c.loose,i=c.items.length,o="",n=0;n<i;n++)f=(g=c.items[n]).checked,d=g.task,h="",g.task&&(k=this.renderer.checkbox(f),p?0<g.tokens.length&&"text"===g.tokens[0].type?(g.tokens[0].text=k+" "+g.tokens[0].text,g.tokens[0].tokens&&0<g.tokens[0].tokens.length&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=k+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:k}):h+=k),h+=this.parse(g.tokens,p),o+=this.renderer.listitem(h,d,f);b+=this.renderer.list(o,u,w);continue;case"html":b+=this.renderer.html(c.text);continue;case"paragraph":b+=this.renderer.paragraph(this.parseInline(c.tokens));continue;case"text":for(o=c.tokens?this.parseInline(c.tokens):c.text;x+1<m&&"text"===e[x+1].type;)o+="\n"+((c=e[++x]).tokens?this.parseInline(c.tokens):c.text);b+=t?this.renderer.paragraph(o):o;continue;default:var w='Token with "'+c.type+'" type was not found.';if(this.options.silent)return void console.error(w);throw new Error(w)}return b},e.parseInline=function(e,t){t=t||this.renderer;for(var n,r="",i=e.length,s=0;s<i;s++)switch((n=e[s]).type){case"escape":r+=t.text(n.text);break;case"html":r+=t.html(n.text);break;case"link":r+=t.link(n.href,n.title,this.parseInline(n.tokens,t));break;case"image":r+=t.image(n.href,n.title,n.text);break;case"strong":r+=t.strong(this.parseInline(n.tokens,t));break;case"em":r+=t.em(this.parseInline(n.tokens,t));break;case"codespan":r+=t.codespan(n.text);break;case"br":r+=t.br();break;case"del":r+=t.del(this.parseInline(n.tokens,t));break;case"text":r+=t.text(n.text);break;default:var l='Token with "'+n.type+'" type was not found.';if(this.options.silent)return void console.error(l);throw new Error(l)}return r},n}(),te=A,ne=I,re=_,_=t.getDefaults,ie=t.changeDefaults,t=t.defaults;function se(e,n,r){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof n&&(r=n,n=null),n=te({},se.defaults,n||{}),ne(n),r){var i,s=n.highlight;try{i=W.lex(e,n)}catch(e){return r(e)}var l=function(t){var e;if(!t)try{e=ee.parse(i,n)}catch(e){t=e}return n.highlight=s,t?r(t):r(null,e)};if(!s||s.length<3)return l();if(delete n.highlight,!i.length)return l();var a=0;return se.walkTokens(i,function(n){"code"===n.type&&(a++,setTimeout(function(){s(n.text,n.lang,function(e,t){return e?l(e):(null!=t&&t!==n.text&&(n.text=t,n.escaped=!0),void(0===--a&&l()))})},0))}),void(0===a&&l())}try{var t=W.lex(e,n);return n.walkTokens&&se.walkTokens(t,n.walkTokens),ee.parse(t,n)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",n.silent)return"<p>An error occurred:</p><pre>"+re(e.message+"",!0)+"</pre>";throw e}}return se.options=se.setOptions=function(e){return te(se.defaults,e),ie(se.defaults),se},se.getDefaults=_,se.defaults=t,se.use=function(a){var t,n=te({},a);a.renderer&&function(){var e,l=se.defaults.renderer||new H;for(e in a.renderer)!function(i){var s=l[i];l[i]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=a.renderer[i].apply(l,t);return!1===r&&(r=s.apply(l,t)),r}}(e);n.renderer=l}(),a.tokenizer&&function(){var e,l=se.defaults.tokenizer||new D;for(e in a.tokenizer)!function(i){var s=l[i];l[i]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=a.tokenizer[i].apply(l,t);return!1===r&&(r=s.apply(l,t)),r}}(e);n.tokenizer=l}(),a.walkTokens&&(t=se.defaults.walkTokens,n.walkTokens=function(e){a.walkTokens(e),t&&t(e)}),se.setOptions(n)},se.walkTokens=function(e,t){for(var n,r=p(e);!(n=r()).done;){var i=n.value;switch(t(i),i.type){case"table":for(var s=p(i.tokens.header);!(l=s()).done;){var l=l.value;se.walkTokens(l,t)}for(var a,o=p(i.tokens.cells);!(a=o()).done;)for(var c=p(a.value);!(u=c()).done;){var u=u.value;se.walkTokens(u,t)}break;case"list":se.walkTokens(i.items,t);break;default:i.tokens&&se.walkTokens(i.tokens,t)}}},se.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=te({},se.defaults,t||{}),ne(t);try{var n=W.lexInline(e,t);return t.walkTokens&&se.walkTokens(n,t.walkTokens),ee.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+re(e.message+"",!0)+"</pre>";throw e}},se.Parser=ee,se.parser=ee.parse,se.Renderer=H,se.TextRenderer=J,se.Lexer=W,se.lexer=W.lex,se.Tokenizer=D,se.Slugger=K,se.parse=se};module.exports=t();
node_modules/mp-html/plugins/markdown/miniprogram/build.js
New file
@@ -0,0 +1,70 @@
const path = require('path')
module.exports = {
  style:
    `.md-p {
  margin-block-start: 1em;
  margin-block-end: 1em;
}
.md-table,
.md-blockquote {
  margin-bottom: 16px;
}
.md-table {
  box-sizing: border-box;
  width: 100%;
  overflow: auto;
  border-spacing: 0;
  border-collapse: collapse;
}
.md-tr {
  background-color: #fff;
  border-top: 1px solid #c6cbd1;
}
.md-table .md-tr:nth-child(2n) {
  background-color: #f6f8fa;
}
.md-th,
.md-td {
  padding: 6px 13px !important;
  border: 1px solid #dfe2e5;
}
.md-th {
  font-weight: 600;
}
.md-blockquote {
  padding: 0 1em;
  color: #6a737d;
  border-left: 0.25em solid #dfe2e5;
}
.md-code {
  padding: 0.2em 0.4em;
  font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
  font-size: 85%;
  background-color: rgba(27, 31, 35, 0.05);
  border-radius: 3px;
}
.md-pre .md-code {
  padding: 0;
  font-size: 100%;
  background: transparent;
  border: 0;
}`,
  handler (file) {
    // æ·»åŠ  markdown å±žæ€§
    if (file.path.includes('miniprogram' + path.sep + 'index.js')) {
      file.contents = Buffer.from(file.contents.toString().replace(/properties\s*:\s*{/, 'properties: {\n    markdown: Boolean,')
      // å¤„理中文 id
        .replace(/navigateTo\s*\(id,\s*offset\)\s*{/, 'navigateTo (id, offset) {\n      id = this._ids[decodeURI(id)] || id'))
    }
  }
}
node_modules/mp-html/plugins/markdown/uni-app/build.js
New file
@@ -0,0 +1,68 @@
module.exports = {
  style:
    `.md-p {
  margin-block-start: 1em;
  margin-block-end: 1em;
}
.md-table,
.md-blockquote {
  margin-bottom: 16px;
}
.md-table {
  box-sizing: border-box;
  width: 100%;
  overflow: auto;
  border-spacing: 0;
  border-collapse: collapse;
}
.md-tr {
  background-color: #fff;
  border-top: 1px solid #c6cbd1;
}
.md-table .md-tr:nth-child(2n) {
  background-color: #f6f8fa;
}
.md-th,
.md-td {
  padding: 6px 13px !important;
  border: 1px solid #dfe2e5;
}
.md-th {
  font-weight: 600;
}
.md-blockquote {
  padding: 0 1em;
  color: #6a737d;
  border-left: 0.25em solid #dfe2e5;
}
.md-code {
  padding: 0.2em 0.4em;
  font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
  font-size: 85%;
  background-color: rgba(27, 31, 35, 0.05);
  border-radius: 3px;
}
.md-pre .md-code {
  padding: 0;
  font-size: 100%;
  background: transparent;
  border: 0;
}`,
  handler (file) {
    // æ·»åŠ  markdown å±žæ€§
    if (file.path.includes('mp-html.vue')) {
      file.contents = Buffer.from(file.contents.toString().replace(/props\s*:\s*{/, 'props: {\n    markdown: Boolean,')
      // å¤„理中文 id
        .replace(/navigateTo\s*\(id,\s*offset\)\s*{/, 'navigateTo (id, offset) {\n      id = this._ids[decodeURI(id)] || id'))
    }
  }
}
node_modules/mp-html/plugins/search/README.md
New file
@@ -0,0 +1,46 @@
# search
功能:关键词搜索
大小:*≈1.5KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš(nvue ä¸æ”¯æŒ) |
说明:
引入后会在组件实例上挂载一个 *search* æ–¹æ³•,用于关键词搜索
输入值
| å‚数名 | ç±»åž‹ | é»˜è®¤å€¼ | è¯´æ˜Ž |
|:---:|:---:|:---:|---|
| key | String æˆ– RegExp | - | è¦æœç´¢çš„关键词,支持字符串和正则 |
| anchor | Boolean | false | æ˜¯å¦å°†æœç´¢ç»“果设置为锚点 |
| style | String | background-color:yellow | æ ‡è®°æœç´¢ç»“果的样式 |
返回值:*Promise*
| å±žæ€§ | ç±»åž‹ | è¯´æ˜Ž |
|:---:|:---:|---|
| num | Number | æœç´¢ç»“果数量 |
| highlight | Function(i, style='background-color:#FF9632') | é«˜äº®ç¬¬ i(1 ~ num)个结果,将其样式设置为 style |
| jump | Function(i, offset) | è·³è½¬åˆ°ç¬¬ i(1 ~ num)个结果,偏移量为 offset,anchor ä¸º true æ‰å¯ç”¨ |
示例:
```javascript
function search (key) {
  // ctx ä¸ºç»„件实例
  ctx.search(key, true).then(res => {
    res.highlight(1)
    res.jump(1, -50) // é«˜äº®ç¬¬ 1 ä¸ªç»“果并跳转到该位置,偏移量 -50
  })
}
```
附加说明:
1. ä¸ä¼ å…¥ *key*(或为空)时即可取消搜索,取消所有的高亮,还原到原来的效果
2. è¿›è¡Œæ–°çš„æœç´¢æ—¶æ—§çš„æœç´¢ç»“果将被还原,旧的结果中的 *highlight* ç­‰æ–¹æ³•不再可用
3. è°ƒç”¨ *highlight* æ–¹æ³•高亮一个结果时,之前被高亮的结果会被还原,即始终只有一个结果被高亮
4. *key* ä¼ å…¥å­—符串时大小写敏感,如果要忽略大小写可以用正则的 *i*(字符串搜索效率高于正则)
5. è®¾ç½® *anchor* ä¸º *true* ä¼šä¸€å®šç¨‹åº¦ä¸Šé™ä½Žæ•ˆçŽ‡ï¼Œéžå¿…è¦ä¸è¦å¼€å¯
6. æš‚不支持跨标签搜索,即只有一个文本节点内包含整个关键词才能被搜索到
node_modules/mp-html/plugins/search/miniprogram/index.js
New file
@@ -0,0 +1,137 @@
/**
 * @fileoverview search æ’ä»¶
 */
function Search (vm) {
  /**
   * @description å…³é”®è¯æœç´¢
   * @param {regexp|string} key è¦æœç´¢çš„关键词
   * @param {boolean} anchor æ˜¯å¦å°†æœç´¢ç»“果设置为锚点
   * @param {string} style æœç´¢ç»“果的样式
   */
  vm.search = function (key, anchor, style = 'background-color:yellow') {
    const obj = {}
    const stack = []
    const res = [];
    // éåŽ†æœç´¢
    (function traversal (nodes, path) {
      for (let i = 0; i < nodes.length; i++) {
        const node = nodes[i]
        if (node.type === 'text' && key) {
          const arr = node.text.split(key)
          const children = []
          if (arr.length > 1) {
            // æ‰¾åˆ°å…³é”®è¯
            for (let j = 0; j < arr.length; j++) {
              if (arr[j]) {
                children.push({
                  type: 'text',
                  text: arr[j]
                })
              }
              if (j !== arr.length - 1) {
                // å…³é”®è¯è½¬ä¸ºä¸€ä¸ª span
                res.push(`${path}[${i}].children[${children.length}].attrs.style`)
                children.push({
                  name: 'span',
                  attrs: {
                    id: anchor ? 'search' + res.length : undefined, // ç”¨äºŽé”šç‚¹çš„ id
                    style
                  },
                  children: [{
                    type: 'text',
                    text: key instanceof RegExp ? key.exec(node.text)[0] : key
                  }]
                })
              }
            }
            if (key instanceof RegExp) {
              key.exec(node.text)
            }
            if (anchor) {
              for (let l = stack.length; l--;) {
                // ç»™çˆ¶ç»„件做标记,将该标签暴露出来
                if (stack[l].c) {
                  break
                } else {
                  obj[stack[l].path] = 1
                }
              }
            }
            obj[`${path}[${i}]`] = {
              name: 'span',
              c: anchor ? 1 : undefined,
              s: 1,
              children
            }
          }
        } else if (node.s) {
          let text = ''
          // å¤åŽŸä¸Šä¸€æ¬¡çš„ç»“æžœ
          for (let k = 0; k < node.children.length; k++) {
            const child = node.children[k]
            if (child.text) {
              text += child.text
            } else {
              text += child.children[0].text
            }
          }
          nodes[i] = {
            type: 'text',
            text
          }
          if (key && (key instanceof RegExp ? key.test(text) : text.includes(key))) {
            i--
          } else {
            obj[`${path}[${i}]`] = nodes[i]
          }
        } else if (node.children) {
          stack.push({
            path: `${path}[${i}].c`,
            c: node.c || node.name === 'table'
          })
          traversal(node.children, `${path}[${i}].children`)
          stack.pop()
        }
      }
    })(vm.data.nodes, 'nodes')
    return new Promise(function (resolve) {
      vm.setData(obj, () => {
        resolve({
          num: res.length, // ç»“果数量
          /**
           * @description é«˜äº®æŸä¸€ä¸ªç»“æžœ
           * @param {number} i ç¬¬å‡ ä¸ª
           * @param {string} hlstyle é«˜äº®çš„æ ·å¼
           */
          highlight (i, hlstyle = 'background-color:#FF9632') {
            if (i < 1 || i > res.length) return
            const obj = {}
            if (this.last) {
              obj[res[this.last - 1]] = style
            }
            this.last = i
            obj[res[i - 1]] = hlstyle
            vm.setData(obj)
          },
          /**
           * @description è·³è½¬åˆ°æœç´¢ç»“æžœ
           * @param {number} i ç¬¬å‡ ä¸ª
           * @param {number} offset åç§»é‡
           */
          jump: anchor
            ? (i, offset) => {
                if (i > 0 && i <= res.length) {
                  vm.navigateTo('search' + i, offset)
                }
              }
            : undefined
        })
      })
    })
  }
}
module.exports = Search
node_modules/mp-html/plugins/search/uni-app/index.js
New file
@@ -0,0 +1,132 @@
/**
 * @fileoverview search æ’ä»¶
 */
function Search (vm) {
  /**
   * @description å…³é”®è¯æœç´¢
   * @param {regexp|string} key è¦æœç´¢çš„关键词
   * @param {boolean} anchor æ˜¯å¦å°†æœç´¢ç»“果设置为锚点
   * @param {string} style æœç´¢ç»“果的样式
   */
  vm.search = function (key, anchor, style = 'background-color:yellow') {
    const res = []
    const stack = [];
    // éåŽ†æœç´¢
    (function traversal (nodes) {
      for (let i = 0; i < nodes.length; i++) {
        let node = nodes[i]
        if (node.type === 'text' && key) {
          const text = node.text
          const arr = text.split(key)
          if (arr.length > 1) {
            node = {
              name: 'span',
              attrs: {},
              type: 'node',
              c: 1,
              s: 1,
              children: []
            }
            vm.$set(nodes, i, node)
            for (let j = 0; j < arr.length; j++) {
              if (arr[j]) {
                node.children.push({
                  type: 'text',
                  text: arr[j]
                })
              }
              if (j !== arr.length - 1) {
                // å…³é”®è¯è½¬ä¸ºä¸€ä¸ª span
                node.children.push({
                  name: 'span',
                  attrs: {
                    id: anchor ? 'search' + (res.length + 1) : undefined, // ç”¨äºŽé”šç‚¹çš„ id
                    style: style
                  },
                  // #ifdef VUE3
                  c: 1,
                  // #endif
                  children: [{
                    type: 'text',
                    text: key instanceof RegExp ? key.exec(text)[0] : key
                  }]
                })
                res.push(node.children[node.children.length - 1].attrs)
              }
            }
            if (key instanceof RegExp) {
              key.exec(text)
            }
            if (anchor) {
              for (let l = stack.length; l--;) {
                if (stack[l].c) {
                  break
                } else {
                  vm.$set(stack[l], 'c', 1)
                }
              }
            }
          }
        } else if (node.s) {
          let text = ''
          // å¤åŽŸä¸Šä¸€æ¬¡çš„ç»“æžœ
          for (let k = 0; k < node.children.length; k++) {
            const child = node.children[k]
            if (child.text) {
              text += child.text
            } else {
              text += child.children[0].text
            }
          }
          vm.$set(nodes, i, {
            type: 'text',
            text
          })
          if (key && (key instanceof RegExp ? key.test(text) : text.includes(key))) {
            i--
          }
        } else if (node.children) {
          stack.push(node)
          traversal(node.children)
          stack.pop()
        }
      }
    })(vm.nodes)
    return new Promise(function (resolve) {
      setTimeout(() => {
        resolve({
          num: res.length, // ç»“果数量
          /**
           * @description é«˜äº®æŸä¸€ä¸ªç»“æžœ
           * @param {number} i ç¬¬å‡ ä¸ª
           * @param {string} hlstyle é«˜äº®çš„æ ·å¼
           */
          highlight (i, hlstyle = 'background-color:#FF9632') {
            if (i < 1 || i > res.length) return
            if (this.last) {
              res[this.last - 1].style = style
            }
            this.last = i
            res[i - 1].style = hlstyle
          },
          /**
           * @description è·³è½¬åˆ°æœç´¢ç»“æžœ
           * @param {number} i ç¬¬å‡ ä¸ª
           * @param {number} offset åç§»é‡
           */
          jump: anchor
            ? (i, offset) => {
                if (i > 0 && i <= res.length) {
                  vm.navigateTo('search' + i, offset)
                }
              }
            : undefined
        })
      }, 200)
    })
  }
}
module.exports = Search
node_modules/mp-html/plugins/style/README.md
New file
@@ -0,0 +1,30 @@
# style
功能:解析和匹配 *style* æ ‡ç­¾ä¸­çš„æ ·å¼
> è¿™é‡Œçš„ *style* æ ‡ç­¾æŒ‡çš„æ˜¯ä¼ å…¥ *content* å±žæ€§ä¸­çš„ *html* é‡ŒåŒ…含的 *style* æ ‡ç­¾ï¼Œä¸” *style* æ ‡ç­¾è¦æ”¾åœ¨å…¶ä»–标签前面才能生效
大小:*≈3.5KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš | âˆš | âˆš | âˆš | âˆš (nvue ç›´æŽ¥æ”¯æŒ) |
说明:
支持以下选择器:
| åç§° | ç¤ºä¾‹ |
|:---:|---|
| æ ‡ç­¾åé€‰æ‹©å™¨ | p {} |
| class é€‰æ‹©å™¨ | .class {} |
| id é€‰æ‹©å™¨ | #id {} |
| å¤šé€‰æ‹©å™¨äº¤é›† | p.class {} |
| å¤šé€‰æ‹©å™¨å¹¶é›† | p, .class {} |
| åŽä»£é€‰æ‹©å™¨ | .class1 .class2 {} |
| å­é€‰æ‹©å™¨ | .class1 > .class2 {} |
| ä¼ªç±» | .class::before {} |
伪类仅支持 *before* å’Œ *after*,支持 *attr* æ–¹æ³•
不支持的选择器(属性选择器等)将被忽略
> ç”±äºŽå°ç¨‹åºä¸­æ— æ³•动态写入 *css*,本插件的实现原理是通过解析,将匹配的样式添加到各标签的行内 *style* ä¸­åŽ»ï¼Œè¯·æ…Žç”¨å®½æ³›çš„é€‰æ‹©å™¨ï¼Œä»¥å…å¤§å¤§å¢žåŠ è§£æžç»“æžœå¤§å°ï¼Œå‡æ…¢æ¸²æŸ“é€Ÿåº¦
node_modules/mp-html/plugins/style/index.js
New file
@@ -0,0 +1,129 @@
/**
 * @fileoverview style æ’ä»¶
 */
// #ifndef APP-PLUS-NVUE
const Parser = require('./parser')
// #endif
function Style () {
  this.styles = []
}
// #ifndef APP-PLUS-NVUE
Style.prototype.onParse = function (node, vm) {
  // èŽ·å–æ ·å¼
  if (node.name === 'style' && node.children.length && node.children[0].type === 'text') {
    this.styles = this.styles.concat(new Parser().parse(node.children[0].text))
  } else if (node.name) {
    // åŒ¹é…æ ·å¼ï¼ˆå¯¹éžæ–‡æœ¬æ ‡ç­¾ï¼‰
    // å­˜å‚¨ä¸åŒä¼˜å…ˆçº§çš„æ ·å¼ name < class < id < åŽä»£
    let matched = ['', '', '', '']
    for (let i = 0, len = this.styles.length; i < len; i++) {
      const item = this.styles[i]
      let res = match(node, item.key || item.list[item.list.length - 1])
      let j
      if (res) {
        // åŽä»£é€‰æ‹©å™¨
        if (!item.key) {
          j = item.list.length - 2
          for (let k = vm.stack.length; j >= 0 && k--;) {
            // å­é€‰æ‹©å™¨
            if (item.list[j] === '>') {
              // é”™è¯¯æƒ…况
              if (j < 1 || j > item.list.length - 2) break
              if (match(vm.stack[k], item.list[j - 1])) {
                j -= 2
              } else {
                j++
              }
            } else if (match(vm.stack[k], item.list[j])) {
              j--
            }
          }
          res = 4
        }
        if (item.key || j < 0) {
          // æ·»åŠ ä¼ªç±»
          if (item.pseudo && node.children) {
            let text
            item.style = item.style.replace(/content:([^;]+)/, (_, $1) => {
              text = $1.replace(/['"]/g, '')
                // å¤„理 attr å‡½æ•°
                .replace(/attr\((.+?)\)/, (_, $1) => node.attrs[$1.trim()] || '')
                // ç¼–码 \xxx
                .replace(/\\(\w{4})/, (_, $1) => String.fromCharCode(parseInt($1, 16)))
              return ''
            })
            const pseudo = {
              name: 'span',
              attrs: {
                style: item.style
              },
              children: [{
                type: 'text',
                text
              }]
            }
            if (item.pseudo === 'before') {
              node.children.unshift(pseudo)
            } else {
              node.children.push(pseudo)
            }
          } else {
            matched[res - 1] += item.style + (item.style[item.style.length - 1] === ';' ? '' : ';')
          }
        }
      }
    }
    matched = matched.join('')
    if (matched.length > 2) {
      node.attrs.style = matched + (node.attrs.style || '')
    }
  }
}
/**
 * @description åŒ¹é…æ ·å¼
 * @param {object} node è¦åŒ¹é…çš„æ ‡ç­¾
 * @param {string|string[]} keys é€‰æ‹©å™¨
 * @returns {number} 0:不匹配;1:name åŒ¹é…ï¼›2:class åŒ¹é…ï¼›3:id åŒ¹é…
 */
function match (node, keys) {
  function matchItem (key) {
    if (key[0] === '#') {
      // åŒ¹é… id
      if (node.attrs.id && node.attrs.id.trim() === key.substr(1)) return 3
    } else if (key[0] === '.') {
      // åŒ¹é… class
      key = key.substr(1)
      const selectors = (node.attrs.class || '').split(' ')
      for (let i = 0; i < selectors.length; i++) {
        if (selectors[i].trim() === key) return 2
      }
    } else if (node.name === key) {
      // åŒ¹é… name
      return 1
    }
    return 0
  }
  // å¤šé€‰æ‹©å™¨äº¤é›†
  if (keys instanceof Array) {
    let res = 0
    for (let j = 0; j < keys.length; j++) {
      const tmp = matchItem(keys[j])
      // ä»»æ„ä¸€ä¸ªä¸åŒ¹é…å°±å¤±è´¥
      if (!tmp) return 0
      // ä¼˜å…ˆçº§æœ€å¤§çš„一个作为最终优先级
      if (tmp > res) {
        res = tmp
      }
    }
    return res
  }
  return matchItem(keys)
}
// #endif
module.exports = Style
node_modules/mp-html/plugins/style/parser.js
New file
@@ -0,0 +1,175 @@
const blank = {
  ' ': true,
  '\n': true,
  '\t': true,
  '\r': true,
  '\f': true
}
function Parser () {
  this.styles = []
  this.selectors = []
}
/**
 * @description è§£æž css å­—符串
 * @param {string} content css å†…容
 */
Parser.prototype.parse = function (content) {
  new Lexer(this).parse(content)
  return this.styles
}
/**
 * @description è§£æžåˆ°ä¸€ä¸ªé€‰æ‹©å™¨
 * @param {string} name åç§°
 */
Parser.prototype.onSelector = function (name) {
  // ä¸æ”¯æŒçš„选择器
  if (name.includes('[') || name.includes('*') || name.includes('@')) return
  const selector = {}
  // ä¼ªç±»
  if (name.includes(':')) {
    const info = name.split(':')
    const pseudo = info.pop()
    if (pseudo === 'before' || pseudo === 'after') {
      selector.pseudo = pseudo
      name = info[0]
    } else return
  }
  // åˆ†å‰²äº¤é›†é€‰æ‹©å™¨
  function splitItem (str) {
    const arr = []
    let i, start
    for (i = 1, start = 0; i < str.length; i++) {
      if (str[i] === '.' || str[i] === '#') {
        arr.push(str.substring(start, i))
        start = i
      }
    }
    if (!arr.length) {
      return str
    } else {
      arr.push(str.substring(start, i))
      return arr
    }
  }
  // åŽä»£é€‰æ‹©å™¨
  if (name.includes(' ')) {
    selector.list = []
    const list = name.split(' ')
    for (let i = 0; i < list.length; i++) {
      if (list[i].length) {
        // æ‹†åˆ†å­é€‰æ‹©å™¨
        const arr = list[i].split('>')
        for (let j = 0; j < arr.length; j++) {
          selector.list.push(splitItem(arr[j]))
          if (j < arr.length - 1) {
            selector.list.push('>')
          }
        }
      }
    }
  } else {
    selector.key = splitItem(name)
  }
  this.selectors.push(selector)
}
/**
 * @description è§£æžåˆ°é€‰æ‹©å™¨å†…容
 * @param {string} content å†…容
 */
Parser.prototype.onContent = function (content) {
  // å¹¶é›†é€‰æ‹©å™¨
  for (let i = 0; i < this.selectors.length; i++) {
    this.selectors[i].style = content
  }
  this.styles = this.styles.concat(this.selectors)
  this.selectors = []
}
/**
 * @description css è¯æ³•分析器
 * @param {object} handler é«˜å±‚处理器
 */
function Lexer (handler) {
  this.selector = ''
  this.style = ''
  this.handler = handler
}
Lexer.prototype.parse = function (content) {
  this.i = 0
  this.content = content
  this.state = this.blank
  for (let len = content.length; this.i < len; this.i++) {
    this.state(content[this.i])
  }
}
Lexer.prototype.comment = function () {
  this.i = this.content.indexOf('*/', this.i) + 1
  if (!this.i) {
    this.i = this.content.length
  }
}
Lexer.prototype.blank = function (c) {
  if (!blank[c]) {
    if (c === '/' && this.content[this.i + 1] === '*') {
      this.comment()
      return
    }
    this.selector += c
    this.state = this.name
  }
}
Lexer.prototype.name = function (c) {
  if (c === '/' && this.content[this.i + 1] === '*') {
    this.comment()
    return
  }
  if (c === '{' || c === ',' || c === ';') {
    this.handler.onSelector(this.selector.trimEnd())
    this.selector = ''
    if (c !== '{') {
      while (blank[this.content[++this.i]]);
    }
    if (this.content[this.i] === '{') {
      this.floor = 1
      this.state = this.val
    } else {
      this.selector += this.content[this.i]
    }
  } else if (blank[c]) {
    this.selector += ' '
  } else {
    this.selector += c
  }
}
Lexer.prototype.val = function (c) {
  if (c === '/' && this.content[this.i + 1] === '*') {
    this.comment()
    return
  }
  if (c === '{') {
    this.floor++
  } else if (c === '}') {
    this.floor--
    if (!this.floor) {
      this.handler.onContent(this.style)
      this.style = ''
      this.state = this.blank
      return
    }
  }
  this.style += c
}
module.exports = Parser
node_modules/mp-html/plugins/template/README.md
New file
@@ -0,0 +1,2 @@
# æ¨¡æ¿
这是一个插件模板,需要开发插件时,可以从这个模板开始
node_modules/mp-html/plugins/template/build.js
New file
@@ -0,0 +1,65 @@
/**
 * @description æ’件构建文件模板
 */
module.exports = {
  /**
   * @description å…¥å£æ–‡ä»¶
   * @type {String}
   * @default 'index.js'
   */
  main: 'index.js',
  /**
   * @description æ”¯æŒçš„平台
   * @type {String[]}
   * @default ['mp-weixin','mp-qq','mp-baidu','mp-alipay','mp-toutiao','uni-app']
   */
  platform: ['mp-weixin', 'mp-qq', 'mp-baidu', 'mp-alipay', 'mp-toutiao', 'uni-app'],
  /**
   * @description è¦è¢«æ·»åŠ åˆ°æ¨¡æ¿æ–‡ä»¶ä¸­çš„æ ‡ç­¾ï¼ˆå°†è¢«æ·»åŠ åˆ° src/node/node.wxml)
   * å¿…须要有 wx:if è¡¨æ˜Žä»€ä¹ˆæƒ…况下使用该标签
   * n è¡¨ç¤ºæ ‡ç­¾ç»“构体,<node> æ ‡ç­¾ç”¨äºŽé€’归显示子节点(可参考源文件中的写法)
   * @type {String}
   */
  template: '',
  /**
   * @description ç”¨äºŽå¤„理模板中事件的方法(将被添加到 src/node/node.js)
   * éœ€è¦è§¦å‘顶层组件的事件请使用 this.root.triggerEvent
   * @type {Object}
   */
  methods: {
  },
  /**
   * @description ç”¨äºŽæ¨¡æ¿æ–‡ä»¶çš„ css æ ·å¼ï¼ˆå°†è¢«æ·»åŠ åˆ° src/node/node.wxss)
   * @type {String}
   */
  style: '',
  /**
   * @description è¦è¢«å¼•入到模板文件的 css æ–‡ä»¶è·¯å¾„(将被添加到 src/node/node.wxss)
   * @type {String|String[]}
   */
  import: [],
  /**
   * @description åœ¨æ¨¡æ¿ä¸­éœ€è¦ä½¿ç”¨çš„组件或插件列表(将被添加到 src/node/node.json)
   * @type {Object}
   */
  usingComponents: {
  },
  /**
   * @description è‡ªå®šä¹‰æ–‡ä»¶å¤„理器
   * å¦‚果上述处理还无法满足要求,可以在此方法中进行处理
   * æ‰€æœ‰ src ç›®å½•下的文件和本插件目录下的文件都会经过此方法的处理
   * @param {Vinyl} file å…³äºŽè¯¥æ–‡ä»¶å¯¹è±¡çš„æ ¼å¼å¯å‚考 https://github.com/gulpjs/vinyl#instance-methods
   * @param {String} platform å¹³å°
   */
  handler (file, platform) {
    let content = file.contents.toString()
    // è¿›è¡Œå¤„理
    if (platform === 'xxx') {
      content = content.replace('aaa', 'bbb')
    }
    file.contents = Buffer.from(content)
  }
}
node_modules/mp-html/plugins/template/index.js
New file
@@ -0,0 +1,67 @@
/**
 * @fileoverview æ’件入口文件模板
 */
const data = {} // å…¨å±€æ•°æ®
/**
 * @description ç»„件被创建时将实例化插件
 * @param {Component} vm ç»„件实例
 */
function Plugin (vm) {
  this.vm = vm // ä¿å­˜å®žä¾‹åœ¨å…¶ä»–周期使用
  this.compData = {} // ä»…在单个组件中使用的数据
  data.xxx = 'xxx' // è®°å½•全局数据
}
/**
 * @description html æ•°æ®æ›´æ–°æ—¶è§¦å‘
 * @param {string} content è¦æ›´æ–°çš„ html å­—符串
 * @param {object} config è§£æžé…ç½®
 * @returns {string|void} å¦‚果要对 html å­—符串进行一些预处理,则返回处理后的字符串
 */
Plugin.prototype.onUpdate = function (content, config) {
  config.ignoreTags.xxx = true // ç§»é™¤ xxx æ ‡ç­¾
  // å¯¹ html å†…容进行预处理并返回修改,没有修改则不需要返回
  return content
}
/**
 * @description è§£æžåˆ°ä¸€ä¸ªæ ‡ç­¾æ—¶è§¦å‘
 * @param {object} node æ ‡ç­¾
 * @param {object} parser è§£æžå™¨å®žä¾‹
 * @returns {boolean|void} å¦‚果返回 false å°†ç§»é™¤è¯¥æ ‡ç­¾
 */
Plugin.prototype.onParse = function (node, parser) {
  // å¤„理文本标签
  if (node.type === 'text') {
    // node.text æ–‡æœ¬å†…容
  } else {
    // å¤„理元素标签
    // node.name æ ‡ç­¾å
    // node.attrs å±žæ€§åˆ—表
    // node.children å­èŠ‚ç‚¹ï¼ˆéžè‡ªé—­åˆæ ‡ç­¾æœ‰ï¼‰
    if (node.name === 'xxx') {
      parser.expose() // å¦‚果该标签不能被 rich-text åŒ…含,需要调用此方法暴露出来
      // parser.options ç»„件传入的一些解析属性
      // parser.stack å¯ä»¥ä»Žæ ˆä¸­èŽ·å–ç¥–å…ˆèŠ‚ç‚¹
    }
  }
}
/**
 * @description dom æ ‘加载完毕时触发(load äº‹ä»¶ï¼‰
 */
Plugin.prototype.onLoad = function () {
  // å¯ä»¥èŽ·å–åª’ä½“ context å¯¹è±¡ç­‰
}
/**
 * @description ç»„件被移除时触发
 */
Plugin.prototype.onDetached = function () {
  // å¯ä»¥é‡Šæ”¾ä¸€äº›å¿…要的资源(计时器等)
}
module.exports = Plugin
node_modules/mp-html/plugins/txv-video/README.md
New file
@@ -0,0 +1,18 @@
# txv-video
功能:使用腾讯视频
大小:*≈1KB*
支持平台:
| å¾®ä¿¡å°ç¨‹åº | QQ å°ç¨‹åº | ç™¾åº¦å°ç¨‹åº | æ”¯ä»˜å®å°ç¨‹åº | å¤´æ¡å°ç¨‹åº | uni-app |
|:---:|:---:|:---:|:---:|:---:|:---:|
| âˆš | âˆš |   |   |   | âˆš (h5 å’Œ app ç›´æŽ¥æ”¯æŒ) |
说明:
引入本插件后,*html* ä¸­ç¬¦åˆä¸‹æ–¹æ ¼å¼çš„ *iframe* æ ‡ç­¾ï¼ˆ*src* ä¸­å«æœ‰ *vid*)将被转为通过腾讯视频播放:
```html
<iframe src="https://v.qq.com/txp/iframe/player.html?vid=xxxxxx" allowFullScreen="true"></iframe>
```
同时,其可以被 *pause-video* å±žæ€§æŽ§åˆ¶
!> æœ¬æ’件仅用于将官方 [腾讯视频插件](https://github.com/tvfe/txv-miniprogram-plugin) åº”用于本组件,仅在微信和 *qq* å¹³å°æœ‰æ•ˆï¼Œä½¿ç”¨å‰è¯·ç¡®è®¤å·²ç»æˆåŠŸç”³è¯·ä½¿ç”¨è¯¥æ’ä»¶å¹¶æŒ‰è¦æ±‚åœ¨å°ç¨‹åº *app.json* ä¸­é…ç½®å®Œæˆï¼Œå¦åˆ™å¯èƒ½æŠ¥é”™ **This application has not registered any plugins yet** ä¸”无法生效
node_modules/mp-html/plugins/txv-video/build.js
New file
@@ -0,0 +1,3 @@
module.exports = {
  platform: ['mp-weixin', 'mp-qq', 'uni-app']
}
node_modules/mp-html/plugins/txv-video/index.js
New file
@@ -0,0 +1,46 @@
/**
 * @fileoverview txv-video æ’ä»¶
 * Include txv-video (https://github.com/tvfe/txv-miniprogram-plugin)
 */
const TxvVideo = function (vm) {
  this.vm = vm
}
// #ifdef MP-WEIXIN || MP-QQ
try {
  const TxvContext = requirePlugin('tencentvideo')
  TxvVideo.prototype.onLoad = function () {
    setTimeout(() => {
      for (let i = 0; i < this.videos.length; i++) {
        const ctx = TxvContext.getTxvContext(this.videos[i])
        ctx.id = this.videos[i]
        this.vm._videos.push(ctx)
      }
    }, 50)
  }
} catch (e) {
  console.error('使用txv-video扩展需注册腾讯视频插件')
}
TxvVideo.prototype.onUpdate = function (_, config) {
  config.trustTags['txv-video'] = true
  this.videos = []
}
TxvVideo.prototype.onParse = function (node, parser) {
  if (node.name === 'iframe' && (node.attrs.src || '').includes('vid')) {
    const vid = node.attrs.src.match(/vid=([^&\s]+)/)
    if (vid) {
      node.name = 'txv-video'
      node.attrs.vid = vid[1]
      this.videos.push(vid[1])
      node.attrs.src = undefined
      parser.expose()
    }
  }
}
// #endif
module.exports = TxvVideo
node_modules/mp-html/plugins/txv-video/miniprogram/build.js
New file
@@ -0,0 +1,6 @@
module.exports = {
  template: '<txv-video wx:if="{{n.name==\'txv-video\'}}" vid="{{n.attrs.vid}}" playerid="{{n.attrs.vid}}" id="{{n.attrs.vid}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" controls data-i="{{i}}" bindplay="play" binderror="mediaError" />',
  usingComponents: {
    'txv-video': 'plugin://tencentvideo/video'
  }
}
node_modules/mp-html/plugins/txv-video/uni-app/build.js
New file
@@ -0,0 +1,3 @@
module.exports = {
  template: '<txv-video v-if="n.name==\'txv-video\'" :vid="n.attrs.vid" :playerid="n.attrs.vid" :id="n.attrs.vid" :class="n.attrs.class" :style="n.attrs.style" controls :data-i="i" @play="play" @error="mediaError" />'
}
node_modules/mp-html/src/miniprogram/index.js
New file
@@ -0,0 +1,396 @@
/*!
 * mp-html v2.5.1
 * https://github.com/jin-yufeng/mp-html
 *
 * Released under the MIT license
 * Author: Jin Yufeng
 */
const Parser = require('./parser')
const plugins = []
Component({
  data: {
    nodes: []
  },
  properties: {
    /**
     * @description å®¹å™¨çš„æ ·å¼
     * @type {String}
     */
    containerStyle: String,
    /**
     * @description ç”¨äºŽæ¸²æŸ“çš„ html å­—符串
     * @type {String}
     */
    content: {
      type: String,
      value: '',
      observer (content) {
        this.setContent(content)
      }
    },
    /**
     * @description æ˜¯å¦å…è®¸å¤–部链接被点击时自动复制
     * @type {Boolean}
     * @default true
     */
    copyLink: {
      type: Boolean,
      value: true
    },
    /**
     * @description ä¸»åŸŸåï¼Œç”¨äºŽæ‹¼æŽ¥é“¾æŽ¥
     * @type {String}
     */
    domain: String,
    /**
     * @description å›¾ç‰‡å‡ºé”™æ—¶çš„占位图链接
     * @type {String}
     */
    errorImg: String,
    /**
     * @description æ˜¯å¦å¼€å¯å›¾ç‰‡æ‡’加载
     * @type {Boolean}
     * @default false
     */
    lazyLoad: Boolean,
    /**
     * @description å›¾ç‰‡åŠ è½½è¿‡ç¨‹ä¸­çš„å ä½å›¾é“¾æŽ¥
     * @type {String}
     */
    loadingImg: String,
    /**
     * @description æ˜¯å¦åœ¨æ’­æ”¾ä¸€ä¸ªè§†é¢‘时自动暂停其他视频
     * @type {Boolean}
     * @default true
     */
    pauseVideo: {
      type: Boolean,
      value: true
    },
    /**
     * @description æ˜¯å¦å…è®¸å›¾ç‰‡è¢«ç‚¹å‡»æ—¶è‡ªåŠ¨é¢„è§ˆ
     * @type {Boolean | String}
     * @default true
     */
    previewImg: {
      type: null,
      value: true
    },
    /**
     * @description æ˜¯å¦ç»™æ¯ä¸ªè¡¨æ ¼æ·»åŠ ä¸€ä¸ªæ»šåŠ¨å±‚ä½¿å…¶èƒ½å•ç‹¬æ¨ªå‘æ»šåŠ¨
     * @type {Boolean}
     * @default false
     */
    scrollTable: Boolean,
    /**
     * @description æ˜¯å¦å¼€å¯é•¿æŒ‰å¤åˆ¶
     * @type {Boolean | String}
     * @default false
     */
    selectable: null,
    /**
     * @description æ˜¯å¦å°† title æ ‡ç­¾çš„内容设置到页面标题
     * @type {Boolean}
     * @default true
     */
    setTitle: {
      type: Boolean,
      value: true
    },
    /**
     * @description æ˜¯å¦å…è®¸å›¾ç‰‡è¢«é•¿æŒ‰æ—¶æ˜¾ç¤ºèœå•
     * @type {Boolean}
     * @default true
     */
    showImgMenu: {
      type: Boolean,
      value: true
    },
    /**
     * @description æ ‡ç­¾çš„默认样式
     * @type {Object}
     */
    tagStyle: Object,
    /**
     * @description æ˜¯å¦ä½¿ç”¨é”šç‚¹é“¾æŽ¥
     * @type {Boolean | Number}
     * @default false
     */
    useAnchor: null
  },
  created () {
    this.plugins = []
    for (let i = plugins.length; i--;) {
      this.plugins.push(new plugins[i](this))
    }
    // #ifdef MP-ALIPAY
    if (this.properties.content) {
      this.setContent(this.properties.content)
    }
    // #endif
  },
  // #ifdef MP-ALIPAY
  didUpdate (e) {
    if (e.content !== this.properties.content) {
      this.setContent(this.properties.content)
    }
  },
  // #endif
  detached () {
    // æ³¨é”€æ’ä»¶
    this._hook('onDetached')
  },
  methods: {
    /**
     * @description å°†é”šç‚¹è·³è½¬çš„范围限定在一个 scroll-view å†…
     * @param {Object} page scroll-view æ‰€åœ¨é¡µé¢çš„示例
     * @param {String} selector scroll-view çš„选择器
     * @param {String} scrollTop scroll-view scroll-top å±žæ€§ç»‘定的变量名
     */
    in (page, selector, scrollTop) {
      if (page && selector && scrollTop) {
        this._in = {
          page,
          selector,
          scrollTop
        }
      }
    },
    /**
     * @description é”šç‚¹è·³è½¬
     * @param {String} id è¦è·³è½¬çš„锚点 id
     * @param {Number} offset è·³è½¬ä½ç½®çš„偏移量
     * @returns {Promise}
     */
    navigateTo (id, offset) {
      return new Promise((resolve, reject) => {
        if (!this.properties.useAnchor) {
          reject(Error('Anchor is disabled'))
          return
        }
        // è·¨ç»„件选择器
        const deep =
          // #ifdef MP-WEIXIN || MP-QQ || MP-TOUTIAO
          '>>>'
        // #endif
        // #ifdef MP-BAIDU || MP-ALIPAY
        ' ' // eslint-disable-line
        // #endif
        const selector = wx.createSelectorQuery()
          // #ifndef MP-ALIPAY
          .in(this._in ? this._in.page : this)
          // #endif
          .select((this._in ? this._in.selector : '._root') + (id ? `${deep}#${id}` : '')).boundingClientRect()
        if (this._in) {
          selector.select(this._in.selector).scrollOffset()
            .select(this._in.selector).boundingClientRect()
        } else {
          // èŽ·å– scroll-view çš„位置和滚动距离
          selector.selectViewport().scrollOffset() // èŽ·å–çª—å£çš„æ»šåŠ¨è·ç¦»
        }
        selector.exec(res => {
          if (!res[0]) {
            reject(Error('Label not found'))
            return
          }
          const scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + (offset || parseInt(this.properties.useAnchor) || 0)
          if (this._in) {
            // scroll-view è·³è½¬
            this._in.page.setData({
              [this._in.scrollTop]: scrollTop
            })
          } else {
            // é¡µé¢è·³è½¬
            wx.pageScrollTo({
              scrollTop,
              duration: 300
            })
          }
          resolve()
        })
      })
    },
    /**
     * @description èŽ·å–æ–‡æœ¬å†…å®¹
     * @returns {String}
     */
    getText (nodes) {
      let text = '';
      (function traversal (nodes) {
        for (let i = 0; i < nodes.length; i++) {
          const node = nodes[i]
          if (node.type === 'text') {
            text += node.text.replace(/&amp;/g, '&')
          } else if (node.name === 'br') {
            text += '\n'
          } else {
            // å—级标签前后加换行
            const isBlock = node.name === 'p' || node.name === 'div' || node.name === 'tr' || node.name === 'li' || (node.name[0] === 'h' && node.name[1] > '0' && node.name[1] < '7')
            if (isBlock && text && text[text.length - 1] !== '\n') {
              text += '\n'
            }
            // é€’归获取子节点的文本
            if (node.children) {
              traversal(node.children)
            }
            if (isBlock && text[text.length - 1] !== '\n') {
              text += '\n'
            } else if (node.name === 'td' || node.name === 'th') {
              text += '\t'
            }
          }
        }
      })(nodes || this.data.nodes)
      return text
    },
    /**
     * @description èŽ·å–å†…å®¹å¤§å°
     * @returns {Promise}
     */
    getRect () {
      return new Promise((resolve, reject) => {
        wx.createSelectorQuery()
          // #ifndef MP-ALIPAY
          .in(this)
          // #endif
          .select('._root').boundingClientRect().exec(res => res[0] ? resolve(res[0]) : reject(Error('Root label not found')))
      })
    },
    /**
     * @description æš‚停播放媒体
     */
    pauseMedia () {
      for (let i = (this._videos || []).length; i--;) {
        this._videos[i].pause()
      }
    },
    /**
     * @description è®¾ç½®åª’体播放速率
     * @param {Number} rate æ’­æ”¾é€Ÿçއ
     */
    setPlaybackRate (rate) {
      this.playbackRate = rate
      for (let i = (this._videos || []).length; i--;) {
        this._videos[i].playbackRate(rate)
      }
    },
    /**
     * @description è®¾ç½®å¯Œæ–‡æœ¬å†…容
     * @param {string} content è¦æ¸²æŸ“çš„ html å­—符串
     * @param {boolean} append æ˜¯å¦åœ¨å°¾éƒ¨è¿½åŠ 
     */
    setContent (content, append) {
      if (!this.imgList || !append) {
        this.imgList = []
      }
      this._videos = []
      const data = {}
      const nodes = new Parser(this).parse(content)
      // å°¾éƒ¨è¿½åР内容
      if (append) {
        for (let i = this.data.nodes.length, j = nodes.length; j--;) {
          data[`nodes[${i + j}]`] = nodes[j]
        }
      } else {
        data.nodes = nodes
      }
      this.setData(data,
        // #ifndef MP-TOUTIAO
        () => {
          this._hook('onLoad')
          this.triggerEvent('load')
        }
        // #endif
      )
      // #ifdef MP-TOUTIAO
      this.selectComponent('#_root', child => {
        child.root = this
        this._hook('onLoad')
        this.triggerEvent('load')
      })
      // #endif
      if (this.properties.lazyLoad || this.imgList._unloadimgs < this.imgList.length / 2) {
        // è®¾ç½®æ‡’加载,每 350ms èŽ·å–é«˜åº¦ï¼Œä¸å˜åˆ™è®¤ä¸ºåŠ è½½å®Œæ¯•
        let height = 0
        const callback = rect => {
          if (!rect || !rect.height) rect = {}
          // 350ms æ€»é«˜åº¦æ— å˜åŒ–就触发 ready äº‹ä»¶
          if (rect.height === height) {
            this.triggerEvent('ready', rect)
          } else {
            height = rect.height
            setTimeout(() => {
              this.getRect().then(callback).catch(callback)
            }, 350)
          }
        }
        this.getRect().then(callback).catch(callback)
      } else {
        // æœªè®¾ç½®æ‡’加载,等待所有图片加载完毕
        if (!this.imgList._unloadimgs) {
          this.getRect().then(rect => {
            this.triggerEvent('ready', rect)
          }).catch(() => {
            this.triggerEvent('ready', {})
          })
        }
      }
    },
    /**
     * @description è°ƒç”¨æ’件的钩子函数
     * @private
     */
    _hook (name) {
      for (let i = plugins.length; i--;) {
        if (this.plugins[i][name]) {
          this.plugins[i][name]()
        }
      }
    },
    // #ifndef MP-TOUTIAO
    /**
     * @description æ·»åŠ å­ç»„ä»¶
     * @private
     */
    _add (e) {
      e
        // #ifndef MP-ALIPAY
        .detail
        // #endif
        .root = this
    }
    // #endif
  }
})
node_modules/mp-html/src/miniprogram/index.json
New file
@@ -0,0 +1,6 @@
{
  "component": true,
  "usingComponents": {
    "node": "./node/node"
  }
}
node_modules/mp-html/src/miniprogram/index.wxml
New file
@@ -0,0 +1,7 @@
<!-- ä¸»ç»„ä»¶ -->
<view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}">
  <!-- åŠ è½½å®Œæˆå‰æ˜¾ç¤ºè‡ªå®šä¹‰ loading -->
  <slot wx:if="{{!nodes[0]}}" />
  <!-- èŠ‚ç‚¹æ ‘ -->
  <node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu,selectable]}}" mp-weixin:mp-qq:mp-baidu:catchadd="_add" mp-alipay:onAdd="_add" />
</view>
node_modules/mp-html/src/miniprogram/index.wxss
New file
@@ -0,0 +1,13 @@
/* æ ¹èŠ‚ç‚¹æ ·å¼ */
._root {
  padding: 1px 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
/* é•¿æŒ‰å¤åˆ¶ */
._select {
  -webkit-user-select: text;
  user-select: text;
}
node_modules/mp-html/src/miniprogram/node/node.js
New file
@@ -0,0 +1,247 @@
/**
 * @fileoverview é€’归子组件,用于显示节点树
 */
Component({
  data: {
    ctrl: {}, // æŽ§åˆ¶ä¿¡å·
    // #ifdef MP-WEIXIN
    isiOS: wx.getSystemInfoSync().system.includes('iOS')
    // #endif
  },
  properties: {
    childs: Array, // å­èŠ‚ç‚¹åˆ—è¡¨
    opts: Array // è®¾ç½® [是否开启懒加载, åŠ è½½ä¸­å ä½å›¾, é”™è¯¯å ä½å›¾, æ˜¯å¦ä½¿ç”¨é•¿æŒ‰èœå•]
  },
  options: {
    addGlobalClass: true
  },
  // #ifndef MP-TOUTIAO
  attached () {
    // #ifndef MP-ALIPAY
    this.triggerEvent('add', this, {
      bubbles: true,
      composed: true
    })
    // #endif
    // #ifdef MP-ALIPAY
    this.props.onAdd(this)
    // #endif
  },
  // #endif
  methods: {
    noop () { },
    /**
     * @description èŽ·å–æ ‡ç­¾
     * @param {String} path è·¯å¾„
     */
    getNode (path) {
      try {
        const nums = path.split('_')
        let node = this.properties.childs[nums[0]]
        for (let i = 1; i < nums.length; i++) {
          node = node.children[nums[i]]
        }
        return node
      } catch {
        return {
          text: '',
          attrs: {},
          children: []
        }
      }
    },
    /**
     * @description æ’­æ”¾è§†é¢‘事件
     * @param {Event} e
     */
    play (e) {
      const i = e.target.dataset.i
      const node = this.getNode(i)
      this.root.triggerEvent('play', {
        source: node.name,
        attrs: {
          ...node.attrs,
          src: node.src[this.data.ctrl[i] || 0]
        }
      })
      if (this.root.properties.pauseVideo) {
        let flag = false
        const id = e.target.id
        for (let i = this.root._videos.length; i--;) {
          if (this.root._videos[i].id === id) {
            flag = true
          } else {
            this.root._videos[i].pause() // è‡ªåŠ¨æš‚åœå…¶ä»–è§†é¢‘
          }
        }
        // å°†è‡ªå·±åŠ å…¥åˆ—è¡¨
        if (!flag) {
          const ctx = wx.createVideoContext(id
            // #ifndef MP-BAIDU
            , this
            // #endif
          )
          ctx.id = id
          if (this.root.playbackRate) {
            ctx.playbackRate(this.root.playbackRate)
          }
          this.root._videos.push(ctx)
        }
      }
    },
    /**
     * @description å›¾ç‰‡ç‚¹å‡»äº‹ä»¶
     * @param {Event} e
     */
    imgTap (e) {
      const node = this.getNode(e.target.dataset.i)
      // çˆ¶çº§ä¸­æœ‰é“¾æŽ¥
      if (node.a) return this.linkTap(node.a)
      if (node.attrs.ignore) return
      this.root.triggerEvent('imgtap', node.attrs)
      if (this.root.properties.previewImg) {
        const current =
          // #ifndef MP-ALIPAY
          this.root.imgList[node.i]
        // #endif
        // #ifdef MP-ALIPAY
        node.i // eslint-disable-line
        // #endif
        // è‡ªåŠ¨é¢„è§ˆå›¾ç‰‡
        wx.previewImage({
          // #ifdef MP-WEIXIN
          showmenu: this.root.properties.showImgMenu,
          // #endif
          // #ifdef MP-ALIPAY
          enablesavephoto: this.root.properties.showImgMenu,
          enableShowPhotoDownload: this.root.properties.showImgMenu,
          // #endif
          current,
          urls: this.root.imgList
        })
      }
    },
    /**
     * @description å›¾ç‰‡åŠ è½½å®Œæˆäº‹ä»¶
     * @param {Event} e
     */
    imgLoad (e) {
      const i = e.target.dataset.i
      const node = this.getNode(i)
      let val
      if (!node.w) {
        val = e.detail.width
      } else if ((this.properties.opts[1] && !this.data.ctrl[i]) || this.data.ctrl[i] === -1) {
        // åŠ è½½å®Œæ¯•ï¼Œå–æ¶ˆåŠ è½½ä¸­å ä½å›¾
        val = 1
      }
      if (val
        // #ifdef MP-TOUTIAO
        && val !== this.data.ctrl[i] // eslint-disable-line
        // #endif
      ) {
        this.setData({
          ['ctrl.' + i]: val
        })
      }
      this.checkReady()
    },
    /**
     * @description æ£€æŸ¥æ˜¯å¦æ‰€æœ‰å›¾ç‰‡åŠ è½½å®Œæ¯•
     */
    checkReady () {
      if (!this.root.properties.lazyLoad) {
        this.root.imgList._unloadimgs -= 1
        if (!this.root.imgList._unloadimgs) {
          setTimeout(() => {
            this.root.getRect().then(rect => {
              this.root.triggerEvent('ready', rect)
            }).catch(() => {
              this.root.triggerEvent('ready', {})
            })
          }, 350)
        }
      }
    },
    /**
     * @description é“¾æŽ¥ç‚¹å‡»äº‹ä»¶
     * @param {Event} e
     */
    linkTap (e) {
      const node = e.currentTarget ? this.getNode(e.currentTarget.dataset.i) : {}
      const attrs = node.attrs || e
      const href = attrs.href
      this.root.triggerEvent('linktap', Object.assign({
        innerText: this.root.getText(node.children || []) // é“¾æŽ¥å†…的文本内容
      }, attrs))
      if (href) {
        if (href[0] === '#') {
          // è·³è½¬é”šç‚¹
          this.root.navigateTo(href.substring(1)).catch(() => { })
        } else if (href.split('?')[0].includes('://')) {
          // å¤åˆ¶å¤–部链接
          if (this.root.properties.copyLink) {
            wx.setClipboardData({
              data: href,
              success: () =>
                wx.showToast({
                  title: '链接已复制'
                })
            })
          }
        } else {
          // è·³è½¬é¡µé¢
          wx.navigateTo({
            url: href,
            fail () {
              wx.switchTab({
                url: href,
                fail () { }
              })
            }
          })
        }
      }
    },
    /**
     * @description é”™è¯¯äº‹ä»¶
     * @param {Event} e
     */
    mediaError (e) {
      const i = e.target.dataset.i
      const node = this.getNode(i)
      if (node.name === 'video' || node.name === 'audio') {
        // åŠ è½½å…¶ä»–æº
        let index = (this.data.ctrl[i] || 0) + 1
        if (index > node.src.length) {
          index = 0
        }
        if (index < node.src.length) {
          return this.setData({
            ['ctrl.' + i]: index
          })
        }
      } else if (node.name === 'img') {
        // æ˜¾ç¤ºé”™è¯¯å ä½å›¾
        if (this.properties.opts[2]) {
          this.setData({
            ['ctrl.' + i]: -1
          })
        }
        this.checkReady()
      }
      if (this.root) {
        this.root.triggerEvent('error', {
          source: node.name,
          attrs: node.attrs,
          errMsg: e.detail.errMsg
        })
      }
    }
  }
})
node_modules/mp-html/src/miniprogram/node/node.json
New file
@@ -0,0 +1,6 @@
{
  "component": true,
  "usingComponents": {
    "node": "./node"
  }
}
node_modules/mp-html/src/miniprogram/node/node.wxml
New file
@@ -0,0 +1,112 @@
<!-- node é€’归子组件 -->
<!-- #ifdef MP-WEIXIN || MP-QQ -->
<wxs module="isInline">
  // è¡Œå†…标签列表
  var inlineTags = {
    abbr: true,
    b: true,
    big: true,
    code: true,
    del: true,
    em: true,
    i: true,
    ins: true,
    label: true,
    q: true,
    small: true,
    span: true,
    strong: true,
    sub: true,
    sup: true
  }
  /**
   * @description åˆ¤æ–­æ˜¯å¦ä¸ºè¡Œå†…标签
   */
  module.exports = function (tagName, style) {
    return inlineTags[tagName] || (style || '').indexOf('inline') !== -1
  }
</wxs>
<!-- #endif -->
<template name="el">
  <!-- å›¾ç‰‡ -->
  <block wx:if="{{n.name==='img'}}">
    <!-- è¡¨æ ¼ä¸­çš„图片,使用 rich-text é˜²æ­¢å¤§å°ä¸æ­£ç¡® -->
    <rich-text wx:if="{{n.t}}" style="display:{{n.t}}" nodes="<img class='_img' style='{{n.attrs.style}}' src='{{n.attrs.src}}'>" data-i="{{i}}" catchtap="imgTap" />
    <block wx:else>
      <!-- å ä½å›¾ -->
      <image wx:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix" />
      <!-- æ˜¾ç¤ºå›¾ç‰‡ -->
      <image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))}}" lazy-load="{{opts[0]}}" mp-weixin:mp-baidu:webp="{{n.webp}}" mp-weixin:show-menu-by-longpress="{{opts[3]&&!n.attrs.ignore}}" mp-baidu:image-menu-prevent="{{!opts[3]||n.attrs.ignore}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="imgTap" bindlongpress="noop" />
    </block>
  </block>
  <!-- æ–‡æœ¬ -->
  <!-- #ifdef MP-WEIXIN || MP-QQ || MP-TOUTIAO -->
  <text wx:elif="{{n.text}}" mp-weixin:user-select="{{opts[4]=='force'&&isiOS}}" decode>{{n.text}}</text>
  <!-- #endif -->
  <text wx:elif="{{n.name==='br'}}">{{'\n'}}</text>
  <!-- é“¾æŽ¥ -->
  <view wx:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap">
    <!-- #ifdef MP-WEIXIN || MP-QQ -->
    <node childs="{{n.children}}" opts="{{opts}}" style="display:inherit" />
    <!-- #endif -->
    <!-- #ifdef MP-BAIDU -->
    <block wx:for="{{n.children}}" wx:key="index">
      <template is="el" data="{{n:item,i:i+'_'+index,opts:opts,ctrl:ctrl}}"></template>
    </block>
    <!-- #endif -->
    <!-- #ifdef MP-ALIPAY || MP-TOUTIAO -->
    <template is="node" data="{{childs:n.children,path:i+'_',opts:opts,ctrl:ctrl}}"></template>
    <!-- #endif -->
  </view>
  <!-- è§†é¢‘ -->
  <video wx:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" object-fit="{{n.attrs['object-fit']}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError" />
  <!-- #ifndef MP-TOUTIAO -->
  <!-- éŸ³é¢‘ -->
  <audio wx:elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError" />
  <!-- #endif -->
  <!-- insert -->
  <!-- å¯Œæ–‡æœ¬ -->
  <rich-text wx:else id="{{n.attrs.id}}" mp-weixin:mp-qq:mp-baidu:mp-toutiao:style="{{n.f}}" mp-alipay:style="display:inline;{{n.f}}" mp-baidu:selectable="{{opts[4]}}" mp-weixin:user-select="{{opts[4]}}" nodes="{{[n]}}" />
</template>
<!-- #ifdef MP-ALIPAY || MP-TOUTIAO -->
<template name="node">
  <block wx:for="{{childs}}" wx:for-item="n" wx:for-index="i" wx:key="i">
    <template wx:if="{{!n.c}}" is="el" data="{{n:n,i:path+i,opts:opts,ctrl:ctrl}}" />
    <view wx:else id="{{n.attrs.id}}" class="_{{n.name}} {{n.attrs.class}}" style="{{n.attrs.style}}">
      <template is="node" data="{{childs:n.children,path:path+i+'_',opts:opts,ctrl:ctrl}}"></template>
    </view>
  </block>
</template>
<template is="node" data="{{childs:childs,path:'',opts:opts,ctrl:ctrl}}"></template>
<!-- #endif -->
<!-- #ifndef MP-ALIPAY || MP-TOUTIAO -->
<!-- ç¬¬ 1 å±‚ -->
<block wx:for="{{childs}}" wx:for-item="n1" wx:for-index="i1" wx:key="i1">
  <template mp-weixin:mp-qq:wx:if="{{!n1.c&&(!n1.children||n1.name==='a'||!isInline(n1.name,n1.attrs.style))}}" mp-baidu:wx:if="{{!n1.c}}" is="el" data="{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}" />
  <view wx:else id="{{n1.attrs.id}}" class="_{{n1.name}} {{n1.attrs.class}}" style="{{n1.attrs.style}}">
    <!-- ç¬¬ 2 å±‚ -->
    <block wx:for="{{n1.children}}" wx:for-item="n2" wx:for-index="i2" wx:key="i2">
      <template mp-weixin:mp-qq:wx:if="{{!n2.c&&(!n2.children||n2.name==='a'||!isInline(n2.name,n2.attrs.style))}}" mp-baidu:wx:if="{{!n2.c}}" is="el" data="{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}" />
      <view wx:else id="{{n2.attrs.id}}" class="_{{n2.name}} {{n2.attrs.class}}" style="{{n2.attrs.style}}">
        <!-- ç¬¬ 3 å±‚ -->
        <block wx:for="{{n2.children}}" wx:for-item="n3" wx:for-index="i3" wx:key="i3">
          <template mp-weixin:mp-qq:wx:if="{{!n3.c&&(!n3.children||n3.name==='a'||!isInline(n3.name,n3.attrs.style))}}" mp-baidu:wx:if="{{!n3.c}}" is="el" data="{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}" />
          <view wx:else id="{{n3.attrs.id}}" class="_{{n3.name}} {{n3.attrs.class}}" style="{{n3.attrs.style}}">
            <!-- ç¬¬ 4 å±‚ -->
            <block wx:for="{{n3.children}}" wx:for-item="n4" wx:for-index="i4" wx:key="i4">
              <template mp-weixin:mp-qq:wx:if="{{!n4.c&&(!n4.children||n4.name==='a'||!isInline(n4.name,n4.attrs.style))}}" mp-baidu:wx:if="{{!n4.c}}" is="el" data="{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}" />
              <view wx:else id="{{n4.attrs.id}}" class="_{{n4.name}} {{n4.attrs.class}}" style="{{n4.attrs.style}}">
                <!-- ç¬¬ 5 å±‚ -->
                <block wx:for="{{n4.children}}" wx:for-item="n5" wx:for-index="i5" wx:key="i5">
                  <template mp-weixin:mp-qq:wx:if="{{!n5.c&&(!n5.children||n5.name==='a'||!isInline(n5.name,n5.attrs.style))}}" mp-baidu:wx:if="{{!n5.c}}" is="el" data="{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}" />
                  <node wx:else id="{{n5.attrs.id}}" class="_{{n5.name}} {{n5.attrs.class}}" style="{{n5.attrs.style}}" childs="{{n5.children}}" opts="{{opts}}" />
                </block>
              </view>
            </block>
          </view>
        </block>
      </view>
    </block>
  </view>
</block>
<!-- #endif -->
node_modules/mp-html/src/miniprogram/node/node.wxss
New file
@@ -0,0 +1,164 @@
/* a æ ‡ç­¾é»˜è®¤æ•ˆæžœ */
._a {
  padding: 1.5px 0 1.5px 0;
  color: #366092;
  word-break: break-all;
}
/* a æ ‡ç­¾ç‚¹å‡»æ€æ•ˆæžœ */
._hover {
  text-decoration: underline;
  opacity: 0.7;
}
/* å›¾ç‰‡é»˜è®¤æ•ˆæžœ */
._img {
  max-width: 100%;
  -webkit-touch-callout: none;
}
/* å†…部样式 */
._b,
._strong {
  font-weight: bold;
}
._code {
  font-family: monospace;
}
._del {
  text-decoration: line-through;
}
._em,
._i {
  font-style: italic;
}
._h1 {
  font-size: 2em;
}
._h2 {
  font-size: 1.5em;
}
._h3 {
  font-size: 1.17em;
}
._h5 {
  font-size: 0.83em;
}
._h6 {
  font-size: 0.67em;
}
._h1,
._h2,
._h3,
._h4,
._h5,
._h6 {
  display: block;
  font-weight: bold;
}
._ins {
  text-decoration: underline;
}
._li {
  display: list-item;
}
._ol {
  list-style-type: decimal;
}
._ol,
._ul {
  display: block;
  padding-left: 40px;
  margin: 1em 0;
}
._q::before {
  content: '"';
}
._q::after {
  content: '"';
}
._sub {
  font-size: smaller;
  vertical-align: sub;
}
._sup {
  font-size: smaller;
  vertical-align: super;
}
._thead,
._tbody,
._tfoot {
  display: table-row-group;
}
._tr {
  display: table-row;
}
._td,
._th {
  display: table-cell;
  vertical-align: middle;
}
._th {
  font-weight: bold;
  text-align: center;
}
._ul {
  list-style-type: disc;
}
._ul ._ul {
  margin: 0;
  list-style-type: circle;
}
._ul ._ul ._ul {
  list-style-type: square;
}
._abbr,
._b,
._code,
._del,
._em,
._i,
._ins,
._label,
._q,
._span,
._strong,
._sub,
._sup {
  display: inline;
}
/* #ifndef MP-ALIPAY || MP-TOUTIAO */
._blockquote,
._div,
._p {
  display: block;
}
/* #endif */
node_modules/mp-html/src/miniprogram/parser.js
New file
@@ -0,0 +1,1276 @@
/**
 * @fileoverview html è§£æžå™¨
 */
// é…ç½®
const config = {
  // ä¿¡ä»»çš„æ ‡ç­¾ï¼ˆä¿æŒæ ‡ç­¾åä¸å˜ï¼‰
  trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
  // å—级标签(转为 div,其他的非信任标签转为 span)
  blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  // è¦ç§»é™¤çš„æ ‡ç­¾
  ignoreTags: makeMap('area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr'),
  // è‡ªé—­åˆæ ‡ç­¾
  voidTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  // html å®žä½“
  entities: {
    lt: '<',
    gt: '>',
    quot: '"',
    apos: "'",
    ensp: '\u2002',
    emsp: '\u2003',
    nbsp: '\xA0',
    semi: ';',
    ndash: '–',
    mdash: '—',
    middot: '·',
    lsquo: '‘',
    rsquo: '’',
    ldquo: '“',
    rdquo: '”',
    bull: '•',
    hellip: '…',
    larr: '←',
    uarr: '↑',
    rarr: '→',
    darr: '↓'
  },
  // é»˜è®¤çš„æ ‡ç­¾æ ·å¼
  tagStyle: {
    address: 'font-style:italic',
    big: 'display:inline;font-size:1.2em',
    caption: 'display:table-caption;text-align:center',
    center: 'text-align:center',
    cite: 'font-style:italic',
    dd: 'margin-left:40px',
    mark: 'background-color:yellow',
    pre: 'font-family:monospace;white-space:pre',
    s: 'text-decoration:line-through',
    small: 'display:inline;font-size:0.8em',
    strike: 'text-decoration:line-through',
    u: 'text-decoration:underline'
  },
  // svg å¤§å°å†™å¯¹ç…§è¡¨
  svgDict: {
    animatetransform: 'animateTransform',
    lineargradient: 'linearGradient',
    viewbox: 'viewBox',
    attributename: 'attributeName',
    repeatcount: 'repeatCount',
    repeatdur: 'repeatDur',
    foreignobject: 'foreignObject'
  }
}
const tagSelector = {}
let windowWidth, system
// #ifdef MP-WEIXIN
if (wx.canIUse('getWindowInfo')) {
  windowWidth = wx.getWindowInfo().windowWidth
  system = wx.getDeviceInfo().system
} else {
// #endif
  const systemInfo = wx.getSystemInfoSync()
  windowWidth = systemInfo.windowWidth
  // #ifdef MP-WEIXIN
  system = systemInfo.system
}
// #endif
const blankChar = makeMap(' ,\r,\n,\t,\f')
let idIndex = 0
/**
 * @description åˆ›å»º map
 * @param {String} str é€—号分隔
 */
function makeMap (str) {
  const map = Object.create(null)
  const list = str.split(',')
  for (let i = list.length; i--;) {
    map[list[i]] = true
  }
  return map
}
/**
 * @description è§£ç  html å®žä½“
 * @param {String} str è¦è§£ç çš„字符串
 * @param {Boolean} amp è¦ä¸è¦è§£ç  &amp;
 * @returns {String} è§£ç åŽçš„字符串
 */
function decodeEntity (str, amp) {
  let i = str.indexOf('&')
  while (i !== -1) {
    const j = str.indexOf(';', i + 3)
    let code
    if (j === -1) break
    if (str[i + 1] === '#') {
      // &#123; å½¢å¼çš„实体
      code = parseInt((str[i + 2] === 'x' ? '0' : '') + str.substring(i + 2, j))
      if (!isNaN(code)) {
        str = str.substr(0, i) + String.fromCharCode(code) + str.substr(j + 1)
      }
    } else {
      // &nbsp; å½¢å¼çš„实体
      code = str.substring(i + 1, j)
      if (config.entities[code] || (code === 'amp' && amp)) {
        str = str.substr(0, i) + (config.entities[code] || '&') + str.substr(j + 1)
      }
    }
    i = str.indexOf('&', i + 1)
  }
  return str
}
/**
 * @description åˆå¹¶å¤šä¸ªå—级标签,加快长内容渲染
 * @param {Array} nodes è¦åˆå¹¶çš„æ ‡ç­¾æ•°ç»„
 */
function mergeNodes (nodes) {
  let i = nodes.length - 1
  for (let j = i; j >= -1; j--) {
    if (j === -1 || nodes[j].c || !nodes[j].name || (nodes[j].name !== 'div' && nodes[j].name !== 'p' && nodes[j].name[0] !== 'h') || (nodes[j].attrs.style || '').includes('inline')) {
      if (i - j >= 5) {
        nodes.splice(j + 1, i - j, {
          name: 'div',
          attrs: {},
          children: nodes.slice(j + 1, i + 1)
        })
      }
      i = j - 1
    }
  }
}
/**
 * @description html è§£æžå™¨
 * @param {Object} vm ç»„件实例
 */
function Parser (vm) {
  this.options = vm.properties || {}
  this.tagStyle = Object.assign({}, config.tagStyle, this.options.tagStyle)
  this.imgList = vm.imgList || []
  this.imgList._unloadimgs = 0
  this.plugins = vm.plugins || []
  this.attrs = Object.create(null)
  this.stack = []
  this.nodes = []
  this.pre = (this.options.containerStyle || '').includes('white-space') && this.options.containerStyle.includes('pre') ? 2 : 0
}
/**
 * @description æ‰§è¡Œè§£æž
 * @param {String} content è¦è§£æžçš„æ–‡æœ¬
 */
Parser.prototype.parse = function (content) {
  // æ’件处理
  for (let i = this.plugins.length; i--;) {
    if (this.plugins[i].onUpdate) {
      content = this.plugins[i].onUpdate(content, config) || content
    }
  }
  new Lexer(this).parse(content)
  // å‡ºæ ˆæœªé—­åˆçš„æ ‡ç­¾
  while (this.stack.length) {
    this.popNode()
  }
  if (this.nodes.length > 50) {
    mergeNodes(this.nodes)
  }
  return this.nodes
}
/**
 * @description å°†æ ‡ç­¾æš´éœ²å‡ºæ¥ï¼ˆä¸è¢« rich-text åŒ…含)
 */
Parser.prototype.expose = function () {
  for (let i = this.stack.length; i--;) {
    const item = this.stack[i]
    if (item.c || item.name === 'a' || item.name === 'video' || item.name === 'audio') return
    item.c = 1
  }
}
/**
 * @description å¤„理插件
 * @param {Object} node è¦å¤„理的标签
 * @returns {Boolean} æ˜¯å¦è¦ç§»é™¤æ­¤æ ‡ç­¾
 */
Parser.prototype.hook = function (node) {
  for (let i = this.plugins.length; i--;) {
    if (this.plugins[i].onParse && this.plugins[i].onParse(node, this) === false) return false
  }
  return true
}
/**
 * @description å°†é“¾æŽ¥æ‹¼æŽ¥ä¸Šä¸»åŸŸå
 * @param {String} url éœ€è¦æ‹¼æŽ¥çš„链接
 * @returns {String} æ‹¼æŽ¥åŽçš„链接
 */
Parser.prototype.getUrl = function (url) {
  const domain = this.options.domain
  if (url[0] === '/') {
    if (url[1] === '/') {
      // // å¼€å¤´çš„补充协议名
      url = (domain ? domain.split('://')[0] : 'http') + ':' + url
    } else if (domain) {
      // å¦åˆ™è¡¥å……整个域名
      url = domain + url
    }
  } else if (domain && !url.includes('data:') && !url.includes('://')) {
    url = domain + '/' + url
  }
  return url
}
/**
 * @description è§£æžæ ·å¼è¡¨
 * @param {Object} node æ ‡ç­¾
 * @returns {Object}
 */
Parser.prototype.parseStyle = function (node) {
  const attrs = node.attrs
  const list = (this.tagStyle[node.name] || '').split(';').concat((attrs.style || '').split(';'))
  const styleObj = {}
  let tmp = ''
  if (attrs.id && !this.xml) {
    // æš´éœ²é”šç‚¹
    if (this.options.useAnchor) {
      this.expose()
    } else if (node.name !== 'img' && node.name !== 'a' && node.name !== 'video' && node.name !== 'audio') {
      attrs.id = undefined
    }
  }
  // è½¬æ¢ width å’Œ height å±žæ€§
  if (attrs.width) {
    styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px')
    attrs.width = undefined
  }
  if (attrs.height) {
    styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px')
    attrs.height = undefined
  }
  for (let i = 0, len = list.length; i < len; i++) {
    const info = list[i].split(':')
    if (info.length < 2) continue
    const key = info.shift().trim().toLowerCase()
    let value = info.join(':').trim()
    if ((value[0] === '-' && value.lastIndexOf('-') > 0) || value.includes('safe')) {
      // å…¼å®¹æ€§çš„ css ä¸åŽ‹ç¼©
      tmp += `;${key}:${value}`
    } else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import')) {
      // é‡å¤çš„æ ·å¼è¿›è¡Œè¦†ç›–
      if (value.includes('url')) {
        // å¡«å……链接
        let j = value.indexOf('(') + 1
        if (j) {
          while (value[j] === '"' || value[j] === "'" || blankChar[value[j]]) {
            j++
          }
          value = value.substr(0, j) + this.getUrl(value.substr(j))
        }
      } else if (value.includes('rpx')) {
        // è½¬æ¢ rpx(rich-text å†…部不支持 rpx)
        value = value.replace(/[0-9.]+\s*rpx/g, $ => parseFloat($) * windowWidth / 750 + 'px')
      }
      styleObj[key] = value
    }
  }
  node.attrs.style = tmp
  return styleObj
}
/**
 * @description è§£æžåˆ°æ ‡ç­¾å
 * @param {String} name æ ‡ç­¾å
 * @private
 */
Parser.prototype.onTagName = function (name) {
  this.tagName = this.xml ? name : name.toLowerCase()
  if (this.tagName === 'svg') {
    this.xml = (this.xml || 0) + 1 // svg æ ‡ç­¾å†…大小写敏感
    config.ignoreTags.style = undefined // svg æ ‡ç­¾å†… style å¯ç”¨
  }
}
/**
 * @description è§£æžåˆ°å±žæ€§å
 * @param {String} name å±žæ€§å
 * @private
 */
Parser.prototype.onAttrName = function (name) {
  name = this.xml ? name : name.toLowerCase()
  if (name.substr(0, 5) === 'data-') {
    if (name === 'data-src' && !this.attrs.src) {
      // data-src è‡ªåŠ¨è½¬ä¸º src
      this.attrName = 'src'
    } else if (this.tagName === 'img' || this.tagName === 'a') {
      // a å’Œ img æ ‡ç­¾ä¿ç•™ data- çš„属性,可以在 imgtap å’Œ linktap äº‹ä»¶ä¸­ä½¿ç”¨
      this.attrName = name
    } else {
      // å‰©ä½™çš„移除以减小大小
      this.attrName = undefined
    }
  } else {
    this.attrName = name
    this.attrs[name] = 'T' // boolean åž‹å±žæ€§ç¼ºçœè®¾ç½®
  }
}
/**
 * @description è§£æžåˆ°å±žæ€§å€¼
 * @param {String} val å±žæ€§å€¼
 * @private
 */
Parser.prototype.onAttrVal = function (val) {
  const name = this.attrName || ''
  if (name === 'style' || name === 'href') {
    // éƒ¨åˆ†å±žæ€§è¿›è¡Œå®žä½“解码
    this.attrs[name] = decodeEntity(val, true)
  } else if (name.includes('src')) {
    // æ‹¼æŽ¥ä¸»åŸŸå
    this.attrs[name] = this.getUrl(decodeEntity(val, true))
  } else if (name) {
    this.attrs[name] = val
  }
}
/**
 * @description è§£æžåˆ°æ ‡ç­¾å¼€å§‹
 * @param {Boolean} selfClose æ˜¯å¦æœ‰è‡ªé—­åˆæ ‡è¯† />
 * @private
 */
Parser.prototype.onOpenTag = function (selfClose) {
  // æ‹¼è£… node
  const node = Object.create(null)
  node.name = this.tagName
  node.attrs = this.attrs
  this.attrs = Object.create(null)
  const attrs = node.attrs
  const parent = this.stack[this.stack.length - 1]
  const siblings = parent ? parent.children : this.nodes
  const close = this.xml ? selfClose : config.voidTags[node.name]
  // æ›¿æ¢æ ‡ç­¾åé€‰æ‹©å™¨
  if (tagSelector[node.name]) {
    attrs.class = tagSelector[node.name] + (attrs.class ? ' ' + attrs.class : '')
  }
  // è½¬æ¢ embed æ ‡ç­¾
  if (node.name === 'embed') {
    const src = attrs.src || ''
    // æŒ‰ç…§åŽç¼€åå’Œ type å°† embed è½¬ä¸º video æˆ– audio
    if (src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8') || (attrs.type || '').includes('video')) {
      node.name = 'video'
    } else if (src.includes('.mp3') || src.includes('.wav') || src.includes('.aac') || src.includes('.m4a') || (attrs.type || '').includes('audio')) {
      node.name = 'audio'
    }
    if (attrs.autostart) {
      attrs.autoplay = 'T'
    }
    attrs.controls = 'T'
  }
  // å¤„理音视频
  if (node.name === 'video' || node.name === 'audio') {
    // è®¾ç½® id,用于获取 context
    if (node.name === 'video' && !attrs.id) {
      attrs.id = 'v' + idIndex++
    }
    // æ²¡æœ‰è®¾ç½® controls ä¹Ÿæ²¡æœ‰è®¾ç½® autoplay çš„自动设置 controls
    if (!attrs.controls && !attrs.autoplay) {
      attrs.controls = 'T'
    }
    // ç”¨æ•°ç»„存储所有可用的 source
    node.src = []
    if (attrs.src) {
      node.src.push(attrs.src)
      attrs.src = undefined
    }
    this.expose()
  }
  // å¤„理自闭合标签
  if (close) {
    // è¦è¢«ç§»é™¤çš„æ ‡ç­¾
    if (!this.hook(node) || config.ignoreTags[node.name]) {
      if (node.name === 'base' && !this.options.domain) {
        // é€šè¿‡ base æ ‡ç­¾è®¾ç½®ä¸»åŸŸå
        this.options.domain = attrs.href
      } else if (node.name === 'source' && parent && (parent.name === 'video' || parent.name === 'audio') && attrs.src) {
        // è®¾ç½® source æ ‡ç­¾ï¼ˆä»…父节点为 video æˆ– audio æ—¶æœ‰æ•ˆï¼‰
        parent.src.push(attrs.src)
      }
      return
    }
    // è§£æž style
    const styleObj = this.parseStyle(node)
    // å¤„理图片
    if (node.name === 'img') {
      if (attrs.src) {
        // æ ‡è®° webp
        if (attrs.src.includes('webp')) {
          node.webp = 'T'
        }
        // data url å›¾ç‰‡å¦‚果没有设置 original-src é»˜è®¤ä¸ºä¸å¯é¢„览的小图片
        if (attrs.src.includes('data:') && this.options.previewImg !== 'all' && !attrs['original-src']) {
          attrs.ignore = 'T'
        }
        if (!attrs.ignore || node.webp || attrs.src.includes('cloud://')) {
          for (let i = this.stack.length; i--;) {
            const item = this.stack[i]
            if (item.name === 'table' && !node.webp && !attrs.src.includes('cloud://')) {
              if (!styleObj.display || styleObj.display.includes('inline')) {
                node.t = 'inline-block'
              } else {
                node.t = styleObj.display
              }
              styleObj.display = undefined
            }
            const style = item.attrs.style || ''
            if (style.includes('flex:') && !style.includes('flex:0') && !style.includes('flex: 0') && (!styleObj.width || parseInt(styleObj.width) > 100)) {
              styleObj.width = '100% !important'
              styleObj.height = ''
              for (let j = i + 1; j < this.stack.length; j++) {
                this.stack[j].attrs.style = (this.stack[j].attrs.style || '').replace('inline-', '')
              }
            } else if (style.includes('flex') && styleObj.width === '100%') {
              for (let j = i + 1; j < this.stack.length; j++) {
                const style = this.stack[j].attrs.style || ''
                if (!style.includes(';width') && !style.includes(' width') && style.indexOf('width') !== 0) {
                  styleObj.width = ''
                  break
                }
              }
            } else if (style.includes('inline-block')) {
              if (styleObj.width && styleObj.width[styleObj.width.length - 1] === '%') {
                item.attrs.style += ';max-width:' + styleObj.width
                styleObj.width = ''
              } else {
                item.attrs.style += ';max-width:100%'
              }
            }
            if (item.name === 'a') {
              node.a = item.attrs
            } else {
              item.c = 1
            }
          }
          node.i = this.imgList.length
          let src = attrs['original-src'] || attrs.src
          // #ifndef MP-ALIPAY
          if (this.imgList.includes(src)) {
            // å¦‚果有重复的链接则对域名进行随机大小写变换避免预览时错位
            let i = src.indexOf('://')
            if (i !== -1) {
              i += 3
              let newSrc = src.substr(0, i)
              for (; i < src.length; i++) {
                if (src[i] === '/') break
                newSrc += Math.random() > 0.5 ? src[i].toUpperCase() : src[i]
              }
              newSrc += src.substr(i)
              src = newSrc
            }
          }
          // #endif
          this.imgList.push(src)
          if (!node.t) {
            this.imgList._unloadimgs += 1
          }
        }
      }
      if (styleObj.display === 'inline') {
        styleObj.display = ''
      }
      if (attrs.ignore) {
        styleObj['max-width'] = styleObj['max-width'] || '100%'
        attrs.style += ';-webkit-touch-callout:none'
      }
      // è®¾ç½®çš„宽度超出屏幕,为避免变形,高度转为自动
      if (parseInt(styleObj.width) > windowWidth) {
        styleObj.height = undefined
      }
      // è®°å½•是否设置了宽高
      if (!isNaN(parseInt(styleObj.width))) {
        node.w = 'T'
      }
      if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes('%') || (parent && (parent.attrs.style || '').includes('height')))) {
        node.h = 'T'
      }
      if (node.w && node.h && styleObj['object-fit']) {
        if (styleObj['object-fit'] === 'contain') {
          node.m = 'aspectFit'
        } else if (styleObj['object-fit'] === 'cover') {
          node.m = 'aspectFill'
        }
      }
    } else if (node.name === 'svg') {
      siblings.push(node)
      this.stack.push(node)
      this.popNode()
      return
    }
    for (const key in styleObj) {
      if (styleObj[key]) {
        attrs.style += `;${key}:${styleObj[key].replace(' !important', '')}`
      }
    }
    attrs.style = attrs.style.substr(1) || undefined
    // #ifdef MP-BAIDU
    if (!attrs.style) {
      delete attrs.style
    }
    // #endif
  } else {
    if ((node.name === 'pre' || ((attrs.style || '').includes('white-space') && attrs.style.includes('pre'))) && this.pre !== 2) {
      this.pre = node.pre = 1
    }
    node.children = []
    this.stack.push(node)
  }
  // åŠ å…¥èŠ‚ç‚¹æ ‘
  siblings.push(node)
}
/**
 * @description è§£æžåˆ°æ ‡ç­¾ç»“束
 * @param {String} name æ ‡ç­¾å
 * @private
 */
Parser.prototype.onCloseTag = function (name) {
  // ä¾æ¬¡å‡ºæ ˆåˆ°åŒ¹é…ä¸ºæ­¢
  name = this.xml ? name : name.toLowerCase()
  let i
  for (i = this.stack.length; i--;) {
    if (this.stack[i].name === name) break
  }
  if (i !== -1) {
    while (this.stack.length > i) {
      this.popNode()
    }
  } else if (name === 'p' || name === 'br') {
    const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes
    siblings.push({
      name,
      attrs: {
        class: tagSelector[name],
        style: this.tagStyle[name]
      }
    })
  }
}
/**
 * @description å¤„理标签出栈
 * @private
 */
Parser.prototype.popNode = function () {
  const node = this.stack.pop()
  let attrs = node.attrs
  const children = node.children
  const parent = this.stack[this.stack.length - 1]
  const siblings = parent ? parent.children : this.nodes
  if (!this.hook(node) || config.ignoreTags[node.name]) {
    // èŽ·å–æ ‡é¢˜
    if (node.name === 'title' && children.length && children[0].type === 'text' && this.options.setTitle) {
      wx.setNavigationBarTitle({
        title: children[0].text
      })
    }
    siblings.pop()
    return
  }
  if (node.pre && this.pre !== 2) {
    // æ˜¯å¦åˆå¹¶ç©ºç™½ç¬¦æ ‡è¯†
    this.pre = node.pre = undefined
    for (let i = this.stack.length; i--;) {
      if (this.stack[i].pre) {
        this.pre = 1
      }
    }
  }
  // è½¬æ¢ svg
  if (node.name === 'svg') {
    if (this.xml > 1) {
      // å¤šå±‚ svg åµŒå¥—
      this.xml--
      return
    }
    let src = ''
    const style = attrs.style
    attrs.style = ''
    attrs.xmlns = 'http://www.w3.org/2000/svg';
    (function traversal (node) {
      if (node.type === 'text') {
        src += node.text
        return
      }
      const name = config.svgDict[node.name] || node.name
      if (name === 'foreignObject') {
        for (const child of (node.children || [])) {
          if (child.attrs && !child.attrs.xmlns) {
            child.attrs.xmlns = 'http://www.w3.org/1999/xhtml'
            break
          }
        }
      }
      src += '<' + name
      for (const item in node.attrs) {
        const val = node.attrs[item]
        if (val) {
          src += ` ${config.svgDict[item] || item}="${val.replace(/"/g, '')}"`
        }
      }
      if (!node.children) {
        src += '/>'
      } else {
        src += '>'
        for (let i = 0; i < node.children.length; i++) {
          traversal(node.children[i])
        }
        src += '</' + name + '>'
      }
    })(node)
    node.name = 'img'
    node.attrs = {
      src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
      style,
      ignore: 'T'
    }
    node.children = undefined
    this.xml = false
    config.ignoreTags.style = true
    return
  }
  const styleObj = {}
  // è½¬æ¢ align å±žæ€§
  if (attrs.align) {
    if (node.name === 'table') {
      if (attrs.align === 'center') {
        styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto'
      } else {
        styleObj.float = attrs.align
      }
    } else {
      styleObj['text-align'] = attrs.align
    }
    attrs.align = undefined
  }
  // è½¬æ¢ dir å±žæ€§
  if (attrs.dir) {
    styleObj.direction = attrs.dir
    attrs.dir = undefined
  }
  // è½¬æ¢ font æ ‡ç­¾çš„属性
  if (node.name === 'font') {
    if (attrs.color) {
      styleObj.color = attrs.color
      attrs.color = undefined
    }
    if (attrs.face) {
      styleObj['font-family'] = attrs.face
      attrs.face = undefined
    }
    if (attrs.size) {
      let size = parseInt(attrs.size)
      if (!isNaN(size)) {
        if (size < 1) {
          size = 1
        } else if (size > 7) {
          size = 7
        }
        styleObj['font-size'] = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', 'xxx-large'][size - 1]
      }
      attrs.size = undefined
    }
  }
  // ä¸€äº›ç¼–辑器的自带 class
  if ((attrs.class || '').includes('align-center')) {
    styleObj['text-align'] = 'center'
  }
  Object.assign(styleObj, this.parseStyle(node))
  if (node.name !== 'table' && parseInt(styleObj.width) > windowWidth) {
    styleObj['max-width'] = '100%'
    styleObj['box-sizing'] = 'border-box'
  }
  if (config.blockTags[node.name]) {
    node.name = 'div'
  } else if (!config.trustTags[node.name] && !this.xml) {
    // æœªçŸ¥æ ‡ç­¾è½¬ä¸º span,避免无法显示
    node.name = 'span'
  } else if (node.name === 'a' || node.name === 'ad') {
    this.expose()
  } else if (node.name === 'video' || node.name === 'audio') {
    if ((styleObj.height || '').includes('auto')) {
      styleObj.height = undefined
    }
    node.children = undefined
  } else if ((node.name === 'ul' || node.name === 'ol') && node.c) {
    // åˆ—表处理
    const types = {
      a: 'lower-alpha',
      A: 'upper-alpha',
      i: 'lower-roman',
      I: 'upper-roman'
    }
    if (types[attrs.type]) {
      attrs.style += ';list-style-type:' + types[attrs.type]
      attrs.type = undefined
    }
    node.c = 1
    for (let i = children.length; i--;) {
      if (children[i].name === 'li') {
        children[i].c = 1
      }
    }
  } else if (node.name === 'table') {
    // è¡¨æ ¼å¤„理
    // cellpadding、cellspacing、border è¿™å‡ ä¸ªå¸¸ç”¨è¡¨æ ¼å±žæ€§éœ€è¦é€šè¿‡è½¬æ¢å®žçް
    let padding = parseFloat(attrs.cellpadding)
    let spacing = parseFloat(attrs.cellspacing)
    const border = parseFloat(attrs.border)
    const bordercolor = styleObj['border-color']
    const borderstyle = styleObj['border-style']
    if (node.c) {
      // padding å’Œ spacing é»˜è®¤ 2
      if (isNaN(padding)) {
        padding = 2
      }
      if (isNaN(spacing)) {
        spacing = 2
      }
    }
    if (border) {
      attrs.style += `;border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'}`
    }
    if (node.flag && node.c) {
      node.flag = undefined
      // æœ‰ colspan æˆ– rowspan ä¸”含有链接的表格通过 grid å¸ƒå±€å®žçް
      styleObj.display = 'grid'
      if (styleObj['border-collapse'] === 'collapse') {
        styleObj['border-collapse'] = undefined
        spacing = 0
      }
      if (spacing) {
        styleObj['grid-gap'] = spacing + 'px'
        styleObj.padding = spacing + 'px'
      } else if (border) {
        // æ— é—´éš”的情况下避免边框重叠
        attrs.style += ';border-left:0;border-top:0'
      }
      const width = [] // è¡¨æ ¼çš„列宽
      const trList = [] // tr åˆ—表
      const cells = [] // ä¿å­˜æ–°çš„单元格
      const map = {}; // è¢«åˆå¹¶å•元格占用的格子
      (function traversal (nodes) {
        for (let i = 0; i < nodes.length; i++) {
          if (nodes[i].name === 'tr') {
            trList.push(nodes[i])
          } else if (nodes[i].name === 'colgroup') {
            let colI = 1
            for (const col of (nodes[i].children || [])) {
              if (col.name === 'col') {
                const style = col.attrs.style || ''
                const start = style.indexOf('width') ? style.indexOf(';width') : 0
                // æå–出宽度
                if (start !== -1) {
                  let end = style.indexOf(';', start + 6)
                  if (end === -1) {
                    end = style.length
                  }
                  width[colI] = style.substring(start ? start + 7 : 6, end)
                }
                colI += 1
              }
            }
          } else {
            traversal(nodes[i].children || [])
          }
        }
      })(children)
      for (let row = 1; row <= trList.length; row++) {
        let col = 1
        for (let j = 0; j < trList[row - 1].children.length; j++) {
          const td = trList[row - 1].children[j]
          if (td.name === 'td' || td.name === 'th') {
            // è¿™ä¸ªæ ¼å­è¢«ä¸Šé¢çš„单元格占用,则列号++
            while (map[row + '.' + col]) {
              col++
            }
            td.c = 1
            let style = td.attrs.style || ''
            let start = style.indexOf('width') ? style.indexOf(';width') : 0
            // æå–出 td çš„宽度
            if (start !== -1) {
              let end = style.indexOf(';', start + 6)
              if (end === -1) {
                end = style.length
              }
              if (!td.attrs.colspan) {
                width[col] = style.substring(start ? start + 7 : 6, end)
              }
              style = style.substr(0, start) + style.substr(end)
            }
            // è®¾ç½®ç«–直对齐
            style += ';display:flex;flex-direction:column'
            start = style.indexOf('vertical-align')
            if (start !== -1) {
              const val = style.substr(start + 15, 10)
              if (val.includes('middle')) {
                style += ';justify-content:center'
              } else if (val.includes('bottom')) {
                style += ';justify-content:flex-end'
              }
            } else {
              style += ';justify-content:center'
            }
            // è®¾ç½®æ°´å¹³å¯¹é½
            start = style.indexOf('text-align')
            if (start !== -1) {
              const val = style.substr(start + 11, 10)
              if (val.includes('center')) {
                style += ';justify-content: center'
              } else if (val.includes('right')) {
                style += ';justify-content: right'
              }
            }
            style = (border ? `;border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'}` + (spacing ? '' : ';border-right:0;border-bottom:0') : '') + (padding ? `;padding:${padding}px` : '') + ';' + style
            // å¤„理列合并
            if (td.attrs.colspan) {
              style += `;grid-column-start:${col};grid-column-end:${col + parseInt(td.attrs.colspan)}`
              if (!td.attrs.rowspan) {
                style += `;grid-row-start:${row};grid-row-end:${row + 1}`
              }
              col += parseInt(td.attrs.colspan) - 1
            }
            // å¤„理行合并
            if (td.attrs.rowspan) {
              style += `;grid-row-start:${row};grid-row-end:${row + parseInt(td.attrs.rowspan)}`
              if (!td.attrs.colspan) {
                style += `;grid-column-start:${col};grid-column-end:${col + 1}`
              }
              // è®°å½•下方单元格被占用
              for (let rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) {
                for (let colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) {
                  map[(row + rowspan) + '.' + (col - colspan)] = 1
                }
              }
            }
            if (style) {
              td.attrs.style = style
            }
            cells.push(td)
            col++
          }
        }
        if (row === 1) {
          let temp = ''
          for (let i = 1; i < col; i++) {
            temp += (width[i] ? width[i] : 'auto') + ' '
          }
          styleObj['grid-template-columns'] = temp
        }
      }
      node.children = cells
    } else {
      // æ²¡æœ‰ä½¿ç”¨åˆå¹¶å•元格的表格通过 table å¸ƒå±€å®žçް
      if (node.c) {
        styleObj.display = 'table'
      }
      if (!isNaN(spacing)) {
        styleObj['border-spacing'] = spacing + 'px'
      }
      if (border || padding || node.c) {
        // éåކ
        (function traversal (nodes) {
          for (let i = 0; i < nodes.length; i++) {
            const td = nodes[i]
            if (node.c) {
              td.c = 1
            }
            if (td.name === 'th' || td.name === 'td') {
              if (border) {
                td.attrs.style = `border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'};${td.attrs.style || ''}`
              }
              if (padding) {
                td.attrs.style = `padding:${padding}px;${td.attrs.style || ''}`
              }
            } else if (td.children) {
              traversal(td.children)
            }
          }
        })(children)
      }
    }
    // ç»™è¡¨æ ¼æ·»åŠ ä¸€ä¸ªå•ç‹¬çš„æ¨ªå‘æ»šåŠ¨å±‚
    if (this.options.scrollTable && !(attrs.style || '').includes('inline')) {
      const table = Object.assign({}, node)
      node.name = 'div'
      node.attrs = {
        style: 'overflow-x:auto;padding:1px'
      }
      node.children = [table]
      attrs = table.attrs
    }
  } else if ((node.name === 'tbody' || node.name === 'tr') && node.flag && node.c) {
    node.flag = undefined;
    (function traversal (nodes) {
      for (let i = 0; i < nodes.length; i++) {
        if (nodes[i].name === 'td') {
          // é¢œè‰²æ ·å¼è®¾ç½®ç»™å•元格避免丢失
          for (const style of ['color', 'background', 'background-color']) {
            if (styleObj[style]) {
              nodes[i].attrs.style = style + ':' + styleObj[style] + ';' + (nodes[i].attrs.style || '')
            }
          }
        } else {
          traversal(nodes[i].children || [])
        }
      }
    })(children)
  } else if ((node.name === 'td' || node.name === 'th') && (attrs.colspan || attrs.rowspan)) {
    for (let i = this.stack.length; i--;) {
      if (this.stack[i].name === 'table' || this.stack[i].name === 'tbody' || this.stack[i].name === 'tr') {
        this.stack[i].flag = 1 // æŒ‡ç¤ºå«æœ‰åˆå¹¶å•元格
      }
    }
  } else if (node.name === 'ruby') {
    // è½¬æ¢ ruby
    node.name = 'span'
    for (let i = 0; i < children.length - 1; i++) {
      if (children[i].type === 'text' && children[i + 1].name === 'rt') {
        children[i] = {
          name: 'span',
          attrs: {
            style: 'display:inline-block;text-align:center'
          },
          children: [{
            name: 'div',
            attrs: {
              style: 'font-size:50%;' + (children[i + 1].attrs.style || '')
            },
            children: children[i + 1].children
          }, children[i]]
        }
        children.splice(i + 1, 1)
      }
    }
  }
  if ((styleObj.display || '').includes('flex') && !node.c) {
    for (let i = children.length; i--;) {
      const item = children[i]
      if (item.f) {
        item.attrs.style = (item.attrs.style || '') + item.f
        item.f = undefined
      }
    }
  }
  // flex å¸ƒå±€æ—¶éƒ¨åˆ†æ ·å¼éœ€è¦æå–到 rich-text å¤–层
  const flex = parent && ((parent.attrs.style || '').includes('flex') || (parent.attrs.style || '').includes('grid')) && !node.c
    // #ifdef MP-WEIXIN || MP-QQ
    && !(styleObj.display || '').includes('inline') // eslint-disable-line
  // #endif
  if (flex) {
    node.f = ';max-width:100%'
  }
  if (children.length >= 50 && node.c && !(styleObj.display || '').includes('flex')) {
    mergeNodes(children)
  }
  for (const key in styleObj) {
    if (styleObj[key]) {
      const val = `;${key}:${styleObj[key].replace(' !important', '')}`
      if (flex && ((key.includes('flex') && key !== 'flex-direction') || key === 'align-self' || key.includes('grid') || styleObj[key][0] === '-' || (key.includes('width') && val.includes('%')))) {
        node.f += val
        if (key === 'width') {
          attrs.style += ';width:100%'
        }
      } else {
        attrs.style += val
      }
    }
  }
  attrs.style = attrs.style.substr(1) || undefined
  // #ifdef MP-BAIDU
  if (!attrs.style) {
    delete attrs.style
  }
  // #endif
}
/**
 * @description è§£æžåˆ°æ–‡æœ¬
 * @param {String} text æ–‡æœ¬å†…容
 */
Parser.prototype.onText = function (text) {
  if (!this.pre) {
    // åˆå¹¶ç©ºç™½ç¬¦
    let trim = ''
    let flag
    for (let i = 0, len = text.length; i < len; i++) {
      if (!blankChar[text[i]]) {
        trim += text[i]
      } else {
        if (trim[trim.length - 1] !== ' ') {
          trim += ' '
        }
        if (text[i] === '\n' && !flag) {
          flag = true
        }
      }
    }
    // åŽ»é™¤å«æœ‰æ¢è¡Œç¬¦çš„ç©ºä¸²
    if (trim === ' ' && flag) return
    text = trim
  }
  const node = Object.create(null)
  node.type = 'text'
  node.text = decodeEntity(text)
  if (this.hook(node)) {
    // #ifdef MP-WEIXIN
    if (this.options.selectable === 'force' && system.includes('iOS') && !wx.canIUse('rich-text.user-select')) {
      this.expose()
    }
    // #endif
    const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes
    siblings.push(node)
  }
}
/**
 * @description html è¯æ³•分析器
 * @param {Object} handler é«˜å±‚处理器
 */
function Lexer (handler) {
  this.handler = handler
}
/**
 * @description æ‰§è¡Œè§£æž
 * @param {String} content è¦è§£æžçš„æ–‡æœ¬
 */
Lexer.prototype.parse = function (content) {
  this.content = content || ''
  this.i = 0 // æ ‡è®°è§£æžä½ç½®
  this.start = 0 // æ ‡è®°ä¸€ä¸ªå•词的开始位置
  this.state = this.text // å½“前状态
  for (let len = this.content.length; this.i !== -1 && this.i < len;) {
    this.state()
  }
}
/**
 * @description æ£€æŸ¥æ ‡ç­¾æ˜¯å¦é—­åˆ
 * @param {String} method å¦‚果闭合要进行的操作
 * @returns {Boolean} æ˜¯å¦é—­åˆ
 * @private
 */
Lexer.prototype.checkClose = function (method) {
  const selfClose = this.content[this.i] === '/'
  if (this.content[this.i] === '>' || (selfClose && this.content[this.i + 1] === '>')) {
    if (method) {
      this.handler[method](this.content.substring(this.start, this.i))
    }
    this.i += selfClose ? 2 : 1
    this.start = this.i
    this.handler.onOpenTag(selfClose)
    if (this.handler.tagName === 'script') {
      this.i = this.content.indexOf('</', this.i)
      if (this.i !== -1) {
        this.i += 2
        this.start = this.i
      }
      this.state = this.endTag
    } else {
      this.state = this.text
    }
    return true
  }
  return false
}
/**
 * @description æ–‡æœ¬çŠ¶æ€
 * @private
 */
Lexer.prototype.text = function () {
  this.i = this.content.indexOf('<', this.i) // æŸ¥æ‰¾æœ€è¿‘的标签
  if (this.i === -1) {
    // æ²¡æœ‰æ ‡ç­¾äº†
    if (this.start < this.content.length) {
      this.handler.onText(this.content.substring(this.start, this.content.length))
    }
    return
  }
  const c = this.content[this.i + 1]
  if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
    // æ ‡ç­¾å¼€å¤´
    if (this.start !== this.i) {
      this.handler.onText(this.content.substring(this.start, this.i))
    }
    this.start = ++this.i
    this.state = this.tagName
  } else if (c === '/' || c === '!' || c === '?') {
    if (this.start !== this.i) {
      this.handler.onText(this.content.substring(this.start, this.i))
    }
    const next = this.content[this.i + 2]
    if (c === '/' && ((next >= 'a' && next <= 'z') || (next >= 'A' && next <= 'Z'))) {
      // æ ‡ç­¾ç»“å°¾
      this.i += 2
      this.start = this.i
      this.state = this.endTag
      return
    }
    // å¤„理注释
    let end = '-->'
    if (c !== '!' || this.content[this.i + 2] !== '-' || this.content[this.i + 3] !== '-') {
      end = '>'
    }
    this.i = this.content.indexOf(end, this.i)
    if (this.i !== -1) {
      this.i += end.length
      this.start = this.i
    }
  } else {
    this.i++
  }
}
/**
 * @description æ ‡ç­¾åçŠ¶æ€
 * @private
 */
Lexer.prototype.tagName = function () {
  if (blankChar[this.content[this.i]]) {
    // è§£æžåˆ°æ ‡ç­¾å
    this.handler.onTagName(this.content.substring(this.start, this.i))
    while (blankChar[this.content[++this.i]]);
    if (this.i < this.content.length && !this.checkClose()) {
      this.start = this.i
      this.state = this.attrName
    }
  } else if (!this.checkClose('onTagName')) {
    this.i++
  }
}
/**
 * @description å±žæ€§åçŠ¶æ€
 * @private
 */
Lexer.prototype.attrName = function () {
  let c = this.content[this.i]
  if (blankChar[c] || c === '=') {
    // è§£æžåˆ°å±žæ€§å
    this.handler.onAttrName(this.content.substring(this.start, this.i))
    let needVal = c === '='
    const len = this.content.length
    while (++this.i < len) {
      c = this.content[this.i]
      if (!blankChar[c]) {
        if (this.checkClose()) return
        if (needVal) {
          // ç­‰å·åŽé‡åˆ°ç¬¬ä¸€ä¸ªéžç©ºå­—符
          this.start = this.i
          this.state = this.attrVal
          return
        }
        if (this.content[this.i] === '=') {
          needVal = true
        } else {
          this.start = this.i
          this.state = this.attrName
          return
        }
      }
    }
  } else if (!this.checkClose('onAttrName')) {
    this.i++
  }
}
/**
 * @description å±žæ€§å€¼çŠ¶æ€
 * @private
 */
Lexer.prototype.attrVal = function () {
  const c = this.content[this.i]
  const len = this.content.length
  if (c === '"' || c === "'") {
    // æœ‰å†’号的属性
    this.start = ++this.i
    this.i = this.content.indexOf(c, this.i)
    if (this.i === -1) return
    this.handler.onAttrVal(this.content.substring(this.start, this.i))
  } else {
    // æ²¡æœ‰å†’号的属性
    for (; this.i < len; this.i++) {
      if (blankChar[this.content[this.i]]) {
        this.handler.onAttrVal(this.content.substring(this.start, this.i))
        break
      } else if (this.checkClose('onAttrVal')) return
    }
  }
  while (blankChar[this.content[++this.i]]);
  if (this.i < len && !this.checkClose()) {
    this.start = this.i
    this.state = this.attrName
  }
}
/**
 * @description ç»“束标签状态
 * @returns {String} ç»“束的标签名
 * @private
 */
Lexer.prototype.endTag = function () {
  const c = this.content[this.i]
  if (blankChar[c] || c === '>' || c === '/') {
    this.handler.onCloseTag(this.content.substring(this.start, this.i))
    if (c !== '>') {
      this.i = this.content.indexOf('>', this.i)
      if (this.i === -1) return
    }
    this.start = ++this.i
    this.state = this.text
  } else {
    this.i++
  }
}
module.exports = Parser
node_modules/mp-html/src/uni-app/components/mp-html/mp-html.vue
New file
@@ -0,0 +1,498 @@
<template>
  <view id="_root" :class="(selectable?'_select ':'')+'_root'" :style="containerStyle">
    <slot v-if="!nodes[0]" />
    <!-- #ifndef APP-PLUS-NVUE -->
    <node v-else :childs="nodes" :opts="[lazyLoad,loadingImg,errorImg,showImgMenu,selectable]" name="span" />
    <!-- #endif -->
    <!-- #ifdef APP-PLUS-NVUE -->
    <web-view ref="web" src="/static/app-plus/mp-html/local.html" :style="'margin-top:-2px;height:' + height + 'px'" @onPostMessage="_onMessage" />
    <!-- #endif -->
  </view>
</template>
<script>
/**
 * mp-html v2.5.1
 * @description å¯Œæ–‡æœ¬ç»„ä»¶
 * @tutorial https://github.com/jin-yufeng/mp-html
 * @property {String} container-style å®¹å™¨çš„æ ·å¼
 * @property {String} content ç”¨äºŽæ¸²æŸ“çš„ html å­—符串
 * @property {Boolean} copy-link æ˜¯å¦å…è®¸å¤–部链接被点击时自动复制
 * @property {String} domain ä¸»åŸŸåï¼Œç”¨äºŽæ‹¼æŽ¥é“¾æŽ¥
 * @property {String} error-img å›¾ç‰‡å‡ºé”™æ—¶çš„占位图链接
 * @property {Boolean} lazy-load æ˜¯å¦å¼€å¯å›¾ç‰‡æ‡’加载
 * @property {string} loading-img å›¾ç‰‡åŠ è½½è¿‡ç¨‹ä¸­çš„å ä½å›¾é“¾æŽ¥
 * @property {Boolean} pause-video æ˜¯å¦åœ¨æ’­æ”¾ä¸€ä¸ªè§†é¢‘时自动暂停其他视频
 * @property {Boolean} preview-img æ˜¯å¦å…è®¸å›¾ç‰‡è¢«ç‚¹å‡»æ—¶è‡ªåŠ¨é¢„è§ˆ
 * @property {Boolean} scroll-table æ˜¯å¦ç»™æ¯ä¸ªè¡¨æ ¼æ·»åŠ ä¸€ä¸ªæ»šåŠ¨å±‚ä½¿å…¶èƒ½å•ç‹¬æ¨ªå‘æ»šåŠ¨
 * @property {Boolean | String} selectable æ˜¯å¦å¼€å¯é•¿æŒ‰å¤åˆ¶
 * @property {Boolean} set-title æ˜¯å¦å°† title æ ‡ç­¾çš„内容设置到页面标题
 * @property {Boolean} show-img-menu æ˜¯å¦å…è®¸å›¾ç‰‡è¢«é•¿æŒ‰æ—¶æ˜¾ç¤ºèœå•
 * @property {Object} tag-style æ ‡ç­¾çš„默认样式
 * @property {Boolean | Number} use-anchor æ˜¯å¦ä½¿ç”¨é”šç‚¹é“¾æŽ¥
 * @event {Function} load dom ç»“构加载完毕时触发
 * @event {Function} ready æ‰€æœ‰å›¾ç‰‡åŠ è½½å®Œæ¯•æ—¶è§¦å‘
 * @event {Function} imgtap å›¾ç‰‡è¢«ç‚¹å‡»æ—¶è§¦å‘
 * @event {Function} linktap é“¾æŽ¥è¢«ç‚¹å‡»æ—¶è§¦å‘
 * @event {Function} play éŸ³è§†é¢‘播放时触发
 * @event {Function} error åª’体加载出错时触发
 */
// #ifndef APP-PLUS-NVUE
import node from './node/node'
// #endif
import Parser from './parser'
const plugins = []
// #ifdef APP-PLUS-NVUE
const dom = weex.requireModule('dom')
// #endif
export default {
  name: 'mp-html',
  data () {
    return {
      nodes: [],
      // #ifdef APP-PLUS-NVUE
      height: 3
      // #endif
    }
  },
  props: {
    containerStyle: {
      type: String,
      default: ''
    },
    content: {
      type: String,
      default: ''
    },
    copyLink: {
      type: [Boolean, String],
      default: true
    },
    domain: String,
    errorImg: {
      type: String,
      default: ''
    },
    lazyLoad: {
      type: [Boolean, String],
      default: false
    },
    loadingImg: {
      type: String,
      default: ''
    },
    pauseVideo: {
      type: [Boolean, String],
      default: true
    },
    previewImg: {
      type: [Boolean, String],
      default: true
    },
    scrollTable: [Boolean, String],
    selectable: [Boolean, String],
    setTitle: {
      type: [Boolean, String],
      default: true
    },
    showImgMenu: {
      type: [Boolean, String],
      default: true
    },
    tagStyle: Object,
    useAnchor: [Boolean, Number]
  },
  // #ifdef VUE3
  emits: ['load', 'ready', 'imgtap', 'linktap', 'play', 'error'],
  // #endif
  // #ifndef APP-PLUS-NVUE
  components: {
    node
  },
  // #endif
  watch: {
    content (content) {
      this.setContent(content)
    }
  },
  created () {
    this.plugins = []
    for (let i = plugins.length; i--;) {
      this.plugins.push(new plugins[i](this))
    }
  },
  mounted () {
    if (this.content && !this.nodes.length) {
      this.setContent(this.content)
    }
  },
  beforeDestroy () {
    this._hook('onDetached')
  },
  methods: {
    /**
     * @description å°†é”šç‚¹è·³è½¬çš„范围限定在一个 scroll-view å†…
     * @param {Object} page scroll-view æ‰€åœ¨é¡µé¢çš„示例
     * @param {String} selector scroll-view çš„选择器
     * @param {String} scrollTop scroll-view scroll-top å±žæ€§ç»‘定的变量名
     */
    in (page, selector, scrollTop) {
      // #ifndef APP-PLUS-NVUE
      if (page && selector && scrollTop) {
        this._in = {
          page,
          selector,
          scrollTop
        }
      }
      // #endif
    },
    /**
     * @description é”šç‚¹è·³è½¬
     * @param {String} id è¦è·³è½¬çš„锚点 id
     * @param {Number} offset è·³è½¬ä½ç½®çš„偏移量
     * @returns {Promise}
     */
    navigateTo (id, offset) {
      return new Promise((resolve, reject) => {
        if (!this.useAnchor) {
          reject(Error('Anchor is disabled'))
          return
        }
        offset = offset || parseInt(this.useAnchor) || 0
        // #ifdef APP-PLUS-NVUE
        if (!id) {
          dom.scrollToElement(this.$refs.web, {
            offset
          })
          resolve()
        } else {
          this._navigateTo = {
            resolve,
            reject,
            offset
          }
          this.$refs.web.evalJs('uni.postMessage({data:{action:"getOffset",offset:(document.getElementById(' + id + ')||{}).offsetTop}})')
        }
        // #endif
        // #ifndef APP-PLUS-NVUE
        let deep = ' '
        // #ifdef MP-WEIXIN || MP-QQ || MP-TOUTIAO
        deep = '>>>'
        // #endif
        const selector = uni.createSelectorQuery()
          // #ifndef MP-ALIPAY
          .in(this._in ? this._in.page : this)
          // #endif
          .select((this._in ? this._in.selector : '._root') + (id ? `${deep}#${id}` : '')).boundingClientRect()
        if (this._in) {
          selector.select(this._in.selector).scrollOffset()
            .select(this._in.selector).boundingClientRect()
        } else {
          // èŽ·å– scroll-view çš„位置和滚动距离
          selector.selectViewport().scrollOffset() // èŽ·å–çª—å£çš„æ»šåŠ¨è·ç¦»
        }
        selector.exec(res => {
          if (!res[0]) {
            reject(Error('Label not found'))
            return
          }
          const scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset
          if (this._in) {
            // scroll-view è·³è½¬
            this._in.page[this._in.scrollTop] = scrollTop
          } else {
            // é¡µé¢è·³è½¬
            uni.pageScrollTo({
              scrollTop,
              duration: 300
            })
          }
          resolve()
        })
        // #endif
      })
    },
    /**
     * @description èŽ·å–æ–‡æœ¬å†…å®¹
     * @return {String}
     */
    getText (nodes) {
      let text = '';
      (function traversal (nodes) {
        for (let i = 0; i < nodes.length; i++) {
          const node = nodes[i]
          if (node.type === 'text') {
            text += node.text.replace(/&amp;/g, '&')
          } else if (node.name === 'br') {
            text += '\n'
          } else {
            // å—级标签前后加换行
            const isBlock = node.name === 'p' || node.name === 'div' || node.name === 'tr' || node.name === 'li' || (node.name[0] === 'h' && node.name[1] > '0' && node.name[1] < '7')
            if (isBlock && text && text[text.length - 1] !== '\n') {
              text += '\n'
            }
            // é€’归获取子节点的文本
            if (node.children) {
              traversal(node.children)
            }
            if (isBlock && text[text.length - 1] !== '\n') {
              text += '\n'
            } else if (node.name === 'td' || node.name === 'th') {
              text += '\t'
            }
          }
        }
      })(nodes || this.nodes)
      return text
    },
    /**
     * @description èŽ·å–å†…å®¹å¤§å°å’Œä½ç½®
     * @return {Promise}
     */
    getRect () {
      return new Promise((resolve, reject) => {
        uni.createSelectorQuery()
          // #ifndef MP-ALIPAY
          .in(this)
          // #endif
          .select('#_root').boundingClientRect().exec(res => res[0] ? resolve(res[0]) : reject(Error('Root label not found')))
      })
    },
    /**
     * @description æš‚停播放媒体
     */
    pauseMedia () {
      for (let i = (this._videos || []).length; i--;) {
        this._videos[i].pause()
      }
      // #ifdef APP-PLUS
      const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].pause()'
      // #ifndef APP-PLUS-NVUE
      let page = this.$parent
      while (!page.$scope) page = page.$parent
      page.$scope.$getAppWebview().evalJS(command)
      // #endif
      // #ifdef APP-PLUS-NVUE
      this.$refs.web.evalJs(command)
      // #endif
      // #endif
    },
    /**
     * @description è®¾ç½®åª’体播放速率
     * @param {Number} rate æ’­æ”¾é€Ÿçއ
     */
    setPlaybackRate (rate) {
      this.playbackRate = rate
      for (let i = (this._videos || []).length; i--;) {
        this._videos[i].playbackRate(rate)
      }
      // #ifdef APP-PLUS
      const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].playbackRate=' + rate
      // #ifndef APP-PLUS-NVUE
      let page = this.$parent
      while (!page.$scope) page = page.$parent
      page.$scope.$getAppWebview().evalJS(command)
      // #endif
      // #ifdef APP-PLUS-NVUE
      this.$refs.web.evalJs(command)
      // #endif
      // #endif
    },
    /**
     * @description è®¾ç½®å†…容
     * @param {String} content html å†…容
     * @param {Boolean} append æ˜¯å¦åœ¨å°¾éƒ¨è¿½åŠ 
     */
    setContent (content, append) {
      if (!append || !this.imgList) {
        this.imgList = []
      }
      const nodes = new Parser(this).parse(content)
      // #ifdef APP-PLUS-NVUE
      if (this._ready) {
        this._set(nodes, append)
      }
      // #endif
      this.$set(this, 'nodes', append ? (this.nodes || []).concat(nodes) : nodes)
      // #ifndef APP-PLUS-NVUE
      this._videos = []
      this.$nextTick(() => {
        this._hook('onLoad')
        this.$emit('load')
      })
      if (this.lazyLoad || this.imgList._unloadimgs < this.imgList.length / 2) {
        // è®¾ç½®æ‡’加载,每 350ms èŽ·å–é«˜åº¦ï¼Œä¸å˜åˆ™è®¤ä¸ºåŠ è½½å®Œæ¯•
        let height = 0
        const callback = rect => {
          if (!rect || !rect.height) rect = {}
          // 350ms æ€»é«˜åº¦æ— å˜åŒ–就触发 ready äº‹ä»¶
          if (rect.height === height) {
            this.$emit('ready', rect)
          } else {
            height = rect.height
            setTimeout(() => {
              this.getRect().then(callback).catch(callback)
            }, 350)
          }
        }
        this.getRect().then(callback).catch(callback)
      } else {
        // æœªè®¾ç½®æ‡’加载,等待所有图片加载完毕
        if (!this.imgList._unloadimgs) {
          this.getRect().then(rect => {
            this.$emit('ready', rect)
          }).catch(() => {
            this.$emit('ready', {})
          })
        }
      }
      // #endif
    },
    /**
     * @description è°ƒç”¨æ’件钩子函数
     */
    _hook (name) {
      for (let i = plugins.length; i--;) {
        if (this.plugins[i][name]) {
          this.plugins[i][name]()
        }
      }
    },
    // #ifdef APP-PLUS-NVUE
    /**
     * @description è®¾ç½®å†…容
     */
    _set (nodes, append) {
      this.$refs.web.evalJs('setContent(' + JSON.stringify(nodes).replace(/%22/g, '') + ',' + JSON.stringify([this.containerStyle.replace(/(?:margin|padding)[^;]+/g, ''), this.errorImg, this.loadingImg, this.pauseVideo, this.scrollTable, this.selectable]) + ',' + append + ')')
    },
    /**
     * @description æŽ¥æ”¶åˆ° web-view æ¶ˆæ¯
     */
    _onMessage (e) {
      const message = e.detail.data[0]
      switch (message.action) {
        // web-view åˆå§‹åŒ–完毕
        case 'onJSBridgeReady':
          this._ready = true
          if (this.nodes) {
            this._set(this.nodes)
          }
          break
        // å†…容 dom åŠ è½½å®Œæ¯•
        case 'onLoad':
          this.height = message.height
          this._hook('onLoad')
          this.$emit('load')
          break
        // æ‰€æœ‰å›¾ç‰‡åŠ è½½å®Œæ¯•
        case 'onReady':
          this.getRect().then(res => {
            this.$emit('ready', res)
          }).catch(() => {
            this.$emit('ready', {})
          })
          break
        // æ€»é«˜åº¦å‘生变化
        case 'onHeightChange':
          this.height = message.height
          break
        // å›¾ç‰‡ç‚¹å‡»
        case 'onImgTap':
          this.$emit('imgtap', message.attrs)
          if (this.previewImg) {
            uni.previewImage({
              current: parseInt(message.attrs.i),
              urls: this.imgList
            })
          }
          break
        // é“¾æŽ¥ç‚¹å‡»
        case 'onLinkTap': {
          const href = message.attrs.href
          this.$emit('linktap', message.attrs)
          if (href) {
            // é”šç‚¹è·³è½¬
            if (href[0] === '#') {
              if (this.useAnchor) {
                dom.scrollToElement(this.$refs.web, {
                  offset: message.offset
                })
              }
            } else if (href.includes('://')) {
              // æ‰“开外链
              if (this.copyLink) {
                plus.runtime.openWeb(href)
              }
            } else {
              uni.navigateTo({
                url: href,
                fail () {
                  uni.switchTab({
                    url: href
                  })
                }
              })
            }
          }
          break
        }
        case 'onPlay':
          this.$emit('play')
          break
        // èŽ·å–åˆ°é”šç‚¹çš„åç§»é‡
        case 'getOffset':
          if (typeof message.offset === 'number') {
            dom.scrollToElement(this.$refs.web, {
              offset: message.offset + this._navigateTo.offset
            })
            this._navigateTo.resolve()
          } else {
            this._navigateTo.reject(Error('Label not found'))
          }
          break
        // ç‚¹å‡»
        case 'onClick':
          this.$emit('tap')
          this.$emit('click')
          break
        // å‡ºé”™
        case 'onError':
          this.$emit('error', {
            source: message.source,
            attrs: message.attrs
          })
      }
    }
    // #endif
  }
}
</script>
<style>
/* #ifndef APP-PLUS-NVUE */
/* æ ¹èŠ‚ç‚¹æ ·å¼ */
._root {
  padding: 1px 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
/* é•¿æŒ‰å¤åˆ¶ */
._select {
  user-select: text;
}
/* #endif */
</style>
node_modules/mp-html/src/uni-app/components/mp-html/node/node.vue
New file
@@ -0,0 +1,595 @@
<template>
  <view :id="attrs.id" :class="'_block _'+name+' '+attrs.class" :style="attrs.style">
    <block v-for="(n, i) in childs" v-bind:key="i">
      <!-- å›¾ç‰‡ -->
      <!-- å ä½å›¾ -->
      <image v-if="n.name==='img'&&!n.t&&((opts[1]&&!ctrl[i])||ctrl[i]<0)" class="_img" :style="n.attrs.style" :src="ctrl[i]<0?opts[2]:opts[1]" mode="widthFix" />
      <!-- æ˜¾ç¤ºå›¾ç‰‡ -->
      <!-- #ifdef H5 || (APP-PLUS && VUE2) -->
      <img v-if="n.name==='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]===-1?'display:none;':'')+n.attrs.style" :src="n.attrs.src||(ctrl.load?n.attrs['data-src']:'')" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap" @longpress="imgLongTap" />
      <!-- #endif -->
      <!-- #ifndef H5 || (APP-PLUS && VUE2) -->
      <!-- è¡¨æ ¼ä¸­çš„图片,使用 rich-text é˜²æ­¢å¤§å°ä¸æ­£ç¡® -->
      <rich-text v-if="n.name==='img'&&n.t" :style="'display:'+n.t" :nodes="[{attrs:{style:n.attrs.style||'',src:n.attrs.src},name:'img'}]" :data-i="i" @tap.stop="imgTap" />
      <!-- #endif -->
      <!-- #ifdef APP-HARMONY -->
      <image v-else-if="n.name==='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]===-1?'display:none;':'')+'width:'+ctrl[i]+'px;'+n.attrs.style" :src="n.attrs.src||(ctrl.load?n.attrs['data-src']:'')" :mode="!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap" @longpress="imgLongTap" />
      <!-- #endif -->
      <!-- #ifndef H5 || APP-PLUS || MP-KUAISHOU -->
      <image v-else-if="n.name==='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]===-1?'display:none;':'')+'width:'+(ctrl[i]||1)+'px;height:1px;'+n.attrs.style" :src="n.attrs.src" :mode="!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))" :lazy-load="opts[0]" :webp="n.webp" :show-menu-by-longpress="opts[3]&&!n.attrs.ignore" :image-menu-prevent="!opts[3]||n.attrs.ignore" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap" @longpress="imgLongTap" />
      <!-- #endif -->
      <!-- #ifdef MP-KUAISHOU -->
      <image v-else-if="n.name==='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]===-1?'display:none;':'')+n.attrs.style" :src="n.attrs.src" :lazy-load="opts[0]" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap"></image>
      <!-- #endif -->
      <!-- #ifdef APP-PLUS && VUE3 -->
      <image v-else-if="n.name==='img'" :id="n.attrs.id" :class="'_img '+n.attrs.class" :style="(ctrl[i]===-1?'display:none;':'')+'width:'+(ctrl[i]||1)+'px;'+n.attrs.style" :src="n.attrs.src||(ctrl.load?n.attrs['data-src']:'')" :mode="!n.h?'widthFix':(!n.w?'heightFix':(n.m||''))" :data-i="i" @load="imgLoad" @error="mediaError" @tap.stop="imgTap" @longpress="imgLongTap" />
      <!-- #endif -->
      <!-- æ–‡æœ¬ -->
      <!-- #ifdef MP-WEIXIN -->
      <text v-else-if="n.text" :user-select="opts[4]=='force'&&isiOS" decode>{{n.text}}</text>
      <!-- #endif -->
      <!-- #ifndef MP-WEIXIN || MP-BAIDU || MP-ALIPAY || MP-TOUTIAO -->
      <text v-else-if="n.text" decode>{{n.text}}</text>
      <!-- #endif -->
      <text v-else-if="n.name==='br'">\n</text>
      <!-- é“¾æŽ¥ -->
      <view v-else-if="n.name==='a'" :id="n.attrs.id" :class="(n.attrs.href?'_a ':'')+n.attrs.class" hover-class="_hover" :style="'display:inline;'+n.attrs.style" :data-i="i" @tap.stop="linkTap">
        <node name="span" :childs="n.children" :opts="opts" style="display:inherit" />
      </view>
      <!-- è§†é¢‘ -->
      <!-- #ifdef APP-PLUS -->
      <view v-else-if="n.html" :id="n.attrs.id" :class="'_video '+n.attrs.class" :style="n.attrs.style" v-html="n.html" :data-i="i" @vplay.stop="play" />
      <!-- #endif -->
      <!-- #ifndef APP-PLUS -->
      <video v-else-if="n.name==='video'" :id="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :autoplay="n.attrs.autoplay" :controls="n.attrs.controls" :loop="n.attrs.loop" :muted="n.attrs.muted" :object-fit="n.attrs['object-fit']" :poster="n.attrs.poster" :src="n.src[ctrl[i]||0]" :data-i="i" @play="play" @error="mediaError" />
      <!-- #endif -->
      <!-- #ifdef H5 || APP-PLUS -->
      <iframe v-else-if="n.name==='iframe'" :style="n.attrs.style" :allowfullscreen="n.attrs.allowfullscreen" :frameborder="n.attrs.frameborder" :src="n.attrs.src" />
      <embed v-else-if="n.name==='embed'" :style="n.attrs.style" :src="n.attrs.src" />
      <!-- #endif -->
      <!-- #ifndef MP-TOUTIAO || ((H5 || APP-PLUS) && VUE3) -->
      <!-- éŸ³é¢‘ -->
      <audio v-else-if="n.name==='audio'" :id="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :author="n.attrs.author" :controls="n.attrs.controls" :loop="n.attrs.loop" :name="n.attrs.name" :poster="n.attrs.poster" :src="n.src[ctrl[i]||0]" :data-i="i" @play="play" @error="mediaError" />
      <!-- #endif -->
      <view v-else-if="(n.name==='table'&&n.c)||n.name==='li'" :id="n.attrs.id" :class="'_'+n.name+' '+n.attrs.class" :style="n.attrs.style">
        <node v-if="n.name==='li'" :childs="n.children" :opts="opts" />
        <view v-else v-for="(tbody, x) in n.children" v-bind:key="x" :class="'_'+tbody.name+' '+tbody.attrs.class" :style="tbody.attrs.style">
          <node v-if="tbody.name==='td'||tbody.name==='th'" :childs="tbody.children" :opts="opts" />
          <block v-else v-for="(tr, y) in tbody.children" v-bind:key="y">
            <view v-if="tr.name==='td'||tr.name==='th'" :class="'_'+tr.name+' '+tr.attrs.class" :style="tr.attrs.style">
              <node :childs="tr.children" :opts="opts" />
            </view>
            <view v-else :class="'_'+tr.name+' '+tr.attrs.class" :style="tr.attrs.style">
              <view v-for="(td, z) in tr.children" v-bind:key="z" :class="'_'+td.name+' '+td.attrs.class" :style="td.attrs.style">
                <node :childs="td.children" :opts="opts" />
              </view>
            </view>
          </block>
        </view>
      </view>
      <!-- insert -->
      <!-- å¯Œæ–‡æœ¬ -->
      <!-- #ifdef H5 || ((MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE2) -->
      <rich-text v-else-if="!n.c&&!handler.isInline(n.name, n.attrs.style)" :id="n.attrs.id" :style="n.f" :user-select="opts[4]" :nodes="[n]" />
      <!-- #endif -->
      <!-- #ifndef H5 || ((MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE2) -->
      <rich-text v-else-if="!n.c" :id="n.attrs.id" :style="'display:inline;'+n.f" :preview="false" :selectable="opts[4]" :user-select="opts[4]" :nodes="[n]" />
      <!-- #endif -->
      <!-- ç»§ç»­é€’å½’ -->
      <view v-else-if="n.c===2" :id="n.attrs.id" :class="'_block _'+n.name+' '+n.attrs.class" :style="n.f+';'+n.attrs.style">
        <node v-for="(n2, j) in n.children" v-bind:key="j" :style="n2.f" :name="n2.name" :attrs="n2.attrs" :childs="n2.children" :opts="opts" />
      </view>
      <node v-else :style="n.f" :name="n.name" :attrs="n.attrs" :childs="n.children" :opts="opts" />
    </block>
  </view>
</template>
<script module="handler" lang="wxs">
// è¡Œå†…标签列表
var inlineTags = {
  abbr: true,
  b: true,
  big: true,
  code: true,
  del: true,
  em: true,
  i: true,
  ins: true,
  label: true,
  q: true,
  small: true,
  span: true,
  strong: true,
  sub: true,
  sup: true
}
/**
 * @description åˆ¤æ–­æ˜¯å¦ä¸ºè¡Œå†…标签
 */
module.exports = {
  isInline: function (tagName, style) {
    return inlineTags[tagName] || (style || '').indexOf('display:inline') !== -1
  }
}
</script>
<script>
import node from './node'
export default {
  name: 'node',
  options: {
    // #ifdef MP-WEIXIN
    virtualHost: true,
    // #endif
    // #ifdef MP-TOUTIAO
    addGlobalClass: false
    // #endif
  },
  data () {
    return {
      ctrl: {},
      // #ifdef MP-WEIXIN
      isiOS: uni.getSystemInfoSync().system.includes('iOS')
      // #endif
    }
  },
  props: {
    name: String,
    attrs: {
      type: Object,
      default () {
        return {}
      }
    },
    childs: Array,
    opts: Array
  },
  components: {
    // #ifndef ((H5 || APP-PLUS) && VUE3) || APP-HARMONY
    node
    // #endif
  },
  mounted () {
    this.$nextTick(() => {
      for (this.root = this.$parent; this.root.$options.name !== 'mp-html'; this.root = this.root.$parent);
    })
    // #ifdef H5 || APP-PLUS
    if (this.opts[0]) {
      let i
      for (i = this.childs.length; i--;) {
        if (this.childs[i].name === 'img') break
      }
      if (i !== -1) {
        this.observer = uni.createIntersectionObserver(this).relativeToViewport({
          top: 500,
          bottom: 500
        })
        this.observer.observe('._img', res => {
          if (res.intersectionRatio) {
            this.$set(this.ctrl, 'load', 1)
            this.observer.disconnect()
          }
        })
      }
    }
    // #endif
  },
  beforeDestroy () {
    // #ifdef H5 || APP-PLUS
    if (this.observer) {
      this.observer.disconnect()
    }
    // #endif
  },
  methods: {
    // #ifdef MP-WEIXIN
    toJSON () { return this },
    // #endif
    /**
     * @description æ’­æ”¾è§†é¢‘事件
     * @param {Event} e
     */
    play (e) {
      const i = e.currentTarget.dataset.i
      const node = this.childs[i]
      this.root.$emit('play', {
        source: node.name,
        attrs: {
          ...node.attrs,
          src: node.src[this.ctrl[i] || 0]
        }
      })
      // #ifndef APP-PLUS
      if (this.root.pauseVideo) {
        let flag = false
        const id = e.target.id
        for (let i = this.root._videos.length; i--;) {
          if (this.root._videos[i].id === id) {
            flag = true
          } else {
            this.root._videos[i].pause() // è‡ªåŠ¨æš‚åœå…¶ä»–è§†é¢‘
          }
        }
        // å°†è‡ªå·±åŠ å…¥åˆ—è¡¨
        if (!flag) {
          const ctx = uni.createVideoContext(id
            // #ifndef MP-BAIDU
            , this
            // #endif
          )
          ctx.id = id
          if (this.root.playbackRate) {
            ctx.playbackRate(this.root.playbackRate)
          }
          this.root._videos.push(ctx)
        }
      }
      // #endif
    },
    /**
     * @description å›¾ç‰‡ç‚¹å‡»äº‹ä»¶
     * @param {Event} e
     */
    imgTap (e) {
      const node = this.childs[e.currentTarget.dataset.i]
      if (node.a) {
        this.linkTap(node.a)
        return
      }
      if (node.attrs.ignore) return
      // #ifdef H5 || APP-PLUS
      node.attrs.src = node.attrs.src || node.attrs['data-src']
      // #endif
      // #ifndef APP-HARMONY
      this.root.$emit('imgtap', node.attrs)
      // #endif
      // #ifdef APP-HARMONY
      this.root.$emit('imgtap', {
        ...node.attrs
      })
      // #endif
      // è‡ªåŠ¨é¢„è§ˆå›¾ç‰‡
      if (this.root.previewImg) {
        uni.previewImage({
          // #ifdef MP-WEIXIN
          showmenu: this.root.showImgMenu,
          // #endif
          // #ifdef MP-ALIPAY
          enablesavephoto: this.root.showImgMenu,
          enableShowPhotoDownload: this.root.showImgMenu,
          // #endif
          current: parseInt(node.attrs.i),
          urls: this.root.imgList
        })
      }
    },
    /**
     * @description å›¾ç‰‡é•¿æŒ‰
     */
    imgLongTap (e) {
      // #ifdef APP-PLUS
      const attrs = this.childs[e.currentTarget.dataset.i].attrs
      if (this.opts[3] && !attrs.ignore) {
        uni.showActionSheet({
          itemList: ['保存图片'],
          success: () => {
            const save = path => {
              uni.saveImageToPhotosAlbum({
                filePath: path,
                success () {
                  uni.showToast({
                    title: '保存成功'
                  })
                }
              })
            }
            if (this.root.imgList[attrs.i].startsWith('http')) {
              uni.downloadFile({
                url: this.root.imgList[attrs.i],
                success: res => save(res.tempFilePath)
              })
            } else {
              save(this.root.imgList[attrs.i])
            }
          }
        })
      }
      // #endif
    },
    /**
     * @description å›¾ç‰‡åŠ è½½å®Œæˆäº‹ä»¶
     * @param {Event} e
     */
    imgLoad (e) {
      const i = e.currentTarget.dataset.i
      /* #ifndef H5 || (APP-PLUS && VUE2) */
      if (!this.childs[i].w) {
        // è®¾ç½®åŽŸå®½åº¦
        this.$set(this.ctrl, i, e.detail.width)
      } else /* #endif */ if ((this.opts[1] && !this.ctrl[i]) || this.ctrl[i] === -1) {
        // åŠ è½½å®Œæ¯•ï¼Œå–æ¶ˆåŠ è½½ä¸­å ä½å›¾
        this.$set(this.ctrl, i, 1)
      }
      this.checkReady()
    },
    /**
     * @description æ£€æŸ¥æ˜¯å¦æ‰€æœ‰å›¾ç‰‡åŠ è½½å®Œæ¯•
     */
    checkReady () {
      if (this.root && !this.root.lazyLoad) {
        this.root._unloadimgs -= 1
        if (!this.root._unloadimgs) {
          setTimeout(() => {
            this.root.getRect().then(rect => {
              this.root.$emit('ready', rect)
            }).catch(() => {
              this.root.$emit('ready', {})
            })
          }, 350)
        }
      }
    },
    /**
     * @description é“¾æŽ¥ç‚¹å‡»äº‹ä»¶
     * @param {Event} e
     */
    linkTap (e) {
      const node = e.currentTarget ? this.childs[e.currentTarget.dataset.i] : {}
      const attrs = node.attrs || e
      const href = attrs.href
      this.root.$emit('linktap', Object.assign({
        innerText: this.root.getText(node.children || []) // é“¾æŽ¥å†…的文本内容
      }, attrs))
      if (href) {
        if (href[0] === '#') {
          // è·³è½¬é”šç‚¹
          this.root.navigateTo(href.substring(1)).catch(() => { })
        } else if (href.split('?')[0].includes('://')) {
          // å¤åˆ¶å¤–部链接
          if (this.root.copyLink) {
            // #ifdef H5
            window.open(href)
            // #endif
            // #ifdef MP
            uni.setClipboardData({
              data: href,
              success: () =>
                uni.showToast({
                  title: '链接已复制'
                })
            })
            // #endif
            // #ifdef APP-PLUS
            plus.runtime.openWeb(href)
            // #endif
          }
        } else {
          // è·³è½¬é¡µé¢
          uni.navigateTo({
            url: href,
            fail () {
              uni.switchTab({
                url: href,
                fail () { }
              })
            }
          })
        }
      }
    },
    /**
     * @description é”™è¯¯äº‹ä»¶
     * @param {Event} e
     */
    mediaError (e) {
      const i = e.currentTarget.dataset.i
      const node = this.childs[i]
      // åŠ è½½å…¶ä»–æº
      if (node.name === 'video' || node.name === 'audio') {
        let index = (this.ctrl[i] || 0) + 1
        if (index > node.src.length) {
          index = 0
        }
        if (index < node.src.length) {
          this.$set(this.ctrl, i, index)
          return
        }
      } else if (node.name === 'img') {
        // #ifdef H5 && VUE3
        if (this.opts[0] && !this.ctrl.load) return
        // #endif
        // æ˜¾ç¤ºé”™è¯¯å ä½å›¾
        if (this.opts[2]) {
          this.$set(this.ctrl, i, -1)
        }
        this.checkReady()
      }
      if (this.root) {
        this.root.$emit('error', {
          source: node.name,
          attrs: node.attrs,
          // #ifndef H5 && VUE3
          errMsg: e.detail.errMsg
          // #endif
        })
      }
    }
  }
}
</script>
<style>
/* a æ ‡ç­¾é»˜è®¤æ•ˆæžœ */
._a {
  padding: 1.5px 0 1.5px 0;
  color: #366092;
  word-break: break-all;
}
/* a æ ‡ç­¾ç‚¹å‡»æ€æ•ˆæžœ */
._hover {
  text-decoration: underline;
  opacity: 0.7;
}
/* å›¾ç‰‡é»˜è®¤æ•ˆæžœ */
._img {
  max-width: 100%;
  -webkit-touch-callout: none;
}
/* å†…部样式 */
._block {
  display: block;
}
._b,
._strong {
  font-weight: bold;
}
._code {
  font-family: monospace;
}
._del {
  text-decoration: line-through;
}
._em,
._i {
  font-style: italic;
}
._h1 {
  font-size: 2em;
}
._h2 {
  font-size: 1.5em;
}
._h3 {
  font-size: 1.17em;
}
._h5 {
  font-size: 0.83em;
}
._h6 {
  font-size: 0.67em;
}
._h1,
._h2,
._h3,
._h4,
._h5,
._h6 {
  display: block;
  font-weight: bold;
}
._image {
  height: 1px;
}
._ins {
  text-decoration: underline;
}
._li {
  display: list-item;
}
._ol {
  list-style-type: decimal;
}
._ol,
._ul {
  display: block;
  padding-left: 40px;
  margin: 1em 0;
}
._q::before {
  content: '"';
}
._q::after {
  content: '"';
}
._sub {
  font-size: smaller;
  vertical-align: sub;
}
._sup {
  font-size: smaller;
  vertical-align: super;
}
._thead,
._tbody,
._tfoot {
  display: table-row-group;
}
._tr {
  display: table-row;
}
._td,
._th {
  display: table-cell;
  vertical-align: middle;
}
._th {
  font-weight: bold;
  text-align: center;
}
._ul {
  list-style-type: disc;
}
._ul ._ul {
  margin: 0;
  list-style-type: circle;
}
._ul ._ul ._ul {
  list-style-type: square;
}
._abbr,
._b,
._code,
._del,
._em,
._i,
._ins,
._label,
._q,
._span,
._strong,
._sub,
._sup {
  display: inline;
}
/* #ifdef APP-PLUS */
._video {
  width: 300px;
  height: 225px;
}
/* #endif */
</style>
node_modules/mp-html/src/uni-app/components/mp-html/parser.js
New file
@@ -0,0 +1,1400 @@
/**
 * @fileoverview html è§£æžå™¨
 */
// é…ç½®
const config = {
  // ä¿¡ä»»çš„æ ‡ç­¾ï¼ˆä¿æŒæ ‡ç­¾åä¸å˜ï¼‰
  trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
  // å—级标签(转为 div,其他的非信任标签转为 span)
  blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
  // #ifdef (MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE3
  // è¡Œå†…标签
  inlineTags: makeMap('abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup'),
  // #endif
  // è¦ç§»é™¤çš„æ ‡ç­¾
  ignoreTags: makeMap('area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr'),
  // è‡ªé—­åˆçš„æ ‡ç­¾
  voidTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
  // html å®žä½“
  entities: {
    lt: '<',
    gt: '>',
    quot: '"',
    apos: "'",
    ensp: '\u2002',
    emsp: '\u2003',
    nbsp: '\xA0',
    semi: ';',
    ndash: '–',
    mdash: '—',
    middot: '·',
    lsquo: '‘',
    rsquo: '’',
    ldquo: '“',
    rdquo: '”',
    bull: '•',
    hellip: '…',
    larr: '←',
    uarr: '↑',
    rarr: '→',
    darr: '↓'
  },
  // é»˜è®¤çš„æ ‡ç­¾æ ·å¼
  tagStyle: {
    // #ifndef APP-PLUS-NVUE
    address: 'font-style:italic',
    big: 'display:inline;font-size:1.2em',
    caption: 'display:table-caption;text-align:center',
    center: 'text-align:center',
    cite: 'font-style:italic',
    dd: 'margin-left:40px',
    mark: 'background-color:yellow',
    pre: 'font-family:monospace;white-space:pre',
    s: 'text-decoration:line-through',
    small: 'display:inline;font-size:0.8em',
    strike: 'text-decoration:line-through',
    u: 'text-decoration:underline'
    // #endif
  },
  // svg å¤§å°å†™å¯¹ç…§è¡¨
  svgDict: {
    animatetransform: 'animateTransform',
    lineargradient: 'linearGradient',
    viewbox: 'viewBox',
    attributename: 'attributeName',
    repeatcount: 'repeatCount',
    repeatdur: 'repeatDur',
    foreignobject: 'foreignObject'
  }
}
const tagSelector = {}
let windowWidth, system
// #ifdef MP-WEIXIN
if (uni.canIUse('getWindowInfo')) {
  windowWidth = uni.getWindowInfo().windowWidth
  system = uni.getDeviceInfo().system
} else {
// #endif
  const systemInfo = uni.getSystemInfoSync()
  windowWidth = systemInfo.windowWidth
  // #ifdef MP-WEIXIN
  system = systemInfo.system
}
// #endif
const blankChar = makeMap(' ,\r,\n,\t,\f')
let idIndex = 0
// #ifdef H5 || APP-PLUS
config.ignoreTags.iframe = undefined
config.trustTags.iframe = true
config.ignoreTags.embed = undefined
config.trustTags.embed = true
// #endif
// #ifdef APP-PLUS-NVUE
config.ignoreTags.source = undefined
config.ignoreTags.style = undefined
// #endif
/**
 * @description åˆ›å»º map
 * @param {String} str é€—号分隔
 */
function makeMap (str) {
  const map = Object.create(null)
  const list = str.split(',')
  for (let i = list.length; i--;) {
    map[list[i]] = true
  }
  return map
}
/**
 * @description è§£ç  html å®žä½“
 * @param {String} str è¦è§£ç çš„字符串
 * @param {Boolean} amp è¦ä¸è¦è§£ç  &amp;
 * @returns {String} è§£ç åŽçš„字符串
 */
function decodeEntity (str, amp) {
  let i = str.indexOf('&')
  while (i !== -1) {
    const j = str.indexOf(';', i + 3)
    let code
    if (j === -1) break
    if (str[i + 1] === '#') {
      // &#123; å½¢å¼çš„实体
      code = parseInt((str[i + 2] === 'x' ? '0' : '') + str.substring(i + 2, j))
      if (!isNaN(code)) {
        str = str.substr(0, i) + String.fromCharCode(code) + str.substr(j + 1)
      }
    } else {
      // &nbsp; å½¢å¼çš„实体
      code = str.substring(i + 1, j)
      if (config.entities[code] || (code === 'amp' && amp)) {
        str = str.substr(0, i) + (config.entities[code] || '&') + str.substr(j + 1)
      }
    }
    i = str.indexOf('&', i + 1)
  }
  return str
}
/**
 * @description åˆå¹¶å¤šä¸ªå—级标签,加快长内容渲染
 * @param {Array} nodes è¦åˆå¹¶çš„æ ‡ç­¾æ•°ç»„
 */
function mergeNodes (nodes) {
  let i = nodes.length - 1
  for (let j = i; j >= -1; j--) {
    if (j === -1 || nodes[j].c || !nodes[j].name || (nodes[j].name !== 'div' && nodes[j].name !== 'p' && nodes[j].name[0] !== 'h') || (nodes[j].attrs.style || '').includes('inline')) {
      if (i - j >= 5) {
        nodes.splice(j + 1, i - j, {
          name: 'div',
          attrs: {},
          children: nodes.slice(j + 1, i + 1)
        })
      }
      i = j - 1
    }
  }
}
/**
 * @description html è§£æžå™¨
 * @param {Object} vm ç»„件实例
 */
function Parser (vm) {
  this.options = vm || {}
  this.tagStyle = Object.assign({}, config.tagStyle, this.options.tagStyle)
  this.imgList = vm.imgList || []
  this.imgList._unloadimgs = 0
  this.plugins = vm.plugins || []
  this.attrs = Object.create(null)
  this.stack = []
  this.nodes = []
  this.pre = (this.options.containerStyle || '').includes('white-space') && this.options.containerStyle.includes('pre') ? 2 : 0
}
/**
 * @description æ‰§è¡Œè§£æž
 * @param {String} content è¦è§£æžçš„æ–‡æœ¬
 */
Parser.prototype.parse = function (content) {
  // æ’件处理
  for (let i = this.plugins.length; i--;) {
    if (this.plugins[i].onUpdate) {
      content = this.plugins[i].onUpdate(content, config) || content
    }
  }
  new Lexer(this).parse(content)
  // å‡ºæ ˆæœªé—­åˆçš„æ ‡ç­¾
  while (this.stack.length) {
    this.popNode()
  }
  if (this.nodes.length > 50) {
    mergeNodes(this.nodes)
  }
  return this.nodes
}
/**
 * @description å°†æ ‡ç­¾æš´éœ²å‡ºæ¥ï¼ˆä¸è¢« rich-text åŒ…含)
 */
Parser.prototype.expose = function () {
  // #ifndef APP-PLUS-NVUE
  for (let i = this.stack.length; i--;) {
    const item = this.stack[i]
    if (item.c || item.name === 'a' || item.name === 'video' || item.name === 'audio') return
    item.c = 1
  }
  // #endif
}
/**
 * @description å¤„理插件
 * @param {Object} node è¦å¤„理的标签
 * @returns {Boolean} æ˜¯å¦è¦ç§»é™¤æ­¤æ ‡ç­¾
 */
Parser.prototype.hook = function (node) {
  for (let i = this.plugins.length; i--;) {
    if (this.plugins[i].onParse && this.plugins[i].onParse(node, this) === false) {
      return false
    }
  }
  return true
}
/**
 * @description å°†é“¾æŽ¥æ‹¼æŽ¥ä¸Šä¸»åŸŸå
 * @param {String} url éœ€è¦æ‹¼æŽ¥çš„链接
 * @returns {String} æ‹¼æŽ¥åŽçš„链接
 */
Parser.prototype.getUrl = function (url) {
  const domain = this.options.domain
  if (url[0] === '/') {
    if (url[1] === '/') {
      // // å¼€å¤´çš„补充协议名
      url = (domain ? domain.split('://')[0] : 'http') + ':' + url
    } else if (domain) {
      // å¦åˆ™è¡¥å……整个域名
      url = domain + url
    } /* #ifdef APP-PLUS */ else {
      url = plus.io.convertLocalFileSystemURL(url)
    } /* #endif */
  } else if (!url.includes('data:') && !url.includes('://')) {
    if (domain) {
      url = domain + '/' + url
    } /* #ifdef APP-PLUS */ else {
      url = plus.io.convertLocalFileSystemURL(url)
    } /* #endif */
  }
  return url
}
/**
 * @description è§£æžæ ·å¼è¡¨
 * @param {Object} node æ ‡ç­¾
 * @returns {Object}
 */
Parser.prototype.parseStyle = function (node) {
  const attrs = node.attrs
  const list = (this.tagStyle[node.name] || '').split(';').concat((attrs.style || '').split(';'))
  const styleObj = {}
  let tmp = ''
  if (attrs.id && !this.xml) {
    // æš´éœ²é”šç‚¹
    if (this.options.useAnchor) {
      this.expose()
    } else if (node.name !== 'img' && node.name !== 'a' && node.name !== 'video' && node.name !== 'audio') {
      attrs.id = undefined
    }
  }
  // è½¬æ¢ width å’Œ height å±žæ€§
  if (attrs.width) {
    styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px')
    attrs.width = undefined
  }
  if (attrs.height) {
    styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px')
    attrs.height = undefined
  }
  for (let i = 0, len = list.length; i < len; i++) {
    const info = list[i].split(':')
    if (info.length < 2) continue
    const key = info.shift().trim().toLowerCase()
    let value = info.join(':').trim()
    if ((value[0] === '-' && value.lastIndexOf('-') > 0) || value.includes('safe')) {
      // å…¼å®¹æ€§çš„ css ä¸åŽ‹ç¼©
      tmp += `;${key}:${value}`
    } else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import')) {
      // é‡å¤çš„æ ·å¼è¿›è¡Œè¦†ç›–
      if (value.includes('url')) {
        // å¡«å……链接
        let j = value.indexOf('(') + 1
        if (j) {
          while (value[j] === '"' || value[j] === "'" || blankChar[value[j]]) {
            j++
          }
          value = value.substr(0, j) + this.getUrl(value.substr(j))
        }
      } else if (value.includes('rpx')) {
        // è½¬æ¢ rpx(rich-text å†…部不支持 rpx)
        value = value.replace(/[0-9.]+\s*rpx/g, $ => parseFloat($) * windowWidth / 750 + 'px')
      }
      styleObj[key] = value
    }
  }
  node.attrs.style = tmp
  return styleObj
}
/**
 * @description è§£æžåˆ°æ ‡ç­¾å
 * @param {String} name æ ‡ç­¾å
 * @private
 */
Parser.prototype.onTagName = function (name) {
  this.tagName = this.xml ? name : name.toLowerCase()
  if (this.tagName === 'svg') {
    this.xml = (this.xml || 0) + 1 // svg æ ‡ç­¾å†…大小写敏感
    config.ignoreTags.style = undefined // svg æ ‡ç­¾å†… style å¯ç”¨
  }
}
/**
 * @description è§£æžåˆ°å±žæ€§å
 * @param {String} name å±žæ€§å
 * @private
 */
Parser.prototype.onAttrName = function (name) {
  name = this.xml ? name : name.toLowerCase()
  // #ifdef (VUE3 && (H5 || APP-PLUS)) || APP-PLUS-NVUE
  if (name.includes('?') || name.includes(';')) {
    this.attrName = undefined
    return
  }
  // #endif
  if (name.substr(0, 5) === 'data-') {
    if (name === 'data-src' && !this.attrs.src) {
      // data-src è‡ªåŠ¨è½¬ä¸º src
      this.attrName = 'src'
    } else if (this.tagName === 'img' || this.tagName === 'a') {
      // a å’Œ img æ ‡ç­¾ä¿ç•™ data- çš„属性,可以在 imgtap å’Œ linktap äº‹ä»¶ä¸­ä½¿ç”¨
      this.attrName = name
    } else {
      // å‰©ä½™çš„移除以减小大小
      this.attrName = undefined
    }
  } else {
    this.attrName = name
    this.attrs[name] = 'T' // boolean åž‹å±žæ€§ç¼ºçœè®¾ç½®
  }
}
/**
 * @description è§£æžåˆ°å±žæ€§å€¼
 * @param {String} val å±žæ€§å€¼
 * @private
 */
Parser.prototype.onAttrVal = function (val) {
  const name = this.attrName || ''
  if (name === 'style' || name === 'href') {
    // éƒ¨åˆ†å±žæ€§è¿›è¡Œå®žä½“解码
    this.attrs[name] = decodeEntity(val, true)
  } else if (name.includes('src')) {
    // æ‹¼æŽ¥ä¸»åŸŸå
    this.attrs[name] = this.getUrl(decodeEntity(val, true))
  } else if (name) {
    this.attrs[name] = val
  }
}
/**
 * @description è§£æžåˆ°æ ‡ç­¾å¼€å§‹
 * @param {Boolean} selfClose æ˜¯å¦æœ‰è‡ªé—­åˆæ ‡è¯† />
 * @private
 */
Parser.prototype.onOpenTag = function (selfClose) {
  // æ‹¼è£… node
  const node = Object.create(null)
  node.name = this.tagName
  node.attrs = this.attrs
  // é¿å…å› ä¸ºè‡ªåЍ diff ä½¿å¾— type è¢«è®¾ç½®ä¸º null å¯¼è‡´éƒ¨åˆ†å†…容不显示
  if (this.options.nodes.length) {
    node.type = 'node'
  }
  this.attrs = Object.create(null)
  const attrs = node.attrs
  const parent = this.stack[this.stack.length - 1]
  const siblings = parent ? parent.children : this.nodes
  const close = this.xml ? selfClose : config.voidTags[node.name]
  // æ›¿æ¢æ ‡ç­¾åé€‰æ‹©å™¨
  if (tagSelector[node.name]) {
    attrs.class = tagSelector[node.name] + (attrs.class ? ' ' + attrs.class : '')
  }
  // è½¬æ¢ embed æ ‡ç­¾
  if (node.name === 'embed') {
    // #ifndef H5 || APP-PLUS
    const src = attrs.src || ''
    // æŒ‰ç…§åŽç¼€åå’Œ type å°† embed è½¬ä¸º video æˆ– audio
    if (src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8') || (attrs.type || '').includes('video')) {
      node.name = 'video'
    } else if (src.includes('.mp3') || src.includes('.wav') || src.includes('.aac') || src.includes('.m4a') || (attrs.type || '').includes('audio')) {
      node.name = 'audio'
    }
    if (attrs.autostart) {
      attrs.autoplay = 'T'
    }
    attrs.controls = 'T'
    // #endif
    // #ifdef H5 || APP-PLUS
    this.expose()
    // #endif
  }
  // #ifndef APP-PLUS-NVUE
  // å¤„理音视频
  if (node.name === 'video' || node.name === 'audio') {
    // è®¾ç½® id ä»¥ä¾¿èŽ·å– context
    if (node.name === 'video' && !attrs.id) {
      attrs.id = 'v' + idIndex++
    }
    // æ²¡æœ‰è®¾ç½® controls ä¹Ÿæ²¡æœ‰è®¾ç½® autoplay çš„自动设置 controls
    if (!attrs.controls && !attrs.autoplay) {
      attrs.controls = 'T'
    }
    // ç”¨æ•°ç»„存储所有可用的 source
    node.src = []
    if (attrs.src) {
      node.src.push(attrs.src)
      attrs.src = undefined
    }
    this.expose()
  }
  // #endif
  // å¤„理自闭合标签
  if (close) {
    if (!this.hook(node) || config.ignoreTags[node.name]) {
      // é€šè¿‡ base æ ‡ç­¾è®¾ç½®ä¸»åŸŸå
      if (node.name === 'base' && !this.options.domain) {
        this.options.domain = attrs.href
      } /* #ifndef APP-PLUS-NVUE */ else if (node.name === 'source' && parent && (parent.name === 'video' || parent.name === 'audio') && attrs.src) {
        // è®¾ç½® source æ ‡ç­¾ï¼ˆä»…父节点为 video æˆ– audio æ—¶æœ‰æ•ˆï¼‰
        parent.src.push(attrs.src)
      } /* #endif */
      return
    }
    // è§£æž style
    const styleObj = this.parseStyle(node)
    // å¤„理图片
    if (node.name === 'img') {
      if (attrs.src) {
        // æ ‡è®° webp
        if (attrs.src.includes('webp')) {
          node.webp = 'T'
        }
        // data url å›¾ç‰‡å¦‚果没有设置 original-src é»˜è®¤ä¸ºä¸å¯é¢„览的小图片
        if (attrs.src.includes('data:') && this.options.previewImg !== 'all' && !attrs['original-src']) {
          attrs.ignore = 'T'
        }
        if (!attrs.ignore || node.webp || attrs.src.includes('cloud://')) {
          for (let i = this.stack.length; i--;) {
            const item = this.stack[i]
            if (item.name === 'a') {
              node.a = item.attrs
            }
            if (item.name === 'table' && !node.webp && !attrs.src.includes('cloud://')) {
              if (!styleObj.display || styleObj.display.includes('inline')) {
                node.t = 'inline-block'
              } else {
                node.t = styleObj.display
              }
              styleObj.display = undefined
            }
            // #ifndef H5 || APP-PLUS
            const style = item.attrs.style || ''
            if (style.includes('flex:') && !style.includes('flex:0') && !style.includes('flex: 0') && (!styleObj.width || parseInt(styleObj.width) > 100)) {
              styleObj.width = '100% !important'
              styleObj.height = ''
              for (let j = i + 1; j < this.stack.length; j++) {
                this.stack[j].attrs.style = (this.stack[j].attrs.style || '').replace('inline-', '')
              }
            } else if (style.includes('flex') && styleObj.width === '100%') {
              for (let j = i + 1; j < this.stack.length; j++) {
                const style = this.stack[j].attrs.style || ''
                if (!style.includes(';width') && !style.includes(' width') && style.indexOf('width') !== 0) {
                  styleObj.width = ''
                  break
                }
              }
            } else if (style.includes('inline-block')) {
              if (styleObj.width && styleObj.width[styleObj.width.length - 1] === '%') {
                item.attrs.style += ';max-width:' + styleObj.width
                styleObj.width = ''
              } else {
                item.attrs.style += ';max-width:100%'
              }
            }
            // #endif
            item.c = 1
          }
          attrs.i = this.imgList.length.toString()
          let src = attrs['original-src'] || attrs.src
          // #ifndef H5 || MP-ALIPAY || APP-PLUS || MP-360
          if (this.imgList.includes(src)) {
            // å¦‚果有重复的链接则对域名进行随机大小写变换避免预览时错位
            let i = src.indexOf('://')
            if (i !== -1) {
              i += 3
              let newSrc = src.substr(0, i)
              for (; i < src.length; i++) {
                if (src[i] === '/') break
                newSrc += Math.random() > 0.5 ? src[i].toUpperCase() : src[i]
              }
              newSrc += src.substr(i)
              src = newSrc
            }
          }
          // #endif
          this.imgList.push(src)
          if (!node.t) {
            this.imgList._unloadimgs += 1
          }
          // #ifdef H5 || APP-PLUS
          if (this.options.lazyLoad) {
            attrs['data-src'] = attrs.src
            attrs.src = undefined
          }
          // #endif
        }
      }
      if (styleObj.display === 'inline') {
        styleObj.display = ''
      }
      // #ifndef APP-PLUS-NVUE
      if (attrs.ignore) {
        styleObj['max-width'] = styleObj['max-width'] || '100%'
        attrs.style += ';-webkit-touch-callout:none'
      }
      // #endif
      // è®¾ç½®çš„宽度超出屏幕,为避免变形,高度转为自动
      if (parseInt(styleObj.width) > windowWidth) {
        styleObj.height = undefined
      }
      // è®°å½•是否设置了宽高
      if (!isNaN(parseInt(styleObj.width))) {
        node.w = 'T'
      }
      if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes('%') || (parent && (parent.attrs.style || '').includes('height')))) {
        node.h = 'T'
      }
      if (node.w && node.h && styleObj['object-fit']) {
        if (styleObj['object-fit'] === 'contain') {
          node.m = 'aspectFit'
        } else if (styleObj['object-fit'] === 'cover') {
          node.m = 'aspectFill'
        }
      }
    } else if (node.name === 'svg') {
      siblings.push(node)
      this.stack.push(node)
      this.popNode()
      return
    }
    for (const key in styleObj) {
      if (styleObj[key]) {
        attrs.style += `;${key}:${styleObj[key].replace(' !important', '')}`
      }
    }
    attrs.style = attrs.style.substr(1) || undefined
    // #ifdef (MP-WEIXIN || MP-QQ) && VUE3
    if (!attrs.style) {
      delete attrs.style
    }
    // #endif
  } else {
    if ((node.name === 'pre' || ((attrs.style || '').includes('white-space') && attrs.style.includes('pre'))) && this.pre !== 2) {
      this.pre = node.pre = 1
    }
    node.children = []
    this.stack.push(node)
  }
  // åŠ å…¥èŠ‚ç‚¹æ ‘
  siblings.push(node)
}
/**
 * @description è§£æžåˆ°æ ‡ç­¾ç»“束
 * @param {String} name æ ‡ç­¾å
 * @private
 */
Parser.prototype.onCloseTag = function (name) {
  // ä¾æ¬¡å‡ºæ ˆåˆ°åŒ¹é…ä¸ºæ­¢
  name = this.xml ? name : name.toLowerCase()
  let i
  for (i = this.stack.length; i--;) {
    if (this.stack[i].name === name) break
  }
  if (i !== -1) {
    while (this.stack.length > i) {
      this.popNode()
    }
  } else if (name === 'p' || name === 'br') {
    const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes
    siblings.push({
      name,
      attrs: {
        class: tagSelector[name] || '',
        style: this.tagStyle[name] || ''
      }
    })
  }
}
/**
 * @description å¤„理标签出栈
 * @private
 */
Parser.prototype.popNode = function () {
  const node = this.stack.pop()
  let attrs = node.attrs
  const children = node.children
  const parent = this.stack[this.stack.length - 1]
  const siblings = parent ? parent.children : this.nodes
  if (!this.hook(node) || config.ignoreTags[node.name]) {
    // èŽ·å–æ ‡é¢˜
    if (node.name === 'title' && children.length && children[0].type === 'text' && this.options.setTitle) {
      uni.setNavigationBarTitle({
        title: children[0].text
      })
    }
    siblings.pop()
    return
  }
  if (node.pre && this.pre !== 2) {
    // æ˜¯å¦åˆå¹¶ç©ºç™½ç¬¦æ ‡è¯†
    this.pre = node.pre = undefined
    for (let i = this.stack.length; i--;) {
      if (this.stack[i].pre) {
        this.pre = 1
      }
    }
  }
  const styleObj = {}
  // è½¬æ¢ svg
  if (node.name === 'svg') {
    if (this.xml > 1) {
      // å¤šå±‚ svg åµŒå¥—
      this.xml--
      return
    }
    // #ifdef APP-PLUS-NVUE
    (function traversal (node) {
      if (node.name) {
        // è°ƒæ•´ svg çš„大小写
        node.name = config.svgDict[node.name] || node.name
        for (const item in node.attrs) {
          if (config.svgDict[item]) {
            node.attrs[config.svgDict[item]] = node.attrs[item]
            node.attrs[item] = undefined
          }
        }
        for (let i = 0; i < (node.children || []).length; i++) {
          traversal(node.children[i])
        }
      }
    })(node)
    // #endif
    // #ifndef APP-PLUS-NVUE
    let src = ''
    const style = attrs.style
    attrs.style = ''
    attrs.xmlns = 'http://www.w3.org/2000/svg';
    (function traversal (node) {
      if (node.type === 'text') {
        src += node.text
        return
      }
      const name = config.svgDict[node.name] || node.name
      if (name === 'foreignObject') {
        for (const child of (node.children || [])) {
          if (child.attrs && !child.attrs.xmlns) {
            child.attrs.xmlns = 'http://www.w3.org/1999/xhtml'
            break
          }
        }
      }
      src += '<' + name
      for (const item in node.attrs) {
        const val = node.attrs[item]
        if (val) {
          src += ` ${config.svgDict[item] || item}="${val.replace(/"/g, '')}"`
        }
      }
      if (!node.children) {
        src += '/>'
      } else {
        src += '>'
        for (let i = 0; i < node.children.length; i++) {
          traversal(node.children[i])
        }
        src += '</' + name + '>'
      }
    })(node)
    node.name = 'img'
    node.attrs = {
      src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
      style,
      ignore: 'T'
    }
    node.children = undefined
    // #endif
    this.xml = false
    config.ignoreTags.style = true
    return
  }
  // #ifndef APP-PLUS-NVUE
  // è½¬æ¢ align å±žæ€§
  if (attrs.align) {
    if (node.name === 'table') {
      if (attrs.align === 'center') {
        styleObj['margin-inline-start'] = styleObj['margin-inline-end'] = 'auto'
      } else {
        styleObj.float = attrs.align
      }
    } else {
      styleObj['text-align'] = attrs.align
    }
    attrs.align = undefined
  }
  // è½¬æ¢ dir å±žæ€§
  if (attrs.dir) {
    styleObj.direction = attrs.dir
    attrs.dir = undefined
  }
  // è½¬æ¢ font æ ‡ç­¾çš„属性
  if (node.name === 'font') {
    if (attrs.color) {
      styleObj.color = attrs.color
      attrs.color = undefined
    }
    if (attrs.face) {
      styleObj['font-family'] = attrs.face
      attrs.face = undefined
    }
    if (attrs.size) {
      let size = parseInt(attrs.size)
      if (!isNaN(size)) {
        if (size < 1) {
          size = 1
        } else if (size > 7) {
          size = 7
        }
        styleObj['font-size'] = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', 'xxx-large'][size - 1]
      }
      attrs.size = undefined
    }
  }
  // #endif
  // ä¸€äº›ç¼–辑器的自带 class
  if ((attrs.class || '').includes('align-center')) {
    styleObj['text-align'] = 'center'
  }
  Object.assign(styleObj, this.parseStyle(node))
  if (node.name !== 'table' && parseInt(styleObj.width) > windowWidth) {
    styleObj['max-width'] = '100%'
    styleObj['box-sizing'] = 'border-box'
  }
  // #ifndef APP-PLUS-NVUE
  if (config.blockTags[node.name]) {
    node.name = 'div'
  } else if (!config.trustTags[node.name] && !this.xml) {
    // æœªçŸ¥æ ‡ç­¾è½¬ä¸º span,避免无法显示
    node.name = 'span'
  }
  if (node.name === 'a' || node.name === 'ad'
    // #ifdef H5 || APP-PLUS
    || node.name === 'iframe' // eslint-disable-line
    // #endif
  ) {
    this.expose()
  } else if (node.name === 'video') {
    if ((styleObj.height || '').includes('auto')) {
      styleObj.height = undefined
    }
    /* #ifdef APP-PLUS */
    let str = '<video style="width:100%;height:100%"'
    for (const item in attrs) {
      if (attrs[item]) {
        str += ' ' + item + '="' + attrs[item] + '"'
      }
    }
    if (this.options.pauseVideo) {
      str += ' onplay="this.dispatchEvent(new CustomEvent(\'vplay\',{bubbles:!0}));for(var e=document.getElementsByTagName(\'video\'),t=0;t<e.length;t++)e[t]!=this&&e[t].pause()"'
    }
    str += '>'
    for (let i = 0; i < node.src.length; i++) {
      str += '<source src="' + node.src[i] + '">'
    }
    str += '</video>'
    node.html = str
    /* #endif */
  } else if ((node.name === 'ul' || node.name === 'ol') && node.c) {
    // åˆ—表处理
    const types = {
      a: 'lower-alpha',
      A: 'upper-alpha',
      i: 'lower-roman',
      I: 'upper-roman'
    }
    if (types[attrs.type]) {
      attrs.style += ';list-style-type:' + types[attrs.type]
      attrs.type = undefined
    }
    for (let i = children.length; i--;) {
      if (children[i].name === 'li') {
        children[i].c = 1
      }
    }
  } else if (node.name === 'table') {
    // è¡¨æ ¼å¤„理
    // cellpadding、cellspacing、border è¿™å‡ ä¸ªå¸¸ç”¨è¡¨æ ¼å±žæ€§éœ€è¦é€šè¿‡è½¬æ¢å®žçް
    let padding = parseFloat(attrs.cellpadding)
    let spacing = parseFloat(attrs.cellspacing)
    const border = parseFloat(attrs.border)
    const bordercolor = styleObj['border-color']
    const borderstyle = styleObj['border-style']
    if (node.c) {
      // padding å’Œ spacing é»˜è®¤ 2
      if (isNaN(padding)) {
        padding = 2
      }
      if (isNaN(spacing)) {
        spacing = 2
      }
    }
    if (border) {
      attrs.style += `;border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'}`
    }
    if (node.flag && node.c) {
      // æœ‰ colspan æˆ– rowspan ä¸”含有链接的表格通过 grid å¸ƒå±€å®žçް
      styleObj.display = 'grid'
      if (styleObj['border-collapse'] === 'collapse') {
        styleObj['border-collapse'] = undefined
        spacing = 0
      }
      if (spacing) {
        styleObj['grid-gap'] = spacing + 'px'
        styleObj.padding = spacing + 'px'
      } else if (border) {
        // æ— é—´éš”的情况下避免边框重叠
        attrs.style += ';border-left:0;border-top:0'
      }
      const width = [] // è¡¨æ ¼çš„列宽
      const trList = [] // tr åˆ—表
      const cells = [] // ä¿å­˜æ–°çš„单元格
      const map = {}; // è¢«åˆå¹¶å•元格占用的格子
      (function traversal (nodes) {
        for (let i = 0; i < nodes.length; i++) {
          if (nodes[i].name === 'tr') {
            trList.push(nodes[i])
          } else if (nodes[i].name === 'colgroup') {
            let colI = 1
            for (const col of (nodes[i].children || [])) {
              if (col.name === 'col') {
                const style = col.attrs.style || ''
                const start = style.indexOf('width') ? style.indexOf(';width') : 0
                // æå–出宽度
                if (start !== -1) {
                  let end = style.indexOf(';', start + 6)
                  if (end === -1) {
                    end = style.length
                  }
                  width[colI] = style.substring(start ? start + 7 : 6, end)
                }
                colI += 1
              }
            }
          } else {
            traversal(nodes[i].children || [])
          }
        }
      })(children)
      for (let row = 1; row <= trList.length; row++) {
        let col = 1
        for (let j = 0; j < trList[row - 1].children.length; j++) {
          const td = trList[row - 1].children[j]
          if (td.name === 'td' || td.name === 'th') {
            // è¿™ä¸ªæ ¼å­è¢«ä¸Šé¢çš„单元格占用,则列号++
            while (map[row + '.' + col]) {
              col++
            }
            let style = td.attrs.style || ''
            let start = style.indexOf('width') ? style.indexOf(';width') : 0
            // æå–出 td çš„宽度
            if (start !== -1) {
              let end = style.indexOf(';', start + 6)
              if (end === -1) {
                end = style.length
              }
              if (!td.attrs.colspan) {
                width[col] = style.substring(start ? start + 7 : 6, end)
              }
              style = style.substr(0, start) + style.substr(end)
            }
            // è®¾ç½®ç«–直对齐
            style += ';display:flex'
            start = style.indexOf('vertical-align')
            if (start !== -1) {
              const val = style.substr(start + 15, 10)
              if (val.includes('middle')) {
                style += ';align-items:center'
              } else if (val.includes('bottom')) {
                style += ';align-items:flex-end'
              }
            } else {
              style += ';align-items:center'
            }
            // è®¾ç½®æ°´å¹³å¯¹é½
            start = style.indexOf('text-align')
            if (start !== -1) {
              const val = style.substr(start + 11, 10)
              if (val.includes('center')) {
                style += ';justify-content: center'
              } else if (val.includes('right')) {
                style += ';justify-content: right'
              }
            }
            style = (border ? `;border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'}` + (spacing ? '' : ';border-right:0;border-bottom:0') : '') + (padding ? `;padding:${padding}px` : '') + ';' + style
            // å¤„理列合并
            if (td.attrs.colspan) {
              style += `;grid-column-start:${col};grid-column-end:${col + parseInt(td.attrs.colspan)}`
              if (!td.attrs.rowspan) {
                style += `;grid-row-start:${row};grid-row-end:${row + 1}`
              }
              col += parseInt(td.attrs.colspan) - 1
            }
            // å¤„理行合并
            if (td.attrs.rowspan) {
              style += `;grid-row-start:${row};grid-row-end:${row + parseInt(td.attrs.rowspan)}`
              if (!td.attrs.colspan) {
                style += `;grid-column-start:${col};grid-column-end:${col + 1}`
              }
              // è®°å½•下方单元格被占用
              for (let rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) {
                for (let colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) {
                  map[(row + rowspan) + '.' + (col - colspan)] = 1
                }
              }
            }
            if (style) {
              td.attrs.style = style
            }
            cells.push(td)
            col++
          }
        }
        if (row === 1) {
          let temp = ''
          for (let i = 1; i < col; i++) {
            temp += (width[i] ? width[i] : 'auto') + ' '
          }
          styleObj['grid-template-columns'] = temp
        }
      }
      node.children = cells
    } else {
      // æ²¡æœ‰ä½¿ç”¨åˆå¹¶å•元格的表格通过 table å¸ƒå±€å®žçް
      if (node.c) {
        styleObj.display = 'table'
      }
      if (!isNaN(spacing)) {
        styleObj['border-spacing'] = spacing + 'px'
      }
      if (border || padding) {
        // éåކ
        (function traversal (nodes) {
          for (let i = 0; i < nodes.length; i++) {
            const td = nodes[i]
            if (td.name === 'th' || td.name === 'td') {
              if (border) {
                td.attrs.style = `border:${border}px ${borderstyle || 'solid'} ${bordercolor || 'gray'};${td.attrs.style || ''}`
              }
              if (padding) {
                td.attrs.style = `padding:${padding}px;${td.attrs.style || ''}`
              }
            } else if (td.children) {
              traversal(td.children)
            }
          }
        })(children)
      }
    }
    // ç»™è¡¨æ ¼æ·»åŠ ä¸€ä¸ªå•ç‹¬çš„æ¨ªå‘æ»šåŠ¨å±‚
    if (this.options.scrollTable && !(attrs.style || '').includes('inline')) {
      const table = Object.assign({}, node)
      node.name = 'div'
      node.attrs = {
        style: 'overflow:auto'
      }
      node.children = [table]
      attrs = table.attrs
    }
  } else if ((node.name === 'tbody' || node.name === 'tr') && node.flag && node.c) {
    node.flag = undefined;
    (function traversal (nodes) {
      for (let i = 0; i < nodes.length; i++) {
        if (nodes[i].name === 'td') {
          // é¢œè‰²æ ·å¼è®¾ç½®ç»™å•元格避免丢失
          for (const style of ['color', 'background', 'background-color']) {
            if (styleObj[style]) {
              nodes[i].attrs.style = style + ':' + styleObj[style] + ';' + (nodes[i].attrs.style || '')
            }
          }
        } else {
          traversal(nodes[i].children || [])
        }
      }
    })(children)
  } else if ((node.name === 'td' || node.name === 'th') && (attrs.colspan || attrs.rowspan)) {
    for (let i = this.stack.length; i--;) {
      if (this.stack[i].name === 'table' || this.stack[i].name === 'tbody' || this.stack[i].name === 'tr') {
        this.stack[i].flag = 1 // æŒ‡ç¤ºå«æœ‰åˆå¹¶å•元格
      }
    }
  } else if (node.name === 'ruby') {
    // è½¬æ¢ ruby
    node.name = 'span'
    for (let i = 0; i < children.length - 1; i++) {
      if (children[i].type === 'text' && children[i + 1].name === 'rt') {
        children[i] = {
          name: 'div',
          attrs: {
            style: 'display:inline-block;text-align:center'
          },
          children: [{
            name: 'div',
            attrs: {
              style: 'font-size:50%;' + (children[i + 1].attrs.style || '')
            },
            children: children[i + 1].children
          }, children[i]]
        }
        children.splice(i + 1, 1)
      }
    }
  } else if (node.c) {
    (function traversal (node) {
      node.c = 2
      for (let i = node.children.length; i--;) {
        const child = node.children[i]
        // #ifdef (MP-WEIXIN || MP-QQ || APP-PLUS || MP-360) && VUE3
        if (child.name && (config.inlineTags[child.name] || ((child.attrs.style || '').includes('inline') && child.children)) && !child.c) {
          traversal(child)
        }
        // #endif
        if (!child.c || child.name === 'table') {
          node.c = 1
        }
      }
    })(node)
  }
  if ((styleObj.display || '').includes('flex') && !node.c) {
    for (let i = children.length; i--;) {
      const item = children[i]
      if (item.f) {
        item.attrs.style = (item.attrs.style || '') + item.f
        item.f = undefined
      }
    }
  }
  // flex å¸ƒå±€æ—¶éƒ¨åˆ†æ ·å¼éœ€è¦æå–到 rich-text å¤–层
  const flex = parent && ((parent.attrs.style || '').includes('flex') || (parent.attrs.style || '').includes('grid'))
    // #ifdef MP-WEIXIN
    // æ£€æŸ¥åŸºç¡€åº“版本 virtualHost æ˜¯å¦å¯ç”¨
    && !(node.c && wx.getNFCAdapter) // eslint-disable-line
    // #endif
    // #ifndef MP-WEIXIN || MP-QQ || MP-BAIDU || MP-TOUTIAO
    && !node.c // eslint-disable-line
  // #endif
  if (flex) {
    node.f = ';max-width:100%'
  }
  if (children.length >= 50 && node.c && !(styleObj.display || '').includes('flex')) {
    mergeNodes(children)
  }
  // #endif
  for (const key in styleObj) {
    if (styleObj[key]) {
      const val = `;${key}:${styleObj[key].replace(' !important', '')}`
      /* #ifndef APP-PLUS-NVUE */
      if (flex && ((key.includes('flex') && key !== 'flex-direction') || key === 'align-self' || key.includes('grid') || styleObj[key][0] === '-' || (key.includes('width') && val.includes('%')))) {
        node.f += val
        if (key === 'width') {
          attrs.style += ';width:100%'
        }
      } else /* #endif */ {
        attrs.style += val
      }
    }
  }
  attrs.style = attrs.style.substr(1) || undefined
  // #ifdef (MP-WEIXIN || MP-QQ) && VUE3
  for (const key in attrs) {
    if (!attrs[key]) {
      delete attrs[key]
    }
  }
  // #endif
}
/**
 * @description è§£æžåˆ°æ–‡æœ¬
 * @param {String} text æ–‡æœ¬å†…容
 */
Parser.prototype.onText = function (text) {
  if (!this.pre) {
    // åˆå¹¶ç©ºç™½ç¬¦
    let trim = ''
    let flag
    for (let i = 0, len = text.length; i < len; i++) {
      if (!blankChar[text[i]]) {
        trim += text[i]
      } else {
        if (trim[trim.length - 1] !== ' ') {
          trim += ' '
        }
        if (text[i] === '\n' && !flag) {
          flag = true
        }
      }
    }
    // åŽ»é™¤å«æœ‰æ¢è¡Œç¬¦çš„ç©ºä¸²
    if (trim === ' ') {
      if (flag) return
      // #ifdef VUE3
      else {
        const parent = this.stack[this.stack.length - 1]
        if (parent && parent.name[0] === 't') return
      }
      // #endif
    }
    text = trim
  }
  const node = Object.create(null)
  node.type = 'text'
  // #ifdef (MP-BAIDU || MP-ALIPAY || MP-TOUTIAO) && VUE3
  node.attrs = {}
  // #endif
  node.text = decodeEntity(text)
  if (this.hook(node)) {
    // #ifdef MP-WEIXIN
    if (this.options.selectable === 'force' && system.includes('iOS') && !uni.canIUse('rich-text.user-select')) {
      this.expose()
    }
    // #endif
    const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes
    siblings.push(node)
  }
}
/**
 * @description html è¯æ³•分析器
 * @param {Object} handler é«˜å±‚处理器
 */
function Lexer (handler) {
  this.handler = handler
}
/**
 * @description æ‰§è¡Œè§£æž
 * @param {String} content è¦è§£æžçš„æ–‡æœ¬
 */
Lexer.prototype.parse = function (content) {
  this.content = content || ''
  this.i = 0 // æ ‡è®°è§£æžä½ç½®
  this.start = 0 // æ ‡è®°ä¸€ä¸ªå•词的开始位置
  this.state = this.text // å½“前状态
  for (let len = this.content.length; this.i !== -1 && this.i < len;) {
    this.state()
  }
}
/**
 * @description æ£€æŸ¥æ ‡ç­¾æ˜¯å¦é—­åˆ
 * @param {String} method å¦‚果闭合要进行的操作
 * @returns {Boolean} æ˜¯å¦é—­åˆ
 * @private
 */
Lexer.prototype.checkClose = function (method) {
  const selfClose = this.content[this.i] === '/'
  if (this.content[this.i] === '>' || (selfClose && this.content[this.i + 1] === '>')) {
    if (method) {
      this.handler[method](this.content.substring(this.start, this.i))
    }
    this.i += selfClose ? 2 : 1
    this.start = this.i
    this.handler.onOpenTag(selfClose)
    if (this.handler.tagName === 'script') {
      this.i = this.content.indexOf('</', this.i)
      if (this.i !== -1) {
        this.i += 2
        this.start = this.i
      }
      this.state = this.endTag
    } else {
      this.state = this.text
    }
    return true
  }
  return false
}
/**
 * @description æ–‡æœ¬çŠ¶æ€
 * @private
 */
Lexer.prototype.text = function () {
  this.i = this.content.indexOf('<', this.i) // æŸ¥æ‰¾æœ€è¿‘的标签
  if (this.i === -1) {
    // æ²¡æœ‰æ ‡ç­¾äº†
    if (this.start < this.content.length) {
      this.handler.onText(this.content.substring(this.start, this.content.length))
    }
    return
  }
  const c = this.content[this.i + 1]
  if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
    // æ ‡ç­¾å¼€å¤´
    if (this.start !== this.i) {
      this.handler.onText(this.content.substring(this.start, this.i))
    }
    this.start = ++this.i
    this.state = this.tagName
  } else if (c === '/' || c === '!' || c === '?') {
    if (this.start !== this.i) {
      this.handler.onText(this.content.substring(this.start, this.i))
    }
    const next = this.content[this.i + 2]
    if (c === '/' && ((next >= 'a' && next <= 'z') || (next >= 'A' && next <= 'Z'))) {
      // æ ‡ç­¾ç»“å°¾
      this.i += 2
      this.start = this.i
      this.state = this.endTag
      return
    }
    // å¤„理注释
    let end = '-->'
    if (c !== '!' || this.content[this.i + 2] !== '-' || this.content[this.i + 3] !== '-') {
      end = '>'
    }
    this.i = this.content.indexOf(end, this.i)
    if (this.i !== -1) {
      this.i += end.length
      this.start = this.i
    }
  } else {
    this.i++
  }
}
/**
 * @description æ ‡ç­¾åçŠ¶æ€
 * @private
 */
Lexer.prototype.tagName = function () {
  if (blankChar[this.content[this.i]]) {
    // è§£æžåˆ°æ ‡ç­¾å
    this.handler.onTagName(this.content.substring(this.start, this.i))
    while (blankChar[this.content[++this.i]]);
    if (this.i < this.content.length && !this.checkClose()) {
      this.start = this.i
      this.state = this.attrName
    }
  } else if (!this.checkClose('onTagName')) {
    this.i++
  }
}
/**
 * @description å±žæ€§åçŠ¶æ€
 * @private
 */
Lexer.prototype.attrName = function () {
  let c = this.content[this.i]
  if (blankChar[c] || c === '=') {
    // è§£æžåˆ°å±žæ€§å
    this.handler.onAttrName(this.content.substring(this.start, this.i))
    let needVal = c === '='
    const len = this.content.length
    while (++this.i < len) {
      c = this.content[this.i]
      if (!blankChar[c]) {
        if (this.checkClose()) return
        if (needVal) {
          // ç­‰å·åŽé‡åˆ°ç¬¬ä¸€ä¸ªéžç©ºå­—符
          this.start = this.i
          this.state = this.attrVal
          return
        }
        if (this.content[this.i] === '=') {
          needVal = true
        } else {
          this.start = this.i
          this.state = this.attrName
          return
        }
      }
    }
  } else if (!this.checkClose('onAttrName')) {
    this.i++
  }
}
/**
 * @description å±žæ€§å€¼çŠ¶æ€
 * @private
 */
Lexer.prototype.attrVal = function () {
  const c = this.content[this.i]
  const len = this.content.length
  if (c === '"' || c === "'") {
    // æœ‰å†’号的属性
    this.start = ++this.i
    this.i = this.content.indexOf(c, this.i)
    if (this.i === -1) return
    this.handler.onAttrVal(this.content.substring(this.start, this.i))
  } else {
    // æ²¡æœ‰å†’号的属性
    for (; this.i < len; this.i++) {
      if (blankChar[this.content[this.i]]) {
        this.handler.onAttrVal(this.content.substring(this.start, this.i))
        break
      } else if (this.checkClose('onAttrVal')) return
    }
  }
  while (blankChar[this.content[++this.i]]);
  if (this.i < len && !this.checkClose()) {
    this.start = this.i
    this.state = this.attrName
  }
}
/**
 * @description ç»“束标签状态
 * @returns {String} ç»“束的标签名
 * @private
 */
Lexer.prototype.endTag = function () {
  const c = this.content[this.i]
  if (blankChar[c] || c === '>' || c === '/') {
    this.handler.onCloseTag(this.content.substring(this.start, this.i))
    if (c !== '>') {
      this.i = this.content.indexOf('>', this.i)
      if (this.i === -1) return
    }
    this.start = ++this.i
    this.state = this.text
  } else {
    this.i++
  }
}
export default Parser
node_modules/mp-html/src/uni-app/static/app-plus/mp-html/js/handler.js
New file
@@ -0,0 +1,254 @@
// ç­‰å¾…初始化完毕
document.addEventListener('UniAppJSBridgeReady', () => {
  document.body.onclick = () =>
    uni.postMessage({
      data: {
        action: 'onClick'
      }
    })
  uni.postMessage({
    data: {
      action: 'onJSBridgeReady'
    }
  })
})
let options
let medias = []
/**
 * @description èŽ·å–æ ‡ç­¾çš„æ‰€æœ‰å±žæ€§
 * @param {Element} ele
 */
function getAttrs (ele) {
  const attrs = Object.create(null)
  for (let i = ele.attributes.length; i--;) {
    attrs[ele.attributes[i].name] = ele.attributes[i].value
  }
  return attrs
}
/**
 * @description å›¾ç‰‡åŠ è½½å‡ºé”™
 */
function onImgError () {
  if (options[1]) {
    this.src = options[1]
    this.onerror = null
  }
  // å–消监听点击
  this.onclick = null
  this.ontouchstart = null
  uni.postMessage({
    data: {
      action: 'onError',
      source: 'img',
      attrs: getAttrs(this)
    }
  })
}
/**
 * @description æ£€æŸ¥æ˜¯å¦æ‰€æœ‰å›¾ç‰‡åŠ è½½å®Œæ¯•
 */
function checkReady () {
  window.unloadimgs -= 1
  if (window.unloadimgs === 0) {
    // æ‰€æœ‰å›¾ç‰‡åŠ è½½å®Œæ¯•
    uni.postMessage({
      data: {
        action: 'onReady'
      }
    })
  }
}
/**
 * @description åˆ›å»º dom ç»“æž„
 * @param {object[]} nodes èŠ‚ç‚¹æ•°ç»„
 * @param {Element} parent çˆ¶èŠ‚ç‚¹
 * @param {string} namespace å‘½åç©ºé—´
 */
function createDom (nodes, parent, namespace) {
  for (let i = 0; i < nodes.length; i++) {
    const node = nodes[i]
    let ele
    if (!node.type || node.type === 'node') {
      let name = node.name
      // svg éœ€è¦è®¾ç½® namespace
      if (name === 'svg') {
        namespace = 'http://www.w3.org/2000/svg'
      }
      if (name === 'html' || name === 'body') {
        name = 'div'
      }
      // åˆ›å»ºæ ‡ç­¾
      if (!namespace) {
        ele = document.createElement(name)
      } else {
        ele = document.createElementNS(namespace, name)
      }
      // è®¾ç½®å±žæ€§
      for (const item in node.attrs) {
        ele.setAttribute(item, node.attrs[item])
      }
      // é€’归创建子节点
      if (node.children) {
        createDom(node.children, ele, namespace)
      }
      // å¤„理图片
      if (name === 'img') {
        window.unloadimgs += 1
        ele.onload = checkReady
        ele.onerror = checkReady
        if (!ele.src && ele.getAttribute('data-src')) {
          ele.src = ele.getAttribute('data-src')
        }
        if (!node.attrs.ignore) {
          // ç›‘听图片点击事件
          ele.onclick = function (e) {
            e.stopPropagation()
            uni.postMessage({
              data: {
                action: 'onImgTap',
                attrs: getAttrs(this)
              }
            })
          }
        }
        if (options[2]) {
          const image = new Image()
          image.src = ele.src
          ele.src = options[2]
          image.onload = function () {
            ele.src = this.src
          }
          image.onerror = function () {
            ele.onerror()
          }
        }
        ele.onerror = onImgError
      } else if (name === 'a') {
        // å¤„理链接
        ele.addEventListener('click', function (e) {
          e.stopPropagation()
          e.preventDefault() // é˜»æ­¢é»˜è®¤è·³è½¬
          const href = this.getAttribute('href')
          let offset
          if (href && href[0] === '#') {
            offset = (document.getElementById(href.substr(1)) || {}).offsetTop
          }
          uni.postMessage({
            data: {
              action: 'onLinkTap',
              attrs: getAttrs(this),
              offset
            }
          })
        }, true)
      } else if (name === 'video' || name === 'audio') {
        // å¤„理音视频
        medias.push(ele)
        if (!node.attrs.autoplay && !node.attrs.controls) {
          ele.setAttribute('controls', 'true')
        }
        ele.onplay = function () {
          uni.postMessage({
            data: {
              action: 'onPlay'
            }
          })
          if (options[3]) {
            for (let i = 0; i < medias.length; i++) {
              if (medias[i] !== this) {
                medias[i].pause()
              }
            }
          }
        }
        ele.onerror = function () {
          uni.postMessage({
            data: {
              action: 'onError',
              source: name,
              attrs: getAttrs(this)
            }
          })
        }
      } else if (name === 'table' && options[4] && !ele.style.cssText.includes('inline')) {
        // å¤„理表格
        const div = document.createElement('div')
        div.style.overflow = 'auto'
        div.appendChild(ele)
        ele = div
      } else if (name === 'svg') {
        namespace = undefined
      }
    } else {
      ele = document.createTextNode(node.text.replace(/&amp;/g, '&'))
    }
    parent.appendChild(ele)
  }
}
// è®¾ç½® html å†…容
window.setContent = function (nodes, opts, append) {
  const ele = document.getElementById('content')
  // å®¹å™¨æ ·å¼
  if (opts[0]) {
    document.body.style.cssText = opts[0]
  }
  // é•¿æŒ‰å¤åˆ¶
  if (!opts[5]) {
    ele.style.userSelect = 'none'
  }
  if (!append) {
    ele.innerHTML = '' // ä¸è¿½åŠ åˆ™å…ˆæ¸…ç©º
    medias = []
  }
  options = opts
  window.unloadimgs = 0
  const fragment = document.createDocumentFragment()
  createDom(nodes, fragment)
  ele.appendChild(fragment)
  // è§¦å‘事件
  let height = ele.scrollHeight
  uni.postMessage({
    data: {
      action: 'onLoad',
      height
    }
  })
  if (!window.unloadimgs) {
    uni.postMessage({
      data: {
        action: 'onReady',
        height
      }
    })
  }
  clearInterval(window.timer)
  window.timer = setInterval(() => {
    if (ele.scrollHeight !== height) {
      height = ele.scrollHeight
      uni.postMessage({
        data: {
          action: 'onHeightChange',
          height: height
        }
      })
    }
  }, 350)
}
// å›žæ”¶è®¡æ—¶å™¨
window.onunload = function () {
  clearInterval(window.timer)
}
node_modules/mp-html/src/uni-app/static/app-plus/mp-html/js/uni.webview.min.js
New file
@@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).uni=n()}(this,(function(){"use strict";try{var e={};Object.defineProperty(e,"passive",{get:function(){!0}}),window.addEventListener("test-passive",null,e)}catch(e){}var n=Object.prototype.hasOwnProperty;function t(e,t){return n.call(e,t)}var i=[],a=function(e,n){var t={options:{timestamp:+new Date},name:e,arg:n};if(window.__dcloud_weex_postMessage||window.__dcloud_weex_){if("postMessage"===e){var a={data:[n]};return window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessage(a):window.__dcloud_weex_.postMessage(JSON.stringify(a))}var o={type:"WEB_INVOKE_APPSERVICE",args:{data:t,webviewIds:i}};window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessageToService(o):window.__dcloud_weex_.postMessageToService(JSON.stringify(o))}if(!window.plus)return window.parent.postMessage({type:"WEB_INVOKE_APPSERVICE",data:t,pageId:""},"*");if(0===i.length){var r=plus.webview.currentWebview();if(!r)throw new Error("plus.webview.currentWebview() is undefined");var d=r.parent(),s="";s=d?d.id:r.id,i.push(s)}if(plus.webview.getWebviewById("__uniapp__service"))plus.webview.postMessageToUniNView({type:"WEB_INVOKE_APPSERVICE",args:{data:t,webviewIds:i}},"__uniapp__service");else{var w=JSON.stringify(t);plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat("WEB_INVOKE_APPSERVICE",'",').concat(w,",").concat(JSON.stringify(i),");"))}},o={navigateTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;a("navigateTo",{url:encodeURI(n)})},navigateBack:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.delta;a("navigateBack",{delta:parseInt(n)||1})},switchTab:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;a("switchTab",{url:encodeURI(n)})},reLaunch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;a("reLaunch",{url:encodeURI(n)})},redirectTo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url;a("redirectTo",{url:encodeURI(n)})},getEnv:function(e){window.plus?e({plus:!0}):e({h5:!0})},postMessage:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a("postMessage",e.data||{})}},r=/uni-app/i.test(navigator.userAgent),d=/Html5Plus/i.test(navigator.userAgent),s=/complete|loaded|interactive/;var w=window.my&&navigator.userAgent.indexOf("AlipayClient")>-1;var u=window.swan&&window.swan.webView&&/swan/i.test(navigator.userAgent);var c=window.qq&&window.qq.miniProgram&&/QQ/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var g=window.tt&&window.tt.miniProgram&&/toutiaomicroapp/i.test(navigator.userAgent);var v=window.wx&&window.wx.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);var p=window.qa&&/quickapp/i.test(navigator.userAgent);for(var l,_=function(){window.UniAppJSBridge=!0,document.dispatchEvent(new CustomEvent("UniAppJSBridgeReady",{bubbles:!0,cancelable:!0}))},f=[function(e){if(r||d)return window.__dcloud_weex_postMessage||window.__dcloud_weex_?document.addEventListener("DOMContentLoaded",e):window.plus&&s.test(document.readyState)?setTimeout(e,0):document.addEventListener("plusready",e),o},function(e){if(v)return window.WeixinJSBridge&&window.WeixinJSBridge.invoke?setTimeout(e,0):document.addEventListener("WeixinJSBridgeReady",e),window.wx.miniProgram},function(e){if(c)return window.QQJSBridge&&window.QQJSBridge.invoke?setTimeout(e,0):document.addEventListener("QQJSBridgeReady",e),window.qq.miniProgram},function(e){if(w){document.addEventListener("DOMContentLoaded",e);var n=window.my;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){if(u)return document.addEventListener("DOMContentLoaded",e),window.swan.webView},function(e){if(g)return document.addEventListener("DOMContentLoaded",e),window.tt.miniProgram},function(e){if(p){window.QaJSBridge&&window.QaJSBridge.invoke?setTimeout(e,0):document.addEventListener("QaJSBridgeReady",e);var n=window.qa;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){return document.addEventListener("DOMContentLoaded",e),o}],m=0;m<f.length&&!(l=f[m](_));m++);l||(l={});var E="undefined"!=typeof uni?uni:{};if(!E.navigateTo)for(var b in l)t(l,b)&&(E[b]=l[b]);return E.webView=l,E}));
node_modules/mp-html/src/uni-app/static/app-plus/mp-html/local.html
New file
@@ -0,0 +1,33 @@
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
  <style>
    html,
    body {
      width: 100%;
      height: 100%;
      overflow-x: scroll;
      overflow-y: hidden;
    }
    body {
      margin: 0;
    }
    video {
      width: 300px;
      height: 225px;
    }
    img {
      max-width: 100%;
      -webkit-touch-callout: none;
    }
  </style>
</head>
<body>
  <div id="content" style="overflow: hidden;"></div>
  <script type="text/javascript" src="./js/uni.webview.min.js"></script>
  <script type="text/javascript" src="./js/handler.js"></script>
</body>
node_modules/mp-html/test/content.js
New file
@@ -0,0 +1,203 @@
/**
 * @fileoverview ç”¨äºŽæµ‹è¯•çš„ html å†…容
 */
module.exports = `<title>富文本示例</title>
<div>
  <section style="text-align: center; margin: 0px auto;">
    <section style="border-radius: 4px; border: 1px solid #757576; display: inline-block; padding: 5px 20px;">
      <span style="font-size: 18px; color: #595959;">表格</span>
    </section>
  </section>
  <section style="margin-top: 1.5em;">
    <table width="100%" cellspacing="0" cellpadding="5">
      <thead>
        <tr>
          <th>标题 1</th>
          <th>标题 2</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td align="center">内容 1</td>
          <td align="center">内容 2</td>
        </tr>
        <tr style="background-color: #f6f8fa;">
          <td align="center">内容 3</td>
          <td align="center"><a>链接</a></td>
        </tr>
        <tr>
          <td align="center">内容 5</td>
          <td align="center">内容 6</td>
        </tr>
      </tbody>
    </table>
    <div style="font-size: 12px; color: gray; text-align: center; margin-top: 5px;">普通表格</div>
  </section>
  <section style="margin-top: 1.5em;">
    <table width="500px" cellspacing="0" cellpadding="5">
      <thead>
        <tr>
          <th>标题 1</th>
          <th>标题 2</th>
          <th>标题 3</th>
          <th>标题 4</th>
          <th>标题 5</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td align="center">内容 1</td>
          <td align="center">内容 2</td>
          <td align="center">内容 3</td>
          <td align="center">内容 4</td>
          <td align="center">内容 5</td>
        </tr>
        <tr style="background-color: #f6f8fa;">
          <td align="center"><a>链接</a></td>
          <td align="center">内容 7</td>
          <td align="center">内容 8</td>
          <td align="center">内容 9</td>
          <td align="center">内容 10</td>
        </tr>
        <tr>
          <td align="center">内容 11</td>
          <td align="center">内容 12</td>
          <td align="center">内容 13</td>
          <td align="center">内容 14</td>
          <td align="center">内容 15</td>
        </tr>
      </tbody>
    </table>
    <div style="font-size: 12px; color: gray; text-align: center; margin-top: 5px;">长表格,可以单独横向滚动</div>
  </section>
  <section style="margin-top: 1.5em;">
    <table width="100%" cellspacing="0" cellpadding="5">
      <thead>
        <tr>
          <th align="center">标题 1</th>
          <th align="center">标题 2</th>
          <th align="center">标题 3</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td align="center" colspan="2">内容 1</td>
          <td align="center" rowspan="2">内容 2</td>
        </tr>
        <tr>
          <td align="center" rowspan="2">内容 3</td>
          <td align="center">内容 4</td>
        </tr>
        <tr>
          <td align="center" colspan="2">内容 5</td>
        </tr>
        <tr>
          <td align="center">内容 6</td>
          <td align="center">内容 7</td>
          <td align="center"><a>链接</a></td>
        </tr>
      </tbody>
    </table>
    <div style="font-size: 12px; color: gray; text-align: center; margin-top: 5px;">含有合并单元格的表格</div>
  </section>
  <section id="list" style="text-align: center; margin: 0px auto; margin-top: 2em">
    <section style="border-radius: 4px; border: 1px solid #757576; display: inline-block; padding: 5px 20px;">
      <span style="font-size: 18px; color: #595959;">列表</span>
    </section>
  </section>
  <section style="margin-top: 1.5em;">
    <ol style="margin-bottom: 1.5em;">
      <li>这是第一条列表项</li>
      <li>这是第二条列表项</li>
      <li>这是第三条 <a>链接</a></li>
    </ol>
    <ol type="A" style="margin-bottom: 1.5em;">
      <li>这是第一条列表项</li>
      <li>这是第二条列表项</li>
      <li>这是第三条 <a>链接</a></li>
    </ol>
    <ol type="I" style="margin-bottom: 1.5em;">
      <li>这是第一条列表项</li>
      <li>这是第二条列表项</li>
      <li>这是第三条 <a>链接</a></li>
    </ol>
    <ul>
      <li>第一级无序列表</li>
      <li>第一级无序列表
        <ul>
          <li>第二级无序列表</li>
          <li>第二级无序列表
            <ul>
              <li>第三级无序列表</li>
              <li>第三级 <a>链接</a></li>
            </ul>
          </li>
        </ul>
      </li>
    </ul>
  </section>
  <section style="text-align: center; margin: 0px auto; margin-top: 2em">
    <section style="border-radius: 4px; border: 1px solid #757576; display: inline-block; padding: 5px 20px;">
      <span style="font-size: 18px; color: #595959;">文本</span>
    </section>
  </section>
  <section style="margin-top: 1.5em;">
    <p style="margin-bottom: 1em;">
      <ruby>
        æ‹¼<rp>(</rp><rt>pin</rt><rp>)</rp>
        éŸ³<rp>(</rp><rt>yin</rt><rp>)</rp>
      </ruby>
      &nbsp;&nbsp;<i>斜体</i>
      &nbsp;&nbsp;<b>粗体</b>
      &nbsp;&nbsp;上标<sup>1</sup>
      &nbsp;&nbsp;下标<sub>2</sub>
    </p>
    <p style="margin-bottom: 1em;">
      <span style="text-decoration: overline;">上划线</span>
      &nbsp;&nbsp;<s>中划线</s>
      &nbsp;&nbsp;<u>下划线</u>
    </p>
    <p>
      <big>大一号</big>
      &nbsp;&nbsp;<span>正常</span>
      &nbsp;&nbsp;<small>小一号</small>
    </p>
    <h2 style="margin-top: 0.5em;">大标题</h2>
    <h3 style="margin-top: 0.5em;">中标题</h3>
    <h4 style="margin-top: 0.5em;">小标题</h4>
  </section>
  <section style="text-align: center; margin: 0px auto; margin-top: 2em">
    <section style="border-radius: 4px; border: 1px solid #757576; display: inline-block; padding: 5px 20px;">
      <span style="font-size: 18px; color: #595959;">链接</span>
    </section>
  </section>
  <section style="margin-top: 1.5em; text-align: center;">
    <a href="#">跳转到顶部</a>&nbsp;&nbsp;&nbsp;<a href="#list">跳转到列表</a>
    <div style="font-size: 12px; color: gray; margin-top: 5px;">锚点链接,将滚动到对应位置</div>
  </section>
  <section style="margin-top: 1.5em; text-align: center;">
    <a href="https://github.com/jin-yufeng/mp-html">外部链接</a>
    <div style="font-size: 12px; color: gray; margin-top: 5px;">外部链接,将复制链接</div>
  </section>
  <section style="margin-top: 1.5em; text-align: center;">
    <a href="/pages/jump/jump">内部链接</a>
    <div style="font-size: 12px; color: gray; margin-top: 5px;">内部链接,将跳转页面</div>
  </section>
  <section style="text-align: center; margin: 0px auto; margin-top: 2em">
    <section style="border-radius: 4px; border: 1px solid #757576; display: inline-block; padding: 5px 20px;">
      <span style="font-size: 18px; color: #595959;">图片</span>
    </section>
  </section>
  <section style="margin-top: 1.5em; text-align: center;">
    <img src="demo.jpg">
    <div style="font-size: 12px; color: gray; margin-top: 5px;">点击预览</div>
  </section>
  <section style="margin-top: 1.5em; text-align: center;">
    <svg width="40px" height="40px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;">
      <path fill="#000" d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z">
        <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"/>
      </path>
    </svg>
    <div style="font-size: 12px; color: gray; margin-top: 5px;">svg åŠ¨ç”»</div>
  </section>
</div>`
node_modules/mp-html/test/test.js
New file
@@ -0,0 +1,373 @@
/**
 * @fileoverview å•元测试
 */
const path = require('path')
const simulate = require('miniprogram-simulate')
const html = require('./content') // æµ‹è¯• html
const dist = '../dev/mp-weixin/components/mp-html/index' // ç»„件目录
// æ–° api æ¨¡æ‹Ÿ
wx.getWindowInfo = function () {
  return {
    windowWidth: 414
  }
}
wx.getDeviceInfo = function () {
  return {
    system: 'iOS 10.0.1'
  }
}
const mpHtml = simulate.load(path.resolve(__dirname, dist), 'mp-html')
// æ¸²æŸ“测试
test('render', async () => {
  // åˆ›å»ºå’Œæ¸²æŸ“页面
  const id = simulate.load({
    data: {
      containerStyle: '',
      copyLink: true,
      lazyLoad: true,
      pauseVideo: true,
      previewImg: true,
      useAnchor: true
    },
    template:
      `<scroll-view id="scroll" style="height:100px" scroll-y scroll-top="{{top}}">
  <mp-html id="article" container-style="{{containerStyle}}" content="{{html}}" domain="https://mp-html.oss-cn-hangzhou.aliyuncs.com" copy-link="{{copyLink}}" loading-img="xxx" error-img="xxx" lazy-load="{{lazyLoad}}" pause-video="{{pauseVideo}}" preview-img="{{previewImg}}" scroll-table use-anchor="{{useAnchor}}">加载中...</mp-html>
</scroll-view>`,
    usingComponents: {
      'mp-html': mpHtml
    }
  })
  const page = simulate.render(id)
  // è®¾ç½®æ•°æ®
  page.setData({
    html
  })
  await simulate.sleep(1000)
  const comp = page.querySelector('#article')
  expect(comp.dom.tagName).toBe('MP-HTML')
  await simulate.sleep(50)
  // api æµ‹è¯•
  comp.instance.setContent(
    `<!-- æµ‹è¯• base æ ‡ç­¾ -->
<base href="https://xxx.com">
<!-- æµ‹è¯• script æ ‡ç­¾ -->
<script>
console.log('11')
</script>
<!-- æµ‹è¯• embed æ ‡ç­¾ -->
<embed src="xxx.mp4" />
<embed autostart src="xxx.m4a" />
<!-- æµ‹è¯• source æ ‡ç­¾ -->
<video src="xxx.mp4" style="height:auto" loop ></video>
<!-- æµ‹è¯• table æ ‡ç­¾ -->
<table align="center"></table>
<table align="left" border="1">
  <td>
    <a>xxx</a>
  </td>
</table>
<table width="100%" border="1" style="border-collapse: collapse;">
  <colgroup><col style="width: 40%;"><col style="width: 60%;"></colgroup>
  <tr>
    <th style="vertical-align: bottom;" width="20%">标题1</th>
    <th width="80%">标题2</th>
  </tr>
  <tr style="color:gray">
    <td colspan="2" style="vertical-align:middle;text-align:right"><a>内容1</a></td>
  </tr>
</table>
<table>
  <tr>
    <td><img src="xxx.jpg" style="display:block">图片<td>
    <td><img src="xxx.jpg">图片<td>
  </tr>
</table>
<!-- æµ‹è¯• font æ ‡ç­¾ã€ä¸åŒå±žæ€§å†™æ³•、实体 -->
<font color='red' face = "宋体" size=8 >&#26356;&#x591a;</font >
<font size=0>1 < 2</font>
<font>&#aaa;&aaa;&</FONT>
<!-- æµ‹è¯• rpx å•位处理 -->
<span id="anchor" style="font-size:30rpx">11</span>
<!-- æµ‹è¯• pre æ ‡ç­¾å¤„理(保留空白符) -->
<div style="white-space:pre">
  <pre>var i = 0</pre>
</div>
<!-- æµ‹è¯•不同情况中的图片处理 -->
<img src="xxx" style="width:100px;height:100px;object-fit:contain">
<img src="xxx" style="width:100px;object-fit:cover;height:100px;">
<a data-test="test">
  <img src="//xxx.jpg">
</a>
<div style="display:inline-block !important;display:block">
  <img style="width:100%;" src="xxx.jpg">
  </p>
</div>
<div style="display:flex">
  <div style="flex:1">
    <img src="//xxx.jpg" style="display:inline">
  </div>
</div>
<img style="width:auto" src="data:image/png;base64,xxxx">
<img src="xxx" style="width:20px" height="10">
<img src="yyy.webp" style="width:1000px" ignore>
<svg />
<svg viewbox="0 0 1 1"><text>123</text><svg></svg></svg>
<svg><foreignobject><div>123</div></foreignobject></svg>
<div class="ql-align-center" style="background-image:url(&quot;/xxx.jpg?a=2&amp;b=3&quot;)"></div>
<![CDATA[<]]>
<!-- æµ‹è¯• flex å¸ƒå±€ã€æœªé—­åˆæ ‡ç­¾ã€data- å±žæ€§å¤„理 -->
<div style="display:flex;width:1000px">
  <div style="flex:1" dir="rtl">123</div>
</div>
</br><div data-test="xxx" style="display:flex;display:-webkit-flex;"><div>
  <img data-src="/xxx.jpg" style="width:100%;height:100px">  `, true) // è¡¥å……测试
  expect(comp.instance.getText().includes('更多')).toBe(true) // æ£€æŸ¥ä¸Šæ–¹çš„实体是否被解码
  await comp.instance.getRect()
  await comp.instance.navigateTo('anchor') // åŸºäºŽé¡µé¢è·³è½¬
  comp.instance.in(page.instance) // é”™è¯¯è®¾ç½®
  comp.instance.in(page.instance, '#scroll', 'top')
  await comp.instance.navigateTo('anchor') // åŸºäºŽ scroll-view æ»šåЍ
  page.setData({
    useAnchor: false
  })
  await simulate.sleep(50)
  comp.instance.setContent('<span id="test">123</span>', true)
  try {
    await comp.instance.navigateTo('anchor') // ç¦ç”¨é”šç‚¹çš„æƒ…况下跳转
  } catch (e) { }
  page.setData({
    containerStyle: 'white-space:pre-wrap'
  })
  await simulate.sleep(50)
  comp.instance.setContent('  ç©ºæ ¼\n换行')
  expect(comp.instance.getText().includes('\n')).toBe(true) // æ£€æŸ¥æ¢è¡Œæ˜¯å¦è¢«ä¿ç•™
  // æ— å›¾æµ‹è¯•
  page.setData({
    lazyLoad: false
  })
  await simulate.sleep(50)
  comp.instance.setContent('<div>Hello world!</div>')
  simulate.sleep(50)
  // é•¿å†…容测试
  let content = '<div>1</div>'.repeat(50) + '<div>'
  for (let i = 0; i < 50; i++) {
    content += '<div>' + i + '</div>'
  }
  content += '<a>xxx</a>'
  for (let i = 0; i < 3; i++) {
    content += '<div>' + i + '</div>'
  }
  comp.instance.setContent(content)
  simulate.sleep(50)
  expect(comp.data.nodes.length).toBe(2) // åº”该切分为 2 å—
  expect(comp.data.nodes[1].children.length).toBe(5) // åº”该切分为 5 å—
  await simulate.sleep(50) // ç­‰å¾…异步 api æ‰§è¡Œå®Œæ¯•
  // ç§»é™¤èŠ‚ç‚¹
  comp.triggerLifeTime('detached')
})
// äº‹ä»¶æµ‹è¯•
test('event', async () => {
  // æ¨¡æ‹Ÿ api
  wx.createVideoContext = function () {
    // æ¨¡æ‹Ÿè§†é¢‘ context
    return {
      pause: function () { },
      playbackRate: function () { }
    }
  }
  // æµ‹è¯•失败回调
  wx.navigateTo = function (obj) {
    setTimeout(() => {
      if (typeof obj.fail === 'function') {
        obj.fail()
      }
    }, 0)
  }
  wx.switchTab = function (obj) {
    setTimeout(() => {
      if (typeof obj.fail === 'function') {
        obj.fail()
      }
    }, 0)
  }
  const comp = simulate.render(mpHtml)
  comp.setData({
    selectable: 'force',
    loadingImg: 'xxx'
  })
  await simulate.sleep(50)
  comp.instance.setContent(
    `<img src="xxx">
<img src="yyy" width="100" height="50" ignore>
<a href="#aaa"><img src="xxx"></a>
<a href="https://github.com/jin-yufeng/mp-html">链接2</a>
<a href="pages/test/test">链接3</a>
<video src="xxx"></video>
<video>
  <source src="/xxx">
  <source src="//yyy">
</video>
<base href="https://xxx.com">`)
  await simulate.sleep(100)
  const node = comp.querySelector('#_root')
  node.triggerLifeTime('attached')
  comp.instance._add({
    detail: node.instance
  })
  // æ¨¡æ‹Ÿå›¾ç‰‡åŠ è½½å®Œæ¯•
  for (let i = 0; i <= 1; i++) {
    node.instance.imgLoad({
      target: {
        dataset: {
          i: i.toString()
        }
      },
      detail: {
        width: 100,
        height: 100
      }
    })
    // æ¨¡æ‹Ÿå›¾ç‰‡è¢«ç‚¹å‡»
    node.instance.imgTap({
      target: {
        dataset: {
          i: i.toString()
        }
      }
    })
  }
  comp.setData({
    loadingImg: ''
  })
  await simulate.sleep(350)
  node.instance.imgLoad({
    target: {
      dataset: {
        i: '1'
      }
    }
  })
  // æ¨¡æ‹Ÿå›¾ç‰‡é“¾æŽ¥è¢«ç‚¹å‡»
  node.instance.imgTap({
    target: {
      dataset: {
        i: '2_0'
      }
    }
  })
  node.instance.noop()
  // æ¨¡æ‹Ÿå›¾ç‰‡å‡ºé”™
  const imgError = () => node.instance.mediaError({
    target: {
      dataset: {
        i: '0'
      }
    },
    detail: {
      errMsg: 'test'
    }
  })
  imgError()
  comp.setData({
    errorImg: 'xxx'
  }, imgError)
  // æ¨¡æ‹Ÿé“¾æŽ¥è¢«ç‚¹å‡»
  for (let i = 2; i <= 4; i++) {
    node.instance.linkTap({
      currentTarget: {
        dataset: {
          i: i.toString()
        }
      }
    })
  }
  // æ¨¡æ‹Ÿè§†é¢‘播放
  for (let i = 0; i < 3; i++) {
    node.instance.play({
      target: {
        id: 'v' + (i % 2),
        dataset: {
          i: (5 + (i % 2)).toString()
        }
      }
    })
  }
  // è§†é¢‘倍速播放
  comp.instance.setPlaybackRate(1.5)
  node.instance.play({
    target: {
      id: 'v2',
      dataset: {
        i: '6'
      }
    }
  })
  // æš‚停视频播放
  comp.instance.pauseMedia()
  // æ¨¡æ‹Ÿè§†é¢‘出错
  node.instance.mediaError({
    target: {
      dataset: {
        i: '6'
      }
    },
    detail: {
      errMsg: 'test'
    }
  })
  // ç¦ç”¨ä¸€äº›åŠŸèƒ½
  comp.setData({
    copyLink: false,
    pauseVideo: false,
    previewImg: false
  }, () => {
    // ç¦ç”¨è‡ªåŠ¨æ‹·è´åŽç‚¹å‡»å¤–éƒ¨é“¾æŽ¥
    node.instance.linkTap({
      currentTarget: {
        dataset: {
          i: '3'
        }
      }
    })
    // ç¦ç”¨è‡ªåŠ¨æš‚åœåŽæ’­æ”¾è§†é¢‘
    node.instance.play({
      target: {
        id: 'v0',
        dataset: {
          i: '5'
        }
      }
    })
    // ç¦ç”¨é¢„览后点击图片
    node.instance.imgTap({
      target: {
        dataset: {
          i: '0'
        }
      }
    })
  })
  await simulate.sleep(100)
})
node_modules/mp-html/tools/config.js
New file
@@ -0,0 +1,82 @@
/**
 * @fileoverview é…ç½®æ–‡ä»¶
 */
module.exports = {
  /**
   * @description éœ€è¦çš„æ’件列表
   */
  plugins: [
    // æŒ‰éœ€æ‰“开注释即可
    // 'audio',     // éŸ³ä¹æ’­æ”¾å™¨
    // 'editable',  // å†…容编辑
    // 'emoji',     // å°è¡¨æƒ…
    // 'highlight', // ä»£ç é«˜äº®
    // 'markdown',  // è§£æž md
    // 'latex',     // è§£æž latex
    // 'search',    // å…³é”®è¯æœç´¢
    // 'style',     // è§£æž style æ ‡ç­¾
    // 'txv-video', // ä½¿ç”¨è…¾è®¯è§†é¢‘
    // 'img-cache'  // å›¾ç‰‡ç¼“å­˜
    // 'card',      // å¡ç‰‡å±•示
  ],
  /**
   * @description è¦å¼•入到组件中的外部样式(css)
   * ä»…支持标签名和 class é€‰æ‹©å™¨
   */
  externStyle: '',
  /**
   * @description è¦å¼•入到模板中的自定义标签(ad ç­‰ï¼‰
   * æ¯ä¸ªæ ‡ç­¾ä¸ºä¸€ä¸ª object,包含 name(标签名,必要)、attrs(属性列表,非必要)、platforms(需要添加的平台,非必要)
   */
  customElements: [
    /*
    // éœ€è¦ä½¿ç”¨å¹¿å‘Šæ ‡ç­¾åˆ™æ‰“开此注释
    {
      name: 'ad',
      attrs: ['unit-id']
    }
    */
  ],
  /**
   * @description babel é…ç½®ï¼ˆes6 è½¬ es5)
   * @tutorial https://babeljs.io/docs/usage/options/
   */
  babel: {
    presets: ['@babel/env']
  },
  /**
   * @description js åŽ‹ç¼©é…ç½®
   * @tutorial https://www.npmjs.com/package/uglify-js#minify-options
   */
  uglify: {
    mangle: {
      toplevel: true
    },
    output: {
      comments: /^!/
    }
  },
  /**
   * @description html åŽ‹ç¼©é…ç½®
   * @tutorial https://github.com/kangax/html-minifier#options-quick-reference
   */
  htmlmin: {
    caseSensitive: true,
    collapseWhitespace: true,
    removeComments: true,
    keepClosingSlash: true
  },
  /**
   * @description css åŽ‹ç¼©é…ç½®
   * @tutorial https://github.com/jakubpawlowicz/clean-css#constructor-options
   */
  cleanCss: {
  }
}
node_modules/mp-html/tools/converter.js
New file
@@ -0,0 +1,205 @@
/**
 * @fileoverview å°†å¾®ä¿¡ç«¯çš„代码转换到各个平台
 */
const through2 = require('through2')
// api å‰ç¼€
const prefix = {
  weixin: {
    wxml: 'wx:',
    js: 'wx.'
  },
  qq: {
    wxml: 'qq:',
    js: 'qq.'
  },
  baidu: {
    wxml: 's-',
    js: 'swan.'
  },
  alipay: {
    wxml: 'a:',
    js: 'my.'
  },
  toutiao: {
    wxml: 'tt:',
    js: 'tt.'
  }
}
// æ–‡ä»¶ååŽç¼€
const suffix = {
  weixin: {
    wxml: '.wxml',
    wxss: '.wxss'
  },
  qq: {
    wxml: '.qml',
    wxss: '.qss'
  },
  baidu: {
    wxml: '.swan',
    wxss: '.css'
  },
  alipay: {
    wxml: '.axml',
    wxss: '.acss'
  },
  toutiao: {
    wxml: '.ttml',
    wxss: '.ttss'
  }
}
/**
 * @description å–出两个括号之间的内容
 * @param {string} content æ€»å†…容
 * @param {number} i å¼€å§‹ä½ç½®
 */
function getSection (content, i) {
  let j = i + 1
  let num = 1
  const start = content[i]
  const end = start === '(' ? ')' : '}'
  while (num) {
    if (content[j] === start) {
      num++
    } else if (content[j] === end) {
      num--
    }
    j++
  }
  return content.substring(i, j)
}
/**
 * @description å¤„理不同小程序平台间的差异
 * @param {string} platform ä½¿ç”¨å¹³å°
 */
module.exports = function (platform) {
  if (platform !== 'uni-app') {
    platform = platform.split('-')[1]
  }
  return through2.obj(function (file, _, callback) {
    if (file.isBuffer()) {
      let content = file.contents.toString()
      if (platform === 'uni-app') {
        if (file.extname === '.js') {
          content = content.replace(/\.properties/g, '')
        }
      } else {
        // wxml æ–‡ä»¶å¤„理
        if (file.extname === '.wxml') {
          content = content.replace(/wx:/g, prefix[platform].wxml) // æ›¿æ¢ api å‰ç¼€
          file.extname = suffix[platform].wxml // ä¿®æ”¹åŽç¼€å
          if (platform === 'qq') {
            // wxs è½¬ä¸º qs
            content = content.replace(/<wxs/g, '<qs').replace(/<\/wxs/g, '</qs')
          } else if (platform === 'baidu') {
            content = content.replace(/s-if=['"]{{(\S+)}}['"]/g, 's-if="$1"') // s-if å’Œ s-for åŽä¸åŠ  {{}}
              .replace(/s-for=['"]{{(\S+)}}['"]/g, 's-for="$1"')
              .replace(/data="(.*?)"/g, 'data="{$1}"')
          } else if (platform === 'alipay') {
            content = content.replace('block-size', 'handle-size')
              .replace(/longpress/g, 'longTap')
              .replace(/bind([\S])/g, (_, $1) => { // bindevent è½¬ä¸º onEvent
                return 'on' + $1.toUpperCase()
              }).replace(/catch([\S])/g, (_, $1) => { // catchevent è½¬ä¸º catchEvent
                return 'catch' + $1.toUpperCase()
              })
          }
        } else if (file.extname === '.js') {
          // js æ–‡ä»¶å¤„理
          // æ›¿æ¢ api å‰ç¼€
          content = content.replace(/wx\./g, prefix[platform].js)
          // æ”¯ä»˜å®æ ¼å¼è½¬æ¢
          if (platform === 'alipay') {
            // å°† aa.triggerEvent('bb', cc) æ›¿æ¢ä¸º aa.props.onBb && aa.props.onBb(cc)
            content = content.replace(/([a-zA-Z0-9._]+).triggerEvent\(['"](\S+?)['"],*/g, function (_, $1, $2) {
              const method = `${$1}.props.on${$2[0].toUpperCase()}${$2.slice(1)}`
              return `${method}&&${method}(`
            })
            // è½¬æ¢ showToast
            let i = content.indexOf('.showToast')
            while (i !== -1) {
              i += 10
              const section = getSection(content, i)
              content = content.substr(0, i) + section.replace('title', 'content') + content.substr(i + section.length)
              i = content.indexOf('.showToast', i)
            }
            // è½¬æ¢ showActionSheet
            i = content.indexOf('.showActionSheet')
            while (i !== -1) {
              i += 16
              const section = getSection(content, i)
              content = content.substr(0, i) + section.replace('itemList', 'items') + content.substr(i + section.length)
              i = content.indexOf('.showActionSheet', i)
            }
            // è½¬æ¢ setClipboardData
            i = content.indexOf('.setClipboardData')
            while (i !== -1) {
              i += 17
              const section = getSection(content, i)
              content = content.substr(0, i - 4) + section.replace('data', 'text') + content.substr(i + section.length)
              i = content.indexOf('.setClipboardData', i)
            }
            // ç»„件格式转换
            if (content.includes('Component({')) {
              // æ›¿æ¢ç”Ÿå‘½å‘¨æœŸ
              content = content.replace('created:', 'didMount:')
                .replace('attached:', 'didMount:')
                .replace('detached:', 'didUnmount:')
              // å°† properties å­—段转为 props æ ¼å¼
              i = content.indexOf('{', content.indexOf('properties:'))
              let props
              let propsStr = '{'
              const objStr = getSection(content, i)
              // å–出整个 properties å­—段
              eval('props = ' + objStr) // eslint-disable-line
              for (const item in props) {
                if (!props[item]) continue
                propsStr += item + ':'
                if (props[item].value) {
                  // è®¾ç½®äº†é»˜è®¤å€¼
                  if (typeof props[item].value === 'boolean') {
                    propsStr += props[item].value ? '!0' : '!1'
                  } else {
                    propsStr += props[item].value
                  }
                } else {
                  // æ²¡æœ‰è®¾ç½®é»˜è®¤å€¼
                  const type = props[item].type || props[item]
                  if (type === String) {
                    propsStr += '""'
                  } else if (type === Boolean) {
                    propsStr += '!1'
                  } else if (type === Number) {
                    propsStr += '0'
                  } else if (type === Object) {
                    propsStr += '{}'
                  } else if (type === Array) {
                    propsStr += '[]'
                  }
                }
                propsStr += ','
              }
              content = content.substr(0, i) + propsStr.substring(0, propsStr.length - 1) + '}' + content.substr(i + objStr.length)
            }
            content = content.replace(/properties/g, 'props')
              .replace(/\.setNavigationBarTitle/g, '.setNavigationBar')
          } else {
            content = content.replace(/\.properties/g, '.data')
          }
        } else if (file.extname === '.wxss') {
          // wxss æ–‡ä»¶å¤„理
          file.extname = suffix[platform].wxss // ä¿®æ”¹åŽç¼€å
        }
      }
      file.contents = Buffer.from(content)
    }
    this.push(file)
    callback()
  })
}
node_modules/mp-html/tools/demo/miniprogram/app.js
New file
@@ -0,0 +1 @@
App({})
node_modules/mp-html/tools/demo/miniprogram/app.json
New file
@@ -0,0 +1,13 @@
{
  "pages":[
    "pages/index/index",
    "pages/jump/jump"
  ],
  "window":{
    "backgroundTextStyle":"light",
    "navigationBarBackgroundColor": "#fff",
    "navigationBarTitleText": "mp-html",
    "navigationBarTextStyle":"black"
  },
  "style": "v2"
}
node_modules/mp-html/tools/demo/miniprogram/pages/index/index.js
New file
@@ -0,0 +1,32 @@
const html = require('../../content')
Page({
  data: {
    html: '',
    tagStyle: {
      table: 'box-sizing: border-box; border-top: 1px solid #dfe2e5; border-left: 1px solid #dfe2e5;',
      th: 'border-right: 1px solid #dfe2e5; border-bottom: 1px solid #dfe2e5;',
      td: 'border-right: 1px solid #dfe2e5; border-bottom: 1px solid #dfe2e5;',
      li: 'margin: 5px 0;'
    }
  },
  onLoad () {
    // æ¨¡æ‹Ÿç½‘络请求
    setTimeout(() => {
      this.setData({
        html
      })
    }, 200)
  },
  load () {
    console.log('dom æ ‘加载完毕')
  },
  ready (e) {
    console.log('ready äº‹ä»¶è§¦å‘:', e)
  },
  imgtap (e) {
    console.log('imgtap äº‹ä»¶è§¦å‘:', e)
  },
  linktap (e) {
    console.log('linktap äº‹ä»¶è§¦å‘:', e)
  }
})
node_modules/mp-html/tools/demo/miniprogram/pages/index/index.json
New file
@@ -0,0 +1,5 @@
{
  "usingComponents": {
    "mp-html": "/components/mp-html/index"
  }
}
node_modules/mp-html/tools/demo/miniprogram/pages/index/index.wxml
New file
@@ -0,0 +1,3 @@
<mp-html container-style="padding:20px" content="{{html}}" domain="https://mp-html.oss-cn-hangzhou.aliyuncs.com" lazy-load scroll-table selectable use-anchor tag-style="{{tagStyle}}" bindload="load" bindready="ready" bindimgtap="imgtap" bindlinktap="linktap">
  åŠ è½½ä¸­...
</mp-html>
node_modules/mp-html/tools/demo/miniprogram/pages/jump/jump.js
New file
@@ -0,0 +1 @@
Page({})
node_modules/mp-html/tools/demo/miniprogram/pages/jump/jump.json
New file
@@ -0,0 +1 @@
{}
node_modules/mp-html/tools/demo/miniprogram/pages/jump/jump.wxml
New file
@@ -0,0 +1 @@
<view>跳转测试页面</view>
node_modules/mp-html/tools/demo/miniprogram/project.config.json
New file
@@ -0,0 +1,13 @@
{
    "description": "项目配置文件",
    "setting": {
        "urlCheck": true,
        "es6": true,
        "postcss": true,
        "minified": true,
        "newFeature": true
    },
    "compileType": "miniprogram",
    "appid": "touristappid",
    "projectname": "mp-html"
}
node_modules/mp-html/tools/demo/uni-app/App.vue
New file
@@ -0,0 +1,6 @@
<script>
export default {}
</script>
<style>
</style>
node_modules/mp-html/tools/demo/uni-app/README.md
New file
@@ -0,0 +1,194 @@
## ä¸ºå‡å°ç»„件包的大小,默认组件包中不包含编辑、latex å…¬å¼ç­‰æ‰©å±•功能,需要使用扩展功能的请参考下方的 æ’件扩展 æ çš„说明
## åŠŸèƒ½ä»‹ç»
- å…¨ç«¯æ”¯æŒï¼ˆå« `v3、NVUE`)
- æ”¯æŒä¸°å¯Œçš„æ ‡ç­¾ï¼ˆåŒ…括 `table`、`video`、`svg` ç­‰ï¼‰
- æ”¯æŒä¸°å¯Œçš„事件效果(自动预览图片、链接处理等)
- æ”¯æŒè®¾ç½®å ä½å›¾ï¼ˆåŠ è½½ä¸­ã€å‡ºé”™æ—¶ã€é¢„è§ˆæ—¶ï¼‰
- æ”¯æŒé”šç‚¹è·³è½¬ã€é•¿æŒ‰å¤åˆ¶ç­‰ä¸°å¯ŒåŠŸèƒ½
- æ”¯æŒå¤§éƒ¨åˆ† *html* å®žä½“
- ä¸°å¯Œçš„æ’件(关键词搜索、内容编辑、`latex` å…¬å¼ç­‰ï¼‰
- æ•ˆçŽ‡é«˜ã€å®¹é”™æ€§å¼ºä¸”è½»é‡åŒ–
查看 [功能介绍](https://jin-yufeng.github.io/mp-html/#/overview/feature) äº†è§£æ›´å¤š
## ä½¿ç”¨æ–¹æ³•
- `uni_modules` æ–¹å¼
  1. ç‚¹å‡»å³ä¸Šè§’çš„ `使用 HBuilder X å¯¼å…¥æ’ä»¶` æŒ‰é’®ç›´æŽ¥å¯¼å…¥é¡¹ç›®æˆ–点击 `下载插件 ZIP` æŒ‰é’®ä¸‹è½½æ’件包并解压到项目的 `uni_modules/mp-html` ç›®å½•下
  2. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ `(n)vue` æ–‡ä»¶ä¸­æ·»åŠ 
     ```html
     <!-- ä¸éœ€è¦å¼•入,可直接使用 -->
     <mp-html :content="html" />
     ```
     ```javascript
     export default {
       data() {
         return {
           html: '<div>Hello World!</div>'
         }
       }
     }
     ```
  3. éœ€è¦æ›´æ–°ç‰ˆæœ¬æ—¶åœ¨ `HBuilder X` ä¸­å³é”® `uni_modules/mp-html` ç›®å½•选择 `从插件市场更新` å³å¯
- æºç æ–¹å¼
  1. ä»Ž [github](https://github.com/jin-yufeng/mp-html/tree/master/dist/uni-app) æˆ– [gitee](https://gitee.com/jin-yufeng/mp-html/tree/master/dist/uni-app) ä¸‹è½½æºç 
     æ’件市场的 **非 uni_modules ç‰ˆæœ¬** æ— æ³•更新,不建议从插件市场获取
  2. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ `(n)vue` æ–‡ä»¶ä¸­æ·»åŠ 
     ```html
     <mp-html :content="html" />
     ```
     ```javascript
     import mpHtml from '@/components/mp-html/mp-html'
     export default {
       // HBuilderX 2.5.5+ å¯ä»¥é€šè¿‡ easycom è‡ªåЍ引入
       components: {
         mpHtml
       },
       data() {
         return {
           html: '<div>Hello World!</div>'
         }
       }
     }
     ```
- npm æ–¹å¼
  1. åœ¨é¡¹ç›®æ ¹ç›®å½•下执行
     ```bash
     npm install mp-html
     ```
  2. åœ¨éœ€è¦ä½¿ç”¨é¡µé¢çš„ `(n)vue` æ–‡ä»¶ä¸­æ·»åŠ 
     ```html
     <mp-html :content="html" />
     ```
     ```javascript
     import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html'
     export default {
       // ä¸å¯çœç•¥
       components: {
         mpHtml
       },
       data() {
         return {
           html: '<div>Hello World!</div>'
         }
       }
     }
     ```
  3. éœ€è¦æ›´æ–°ç‰ˆæœ¬æ—¶æ‰§è¡Œä»¥ä¸‹å‘½ä»¤å³å¯
     ```bash
     npm update mp-html
     ```
  ä½¿ç”¨ *cli* æ–¹å¼è¿è¡Œçš„项目,通过 *npm* æ–¹å¼å¼•入时,需要在 *vue.config.js* ä¸­é…ç½® *transpileDependencies*,详情可见 [#330](https://github.com/jin-yufeng/mp-html/issues/330#issuecomment-913617687)
  å¦‚果在 **nvue** ä¸­ä½¿ç”¨è¿˜è¦å°† `dist/uni-app/static` ç›®å½•下的内容拷贝到项目的 `static` ç›®å½•下,否则无法运行
查看 [快速开始](https://jin-yufeng.github.io/mp-html/#/overview/quickstart) äº†è§£æ›´å¤š
## ç»„件属性
| å±žæ€§ | ç±»åž‹ | é»˜è®¤å€¼ | è¯´æ˜Ž |
|:---:|:---:|:---:|---|
| container-style | String |  | å®¹å™¨çš„æ ·å¼ï¼ˆ[2.1.0+](https://jin-yufeng.github.io/mp-html/#/changelog/changelog#v210)) |
| content | String |  | ç”¨äºŽæ¸²æŸ“çš„ html å­—符串 |
| copy-link | Boolean | true | æ˜¯å¦å…è®¸å¤–部链接被点击时自动复制 |
| domain | String |  | ä¸»åŸŸåï¼ˆç”¨äºŽé“¾æŽ¥æ‹¼æŽ¥ï¼‰ |
| error-img | String |  | å›¾ç‰‡å‡ºé”™æ—¶çš„占位图链接 |
| lazy-load | Boolean | false | æ˜¯å¦å¼€å¯å›¾ç‰‡æ‡’加载 |
| loading-img | String |  | å›¾ç‰‡åŠ è½½è¿‡ç¨‹ä¸­çš„å ä½å›¾é“¾æŽ¥ |
| pause-video | Boolean | true | æ˜¯å¦åœ¨æ’­æ”¾ä¸€ä¸ªè§†é¢‘时自动暂停其他视频 |
| preview-img | Boolean | true | æ˜¯å¦å…è®¸å›¾ç‰‡è¢«ç‚¹å‡»æ—¶è‡ªåŠ¨é¢„è§ˆ |
| scroll-table | Boolean | false | æ˜¯å¦ç»™æ¯ä¸ªè¡¨æ ¼æ·»åŠ ä¸€ä¸ªæ»šåŠ¨å±‚ä½¿å…¶èƒ½å•ç‹¬æ¨ªå‘æ»šåŠ¨ |
| selectable | Boolean | false | æ˜¯å¦å¼€å¯æ–‡æœ¬é•¿æŒ‰å¤åˆ¶ |
| set-title | Boolean | true | æ˜¯å¦å°† title æ ‡ç­¾çš„内容设置到页面标题 |
| show-img-menu | Boolean | true | æ˜¯å¦å…è®¸å›¾ç‰‡è¢«é•¿æŒ‰æ—¶æ˜¾ç¤ºèœå• |
| tag-style | Object |  | è®¾ç½®æ ‡ç­¾çš„默认样式 |
| use-anchor | Boolean | false | æ˜¯å¦ä½¿ç”¨é”šç‚¹é“¾æŽ¥ |
查看 [属性](https://jin-yufeng.github.io/mp-html/#/basic/prop) äº†è§£æ›´å¤š
## ç»„件事件
| åç§° | è§¦å‘时机 |
|:---:|---|
| load | dom æ ‘加载完毕时 |
| ready | å›¾ç‰‡åŠ è½½å®Œæ¯•æ—¶ |
| error | å‘生渲染错误时 |
| imgtap | å›¾ç‰‡è¢«ç‚¹å‡»æ—¶ |
| linktap | é“¾æŽ¥è¢«ç‚¹å‡»æ—¶ |
| play | éŸ³è§†é¢‘播放时 |
查看 [事件](https://jin-yufeng.github.io/mp-html/#/basic/event) äº†è§£æ›´å¤š
## api
组件实例上提供了一些 `api` æ–¹æ³•可供调用
| åç§° | ä½œç”¨ |
|:---:|---|
| in | å°†é”šç‚¹è·³è½¬çš„范围限定在一个 scroll-view å†… |
| navigateTo | é”šç‚¹è·³è½¬ |
| getText | èŽ·å–æ–‡æœ¬å†…å®¹ |
| getRect | èŽ·å–å¯Œæ–‡æœ¬å†…å®¹çš„ä½ç½®å’Œå¤§å° |
| setContent | è®¾ç½®å¯Œæ–‡æœ¬å†…容 |
| imgList | èŽ·å–æ‰€æœ‰å›¾ç‰‡çš„æ•°ç»„ |
| pauseMedia | æš‚停播放音视频([2.2.2+](https://jin-yufeng.github.io/mp-html/#/changelog/changelog#v222)) |
| setPlaybackRate | è®¾ç½®éŸ³è§†é¢‘播放速率([2.4.0+](https://jin-yufeng.github.io/mp-html/#/changelog/changelog#v240)) |
查看 [api](https://jin-yufeng.github.io/mp-html/#/advanced/api) äº†è§£æ›´å¤š
## æ’件扩展
除基本功能外,本组件还提供了丰富的扩展,可按照需要选用
| åç§° | ä½œç”¨ |
|:---:|---|
| audio | éŸ³ä¹æ’­æ”¾å™¨ |
| editable | å¯Œæ–‡æœ¬ **编辑**([示例项目](https://mp-html.oss-cn-hangzhou.aliyuncs.com/editable.zip)) |
| emoji | è§£æž emoji |
| highlight | ä»£ç å—高亮显示 |
| markdown | æ¸²æŸ“ markdown |
| search | å…³é”®è¯æœç´¢ |
| style | åŒ¹é… style æ ‡ç­¾ä¸­çš„æ ·å¼ |
| txv-video | ä½¿ç”¨è…¾è®¯è§†é¢‘ |
| img-cache | å›¾ç‰‡ç¼“å­˜ by [@PentaTea](https://github.com/PentaTea) |
| latex | æ¸²æŸ“ latex å…¬å¼ by [@Zeng-J](https://github.com/Zeng-J) |
从插件市场导入的包中 **不含有** æ‰©å±•插件,使用插件需通过微信小程序 `富文本插件` èŽ·å–æˆ–å‚è€ƒä»¥ä¸‹æ–¹æ³•è¿›è¡Œæ‰“åŒ…ï¼š
1. èŽ·å–å®Œæ•´ç»„ä»¶åŒ…
   ```bash
   npm install mp-html
   ```
2. ç¼–辑 `tools/config.js` ä¸­çš„ `plugins` é¡¹ï¼Œé€‰æ‹©éœ€è¦çš„æ’ä»¶
3. ç”Ÿæˆæ–°çš„组件包
   åœ¨ `node_modules/mp-html` ç›®å½•下执行
   ```bash
   npm install
   npm run build:uni-app
   ```
4. æ‹·è´ `dist/uni-app` ä¸­çš„内容到项目根目录
查看 [插件](https://jin-yufeng.github.io/mp-html/#/advanced/plugin) äº†è§£æ›´å¤š
## å…³äºŽ nvue
`nvue` ä½¿ç”¨åŽŸç”Ÿæ¸²æŸ“ï¼Œä¸æ”¯æŒéƒ¨åˆ† `css` æ ·å¼ï¼Œä¸ºå®žçŽ°å’Œ `html` ç›¸åŒçš„æ•ˆæžœï¼Œç»„件内部通过 `web-view` è¿›è¡Œæ¸²æŸ“,性能上差于原生,根据 `weex` å®˜æ–¹å»ºè®®ï¼Œ`web` æ ‡ç­¾ä»…应用在非常规的降级场景。因此,如果通过原生的方式(如 `richtext`)能够满足需要,则不建议使用本组件,如果有较多的富文本内容,则可以直接使用 `vue` é¡µé¢
由于渲染方式与其他端不同,有以下限制:
1. ä¸æ”¯æŒ `lazy-load` å±žæ€§
2. è§†é¢‘不支持全屏播放
3. å¦‚果在 `flex-direction: row` çš„容器中使用,需要给组件设置宽度或设置 `flex: 1` å æ»¡å‰©ä½™å®½åº¦
纯 `nvue` æ¨¡å¼ä¸‹ï¼Œ[此问题](https://ask.dcloud.net.cn/question/119678) ä¿®å¤å‰ï¼Œä¸æ”¯æŒé€šè¿‡ `uni_modules` å¼•入,需要本地引入(将 [dist/uni-app](https://github.com/jin-yufeng/mp-html/tree/master/dist/uni-app) ä¸­çš„内容拷贝到项目根目录下)
## ç«‹å³ä½“验
![富文本插件](https://mp-html.oss-cn-hangzhou.aliyuncs.com/qrcode.jpg)
## é—®é¢˜åé¦ˆ
遇到问题时,请先查阅 [常见问题](https://jin-yufeng.github.io/mp-html/#/question/faq) å’Œ [issue](https://github.com/jin-yufeng/mp-html/issues) ä¸­æ˜¯å¦å·²æœ‰ç›¸åŒçš„问题
可通过 [issue](https://github.com/jin-yufeng/mp-html/issues/new/choose) ã€æ’件问答或发送邮件到 [mp_html@126.com](mailto:mp_html@126.com) æé—®ï¼Œä¸å»ºè®®åœ¨è¯„论区提问(不方便回复)
提问请严格按照 [issue æ¨¡æ¿](https://github.com/jin-yufeng/mp-html/issues/new/choose) ï¼Œæè¿°æ¸…楚使用环境、`html` å†…容或可复现的 `demo` é¡¹ç›®ä»¥åŠå¤çŽ°æ–¹å¼ï¼Œå¯¹äºŽ **描述不清**、**无法复现** æˆ–重复的问题将不予回复
欢迎加入 `QQ` äº¤æµç¾¤ï¼š
群1(已满):`699734691`
群2(已满):`778239129`
群3:`960265313`
查看 [问题反馈](https://jin-yufeng.github.io/mp-html/#/question/feedback) äº†è§£æ›´å¤š
node_modules/mp-html/tools/demo/uni-app/index.html
New file
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
    <title></title>
    <!--preload-links-->
    <!--app-context-->
  </head>
  <body>
    <div id="app"><!--app-html--></div>
    <script type="module" src="/main.js"></script>
  </body>
</html>
node_modules/mp-html/tools/demo/uni-app/main.js
New file
@@ -0,0 +1,21 @@
import App from './App'
// #ifndef VUE3
import Vue from 'vue' // eslint-disable-line
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue' // eslint-disable-line
export function createApp () {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif
node_modules/mp-html/tools/demo/uni-app/manifest.json
New file
@@ -0,0 +1,45 @@
{
    "name" : "mp-html",
    "appid" : "",
    "description" : "",
    "versionName" : "1.0.0",
    "versionCode" : "100",
    "transformPx" : false,
    "app-plus" : {
        "usingComponents" : true,
        "nvueCompiler" : "uni-app",
        "compilerVersion" : 3,
        "splashscreen" : {
            "alwaysShowBeforeRender" : true,
            "waiting" : true,
            "autoclose" : true,
            "delay" : 0
        },
        "modules" : {},
        "distribute" : {
            "android" : {},
            "ios" : {},
            "sdkConfigs" : {}
        }
    },
    "quickapp" : {},
    "mp-weixin" : {
        "appid" : "",
        "setting" : {
            "urlCheck" : false
        },
        "usingComponents" : true
    },
    "mp-alipay" : {
        "usingComponents" : true
    },
    "mp-baidu" : {
        "usingComponents" : true
    },
    "mp-toutiao" : {
        "usingComponents" : true
    },
    "uniStatistics": {
        "enable": false
    }
}
node_modules/mp-html/tools/demo/uni-app/pages.json
New file
@@ -0,0 +1,16 @@
{
    "pages": [
        {
            "path": "pages/index/index"
        },
        {
            "path": "pages/jump/jump"
        }
    ],
    "globalStyle": {
        "navigationBarTextStyle": "black",
        "navigationBarTitleText": "mp-html",
        "navigationBarBackgroundColor": "#F8F8F8",
        "backgroundColor": "#F8F8F8"
    }
}
node_modules/mp-html/tools/demo/uni-app/pages/index/index.vue
New file
@@ -0,0 +1,52 @@
<template>
  <view>
    <mp-html container-style="padding:20px" :content="html" domain="https://mp-html.oss-cn-hangzhou.aliyuncs.com" lazy-load scroll-table selectable use-anchor :tag-style="tagStyle" @load="load" @ready="ready" @imgtap="imgtap" @linktap="linktap" />
  </view>
</template>
<script>
// éœ€è¦æµ‹è¯• nvue æ—¶ï¼Œå°†æœ¬æ–‡ä»¶åŽç¼€æ”¹ä¸º .nvue å³å¯
// æ³¨æ„ï¼šæ­¤ç¤ºä¾‹ä¸åŒ…含编辑功能
import mpHtml from '@/components/mp-html/mp-html'
import html from '../../content'
export default {
  // HBuilderX 2.5.5+ å¯ä»¥é€šè¿‡ easycom è‡ªåЍ引入
  components: {
    mpHtml
  },
  data () {
    return {
      html: '',
      tagStyle: {
        table: 'box-sizing: border-box; border-top: 1px solid #dfe2e5; border-left: 1px solid #dfe2e5;',
        th: 'border-right: 1px solid #dfe2e5; border-bottom: 1px solid #dfe2e5;',
        td: 'border-right: 1px solid #dfe2e5; border-bottom: 1px solid #dfe2e5;',
        li: 'margin: 5px 0;'
      }
    }
  },
  onLoad () {
    // æ¨¡æ‹Ÿç½‘络请求
    setTimeout(() => {
      this.html = html
    }, 200)
  },
  methods: {
    load () {
      console.log('dom æ ‘加载完毕')
    },
    ready (e) {
      console.log('ready äº‹ä»¶è§¦å‘:', e)
    },
    imgtap (e) {
      console.log('imgtap äº‹ä»¶è§¦å‘:', e)
    },
    linktap (e) {
      console.log('linktap äº‹ä»¶è§¦å‘:', e)
    }
  }
}
</script>
<style>
</style>
node_modules/mp-html/tools/demo/uni-app/pages/jump/jump.vue
New file
@@ -0,0 +1,12 @@
<template>
  <view>
    è·³è½¬æµ‹è¯•页面
  </view>
</template>
<script>
export default {}
</script>
<style>
</style>
node_modules/mp-html/tools/ifdef.js
New file
@@ -0,0 +1,115 @@
/**
 * @fileoverview æ¡ä»¶ç¼–译
 */
const through2 = require('through2')
/**
 * @description æ¡ä»¶ç¼–译
 * @param {string} platform å¹³å°
 */
module.exports = function (platform) {
  return through2.obj(function (file, _, callback) {
    if (file.isBuffer()) {
      // æ–‡ä»¶å¤¹çº§åˆ«çš„处理
      if (file.relative.includes('miniprogram')) {
        if (platform !== 'uni-app') {
          // åŽ»æŽ‰è¿™ä¸€å±‚
          file.path = file.path.replace(/(.*)[/\\]miniprogram/, '$1')
        } else {
          // ä¸ç”¨äºŽæœ¬å¹³å°çš„æ–‡ä»¶
          callback()
          return
        }
      } else if (file.relative.includes('uni-app')) {
        if (platform === 'uni-app') {
          file.path = file.path.replace(/(.*)[/\\]uni-app/, '$1')
        } else {
          callback()
          return
        }
      }
      if (platform === 'uni-app') {
        // uni-app å¹³å° vue3 è¦æ±‚使用 es6 æ¨¡å—
        let content = file.contents.toString()
        if (file.basename === 'prism.min.js') {
          content = content.replace('"undefined"!=typeof module&&module.exports&&(module.exports=Prism),', 'export default Prism;')
        } else if (file.extname === '.js' && !file.relative.includes('static')) {
          content = content.replace(/module.exports\s*=\s*/, 'export default ')
            .replace(/const\s+([^\s=]+)\s*=\s*require\(([^)]+)\)/g, 'import $1 from $2')
        }
        file.contents = Buffer.from(content)
      } else {
        // å°ç¨‹åºå¹³å°è¿›è¡Œè¿›ä¸€æ­¥å¤„理
        let content = file.contents.toString()
        /**
         * æ–¹å¼1:
         * åœ¨æ³¨é‡Š #if(n)def xxx å’Œ #endif ä¹‹é—´çš„内容会根据是否定义 xxx å†³å®šæ˜¯å¦ä¿ç•™
         */
        const commentReg = /\/\*[\s\S]*?\*\/|\/\/[^\n]*|<!--[\s\S]*?-->/g // æå–所有注释
        const copy = content // æ‹·è´ä¸€ä¸ªå‰¯æœ¬ç”¨äºŽæœç´¢
        let match = commentReg.exec(copy)
        const stack = []
        while (match) {
          if (match[0].includes('#if')) {
            stack.push([match[0], match.index])
          } else if (match[0].includes('#endif')) {
            const item = stack.pop()
            if (!item) {
              throw Error('条件编译错误:存在多余的 #endif,path:' + file.path + ',content: ' + content.substr(match.index, 100))
            }
            const def = item[0].match(/MP-[A-Z]+/gi) || [] // å–出定义条件
            let hit = false
            for (let i = 0; i < def.length; i++) {
              if (def[i] && platform === def[i].toLowerCase()) {
                hit = true // å‘½ä¸­
                break
              }
            }
            // ä¸åŒ¹é…
            if ((item[0].includes('#ifdef') && !hit) || (item[0].includes('#ifndef') && hit)) {
              let fill = ''
              // ç”¨ç©ºæ ¼å¡«å……
              for (let j = item[1] + item[0].length; j < match.index; j++) {
                if (content[j] === '\n') {
                  fill += '\n'
                } else {
                  fill += ' '
                }
              }
              content = content.substr(0, item[1] + item[0].length) + fill + content.substr(match.index)
            }
          }
          match = commentReg.exec(copy)
        }
        if (stack.length) {
          throw Error('条件编译错误:存在未闭合的 #ifdef,path:' + file.path + ',content: ' + content.substr(stack[0][1], 100))
        }
        /**
         * æ–¹å¼2:
         * wxml ä¸­å±žæ€§å‰åŠ å¹³å°åå°†ä»…ç¼–è¯‘åˆ°è¯¥å¹³å°ï¼Œå¦‚ mp-weixin:attr
         */
        if (file.extname === '.wxml') {
          content = content.replace(/([^:\s]+:[^=\s]+)\s*=\s*"(.*?)"/g, ($, $1, $2) => {
            const platforms = $1.split(':')
            let name = platforms.pop()
            const last = platforms[platforms.length - 1]
            if (last && !last.includes('mp')) {
              name = platforms.pop() + ':' + name
            }
            if (!platforms.length) return $
            let i
            for (i = platforms.length; i--;) {
              if (platform === platforms[i].toLowerCase()) break
            }
            if (i >= 0) return `${name}="${$2}"`
            return ''
          })
        }
        file.contents = Buffer.from(content)
      }
    }
    this.push(file)
    callback()
  })
}
node_modules/mp-html/tools/minifier.js
New file
@@ -0,0 +1,40 @@
const uglify = require('uglify-js')
const through2 = require('through2')
/**
 * @description åŽ‹ç¼©å†…è” wxs è„šæœ¬
 */
function wxs () {
  return through2.obj(function (file, _, callback) {
    if (file.isBuffer()) {
      file.contents = Buffer.from(file.contents.toString().replace(/<wxs(.*?)>([\s\S]+?)<\/wxs>/, (_, $1, $2) => {
        return `<wxs${$1}>${uglify.minify($2, {
          fromString: true,
          mangle: {
            toplevel: true
          }
        }).code}</wxs>`
      }))
    }
    this.push(file)
    callback()
  })
}
/**
 * @description åŽ‹ç¼© json æ–‡ä»¶
 */
function json () {
  return through2.obj(function (file, _, callback) {
    if (file.isBuffer()) {
      file.contents = Buffer.from(JSON.stringify(JSON.parse(file.contents.toString())))
    }
    this.push(file)
    callback()
  })
}
module.exports = {
  wxs,
  json
}
node_modules/mp-html/tools/plugin.js
New file
@@ -0,0 +1,248 @@
/**
 * @fileoverview å¤„理插件
 */
const path = require('path')
const through2 = require('through2')
const config = require('./config')
config.plugins.sort((a, b) => {
  // editable ç½®äºŽæœ€åŽé¢
  if (a === 'editable') return 1
  if (b === 'editable') return -1
  // markdown ç½®äºŽæœ€å‰é¢
  if (a === 'markdown') return -1
  if (b === 'markdown') return 1
  // å‰©ä½™ä»»æ„é¡ºåº
  return 0
})
// æå–和替换标签名选择器(组件中仅支持 class é€‰æ‹©å™¨ï¼‰
const tagSelector = {}
let tagI = 0
if (config.externStyle) {
  config.externStyle = config.externStyle.replace(/[^,\s}]+(?=[^}]*{)/g, $ => {
    if (!/[a-zA-Z_]/.test($[0])) return $
    if (tagSelector[$]) return '.' + tagSelector[$]
    tagSelector[$] = '_' + tagI++
    return '.' + tagSelector[$]
  })
}
module.exports = {
  /**
   * @description æž„建插件
   * @param {string} platform ä½¿ç”¨å¹³å°
   */
  build (platform) {
    const builds = {} // æž„建模块
    let pluginImports = '' // æ’件引入
    let plugins = '' // æ’件列表
    let voidTags = '' // å¢žåŠ çš„è‡ªé—­åˆæ ‡ç­¾
    let wxml = '' // è¦å¼•入到 node.wxml ä¸­çš„内容
    let js = '' // è¦å¼•入到 node.js ä¸­çš„内容
    let wxss = config.externStyle // è¦å¼•入到 node.wxss ä¸­çš„内容
    const json = {} // è¦å¼•入到 node.json ä¸­çš„内容
    // æ”¶é›†æ’件中要写入模板文件的内容
    for (let i = 0; i < config.plugins.length; i++) {
      const plugin = config.plugins[i]
      let build = {}
      try {
        // ä¸“用 build
        if (platform === 'uni-app') {
          build = require(`../plugins/${plugin}/uni-app/build.js`)
        } else {
          build = require(`../plugins/${plugin}/miniprogram/build.js`)
        }
      } catch (e) { }
      try {
        // é€šç”¨ build
        build = Object.assign(require(`../plugins/${plugin}/build.js`), build)
      } catch (e) { }
      // å¯ä»¥åœ¨å½“前平台使用
      if (!build.platform || build.platform.includes(platform)) {
        builds[plugin] = build
        if (platform === 'uni-app') {
          plugins += plugin.replace(/-([a-z])/g, ($, $1) => $1.toUpperCase()) + ','
          pluginImports += `import ${plugin.replace(/-([a-z])/g, ($, $1) => $1.toUpperCase())} from './${plugin}/${build.main ? build.main : 'index.js'}'\n`
        } else {
          plugins += `require('./${plugin}/${build.main ? build.main : 'index.js'}'),`
        }
        if (build.template) {
          wxml += build.template.replace('wx:if', 'wx:elif').replace('v-if', 'v-else-if')
        }
        if (build.methods) {
          for (const method in build.methods) {
            js += build.methods[method].toString() + ','
          }
        }
        if (build.usingComponents) {
          Object.assign(json, build.usingComponents)
        }
        if (build.style) {
          wxss += build.style
        }
      }
    }
    // åŠ å…¥å…¶ä»–è‡ªå®šä¹‰æ ‡ç­¾
    for (const item of config.customElements) {
      if (platform === 'uni-app') {
        if (item.platforms) {
          wxml += '<!-- #ifdef ' + item.platforms.join(' || ').toUpperCase() + ' -->'
        }
        voidTags += item.name + ','
        wxml += '<' + item.name + ' v-else-if="n.name==\'' + item.name + '\'" :class="n.attrs.class" :style="n.attrs.style"'
        if (item.attrs) {
          for (const attr of item.attrs) {
            wxml += ' :' + attr + '="n.attrs'
            if (attr.includes('-')) {
              wxml += '[\'' + attr + '\']"'
            } else {
              wxml += '.' + attr + '"'
            }
          }
        }
        wxml += ' />'
        if (item.platforms) {
          wxml += '<!-- #endif -->'
        }
      } else if (!item.platforms || item.platforms.join(',').toLowerCase().includes(platform)) {
        voidTags += item.name + ','
        wxml += '<' + item.name + ' wx:elif="{{n.name==\'' + item.name + '\'}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}"'
        if (item.attrs) {
          for (const attr of item.attrs) {
            wxml += ' ' + attr + '="{{n.attrs'
            if (attr.includes('-')) {
              wxml += '[\'' + attr + '\']}}"'
            } else {
              wxml += '.' + attr + '}}"'
            }
          }
        }
        wxml += ' />'
      }
    }
    return through2.obj(function (file, _, callback) {
      if (file.isBuffer()) {
        // src ç›®å½•
        if (file.base.includes('src')) {
          let content = file.contents.toString()
          if (file.basename === 'index.js' || file.basename === 'mp-html.vue') {
            // æ³¨å†Œæ’件列表
            if (platform === 'uni-app') {
              content = content.replace(/const\s*plugins\s*=\s*\[\]/, `${pluginImports}const plugins=[${plugins}]`)
            } else {
              content = content.replace(/plugins\s*=\s*\[\]/, `plugins=[${plugins}]`)
            }
          } else if (file.basename === 'parser.js') {
            // è®¾ç½®æ ‡ç­¾åé€‰æ‹©å™¨
            content = content.replace(/tagSelector\s*=\s*{}/, `tagSelector=${JSON.stringify(tagSelector)}`)
            // è®¾ç½®è‡ªé—­åˆæ ‡ç­¾
              .replace(/voidTags\s*:\s*makeMap\('/, 'voidTags: makeMap(\'' + voidTags)
          } else if (file.basename === 'node.wxml') {
            // å¼•入模板
            content = content.replace(/<!--\s*insert\s*-->/, wxml)
          } else if (file.basename === 'node.js') {
            // å¼•入方法
            content = content.replace(/methods\s*:\s*{/, 'methods:{' + js)
          } else if (file.basename === 'node.wxss') {
            // å¼•入样式
            content = wxss + content
          } else if (file.basename === 'node.json') {
            // å¼•入组件声明
            const comps = JSON.stringify(json).slice(1, -1)
            if (comps) {
              content = content.replace(/"usingComponents"\s*:\s*{/, '"usingComponents":{' + comps + ',')
            }
          } else if (file.basename === 'node.vue') {
            // å¼•å…¥ vue
            content = content.replace(/<!--\s*insert\s*-->/, wxml)
              .replace(/methods\s*:\s*{/, 'methods:{' + js)
              .replace('<style>', '<style>' + wxss.replace(/\.[a-zA-Z_][^)}]*?[{,]/g, '/deep/ $&')).replace(/,url/g, ', url')
            let importComp = ''
            let comps = ''
            for (let item in json) {
              const val = json[item]
              // æ’件无法通过这种方式引入
              if (val.includes('plugin://')) continue
              item = item.replace(/-([a-z])/g, (_, $1) => $1.toUpperCase())
              importComp += 'import ' + item + " from '" + val + "'\n"
              comps += item + ',\n'
            }
            content = content.replace('<script>', '<script>\n' + importComp)
              .replace(/components\s*:\s*{/, 'components: {\n' + comps)
          } else if (file.basename === 'local.html' && wxss) {
            // å¼•入样式
            content = '<style>' + wxss + '</style>' + content
          }
          file.contents = Buffer.from(content)
          for (const item in builds) {
            if (builds[item].handler) {
              builds[item].handler(file, platform)
            }
          }
        } else {
          // plugins ç›®å½•
          const name = file.relative.split(path.sep)[0]
          const build = builds[name]
          // æœ¬å¹³å°ä¸æ”¯æŒä½¿ç”¨
          if (!build || file.extname === '.md' || file.basename === 'build.js') {
            callback()
            return
          }
          // import
          if (build.import) {
            if (typeof build.import === 'string') {
              if (file.relative.includes(build.import)) {
                file.import = true
              }
            } else {
              for (let i = 0; i < build.import.length; i++) {
                if (file.relative.includes(build.import[i])) {
                  file.import = true
                  break
                }
              }
            }
          }
          if (build.handler) {
            build.handler(file, platform)
          }
        }
      }
      this.push(file)
      callback()
    })
  },
  /**
   * @description å¼•入样式文件到 node.wxss ä¸­
   */
  importCss () {
    let css = ''
    return through2.obj(function (file, _, callback) {
      if (file.isBuffer()) {
        let content = file.contents.toString()
        // è¦è¢«å¼•入的文件
        if (file.import) {
          css += content
          callback()
          return
        }
        // å¼•入到对应位置
        if (file.basename === 'node.wxss') {
          content = css + content
        } else if (file.basename === 'node.vue') {
          content = content.replace('<style>', '<style>' + css.replace(/\.[a-z_][^)}]+?[{,]/g, '/deep/ $&')).replace(/,url/g, ', url')
        } else if (file.basename === 'local.html' && css) {
          content = '<style>' + css + '</style>' + content
        }
        file.contents = Buffer.from(content)
      }
      this.push(file)
      callback()
    })
  }
}
Diff truncated after the above file
node_modules/nanoid/LICENSE (deleted) node_modules/nanoid/README.md (deleted) node_modules/nanoid/async/index.browser.cjs (deleted) node_modules/nanoid/async/index.browser.js (deleted) node_modules/nanoid/async/index.cjs (deleted) node_modules/nanoid/async/index.d.ts (deleted) node_modules/nanoid/async/index.js (deleted) node_modules/nanoid/async/index.native.js (deleted) node_modules/nanoid/async/package.json (deleted) node_modules/nanoid/bin/nanoid.cjs (deleted) node_modules/nanoid/index.browser.cjs (deleted) node_modules/nanoid/index.browser.js (deleted) node_modules/nanoid/index.cjs (deleted) node_modules/nanoid/index.d.cts (deleted) node_modules/nanoid/index.d.ts (deleted) node_modules/nanoid/index.js (deleted) node_modules/nanoid/nanoid.js (deleted) node_modules/nanoid/non-secure/index.cjs (deleted) node_modules/nanoid/non-secure/index.d.ts (deleted) node_modules/nanoid/non-secure/index.js (deleted) node_modules/nanoid/non-secure/package.json (deleted) node_modules/nanoid/package.json (deleted) node_modules/nanoid/url-alphabet/index.cjs (deleted) node_modules/nanoid/url-alphabet/index.js (deleted) node_modules/nanoid/url-alphabet/package.json (deleted) node_modules/p-limit/index.d.ts (deleted) node_modules/p-limit/index.js (deleted) node_modules/p-limit/license (deleted) node_modules/p-limit/package.json (deleted) node_modules/p-limit/readme.md (deleted) node_modules/p-locate/index.d.ts (deleted) node_modules/p-locate/index.js (deleted) node_modules/p-locate/license (deleted) node_modules/p-locate/package.json (deleted) node_modules/p-locate/readme.md (deleted) node_modules/p-try/index.d.ts (deleted) node_modules/p-try/index.js (deleted) node_modules/p-try/license (deleted) node_modules/p-try/package.json (deleted) node_modules/p-try/readme.md (deleted) node_modules/path-exists/index.d.ts (deleted) node_modules/path-exists/index.js (deleted) node_modules/path-exists/license (deleted) node_modules/path-exists/package.json (deleted) node_modules/path-exists/readme.md (deleted) node_modules/pngjs/.eslintignore (deleted) node_modules/pngjs/.eslintrc.json (deleted) node_modules/pngjs/.prettierignore (deleted) node_modules/pngjs/LICENSE (deleted) node_modules/pngjs/README.md (deleted) node_modules/pngjs/browser.js (deleted) node_modules/pngjs/coverage/lcov-report/base.css (deleted) node_modules/pngjs/coverage/lcov-report/bitmapper.js.html (deleted) node_modules/pngjs/coverage/lcov-report/bitpacker.js.html (deleted) node_modules/pngjs/coverage/lcov-report/block-navigation.js (deleted) node_modules/pngjs/coverage/lcov-report/chunkstream.js.html (deleted) node_modules/pngjs/coverage/lcov-report/constants.js.html (deleted) node_modules/pngjs/coverage/lcov-report/crc.js.html (deleted) node_modules/pngjs/coverage/lcov-report/favicon.png (deleted) node_modules/pngjs/coverage/lcov-report/filter-pack.js.html (deleted) node_modules/pngjs/coverage/lcov-report/filter-parse-async.js.html (deleted) node_modules/pngjs/coverage/lcov-report/filter-parse-sync.js.html (deleted) node_modules/pngjs/coverage/lcov-report/filter-parse.js.html (deleted) node_modules/pngjs/coverage/lcov-report/format-normaliser.js.html (deleted) node_modules/pngjs/coverage/lcov-report/index.html (deleted) node_modules/pngjs/coverage/lcov-report/interlace.js.html (deleted) node_modules/pngjs/coverage/lcov-report/packer-async.js.html (deleted) node_modules/pngjs/coverage/lcov-report/packer-sync.js.html (deleted) node_modules/pngjs/coverage/lcov-report/packer.js.html (deleted) node_modules/pngjs/coverage/lcov-report/paeth-predictor.js.html (deleted) node_modules/pngjs/coverage/lcov-report/parser-async.js.html (deleted) node_modules/pngjs/coverage/lcov-report/parser-sync.js.html (deleted) node_modules/pngjs/coverage/lcov-report/parser.js.html (deleted) node_modules/pngjs/coverage/lcov-report/png-sync.js.html (deleted) node_modules/pngjs/coverage/lcov-report/png.js.html (deleted) node_modules/pngjs/coverage/lcov-report/prettify.css (deleted) node_modules/pngjs/coverage/lcov-report/prettify.js (deleted) node_modules/pngjs/coverage/lcov-report/sort-arrow-sprite.png (deleted) node_modules/pngjs/coverage/lcov-report/sorter.js (deleted) node_modules/pngjs/coverage/lcov-report/sync-inflate.js.html (deleted) node_modules/pngjs/coverage/lcov-report/sync-reader.js.html (deleted) node_modules/pngjs/coverage/lcov.info (deleted) node_modules/pngjs/lib/bitmapper.js (deleted) node_modules/pngjs/lib/bitpacker.js (deleted) node_modules/pngjs/lib/chunkstream.js (deleted) node_modules/pngjs/lib/constants.js (deleted) node_modules/pngjs/lib/crc.js (deleted) node_modules/pngjs/lib/filter-pack.js (deleted) node_modules/pngjs/lib/filter-parse-async.js (deleted) node_modules/pngjs/lib/filter-parse-sync.js (deleted) node_modules/pngjs/lib/filter-parse.js (deleted) node_modules/pngjs/lib/format-normaliser.js (deleted) node_modules/pngjs/lib/interlace.js (deleted) node_modules/pngjs/lib/packer-async.js (deleted) node_modules/pngjs/lib/packer-sync.js (deleted) node_modules/pngjs/lib/packer.js (deleted) node_modules/pngjs/lib/paeth-predictor.js (deleted) node_modules/pngjs/lib/parser-async.js (deleted) node_modules/pngjs/lib/parser-sync.js (deleted) node_modules/pngjs/lib/parser.js (deleted) node_modules/pngjs/lib/png-sync.js (deleted) node_modules/pngjs/lib/png.js (deleted) node_modules/pngjs/lib/sync-inflate.js (deleted) node_modules/pngjs/lib/sync-reader.js (deleted) node_modules/pngjs/package.json (deleted) node_modules/postcss/LICENSE (deleted) node_modules/postcss/README.md (deleted) node_modules/postcss/lib/at-rule.d.ts (deleted) node_modules/postcss/lib/at-rule.js (deleted) node_modules/postcss/lib/comment.d.ts (deleted) node_modules/postcss/lib/comment.js (deleted) node_modules/postcss/lib/container.d.ts (deleted) node_modules/postcss/lib/container.js (deleted) node_modules/postcss/lib/css-syntax-error.d.ts (deleted) node_modules/postcss/lib/css-syntax-error.js (deleted) node_modules/postcss/lib/declaration.d.ts (deleted) node_modules/postcss/lib/declaration.js (deleted) node_modules/postcss/lib/document.d.ts (deleted) node_modules/postcss/lib/document.js (deleted) node_modules/postcss/lib/fromJSON.d.ts (deleted) node_modules/postcss/lib/fromJSON.js (deleted) node_modules/postcss/lib/input.d.ts (deleted) node_modules/postcss/lib/input.js (deleted) node_modules/postcss/lib/lazy-result.d.ts (deleted) node_modules/postcss/lib/lazy-result.js (deleted) node_modules/postcss/lib/list.d.ts (deleted) node_modules/postcss/lib/list.js (deleted) node_modules/postcss/lib/map-generator.js (deleted) node_modules/postcss/lib/no-work-result.d.ts (deleted) node_modules/postcss/lib/no-work-result.js (deleted) node_modules/postcss/lib/node.d.ts (deleted) node_modules/postcss/lib/node.js (deleted) node_modules/postcss/lib/parse.d.ts (deleted) node_modules/postcss/lib/parse.js (deleted) node_modules/postcss/lib/parser.js (deleted) node_modules/postcss/lib/postcss.d.mts (deleted) node_modules/postcss/lib/postcss.d.ts (deleted) node_modules/postcss/lib/postcss.js (deleted) node_modules/postcss/lib/postcss.mjs (deleted) node_modules/postcss/lib/previous-map.d.ts (deleted) node_modules/postcss/lib/previous-map.js (deleted) node_modules/postcss/lib/processor.d.ts (deleted) node_modules/postcss/lib/processor.js (deleted) node_modules/postcss/lib/result.d.ts (deleted) node_modules/postcss/lib/result.js (deleted) node_modules/postcss/lib/root.d.ts (deleted) node_modules/postcss/lib/root.js (deleted) node_modules/postcss/lib/rule.d.ts (deleted) node_modules/postcss/lib/rule.js (deleted) node_modules/postcss/lib/stringifier.d.ts (deleted) node_modules/postcss/lib/stringifier.js (deleted) node_modules/postcss/lib/stringify.d.ts (deleted) node_modules/postcss/lib/stringify.js (deleted) node_modules/postcss/lib/symbols.js (deleted) node_modules/postcss/lib/terminal-highlight.js (deleted) node_modules/postcss/lib/tokenize.js (deleted) node_modules/postcss/lib/warn-once.js (deleted) node_modules/postcss/lib/warning.d.ts (deleted) node_modules/postcss/lib/warning.js (deleted) node_modules/postcss/package.json (deleted) node_modules/qrcode.vue/CHANGELOG.md (deleted) node_modules/qrcode.vue/LICENSE (deleted) node_modules/qrcode.vue/README-ja.md (deleted) node_modules/qrcode.vue/README-zh_cn.md (deleted) node_modules/qrcode.vue/README.md (deleted) node_modules/qrcode.vue/dist/index.d.ts (deleted) node_modules/qrcode.vue/dist/qrcode.vue.browser.js (deleted) node_modules/qrcode.vue/dist/qrcode.vue.browser.min.js (deleted) node_modules/qrcode.vue/dist/qrcode.vue.cjs.js (deleted) node_modules/qrcode.vue/dist/qrcode.vue.esm.js (deleted) node_modules/qrcode.vue/dist/qrcodegen.d.ts (deleted) node_modules/qrcode.vue/package.json (deleted) node_modules/qrcode/README.md (deleted) node_modules/qrcode/bin/qrcode (deleted) node_modules/qrcode/helper/to-sjis-browser.js (deleted) node_modules/qrcode/helper/to-sjis.js (deleted) node_modules/qrcode/lib/browser.js (deleted) node_modules/qrcode/lib/can-promise.js (deleted) node_modules/qrcode/lib/core/alignment-pattern.js (deleted) node_modules/qrcode/lib/core/alphanumeric-data.js (deleted) node_modules/qrcode/lib/core/bit-buffer.js (deleted) node_modules/qrcode/lib/core/bit-matrix.js (deleted) node_modules/qrcode/lib/core/byte-data.js (deleted) node_modules/qrcode/lib/core/error-correction-code.js (deleted) node_modules/qrcode/lib/core/error-correction-level.js (deleted) node_modules/qrcode/lib/core/finder-pattern.js (deleted) node_modules/qrcode/lib/core/format-info.js (deleted) node_modules/qrcode/lib/core/galois-field.js (deleted) node_modules/qrcode/lib/core/kanji-data.js (deleted) node_modules/qrcode/lib/core/mask-pattern.js (deleted) node_modules/qrcode/lib/core/mode.js (deleted) node_modules/qrcode/lib/core/numeric-data.js (deleted) node_modules/qrcode/lib/core/polynomial.js (deleted) node_modules/qrcode/lib/core/qrcode.js (deleted) node_modules/qrcode/lib/core/reed-solomon-encoder.js (deleted) node_modules/qrcode/lib/core/regex.js (deleted) node_modules/qrcode/lib/core/segments.js (deleted) node_modules/qrcode/lib/core/utils.js (deleted) node_modules/qrcode/lib/core/version-check.js (deleted) node_modules/qrcode/lib/core/version.js (deleted) node_modules/qrcode/lib/index.js (deleted) node_modules/qrcode/lib/renderer/canvas.js (deleted) node_modules/qrcode/lib/renderer/png.js (deleted) node_modules/qrcode/lib/renderer/svg-tag.js (deleted) node_modules/qrcode/lib/renderer/svg.js (deleted) node_modules/qrcode/lib/renderer/terminal.js (deleted) node_modules/qrcode/lib/renderer/terminal/terminal-small.js (deleted) node_modules/qrcode/lib/renderer/terminal/terminal.js (deleted) node_modules/qrcode/lib/renderer/utf8.js (deleted) node_modules/qrcode/lib/renderer/utils.js (deleted) node_modules/qrcode/lib/server.js (deleted) node_modules/qrcode/license (deleted) node_modules/qrcode/package.json (deleted) node_modules/require-directory/.jshintrc (deleted) node_modules/require-directory/.npmignore (deleted) node_modules/require-directory/.travis.yml (deleted) node_modules/require-directory/LICENSE (deleted) node_modules/require-directory/README.markdown (deleted) node_modules/require-directory/index.js (deleted) node_modules/require-directory/package.json (deleted) node_modules/require-main-filename/CHANGELOG.md (deleted) node_modules/require-main-filename/LICENSE.txt (deleted) node_modules/require-main-filename/README.md (deleted) node_modules/require-main-filename/index.js (deleted) node_modules/require-main-filename/package.json (deleted) node_modules/set-blocking/CHANGELOG.md (deleted) node_modules/set-blocking/LICENSE.txt (deleted) node_modules/set-blocking/README.md (deleted) node_modules/set-blocking/index.js (deleted) node_modules/set-blocking/package.json (deleted) node_modules/string-width/index.d.ts (deleted) node_modules/string-width/index.js (deleted) node_modules/string-width/license (deleted) node_modules/string-width/package.json (deleted) node_modules/string-width/readme.md (deleted) node_modules/strip-ansi/index.d.ts (deleted) node_modules/strip-ansi/index.js (deleted) node_modules/strip-ansi/license (deleted) node_modules/strip-ansi/package.json (deleted) node_modules/strip-ansi/readme.md (deleted) node_modules/uqrcodejs/LICENSE.md (deleted) node_modules/uqrcodejs/README.md (deleted) node_modules/uqrcodejs/package.json (deleted) node_modules/uqrcodejs/uqrcode.js (deleted) node_modules/vue/LICENSE (deleted) node_modules/vue/README.md (deleted) node_modules/vue/compiler-sfc/index.browser.js (deleted) node_modules/vue/compiler-sfc/index.browser.mjs (deleted) node_modules/vue/compiler-sfc/index.d.mts (deleted) node_modules/vue/compiler-sfc/index.d.ts (deleted) node_modules/vue/compiler-sfc/index.js (deleted) node_modules/vue/compiler-sfc/index.mjs (deleted) node_modules/vue/compiler-sfc/package.json (deleted) node_modules/vue/compiler-sfc/register-ts.js (deleted) node_modules/vue/dist/vue.cjs.js (deleted) node_modules/vue/dist/vue.cjs.prod.js (deleted) node_modules/vue/dist/vue.d.mts (deleted) node_modules/vue/dist/vue.d.ts (deleted) node_modules/vue/dist/vue.esm-browser.js (deleted) node_modules/vue/dist/vue.esm-browser.prod.js (deleted) node_modules/vue/dist/vue.esm-bundler.js (deleted) node_modules/vue/dist/vue.global.js (deleted) node_modules/vue/dist/vue.global.prod.js (deleted) node_modules/vue/dist/vue.runtime.esm-browser.js (deleted) node_modules/vue/dist/vue.runtime.esm-browser.prod.js (deleted) node_modules/vue/dist/vue.runtime.esm-bundler.js (deleted) node_modules/vue/dist/vue.runtime.global.js (deleted) node_modules/vue/dist/vue.runtime.global.prod.js (deleted) node_modules/vue/index.js (deleted) node_modules/vue/index.mjs (deleted) node_modules/vue/jsx-runtime/index.d.ts (deleted) node_modules/vue/jsx-runtime/index.js (deleted) node_modules/vue/jsx-runtime/index.mjs (deleted) node_modules/vue/jsx-runtime/package.json (deleted) node_modules/vue/jsx.d.ts (deleted) node_modules/vue/package.json (deleted) node_modules/vue/server-renderer/index.d.mts (deleted) node_modules/vue/server-renderer/index.d.ts (deleted) node_modules/vue/server-renderer/index.js (deleted) node_modules/vue/server-renderer/index.mjs (deleted) node_modules/vue/server-renderer/package.json (deleted) node_modules/which-module/LICENSE (deleted) node_modules/which-module/README.md (deleted) node_modules/which-module/index.js (deleted) node_modules/which-module/package.json (deleted) node_modules/wrap-ansi/index.js (deleted) node_modules/wrap-ansi/license (deleted) node_modules/wrap-ansi/package.json (deleted) node_modules/wrap-ansi/readme.md (deleted) node_modules/y18n/CHANGELOG.md (deleted) node_modules/y18n/LICENSE (deleted) node_modules/y18n/README.md (deleted) node_modules/y18n/index.js (deleted) node_modules/y18n/package.json (deleted) node_modules/yargs-parser/CHANGELOG.md (deleted) node_modules/yargs-parser/LICENSE.txt (deleted) node_modules/yargs-parser/README.md (deleted) node_modules/yargs-parser/index.js (deleted) node_modules/yargs-parser/lib/tokenize-arg-string.js (deleted) node_modules/yargs-parser/package.json (deleted) node_modules/yargs/CHANGELOG.md (deleted) node_modules/yargs/LICENSE (deleted) node_modules/yargs/README.md (deleted) node_modules/yargs/build/lib/apply-extends.d.ts (deleted) node_modules/yargs/build/lib/apply-extends.js (deleted) node_modules/yargs/build/lib/argsert.d.ts (deleted) node_modules/yargs/build/lib/argsert.js (deleted) node_modules/yargs/build/lib/command.d.ts (deleted) node_modules/yargs/build/lib/command.js (deleted) node_modules/yargs/build/lib/common-types.d.ts (deleted) node_modules/yargs/build/lib/common-types.js (deleted) node_modules/yargs/build/lib/completion-templates.d.ts (deleted) node_modules/yargs/build/lib/completion-templates.js (deleted) node_modules/yargs/build/lib/completion.d.ts (deleted) node_modules/yargs/build/lib/completion.js (deleted) node_modules/yargs/build/lib/is-promise.d.ts (deleted) node_modules/yargs/build/lib/is-promise.js (deleted) node_modules/yargs/build/lib/levenshtein.d.ts (deleted) node_modules/yargs/build/lib/levenshtein.js (deleted) node_modules/yargs/build/lib/middleware.d.ts (deleted) node_modules/yargs/build/lib/middleware.js (deleted) node_modules/yargs/build/lib/obj-filter.d.ts (deleted) node_modules/yargs/build/lib/obj-filter.js (deleted) node_modules/yargs/build/lib/parse-command.d.ts (deleted) node_modules/yargs/build/lib/parse-command.js (deleted) node_modules/yargs/build/lib/process-argv.d.ts (deleted) node_modules/yargs/build/lib/process-argv.js (deleted) node_modules/yargs/build/lib/usage.d.ts (deleted) node_modules/yargs/build/lib/usage.js (deleted) node_modules/yargs/build/lib/validation.d.ts (deleted) node_modules/yargs/build/lib/validation.js (deleted) node_modules/yargs/build/lib/yargs.d.ts (deleted) node_modules/yargs/build/lib/yargs.js (deleted) node_modules/yargs/build/lib/yerror.d.ts (deleted) node_modules/yargs/build/lib/yerror.js (deleted) node_modules/yargs/index.js (deleted) node_modules/yargs/locales/be.json (deleted) node_modules/yargs/locales/de.json (deleted) node_modules/yargs/locales/en.json (deleted) node_modules/yargs/locales/es.json (deleted) node_modules/yargs/locales/fi.json (deleted) node_modules/yargs/locales/fr.json (deleted) node_modules/yargs/locales/hi.json (deleted) node_modules/yargs/locales/hu.json (deleted) node_modules/yargs/locales/id.json (deleted) node_modules/yargs/locales/it.json (deleted) node_modules/yargs/locales/ja.json (deleted) node_modules/yargs/locales/ko.json (deleted) node_modules/yargs/locales/nb.json (deleted) node_modules/yargs/locales/nl.json (deleted) node_modules/yargs/locales/nn.json (deleted) node_modules/yargs/locales/pirate.json (deleted) node_modules/yargs/locales/pl.json (deleted) node_modules/yargs/locales/pt.json (deleted) node_modules/yargs/locales/pt_BR.json (deleted) node_modules/yargs/locales/ru.json (deleted) node_modules/yargs/locales/th.json (deleted) node_modules/yargs/locales/tr.json (deleted) node_modules/yargs/locales/zh_CN.json (deleted) node_modules/yargs/locales/zh_TW.json (deleted) node_modules/yargs/package.json (deleted) node_modules/yargs/yargs.js (deleted) package.json pages.json pages/fg/fg.vue pages/history/history.vue pages/index.vue pages/mine/index.vue pages/tjrecord/tjrecord.vue pages/tjrecorddetail/tjrecorddetail.vue pagesA/Examiner/Examiner.vue pagesA/ReportDetails/ReportDetails.vue pagesA/ReportOverview/ReportOverview.vue pagesA/appointment/appointment.vue pagesA/goHosp/goHosp.vue (deleted) pagesA/hospIntroduce/hospIntroduce.vue pagesB/mine/xuanzeyuanqv/xuanzeyuanqv.vue